formue-crud 0.0.22 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formue-crud.js +8942 -12555
- package/dist/formue-crud.umd.cjs +31 -28
- package/dist/style.css +2 -2
- package/package.json +2 -1
package/dist/formue-crud.umd.cjs
CHANGED
@@ -1,48 +1,51 @@
|
|
1
|
-
(function(
|
1
|
+
(function(et,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("formue"),require("pinia"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","formue","pinia","axios"],d):(et=typeof globalThis<"u"?globalThis:et||self,d(et["formue-crud"]={},et.Vue,et.formue,et.pinia,et.axios))})(this,function(et,d,tt,Xa,St){"use strict";var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function uf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return s[i]}})}),t}var Jn={exports:{}};/**
|
2
2
|
* @license
|
3
3
|
* Lodash <https://lodash.com/>
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
5
5
|
* Released under MIT license <https://lodash.com/license>
|
6
6
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
7
7
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
8
|
-
*/ks.exports,function(n,e){(function(){var t,i="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",b=1,g=2,w=4,E=1,x=2,_=1,k=2,V=4,L=8,F=16,H=32,W=64,P=128,D=256,I=512,Z=30,ie="...",G=800,X=16,ee=1,ue=2,Re=3,U=1/0,$=9007199254740991,Q=17976931348623157e292,me=0/0,ye=4294967295,Ce=ye-1,Ie=ye>>>1,De=[["ary",P],["bind",_],["bindKey",k],["curry",L],["curryRight",F],["flip",I],["partial",H],["partialRight",W],["rearg",D]],ze="[object Arguments]",xe="[object Array]",rt="[object AsyncFunction]",_t="[object Boolean]",et="[object Date]",K="[object DOMException]",pe="[object Error]",Se="[object Function]",Pt="[object GeneratorFunction]",ve="[object Map]",je="[object Number]",Ke="[object Null]",Je="[object Object]",ot="[object Promise]",ft="[object Proxy]",Wi="[object RegExp]",mt="[object Set]",Ri="[object String]",ci="[object Symbol]",xn="[object Undefined]",us="[object WeakMap]",C0="[object WeakSet]",cs="[object ArrayBuffer]",_n="[object DataView]",Ko="[object Float32Array]",qo="[object Float64Array]",Yo="[object Int8Array]",Xo="[object Int16Array]",Jo="[object Int32Array]",Zo="[object Uint8Array]",Qo="[object Uint8ClampedArray]",ea="[object Uint16Array]",ta="[object Uint32Array]",E0=/\b__p \+= '';/g,x0=/\b(__p \+=) '' \+/g,_0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gd=/&(?:amp|lt|gt|quot|#39);/g,bd=/[&<>"']/g,R0=RegExp(gd.source),k0=RegExp(bd.source),S0=/<%-([\s\S]+?)%>/g,T0=/<%([\s\S]+?)%>/g,vd=/<%=([\s\S]+?)%>/g,M0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L0=/^\w*$/,D0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ia=/[\\^$.*+?()[\]{}|]/g,A0=RegExp(ia.source),na=/^\s+/,F0=/\s/,P0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,V0=/\{\n\/\* \[wrapped with (.+)\] \*/,O0=/,? & /,N0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,z0=/[()=,{}\[\]\/\s]/,H0=/\\(\\)?/g,I0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wd=/\w*$/,B0=/^[-+]0x[0-9a-f]+$/i,W0=/^0b[01]+$/i,$0=/^\[object .+?Constructor\]$/,G0=/^0o[0-7]+$/i,U0=/^(?:0|[1-9]\d*)$/,j0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ir=/($^)/,K0=/['\n\r\u2028\u2029\\]/g,nr="\\ud800-\\udfff",q0="\\u0300-\\u036f",Y0="\\ufe20-\\ufe2f",X0="\\u20d0-\\u20ff",yd=q0+Y0+X0,Cd="\\u2700-\\u27bf",Ed="a-z\\xdf-\\xf6\\xf8-\\xff",J0="\\xac\\xb1\\xd7\\xf7",Z0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Q0="\\u2000-\\u206f",eE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xd="A-Z\\xc0-\\xd6\\xd8-\\xde",_d="\\ufe0e\\ufe0f",Rd=J0+Z0+Q0+eE,sa="['’]",tE="["+nr+"]",kd="["+Rd+"]",sr="["+yd+"]",Sd="\\d+",iE="["+Cd+"]",Td="["+Ed+"]",Md="[^"+nr+Rd+Sd+Cd+Ed+xd+"]",ra="\\ud83c[\\udffb-\\udfff]",nE="(?:"+sr+"|"+ra+")",Ld="[^"+nr+"]",oa="(?:\\ud83c[\\udde6-\\uddff]){2}",aa="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="["+xd+"]",Dd="\\u200d",Ad="(?:"+Td+"|"+Md+")",sE="(?:"+Rn+"|"+Md+")",Fd="(?:"+sa+"(?:d|ll|m|re|s|t|ve))?",Pd="(?:"+sa+"(?:D|LL|M|RE|S|T|VE))?",Vd=nE+"?",Od="["+_d+"]?",rE="(?:"+Dd+"(?:"+[Ld,oa,aa].join("|")+")"+Od+Vd+")*",oE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nd=Od+Vd+rE,lE="(?:"+[iE,oa,aa].join("|")+")"+Nd,uE="(?:"+[Ld+sr+"?",sr,oa,aa,tE].join("|")+")",cE=RegExp(sa,"g"),dE=RegExp(sr,"g"),la=RegExp(ra+"(?="+ra+")|"+uE+Nd,"g"),hE=RegExp([Rn+"?"+Td+"+"+Fd+"(?="+[kd,Rn,"$"].join("|")+")",sE+"+"+Pd+"(?="+[kd,Rn+Ad,"$"].join("|")+")",Rn+"?"+Ad+"+"+Fd,Rn+"+"+Pd,aE,oE,Sd,lE].join("|"),"g"),fE=RegExp("["+Dd+nr+yd+_d+"]"),mE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gE=-1,Fe={};Fe[Ko]=Fe[qo]=Fe[Yo]=Fe[Xo]=Fe[Jo]=Fe[Zo]=Fe[Qo]=Fe[ea]=Fe[ta]=!0,Fe[ze]=Fe[xe]=Fe[cs]=Fe[_t]=Fe[_n]=Fe[et]=Fe[pe]=Fe[Se]=Fe[ve]=Fe[je]=Fe[Je]=Fe[Wi]=Fe[mt]=Fe[Ri]=Fe[us]=!1;var Ae={};Ae[ze]=Ae[xe]=Ae[cs]=Ae[_n]=Ae[_t]=Ae[et]=Ae[Ko]=Ae[qo]=Ae[Yo]=Ae[Xo]=Ae[Jo]=Ae[ve]=Ae[je]=Ae[Je]=Ae[Wi]=Ae[mt]=Ae[Ri]=Ae[ci]=Ae[Zo]=Ae[Qo]=Ae[ea]=Ae[ta]=!0,Ae[pe]=Ae[Se]=Ae[us]=!1;var bE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vE={"&":"&","<":"<",">":">",'"':""","'":"'"},wE={"&":"&","<":"<",">":">",""":'"',"'":"'"},yE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},CE=parseFloat,EE=parseInt,zd=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,xE=typeof self=="object"&&self&&self.Object===Object&&self,Ze=zd||xE||Function("return this")(),ua=e&&!e.nodeType&&e,$i=ua&&!0&&n&&!n.nodeType&&n,Hd=$i&&$i.exports===ua,ca=Hd&&zd.process,Vt=function(){try{var T=$i&&$i.require&&$i.require("util").types;return T||ca&&ca.binding&&ca.binding("util")}catch{}}(),Id=Vt&&Vt.isArrayBuffer,Bd=Vt&&Vt.isDate,Wd=Vt&&Vt.isMap,$d=Vt&&Vt.isRegExp,Gd=Vt&&Vt.isSet,Ud=Vt&&Vt.isTypedArray;function Rt(T,O,A){switch(A.length){case 0:return T.call(O);case 1:return T.call(O,A[0]);case 2:return T.call(O,A[0],A[1]);case 3:return T.call(O,A[0],A[1],A[2])}return T.apply(O,A)}function _E(T,O,A,q){for(var oe=-1,_e=T==null?0:T.length;++oe<_e;){var qe=T[oe];O(q,qe,A(qe),T)}return q}function Ot(T,O){for(var A=-1,q=T==null?0:T.length;++A<q&&O(T[A],A,T)!==!1;);return T}function RE(T,O){for(var A=T==null?0:T.length;A--&&O(T[A],A,T)!==!1;);return T}function jd(T,O){for(var A=-1,q=T==null?0:T.length;++A<q;)if(!O(T[A],A,T))return!1;return!0}function ki(T,O){for(var A=-1,q=T==null?0:T.length,oe=0,_e=[];++A<q;){var qe=T[A];O(qe,A,T)&&(_e[oe++]=qe)}return _e}function rr(T,O){var A=T==null?0:T.length;return!!A&&kn(T,O,0)>-1}function da(T,O,A){for(var q=-1,oe=T==null?0:T.length;++q<oe;)if(A(O,T[q]))return!0;return!1}function Oe(T,O){for(var A=-1,q=T==null?0:T.length,oe=Array(q);++A<q;)oe[A]=O(T[A],A,T);return oe}function Si(T,O){for(var A=-1,q=O.length,oe=T.length;++A<q;)T[oe+A]=O[A];return T}function ha(T,O,A,q){var oe=-1,_e=T==null?0:T.length;for(q&&_e&&(A=T[++oe]);++oe<_e;)A=O(A,T[oe],oe,T);return A}function kE(T,O,A,q){var oe=T==null?0:T.length;for(q&&oe&&(A=T[--oe]);oe--;)A=O(A,T[oe],oe,T);return A}function fa(T,O){for(var A=-1,q=T==null?0:T.length;++A<q;)if(O(T[A],A,T))return!0;return!1}var SE=ma("length");function TE(T){return T.split("")}function ME(T){return T.match(N0)||[]}function Kd(T,O,A){var q;return A(T,function(oe,_e,qe){if(O(oe,_e,qe))return q=_e,!1}),q}function or(T,O,A,q){for(var oe=T.length,_e=A+(q?1:-1);q?_e--:++_e<oe;)if(O(T[_e],_e,T))return _e;return-1}function kn(T,O,A){return O===O?BE(T,O,A):or(T,qd,A)}function LE(T,O,A,q){for(var oe=A-1,_e=T.length;++oe<_e;)if(q(T[oe],O))return oe;return-1}function qd(T){return T!==T}function Yd(T,O){var A=T==null?0:T.length;return A?ga(T,O)/A:me}function ma(T){return function(O){return O==null?t:O[T]}}function pa(T){return function(O){return T==null?t:T[O]}}function Xd(T,O,A,q,oe){return oe(T,function(_e,qe,Le){A=q?(q=!1,_e):O(A,_e,qe,Le)}),A}function DE(T,O){var A=T.length;for(T.sort(O);A--;)T[A]=T[A].value;return T}function ga(T,O){for(var A,q=-1,oe=T.length;++q<oe;){var _e=O(T[q]);_e!==t&&(A=A===t?_e:A+_e)}return A}function ba(T,O){for(var A=-1,q=Array(T);++A<T;)q[A]=O(A);return q}function AE(T,O){return Oe(O,function(A){return[A,T[A]]})}function Jd(T){return T&&T.slice(0,th(T)+1).replace(na,"")}function kt(T){return function(O){return T(O)}}function va(T,O){return Oe(O,function(A){return T[A]})}function ds(T,O){return T.has(O)}function Zd(T,O){for(var A=-1,q=T.length;++A<q&&kn(O,T[A],0)>-1;);return A}function Qd(T,O){for(var A=T.length;A--&&kn(O,T[A],0)>-1;);return A}function FE(T,O){for(var A=T.length,q=0;A--;)T[A]===O&&++q;return q}var PE=pa(bE),VE=pa(vE);function OE(T){return"\\"+yE[T]}function NE(T,O){return T==null?t:T[O]}function Sn(T){return fE.test(T)}function zE(T){return mE.test(T)}function HE(T){for(var O,A=[];!(O=T.next()).done;)A.push(O.value);return A}function wa(T){var O=-1,A=Array(T.size);return T.forEach(function(q,oe){A[++O]=[oe,q]}),A}function eh(T,O){return function(A){return T(O(A))}}function Ti(T,O){for(var A=-1,q=T.length,oe=0,_e=[];++A<q;){var qe=T[A];(qe===O||qe===p)&&(T[A]=p,_e[oe++]=A)}return _e}function ar(T){var O=-1,A=Array(T.size);return T.forEach(function(q){A[++O]=q}),A}function IE(T){var O=-1,A=Array(T.size);return T.forEach(function(q){A[++O]=[q,q]}),A}function BE(T,O,A){for(var q=A-1,oe=T.length;++q<oe;)if(T[q]===O)return q;return-1}function WE(T,O,A){for(var q=A+1;q--;)if(T[q]===O)return q;return q}function Tn(T){return Sn(T)?GE(T):SE(T)}function jt(T){return Sn(T)?UE(T):TE(T)}function th(T){for(var O=T.length;O--&&F0.test(T.charAt(O)););return O}var $E=pa(wE);function GE(T){for(var O=la.lastIndex=0;la.test(T);)++O;return O}function UE(T){return T.match(la)||[]}function jE(T){return T.match(hE)||[]}var KE=function T(O){O=O==null?Ze:Mn.defaults(Ze.Object(),O,Mn.pick(Ze,pE));var A=O.Array,q=O.Date,oe=O.Error,_e=O.Function,qe=O.Math,Le=O.Object,ya=O.RegExp,qE=O.String,Nt=O.TypeError,lr=A.prototype,YE=_e.prototype,Ln=Le.prototype,ur=O["__core-js_shared__"],cr=YE.toString,Te=Ln.hasOwnProperty,XE=0,ih=function(){var r=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),dr=Ln.toString,JE=cr.call(Le),ZE=Ze._,QE=ya("^"+cr.call(Te).replace(ia,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hr=Hd?O.Buffer:t,Mi=O.Symbol,fr=O.Uint8Array,nh=hr?hr.allocUnsafe:t,mr=eh(Le.getPrototypeOf,Le),sh=Le.create,rh=Ln.propertyIsEnumerable,pr=lr.splice,oh=Mi?Mi.isConcatSpreadable:t,hs=Mi?Mi.iterator:t,Gi=Mi?Mi.toStringTag:t,gr=function(){try{var r=Yi(Le,"defineProperty");return r({},"",{}),r}catch{}}(),e1=O.clearTimeout!==Ze.clearTimeout&&O.clearTimeout,t1=q&&q.now!==Ze.Date.now&&q.now,i1=O.setTimeout!==Ze.setTimeout&&O.setTimeout,br=qe.ceil,vr=qe.floor,Ca=Le.getOwnPropertySymbols,n1=hr?hr.isBuffer:t,ah=O.isFinite,s1=lr.join,r1=eh(Le.keys,Le),Ye=qe.max,tt=qe.min,o1=q.now,a1=O.parseInt,lh=qe.random,l1=lr.reverse,Ea=Yi(O,"DataView"),fs=Yi(O,"Map"),xa=Yi(O,"Promise"),Dn=Yi(O,"Set"),ms=Yi(O,"WeakMap"),ps=Yi(Le,"create"),wr=ms&&new ms,An={},u1=Xi(Ea),c1=Xi(fs),d1=Xi(xa),h1=Xi(Dn),f1=Xi(ms),yr=Mi?Mi.prototype:t,gs=yr?yr.valueOf:t,uh=yr?yr.toString:t;function y(r){if(Be(r)&&!ae(r)&&!(r instanceof we)){if(r instanceof zt)return r;if(Te.call(r,"__wrapped__"))return df(r)}return new zt(r)}var Fn=function(){function r(){}return function(a){if(!He(a))return{};if(sh)return sh(a);r.prototype=a;var d=new r;return r.prototype=t,d}}();function Cr(){}function zt(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:S0,evaluate:T0,interpolate:vd,variable:"",imports:{_:y}},y.prototype=Cr.prototype,y.prototype.constructor=y,zt.prototype=Fn(Cr.prototype),zt.prototype.constructor=zt;function we(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ye,this.__views__=[]}function m1(){var r=new we(this.__wrapped__);return r.__actions__=pt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=pt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=pt(this.__views__),r}function p1(){if(this.__filtered__){var r=new we(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function g1(){var r=this.__wrapped__.value(),a=this.__dir__,d=ae(r),m=a<0,v=d?r.length:0,C=Tx(0,v,this.__views__),R=C.start,S=C.end,M=S-R,N=m?S:R-1,z=this.__iteratees__,B=z.length,j=0,J=tt(M,this.__takeCount__);if(!d||!m&&v==M&&J==M)return Fh(r,this.__actions__);var ne=[];e:for(;M--&&j<J;){N+=a;for(var ce=-1,se=r[N];++ce<B;){var ge=z[ce],Ee=ge.iteratee,Mt=ge.type,ut=Ee(se);if(Mt==ue)se=ut;else if(!ut){if(Mt==ee)continue e;break e}}ne[j++]=se}return ne}we.prototype=Fn(Cr.prototype),we.prototype.constructor=we;function Ui(r){var a=-1,d=r==null?0:r.length;for(this.clear();++a<d;){var m=r[a];this.set(m[0],m[1])}}function b1(){this.__data__=ps?ps(null):{},this.size=0}function v1(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function w1(r){var a=this.__data__;if(ps){var d=a[r];return d===h?t:d}return Te.call(a,r)?a[r]:t}function y1(r){var a=this.__data__;return ps?a[r]!==t:Te.call(a,r)}function C1(r,a){var d=this.__data__;return this.size+=this.has(r)?0:1,d[r]=ps&&a===t?h:a,this}Ui.prototype.clear=b1,Ui.prototype.delete=v1,Ui.prototype.get=w1,Ui.prototype.has=y1,Ui.prototype.set=C1;function di(r){var a=-1,d=r==null?0:r.length;for(this.clear();++a<d;){var m=r[a];this.set(m[0],m[1])}}function E1(){this.__data__=[],this.size=0}function x1(r){var a=this.__data__,d=Er(a,r);if(d<0)return!1;var m=a.length-1;return d==m?a.pop():pr.call(a,d,1),--this.size,!0}function _1(r){var a=this.__data__,d=Er(a,r);return d<0?t:a[d][1]}function R1(r){return Er(this.__data__,r)>-1}function k1(r,a){var d=this.__data__,m=Er(d,r);return m<0?(++this.size,d.push([r,a])):d[m][1]=a,this}di.prototype.clear=E1,di.prototype.delete=x1,di.prototype.get=_1,di.prototype.has=R1,di.prototype.set=k1;function hi(r){var a=-1,d=r==null?0:r.length;for(this.clear();++a<d;){var m=r[a];this.set(m[0],m[1])}}function S1(){this.size=0,this.__data__={hash:new Ui,map:new(fs||di),string:new Ui}}function T1(r){var a=Pr(this,r).delete(r);return this.size-=a?1:0,a}function M1(r){return Pr(this,r).get(r)}function L1(r){return Pr(this,r).has(r)}function D1(r,a){var d=Pr(this,r),m=d.size;return d.set(r,a),this.size+=d.size==m?0:1,this}hi.prototype.clear=S1,hi.prototype.delete=T1,hi.prototype.get=M1,hi.prototype.has=L1,hi.prototype.set=D1;function ji(r){var a=-1,d=r==null?0:r.length;for(this.__data__=new hi;++a<d;)this.add(r[a])}function A1(r){return this.__data__.set(r,h),this}function F1(r){return this.__data__.has(r)}ji.prototype.add=ji.prototype.push=A1,ji.prototype.has=F1;function Kt(r){var a=this.__data__=new di(r);this.size=a.size}function P1(){this.__data__=new di,this.size=0}function V1(r){var a=this.__data__,d=a.delete(r);return this.size=a.size,d}function O1(r){return this.__data__.get(r)}function N1(r){return this.__data__.has(r)}function z1(r,a){var d=this.__data__;if(d instanceof di){var m=d.__data__;if(!fs||m.length<s-1)return m.push([r,a]),this.size=++d.size,this;d=this.__data__=new hi(m)}return d.set(r,a),this.size=d.size,this}Kt.prototype.clear=P1,Kt.prototype.delete=V1,Kt.prototype.get=O1,Kt.prototype.has=N1,Kt.prototype.set=z1;function ch(r,a){var d=ae(r),m=!d&&Ji(r),v=!d&&!m&&Pi(r),C=!d&&!m&&!v&&Nn(r),R=d||m||v||C,S=R?ba(r.length,qE):[],M=S.length;for(var N in r)(a||Te.call(r,N))&&!(R&&(N=="length"||v&&(N=="offset"||N=="parent")||C&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||gi(N,M)))&&S.push(N);return S}function dh(r){var a=r.length;return a?r[Pa(0,a-1)]:t}function H1(r,a){return Vr(pt(r),Ki(a,0,r.length))}function I1(r){return Vr(pt(r))}function _a(r,a,d){(d!==t&&!qt(r[a],d)||d===t&&!(a in r))&&fi(r,a,d)}function bs(r,a,d){var m=r[a];(!(Te.call(r,a)&&qt(m,d))||d===t&&!(a in r))&&fi(r,a,d)}function Er(r,a){for(var d=r.length;d--;)if(qt(r[d][0],a))return d;return-1}function B1(r,a,d,m){return Li(r,function(v,C,R){a(m,v,d(v),R)}),m}function hh(r,a){return r&&ni(a,Xe(a),r)}function W1(r,a){return r&&ni(a,bt(a),r)}function fi(r,a,d){a=="__proto__"&&gr?gr(r,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):r[a]=d}function Ra(r,a){for(var d=-1,m=a.length,v=A(m),C=r==null;++d<m;)v[d]=C?t:rl(r,a[d]);return v}function Ki(r,a,d){return r===r&&(d!==t&&(r=r<=d?r:d),a!==t&&(r=r>=a?r:a)),r}function Ht(r,a,d,m,v,C){var R,S=a&b,M=a&g,N=a&w;if(d&&(R=v?d(r,m,v,C):d(r)),R!==t)return R;if(!He(r))return r;var z=ae(r);if(z){if(R=Lx(r),!S)return pt(r,R)}else{var B=it(r),j=B==Se||B==Pt;if(Pi(r))return Oh(r,S);if(B==Je||B==ze||j&&!v){if(R=M||j?{}:tf(r),!S)return M?wx(r,W1(R,r)):vx(r,hh(R,r))}else{if(!Ae[B])return v?r:{};R=Dx(r,B,S)}}C||(C=new Kt);var J=C.get(r);if(J)return J;C.set(r,R),Df(r)?r.forEach(function(se){R.add(Ht(se,a,d,se,r,C))}):Mf(r)&&r.forEach(function(se,ge){R.set(ge,Ht(se,a,d,ge,r,C))});var ne=N?M?Ua:Ga:M?bt:Xe,ce=z?t:ne(r);return Ot(ce||r,function(se,ge){ce&&(ge=se,se=r[ge]),bs(R,ge,Ht(se,a,d,ge,r,C))}),R}function $1(r){var a=Xe(r);return function(d){return fh(d,r,a)}}function fh(r,a,d){var m=d.length;if(r==null)return!m;for(r=Le(r);m--;){var v=d[m],C=a[v],R=r[v];if(R===t&&!(v in r)||!C(R))return!1}return!0}function mh(r,a,d){if(typeof r!="function")throw new Nt(l);return _s(function(){r.apply(t,d)},a)}function vs(r,a,d,m){var v=-1,C=rr,R=!0,S=r.length,M=[],N=a.length;if(!S)return M;d&&(a=Oe(a,kt(d))),m?(C=da,R=!1):a.length>=s&&(C=ds,R=!1,a=new ji(a));e:for(;++v<S;){var z=r[v],B=d==null?z:d(z);if(z=m||z!==0?z:0,R&&B===B){for(var j=N;j--;)if(a[j]===B)continue e;M.push(z)}else C(a,B,m)||M.push(z)}return M}var Li=Bh(ii),ph=Bh(Sa,!0);function G1(r,a){var d=!0;return Li(r,function(m,v,C){return d=!!a(m,v,C),d}),d}function xr(r,a,d){for(var m=-1,v=r.length;++m<v;){var C=r[m],R=a(C);if(R!=null&&(S===t?R===R&&!Tt(R):d(R,S)))var S=R,M=C}return M}function U1(r,a,d,m){var v=r.length;for(d=le(d),d<0&&(d=-d>v?0:v+d),m=m===t||m>v?v:le(m),m<0&&(m+=v),m=d>m?0:Ff(m);d<m;)r[d++]=a;return r}function gh(r,a){var d=[];return Li(r,function(m,v,C){a(m,v,C)&&d.push(m)}),d}function Qe(r,a,d,m,v){var C=-1,R=r.length;for(d||(d=Fx),v||(v=[]);++C<R;){var S=r[C];a>0&&d(S)?a>1?Qe(S,a-1,d,m,v):Si(v,S):m||(v[v.length]=S)}return v}var ka=Wh(),bh=Wh(!0);function ii(r,a){return r&&ka(r,a,Xe)}function Sa(r,a){return r&&bh(r,a,Xe)}function _r(r,a){return ki(a,function(d){return bi(r[d])})}function qi(r,a){a=Ai(a,r);for(var d=0,m=a.length;r!=null&&d<m;)r=r[si(a[d++])];return d&&d==m?r:t}function vh(r,a,d){var m=a(r);return ae(r)?m:Si(m,d(r))}function at(r){return r==null?r===t?xn:Ke:Gi&&Gi in Le(r)?Sx(r):Ix(r)}function Ta(r,a){return r>a}function j1(r,a){return r!=null&&Te.call(r,a)}function K1(r,a){return r!=null&&a in Le(r)}function q1(r,a,d){return r>=tt(a,d)&&r<Ye(a,d)}function Ma(r,a,d){for(var m=d?da:rr,v=r[0].length,C=r.length,R=C,S=A(C),M=1/0,N=[];R--;){var z=r[R];R&&a&&(z=Oe(z,kt(a))),M=tt(z.length,M),S[R]=!d&&(a||v>=120&&z.length>=120)?new ji(R&&z):t}z=r[0];var B=-1,j=S[0];e:for(;++B<v&&N.length<M;){var J=z[B],ne=a?a(J):J;if(J=d||J!==0?J:0,!(j?ds(j,ne):m(N,ne,d))){for(R=C;--R;){var ce=S[R];if(!(ce?ds(ce,ne):m(r[R],ne,d)))continue e}j&&j.push(ne),N.push(J)}}return N}function Y1(r,a,d,m){return ii(r,function(v,C,R){a(m,d(v),C,R)}),m}function ws(r,a,d){a=Ai(a,r),r=of(r,a);var m=r==null?r:r[si(Bt(a))];return m==null?t:Rt(m,r,d)}function wh(r){return Be(r)&&at(r)==ze}function X1(r){return Be(r)&&at(r)==cs}function J1(r){return Be(r)&&at(r)==et}function ys(r,a,d,m,v){return r===a?!0:r==null||a==null||!Be(r)&&!Be(a)?r!==r&&a!==a:Z1(r,a,d,m,ys,v)}function Z1(r,a,d,m,v,C){var R=ae(r),S=ae(a),M=R?xe:it(r),N=S?xe:it(a);M=M==ze?Je:M,N=N==ze?Je:N;var z=M==Je,B=N==Je,j=M==N;if(j&&Pi(r)){if(!Pi(a))return!1;R=!0,z=!1}if(j&&!z)return C||(C=new Kt),R||Nn(r)?Zh(r,a,d,m,v,C):Rx(r,a,M,d,m,v,C);if(!(d&E)){var J=z&&Te.call(r,"__wrapped__"),ne=B&&Te.call(a,"__wrapped__");if(J||ne){var ce=J?r.value():r,se=ne?a.value():a;return C||(C=new Kt),v(ce,se,d,m,C)}}return j?(C||(C=new Kt),kx(r,a,d,m,v,C)):!1}function Q1(r){return Be(r)&&it(r)==ve}function La(r,a,d,m){var v=d.length,C=v,R=!m;if(r==null)return!C;for(r=Le(r);v--;){var S=d[v];if(R&&S[2]?S[1]!==r[S[0]]:!(S[0]in r))return!1}for(;++v<C;){S=d[v];var M=S[0],N=r[M],z=S[1];if(R&&S[2]){if(N===t&&!(M in r))return!1}else{var B=new Kt;if(m)var j=m(N,z,M,r,a,B);if(!(j===t?ys(z,N,E|x,m,B):j))return!1}}return!0}function yh(r){if(!He(r)||Vx(r))return!1;var a=bi(r)?QE:$0;return a.test(Xi(r))}function ex(r){return Be(r)&&at(r)==Wi}function tx(r){return Be(r)&&it(r)==mt}function ix(r){return Be(r)&&Br(r.length)&&!!Fe[at(r)]}function Ch(r){return typeof r=="function"?r:r==null?vt:typeof r=="object"?ae(r)?_h(r[0],r[1]):xh(r):Gf(r)}function Da(r){if(!xs(r))return r1(r);var a=[];for(var d in Le(r))Te.call(r,d)&&d!="constructor"&&a.push(d);return a}function nx(r){if(!He(r))return Hx(r);var a=xs(r),d=[];for(var m in r)m=="constructor"&&(a||!Te.call(r,m))||d.push(m);return d}function Aa(r,a){return r<a}function Eh(r,a){var d=-1,m=gt(r)?A(r.length):[];return Li(r,function(v,C,R){m[++d]=a(v,C,R)}),m}function xh(r){var a=Ka(r);return a.length==1&&a[0][2]?sf(a[0][0],a[0][1]):function(d){return d===r||La(d,r,a)}}function _h(r,a){return Ya(r)&&nf(a)?sf(si(r),a):function(d){var m=rl(d,r);return m===t&&m===a?ol(d,r):ys(a,m,E|x)}}function Rr(r,a,d,m,v){r!==a&&ka(a,function(C,R){if(v||(v=new Kt),He(C))sx(r,a,R,d,Rr,m,v);else{var S=m?m(Ja(r,R),C,R+"",r,a,v):t;S===t&&(S=C),_a(r,R,S)}},bt)}function sx(r,a,d,m,v,C,R){var S=Ja(r,d),M=Ja(a,d),N=R.get(M);if(N){_a(r,d,N);return}var z=C?C(S,M,d+"",r,a,R):t,B=z===t;if(B){var j=ae(M),J=!j&&Pi(M),ne=!j&&!J&&Nn(M);z=M,j||J||ne?ae(S)?z=S:Ge(S)?z=pt(S):J?(B=!1,z=Oh(M,!0)):ne?(B=!1,z=Nh(M,!0)):z=[]:Rs(M)||Ji(M)?(z=S,Ji(S)?z=Pf(S):(!He(S)||bi(S))&&(z=tf(M))):B=!1}B&&(R.set(M,z),v(z,M,m,C,R),R.delete(M)),_a(r,d,z)}function Rh(r,a){var d=r.length;if(d)return a+=a<0?d:0,gi(a,d)?r[a]:t}function kh(r,a,d){a.length?a=Oe(a,function(C){return ae(C)?function(R){return qi(R,C.length===1?C[0]:C)}:C}):a=[vt];var m=-1;a=Oe(a,kt(te()));var v=Eh(r,function(C,R,S){var M=Oe(a,function(N){return N(C)});return{criteria:M,index:++m,value:C}});return DE(v,function(C,R){return bx(C,R,d)})}function rx(r,a){return Sh(r,a,function(d,m){return ol(r,m)})}function Sh(r,a,d){for(var m=-1,v=a.length,C={};++m<v;){var R=a[m],S=qi(r,R);d(S,R)&&Cs(C,Ai(R,r),S)}return C}function ox(r){return function(a){return qi(a,r)}}function Fa(r,a,d,m){var v=m?LE:kn,C=-1,R=a.length,S=r;for(r===a&&(a=pt(a)),d&&(S=Oe(r,kt(d)));++C<R;)for(var M=0,N=a[C],z=d?d(N):N;(M=v(S,z,M,m))>-1;)S!==r&&pr.call(S,M,1),pr.call(r,M,1);return r}function Th(r,a){for(var d=r?a.length:0,m=d-1;d--;){var v=a[d];if(d==m||v!==C){var C=v;gi(v)?pr.call(r,v,1):Na(r,v)}}return r}function Pa(r,a){return r+vr(lh()*(a-r+1))}function ax(r,a,d,m){for(var v=-1,C=Ye(br((a-r)/(d||1)),0),R=A(C);C--;)R[m?C:++v]=r,r+=d;return R}function Va(r,a){var d="";if(!r||a<1||a>$)return d;do a%2&&(d+=r),a=vr(a/2),a&&(r+=r);while(a);return d}function de(r,a){return Za(rf(r,a,vt),r+"")}function lx(r){return dh(zn(r))}function ux(r,a){var d=zn(r);return Vr(d,Ki(a,0,d.length))}function Cs(r,a,d,m){if(!He(r))return r;a=Ai(a,r);for(var v=-1,C=a.length,R=C-1,S=r;S!=null&&++v<C;){var M=si(a[v]),N=d;if(M==="__proto__"||M==="constructor"||M==="prototype")return r;if(v!=R){var z=S[M];N=m?m(z,M,S):t,N===t&&(N=He(z)?z:gi(a[v+1])?[]:{})}bs(S,M,N),S=S[M]}return r}var Mh=wr?function(r,a){return wr.set(r,a),r}:vt,cx=gr?function(r,a){return gr(r,"toString",{configurable:!0,enumerable:!1,value:ll(a),writable:!0})}:vt;function dx(r){return Vr(zn(r))}function It(r,a,d){var m=-1,v=r.length;a<0&&(a=-a>v?0:v+a),d=d>v?v:d,d<0&&(d+=v),v=a>d?0:d-a>>>0,a>>>=0;for(var C=A(v);++m<v;)C[m]=r[m+a];return C}function hx(r,a){var d;return Li(r,function(m,v,C){return d=a(m,v,C),!d}),!!d}function kr(r,a,d){var m=0,v=r==null?m:r.length;if(typeof a=="number"&&a===a&&v<=Ie){for(;m<v;){var C=m+v>>>1,R=r[C];R!==null&&!Tt(R)&&(d?R<=a:R<a)?m=C+1:v=C}return v}return Oa(r,a,vt,d)}function Oa(r,a,d,m){var v=0,C=r==null?0:r.length;if(C===0)return 0;a=d(a);for(var R=a!==a,S=a===null,M=Tt(a),N=a===t;v<C;){var z=vr((v+C)/2),B=d(r[z]),j=B!==t,J=B===null,ne=B===B,ce=Tt(B);if(R)var se=m||ne;else N?se=ne&&(m||j):S?se=ne&&j&&(m||!J):M?se=ne&&j&&!J&&(m||!ce):J||ce?se=!1:se=m?B<=a:B<a;se?v=z+1:C=z}return tt(C,Ce)}function Lh(r,a){for(var d=-1,m=r.length,v=0,C=[];++d<m;){var R=r[d],S=a?a(R):R;if(!d||!qt(S,M)){var M=S;C[v++]=R===0?0:R}}return C}function Dh(r){return typeof r=="number"?r:Tt(r)?me:+r}function St(r){if(typeof r=="string")return r;if(ae(r))return Oe(r,St)+"";if(Tt(r))return uh?uh.call(r):"";var a=r+"";return a=="0"&&1/r==-U?"-0":a}function Di(r,a,d){var m=-1,v=rr,C=r.length,R=!0,S=[],M=S;if(d)R=!1,v=da;else if(C>=s){var N=a?null:xx(r);if(N)return ar(N);R=!1,v=ds,M=new ji}else M=a?[]:S;e:for(;++m<C;){var z=r[m],B=a?a(z):z;if(z=d||z!==0?z:0,R&&B===B){for(var j=M.length;j--;)if(M[j]===B)continue e;a&&M.push(B),S.push(z)}else v(M,B,d)||(M!==S&&M.push(B),S.push(z))}return S}function Na(r,a){return a=Ai(a,r),r=of(r,a),r==null||delete r[si(Bt(a))]}function Ah(r,a,d,m){return Cs(r,a,d(qi(r,a)),m)}function Sr(r,a,d,m){for(var v=r.length,C=m?v:-1;(m?C--:++C<v)&&a(r[C],C,r););return d?It(r,m?0:C,m?C+1:v):It(r,m?C+1:0,m?v:C)}function Fh(r,a){var d=r;return d instanceof we&&(d=d.value()),ha(a,function(m,v){return v.func.apply(v.thisArg,Si([m],v.args))},d)}function za(r,a,d){var m=r.length;if(m<2)return m?Di(r[0]):[];for(var v=-1,C=A(m);++v<m;)for(var R=r[v],S=-1;++S<m;)S!=v&&(C[v]=vs(C[v]||R,r[S],a,d));return Di(Qe(C,1),a,d)}function Ph(r,a,d){for(var m=-1,v=r.length,C=a.length,R={};++m<v;){var S=m<C?a[m]:t;d(R,r[m],S)}return R}function Ha(r){return Ge(r)?r:[]}function Ia(r){return typeof r=="function"?r:vt}function Ai(r,a){return ae(r)?r:Ya(r,a)?[r]:cf(ke(r))}var fx=de;function Fi(r,a,d){var m=r.length;return d=d===t?m:d,!a&&d>=m?r:It(r,a,d)}var Vh=e1||function(r){return Ze.clearTimeout(r)};function Oh(r,a){if(a)return r.slice();var d=r.length,m=nh?nh(d):new r.constructor(d);return r.copy(m),m}function Ba(r){var a=new r.constructor(r.byteLength);return new fr(a).set(new fr(r)),a}function mx(r,a){var d=a?Ba(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.byteLength)}function px(r){var a=new r.constructor(r.source,wd.exec(r));return a.lastIndex=r.lastIndex,a}function gx(r){return gs?Le(gs.call(r)):{}}function Nh(r,a){var d=a?Ba(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.length)}function zh(r,a){if(r!==a){var d=r!==t,m=r===null,v=r===r,C=Tt(r),R=a!==t,S=a===null,M=a===a,N=Tt(a);if(!S&&!N&&!C&&r>a||C&&R&&M&&!S&&!N||m&&R&&M||!d&&M||!v)return 1;if(!m&&!C&&!N&&r<a||N&&d&&v&&!m&&!C||S&&d&&v||!R&&v||!M)return-1}return 0}function bx(r,a,d){for(var m=-1,v=r.criteria,C=a.criteria,R=v.length,S=d.length;++m<R;){var M=zh(v[m],C[m]);if(M){if(m>=S)return M;var N=d[m];return M*(N=="desc"?-1:1)}}return r.index-a.index}function Hh(r,a,d,m){for(var v=-1,C=r.length,R=d.length,S=-1,M=a.length,N=Ye(C-R,0),z=A(M+N),B=!m;++S<M;)z[S]=a[S];for(;++v<R;)(B||v<C)&&(z[d[v]]=r[v]);for(;N--;)z[S++]=r[v++];return z}function Ih(r,a,d,m){for(var v=-1,C=r.length,R=-1,S=d.length,M=-1,N=a.length,z=Ye(C-S,0),B=A(z+N),j=!m;++v<z;)B[v]=r[v];for(var J=v;++M<N;)B[J+M]=a[M];for(;++R<S;)(j||v<C)&&(B[J+d[R]]=r[v++]);return B}function pt(r,a){var d=-1,m=r.length;for(a||(a=A(m));++d<m;)a[d]=r[d];return a}function ni(r,a,d,m){var v=!d;d||(d={});for(var C=-1,R=a.length;++C<R;){var S=a[C],M=m?m(d[S],r[S],S,d,r):t;M===t&&(M=r[S]),v?fi(d,S,M):bs(d,S,M)}return d}function vx(r,a){return ni(r,qa(r),a)}function wx(r,a){return ni(r,Qh(r),a)}function Tr(r,a){return function(d,m){var v=ae(d)?_E:B1,C=a?a():{};return v(d,r,te(m,2),C)}}function Pn(r){return de(function(a,d){var m=-1,v=d.length,C=v>1?d[v-1]:t,R=v>2?d[2]:t;for(C=r.length>3&&typeof C=="function"?(v--,C):t,R&<(d[0],d[1],R)&&(C=v<3?t:C,v=1),a=Le(a);++m<v;){var S=d[m];S&&r(a,S,m,C)}return a})}function Bh(r,a){return function(d,m){if(d==null)return d;if(!gt(d))return r(d,m);for(var v=d.length,C=a?v:-1,R=Le(d);(a?C--:++C<v)&&m(R[C],C,R)!==!1;);return d}}function Wh(r){return function(a,d,m){for(var v=-1,C=Le(a),R=m(a),S=R.length;S--;){var M=R[r?S:++v];if(d(C[M],M,C)===!1)break}return a}}function yx(r,a,d){var m=a&_,v=Es(r);function C(){var R=this&&this!==Ze&&this instanceof C?v:r;return R.apply(m?d:this,arguments)}return C}function $h(r){return function(a){a=ke(a);var d=Sn(a)?jt(a):t,m=d?d[0]:a.charAt(0),v=d?Fi(d,1).join(""):a.slice(1);return m[r]()+v}}function Vn(r){return function(a){return ha(Wf(Bf(a).replace(cE,"")),r,"")}}function Es(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var d=Fn(r.prototype),m=r.apply(d,a);return He(m)?m:d}}function Cx(r,a,d){var m=Es(r);function v(){for(var C=arguments.length,R=A(C),S=C,M=On(v);S--;)R[S]=arguments[S];var N=C<3&&R[0]!==M&&R[C-1]!==M?[]:Ti(R,M);if(C-=N.length,C<d)return qh(r,a,Mr,v.placeholder,t,R,N,t,t,d-C);var z=this&&this!==Ze&&this instanceof v?m:r;return Rt(z,this,R)}return v}function Gh(r){return function(a,d,m){var v=Le(a);if(!gt(a)){var C=te(d,3);a=Xe(a),d=function(S){return C(v[S],S,v)}}var R=r(a,d,m);return R>-1?v[C?a[R]:R]:t}}function Uh(r){return pi(function(a){var d=a.length,m=d,v=zt.prototype.thru;for(r&&a.reverse();m--;){var C=a[m];if(typeof C!="function")throw new Nt(l);if(v&&!R&&Fr(C)=="wrapper")var R=new zt([],!0)}for(m=R?m:d;++m<d;){C=a[m];var S=Fr(C),M=S=="wrapper"?ja(C):t;M&&Xa(M[0])&&M[1]==(P|L|H|D)&&!M[4].length&&M[9]==1?R=R[Fr(M[0])].apply(R,M[3]):R=C.length==1&&Xa(C)?R[S]():R.thru(C)}return function(){var N=arguments,z=N[0];if(R&&N.length==1&&ae(z))return R.plant(z).value();for(var B=0,j=d?a[B].apply(this,N):z;++B<d;)j=a[B].call(this,j);return j}})}function Mr(r,a,d,m,v,C,R,S,M,N){var z=a&P,B=a&_,j=a&k,J=a&(L|F),ne=a&I,ce=j?t:Es(r);function se(){for(var ge=arguments.length,Ee=A(ge),Mt=ge;Mt--;)Ee[Mt]=arguments[Mt];if(J)var ut=On(se),Lt=FE(Ee,ut);if(m&&(Ee=Hh(Ee,m,v,J)),C&&(Ee=Ih(Ee,C,R,J)),ge-=Lt,J&&ge<N){var Ue=Ti(Ee,ut);return qh(r,a,Mr,se.placeholder,d,Ee,Ue,S,M,N-ge)}var Yt=B?d:this,wi=j?Yt[r]:r;return ge=Ee.length,S?Ee=Bx(Ee,S):ne&&ge>1&&Ee.reverse(),z&&M<ge&&(Ee.length=M),this&&this!==Ze&&this instanceof se&&(wi=ce||Es(wi)),wi.apply(Yt,Ee)}return se}function jh(r,a){return function(d,m){return Y1(d,r,a(m),{})}}function Lr(r,a){return function(d,m){var v;if(d===t&&m===t)return a;if(d!==t&&(v=d),m!==t){if(v===t)return m;typeof d=="string"||typeof m=="string"?(d=St(d),m=St(m)):(d=Dh(d),m=Dh(m)),v=r(d,m)}return v}}function Wa(r){return pi(function(a){return a=Oe(a,kt(te())),de(function(d){var m=this;return r(a,function(v){return Rt(v,m,d)})})})}function Dr(r,a){a=a===t?" ":St(a);var d=a.length;if(d<2)return d?Va(a,r):a;var m=Va(a,br(r/Tn(a)));return Sn(a)?Fi(jt(m),0,r).join(""):m.slice(0,r)}function Ex(r,a,d,m){var v=a&_,C=Es(r);function R(){for(var S=-1,M=arguments.length,N=-1,z=m.length,B=A(z+M),j=this&&this!==Ze&&this instanceof R?C:r;++N<z;)B[N]=m[N];for(;M--;)B[N++]=arguments[++S];return Rt(j,v?d:this,B)}return R}function Kh(r){return function(a,d,m){return m&&typeof m!="number"&<(a,d,m)&&(d=m=t),a=vi(a),d===t?(d=a,a=0):d=vi(d),m=m===t?a<d?1:-1:vi(m),ax(a,d,m,r)}}function Ar(r){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=Wt(a),d=Wt(d)),r(a,d)}}function qh(r,a,d,m,v,C,R,S,M,N){var z=a&L,B=z?R:t,j=z?t:R,J=z?C:t,ne=z?t:C;a|=z?H:W,a&=~(z?W:H),a&V||(a&=~(_|k));var ce=[r,a,v,J,B,ne,j,S,M,N],se=d.apply(t,ce);return Xa(r)&&af(se,ce),se.placeholder=m,lf(se,r,a)}function $a(r){var a=qe[r];return function(d,m){if(d=Wt(d),m=m==null?0:tt(le(m),292),m&&ah(d)){var v=(ke(d)+"e").split("e"),C=a(v[0]+"e"+(+v[1]+m));return v=(ke(C)+"e").split("e"),+(v[0]+"e"+(+v[1]-m))}return a(d)}}var xx=Dn&&1/ar(new Dn([,-0]))[1]==U?function(r){return new Dn(r)}:dl;function Yh(r){return function(a){var d=it(a);return d==ve?wa(a):d==mt?IE(a):AE(a,r(a))}}function mi(r,a,d,m,v,C,R,S){var M=a&k;if(!M&&typeof r!="function")throw new Nt(l);var N=m?m.length:0;if(N||(a&=~(H|W),m=v=t),R=R===t?R:Ye(le(R),0),S=S===t?S:le(S),N-=v?v.length:0,a&W){var z=m,B=v;m=v=t}var j=M?t:ja(r),J=[r,a,d,m,v,z,B,C,R,S];if(j&&zx(J,j),r=J[0],a=J[1],d=J[2],m=J[3],v=J[4],S=J[9]=J[9]===t?M?0:r.length:Ye(J[9]-N,0),!S&&a&(L|F)&&(a&=~(L|F)),!a||a==_)var ne=yx(r,a,d);else a==L||a==F?ne=Cx(r,a,S):(a==H||a==(_|H))&&!v.length?ne=Ex(r,a,d,m):ne=Mr.apply(t,J);var ce=j?Mh:af;return lf(ce(ne,J),r,a)}function Xh(r,a,d,m){return r===t||qt(r,Ln[d])&&!Te.call(m,d)?a:r}function Jh(r,a,d,m,v,C){return He(r)&&He(a)&&(C.set(a,r),Rr(r,a,t,Jh,C),C.delete(a)),r}function _x(r){return Rs(r)?t:r}function Zh(r,a,d,m,v,C){var R=d&E,S=r.length,M=a.length;if(S!=M&&!(R&&M>S))return!1;var N=C.get(r),z=C.get(a);if(N&&z)return N==a&&z==r;var B=-1,j=!0,J=d&x?new ji:t;for(C.set(r,a),C.set(a,r);++B<S;){var ne=r[B],ce=a[B];if(m)var se=R?m(ce,ne,B,a,r,C):m(ne,ce,B,r,a,C);if(se!==t){if(se)continue;j=!1;break}if(J){if(!fa(a,function(ge,Ee){if(!ds(J,Ee)&&(ne===ge||v(ne,ge,d,m,C)))return J.push(Ee)})){j=!1;break}}else if(!(ne===ce||v(ne,ce,d,m,C))){j=!1;break}}return C.delete(r),C.delete(a),j}function Rx(r,a,d,m,v,C,R){switch(d){case _n:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case cs:return!(r.byteLength!=a.byteLength||!C(new fr(r),new fr(a)));case _t:case et:case je:return qt(+r,+a);case pe:return r.name==a.name&&r.message==a.message;case Wi:case Ri:return r==a+"";case ve:var S=wa;case mt:var M=m&E;if(S||(S=ar),r.size!=a.size&&!M)return!1;var N=R.get(r);if(N)return N==a;m|=x,R.set(r,a);var z=Zh(S(r),S(a),m,v,C,R);return R.delete(r),z;case ci:if(gs)return gs.call(r)==gs.call(a)}return!1}function kx(r,a,d,m,v,C){var R=d&E,S=Ga(r),M=S.length,N=Ga(a),z=N.length;if(M!=z&&!R)return!1;for(var B=M;B--;){var j=S[B];if(!(R?j in a:Te.call(a,j)))return!1}var J=C.get(r),ne=C.get(a);if(J&&ne)return J==a&&ne==r;var ce=!0;C.set(r,a),C.set(a,r);for(var se=R;++B<M;){j=S[B];var ge=r[j],Ee=a[j];if(m)var Mt=R?m(Ee,ge,j,a,r,C):m(ge,Ee,j,r,a,C);if(!(Mt===t?ge===Ee||v(ge,Ee,d,m,C):Mt)){ce=!1;break}se||(se=j=="constructor")}if(ce&&!se){var ut=r.constructor,Lt=a.constructor;ut!=Lt&&"constructor"in r&&"constructor"in a&&!(typeof ut=="function"&&ut instanceof ut&&typeof Lt=="function"&&Lt instanceof Lt)&&(ce=!1)}return C.delete(r),C.delete(a),ce}function pi(r){return Za(rf(r,t,mf),r+"")}function Ga(r){return vh(r,Xe,qa)}function Ua(r){return vh(r,bt,Qh)}var ja=wr?function(r){return wr.get(r)}:dl;function Fr(r){for(var a=r.name+"",d=An[a],m=Te.call(An,a)?d.length:0;m--;){var v=d[m],C=v.func;if(C==null||C==r)return v.name}return a}function On(r){var a=Te.call(y,"placeholder")?y:r;return a.placeholder}function te(){var r=y.iteratee||ul;return r=r===ul?Ch:r,arguments.length?r(arguments[0],arguments[1]):r}function Pr(r,a){var d=r.__data__;return Px(a)?d[typeof a=="string"?"string":"hash"]:d.map}function Ka(r){for(var a=Xe(r),d=a.length;d--;){var m=a[d],v=r[m];a[d]=[m,v,nf(v)]}return a}function Yi(r,a){var d=NE(r,a);return yh(d)?d:t}function Sx(r){var a=Te.call(r,Gi),d=r[Gi];try{r[Gi]=t;var m=!0}catch{}var v=dr.call(r);return m&&(a?r[Gi]=d:delete r[Gi]),v}var qa=Ca?function(r){return r==null?[]:(r=Le(r),ki(Ca(r),function(a){return rh.call(r,a)}))}:hl,Qh=Ca?function(r){for(var a=[];r;)Si(a,qa(r)),r=mr(r);return a}:hl,it=at;(Ea&&it(new Ea(new ArrayBuffer(1)))!=_n||fs&&it(new fs)!=ve||xa&&it(xa.resolve())!=ot||Dn&&it(new Dn)!=mt||ms&&it(new ms)!=us)&&(it=function(r){var a=at(r),d=a==Je?r.constructor:t,m=d?Xi(d):"";if(m)switch(m){case u1:return _n;case c1:return ve;case d1:return ot;case h1:return mt;case f1:return us}return a});function Tx(r,a,d){for(var m=-1,v=d.length;++m<v;){var C=d[m],R=C.size;switch(C.type){case"drop":r+=R;break;case"dropRight":a-=R;break;case"take":a=tt(a,r+R);break;case"takeRight":r=Ye(r,a-R);break}}return{start:r,end:a}}function Mx(r){var a=r.match(V0);return a?a[1].split(O0):[]}function ef(r,a,d){a=Ai(a,r);for(var m=-1,v=a.length,C=!1;++m<v;){var R=si(a[m]);if(!(C=r!=null&&d(r,R)))break;r=r[R]}return C||++m!=v?C:(v=r==null?0:r.length,!!v&&Br(v)&&gi(R,v)&&(ae(r)||Ji(r)))}function Lx(r){var a=r.length,d=new r.constructor(a);return a&&typeof r[0]=="string"&&Te.call(r,"index")&&(d.index=r.index,d.input=r.input),d}function tf(r){return typeof r.constructor=="function"&&!xs(r)?Fn(mr(r)):{}}function Dx(r,a,d){var m=r.constructor;switch(a){case cs:return Ba(r);case _t:case et:return new m(+r);case _n:return mx(r,d);case Ko:case qo:case Yo:case Xo:case Jo:case Zo:case Qo:case ea:case ta:return Nh(r,d);case ve:return new m;case je:case Ri:return new m(r);case Wi:return px(r);case mt:return new m;case ci:return gx(r)}}function Ax(r,a){var d=a.length;if(!d)return r;var m=d-1;return a[m]=(d>1?"& ":"")+a[m],a=a.join(d>2?", ":" "),r.replace(P0,`{
|
8
|
+
*/Jn.exports,function(s,e){(function(){var t,i="4.17.21",n=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",h="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",b=1,v=2,C=4,x=1,R=2,L=1,k=2,H=4,P=8,z=16,V=32,Z=64,N=128,W=256,le=512,Ee=30,de="...",$=800,Q=16,se=1,De=2,Te=3,Ye=1/0,me=9007199254740991,fe=17976931348623157e292,Pe=0/0,Ae=4294967295,EC=Ae-1,xC=Ae>>>1,_C=[["ary",N],["bind",L],["bindKey",k],["curry",P],["curryRight",z],["flip",le],["partial",V],["partialRight",Z],["rearg",W]],Ui="[object Arguments]",Mr="[object Array]",RC="[object AsyncFunction]",Mn="[object Boolean]",Ln="[object Date]",TC="[object DOMException]",Lr="[object Error]",Dr="[object Function]",Lh="[object GeneratorFunction]",Ct="[object Map]",Dn="[object Number]",SC="[object Null]",It="[object Object]",Dh="[object Promise]",kC="[object Proxy]",An="[object RegExp]",Et="[object Set]",Fn="[object String]",Ar="[object Symbol]",MC="[object Undefined]",Pn="[object WeakMap]",LC="[object WeakSet]",On="[object ArrayBuffer]",ji="[object DataView]",Mo="[object Float32Array]",Lo="[object Float64Array]",Do="[object Int8Array]",Ao="[object Int16Array]",Fo="[object Int32Array]",Po="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Ho="[object Uint16Array]",zo="[object Uint32Array]",DC=/\b__p \+= '';/g,AC=/\b(__p \+=) '' \+/g,FC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ah=/&(?:amp|lt|gt|quot|#39);/g,Fh=/[&<>"']/g,PC=RegExp(Ah.source),OC=RegExp(Fh.source),HC=/<%-([\s\S]+?)%>/g,zC=/<%([\s\S]+?)%>/g,Ph=/<%=([\s\S]+?)%>/g,NC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IC=/^\w*$/,BC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,No=/[\\^$.*+?()[\]{}|]/g,VC=RegExp(No.source),Io=/^\s+/,WC=/\s/,$C=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,GC=/\{\n\/\* \[wrapped with (.+)\] \*/,UC=/,? & /,jC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,KC=/[()=,{}\[\]\/\s]/,qC=/\\(\\)?/g,YC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Oh=/\w*$/,XC=/^[-+]0x[0-9a-f]+$/i,JC=/^0b[01]+$/i,ZC=/^\[object .+?Constructor\]$/,QC=/^0o[0-7]+$/i,eE=/^(?:0|[1-9]\d*)$/,tE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fr=/($^)/,iE=/['\n\r\u2028\u2029\\]/g,Pr="\\ud800-\\udfff",nE="\\u0300-\\u036f",rE="\\ufe20-\\ufe2f",sE="\\u20d0-\\u20ff",Hh=nE+rE+sE,zh="\\u2700-\\u27bf",Nh="a-z\\xdf-\\xf6\\xf8-\\xff",oE="\\xac\\xb1\\xd7\\xf7",aE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lE="\\u2000-\\u206f",uE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ih="A-Z\\xc0-\\xd6\\xd8-\\xde",Bh="\\ufe0e\\ufe0f",Vh=oE+aE+lE+uE,Bo="['’]",hE="["+Pr+"]",Wh="["+Vh+"]",Or="["+Hh+"]",$h="\\d+",cE="["+zh+"]",Gh="["+Nh+"]",Uh="[^"+Pr+Vh+$h+zh+Nh+Ih+"]",Vo="\\ud83c[\\udffb-\\udfff]",dE="(?:"+Or+"|"+Vo+")",jh="[^"+Pr+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",$o="[\\ud800-\\udbff][\\udc00-\\udfff]",Ki="["+Ih+"]",Kh="\\u200d",qh="(?:"+Gh+"|"+Uh+")",fE="(?:"+Ki+"|"+Uh+")",Yh="(?:"+Bo+"(?:d|ll|m|re|s|t|ve))?",Xh="(?:"+Bo+"(?:D|LL|M|RE|S|T|VE))?",Jh=dE+"?",Zh="["+Bh+"]?",pE="(?:"+Kh+"(?:"+[jh,Wo,$o].join("|")+")"+Zh+Jh+")*",mE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qh=Zh+Jh+pE,bE="(?:"+[cE,Wo,$o].join("|")+")"+Qh,vE="(?:"+[jh+Or+"?",Or,Wo,$o,hE].join("|")+")",wE=RegExp(Bo,"g"),yE=RegExp(Or,"g"),Go=RegExp(Vo+"(?="+Vo+")|"+vE+Qh,"g"),CE=RegExp([Ki+"?"+Gh+"+"+Yh+"(?="+[Wh,Ki,"$"].join("|")+")",fE+"+"+Xh+"(?="+[Wh,Ki+qh,"$"].join("|")+")",Ki+"?"+qh+"+"+Yh,Ki+"+"+Xh,gE,mE,$h,bE].join("|"),"g"),EE=RegExp("["+Kh+Pr+Hh+Bh+"]"),xE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_E=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],RE=-1,be={};be[Mo]=be[Lo]=be[Do]=be[Ao]=be[Fo]=be[Po]=be[Oo]=be[Ho]=be[zo]=!0,be[Ui]=be[Mr]=be[On]=be[Mn]=be[ji]=be[Ln]=be[Lr]=be[Dr]=be[Ct]=be[Dn]=be[It]=be[An]=be[Et]=be[Fn]=be[Pn]=!1;var ge={};ge[Ui]=ge[Mr]=ge[On]=ge[ji]=ge[Mn]=ge[Ln]=ge[Mo]=ge[Lo]=ge[Do]=ge[Ao]=ge[Fo]=ge[Ct]=ge[Dn]=ge[It]=ge[An]=ge[Et]=ge[Fn]=ge[Ar]=ge[Po]=ge[Oo]=ge[Ho]=ge[zo]=!0,ge[Lr]=ge[Dr]=ge[Pn]=!1;var TE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},SE={"&":"&","<":"<",">":">",'"':""","'":"'"},kE={"&":"&","<":"<",">":">",""":'"',"'":"'"},ME={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LE=parseFloat,DE=parseInt,ec=typeof ln=="object"&&ln&&ln.Object===Object&&ln,AE=typeof self=="object"&&self&&self.Object===Object&&self,Oe=ec||AE||Function("return this")(),Uo=e&&!e.nodeType&&e,bi=Uo&&!0&&s&&!s.nodeType&&s,tc=bi&&bi.exports===Uo,jo=tc&&ec.process,ct=function(){try{var T=bi&&bi.require&&bi.require("util").types;return T||jo&&jo.binding&&jo.binding("util")}catch{}}(),ic=ct&&ct.isArrayBuffer,nc=ct&&ct.isDate,rc=ct&&ct.isMap,sc=ct&&ct.isRegExp,oc=ct&&ct.isSet,ac=ct&&ct.isTypedArray;function nt(T,D,M){switch(M.length){case 0:return T.call(D);case 1:return T.call(D,M[0]);case 2:return T.call(D,M[0],M[1]);case 3:return T.call(D,M[0],M[1],M[2])}return T.apply(D,M)}function FE(T,D,M,B){for(var Y=-1,ue=T==null?0:T.length;++Y<ue;){var Se=T[Y];D(B,Se,M(Se),T)}return B}function dt(T,D){for(var M=-1,B=T==null?0:T.length;++M<B&&D(T[M],M,T)!==!1;);return T}function PE(T,D){for(var M=T==null?0:T.length;M--&&D(T[M],M,T)!==!1;);return T}function lc(T,D){for(var M=-1,B=T==null?0:T.length;++M<B;)if(!D(T[M],M,T))return!1;return!0}function ei(T,D){for(var M=-1,B=T==null?0:T.length,Y=0,ue=[];++M<B;){var Se=T[M];D(Se,M,T)&&(ue[Y++]=Se)}return ue}function Hr(T,D){var M=T==null?0:T.length;return!!M&&qi(T,D,0)>-1}function Ko(T,D,M){for(var B=-1,Y=T==null?0:T.length;++B<Y;)if(M(D,T[B]))return!0;return!1}function we(T,D){for(var M=-1,B=T==null?0:T.length,Y=Array(B);++M<B;)Y[M]=D(T[M],M,T);return Y}function ti(T,D){for(var M=-1,B=D.length,Y=T.length;++M<B;)T[Y+M]=D[M];return T}function qo(T,D,M,B){var Y=-1,ue=T==null?0:T.length;for(B&&ue&&(M=T[++Y]);++Y<ue;)M=D(M,T[Y],Y,T);return M}function OE(T,D,M,B){var Y=T==null?0:T.length;for(B&&Y&&(M=T[--Y]);Y--;)M=D(M,T[Y],Y,T);return M}function Yo(T,D){for(var M=-1,B=T==null?0:T.length;++M<B;)if(D(T[M],M,T))return!0;return!1}var HE=Xo("length");function zE(T){return T.split("")}function NE(T){return T.match(jC)||[]}function uc(T,D,M){var B;return M(T,function(Y,ue,Se){if(D(Y,ue,Se))return B=ue,!1}),B}function zr(T,D,M,B){for(var Y=T.length,ue=M+(B?1:-1);B?ue--:++ue<Y;)if(D(T[ue],ue,T))return ue;return-1}function qi(T,D,M){return D===D?XE(T,D,M):zr(T,hc,M)}function IE(T,D,M,B){for(var Y=M-1,ue=T.length;++Y<ue;)if(B(T[Y],D))return Y;return-1}function hc(T){return T!==T}function cc(T,D){var M=T==null?0:T.length;return M?Zo(T,D)/M:Pe}function Xo(T){return function(D){return D==null?t:D[T]}}function Jo(T){return function(D){return T==null?t:T[D]}}function dc(T,D,M,B,Y){return Y(T,function(ue,Se,pe){M=B?(B=!1,ue):D(M,ue,Se,pe)}),M}function BE(T,D){var M=T.length;for(T.sort(D);M--;)T[M]=T[M].value;return T}function Zo(T,D){for(var M,B=-1,Y=T.length;++B<Y;){var ue=D(T[B]);ue!==t&&(M=M===t?ue:M+ue)}return M}function Qo(T,D){for(var M=-1,B=Array(T);++M<T;)B[M]=D(M);return B}function VE(T,D){return we(D,function(M){return[M,T[M]]})}function fc(T){return T&&T.slice(0,bc(T)+1).replace(Io,"")}function rt(T){return function(D){return T(D)}}function ea(T,D){return we(D,function(M){return T[M]})}function Hn(T,D){return T.has(D)}function pc(T,D){for(var M=-1,B=T.length;++M<B&&qi(D,T[M],0)>-1;);return M}function mc(T,D){for(var M=T.length;M--&&qi(D,T[M],0)>-1;);return M}function WE(T,D){for(var M=T.length,B=0;M--;)T[M]===D&&++B;return B}var $E=Jo(TE),GE=Jo(SE);function UE(T){return"\\"+ME[T]}function jE(T,D){return T==null?t:T[D]}function Yi(T){return EE.test(T)}function KE(T){return xE.test(T)}function qE(T){for(var D,M=[];!(D=T.next()).done;)M.push(D.value);return M}function ta(T){var D=-1,M=Array(T.size);return T.forEach(function(B,Y){M[++D]=[Y,B]}),M}function gc(T,D){return function(M){return T(D(M))}}function ii(T,D){for(var M=-1,B=T.length,Y=0,ue=[];++M<B;){var Se=T[M];(Se===D||Se===m)&&(T[M]=m,ue[Y++]=M)}return ue}function Nr(T){var D=-1,M=Array(T.size);return T.forEach(function(B){M[++D]=B}),M}function YE(T){var D=-1,M=Array(T.size);return T.forEach(function(B){M[++D]=[B,B]}),M}function XE(T,D,M){for(var B=M-1,Y=T.length;++B<Y;)if(T[B]===D)return B;return-1}function JE(T,D,M){for(var B=M+1;B--;)if(T[B]===D)return B;return B}function Xi(T){return Yi(T)?QE(T):HE(T)}function xt(T){return Yi(T)?e1(T):zE(T)}function bc(T){for(var D=T.length;D--&&WC.test(T.charAt(D)););return D}var ZE=Jo(kE);function QE(T){for(var D=Go.lastIndex=0;Go.test(T);)++D;return D}function e1(T){return T.match(Go)||[]}function t1(T){return T.match(CE)||[]}var i1=function T(D){D=D==null?Oe:Ji.defaults(Oe.Object(),D,Ji.pick(Oe,_E));var M=D.Array,B=D.Date,Y=D.Error,ue=D.Function,Se=D.Math,pe=D.Object,ia=D.RegExp,n1=D.String,ft=D.TypeError,Ir=M.prototype,r1=ue.prototype,Zi=pe.prototype,Br=D["__core-js_shared__"],Vr=r1.toString,ce=Zi.hasOwnProperty,s1=0,vc=function(){var r=/[^.]+$/.exec(Br&&Br.keys&&Br.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Wr=Zi.toString,o1=Vr.call(pe),a1=Oe._,l1=ia("^"+Vr.call(ce).replace(No,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$r=tc?D.Buffer:t,ni=D.Symbol,Gr=D.Uint8Array,wc=$r?$r.allocUnsafe:t,Ur=gc(pe.getPrototypeOf,pe),yc=pe.create,Cc=Zi.propertyIsEnumerable,jr=Ir.splice,Ec=ni?ni.isConcatSpreadable:t,zn=ni?ni.iterator:t,vi=ni?ni.toStringTag:t,Kr=function(){try{var r=xi(pe,"defineProperty");return r({},"",{}),r}catch{}}(),u1=D.clearTimeout!==Oe.clearTimeout&&D.clearTimeout,h1=B&&B.now!==Oe.Date.now&&B.now,c1=D.setTimeout!==Oe.setTimeout&&D.setTimeout,qr=Se.ceil,Yr=Se.floor,na=pe.getOwnPropertySymbols,d1=$r?$r.isBuffer:t,xc=D.isFinite,f1=Ir.join,p1=gc(pe.keys,pe),ke=Se.max,Ve=Se.min,m1=B.now,g1=D.parseInt,_c=Se.random,b1=Ir.reverse,ra=xi(D,"DataView"),Nn=xi(D,"Map"),sa=xi(D,"Promise"),Qi=xi(D,"Set"),In=xi(D,"WeakMap"),Bn=xi(pe,"create"),Xr=In&&new In,en={},v1=_i(ra),w1=_i(Nn),y1=_i(sa),C1=_i(Qi),E1=_i(In),Jr=ni?ni.prototype:t,Vn=Jr?Jr.valueOf:t,Rc=Jr?Jr.toString:t;function w(r){if(Ce(r)&&!X(r)&&!(r instanceof oe)){if(r instanceof pt)return r;if(ce.call(r,"__wrapped__"))return Td(r)}return new pt(r)}var tn=function(){function r(){}return function(a){if(!ye(a))return{};if(yc)return yc(a);r.prototype=a;var u=new r;return r.prototype=t,u}}();function Zr(){}function pt(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}w.templateSettings={escape:HC,evaluate:zC,interpolate:Ph,variable:"",imports:{_:w}},w.prototype=Zr.prototype,w.prototype.constructor=w,pt.prototype=tn(Zr.prototype),pt.prototype.constructor=pt;function oe(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ae,this.__views__=[]}function x1(){var r=new oe(this.__wrapped__);return r.__actions__=Xe(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Xe(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Xe(this.__views__),r}function _1(){if(this.__filtered__){var r=new oe(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function R1(){var r=this.__wrapped__.value(),a=this.__dir__,u=X(r),p=a<0,g=u?r.length:0,y=zx(0,g,this.__views__),E=y.start,_=y.end,S=_-E,A=p?_:E-1,F=this.__iteratees__,O=F.length,I=0,G=Ve(S,this.__takeCount__);if(!u||!p&&g==S&&G==S)return Yc(r,this.__actions__);var K=[];e:for(;S--&&I<G;){A+=a;for(var ee=-1,q=r[A];++ee<O;){var ne=F[ee],ae=ne.iteratee,at=ne.type,je=ae(q);if(at==De)q=je;else if(!je){if(at==se)continue e;break e}}K[I++]=q}return K}oe.prototype=tn(Zr.prototype),oe.prototype.constructor=oe;function wi(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var p=r[a];this.set(p[0],p[1])}}function T1(){this.__data__=Bn?Bn(null):{},this.size=0}function S1(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function k1(r){var a=this.__data__;if(Bn){var u=a[r];return u===c?t:u}return ce.call(a,r)?a[r]:t}function M1(r){var a=this.__data__;return Bn?a[r]!==t:ce.call(a,r)}function L1(r,a){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Bn&&a===t?c:a,this}wi.prototype.clear=T1,wi.prototype.delete=S1,wi.prototype.get=k1,wi.prototype.has=M1,wi.prototype.set=L1;function Bt(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var p=r[a];this.set(p[0],p[1])}}function D1(){this.__data__=[],this.size=0}function A1(r){var a=this.__data__,u=Qr(a,r);if(u<0)return!1;var p=a.length-1;return u==p?a.pop():jr.call(a,u,1),--this.size,!0}function F1(r){var a=this.__data__,u=Qr(a,r);return u<0?t:a[u][1]}function P1(r){return Qr(this.__data__,r)>-1}function O1(r,a){var u=this.__data__,p=Qr(u,r);return p<0?(++this.size,u.push([r,a])):u[p][1]=a,this}Bt.prototype.clear=D1,Bt.prototype.delete=A1,Bt.prototype.get=F1,Bt.prototype.has=P1,Bt.prototype.set=O1;function Vt(r){var a=-1,u=r==null?0:r.length;for(this.clear();++a<u;){var p=r[a];this.set(p[0],p[1])}}function H1(){this.size=0,this.__data__={hash:new wi,map:new(Nn||Bt),string:new wi}}function z1(r){var a=cs(this,r).delete(r);return this.size-=a?1:0,a}function N1(r){return cs(this,r).get(r)}function I1(r){return cs(this,r).has(r)}function B1(r,a){var u=cs(this,r),p=u.size;return u.set(r,a),this.size+=u.size==p?0:1,this}Vt.prototype.clear=H1,Vt.prototype.delete=z1,Vt.prototype.get=N1,Vt.prototype.has=I1,Vt.prototype.set=B1;function yi(r){var a=-1,u=r==null?0:r.length;for(this.__data__=new Vt;++a<u;)this.add(r[a])}function V1(r){return this.__data__.set(r,c),this}function W1(r){return this.__data__.has(r)}yi.prototype.add=yi.prototype.push=V1,yi.prototype.has=W1;function _t(r){var a=this.__data__=new Bt(r);this.size=a.size}function $1(){this.__data__=new Bt,this.size=0}function G1(r){var a=this.__data__,u=a.delete(r);return this.size=a.size,u}function U1(r){return this.__data__.get(r)}function j1(r){return this.__data__.has(r)}function K1(r,a){var u=this.__data__;if(u instanceof Bt){var p=u.__data__;if(!Nn||p.length<n-1)return p.push([r,a]),this.size=++u.size,this;u=this.__data__=new Vt(p)}return u.set(r,a),this.size=u.size,this}_t.prototype.clear=$1,_t.prototype.delete=G1,_t.prototype.get=U1,_t.prototype.has=j1,_t.prototype.set=K1;function Tc(r,a){var u=X(r),p=!u&&Ri(r),g=!u&&!p&&li(r),y=!u&&!p&&!g&&on(r),E=u||p||g||y,_=E?Qo(r.length,n1):[],S=_.length;for(var A in r)(a||ce.call(r,A))&&!(E&&(A=="length"||g&&(A=="offset"||A=="parent")||y&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Ut(A,S)))&&_.push(A);return _}function Sc(r){var a=r.length;return a?r[ga(0,a-1)]:t}function q1(r,a){return ds(Xe(r),Ci(a,0,r.length))}function Y1(r){return ds(Xe(r))}function oa(r,a,u){(u!==t&&!Rt(r[a],u)||u===t&&!(a in r))&&Wt(r,a,u)}function Wn(r,a,u){var p=r[a];(!(ce.call(r,a)&&Rt(p,u))||u===t&&!(a in r))&&Wt(r,a,u)}function Qr(r,a){for(var u=r.length;u--;)if(Rt(r[u][0],a))return u;return-1}function X1(r,a,u,p){return ri(r,function(g,y,E){a(p,g,u(g),E)}),p}function kc(r,a){return r&&Ft(a,Fe(a),r)}function J1(r,a){return r&&Ft(a,Ze(a),r)}function Wt(r,a,u){a=="__proto__"&&Kr?Kr(r,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[a]=u}function aa(r,a){for(var u=-1,p=a.length,g=M(p),y=r==null;++u<p;)g[u]=y?t:Va(r,a[u]);return g}function Ci(r,a,u){return r===r&&(u!==t&&(r=r<=u?r:u),a!==t&&(r=r>=a?r:a)),r}function mt(r,a,u,p,g,y){var E,_=a&b,S=a&v,A=a&C;if(u&&(E=g?u(r,p,g,y):u(r)),E!==t)return E;if(!ye(r))return r;var F=X(r);if(F){if(E=Ix(r),!_)return Xe(r,E)}else{var O=We(r),I=O==Dr||O==Lh;if(li(r))return Zc(r,_);if(O==It||O==Ui||I&&!g){if(E=S||I?{}:bd(r),!_)return S?kx(r,J1(E,r)):Sx(r,kc(E,r))}else{if(!ge[O])return g?r:{};E=Bx(r,O,_)}}y||(y=new _t);var G=y.get(r);if(G)return G;y.set(r,E),jd(r)?r.forEach(function(q){E.add(mt(q,a,u,q,r,y))}):Gd(r)&&r.forEach(function(q,ne){E.set(ne,mt(q,a,u,ne,r,y))});var K=A?S?Sa:Ta:S?Ze:Fe,ee=F?t:K(r);return dt(ee||r,function(q,ne){ee&&(ne=q,q=r[ne]),Wn(E,ne,mt(q,a,u,ne,r,y))}),E}function Z1(r){var a=Fe(r);return function(u){return Mc(u,r,a)}}function Mc(r,a,u){var p=u.length;if(r==null)return!p;for(r=pe(r);p--;){var g=u[p],y=a[g],E=r[g];if(E===t&&!(g in r)||!y(E))return!1}return!0}function Lc(r,a,u){if(typeof r!="function")throw new ft(l);return Yn(function(){r.apply(t,u)},a)}function $n(r,a,u,p){var g=-1,y=Hr,E=!0,_=r.length,S=[],A=a.length;if(!_)return S;u&&(a=we(a,rt(u))),p?(y=Ko,E=!1):a.length>=n&&(y=Hn,E=!1,a=new yi(a));e:for(;++g<_;){var F=r[g],O=u==null?F:u(F);if(F=p||F!==0?F:0,E&&O===O){for(var I=A;I--;)if(a[I]===O)continue e;S.push(F)}else y(a,O,p)||S.push(F)}return S}var ri=nd(At),Dc=nd(ua,!0);function Q1(r,a){var u=!0;return ri(r,function(p,g,y){return u=!!a(p,g,y),u}),u}function es(r,a,u){for(var p=-1,g=r.length;++p<g;){var y=r[p],E=a(y);if(E!=null&&(_===t?E===E&&!ot(E):u(E,_)))var _=E,S=y}return S}function ex(r,a,u,p){var g=r.length;for(u=J(u),u<0&&(u=-u>g?0:g+u),p=p===t||p>g?g:J(p),p<0&&(p+=g),p=u>p?0:qd(p);u<p;)r[u++]=a;return r}function Ac(r,a){var u=[];return ri(r,function(p,g,y){a(p,g,y)&&u.push(p)}),u}function He(r,a,u,p,g){var y=-1,E=r.length;for(u||(u=Wx),g||(g=[]);++y<E;){var _=r[y];a>0&&u(_)?a>1?He(_,a-1,u,p,g):ti(g,_):p||(g[g.length]=_)}return g}var la=rd(),Fc=rd(!0);function At(r,a){return r&&la(r,a,Fe)}function ua(r,a){return r&&Fc(r,a,Fe)}function ts(r,a){return ei(a,function(u){return jt(r[u])})}function Ei(r,a){a=oi(a,r);for(var u=0,p=a.length;r!=null&&u<p;)r=r[Pt(a[u++])];return u&&u==p?r:t}function Pc(r,a,u){var p=a(r);return X(r)?p:ti(p,u(r))}function Ge(r){return r==null?r===t?MC:SC:vi&&vi in pe(r)?Hx(r):Yx(r)}function ha(r,a){return r>a}function tx(r,a){return r!=null&&ce.call(r,a)}function ix(r,a){return r!=null&&a in pe(r)}function nx(r,a,u){return r>=Ve(a,u)&&r<ke(a,u)}function ca(r,a,u){for(var p=u?Ko:Hr,g=r[0].length,y=r.length,E=y,_=M(y),S=1/0,A=[];E--;){var F=r[E];E&&a&&(F=we(F,rt(a))),S=Ve(F.length,S),_[E]=!u&&(a||g>=120&&F.length>=120)?new yi(E&&F):t}F=r[0];var O=-1,I=_[0];e:for(;++O<g&&A.length<S;){var G=F[O],K=a?a(G):G;if(G=u||G!==0?G:0,!(I?Hn(I,K):p(A,K,u))){for(E=y;--E;){var ee=_[E];if(!(ee?Hn(ee,K):p(r[E],K,u)))continue e}I&&I.push(K),A.push(G)}}return A}function rx(r,a,u,p){return At(r,function(g,y,E){a(p,u(g),y,E)}),p}function Gn(r,a,u){a=oi(a,r),r=Cd(r,a);var p=r==null?r:r[Pt(bt(a))];return p==null?t:nt(p,r,u)}function Oc(r){return Ce(r)&&Ge(r)==Ui}function sx(r){return Ce(r)&&Ge(r)==On}function ox(r){return Ce(r)&&Ge(r)==Ln}function Un(r,a,u,p,g){return r===a?!0:r==null||a==null||!Ce(r)&&!Ce(a)?r!==r&&a!==a:ax(r,a,u,p,Un,g)}function ax(r,a,u,p,g,y){var E=X(r),_=X(a),S=E?Mr:We(r),A=_?Mr:We(a);S=S==Ui?It:S,A=A==Ui?It:A;var F=S==It,O=A==It,I=S==A;if(I&&li(r)){if(!li(a))return!1;E=!0,F=!1}if(I&&!F)return y||(y=new _t),E||on(r)?pd(r,a,u,p,g,y):Px(r,a,S,u,p,g,y);if(!(u&x)){var G=F&&ce.call(r,"__wrapped__"),K=O&&ce.call(a,"__wrapped__");if(G||K){var ee=G?r.value():r,q=K?a.value():a;return y||(y=new _t),g(ee,q,u,p,y)}}return I?(y||(y=new _t),Ox(r,a,u,p,g,y)):!1}function lx(r){return Ce(r)&&We(r)==Ct}function da(r,a,u,p){var g=u.length,y=g,E=!p;if(r==null)return!y;for(r=pe(r);g--;){var _=u[g];if(E&&_[2]?_[1]!==r[_[0]]:!(_[0]in r))return!1}for(;++g<y;){_=u[g];var S=_[0],A=r[S],F=_[1];if(E&&_[2]){if(A===t&&!(S in r))return!1}else{var O=new _t;if(p)var I=p(A,F,S,r,a,O);if(!(I===t?Un(F,A,x|R,p,O):I))return!1}}return!0}function Hc(r){if(!ye(r)||Gx(r))return!1;var a=jt(r)?l1:ZC;return a.test(_i(r))}function ux(r){return Ce(r)&&Ge(r)==An}function hx(r){return Ce(r)&&We(r)==Et}function cx(r){return Ce(r)&&vs(r.length)&&!!be[Ge(r)]}function zc(r){return typeof r=="function"?r:r==null?Qe:typeof r=="object"?X(r)?Bc(r[0],r[1]):Ic(r):of(r)}function fa(r){if(!qn(r))return p1(r);var a=[];for(var u in pe(r))ce.call(r,u)&&u!="constructor"&&a.push(u);return a}function dx(r){if(!ye(r))return qx(r);var a=qn(r),u=[];for(var p in r)p=="constructor"&&(a||!ce.call(r,p))||u.push(p);return u}function pa(r,a){return r<a}function Nc(r,a){var u=-1,p=Je(r)?M(r.length):[];return ri(r,function(g,y,E){p[++u]=a(g,y,E)}),p}function Ic(r){var a=Ma(r);return a.length==1&&a[0][2]?wd(a[0][0],a[0][1]):function(u){return u===r||da(u,r,a)}}function Bc(r,a){return Da(r)&&vd(a)?wd(Pt(r),a):function(u){var p=Va(u,r);return p===t&&p===a?Wa(u,r):Un(a,p,x|R)}}function is(r,a,u,p,g){r!==a&&la(a,function(y,E){if(g||(g=new _t),ye(y))fx(r,a,E,u,is,p,g);else{var _=p?p(Fa(r,E),y,E+"",r,a,g):t;_===t&&(_=y),oa(r,E,_)}},Ze)}function fx(r,a,u,p,g,y,E){var _=Fa(r,u),S=Fa(a,u),A=E.get(S);if(A){oa(r,u,A);return}var F=y?y(_,S,u+"",r,a,E):t,O=F===t;if(O){var I=X(S),G=!I&&li(S),K=!I&&!G&&on(S);F=S,I||G||K?X(_)?F=_:xe(_)?F=Xe(_):G?(O=!1,F=Zc(S,!0)):K?(O=!1,F=Qc(S,!0)):F=[]:Xn(S)||Ri(S)?(F=_,Ri(_)?F=Yd(_):(!ye(_)||jt(_))&&(F=bd(S))):O=!1}O&&(E.set(S,F),g(F,S,p,y,E),E.delete(S)),oa(r,u,F)}function Vc(r,a){var u=r.length;if(u)return a+=a<0?u:0,Ut(a,u)?r[a]:t}function Wc(r,a,u){a.length?a=we(a,function(y){return X(y)?function(E){return Ei(E,y.length===1?y[0]:y)}:y}):a=[Qe];var p=-1;a=we(a,rt(j()));var g=Nc(r,function(y,E,_){var S=we(a,function(A){return A(y)});return{criteria:S,index:++p,value:y}});return BE(g,function(y,E){return Tx(y,E,u)})}function px(r,a){return $c(r,a,function(u,p){return Wa(r,p)})}function $c(r,a,u){for(var p=-1,g=a.length,y={};++p<g;){var E=a[p],_=Ei(r,E);u(_,E)&&jn(y,oi(E,r),_)}return y}function mx(r){return function(a){return Ei(a,r)}}function ma(r,a,u,p){var g=p?IE:qi,y=-1,E=a.length,_=r;for(r===a&&(a=Xe(a)),u&&(_=we(r,rt(u)));++y<E;)for(var S=0,A=a[y],F=u?u(A):A;(S=g(_,F,S,p))>-1;)_!==r&&jr.call(_,S,1),jr.call(r,S,1);return r}function Gc(r,a){for(var u=r?a.length:0,p=u-1;u--;){var g=a[u];if(u==p||g!==y){var y=g;Ut(g)?jr.call(r,g,1):wa(r,g)}}return r}function ga(r,a){return r+Yr(_c()*(a-r+1))}function gx(r,a,u,p){for(var g=-1,y=ke(qr((a-r)/(u||1)),0),E=M(y);y--;)E[p?y:++g]=r,r+=u;return E}function ba(r,a){var u="";if(!r||a<1||a>me)return u;do a%2&&(u+=r),a=Yr(a/2),a&&(r+=r);while(a);return u}function te(r,a){return Pa(yd(r,a,Qe),r+"")}function bx(r){return Sc(an(r))}function vx(r,a){var u=an(r);return ds(u,Ci(a,0,u.length))}function jn(r,a,u,p){if(!ye(r))return r;a=oi(a,r);for(var g=-1,y=a.length,E=y-1,_=r;_!=null&&++g<y;){var S=Pt(a[g]),A=u;if(S==="__proto__"||S==="constructor"||S==="prototype")return r;if(g!=E){var F=_[S];A=p?p(F,S,_):t,A===t&&(A=ye(F)?F:Ut(a[g+1])?[]:{})}Wn(_,S,A),_=_[S]}return r}var Uc=Xr?function(r,a){return Xr.set(r,a),r}:Qe,wx=Kr?function(r,a){return Kr(r,"toString",{configurable:!0,enumerable:!1,value:Ga(a),writable:!0})}:Qe;function yx(r){return ds(an(r))}function gt(r,a,u){var p=-1,g=r.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var y=M(g);++p<g;)y[p]=r[p+a];return y}function Cx(r,a){var u;return ri(r,function(p,g,y){return u=a(p,g,y),!u}),!!u}function ns(r,a,u){var p=0,g=r==null?p:r.length;if(typeof a=="number"&&a===a&&g<=xC){for(;p<g;){var y=p+g>>>1,E=r[y];E!==null&&!ot(E)&&(u?E<=a:E<a)?p=y+1:g=y}return g}return va(r,a,Qe,u)}function va(r,a,u,p){var g=0,y=r==null?0:r.length;if(y===0)return 0;a=u(a);for(var E=a!==a,_=a===null,S=ot(a),A=a===t;g<y;){var F=Yr((g+y)/2),O=u(r[F]),I=O!==t,G=O===null,K=O===O,ee=ot(O);if(E)var q=p||K;else A?q=K&&(p||I):_?q=K&&I&&(p||!G):S?q=K&&I&&!G&&(p||!ee):G||ee?q=!1:q=p?O<=a:O<a;q?g=F+1:y=F}return Ve(y,EC)}function jc(r,a){for(var u=-1,p=r.length,g=0,y=[];++u<p;){var E=r[u],_=a?a(E):E;if(!u||!Rt(_,S)){var S=_;y[g++]=E===0?0:E}}return y}function Kc(r){return typeof r=="number"?r:ot(r)?Pe:+r}function st(r){if(typeof r=="string")return r;if(X(r))return we(r,st)+"";if(ot(r))return Rc?Rc.call(r):"";var a=r+"";return a=="0"&&1/r==-Ye?"-0":a}function si(r,a,u){var p=-1,g=Hr,y=r.length,E=!0,_=[],S=_;if(u)E=!1,g=Ko;else if(y>=n){var A=a?null:Ax(r);if(A)return Nr(A);E=!1,g=Hn,S=new yi}else S=a?[]:_;e:for(;++p<y;){var F=r[p],O=a?a(F):F;if(F=u||F!==0?F:0,E&&O===O){for(var I=S.length;I--;)if(S[I]===O)continue e;a&&S.push(O),_.push(F)}else g(S,O,u)||(S!==_&&S.push(O),_.push(F))}return _}function wa(r,a){return a=oi(a,r),r=Cd(r,a),r==null||delete r[Pt(bt(a))]}function qc(r,a,u,p){return jn(r,a,u(Ei(r,a)),p)}function rs(r,a,u,p){for(var g=r.length,y=p?g:-1;(p?y--:++y<g)&&a(r[y],y,r););return u?gt(r,p?0:y,p?y+1:g):gt(r,p?y+1:0,p?g:y)}function Yc(r,a){var u=r;return u instanceof oe&&(u=u.value()),qo(a,function(p,g){return g.func.apply(g.thisArg,ti([p],g.args))},u)}function ya(r,a,u){var p=r.length;if(p<2)return p?si(r[0]):[];for(var g=-1,y=M(p);++g<p;)for(var E=r[g],_=-1;++_<p;)_!=g&&(y[g]=$n(y[g]||E,r[_],a,u));return si(He(y,1),a,u)}function Xc(r,a,u){for(var p=-1,g=r.length,y=a.length,E={};++p<g;){var _=p<y?a[p]:t;u(E,r[p],_)}return E}function Ca(r){return xe(r)?r:[]}function Ea(r){return typeof r=="function"?r:Qe}function oi(r,a){return X(r)?r:Da(r,a)?[r]:Rd(he(r))}var Ex=te;function ai(r,a,u){var p=r.length;return u=u===t?p:u,!a&&u>=p?r:gt(r,a,u)}var Jc=u1||function(r){return Oe.clearTimeout(r)};function Zc(r,a){if(a)return r.slice();var u=r.length,p=wc?wc(u):new r.constructor(u);return r.copy(p),p}function xa(r){var a=new r.constructor(r.byteLength);return new Gr(a).set(new Gr(r)),a}function xx(r,a){var u=a?xa(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function _x(r){var a=new r.constructor(r.source,Oh.exec(r));return a.lastIndex=r.lastIndex,a}function Rx(r){return Vn?pe(Vn.call(r)):{}}function Qc(r,a){var u=a?xa(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function ed(r,a){if(r!==a){var u=r!==t,p=r===null,g=r===r,y=ot(r),E=a!==t,_=a===null,S=a===a,A=ot(a);if(!_&&!A&&!y&&r>a||y&&E&&S&&!_&&!A||p&&E&&S||!u&&S||!g)return 1;if(!p&&!y&&!A&&r<a||A&&u&&g&&!p&&!y||_&&u&&g||!E&&g||!S)return-1}return 0}function Tx(r,a,u){for(var p=-1,g=r.criteria,y=a.criteria,E=g.length,_=u.length;++p<E;){var S=ed(g[p],y[p]);if(S){if(p>=_)return S;var A=u[p];return S*(A=="desc"?-1:1)}}return r.index-a.index}function td(r,a,u,p){for(var g=-1,y=r.length,E=u.length,_=-1,S=a.length,A=ke(y-E,0),F=M(S+A),O=!p;++_<S;)F[_]=a[_];for(;++g<E;)(O||g<y)&&(F[u[g]]=r[g]);for(;A--;)F[_++]=r[g++];return F}function id(r,a,u,p){for(var g=-1,y=r.length,E=-1,_=u.length,S=-1,A=a.length,F=ke(y-_,0),O=M(F+A),I=!p;++g<F;)O[g]=r[g];for(var G=g;++S<A;)O[G+S]=a[S];for(;++E<_;)(I||g<y)&&(O[G+u[E]]=r[g++]);return O}function Xe(r,a){var u=-1,p=r.length;for(a||(a=M(p));++u<p;)a[u]=r[u];return a}function Ft(r,a,u,p){var g=!u;u||(u={});for(var y=-1,E=a.length;++y<E;){var _=a[y],S=p?p(u[_],r[_],_,u,r):t;S===t&&(S=r[_]),g?Wt(u,_,S):Wn(u,_,S)}return u}function Sx(r,a){return Ft(r,La(r),a)}function kx(r,a){return Ft(r,md(r),a)}function ss(r,a){return function(u,p){var g=X(u)?FE:X1,y=a?a():{};return g(u,r,j(p,2),y)}}function nn(r){return te(function(a,u){var p=-1,g=u.length,y=g>1?u[g-1]:t,E=g>2?u[2]:t;for(y=r.length>3&&typeof y=="function"?(g--,y):t,E&&Ue(u[0],u[1],E)&&(y=g<3?t:y,g=1),a=pe(a);++p<g;){var _=u[p];_&&r(a,_,p,y)}return a})}function nd(r,a){return function(u,p){if(u==null)return u;if(!Je(u))return r(u,p);for(var g=u.length,y=a?g:-1,E=pe(u);(a?y--:++y<g)&&p(E[y],y,E)!==!1;);return u}}function rd(r){return function(a,u,p){for(var g=-1,y=pe(a),E=p(a),_=E.length;_--;){var S=E[r?_:++g];if(u(y[S],S,y)===!1)break}return a}}function Mx(r,a,u){var p=a&L,g=Kn(r);function y(){var E=this&&this!==Oe&&this instanceof y?g:r;return E.apply(p?u:this,arguments)}return y}function sd(r){return function(a){a=he(a);var u=Yi(a)?xt(a):t,p=u?u[0]:a.charAt(0),g=u?ai(u,1).join(""):a.slice(1);return p[r]()+g}}function rn(r){return function(a){return qo(rf(nf(a).replace(wE,"")),r,"")}}function Kn(r){return function(){var a=arguments;switch(a.length){case 0:return new r;case 1:return new r(a[0]);case 2:return new r(a[0],a[1]);case 3:return new r(a[0],a[1],a[2]);case 4:return new r(a[0],a[1],a[2],a[3]);case 5:return new r(a[0],a[1],a[2],a[3],a[4]);case 6:return new r(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new r(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=tn(r.prototype),p=r.apply(u,a);return ye(p)?p:u}}function Lx(r,a,u){var p=Kn(r);function g(){for(var y=arguments.length,E=M(y),_=y,S=sn(g);_--;)E[_]=arguments[_];var A=y<3&&E[0]!==S&&E[y-1]!==S?[]:ii(E,S);if(y-=A.length,y<u)return hd(r,a,os,g.placeholder,t,E,A,t,t,u-y);var F=this&&this!==Oe&&this instanceof g?p:r;return nt(F,this,E)}return g}function od(r){return function(a,u,p){var g=pe(a);if(!Je(a)){var y=j(u,3);a=Fe(a),u=function(_){return y(g[_],_,g)}}var E=r(a,u,p);return E>-1?g[y?a[E]:E]:t}}function ad(r){return Gt(function(a){var u=a.length,p=u,g=pt.prototype.thru;for(r&&a.reverse();p--;){var y=a[p];if(typeof y!="function")throw new ft(l);if(g&&!E&&hs(y)=="wrapper")var E=new pt([],!0)}for(p=E?p:u;++p<u;){y=a[p];var _=hs(y),S=_=="wrapper"?ka(y):t;S&&Aa(S[0])&&S[1]==(N|P|V|W)&&!S[4].length&&S[9]==1?E=E[hs(S[0])].apply(E,S[3]):E=y.length==1&&Aa(y)?E[_]():E.thru(y)}return function(){var A=arguments,F=A[0];if(E&&A.length==1&&X(F))return E.plant(F).value();for(var O=0,I=u?a[O].apply(this,A):F;++O<u;)I=a[O].call(this,I);return I}})}function os(r,a,u,p,g,y,E,_,S,A){var F=a&N,O=a&L,I=a&k,G=a&(P|z),K=a&le,ee=I?t:Kn(r);function q(){for(var ne=arguments.length,ae=M(ne),at=ne;at--;)ae[at]=arguments[at];if(G)var je=sn(q),lt=WE(ae,je);if(p&&(ae=td(ae,p,g,G)),y&&(ae=id(ae,y,E,G)),ne-=lt,G&&ne<A){var _e=ii(ae,je);return hd(r,a,os,q.placeholder,u,ae,_e,_,S,A-ne)}var Tt=O?u:this,qt=I?Tt[r]:r;return ne=ae.length,_?ae=Xx(ae,_):K&&ne>1&&ae.reverse(),F&&S<ne&&(ae.length=S),this&&this!==Oe&&this instanceof q&&(qt=ee||Kn(qt)),qt.apply(Tt,ae)}return q}function ld(r,a){return function(u,p){return rx(u,r,a(p),{})}}function as(r,a){return function(u,p){var g;if(u===t&&p===t)return a;if(u!==t&&(g=u),p!==t){if(g===t)return p;typeof u=="string"||typeof p=="string"?(u=st(u),p=st(p)):(u=Kc(u),p=Kc(p)),g=r(u,p)}return g}}function _a(r){return Gt(function(a){return a=we(a,rt(j())),te(function(u){var p=this;return r(a,function(g){return nt(g,p,u)})})})}function ls(r,a){a=a===t?" ":st(a);var u=a.length;if(u<2)return u?ba(a,r):a;var p=ba(a,qr(r/Xi(a)));return Yi(a)?ai(xt(p),0,r).join(""):p.slice(0,r)}function Dx(r,a,u,p){var g=a&L,y=Kn(r);function E(){for(var _=-1,S=arguments.length,A=-1,F=p.length,O=M(F+S),I=this&&this!==Oe&&this instanceof E?y:r;++A<F;)O[A]=p[A];for(;S--;)O[A++]=arguments[++_];return nt(I,g?u:this,O)}return E}function ud(r){return function(a,u,p){return p&&typeof p!="number"&&Ue(a,u,p)&&(u=p=t),a=Kt(a),u===t?(u=a,a=0):u=Kt(u),p=p===t?a<u?1:-1:Kt(p),gx(a,u,p,r)}}function us(r){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=vt(a),u=vt(u)),r(a,u)}}function hd(r,a,u,p,g,y,E,_,S,A){var F=a&P,O=F?E:t,I=F?t:E,G=F?y:t,K=F?t:y;a|=F?V:Z,a&=~(F?Z:V),a&H||(a&=~(L|k));var ee=[r,a,g,G,O,K,I,_,S,A],q=u.apply(t,ee);return Aa(r)&&Ed(q,ee),q.placeholder=p,xd(q,r,a)}function Ra(r){var a=Se[r];return function(u,p){if(u=vt(u),p=p==null?0:Ve(J(p),292),p&&xc(u)){var g=(he(u)+"e").split("e"),y=a(g[0]+"e"+(+g[1]+p));return g=(he(y)+"e").split("e"),+(g[0]+"e"+(+g[1]-p))}return a(u)}}var Ax=Qi&&1/Nr(new Qi([,-0]))[1]==Ye?function(r){return new Qi(r)}:Ka;function cd(r){return function(a){var u=We(a);return u==Ct?ta(a):u==Et?YE(a):VE(a,r(a))}}function $t(r,a,u,p,g,y,E,_){var S=a&k;if(!S&&typeof r!="function")throw new ft(l);var A=p?p.length:0;if(A||(a&=~(V|Z),p=g=t),E=E===t?E:ke(J(E),0),_=_===t?_:J(_),A-=g?g.length:0,a&Z){var F=p,O=g;p=g=t}var I=S?t:ka(r),G=[r,a,u,p,g,F,O,y,E,_];if(I&&Kx(G,I),r=G[0],a=G[1],u=G[2],p=G[3],g=G[4],_=G[9]=G[9]===t?S?0:r.length:ke(G[9]-A,0),!_&&a&(P|z)&&(a&=~(P|z)),!a||a==L)var K=Mx(r,a,u);else a==P||a==z?K=Lx(r,a,_):(a==V||a==(L|V))&&!g.length?K=Dx(r,a,u,p):K=os.apply(t,G);var ee=I?Uc:Ed;return xd(ee(K,G),r,a)}function dd(r,a,u,p){return r===t||Rt(r,Zi[u])&&!ce.call(p,u)?a:r}function fd(r,a,u,p,g,y){return ye(r)&&ye(a)&&(y.set(a,r),is(r,a,t,fd,y),y.delete(a)),r}function Fx(r){return Xn(r)?t:r}function pd(r,a,u,p,g,y){var E=u&x,_=r.length,S=a.length;if(_!=S&&!(E&&S>_))return!1;var A=y.get(r),F=y.get(a);if(A&&F)return A==a&&F==r;var O=-1,I=!0,G=u&R?new yi:t;for(y.set(r,a),y.set(a,r);++O<_;){var K=r[O],ee=a[O];if(p)var q=E?p(ee,K,O,a,r,y):p(K,ee,O,r,a,y);if(q!==t){if(q)continue;I=!1;break}if(G){if(!Yo(a,function(ne,ae){if(!Hn(G,ae)&&(K===ne||g(K,ne,u,p,y)))return G.push(ae)})){I=!1;break}}else if(!(K===ee||g(K,ee,u,p,y))){I=!1;break}}return y.delete(r),y.delete(a),I}function Px(r,a,u,p,g,y,E){switch(u){case ji:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case On:return!(r.byteLength!=a.byteLength||!y(new Gr(r),new Gr(a)));case Mn:case Ln:case Dn:return Rt(+r,+a);case Lr:return r.name==a.name&&r.message==a.message;case An:case Fn:return r==a+"";case Ct:var _=ta;case Et:var S=p&x;if(_||(_=Nr),r.size!=a.size&&!S)return!1;var A=E.get(r);if(A)return A==a;p|=R,E.set(r,a);var F=pd(_(r),_(a),p,g,y,E);return E.delete(r),F;case Ar:if(Vn)return Vn.call(r)==Vn.call(a)}return!1}function Ox(r,a,u,p,g,y){var E=u&x,_=Ta(r),S=_.length,A=Ta(a),F=A.length;if(S!=F&&!E)return!1;for(var O=S;O--;){var I=_[O];if(!(E?I in a:ce.call(a,I)))return!1}var G=y.get(r),K=y.get(a);if(G&&K)return G==a&&K==r;var ee=!0;y.set(r,a),y.set(a,r);for(var q=E;++O<S;){I=_[O];var ne=r[I],ae=a[I];if(p)var at=E?p(ae,ne,I,a,r,y):p(ne,ae,I,r,a,y);if(!(at===t?ne===ae||g(ne,ae,u,p,y):at)){ee=!1;break}q||(q=I=="constructor")}if(ee&&!q){var je=r.constructor,lt=a.constructor;je!=lt&&"constructor"in r&&"constructor"in a&&!(typeof je=="function"&&je instanceof je&&typeof lt=="function"&< instanceof lt)&&(ee=!1)}return y.delete(r),y.delete(a),ee}function Gt(r){return Pa(yd(r,t,Md),r+"")}function Ta(r){return Pc(r,Fe,La)}function Sa(r){return Pc(r,Ze,md)}var ka=Xr?function(r){return Xr.get(r)}:Ka;function hs(r){for(var a=r.name+"",u=en[a],p=ce.call(en,a)?u.length:0;p--;){var g=u[p],y=g.func;if(y==null||y==r)return g.name}return a}function sn(r){var a=ce.call(w,"placeholder")?w:r;return a.placeholder}function j(){var r=w.iteratee||Ua;return r=r===Ua?zc:r,arguments.length?r(arguments[0],arguments[1]):r}function cs(r,a){var u=r.__data__;return $x(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Ma(r){for(var a=Fe(r),u=a.length;u--;){var p=a[u],g=r[p];a[u]=[p,g,vd(g)]}return a}function xi(r,a){var u=jE(r,a);return Hc(u)?u:t}function Hx(r){var a=ce.call(r,vi),u=r[vi];try{r[vi]=t;var p=!0}catch{}var g=Wr.call(r);return p&&(a?r[vi]=u:delete r[vi]),g}var La=na?function(r){return r==null?[]:(r=pe(r),ei(na(r),function(a){return Cc.call(r,a)}))}:qa,md=na?function(r){for(var a=[];r;)ti(a,La(r)),r=Ur(r);return a}:qa,We=Ge;(ra&&We(new ra(new ArrayBuffer(1)))!=ji||Nn&&We(new Nn)!=Ct||sa&&We(sa.resolve())!=Dh||Qi&&We(new Qi)!=Et||In&&We(new In)!=Pn)&&(We=function(r){var a=Ge(r),u=a==It?r.constructor:t,p=u?_i(u):"";if(p)switch(p){case v1:return ji;case w1:return Ct;case y1:return Dh;case C1:return Et;case E1:return Pn}return a});function zx(r,a,u){for(var p=-1,g=u.length;++p<g;){var y=u[p],E=y.size;switch(y.type){case"drop":r+=E;break;case"dropRight":a-=E;break;case"take":a=Ve(a,r+E);break;case"takeRight":r=ke(r,a-E);break}}return{start:r,end:a}}function Nx(r){var a=r.match(GC);return a?a[1].split(UC):[]}function gd(r,a,u){a=oi(a,r);for(var p=-1,g=a.length,y=!1;++p<g;){var E=Pt(a[p]);if(!(y=r!=null&&u(r,E)))break;r=r[E]}return y||++p!=g?y:(g=r==null?0:r.length,!!g&&vs(g)&&Ut(E,g)&&(X(r)||Ri(r)))}function Ix(r){var a=r.length,u=new r.constructor(a);return a&&typeof r[0]=="string"&&ce.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function bd(r){return typeof r.constructor=="function"&&!qn(r)?tn(Ur(r)):{}}function Bx(r,a,u){var p=r.constructor;switch(a){case On:return xa(r);case Mn:case Ln:return new p(+r);case ji:return xx(r,u);case Mo:case Lo:case Do:case Ao:case Fo:case Po:case Oo:case Ho:case zo:return Qc(r,u);case Ct:return new p;case Dn:case Fn:return new p(r);case An:return _x(r);case Et:return new p;case Ar:return Rx(r)}}function Vx(r,a){var u=a.length;if(!u)return r;var p=u-1;return a[p]=(u>1?"& ":"")+a[p],a=a.join(u>2?", ":" "),r.replace($C,`{
|
9
9
|
/* [wrapped with `+a+`] */
|
10
|
-
`)}function Fx(r){return ae(r)||Ji(r)||!!(oh&&r&&r[oh])}function gi(r,a){var d=typeof r;return a=a??$,!!a&&(d=="number"||d!="symbol"&&U0.test(r))&&r>-1&&r%1==0&&r<a}function lt(r,a,d){if(!He(d))return!1;var m=typeof a;return(m=="number"?gt(d)&&gi(a,d.length):m=="string"&&a in d)?qt(d[a],r):!1}function Ya(r,a){if(ae(r))return!1;var d=typeof r;return d=="number"||d=="symbol"||d=="boolean"||r==null||Tt(r)?!0:L0.test(r)||!M0.test(r)||a!=null&&r in Le(a)}function Px(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Xa(r){var a=Fr(r),d=y[a];if(typeof d!="function"||!(a in we.prototype))return!1;if(r===d)return!0;var m=ja(d);return!!m&&r===m[0]}function Vx(r){return!!ih&&ih in r}var Ox=ur?bi:fl;function xs(r){var a=r&&r.constructor,d=typeof a=="function"&&a.prototype||Ln;return r===d}function nf(r){return r===r&&!He(r)}function sf(r,a){return function(d){return d==null?!1:d[r]===a&&(a!==t||r in Le(d))}}function Nx(r){var a=Hr(r,function(m){return d.size===f&&d.clear(),m}),d=a.cache;return a}function zx(r,a){var d=r[1],m=a[1],v=d|m,C=v<(_|k|P),R=m==P&&d==L||m==P&&d==D&&r[7].length<=a[8]||m==(P|D)&&a[7].length<=a[8]&&d==L;if(!(C||R))return r;m&_&&(r[2]=a[2],v|=d&_?0:V);var S=a[3];if(S){var M=r[3];r[3]=M?Hh(M,S,a[4]):S,r[4]=M?Ti(r[3],p):a[4]}return S=a[5],S&&(M=r[5],r[5]=M?Ih(M,S,a[6]):S,r[6]=M?Ti(r[5],p):a[6]),S=a[7],S&&(r[7]=S),m&P&&(r[8]=r[8]==null?a[8]:tt(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=v,r}function Hx(r){var a=[];if(r!=null)for(var d in Le(r))a.push(d);return a}function Ix(r){return dr.call(r)}function rf(r,a,d){return a=Ye(a===t?r.length-1:a,0),function(){for(var m=arguments,v=-1,C=Ye(m.length-a,0),R=A(C);++v<C;)R[v]=m[a+v];v=-1;for(var S=A(a+1);++v<a;)S[v]=m[v];return S[a]=d(R),Rt(r,this,S)}}function of(r,a){return a.length<2?r:qi(r,It(a,0,-1))}function Bx(r,a){for(var d=r.length,m=tt(a.length,d),v=pt(r);m--;){var C=a[m];r[m]=gi(C,d)?v[C]:t}return r}function Ja(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var af=uf(Mh),_s=i1||function(r,a){return Ze.setTimeout(r,a)},Za=uf(cx);function lf(r,a,d){var m=a+"";return Za(r,Ax(m,Wx(Mx(m),d)))}function uf(r){var a=0,d=0;return function(){var m=o1(),v=X-(m-d);if(d=m,v>0){if(++a>=G)return arguments[0]}else a=0;return r.apply(t,arguments)}}function Vr(r,a){var d=-1,m=r.length,v=m-1;for(a=a===t?m:a;++d<a;){var C=Pa(d,v),R=r[C];r[C]=r[d],r[d]=R}return r.length=a,r}var cf=Nx(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(D0,function(d,m,v,C){a.push(v?C.replace(H0,"$1"):m||d)}),a});function si(r){if(typeof r=="string"||Tt(r))return r;var a=r+"";return a=="0"&&1/r==-U?"-0":a}function Xi(r){if(r!=null){try{return cr.call(r)}catch{}try{return r+""}catch{}}return""}function Wx(r,a){return Ot(De,function(d){var m="_."+d[0];a&d[1]&&!rr(r,m)&&r.push(m)}),r.sort()}function df(r){if(r instanceof we)return r.clone();var a=new zt(r.__wrapped__,r.__chain__);return a.__actions__=pt(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function $x(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=Ye(le(a),0);var m=r==null?0:r.length;if(!m||a<1)return[];for(var v=0,C=0,R=A(br(m/a));v<m;)R[C++]=It(r,v,v+=a);return R}function Gx(r){for(var a=-1,d=r==null?0:r.length,m=0,v=[];++a<d;){var C=r[a];C&&(v[m++]=C)}return v}function Ux(){var r=arguments.length;if(!r)return[];for(var a=A(r-1),d=arguments[0],m=r;m--;)a[m-1]=arguments[m];return Si(ae(d)?pt(d):[d],Qe(a,1))}var jx=de(function(r,a){return Ge(r)?vs(r,Qe(a,1,Ge,!0)):[]}),Kx=de(function(r,a){var d=Bt(a);return Ge(d)&&(d=t),Ge(r)?vs(r,Qe(a,1,Ge,!0),te(d,2)):[]}),qx=de(function(r,a){var d=Bt(a);return Ge(d)&&(d=t),Ge(r)?vs(r,Qe(a,1,Ge,!0),t,d):[]});function Yx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:le(a),It(r,a<0?0:a,m)):[]}function Xx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:le(a),a=m-a,It(r,0,a<0?0:a)):[]}function Jx(r,a){return r&&r.length?Sr(r,te(a,3),!0,!0):[]}function Zx(r,a){return r&&r.length?Sr(r,te(a,3),!0):[]}function Qx(r,a,d,m){var v=r==null?0:r.length;return v?(d&&typeof d!="number"&<(r,a,d)&&(d=0,m=v),U1(r,a,d,m)):[]}function hf(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:le(d);return v<0&&(v=Ye(m+v,0)),or(r,te(a,3),v)}function ff(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m-1;return d!==t&&(v=le(d),v=d<0?Ye(m+v,0):tt(v,m-1)),or(r,te(a,3),v,!0)}function mf(r){var a=r==null?0:r.length;return a?Qe(r,1):[]}function e_(r){var a=r==null?0:r.length;return a?Qe(r,U):[]}function t_(r,a){var d=r==null?0:r.length;return d?(a=a===t?1:le(a),Qe(r,a)):[]}function i_(r){for(var a=-1,d=r==null?0:r.length,m={};++a<d;){var v=r[a];m[v[0]]=v[1]}return m}function pf(r){return r&&r.length?r[0]:t}function n_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:le(d);return v<0&&(v=Ye(m+v,0)),kn(r,a,v)}function s_(r){var a=r==null?0:r.length;return a?It(r,0,-1):[]}var r_=de(function(r){var a=Oe(r,Ha);return a.length&&a[0]===r[0]?Ma(a):[]}),o_=de(function(r){var a=Bt(r),d=Oe(r,Ha);return a===Bt(d)?a=t:d.pop(),d.length&&d[0]===r[0]?Ma(d,te(a,2)):[]}),a_=de(function(r){var a=Bt(r),d=Oe(r,Ha);return a=typeof a=="function"?a:t,a&&d.pop(),d.length&&d[0]===r[0]?Ma(d,t,a):[]});function l_(r,a){return r==null?"":s1.call(r,a)}function Bt(r){var a=r==null?0:r.length;return a?r[a-1]:t}function u_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m;return d!==t&&(v=le(d),v=v<0?Ye(m+v,0):tt(v,m-1)),a===a?WE(r,a,v):or(r,qd,v,!0)}function c_(r,a){return r&&r.length?Rh(r,le(a)):t}var d_=de(gf);function gf(r,a){return r&&r.length&&a&&a.length?Fa(r,a):r}function h_(r,a,d){return r&&r.length&&a&&a.length?Fa(r,a,te(d,2)):r}function f_(r,a,d){return r&&r.length&&a&&a.length?Fa(r,a,t,d):r}var m_=pi(function(r,a){var d=r==null?0:r.length,m=Ra(r,a);return Th(r,Oe(a,function(v){return gi(v,d)?+v:v}).sort(zh)),m});function p_(r,a){var d=[];if(!(r&&r.length))return d;var m=-1,v=[],C=r.length;for(a=te(a,3);++m<C;){var R=r[m];a(R,m,r)&&(d.push(R),v.push(m))}return Th(r,v),d}function Qa(r){return r==null?r:l1.call(r)}function g_(r,a,d){var m=r==null?0:r.length;return m?(d&&typeof d!="number"&<(r,a,d)?(a=0,d=m):(a=a==null?0:le(a),d=d===t?m:le(d)),It(r,a,d)):[]}function b_(r,a){return kr(r,a)}function v_(r,a,d){return Oa(r,a,te(d,2))}function w_(r,a){var d=r==null?0:r.length;if(d){var m=kr(r,a);if(m<d&&qt(r[m],a))return m}return-1}function y_(r,a){return kr(r,a,!0)}function C_(r,a,d){return Oa(r,a,te(d,2),!0)}function E_(r,a){var d=r==null?0:r.length;if(d){var m=kr(r,a,!0)-1;if(qt(r[m],a))return m}return-1}function x_(r){return r&&r.length?Lh(r):[]}function __(r,a){return r&&r.length?Lh(r,te(a,2)):[]}function R_(r){var a=r==null?0:r.length;return a?It(r,1,a):[]}function k_(r,a,d){return r&&r.length?(a=d||a===t?1:le(a),It(r,0,a<0?0:a)):[]}function S_(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:le(a),a=m-a,It(r,a<0?0:a,m)):[]}function T_(r,a){return r&&r.length?Sr(r,te(a,3),!1,!0):[]}function M_(r,a){return r&&r.length?Sr(r,te(a,3)):[]}var L_=de(function(r){return Di(Qe(r,1,Ge,!0))}),D_=de(function(r){var a=Bt(r);return Ge(a)&&(a=t),Di(Qe(r,1,Ge,!0),te(a,2))}),A_=de(function(r){var a=Bt(r);return a=typeof a=="function"?a:t,Di(Qe(r,1,Ge,!0),t,a)});function F_(r){return r&&r.length?Di(r):[]}function P_(r,a){return r&&r.length?Di(r,te(a,2)):[]}function V_(r,a){return a=typeof a=="function"?a:t,r&&r.length?Di(r,t,a):[]}function el(r){if(!(r&&r.length))return[];var a=0;return r=ki(r,function(d){if(Ge(d))return a=Ye(d.length,a),!0}),ba(a,function(d){return Oe(r,ma(d))})}function bf(r,a){if(!(r&&r.length))return[];var d=el(r);return a==null?d:Oe(d,function(m){return Rt(a,t,m)})}var O_=de(function(r,a){return Ge(r)?vs(r,a):[]}),N_=de(function(r){return za(ki(r,Ge))}),z_=de(function(r){var a=Bt(r);return Ge(a)&&(a=t),za(ki(r,Ge),te(a,2))}),H_=de(function(r){var a=Bt(r);return a=typeof a=="function"?a:t,za(ki(r,Ge),t,a)}),I_=de(el);function B_(r,a){return Ph(r||[],a||[],bs)}function W_(r,a){return Ph(r||[],a||[],Cs)}var $_=de(function(r){var a=r.length,d=a>1?r[a-1]:t;return d=typeof d=="function"?(r.pop(),d):t,bf(r,d)});function vf(r){var a=y(r);return a.__chain__=!0,a}function G_(r,a){return a(r),r}function Or(r,a){return a(r)}var U_=pi(function(r){var a=r.length,d=a?r[0]:0,m=this.__wrapped__,v=function(C){return Ra(C,r)};return a>1||this.__actions__.length||!(m instanceof we)||!gi(d)?this.thru(v):(m=m.slice(d,+d+(a?1:0)),m.__actions__.push({func:Or,args:[v],thisArg:t}),new zt(m,this.__chain__).thru(function(C){return a&&!C.length&&C.push(t),C}))});function j_(){return vf(this)}function K_(){return new zt(this.value(),this.__chain__)}function q_(){this.__values__===t&&(this.__values__=Af(this.value()));var r=this.__index__>=this.__values__.length,a=r?t:this.__values__[this.__index__++];return{done:r,value:a}}function Y_(){return this}function X_(r){for(var a,d=this;d instanceof Cr;){var m=df(d);m.__index__=0,m.__values__=t,a?v.__wrapped__=m:a=m;var v=m;d=d.__wrapped__}return v.__wrapped__=r,a}function J_(){var r=this.__wrapped__;if(r instanceof we){var a=r;return this.__actions__.length&&(a=new we(this)),a=a.reverse(),a.__actions__.push({func:Or,args:[Qa],thisArg:t}),new zt(a,this.__chain__)}return this.thru(Qa)}function Z_(){return Fh(this.__wrapped__,this.__actions__)}var Q_=Tr(function(r,a,d){Te.call(r,d)?++r[d]:fi(r,d,1)});function eR(r,a,d){var m=ae(r)?jd:G1;return d&<(r,a,d)&&(a=t),m(r,te(a,3))}function tR(r,a){var d=ae(r)?ki:gh;return d(r,te(a,3))}var iR=Gh(hf),nR=Gh(ff);function sR(r,a){return Qe(Nr(r,a),1)}function rR(r,a){return Qe(Nr(r,a),U)}function oR(r,a,d){return d=d===t?1:le(d),Qe(Nr(r,a),d)}function wf(r,a){var d=ae(r)?Ot:Li;return d(r,te(a,3))}function yf(r,a){var d=ae(r)?RE:ph;return d(r,te(a,3))}var aR=Tr(function(r,a,d){Te.call(r,d)?r[d].push(a):fi(r,d,[a])});function lR(r,a,d,m){r=gt(r)?r:zn(r),d=d&&!m?le(d):0;var v=r.length;return d<0&&(d=Ye(v+d,0)),Wr(r)?d<=v&&r.indexOf(a,d)>-1:!!v&&kn(r,a,d)>-1}var uR=de(function(r,a,d){var m=-1,v=typeof a=="function",C=gt(r)?A(r.length):[];return Li(r,function(R){C[++m]=v?Rt(a,R,d):ws(R,a,d)}),C}),cR=Tr(function(r,a,d){fi(r,d,a)});function Nr(r,a){var d=ae(r)?Oe:Eh;return d(r,te(a,3))}function dR(r,a,d,m){return r==null?[]:(ae(a)||(a=a==null?[]:[a]),d=m?t:d,ae(d)||(d=d==null?[]:[d]),kh(r,a,d))}var hR=Tr(function(r,a,d){r[d?0:1].push(a)},function(){return[[],[]]});function fR(r,a,d){var m=ae(r)?ha:Xd,v=arguments.length<3;return m(r,te(a,4),d,v,Li)}function mR(r,a,d){var m=ae(r)?kE:Xd,v=arguments.length<3;return m(r,te(a,4),d,v,ph)}function pR(r,a){var d=ae(r)?ki:gh;return d(r,Ir(te(a,3)))}function gR(r){var a=ae(r)?dh:lx;return a(r)}function bR(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=le(a);var m=ae(r)?H1:ux;return m(r,a)}function vR(r){var a=ae(r)?I1:dx;return a(r)}function wR(r){if(r==null)return 0;if(gt(r))return Wr(r)?Tn(r):r.length;var a=it(r);return a==ve||a==mt?r.size:Da(r).length}function yR(r,a,d){var m=ae(r)?fa:hx;return d&<(r,a,d)&&(a=t),m(r,te(a,3))}var CR=de(function(r,a){if(r==null)return[];var d=a.length;return d>1&<(r,a[0],a[1])?a=[]:d>2&<(a[0],a[1],a[2])&&(a=[a[0]]),kh(r,Qe(a,1),[])}),zr=t1||function(){return Ze.Date.now()};function ER(r,a){if(typeof a!="function")throw new Nt(l);return r=le(r),function(){if(--r<1)return a.apply(this,arguments)}}function Cf(r,a,d){return a=d?t:a,a=r&&a==null?r.length:a,mi(r,P,t,t,t,t,a)}function Ef(r,a){var d;if(typeof a!="function")throw new Nt(l);return r=le(r),function(){return--r>0&&(d=a.apply(this,arguments)),r<=1&&(a=t),d}}var tl=de(function(r,a,d){var m=_;if(d.length){var v=Ti(d,On(tl));m|=H}return mi(r,m,a,d,v)}),xf=de(function(r,a,d){var m=_|k;if(d.length){var v=Ti(d,On(xf));m|=H}return mi(a,m,r,d,v)});function _f(r,a,d){a=d?t:a;var m=mi(r,L,t,t,t,t,t,a);return m.placeholder=_f.placeholder,m}function Rf(r,a,d){a=d?t:a;var m=mi(r,F,t,t,t,t,t,a);return m.placeholder=Rf.placeholder,m}function kf(r,a,d){var m,v,C,R,S,M,N=0,z=!1,B=!1,j=!0;if(typeof r!="function")throw new Nt(l);a=Wt(a)||0,He(d)&&(z=!!d.leading,B="maxWait"in d,C=B?Ye(Wt(d.maxWait)||0,a):C,j="trailing"in d?!!d.trailing:j);function J(Ue){var Yt=m,wi=v;return m=v=t,N=Ue,R=r.apply(wi,Yt),R}function ne(Ue){return N=Ue,S=_s(ge,a),z?J(Ue):R}function ce(Ue){var Yt=Ue-M,wi=Ue-N,Uf=a-Yt;return B?tt(Uf,C-wi):Uf}function se(Ue){var Yt=Ue-M,wi=Ue-N;return M===t||Yt>=a||Yt<0||B&&wi>=C}function ge(){var Ue=zr();if(se(Ue))return Ee(Ue);S=_s(ge,ce(Ue))}function Ee(Ue){return S=t,j&&m?J(Ue):(m=v=t,R)}function Mt(){S!==t&&Vh(S),N=0,m=M=v=S=t}function ut(){return S===t?R:Ee(zr())}function Lt(){var Ue=zr(),Yt=se(Ue);if(m=arguments,v=this,M=Ue,Yt){if(S===t)return ne(M);if(B)return Vh(S),S=_s(ge,a),J(M)}return S===t&&(S=_s(ge,a)),R}return Lt.cancel=Mt,Lt.flush=ut,Lt}var xR=de(function(r,a){return mh(r,1,a)}),_R=de(function(r,a,d){return mh(r,Wt(a)||0,d)});function RR(r){return mi(r,I)}function Hr(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new Nt(l);var d=function(){var m=arguments,v=a?a.apply(this,m):m[0],C=d.cache;if(C.has(v))return C.get(v);var R=r.apply(this,m);return d.cache=C.set(v,R)||C,R};return d.cache=new(Hr.Cache||hi),d}Hr.Cache=hi;function Ir(r){if(typeof r!="function")throw new Nt(l);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function kR(r){return Ef(2,r)}var SR=fx(function(r,a){a=a.length==1&&ae(a[0])?Oe(a[0],kt(te())):Oe(Qe(a,1),kt(te()));var d=a.length;return de(function(m){for(var v=-1,C=tt(m.length,d);++v<C;)m[v]=a[v].call(this,m[v]);return Rt(r,this,m)})}),il=de(function(r,a){var d=Ti(a,On(il));return mi(r,H,t,a,d)}),Sf=de(function(r,a){var d=Ti(a,On(Sf));return mi(r,W,t,a,d)}),TR=pi(function(r,a){return mi(r,D,t,t,t,a)});function MR(r,a){if(typeof r!="function")throw new Nt(l);return a=a===t?a:le(a),de(r,a)}function LR(r,a){if(typeof r!="function")throw new Nt(l);return a=a==null?0:Ye(le(a),0),de(function(d){var m=d[a],v=Fi(d,0,a);return m&&Si(v,m),Rt(r,this,v)})}function DR(r,a,d){var m=!0,v=!0;if(typeof r!="function")throw new Nt(l);return He(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),kf(r,a,{leading:m,maxWait:a,trailing:v})}function AR(r){return Cf(r,1)}function FR(r,a){return il(Ia(a),r)}function PR(){if(!arguments.length)return[];var r=arguments[0];return ae(r)?r:[r]}function VR(r){return Ht(r,w)}function OR(r,a){return a=typeof a=="function"?a:t,Ht(r,w,a)}function NR(r){return Ht(r,b|w)}function zR(r,a){return a=typeof a=="function"?a:t,Ht(r,b|w,a)}function HR(r,a){return a==null||fh(r,a,Xe(a))}function qt(r,a){return r===a||r!==r&&a!==a}var IR=Ar(Ta),BR=Ar(function(r,a){return r>=a}),Ji=wh(function(){return arguments}())?wh:function(r){return Be(r)&&Te.call(r,"callee")&&!rh.call(r,"callee")},ae=A.isArray,WR=Id?kt(Id):X1;function gt(r){return r!=null&&Br(r.length)&&!bi(r)}function Ge(r){return Be(r)&>(r)}function $R(r){return r===!0||r===!1||Be(r)&&at(r)==_t}var Pi=n1||fl,GR=Bd?kt(Bd):J1;function UR(r){return Be(r)&&r.nodeType===1&&!Rs(r)}function jR(r){if(r==null)return!0;if(gt(r)&&(ae(r)||typeof r=="string"||typeof r.splice=="function"||Pi(r)||Nn(r)||Ji(r)))return!r.length;var a=it(r);if(a==ve||a==mt)return!r.size;if(xs(r))return!Da(r).length;for(var d in r)if(Te.call(r,d))return!1;return!0}function KR(r,a){return ys(r,a)}function qR(r,a,d){d=typeof d=="function"?d:t;var m=d?d(r,a):t;return m===t?ys(r,a,t,d):!!m}function nl(r){if(!Be(r))return!1;var a=at(r);return a==pe||a==K||typeof r.message=="string"&&typeof r.name=="string"&&!Rs(r)}function YR(r){return typeof r=="number"&&ah(r)}function bi(r){if(!He(r))return!1;var a=at(r);return a==Se||a==Pt||a==rt||a==ft}function Tf(r){return typeof r=="number"&&r==le(r)}function Br(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=$}function He(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Be(r){return r!=null&&typeof r=="object"}var Mf=Wd?kt(Wd):Q1;function XR(r,a){return r===a||La(r,a,Ka(a))}function JR(r,a,d){return d=typeof d=="function"?d:t,La(r,a,Ka(a),d)}function ZR(r){return Lf(r)&&r!=+r}function QR(r){if(Ox(r))throw new oe(o);return yh(r)}function ek(r){return r===null}function tk(r){return r==null}function Lf(r){return typeof r=="number"||Be(r)&&at(r)==je}function Rs(r){if(!Be(r)||at(r)!=Je)return!1;var a=mr(r);if(a===null)return!0;var d=Te.call(a,"constructor")&&a.constructor;return typeof d=="function"&&d instanceof d&&cr.call(d)==JE}var sl=$d?kt($d):ex;function ik(r){return Tf(r)&&r>=-$&&r<=$}var Df=Gd?kt(Gd):tx;function Wr(r){return typeof r=="string"||!ae(r)&&Be(r)&&at(r)==Ri}function Tt(r){return typeof r=="symbol"||Be(r)&&at(r)==ci}var Nn=Ud?kt(Ud):ix;function nk(r){return r===t}function sk(r){return Be(r)&&it(r)==us}function rk(r){return Be(r)&&at(r)==C0}var ok=Ar(Aa),ak=Ar(function(r,a){return r<=a});function Af(r){if(!r)return[];if(gt(r))return Wr(r)?jt(r):pt(r);if(hs&&r[hs])return HE(r[hs]());var a=it(r),d=a==ve?wa:a==mt?ar:zn;return d(r)}function vi(r){if(!r)return r===0?r:0;if(r=Wt(r),r===U||r===-U){var a=r<0?-1:1;return a*Q}return r===r?r:0}function le(r){var a=vi(r),d=a%1;return a===a?d?a-d:a:0}function Ff(r){return r?Ki(le(r),0,ye):0}function Wt(r){if(typeof r=="number")return r;if(Tt(r))return me;if(He(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=He(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=Jd(r);var d=W0.test(r);return d||G0.test(r)?EE(r.slice(2),d?2:8):B0.test(r)?me:+r}function Pf(r){return ni(r,bt(r))}function lk(r){return r?Ki(le(r),-$,$):r===0?r:0}function ke(r){return r==null?"":St(r)}var uk=Pn(function(r,a){if(xs(a)||gt(a)){ni(a,Xe(a),r);return}for(var d in a)Te.call(a,d)&&bs(r,d,a[d])}),Vf=Pn(function(r,a){ni(a,bt(a),r)}),$r=Pn(function(r,a,d,m){ni(a,bt(a),r,m)}),ck=Pn(function(r,a,d,m){ni(a,Xe(a),r,m)}),dk=pi(Ra);function hk(r,a){var d=Fn(r);return a==null?d:hh(d,a)}var fk=de(function(r,a){r=Le(r);var d=-1,m=a.length,v=m>2?a[2]:t;for(v&<(a[0],a[1],v)&&(m=1);++d<m;)for(var C=a[d],R=bt(C),S=-1,M=R.length;++S<M;){var N=R[S],z=r[N];(z===t||qt(z,Ln[N])&&!Te.call(r,N))&&(r[N]=C[N])}return r}),mk=de(function(r){return r.push(t,Jh),Rt(Of,t,r)});function pk(r,a){return Kd(r,te(a,3),ii)}function gk(r,a){return Kd(r,te(a,3),Sa)}function bk(r,a){return r==null?r:ka(r,te(a,3),bt)}function vk(r,a){return r==null?r:bh(r,te(a,3),bt)}function wk(r,a){return r&&ii(r,te(a,3))}function yk(r,a){return r&&Sa(r,te(a,3))}function Ck(r){return r==null?[]:_r(r,Xe(r))}function Ek(r){return r==null?[]:_r(r,bt(r))}function rl(r,a,d){var m=r==null?t:qi(r,a);return m===t?d:m}function xk(r,a){return r!=null&&ef(r,a,j1)}function ol(r,a){return r!=null&&ef(r,a,K1)}var _k=jh(function(r,a,d){a!=null&&typeof a.toString!="function"&&(a=dr.call(a)),r[a]=d},ll(vt)),Rk=jh(function(r,a,d){a!=null&&typeof a.toString!="function"&&(a=dr.call(a)),Te.call(r,a)?r[a].push(d):r[a]=[d]},te),kk=de(ws);function Xe(r){return gt(r)?ch(r):Da(r)}function bt(r){return gt(r)?ch(r,!0):nx(r)}function Sk(r,a){var d={};return a=te(a,3),ii(r,function(m,v,C){fi(d,a(m,v,C),m)}),d}function Tk(r,a){var d={};return a=te(a,3),ii(r,function(m,v,C){fi(d,v,a(m,v,C))}),d}var Mk=Pn(function(r,a,d){Rr(r,a,d)}),Of=Pn(function(r,a,d,m){Rr(r,a,d,m)}),Lk=pi(function(r,a){var d={};if(r==null)return d;var m=!1;a=Oe(a,function(C){return C=Ai(C,r),m||(m=C.length>1),C}),ni(r,Ua(r),d),m&&(d=Ht(d,b|g|w,_x));for(var v=a.length;v--;)Na(d,a[v]);return d});function Dk(r,a){return Nf(r,Ir(te(a)))}var Ak=pi(function(r,a){return r==null?{}:rx(r,a)});function Nf(r,a){if(r==null)return{};var d=Oe(Ua(r),function(m){return[m]});return a=te(a),Sh(r,d,function(m,v){return a(m,v[0])})}function Fk(r,a,d){a=Ai(a,r);var m=-1,v=a.length;for(v||(v=1,r=t);++m<v;){var C=r==null?t:r[si(a[m])];C===t&&(m=v,C=d),r=bi(C)?C.call(r):C}return r}function Pk(r,a,d){return r==null?r:Cs(r,a,d)}function Vk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:Cs(r,a,d,m)}var zf=Yh(Xe),Hf=Yh(bt);function Ok(r,a,d){var m=ae(r),v=m||Pi(r)||Nn(r);if(a=te(a,4),d==null){var C=r&&r.constructor;v?d=m?new C:[]:He(r)?d=bi(C)?Fn(mr(r)):{}:d={}}return(v?Ot:ii)(r,function(R,S,M){return a(d,R,S,M)}),d}function Nk(r,a){return r==null?!0:Na(r,a)}function zk(r,a,d){return r==null?r:Ah(r,a,Ia(d))}function Hk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:Ah(r,a,Ia(d),m)}function zn(r){return r==null?[]:va(r,Xe(r))}function Ik(r){return r==null?[]:va(r,bt(r))}function Bk(r,a,d){return d===t&&(d=a,a=t),d!==t&&(d=Wt(d),d=d===d?d:0),a!==t&&(a=Wt(a),a=a===a?a:0),Ki(Wt(r),a,d)}function Wk(r,a,d){return a=vi(a),d===t?(d=a,a=0):d=vi(d),r=Wt(r),q1(r,a,d)}function $k(r,a,d){if(d&&typeof d!="boolean"&<(r,a,d)&&(a=d=t),d===t&&(typeof a=="boolean"?(d=a,a=t):typeof r=="boolean"&&(d=r,r=t)),r===t&&a===t?(r=0,a=1):(r=vi(r),a===t?(a=r,r=0):a=vi(a)),r>a){var m=r;r=a,a=m}if(d||r%1||a%1){var v=lh();return tt(r+v*(a-r+CE("1e-"+((v+"").length-1))),a)}return Pa(r,a)}var Gk=Vn(function(r,a,d){return a=a.toLowerCase(),r+(d?If(a):a)});function If(r){return al(ke(r).toLowerCase())}function Bf(r){return r=ke(r),r&&r.replace(j0,PE).replace(dE,"")}function Uk(r,a,d){r=ke(r),a=St(a);var m=r.length;d=d===t?m:Ki(le(d),0,m);var v=d;return d-=a.length,d>=0&&r.slice(d,v)==a}function jk(r){return r=ke(r),r&&k0.test(r)?r.replace(bd,VE):r}function Kk(r){return r=ke(r),r&&A0.test(r)?r.replace(ia,"\\$&"):r}var qk=Vn(function(r,a,d){return r+(d?"-":"")+a.toLowerCase()}),Yk=Vn(function(r,a,d){return r+(d?" ":"")+a.toLowerCase()}),Xk=$h("toLowerCase");function Jk(r,a,d){r=ke(r),a=le(a);var m=a?Tn(r):0;if(!a||m>=a)return r;var v=(a-m)/2;return Dr(vr(v),d)+r+Dr(br(v),d)}function Zk(r,a,d){r=ke(r),a=le(a);var m=a?Tn(r):0;return a&&m<a?r+Dr(a-m,d):r}function Qk(r,a,d){r=ke(r),a=le(a);var m=a?Tn(r):0;return a&&m<a?Dr(a-m,d)+r:r}function eS(r,a,d){return d||a==null?a=0:a&&(a=+a),a1(ke(r).replace(na,""),a||0)}function tS(r,a,d){return(d?lt(r,a,d):a===t)?a=1:a=le(a),Va(ke(r),a)}function iS(){var r=arguments,a=ke(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var nS=Vn(function(r,a,d){return r+(d?"_":"")+a.toLowerCase()});function sS(r,a,d){return d&&typeof d!="number"&<(r,a,d)&&(a=d=t),d=d===t?ye:d>>>0,d?(r=ke(r),r&&(typeof a=="string"||a!=null&&!sl(a))&&(a=St(a),!a&&Sn(r))?Fi(jt(r),0,d):r.split(a,d)):[]}var rS=Vn(function(r,a,d){return r+(d?" ":"")+al(a)});function oS(r,a,d){return r=ke(r),d=d==null?0:Ki(le(d),0,r.length),a=St(a),r.slice(d,d+a.length)==a}function aS(r,a,d){var m=y.templateSettings;d&<(r,a,d)&&(a=t),r=ke(r),a=$r({},a,m,Xh);var v=$r({},a.imports,m.imports,Xh),C=Xe(v),R=va(v,C),S,M,N=0,z=a.interpolate||ir,B="__p += '",j=ya((a.escape||ir).source+"|"+z.source+"|"+(z===vd?I0:ir).source+"|"+(a.evaluate||ir).source+"|$","g"),J="//# sourceURL="+(Te.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gE+"]")+`
|
11
|
-
`;r.replace(
|
12
|
-
__e(`+
|
13
|
-
'`),
|
14
|
-
`+
|
15
|
-
__p += '`),
|
16
|
-
((__t = (`+
|
17
|
-
'`),
|
18
|
-
`;var
|
19
|
-
`+
|
10
|
+
`)}function Wx(r){return X(r)||Ri(r)||!!(Ec&&r&&r[Ec])}function Ut(r,a){var u=typeof r;return a=a??me,!!a&&(u=="number"||u!="symbol"&&eE.test(r))&&r>-1&&r%1==0&&r<a}function Ue(r,a,u){if(!ye(u))return!1;var p=typeof a;return(p=="number"?Je(u)&&Ut(a,u.length):p=="string"&&a in u)?Rt(u[a],r):!1}function Da(r,a){if(X(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||ot(r)?!0:IC.test(r)||!NC.test(r)||a!=null&&r in pe(a)}function $x(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Aa(r){var a=hs(r),u=w[a];if(typeof u!="function"||!(a in oe.prototype))return!1;if(r===u)return!0;var p=ka(u);return!!p&&r===p[0]}function Gx(r){return!!vc&&vc in r}var Ux=Br?jt:Ya;function qn(r){var a=r&&r.constructor,u=typeof a=="function"&&a.prototype||Zi;return r===u}function vd(r){return r===r&&!ye(r)}function wd(r,a){return function(u){return u==null?!1:u[r]===a&&(a!==t||r in pe(u))}}function jx(r){var a=gs(r,function(p){return u.size===f&&u.clear(),p}),u=a.cache;return a}function Kx(r,a){var u=r[1],p=a[1],g=u|p,y=g<(L|k|N),E=p==N&&u==P||p==N&&u==W&&r[7].length<=a[8]||p==(N|W)&&a[7].length<=a[8]&&u==P;if(!(y||E))return r;p&L&&(r[2]=a[2],g|=u&L?0:H);var _=a[3];if(_){var S=r[3];r[3]=S?td(S,_,a[4]):_,r[4]=S?ii(r[3],m):a[4]}return _=a[5],_&&(S=r[5],r[5]=S?id(S,_,a[6]):_,r[6]=S?ii(r[5],m):a[6]),_=a[7],_&&(r[7]=_),p&N&&(r[8]=r[8]==null?a[8]:Ve(r[8],a[8])),r[9]==null&&(r[9]=a[9]),r[0]=a[0],r[1]=g,r}function qx(r){var a=[];if(r!=null)for(var u in pe(r))a.push(u);return a}function Yx(r){return Wr.call(r)}function yd(r,a,u){return a=ke(a===t?r.length-1:a,0),function(){for(var p=arguments,g=-1,y=ke(p.length-a,0),E=M(y);++g<y;)E[g]=p[a+g];g=-1;for(var _=M(a+1);++g<a;)_[g]=p[g];return _[a]=u(E),nt(r,this,_)}}function Cd(r,a){return a.length<2?r:Ei(r,gt(a,0,-1))}function Xx(r,a){for(var u=r.length,p=Ve(a.length,u),g=Xe(r);p--;){var y=a[p];r[p]=Ut(y,u)?g[y]:t}return r}function Fa(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var Ed=_d(Uc),Yn=c1||function(r,a){return Oe.setTimeout(r,a)},Pa=_d(wx);function xd(r,a,u){var p=a+"";return Pa(r,Vx(p,Jx(Nx(p),u)))}function _d(r){var a=0,u=0;return function(){var p=m1(),g=Q-(p-u);if(u=p,g>0){if(++a>=$)return arguments[0]}else a=0;return r.apply(t,arguments)}}function ds(r,a){var u=-1,p=r.length,g=p-1;for(a=a===t?p:a;++u<a;){var y=ga(u,g),E=r[y];r[y]=r[u],r[u]=E}return r.length=a,r}var Rd=jx(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(BC,function(u,p,g,y){a.push(g?y.replace(qC,"$1"):p||u)}),a});function Pt(r){if(typeof r=="string"||ot(r))return r;var a=r+"";return a=="0"&&1/r==-Ye?"-0":a}function _i(r){if(r!=null){try{return Vr.call(r)}catch{}try{return r+""}catch{}}return""}function Jx(r,a){return dt(_C,function(u){var p="_."+u[0];a&u[1]&&!Hr(r,p)&&r.push(p)}),r.sort()}function Td(r){if(r instanceof oe)return r.clone();var a=new pt(r.__wrapped__,r.__chain__);return a.__actions__=Xe(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function Zx(r,a,u){(u?Ue(r,a,u):a===t)?a=1:a=ke(J(a),0);var p=r==null?0:r.length;if(!p||a<1)return[];for(var g=0,y=0,E=M(qr(p/a));g<p;)E[y++]=gt(r,g,g+=a);return E}function Qx(r){for(var a=-1,u=r==null?0:r.length,p=0,g=[];++a<u;){var y=r[a];y&&(g[p++]=y)}return g}function e_(){var r=arguments.length;if(!r)return[];for(var a=M(r-1),u=arguments[0],p=r;p--;)a[p-1]=arguments[p];return ti(X(u)?Xe(u):[u],He(a,1))}var t_=te(function(r,a){return xe(r)?$n(r,He(a,1,xe,!0)):[]}),i_=te(function(r,a){var u=bt(a);return xe(u)&&(u=t),xe(r)?$n(r,He(a,1,xe,!0),j(u,2)):[]}),n_=te(function(r,a){var u=bt(a);return xe(u)&&(u=t),xe(r)?$n(r,He(a,1,xe,!0),t,u):[]});function r_(r,a,u){var p=r==null?0:r.length;return p?(a=u||a===t?1:J(a),gt(r,a<0?0:a,p)):[]}function s_(r,a,u){var p=r==null?0:r.length;return p?(a=u||a===t?1:J(a),a=p-a,gt(r,0,a<0?0:a)):[]}function o_(r,a){return r&&r.length?rs(r,j(a,3),!0,!0):[]}function a_(r,a){return r&&r.length?rs(r,j(a,3),!0):[]}function l_(r,a,u,p){var g=r==null?0:r.length;return g?(u&&typeof u!="number"&&Ue(r,a,u)&&(u=0,p=g),ex(r,a,u,p)):[]}function Sd(r,a,u){var p=r==null?0:r.length;if(!p)return-1;var g=u==null?0:J(u);return g<0&&(g=ke(p+g,0)),zr(r,j(a,3),g)}function kd(r,a,u){var p=r==null?0:r.length;if(!p)return-1;var g=p-1;return u!==t&&(g=J(u),g=u<0?ke(p+g,0):Ve(g,p-1)),zr(r,j(a,3),g,!0)}function Md(r){var a=r==null?0:r.length;return a?He(r,1):[]}function u_(r){var a=r==null?0:r.length;return a?He(r,Ye):[]}function h_(r,a){var u=r==null?0:r.length;return u?(a=a===t?1:J(a),He(r,a)):[]}function c_(r){for(var a=-1,u=r==null?0:r.length,p={};++a<u;){var g=r[a];p[g[0]]=g[1]}return p}function Ld(r){return r&&r.length?r[0]:t}function d_(r,a,u){var p=r==null?0:r.length;if(!p)return-1;var g=u==null?0:J(u);return g<0&&(g=ke(p+g,0)),qi(r,a,g)}function f_(r){var a=r==null?0:r.length;return a?gt(r,0,-1):[]}var p_=te(function(r){var a=we(r,Ca);return a.length&&a[0]===r[0]?ca(a):[]}),m_=te(function(r){var a=bt(r),u=we(r,Ca);return a===bt(u)?a=t:u.pop(),u.length&&u[0]===r[0]?ca(u,j(a,2)):[]}),g_=te(function(r){var a=bt(r),u=we(r,Ca);return a=typeof a=="function"?a:t,a&&u.pop(),u.length&&u[0]===r[0]?ca(u,t,a):[]});function b_(r,a){return r==null?"":f1.call(r,a)}function bt(r){var a=r==null?0:r.length;return a?r[a-1]:t}function v_(r,a,u){var p=r==null?0:r.length;if(!p)return-1;var g=p;return u!==t&&(g=J(u),g=g<0?ke(p+g,0):Ve(g,p-1)),a===a?JE(r,a,g):zr(r,hc,g,!0)}function w_(r,a){return r&&r.length?Vc(r,J(a)):t}var y_=te(Dd);function Dd(r,a){return r&&r.length&&a&&a.length?ma(r,a):r}function C_(r,a,u){return r&&r.length&&a&&a.length?ma(r,a,j(u,2)):r}function E_(r,a,u){return r&&r.length&&a&&a.length?ma(r,a,t,u):r}var x_=Gt(function(r,a){var u=r==null?0:r.length,p=aa(r,a);return Gc(r,we(a,function(g){return Ut(g,u)?+g:g}).sort(ed)),p});function __(r,a){var u=[];if(!(r&&r.length))return u;var p=-1,g=[],y=r.length;for(a=j(a,3);++p<y;){var E=r[p];a(E,p,r)&&(u.push(E),g.push(p))}return Gc(r,g),u}function Oa(r){return r==null?r:b1.call(r)}function R_(r,a,u){var p=r==null?0:r.length;return p?(u&&typeof u!="number"&&Ue(r,a,u)?(a=0,u=p):(a=a==null?0:J(a),u=u===t?p:J(u)),gt(r,a,u)):[]}function T_(r,a){return ns(r,a)}function S_(r,a,u){return va(r,a,j(u,2))}function k_(r,a){var u=r==null?0:r.length;if(u){var p=ns(r,a);if(p<u&&Rt(r[p],a))return p}return-1}function M_(r,a){return ns(r,a,!0)}function L_(r,a,u){return va(r,a,j(u,2),!0)}function D_(r,a){var u=r==null?0:r.length;if(u){var p=ns(r,a,!0)-1;if(Rt(r[p],a))return p}return-1}function A_(r){return r&&r.length?jc(r):[]}function F_(r,a){return r&&r.length?jc(r,j(a,2)):[]}function P_(r){var a=r==null?0:r.length;return a?gt(r,1,a):[]}function O_(r,a,u){return r&&r.length?(a=u||a===t?1:J(a),gt(r,0,a<0?0:a)):[]}function H_(r,a,u){var p=r==null?0:r.length;return p?(a=u||a===t?1:J(a),a=p-a,gt(r,a<0?0:a,p)):[]}function z_(r,a){return r&&r.length?rs(r,j(a,3),!1,!0):[]}function N_(r,a){return r&&r.length?rs(r,j(a,3)):[]}var I_=te(function(r){return si(He(r,1,xe,!0))}),B_=te(function(r){var a=bt(r);return xe(a)&&(a=t),si(He(r,1,xe,!0),j(a,2))}),V_=te(function(r){var a=bt(r);return a=typeof a=="function"?a:t,si(He(r,1,xe,!0),t,a)});function W_(r){return r&&r.length?si(r):[]}function $_(r,a){return r&&r.length?si(r,j(a,2)):[]}function G_(r,a){return a=typeof a=="function"?a:t,r&&r.length?si(r,t,a):[]}function Ha(r){if(!(r&&r.length))return[];var a=0;return r=ei(r,function(u){if(xe(u))return a=ke(u.length,a),!0}),Qo(a,function(u){return we(r,Xo(u))})}function Ad(r,a){if(!(r&&r.length))return[];var u=Ha(r);return a==null?u:we(u,function(p){return nt(a,t,p)})}var U_=te(function(r,a){return xe(r)?$n(r,a):[]}),j_=te(function(r){return ya(ei(r,xe))}),K_=te(function(r){var a=bt(r);return xe(a)&&(a=t),ya(ei(r,xe),j(a,2))}),q_=te(function(r){var a=bt(r);return a=typeof a=="function"?a:t,ya(ei(r,xe),t,a)}),Y_=te(Ha);function X_(r,a){return Xc(r||[],a||[],Wn)}function J_(r,a){return Xc(r||[],a||[],jn)}var Z_=te(function(r){var a=r.length,u=a>1?r[a-1]:t;return u=typeof u=="function"?(r.pop(),u):t,Ad(r,u)});function Fd(r){var a=w(r);return a.__chain__=!0,a}function Q_(r,a){return a(r),r}function fs(r,a){return a(r)}var eR=Gt(function(r){var a=r.length,u=a?r[0]:0,p=this.__wrapped__,g=function(y){return aa(y,r)};return a>1||this.__actions__.length||!(p instanceof oe)||!Ut(u)?this.thru(g):(p=p.slice(u,+u+(a?1:0)),p.__actions__.push({func:fs,args:[g],thisArg:t}),new pt(p,this.__chain__).thru(function(y){return a&&!y.length&&y.push(t),y}))});function tR(){return Fd(this)}function iR(){return new pt(this.value(),this.__chain__)}function nR(){this.__values__===t&&(this.__values__=Kd(this.value()));var r=this.__index__>=this.__values__.length,a=r?t:this.__values__[this.__index__++];return{done:r,value:a}}function rR(){return this}function sR(r){for(var a,u=this;u instanceof Zr;){var p=Td(u);p.__index__=0,p.__values__=t,a?g.__wrapped__=p:a=p;var g=p;u=u.__wrapped__}return g.__wrapped__=r,a}function oR(){var r=this.__wrapped__;if(r instanceof oe){var a=r;return this.__actions__.length&&(a=new oe(this)),a=a.reverse(),a.__actions__.push({func:fs,args:[Oa],thisArg:t}),new pt(a,this.__chain__)}return this.thru(Oa)}function aR(){return Yc(this.__wrapped__,this.__actions__)}var lR=ss(function(r,a,u){ce.call(r,u)?++r[u]:Wt(r,u,1)});function uR(r,a,u){var p=X(r)?lc:Q1;return u&&Ue(r,a,u)&&(a=t),p(r,j(a,3))}function hR(r,a){var u=X(r)?ei:Ac;return u(r,j(a,3))}var cR=od(Sd),dR=od(kd);function fR(r,a){return He(ps(r,a),1)}function pR(r,a){return He(ps(r,a),Ye)}function mR(r,a,u){return u=u===t?1:J(u),He(ps(r,a),u)}function Pd(r,a){var u=X(r)?dt:ri;return u(r,j(a,3))}function Od(r,a){var u=X(r)?PE:Dc;return u(r,j(a,3))}var gR=ss(function(r,a,u){ce.call(r,u)?r[u].push(a):Wt(r,u,[a])});function bR(r,a,u,p){r=Je(r)?r:an(r),u=u&&!p?J(u):0;var g=r.length;return u<0&&(u=ke(g+u,0)),ws(r)?u<=g&&r.indexOf(a,u)>-1:!!g&&qi(r,a,u)>-1}var vR=te(function(r,a,u){var p=-1,g=typeof a=="function",y=Je(r)?M(r.length):[];return ri(r,function(E){y[++p]=g?nt(a,E,u):Gn(E,a,u)}),y}),wR=ss(function(r,a,u){Wt(r,u,a)});function ps(r,a){var u=X(r)?we:Nc;return u(r,j(a,3))}function yR(r,a,u,p){return r==null?[]:(X(a)||(a=a==null?[]:[a]),u=p?t:u,X(u)||(u=u==null?[]:[u]),Wc(r,a,u))}var CR=ss(function(r,a,u){r[u?0:1].push(a)},function(){return[[],[]]});function ER(r,a,u){var p=X(r)?qo:dc,g=arguments.length<3;return p(r,j(a,4),u,g,ri)}function xR(r,a,u){var p=X(r)?OE:dc,g=arguments.length<3;return p(r,j(a,4),u,g,Dc)}function _R(r,a){var u=X(r)?ei:Ac;return u(r,bs(j(a,3)))}function RR(r){var a=X(r)?Sc:bx;return a(r)}function TR(r,a,u){(u?Ue(r,a,u):a===t)?a=1:a=J(a);var p=X(r)?q1:vx;return p(r,a)}function SR(r){var a=X(r)?Y1:yx;return a(r)}function kR(r){if(r==null)return 0;if(Je(r))return ws(r)?Xi(r):r.length;var a=We(r);return a==Ct||a==Et?r.size:fa(r).length}function MR(r,a,u){var p=X(r)?Yo:Cx;return u&&Ue(r,a,u)&&(a=t),p(r,j(a,3))}var LR=te(function(r,a){if(r==null)return[];var u=a.length;return u>1&&Ue(r,a[0],a[1])?a=[]:u>2&&Ue(a[0],a[1],a[2])&&(a=[a[0]]),Wc(r,He(a,1),[])}),ms=h1||function(){return Oe.Date.now()};function DR(r,a){if(typeof a!="function")throw new ft(l);return r=J(r),function(){if(--r<1)return a.apply(this,arguments)}}function Hd(r,a,u){return a=u?t:a,a=r&&a==null?r.length:a,$t(r,N,t,t,t,t,a)}function zd(r,a){var u;if(typeof a!="function")throw new ft(l);return r=J(r),function(){return--r>0&&(u=a.apply(this,arguments)),r<=1&&(a=t),u}}var za=te(function(r,a,u){var p=L;if(u.length){var g=ii(u,sn(za));p|=V}return $t(r,p,a,u,g)}),Nd=te(function(r,a,u){var p=L|k;if(u.length){var g=ii(u,sn(Nd));p|=V}return $t(a,p,r,u,g)});function Id(r,a,u){a=u?t:a;var p=$t(r,P,t,t,t,t,t,a);return p.placeholder=Id.placeholder,p}function Bd(r,a,u){a=u?t:a;var p=$t(r,z,t,t,t,t,t,a);return p.placeholder=Bd.placeholder,p}function Vd(r,a,u){var p,g,y,E,_,S,A=0,F=!1,O=!1,I=!0;if(typeof r!="function")throw new ft(l);a=vt(a)||0,ye(u)&&(F=!!u.leading,O="maxWait"in u,y=O?ke(vt(u.maxWait)||0,a):y,I="trailing"in u?!!u.trailing:I);function G(_e){var Tt=p,qt=g;return p=g=t,A=_e,E=r.apply(qt,Tt),E}function K(_e){return A=_e,_=Yn(ne,a),F?G(_e):E}function ee(_e){var Tt=_e-S,qt=_e-A,af=a-Tt;return O?Ve(af,y-qt):af}function q(_e){var Tt=_e-S,qt=_e-A;return S===t||Tt>=a||Tt<0||O&&qt>=y}function ne(){var _e=ms();if(q(_e))return ae(_e);_=Yn(ne,ee(_e))}function ae(_e){return _=t,I&&p?G(_e):(p=g=t,E)}function at(){_!==t&&Jc(_),A=0,p=S=g=_=t}function je(){return _===t?E:ae(ms())}function lt(){var _e=ms(),Tt=q(_e);if(p=arguments,g=this,S=_e,Tt){if(_===t)return K(S);if(O)return Jc(_),_=Yn(ne,a),G(S)}return _===t&&(_=Yn(ne,a)),E}return lt.cancel=at,lt.flush=je,lt}var AR=te(function(r,a){return Lc(r,1,a)}),FR=te(function(r,a,u){return Lc(r,vt(a)||0,u)});function PR(r){return $t(r,le)}function gs(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new ft(l);var u=function(){var p=arguments,g=a?a.apply(this,p):p[0],y=u.cache;if(y.has(g))return y.get(g);var E=r.apply(this,p);return u.cache=y.set(g,E)||y,E};return u.cache=new(gs.Cache||Vt),u}gs.Cache=Vt;function bs(r){if(typeof r!="function")throw new ft(l);return function(){var a=arguments;switch(a.length){case 0:return!r.call(this);case 1:return!r.call(this,a[0]);case 2:return!r.call(this,a[0],a[1]);case 3:return!r.call(this,a[0],a[1],a[2])}return!r.apply(this,a)}}function OR(r){return zd(2,r)}var HR=Ex(function(r,a){a=a.length==1&&X(a[0])?we(a[0],rt(j())):we(He(a,1),rt(j()));var u=a.length;return te(function(p){for(var g=-1,y=Ve(p.length,u);++g<y;)p[g]=a[g].call(this,p[g]);return nt(r,this,p)})}),Na=te(function(r,a){var u=ii(a,sn(Na));return $t(r,V,t,a,u)}),Wd=te(function(r,a){var u=ii(a,sn(Wd));return $t(r,Z,t,a,u)}),zR=Gt(function(r,a){return $t(r,W,t,t,t,a)});function NR(r,a){if(typeof r!="function")throw new ft(l);return a=a===t?a:J(a),te(r,a)}function IR(r,a){if(typeof r!="function")throw new ft(l);return a=a==null?0:ke(J(a),0),te(function(u){var p=u[a],g=ai(u,0,a);return p&&ti(g,p),nt(r,this,g)})}function BR(r,a,u){var p=!0,g=!0;if(typeof r!="function")throw new ft(l);return ye(u)&&(p="leading"in u?!!u.leading:p,g="trailing"in u?!!u.trailing:g),Vd(r,a,{leading:p,maxWait:a,trailing:g})}function VR(r){return Hd(r,1)}function WR(r,a){return Na(Ea(a),r)}function $R(){if(!arguments.length)return[];var r=arguments[0];return X(r)?r:[r]}function GR(r){return mt(r,C)}function UR(r,a){return a=typeof a=="function"?a:t,mt(r,C,a)}function jR(r){return mt(r,b|C)}function KR(r,a){return a=typeof a=="function"?a:t,mt(r,b|C,a)}function qR(r,a){return a==null||Mc(r,a,Fe(a))}function Rt(r,a){return r===a||r!==r&&a!==a}var YR=us(ha),XR=us(function(r,a){return r>=a}),Ri=Oc(function(){return arguments}())?Oc:function(r){return Ce(r)&&ce.call(r,"callee")&&!Cc.call(r,"callee")},X=M.isArray,JR=ic?rt(ic):sx;function Je(r){return r!=null&&vs(r.length)&&!jt(r)}function xe(r){return Ce(r)&&Je(r)}function ZR(r){return r===!0||r===!1||Ce(r)&&Ge(r)==Mn}var li=d1||Ya,QR=nc?rt(nc):ox;function eT(r){return Ce(r)&&r.nodeType===1&&!Xn(r)}function tT(r){if(r==null)return!0;if(Je(r)&&(X(r)||typeof r=="string"||typeof r.splice=="function"||li(r)||on(r)||Ri(r)))return!r.length;var a=We(r);if(a==Ct||a==Et)return!r.size;if(qn(r))return!fa(r).length;for(var u in r)if(ce.call(r,u))return!1;return!0}function iT(r,a){return Un(r,a)}function nT(r,a,u){u=typeof u=="function"?u:t;var p=u?u(r,a):t;return p===t?Un(r,a,t,u):!!p}function Ia(r){if(!Ce(r))return!1;var a=Ge(r);return a==Lr||a==TC||typeof r.message=="string"&&typeof r.name=="string"&&!Xn(r)}function rT(r){return typeof r=="number"&&xc(r)}function jt(r){if(!ye(r))return!1;var a=Ge(r);return a==Dr||a==Lh||a==RC||a==kC}function $d(r){return typeof r=="number"&&r==J(r)}function vs(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=me}function ye(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Ce(r){return r!=null&&typeof r=="object"}var Gd=rc?rt(rc):lx;function sT(r,a){return r===a||da(r,a,Ma(a))}function oT(r,a,u){return u=typeof u=="function"?u:t,da(r,a,Ma(a),u)}function aT(r){return Ud(r)&&r!=+r}function lT(r){if(Ux(r))throw new Y(o);return Hc(r)}function uT(r){return r===null}function hT(r){return r==null}function Ud(r){return typeof r=="number"||Ce(r)&&Ge(r)==Dn}function Xn(r){if(!Ce(r)||Ge(r)!=It)return!1;var a=Ur(r);if(a===null)return!0;var u=ce.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Vr.call(u)==o1}var Ba=sc?rt(sc):ux;function cT(r){return $d(r)&&r>=-me&&r<=me}var jd=oc?rt(oc):hx;function ws(r){return typeof r=="string"||!X(r)&&Ce(r)&&Ge(r)==Fn}function ot(r){return typeof r=="symbol"||Ce(r)&&Ge(r)==Ar}var on=ac?rt(ac):cx;function dT(r){return r===t}function fT(r){return Ce(r)&&We(r)==Pn}function pT(r){return Ce(r)&&Ge(r)==LC}var mT=us(pa),gT=us(function(r,a){return r<=a});function Kd(r){if(!r)return[];if(Je(r))return ws(r)?xt(r):Xe(r);if(zn&&r[zn])return qE(r[zn]());var a=We(r),u=a==Ct?ta:a==Et?Nr:an;return u(r)}function Kt(r){if(!r)return r===0?r:0;if(r=vt(r),r===Ye||r===-Ye){var a=r<0?-1:1;return a*fe}return r===r?r:0}function J(r){var a=Kt(r),u=a%1;return a===a?u?a-u:a:0}function qd(r){return r?Ci(J(r),0,Ae):0}function vt(r){if(typeof r=="number")return r;if(ot(r))return Pe;if(ye(r)){var a=typeof r.valueOf=="function"?r.valueOf():r;r=ye(a)?a+"":a}if(typeof r!="string")return r===0?r:+r;r=fc(r);var u=JC.test(r);return u||QC.test(r)?DE(r.slice(2),u?2:8):XC.test(r)?Pe:+r}function Yd(r){return Ft(r,Ze(r))}function bT(r){return r?Ci(J(r),-me,me):r===0?r:0}function he(r){return r==null?"":st(r)}var vT=nn(function(r,a){if(qn(a)||Je(a)){Ft(a,Fe(a),r);return}for(var u in a)ce.call(a,u)&&Wn(r,u,a[u])}),Xd=nn(function(r,a){Ft(a,Ze(a),r)}),ys=nn(function(r,a,u,p){Ft(a,Ze(a),r,p)}),wT=nn(function(r,a,u,p){Ft(a,Fe(a),r,p)}),yT=Gt(aa);function CT(r,a){var u=tn(r);return a==null?u:kc(u,a)}var ET=te(function(r,a){r=pe(r);var u=-1,p=a.length,g=p>2?a[2]:t;for(g&&Ue(a[0],a[1],g)&&(p=1);++u<p;)for(var y=a[u],E=Ze(y),_=-1,S=E.length;++_<S;){var A=E[_],F=r[A];(F===t||Rt(F,Zi[A])&&!ce.call(r,A))&&(r[A]=y[A])}return r}),xT=te(function(r){return r.push(t,fd),nt(Jd,t,r)});function _T(r,a){return uc(r,j(a,3),At)}function RT(r,a){return uc(r,j(a,3),ua)}function TT(r,a){return r==null?r:la(r,j(a,3),Ze)}function ST(r,a){return r==null?r:Fc(r,j(a,3),Ze)}function kT(r,a){return r&&At(r,j(a,3))}function MT(r,a){return r&&ua(r,j(a,3))}function LT(r){return r==null?[]:ts(r,Fe(r))}function DT(r){return r==null?[]:ts(r,Ze(r))}function Va(r,a,u){var p=r==null?t:Ei(r,a);return p===t?u:p}function AT(r,a){return r!=null&&gd(r,a,tx)}function Wa(r,a){return r!=null&&gd(r,a,ix)}var FT=ld(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Wr.call(a)),r[a]=u},Ga(Qe)),PT=ld(function(r,a,u){a!=null&&typeof a.toString!="function"&&(a=Wr.call(a)),ce.call(r,a)?r[a].push(u):r[a]=[u]},j),OT=te(Gn);function Fe(r){return Je(r)?Tc(r):fa(r)}function Ze(r){return Je(r)?Tc(r,!0):dx(r)}function HT(r,a){var u={};return a=j(a,3),At(r,function(p,g,y){Wt(u,a(p,g,y),p)}),u}function zT(r,a){var u={};return a=j(a,3),At(r,function(p,g,y){Wt(u,g,a(p,g,y))}),u}var NT=nn(function(r,a,u){is(r,a,u)}),Jd=nn(function(r,a,u,p){is(r,a,u,p)}),IT=Gt(function(r,a){var u={};if(r==null)return u;var p=!1;a=we(a,function(y){return y=oi(y,r),p||(p=y.length>1),y}),Ft(r,Sa(r),u),p&&(u=mt(u,b|v|C,Fx));for(var g=a.length;g--;)wa(u,a[g]);return u});function BT(r,a){return Zd(r,bs(j(a)))}var VT=Gt(function(r,a){return r==null?{}:px(r,a)});function Zd(r,a){if(r==null)return{};var u=we(Sa(r),function(p){return[p]});return a=j(a),$c(r,u,function(p,g){return a(p,g[0])})}function WT(r,a,u){a=oi(a,r);var p=-1,g=a.length;for(g||(g=1,r=t);++p<g;){var y=r==null?t:r[Pt(a[p])];y===t&&(p=g,y=u),r=jt(y)?y.call(r):y}return r}function $T(r,a,u){return r==null?r:jn(r,a,u)}function GT(r,a,u,p){return p=typeof p=="function"?p:t,r==null?r:jn(r,a,u,p)}var Qd=cd(Fe),ef=cd(Ze);function UT(r,a,u){var p=X(r),g=p||li(r)||on(r);if(a=j(a,4),u==null){var y=r&&r.constructor;g?u=p?new y:[]:ye(r)?u=jt(y)?tn(Ur(r)):{}:u={}}return(g?dt:At)(r,function(E,_,S){return a(u,E,_,S)}),u}function jT(r,a){return r==null?!0:wa(r,a)}function KT(r,a,u){return r==null?r:qc(r,a,Ea(u))}function qT(r,a,u,p){return p=typeof p=="function"?p:t,r==null?r:qc(r,a,Ea(u),p)}function an(r){return r==null?[]:ea(r,Fe(r))}function YT(r){return r==null?[]:ea(r,Ze(r))}function XT(r,a,u){return u===t&&(u=a,a=t),u!==t&&(u=vt(u),u=u===u?u:0),a!==t&&(a=vt(a),a=a===a?a:0),Ci(vt(r),a,u)}function JT(r,a,u){return a=Kt(a),u===t?(u=a,a=0):u=Kt(u),r=vt(r),nx(r,a,u)}function ZT(r,a,u){if(u&&typeof u!="boolean"&&Ue(r,a,u)&&(a=u=t),u===t&&(typeof a=="boolean"?(u=a,a=t):typeof r=="boolean"&&(u=r,r=t)),r===t&&a===t?(r=0,a=1):(r=Kt(r),a===t?(a=r,r=0):a=Kt(a)),r>a){var p=r;r=a,a=p}if(u||r%1||a%1){var g=_c();return Ve(r+g*(a-r+LE("1e-"+((g+"").length-1))),a)}return ga(r,a)}var QT=rn(function(r,a,u){return a=a.toLowerCase(),r+(u?tf(a):a)});function tf(r){return $a(he(r).toLowerCase())}function nf(r){return r=he(r),r&&r.replace(tE,$E).replace(yE,"")}function eS(r,a,u){r=he(r),a=st(a);var p=r.length;u=u===t?p:Ci(J(u),0,p);var g=u;return u-=a.length,u>=0&&r.slice(u,g)==a}function tS(r){return r=he(r),r&&OC.test(r)?r.replace(Fh,GE):r}function iS(r){return r=he(r),r&&VC.test(r)?r.replace(No,"\\$&"):r}var nS=rn(function(r,a,u){return r+(u?"-":"")+a.toLowerCase()}),rS=rn(function(r,a,u){return r+(u?" ":"")+a.toLowerCase()}),sS=sd("toLowerCase");function oS(r,a,u){r=he(r),a=J(a);var p=a?Xi(r):0;if(!a||p>=a)return r;var g=(a-p)/2;return ls(Yr(g),u)+r+ls(qr(g),u)}function aS(r,a,u){r=he(r),a=J(a);var p=a?Xi(r):0;return a&&p<a?r+ls(a-p,u):r}function lS(r,a,u){r=he(r),a=J(a);var p=a?Xi(r):0;return a&&p<a?ls(a-p,u)+r:r}function uS(r,a,u){return u||a==null?a=0:a&&(a=+a),g1(he(r).replace(Io,""),a||0)}function hS(r,a,u){return(u?Ue(r,a,u):a===t)?a=1:a=J(a),ba(he(r),a)}function cS(){var r=arguments,a=he(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var dS=rn(function(r,a,u){return r+(u?"_":"")+a.toLowerCase()});function fS(r,a,u){return u&&typeof u!="number"&&Ue(r,a,u)&&(a=u=t),u=u===t?Ae:u>>>0,u?(r=he(r),r&&(typeof a=="string"||a!=null&&!Ba(a))&&(a=st(a),!a&&Yi(r))?ai(xt(r),0,u):r.split(a,u)):[]}var pS=rn(function(r,a,u){return r+(u?" ":"")+$a(a)});function mS(r,a,u){return r=he(r),u=u==null?0:Ci(J(u),0,r.length),a=st(a),r.slice(u,u+a.length)==a}function gS(r,a,u){var p=w.templateSettings;u&&Ue(r,a,u)&&(a=t),r=he(r),a=ys({},a,p,dd);var g=ys({},a.imports,p.imports,dd),y=Fe(g),E=ea(g,y),_,S,A=0,F=a.interpolate||Fr,O="__p += '",I=ia((a.escape||Fr).source+"|"+F.source+"|"+(F===Ph?YC:Fr).source+"|"+(a.evaluate||Fr).source+"|$","g"),G="//# sourceURL="+(ce.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RE+"]")+`
|
11
|
+
`;r.replace(I,function(q,ne,ae,at,je,lt){return ae||(ae=at),O+=r.slice(A,lt).replace(iE,UE),ne&&(_=!0,O+=`' +
|
12
|
+
__e(`+ne+`) +
|
13
|
+
'`),je&&(S=!0,O+=`';
|
14
|
+
`+je+`;
|
15
|
+
__p += '`),ae&&(O+=`' +
|
16
|
+
((__t = (`+ae+`)) == null ? '' : __t) +
|
17
|
+
'`),A=lt+q.length,q}),O+=`';
|
18
|
+
`;var K=ce.call(a,"variable")&&a.variable;if(!K)O=`with (obj) {
|
19
|
+
`+O+`
|
20
20
|
}
|
21
|
-
`;else if(
|
22
|
-
`+(
|
23
|
-
`)+"var __t, __p = ''"+(
|
21
|
+
`;else if(KC.test(K))throw new Y(h);O=(S?O.replace(DC,""):O).replace(AC,"$1").replace(FC,"$1;"),O="function("+(K||"obj")+`) {
|
22
|
+
`+(K?"":`obj || (obj = {});
|
23
|
+
`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
25
25
|
`:`;
|
26
|
-
`)+
|
27
|
-
}`;var ce=$f(function(){return _e(C,J+"return "+B).apply(t,R)});if(ce.source=B,nl(ce))throw ce;return ce}function lS(r){return ke(r).toLowerCase()}function uS(r){return ke(r).toUpperCase()}function cS(r,a,d){if(r=ke(r),r&&(d||a===t))return Jd(r);if(!r||!(a=St(a)))return r;var m=jt(r),v=jt(a),C=Zd(m,v),R=Qd(m,v)+1;return Fi(m,C,R).join("")}function dS(r,a,d){if(r=ke(r),r&&(d||a===t))return r.slice(0,th(r)+1);if(!r||!(a=St(a)))return r;var m=jt(r),v=Qd(m,jt(a))+1;return Fi(m,0,v).join("")}function hS(r,a,d){if(r=ke(r),r&&(d||a===t))return r.replace(na,"");if(!r||!(a=St(a)))return r;var m=jt(r),v=Zd(m,jt(a));return Fi(m,v).join("")}function fS(r,a){var d=Z,m=ie;if(He(a)){var v="separator"in a?a.separator:v;d="length"in a?le(a.length):d,m="omission"in a?St(a.omission):m}r=ke(r);var C=r.length;if(Sn(r)){var R=jt(r);C=R.length}if(d>=C)return r;var S=d-Tn(m);if(S<1)return m;var M=R?Fi(R,0,S).join(""):r.slice(0,S);if(v===t)return M+m;if(R&&(S+=M.length-S),sl(v)){if(r.slice(S).search(v)){var N,z=M;for(v.global||(v=ya(v.source,ke(wd.exec(v))+"g")),v.lastIndex=0;N=v.exec(z);)var B=N.index;M=M.slice(0,B===t?S:B)}}else if(r.indexOf(St(v),S)!=S){var j=M.lastIndexOf(v);j>-1&&(M=M.slice(0,j))}return M+m}function mS(r){return r=ke(r),r&&R0.test(r)?r.replace(gd,$E):r}var pS=Vn(function(r,a,d){return r+(d?" ":"")+a.toUpperCase()}),al=$h("toUpperCase");function Wf(r,a,d){return r=ke(r),a=d?t:a,a===t?zE(r)?jE(r):ME(r):r.match(a)||[]}var $f=de(function(r,a){try{return Rt(r,t,a)}catch(d){return nl(d)?d:new oe(d)}}),gS=pi(function(r,a){return Ot(a,function(d){d=si(d),fi(r,d,tl(r[d],r))}),r});function bS(r){var a=r==null?0:r.length,d=te();return r=a?Oe(r,function(m){if(typeof m[1]!="function")throw new Nt(l);return[d(m[0]),m[1]]}):[],de(function(m){for(var v=-1;++v<a;){var C=r[v];if(Rt(C[0],this,m))return Rt(C[1],this,m)}})}function vS(r){return $1(Ht(r,b))}function ll(r){return function(){return r}}function wS(r,a){return r==null||r!==r?a:r}var yS=Uh(),CS=Uh(!0);function vt(r){return r}function ul(r){return Ch(typeof r=="function"?r:Ht(r,b))}function ES(r){return xh(Ht(r,b))}function xS(r,a){return _h(r,Ht(a,b))}var _S=de(function(r,a){return function(d){return ws(d,r,a)}}),RS=de(function(r,a){return function(d){return ws(r,d,a)}});function cl(r,a,d){var m=Xe(a),v=_r(a,m);d==null&&!(He(a)&&(v.length||!m.length))&&(d=a,a=r,r=this,v=_r(a,Xe(a)));var C=!(He(d)&&"chain"in d)||!!d.chain,R=bi(r);return Ot(v,function(S){var M=a[S];r[S]=M,R&&(r.prototype[S]=function(){var N=this.__chain__;if(C||N){var z=r(this.__wrapped__),B=z.__actions__=pt(this.__actions__);return B.push({func:M,args:arguments,thisArg:r}),z.__chain__=N,z}return M.apply(r,Si([this.value()],arguments))})}),r}function kS(){return Ze._===this&&(Ze._=ZE),this}function dl(){}function SS(r){return r=le(r),de(function(a){return Rh(a,r)})}var TS=Wa(Oe),MS=Wa(jd),LS=Wa(fa);function Gf(r){return Ya(r)?ma(si(r)):ox(r)}function DS(r){return function(a){return r==null?t:qi(r,a)}}var AS=Kh(),FS=Kh(!0);function hl(){return[]}function fl(){return!1}function PS(){return{}}function VS(){return""}function OS(){return!0}function NS(r,a){if(r=le(r),r<1||r>$)return[];var d=ye,m=tt(r,ye);a=te(a),r-=ye;for(var v=ba(m,a);++d<r;)a(d);return v}function zS(r){return ae(r)?Oe(r,si):Tt(r)?[r]:pt(cf(ke(r)))}function HS(r){var a=++XE;return ke(r)+a}var IS=Lr(function(r,a){return r+a},0),BS=$a("ceil"),WS=Lr(function(r,a){return r/a},1),$S=$a("floor");function GS(r){return r&&r.length?xr(r,vt,Ta):t}function US(r,a){return r&&r.length?xr(r,te(a,2),Ta):t}function jS(r){return Yd(r,vt)}function KS(r,a){return Yd(r,te(a,2))}function qS(r){return r&&r.length?xr(r,vt,Aa):t}function YS(r,a){return r&&r.length?xr(r,te(a,2),Aa):t}var XS=Lr(function(r,a){return r*a},1),JS=$a("round"),ZS=Lr(function(r,a){return r-a},0);function QS(r){return r&&r.length?ga(r,vt):0}function eT(r,a){return r&&r.length?ga(r,te(a,2)):0}return y.after=ER,y.ary=Cf,y.assign=uk,y.assignIn=Vf,y.assignInWith=$r,y.assignWith=ck,y.at=dk,y.before=Ef,y.bind=tl,y.bindAll=gS,y.bindKey=xf,y.castArray=PR,y.chain=vf,y.chunk=$x,y.compact=Gx,y.concat=Ux,y.cond=bS,y.conforms=vS,y.constant=ll,y.countBy=Q_,y.create=hk,y.curry=_f,y.curryRight=Rf,y.debounce=kf,y.defaults=fk,y.defaultsDeep=mk,y.defer=xR,y.delay=_R,y.difference=jx,y.differenceBy=Kx,y.differenceWith=qx,y.drop=Yx,y.dropRight=Xx,y.dropRightWhile=Jx,y.dropWhile=Zx,y.fill=Qx,y.filter=tR,y.flatMap=sR,y.flatMapDeep=rR,y.flatMapDepth=oR,y.flatten=mf,y.flattenDeep=e_,y.flattenDepth=t_,y.flip=RR,y.flow=yS,y.flowRight=CS,y.fromPairs=i_,y.functions=Ck,y.functionsIn=Ek,y.groupBy=aR,y.initial=s_,y.intersection=r_,y.intersectionBy=o_,y.intersectionWith=a_,y.invert=_k,y.invertBy=Rk,y.invokeMap=uR,y.iteratee=ul,y.keyBy=cR,y.keys=Xe,y.keysIn=bt,y.map=Nr,y.mapKeys=Sk,y.mapValues=Tk,y.matches=ES,y.matchesProperty=xS,y.memoize=Hr,y.merge=Mk,y.mergeWith=Of,y.method=_S,y.methodOf=RS,y.mixin=cl,y.negate=Ir,y.nthArg=SS,y.omit=Lk,y.omitBy=Dk,y.once=kR,y.orderBy=dR,y.over=TS,y.overArgs=SR,y.overEvery=MS,y.overSome=LS,y.partial=il,y.partialRight=Sf,y.partition=hR,y.pick=Ak,y.pickBy=Nf,y.property=Gf,y.propertyOf=DS,y.pull=d_,y.pullAll=gf,y.pullAllBy=h_,y.pullAllWith=f_,y.pullAt=m_,y.range=AS,y.rangeRight=FS,y.rearg=TR,y.reject=pR,y.remove=p_,y.rest=MR,y.reverse=Qa,y.sampleSize=bR,y.set=Pk,y.setWith=Vk,y.shuffle=vR,y.slice=g_,y.sortBy=CR,y.sortedUniq=x_,y.sortedUniqBy=__,y.split=sS,y.spread=LR,y.tail=R_,y.take=k_,y.takeRight=S_,y.takeRightWhile=T_,y.takeWhile=M_,y.tap=G_,y.throttle=DR,y.thru=Or,y.toArray=Af,y.toPairs=zf,y.toPairsIn=Hf,y.toPath=zS,y.toPlainObject=Pf,y.transform=Ok,y.unary=AR,y.union=L_,y.unionBy=D_,y.unionWith=A_,y.uniq=F_,y.uniqBy=P_,y.uniqWith=V_,y.unset=Nk,y.unzip=el,y.unzipWith=bf,y.update=zk,y.updateWith=Hk,y.values=zn,y.valuesIn=Ik,y.without=O_,y.words=Wf,y.wrap=FR,y.xor=N_,y.xorBy=z_,y.xorWith=H_,y.zip=I_,y.zipObject=B_,y.zipObjectDeep=W_,y.zipWith=$_,y.entries=zf,y.entriesIn=Hf,y.extend=Vf,y.extendWith=$r,cl(y,y),y.add=IS,y.attempt=$f,y.camelCase=Gk,y.capitalize=If,y.ceil=BS,y.clamp=Bk,y.clone=VR,y.cloneDeep=NR,y.cloneDeepWith=zR,y.cloneWith=OR,y.conformsTo=HR,y.deburr=Bf,y.defaultTo=wS,y.divide=WS,y.endsWith=Uk,y.eq=qt,y.escape=jk,y.escapeRegExp=Kk,y.every=eR,y.find=iR,y.findIndex=hf,y.findKey=pk,y.findLast=nR,y.findLastIndex=ff,y.findLastKey=gk,y.floor=$S,y.forEach=wf,y.forEachRight=yf,y.forIn=bk,y.forInRight=vk,y.forOwn=wk,y.forOwnRight=yk,y.get=rl,y.gt=IR,y.gte=BR,y.has=xk,y.hasIn=ol,y.head=pf,y.identity=vt,y.includes=lR,y.indexOf=n_,y.inRange=Wk,y.invoke=kk,y.isArguments=Ji,y.isArray=ae,y.isArrayBuffer=WR,y.isArrayLike=gt,y.isArrayLikeObject=Ge,y.isBoolean=$R,y.isBuffer=Pi,y.isDate=GR,y.isElement=UR,y.isEmpty=jR,y.isEqual=KR,y.isEqualWith=qR,y.isError=nl,y.isFinite=YR,y.isFunction=bi,y.isInteger=Tf,y.isLength=Br,y.isMap=Mf,y.isMatch=XR,y.isMatchWith=JR,y.isNaN=ZR,y.isNative=QR,y.isNil=tk,y.isNull=ek,y.isNumber=Lf,y.isObject=He,y.isObjectLike=Be,y.isPlainObject=Rs,y.isRegExp=sl,y.isSafeInteger=ik,y.isSet=Df,y.isString=Wr,y.isSymbol=Tt,y.isTypedArray=Nn,y.isUndefined=nk,y.isWeakMap=sk,y.isWeakSet=rk,y.join=l_,y.kebabCase=qk,y.last=Bt,y.lastIndexOf=u_,y.lowerCase=Yk,y.lowerFirst=Xk,y.lt=ok,y.lte=ak,y.max=GS,y.maxBy=US,y.mean=jS,y.meanBy=KS,y.min=qS,y.minBy=YS,y.stubArray=hl,y.stubFalse=fl,y.stubObject=PS,y.stubString=VS,y.stubTrue=OS,y.multiply=XS,y.nth=c_,y.noConflict=kS,y.noop=dl,y.now=zr,y.pad=Jk,y.padEnd=Zk,y.padStart=Qk,y.parseInt=eS,y.random=$k,y.reduce=fR,y.reduceRight=mR,y.repeat=tS,y.replace=iS,y.result=Fk,y.round=JS,y.runInContext=T,y.sample=gR,y.size=wR,y.snakeCase=nS,y.some=yR,y.sortedIndex=b_,y.sortedIndexBy=v_,y.sortedIndexOf=w_,y.sortedLastIndex=y_,y.sortedLastIndexBy=C_,y.sortedLastIndexOf=E_,y.startCase=rS,y.startsWith=oS,y.subtract=ZS,y.sum=QS,y.sumBy=eT,y.template=aS,y.times=NS,y.toFinite=vi,y.toInteger=le,y.toLength=Ff,y.toLower=lS,y.toNumber=Wt,y.toSafeInteger=lk,y.toString=ke,y.toUpper=uS,y.trim=cS,y.trimEnd=dS,y.trimStart=hS,y.truncate=fS,y.unescape=mS,y.uniqueId=HS,y.upperCase=pS,y.upperFirst=al,y.each=wf,y.eachRight=yf,y.first=pf,cl(y,function(){var r={};return ii(y,function(a,d){Te.call(y.prototype,d)||(r[d]=a)}),r}(),{chain:!1}),y.VERSION=i,Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),Ot(["drop","take"],function(r,a){we.prototype[r]=function(d){d=d===t?1:Ye(le(d),0);var m=this.__filtered__&&!a?new we(this):this.clone();return m.__filtered__?m.__takeCount__=tt(d,m.__takeCount__):m.__views__.push({size:tt(d,ye),type:r+(m.__dir__<0?"Right":"")}),m},we.prototype[r+"Right"]=function(d){return this.reverse()[r](d).reverse()}}),Ot(["filter","map","takeWhile"],function(r,a){var d=a+1,m=d==ee||d==Re;we.prototype[r]=function(v){var C=this.clone();return C.__iteratees__.push({iteratee:te(v,3),type:d}),C.__filtered__=C.__filtered__||m,C}}),Ot(["head","last"],function(r,a){var d="take"+(a?"Right":"");we.prototype[r]=function(){return this[d](1).value()[0]}}),Ot(["initial","tail"],function(r,a){var d="drop"+(a?"":"Right");we.prototype[r]=function(){return this.__filtered__?new we(this):this[d](1)}}),we.prototype.compact=function(){return this.filter(vt)},we.prototype.find=function(r){return this.filter(r).head()},we.prototype.findLast=function(r){return this.reverse().find(r)},we.prototype.invokeMap=de(function(r,a){return typeof r=="function"?new we(this):this.map(function(d){return ws(d,r,a)})}),we.prototype.reject=function(r){return this.filter(Ir(te(r)))},we.prototype.slice=function(r,a){r=le(r);var d=this;return d.__filtered__&&(r>0||a<0)?new we(d):(r<0?d=d.takeRight(-r):r&&(d=d.drop(r)),a!==t&&(a=le(a),d=a<0?d.dropRight(-a):d.take(a-r)),d)},we.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},we.prototype.toArray=function(){return this.take(ye)},ii(we.prototype,function(r,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),m=/^(?:head|last)$/.test(a),v=y[m?"take"+(a=="last"?"Right":""):a],C=m||/^find/.test(a);v&&(y.prototype[a]=function(){var R=this.__wrapped__,S=m?[1]:arguments,M=R instanceof we,N=S[0],z=M||ae(R),B=function(ge){var Ee=v.apply(y,Si([ge],S));return m&&j?Ee[0]:Ee};z&&d&&typeof N=="function"&&N.length!=1&&(M=z=!1);var j=this.__chain__,J=!!this.__actions__.length,ne=C&&!j,ce=M&&!J;if(!C&&z){R=ce?R:new we(this);var se=r.apply(R,S);return se.__actions__.push({func:Or,args:[B],thisArg:t}),new zt(se,j)}return ne&&ce?r.apply(this,S):(se=this.thru(B),ne?m?se.value()[0]:se.value():se)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(r){var a=lr[r],d=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);y.prototype[r]=function(){var v=arguments;if(m&&!this.__chain__){var C=this.value();return a.apply(ae(C)?C:[],v)}return this[d](function(R){return a.apply(ae(R)?R:[],v)})}}),ii(we.prototype,function(r,a){var d=y[a];if(d){var m=d.name+"";Te.call(An,m)||(An[m]=[]),An[m].push({name:a,func:d})}}),An[Mr(t,k).name]=[{name:"wrapper",func:t}],we.prototype.clone=m1,we.prototype.reverse=p1,we.prototype.value=g1,y.prototype.at=U_,y.prototype.chain=j_,y.prototype.commit=K_,y.prototype.next=q_,y.prototype.plant=X_,y.prototype.reverse=J_,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Z_,y.prototype.first=y.prototype.head,hs&&(y.prototype[hs]=Y_),y},Mn=KE();$i?(($i.exports=Mn)._=Mn,ua._=Mn):Ze._=Mn}).call(Hn)}(ks,ks.exports);var re=ks.exports;const Gr=n=>re.upperFirst(re.camelCase(n));function jf(n){let e=[];function t(i){for(let s in i)typeof i[s]=="object"&&i[s]!==null&&(!["schema","columns"].includes(s)&&!re.has(i[s],"schema")&&re.get(i[s],"type")!="group"?e.push({field:s,...i[s]}):t(i[s]))}return t(n),e}const{event:ri}=$t.emitter,Kf=(n="myStore")=>ml.defineStore(n,{state:()=>({mainKey:"",items:{},routes:{},fields:[],options:[],filters:[],selected:[],loadings:{},structure:{},paginations:{},isEditing:!1,panelName:!1,hiddenActions:[],isFiltering:!1}),getters:{getItems(e){return t=>re.get(e.items,t,[])},getPaginations(e){return t=>re.get(e.paginations,t,[])},mainItems(e){return re.get(e.items,e.mainKey,[])},mainPagination(e){return this.getPaginations(e.mainKey)},mainRoute(e){return re.get(e.routes,e.mainKey,"")},flatFields(e){let t=jf(e.fields);return t.unshift({title:"",type:"hidden",value:"_select_",field:"_select_",align:"center",headerSort:!1}),t},formFields(e){return e.fields},flatFieldsWithoutActions(){return this.flatFields.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))},headers(){return Jf(this.flatFields)},headersWithoutActions(){return this.headers.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(e,t){this.items[e]=t},addData(e){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey]=[e,...this.items[this.mainKey]]},editData(e){let t=this.items[this.mainKey];t=t.map(i=>i.id==e.id?{_index_:i._index_,...e}:i),this.items[this.mainKey]=[...t]},removeData(e){let t=this.items[this.mainKey];t=t.filter(i=>i.id!=e),this.items[this.mainKey]=[...t]},getModelKey(e){let t=typeof e=="string"?e.substr(e.lastIndexOf("/")+1):e.key;return this.mainKey=this.mainKey||Gr(t),Gr(t)},setPagination(e,t){t in this.paginations||(this.paginations[t]={total:0,currentPage:0,lastPage:0}),this.paginations[t].total=re.get(e,"total"),this.paginations[t].currentPage=re.get(e,"current_page"),this.paginations[t].lastPage=re.get(e,"last_page")},paginate(e){this.isFiltering?this.getWithFilter(e):this.loadItems(this.mainKey,e)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},loadItemsPlus(e=this.mainKey,t=1,i="",s=()=>{},o=!0){let l=re.get(this.routes,e,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[e]=!0;const c=re.get(this.routes,e,"")+l+t+"&"+i;Xt.get(c).then(h=>{if(h=re.get(h,"data",{}),Array.isArray(this.items[e])||(this.items[e]=[]),o)for(const f of h.data)this.items[e].push(f);else this.items[e]=h.data;this.setPagination(h,e)}).finally(()=>{s(),this.loadings[e]=!1})},loadItems(e=this.mainKey,t=1){let i=re.get(this.routes,e,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[e]=!0,this.loadings.mainLoading=e===this.mainKey;const s=re.get(this.routes,e,"")+i+t;Xt.get(s).then(o=>{o=re.get(o,"data",{}),this.items[e]=re.get(o,"data"),this.setPagination(o,e)}).finally(()=>{this.loadings[e]=!1,this.loadings.mainLoading=!1})},customLoadItems(e,t=1,i=()=>({})){this.loadings[e]=!0,i(s=>{this.items[e]=s.data,this.setPagination(s,e)},()=>{},()=>{this.loadings[e]=!1},t)},getWithFilter(e=1,t=15){const i="http://192.168.190.10:9090/api/filter";this.loadings.filter=!0,Xt.post(`${i}?page=${e}`,{model:this.mainKey,itemPerPage:t,filters:this.filters}).then(s=>{s=re.get(s,"data",{}),this.items[this.mainKey]=s.data,this.setPagination(s,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(e){this.loadings.mainLoading=!0;let t=this.routes[this.mainKey],i=pl(e,this.flatFields);Xt.post(t,i).then(async s=>{s=re.get(s,"data",{});let o=re.get(s,"data");this.addData(o),ri("alert",{text:"با موفقیت ثبت شد",color:"green"}),ri("handleDialogForm",!1)}).catch(s=>{ri("alert",{text:re.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(e){let t=this.routes[this.mainKey].split("?")[0],i=pl(e,this.flatFields);this.loadings.mainLoading=!0,Xt.patch(t+"/"+e.id,i).then(async s=>{s=re.get(s,"data",{});const o=re.get(s,"data",{});this.editData(o),ri("alert",{text:"با موفقیت ویرایش شد",color:"green"}),ri("handleDialogForm",!1)}).catch(s=>{ri("alert",{text:re.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(e){const t=Array.isArray(e)?e:[e];let i=this.routes[this.mainKey].split("?")[0];this.loadings.mainLoading=!0,t.forEach(s=>{Xt.delete(i+"/"+s).then(()=>{ri("alert",{text:"با موفقیت حذف شد",color:"green"}),ri("handleDeleteDialog",!1),this.removeData(e)}).catch(o=>{ri("alert",{text:re.get(o,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),qf=n=>Kf(n)();function pl(n,e){let t={},i=!1;for(let s in n){let o=Xf(s,e);if(!o)continue;i=!0;let l=Yf(o),c=s;re.has(o,"valueProp")&&(c+="."+re.get(o,"valueProp","")),t[l]=re.get(n,c)}return i?t:n}function Yf(n){return"sendKey"in n?n.sendKey:n.field}function Xf(n,e){return e.find(t=>t.field==n)}function Jf(n){let e=n.filter(i=>i.isHeader);e.push({title:"",value:"_actions_",field:"_actions_",type:"text",align:"left",headerSort:!1,hozAlign:"left",headerHozAlign:"left"});let t=0;return n.find(i=>i.field==="_select_"&&i.isHeader)&&(t=1),e.splice(t,0,{title:"#",type:"text",value:"_index_",field:"_index_",align:"center",headerSort:!1}),e}function Zf(n){for(const e of n)"init"in e&&e.init()}function Qf({fields:n,hiddenActions:e,options:t,route:i}){const s=qf("Store-"+Math.random*1e3);s.fields=n,$t.emitter.event("beforeFormueInit");const o=s.getModelKey(i);return s.routes[o]=typeof i=="string"?i:i==null?void 0:i.route,s.loadItems(),s.options=t,s.hiddenActions=e,Zf(s.flatFields),s}let gl={};const bl=n=>{gl=n},em=n=>{const e=re.get(gl,n);return e?u.markRaw(e):""},tm=({url:n,key:e}={url:!1,key:!1})=>async t=>{const i=o=>{let l=o.substr(o.lastIndexOf("/")+1);return Gr(l)};typeof route=="string"&&(e=i(n));const s=await Xt.get(n+"?search="+(t||""));return re.get(s,"data.data",[])},im=n=>n({getRegisterField:em,axios:Xt,get:tm,getSafe:re.get});class ct{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class Pe{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static deepClone(e,t,i=[]){var s={}.__proto__,o=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var l in e){let c=e[l],h,f;c!=null&&typeof c=="object"&&(c.__proto__===s||c.__proto__===o)&&(h=i.findIndex(p=>p.subject===c),h>-1?t[l]=i[h].copy:(f=Object.assign(Array.isArray(c)?[]:{},c),i.unshift({subject:c,copy:f}),t[l]=this.deepClone(c,f,i)))}return t}}class Ur extends ct{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let o=Pe.elOffset(this.container);i-=o.left,s-=o.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=Pe.elOffset(e),s,o,l;switch(this.container!==document.body&&(s=Pe.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":o=i.left+e.offsetWidth,l=i.top-1;break;case"bottom":o=i.left,l=i.top+e.offsetHeight;break;case"left":o=i.left,l=i.top-1;break;case"top":o=i.left,l=i.top;break;case"center":o=i.left+e.offsetWidth/2,l=i.top+e.offsetHeight/2;break}return{x:o,y:l,offset:i}}show(e,t){var i,s,o,l,c;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(o=e,c=this.elementPositionCoords(e,t),l=c.offset,i=c.x,s=c.y):typeof e=="number"?(l={top:0,left:0},i=e,s=t):(c=this.containerEventCoords(e),i=c.x,s=c.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,o,l,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",h=>{h.stopPropagation()}),this)}_fitToScreen(e,t,i,s,o){var l=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,l?this.container.scrollHeight:0))if(i)switch(o){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new Ur(this.table,e,this),this.childPopup}}class he extends ct{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Ur(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var nm={};class Zi extends he{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var o="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),l;e.definition[o]&&(l=this.lookupAccessor(e.definition[o]),l&&(t=!0,i[o]={accessor:l,params:e.definition[o+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Zi.accessors[e]?t=Zi.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),o=Pe.deepClone(e.data||{});return this.table.columnManager.traverse(function(l){var c,h,f,p;l.modules.accessor&&(h=l.modules.accessor[i]||l.modules.accessor.accessor||!1,h&&(c=l.getFieldValue(o),c!="undefined"&&(p=l.getComponent(),f=typeof h.params=="function"?h.params(c,o,t,p,s):h.params,l.setFieldValue(o,h.accessor(c,o,t,f,p,s)))))}),o}}Zi.moduleName="accessor",Zi.accessors=nm;var sm={method:"GET"};function jr(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(jr(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(jr(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}function rm(n){var e=jr(n),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function vl(n,e,t){return n&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",n+=(n.includes("?")?"&":"?")+rm(t)),n}function om(n,e,t){var i;return new Promise((s,o)=>{if(n=this.urlGenerator.call(this.table,n,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var l in i.headers)e.headers||(e.headers={}),typeof e.headers[l]>"u"&&(e.headers[l]=i.headers[l]);e.body=i.body.call(this,n,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);n?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(n,e).then(c=>{c.ok?c.json().then(h=>{s(h)}).catch(h=>{o(h),console.warn("Ajax Load Error - Invalid JSON returned",h)}):(console.error("Ajax Load Error - Connection Error: "+c.status,c.statusText),o(c))}).catch(c=>{console.error("Ajax Load Error - Connection Error: ",c),o(c)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function Kr(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(Kr(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(Kr(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var am={json:{headers:{"Content-Type":"application/json"},body:function(n,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(n,e,t){var i=Kr(t),s=new FormData;return i.forEach(function(o){s.append(o.key,o.value)}),s}}};class Gt extends he{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=Gt.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||Gt.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||Gt.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var o=this.table.options.ajaxParams;return o&&(typeof o=="function"&&(o=o.call(this.table)),s=Object.assign(s,o)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,o){var l;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),l=this.generateConfig(i),this.sendRequest(this.url,t,l)):o}setDefaultConfig(e={}){this.config=Object.assign({},Gt.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}}Gt.moduleName="ajax",Gt.defaultConfig=sm,Gt.defaultURLGenerator=vl,Gt.defaultLoaderPromise=om,Gt.contentTypeFormatters=am;var lm={replace:function(n){return this.table.setData(n)},update:function(n){return this.table.updateOrAddData(n)},insert:function(n){return this.table.addData(n)}},um={table:function(n){var e=[],t=!0,i=this.table.columnManager.columns,s=[],o=[];return n=n.split(`
|
28
|
-
`)
|
29
|
-
`)}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(s=document.body.createTextRange(),s.moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Vi.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Vi.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,s;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPaseOrigin(e){var t=!0;return(e.target.tagName!="DIV"||this.table.modules.edit.currentCell)&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}Vi.moduleName="clipboard",Vi.pasteActions=lm,Vi.pasteParsers=um;class cm{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class wl{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class In extends ct{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=s[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var o=this.column.definition.cssClass.split(" ");o.forEach(l=>{e.classList.add(l)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var s=this.setValueProcessData(e,t,i);s&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new wl(this)),this.component}}class yl{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.parent instanceof Jt?this._column.parent.getComponent():!1}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Cl={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class Jt extends ct{constructor(e,t){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((i,s)=>{var o=new Jt(i,this);this.attachColumn(o)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(Jt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Jt.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",s=>{s.stopPropagation(),i.focus()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,s=>{i.value=s||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,s=i.length,o;for(let l=0;l<s&&(t=t[i[l]],o=t,!!t);l++);return o}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,s=this.fieldStructure,o=s.length;for(let l=0;l<o;l++)if(l==o-1)i[s[l]]=t;else{if(!i[s[l]])if(typeof t<"u")i[s[l]]={};else break;i=i[s[l]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(s){s.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(s){s.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let s=0;s<i;s++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new In(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(s=>{s.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(s=>{var o=s.getWidth();o>t&&(t=o)}),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new yl(this)),this.component}}Jt.defaultOptionList=Cl;class Ss{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class nt extends ct{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach(function(s){var o=s.getHeight();o>t&&(t=o)}),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&Pe.elVisible(this.element),i={},s;return new Promise((o,l)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),s=this.chain("row-data-changing",[this,i,e],null,e);for(let c in s)this.data[c]=s[c];this.dispatch("row-data-save-after",this);for(let c in e)this.table.columnManager.getColumnsByFieldRoot(c).forEach(f=>{let p=this.getCell(f.getField());if(p){let b=f.getFieldValue(s);p.getValue()!==b&&(p.setValueProcessData(b),t&&p.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),o()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Ss(this)),this.component}}var dm={avg:function(n,e,t){var i=0,s=typeof t.precision<"u"?t.precision:2;return n.length&&(i=n.reduce(function(o,l){return Number(o)+Number(l)}),i=i/n.length,i=s!==!1?i.toFixed(s):i),parseFloat(i).toString()},max:function(n,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(o){o=Number(o),(o>i||i===null)&&(i=o)}),i!==null?s!==!1?i.toFixed(s):i:""},min:function(n,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(o){o=Number(o),(o<i||i===null)&&(i=o)}),i!==null?s!==!1?i.toFixed(s):i:""},sum:function(n,e,t){var i=0,s=typeof t.precision<"u"?t.precision:!1;return n.length&&n.forEach(function(o){o=Number(o),i+=isNaN(o)?0:Number(o)}),s!==!1?i.toFixed(s):i},concat:function(n,e,t){var i=0;return n.length&&(i=n.reduce(function(s,o){return String(s)+String(o)})),i},count:function(n,e,t){var i=0;return n.length&&n.forEach(function(s){s&&i++}),i},unique:function(n,e,t){var i=n.filter((s,o)=>(n||s===0)&&n.indexOf(s)===o);return i.length}};class yi extends he{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new Jt({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":yi.calculations[t.topCalc]?i.topCalc=yi.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":yi.calculations[t.bottomCalc]?i.botCalc=yi.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){this.topInitialized||(this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[];return e.forEach(i=>{if(t.push(i.getData()),this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs&&i.modules.dataTree&&i.modules.dataTree.open){var s=this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(i));t=t.concat(s)}}),t}generateRow(e,t){var i=this.generateRowData(e,t),s;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),s=new nt(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),s.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),s.component=!1,s.getComponent=()=>(s.component||(s.component=new cm(s)),s.component),s.generateCells=()=>{var o=[];this.table.columnManager.columnsByIndex.forEach(l=>{this.genColumn.setField(l.getField()),this.genColumn.hozAlign=l.hozAlign,l.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(l.definition[e+"CalcFormatter"]),params:l.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=l.definition.cssClass;var c=new In(this.genColumn,s);c.getElement(),c.column=l,c.setWidth(),l.cells.push(c),o.push(c),l.visible||c.hide()}),s.cells=o},s}generateRowData(e,t){var i={},s=e=="top"?this.topCalcs:this.botCalcs,o=e=="top"?"topCalc":"botCalc",l,c;return s.forEach(function(h){var f=[];h.modules.columnCalcs&&h.modules.columnCalcs[o]&&(t.forEach(function(p){f.push(h.getFieldValue(p))}),c=o+"Params",l=typeof h.modules.columnCalcs[c]=="function"?h.modules.columnCalcs[c](f,t):h.modules.columnCalcs[c],h.setFieldValue(i,h.modules.columnCalcs[o](f,t,l)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={},o={};return i.forEach(l=>{s[l.getKey()]=this.getGroupResults(l)}),o={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s},o}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}yi.moduleName="columnCalcs",yi.calculations=dm;class El extends he{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,s){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,s){return t.dataTreeStartExpanded[s]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&typeof t=="object"&&t!==null;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:s?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&s?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&s?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:s}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),s=e.modules.dataTree;s.branchEl&&(s.branchEl.parentNode&&s.branchEl.parentNode.removeChild(s.branchEl),s.branchEl=!1),s.controlEl&&(s.controlEl.parentNode&&s.controlEl.parentNode.removeChild(s.controlEl),s.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+s.index),s.index&&(this.branchEl?(s.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(s.branchEl,i.firstChild),this.table.rtl?s.branchEl.style.marginRight=(s.branchEl.offsetWidth+s.branchEl.style.marginLeft)*(s.index-1)+s.index*this.indent+"px":s.branchEl.style.marginLeft=(s.branchEl.offsetWidth+s.branchEl.style.marginRight)*(s.index-1)+s.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+s.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+s.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",o=>{o.stopPropagation()}),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,s)=>{var o,l;t.push(i),i instanceof nt&&(i.create(),o=i.modules.dataTree,!o.index&&o.children!==!1&&(l=this.getChildren(i),l.forEach(c=>{c.create(),t.push(c)})))}),t}getChildren(e,t){var i=e.modules.dataTree,s=[],o=[];return i.children!==!1&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(i.children):s=i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s),s.forEach(l=>{o.push(l);var c=this.getChildren(l);c.forEach(h=>{o.push(h)})})),o}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(s=>{var o=new nt(s||{},this.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=this.startOpen(o.getComponent(),o.modules.dataTree.index)),t.push(o)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],s;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(t.children):s=t.children,s.forEach(o=>{o instanceof nt&&i.push(o)})),i}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var o=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof s<"u"&&(o=this.findChildIndex(s,e),o!==!1&&e.data[this.field].splice(i?o:o+1,0,t)),o===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof nt?i=e.data:e instanceof Ss?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(s=>s instanceof nt?s.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(s=>s.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,o=[];return s&&s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach(l=>{l instanceof nt&&(o.push(t?l.getComponent():l),i&&(o=o.concat(this.getTreeChildren(l,t,i))))})),o}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}El.moduleName="dataTree";function hm(n,e={},t){var i=e.delimiter?e.delimiter:",",s=[],o=[];n.forEach(l=>{var c=[];switch(l.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":l.columns.forEach((h,f)=>{h&&h.depth===1&&(o[f]=typeof h.value>"u"||h.value===null?"":'"'+String(h.value).split('"').join('""')+'"')});break;case"row":l.columns.forEach(h=>{if(h){switch(typeof h.value){case"object":h.value=h.value!==null?JSON.stringify(h.value):"";break;case"undefined":h.value="";break}c.push('"'+String(h.value).split('"').join('""')+'"')}}),s.push(c.join(i));break}}),o.length&&s.unshift(o.join(i)),s=s.join(`
|
30
|
-
`),e.bom&&(s="\uFEFF"+s),t(s,"text/csv")}function fm(n,e,t){var i=[];n.forEach(s=>{var o={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(l=>{l&&(o[l.component.getTitleDownload()||l.component.getField()]=l.value)}),i.push(o);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function mm(n,e={},t){var i=[],s=[],o={},l=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},c=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},h=e.jsPDF||{},f=e.title?e.title:"";h.orientation||(h.orientation=e.orientation||"landscape"),h.unit||(h.unit="pt"),n.forEach(g=>{switch(g.type){case"header":i.push(p(g));break;case"group":s.push(p(g,l));break;case"calc":s.push(p(g,c));break;case"row":s.push(p(g));break}});function p(g,w){var E=[];return g.columns.forEach(x=>{var _;if(x){switch(typeof x.value){case"object":x.value=x.value!==null?JSON.stringify(x.value):"";break;case"undefined":x.value="";break}_={content:x.value,colSpan:x.width,rowSpan:x.height},w&&(_.styles=w),E.push(_)}}),E}var b=new jspdf.jsPDF(h);e.autoTable&&(typeof e.autoTable=="function"?o=e.autoTable(b)||{}:o=e.autoTable),f&&(o.didDrawPage=function(g){b.text(f,40,30)}),o.head=i,o.body=s,b.autoTable(o),e.documentProcessing&&e.documentProcessing(b),t(b.output("arraybuffer"),"application/pdf")}function pm(n,e,t){var i=this,s=e.sheetName||"Sheet1",o=XLSX.utils.book_new(),l=new ct(this),c="compress"in e?e.compress:!0,h=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:c},f;h.type="binary",o.SheetNames=[],o.Sheets={};function p(){var w=[],E=[],x={},_={s:{c:0,r:0},e:{c:n[0]?n[0].columns.reduce((k,V)=>k+(V&&V.width?V.width:1),0):0,r:n.length}};return n.forEach((k,V)=>{var L=[];k.columns.forEach(function(F,H){F?(L.push(!(F.value instanceof Date)&&typeof F.value=="object"?JSON.stringify(F.value):F.value),(F.width>1||F.height>-1)&&(F.height>1||F.width>1)&&E.push({s:{r:V,c:H},e:{r:V+F.height-1,c:H+F.width-1}})):L.push("")}),w.push(L)}),XLSX.utils.sheet_add_aoa(x,w),x["!ref"]=XLSX.utils.encode_range(_),E.length&&(x["!merges"]=E),x}if(e.sheetOnly){t(p());return}if(e.sheets)for(var b in e.sheets)e.sheets[b]===!0?(o.SheetNames.push(b),o.Sheets[b]=p()):(o.SheetNames.push(b),l.commsSend(e.sheets[b],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(w){o.Sheets[b]=w}}));else o.SheetNames.push(s),o.Sheets[s]=p();e.documentProcessing&&(o=e.documentProcessing(o));function g(w){for(var E=new ArrayBuffer(w.length),x=new Uint8Array(E),_=0;_!=w.length;++_)x[_]=w.charCodeAt(_)&255;return E}f=XLSX.write(o,h),t(g(f),"application/octet-stream")}function gm(n,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(n),"text/html")}function bm(n,e,t){const i=[];n.forEach(s=>{const o={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(l=>{l&&(o[l.component.getTitleDownload()||l.component.getField()]=l.value)}),i.push(JSON.stringify(o));break}}),t(i.join(`
|
31
|
-
`),"application/x-ndjson")}var vm={csv:hm,json:fm,jsonLines:bm,pdf:mm,xlsx:pm,html:gm};class Qi extends he{constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}downloadToTab(e,t,i,s){this.download(e,t,i,s,!0)}download(e,t,i,s,o){var l=!1;function c(f,p){o?o===!0?this.triggerDownload(f,p,e,t,!0):o(f):this.triggerDownload(f,p,e,t)}if(typeof e=="function"?l=e:Qi.downloaders[e]?l=Qi.downloaders[e]:console.warn("Download Error - No such download type found: ",e),l){var h=this.generateExportList(s);l.call(this.table,h,i||{},c.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(s=>{var o;s.type==="group"&&(o=s.columns[0],i&&i[s.indent]&&(o.value=i[s.indent](o.value,s.component._group.getRowCount(),s.component._group.getData(),s.component)))}),t}triggerDownload(e,t,i,s,o){var l=document.createElement("a"),c=this.table.options.downloadEncoder(e,t);c&&(o?window.open(window.URL.createObjectURL(c)):(s=s||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(c,s):(l.setAttribute("href",window.URL.createObjectURL(c)),l.setAttribute("download",s),l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}Qi.moduleName="download",Qi.downloaders=vm;function Ts(n,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",s=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",o=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function l(c){var h=t[c];typeof h<"u"&&h!==o&&h!==i&&h!==s&&(n.value=n.value+""+h,l(c+1))}n.addEventListener("keydown",c=>{var h=n.value.length,f=c.key;if(c.keyCode>46&&!c.ctrlKey&&!c.metaKey){if(h>=t.length)return c.preventDefault(),c.stopPropagation(),!1;switch(t[h]){case i:if(f.toUpperCase()==f.toLowerCase())return c.preventDefault(),c.stopPropagation(),!1;break;case s:if(isNaN(f))return c.preventDefault(),c.stopPropagation(),!1;break;case o:break;default:if(f!==t[h])return c.preventDefault(),c.stopPropagation(),!1}}}),n.addEventListener("keyup",c=>{c.keyCode>46&&e.maskAutoFill&&l(n.value.length)}),n.placeholder||(n.placeholder=t),e.maskAutoFill&&l(n.value.length)}function wm(n,e,t,i,s){var o=n.getValue(),l=document.createElement("input");if(l.setAttribute("type",s.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let h in s.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),l.setAttribute(h,l.getAttribute(h)+s.elementAttributes["+"+h])):l.setAttribute(h,s.elementAttributes[h]);l.value=typeof o<"u"?o:"",e(function(){n.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%",s.selectContents&&l.select())});function c(h){(o===null||typeof o>"u")&&l.value!==""||l.value!==o?t(l.value)&&(o=l.value):i()}return l.addEventListener("change",c),l.addEventListener("blur",c),l.addEventListener("keydown",function(h){switch(h.keyCode){case 13:c();break;case 27:i();break;case 35:case 36:h.stopPropagation();break}}),s.mask&&Ts(l,s),l}function ym(n,e,t,i,s){var o=n.getValue(),l=s.verticalNavigation||"hybrid",c=String(o!==null&&typeof o<"u"?o:""),h=document.createElement("textarea"),f=0;if(h.style.display="block",h.style.padding="2px",h.style.height="100%",h.style.width="100%",h.style.boxSizing="border-box",h.style.whiteSpace="pre-wrap",h.style.resize="none",s.elementAttributes&&typeof s.elementAttributes=="object")for(let b in s.elementAttributes)b.charAt(0)=="+"?(b=b.slice(1),h.setAttribute(b,h.getAttribute(b)+s.elementAttributes["+"+b])):h.setAttribute(b,s.elementAttributes[b]);h.value=c,e(function(){n.getType()==="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",h.scrollHeight,h.style.height=h.scrollHeight+"px",n.getRow().normalizeHeight(),s.selectContents&&h.select())});function p(b){(o===null||typeof o>"u")&&h.value!==""||h.value!==o?(t(h.value)&&(o=h.value),setTimeout(function(){n.getRow().normalizeHeight()},300)):i()}return h.addEventListener("change",p),h.addEventListener("blur",p),h.addEventListener("keyup",function(){h.style.height="";var b=h.scrollHeight;h.style.height=b+"px",b!=f&&(f=b,n.getRow().normalizeHeight())}),h.addEventListener("keydown",function(b){switch(b.keyCode){case 13:b.shiftKey&&s.shiftEnterSubmit&&p();break;case 27:i();break;case 38:(l=="editor"||l=="hybrid"&&h.selectionStart)&&(b.stopImmediatePropagation(),b.stopPropagation());break;case 40:(l=="editor"||l=="hybrid"&&h.selectionStart!==h.value.length)&&(b.stopImmediatePropagation(),b.stopPropagation());break;case 35:case 36:b.stopPropagation();break}}),s.mask&&Ts(h,s),h}function Cm(n,e,t,i,s){var o=n.getValue(),l=s.verticalNavigation||"editor",c=document.createElement("input");if(c.setAttribute("type","number"),typeof s.max<"u"&&c.setAttribute("max",s.max),typeof s.min<"u"&&c.setAttribute("min",s.min),typeof s.step<"u"&&c.setAttribute("step",s.step),c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let p in s.elementAttributes)p.charAt(0)=="+"?(p=p.slice(1),c.setAttribute(p,c.getAttribute(p)+s.elementAttributes["+"+p])):c.setAttribute(p,s.elementAttributes[p]);c.value=o;var h=function(p){f()};e(function(){n.getType()==="cell"&&(c.removeEventListener("blur",h),c.focus({preventScroll:!0}),c.style.height="100%",c.addEventListener("blur",h),s.selectContents&&c.select())});function f(){var p=c.value;!isNaN(p)&&p!==""&&(p=Number(p)),p!==o?t(p)&&(o=p):i()}return c.addEventListener("keydown",function(p){switch(p.keyCode){case 13:f();break;case 27:i();break;case 38:case 40:l=="editor"&&(p.stopImmediatePropagation(),p.stopPropagation());break;case 35:case 36:p.stopPropagation();break}}),s.mask&&Ts(c,s),c}function Em(n,e,t,i,s){var o=n.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),typeof s.max<"u"&&l.setAttribute("max",s.max),typeof s.min<"u"&&l.setAttribute("min",s.min),typeof s.step<"u"&&l.setAttribute("step",s.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let h in s.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),l.setAttribute(h,l.getAttribute(h)+s.elementAttributes["+"+h])):l.setAttribute(h,s.elementAttributes[h]);l.value=o,e(function(){n.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%")});function c(){var h=l.value;!isNaN(h)&&h!==""&&(h=Number(h)),h!=o?t(h)&&(o=h):i()}return l.addEventListener("blur",function(h){c()}),l.addEventListener("keydown",function(h){switch(h.keyCode){case 13:c();break;case 27:i();break}}),l}function xm(n,e,t,i,s){var o=s.format,l=s.verticalNavigation||"editor",c=o?window.DateTime||luxon.DateTime:null,h=n.getValue(),f=document.createElement("input");function p(g){var w;return c.isDateTime(g)?w=g:o==="iso"?w=c.fromISO(String(g)):w=c.fromFormat(String(g),o),w.toFormat("yyyy-MM-dd")}if(f.type="date",f.style.padding="4px",f.style.width="100%",f.style.boxSizing="border-box",s.max&&f.setAttribute("max",o?p(s.max):s.max),s.min&&f.setAttribute("min",o?p(s.min):s.min),s.elementAttributes&&typeof s.elementAttributes=="object")for(let g in s.elementAttributes)g.charAt(0)=="+"?(g=g.slice(1),f.setAttribute(g,f.getAttribute(g)+s.elementAttributes["+"+g])):f.setAttribute(g,s.elementAttributes[g]);h=typeof h<"u"?h:"",o&&(c?h=p(h):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),f.value=h,e(function(){n.getType()==="cell"&&(f.focus({preventScroll:!0}),f.style.height="100%",s.selectContents&&f.select())});function b(){var g=f.value,w;if((h===null||typeof h>"u")&&g!==""||g!==h){if(g&&o)switch(w=c.fromFormat(String(g),"yyyy-MM-dd"),o){case!0:g=w;break;case"iso":g=w.toISO();break;default:g=w.toFormat(o)}t(g)&&(h=f.value)}else i()}return f.addEventListener("blur",function(g){(g.relatedTarget||g.rangeParent||g.explicitOriginalTarget!==f)&&b()}),f.addEventListener("keydown",function(g){switch(g.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:g.stopPropagation();break;case 38:case 40:l=="editor"&&(g.stopImmediatePropagation(),g.stopPropagation());break}}),f}function _m(n,e,t,i,s){var o=s.format,l=s.verticalNavigation||"editor",c=o?window.DateTime||luxon.DateTime:null,h,f=n.getValue(),p=document.createElement("input");if(p.type="time",p.style.padding="4px",p.style.width="100%",p.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let g in s.elementAttributes)g.charAt(0)=="+"?(g=g.slice(1),p.setAttribute(g,p.getAttribute(g)+s.elementAttributes["+"+g])):p.setAttribute(g,s.elementAttributes[g]);f=typeof f<"u"?f:"",o&&(c?(c.isDateTime(f)?h=f:o==="iso"?h=c.fromISO(String(f)):h=c.fromFormat(String(f),o),f=h.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),p.value=f,e(function(){n.getType()=="cell"&&(p.focus({preventScroll:!0}),p.style.height="100%",s.selectContents&&p.select())});function b(){var g=p.value,w;if((f===null||typeof f>"u")&&g!==""||g!==f){if(g&&o)switch(w=c.fromFormat(String(g),"hh:mm"),o){case!0:g=w;break;case"iso":g=w.toISO();break;default:g=w.toFormat(o)}t(g)&&(f=p.value)}else i()}return p.addEventListener("blur",function(g){(g.relatedTarget||g.rangeParent||g.explicitOriginalTarget!==p)&&b()}),p.addEventListener("keydown",function(g){switch(g.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:g.stopPropagation();break;case 38:case 40:l=="editor"&&(g.stopImmediatePropagation(),g.stopPropagation());break}}),p}function Rm(n,e,t,i,s){var o=s.format,l=s.verticalNavigation||"editor",c=o?window.DateTime||luxon.DateTime:null,h,f=n.getValue(),p=document.createElement("input");if(p.type="datetime-local",p.style.padding="4px",p.style.width="100%",p.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let g in s.elementAttributes)g.charAt(0)=="+"?(g=g.slice(1),p.setAttribute(g,p.getAttribute(g)+s.elementAttributes["+"+g])):p.setAttribute(g,s.elementAttributes[g]);f=typeof f<"u"?f:"",o&&(c?(c.isDateTime(f)?h=f:o==="iso"?h=c.fromISO(String(f)):h=c.fromFormat(String(f),o),f=h.toFormat("yyyy-MM-dd")+"T"+h.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),p.value=f,e(function(){n.getType()==="cell"&&(p.focus({preventScroll:!0}),p.style.height="100%",s.selectContents&&p.select())});function b(){var g=p.value,w;if((f===null||typeof f>"u")&&g!==""||g!==f){if(g&&o)switch(w=c.fromISO(String(g)),o){case!0:g=w;break;case"iso":g=w.toISO();break;default:g=w.toFormat(o)}t(g)&&(f=p.value)}else i()}return p.addEventListener("blur",function(g){(g.relatedTarget||g.rangeParent||g.explicitOriginalTarget!==p)&&b()}),p.addEventListener("keydown",function(g){switch(g.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:g.stopPropagation();break;case 38:case 40:l=="editor"&&(g.stopImmediatePropagation(),g.stopPropagation());break}}),p}class qr{constructor(e,t,i,s,o,l){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(l),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:s,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&Ts(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(s=>t.includes(s)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(s=>typeof s.label<"u"&&s.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(s=>this.listIteration===i?this._parseList(s):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=vl(e,{},i),fetch(e).then(s=>s.ok?s.json().catch(o=>(console.warn("List Ajax Load Error - Invalid JSON returned",o),Promise.reject(o))):(console.error("List Ajax Load Error - Connection Error: "+s.status,s.statusText),Promise.reject(s))).catch(s=>(console.error("List Ajax Load Error - Connection Error: ",s),Promise.reject(s)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),s;return e?s=this.table.columnManager.getColumnByField(e):s=this.cell.getColumn()._getSelf(),s?i.forEach(o=>{var l=s.getFieldValue(o);l!==null&&typeof l<"u"&&l!==""&&(t[l]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,s])=>({label:s,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(s=>{this._parseListItem(s,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,s)=>e(i.label,s.label,i.value,s.value,i.original,s.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,s,o,l,c=0,h,f=/(\d+)|(\D+)/g,p=/\d/,b=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)b=!t&&t!==0?0:-1;else if(!t&&t!==0)b=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),s=String(t).toLowerCase(),i===s)return 0;if(!(p.test(i)&&p.test(s)))return i>s?1:-1;for(i=i.match(f),s=s.match(f),h=i.length>s.length?s.length:i.length;c<h;)if(o=i[c],l=s[c++],o!==l)return isFinite(o)&&isFinite(l)?(o.charAt(0)==="0"&&(o="."+o),l.charAt(0)==="0"&&(l="."+l),o-l):o>l?1:-1;return i.length>s.length}return b}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach(o=>{this._filterItem(e,t,o)&&(s=!0)}),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let s in e.elementAttributes)s.charAt(0)=="+"?(s=s.slice(1),t.setAttribute(s,this.input.getAttribute(s)+e.elementAttributes["+"+s])):t.setAttribute(s,e.elementAttributes[s]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(s=>{this._buildItem(s)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(s=>s.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(s=>s.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}function km(n,e,t,i,s){this.deprecationMsg("The select editor has been deprecated, please use the new list editor");var o=new qr(this,n,e,t,i,s);return o.input}function Sm(n,e,t,i,s){var o=new qr(this,n,e,t,i,s);return o.input}function Tm(n,e,t,i,s){this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),s.autocomplete=!0;var o=new qr(this,n,e,t,i,s);return o.input}function Mm(n,e,t,i,s){var o=this,l=n.getElement(),c=n.getValue(),h=l.getElementsByTagName("svg").length||5,f=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,p=[],b=document.createElement("div"),g=document.createElementNS("http://www.w3.org/2000/svg","svg");function w(k){p.forEach(function(V,L){L<k?(o.table.browser=="ie"?V.setAttribute("class","tabulator-star-active"):V.classList.replace("tabulator-star-inactive","tabulator-star-active"),V.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(o.table.browser=="ie"?V.setAttribute("class","tabulator-star-inactive"):V.classList.replace("tabulator-star-active","tabulator-star-inactive"),V.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function E(k){var V=document.createElement("span"),L=g.cloneNode(!0);p.push(L),V.addEventListener("mouseenter",function(F){F.stopPropagation(),F.stopImmediatePropagation(),w(k)}),V.addEventListener("mousemove",function(F){F.stopPropagation(),F.stopImmediatePropagation()}),V.addEventListener("click",function(F){F.stopPropagation(),F.stopImmediatePropagation(),t(k),l.blur()}),V.appendChild(L),b.appendChild(V)}function x(k){c=k,w(k)}if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",b.style.verticalAlign="middle",b.style.display="inline-block",b.style.padding="4px",g.setAttribute("width",f),g.setAttribute("height",f),g.setAttribute("viewBox","0 0 512 512"),g.setAttribute("xml:space","preserve"),g.style.padding="0 1px",s.elementAttributes&&typeof s.elementAttributes=="object")for(let k in s.elementAttributes)k.charAt(0)=="+"?(k=k.slice(1),b.setAttribute(k,b.getAttribute(k)+s.elementAttributes["+"+k])):b.setAttribute(k,s.elementAttributes[k]);for(var _=1;_<=h;_++)E(_);return c=Math.min(parseInt(c),h),w(c),b.addEventListener("mousemove",function(k){w(0)}),b.addEventListener("click",function(k){t(0)}),l.addEventListener("blur",function(k){i()}),l.addEventListener("keydown",function(k){switch(k.keyCode){case 39:x(c+1);break;case 37:x(c-1);break;case 13:t(c);break;case 27:i();break}}),b}function Lm(n,e,t,i,s){var o=n.getElement(),l=typeof s.max>"u"?o.getElementsByTagName("div")[0]&&o.getElementsByTagName("div")[0].getAttribute("max")||100:s.max,c=typeof s.min>"u"?o.getElementsByTagName("div")[0]&&o.getElementsByTagName("div")[0].getAttribute("min")||0:s.min,h=(l-c)/100,f=n.getValue()||0,p=document.createElement("div"),b=document.createElement("div"),g,w;function E(){var x=window.getComputedStyle(o,null),_=h*Math.round(b.offsetWidth/((o.clientWidth-parseInt(x.getPropertyValue("padding-left"))-parseInt(x.getPropertyValue("padding-right")))/100))+c;t(_),o.setAttribute("aria-valuenow",_),o.setAttribute("aria-label",f)}if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),b.style.display="inline-block",b.style.position="relative",b.style.height="100%",b.style.backgroundColor="#488CE9",b.style.maxWidth="100%",b.style.minWidth="0%",s.elementAttributes&&typeof s.elementAttributes=="object")for(let x in s.elementAttributes)x.charAt(0)=="+"?(x=x.slice(1),b.setAttribute(x,b.getAttribute(x)+s.elementAttributes["+"+x])):b.setAttribute(x,s.elementAttributes[x]);return o.style.padding="4px 4px",f=Math.min(parseFloat(f),l),f=Math.max(parseFloat(f),c),f=Math.round((f-c)/h),b.style.width=f+"%",o.setAttribute("aria-valuemin",c),o.setAttribute("aria-valuemax",l),b.appendChild(p),p.addEventListener("mousedown",function(x){g=x.screenX,w=b.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),o.addEventListener("mousemove",function(x){g&&(b.style.width=w+x.screenX-g+"px")}),o.addEventListener("mouseup",function(x){g&&(x.stopPropagation(),x.stopImmediatePropagation(),g=!1,w=!1,E())}),o.addEventListener("keydown",function(x){switch(x.keyCode){case 39:x.preventDefault(),b.style.width=b.clientWidth+o.clientWidth/100+"px";break;case 37:x.preventDefault(),b.style.width=b.clientWidth-o.clientWidth/100+"px";break;case 9:case 13:E();break;case 27:i();break}}),o.addEventListener("blur",function(){i()}),b}function Dm(n,e,t,i,s){var o=n.getValue(),l=document.createElement("input"),c=s.tristate,h=typeof s.indeterminateValue>"u"?null:s.indeterminateValue,f=!1,p=Object.keys(s).includes("trueValue"),b=Object.keys(s).includes("falseValue");if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let w in s.elementAttributes)w.charAt(0)=="+"?(w=w.slice(1),l.setAttribute(w,l.getAttribute(w)+s.elementAttributes["+"+w])):l.setAttribute(w,s.elementAttributes[w]);l.value=o,c&&(typeof o>"u"||o===h||o==="")&&(f=!0,l.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){n.getType()==="cell"&&l.focus({preventScroll:!0})}),l.checked=p?o===s.trueValue:o===!0||o==="true"||o==="True"||o===1;function g(w){var E=l.checked;return p&&E?E=s.trueValue:b&&!E&&(E=s.falseValue),c?w?f?h:E:l.checked&&!f?(l.checked=!1,l.indeterminate=!0,f=!0,h):(f=!1,E):E}return l.addEventListener("change",function(w){t(g())}),l.addEventListener("blur",function(w){t(g(!0))}),l.addEventListener("keydown",function(w){w.keyCode==13&&t(g()),w.keyCode==27&&i()}),l}var Am={input:wm,textarea:ym,number:Cm,range:Em,date:xm,time:_m,datetime:Rm,select:km,list:Sm,autocomplete:Tm,star:Mm,progress:Lm,tickCross:Dm};class Bn extends he{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=Bn.editors,this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})})))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(s=this.table.rowManager.prevDisplayRow(e.row,!0),s&&(i=this.findPrevEditableCell(s,s.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(s=this.table.rowManager.nextDisplayRow(e.row,!0),s&&(i=this.findNextEditableCell(s,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findPrevEditableCell(e.row,i),s)?(s.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findNextEditableCell(e.row,i),s)?(s.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.prevDisplayRow(e.row,!0),s)?(s.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.nextDisplayRow(e.row,!0),s)?(s.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var s=t+1;s<e.cells.length;s++){let o=e.cells[s];if(o.column.modules.edit&&Pe.elVisible(o.getElement())&&this.allowEdit(o)){i=o;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var s=t-1;s>=0;s--){let o=e.cells[s];if(o.column.modules.edit&&Pe.elVisible(o.getElement())&&this.allowEdit(o)){i=o;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(typeof e.definition.editor){case"string":this.editors[e.definition.editor]?t.editor=this.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":t.editor=e.definition.editor;break;case"boolean":e.definition.editor===!0&&(typeof e.definition.formatter!="function"?this.editors[e.definition.formatter]?t.editor=this.editors[e.definition.formatter]:t.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter));break}t.editor&&(e.modules.edit=t)}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("click",function(s){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(s){s.button===2?s.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(s){t.recursionBlock||t.edit(e,s,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,s=e.row.getElement();s.offsetTop<t?this.table.rowManager.element.scrollTop-=t-s.offsetTop:s.offsetTop+s.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=s.offsetTop+s.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,l=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,c=e.getElement();this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin||0),l-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),l-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),c.offsetLeft<o?this.table.rowManager.element.scrollLeft-=o-c.offsetLeft:c.offsetLeft+c.offsetWidth>l&&(this.table.rowManager.element.scrollLeft+=c.offsetLeft+c.offsetWidth-l)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var s=this,o=!0,l=function(){},c=e.getElement(),h,f,p;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function b(_){if(s.currentCell===e){var k=s.chain("edit-success",[e,_],!0,!0);return k===!0||s.table.options.validationMode==="highlight"?(s.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,s.editedCells.indexOf(e)==-1&&s.editedCells.push(e),e.setValue(_,!0),k===!0):(s.invalidEdit=!0,s.focusCellNoEvent(e,!0),l(),!1)}}function g(){s.currentCell===e&&s.cancelEdit()}function w(_){l=_}if(e.column.modules.edit.blocked)return this.mouseClick=!1,c.blur(),!1;if(t&&t.stopPropagation(),o=this.allowEdit(e),o||i){if(s.cancelEdit(),s.currentCell=e,this.focusScrollAdjust(e),f=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,f)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,f),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",f),p=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(f):e.column.modules.edit.params,h=e.column.modules.edit.editor.call(s,f,w,b,g,p),this.currentCell&&h!==!1)if(h instanceof Node){for(c.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");c.firstChild;)c.removeChild(c.firstChild);c.appendChild(h),l();for(var E=c.children,x=0;x<E.length;x++)E[x].addEventListener("click",function(_){_.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",h),c.blur(),!1;else return c.blur(),!1;return!0}else return this.mouseClick=!1,c.blur(),!1}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}Bn.moduleName="edit",Bn.editors=Am;class xl{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class Yr{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class _l extends he{constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,s){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=s;var o=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders()):[],l=this.bodyToExportRows(this.rowLookup(i));return o.concat(l)}generateTable(e,t,i,s){var o=this.generateExportList(e,t,i,s);return this.generateTableElement(o)}rowLookup(e){var t=[];if(typeof e=="function")e.call(this.table).forEach(i=>{i=this.table.rowManager.findRow(i),i&&t.push(i)});else switch(e){case!0:case"visible":t=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":t=this.table.rowManager.rows;break;case"selected":t=this.table.modules.selectRow.selectedRows;break;case"active":default:this.table.options.pagination?t=this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):t=this.table.rowManager.getDisplayRows()}return Object.assign([],t)}generateColumnGroupHeaders(){var e=[],t=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex;return t.forEach(i=>{var s=this.processColumnGroup(i);s&&e.push(s)}),e}processColumnGroup(e){var t=e.columns,i=0,s=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,o={title:s,column:e,depth:1};if(t.length){if(o.subGroups=[],o.width=0,t.forEach(l=>{var c=this.processColumnGroup(l);c&&(o.width+=c.width,o.subGroups.push(c),c.depth>i&&(i=c.depth))}),o.depth+=i,!o.width)return!1}else if(this.columnVisCheck(e))o.width=1;else return!1;return o}columnVisCheck(e){var t=e.definition[this.colVisProp];return typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t!==!1&&(e.visible||!e.visible&&t)}headersToExportRows(e){var t=[],i=0,s=[];function o(l,c){var h=i-c;if(typeof t[c]>"u"&&(t[c]=[]),l.height=l.subGroups?1:h-l.depth+1,t[c].push(l),l.height>1)for(let f=1;f<l.height;f++)typeof t[c+f]>"u"&&(t[c+f]=[]),t[c+f].push(!1);if(l.width>1)for(let f=1;f<l.width;f++)t[c].push(!1);l.subGroups&&l.subGroups.forEach(function(f){o(f,c+1)})}return e.forEach(function(l){l.depth>i&&(i=l.depth)}),e.forEach(function(l){o(l,0)}),t.forEach(l=>{var c=[];l.forEach(h=>{if(h){let f=typeof h.title>"u"?"":h.title;c.push(new Yr(f,h.column.getComponent(),h.width,h.height,h.depth))}else c.push(null)}),s.push(new xl("header",c))}),s}bodyToExportRows(e){var t=[],i=[];return this.table.columnManager.columnsByIndex.forEach(s=>{this.columnVisCheck(s)&&t.push(s.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(s=>{switch(s.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&s.modules.dataTree.parent)}return!0}),e.forEach((s,o)=>{var l=s.getData(this.colVisProp),c=[],h=0;switch(s.type){case"group":h=s.level,c.push(new Yr(s.key,s.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(f=>{c.push(new Yr(f._column.getFieldValue(l),f,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(h=s.modules.dataTree.index);break}i.push(new xl(s.type,c,s.getComponent(),h))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),s=document.createElement("tbody"),o=this.lookupTableStyles(),l=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],c={};return c.rowFormatter=l!==null?l:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(c.treeElementField=this.table.modules.dataTree.elementField),c.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],c.groupHeader&&!Array.isArray(c.groupHeader)&&(c.groupHeader=[c.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((h,f)=>{let p;switch(h.type){case"header":i.appendChild(this.generateHeaderElement(h,c,o));break;case"group":s.appendChild(this.generateGroupElement(h,c,o));break;case"calc":s.appendChild(this.generateCalcElement(h,c,o));break;case"row":p=this.generateRowElement(h,c,o),this.mapElementStyles(f%2&&o.evenRow?o.evenRow:o.oddRow,p,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s.appendChild(p);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(s),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var s=document.createElement("tr");return e.columns.forEach(o=>{if(o){var l=document.createElement("th"),c=o.component._column.definition.cssClass?o.component._column.definition.cssClass.split(" "):[];l.colSpan=o.width,l.rowSpan=o.height,l.innerHTML=o.value,this.cloneTableStyle&&(l.style.boxSizing="border-box"),c.forEach(function(h){l.classList.add(h)}),this.mapElementStyles(o.component.getElement(),l,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(o.component._column.contentElement,l,["padding-top","padding-left","padding-right","padding-bottom"]),o.component._column.visible?this.mapElementStyles(o.component.getElement(),l,["width"]):o.component._column.definition.width&&(l.style.width=o.component._column.definition.width+"px"),o.component._column.parent&&this.mapElementStyles(o.component._column.parent.groupElement,l,["border-top"]),s.appendChild(l)}}),s}generateGroupElement(e,t,i){var s=document.createElement("tr"),o=document.createElement("td"),l=e.columns[0];return s.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?l.value=t.groupHeader[e.indent](l.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(l.value=e.component._group.generator(l.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),o.colSpan=l.width,o.innerHTML=l.value,s.classList.add("tabulator-print-table-group"),s.classList.add("tabulator-group-level-"+e.indent),l.component.isVisible()&&s.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),s.appendChild(o),s}generateCalcElement(e,t,i){var s=this.generateRowElement(e,t,i);return s.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s}generateRowElement(e,t,i){var s=document.createElement("tr");if(s.classList.add("tabulator-print-table-row"),e.columns.forEach((o,l)=>{if(o){var c=document.createElement("td"),h=o.component._column,f=this.table.columnManager.findColumnIndex(h),p=o.value,b,g={modules:{},getValue:function(){return p},getField:function(){return h.definition.field},getElement:function(){return c},getType:function(){return"cell"},getColumn:function(){return h.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return g},column:h},w=h.definition.cssClass?h.definition.cssClass.split(" "):[];if(w.forEach(function(E){c.classList.add(E)}),this.table.modExists("format")&&this.config.formatCells!==!1)p=this.table.modules.format.formatExportValue(g,this.colVisProp);else switch(typeof p){case"object":p=p!==null?JSON.stringify(p):"";break;case"undefined":p="";break}p instanceof Node?c.appendChild(p):c.innerHTML=p,b=i.styleCells&&i.styleCells[f]?i.styleCells[f]:i.firstCell,b&&(this.mapElementStyles(b,c,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),h.definition.align&&(c.style.textAlign=h.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==h.field||!t.treeElementField&&l==0)&&(e.component._row.modules.dataTree.controlEl&&c.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),c.firstChild),e.component._row.modules.dataTree.branchEl&&c.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),c.firstChild)),s.appendChild(c),g.modules.format&&g.modules.format.renderedCallback&&g.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let o=Object.assign(e.component);o.getElement=function(){return s},t.rowFormatter(e.component)}return s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(o)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var s={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach(function(l){t.style[s[l]]||(t.style[s[l]]=o.getPropertyValue(l))})}}}}_l.moduleName="export";var Fm={"=":function(n,e,t,i){return e==n},"<":function(n,e,t,i){return e<n},"<=":function(n,e,t,i){return e<=n},">":function(n,e,t,i){return e>n},">=":function(n,e,t,i){return e>=n},"!=":function(n,e,t,i){return e!=n},regex:function(n,e,t,i){return typeof n=="string"&&(n=new RegExp(n)),n.test(e)},like:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(n.toLowerCase())>-1:!1},keywords:function(n,e,t,i){var s=n.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),o=String(e===null||typeof e>"u"?"":e).toLowerCase(),l=[];return s.forEach(c=>{o.includes(c)&&l.push(!0)}),i.matchAll?l.length===s.length:!!l.length},starts:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(n.toLowerCase()):!1},ends:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(n.toLowerCase()):!1},in:function(n,e,t,i){return Array.isArray(n)?n.length?n.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",n),!1)}};class oi extends he{constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,s){return s.filter=this.getFilters(!0,!0),s}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,s){this.setFilter(e,t,i,s),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,s){this.addFilter(e,t,i,s),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,s=e.getField();function o(l){var c=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",h="",f="",p;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==l){if(e.modules.filter.prevSuccess=l,e.modules.filter.emptyFunc(l))delete i.headerFilters[s];else{switch(e.modules.filter.value=l,typeof e.definition.headerFilterFunc){case"string":oi.filters[e.definition.headerFilterFunc]?(h=e.definition.headerFilterFunc,p=function(b){var g=e.definition.headerFilterFuncParams||{},w=e.getFieldValue(b);return g=typeof g=="function"?g(l,w,b):g,oi.filters[e.definition.headerFilterFunc](l,w,b,g)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":p=function(b){var g=e.definition.headerFilterFuncParams||{},w=e.getFieldValue(b);return g=typeof g=="function"?g(l,w,b):g,e.definition.headerFilterFunc(l,w,b,g)},h=p;break}if(!p)switch(c){case"partial":p=function(b){var g=e.getFieldValue(b);return typeof g<"u"&&g!==null?String(g).toLowerCase().indexOf(String(l).toLowerCase())>-1:!1},h="like";break;default:p=function(b){return e.getFieldValue(b)==l},h="="}i.headerFilters[s]={value:l,func:p,type:h}}e.modules.filter.value=l,f=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==f&&(i.prevHeaderFilterChangeCheck=f,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var s=this,o=e.modules.filter.success,l=e.getField(),c,h,f,p,b,g,w,E;e.modules.filter.value=t;function x(){}function _(k){E=k}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),l){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(k){return!k&&k!==0},c=document.createElement("div"),c.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":s.table.modules.edit.editors[e.definition.headerFilter]?(h=s.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(k){return k!==!0&&k!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":h=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?h=e.modules.edit.editor:e.definition.formatter&&s.table.modules.edit.editors[e.definition.formatter]?(h=s.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(k){return k!==!0&&k!==!1})):h=s.table.modules.edit.editors.input;break}if(h){if(p={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return c},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},w=e.definition.headerFilterParams||{},w=typeof w=="function"?w.call(s.table,p):w,f=h.call(this.table.modules.edit,p,_,o,x,w),!f){console.warn("Filter Error - Cannot add filter to "+l+" column, editor returned a value of false");return}if(!(f instanceof Node)){console.warn("Filter Error - Cannot add filter to "+l+" column, editor should return an instance of Node, the editor returned:",f);return}s.langBind("headerFilters|columns|"+e.definition.field,function(k){f.setAttribute("placeholder",typeof k<"u"&&k?k:e.definition.headerFilterPlaceholder||s.langText("headerFilters|default"))}),f.addEventListener("click",function(k){k.stopPropagation(),f.focus()}),f.addEventListener("focus",k=>{var V=this.table.columnManager.contentsElement.scrollLeft,L=this.table.rowManager.element.scrollLeft;V!==L&&(this.table.rowManager.scrollHorizontal(V),this.table.columnManager.scrollHorizontal(V))}),b=!1,g=function(k){b&&clearTimeout(b),b=setTimeout(function(){o(f.value)},s.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=f,e.modules.filter.attrType=f.hasAttribute("type")?f.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=f.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(f.addEventListener("keyup",g),f.addEventListener("search",g),e.modules.filter.attrType=="number"&&f.addEventListener("change",function(k){o(f.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&f.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&f.addEventListener("mousedown",function(k){k.stopPropagation()})),c.appendChild(f),e.contentElement.appendChild(c),i||s.headerFilterColumns.push(e),E&&E()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,s){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),this.addFilter(e)}addFilter(e,t,i,s){var o=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),e.forEach(l=>{l=this.findFilter(l),l&&(this.filterList.push(l),o=!0)}),o&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(s){return e.field(s,e.type||{})}:oi.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(s){return oi.filters[e.type](e.value,t.getFieldValue(s),s,e.params||{})}:i=function(s){return oi.filters[e.type](e.value,s[e.field],s,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(s){typeof s.type=="function"&&(s.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(s=>{var o;Array.isArray(s)?i.push(this.filtersToArray(s,t)):(o={field:s.field,type:s.type,value:s.value},t&&typeof o.type=="function"&&(o.type="function"),i.push(o))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(s=>{var o=-1;typeof s.field=="object"?o=this.filterList.findIndex(l=>s===l):o=this.filterList.findIndex(l=>s.field===l.field&&s.type===l.type&&s.value===l.value),o>-1?this.filterList.splice(o,1):console.warn("Filter Error - No matching filter type found, ignoring: ",s.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,s){var o=[],l=[];return Array.isArray(t)||(t=[{field:t,type:i,value:s}]),t.forEach(c=>{c=this.findFilter(c),c&&l.push(c)}),this.table.rowManager.rows.forEach(c=>{var h=!0;l.forEach(f=>{this.filterRecurse(f,c.getData())||(h=!1)}),h&&o.push(e==="data"?c.getData("data"):c.getComponent())}),o}filter(e,t){var i=[],s=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(o=>{this.filterRow(o)&&i.push(o)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(o=>{s.push(o.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),s)),i}filterRow(e,t){var i=!0,s=e.getData();this.filterList.forEach(l=>{this.filterRecurse(l,s)||(i=!1)});for(var o in this.headerFilters)this.headerFilters[o].func(s)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(s=>{this.filterRecurse(s,t)&&(i=!0)}):i=e.func(t),i}}oi.moduleName="filter",oi.filters=Fm;function Pm(n,e,t){return this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function Vm(n,e,t){return n.getValue()}function Om(n,e,t){return n.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function Nm(n,e,t){var i=parseFloat(n.getValue()),s="",o,l,c,h,f,p=e.decimal||".",b=e.thousand||",",g=e.negativeSign||"-",w=e.symbol||"",E=!!e.symbolAfter,x=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(n.getValue()));if(i<0&&(i=Math.abs(i),s=g),o=x!==!1?i.toFixed(x):i,o=String(o).split("."),l=o[0],c=o.length>1?p+o[1]:"",e.thousand!==!1)for(h=/(\d+)(\d{3})/;h.test(l);)l=l.replace(h,"$1"+b+"$2");return f=l+c,s===!0?(f="("+f+")",E?f+w:w+f):E?s+f+w:s+w+f}function zm(n,e,t){var i=n.getValue(),s=e.urlPrefix||"",o=e.download,l=i,c=document.createElement("a"),h;function f(p,b){var g=p.shift(),w=b[g];return p.length&&typeof w=="object"?f(p,w):w}if(e.labelField&&(h=n.getData(),l=f(e.labelField.split(this.table.options.nestedFieldSeparator),h)),e.label)switch(typeof e.label){case"string":l=e.label;break;case"function":l=e.label(n);break}if(l){if(e.urlField&&(h=n.getData(),i=h[e.urlField]),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(n);break}return c.setAttribute("href",s+i),e.target&&c.setAttribute("target",e.target),e.download&&(typeof o=="function"?o=o(n):o=o===!0?"":o,c.setAttribute("download",o)),c.innerHTML=this.emptyToSpace(this.sanitizeHTML(l)),c}else return" "}function Hm(n,e,t){var i=document.createElement("img"),s=n.getValue();switch(e.urlPrefix&&(s=e.urlPrefix+n.getValue()),e.urlSuffix&&(s=s+e.urlSuffix),i.setAttribute("src",s),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){n.getRow().normalizeHeight()}),i}function Im(n,e,t){var i=n.getValue(),s=n.getElement(),o=e.allowEmpty,l=e.allowTruthy,c=Object.keys(e).includes("trueValue"),h=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',f=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return c&&i===e.trueValue||!c&&(l&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(s.setAttribute("aria-checked",!0),h||""):o&&(i==="null"||i===""||i===null||typeof i>"u")?(s.setAttribute("aria-checked","mixed"),""):(s.setAttribute("aria-checked",!1),f||"")}function Bm(n,e,t){var i=window.DateTime||luxon.DateTime,s=e.inputFormat||"yyyy-MM-dd HH:mm:ss",o=e.outputFormat||"dd/MM/yyyy HH:mm:ss",l=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",c=n.getValue();if(typeof i<"u"){var h;return i.isDateTime(c)?h=c:s==="iso"?h=i.fromISO(String(c)):h=i.fromFormat(String(c),s),h.isValid?(e.timezone&&(h=h.setZone(e.timezone)),h.toFormat(o)):l===!0||!c?c:typeof l=="function"?l(c):l}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function Wm(n,e,t){var i=window.DateTime||luxon.DateTime,s=e.inputFormat||"yyyy-MM-dd HH:mm:ss",o=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",l=typeof e.suffix<"u"?e.suffix:!1,c=typeof e.unit<"u"?e.unit:"days",h=typeof e.humanize<"u"?e.humanize:!1,f=typeof e.date<"u"?e.date:i.now(),p=n.getValue();if(typeof i<"u"){var b;return i.isDateTime(p)?b=p:s==="iso"?b=i.fromISO(String(p)):b=i.fromFormat(String(p),s),b.isValid?h?b.diff(f,c).toHuman()+(l?" "+l:""):parseInt(b.diff(f,c)[c])+(l?" "+l:""):o===!0?p:typeof o=="function"?o(p):o}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function $m(n,e,t){var i=n.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function Gm(n,e,t){var i=n.getValue(),s=n.getElement(),o=e&&e.stars?e.stars:5,l=document.createElement("span"),c=document.createElementNS("http://www.w3.org/2000/svg","svg"),h='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',f='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';l.style.verticalAlign="middle",c.setAttribute("width","14"),c.setAttribute("height","14"),c.setAttribute("viewBox","0 0 512 512"),c.setAttribute("xml:space","preserve"),c.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,o));for(var p=1;p<=o;p++){var b=c.cloneNode(!0);b.innerHTML=p<=i?h:f,l.appendChild(b)}return s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.setAttribute("aria-label",i),l}function Um(n,e,t){var i=this.sanitizeHTML(n.getValue())||0,s=document.createElement("span"),o=e&&e.max?e.max:100,l=e&&e.min?e.min:0,c=e&&typeof e.color<"u"?e.color:["red","orange","green"],h="#666666",f,p;if(!(isNaN(i)||typeof n.getValue()>"u")){switch(s.classList.add("tabulator-traffic-light"),p=parseFloat(i)<=o?parseFloat(i):o,p=parseFloat(p)>=l?parseFloat(p):l,f=(o-l)/100,p=Math.round((p-l)/f),typeof c){case"string":h=c;break;case"function":h=c(i);break;case"object":if(Array.isArray(c)){var b=100/c.length,g=Math.floor(p/b);g=Math.min(g,c.length-1),g=Math.max(g,0),h=c[g];break}}return s.style.backgroundColor=h,s}}function jm(n,e={},t){var i=this.sanitizeHTML(n.getValue())||0,s=n.getElement(),o=e.max?e.max:100,l=e.min?e.min:0,c=e.legendAlign?e.legendAlign:"center",h,f,p,b,g;switch(f=parseFloat(i)<=o?parseFloat(i):o,f=parseFloat(f)>=l?parseFloat(f):l,h=(o-l)/100,f=Math.round((f-l)/h),typeof e.color){case"string":p=e.color;break;case"function":p=e.color(i);break;case"object":if(Array.isArray(e.color)){let _=100/e.color.length,k=Math.floor(f/_);k=Math.min(k,e.color.length-1),k=Math.max(k,0),p=e.color[k];break}default:p="#2DC214"}switch(typeof e.legend){case"string":b=e.legend;break;case"function":b=e.legend(i);break;case"boolean":b=i;break;default:b=!1}switch(typeof e.legendColor){case"string":g=e.legendColor;break;case"function":g=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let _=100/e.legendColor.length,k=Math.floor(f/_);k=Math.min(k,e.legendColor.length-1),k=Math.max(k,0),g=e.legendColor[k]}break;default:g="#000"}s.style.minWidth="30px",s.style.position="relative",s.setAttribute("aria-label",f);var w=document.createElement("div");w.style.display="inline-block",w.style.width=f+"%",w.style.backgroundColor=p,w.style.height="100%",w.setAttribute("data-max",o),w.setAttribute("data-min",l);var E=document.createElement("div");if(E.style.position="relative",E.style.width="100%",E.style.height="100%",b){var x=document.createElement("div");x.style.position="absolute",x.style.top=0,x.style.left=0,x.style.textAlign=c,x.style.width="100%",x.style.color=g,x.innerHTML=b}return t(function(){if(!(n instanceof wl)){var _=document.createElement("div");_.style.position="absolute",_.style.top="4px",_.style.bottom="4px",_.style.left="4px",_.style.right="4px",s.appendChild(_),s=_}s.appendChild(E),E.appendChild(w),b&&E.appendChild(x)}),""}function Km(n,e,t){return n.getElement().style.backgroundColor=this.sanitizeHTML(n.getValue()),""}function qm(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function Ym(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function Xm(n,e,t){var i=document.createElement("span"),s=n.getRow();return s.watchPosition(o=>{i.innerText=o}),i}function Jm(n,e,t){return n.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function Zm(n,e,t){var i=document.createElement("div"),s=n.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
|
26
|
+
`)+O+`return __p
|
27
|
+
}`;var ee=sf(function(){return ue(y,G+"return "+O).apply(t,E)});if(ee.source=O,Ia(ee))throw ee;return ee}function bS(r){return he(r).toLowerCase()}function vS(r){return he(r).toUpperCase()}function wS(r,a,u){if(r=he(r),r&&(u||a===t))return fc(r);if(!r||!(a=st(a)))return r;var p=xt(r),g=xt(a),y=pc(p,g),E=mc(p,g)+1;return ai(p,y,E).join("")}function yS(r,a,u){if(r=he(r),r&&(u||a===t))return r.slice(0,bc(r)+1);if(!r||!(a=st(a)))return r;var p=xt(r),g=mc(p,xt(a))+1;return ai(p,0,g).join("")}function CS(r,a,u){if(r=he(r),r&&(u||a===t))return r.replace(Io,"");if(!r||!(a=st(a)))return r;var p=xt(r),g=pc(p,xt(a));return ai(p,g).join("")}function ES(r,a){var u=Ee,p=de;if(ye(a)){var g="separator"in a?a.separator:g;u="length"in a?J(a.length):u,p="omission"in a?st(a.omission):p}r=he(r);var y=r.length;if(Yi(r)){var E=xt(r);y=E.length}if(u>=y)return r;var _=u-Xi(p);if(_<1)return p;var S=E?ai(E,0,_).join(""):r.slice(0,_);if(g===t)return S+p;if(E&&(_+=S.length-_),Ba(g)){if(r.slice(_).search(g)){var A,F=S;for(g.global||(g=ia(g.source,he(Oh.exec(g))+"g")),g.lastIndex=0;A=g.exec(F);)var O=A.index;S=S.slice(0,O===t?_:O)}}else if(r.indexOf(st(g),_)!=_){var I=S.lastIndexOf(g);I>-1&&(S=S.slice(0,I))}return S+p}function xS(r){return r=he(r),r&&PC.test(r)?r.replace(Ah,ZE):r}var _S=rn(function(r,a,u){return r+(u?" ":"")+a.toUpperCase()}),$a=sd("toUpperCase");function rf(r,a,u){return r=he(r),a=u?t:a,a===t?KE(r)?t1(r):NE(r):r.match(a)||[]}var sf=te(function(r,a){try{return nt(r,t,a)}catch(u){return Ia(u)?u:new Y(u)}}),RS=Gt(function(r,a){return dt(a,function(u){u=Pt(u),Wt(r,u,za(r[u],r))}),r});function TS(r){var a=r==null?0:r.length,u=j();return r=a?we(r,function(p){if(typeof p[1]!="function")throw new ft(l);return[u(p[0]),p[1]]}):[],te(function(p){for(var g=-1;++g<a;){var y=r[g];if(nt(y[0],this,p))return nt(y[1],this,p)}})}function SS(r){return Z1(mt(r,b))}function Ga(r){return function(){return r}}function kS(r,a){return r==null||r!==r?a:r}var MS=ad(),LS=ad(!0);function Qe(r){return r}function Ua(r){return zc(typeof r=="function"?r:mt(r,b))}function DS(r){return Ic(mt(r,b))}function AS(r,a){return Bc(r,mt(a,b))}var FS=te(function(r,a){return function(u){return Gn(u,r,a)}}),PS=te(function(r,a){return function(u){return Gn(r,u,a)}});function ja(r,a,u){var p=Fe(a),g=ts(a,p);u==null&&!(ye(a)&&(g.length||!p.length))&&(u=a,a=r,r=this,g=ts(a,Fe(a)));var y=!(ye(u)&&"chain"in u)||!!u.chain,E=jt(r);return dt(g,function(_){var S=a[_];r[_]=S,E&&(r.prototype[_]=function(){var A=this.__chain__;if(y||A){var F=r(this.__wrapped__),O=F.__actions__=Xe(this.__actions__);return O.push({func:S,args:arguments,thisArg:r}),F.__chain__=A,F}return S.apply(r,ti([this.value()],arguments))})}),r}function OS(){return Oe._===this&&(Oe._=a1),this}function Ka(){}function HS(r){return r=J(r),te(function(a){return Vc(a,r)})}var zS=_a(we),NS=_a(lc),IS=_a(Yo);function of(r){return Da(r)?Xo(Pt(r)):mx(r)}function BS(r){return function(a){return r==null?t:Ei(r,a)}}var VS=ud(),WS=ud(!0);function qa(){return[]}function Ya(){return!1}function $S(){return{}}function GS(){return""}function US(){return!0}function jS(r,a){if(r=J(r),r<1||r>me)return[];var u=Ae,p=Ve(r,Ae);a=j(a),r-=Ae;for(var g=Qo(p,a);++u<r;)a(u);return g}function KS(r){return X(r)?we(r,Pt):ot(r)?[r]:Xe(Rd(he(r)))}function qS(r){var a=++s1;return he(r)+a}var YS=as(function(r,a){return r+a},0),XS=Ra("ceil"),JS=as(function(r,a){return r/a},1),ZS=Ra("floor");function QS(r){return r&&r.length?es(r,Qe,ha):t}function e2(r,a){return r&&r.length?es(r,j(a,2),ha):t}function t2(r){return cc(r,Qe)}function i2(r,a){return cc(r,j(a,2))}function n2(r){return r&&r.length?es(r,Qe,pa):t}function r2(r,a){return r&&r.length?es(r,j(a,2),pa):t}var s2=as(function(r,a){return r*a},1),o2=Ra("round"),a2=as(function(r,a){return r-a},0);function l2(r){return r&&r.length?Zo(r,Qe):0}function u2(r,a){return r&&r.length?Zo(r,j(a,2)):0}return w.after=DR,w.ary=Hd,w.assign=vT,w.assignIn=Xd,w.assignInWith=ys,w.assignWith=wT,w.at=yT,w.before=zd,w.bind=za,w.bindAll=RS,w.bindKey=Nd,w.castArray=$R,w.chain=Fd,w.chunk=Zx,w.compact=Qx,w.concat=e_,w.cond=TS,w.conforms=SS,w.constant=Ga,w.countBy=lR,w.create=CT,w.curry=Id,w.curryRight=Bd,w.debounce=Vd,w.defaults=ET,w.defaultsDeep=xT,w.defer=AR,w.delay=FR,w.difference=t_,w.differenceBy=i_,w.differenceWith=n_,w.drop=r_,w.dropRight=s_,w.dropRightWhile=o_,w.dropWhile=a_,w.fill=l_,w.filter=hR,w.flatMap=fR,w.flatMapDeep=pR,w.flatMapDepth=mR,w.flatten=Md,w.flattenDeep=u_,w.flattenDepth=h_,w.flip=PR,w.flow=MS,w.flowRight=LS,w.fromPairs=c_,w.functions=LT,w.functionsIn=DT,w.groupBy=gR,w.initial=f_,w.intersection=p_,w.intersectionBy=m_,w.intersectionWith=g_,w.invert=FT,w.invertBy=PT,w.invokeMap=vR,w.iteratee=Ua,w.keyBy=wR,w.keys=Fe,w.keysIn=Ze,w.map=ps,w.mapKeys=HT,w.mapValues=zT,w.matches=DS,w.matchesProperty=AS,w.memoize=gs,w.merge=NT,w.mergeWith=Jd,w.method=FS,w.methodOf=PS,w.mixin=ja,w.negate=bs,w.nthArg=HS,w.omit=IT,w.omitBy=BT,w.once=OR,w.orderBy=yR,w.over=zS,w.overArgs=HR,w.overEvery=NS,w.overSome=IS,w.partial=Na,w.partialRight=Wd,w.partition=CR,w.pick=VT,w.pickBy=Zd,w.property=of,w.propertyOf=BS,w.pull=y_,w.pullAll=Dd,w.pullAllBy=C_,w.pullAllWith=E_,w.pullAt=x_,w.range=VS,w.rangeRight=WS,w.rearg=zR,w.reject=_R,w.remove=__,w.rest=NR,w.reverse=Oa,w.sampleSize=TR,w.set=$T,w.setWith=GT,w.shuffle=SR,w.slice=R_,w.sortBy=LR,w.sortedUniq=A_,w.sortedUniqBy=F_,w.split=fS,w.spread=IR,w.tail=P_,w.take=O_,w.takeRight=H_,w.takeRightWhile=z_,w.takeWhile=N_,w.tap=Q_,w.throttle=BR,w.thru=fs,w.toArray=Kd,w.toPairs=Qd,w.toPairsIn=ef,w.toPath=KS,w.toPlainObject=Yd,w.transform=UT,w.unary=VR,w.union=I_,w.unionBy=B_,w.unionWith=V_,w.uniq=W_,w.uniqBy=$_,w.uniqWith=G_,w.unset=jT,w.unzip=Ha,w.unzipWith=Ad,w.update=KT,w.updateWith=qT,w.values=an,w.valuesIn=YT,w.without=U_,w.words=rf,w.wrap=WR,w.xor=j_,w.xorBy=K_,w.xorWith=q_,w.zip=Y_,w.zipObject=X_,w.zipObjectDeep=J_,w.zipWith=Z_,w.entries=Qd,w.entriesIn=ef,w.extend=Xd,w.extendWith=ys,ja(w,w),w.add=YS,w.attempt=sf,w.camelCase=QT,w.capitalize=tf,w.ceil=XS,w.clamp=XT,w.clone=GR,w.cloneDeep=jR,w.cloneDeepWith=KR,w.cloneWith=UR,w.conformsTo=qR,w.deburr=nf,w.defaultTo=kS,w.divide=JS,w.endsWith=eS,w.eq=Rt,w.escape=tS,w.escapeRegExp=iS,w.every=uR,w.find=cR,w.findIndex=Sd,w.findKey=_T,w.findLast=dR,w.findLastIndex=kd,w.findLastKey=RT,w.floor=ZS,w.forEach=Pd,w.forEachRight=Od,w.forIn=TT,w.forInRight=ST,w.forOwn=kT,w.forOwnRight=MT,w.get=Va,w.gt=YR,w.gte=XR,w.has=AT,w.hasIn=Wa,w.head=Ld,w.identity=Qe,w.includes=bR,w.indexOf=d_,w.inRange=JT,w.invoke=OT,w.isArguments=Ri,w.isArray=X,w.isArrayBuffer=JR,w.isArrayLike=Je,w.isArrayLikeObject=xe,w.isBoolean=ZR,w.isBuffer=li,w.isDate=QR,w.isElement=eT,w.isEmpty=tT,w.isEqual=iT,w.isEqualWith=nT,w.isError=Ia,w.isFinite=rT,w.isFunction=jt,w.isInteger=$d,w.isLength=vs,w.isMap=Gd,w.isMatch=sT,w.isMatchWith=oT,w.isNaN=aT,w.isNative=lT,w.isNil=hT,w.isNull=uT,w.isNumber=Ud,w.isObject=ye,w.isObjectLike=Ce,w.isPlainObject=Xn,w.isRegExp=Ba,w.isSafeInteger=cT,w.isSet=jd,w.isString=ws,w.isSymbol=ot,w.isTypedArray=on,w.isUndefined=dT,w.isWeakMap=fT,w.isWeakSet=pT,w.join=b_,w.kebabCase=nS,w.last=bt,w.lastIndexOf=v_,w.lowerCase=rS,w.lowerFirst=sS,w.lt=mT,w.lte=gT,w.max=QS,w.maxBy=e2,w.mean=t2,w.meanBy=i2,w.min=n2,w.minBy=r2,w.stubArray=qa,w.stubFalse=Ya,w.stubObject=$S,w.stubString=GS,w.stubTrue=US,w.multiply=s2,w.nth=w_,w.noConflict=OS,w.noop=Ka,w.now=ms,w.pad=oS,w.padEnd=aS,w.padStart=lS,w.parseInt=uS,w.random=ZT,w.reduce=ER,w.reduceRight=xR,w.repeat=hS,w.replace=cS,w.result=WT,w.round=o2,w.runInContext=T,w.sample=RR,w.size=kR,w.snakeCase=dS,w.some=MR,w.sortedIndex=T_,w.sortedIndexBy=S_,w.sortedIndexOf=k_,w.sortedLastIndex=M_,w.sortedLastIndexBy=L_,w.sortedLastIndexOf=D_,w.startCase=pS,w.startsWith=mS,w.subtract=a2,w.sum=l2,w.sumBy=u2,w.template=gS,w.times=jS,w.toFinite=Kt,w.toInteger=J,w.toLength=qd,w.toLower=bS,w.toNumber=vt,w.toSafeInteger=bT,w.toString=he,w.toUpper=vS,w.trim=wS,w.trimEnd=yS,w.trimStart=CS,w.truncate=ES,w.unescape=xS,w.uniqueId=qS,w.upperCase=_S,w.upperFirst=$a,w.each=Pd,w.eachRight=Od,w.first=Ld,ja(w,function(){var r={};return At(w,function(a,u){ce.call(w.prototype,u)||(r[u]=a)}),r}(),{chain:!1}),w.VERSION=i,dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){w[r].placeholder=w}),dt(["drop","take"],function(r,a){oe.prototype[r]=function(u){u=u===t?1:ke(J(u),0);var p=this.__filtered__&&!a?new oe(this):this.clone();return p.__filtered__?p.__takeCount__=Ve(u,p.__takeCount__):p.__views__.push({size:Ve(u,Ae),type:r+(p.__dir__<0?"Right":"")}),p},oe.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),dt(["filter","map","takeWhile"],function(r,a){var u=a+1,p=u==se||u==Te;oe.prototype[r]=function(g){var y=this.clone();return y.__iteratees__.push({iteratee:j(g,3),type:u}),y.__filtered__=y.__filtered__||p,y}}),dt(["head","last"],function(r,a){var u="take"+(a?"Right":"");oe.prototype[r]=function(){return this[u](1).value()[0]}}),dt(["initial","tail"],function(r,a){var u="drop"+(a?"":"Right");oe.prototype[r]=function(){return this.__filtered__?new oe(this):this[u](1)}}),oe.prototype.compact=function(){return this.filter(Qe)},oe.prototype.find=function(r){return this.filter(r).head()},oe.prototype.findLast=function(r){return this.reverse().find(r)},oe.prototype.invokeMap=te(function(r,a){return typeof r=="function"?new oe(this):this.map(function(u){return Gn(u,r,a)})}),oe.prototype.reject=function(r){return this.filter(bs(j(r)))},oe.prototype.slice=function(r,a){r=J(r);var u=this;return u.__filtered__&&(r>0||a<0)?new oe(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),a!==t&&(a=J(a),u=a<0?u.dropRight(-a):u.take(a-r)),u)},oe.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},oe.prototype.toArray=function(){return this.take(Ae)},At(oe.prototype,function(r,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),p=/^(?:head|last)$/.test(a),g=w[p?"take"+(a=="last"?"Right":""):a],y=p||/^find/.test(a);g&&(w.prototype[a]=function(){var E=this.__wrapped__,_=p?[1]:arguments,S=E instanceof oe,A=_[0],F=S||X(E),O=function(ne){var ae=g.apply(w,ti([ne],_));return p&&I?ae[0]:ae};F&&u&&typeof A=="function"&&A.length!=1&&(S=F=!1);var I=this.__chain__,G=!!this.__actions__.length,K=y&&!I,ee=S&&!G;if(!y&&F){E=ee?E:new oe(this);var q=r.apply(E,_);return q.__actions__.push({func:fs,args:[O],thisArg:t}),new pt(q,I)}return K&&ee?r.apply(this,_):(q=this.thru(O),K?p?q.value()[0]:q.value():q)})}),dt(["pop","push","shift","sort","splice","unshift"],function(r){var a=Ir[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);w.prototype[r]=function(){var g=arguments;if(p&&!this.__chain__){var y=this.value();return a.apply(X(y)?y:[],g)}return this[u](function(E){return a.apply(X(E)?E:[],g)})}}),At(oe.prototype,function(r,a){var u=w[a];if(u){var p=u.name+"";ce.call(en,p)||(en[p]=[]),en[p].push({name:a,func:u})}}),en[os(t,k).name]=[{name:"wrapper",func:t}],oe.prototype.clone=x1,oe.prototype.reverse=_1,oe.prototype.value=R1,w.prototype.at=eR,w.prototype.chain=tR,w.prototype.commit=iR,w.prototype.next=nR,w.prototype.plant=sR,w.prototype.reverse=oR,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=aR,w.prototype.first=w.prototype.head,zn&&(w.prototype[zn]=rR),w},Ji=i1();bi?((bi.exports=Ji)._=Ji,Uo._=Ji):Oe._=Ji}).call(ln)}(Jn,Jn.exports);var U=Jn.exports;const Cs=s=>U.upperFirst(U.camelCase(s));var hf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==n||l.enumerable!==!0)return!1}return!0},Ja=typeof Symbol<"u"&&Symbol,cf=hf,df=function(){return typeof Ja!="function"||typeof Symbol!="function"||typeof Ja("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:cf()},Za={foo:{}},ff=Object,pf=function(){return{__proto__:Za}.foo===Za.foo&&!({__proto__:null}instanceof ff)},mf="Function.prototype.bind called on incompatible ",Es=Array.prototype.slice,gf=Object.prototype.toString,bf="[object Function]",vf=function(e){var t=this;if(typeof t!="function"||gf.call(t)!==bf)throw new TypeError(mf+t);for(var i=Es.call(arguments,1),n,o=function(){if(this instanceof n){var m=t.apply(this,i.concat(Es.call(arguments)));return Object(m)===m?m:this}else return t.apply(e,i.concat(Es.call(arguments)))},l=Math.max(0,t.length-i.length),h=[],c=0;c<l;c++)h.push("$"+c);if(n=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var f=function(){};f.prototype=t.prototype,n.prototype=new f,f.prototype=null}return n},wf=vf,xs=Function.prototype.bind||wf,yf=xs,Cf=yf.call(Function.call,Object.prototype.hasOwnProperty),re,Ti=SyntaxError,Qa=Function,Si=TypeError,_s=function(s){try{return Qa('"use strict"; return ('+s+").constructor;")()}catch{}},ui=Object.getOwnPropertyDescriptor;if(ui)try{ui({},"")}catch{ui=null}var Rs=function(){throw new Si},Ef=ui?function(){try{return arguments.callee,Rs}catch{try{return ui(arguments,"callee").get}catch{return Rs}}}():Rs,ki=df(),xf=pf(),Me=Object.getPrototypeOf||(xf?function(s){return s.__proto__}:null),Mi={},_f=typeof Uint8Array>"u"||!Me?re:Me(Uint8Array),hi={"%AggregateError%":typeof AggregateError>"u"?re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?re:ArrayBuffer,"%ArrayIteratorPrototype%":ki&&Me?Me([][Symbol.iterator]()):re,"%AsyncFromSyncIteratorPrototype%":re,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%Atomics%":typeof Atomics>"u"?re:Atomics,"%BigInt%":typeof BigInt>"u"?re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?re:FinalizationRegistry,"%Function%":Qa,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ki&&Me?Me(Me([][Symbol.iterator]())):re,"%JSON%":typeof JSON=="object"?JSON:re,"%Map%":typeof Map>"u"?re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ki||!Me?re:Me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?re:Promise,"%Proxy%":typeof Proxy>"u"?re:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ki||!Me?re:Me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ki&&Me?Me(""[Symbol.iterator]()):re,"%Symbol%":ki?Symbol:re,"%SyntaxError%":Ti,"%ThrowTypeError%":Ef,"%TypedArray%":_f,"%TypeError%":Si,"%Uint8Array%":typeof Uint8Array>"u"?re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?re:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?re:WeakSet};if(Me)try{null.error}catch(s){var Rf=Me(Me(s));hi["%Error.prototype%"]=Rf}var Tf=function s(e){var t;if(e==="%AsyncFunction%")t=_s("async function () {}");else if(e==="%GeneratorFunction%")t=_s("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=_s("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&Me&&(t=Me(n.prototype))}return hi[e]=t,t},el={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},un=xs,Zn=Cf,Sf=un.call(Function.call,Array.prototype.concat),kf=un.call(Function.apply,Array.prototype.splice),tl=un.call(Function.call,String.prototype.replace),Qn=un.call(Function.call,String.prototype.slice),Mf=un.call(Function.call,RegExp.prototype.exec),Lf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Df=/\\(\\)?/g,Af=function(e){var t=Qn(e,0,1),i=Qn(e,-1);if(t==="%"&&i!=="%")throw new Ti("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Ti("invalid intrinsic syntax, expected opening `%`");var n=[];return tl(e,Lf,function(o,l,h,c){n[n.length]=h?tl(c,Df,"$1"):l||o}),n},Ff=function(e,t){var i=e,n;if(Zn(el,i)&&(n=el[i],i="%"+n[0]+"%"),Zn(hi,i)){var o=hi[i];if(o===Mi&&(o=Tf(i)),typeof o>"u"&&!t)throw new Si("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new Ti("intrinsic "+e+" does not exist!")},Ts=function(e,t){if(typeof e!="string"||e.length===0)throw new Si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Si('"allowMissing" argument must be a boolean');if(Mf(/^%?[^%]*%?$/,e)===null)throw new Ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Af(e),n=i.length>0?i[0]:"",o=Ff("%"+n+"%",t),l=o.name,h=o.value,c=!1,f=o.alias;f&&(n=f[0],kf(i,Sf([0,1],f)));for(var m=1,b=!0;m<i.length;m+=1){var v=i[m],C=Qn(v,0,1),x=Qn(v,-1);if((C==='"'||C==="'"||C==="`"||x==='"'||x==="'"||x==="`")&&C!==x)throw new Ti("property names with quotes must have matching quotes");if((v==="constructor"||!b)&&(c=!0),n+="."+v,l="%"+n+"%",Zn(hi,l))h=hi[l];else if(h!=null){if(!(v in h)){if(!t)throw new Si("base intrinsic for "+e+" exists, but the property is not available.");return}if(ui&&m+1>=i.length){var R=ui(h,v);b=!!R,b&&"get"in R&&!("originalValue"in R.get)?h=R.get:h=h[v]}else b=Zn(h,v),h=h[v];b&&!c&&(hi[l]=h)}}return h},il={exports:{}};(function(s){var e=xs,t=Ts,i=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(n,i),l=t("%Object.getOwnPropertyDescriptor%",!0),h=t("%Object.defineProperty%",!0),c=t("%Math.max%");if(h)try{h({},"a",{value:1})}catch{h=null}s.exports=function(b){var v=o(e,n,arguments);if(l&&h){var C=l(v,"length");C.configurable&&h(v,"length",{value:1+c(0,b.length-(arguments.length-1))})}return v};var f=function(){return o(e,i,arguments)};h?h(s.exports,"apply",{value:f}):s.exports.apply=f})(il);var Pf=il.exports,nl=Ts,rl=Pf,Of=rl(nl("String.prototype.indexOf")),Hf=function(e,t){var i=nl(e,!!t);return typeof i=="function"&&Of(e,".prototype.")>-1?rl(i):i};const zf=uf(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ss=typeof Map=="function"&&Map.prototype,ks=Object.getOwnPropertyDescriptor&&Ss?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,er=Ss&&ks&&typeof ks.get=="function"?ks.get:null,sl=Ss&&Map.prototype.forEach,Ms=typeof Set=="function"&&Set.prototype,Ls=Object.getOwnPropertyDescriptor&&Ms?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,tr=Ms&&Ls&&typeof Ls.get=="function"?Ls.get:null,ol=Ms&&Set.prototype.forEach,Nf=typeof WeakMap=="function"&&WeakMap.prototype,hn=Nf?WeakMap.prototype.has:null,If=typeof WeakSet=="function"&&WeakSet.prototype,cn=If?WeakSet.prototype.has:null,Bf=typeof WeakRef=="function"&&WeakRef.prototype,al=Bf?WeakRef.prototype.deref:null,Vf=Boolean.prototype.valueOf,Wf=Object.prototype.toString,$f=Function.prototype.toString,Gf=String.prototype.match,Ds=String.prototype.slice,Yt=String.prototype.replace,Uf=String.prototype.toUpperCase,ll=String.prototype.toLowerCase,ul=RegExp.prototype.test,hl=Array.prototype.concat,kt=Array.prototype.join,jf=Array.prototype.slice,cl=Math.floor,As=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Fs=Object.getOwnPropertySymbols,Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Li=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Li||"symbol")?Symbol.toStringTag:null,dl=Object.prototype.propertyIsEnumerable,fl=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function pl(s,e){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||ul.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-cl(-s):cl(s);if(i!==s){var n=String(i),o=Ds.call(e,n.length+1);return Yt.call(n,t,"$&_")+"."+Yt.call(Yt.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yt.call(e,t,"$&_")}var Os=zf,ml=Os.custom,gl=wl(ml)?ml:null,Kf=function s(e,t,i,n){var o=t||{};if(Xt(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Xt(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Xt(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Xt(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Xt(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var h=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Cl(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return h?pl(e,c):c}if(typeof e=="bigint"){var f=String(e)+"n";return h?pl(e,f):f}var m=typeof o.depth>"u"?5:o.depth;if(typeof i>"u"&&(i=0),i>=m&&m>0&&typeof e=="object")return Hs(e)?"[Array]":"[Object]";var b=cp(o,i);if(typeof n>"u")n=[];else if(yl(n,e)>=0)return"[Circular]";function v(Q,se,De){if(se&&(n=jf.call(n),n.push(se)),De){var Te={depth:o.depth};return Xt(o,"quoteStyle")&&(Te.quoteStyle=o.quoteStyle),s(Q,Te,i+1,n)}return s(Q,o,i+1,n)}if(typeof e=="function"&&!vl(e)){var C=ip(e),x=ir(e,v);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(x.length>0?" { "+kt.call(x,", ")+" }":"")}if(wl(e)){var R=Li?Yt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ps.call(e);return typeof e=="object"&&!Li?dn(R):R}if(lp(e)){for(var L="<"+ll.call(String(e.nodeName)),k=e.attributes||[],H=0;H<k.length;H++)L+=" "+k[H].name+"="+bl(qf(k[H].value),"double",o);return L+=">",e.childNodes&&e.childNodes.length&&(L+="..."),L+="</"+ll.call(String(e.nodeName))+">",L}if(Hs(e)){if(e.length===0)return"[]";var P=ir(e,v);return b&&!hp(P)?"["+Ns(P,b)+"]":"[ "+kt.call(P,", ")+" ]"}if(Xf(e)){var z=ir(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!dl.call(e,"cause")?"{ ["+String(e)+"] "+kt.call(hl.call("[cause]: "+v(e.cause),z),", ")+" }":z.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+kt.call(z,", ")+" }"}if(typeof e=="object"&&l){if(gl&&typeof e[gl]=="function"&&Os)return Os(e,{depth:m-i});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(np(e)){var V=[];return sl&&sl.call(e,function(Q,se){V.push(v(se,e,!0)+" => "+v(Q,e))}),El("Map",er.call(e),V,b)}if(op(e)){var Z=[];return ol&&ol.call(e,function(Q){Z.push(v(Q,e))}),El("Set",tr.call(e),Z,b)}if(rp(e))return zs("WeakMap");if(ap(e))return zs("WeakSet");if(sp(e))return zs("WeakRef");if(Zf(e))return dn(v(Number(e)));if(ep(e))return dn(v(As.call(e)));if(Qf(e))return dn(Vf.call(e));if(Jf(e))return dn(v(String(e)));if(!Yf(e)&&!vl(e)){var N=ir(e,v),W=fl?fl(e)===Object.prototype:e instanceof Object||e.constructor===Object,le=e instanceof Object?"":"null prototype",Ee=!W&&ze&&Object(e)===e&&ze in e?Ds.call(Jt(e),8,-1):le?"Object":"",de=W||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",$=de+(Ee||le?"["+kt.call(hl.call([],Ee||[],le||[]),": ")+"] ":"");return N.length===0?$+"{}":b?$+"{"+Ns(N,b)+"}":$+"{ "+kt.call(N,", ")+" }"}return String(e)};function bl(s,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+s+i}function qf(s){return Yt.call(String(s),/"/g,""")}function Hs(s){return Jt(s)==="[object Array]"&&(!ze||!(typeof s=="object"&&ze in s))}function Yf(s){return Jt(s)==="[object Date]"&&(!ze||!(typeof s=="object"&&ze in s))}function vl(s){return Jt(s)==="[object RegExp]"&&(!ze||!(typeof s=="object"&&ze in s))}function Xf(s){return Jt(s)==="[object Error]"&&(!ze||!(typeof s=="object"&&ze in s))}function Jf(s){return Jt(s)==="[object String]"&&(!ze||!(typeof s=="object"&&ze in s))}function Zf(s){return Jt(s)==="[object Number]"&&(!ze||!(typeof s=="object"&&ze in s))}function Qf(s){return Jt(s)==="[object Boolean]"&&(!ze||!(typeof s=="object"&&ze in s))}function wl(s){if(Li)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!Ps)return!1;try{return Ps.call(s),!0}catch{}return!1}function ep(s){if(!s||typeof s!="object"||!As)return!1;try{return As.call(s),!0}catch{}return!1}var tp=Object.prototype.hasOwnProperty||function(s){return s in this};function Xt(s,e){return tp.call(s,e)}function Jt(s){return Wf.call(s)}function ip(s){if(s.name)return s.name;var e=Gf.call($f.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function yl(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;t<i;t++)if(s[t]===e)return t;return-1}function np(s){if(!er||!s||typeof s!="object")return!1;try{er.call(s);try{tr.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function rp(s){if(!hn||!s||typeof s!="object")return!1;try{hn.call(s,hn);try{cn.call(s,cn)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function sp(s){if(!al||!s||typeof s!="object")return!1;try{return al.call(s),!0}catch{}return!1}function op(s){if(!tr||!s||typeof s!="object")return!1;try{tr.call(s);try{er.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function ap(s){if(!cn||!s||typeof s!="object")return!1;try{cn.call(s,cn);try{hn.call(s,hn)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function lp(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function Cl(s,e){if(s.length>e.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return Cl(Ds.call(s,0,e.maxStringLength),e)+i}var n=Yt.call(Yt.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,up);return bl(n,"single",e)}function up(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+Uf.call(e.toString(16))}function dn(s){return"Object("+s+")"}function zs(s){return s+" { ? }"}function El(s,e,t,i){var n=i?Ns(t,i):kt.call(t,", ");return s+" ("+e+") {"+n+"}"}function hp(s){for(var e=0;e<s.length;e++)if(yl(s[e],`
|
28
|
+
`)>=0)return!1;return!0}function cp(s,e){var t;if(s.indent===" ")t=" ";else if(typeof s.indent=="number"&&s.indent>0)t=kt.call(Array(s.indent+1)," ");else return null;return{base:t,prev:kt.call(Array(e+1),t)}}function Ns(s,e){if(s.length===0)return"";var t=`
|
29
|
+
`+e.prev+e.base;return t+kt.call(s,","+t)+`
|
30
|
+
`+e.prev}function ir(s,e){var t=Hs(s),i=[];if(t){i.length=s.length;for(var n=0;n<s.length;n++)i[n]=Xt(s,n)?e(s[n],s):""}var o=typeof Fs=="function"?Fs(s):[],l;if(Li){l={};for(var h=0;h<o.length;h++)l["$"+o[h]]=o[h]}for(var c in s)Xt(s,c)&&(t&&String(Number(c))===c&&c<s.length||Li&&l["$"+c]instanceof Symbol||(ul.call(/[^\w$]/,c)?i.push(e(c,s)+": "+e(s[c],s)):i.push(c+": "+e(s[c],s))));if(typeof Fs=="function")for(var f=0;f<o.length;f++)dl.call(s,o[f])&&i.push("["+e(o[f])+"]: "+e(s[o[f]],s));return i}var Is=Ts,Di=Hf,dp=Kf,fp=Is("%TypeError%"),nr=Is("%WeakMap%",!0),rr=Is("%Map%",!0),pp=Di("WeakMap.prototype.get",!0),mp=Di("WeakMap.prototype.set",!0),gp=Di("WeakMap.prototype.has",!0),bp=Di("Map.prototype.get",!0),vp=Di("Map.prototype.set",!0),wp=Di("Map.prototype.has",!0),Bs=function(s,e){for(var t=s,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=s.next,s.next=i,i},yp=function(s,e){var t=Bs(s,e);return t&&t.value},Cp=function(s,e,t){var i=Bs(s,e);i?i.value=t:s.next={key:e,next:s.next,value:t}},Ep=function(s,e){return!!Bs(s,e)},xp=function(){var e,t,i,n={assert:function(o){if(!n.has(o))throw new fp("Side channel does not contain "+dp(o))},get:function(o){if(nr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return pp(e,o)}else if(rr){if(t)return bp(t,o)}else if(i)return yp(i,o)},has:function(o){if(nr&&o&&(typeof o=="object"||typeof o=="function")){if(e)return gp(e,o)}else if(rr){if(t)return wp(t,o)}else if(i)return Ep(i,o);return!1},set:function(o,l){nr&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new nr),mp(e,o,l)):rr?(t||(t=new rr),vp(t,o,l)):(i||(i={key:{},next:null}),Cp(i,o,l))}};return n},_p=String.prototype.replace,Rp=/%20/g,Vs={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ws={default:Vs.RFC3986,formatters:{RFC1738:function(s){return _p.call(s,Rp,"+")},RFC3986:function(s){return String(s)}},RFC1738:Vs.RFC1738,RFC3986:Vs.RFC3986},Tp=Ws,$s=Object.prototype.hasOwnProperty,ci=Array.isArray,Mt=function(){for(var s=[],e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s}(),Sp=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(ci(i)){for(var n=[],o=0;o<i.length;++o)typeof i[o]<"u"&&n.push(i[o]);t.obj[t.prop]=n}}},xl=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},kp=function s(e,t,i){if(!t)return e;if(typeof t!="object"){if(ci(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!$s.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return ci(e)&&!ci(t)&&(n=xl(e,i)),ci(e)&&ci(t)?(t.forEach(function(o,l){if($s.call(e,l)){var h=e[l];h&&typeof h=="object"&&o&&typeof o=="object"?e[l]=s(h,o,i):e.push(o)}else e[l]=o}),e):Object.keys(t).reduce(function(o,l){var h=t[l];return $s.call(o,l)?o[l]=s(o[l],h,i):o[l]=h,o},n)},Mp=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},Lp=function(s,e,t){var i=s.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},Dp=function(e,t,i,n,o){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),i==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(m){return"%26%23"+parseInt(m.slice(2),16)+"%3B"});for(var h="",c=0;c<l.length;++c){var f=l.charCodeAt(c);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===Tp.RFC1738&&(f===40||f===41)){h+=l.charAt(c);continue}if(f<128){h=h+Mt[f];continue}if(f<2048){h=h+(Mt[192|f>>6]+Mt[128|f&63]);continue}if(f<55296||f>=57344){h=h+(Mt[224|f>>12]+Mt[128|f>>6&63]+Mt[128|f&63]);continue}c+=1,f=65536+((f&1023)<<10|l.charCodeAt(c)&1023),h+=Mt[240|f>>18]+Mt[128|f>>12&63]+Mt[128|f>>6&63]+Mt[128|f&63]}return h},Ap=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var o=t[n],l=o.obj[o.prop],h=Object.keys(l),c=0;c<h.length;++c){var f=h[c],m=l[f];typeof m=="object"&&m!==null&&i.indexOf(m)===-1&&(t.push({obj:l,prop:f}),i.push(m))}return Sp(t),e},Fp=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Pp=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Op=function(e,t){return[].concat(e,t)},Hp=function(e,t){if(ci(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},_l={arrayToObject:xl,assign:Mp,combine:Op,compact:Ap,decode:Lp,encode:Dp,isBuffer:Pp,isRegExp:Fp,maybeMap:Hp,merge:kp},Rl=xp,sr=_l,fn=Ws,zp=Object.prototype.hasOwnProperty,Tl={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Ot=Array.isArray,Np=Array.prototype.push,Sl=function(s,e){Np.apply(s,Ot(e)?e:[e])},Ip=Date.prototype.toISOString,kl=fn.default,Ne={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:sr.encode,encodeValuesOnly:!1,format:kl,formatter:fn.formatters[kl],indices:!1,serializeDate:function(e){return Ip.call(e)},skipNulls:!1,strictNullHandling:!1},Bp=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Gs={},Vp=function s(e,t,i,n,o,l,h,c,f,m,b,v,C,x,R,L){for(var k=e,H=L,P=0,z=!1;(H=H.get(Gs))!==void 0&&!z;){var V=H.get(e);if(P+=1,typeof V<"u"){if(V===P)throw new RangeError("Cyclic object value");z=!0}typeof H.get(Gs)>"u"&&(P=0)}if(typeof c=="function"?k=c(t,k):k instanceof Date?k=b(k):i==="comma"&&Ot(k)&&(k=sr.maybeMap(k,function(Te){return Te instanceof Date?b(Te):Te})),k===null){if(o)return h&&!x?h(t,Ne.encoder,R,"key",v):t;k=""}if(Bp(k)||sr.isBuffer(k)){if(h){var Z=x?t:h(t,Ne.encoder,R,"key",v);return[C(Z)+"="+C(h(k,Ne.encoder,R,"value",v))]}return[C(t)+"="+C(String(k))]}var N=[];if(typeof k>"u")return N;var W;if(i==="comma"&&Ot(k))x&&h&&(k=sr.maybeMap(k,h)),W=[{value:k.length>0?k.join(",")||null:void 0}];else if(Ot(c))W=c;else{var le=Object.keys(k);W=f?le.sort(f):le}for(var Ee=n&&Ot(k)&&k.length===1?t+"[]":t,de=0;de<W.length;++de){var $=W[de],Q=typeof $=="object"&&typeof $.value<"u"?$.value:k[$];if(!(l&&Q===null)){var se=Ot(k)?typeof i=="function"?i(Ee,$):Ee:Ee+(m?"."+$:"["+$+"]");L.set(e,P);var De=Rl();De.set(Gs,L),Sl(N,s(Q,se,i,n,o,l,i==="comma"&&x&&Ot(k)?null:h,c,f,m,b,v,C,x,R,De))}}return N},Wp=function(e){if(!e)return Ne;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||Ne.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=fn.default;if(typeof e.format<"u"){if(!zp.call(fn.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=fn.formatters[i],o=Ne.filter;return(typeof e.filter=="function"||Ot(e.filter))&&(o=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ne.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Ne.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ne.charsetSentinel,delimiter:typeof e.delimiter>"u"?Ne.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ne.encode,encoder:typeof e.encoder=="function"?e.encoder:Ne.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ne.encodeValuesOnly,filter:o,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ne.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ne.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ne.strictNullHandling}},$p=function(s,e){var t=s,i=Wp(e),n,o;typeof i.filter=="function"?(o=i.filter,t=o("",t)):Ot(i.filter)&&(o=i.filter,n=o);var l=[];if(typeof t!="object"||t===null)return"";var h;e&&e.arrayFormat in Tl?h=e.arrayFormat:e&&"indices"in e?h=e.indices?"indices":"repeat":h="indices";var c=Tl[h];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=c==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var m=Rl(),b=0;b<n.length;++b){var v=n[b];i.skipNulls&&t[v]===null||Sl(l,Vp(t[v],v,c,f,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,m))}var C=l.join(i.delimiter),x=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),C.length>0?x+C:""},Ai=_l,Us=Object.prototype.hasOwnProperty,Gp=Array.isArray,Le={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ai.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Up=function(s){return s.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Ml=function(s,e){return s&&typeof s=="string"&&e.comma&&s.indexOf(",")>-1?s.split(","):s},jp="utf8=%26%2310003%3B",Kp="utf8=%E2%9C%93",qp=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,l=n.split(t.delimiter,o),h=-1,c,f=t.charset;if(t.charsetSentinel)for(c=0;c<l.length;++c)l[c].indexOf("utf8=")===0&&(l[c]===Kp?f="utf-8":l[c]===jp&&(f="iso-8859-1"),h=c,c=l.length);for(c=0;c<l.length;++c)if(c!==h){var m=l[c],b=m.indexOf("]="),v=b===-1?m.indexOf("="):b+1,C,x;v===-1?(C=t.decoder(m,Le.decoder,f,"key"),x=t.strictNullHandling?null:""):(C=t.decoder(m.slice(0,v),Le.decoder,f,"key"),x=Ai.maybeMap(Ml(m.slice(v+1),t),function(R){return t.decoder(R,Le.decoder,f,"value")})),x&&t.interpretNumericEntities&&f==="iso-8859-1"&&(x=Up(x)),m.indexOf("[]=")>-1&&(x=Gp(x)?[x]:x),Us.call(i,C)?i[C]=Ai.combine(i[C],x):i[C]=x}return i},Yp=function(s,e,t,i){for(var n=i?e:Ml(e,t),o=s.length-1;o>=0;--o){var l,h=s[o];if(h==="[]"&&t.parseArrays)l=[].concat(n);else{l=t.plainObjects?Object.create(null):{};var c=h.charAt(0)==="["&&h.charAt(h.length-1)==="]"?h.slice(1,-1):h,f=parseInt(c,10);!t.parseArrays&&c===""?l={0:n}:!isNaN(f)&&h!==c&&String(f)===c&&f>=0&&t.parseArrays&&f<=t.arrayLimit?(l=[],l[f]=n):c!=="__proto__"&&(l[c]=n)}n=l}return n},Xp=function(e,t,i,n){if(e){var o=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,h=/(\[[^[\]]*])/g,c=i.depth>0&&l.exec(o),f=c?o.slice(0,c.index):o,m=[];if(f){if(!i.plainObjects&&Us.call(Object.prototype,f)&&!i.allowPrototypes)return;m.push(f)}for(var b=0;i.depth>0&&(c=h.exec(o))!==null&&b<i.depth;){if(b+=1,!i.plainObjects&&Us.call(Object.prototype,c[1].slice(1,-1))&&!i.allowPrototypes)return;m.push(c[1])}return c&&m.push("["+o.slice(c.index)+"]"),Yp(m,t,i,n)}},Jp=function(e){if(!e)return Le;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?Le.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?Le.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Le.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Le.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Le.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Le.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Le.comma,decoder:typeof e.decoder=="function"?e.decoder:Le.decoder,delimiter:typeof e.delimiter=="string"||Ai.isRegExp(e.delimiter)?e.delimiter:Le.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Le.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Le.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Le.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Le.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Le.strictNullHandling}},Zp=function(s,e){var t=Jp(e);if(s===""||s===null||typeof s>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof s=="string"?qp(s,t):s,n=t.plainObjects?Object.create(null):{},o=Object.keys(i),l=0;l<o.length;++l){var h=o[l],c=Xp(h,i[h],t,typeof s=="string");n=Ai.merge(n,c,t)}return t.allowSparse===!0?n:Ai.compact(n)},Qp=$p,em=Zp,tm=Ws,im={formats:tm,parse:em,stringify:Qp};const nm=lf(im);function rm(s){let e=[];function t(i){for(let n in i)typeof i[n]=="object"&&i[n]!==null&&(!["schema","columns"].includes(n)&&!U.has(i[n],"schema")&&U.get(i[n],"type")!="group"?(i[n].field=n,e.push(i[n])):t(i[n]))}return t(s),e}const{event:Ht}=tt.emitter,sm=(s="myStore")=>Xa.defineStore(s,{state:()=>({mainKey:"",form:{},items:{},routes:{},fields:[],options:[],filters:[],loadings:{},structure:{},paginations:{},searchParam:"",isEditing:!1,panelName:!1,hiddenActions:[],isFiltering:!1,sorts:["id:desc"],selected:new Set([])}),getters:{getItems(e){return t=>U.get(e.items,t,[])},getPaginations(e){return t=>U.get(e.paginations,t,[])},mainItems(e){return U.get(e.items,e.mainKey,[])},mainPagination(e){return this.getPaginations(e.mainKey)},mainRoute(e){return U.get(e.routes,e.mainKey,"")},flatFields(e){let t=rm(e.fields);return t.unshift(d.reactive({title:"",type:"hidden",value:"_select_",field:"_select_",align:"center",headerSort:!1})),t},formFields(e){return e.fields},flatFieldsWithoutActions(){return this.flatFields.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))},headers(){return um(this.flatFields)},headersWithoutActions(){return this.headers.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(e,t){this.items[e]=t},addData(e){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey]=[e,...this.items[this.mainKey]]},editData(e){let t=this.items[this.mainKey];t=t.map(i=>i.id==e.id?{_index_:i._index_,...e}:i),this.items[this.mainKey]=[...t]},removeData(e){let t=this.items[this.mainKey];t=t.filter(i=>i.id!=e),this.items[this.mainKey]=[...t]},getModelKey(e){let t=typeof e=="string"?e.substr(e.lastIndexOf("/")+1):e.key;return this.mainKey=this.mainKey||Cs(t),Cs(t)},setPagination(e,t){t in this.paginations||(this.paginations[t]={total:0,currentPage:0,lastPage:0}),this.paginations[t].total=U.get(e,"total"),this.paginations[t].currentPage=U.get(e,"current_page"),this.paginations[t].lastPage=U.get(e,"last_page")},paginate(e){this.isFiltering?this.getWithFilter(e):this.loadItems(this.mainKey,e)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},loadItemsPlus(e=this.mainKey,t=1,i="",n=()=>{},o=!0){let l=U.get(this.routes,e,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[e]=!0;const h=U.get(this.routes,e,"")+l+t+"&"+i;St.get(h).then(c=>{if(c=U.get(c,"data",{}),Array.isArray(this.items[e])||(this.items[e]=[]),o)for(const f of c.data)this.items[e].push(f);else this.items[e]=c.data;this.setPagination(c,e)}).finally(()=>{n(),this.loadings[e]=!1})},convertToFilterForm(){var t;let e={};for(const i of this.filters)(t=i==null?void 0:i.field)!=null&&t.field&&(e[i.field.field]={[i.op]:i.value});return nm.stringify({filters:e,sort:this.sorts},{encodeValuesOnly:!0})},async loadItems(e=this.mainKey,t=1){let i=U.get(this.routes,e,"").indexOf("?")>-1?"&page=":"?page=";i+=t,this.searchParam&&(i+="&search="+this.searchParam),this.loadings[e]=!0,this.loadings.mainLoading=e===this.mainKey;const n=U.get(this.routes,e,"")+i+"&"+this.convertToFilterForm();return St.get(n).then(o=>{o=U.get(o,"data",{}),this.items[e]=U.get(o,"data"),this.setPagination(o,e)}).finally(()=>{this.loadings[e]=!1,this.loadings.mainLoading=!1})},customLoadItems(e,t=1,i=()=>({})){this.loadings[e]=!0,i(n=>{this.items[e]=n.data,this.setPagination(n,e)},()=>{},()=>{this.loadings[e]=!1},t)},getWithFilter(e=1,t=15){const i="http://192.168.190.10:9090/api/filter";this.loadings.filter=!0,St.post(`${i}?page=${e}`,{model:this.mainKey,itemPerPage:t,filters:this.filters}).then(n=>{n=U.get(n,"data",{}),this.items[this.mainKey]=n.data,this.setPagination(n,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(e){this.loadings.mainLoading=!0;let t=this.routes[this.mainKey],i=Dl(e,this.flatFields);St.post(t,i).then(async n=>{n=U.get(n,"data",{});let o=U.get(n,"data");this.addData(o),Ht("alert",{text:"با موفقیت ثبت شد",color:"green"}),Ht("handleDialogForm",!1)}).catch(n=>{Ht("alert",{text:U.get(n,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(e){let t=this.routes[this.mainKey].split("?")[0],i=Dl(e,this.flatFields);this.loadings.mainLoading=!0,St.patch(t+"/"+e.id,i).then(async n=>{n=U.get(n,"data",{});const o=U.get(n,"data",{});this.editData(o),Ht("alert",{text:"با موفقیت ویرایش شد",color:"green"}),Ht("handleDialogForm",!1)}).catch(n=>{Ht("alert",{text:U.get(n,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(e){const t=Array.isArray(e)?e:[e];let i=this.routes[this.mainKey].split("?")[0];this.loadings.mainLoading=!0,t.forEach(n=>{St.delete(i+"/"+n).then(()=>{Ht("alert",{text:"با موفقیت حذف شد",color:"green"}),Ht("handleDeleteDialog",!1),this.removeData(e)}).catch(o=>{Ht("alert",{text:U.get(o,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),om=s=>sm(s)();let Ll={};function Dl(s,e){let t={},i=!1;for(let n in s){let o=lm(n,e);if(!o)continue;i=!0;let l=am(o),h=n;U.has(o,"valueProp")&&(h+="."+U.get(o,"valueProp","")),t[l]=U.get(s,h)}return i?t:s}function am(s){return"sendKey"in s?s.sendKey:s.field}function lm(s,e){return e.find(t=>t.field==s)}function um(s){let e=s.filter(i=>i.isHeader);e.push({title:"",value:"_actions_",field:"_actions_",type:"text",align:"left",headerSort:!1,hozAlign:"left",headerHozAlign:"left"});let t=0;return s.find(i=>i.field==="_select_"&&i.isHeader)&&(t=1),e.splice(t,0,{title:"#",type:"text",value:"_index_",field:"_index_",align:"center",headerSort:!1}),e}function hm(s){for(const e of s)"init"in e&&e.init()}const cm=s=>{const e=U.get(Ll,s);return e?d.markRaw(e):""},dm=s=>({url:e,key:t,foreignKey:i,dataKey:n}={url:!1,key:!1,foreignKey:!1,dataKey:!1})=>async(...o)=>{let l=o[0],h=e;i&&n&&(h+=h.includes("?")?"&":"?",h+=`filters[${i}][$eq]={${n}}`);const c=v=>{let C=v.substr(v.lastIndexOf("/")+1);return Cs(C)};typeof route=="string"&&(t=c(h)),(h.match(/\{(.*?)\}/g)||[]).forEach(v=>{const C=v.replace(/[{}]/g,"");h=h.replace(v,U.get(s.form,C,""))});const m=h.includes("?")?"&":"?",b=await St.get(h+m+"search="+(l||""));return U.get(b,"data.data",[])},fm=(s,e)=>s({getRegisterField:cm,axios:St,get:dm(e),getSafe:U.get}),Al=s=>{Ll=s};function pm({fields:s,hiddenActions:e,options:t,route:i}){const n=om("Store-"+parseInt(Math.random()*1e7));n.fields=fm(s,n),tt.emitter.event("beforeFormueInit");const o=n.getModelKey(i);return n.routes[o]=typeof i=="string"?i:i==null?void 0:i.route,n.loadItems(),n.options=t,n.hiddenActions=e,hm(n.flatFields),n}class Ke{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t){return this.table.deprecationAdvisor.check(e,t)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class ve{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static deepClone(e,t,i=[]){var n={}.__proto__,o=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var l in e){let h=e[l],c,f;h!=null&&typeof h=="object"&&(h.__proto__===n||h.__proto__===o)&&(c=i.findIndex(m=>m.subject===h),c>-1?t[l]=i[c].copy:(f=Object.assign(Array.isArray(h)?[]:{},h),i.unshift({subject:h,copy:f}),t[l]=this.deepClone(h,f,i)))}return t}}class js extends Ke{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,n=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let o=ve.elOffset(this.container);i-=o.left,n-=o.top}return{x:i,y:n}}elementPositionCoords(e,t="right"){var i=ve.elOffset(e),n,o,l;switch(this.container!==document.body&&(n=ve.elOffset(this.container),i.left-=n.left,i.top-=n.top),t){case"right":o=i.left+e.offsetWidth,l=i.top-1;break;case"bottom":o=i.left,l=i.top+e.offsetHeight;break;case"left":o=i.left,l=i.top-1;break;case"top":o=i.left,l=i.top;break;case"center":o=i.left+e.offsetWidth/2,l=i.top+e.offsetHeight/2;break}return{x:o,y:l,offset:i}}show(e,t){var i,n,o,l,h;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(o=e,h=this.elementPositionCoords(e,t),l=h.offset,i=h.x,n=h.y):typeof e=="number"?(l={top:0,left:0},i=e,n=t):(h=this.containerEventCoords(e),i=h.x,n=h.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,n,o,l,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",c=>{c.stopPropagation()}),this)}_fitToScreen(e,t,i,n,o){var l=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;if((e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-n.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0),t+this.element.offsetHeight>Math.max(this.container.offsetHeight,l?this.container.scrollHeight:0))if(i)switch(o){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new js(this.table,e,this),this.childPopup}}class ie extends Ke{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(n=>n.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new js(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var mm={};class Fi extends ie{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var o="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),l;e.definition[o]&&(l=this.lookupAccessor(e.definition[o]),l&&(t=!0,i[o]={accessor:l,params:e.definition[o+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Fi.accessors[e]?t=Fi.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),o=ve.deepClone(e.data||{});return this.table.columnManager.traverse(function(l){var h,c,f,m;l.modules.accessor&&(c=l.modules.accessor[i]||l.modules.accessor.accessor||!1,c&&(h=l.getFieldValue(o),h!="undefined"&&(m=l.getComponent(),f=typeof c.params=="function"?c.params(h,o,t,m,n):c.params,l.setFieldValue(o,c.accessor(h,o,t,f,m,n)))))}),o}}Fi.moduleName="accessor",Fi.accessors=mm;var gm={method:"GET"};function Ks(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,o)=>{t=t.concat(Ks(n,e?e+"["+o+"]":o))});else if(typeof s=="object")for(var i in s)t=t.concat(Ks(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}function bm(s){var e=Ks(s),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function Fl(s,e,t){return s&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",s+=(s.includes("?")?"&":"?")+bm(t)),s}function vm(s,e,t){var i;return new Promise((n,o)=>{if(s=this.urlGenerator.call(this.table,s,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var l in i.headers)e.headers||(e.headers={}),typeof e.headers[l]>"u"&&(e.headers[l]=i.headers[l]);e.body=i.body.call(this,s,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);s?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(s,e).then(h=>{h.ok?h.json().then(c=>{n(c)}).catch(c=>{o(c),console.warn("Ajax Load Error - Invalid JSON returned",c)}):(console.error("Ajax Load Error - Connection Error: "+h.status,h.statusText),o(h))}).catch(h=>{console.error("Ajax Load Error - Connection Error: ",h),o(h)})):(console.warn("Ajax Load Error - No URL Set"),n([]))})}function qs(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,o)=>{t=t.concat(qs(n,e?e+"["+o+"]":o))});else if(typeof s=="object")for(var i in s)t=t.concat(qs(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}var wm={json:{headers:{"Content-Type":"application/json"},body:function(s,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(s,e,t){var i=qs(t),n=new FormData;return i.forEach(function(o){n.append(o.key,o.value)}),n}}};class wt extends ie{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=wt.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||wt.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||wt.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,n){var o=this.table.options.ajaxParams;return o&&(typeof o=="function"&&(o=o.call(this.table)),n=Object.assign(n,o)),n}requestDataCheck(e,t,i,n){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,n,o){var l;return!o&&this.requestDataCheck(e)?(e&&this.setUrl(e),l=this.generateConfig(i),this.sendRequest(this.url,t,l)):o}setDefaultConfig(e={}){this.config=Object.assign({},wt.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n)):Promise.reject()}}wt.moduleName="ajax",wt.defaultConfig=gm,wt.defaultURLGenerator=Fl,wt.defaultLoaderPromise=vm,wt.contentTypeFormatters=wm;var ym={replace:function(s){return this.table.setData(s)},update:function(s){return this.table.updateOrAddData(s)},insert:function(s){return this.table.addData(s)}},Cm={table:function(s){var e=[],t=!0,i=this.table.columnManager.columns,n=[],o=[];return s=s.split(`
|
31
|
+
`),s.forEach(function(l){e.push(l.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(l){var h=i.find(function(c){return l&&c.definition.title&&l.trim()&&c.definition.title.trim()===l.trim()});h?n.push(h):t=!1}),t||(t=!0,n=[],e[0].forEach(function(l){var h=i.find(function(c){return l&&c.field&&l.trim()&&c.field.trim()===l.trim()});h?n.push(h):t=!1}),t||(n=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(l){var h={};l.forEach(function(c,f){n[f]&&(h[n[f].field]=c)}),o.push(h)}),o):!1}};class di extends ie{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,n;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(n=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(n),t=i?this.generatePlainContent(n):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var n=[];i.columns.forEach(o=>{var l="";if(o)if(i.type==="group"&&(o.value=o.component.getKey()),o.value===null)l="";else switch(typeof o.value){case"object":l=JSON.stringify(o.value);break;case"undefined":l="";break;default:l=o.value}n.push(l)}),t.push(n.join(" "))}),t.join(`
|
32
|
+
`)}copy(e,t){var i,n;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(n=document.body.createTextRange(),n.moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=di.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=di.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,n;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPaseOrigin(e){var t=!0;return(e.target.tagName!="DIV"||this.table.modules.edit.currentCell)&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}di.moduleName="clipboard",di.pasteActions=ym,di.pasteParsers=Cm;class Em{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class Pl{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class pn extends Ke{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},n={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=n[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var o=this.column.definition.cssClass.split(" ");o.forEach(l=>{e.classList.add(l)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var n=this.setValueProcessData(e,t,i);n&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var n=!1;return(this.value!==e||i)&&(n=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),n&&this.dispatch("cell-value-changed",this),n}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new Pl(this)),this.component}}class Ol{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.parent instanceof Lt?this._column.parent.getComponent():!1}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Hl={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class Lt extends Ke{constructor(e,t){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((i,n)=>{var o=new Lt(i,this);this.attachColumn(o)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(Lt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Lt.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",n=>{n.stopPropagation(),i.focus()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,n=>{i.value=n||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,n=>{this._formatColumnHeaderTitle(t,n||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,n=i.length,o;for(let l=0;l<n&&(t=t[i[l]],o=t,!!t);l++);return o}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,n=this.fieldStructure,o=n.length;for(let l=0;l<o;l++)if(l==o-1)i[n[l]]=t;else{if(!i[n[l]])if(typeof t<"u")i[n[l]]={};else break;i=i[n[l]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(n){n.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(n){n.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let n=0;n<i;n++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new pn(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(n=>{n.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(n=>{var o=n.getWidth();o>t&&(t=o)}),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new Ol(this)),this.component}}Lt.defaultOptionList=Hl;class or{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class $e extends Ke{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach(function(n){var o=n.getHeight();o>t&&(t=o)}),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&ve.elVisible(this.element),i={},n;return new Promise((o,l)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),n=this.chain("row-data-changing",[this,i,e],null,e);for(let h in n)this.data[h]=n[h];this.dispatch("row-data-save-after",this);for(let h in e)this.table.columnManager.getColumnsByFieldRoot(h).forEach(f=>{let m=this.getCell(f.getField());if(m){let b=f.getFieldValue(n);m.getValue()!==b&&(m.setValueProcessData(b),t&&m.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),o()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new or(this)),this.component}}var xm={avg:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:2;return s.length&&(i=s.reduce(function(o,l){return Number(o)+Number(l)}),i=i/s.length,i=n!==!1?i.toFixed(n):i),parseFloat(i).toString()},max:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(o){o=Number(o),(o>i||i===null)&&(i=o)}),i!==null?n!==!1?i.toFixed(n):i:""},min:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(o){o=Number(o),(o<i||i===null)&&(i=o)}),i!==null?n!==!1?i.toFixed(n):i:""},sum:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:!1;return s.length&&s.forEach(function(o){o=Number(o),i+=isNaN(o)?0:Number(o)}),n!==!1?i.toFixed(n):i},concat:function(s,e,t){var i=0;return s.length&&(i=s.reduce(function(n,o){return String(n)+String(o)})),i},count:function(s,e,t){var i=0;return s.length&&s.forEach(function(n){n&&i++}),i},unique:function(s,e,t){var i=s.filter((n,o)=>(s||n===0)&&s.indexOf(n)===o);return i.length}};class Zt extends ie{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new Lt({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":Zt.calculations[t.topCalc]?i.topCalc=Zt.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":Zt.calculations[t.bottomCalc]?i.botCalc=Zt.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){this.topInitialized||(this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[];return e.forEach(i=>{if(t.push(i.getData()),this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs&&i.modules.dataTree&&i.modules.dataTree.open){var n=this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(i));t=t.concat(n)}}),t}generateRow(e,t){var i=this.generateRowData(e,t),n;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),n=new $e(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),n.component=!1,n.getComponent=()=>(n.component||(n.component=new Em(n)),n.component),n.generateCells=()=>{var o=[];this.table.columnManager.columnsByIndex.forEach(l=>{this.genColumn.setField(l.getField()),this.genColumn.hozAlign=l.hozAlign,l.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(l.definition[e+"CalcFormatter"]),params:l.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=l.definition.cssClass;var h=new pn(this.genColumn,n);h.getElement(),h.column=l,h.setWidth(),l.cells.push(h),o.push(h),l.visible||h.hide()}),n.cells=o},n}generateRowData(e,t){var i={},n=e=="top"?this.topCalcs:this.botCalcs,o=e=="top"?"topCalc":"botCalc",l,h;return n.forEach(function(c){var f=[];c.modules.columnCalcs&&c.modules.columnCalcs[o]&&(t.forEach(function(m){f.push(c.getFieldValue(m))}),h=o+"Params",l=typeof c.modules.columnCalcs[h]=="function"?c.modules.columnCalcs[h](f,t):c.modules.columnCalcs[h],c.setFieldValue(i,c.modules.columnCalcs[o](f,t,l)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),n={},o={};return i.forEach(l=>{n[l.getKey()]=this.getGroupResults(l)}),o={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:n},o}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}Zt.moduleName="columnCalcs",Zt.calculations=xm;class zl extends ie{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,n){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,n){return t.dataTreeStartExpanded[n]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),n=i||!i&&typeof t=="object"&&t!==null;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:n?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&n?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&n?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:n}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(n.branchEl,i.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,n=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",o=>{o.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,n)=>{var o,l;t.push(i),i instanceof $e&&(i.create(),o=i.modules.dataTree,!o.index&&o.children!==!1&&(l=this.getChildren(i),l.forEach(h=>{h.create(),t.push(h)})))}),t}getChildren(e,t){var i=e.modules.dataTree,n=[],o=[];return i.children!==!1&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(i.children):n=i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach(l=>{o.push(l);var h=this.getChildren(l);h.forEach(c=>{o.push(c)})})),o}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(n=>{var o=new $e(n||{},this.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=this.startOpen(o.getComponent(),o.modules.dataTree.index)),t.push(o)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],n;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(t.children):n=t.children,n.forEach(o=>{o instanceof $e&&i.push(o)})),i}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,n){var o=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof n<"u"&&(o=this.findChildIndex(n,e),o!==!1&&e.data[this.field].splice(i?o:o+1,0,t)),o===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof $e?i=e.data:e instanceof or?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(n=>n instanceof $e?n.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(n=>n.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var n=e.modules.dataTree,o=[];return n&&n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(l=>{l instanceof $e&&(o.push(t?l.getComponent():l),i&&(o=o.concat(this.getTreeChildren(l,t,i))))})),o}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}zl.moduleName="dataTree";function _m(s,e={},t){var i=e.delimiter?e.delimiter:",",n=[],o=[];s.forEach(l=>{var h=[];switch(l.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":l.columns.forEach((c,f)=>{c&&c.depth===1&&(o[f]=typeof c.value>"u"||c.value===null?"":'"'+String(c.value).split('"').join('""')+'"')});break;case"row":l.columns.forEach(c=>{if(c){switch(typeof c.value){case"object":c.value=c.value!==null?JSON.stringify(c.value):"";break;case"undefined":c.value="";break}h.push('"'+String(c.value).split('"').join('""')+'"')}}),n.push(h.join(i));break}}),o.length&&n.unshift(o.join(i)),n=n.join(`
|
33
|
+
`),e.bom&&(n="\uFEFF"+n),t(n,"text/csv")}function Rm(s,e,t){var i=[];s.forEach(n=>{var o={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(l=>{l&&(o[l.component.getTitleDownload()||l.component.getField()]=l.value)}),i.push(o);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function Tm(s,e={},t){var i=[],n=[],o={},l=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},h=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=e.jsPDF||{},f=e.title?e.title:"";c.orientation||(c.orientation=e.orientation||"landscape"),c.unit||(c.unit="pt"),s.forEach(v=>{switch(v.type){case"header":i.push(m(v));break;case"group":n.push(m(v,l));break;case"calc":n.push(m(v,h));break;case"row":n.push(m(v));break}});function m(v,C){var x=[];return v.columns.forEach(R=>{var L;if(R){switch(typeof R.value){case"object":R.value=R.value!==null?JSON.stringify(R.value):"";break;case"undefined":R.value="";break}L={content:R.value,colSpan:R.width,rowSpan:R.height},C&&(L.styles=C),x.push(L)}}),x}var b=new jspdf.jsPDF(c);e.autoTable&&(typeof e.autoTable=="function"?o=e.autoTable(b)||{}:o=e.autoTable),f&&(o.didDrawPage=function(v){b.text(f,40,30)}),o.head=i,o.body=n,b.autoTable(o),e.documentProcessing&&e.documentProcessing(b),t(b.output("arraybuffer"),"application/pdf")}function Sm(s,e,t){var i=this,n=e.sheetName||"Sheet1",o=XLSX.utils.book_new(),l=new Ke(this),h="compress"in e?e.compress:!0,c=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:h},f;c.type="binary",o.SheetNames=[],o.Sheets={};function m(){var C=[],x=[],R={},L={s:{c:0,r:0},e:{c:s[0]?s[0].columns.reduce((k,H)=>k+(H&&H.width?H.width:1),0):0,r:s.length}};return s.forEach((k,H)=>{var P=[];k.columns.forEach(function(z,V){z?(P.push(!(z.value instanceof Date)&&typeof z.value=="object"?JSON.stringify(z.value):z.value),(z.width>1||z.height>-1)&&(z.height>1||z.width>1)&&x.push({s:{r:H,c:V},e:{r:H+z.height-1,c:V+z.width-1}})):P.push("")}),C.push(P)}),XLSX.utils.sheet_add_aoa(R,C),R["!ref"]=XLSX.utils.encode_range(L),x.length&&(R["!merges"]=x),R}if(e.sheetOnly){t(m());return}if(e.sheets)for(var b in e.sheets)e.sheets[b]===!0?(o.SheetNames.push(b),o.Sheets[b]=m()):(o.SheetNames.push(b),l.commsSend(e.sheets[b],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(C){o.Sheets[b]=C}}));else o.SheetNames.push(n),o.Sheets[n]=m();e.documentProcessing&&(o=e.documentProcessing(o));function v(C){for(var x=new ArrayBuffer(C.length),R=new Uint8Array(x),L=0;L!=C.length;++L)R[L]=C.charCodeAt(L)&255;return x}f=XLSX.write(o,c),t(v(f),"application/octet-stream")}function km(s,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(s),"text/html")}function Mm(s,e,t){const i=[];s.forEach(n=>{const o={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(l=>{l&&(o[l.component.getTitleDownload()||l.component.getField()]=l.value)}),i.push(JSON.stringify(o));break}}),t(i.join(`
|
34
|
+
`),"application/x-ndjson")}var Lm={csv:_m,json:Rm,jsonLines:Mm,pdf:Tm,xlsx:Sm,html:km};class Pi extends ie{constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}downloadToTab(e,t,i,n){this.download(e,t,i,n,!0)}download(e,t,i,n,o){var l=!1;function h(f,m){o?o===!0?this.triggerDownload(f,m,e,t,!0):o(f):this.triggerDownload(f,m,e,t)}if(typeof e=="function"?l=e:Pi.downloaders[e]?l=Pi.downloaders[e]:console.warn("Download Error - No such download type found: ",e),l){var c=this.generateExportList(n);l.call(this.table,c,i||{},h.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(n=>{var o;n.type==="group"&&(o=n.columns[0],i&&i[n.indent]&&(o.value=i[n.indent](o.value,n.component._group.getRowCount(),n.component._group.getData(),n.component)))}),t}triggerDownload(e,t,i,n,o){var l=document.createElement("a"),h=this.table.options.downloadEncoder(e,t);h&&(o?window.open(window.URL.createObjectURL(h)):(n=n||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(h,n):(l.setAttribute("href",window.URL.createObjectURL(h)),l.setAttribute("download",n),l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}Pi.moduleName="download",Pi.downloaders=Lm;function ar(s,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",n=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",o=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function l(h){var c=t[h];typeof c<"u"&&c!==o&&c!==i&&c!==n&&(s.value=s.value+""+c,l(h+1))}s.addEventListener("keydown",h=>{var c=s.value.length,f=h.key;if(h.keyCode>46&&!h.ctrlKey&&!h.metaKey){if(c>=t.length)return h.preventDefault(),h.stopPropagation(),!1;switch(t[c]){case i:if(f.toUpperCase()==f.toLowerCase())return h.preventDefault(),h.stopPropagation(),!1;break;case n:if(isNaN(f))return h.preventDefault(),h.stopPropagation(),!1;break;case o:break;default:if(f!==t[c])return h.preventDefault(),h.stopPropagation(),!1}}}),s.addEventListener("keyup",h=>{h.keyCode>46&&e.maskAutoFill&&l(s.value.length)}),s.placeholder||(s.placeholder=t),e.maskAutoFill&&l(s.value.length)}function Dm(s,e,t,i,n){var o=s.getValue(),l=document.createElement("input");if(l.setAttribute("type",n.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let c in n.elementAttributes)c.charAt(0)=="+"?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=typeof o<"u"?o:"",e(function(){s.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%",n.selectContents&&l.select())});function h(c){(o===null||typeof o>"u")&&l.value!==""||l.value!==o?t(l.value)&&(o=l.value):i()}return l.addEventListener("change",h),l.addEventListener("blur",h),l.addEventListener("keydown",function(c){switch(c.keyCode){case 13:h();break;case 27:i();break;case 35:case 36:c.stopPropagation();break}}),n.mask&&ar(l,n),l}function Am(s,e,t,i,n){var o=s.getValue(),l=n.verticalNavigation||"hybrid",h=String(o!==null&&typeof o<"u"?o:""),c=document.createElement("textarea"),f=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",n.elementAttributes&&typeof n.elementAttributes=="object")for(let b in n.elementAttributes)b.charAt(0)=="+"?(b=b.slice(1),c.setAttribute(b,c.getAttribute(b)+n.elementAttributes["+"+b])):c.setAttribute(b,n.elementAttributes[b]);c.value=h,e(function(){s.getType()==="cell"&&(c.focus({preventScroll:!0}),c.style.height="100%",c.scrollHeight,c.style.height=c.scrollHeight+"px",s.getRow().normalizeHeight(),n.selectContents&&c.select())});function m(b){(o===null||typeof o>"u")&&c.value!==""||c.value!==o?(t(c.value)&&(o=c.value),setTimeout(function(){s.getRow().normalizeHeight()},300)):i()}return c.addEventListener("change",m),c.addEventListener("blur",m),c.addEventListener("keyup",function(){c.style.height="";var b=c.scrollHeight;c.style.height=b+"px",b!=f&&(f=b,s.getRow().normalizeHeight())}),c.addEventListener("keydown",function(b){switch(b.keyCode){case 13:b.shiftKey&&n.shiftEnterSubmit&&m();break;case 27:i();break;case 38:(l=="editor"||l=="hybrid"&&c.selectionStart)&&(b.stopImmediatePropagation(),b.stopPropagation());break;case 40:(l=="editor"||l=="hybrid"&&c.selectionStart!==c.value.length)&&(b.stopImmediatePropagation(),b.stopPropagation());break;case 35:case 36:b.stopPropagation();break}}),n.mask&&ar(c,n),c}function Fm(s,e,t,i,n){var o=s.getValue(),l=n.verticalNavigation||"editor",h=document.createElement("input");if(h.setAttribute("type","number"),typeof n.max<"u"&&h.setAttribute("max",n.max),typeof n.min<"u"&&h.setAttribute("min",n.min),typeof n.step<"u"&&h.setAttribute("step",n.step),h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let m in n.elementAttributes)m.charAt(0)=="+"?(m=m.slice(1),h.setAttribute(m,h.getAttribute(m)+n.elementAttributes["+"+m])):h.setAttribute(m,n.elementAttributes[m]);h.value=o;var c=function(m){f()};e(function(){s.getType()==="cell"&&(h.removeEventListener("blur",c),h.focus({preventScroll:!0}),h.style.height="100%",h.addEventListener("blur",c),n.selectContents&&h.select())});function f(){var m=h.value;!isNaN(m)&&m!==""&&(m=Number(m)),m!==o?t(m)&&(o=m):i()}return h.addEventListener("keydown",function(m){switch(m.keyCode){case 13:f();break;case 27:i();break;case 38:case 40:l=="editor"&&(m.stopImmediatePropagation(),m.stopPropagation());break;case 35:case 36:m.stopPropagation();break}}),n.mask&&ar(h,n),h}function Pm(s,e,t,i,n){var o=s.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),typeof n.max<"u"&&l.setAttribute("max",n.max),typeof n.min<"u"&&l.setAttribute("min",n.min),typeof n.step<"u"&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let c in n.elementAttributes)c.charAt(0)=="+"?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=o,e(function(){s.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%")});function h(){var c=l.value;!isNaN(c)&&c!==""&&(c=Number(c)),c!=o?t(c)&&(o=c):i()}return l.addEventListener("blur",function(c){h()}),l.addEventListener("keydown",function(c){switch(c.keyCode){case 13:h();break;case 27:i();break}}),l}function Om(s,e,t,i,n){var o=n.format,l=n.verticalNavigation||"editor",h=o?window.DateTime||luxon.DateTime:null,c=s.getValue(),f=document.createElement("input");function m(v){var C;return h.isDateTime(v)?C=v:o==="iso"?C=h.fromISO(String(v)):C=h.fromFormat(String(v),o),C.toFormat("yyyy-MM-dd")}if(f.type="date",f.style.padding="4px",f.style.width="100%",f.style.boxSizing="border-box",n.max&&f.setAttribute("max",o?m(n.max):n.max),n.min&&f.setAttribute("min",o?m(n.min):n.min),n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),f.setAttribute(v,f.getAttribute(v)+n.elementAttributes["+"+v])):f.setAttribute(v,n.elementAttributes[v]);c=typeof c<"u"?c:"",o&&(h?c=m(c):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),f.value=c,e(function(){s.getType()==="cell"&&(f.focus({preventScroll:!0}),f.style.height="100%",n.selectContents&&f.select())});function b(){var v=f.value,C;if((c===null||typeof c>"u")&&v!==""||v!==c){if(v&&o)switch(C=h.fromFormat(String(v),"yyyy-MM-dd"),o){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(o)}t(v)&&(c=f.value)}else i()}return f.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==f)&&b()}),f.addEventListener("keydown",function(v){switch(v.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:l=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),f}function Hm(s,e,t,i,n){var o=n.format,l=n.verticalNavigation||"editor",h=o?window.DateTime||luxon.DateTime:null,c,f=s.getValue(),m=document.createElement("input");if(m.type="time",m.style.padding="4px",m.style.width="100%",m.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),m.setAttribute(v,m.getAttribute(v)+n.elementAttributes["+"+v])):m.setAttribute(v,n.elementAttributes[v]);f=typeof f<"u"?f:"",o&&(h?(h.isDateTime(f)?c=f:o==="iso"?c=h.fromISO(String(f)):c=h.fromFormat(String(f),o),f=c.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),m.value=f,e(function(){s.getType()=="cell"&&(m.focus({preventScroll:!0}),m.style.height="100%",n.selectContents&&m.select())});function b(){var v=m.value,C;if((f===null||typeof f>"u")&&v!==""||v!==f){if(v&&o)switch(C=h.fromFormat(String(v),"hh:mm"),o){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(o)}t(v)&&(f=m.value)}else i()}return m.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==m)&&b()}),m.addEventListener("keydown",function(v){switch(v.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:l=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),m}function zm(s,e,t,i,n){var o=n.format,l=n.verticalNavigation||"editor",h=o?window.DateTime||luxon.DateTime:null,c,f=s.getValue(),m=document.createElement("input");if(m.type="datetime-local",m.style.padding="4px",m.style.width="100%",m.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),m.setAttribute(v,m.getAttribute(v)+n.elementAttributes["+"+v])):m.setAttribute(v,n.elementAttributes[v]);f=typeof f<"u"?f:"",o&&(h?(h.isDateTime(f)?c=f:o==="iso"?c=h.fromISO(String(f)):c=h.fromFormat(String(f),o),f=c.toFormat("yyyy-MM-dd")+"T"+c.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),m.value=f,e(function(){s.getType()==="cell"&&(m.focus({preventScroll:!0}),m.style.height="100%",n.selectContents&&m.select())});function b(){var v=m.value,C;if((f===null||typeof f>"u")&&v!==""||v!==f){if(v&&o)switch(C=h.fromISO(String(v)),o){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(o)}t(v)&&(f=m.value)}else i()}return m.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==m)&&b()}),m.addEventListener("keydown",function(v){switch(v.keyCode){case 13:b();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:l=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),m}class Ys{constructor(e,t,i,n,o,l){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(l),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:n,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&ar(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(n=>t.includes(n)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(n=>typeof n.label<"u"&&n.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(n=>this.listIteration===i?this._parseList(n):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=Fl(e,{},i),fetch(e).then(n=>n.ok?n.json().catch(o=>(console.warn("List Ajax Load Error - Invalid JSON returned",o),Promise.reject(o))):(console.error("List Ajax Load Error - Connection Error: "+n.status,n.statusText),Promise.reject(n))).catch(n=>(console.error("List Ajax Load Error - Connection Error: ",n),Promise.reject(n)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),n;return e?n=this.table.columnManager.getColumnByField(e):n=this.cell.getColumn()._getSelf(),n?i.forEach(o=>{var l=n.getFieldValue(o);l!==null&&typeof l<"u"&&l!==""&&(t[l]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,n])=>({label:n,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var n={};e.options?n=this._parseListGroup(e,i+1):(n={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(n,!0)),t.push(n)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(n=>{this._parseListItem(n,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,n)=>e(i.label,n.label,i.value,n.value,i.original,n.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,n,o,l,h=0,c,f=/(\d+)|(\D+)/g,m=/\d/,b=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)b=!t&&t!==0?0:-1;else if(!t&&t!==0)b=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),n=String(t).toLowerCase(),i===n)return 0;if(!(m.test(i)&&m.test(n)))return i>n?1:-1;for(i=i.match(f),n=n.match(f),c=i.length>n.length?n.length:i.length;h<c;)if(o=i[h],l=n[h++],o!==l)return isFinite(o)&&isFinite(l)?(o.charAt(0)==="0"&&(o="."+o),l.charAt(0)==="0"&&(l="."+l),o-l):o>l?1:-1;return i.length>n.length}return b}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var n=!1;return i.group?(i.options.forEach(o=>{this._filterItem(e,t,o)&&(n=!0)}),i.visible=n):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,n){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let n in e.elementAttributes)n.charAt(0)=="+"?(n=n.slice(1),t.setAttribute(n,this.input.getAttribute(n)+e.elementAttributes["+"+n])):t.setAttribute(n,e.elementAttributes[n]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(n=>{this._buildItem(n)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(n=>n.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(n=>n.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}}function Nm(s,e,t,i,n){this.deprecationMsg("The select editor has been deprecated, please use the new list editor");var o=new Ys(this,s,e,t,i,n);return o.input}function Im(s,e,t,i,n){var o=new Ys(this,s,e,t,i,n);return o.input}function Bm(s,e,t,i,n){this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),n.autocomplete=!0;var o=new Ys(this,s,e,t,i,n);return o.input}function Vm(s,e,t,i,n){var o=this,l=s.getElement(),h=s.getValue(),c=l.getElementsByTagName("svg").length||5,f=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],b=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");function C(k){m.forEach(function(H,P){P<k?(o.table.browser=="ie"?H.setAttribute("class","tabulator-star-active"):H.classList.replace("tabulator-star-inactive","tabulator-star-active"),H.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(o.table.browser=="ie"?H.setAttribute("class","tabulator-star-inactive"):H.classList.replace("tabulator-star-active","tabulator-star-inactive"),H.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function x(k){var H=document.createElement("span"),P=v.cloneNode(!0);m.push(P),H.addEventListener("mouseenter",function(z){z.stopPropagation(),z.stopImmediatePropagation(),C(k)}),H.addEventListener("mousemove",function(z){z.stopPropagation(),z.stopImmediatePropagation()}),H.addEventListener("click",function(z){z.stopPropagation(),z.stopImmediatePropagation(),t(k),l.blur()}),H.appendChild(P),b.appendChild(H)}function R(k){h=k,C(k)}if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",b.style.verticalAlign="middle",b.style.display="inline-block",b.style.padding="4px",v.setAttribute("width",f),v.setAttribute("height",f),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px",n.elementAttributes&&typeof n.elementAttributes=="object")for(let k in n.elementAttributes)k.charAt(0)=="+"?(k=k.slice(1),b.setAttribute(k,b.getAttribute(k)+n.elementAttributes["+"+k])):b.setAttribute(k,n.elementAttributes[k]);for(var L=1;L<=c;L++)x(L);return h=Math.min(parseInt(h),c),C(h),b.addEventListener("mousemove",function(k){C(0)}),b.addEventListener("click",function(k){t(0)}),l.addEventListener("blur",function(k){i()}),l.addEventListener("keydown",function(k){switch(k.keyCode){case 39:R(h+1);break;case 37:R(h-1);break;case 13:t(h);break;case 27:i();break}}),b}function Wm(s,e,t,i,n){var o=s.getElement(),l=typeof n.max>"u"?o.getElementsByTagName("div")[0]&&o.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,h=typeof n.min>"u"?o.getElementsByTagName("div")[0]&&o.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,c=(l-h)/100,f=s.getValue()||0,m=document.createElement("div"),b=document.createElement("div"),v,C;function x(){var R=window.getComputedStyle(o,null),L=c*Math.round(b.offsetWidth/((o.clientWidth-parseInt(R.getPropertyValue("padding-left"))-parseInt(R.getPropertyValue("padding-right")))/100))+h;t(L),o.setAttribute("aria-valuenow",L),o.setAttribute("aria-label",f)}if(m.style.position="absolute",m.style.right="0",m.style.top="0",m.style.bottom="0",m.style.width="5px",m.classList.add("tabulator-progress-handle"),b.style.display="inline-block",b.style.position="relative",b.style.height="100%",b.style.backgroundColor="#488CE9",b.style.maxWidth="100%",b.style.minWidth="0%",n.elementAttributes&&typeof n.elementAttributes=="object")for(let R in n.elementAttributes)R.charAt(0)=="+"?(R=R.slice(1),b.setAttribute(R,b.getAttribute(R)+n.elementAttributes["+"+R])):b.setAttribute(R,n.elementAttributes[R]);return o.style.padding="4px 4px",f=Math.min(parseFloat(f),l),f=Math.max(parseFloat(f),h),f=Math.round((f-h)/c),b.style.width=f+"%",o.setAttribute("aria-valuemin",h),o.setAttribute("aria-valuemax",l),b.appendChild(m),m.addEventListener("mousedown",function(R){v=R.screenX,C=b.offsetWidth}),m.addEventListener("mouseover",function(){m.style.cursor="ew-resize"}),o.addEventListener("mousemove",function(R){v&&(b.style.width=C+R.screenX-v+"px")}),o.addEventListener("mouseup",function(R){v&&(R.stopPropagation(),R.stopImmediatePropagation(),v=!1,C=!1,x())}),o.addEventListener("keydown",function(R){switch(R.keyCode){case 39:R.preventDefault(),b.style.width=b.clientWidth+o.clientWidth/100+"px";break;case 37:R.preventDefault(),b.style.width=b.clientWidth-o.clientWidth/100+"px";break;case 9:case 13:x();break;case 27:i();break}}),o.addEventListener("blur",function(){i()}),b}function $m(s,e,t,i,n){var o=s.getValue(),l=document.createElement("input"),h=n.tristate,c=typeof n.indeterminateValue>"u"?null:n.indeterminateValue,f=!1,m=Object.keys(n).includes("trueValue"),b=Object.keys(n).includes("falseValue");if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let C in n.elementAttributes)C.charAt(0)=="+"?(C=C.slice(1),l.setAttribute(C,l.getAttribute(C)+n.elementAttributes["+"+C])):l.setAttribute(C,n.elementAttributes[C]);l.value=o,h&&(typeof o>"u"||o===c||o==="")&&(f=!0,l.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){s.getType()==="cell"&&l.focus({preventScroll:!0})}),l.checked=m?o===n.trueValue:o===!0||o==="true"||o==="True"||o===1;function v(C){var x=l.checked;return m&&x?x=n.trueValue:b&&!x&&(x=n.falseValue),h?C?f?c:x:l.checked&&!f?(l.checked=!1,l.indeterminate=!0,f=!0,c):(f=!1,x):x}return l.addEventListener("change",function(C){t(v())}),l.addEventListener("blur",function(C){t(v(!0))}),l.addEventListener("keydown",function(C){C.keyCode==13&&t(v()),C.keyCode==27&&i()}),l}var Gm={input:Dm,textarea:Am,number:Fm,range:Pm,date:Om,time:Hm,datetime:zm,select:Nm,list:Im,autocomplete:Bm,star:Vm,progress:Wm,tickCross:$m};class mn extends ie{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=mn.editors,this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})})))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(n=this.table.rowManager.prevDisplayRow(e.row,!0),n&&(i=this.findPrevEditableCell(n,n.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(n=this.table.rowManager.nextDisplayRow(e.row,!0),n&&(i=this.findNextEditableCell(n,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findPrevEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findNextEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.prevDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.nextDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var n=t+1;n<e.cells.length;n++){let o=e.cells[n];if(o.column.modules.edit&&ve.elVisible(o.getElement())&&this.allowEdit(o)){i=o;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var n=t-1;n>=0;n--){let o=e.cells[n];if(o.column.modules.edit&&ve.elVisible(o.getElement())&&this.allowEdit(o)){i=o;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(typeof e.definition.editor){case"string":this.editors[e.definition.editor]?t.editor=this.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":t.editor=e.definition.editor;break;case"boolean":e.definition.editor===!0&&(typeof e.definition.formatter!="function"?this.editors[e.definition.formatter]?t.editor=this.editors[e.definition.formatter]:t.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter));break}t.editor&&(e.modules.edit=t)}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("click",function(n){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(n){n.button===2?n.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(n){t.recursionBlock||t.edit(e,n,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop<t?this.table.rowManager.element.scrollTop-=t-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,l=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,h=e.getElement();this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin||0),l-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),l-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),h.offsetLeft<o?this.table.rowManager.element.scrollLeft-=o-h.offsetLeft:h.offsetLeft+h.offsetWidth>l&&(this.table.rowManager.element.scrollLeft+=h.offsetLeft+h.offsetWidth-l)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var n=this,o=!0,l=function(){},h=e.getElement(),c,f,m;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function b(L){if(n.currentCell===e){var k=n.chain("edit-success",[e,L],!0,!0);return k===!0||n.table.options.validationMode==="highlight"?(n.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,n.editedCells.indexOf(e)==-1&&n.editedCells.push(e),e.setValue(L,!0),k===!0):(n.invalidEdit=!0,n.focusCellNoEvent(e,!0),l(),!1)}}function v(){n.currentCell===e&&n.cancelEdit()}function C(L){l=L}if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;if(t&&t.stopPropagation(),o=this.allowEdit(e),o||i){if(n.cancelEdit(),n.currentCell=e,this.focusScrollAdjust(e),f=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,f)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,f),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",f),m=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(f):e.column.modules.edit.params,c=e.column.modules.edit.editor.call(n,f,C,b,v,m),this.currentCell&&c!==!1)if(c instanceof Node){for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(c),l();for(var x=h.children,R=0;R<x.length;R++)x[R].addEventListener("click",function(L){L.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",c),h.blur(),!1;else return h.blur(),!1;return!0}else return this.mouseClick=!1,h.blur(),!1}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}mn.moduleName="edit",mn.editors=Gm;class Nl{constructor(e,t,i,n){this.type=e,this.columns=t,this.component=i||!1,this.indent=n||0}}class Xs{constructor(e,t,i,n,o){this.value=e,this.component=t||!1,this.width=i,this.height=n,this.depth=o}}class Il extends ie{constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,n){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=n;var o=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders()):[],l=this.bodyToExportRows(this.rowLookup(i));return o.concat(l)}generateTable(e,t,i,n){var o=this.generateExportList(e,t,i,n);return this.generateTableElement(o)}rowLookup(e){var t=[];if(typeof e=="function")e.call(this.table).forEach(i=>{i=this.table.rowManager.findRow(i),i&&t.push(i)});else switch(e){case!0:case"visible":t=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":t=this.table.rowManager.rows;break;case"selected":t=this.table.modules.selectRow.selectedRows;break;case"active":default:this.table.options.pagination?t=this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):t=this.table.rowManager.getDisplayRows()}return Object.assign([],t)}generateColumnGroupHeaders(){var e=[],t=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex;return t.forEach(i=>{var n=this.processColumnGroup(i);n&&e.push(n)}),e}processColumnGroup(e){var t=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,o={title:n,column:e,depth:1};if(t.length){if(o.subGroups=[],o.width=0,t.forEach(l=>{var h=this.processColumnGroup(l);h&&(o.width+=h.width,o.subGroups.push(h),h.depth>i&&(i=h.depth))}),o.depth+=i,!o.width)return!1}else if(this.columnVisCheck(e))o.width=1;else return!1;return o}columnVisCheck(e){var t=e.definition[this.colVisProp];return typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t!==!1&&(e.visible||!e.visible&&t)}headersToExportRows(e){var t=[],i=0,n=[];function o(l,h){var c=i-h;if(typeof t[h]>"u"&&(t[h]=[]),l.height=l.subGroups?1:c-l.depth+1,t[h].push(l),l.height>1)for(let f=1;f<l.height;f++)typeof t[h+f]>"u"&&(t[h+f]=[]),t[h+f].push(!1);if(l.width>1)for(let f=1;f<l.width;f++)t[h].push(!1);l.subGroups&&l.subGroups.forEach(function(f){o(f,h+1)})}return e.forEach(function(l){l.depth>i&&(i=l.depth)}),e.forEach(function(l){o(l,0)}),t.forEach(l=>{var h=[];l.forEach(c=>{if(c){let f=typeof c.title>"u"?"":c.title;h.push(new Xs(f,c.column.getComponent(),c.width,c.height,c.depth))}else h.push(null)}),n.push(new Nl("header",h))}),n}bodyToExportRows(e){var t=[],i=[];return this.table.columnManager.columnsByIndex.forEach(n=>{this.columnVisCheck(n)&&t.push(n.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(n=>{switch(n.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&n.modules.dataTree.parent)}return!0}),e.forEach((n,o)=>{var l=n.getData(this.colVisProp),h=[],c=0;switch(n.type){case"group":c=n.level,h.push(new Xs(n.key,n.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(f=>{h.push(new Xs(f._column.getFieldValue(l),f,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(c=n.modules.dataTree.index);break}i.push(new Nl(n.type,h,n.getComponent(),c))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),o=this.lookupTableStyles(),l=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],h={};return h.rowFormatter=l!==null?l:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(h.treeElementField=this.table.modules.dataTree.elementField),h.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],h.groupHeader&&!Array.isArray(h.groupHeader)&&(h.groupHeader=[h.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((c,f)=>{let m;switch(c.type){case"header":i.appendChild(this.generateHeaderElement(c,h,o));break;case"group":n.appendChild(this.generateGroupElement(c,h,o));break;case"calc":n.appendChild(this.generateCalcElement(c,h,o));break;case"row":m=this.generateRowElement(c,h,o),this.mapElementStyles(f%2&&o.evenRow?o.evenRow:o.oddRow,m,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(m);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(n),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var n=document.createElement("tr");return e.columns.forEach(o=>{if(o){var l=document.createElement("th"),h=o.component._column.definition.cssClass?o.component._column.definition.cssClass.split(" "):[];l.colSpan=o.width,l.rowSpan=o.height,l.innerHTML=o.value,this.cloneTableStyle&&(l.style.boxSizing="border-box"),h.forEach(function(c){l.classList.add(c)}),this.mapElementStyles(o.component.getElement(),l,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(o.component._column.contentElement,l,["padding-top","padding-left","padding-right","padding-bottom"]),o.component._column.visible?this.mapElementStyles(o.component.getElement(),l,["width"]):o.component._column.definition.width&&(l.style.width=o.component._column.definition.width+"px"),o.component._column.parent&&this.mapElementStyles(o.component._column.parent.groupElement,l,["border-top"]),n.appendChild(l)}}),n}generateGroupElement(e,t,i){var n=document.createElement("tr"),o=document.createElement("td"),l=e.columns[0];return n.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?l.value=t.groupHeader[e.indent](l.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(l.value=e.component._group.generator(l.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),o.colSpan=l.width,o.innerHTML=l.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+e.indent),l.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(o),n}generateCalcElement(e,t,i){var n=this.generateRowElement(e,t,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}generateRowElement(e,t,i){var n=document.createElement("tr");if(n.classList.add("tabulator-print-table-row"),e.columns.forEach((o,l)=>{if(o){var h=document.createElement("td"),c=o.component._column,f=this.table.columnManager.findColumnIndex(c),m=o.value,b,v={modules:{},getValue:function(){return m},getField:function(){return c.definition.field},getElement:function(){return h},getType:function(){return"cell"},getColumn:function(){return c.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return v},column:c},C=c.definition.cssClass?c.definition.cssClass.split(" "):[];if(C.forEach(function(x){h.classList.add(x)}),this.table.modExists("format")&&this.config.formatCells!==!1)m=this.table.modules.format.formatExportValue(v,this.colVisProp);else switch(typeof m){case"object":m=m!==null?JSON.stringify(m):"";break;case"undefined":m="";break}m instanceof Node?h.appendChild(m):h.innerHTML=m,b=i.styleCells&&i.styleCells[f]?i.styleCells[f]:i.firstCell,b&&(this.mapElementStyles(b,h,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),c.definition.align&&(h.style.textAlign=c.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==c.field||!t.treeElementField&&l==0)&&(e.component._row.modules.dataTree.controlEl&&h.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),h.firstChild),e.component._row.modules.dataTree.branchEl&&h.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),h.firstChild)),n.appendChild(h),v.modules.format&&v.modules.format.renderedCallback&&v.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let o=Object.assign(e.component);o.getElement=function(){return n},t.rowFormatter(e.component)}return n}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,n){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,n||"htmlOutput");return this.generateHTMLTable(o)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(e);i.forEach(function(l){t.style[n[l]]||(t.style[n[l]]=o.getPropertyValue(l))})}}}}Il.moduleName="export";var Um={"=":function(s,e,t,i){return e==s},"<":function(s,e,t,i){return e<s},"<=":function(s,e,t,i){return e<=s},">":function(s,e,t,i){return e>s},">=":function(s,e,t,i){return e>=s},"!=":function(s,e,t,i){return e!=s},regex:function(s,e,t,i){return typeof s=="string"&&(s=new RegExp(s)),s.test(e)},like:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(s.toLowerCase())>-1:!1},keywords:function(s,e,t,i){var n=s.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),o=String(e===null||typeof e>"u"?"":e).toLowerCase(),l=[];return n.forEach(h=>{o.includes(h)&&l.push(!0)}),i.matchAll?l.length===n.length:!!l.length},starts:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(s.toLowerCase()):!1},ends:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(s.toLowerCase()):!1},in:function(s,e,t,i){return Array.isArray(s)?s.length?s.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",s),!1)}};class zt extends ie{constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,n){return n.filter=this.getFilters(!0,!0),n}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,n){this.setFilter(e,t,i,n),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,n){this.addFilter(e,t,i,n),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,n=e.getField();function o(l){var h=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",c="",f="",m;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==l){if(e.modules.filter.prevSuccess=l,e.modules.filter.emptyFunc(l))delete i.headerFilters[n];else{switch(e.modules.filter.value=l,typeof e.definition.headerFilterFunc){case"string":zt.filters[e.definition.headerFilterFunc]?(c=e.definition.headerFilterFunc,m=function(b){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(b);return v=typeof v=="function"?v(l,C,b):v,zt.filters[e.definition.headerFilterFunc](l,C,b,v)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":m=function(b){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(b);return v=typeof v=="function"?v(l,C,b):v,e.definition.headerFilterFunc(l,C,b,v)},c=m;break}if(!m)switch(h){case"partial":m=function(b){var v=e.getFieldValue(b);return typeof v<"u"&&v!==null?String(v).toLowerCase().indexOf(String(l).toLowerCase())>-1:!1},c="like";break;default:m=function(b){return e.getFieldValue(b)==l},c="="}i.headerFilters[n]={value:l,func:m,type:c}}e.modules.filter.value=l,f=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==f&&(i.prevHeaderFilterChangeCheck=f,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var n=this,o=e.modules.filter.success,l=e.getField(),h,c,f,m,b,v,C,x;e.modules.filter.value=t;function R(){}function L(k){x=k}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),l){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(k){return!k&&k!==0},h=document.createElement("div"),h.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":n.table.modules.edit.editors[e.definition.headerFilter]?(c=n.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(k){return k!==!0&&k!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":c=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?c=e.modules.edit.editor:e.definition.formatter&&n.table.modules.edit.editors[e.definition.formatter]?(c=n.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(k){return k!==!0&&k!==!1})):c=n.table.modules.edit.editors.input;break}if(c){if(m={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return h},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},C=e.definition.headerFilterParams||{},C=typeof C=="function"?C.call(n.table,m):C,f=c.call(this.table.modules.edit,m,L,o,R,C),!f){console.warn("Filter Error - Cannot add filter to "+l+" column, editor returned a value of false");return}if(!(f instanceof Node)){console.warn("Filter Error - Cannot add filter to "+l+" column, editor should return an instance of Node, the editor returned:",f);return}n.langBind("headerFilters|columns|"+e.definition.field,function(k){f.setAttribute("placeholder",typeof k<"u"&&k?k:e.definition.headerFilterPlaceholder||n.langText("headerFilters|default"))}),f.addEventListener("click",function(k){k.stopPropagation(),f.focus()}),f.addEventListener("focus",k=>{var H=this.table.columnManager.contentsElement.scrollLeft,P=this.table.rowManager.element.scrollLeft;H!==P&&(this.table.rowManager.scrollHorizontal(H),this.table.columnManager.scrollHorizontal(H))}),b=!1,v=function(k){b&&clearTimeout(b),b=setTimeout(function(){o(f.value)},n.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=f,e.modules.filter.attrType=f.hasAttribute("type")?f.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=f.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(f.addEventListener("keyup",v),f.addEventListener("search",v),e.modules.filter.attrType=="number"&&f.addEventListener("change",function(k){o(f.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&f.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&f.addEventListener("mousedown",function(k){k.stopPropagation()})),h.appendChild(f),e.contentElement.appendChild(h),i||n.headerFilterColumns.push(e),x&&x()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,n){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),this.addFilter(e)}addFilter(e,t,i,n){var o=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),e.forEach(l=>{l=this.findFilter(l),l&&(this.filterList.push(l),o=!0)}),o&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(n){return e.field(n,e.type||{})}:zt.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(n){return zt.filters[e.type](e.value,t.getFieldValue(n),n,e.params||{})}:i=function(n){return zt.filters[e.type](e.value,n[e.field],n,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(n){typeof n.type=="function"&&(n.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(n=>{var o;Array.isArray(n)?i.push(this.filtersToArray(n,t)):(o={field:n.field,type:n.type,value:n.value},t&&typeof o.type=="function"&&(o.type="function"),i.push(o))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(n=>{var o=-1;typeof n.field=="object"?o=this.filterList.findIndex(l=>n===l):o=this.filterList.findIndex(l=>n.field===l.field&&n.type===l.type&&n.value===l.value),o>-1?this.filterList.splice(o,1):console.warn("Filter Error - No matching filter type found, ignoring: ",n.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,n){var o=[],l=[];return Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach(h=>{h=this.findFilter(h),h&&l.push(h)}),this.table.rowManager.rows.forEach(h=>{var c=!0;l.forEach(f=>{this.filterRecurse(f,h.getData())||(c=!1)}),c&&o.push(e==="data"?h.getData("data"):h.getComponent())}),o}filter(e,t){var i=[],n=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(o=>{this.filterRow(o)&&i.push(o)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(o=>{n.push(o.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),n)),i}filterRow(e,t){var i=!0,n=e.getData();this.filterList.forEach(l=>{this.filterRecurse(l,n)||(i=!1)});for(var o in this.headerFilters)this.headerFilters[o].func(n)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(n=>{this.filterRecurse(n,t)&&(i=!0)}):i=e.func(t),i}}zt.moduleName="filter",zt.filters=Um;function jm(s,e,t){return this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function Km(s,e,t){return s.getValue()}function qm(s,e,t){return s.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function Ym(s,e,t){var i=parseFloat(s.getValue()),n="",o,l,h,c,f,m=e.decimal||".",b=e.thousand||",",v=e.negativeSign||"-",C=e.symbol||"",x=!!e.symbolAfter,R=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(s.getValue()));if(i<0&&(i=Math.abs(i),n=v),o=R!==!1?i.toFixed(R):i,o=String(o).split("."),l=o[0],h=o.length>1?m+o[1]:"",e.thousand!==!1)for(c=/(\d+)(\d{3})/;c.test(l);)l=l.replace(c,"$1"+b+"$2");return f=l+h,n===!0?(f="("+f+")",x?f+C:C+f):x?n+f+C:n+C+f}function Xm(s,e,t){var i=s.getValue(),n=e.urlPrefix||"",o=e.download,l=i,h=document.createElement("a"),c;function f(m,b){var v=m.shift(),C=b[v];return m.length&&typeof C=="object"?f(m,C):C}if(e.labelField&&(c=s.getData(),l=f(e.labelField.split(this.table.options.nestedFieldSeparator),c)),e.label)switch(typeof e.label){case"string":l=e.label;break;case"function":l=e.label(s);break}if(l){if(e.urlField&&(c=s.getData(),i=c[e.urlField]),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(s);break}return h.setAttribute("href",n+i),e.target&&h.setAttribute("target",e.target),e.download&&(typeof o=="function"?o=o(s):o=o===!0?"":o,h.setAttribute("download",o)),h.innerHTML=this.emptyToSpace(this.sanitizeHTML(l)),h}else return" "}function Jm(s,e,t){var i=document.createElement("img"),n=s.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+s.getValue()),e.urlSuffix&&(n=n+e.urlSuffix),i.setAttribute("src",n),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){s.getRow().normalizeHeight()}),i}function Zm(s,e,t){var i=s.getValue(),n=s.getElement(),o=e.allowEmpty,l=e.allowTruthy,h=Object.keys(e).includes("trueValue"),c=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',f=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return h&&i===e.trueValue||!h&&(l&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(n.setAttribute("aria-checked",!0),c||""):o&&(i==="null"||i===""||i===null||typeof i>"u")?(n.setAttribute("aria-checked","mixed"),""):(n.setAttribute("aria-checked",!1),f||"")}function Qm(s,e,t){var i=window.DateTime||luxon.DateTime,n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",o=e.outputFormat||"dd/MM/yyyy HH:mm:ss",l=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",h=s.getValue();if(typeof i<"u"){var c;return i.isDateTime(h)?c=h:n==="iso"?c=i.fromISO(String(h)):c=i.fromFormat(String(h),n),c.isValid?(e.timezone&&(c=c.setZone(e.timezone)),c.toFormat(o)):l===!0||!h?h:typeof l=="function"?l(h):l}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function eg(s,e,t){var i=window.DateTime||luxon.DateTime,n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",o=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",l=typeof e.suffix<"u"?e.suffix:!1,h=typeof e.unit<"u"?e.unit:"days",c=typeof e.humanize<"u"?e.humanize:!1,f=typeof e.date<"u"?e.date:i.now(),m=s.getValue();if(typeof i<"u"){var b;return i.isDateTime(m)?b=m:n==="iso"?b=i.fromISO(String(m)):b=i.fromFormat(String(m),n),b.isValid?c?b.diff(f,h).toHuman()+(l?" "+l:""):parseInt(b.diff(f,h)[h])+(l?" "+l:""):o===!0?m:typeof o=="function"?o(m):o}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function tg(s,e,t){var i=s.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function ig(s,e,t){var i=s.getValue(),n=s.getElement(),o=e&&e.stars?e.stars:5,l=document.createElement("span"),h=document.createElementNS("http://www.w3.org/2000/svg","svg"),c='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',f='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';l.style.verticalAlign="middle",h.setAttribute("width","14"),h.setAttribute("height","14"),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,o));for(var m=1;m<=o;m++){var b=h.cloneNode(!0);b.innerHTML=m<=i?c:f,l.appendChild(b)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),l}function ng(s,e,t){var i=this.sanitizeHTML(s.getValue())||0,n=document.createElement("span"),o=e&&e.max?e.max:100,l=e&&e.min?e.min:0,h=e&&typeof e.color<"u"?e.color:["red","orange","green"],c="#666666",f,m;if(!(isNaN(i)||typeof s.getValue()>"u")){switch(n.classList.add("tabulator-traffic-light"),m=parseFloat(i)<=o?parseFloat(i):o,m=parseFloat(m)>=l?parseFloat(m):l,f=(o-l)/100,m=Math.round((m-l)/f),typeof h){case"string":c=h;break;case"function":c=h(i);break;case"object":if(Array.isArray(h)){var b=100/h.length,v=Math.floor(m/b);v=Math.min(v,h.length-1),v=Math.max(v,0),c=h[v];break}}return n.style.backgroundColor=c,n}}function rg(s,e={},t){var i=this.sanitizeHTML(s.getValue())||0,n=s.getElement(),o=e.max?e.max:100,l=e.min?e.min:0,h=e.legendAlign?e.legendAlign:"center",c,f,m,b,v;switch(f=parseFloat(i)<=o?parseFloat(i):o,f=parseFloat(f)>=l?parseFloat(f):l,c=(o-l)/100,f=Math.round((f-l)/c),typeof e.color){case"string":m=e.color;break;case"function":m=e.color(i);break;case"object":if(Array.isArray(e.color)){let L=100/e.color.length,k=Math.floor(f/L);k=Math.min(k,e.color.length-1),k=Math.max(k,0),m=e.color[k];break}default:m="#2DC214"}switch(typeof e.legend){case"string":b=e.legend;break;case"function":b=e.legend(i);break;case"boolean":b=i;break;default:b=!1}switch(typeof e.legendColor){case"string":v=e.legendColor;break;case"function":v=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let L=100/e.legendColor.length,k=Math.floor(f/L);k=Math.min(k,e.legendColor.length-1),k=Math.max(k,0),v=e.legendColor[k]}break;default:v="#000"}n.style.minWidth="30px",n.style.position="relative",n.setAttribute("aria-label",f);var C=document.createElement("div");C.style.display="inline-block",C.style.width=f+"%",C.style.backgroundColor=m,C.style.height="100%",C.setAttribute("data-max",o),C.setAttribute("data-min",l);var x=document.createElement("div");if(x.style.position="relative",x.style.width="100%",x.style.height="100%",b){var R=document.createElement("div");R.style.position="absolute",R.style.top=0,R.style.left=0,R.style.textAlign=h,R.style.width="100%",R.style.color=v,R.innerHTML=b}return t(function(){if(!(s instanceof Pl)){var L=document.createElement("div");L.style.position="absolute",L.style.top="4px",L.style.bottom="4px",L.style.left="4px",L.style.right="4px",n.appendChild(L),n=L}n.appendChild(x),x.appendChild(C),b&&x.appendChild(R)}),""}function sg(s,e,t){return s.getElement().style.backgroundColor=this.sanitizeHTML(s.getValue()),""}function og(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function ag(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function lg(s,e,t){var i=document.createElement("span"),n=s.getRow();return n.watchPosition(o=>{i.innerText=o}),i}function ug(s,e,t){return s.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function hg(s,e,t){var i=document.createElement("div"),n=s.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
|
32
35
|
<line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
33
36
|
<line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
34
37
|
</svg>
|
35
38
|
|
36
39
|
<svg class='tabulator-responsive-collapse-toggle-close' viewbox="0 0 24 24">
|
37
40
|
<line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
38
|
-
</svg>`,n.getElement().classList.add("tabulator-row-handle");function o(l){var c=s.element;s.open=l,c&&(s.open?(i.classList.add("open"),c.style.display=""):(i.classList.remove("open"),c.style.display="none"))}return i.addEventListener("click",function(l){l.stopImmediatePropagation(),o(!s.open),n.getTable().rowManager.adjustTableSize()}),o(s.open),i}function Qm(n,e,t){var i=document.createElement("input"),s=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",l=>{l.stopPropagation()}),typeof n.getRow=="function"){var o=n.getRow();o instanceof Ss?(i.addEventListener("change",l=>{this.table.options.selectableRangeMode==="click"&&s?s=!1:o.toggleSelect()}),this.table.options.selectableRangeMode==="click"&&i.addEventListener("click",l=>{s=!0,this.table.modules.selectRow.handleComplexRowClick(o._row,l)}),i.checked=o.isSelected&&o.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(o,i)):i=""}else i.addEventListener("change",l=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var ep={plaintext:Pm,html:Vm,textarea:Om,money:Nm,link:zm,image:Hm,tickCross:Im,datetime:Bm,datetimediff:Wm,lookup:$m,star:Gm,traffic:Um,progress:jm,color:Km,buttonTick:qm,buttonCross:Ym,rownum:Xm,handle:Jm,responsiveCollapse:Zm,rowSelection:Qm};class Dt extends he{constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}lookupFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},s=e.definition["formatter"+t];switch(typeof s){case"string":Dt.formatters[s]?i.formatter=Dt.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=Dt.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=Dt.formatters.plaintext;break}return i}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var s,o,l,c;return e.definition.titleFormatter?(s=this.getFormatter(e.definition.titleFormatter),l=h=>{e.titleFormatterRendered=h},c={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},o=e.definition.titleFormatterParams||{},o=typeof o=="function"?o():o,s.call(this,c,o,l)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function s(o){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=o,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,s)}formatExportValue(e,t){var i=e.column.modules.format[t],s;if(i){let o=function(l){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=l,e.modules.format.rendered=!1};return s=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),s,o)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?" ":e}getFormatter(e){switch(typeof e){case"string":Dt.formatters[e]?e=Dt.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=Dt.formatters.plaintext);break;case"function":break;default:e=Dt.formatters.plaintext;break}return e}}Dt.moduleName="format",Dt.formatters=ep;class Rl extends he{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)})}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach((o,l)=>{if(o.modules.frozen.marginValue=i,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(i+=o.getWidth()),l==this.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var c=this.getColGroupParentElement(o);t.includes(c)||(this.layoutElement(c,o),t.push(c)),o.modules.frozen.edge&&c.classList.add("tabulator-frozen-"+o.modules.frozen.position)}else this.layoutElement(o.getElement(),o);e&&o.cells.forEach(h=>{this.layoutElement(h.getElement(!0),o)})}),this.rightColumns.forEach((o,l)=>{o.modules.frozen.marginValue=s,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(s+=o.getWidth()),l==this.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?this.layoutElement(this.getColGroupParentElement(o),o):this.layoutElement(o.getElement(),o),e&&o.cells.forEach(c=>{this.layoutElement(c.getElement(!0),o)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let s=0;s<t;s++)e[s].visible&&(i+=e[s].getWidth());return i}}Rl.moduleName="frozenColumns";class kl extends he{constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var s=t.indexOf(i);s>-1&&t.splice(s,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}kl.moduleName="frozenRows";class tp{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class en{constructor(e,t,i,s,o,l,c){this.groupManager=e,this.parent=t,this.key=s,this.level=i,this.field=o,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=c,this.rows=[],this.groups=[],this.groupList=[],this.generator=l,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=c?c.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,s=new en(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=s,this.groupList.push(s)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),s=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[s]&&this.groups[s].addRow(e):(this.groups[s]||this._createGroup(i,t),this.groups[s].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var s=this.conformRowData({});e.updateData(s);var o=this.rows.indexOf(t);o>-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(s=>{i.push(s.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(s=>{var o=s.getElement();e.parentNode.insertBefore(o,e.nextSibling),s.initialize(),e=o})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var s=i.getRowGroup(e);s&&(t=s)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(s=>{i=i.concat(s.getRows(e,t))}):this.rows.forEach(function(s){i.push(e?s.getComponent():s)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,Pe.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new tp(this)),this.component}}class Sl extends he{constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(o,l)=>{this.headerGenerator[0]=(c,h,f)=>(typeof c>"u"?"":c)+"<span>("+h+" "+(h===1?o:l.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var s=this.table.columnManager.getRealColumns();s.forEach(o=>{o.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((o,l)=>{var c,h;typeof o=="function"?c=o:(h=this.table.columnManager.getColumnByField(o),h?c=function(f){return h.getFieldValue(f)}:c=function(f){return f[o]}),this.groupIDLookups.push({field:typeof o=="function"?!1:o,func:c,values:this.allowedValues?this.allowedValues[l]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(o=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var s=e.modules.group.rows;return s.length>1&&(!t||t&&s.indexOf(t)==-1?i?s[0]!==e&&(t=s[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):s[s.length-1]!==e&&(t=s[s.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof en&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof en?t:t.modules.group,o=e instanceof en?e:e.modules.group;s===o?this.table.rowManager.moveRowInArray(s.rows,e,t,i):(o&&o.removeRow(e),s.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var s={};s.level=0,s.rowCount=0,s.headerContent="";var o=[];i.hasSubGroups?(o=this.pullGroupListData(i.groupList),s.level=i.level,s.rowCount=o.length-i.groupList.length,s.headerContent=i.generator(i.key,s.rowCount,i.rows,i),t.push(s),t=t.concat(o)):(s.level=i.level,s.headerContent=i.generator(i.key,i.rows.length,i.rows,i),s.rowCount=i.getRows().length,t.push(s),i.getRows().forEach(l=>{t.push(l.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var s=i.getRowGroup(e);s&&(t=s)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var s=t+"_"+e,o;i=i||[],o=new en(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[s]),this.groups[s]=o,this.groupList.push(o)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s="0_"+i;this.groups[s]&&this.groups[s].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s=!this.groups["0_"+i];return s&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!s}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),s=this.getExpectedPath(e),o;o=i.length==s.length&&i.every((l,c)=>l===s[c]),o||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(s=>{t.push(s.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}Sl.moduleName="groupRows";var ip={cellEdit:function(n){n.component.setValueProcessData(n.data.oldValue),n.component.cellRendered()},rowAdd:function(n){n.component.deleteActual()},rowDelete:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e)},rowMove:function(n){var e=n.data.posFrom-n.data.posTo>0;this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},np={cellEdit:function(n){n.component.setValueProcessData(n.data.newValue),n.component.cellRendered()},rowAdd:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e)},rowDelete:function(n){n.component.deleteActual()},rowMove:function(n){this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posTo),n.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}};class Oi extends he{constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,s){this.action("rowAdd",e,{data:t,pos:i,index:s})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return Oi.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn("History Undo Error - No more history to undo"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return Oi.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn("History Redo Error - No more history to redo"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof nt)i.component===e&&(i.component=t);else if(i.component instanceof In&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}})}}Oi.moduleName="history",Oi.undoers=ip,Oi.redoers=np;class Tl extends he{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),s=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),s=s?s.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,s):this._generateBlankHeaders(i,s);for(var l=0;l<s.length;l++){var c=s[l],h=c.getElementsByTagName("td"),f={};this.hasIndex||(f[t.index]=l);for(var p=0;p<h.length;p++){var b=h[p];typeof this.fieldIndex[p]<"u"&&(f[this.fieldIndex[p]]=b.innerHTML)}o.push(f)}t.data=o,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var s=e.attributes,o=Object.keys(i||t),l={};o.forEach(p=>{l[p.toLowerCase()]=p});for(var c in s){var h=s[c],f;h&&typeof h=="object"&&h.name&&h.name.indexOf("tabulator-")===0&&(f=h.name.replace("tabulator-",""),typeof l[f]<"u"&&(t[l[f]]=this._attribValue(h.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var s=e[i],o=!1,l=this._findCol(s.textContent),c;l?o=!0:l={title:s.textContent.trim()},l.field||(l.field=s.textContent.trim().toLowerCase().replace(" ","_")),c=s.getAttribute("width"),c&&!l.width&&(l.width=c),this._extractOptions(s,l,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=l.field,l.field==this.table.options.index&&(this.hasIndex=!0),o||this.table.options.columns.push(l)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var s=e[i],o={title:"",field:"col"+i};this.fieldIndex[i]=o.field;var l=s.getAttribute("width");l&&(o.width=l),this.table.options.columns.push(o)}}}Tl.moduleName="htmlTableImport";function sp(n){var e=[],t=0,i=0,s=!1;for(let o=0;o<n.length;o++){let l=n[o],c=n[o+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),l=='"'&&s&&c=='"'){e[t][i]+=l,o++;continue}if(l=='"'){s=!s;continue}if(l==","&&!s){i++;continue}if(l=="\r"&&c==`
|
39
|
-
`&&!
|
40
|
-
`)&&!s){i=0,t++;continue}e[t][i]+=l}return e}function rp(n){try{return JSON.parse(n)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function op(n){return n}var ap={csv:sp,json:rp,array:op};class Wn extends he{constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,s,o){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(l=>(console.error("Import Error:",l||"Unable to import data"),Promise.reject(l)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=Wn.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t){var i=this.lookupImporter(e);if(i)return this.pickFile(t).then(this.importData.bind(this,i)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch(s=>(console.error("Import Error:",s||"Unable to import file"),Promise.reject(s)))}pickFile(e){return new Promise((t,i)=>{var s=document.createElement("input");s.type="file",s.accept=e,s.addEventListener("change",o=>{var l=s.files[0],c=new FileReader;switch(this.table.options.importReader){case"buffer":c.readAsArrayBuffer(l);break;case"binary":c.readAsBinaryString(l);break;case"url":c.readAsDataURL(l);break;case"text":default:c.readAsText(l)}c.onload=h=>{t(c.result)},c.onerror=h=>{console.warn("File Load Error - Unable to read file"),i()}}),s.click()})}importData(e,t){var i=e.call(this.table,t);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}structureArrayToObject(e){var t=e.shift(),i=e.map(s=>{var o={};return t.forEach((l,c)=>{o[l]=s[c]}),o});return i}structureArrayToColumns(e){var t=[],i=this.table.getColumns();return i[0]&&e[0][0]&&i[0].getDefinition().title===e[0][0]&&e.shift(),e.forEach(s=>{var o={};s.forEach((l,c)=>{var h=i[c];h&&(o[h.getField()]=l)}),t.push(o)}),t}setData(e){return this.table.setData(e)}}Wn.moduleName="import",Wn.importers=ap;class Ml extends he{constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let s in this.eventMap)this.eventMap[s]===i&&this.subscribers[s]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,s){var o=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":o.tap=!0,clearTimeout(o.tapHold),o.tapHold=setTimeout(()=>{clearTimeout(o.tapHold),o.tapHold=null,o.tap=null,clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"TapHold",i,s)},1e3);break;case"end":o.tap&&(o.tap=null,this.dispatchEvent(e+"Tap",i,s)),o.tapDbl?(clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"DblTap",i,s)):o.tapDbl=setTimeout(()=>{clearTimeout(o.tapDbl),o.tapDbl=null},300),clearTimeout(o.tapHold),o.tapHold=null;break}}dispatchEvent(e,t,i){var s=i.getComponent(),o;this.columnSubscribers[e]&&(i instanceof In?o=i.column.definition[e]:i instanceof Jt&&(o=i.definition[e]),o&&o(t,s)),this.dispatchExternal(e,t,s)}}Ml.moduleName="interaction";var lp={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},up={keyBlock:function(n){n.stopPropagation(),n.preventDefault()},scrollPageUp:function(n){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;n.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(n){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;n.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(n){this.dispatch("keybinding-nav-prev",n)},navNext:function(n){this.dispatch("keybinding-nav-next",n)},navLeft:function(n){this.dispatch("keybinding-nav-left",n)},navRight:function(n){this.dispatch("keybinding-nav-right",n)},navUp:function(n){this.dispatch("keybinding-nav-up",n)},navDown:function(n){this.dispatch("keybinding-nav-down",n)},undo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.undo()))},redo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(n){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};class Ci extends he{constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,Ci.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)Ci.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var s=Array.isArray(i)?i:[i];s.forEach(o=>{this.mapBinding(t,o)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:Ci.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},s=t.toString().toLowerCase().split(" ").join("").split("+");s.forEach(o=>{switch(o){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:o=isNaN(o)?o.toUpperCase().charCodeAt(0):parseInt(o),i.keys.push(o),this.watchKeys[o]||(this.watchKeys[o]=[]),this.watchKeys[o].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];s&&(e.pressedKeys.push(i),s.forEach(function(o){e.checkBinding(t,o)}))},this.keydownBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];if(s){var o=e.pressedKeys.indexOf(i);o>-1&&e.pressedKeys.splice(o,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(s=>{var o=this.pressedKeys.indexOf(s);o==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}Ci.moduleName="keybindings",Ci.bindings=lp,Ci.actions=up;class Ll extends he{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",s=>{s.stopPropagation(),s.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,s,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,o){var l=!(e instanceof MouseEvent),c=document.createElement("div"),h;if(c.classList.add("tabulator-menu"),l||e.preventDefault(),!(!i||!i.length)){if(s)h=o.child(c);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=h=this.popup(c)}i.forEach(f=>{var p=document.createElement("div"),b=f.label,g=f.disabled;f.separator?p.classList.add("tabulator-menu-separator"):(p.classList.add("tabulator-menu-item"),typeof b=="function"&&(b=b.call(this.table,t.getComponent())),b instanceof Node?p.appendChild(b):p.innerHTML=b,typeof g=="function"&&(g=g.call(this.table,t.getComponent())),g?(p.classList.add("tabulator-menu-item-disabled"),p.addEventListener("click",w=>{w.stopPropagation()})):f.menu&&f.menu.length?p.addEventListener("click",w=>{w.stopPropagation(),this.loadMenu(w,t,f.menu,p,h)}):f.action&&p.addEventListener("click",w=>{f.action(w,t.getComponent())}),f.menu&&f.menu.length&&p.classList.add("tabulator-menu-item-submenu")),c.appendChild(p)}),c.addEventListener("click",f=>{this.rootPopup&&this.rootPopup.hide()}),h.show(s||e),h===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}Ll.moduleName="menu";class Dl extends he{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){var t=this,i={},s;!e.modules.frozen&&!e.isGroup&&(s=e.getElement(),i.mousemove=(function(o){e.parent===t.moving.parent&&((t.touchMove?o.touches[0].pageX:o.pageX)-Pe.elOffset(s).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(s.parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveColumn(e,!1)))}).bind(t),s.addEventListener("mousedown",function(o){t.touchMove=!1,o.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e)},t.checkPeriod))}),s.addEventListener("mouseup",function(o){o.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,s,o,l,c,h,f;t.addEventListener("touchstart",p=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,s=e.nextColumn(),l=s?s.getWidth()/2:0,o=e.prevColumn(),c=o?o.getWidth()/2:0,h=0,f=0,i=!1,this.startMove(p,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",p=>{var b,g;this.moving&&(this.moveHover(p),i||(i=p.touches[0].pageX),b=p.touches[0].pageX-i,b>0?s&&b-h>l&&(g=s,g!==e&&(i=p.touches[0].pageX,g.getElement().parentNode.insertBefore(this.placeholderElement,g.getElement().nextSibling),this.moveColumn(g,!0))):o&&-b-f>c&&(g=o,g!==e&&(i=p.touches[0].pageX,g.getElement().parentNode.insertBefore(this.placeholderElement,g.getElement()),this.moveColumn(g,!1))),g&&(s=g.nextColumn(),h=l,l=s?s.getWidth()/2:0,o=g.prevColumn(),f=c,c=o?o.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",p=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(p)})}startMove(e,t){var i=t.getElement(),s=this.table.columnManager.getContentsElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Pe.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),s.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=s.clientHeight-o.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(s,o){var l=s.getElement(!0);l.parentNode&&i[o]&&l.parentNode.insertBefore(i[o].getElement(),l.nextSibling)}):e.getCells().forEach(function(s,o){var l=s.getElement(!0);l.parentNode&&i[o]&&l.parentNode.insertBefore(i[o].getElement(),l)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,s=(this.touchMove?e.touches[0].pageX:e.pageX)-Pe.elOffset(t).left+i,o;this.hoverElement.style.left=s-this.startX+"px",s-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{o=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=o,this.autoScrollTimeout=!1},1))),i+t.clientWidth-s<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{o=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=o,this.autoScrollTimeout=!1},1)))}}Dl.moduleName="moveColumn";class Ms extends he{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(s){t.tableRowDrop(s,e)}).bind(t),i.mousemove=(function(s){var o;s.pageY-Pe.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(o=e.getElement(),o.parentNode.insertBefore(t.placeholderElement,o.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(o=e.getElement(),o.previousSibling&&(o.parentNode.insertBefore(t.placeholderElement,o),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},s;i.mouseup=(function(o){t.tableRowDrop(o,e)}).bind(t),i.mousemove=(function(o){var l=e.getElement();o.pageY-Pe.elOffset(l).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(l.parentNode.insertBefore(t.placeholderElement,l.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(l.parentNode.insertBefore(t.placeholderElement,l),t.moveRow(e,!1))}).bind(t),this.hasHandle||(s=e.getElement(),s.addEventListener("mousedown",function(o){o.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e)},t.checkPeriod))}),s.addEventListener("mouseup",function(o){o.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(s){s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,s,o,l,c,h,f;t.addEventListener("touchstart",p=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,s=e.nextRow(),l=s?s.getHeight()/2:0,o=e.prevRow(),c=o?o.getHeight()/2:0,h=0,f=0,i=!1,this.startMove(p,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",p=>{var b,g;this.moving&&(p.preventDefault(),this.moveHover(p),i||(i=p.touches[0].pageY),b=p.touches[0].pageY-i,b>0?s&&b-h>l&&(g=s,g!==e&&(i=p.touches[0].pageY,g.getElement().parentNode.insertBefore(this.placeholderElement,g.getElement().nextSibling),this.moveRow(g,!0))):o&&-b-f>c&&(g=o,g!==e&&(i=p.touches[0].pageY,g.getElement().parentNode.insertBefore(this.placeholderElement,g.getElement()),this.moveRow(g,!1))),g&&(s=g.nextRow(),h=l,l=s?s.getHeight()/2:0,o=g.prevRow(),f=c,c=o?o.getHeight()/2:0))}),t.addEventListener("touchend",p=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(p),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY,o,l;o=t.getElement(),this.connection?(l=o.getBoundingClientRect(),this.startX=l.left-i+window.pageXOffset,this.startY=l.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,s=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var s=o=>{this.elementRowDrop(o,i,this.moving)};i.addEventListener("mouseup",s),i.tabulatorElementDropEvent=s,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var s=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":s=this.senders[this.table.options.movableRowsSender];break;case"function":s=this.table.options.movableRowsSender;break}s?s.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,s=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=this.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?s=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),s?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:s})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}Ms.prototype.receivers={insert:function(n,e,t){return this.table.addRow(n.getData(),void 0,e),!0},add:function(n,e,t){return this.table.addRow(n.getData()),!0},update:function(n,e,t){return e?(e.update(n.getData()),!0):!1},replace:function(n,e,t){return e?(this.table.addRow(n.getData(),void 0,e),e.delete(),!0):!1}},Ms.prototype.senders={delete:function(n,e,t){n.delete()}},Ms.moduleName="moveRow";var cp={};class tn extends he{constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var o="mutator"+(s.charAt(0).toUpperCase()+s.slice(1)),l;e.definition[o]&&(l=this.lookupMutator(e.definition[o]),l&&(t=!0,i[o]={mutator:l,params:e.definition[o+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":tn.mutators[e]?t=tn.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),o;return this.enabled&&this.table.columnManager.traverse(l=>{var c,h,f;l.modules.mutate&&(c=l.modules.mutate[s]||l.modules.mutate.mutator||!1,c&&(o=l.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof o<"u")&&(f=l.getComponent(),h=typeof c.params=="function"?c.params(o,e,t,f):c.params,l.setFieldValue(e,c.mutator(o,e,t,h,f)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,s={};if(i)return s=Object.assign(s,e.row.getData()),e.column.setFieldValue(s,t),i.mutator(t,s,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var s=e.row.getCell(i);s&&s.setValue(s.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}tn.moduleName="mutator",tn.mutators=cp;function dp(n,e,t,i,s){var o=document.createElement("span"),l=document.createElement("span"),c=document.createElement("span"),h=document.createElement("span"),f=document.createElement("span"),p=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",b=>{l.innerHTML=b}),this.table.modules.localize.langBind("pagination|counter|of",b=>{h.innerHTML=b}),this.table.modules.localize.langBind("pagination|counter|rows",b=>{p.innerHTML=b}),i?(c.innerHTML=" "+e+"-"+Math.min(e+n-1,i)+" ",f.innerHTML=" "+i+" ",o.appendChild(l),o.appendChild(c),o.appendChild(h),o.appendChild(f),o.appendChild(p)):(c.innerHTML=" 0 ",o.appendChild(l),o.appendChild(c),o.appendChild(p)),o}function hp(n,e,t,i,s){var o=document.createElement("span"),l=document.createElement("span"),c=document.createElement("span"),h=document.createElement("span"),f=document.createElement("span"),p=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",b=>{l.innerHTML=b}),c.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",b=>{h.innerHTML=b}),f.innerHTML=" "+s+" ",this.table.modules.localize.langBind("pagination|counter|pages",b=>{p.innerHTML=b}),o.appendChild(l),o.appendChild(c),o.appendChild(h),o.appendChild(f),o.appendChild(p),o}var fp={rows:dp,pages:hp};class $n extends he{constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,s=i.getDisplayRows(),o;return t?s.length?o=s[0]:i.activeRows.length&&(o=i.activeRows[i.activeRows.length-1],t=!1):s.length&&(o=s[s.length-1],t=!(s.length<this.size)),{index:o,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,s){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),s.page=this.page,this.size&&(s.size=this.size),s}userSetPageToRow(e){return this.table.options.pagination&&(e=this.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,s,o;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),s=i.scrollHeight-i.clientHeight-e,o=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,s<o&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(s){i.innerHTML=s}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=$n.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",s=>{this.firstBut.innerHTML=s}),this.langBind("pagination|first_title",s=>{this.firstBut.setAttribute("aria-label",s),this.firstBut.setAttribute("title",s)}),this.langBind("pagination|prev",s=>{this.prevBut.innerHTML=s}),this.langBind("pagination|prev_title",s=>{this.prevBut.setAttribute("aria-label",s),this.prevBut.setAttribute("title",s)}),this.langBind("pagination|next",s=>{this.nextBut.innerHTML=s}),this.langBind("pagination|next_title",s=>{this.nextBut.setAttribute("aria-label",s),this.nextBut.setAttribute("title",s)}),this.langBind("pagination|last",s=>{this.lastBut.innerHTML=s}),this.langBind("pagination|last_title",s=>{this.lastBut.setAttribute("aria-label",s),this.lastBut.setAttribute("title",s)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",s=>{this.pageSizeSelect.setAttribute("aria-label",s),this.pageSizeSelect.setAttribute("title",s),t.innerHTML=s}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",s=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var s=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(s)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var s;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),s=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof s){case"object":if(s instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(s)}else this.pageCounterElement.innerHTML="",s!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",s);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=s}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),s=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let o=i;o<=s;o++)o>0&&o<=this.max&&this.pagesElement.appendChild(this._generatePageButton(o));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,s,o,l,c=e.filter(h=>h.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(s=0,o=e.length):(s=this.size*(this.page-1),o=s+parseInt(this.size)),this._setPageButtons();for(let h=s;h<o;h++){let f=e[h];f&&(i.push(f),f.type==="row"&&(l||(l=f),t++))}return this._setPageCounter(c.length,t,l?c.indexOf(l)+1:0),i}else return this._setPageButtons(),this._setPageCounter(c.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else this.dispatchExternal("pageLoaded",this.getPage());else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}$n.moduleName="page",$n.pageCounters=fp;var mp={local:function(n,e){var t=localStorage.getItem(n+"-"+e);return t?JSON.parse(t):!1},cookie:function(n,e){var t=document.cookie,i=n+"-"+e,s=t.indexOf(i+"="),o,l;return s>-1&&(t=t.slice(s),o=t.indexOf(";"),o>-1&&(t=t.slice(0,o)),l=t.replace(i+"=","")),l?JSON.parse(l):!1}},pp={local:function(n,e,t){localStorage.setItem(n+"-"+e,JSON.stringify(t))},cookie:function(n,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=n+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class dt extends he{constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:dt.readers[this.table.options.persistenceReaderFunc]?this.readFunc=dt.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):dt.readers[this.mode]?this.readFunc=dt.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:dt.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=dt.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):dt.writers[this.mode]?this.writeFunc=dt.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(s=>{var o=Object.getOwnPropertyDescriptor(t,s),l=t[s];o&&Object.defineProperty(t,s,{set:c=>{l=c,this.defWatcherBlock||this.save("columns"),o.set&&o.set(c)},get:()=>(o.get&&o.get(),l)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t){var i=[];return t=t||[],t.forEach((s,o)=>{var l=this._findColumn(e,s),c;l&&(this.config.columns===!0||this.config.columns==null?(c=Object.keys(l),c.push("width")):c=this.config.columns,c.forEach(h=>{h!=="columns"&&typeof s[h]<"u"&&(l[h]=s[h])}),l.columns&&(l.columns=this.mergeDefinition(l.columns,s.columns)),i.push(l))}),e.forEach((s,o)=>{var l=this._findColumn(t,s);l||(i.length>o?i.splice(o,0,s):i.push(s))}),i}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(s){switch(i){case"group":return s.title===t.title&&s.columns.length===t.columns.length;case"field":return s.field===t.field;case"object":return s===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(s=>{var o={},l=s.getDefinition(),c;s.isGroup?(o.title=l.title,o.columns=this.parseColumns(s.getColumns())):(o.field=s.getField(),this.config.columns===!0||this.config.columns==null?(c=Object.keys(l),c.push("width"),c.push("visible")):c=this.config.columns,c.forEach(h=>{switch(h){case"width":o.width=s.getWidth();break;case"visible":o.visible=s.visible;break;default:typeof l[h]!="function"&&i.indexOf(h)===-1&&(o[h]=l[h])}})),t.push(o)}),t}}dt.moduleName="persistence",dt.moduleInitOrder=-10,dt.readers=mp,dt.writers=pp;class Al extends he{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",s=>{s.stopPropagation(),s.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,s,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var o;function l(c){o=c}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),l):e,this.loadPopup(t,i,e,o,s)}loadPopup(e,t,i,s,o){var l=!(e instanceof MouseEvent),c,h;i instanceof HTMLElement?c=i:(c=document.createElement("div"),c.innerHTML=i),c.classList.add("tabulator-popup"),c.addEventListener("click",f=>{f.stopPropagation()}),l||e.preventDefault(),h=this.popup(c),typeof s=="function"&&h.renderCallback(s),e?h.show(e):h.show(t.getElement(),o||"center"),h.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}Al.moduleName="popup";class Fl extends he{constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var s=window.scrollX,o=window.scrollY,l=document.createElement("div"),c=document.createElement("div"),h=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),f,p;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(l.classList.add("tabulator-print-header"),f=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof f=="string"?l.innerHTML=f:l.appendChild(f),this.element.appendChild(l)),this.element.appendChild(h),this.table.options.printFooter&&(c.classList.add("tabulator-print-footer"),p=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof p=="string"?c.innerHTML=p:c.appendChild(p),this.element.appendChild(c)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,h),window.print(),this.cleanup(),window.scrollTo(s,o),this.manualBlock=!1}}Fl.moduleName="print";class Pl extends he{constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),o;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),s.forEach(l=>{t.table.rowManager.addRowActual(l,!1)}),o=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),o}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),o;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),s.forEach(l=>{t.table.rowManager.addRowActual(l,!0)}),o=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),o}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,o;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(s=t.table.rowManager.getRowFromDataObject(t.data[0]),s&&s.deleteActual()),o=t.origFuncs.shift.call(e),t.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,o;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(s=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),s&&s.deleteActual()),o=t.origFuncs.pop.call(e),t.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),o=s[0]<0?e.length+s[0]:s[0],l=s[1],c=s[2]?s.slice(2):!1,h,f;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),c&&(h=e[o]?t.table.rowManager.getRowFromDataObject(e[o]):!1,h?c.forEach(b=>{t.table.rowManager.addRowActual(b,!0,h,!0)}):(c=c.slice().reverse(),c.forEach(b=>{t.table.rowManager.addRowActual(b,!0,!1,!0)}))),l!==0){var p=e.slice(o,typeof s[1]>"u"?s[1]:o+l);p.forEach((b,g)=>{var w=t.table.rowManager.getRowFromDataObject(b);w&&w.deleteActual(g!==p.length-1)})}(c||l!==0)&&t.table.rowManager.reRenderInPosition(),f=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return f}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,o=Object.getOwnPropertyDescriptor(t,i),l=t[i],c=this.currentVersion;Object.defineProperty(t,i,{set:h=>{if(l=h,!s.blocked&&c===s.currentVersion){s.block("key");var f={};f[i]=h,e.updateData(f),s.unblock("key")}o.set&&o.set(h)},get:()=>(o.get&&o.get(),l)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}Pl.moduleName="reactiveData";class Vl extends he{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var o=this,l=!1,c=i.definition.resizable,h={},f=i.getLastColumn();if(e==="header"&&(l=i.definition.formatter=="textarea"||i.definition.variableHeight,h={variableHeight:l}),(c===!0||c==e)&&this._checkResizability(f)){var p=document.createElement("span");p.className="tabulator-col-resize-handle",p.addEventListener("click",function(g){g.stopPropagation()});var b=function(g){o.startColumn=i,o.initialNextColumn=o.nextColumn=f.nextColumn(),o._mouseDown(g,f,p)};p.addEventListener("mousedown",b),p.addEventListener("touchstart",b,{passive:!0}),p.addEventListener("dblclick",g=>{var w=f.getWidth();g.stopPropagation(),f.reinitializeWidth(!0),w!==f.getWidth()&&(o.dispatch("column-resized",f),o.table.externalEvents.dispatch("columnResized",f.getComponent()))}),i.modules.frozen&&(p.style.position="sticky",p.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),h.handleEl=p,s.parentNode&&i.visible&&s.after(p)}t.modules.resize=h}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this;s.table.element.classList.add("tabulator-block-select");function o(c){var h=typeof c.screenX>"u"?c.touches[0].screenX:c.screenX,f=h-s.startX,p=h-s.latestX,b,g;if(s.latestX=h,s.table.rtl&&(f=-f,p=-p),b=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(s.startWidth+f),g=t.width==t.minWidth||t.width==t.maxWidth,p<0&&(s.nextColumn=s.initialNextColumn),s.table.options.resizableColumnFit&&s.nextColumn&&!(b&&g)){let w=s.nextColumn.getWidth();p>0&&w<=s.nextColumn.minWidth&&(s.nextColumn=s.nextColumn.nextColumn()),s.nextColumn&&s.nextColumn.setWidth(s.nextColumn.getWidth()-p)}s.table.columnManager.rerenderColumns(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function l(c){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",l),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",l),s.table.element.classList.remove("tabulator-block-select"),s.startWidth!==t.getWidth()&&(s.table.columnManager.verticalAlignHeaders(),s.dispatch("column-resized",t),s.table.externalEvents.dispatch("columnResized",t.getComponent()))}e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=typeof e.screenX>"u"?e.touches[0].screenX:e.screenX,s.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",l),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",l)}}Vl.moduleName="resizeColumns";class Ol extends he{constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",s.addEventListener("click",function(h){h.stopPropagation()});var l=function(h){t.startRow=e,t._mouseDown(h,e,s)};s.addEventListener("mousedown",l),s.addEventListener("touchstart",l,{passive:!0}),o.addEventListener("click",function(h){h.stopPropagation()});var c=function(h){var f=t.table.rowManager.prevDisplayRow(e);f&&(t.startRow=f,t._mouseDown(h,f,o))};o.addEventListener("mousedown",c),o.addEventListener("touchstart",c,{passive:!0}),i.appendChild(s),i.appendChild(o)}_mouseDown(e,t,i){var s=this;s.table.element.classList.add("tabulator-block-select");function o(c){t.setHeight(s.startHeight+((typeof c.screenY>"u"?c.touches[0].screenY:c.screenY)-s.startY))}function l(c){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",l),s.table.element.classList.remove("tabulator-block-select"),s.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),s.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",l),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",l)}}Ol.moduleName="resizeRows";class Nl extends he{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var s=Math.floor(i[0].contentRect.height),o=Math.floor(i[0].contentRect.width);(this.tableHeight!=s||this.tableWidth!=o)&&(this.tableHeight=s,this.tableWidth=o,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var s=Math.floor(i[0].contentRect.height),o=Math.floor(i[0].contentRect.width);(this.containerHeight!=s||this.containerWidth!=o)&&(this.containerHeight=s,this.containerWidth=o,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell)&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}Nl.moduleName="resizeTable";class zl extends he{constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var s=i.modules.responsive.order-t.modules.responsive.order;return s||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let s=this.columns[this.index];s?(this.hideColumn(s),this.index++):e=!1}else{let s=this.columns[this.index-1];s&&i>0&&i>=s.getWidth()?(this.showColumn(s),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i)}}generateCollapsedRowData(e){var t=e.getData(),i=[],s;return this.hiddenColumns.forEach(o=>{var l=o.getFieldValue(t);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let c=function(h){h()};s={value:!1,data:{},getValue:function(){return l},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},i.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,s,o.modules.format.params,c)})}else i.push({field:o.field,title:o.definition.title,value:l})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(function(i){var s=document.createElement("tr"),o=document.createElement("td"),l=document.createElement("td"),c,h=document.createElement("strong");o.appendChild(h),this.langBind("columns|"+i.field,function(f){h.innerHTML=f||i.title}),i.value instanceof Node?(c=document.createElement("div"),c.appendChild(i.value),l.appendChild(c)):l.innerHTML=i.value,s.appendChild(o),s.appendChild(l),t.appendChild(s)},this),Object.keys(e).length?t:""}}zl.moduleName="responsiveLayout";class Hl extends he{constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectable","highlight"),this.registerTableOption("selectableRangeMode","drag"),this.registerTableOption("selectableRollingSelection",!0),this.registerTableOption("selectablePersistence",!0),this.registerTableOption("selectableCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.table.options.selectable!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=e.getElement(),s=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",s)};e.modules.select={selected:!1},t.checkRowSelectability(e)?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&t.table.options.selectable!="highlight"&&(t.table.options.selectableRangeMode==="click"?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",function(o){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),i.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",s),document.body.addEventListener("keyup",s),t.toggleRow(e),!1}),i.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),i.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),s=this.table.rowManager.getDisplayRowIndex(e),o=i<=s?i:s,l=i>=s?i:s,c=this.table.rowManager.getDisplayRows().slice(0),h=c.splice(o,l-o+1);t.ctrlKey||t.metaKey?(h.forEach(f=>{f!==this.lastClickedRow&&(this.table.options.selectable!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectable&&this.toggleRow(f):this.toggleRow(f))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectable!==!0&&h.length>this.table.options.selectable&&(h=h.slice(0,this.table.options.selectable)),this.selectRows(h)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,s;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(o=>{s=this._selectRow(o,!0,!0),s&&t.push(s)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectable)&&this.table.options.selectable!==!0&&!i&&this.selectedRows.length>=this.table.options.selectable)if(this.table.options.selectableRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var s=this.table.rowManager.findRow(e);if(s){if(this.selectedRows.indexOf(s)==-1)return s.getElement().classList.add("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!0,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!0),this.selectedRows.push(s),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!0),this.dispatchExternal("rowSelected",s.getComponent()),this._rowSelectionChanged(t,s),s}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],s,o;switch(typeof e){case"undefined":s=Object.assign([],this.selectedRows);break;case"string":s=this.table.rowManager.findRow(e),s||(s=this.table.rowManager.getRows(e));break;default:s=e;break}Array.isArray(s)?s.length&&(s.forEach(l=>{o=this._deselectRow(l,!0,!0),o&&i.push(o)}),this._rowSelectionChanged(t,[],i)):s&&this._deselectRow(s,t,!0)}_deselectRow(e,t){var i=this,s=i.table.rowManager.findRow(e),o,l;if(s){if(o=i.selectedRows.findIndex(function(c){return c==s}),o>-1)return l=s.getElement(),l&&l.classList.remove("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),this.dispatchExternal("rowDeselected",s.getComponent()),i._rowSelectionChanged(t,void 0,s),s}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(s=>s.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(s=>s.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t)for(let s of i)this._selectRow(s,!0);else for(let s of i)this._deselectRow(s,!0)}}Hl.moduleName="selectRow";function gp(n,e,t,i,s,o,l){var c=l.alignEmptyValues,h=l.decimalSeparator,f=l.thousandSeparator,p=0;if(n=String(n),e=String(e),f&&(n=n.split(f).join(""),e=e.split(f).join("")),h&&(n=n.split(h).join("."),e=e.split(h).join(".")),n=parseFloat(n),e=parseFloat(e),isNaN(n))p=isNaN(e)?0:-1;else if(isNaN(e))p=1;else return n-e;return(c==="top"&&o==="desc"||c==="bottom"&&o==="asc")&&(p*=-1),p}function bp(n,e,t,i,s,o,l){var c=l.alignEmptyValues,h=0,f;if(!n)h=e?-1:0;else if(!e)h=1;else{switch(typeof l.locale){case"boolean":l.locale&&(f=this.langLocale());break;case"string":f=l.locale;break}return String(n).toLowerCase().localeCompare(String(e).toLowerCase(),f)}return(c==="top"&&o==="desc"||c==="bottom"&&o==="asc")&&(h*=-1),h}function Xr(n,e,t,i,s,o,l){var c=window.DateTime||luxon.DateTime,h=l.format||"dd/MM/yyyy HH:mm:ss",f=l.alignEmptyValues,p=0;if(typeof c<"u"){if(c.isDateTime(n)||(h==="iso"?n=c.fromISO(String(n)):n=c.fromFormat(String(n),h)),c.isDateTime(e)||(h==="iso"?e=c.fromISO(String(e)):e=c.fromFormat(String(e),h)),!n.isValid)p=e.isValid?-1:0;else if(!e.isValid)p=1;else return n-e;return(f==="top"&&o==="desc"||f==="bottom"&&o==="asc")&&(p*=-1),p}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function vp(n,e,t,i,s,o,l){return l.format||(l.format="dd/MM/yyyy"),Xr.call(this,n,e,t,i,s,o,l)}function wp(n,e,t,i,s,o,l){return l.format||(l.format="HH:mm"),Xr.call(this,n,e,t,i,s,o,l)}function yp(n,e,t,i,s,o,l){var c=n===!0||n==="true"||n==="True"||n===1?1:0,h=e===!0||e==="true"||e==="True"||e===1?1:0;return c-h}function Cp(n,e,t,i,s,o,l){var c=l.type||"length",h=l.alignEmptyValues,f=0;function p(b){var g;switch(c){case"length":g=b.length;break;case"sum":g=b.reduce(function(w,E){return w+E});break;case"max":g=Math.max.apply(null,b);break;case"min":g=Math.min.apply(null,b);break;case"avg":g=b.reduce(function(w,E){return w+E})/b.length;break}return g}if(!Array.isArray(n))f=Array.isArray(e)?-1:0;else if(!Array.isArray(e))f=1;else return p(e)-p(n);return(h==="top"&&o==="desc"||h==="bottom"&&o==="asc")&&(f*=-1),f}function Ep(n,e,t,i,s,o,l){var c=typeof n>"u"?0:1,h=typeof e>"u"?0:1;return c-h}function xp(n,e,t,i,s,o,l){var c,h,f,p,b=0,g,w=/(\d+)|(\D+)/g,E=/\d/,x=l.alignEmptyValues,_=0;if(!n&&n!==0)_=!e&&e!==0?0:-1;else if(!e&&e!==0)_=1;else{if(isFinite(n)&&isFinite(e))return n-e;if(c=String(n).toLowerCase(),h=String(e).toLowerCase(),c===h)return 0;if(!(E.test(c)&&E.test(h)))return c>h?1:-1;for(c=c.match(w),h=h.match(w),g=c.length>h.length?h.length:c.length;b<g;)if(f=c[b],p=h[b++],f!==p)return isFinite(f)&&isFinite(p)?(f.charAt(0)==="0"&&(f="."+f),p.charAt(0)==="0"&&(p="."+p),f-p):f>p?1:-1;return c.length>h.length}return(x==="top"&&o==="desc"||x==="bottom"&&o==="asc")&&(_*=-1),_}var _p={number:gp,string:bp,date:vp,time:wp,datetime:Xr,boolean:yp,array:Cp,exists:Ep,alphanum:xp};class Ni extends he{constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,s){var o=this.getSort();return o.forEach(l=>{delete l.column}),s.sort=o,s}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,s;switch(typeof e.definition.sorter){case"string":Ni.sorters[e.definition.sorter]?t=Ni.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),s=document.createElement("div"),s.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":s.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":s.appendChild(this.table.options.headerSortElement);break;default:s.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(s),e.modules.sort.element=s,this.setColumnHeaderSortIcon(e,"none"),(this.table.options.headerSortClickElement==="icon"?s:i).addEventListener("click",o=>{var l="",c=[],h=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?l=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?l=e.modules.sort.dir=="asc"?"desc":"asc":l="none";else switch(e.modules.sort.dir){case"asc":l="desc";break;case"desc":l="asc";break;default:l=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(o.shiftKey||o.ctrlKey)?(c=this.getSort(),h=c.findIndex(f=>f.field===e.getField()),h>-1?(c[h].dir=l,h=c.splice(h,1)[0],l!="none"&&c.push(h)):l!="none"&&c.push({column:e,dir:l}),this.setSort(c)):l=="none"?this.clear():this.setSort(e,l),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,s=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(o){var l;l=i.table.columnManager.findColumn(o.column),l?(o.column=l,s.push(o),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",o.column)}),i.sortList=s,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",s,o;if(t&&(t=t.getData(),s=e.getField(),s))switch(o=e.getFieldValue(t),typeof o){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(o)&&o!==""?i="number":o.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return Ni.sorters[i]}sort(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,s=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(i.forEach(function(l,c){var h;l.column&&(h=l.column.modules.sort,h&&(h.sorter||(h.sorter=t.findSorter(l.column)),l.params=typeof h.params=="function"?h.params(l.column.getComponent(),l.dir):h.params,s.push(l)),t.setColumnHeader(l.column,l.dir))}),s.length&&t._sortItems(e,s)):i.forEach(function(l,c){t.setColumnHeader(l.column,l.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(l=>{o.push(l.getComponent())}),this.dispatchExternal("dataSorted",t.getSort(),o)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,s;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);s=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof s=="object"?i.appendChild(s):i.innerHTML=s}}_sortItems(e,t){var i=t.length-1;e.sort((s,o)=>{for(var l,c=i;c>=0;c--){let h=t[c];if(l=this._sortRow(s,o,h.column,h.dir,h.params),l!==0)break}return l})}_sortRow(e,t,i,s,o){var l,c,h=s=="asc"?e:t,f=s=="asc"?t:e;return e=i.getFieldValue(h.getData()),t=i.getFieldValue(f.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",l=h.getComponent(),c=f.getComponent(),i.modules.sort.sorter.call(this,e,t,l,c,i.getComponent(),s,o)}}Ni.moduleName="sort",Ni.sorters=_p;class Il extends he{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,o,l;function c(h){o=h}typeof i=="function"&&(i=i(e,t.getComponent(),c)),i instanceof HTMLElement?s=i:(s=document.createElement("div"),i===!0&&(t instanceof In?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,h=>{s.innerHTML=i=h||t.definition.title}):i=t.definition.title),s.innerHTML=i),(i||i===0||i===!1)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",h=>h.preventDefault()),this.popupInstance=this.popup(s),typeof o=="function"&&this.popupInstance.renderCallback(o),l=this.popupInstance.containerEventCoords(e),this.popupInstance.show(l.x+15,l.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}Il.moduleName="tooltip";var Rp={integer:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},max:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,s=n.getData(),o=n.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(l){var c=l.getData();c!==s&&e==o.getFieldValue(c)&&(i=!1)}),i},required:function(n,e,t){return e!==""&&e!==null&&typeof e<"u"}};class Gn extends he{constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return s!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)}),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var s=i.validate();s!==!0&&(t=t.concat(s))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],s;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(o=>{s=t._extractValidator(o),s&&i.push(s)}):(s=this._extractValidator(e.definition.validator),s&&i.push(s)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,s;switch(typeof e){case"string":return s=e.indexOf(":"),s>-1?(t=e.substring(0,s),i=e.substring(s+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:Gn.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var s=this,o=[],l=this.invalidCells.indexOf(t);return e&&e.forEach(c=>{c.func.call(s,t.getComponent(),i,c.params)||o.push({type:c.type,parameters:c.params})}),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),l==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),l>-1&&this.invalidCells.splice(l,1)),o.length?o:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}Gn.moduleName="validate",Gn.validators=Rp;var kp=Object.freeze({__proto__:null,AccessorModule:Zi,AjaxModule:Gt,ClipboardModule:Vi,ColumnCalcsModule:yi,DataTreeModule:El,DownloadModule:Qi,EditModule:Bn,ExportModule:_l,FilterModule:oi,FormatModule:Dt,FrozenColumnsModule:Rl,FrozenRowsModule:kl,GroupRowsModule:Sl,HistoryModule:Oi,HtmlTableImportModule:Tl,ImportModule:Wn,InteractionModule:Ml,KeybindingsModule:Ci,MenuModule:Ll,MoveColumnsModule:Dl,MoveRowsModule:Ms,MutatorModule:tn,PageModule:$n,PersistenceModule:dt,PopupModule:Al,PrintModule:Fl,ReactiveDataModule:Pl,ResizeColumnsModule:Vl,ResizeRowsModule:Ol,ResizeTableModule:Nl,ResponsiveLayoutModule:zl,SelectRowModule:Hl,SortModule:Ni,TooltipModule:Il,ValidateModule:Gn}),Sp={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}};class Bl{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),s=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let o in t)i.hasOwnProperty(o)||(s&&console.warn("Invalid "+this.msgType+" option:",o),i[o]=t.key);for(let o in i)o in t?i[o]=t[o]:Array.isArray(i[o])?i[o]=Object.assign([],i[o]):typeof i[o]=="object"&&i[o]!==null?i[o]=Object.assign({},i[o]):typeof i[o]>"u"&&delete i[o];return i}}class Ls extends ct{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var s=this.rows().indexOf(e),o=e.getElement(),l=0;return new Promise((c,h)=>{if(s>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&Pe.elVisible(o)&&(l=Pe.elOffset(o).top-Pe.elOffset(this.elementVertical).top,l>0&&l<this.elementVertical.clientHeight-o.offsetHeight))return c(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(o.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-o.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-o.offsetTop)+o.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+o.offsetHeight;break;case"top":this.elementVertical.scrollTop=o.offsetTop;break}c()}else console.warn("Scroll Error - Row not visible"),h("Scroll Error - Row not visible")})}}class Tp extends Ls{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(s=>{i.appendChild(s.getElement())}),e.element.appendChild(i),t||e.cells.forEach(s=>{s.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Mp extends Ls{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},s=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(o=>{var l={},c;o.visible&&(o.modules.frozen||(c=o.getWidth(),l.leftPos=s,l.rightPos=s+c,l.width=c,this.isFitData&&(l.fitDataCheck=o.modules.vdomHoz?o.modules.vdomHoz.fitDataCheck:!0),s+c>this.vDomScrollPosLeft&&s<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=s),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=c),this.columns.push(o),o.modules.vdomHoz=l,s+=c))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(s=>{!s.definition.width&&s.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let s=0;s<t.cells.length;s++){let o=t.cells[s];i.appendChild(o.getElement()),o.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,s)=>{i!==this.columns[s]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let s=e;s<t;s++){let o=this.columns[s];o.modules.vdomHoz.leftPos+=i,o.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var o=s.getCell(i);s.getElement().insertBefore(o.getElement(),s.getCell(this.columns[this.rightCol]).getElement().nextSibling),o.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(o=>{if(o.type!=="group"){var l=o.getCell(i);o.getElement().insertBefore(l.getElement(),o.getCell(this.columns[this.leftCol]).getElement()),l.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(o=>{o.type!=="group"&&(o.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let s=this.fitDataColActualWidthCheck(i);s&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+s,this.vDomPadRight-=s)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var o=s.getCell(i);try{s.getElement().removeChild(o.getElement())}catch(l){console.warn("Could not removeColRight",l.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var o=s.getCell(i);try{s.getElement().removeChild(o.getElement())}catch(l){console.warn("Could not removeColLeft",l.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class Lp extends ct{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new Bl(this.table,"column definition",Cl),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Mp,basic:Tp};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i=this.table.options.autoColumnsDefinitions,s,o;if(e&&e.length){s=e[0];for(var l in s){let c={field:l,title:l},h=s[l];switch(typeof h){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":Array.isArray(h)?o="array":o="string";break;default:!isNaN(h)&&h!==""?o="number":h.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?o="alphanum":o="string";break}c.sorter=o,t.push(c)}if(i)switch(typeof i){case"function":this.table.options.columns=i.call(this.table,t);break;case"object":Array.isArray(i)?t.forEach(c=>{var h=i.find(f=>f.field===c.field);h&&Object.assign(c,h)}):t.forEach(c=>{i[c.field]&&Object.assign(c,i[c.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach((i,s)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new Jt(e,this),o=s.getElement(),l=i&&this.findColumnIndex(i);if(i&&l>-1){var c=i.getTopColumn(),h=this.columns.indexOf(c),f=c.getElement();t?(this.columns.splice(h,0,s),f.parentNode.insertBefore(o,f)):(this.columns.splice(h+1,0,s),f.parentNode.insertBefore(o,f.nextSibling))}else t?(this.columns.unshift(s),this.headersElement.insertBefore(s.getElement(),this.headersElement.firstChild)):(this.columns.push(s),this.headersElement.appendChild(s.getElement()));return s.columnRendered(),s}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof Jt)return e;if(e instanceof yl)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(s=>{t.push(s),t=t.concat(s.getColumns(!0))}),t.find(s=>s.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var s=i.split(".")[0];s===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(s=>{t.push(s.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,s,o){var l=e.indexOf(t),c,h=[];l>-1&&(e.splice(l,1),c=e.indexOf(i),c>-1?s&&(c=c+1):c=l,e.splice(c,0,t),o&&(h=this.chain("column-moving-rows",[t,i,s],null,[])||[],h=h.concat(this.table.rowManager.rows),h.forEach(function(f){if(f.cells.length){var p=f.cells.splice(l,1)[0];f.cells.splice(c,0,p)}})))}scrollToColumn(e,t,i){var s=0,o=e.getLeftOffset(),l=0,c=e.getElement();return new Promise((h,f)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":l=-this.element.clientWidth/2;break;case"right":l=c.clientWidth-this.headersElement.clientWidth;break}if(!i&&o>0&&o+c.offsetWidth<this.element.clientWidth)return!1;s=o+l,s=Math.max(Math.min(s,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(s),this.scrollHorizontal(s),h()}else console.warn("Scroll Error - Column not visible"),f("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var s,o,l;i.visible&&(s=i.definition.width||0,o=parseInt(i.minWidth),typeof s=="string"?s.indexOf("%")>-1?l=e/100*parseInt(s):l=parseInt(s):l=s,t+=l>o?l:o)}),t}addColumn(e,t,i){return new Promise((s,o)=>{var l=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&l.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),s(l)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){Pe.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class Dp extends Ls{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),s=this.rows();s.forEach((o,l)=>{this.styleRow(o,l),o.initialize(!1,!0),o.type!=="group"&&(t=!1),i.appendChild(o.getElement())}),e.appendChild(i),s.forEach(o=>{o.rendered(),o.heightInitialized||o.calcHeight(!0)}),s.forEach(o=>{o.heightInitialized||o.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows()}scrollToRowNearestTop(e){var t=Pe.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=Pe.elOffset(t).top-Pe.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Ap extends Ls{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,s=!1,o=this.table.rowManager.scrollLeft,l=this.rows(),c=this.vDomTop;c<=this.vDomBottom;c++)if(l[c]){var h=t-l[c].getElement().offsetTop;if(s===!1||Math.abs(h)<s)s=h,i=c;else break}l.forEach(f=>{f.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(o)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,s=e-this.vDomScrollPosBottom,o=this.vDomWindowBuffer*2,l=this.rows();if(this.scrollTop=e,-i>o||s>o){var c=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*l.length)),this.scrollColumns(c)}else t?(i<0&&this._addTopRow(l,-i),s<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(l,-s):this.vDomScrollPosBottom=this.scrollTop)):(s>=0&&this._addBottomRow(l,s),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(l,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,s=!1,o=0,l=0,c=this.rows();if(e)o=this.vDomTop,l=this.vDomBottom;else for(var h=this.vDomTop;h<=this.vDomBottom;h++)if(c[h])if(s)if(i-c[h].getElement().offsetTop>=0)l=h;else break;else if(t-c[h].getElement().offsetTop>=0)o=h;else if(s=!0,i-c[h].getElement().offsetTop>=0)l=h;else break;return c.slice(o,l+1)}_virtualRenderFill(e,t,i){var s=this.tableElement,o=this.elementVertical,l=0,c=0,h=0,f=0,p=0,b=0,g=this.rows(),w=g.length,E=0,x,_,k=[],V=0,L=0,F=this.table.rowManager.fixedHeight,H=this.elementVertical.clientHeight,W=this.table.options.rowHeight,P=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;s.firstChild;)s.removeChild(s.firstChild);f=(w-e+1)*this.vDomRowHeight,f<H&&(e-=Math.ceil((H-f)/this.vDomRowHeight),e<0&&(e=0)),l=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=l}if(w&&Pe.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,F||this.table.options.maxHeight?(W&&(L=H/W+this.vDomWindowBuffer/W),L=Math.max(this.vDomWindowMinTotalRows,Math.ceil(L))):L=w;(L==w||c<=H+this.vDomWindowBuffer||V<this.vDomWindowMinTotalRows)&&this.vDomBottom<w-1;){for(k=[],_=document.createDocumentFragment(),b=0;b<L&&this.vDomBottom<w-1;)E=this.vDomBottom+1,x=g[E],this.styleRow(x,E),x.initialize(!1,!0),!x.heightInitialized&&!this.table.options.rowHeight&&x.clearCellHeight(),_.appendChild(x.getElement()),k.push(x),this.vDomBottom++,b++;if(!k.length)break;s.appendChild(_),k.forEach(D=>{D.rendered(),D.heightInitialized||D.calcHeight(!0)}),k.forEach(D=>{D.heightInitialized||D.setCellHeight()}),k.forEach(D=>{h=D.getHeight(),V<l?p+=h:c+=h,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=h*2),V++}),P=this.table.rowManager.adjustTableSize(),H=this.elementVertical.clientHeight,P&&(F||this.table.options.maxHeight)&&(W=c/V,L=Math.max(this.vDomWindowMinTotalRows,Math.ceil(H/W+this.vDomWindowBuffer/W)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-p,this.vDomBottomPad=this.vDomBottom==w-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-c-p,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((c+p)/V),this.vDomBottomPad=this.vDomRowHeight*(w-this.vDomBottom-1),this.vDomScrollHeight=p+c+this.vDomBottomPad-H),s.style.paddingTop=this.vDomTopPad+"px",s.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+p+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-H:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-H),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-H),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,s=[],o=0,l=this.vDomTop-1,c=0,h=!0;h;)if(this.vDomTop){let f=e[l],p,b;f&&c<this.vDomMaxRenderChain?(p=f.getHeight()||this.vDomRowHeight,b=f.initialized,t>=p?(this.styleRow(f,l),i.insertBefore(f.getElement(),i.firstChild),(!f.initialized||!f.heightInitialized)&&s.push(f),f.initialize(),b||(p=f.getElement().offsetHeight,p>this.vDomWindowBuffer&&(this.vDomWindowBuffer=p*2)),t-=p,o+=p,this.vDomTop--,l--,c++):h=!1):h=!1}else h=!1;for(let f of s)f.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomTopPad-=o,this.vDomTopPad<0&&(this.vDomTopPad=l*this.vDomRowHeight),l<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=o)}_removeTopRow(e,t){for(var i=[],s=0,o=0,l=!0;l;){let c=e[this.vDomTop],h;c&&o<this.vDomMaxRenderChain?(h=c.getHeight()||this.vDomRowHeight,t>=h?(this.vDomTop++,t-=h,s+=h,i.push(c),o++):l=!1):l=!1}for(let c of i){let h=c.getElement();h.parentNode&&h.parentNode.removeChild(h)}s&&(this.vDomTopPad+=s,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?s:s+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,s=[],o=0,l=this.vDomBottom+1,c=0,h=!0;h;){let f=e[l],p,b;f&&c<this.vDomMaxRenderChain?(p=f.getHeight()||this.vDomRowHeight,b=f.initialized,t>=p?(this.styleRow(f,l),i.appendChild(f.getElement()),(!f.initialized||!f.heightInitialized)&&s.push(f),f.initialize(),b||(p=f.getElement().offsetHeight,p>this.vDomWindowBuffer&&(this.vDomWindowBuffer=p*2)),t-=p,o+=p,this.vDomBottom++,l++,c++):h=!1):h=!1}for(let f of s)f.clearCellHeight();this._quickNormalizeRowHeight(s),o&&(this.vDomBottomPad-=o,(this.vDomBottomPad<0||l==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=o)}_removeBottomRow(e,t){for(var i=[],s=0,o=0,l=!0;l;){let c=e[this.vDomBottom],h;c&&o<this.vDomMaxRenderChain?(h=c.getHeight()||this.vDomRowHeight,t>=h?(this.vDomBottom--,t-=h,s+=h,i.push(c),o++):l=!1):l=!1}for(let c of i){let h=c.getElement();h.parentNode&&h.parentNode.removeChild(h)}s&&(this.vDomBottomPad+=s,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=s)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class Fp extends ct{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,s=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,s),this.dispatch("scroll-vertical",i,s),this.dispatchExternal("scrollVertical",i,s))})}findRow(e){if(typeof e=="object"){if(e instanceof nt)return e;if(e instanceof Ss)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((s,o)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),s()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,s)=>{if(i&&typeof i=="object"){var o=new nt(i,this);this.rows.push(o)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
|
41
|
+
</svg>`,s.getElement().classList.add("tabulator-row-handle");function o(l){var h=n.element;n.open=l,h&&(n.open?(i.classList.add("open"),h.style.display=""):(i.classList.remove("open"),h.style.display="none"))}return i.addEventListener("click",function(l){l.stopImmediatePropagation(),o(!n.open),s.getTable().rowManager.adjustTableSize()}),o(n.open),i}function cg(s,e,t){var i=document.createElement("input"),n=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",l=>{l.stopPropagation()}),typeof s.getRow=="function"){var o=s.getRow();o instanceof or?(i.addEventListener("change",l=>{this.table.options.selectableRangeMode==="click"&&n?n=!1:o.toggleSelect()}),this.table.options.selectableRangeMode==="click"&&i.addEventListener("click",l=>{n=!0,this.table.modules.selectRow.handleComplexRowClick(o._row,l)}),i.checked=o.isSelected&&o.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(o,i)):i=""}else i.addEventListener("change",l=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var dg={plaintext:jm,html:Km,textarea:qm,money:Ym,link:Xm,image:Jm,tickCross:Zm,datetime:Qm,datetimediff:eg,lookup:tg,star:ig,traffic:ng,progress:rg,color:sg,buttonTick:og,buttonCross:ag,rownum:lg,handle:ug,responsiveCollapse:hg,rowSelection:cg};class ut extends ie{constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}lookupFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},n=e.definition["formatter"+t];switch(typeof n){case"string":ut.formatters[n]?i.formatter=ut.formatters[n]:(console.warn("Formatter Error - No such formatter found: ",n),i.formatter=ut.formatters.plaintext);break;case"function":i.formatter=n;break;default:i.formatter=ut.formatters.plaintext;break}return i}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var n,o,l,h;return e.definition.titleFormatter?(n=this.getFormatter(e.definition.titleFormatter),l=c=>{e.titleFormatterRendered=c},h={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},o=e.definition.titleFormatterParams||{},o=typeof o=="function"?o():o,n.call(this,h,o,l)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function n(o){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=o,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,n)}formatExportValue(e,t){var i=e.column.modules.format[t],n;if(i){let o=function(l){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=l,e.modules.format.rendered=!1};return n=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),n,o)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?" ":e}getFormatter(e){switch(typeof e){case"string":ut.formatters[e]?e=ut.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=ut.formatters.plaintext);break;case"function":break;default:e=ut.formatters.plaintext;break}return e}}ut.moduleName="format",ut.formatters=dg;class Bl extends ie{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)})}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,n=0;this.leftColumns.forEach((o,l)=>{if(o.modules.frozen.marginValue=i,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(i+=o.getWidth()),l==this.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var h=this.getColGroupParentElement(o);t.includes(h)||(this.layoutElement(h,o),t.push(h)),o.modules.frozen.edge&&h.classList.add("tabulator-frozen-"+o.modules.frozen.position)}else this.layoutElement(o.getElement(),o);e&&o.cells.forEach(c=>{this.layoutElement(c.getElement(!0),o)})}),this.rightColumns.forEach((o,l)=>{o.modules.frozen.marginValue=n,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(n+=o.getWidth()),l==this.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?this.layoutElement(this.getColGroupParentElement(o),o):this.layoutElement(o.getElement(),o),e&&o.cells.forEach(h=>{this.layoutElement(h.getElement(!0),o)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}_calcSpace(e,t){var i=0;for(let n=0;n<t;n++)e[n].visible&&(i+=e[n].getWidth());return i}}Bl.moduleName="frozenColumns";class Vl extends ie{constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var n=t.indexOf(i);n>-1&&t.splice(n,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}Vl.moduleName="frozenRows";class fg{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Oi{constructor(e,t,i,n,o,l,h){this.groupManager=e,this.parent=t,this.key=n,this.level=i,this.field=o,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=h,this.rows=[],this.groups=[],this.groupList=[],this.generator=l,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=h?h.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,n=new Oi(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=n,this.groupList.push(n)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),n=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[n]&&this.groups[n].addRow(e):(this.groups[n]||this._createGroup(i,t),this.groups[n].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var n=this.conformRowData({});e.updateData(n);var o=this.rows.indexOf(t);o>-1?i?this.rows.splice(o+1,0,e):this.rows.splice(o,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(n=>{i.push(n.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(n=>{var o=n.getElement();e.parentNode.insertBefore(o,e.nextSibling),n.initialize(),e=o})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var n=i.getRowGroup(e);n&&(t=n)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(n=>{i=i.concat(n.getRows(e,t))}):this.rows.forEach(function(n){i.push(e?n.getComponent():n)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,ve.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new fg(this)),this.component}}class Wl extends ie{constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(o,l)=>{this.headerGenerator[0]=(h,c,f)=>(typeof h>"u"?"":h)+"<span>("+c+" "+(c===1?o:l.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var n=this.table.columnManager.getRealColumns();n.forEach(o=>{o.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((o,l)=>{var h,c;typeof o=="function"?h=o:(c=this.table.columnManager.getColumnByField(o),c?h=function(f){return c.getFieldValue(f)}:h=function(f){return f[o]}),this.groupIDLookups.push({field:typeof o=="function"?!1:o,func:h,values:this.allowedValues?this.allowedValues[l]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(o=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var n=e.modules.group.rows;return n.length>1&&(!t||t&&n.indexOf(t)==-1?i?n[0]!==e&&(t=n[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):n[n.length-1]!==e&&(t=n[n.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof Oi&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t instanceof Oi?t:t.modules.group,o=e instanceof Oi?e:e.modules.group;n===o?this.table.rowManager.moveRowInArray(n.rows,e,t,i):(o&&o.removeRow(e),n.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var n={};n.level=0,n.rowCount=0,n.headerContent="";var o=[];i.hasSubGroups?(o=this.pullGroupListData(i.groupList),n.level=i.level,n.rowCount=o.length-i.groupList.length,n.headerContent=i.generator(i.key,n.rowCount,i.rows,i),t.push(n),t=t.concat(o)):(n.level=i.level,n.headerContent=i.generator(i.key,i.rows.length,i.rows,i),n.rowCount=i.getRows().length,t.push(n),i.getRows().forEach(l=>{t.push(l.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var n=i.getRowGroup(e);n&&(t=n)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var n=t+"_"+e,o;i=i||[],o=new Oi(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[n]),this.groups[n]=o,this.groupList.push(o)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n="0_"+i;this.groups[n]&&this.groups[n].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!n}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),n=this.getExpectedPath(e),o;o=i.length==n.length&&i.every((l,h)=>l===n[h]),o||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(n=>{t.push(n.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,n)=>{this.table.rowManager.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}Wl.moduleName="groupRows";var pg={cellEdit:function(s){s.component.setValueProcessData(s.data.oldValue),s.component.cellRendered()},rowAdd:function(s){s.component.deleteActual()},rowDelete:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e)},rowMove:function(s){var e=s.data.posFrom-s.data.posTo>0;this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},mg={cellEdit:function(s){s.component.setValueProcessData(s.data.newValue),s.component.cellRendered()},rowAdd:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e)},rowDelete:function(s){s.component.deleteActual()},rowMove:function(s){this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posTo),s.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}};class fi extends ie{constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,n){this.action("rowAdd",e,{data:t,pos:i,index:n})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return fi.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn("History Undo Error - No more history to undo"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return fi.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn("History Redo Error - No more history to redo"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof $e)i.component===e&&(i.component=t);else if(i.component instanceof pn&&i.component.row===e){var n=i.component.column.getField();n&&(i.component=t.getCell(n))}})}}fi.moduleName="history",fi.undoers=pg,fi.redoers=mg;class $l extends ie{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),n=e.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var l=0;l<n.length;l++){var h=n[l],c=h.getElementsByTagName("td"),f={};this.hasIndex||(f[t.index]=l);for(var m=0;m<c.length;m++){var b=c[m];typeof this.fieldIndex[m]<"u"&&(f[this.fieldIndex[m]]=b.innerHTML)}o.push(f)}t.data=o,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var n=e.attributes,o=Object.keys(i||t),l={};o.forEach(m=>{l[m.toLowerCase()]=m});for(var h in n){var c=n[h],f;c&&typeof c=="object"&&c.name&&c.name.indexOf("tabulator-")===0&&(f=c.name.replace("tabulator-",""),typeof l[f]<"u"&&(t[l[f]]=this._attribValue(c.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],o=!1,l=this._findCol(n.textContent),h;l?o=!0:l={title:n.textContent.trim()},l.field||(l.field=n.textContent.trim().toLowerCase().replace(" ","_")),h=n.getAttribute("width"),h&&!l.width&&(l.width=h),this._extractOptions(n,l,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=l.field,l.field==this.table.options.index&&(this.hasIndex=!0),o||this.table.options.columns.push(l)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],o={title:"",field:"col"+i};this.fieldIndex[i]=o.field;var l=n.getAttribute("width");l&&(o.width=l),this.table.options.columns.push(o)}}}$l.moduleName="htmlTableImport";function gg(s){var e=[],t=0,i=0,n=!1;for(let o=0;o<s.length;o++){let l=s[o],h=s[o+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),l=='"'&&n&&h=='"'){e[t][i]+=l,o++;continue}if(l=='"'){n=!n;continue}if(l==","&&!n){i++;continue}if(l=="\r"&&h==`
|
42
|
+
`&&!n){i=0,t++,o++;continue}if((l=="\r"||l==`
|
43
|
+
`)&&!n){i=0,t++;continue}e[t][i]+=l}return e}function bg(s){try{return JSON.parse(s)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function vg(s){return s}var wg={csv:gg,json:bg,array:vg};class gn extends ie{constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,n,o){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(l=>(console.error("Import Error:",l||"Unable to import data"),Promise.reject(l)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=gn.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t){var i=this.lookupImporter(e);if(i)return this.pickFile(t).then(this.importData.bind(this,i)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch(n=>(console.error("Import Error:",n||"Unable to import file"),Promise.reject(n)))}pickFile(e){return new Promise((t,i)=>{var n=document.createElement("input");n.type="file",n.accept=e,n.addEventListener("change",o=>{var l=n.files[0],h=new FileReader;switch(this.table.options.importReader){case"buffer":h.readAsArrayBuffer(l);break;case"binary":h.readAsBinaryString(l);break;case"url":h.readAsDataURL(l);break;case"text":default:h.readAsText(l)}h.onload=c=>{t(h.result)},h.onerror=c=>{console.warn("File Load Error - Unable to read file"),i()}}),n.click()})}importData(e,t){var i=e.call(this.table,t);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}structureArrayToObject(e){var t=e.shift(),i=e.map(n=>{var o={};return t.forEach((l,h)=>{o[l]=n[h]}),o});return i}structureArrayToColumns(e){var t=[],i=this.table.getColumns();return i[0]&&e[0][0]&&i[0].getDefinition().title===e[0][0]&&e.shift(),e.forEach(n=>{var o={};n.forEach((l,h)=>{var c=i[h];c&&(o[c.getField()]=l)}),t.push(o)}),t}setData(e){return this.table.setData(e)}}gn.moduleName="import",gn.importers=wg;class Gl extends ie{constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let n in this.eventMap)this.eventMap[n]===i&&this.subscribers[n]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,n){var o=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":o.tap=!0,clearTimeout(o.tapHold),o.tapHold=setTimeout(()=>{clearTimeout(o.tapHold),o.tapHold=null,o.tap=null,clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"TapHold",i,n)},1e3);break;case"end":o.tap&&(o.tap=null,this.dispatchEvent(e+"Tap",i,n)),o.tapDbl?(clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(e+"DblTap",i,n)):o.tapDbl=setTimeout(()=>{clearTimeout(o.tapDbl),o.tapDbl=null},300),clearTimeout(o.tapHold),o.tapHold=null;break}}dispatchEvent(e,t,i){var n=i.getComponent(),o;this.columnSubscribers[e]&&(i instanceof pn?o=i.column.definition[e]:i instanceof Lt&&(o=i.definition[e]),o&&o(t,n)),this.dispatchExternal(e,t,n)}}Gl.moduleName="interaction";var yg={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 89"]},Cg={keyBlock:function(s){s.stopPropagation(),s.preventDefault()},scrollPageUp:function(s){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;s.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(s){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;s.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(s){this.dispatch("keybinding-nav-prev",s)},navNext:function(s){this.dispatch("keybinding-nav-next",s)},navLeft:function(s){this.dispatch("keybinding-nav-left",s)},navRight:function(s){this.dispatch("keybinding-nav-right",s)},navUp:function(s){this.dispatch("keybinding-nav-up",s)},navDown:function(s){this.dispatch("keybinding-nav-down",s)},undo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.undo()))},redo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(s){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};class Qt extends ie{constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,Qt.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)Qt.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var n=Array.isArray(i)?i:[i];n.forEach(o=>{this.mapBinding(t,o)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:Qt.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},n=t.toString().toLowerCase().split(" ").join("").split("+");n.forEach(o=>{switch(o){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:o=isNaN(o)?o.toUpperCase().charCodeAt(0):parseInt(o),i.keys.push(o),this.watchKeys[o]||(this.watchKeys[o]=[]),this.watchKeys[o].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];n&&(e.pressedKeys.push(i),n.forEach(function(o){e.checkBinding(t,o)}))},this.keydownBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];if(n){var o=e.pressedKeys.indexOf(i);o>-1&&e.pressedKeys.splice(o,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(n=>{var o=this.pressedKeys.indexOf(n);o==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}Qt.moduleName="keybindings",Qt.bindings=yg,Qt.actions=Cg;class Ul extends ie{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,n,o){var l=!(e instanceof MouseEvent),h=document.createElement("div"),c;if(h.classList.add("tabulator-menu"),l||e.preventDefault(),!(!i||!i.length)){if(n)c=o.child(h);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=c=this.popup(h)}i.forEach(f=>{var m=document.createElement("div"),b=f.label,v=f.disabled;f.separator?m.classList.add("tabulator-menu-separator"):(m.classList.add("tabulator-menu-item"),typeof b=="function"&&(b=b.call(this.table,t.getComponent())),b instanceof Node?m.appendChild(b):m.innerHTML=b,typeof v=="function"&&(v=v.call(this.table,t.getComponent())),v?(m.classList.add("tabulator-menu-item-disabled"),m.addEventListener("click",C=>{C.stopPropagation()})):f.menu&&f.menu.length?m.addEventListener("click",C=>{C.stopPropagation(),this.loadMenu(C,t,f.menu,m,c)}):f.action&&m.addEventListener("click",C=>{f.action(C,t.getComponent())}),f.menu&&f.menu.length&&m.classList.add("tabulator-menu-item-submenu")),h.appendChild(m)}),h.addEventListener("click",f=>{this.rootPopup&&this.rootPopup.hide()}),c.show(n||e),c===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatchExternal("menuOpened",t.getComponent()))}}}Ul.moduleName="menu";class jl extends ie{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){var t=this,i={},n;!e.modules.frozen&&!e.isGroup&&(n=e.getElement(),i.mousemove=(function(o){e.parent===t.moving.parent&&((t.touchMove?o.touches[0].pageX:o.pageX)-ve.elOffset(n).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveColumn(e,!1)))}).bind(t),n.addEventListener("mousedown",function(o){t.touchMove=!1,o.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(o){o.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,n,o,l,h,c,f;t.addEventListener("touchstart",m=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextColumn(),l=n?n.getWidth()/2:0,o=e.prevColumn(),h=o?o.getWidth()/2:0,c=0,f=0,i=!1,this.startMove(m,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",m=>{var b,v;this.moving&&(this.moveHover(m),i||(i=m.touches[0].pageX),b=m.touches[0].pageX-i,b>0?n&&b-c>l&&(v=n,v!==e&&(i=m.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveColumn(v,!0))):o&&-b-f>h&&(v=o,v!==e&&(i=m.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveColumn(v,!1))),v&&(n=v.nextColumn(),c=l,l=n?n.getWidth()/2:0,o=v.prevColumn(),f=h,h=o?o.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",m=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(m)})}startMove(e,t){var i=t.getElement(),n=this.table.columnManager.getContentsElement(),o=this.table.columnManager.getHeadersElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-ve.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),n.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-o.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(n,o){var l=n.getElement(!0);l.parentNode&&i[o]&&l.parentNode.insertBefore(i[o].getElement(),l.nextSibling)}):e.getCells().forEach(function(n,o){var l=n.getElement(!0);l.parentNode&&i[o]&&l.parentNode.insertBefore(i[o].getElement(),l)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-ve.elOffset(t).left+i,o;this.hoverElement.style.left=n-this.startX+"px",n-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{o=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=o,this.autoScrollTimeout=!1},1))),i+t.clientWidth-n<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{o=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=o,this.autoScrollTimeout=!1},1)))}}jl.moduleName="moveColumn";class lr extends ie{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(n){t.tableRowDrop(n,e)}).bind(t),i.mousemove=(function(n){var o;n.pageY-ve.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(o=e.getElement(),o.parentNode.insertBefore(t.placeholderElement,o.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(o=e.getElement(),o.previousSibling&&(o.parentNode.insertBefore(t.placeholderElement,o),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},n;i.mouseup=(function(o){t.tableRowDrop(o,e)}).bind(t),i.mousemove=(function(o){var l=e.getElement();o.pageY-ve.elOffset(l).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(l.parentNode.insertBefore(t.placeholderElement,l.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(l.parentNode.insertBefore(t.placeholderElement,l),t.moveRow(e,!1))}).bind(t),this.hasHandle||(n=e.getElement(),n.addEventListener("mousedown",function(o){o.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(o){o.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(n){n.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(n,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(n){n.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,n,o,l,h,c,f;t.addEventListener("touchstart",m=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextRow(),l=n?n.getHeight()/2:0,o=e.prevRow(),h=o?o.getHeight()/2:0,c=0,f=0,i=!1,this.startMove(m,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",m=>{var b,v;this.moving&&(m.preventDefault(),this.moveHover(m),i||(i=m.touches[0].pageY),b=m.touches[0].pageY-i,b>0?n&&b-c>l&&(v=n,v!==e&&(i=m.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveRow(v,!0))):o&&-b-f>h&&(v=o,v!==e&&(i=m.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveRow(v,!1))),v&&(n=v.nextRow(),c=l,l=n?n.getHeight()/2:0,o=v.prevRow(),f=h,h=o?o.getHeight()/2:0))}),t.addEventListener("touchend",m=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(m),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,n=this.touchMove?e.touches[0].pageY:e.pageY,o,l;o=t.getElement(),this.connection?(l=o.getBoundingClientRect(),this.startX=l.left-i+window.pageXOffset,this.startY=l.top-n+window.pageYOffset):this.startY=n-o.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(n-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var n=o=>{this.elementRowDrop(o,i,this.moving)};i.addEventListener("mouseup",n),i.tabulatorElementDropEvent=n,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var n=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender;break}n?n.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,n=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=this.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?n=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}lr.prototype.receivers={insert:function(s,e,t){return this.table.addRow(s.getData(),void 0,e),!0},add:function(s,e,t){return this.table.addRow(s.getData()),!0},update:function(s,e,t){return e?(e.update(s.getData()),!0):!1},replace:function(s,e,t){return e?(this.table.addRow(s.getData(),void 0,e),e.delete(),!0):!1}},lr.prototype.senders={delete:function(s,e,t){s.delete()}},lr.moduleName="moveRow";var Eg={};class Hi extends ie{constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var o="mutator"+(n.charAt(0).toUpperCase()+n.slice(1)),l;e.definition[o]&&(l=this.lookupMutator(e.definition[o]),l&&(t=!0,i[o]={mutator:l,params:e.definition[o+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":Hi.mutators[e]?t=Hi.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var n="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),o;return this.enabled&&this.table.columnManager.traverse(l=>{var h,c,f;l.modules.mutate&&(h=l.modules.mutate[n]||l.modules.mutate.mutator||!1,h&&(o=l.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof o<"u")&&(f=l.getComponent(),c=typeof h.params=="function"?h.params(o,e,t,f):h.params,l.setFieldValue(e,h.mutator(o,e,t,c,f)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,e.row.getData()),e.column.setFieldValue(n,t),i.mutator(t,n,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var n=e.row.getCell(i);n&&n.setValue(n.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}Hi.moduleName="mutator",Hi.mutators=Eg;function xg(s,e,t,i,n){var o=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),c=document.createElement("span"),f=document.createElement("span"),m=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",b=>{l.innerHTML=b}),this.table.modules.localize.langBind("pagination|counter|of",b=>{c.innerHTML=b}),this.table.modules.localize.langBind("pagination|counter|rows",b=>{m.innerHTML=b}),i?(h.innerHTML=" "+e+"-"+Math.min(e+s-1,i)+" ",f.innerHTML=" "+i+" ",o.appendChild(l),o.appendChild(h),o.appendChild(c),o.appendChild(f),o.appendChild(m)):(h.innerHTML=" 0 ",o.appendChild(l),o.appendChild(h),o.appendChild(m)),o}function _g(s,e,t,i,n){var o=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),c=document.createElement("span"),f=document.createElement("span"),m=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",b=>{l.innerHTML=b}),h.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",b=>{c.innerHTML=b}),f.innerHTML=" "+n+" ",this.table.modules.localize.langBind("pagination|counter|pages",b=>{m.innerHTML=b}),o.appendChild(l),o.appendChild(h),o.appendChild(c),o.appendChild(f),o.appendChild(m),o}var Rg={rows:xg,pages:_g};class bn extends ie{constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,n=i.getDisplayRows(),o;return t?n.length?o=n[0]:i.activeRows.length&&(o=i.activeRows[i.activeRows.length-1],t=!1):n.length&&(o=n[n.length-1],t=!(n.length<this.size)),{index:o,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,n){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),n.page=this.page,this.size&&(n.size=this.size),n}userSetPageToRow(e){return this.table.options.pagination&&(e=this.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,n,o;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),n=i.scrollHeight-i.clientHeight-e,o=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,n<o&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(n){i.innerHTML=n}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=bn.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",n=>{this.firstBut.innerHTML=n}),this.langBind("pagination|first_title",n=>{this.firstBut.setAttribute("aria-label",n),this.firstBut.setAttribute("title",n)}),this.langBind("pagination|prev",n=>{this.prevBut.innerHTML=n}),this.langBind("pagination|prev_title",n=>{this.prevBut.setAttribute("aria-label",n),this.prevBut.setAttribute("title",n)}),this.langBind("pagination|next",n=>{this.nextBut.innerHTML=n}),this.langBind("pagination|next_title",n=>{this.nextBut.setAttribute("aria-label",n),this.nextBut.setAttribute("title",n)}),this.langBind("pagination|last",n=>{this.lastBut.innerHTML=n}),this.langBind("pagination|last_title",n=>{this.lastBut.setAttribute("aria-label",n),this.lastBut.setAttribute("title",n)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",n=>{this.pageSizeSelect.setAttribute("aria-label",n),this.pageSizeSelect.setAttribute("title",n),t.innerHTML=n}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",n=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var n=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(n)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var n;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),n=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof n){case"object":if(n instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(n)}else this.pageCounterElement.innerHTML="",n!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",n);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=n}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),n=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let o=i;o<=n;o++)o>0&&o<=this.max&&this.pagesElement.appendChild(this._generatePageButton(o));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,n,o,l,h=e.filter(c=>c.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(n=0,o=e.length):(n=this.size*(this.page-1),o=n+parseInt(this.size)),this._setPageButtons();for(let c=n;c<o;c++){let f=e[c];f&&(i.push(f),f.type==="row"&&(l||(l=f),t++))}return this._setPageCounter(h.length,t,l?h.indexOf(l)+1:0),i}else return this._setPageButtons(),this._setPageCounter(h.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else this.dispatchExternal("pageLoaded",this.getPage());else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}bn.moduleName="page",bn.pageCounters=Rg;var Tg={local:function(s,e){var t=localStorage.getItem(s+"-"+e);return t?JSON.parse(t):!1},cookie:function(s,e){var t=document.cookie,i=s+"-"+e,n=t.indexOf(i+"="),o,l;return n>-1&&(t=t.slice(n),o=t.indexOf(";"),o>-1&&(t=t.slice(0,o)),l=t.replace(i+"=","")),l?JSON.parse(l):!1}},Sg={local:function(s,e,t){localStorage.setItem(s+"-"+e,JSON.stringify(t))},cookie:function(s,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=s+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class qe extends ie{constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:qe.readers[this.table.options.persistenceReaderFunc]?this.readFunc=qe.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):qe.readers[this.mode]?this.readFunc=qe.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:qe.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=qe.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):qe.writers[this.mode]?this.writeFunc=qe.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(n=>{var o=Object.getOwnPropertyDescriptor(t,n),l=t[n];o&&Object.defineProperty(t,n,{set:h=>{l=h,this.defWatcherBlock||this.save("columns"),o.set&&o.set(h)},get:()=>(o.get&&o.get(),l)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t){var i=[];return t=t||[],t.forEach((n,o)=>{var l=this._findColumn(e,n),h;l&&(this.config.columns===!0||this.config.columns==null?(h=Object.keys(l),h.push("width")):h=this.config.columns,h.forEach(c=>{c!=="columns"&&typeof n[c]<"u"&&(l[c]=n[c])}),l.columns&&(l.columns=this.mergeDefinition(l.columns,n.columns)),i.push(l))}),e.forEach((n,o)=>{var l=this._findColumn(t,n);l||(i.length>o?i.splice(o,0,n):i.push(n))}),i}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(n){switch(i){case"group":return n.title===t.title&&n.columns.length===t.columns.length;case"field":return n.field===t.field;case"object":return n===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(n=>{var o={},l=n.getDefinition(),h;n.isGroup?(o.title=l.title,o.columns=this.parseColumns(n.getColumns())):(o.field=n.getField(),this.config.columns===!0||this.config.columns==null?(h=Object.keys(l),h.push("width"),h.push("visible")):h=this.config.columns,h.forEach(c=>{switch(c){case"width":o.width=n.getWidth();break;case"visible":o.visible=n.visible;break;default:typeof l[c]!="function"&&i.indexOf(c)===-1&&(o[c]=l[c])}})),t.push(o)}),t}}qe.moduleName="persistence",qe.moduleInitOrder=-10,qe.readers=Tg,qe.writers=Sg;class Kl extends ie{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,n){var o;function l(h){o=h}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),l):e,this.loadPopup(t,i,e,o,n)}loadPopup(e,t,i,n,o){var l=!(e instanceof MouseEvent),h,c;i instanceof HTMLElement?h=i:(h=document.createElement("div"),h.innerHTML=i),h.classList.add("tabulator-popup"),h.addEventListener("click",f=>{f.stopPropagation()}),l||e.preventDefault(),c=this.popup(h),typeof n=="function"&&c.renderCallback(n),e?c.show(e):c.show(t.getElement(),o||"center"),c.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}Kl.moduleName="popup";class ql extends ie{constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var n=window.scrollX,o=window.scrollY,l=document.createElement("div"),h=document.createElement("div"),c=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),f,m;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(l.classList.add("tabulator-print-header"),f=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof f=="string"?l.innerHTML=f:l.appendChild(f),this.element.appendChild(l)),this.element.appendChild(c),this.table.options.printFooter&&(h.classList.add("tabulator-print-footer"),m=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof m=="string"?h.innerHTML=m:h.appendChild(m),this.element.appendChild(h)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(n,o),this.manualBlock=!1}}ql.moduleName="print";class Yl extends ie{constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),o;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),n.forEach(l=>{t.table.rowManager.addRowActual(l,!1)}),o=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),o}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),o;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),n.forEach(l=>{t.table.rowManager.addRowActual(l,!0)}),o=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),o}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n,o;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[0]),n&&n.deleteActual()),o=t.origFuncs.shift.call(e),t.unblock("data-shift")),o}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n,o;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),n&&n.deleteActual()),o=t.origFuncs.pop.call(e),t.unblock("data-pop")),o}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),o=n[0]<0?e.length+n[0]:n[0],l=n[1],h=n[2]?n.slice(2):!1,c,f;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),h&&(c=e[o]?t.table.rowManager.getRowFromDataObject(e[o]):!1,c?h.forEach(b=>{t.table.rowManager.addRowActual(b,!0,c,!0)}):(h=h.slice().reverse(),h.forEach(b=>{t.table.rowManager.addRowActual(b,!0,!1,!0)}))),l!==0){var m=e.slice(o,typeof n[1]>"u"?n[1]:o+l);m.forEach((b,v)=>{var C=t.table.rowManager.getRowFromDataObject(b);C&&C.deleteActual(v!==m.length-1)})}(h||l!==0)&&t.table.rowManager.reRenderInPosition(),f=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return f}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var o=n.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return o}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var o=n.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return o}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var o=n.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return o}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var o=n.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return o}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var o=n.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return o}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var n=this,o=Object.getOwnPropertyDescriptor(t,i),l=t[i],h=this.currentVersion;Object.defineProperty(t,i,{set:c=>{if(l=c,!n.blocked&&h===n.currentVersion){n.block("key");var f={};f[i]=c,e.updateData(f),n.unblock("key")}o.set&&o.set(c)},get:()=>(o.get&&o.get(),l)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}Yl.moduleName="reactiveData";class Xl extends ie{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,n){var o=this,l=!1,h=i.definition.resizable,c={},f=i.getLastColumn();if(e==="header"&&(l=i.definition.formatter=="textarea"||i.definition.variableHeight,c={variableHeight:l}),(h===!0||h==e)&&this._checkResizability(f)){var m=document.createElement("span");m.className="tabulator-col-resize-handle",m.addEventListener("click",function(v){v.stopPropagation()});var b=function(v){o.startColumn=i,o.initialNextColumn=o.nextColumn=f.nextColumn(),o._mouseDown(v,f,m)};m.addEventListener("mousedown",b),m.addEventListener("touchstart",b,{passive:!0}),m.addEventListener("dblclick",v=>{var C=f.getWidth();v.stopPropagation(),f.reinitializeWidth(!0),C!==f.getWidth()&&(o.dispatch("column-resized",f),o.table.externalEvents.dispatch("columnResized",f.getComponent()))}),i.modules.frozen&&(m.style.position="sticky",m.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),c.handleEl=m,n.parentNode&&i.visible&&n.after(m)}t.modules.resize=c}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var n=this;n.table.element.classList.add("tabulator-block-select");function o(h){var c=typeof h.screenX>"u"?h.touches[0].screenX:h.screenX,f=c-n.startX,m=c-n.latestX,b,v;if(n.latestX=c,n.table.rtl&&(f=-f,m=-m),b=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(n.startWidth+f),v=t.width==t.minWidth||t.width==t.maxWidth,m<0&&(n.nextColumn=n.initialNextColumn),n.table.options.resizableColumnFit&&n.nextColumn&&!(b&&v)){let C=n.nextColumn.getWidth();m>0&&C<=n.nextColumn.minWidth&&(n.nextColumn=n.nextColumn.nextColumn()),n.nextColumn&&n.nextColumn.setWidth(n.nextColumn.getWidth()-m)}n.table.columnManager.rerenderColumns(!0),!n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function l(h){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",l),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",l),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==t.getWidth()&&(n.table.columnManager.verticalAlignHeaders(),n.dispatch("column-resized",t),n.table.externalEvents.dispatch("columnResized",t.getComponent()))}e.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=typeof e.screenX>"u"?e.touches[0].screenX:e.screenX,n.latestX=n.startX,n.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",l),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",l)}}Xl.moduleName="resizeColumns";class Jl extends ie{constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",n.addEventListener("click",function(c){c.stopPropagation()});var l=function(c){t.startRow=e,t._mouseDown(c,e,n)};n.addEventListener("mousedown",l),n.addEventListener("touchstart",l,{passive:!0}),o.addEventListener("click",function(c){c.stopPropagation()});var h=function(c){var f=t.table.rowManager.prevDisplayRow(e);f&&(t.startRow=f,t._mouseDown(c,f,o))};o.addEventListener("mousedown",h),o.addEventListener("touchstart",h,{passive:!0}),i.appendChild(n),i.appendChild(o)}_mouseDown(e,t,i){var n=this;n.table.element.classList.add("tabulator-block-select");function o(h){t.setHeight(n.startHeight+((typeof h.screenY>"u"?h.touches[0].screenY:h.screenY)-n.startY))}function l(h){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",l),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),n.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,n.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",l),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",l)}}Jl.moduleName="resizeRows";class Zl extends ie{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var n=Math.floor(i[0].contentRect.height),o=Math.floor(i[0].contentRect.width);(this.tableHeight!=n||this.tableWidth!=o)&&(this.tableHeight=n,this.tableWidth=o,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var n=Math.floor(i[0].contentRect.height),o=Math.floor(i[0].contentRect.width);(this.containerHeight!=n||this.containerWidth!=o)&&(this.containerHeight=n,this.containerWidth=o,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell)&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}Zl.moduleName="resizeTable";class Ql extends ie{constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var n=i.modules.responsive.order-t.modules.responsive.order;return n||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let n=this.columns[this.index];n?(this.hideColumn(n),this.index++):e=!1}else{let n=this.columns[this.index-1];n&&i>0&&i>=n.getWidth()?(this.showColumn(n),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i)}}generateCollapsedRowData(e){var t=e.getData(),i=[],n;return this.hiddenColumns.forEach(o=>{var l=o.getFieldValue(t);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let h=function(c){c()};n={value:!1,data:{},getValue:function(){return l},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},i.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,n,o.modules.format.params,h)})}else i.push({field:o.field,title:o.definition.title,value:l})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(function(i){var n=document.createElement("tr"),o=document.createElement("td"),l=document.createElement("td"),h,c=document.createElement("strong");o.appendChild(c),this.langBind("columns|"+i.field,function(f){c.innerHTML=f||i.title}),i.value instanceof Node?(h=document.createElement("div"),h.appendChild(i.value),l.appendChild(h)):l.innerHTML=i.value,n.appendChild(o),n.appendChild(l),t.appendChild(n)},this),Object.keys(e).length?t:""}}Ql.moduleName="responsiveLayout";class eu extends ie{constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectable","highlight"),this.registerTableOption("selectableRangeMode","drag"),this.registerTableOption("selectableRollingSelection",!0),this.registerTableOption("selectablePersistence",!0),this.registerTableOption("selectableCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.table.options.selectable!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=e.getElement(),n=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",n)};e.modules.select={selected:!1},t.checkRowSelectability(e)?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),t.table.options.selectable&&t.table.options.selectable!="highlight"&&(t.table.options.selectableRangeMode==="click"?i.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(i.addEventListener("click",function(o){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),i.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",n),document.body.addEventListener("keyup",n),t.toggleRow(e),!1}),i.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),i.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),n=this.table.rowManager.getDisplayRowIndex(e),o=i<=n?i:n,l=i>=n?i:n,h=this.table.rowManager.getDisplayRows().slice(0),c=h.splice(o,l-o+1);t.ctrlKey||t.metaKey?(c.forEach(f=>{f!==this.lastClickedRow&&(this.table.options.selectable!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectable&&this.toggleRow(f):this.toggleRow(f))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectable!==!0&&c.length>this.table.options.selectable&&(c=c.slice(0,this.table.options.selectable)),this.selectRows(c)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,n;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(o=>{n=this._selectRow(o,!0,!0),n&&t.push(n)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectable)&&this.table.options.selectable!==!0&&!i&&this.selectedRows.length>=this.table.options.selectable)if(this.table.options.selectableRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var n=this.table.rowManager.findRow(e);if(n){if(this.selectedRows.indexOf(n)==-1)return n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(t,n),n}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],n,o;switch(typeof e){case"undefined":n=Object.assign([],this.selectedRows);break;case"string":n=this.table.rowManager.findRow(e),n||(n=this.table.rowManager.getRows(e));break;default:n=e;break}Array.isArray(n)?n.length&&(n.forEach(l=>{o=this._deselectRow(l,!0,!0),o&&i.push(o)}),this._rowSelectionChanged(t,[],i)):n&&this._deselectRow(n,t,!0)}_deselectRow(e,t){var i=this,n=i.table.rowManager.findRow(e),o,l;if(n){if(o=i.selectedRows.findIndex(function(h){return h==n}),o>-1)return l=n.getElement(),l&&l.classList.remove("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),this.dispatchExternal("rowDeselected",n.getComponent()),i._rowSelectionChanged(t,void 0,n),n}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(n=>n.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(n=>n.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0);if(t)for(let n of i)this._selectRow(n,!0);else for(let n of i)this._deselectRow(n,!0)}}eu.moduleName="selectRow";function kg(s,e,t,i,n,o,l){var h=l.alignEmptyValues,c=l.decimalSeparator,f=l.thousandSeparator,m=0;if(s=String(s),e=String(e),f&&(s=s.split(f).join(""),e=e.split(f).join("")),c&&(s=s.split(c).join("."),e=e.split(c).join(".")),s=parseFloat(s),e=parseFloat(e),isNaN(s))m=isNaN(e)?0:-1;else if(isNaN(e))m=1;else return s-e;return(h==="top"&&o==="desc"||h==="bottom"&&o==="asc")&&(m*=-1),m}function Mg(s,e,t,i,n,o,l){var h=l.alignEmptyValues,c=0,f;if(!s)c=e?-1:0;else if(!e)c=1;else{switch(typeof l.locale){case"boolean":l.locale&&(f=this.langLocale());break;case"string":f=l.locale;break}return String(s).toLowerCase().localeCompare(String(e).toLowerCase(),f)}return(h==="top"&&o==="desc"||h==="bottom"&&o==="asc")&&(c*=-1),c}function Js(s,e,t,i,n,o,l){var h=window.DateTime||luxon.DateTime,c=l.format||"dd/MM/yyyy HH:mm:ss",f=l.alignEmptyValues,m=0;if(typeof h<"u"){if(h.isDateTime(s)||(c==="iso"?s=h.fromISO(String(s)):s=h.fromFormat(String(s),c)),h.isDateTime(e)||(c==="iso"?e=h.fromISO(String(e)):e=h.fromFormat(String(e),c)),!s.isValid)m=e.isValid?-1:0;else if(!e.isValid)m=1;else return s-e;return(f==="top"&&o==="desc"||f==="bottom"&&o==="asc")&&(m*=-1),m}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function Lg(s,e,t,i,n,o,l){return l.format||(l.format="dd/MM/yyyy"),Js.call(this,s,e,t,i,n,o,l)}function Dg(s,e,t,i,n,o,l){return l.format||(l.format="HH:mm"),Js.call(this,s,e,t,i,n,o,l)}function Ag(s,e,t,i,n,o,l){var h=s===!0||s==="true"||s==="True"||s===1?1:0,c=e===!0||e==="true"||e==="True"||e===1?1:0;return h-c}function Fg(s,e,t,i,n,o,l){var h=l.type||"length",c=l.alignEmptyValues,f=0;function m(b){var v;switch(h){case"length":v=b.length;break;case"sum":v=b.reduce(function(C,x){return C+x});break;case"max":v=Math.max.apply(null,b);break;case"min":v=Math.min.apply(null,b);break;case"avg":v=b.reduce(function(C,x){return C+x})/b.length;break}return v}if(!Array.isArray(s))f=Array.isArray(e)?-1:0;else if(!Array.isArray(e))f=1;else return m(e)-m(s);return(c==="top"&&o==="desc"||c==="bottom"&&o==="asc")&&(f*=-1),f}function Pg(s,e,t,i,n,o,l){var h=typeof s>"u"?0:1,c=typeof e>"u"?0:1;return h-c}function Og(s,e,t,i,n,o,l){var h,c,f,m,b=0,v,C=/(\d+)|(\D+)/g,x=/\d/,R=l.alignEmptyValues,L=0;if(!s&&s!==0)L=!e&&e!==0?0:-1;else if(!e&&e!==0)L=1;else{if(isFinite(s)&&isFinite(e))return s-e;if(h=String(s).toLowerCase(),c=String(e).toLowerCase(),h===c)return 0;if(!(x.test(h)&&x.test(c)))return h>c?1:-1;for(h=h.match(C),c=c.match(C),v=h.length>c.length?c.length:h.length;b<v;)if(f=h[b],m=c[b++],f!==m)return isFinite(f)&&isFinite(m)?(f.charAt(0)==="0"&&(f="."+f),m.charAt(0)==="0"&&(m="."+m),f-m):f>m?1:-1;return h.length>c.length}return(R==="top"&&o==="desc"||R==="bottom"&&o==="asc")&&(L*=-1),L}var Hg={number:kg,string:Mg,date:Lg,time:Dg,datetime:Js,boolean:Ag,array:Fg,exists:Pg,alphanum:Og};class pi extends ie{constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,n){var o=this.getSort();return o.forEach(l=>{delete l.column}),n.sort=o,n}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,n;switch(typeof e.definition.sorter){case"string":pi.sorters[e.definition.sorter]?t=pi.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),n=document.createElement("div"),n.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":n.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":n.appendChild(this.table.options.headerSortElement);break;default:n.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(n),e.modules.sort.element=n,this.setColumnHeaderSortIcon(e,"none"),(this.table.options.headerSortClickElement==="icon"?n:i).addEventListener("click",o=>{var l="",h=[],c=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?l=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?l=e.modules.sort.dir=="asc"?"desc":"asc":l="none";else switch(e.modules.sort.dir){case"asc":l="desc";break;case"desc":l="asc";break;default:l=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(o.shiftKey||o.ctrlKey)?(h=this.getSort(),c=h.findIndex(f=>f.field===e.getField()),c>-1?(h[c].dir=l,c=h.splice(c,1)[0],l!="none"&&h.push(c)):l!="none"&&h.push({column:e,dir:l}),this.setSort(h)):l=="none"?this.clear():this.setSort(e,l),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,n=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(o){var l;l=i.table.columnManager.findColumn(o.column),l?(o.column=l,n.push(o),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",o.column)}),i.sortList=n,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",n,o;if(t&&(t=t.getData(),n=e.getField(),n))switch(o=e.getFieldValue(t),typeof o){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(o)&&o!==""?i="number":o.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return pi.sorters[i]}sort(e){var t=this,i=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,n=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",t.getSort()),t.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(i.forEach(function(l,h){var c;l.column&&(c=l.column.modules.sort,c&&(c.sorter||(c.sorter=t.findSorter(l.column)),l.params=typeof c.params=="function"?c.params(l.column.getComponent(),l.dir):c.params,n.push(l)),t.setColumnHeader(l.column,l.dir))}),n.length&&t._sortItems(e,n)):i.forEach(function(l,h){t.setColumnHeader(l.column,l.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(l=>{o.push(l.getComponent())}),this.dispatchExternal("dataSorted",t.getSort(),o)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,n;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);n=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof n=="object"?i.appendChild(n):i.innerHTML=n}}_sortItems(e,t){var i=t.length-1;e.sort((n,o)=>{for(var l,h=i;h>=0;h--){let c=t[h];if(l=this._sortRow(n,o,c.column,c.dir,c.params),l!==0)break}return l})}_sortRow(e,t,i,n,o){var l,h,c=n=="asc"?e:t,f=n=="asc"?t:e;return e=i.getFieldValue(c.getData()),t=i.getFieldValue(f.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",l=c.getComponent(),h=f.getComponent(),i.modules.sort.sorter.call(this,e,t,l,h,i.getComponent(),n,o)}}pi.moduleName="sort",pi.sorters=Hg;class tu extends ie{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var n=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;n&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,n),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var n,o,l;function h(c){o=c}typeof i=="function"&&(i=i(e,t.getComponent(),h)),i instanceof HTMLElement?n=i:(n=document.createElement("div"),i===!0&&(t instanceof pn?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,c=>{n.innerHTML=i=c||t.definition.title}):i=t.definition.title),n.innerHTML=i),(i||i===0||i===!1)&&(n.classList.add("tabulator-tooltip"),n.addEventListener("mousemove",c=>c.preventDefault()),this.popupInstance=this.popup(n),typeof o=="function"&&this.popupInstance.renderCallback(o),l=this.popupInstance.containerEventCoords(e),this.popupInstance.show(l.x+15,l.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}tu.moduleName="tooltip";var zg={integer:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},max:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,n=s.getData(),o=s.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(l){var h=l.getData();h!==n&&e==o.getFieldValue(h)&&(i=!1)}),i},required:function(s,e,t){return e!==""&&e!==null&&typeof e<"u"}};class vn extends ie{constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var n=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return n!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,n)}),n}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var n=i.validate();n!==!0&&(t=t.concat(n))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],n;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(o=>{n=t._extractValidator(o),n&&i.push(n)}):(n=this._extractValidator(e.definition.validator),n&&i.push(n)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,n;switch(typeof e){case"string":return n=e.indexOf(":"),n>-1?(t=e.substring(0,n),i=e.substring(n+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:vn.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var n=this,o=[],l=this.invalidCells.indexOf(t);return e&&e.forEach(h=>{h.func.call(n,t.getComponent(),i,h.params)||o.push({type:h.type,parameters:h.params})}),t.modules.validate||(t.modules.validate={}),o.length?(t.modules.validate.invalid=o,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),l==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),l>-1&&this.invalidCells.splice(l,1)),o.length?o:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}vn.moduleName="validate",vn.validators=zg;var Ng=Object.freeze({__proto__:null,AccessorModule:Fi,AjaxModule:wt,ClipboardModule:di,ColumnCalcsModule:Zt,DataTreeModule:zl,DownloadModule:Pi,EditModule:mn,ExportModule:Il,FilterModule:zt,FormatModule:ut,FrozenColumnsModule:Bl,FrozenRowsModule:Vl,GroupRowsModule:Wl,HistoryModule:fi,HtmlTableImportModule:$l,ImportModule:gn,InteractionModule:Gl,KeybindingsModule:Qt,MenuModule:Ul,MoveColumnsModule:jl,MoveRowsModule:lr,MutatorModule:Hi,PageModule:bn,PersistenceModule:qe,PopupModule:Kl,PrintModule:ql,ReactiveDataModule:Yl,ResizeColumnsModule:Xl,ResizeRowsModule:Jl,ResizeTableModule:Zl,ResponsiveLayoutModule:Ql,SelectRowModule:eu,SortModule:pi,TooltipModule:tu,ValidateModule:vn}),Ig={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}};class iu{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),n=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let o in t)i.hasOwnProperty(o)||(n&&console.warn("Invalid "+this.msgType+" option:",o),i[o]=t.key);for(let o in i)o in t?i[o]=t[o]:Array.isArray(i[o])?i[o]=Object.assign([],i[o]):typeof i[o]=="object"&&i[o]!==null?i[o]=Object.assign({},i[o]):typeof i[o]>"u"&&delete i[o];return i}}class ur extends Ke{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var n=this.rows().indexOf(e),o=e.getElement(),l=0;return new Promise((h,c)=>{if(n>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&ve.elVisible(o)&&(l=ve.elOffset(o).top-ve.elOffset(this.elementVertical).top,l>0&&l<this.elementVertical.clientHeight-o.offsetHeight))return h(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(o.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-o.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-o.offsetTop)+o.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+o.offsetHeight;break;case"top":this.elementVertical.scrollTop=o.offsetTop;break}h()}else console.warn("Scroll Error - Row not visible"),c("Scroll Error - Row not visible")})}}class Bg extends ur{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(n=>{i.appendChild(n.getElement())}),e.element.appendChild(i),t||e.cells.forEach(n=>{n.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Vg extends ur{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},n=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(o=>{var l={},h;o.visible&&(o.modules.frozen||(h=o.getWidth(),l.leftPos=n,l.rightPos=n+h,l.width=h,this.isFitData&&(l.fitDataCheck=o.modules.vdomHoz?o.modules.vdomHoz.fitDataCheck:!0),n+h>this.vDomScrollPosLeft&&n<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=n),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=h),this.columns.push(o),o.modules.vdomHoz=l,n+=h))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(n=>{!n.definition.width&&n.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let n=0;n<t.cells.length;n++){let o=t.cells[n];i.appendChild(o.getElement()),o.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,n)=>{i!==this.columns[n]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let n=e;n<t;n++){let o=this.columns[n];o.modules.vdomHoz.leftPos+=i,o.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var o=n.getCell(i);n.getElement().insertBefore(o.getElement(),n.getCell(this.columns[this.rightCol]).getElement().nextSibling),o.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(o=>{if(o.type!=="group"){var l=o.getCell(i);o.getElement().insertBefore(l.getElement(),o.getCell(this.columns[this.leftCol]).getElement()),l.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(o=>{o.type!=="group"&&(o.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let n=this.fitDataColActualWidthCheck(i);n&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+n,this.vDomPadRight-=n)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var o=n.getCell(i);try{n.getElement().removeChild(o.getElement())}catch(l){console.warn("Could not removeColRight",l.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var o=n.getCell(i);try{n.getElement().removeChild(o.getElement())}catch(l){console.warn("Could not removeColLeft",l.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class Wg extends Ke{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new iu(this.table,"column definition",Hl),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Vg,basic:Bg};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i=this.table.options.autoColumnsDefinitions,n,o;if(e&&e.length){n=e[0];for(var l in n){let h={field:l,title:l},c=n[l];switch(typeof c){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":Array.isArray(c)?o="array":o="string";break;default:!isNaN(c)&&c!==""?o="number":c.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?o="alphanum":o="string";break}h.sorter=o,t.push(h)}if(i)switch(typeof i){case"function":this.table.options.columns=i.call(this.table,t);break;case"object":Array.isArray(i)?t.forEach(h=>{var c=i.find(f=>f.field===h.field);c&&Object.assign(h,c)}):t.forEach(h=>{i[h.field]&&Object.assign(h,i[h.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),e.forEach((i,n)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var n=new Lt(e,this),o=n.getElement(),l=i&&this.findColumnIndex(i);if(i&&l>-1){var h=i.getTopColumn(),c=this.columns.indexOf(h),f=h.getElement();t?(this.columns.splice(c,0,n),f.parentNode.insertBefore(o,f)):(this.columns.splice(c+1,0,n),f.parentNode.insertBefore(o,f.nextSibling))}else t?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof Lt)return e;if(e instanceof Ol)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(n=>{t.push(n),t=t.concat(n.getColumns(!0))}),t.find(n=>n.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var n=i.split(".")[0];n===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(n=>{t.push(n.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,n,o){var l=e.indexOf(t),h,c=[];l>-1&&(e.splice(l,1),h=e.indexOf(i),h>-1?n&&(h=h+1):h=l,e.splice(h,0,t),o&&(c=this.chain("column-moving-rows",[t,i,n],null,[])||[],c=c.concat(this.table.rowManager.rows),c.forEach(function(f){if(f.cells.length){var m=f.cells.splice(l,1)[0];f.cells.splice(h,0,m)}})))}scrollToColumn(e,t,i){var n=0,o=e.getLeftOffset(),l=0,h=e.getElement();return new Promise((c,f)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":l=-this.element.clientWidth/2;break;case"right":l=h.clientWidth-this.headersElement.clientWidth;break}if(!i&&o>0&&o+h.offsetWidth<this.element.clientWidth)return!1;n=o+l,n=Math.max(Math.min(n,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(n),this.scrollHorizontal(n),c()}else console.warn("Scroll Error - Column not visible"),f("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,o,l;i.visible&&(n=i.definition.width||0,o=parseInt(i.minWidth),typeof n=="string"?n.indexOf("%")>-1?l=e/100*parseInt(n):l=parseInt(n):l=n,t+=l>o?l:o)}),t}addColumn(e,t,i){return new Promise((n,o)=>{var l=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&l.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),n(l)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){ve.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class $g extends ur{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),n=this.rows();n.forEach((o,l)=>{this.styleRow(o,l),o.initialize(!1,!0),o.type!=="group"&&(t=!1),i.appendChild(o.getElement())}),e.appendChild(i),n.forEach(o=>{o.rendered(),o.heightInitialized||o.calcHeight(!0)}),n.forEach(o=>{o.heightInitialized||o.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows()}scrollToRowNearestTop(e){var t=ve.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=ve.elOffset(t).top-ve.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Gg extends ur{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,n=!1,o=this.table.rowManager.scrollLeft,l=this.rows(),h=this.vDomTop;h<=this.vDomBottom;h++)if(l[h]){var c=t-l[h].getElement().offsetTop;if(n===!1||Math.abs(c)<n)n=c,i=h;else break}l.forEach(f=>{f.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,n||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(o)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,n=e-this.vDomScrollPosBottom,o=this.vDomWindowBuffer*2,l=this.rows();if(this.scrollTop=e,-i>o||n>o){var h=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*l.length)),this.scrollColumns(h)}else t?(i<0&&this._addTopRow(l,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(l,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(l,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(l,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,n=!1,o=0,l=0,h=this.rows();if(e)o=this.vDomTop,l=this.vDomBottom;else for(var c=this.vDomTop;c<=this.vDomBottom;c++)if(h[c])if(n)if(i-h[c].getElement().offsetTop>=0)l=c;else break;else if(t-h[c].getElement().offsetTop>=0)o=c;else if(n=!0,i-h[c].getElement().offsetTop>=0)l=c;else break;return h.slice(o,l+1)}_virtualRenderFill(e,t,i){var n=this.tableElement,o=this.elementVertical,l=0,h=0,c=0,f=0,m=0,b=0,v=this.rows(),C=v.length,x=0,R,L,k=[],H=0,P=0,z=this.table.rowManager.fixedHeight,V=this.elementVertical.clientHeight,Z=this.table.options.rowHeight,N=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;n.firstChild;)n.removeChild(n.firstChild);f=(C-e+1)*this.vDomRowHeight,f<V&&(e-=Math.ceil((V-f)/this.vDomRowHeight),e<0&&(e=0)),l=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=l}if(C&&ve.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,z||this.table.options.maxHeight?(Z&&(P=V/Z+this.vDomWindowBuffer/Z),P=Math.max(this.vDomWindowMinTotalRows,Math.ceil(P))):P=C;(P==C||h<=V+this.vDomWindowBuffer||H<this.vDomWindowMinTotalRows)&&this.vDomBottom<C-1;){for(k=[],L=document.createDocumentFragment(),b=0;b<P&&this.vDomBottom<C-1;)x=this.vDomBottom+1,R=v[x],this.styleRow(R,x),R.initialize(!1,!0),!R.heightInitialized&&!this.table.options.rowHeight&&R.clearCellHeight(),L.appendChild(R.getElement()),k.push(R),this.vDomBottom++,b++;if(!k.length)break;n.appendChild(L),k.forEach(W=>{W.rendered(),W.heightInitialized||W.calcHeight(!0)}),k.forEach(W=>{W.heightInitialized||W.setCellHeight()}),k.forEach(W=>{c=W.getHeight(),H<l?m+=c:h+=c,c>this.vDomWindowBuffer&&(this.vDomWindowBuffer=c*2),H++}),N=this.table.rowManager.adjustTableSize(),V=this.elementVertical.clientHeight,N&&(z||this.table.options.maxHeight)&&(Z=h/H,P=Math.max(this.vDomWindowMinTotalRows,Math.ceil(V/Z+this.vDomWindowBuffer/Z)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-m,this.vDomBottomPad=this.vDomBottom==C-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-h-m,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((h+m)/H),this.vDomBottomPad=this.vDomRowHeight*(C-this.vDomBottom-1),this.vDomScrollHeight=m+h+this.vDomBottomPad-V),n.style.paddingTop=this.vDomTopPad+"px",n.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+m+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-V:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-V),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-V),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,o.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,n=[],o=0,l=this.vDomTop-1,h=0,c=!0;c;)if(this.vDomTop){let f=e[l],m,b;f&&h<this.vDomMaxRenderChain?(m=f.getHeight()||this.vDomRowHeight,b=f.initialized,t>=m?(this.styleRow(f,l),i.insertBefore(f.getElement(),i.firstChild),(!f.initialized||!f.heightInitialized)&&n.push(f),f.initialize(),b||(m=f.getElement().offsetHeight,m>this.vDomWindowBuffer&&(this.vDomWindowBuffer=m*2)),t-=m,o+=m,this.vDomTop--,l--,h++):c=!1):c=!1}else c=!1;for(let f of n)f.clearCellHeight();this._quickNormalizeRowHeight(n),o&&(this.vDomTopPad-=o,this.vDomTopPad<0&&(this.vDomTopPad=l*this.vDomRowHeight),l<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=o)}_removeTopRow(e,t){for(var i=[],n=0,o=0,l=!0;l;){let h=e[this.vDomTop],c;h&&o<this.vDomMaxRenderChain?(c=h.getHeight()||this.vDomRowHeight,t>=c?(this.vDomTop++,t-=c,n+=c,i.push(h),o++):l=!1):l=!1}for(let h of i){let c=h.getElement();c.parentNode&&c.parentNode.removeChild(c)}n&&(this.vDomTopPad+=n,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?n:n+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,n=[],o=0,l=this.vDomBottom+1,h=0,c=!0;c;){let f=e[l],m,b;f&&h<this.vDomMaxRenderChain?(m=f.getHeight()||this.vDomRowHeight,b=f.initialized,t>=m?(this.styleRow(f,l),i.appendChild(f.getElement()),(!f.initialized||!f.heightInitialized)&&n.push(f),f.initialize(),b||(m=f.getElement().offsetHeight,m>this.vDomWindowBuffer&&(this.vDomWindowBuffer=m*2)),t-=m,o+=m,this.vDomBottom++,l++,h++):c=!1):c=!1}for(let f of n)f.clearCellHeight();this._quickNormalizeRowHeight(n),o&&(this.vDomBottomPad-=o,(this.vDomBottomPad<0||l==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=o)}_removeBottomRow(e,t){for(var i=[],n=0,o=0,l=!0;l;){let h=e[this.vDomBottom],c;h&&o<this.vDomMaxRenderChain?(c=h.getHeight()||this.vDomRowHeight,t>=c?(this.vDomBottom--,t-=c,n+=c,i.push(h),o++):l=!1):l=!1}for(let h of i){let c=h.getElement();c.parentNode&&c.parentNode.removeChild(c)}n&&(this.vDomBottomPad+=n,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=n)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class Ug extends Ke{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,n=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,n),this.dispatch("scroll-vertical",i,n),this.dispatchExternal("scrollVertical",i,n))})}findRow(e){if(typeof e=="object"){if(e instanceof $e)return e;if(e instanceof or)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((n,o)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),n()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,n)=>{if(i&&typeof i=="object"){var o=new $e(i,this);this.rows.push(o)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
|
41
44
|
Expecting: array
|
42
45
|
Received: `,typeof e,`
|
43
|
-
Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),s=this.activeRows.indexOf(e);s>-1&&this.activeRows.splice(s,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(o=>{var l=o.indexOf(e);l>-1&&o.splice(l,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,s){var o=this.addRowActual(e,t,i,s);return o}addRows(e,t,i,s){var o=[];return new Promise((l,c)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((h,f)=>{var p=this.addRow(h,t,i,!0);o.push(p),this.dispatch("row-added",p,h,t,i)}),this.refreshActiveData(s?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),o.length&&this._clearPlaceholder(),l(o)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,s){var o=e instanceof nt?e:new nt(e||{},this),l=this.findAddRowPos(t),c=-1,h,f;return i||(f=this.chain("row-adding-position",[o,l],null,{index:i,top:l}),i=f.index,l=f.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[o,i,l],null,i),i&&(c=this.rows.indexOf(i)),i&&c>-1?(h=this.activeRows.indexOf(i),this.displayRowIterator(function(p){var b=p.indexOf(i);b>-1&&p.splice(l?b:b+1,0,o)}),h>-1&&this.activeRows.splice(l?h:h+1,0,o),this.rows.splice(l?c:c+1,0,o)):l?(this.displayRowIterator(function(p){p.unshift(o)}),this.activeRows.unshift(o),this.rows.unshift(o)):(this.displayRowIterator(function(p){p.push(o)}),this.activeRows.push(o),this.rows.push(o)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",o.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s||this.reRenderInPosition(),o}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(s=>{this.moveRowInArray(s,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,s){var o,l,c,h;if(t!==i&&(o=e.indexOf(t),o>-1&&(e.splice(o,1),l=e.indexOf(i),l>-1?s?e.splice(l+1,0,t):e.splice(l,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){c=o<l?o:l,h=l>o?l:o+1;for(let f=c;f<=h;f++)e[f]&&this.styleRow(e[f],f)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),s=!1;return i!==!1&&i<this.displayRowsCount-1&&(s=this.getDisplayRows()[i+1]),s&&(!(s instanceof nt)||s.type!="row")?this.nextDisplayRow(s,t):s}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),s=!1;return i&&(s=this.getDisplayRows()[i-1]),t&&s&&(!(s instanceof nt)||s.type!="row")?this.prevDisplayRow(s,t):s}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],s=this.getRows(e);return s.forEach(function(o){o.type=="row"&&i.push(o.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(s){t.push(s.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,s)=>i.priority-s.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,s)=>i.priority-s.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var s=this.table,o="",l=0,c=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(l=this.dataPipeline.findIndex(h=>h.handler===e),l>-1)o="dataPipeline",t&&(l==this.dataPipeline.length-1?o="display":l++);else if(l=this.displayPipeline.findIndex(h=>h.handler===e),l>-1)o="displayPipeline",t&&(l==this.displayPipeline.length-1?o="end":l++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else o=e||"all",l=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&l<this.redrawBlockRestoreConfig.index||c.indexOf(o)<c.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:o,index:l});return}else Pe.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,o,l,i)):(this.refreshPipelines(e,o,l,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),s.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,o,l,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,s){switch(this.dispatch("data-refreshing"),e||(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let o=i;o<this.dataPipeline.length;o++){let l=this.dataPipeline[o].handler(this.activeRowsPipeline[o].slice(0));this.activeRowsPipeline[o+1]=l||this.activeRowsPipeline[o].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let o=i;o<this.displayPipeline.length;o++){let l=this.displayPipeline[o].handler((o?this.getDisplayRows(o-1):this.activeRows).slice(0),s);this.setDisplayRows(l||this.getDisplayRows(o-1).slice(0),o)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Ap,basic:Dp};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach(function(e){e.normalizeHeight()})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let s=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const o="calc(100% - "+s+"px)";this.element.style.minHeight=t||"calc(100% - "+s+"px)",this.element.style.height=o,this.element.style.maxHeight=o}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-s+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){const t=this.adjustTableSize();this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(t&&this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class Pp extends ct{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class Vp extends ct{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),s={row:["cell"],cell:["row"]};i=i.filter(o=>{var l=s[e];return o!==e&&(!l||l&&!l.includes(o))}),i.forEach(o=>{var l=this.pseudoTrackers[o].target;this.pseudoTrackers[o].target&&(this.dispatch(o+"-mouseleave",t,l),this.pseudoTrackers[o].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let s of e){let o=i+"-"+s;this.subscriptionChange(o,this.subscriptionChanged.bind(this,i,s))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var s=this.listeners[t].components,o=s.indexOf(e),l=!1;i?o===-1&&(s.push(e),l=!0):this.subscribed(e+"-"+t)||o>-1&&(s.splice(o,1),l=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),l&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,s=this.findTargets(i);s=this.bindComponents(e,s),this.triggerEvents(e,t,s),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(s).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let s of e){let o=s.classList?[...s.classList]:[];if(o.filter(h=>this.abortClasses.includes(h)).length)break;let c=o.filter(h=>i.includes(h));for(let h of c)t[this.componentMap[h]]||(t[this.componentMap[h]]=s)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),s=this.listeners[e],o={},l={};for(let c of i){let h,f=t[c],p=this.previousTargets[c];if(p&&p.target===f)h=p.component;else switch(c){case"row":case"group":(s.components.includes("row")||s.components.includes("cell")||s.components.includes("group"))&&(h=this.table.rowManager.getVisibleRows(!0).find(g=>g.getElement()===f),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[c]=!1));break;case"column":s.components.includes("column")&&(h=this.table.columnManager.findColumn(f));break;case"cell":s.components.includes("cell")&&(o.row instanceof nt?h=o.row.findCell(f):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}h&&(o[c]=h,l[c]={target:f,component:h})}return this.previousTargets=l,o}triggerEvents(e,t,i){var s=this.listeners[e];for(let o in i)i[o]&&s.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class Op{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class Np extends ct{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,l){var c=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,o])){this.loading=!0,o||this.alertLoader(),t=this.chain("data-params",[e,i,o],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var h=this.chain("data-load",[e,t,i,o],!1,Promise.resolve([]));return h.then(f=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(f)&&typeof f=="object"&&(f=this.mapParams(f,this.objectInvert(this.table.options.dataReceiveParams)));var p=this.chain("data-loaded",f,null,f);c==this.requestOrder?(this.clearAlert(),p!==!1&&(this.dispatchExternal("dataLoaded",p),this.table.rowManager.setData(p,s,typeof l>"u"?!s:l))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(f=>{console.error("Data Load Error: ",f),this.dispatchExternal("dataLoadError",f),o||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,typeof l>"u"?!s:l),Promise.resolve()}mapParams(e,t){var i={};for(let s in e)i[t.hasOwnProperty(s)?t[s]:s]=e[s];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class zp{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(s=>s===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(s=>{s(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((s,o)=>{let l=s.apply(this.table,e);o||(i=l)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Hp{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((s,o)=>s.priority-o.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(s=>s.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,s){var o=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((l,c)=>{o=l.callback.apply(this,t.concat([o]))}),o):typeof s=="function"?s():s}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((s,o)=>{s.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(s=>{s(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class Ip extends ct{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return typeof this.options(e)<"u"?(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class yt{static register(e){yt.tables.push(e)}static deregister(e){var t=yt.tables.indexOf(e);t>-1&&yt.tables.splice(t,1)}static lookupTable(e,t){var i=[],s,o;if(typeof e=="string"){if(s=document.querySelectorAll(e),s.length)for(var l=0;l<s.length;l++)o=yt.matchElement(s[l]),o&&i.push(o)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof zi?(o=yt.matchElement(e),o&&i.push(o)):Array.isArray(e)?e.forEach(function(c){i=i.concat(yt.lookupTable(c))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i}static matchElement(e){return yt.tables.find(function(t){return e instanceof zi?t===e:t.element===e})}}yt.tables=[];function Bp(n,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(n),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Wl(n,e){n.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Wp(n,e){var t=0,i=this.table.rowManager.element.clientWidth,s=0,o=!1;n.forEach((l,c)=>{l.widthFixed||l.reinitializeWidth(),(this.table.options.responsiveLayout?l.modules.responsive.visible:l.visible)&&(o=l),l.visible&&(t+=l.getWidth())}),o?(s=i-t+o.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(o.setWidth(0),this.table.modules.responsiveLayout.update()),s>0?o.setWidth(s):o.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function $p(n,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,s=0,o=0,l=0,c=[],h=[],f=0,p=0,b=0;function g(E){var x;return typeof E=="string"?E.indexOf("%")>-1?x=t/100*parseInt(E):x=parseInt(E):x=E,x}function w(E,x,_,k){var V=[],L=0,F=0,H=0,W=o,P=0,D=0,I=[];function Z(G){return _*(G.column.definition.widthGrow||1)}function ie(G){return g(G.width)-_*(G.column.definition.widthShrink||0)}return E.forEach(function(G,X){var ee=k?ie(G):Z(G);G.column.minWidth>=ee?V.push(G):G.column.maxWidth&&G.column.maxWidth<ee?(G.width=G.column.maxWidth,x-=G.column.maxWidth,W-=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1,W&&(_=Math.floor(x/W))):(I.push(G),D+=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1)}),V.length?(V.forEach(function(G){L+=k?G.width-G.column.minWidth:G.column.minWidth,G.width=G.column.minWidth}),F=x-L,H=D?Math.floor(F/D):F,P=w(I,F,H,k)):(P=D?x-Math.floor(x/D)*D:x,I.forEach(function(G){G.width=k?ie(G):Z(G)})),P}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),n.forEach(function(E){var x,_,k;E.visible&&(x=E.definition.width,_=parseInt(E.minWidth),x?(k=g(x),i+=k>_?k:_,E.definition.widthShrink&&(h.push({column:E,width:k>_?k:_}),f+=E.definition.widthShrink)):(c.push({column:E,width:0}),o+=E.definition.widthGrow||1))}),s=t-i,l=Math.floor(s/o),b=w(c,s,l,!1),c.length&&b>0&&(c[c.length-1].width+=b),c.forEach(function(E){s-=E.width}),p=Math.abs(b)+s,p>0&&f&&(b=w(h,p,Math.floor(p/f),!0)),b&&h.length&&(h[h.length-1].width-=b),c.forEach(function(E){E.column.setWidth(E.width)}),h.forEach(function(E){E.column.setWidth(E.width)})}var Gp={fitData:Bp,fitDataFill:Wl,fitDataTable:Wl,fitDataStretch:Wp,fitColumns:$p};class nn extends he{constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;nn.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}getMode(){return this.mode}layout(e){this.dispatch("layout-refreshing"),nn.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}nn.moduleName="layout",nn.modes=Gp;var Up={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class Un extends he{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=Pe.deepClone(Un.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,s){for(var o in i)typeof i[o]=="object"?(s[o]||(s[o]={}),t(i[o],s[o])):s[o]=i[o]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=Pe.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,s=i.split("|"),o=this._getLangElement(s,this.locale);return o||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(s){var o;i&&(o=i[s],typeof o<"u"?i=o:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}Un.moduleName="localize",Un.langs=Up;class $l extends he{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=yt.lookupTable(e),i.forEach(s=>{this.table!==s&&t.push(s)}),t}send(e,t,i,s){var o=this.getConnections(e);o.forEach(l=>{l.tableComms(this.table.element,t,i,s)}),!o.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,s){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,s);console.warn("Inter-table Comms Error - no such module:",t)}}$l.moduleName="comms";var jp=Object.freeze({__proto__:null,LayoutModule:nn,LocalizeModule:Un,CommsModule:$l});class Gl{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,jp,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(e){e.moduleBindings={},e.extendModule=function(t,i,s){if(e.moduleBindings[t]){var o=e.moduleBindings[t][i];if(o)if(typeof s=="object")for(let l in s)o[l]=s[l];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",i)}else console.warn("Module Error - module does not exist:",t)},e.registerModule=function(t){Array.isArray(t)||(t=[t]),t.forEach(i=>{e.registerModuleBinding(i)})},e.registerModuleBinding=function(t){e.moduleBindings[t.moduleName]=t},e.findTable=function(t){var i=yt.lookupTable(t,!0);return Array.isArray(i)&&!i.length?!1:i},e.prototype.bindModules=function(){var t=[],i=[],s=[];this.modules={};for(var o in e.moduleBindings){let l=e.moduleBindings[o],c=new l(this);this.modules[o]=c,l.prototype.moduleCore?this.modulesCore.push(c):l.moduleInitOrder?l.moduleInitOrder<0?t.push(c):i.push(c):s.push(c)}t.sort((l,c)=>l.moduleInitOrder>c.moduleInitOrder?1:-1),i.sort((l,c)=>l.moduleInitOrder>c.moduleInitOrder?1:-1),this.modulesRegular=t.concat(s.concat(i))}}bindModules(e,t,i){var s=Object.values(t);i&&s.forEach(o=>{o.prototype.moduleCore=!0}),e.registerModule(s)}}class Kp extends ct{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class zi{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new Op(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Ip(this),this.optionsList=new Bl(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),yt.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Lp(this),this.rowManager=new Fp(this),this.footerManager=new Pp(this),this.dataLoader=new Np(this),this.alertManager=new Kp(this),this.bindModules(),this.options=this.optionsList.generate(zi.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new zp(this,this.options,this.options.debugEventsExternal),this.eventBus=new Hp(this.options.debugEventsInternal),this.interactionMonitor=new Vp(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var s=e.attributes;for(var o in s)typeof s[o]=="object"&&i.setAttribute(s[o].name,s[o].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){this.dataLoader.load(this.options.data)}destroy(){var e=this.element;for(this.destroyed=!0,yt.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
|
44
|
-
`),s=i[0]=="Error"?i[2]:i[1],s[0]==" "?e=s.trim().split(" ")[1].split(".")[1]:e=s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(o=>{var l=this.rowManager.findRow(o[this.options.index]);l?(t++,l.updateData(o).then(()=>{t--,t||i()}).catch(c=>{s("Update Error - Unable to update row",o,c)})):s("Update Error - Unable to find row",o)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((s,o)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(l=>{var c=[];l.forEach(function(h){c.push(h.getComponent())}),s(c)}):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((s,o)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(l=>{var c=this.rowManager.findRow(l[this.options.index]);i++,c?c.updateData(l).then(()=>{i--,t.push(c.getComponent()),i||s(t)}):this.rowManager.addRows(l).then(h=>{i--,t.push(h[0].getComponent()),i||s(t)})}):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let s=this.rowManager.findRow(i,!0);if(s)t.push(s);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,s)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(s)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(s=>s[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(s=>s[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var s=this.rowManager.findRow(e);return s?this.rowManager.scrollToRow(s,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var s=this.rowManager.findRow(e);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var s=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,s).then(o=>o.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var s=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);this.initGuard(),s?o?this.columnManager.moveColumn(s,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((s,o)=>{var l=this.columnManager.findColumn(e);return l?this.columnManager.scrollToColumn(l,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}zi.defaultOptions=Sp,new Gl(zi);class Ul extends zi{}new Gl(Ul,kp);const qp=[u.createElementVNode("svg",{class:"h-4 w-4 fill-muted-600 dark:fill-muted-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[u.createElementVNode("path",{d:"M177.7 32h92.5c5.5 0 10.6 2.8 13.6 7.5L299.1 64H148.9l15.3-24.5c2.9-4.7 8.1-7.5 13.6-7.5zM336.9 64L311 22.6C302.2 8.5 286.8 0 270.3 0H177.7C161.2 0 145.8 8.5 137 22.6L111.1 64H64.1 32 16C7.2 64 0 71.2 0 80s7.2 16 16 16H34.3L59.8 452.6C62.1 486.1 90 512 123.6 512H324.4c33.6 0 61.4-25.9 63.8-59.4L413.7 96H432c8.8 0 16-7.2 16-16s-7.2-16-16-16H416 383.9 336.9zm44.8 32L356.3 450.3C355.1 467 341.2 480 324.4 480H123.6c-16.8 0-30.7-13-31.9-29.7L66.4 96H381.6z"})],-1)],Yp=[u.createElementVNode("svg",{class:"h-4 w-4 fill-muted-600 dark:fill-muted-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144V432c0 44.2 35.8 80 80 80H368c44.2 0 80-35.8 80-80V304c0-8.8-7.2-16-16-16s-16 7.2-16 16V432c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48H208c8.8 0 16-7.2 16-16s-7.2-16-16-16H80z"})],-1)],Xp={__name:"ActionButton",props:{data:{},index:{}},setup(n){const e=n;return(t,i)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("button",{onClick:i[0]||(i[0]=s=>u.unref($t.emitter).event("deleteBtn",e.data)),class:"mx-2 inline-flex items-center justify-center w-5 h-5 rounded-full text-gray-500 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"},qp),u.createElementVNode("button",{onClick:i[1]||(i[1]=s=>u.unref($t.emitter).event("editBtn",e.data)),class:"mx-2 inline-flex items-center justify-center w-5 h-5 rounded-full text-gray-500 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"},Yp)],64))}},Jp={__name:"SelectColumn",props:{data:{},index:{}},setup(n){const e=u.ref(!1);function t(i){$t.emitter.event("toggle.select",i.id)}return(i,s)=>u.withDirectives((u.openBlock(),u.createElementBlock("input",{"onUpdate:modelValue":s[0]||(s[0]=o=>e.value=o),class:"rounded",type:"checkbox",onChange:t,style:{border:"1px dashed rgba(0,0,0,.2)"}},null,544)),[[u.vModelCheckbox,e.value]])}};let jn;const Zp=({element:n,headers:e,data:t,options:i}={element:null,headers:[],data:[],options:{}})=>(jn=new Ul(n,{pagination:!1,paginationMode:"remote",layout:"fitDataStretch",resizableColumnFit:!0,paginationSize:5,paginationInitialPage:1,paginationSizeSelector:[3,6,8,10],paginationCounter:"rows",ajaxLoaderLoading:"<div style='display:inline-block; border:4px solid #333; border-radius:10px; background:#fff; font-weight:bold; font-size:16px; color:#000; padding:10px 20px;'>Loading Data</div>",data:t,columns:jl(e),...i}),setTimeout(()=>{jn.setData()}),jn);function jl(n){const e={_select_:{formatter:eg,formatterParams:{component:Jp}},_actions_:{formatter:Qp,formatterParams:{component:Xp}}};return n.map(t=>t.field in e?{...t,...e[t.field]}:t)}function Qp(n,e){const t=n.getRow().getData(),i=n.getRow().getPosition(),s=document.createElement("div"),o=e.component;return u.createApp(o,{data:t,index:i}).mount(s),s}function eg(n,e){const t=n.getRow().getData(),i=n.getRow().getPosition(),s=document.createElement("div"),o=e.component;return u.createApp(o,{data:t,index:i}).mount(s),s}function Kl(n){jn.setData(n)}function tg(n){jn.setColumns(n)}function ig(n){u.watch(()=>n.mainItems,e=>{Kl(e)}),u.watch(()=>n.flatFields,()=>{tg(jl(n.headers))},{deep:!0}),u.watch(()=>n.loadings.mainLoading,e=>{e&&Kl([])},{deep:!0})}const nT="",sn=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},ql=n=>(u.pushScopeId("data-v-86bb6d78"),n=n(),u.popScopeId(),n),ng={key:0,id:"paginate"},sg={class:"flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4"},rg={class:"lg:w-5/5 w-full flex items-center justify-between border-t border-gray-200"},og={class:"sm:flex hidden"},ag=[ql(()=>u.createElementVNode("svg",{class:"rtl:rotate-180 w-[10px] fill-muted-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[u.createElementVNode("path",{d:"M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z"})],-1))],lg=["onClick"],ug={key:1,class:"text-sm font-medium leading-none text-gray-600 pt-3 mr-4 px-2"},cg=[ql(()=>u.createElementVNode("svg",{class:"ltr:rotate-180 w-[10px] fill-muted-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[u.createElementVNode("path",{d:"M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z"})],-1))],dg=sn({__name:"MTablePagination",setup(n){const e=u.inject("store");function t(c){e.paginate(c)}function i(){e.mainPagination.currentPage>1&&t(e.mainPagination.currentPage-1)}function s(c){t(c)}function o(){e.mainPagination.currentPage<e.mainPagination.lastPage&&t(e.mainPagination.currentPage+1)}function l(){let c=[];if(e.mainPagination.lastPage>10){let h=e.mainPagination.currentPage,f=h-1,p=h+1;h!=1&&c.push(1),h!=1&&h!=2&&f!=2&&c.push("..."),f>1&&c.push(f),c.push(h),p<e.mainPagination.lastPage&&c.push(p),h!=e.mainPagination.lastPage&&h!=e.mainPagination.lastPage-1&&p!=e.mainPagination.lastPage-1&&c.push("..."),e.mainPagination.lastPage!=h&&c.push(e.mainPagination.lastPage)}else c=e.mainPagination.lastPage;return c}return(c,h)=>u.unref(e).mainPagination.lastPage?(u.openBlock(),u.createElementBlock("div",ng,[u.createElementVNode("div",sg,[u.createElementVNode("div",rg,[u.createElementVNode("div",og,[u.createElementVNode("div",{onClick:i,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},ag),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(l(),f=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:f},[typeof f=="number"?(u.openBlock(),u.createElementBlock("p",{key:0,class:u.normalizeClass(u.unref(e).mainPagination.currentPage===f?"text-sm font-medium leading-none cursor-pointer text-indigo-700 !border-indigo-400 border-t-[1px] pt-3 mr-4 px-2":"text-sm font-medium leading-none cursor-pointer text-gray-600 hover:text-indigo-700 border-t-[1px] border-transparent hover:border-indigo-400 pt-3 mr-4 px-2"),onClick:p=>s(f)},u.toDisplayString(f),11,lg)):(u.openBlock(),u.createElementBlock("p",ug,u.toDisplayString(f),1))],64))),128)),u.createElementVNode("div",{onClick:o,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},cg)])])])])):u.createCommentVNode("",!0)}},[["__scopeId","data-v-86bb6d78"]]),hg={key:0,class:"mt-[-20px]"},fg={class:"flex animate-pulse flex-row items-center h-full justify-center"},mg={class:"w-full flex flex-row items-start rtl:mr-8 ltr:ml-8"},pg={key:1,class:"padding: 100px; mt-[-20px] rounded-b-xl bg-white text-center p-[100px] dark:bg-muted-800"},gg={class:"dark:text-muted-200 text-muted-600"},bg={__name:"MTable",setup(n){const e=u.ref(null),t=u.inject("store"),i=u.inject("dir"),s=u.computed(()=>t.mainItems.length===0&&!t.loadings.mainLoading);return ig(t),u.onMounted(()=>{Zp({options:{textDirection:i},element:e.value,headers:t.headers,data:t.mainItems})}),(o,l)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",{ref_key:"table",ref:e,class:"mt-2"},null,512),u.unref(t).loadings.mainLoading?(u.openBlock(),u.createElementBlock("div",hg,[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(10,c=>u.createElementVNode("div",{key:c,class:u.normalizeClass([{"border-t-0":c===1,"border-b-0":c===10,"bg-muted-50 dark:bg-muted-700":c%2!==0,"bg-white dark:bg-muted-800":c%2===0},"w-full py-4 mx-auto border-b-1"])},[u.createElementVNode("div",fg,[u.createElementVNode("div",mg,[(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(9,h=>u.createElementVNode("div",{key:h,class:"mx-1 w-[10%] bg-muted-300 dark:bg-muted-900 h-2.5 rounded-md"})),64))])])],2)),64))])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createElementBlock("div",pg,[u.createElementVNode("h2",gg,u.toDisplayString(o.$fcTr("not_load_or_existing_data")),1)])):u.createCommentVNode("",!0),u.createVNode(dg)],64))}},vg={class:"w-full"},wg={__name:"MList",setup(n){function e(){return{}}return(t,i)=>(u.openBlock(),u.createElementBlock("div",vg,[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(bg),u.normalizeProps(u.guardReactiveProps(e())),null,16))]))}},aT="",lT="";function Hi(n,e){let t;function i(){t=u.effectScope(),t.run(()=>e.length?e(()=>{t==null||t.stop(),i()}):e())}u.watch(n,s=>{s&&!t?i():s||(t==null||t.stop(),t=void 0)},{immediate:!0}),u.onScopeDispose(()=>{t==null||t.stop()})}function Jr(n,e){return{x:n.x+e.x,y:n.y+e.y}}function yg(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Yl(n,e){if(n.side==="top"||n.side==="bottom"){const{side:t,align:i}=n,s=i==="left"?0:i==="center"?e.width/2:i==="right"?e.width:i,o=t==="top"?0:t==="bottom"?e.height:t;return Jr({x:s,y:o},e)}else if(n.side==="left"||n.side==="right"){const{side:t,align:i}=n,s=t==="left"?0:t==="right"?e.width:t,o=i==="top"?0:i==="center"?e.height/2:i==="bottom"?e.height:i;return Jr({x:s,y:o},e)}return Jr({x:e.width/2,y:e.height/2},e)}const Ne=typeof window<"u",Zr=Ne&&"IntersectionObserver"in window,Cg=Ne&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function Xl(n,e,t){const i=e.length-1;if(i<0)return n===void 0?t:n;for(let s=0;s<i;s++){if(n==null)return t;n=n[e[s]]}return n==null||n[e[i]]===void 0?t:n[e[i]]}function rn(n,e){if(n===e)return!0;if(n instanceof Date&&e instanceof Date&&n.getTime()!==e.getTime()||n!==Object(n)||e!==Object(e))return!1;const t=Object.keys(n);return t.length!==Object.keys(e).length?!1:t.every(i=>rn(n[i],e[i]))}function Qr(n,e,t){return n==null||!e||typeof e!="string"?t:n[e]!==void 0?n[e]:(e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,""),Xl(n,e.split("."),t))}function ht(n,e,t){if(e==null)return n===void 0?t:n;if(n!==Object(n)){if(typeof e!="function")return t;const s=e(n,t);return typeof s>"u"?t:s}if(typeof e=="string")return Qr(n,e,t);if(Array.isArray(e))return Xl(n,e,t);if(typeof e!="function")return t;const i=e(n,t);return typeof i>"u"?t:i}function eo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:n},(t,i)=>e+i)}function fe(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(n==null||n===""))return isNaN(+n)?String(n):isFinite(+n)?`${Number(n)}${e}`:void 0}function to(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function io(n){return n&&"$el"in n?n.$el:n}const Jl=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function no(n,e){return e.every(t=>n.hasOwnProperty(t))}function on(n,e,t){const i=Object.create(null),s=Object.create(null);for(const o in n)e.some(l=>l instanceof RegExp?l.test(o):l===o)&&!(t!=null&&t.some(l=>l===o))?i[o]=n[o]:s[o]=n[o];return[i,s]}function an(n,e){const t={...n};return e.forEach(i=>delete t[i]),t}const Zl=/^on[^a-z]/,so=n=>Zl.test(n),Eg=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"];function Ql(n){const[e,t]=on(n,[Zl]),i=an(e,Eg),[s,o]=on(t,["class","style","id",/^data-/]);return Object.assign(s,e),Object.assign(o,i),[s,o]}function Zt(n){return n==null?[]:Array.isArray(n)?n:[n]}function Kn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(e,Math.min(t,n))}function eu(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return n+t.repeat(Math.max(0,e-n.length))}function xg(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let i=0;for(;i<n.length;)t.push(n.substr(i,e)),i+=e;return t}function At(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const i={};for(const s in n)i[s]=n[s];for(const s in e){const o=n[s],l=e[s];if(to(o)&&to(l)){i[s]=At(o,l,t);continue}if(Array.isArray(o)&&Array.isArray(l)&&t){i[s]=t(o,l);continue}i[s]=l}return i}function tu(n){return n.map(e=>e.type===u.Fragment?tu(e.children):e).flat()}function Ii(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ii.cache.has(n))return Ii.cache.get(n);const e=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ii.cache.set(n,e),e}Ii.cache=new Map;function Ds(n,e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.map(t=>Ds(n,t)).flat(1);if(Array.isArray(e.children))return e.children.map(t=>Ds(n,t)).flat(1);if(e.component){if(Object.getOwnPropertySymbols(e.component.provides).includes(n))return[e.component];if(e.component.subTree)return Ds(n,e.component.subTree).flat(1)}return[]}function ro(n){const e=u.reactive({}),t=u.computed(n);return u.watchEffect(()=>{for(const i in t.value)e[i]=t.value[i]},{flush:"sync"}),u.toRefs(e)}function As(n,e){return n.includes(e)}function iu(n){return n[2].toLowerCase()+n.slice(3)}const Qt=()=>[Function,Array];function nu(n,e){return e="on"+u.capitalize(e),!!(n[e]||n[`${e}Once`]||n[`${e}Capture`]||n[`${e}OnceCapture`]||n[`${e}CaptureOnce`])}function _g(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];if(Array.isArray(n))for(const s of n)s(...t);else typeof n=="function"&&n(...t)}function oo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const t=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(i=>`${i}${e?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...n.querySelectorAll(t)]}function su(n,e,t){let i,s=n.indexOf(document.activeElement);const o=e==="next"?1:-1;do s+=o,i=n[s];while((!i||i.offsetParent==null||!((t==null?void 0:t(i))??!0))&&s<n.length&&s>=0);return i}function Fs(n,e){var i,s,o,l;const t=oo(n);if(!e)(n===document.activeElement||!n.contains(document.activeElement))&&((i=t[0])==null||i.focus());else if(e==="first")(s=t[0])==null||s.focus();else if(e==="last")(o=t.at(-1))==null||o.focus();else if(typeof e=="number")(l=t[e])==null||l.focus();else{const c=su(t,e);c?c.focus():Fs(n,e==="next"?"first":"last")}}function Rg(){}function ln(n,e){if(!(Ne&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${e})`)))return null;try{return!!n&&n.matches(e)}catch{return null}}const ru=["top","bottom"],kg=["start","end","left","right"];function ao(n,e){let[t,i]=n.split(" ");return i||(i=As(ru,t)?"start":As(kg,t)?"top":"center"),{side:ou(t,e),align:ou(i,e)}}function ou(n,e){return n==="start"?e?"right":"left":n==="end"?e?"left":"right":n}function lo(n){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.side],align:n.align}}function uo(n){return{side:n.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.align]}}function au(n){return{side:n.align,align:n.side}}function lu(n){return As(ru,n.side)?"y":"x"}class un{constructor(e){let{x:t,y:i,width:s,height:o}=e;this.x=t,this.y=i,this.width=s,this.height=o}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function uu(n,e){return{x:{before:Math.max(0,e.left-n.left),after:Math.max(0,n.right-e.right)},y:{before:Math.max(0,e.top-n.top),after:Math.max(0,n.bottom-e.bottom)}}}function co(n){const e=n.getBoundingClientRect(),t=getComputedStyle(n),i=t.transform;if(i){let s,o,l,c,h;if(i.startsWith("matrix3d("))s=i.slice(9,-1).split(/, /),o=+s[0],l=+s[5],c=+s[12],h=+s[13];else if(i.startsWith("matrix("))s=i.slice(7,-1).split(/, /),o=+s[0],l=+s[3],c=+s[4],h=+s[5];else return new un(e);const f=t.transformOrigin,p=e.x-c-(1-o)*parseFloat(f),b=e.y-h-(1-l)*parseFloat(f.slice(f.indexOf(" ")+1)),g=o?e.width/o:n.offsetWidth+1,w=l?e.height/l:n.offsetHeight+1;return new un({x:p,y:b,width:g,height:w})}else return new un(e)}function cn(n,e,t){if(typeof n.animate>"u")return{finished:Promise.resolve()};let i;try{i=n.animate(e,t)}catch{return{finished:Promise.resolve()}}return typeof i.finished>"u"&&(i.finished=new Promise(s=>{i.onfinish=()=>{s(i)}})),i}const Ps=new WeakMap;function Sg(n,e){Object.keys(e).forEach(t=>{if(so(t)){const i=iu(t),s=Ps.get(n);if(e[t]==null)s==null||s.forEach(o=>{const[l,c]=o;l===i&&(n.removeEventListener(i,c),s.delete(o))});else if(!s||![...s].some(o=>o[0]===i&&o[1]===e[t])){n.addEventListener(i,e[t]);const o=s||new Set;o.add([i,e[t]]),Ps.has(n)||Ps.set(n,o)}}else e[t]==null?n.removeAttribute(t):n.setAttribute(t,e[t])})}function Tg(n,e){Object.keys(e).forEach(t=>{if(so(t)){const i=iu(t),s=Ps.get(n);s==null||s.forEach(o=>{const[l,c]=o;l===i&&(n.removeEventListener(i,c),s.delete(o))})}else n.removeAttribute(t)})}const dn=2.4,cu=.2126729,du=.7151522,hu=.072175,Mg=.55,Lg=.58,Dg=.57,Ag=.62,Vs=.03,fu=1.45,Fg=5e-4,Pg=1.25,Vg=1.25,mu=.078,pu=12.82051282051282,Os=.06,gu=.001;function bu(n,e){const t=(n.r/255)**dn,i=(n.g/255)**dn,s=(n.b/255)**dn,o=(e.r/255)**dn,l=(e.g/255)**dn,c=(e.b/255)**dn;let h=t*cu+i*du+s*hu,f=o*cu+l*du+c*hu;if(h<=Vs&&(h+=(Vs-h)**fu),f<=Vs&&(f+=(Vs-f)**fu),Math.abs(f-h)<Fg)return 0;let p;if(f>h){const b=(f**Mg-h**Lg)*Pg;p=b<gu?0:b<mu?b-b*pu*Os:b-Os}else{const b=(f**Ag-h**Dg)*Vg;p=b>-gu?0:b>-mu?b-b*pu*Os:b+Os}return p*100}function hn(n){u.warn(`Vuetify: ${n}`)}function ho(n){u.warn(`Vuetify error: ${n}`)}function Og(n,e){e=Array.isArray(e)?e.slice(0,-1).map(t=>`'${t}'`).join(", ")+` or '${e.at(-1)}'`:`'${e}'`,u.warn(`[Vuetify UPGRADE] '${n}' is deprecated, use ${e} instead.`)}const Ns=.20689655172413793,Ng=n=>n>Ns**3?Math.cbrt(n):n/(3*Ns**2)+4/29,zg=n=>n>Ns?n**3:3*Ns**2*(n-4/29);function vu(n){const e=Ng,t=e(n[1]);return[116*t-16,500*(e(n[0]/.95047)-t),200*(t-e(n[2]/1.08883))]}function wu(n){const e=zg,t=(n[0]+16)/116;return[e(t+n[1]/500)*.95047,e(t),e(t-n[2]/200)*1.08883]}const Hg=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Ig=n=>n<=.0031308?n*12.92:1.055*n**(1/2.4)-.055,Bg=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Wg=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4;function yu(n){const e=Array(3),t=Ig,i=Hg;for(let s=0;s<3;++s)e[s]=Math.round(Kn(t(i[s][0]*n[0]+i[s][1]*n[1]+i[s][2]*n[2]))*255);return{r:e[0],g:e[1],b:e[2]}}function fo(n){let{r:e,g:t,b:i}=n;const s=[0,0,0],o=Wg,l=Bg;e=o(e/255),t=o(t/255),i=o(i/255);for(let c=0;c<3;++c)s[c]=l[c][0]*e+l[c][1]*t+l[c][2]*i;return s}function Cu(n){return!!n&&/^(#|var\(--|(rgb|hsl)a?\()/.test(n)}const Eu=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,$g={rgb:(n,e,t,i)=>({r:n,g:e,b:t,a:i}),rgba:(n,e,t,i)=>({r:n,g:e,b:t,a:i}),hsl:(n,e,t,i)=>xu({h:n,s:e,l:t,a:i}),hsla:(n,e,t,i)=>xu({h:n,s:e,l:t,a:i}),hsv:(n,e,t,i)=>qn({h:n,s:e,v:t,a:i}),hsva:(n,e,t,i)=>qn({h:n,s:e,v:t,a:i})};function ai(n){if(typeof n=="number")return(isNaN(n)||n<0||n>16777215)&&hn(`'${n}' is not a valid hex color`),{r:(n&16711680)>>16,g:(n&65280)>>8,b:n&255};if(typeof n=="string"&&Eu.test(n)){const{groups:e}=n.match(Eu),{fn:t,values:i}=e,s=i.split(/,\s*/).map(o=>o.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(o)/100:parseFloat(o));return $g[t](...s)}else if(typeof n=="string"){let e=n.startsWith("#")?n.slice(1):n;[3,4].includes(e.length)?e=e.split("").map(i=>i+i).join(""):[6,8].includes(e.length)||hn(`'${n}' is not a valid hex(a) color`);const t=parseInt(e,16);return(isNaN(t)||t<0||t>4294967295)&&hn(`'${n}' is not a valid hex(a) color`),Ug(e)}else if(typeof n=="object"){if(no(n,["r","g","b"]))return n;if(no(n,["h","s","l"]))return qn(_u(n));if(no(n,["h","s","v"]))return qn(n)}throw new TypeError(`Invalid color: ${n==null?n:String(n)||n.constructor.name}
|
45
|
-
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function qn(n){const{h:e,s:t,v:i,a:s}=n,o=c=>{const h=(c+e/60)%6;return i-i*t*Math.max(Math.min(h,4-h,1),0)},l=[o(5),o(3),o(1)].map(c=>Math.round(c*255));return{r:l[0],g:l[1],b:l[2],a:s}}function xu(n){return qn(_u(n))}function _u(n){const{h:e,s:t,l:i,a:s}=n,o=i+t*Math.min(i,1-i),l=o===0?0:2-2*i/o;return{h:e,s:l,v:o,a:s}}function zs(n){const e=Math.round(n).toString(16);return("00".substr(0,2-e.length)+e).toUpperCase()}function Gg(n){let{r:e,g:t,b:i,a:s}=n;return`#${[zs(e),zs(t),zs(i),s!==void 0?zs(Math.round(s*255)):""].join("")}`}function Ug(n){n=jg(n);let[e,t,i,s]=xg(n,2).map(o=>parseInt(o,16));return s=s===void 0?s:s/255,{r:e,g:t,b:i,a:s}}function jg(n){return n.startsWith("#")&&(n=n.slice(1)),n=n.replace(/([^0-9a-f])/gi,"F"),(n.length===3||n.length===4)&&(n=n.split("").map(e=>e+e).join("")),n.length!==6&&(n=eu(eu(n,6),8,"F")),n}function Kg(n,e){const t=vu(fo(n));return t[0]=t[0]+e*10,yu(wu(t))}function qg(n,e){const t=vu(fo(n));return t[0]=t[0]-e*10,yu(wu(t))}function Yg(n){const e=ai(n);return fo(e)[1]}function Ru(n){const e=Math.abs(bu(ai(0),ai(n)));return Math.abs(bu(ai(16777215),ai(n)))>Math.min(e,50)?"#fff":"#000"}function Y(n,e){return t=>Object.keys(n).reduce((i,s)=>{const l=typeof n[s]=="object"&&n[s]!=null&&!Array.isArray(n[s])?n[s]:{type:n[s]};return t&&s in t?i[s]={...l,default:t[s]}:i[s]=l,e&&!i[s].source&&(i[s].source=e),i},{})}const Ve=Y({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),fn=Symbol.for("vuetify:defaults");function Xg(n){return u.ref(n)}function mo(){const n=u.inject(fn);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function Hs(n,e){const t=mo(),i=u.ref(n),s=u.computed(()=>{if(u.unref(e==null?void 0:e.disabled))return t.value;const l=u.unref(e==null?void 0:e.scoped),c=u.unref(e==null?void 0:e.reset),h=u.unref(e==null?void 0:e.root);if(i.value==null&&!(l||c||h))return t.value;let f=At(i.value,{prev:t.value});if(l)return f;if(c||h){const p=Number(c||1/0);for(let b=0;b<=p&&!(!f||!("prev"in f));b++)f=f.prev;return f&&typeof h=="string"&&h in f&&(f=At(At(f,{prev:f}),f[h])),f}return f.prev?At(f.prev,f):f});return u.provide(fn,s),s}function Jg(n,e){var t,i;return typeof((t=n.props)==null?void 0:t[e])<"u"||typeof((i=n.props)==null?void 0:i[Ii(e)])<"u"}function Zg(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mo();const i=st("useDefaults");if(e=e??i.type.name??i.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const s=u.computed(()=>{var h;return(h=t.value)==null?void 0:h[n._as??e]}),o=new Proxy(n,{get(h,f){var b,g,w,E;const p=Reflect.get(h,f);return f==="class"||f==="style"?[(b=s.value)==null?void 0:b[f],p].filter(x=>x!=null):typeof f=="string"&&!Jg(i.vnode,f)?((g=s.value)==null?void 0:g[f])??((E=(w=t.value)==null?void 0:w.global)==null?void 0:E[f])??p:p}}),l=u.shallowRef();u.watchEffect(()=>{if(s.value){const h=Object.entries(s.value).filter(f=>{let[p]=f;return p.startsWith(p[0].toUpperCase())});l.value=h.length?Object.fromEntries(h):void 0}else l.value=void 0});function c(){const h=ib(fn,i);u.provide(fn,u.computed(()=>l.value?At((h==null?void 0:h.value)??{},l.value):h==null?void 0:h.value))}return{props:o,provideSubDefaults:c}}function mn(n){if(n._setup=n._setup??n.setup,!n.name)return hn("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Y(n.props??{},n.name)();const e=Object.keys(n.props);n.filterProps=function(i){return on(i,e,["class","style"])},n.props._as=String,n.setup=function(i,s){const o=mo();if(!o.value)return n._setup(i,s);const{props:l,provideSubDefaults:c}=Zg(i,i._as??n.name,o),h=n._setup(l,s);return c(),h}}return n}function be(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?mn:u.defineComponent)(e)}function ku(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return be()({name:t??u.capitalize(u.camelize(n.replace(/__/g,"-"))),props:{tag:{type:String,default:e},...Ve()},setup(i,s){let{slots:o}=s;return()=>{var l;return u.h(i.tag,{class:[n,i.class],style:i.style},(l=o.default)==null?void 0:l.call(o))}}})}function Su(n){if(typeof n.getRootNode!="function"){for(;n.parentNode;)n=n.parentNode;return n!==document?null:document}const e=n.getRootNode();return e!==document&&e.getRootNode({composed:!0})!==document?null:e}const Is="cubic-bezier(0.4, 0, 0.2, 1)",Qg="cubic-bezier(0.0, 0, 0.2, 1)",eb="cubic-bezier(0.4, 0, 1, 1)";function st(n,e){const t=u.getCurrentInstance();if(!t)throw new Error(`[Vuetify] ${n} ${e||"must be called from inside a setup function"}`);return t}function Ei(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const e=st(n).type;return Ii((e==null?void 0:e.aliasName)||(e==null?void 0:e.name))}let Tu=0,Bs=new WeakMap;function Ut(){const n=st("getUid");if(Bs.has(n))return Bs.get(n);{const e=Tu++;return Bs.set(n,e),e}}Ut.reset=()=>{Tu=0,Bs=new WeakMap};function Mu(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;n;){if(e?tb(n):po(n))return n;n=n.parentElement}return document.scrollingElement}function Ws(n,e){const t=[];if(e&&n&&!e.contains(n))return t;for(;n&&(po(n)&&t.push(n),n!==e);)n=n.parentElement;return t}function po(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(n);return e.overflowY==="scroll"||e.overflowY==="auto"&&n.scrollHeight>n.clientHeight}function tb(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(n);return["scroll","auto"].includes(e.overflowY)}function ib(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:st("injectSelf");const{provides:t}=e;if(t&&n in t)return t[n]}function nb(n){for(;n;){if(window.getComputedStyle(n).position==="fixed")return!0;n=n.offsetParent}return!1}function Me(n){const e=st("useRender");e.render=n}const Lu={static:ob,connected:lb},sb=Y({locationStrategy:{type:[String,Function],default:"static",validator:n=>typeof n=="function"||n in Lu},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function rb(n,e){const t=u.ref({}),i=u.ref();Ne&&(Hi(()=>!!(e.isActive.value&&n.locationStrategy),o=>{var l,c;u.watch(()=>n.locationStrategy,o),u.onScopeDispose(()=>{i.value=void 0}),typeof n.locationStrategy=="function"?i.value=(l=n.locationStrategy(e,n,t))==null?void 0:l.updateLocation:i.value=(c=Lu[n.locationStrategy](e,n,t))==null?void 0:c.updateLocation}),window.addEventListener("resize",s,{passive:!0}),u.onScopeDispose(()=>{window.removeEventListener("resize",s),i.value=void 0}));function s(o){var l;(l=i.value)==null||l.call(i,o)}return{contentStyles:t,updateLocation:i}}function ob(){}function ab(n,e){e?n.style.removeProperty("left"):n.style.removeProperty("right");const t=co(n);return e?t.x+=parseFloat(n.style.right||0):t.x-=parseFloat(n.style.left||0),t.y-=parseFloat(n.style.top||0),t}function lb(n,e,t){nb(n.activatorEl.value)&&Object.assign(t.value,{position:"fixed",top:0,[n.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:o}=ro(()=>{const E=ao(e.location,n.isRtl.value),x=e.origin==="overlap"?E:e.origin==="auto"?lo(E):ao(e.origin,n.isRtl.value);return E.side===x.side&&E.align===uo(x).align?{preferredAnchor:au(E),preferredOrigin:au(x)}:{preferredAnchor:E,preferredOrigin:x}}),[l,c,h,f]=["minWidth","minHeight","maxWidth","maxHeight"].map(E=>u.computed(()=>{const x=parseFloat(e[E]);return isNaN(x)?1/0:x})),p=u.computed(()=>{if(Array.isArray(e.offset))return e.offset;if(typeof e.offset=="string"){const E=e.offset.split(" ").map(parseFloat);return E.length<2&&E.push(0),E}return typeof e.offset=="number"?[e.offset,0]:[0,0]});let b=!1;const g=new ResizeObserver(()=>{b&&w()});u.watch([n.activatorEl,n.contentEl],(E,x)=>{let[_,k]=E,[V,L]=x;V&&g.unobserve(V),_&&g.observe(_),L&&g.unobserve(L),k&&g.observe(k)},{immediate:!0}),u.onScopeDispose(()=>{g.disconnect()});function w(){if(b=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>b=!0)}),!n.activatorEl.value||!n.contentEl.value)return;const E=n.activatorEl.value.getBoundingClientRect(),x=ab(n.contentEl.value,n.isRtl.value),_=Ws(n.contentEl.value),k=12;_.length||(_.push(document.documentElement),n.contentEl.value.style.top&&n.contentEl.value.style.left||(x.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),x.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const V=_.reduce((ie,G)=>{const X=G.getBoundingClientRect(),ee=new un({x:G===document.documentElement?0:X.x,y:G===document.documentElement?0:X.y,width:G.clientWidth,height:G.clientHeight});return ie?new un({x:Math.max(ie.left,ee.left),y:Math.max(ie.top,ee.top),width:Math.min(ie.right,ee.right)-Math.max(ie.left,ee.left),height:Math.min(ie.bottom,ee.bottom)-Math.max(ie.top,ee.top)}):ee},void 0);V.x+=k,V.y+=k,V.width-=k*2,V.height-=k*2;let L={anchor:s.value,origin:o.value};function F(ie){const G=new un(x),X=Yl(ie.anchor,E),ee=Yl(ie.origin,G);let{x:ue,y:Re}=yg(X,ee);switch(ie.anchor.side){case"top":Re-=p.value[0];break;case"bottom":Re+=p.value[0];break;case"left":ue-=p.value[0];break;case"right":ue+=p.value[0];break}switch(ie.anchor.align){case"top":Re-=p.value[1];break;case"bottom":Re+=p.value[1];break;case"left":ue-=p.value[1];break;case"right":ue+=p.value[1];break}return G.x+=ue,G.y+=Re,G.width=Math.min(G.width,h.value),G.height=Math.min(G.height,f.value),{overflows:uu(G,V),x:ue,y:Re}}let H=0,W=0;const P={x:0,y:0},D={x:!1,y:!1};let I=-1;for(;;){if(I++>10){ho("Infinite loop detected in connectedLocationStrategy");break}const{x:ie,y:G,overflows:X}=F(L);H+=ie,W+=G,x.x+=ie,x.y+=G;{const ee=lu(L.anchor),ue=X.x.before||X.x.after,Re=X.y.before||X.y.after;let U=!1;if(["x","y"].forEach($=>{if($==="x"&&ue&&!D.x||$==="y"&&Re&&!D.y){const Q={anchor:{...L.anchor},origin:{...L.origin}},me=$==="x"?ee==="y"?uo:lo:ee==="y"?lo:uo;Q.anchor=me(Q.anchor),Q.origin=me(Q.origin);const{overflows:ye}=F(Q);(ye[$].before<=X[$].before&&ye[$].after<=X[$].after||ye[$].before+ye[$].after<(X[$].before+X[$].after)/2)&&(L=Q,U=D[$]=!0)}}),U)continue}X.x.before&&(H+=X.x.before,x.x+=X.x.before),X.x.after&&(H-=X.x.after,x.x-=X.x.after),X.y.before&&(W+=X.y.before,x.y+=X.y.before),X.y.after&&(W-=X.y.after,x.y-=X.y.after);{const ee=uu(x,V);P.x=V.width-ee.x.before-ee.x.after,P.y=V.height-ee.y.before-ee.y.after,H+=ee.x.before,x.x+=ee.x.before,W+=ee.y.before,x.y+=ee.y.before}break}const Z=lu(L.anchor);return Object.assign(t.value,{"--v-overlay-anchor-origin":`${L.anchor.side} ${L.anchor.align}`,transformOrigin:`${L.origin.side} ${L.origin.align}`,top:fe(go(W)),left:n.isRtl.value?void 0:fe(go(H)),right:n.isRtl.value?fe(go(-H)):void 0,minWidth:fe(Z==="y"?Math.min(l.value,E.width):l.value),maxWidth:fe(Du(Kn(P.x,l.value===1/0?0:l.value,h.value))),maxHeight:fe(Du(Kn(P.y,c.value===1/0?0:c.value,f.value)))}),{available:P,contentBox:x}}return u.watch(()=>[s.value,o.value,e.offset,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight],()=>w()),u.nextTick(()=>{const E=w();if(!E)return;const{available:x,contentBox:_}=E;_.height>x.y&&requestAnimationFrame(()=>{w(),requestAnimationFrame(()=>{w()})})}),{updateLocation:w}}function go(n){return Math.round(n*devicePixelRatio)/devicePixelRatio}function Du(n){return Math.ceil(n*devicePixelRatio)/devicePixelRatio}let bo=!0;const $s=[];function ub(n){!bo||$s.length?($s.push(n),vo()):(bo=!1,n(),vo())}let Au=-1;function vo(){cancelAnimationFrame(Au),Au=requestAnimationFrame(()=>{const n=$s.shift();n&&n(),$s.length?vo():bo=!0})}const Gs={none:null,close:hb,block:fb,reposition:mb},cb=Y({scrollStrategy:{type:[String,Function],default:"block",validator:n=>typeof n=="function"||n in Gs}},"VOverlay-scroll-strategies");function db(n,e){if(!Ne)return;let t;u.watchEffect(async()=>{t==null||t.stop(),e.isActive.value&&n.scrollStrategy&&(t=u.effectScope(),await u.nextTick(),t.active&&t.run(()=>{var i;typeof n.scrollStrategy=="function"?n.scrollStrategy(e,n,t):(i=Gs[n.scrollStrategy])==null||i.call(Gs,e,n,t)}))}),u.onScopeDispose(()=>{t==null||t.stop()})}function hb(n){function e(t){n.isActive.value=!1}Fu(n.activatorEl.value??n.contentEl.value,e)}function fb(n,e){var l;const t=(l=n.root.value)==null?void 0:l.offsetParent,i=[...new Set([...Ws(n.activatorEl.value,e.contained?t:void 0),...Ws(n.contentEl.value,e.contained?t:void 0)])].filter(c=>!c.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,o=(c=>po(c)&&c)(t||document.documentElement);o&&n.root.value.classList.add("v-overlay--scroll-blocked"),i.forEach((c,h)=>{c.style.setProperty("--v-body-scroll-x",fe(-c.scrollLeft)),c.style.setProperty("--v-body-scroll-y",fe(-c.scrollTop)),c!==document.documentElement&&c.style.setProperty("--v-scrollbar-offset",fe(s)),c.classList.add("v-overlay-scroll-blocked")}),u.onScopeDispose(()=>{i.forEach((c,h)=>{const f=parseFloat(c.style.getPropertyValue("--v-body-scroll-x")),p=parseFloat(c.style.getPropertyValue("--v-body-scroll-y"));c.style.removeProperty("--v-body-scroll-x"),c.style.removeProperty("--v-body-scroll-y"),c.style.removeProperty("--v-scrollbar-offset"),c.classList.remove("v-overlay-scroll-blocked"),c.scrollLeft=-f,c.scrollTop=-p}),o&&n.root.value.classList.remove("v-overlay--scroll-blocked")})}function mb(n,e,t){let i=!1,s=-1,o=-1;function l(c){ub(()=>{var p,b;const h=performance.now();(b=(p=n.updateLocation).value)==null||b.call(p,c),i=(performance.now()-h)/(1e3/60)>2})}o=(typeof requestIdleCallback>"u"?c=>c():requestIdleCallback)(()=>{t.run(()=>{Fu(n.activatorEl.value??n.contentEl.value,c=>{i?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{l(c)})})):l(c)})})}),u.onScopeDispose(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(o),cancelAnimationFrame(s)})}function Fu(n,e){const t=[document,...Ws(n)];t.forEach(i=>{i.addEventListener("scroll",e,{passive:!0})}),u.onScopeDispose(()=>{t.forEach(i=>{i.removeEventListener("scroll",e)})})}const wo=Symbol.for("vuetify:v-menu"),pb=Y({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function gb(n,e){const t={},i=s=>()=>{if(!Ne)return Promise.resolve(!0);const o=s==="openDelay";return t.closeDelay&&window.clearTimeout(t.closeDelay),delete t.closeDelay,t.openDelay&&window.clearTimeout(t.openDelay),delete t.openDelay,new Promise(l=>{const c=parseInt(n[s]??0,10);t[s]=window.setTimeout(()=>{e==null||e(o),l(o)},c)})};return{runCloseDelay:i("closeDelay"),runOpenDelay:i("openDelay")}}const bb=Y({activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...pb()},"VOverlay-activator");function vb(n,e){let{isActive:t,isTop:i}=e;const s=u.ref();let o=!1,l=!1,c=!0;const h=u.computed(()=>n.openOnFocus||n.openOnFocus==null&&n.openOnHover),f=u.computed(()=>n.openOnClick||n.openOnClick==null&&!n.openOnHover&&!h.value),{runOpenDelay:p,runCloseDelay:b}=gb(n,L=>{L===(n.openOnHover&&o||h.value&&l)&&!(n.openOnHover&&t.value&&!i.value)&&(t.value!==L&&(c=!0),t.value=L)}),g={onClick:L=>{L.stopPropagation(),s.value=L.currentTarget||L.target,t.value=!t.value},onMouseenter:L=>{var F;(F=L.sourceCapabilities)!=null&&F.firesTouchEvents||(o=!0,s.value=L.currentTarget||L.target,p())},onMouseleave:L=>{o=!1,b()},onFocus:L=>{ln(L.target,":focus-visible")!==!1&&(l=!0,L.stopPropagation(),s.value=L.currentTarget||L.target,p())},onBlur:L=>{l=!1,L.stopPropagation(),b()}},w=u.computed(()=>{const L={};return f.value&&(L.onClick=g.onClick),n.openOnHover&&(L.onMouseenter=g.onMouseenter,L.onMouseleave=g.onMouseleave),h.value&&(L.onFocus=g.onFocus,L.onBlur=g.onBlur),L}),E=u.computed(()=>{const L={};if(n.openOnHover&&(L.onMouseenter=()=>{o=!0,p()},L.onMouseleave=()=>{o=!1,b()}),h.value&&(L.onFocusin=()=>{l=!0,p()},L.onFocusout=()=>{l=!1,b()}),n.closeOnContentClick){const F=u.inject(wo,null);L.onClick=()=>{t.value=!1,F==null||F.closeParents()}}return L}),x=u.computed(()=>{const L={};return n.openOnHover&&(L.onMouseenter=()=>{c&&(o=!0,c=!1,p())},L.onMouseleave=()=>{o=!1,b()}),L});u.watch(i,L=>{L&&(n.openOnHover&&!o&&(!h.value||!l)||h.value&&!l&&(!n.openOnHover||!o))&&(t.value=!1)});const _=u.ref();u.watchEffect(()=>{_.value&&u.nextTick(()=>{s.value=io(_.value)})});const k=st("useActivator");let V;return u.watch(()=>!!n.activator,L=>{L&&Ne?(V=u.effectScope(),V.run(()=>{wb(n,k,{activatorEl:s,activatorEvents:w})})):V&&V.stop()},{flush:"post",immediate:!0}),u.onScopeDispose(()=>{V==null||V.stop()}),{activatorEl:s,activatorRef:_,activatorEvents:w,contentEvents:E,scrimEvents:x}}function wb(n,e,t){let{activatorEl:i,activatorEvents:s}=t;u.watch(()=>n.activator,(h,f)=>{if(f&&h!==f){const p=c(f);p&&l(p)}h&&u.nextTick(()=>o())},{immediate:!0}),u.watch(()=>n.activatorProps,()=>{o()}),u.onScopeDispose(()=>{l()});function o(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c(),f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.activatorProps;h&&Sg(h,u.mergeProps(s.value,f))}function l(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c(),f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.activatorProps;h&&Tg(h,u.mergeProps(s.value,f))}function c(){var p,b;let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.activator,f;if(h)if(h==="parent"){let g=(b=(p=e==null?void 0:e.proxy)==null?void 0:p.$el)==null?void 0:b.parentNode;for(;g.hasAttribute("data-no-activator");)g=g.parentNode;f=g}else typeof h=="string"?f=document.querySelector(h):"$el"in h?f=h.$el:f=h;return i.value=(f==null?void 0:f.nodeType)===Node.ELEMENT_NODE?f:null,i.value}}function yo(n){return ro(()=>{const e=[],t={};if(n.value.background)if(Cu(n.value.background)){if(t.backgroundColor=n.value.background,!n.value.text){const i=Ru(t.backgroundColor);t.color=i,t.caretColor=i}}else e.push(`bg-${n.value.background}`);return n.value.text&&(Cu(n.value.text)?(t.color=n.value.text,t.caretColor=n.value.text):e.push(`text-${n.value.text}`)),{colorClasses:e,colorStyles:t}})}function xi(n,e){const t=u.computed(()=>({text:u.isRef(n)?n.value:e?n[e]:null})),{colorClasses:i,colorStyles:s}=yo(t);return{textColorClasses:i,textColorStyles:s}}function Yn(n,e){const t=u.computed(()=>({background:u.isRef(n)?n.value:e?n[e]:null})),{colorClasses:i,colorStyles:s}=yo(t);return{backgroundColorClasses:i,backgroundColorStyles:s}}const Xn=Y({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Jn(n){return{dimensionStyles:u.computed(()=>({height:fe(n.height),maxHeight:fe(n.maxHeight),maxWidth:fe(n.maxWidth),minHeight:fe(n.minHeight),minWidth:fe(n.minWidth),width:fe(n.width)}))}}const Co=Symbol.for("vuetify:display"),Pu={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},yb=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pu;return At(Pu,n)};function Vu(n){return Ne&&!n?window.innerWidth:typeof n=="object"&&n.clientWidth||0}function Ou(n){return Ne&&!n?window.innerHeight:typeof n=="object"&&n.clientHeight||0}function Nu(n){const e=Ne&&!n?window.navigator.userAgent:"ssr";function t(E){return!!e.match(E)}const i=t(/android/i),s=t(/iphone|ipad|ipod/i),o=t(/cordova/i),l=t(/electron/i),c=t(/chrome/i),h=t(/edge/i),f=t(/firefox/i),p=t(/opera/i),b=t(/win/i),g=t(/mac/i),w=t(/linux/i);return{android:i,ios:s,cordova:o,electron:l,chrome:c,edge:h,firefox:f,opera:p,win:b,mac:g,linux:w,touch:Cg,ssr:e==="ssr"}}function Cb(n,e){const{thresholds:t,mobileBreakpoint:i}=yb(n),s=u.shallowRef(Ou(e)),o=u.shallowRef(Nu(e)),l=u.reactive({}),c=u.shallowRef(Vu(e));function h(){s.value=Ou(),c.value=Vu()}function f(){h(),o.value=Nu()}return u.watchEffect(()=>{const p=c.value<t.sm,b=c.value<t.md&&!p,g=c.value<t.lg&&!(b||p),w=c.value<t.xl&&!(g||b||p),E=c.value<t.xxl&&!(w||g||b||p),x=c.value>=t.xxl,_=p?"xs":b?"sm":g?"md":w?"lg":E?"xl":"xxl",k=typeof i=="number"?i:t[i],V=c.value<k;l.xs=p,l.sm=b,l.md=g,l.lg=w,l.xl=E,l.xxl=x,l.smAndUp=!p,l.mdAndUp=!(p||b),l.lgAndUp=!(p||b||g),l.xlAndUp=!(p||b||g||w),l.smAndDown=!(g||w||E||x),l.mdAndDown=!(w||E||x),l.lgAndDown=!(E||x),l.xlAndDown=!x,l.name=_,l.height=s.value,l.width=c.value,l.mobile=V,l.mobileBreakpoint=i,l.platform=o.value,l.thresholds=t}),Ne&&window.addEventListener("resize",h,{passive:!0}),{...u.toRefs(l),update:f,ssr:!!e}}function zu(){const n=u.inject(Co);if(!n)throw new Error("Could not find Vuetify display injection");return n}function Eb(){if(!Ne)return u.shallowRef(!1);const{ssr:n}=zu();if(n){const e=u.shallowRef(!1);return u.onMounted(()=>{e.value=!0}),e}else return u.shallowRef(!0)}const xb=Y({eager:Boolean},"lazy");function _b(n,e){const t=u.shallowRef(!1),i=u.computed(()=>t.value||n.eager||e.value);u.watch(e,()=>t.value=!0);function s(){n.eager||(t.value=!1)}return{isBooted:t,hasContent:i,onAfterLeave:s}}const Rb={badge:"Badge",open:"Open",close:"Close",dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{ok:"OK",cancel:"Cancel",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},kb={af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1};function We(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b=>b,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:b=>b;const o=st("useProxiedModel"),l=u.ref(n[e]!==void 0?n[e]:t),c=Ii(e),f=c!==e?u.computed(()=>{var b,g,w,E;return n[e],!!(((b=o.vnode.props)!=null&&b.hasOwnProperty(e)||(g=o.vnode.props)!=null&&g.hasOwnProperty(c))&&((w=o.vnode.props)!=null&&w.hasOwnProperty(`onUpdate:${e}`)||(E=o.vnode.props)!=null&&E.hasOwnProperty(`onUpdate:${c}`)))}):u.computed(()=>{var b,g;return n[e],!!((b=o.vnode.props)!=null&&b.hasOwnProperty(e)&&((g=o.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${e}`)))});Hi(()=>!f.value,()=>{u.watch(()=>n[e],b=>{l.value=b})});const p=u.computed({get(){const b=n[e];return i(f.value?b:l.value)},set(b){const g=s(b),w=u.toRaw(f.value?n[e]:l.value);w===g||i(w)===b||(l.value=g,o==null||o.emit(`update:${e}`,g))}});return Object.defineProperty(p,"externalValue",{get:()=>f.value?n[e]:l.value}),p}const Hu="$vuetify.",Iu=(n,e)=>n.replace(/\{(\d+)\}/g,(t,i)=>String(e[+i])),Bu=(n,e,t)=>function(i){for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];if(!i.startsWith(Hu))return Iu(i,o);const c=i.replace(Hu,""),h=n.value&&t.value[n.value],f=e.value&&t.value[e.value];let p=Qr(h,c,null);return p||(hn(`Translation key "${i}" not found in "${n.value}", trying fallback locale`),p=Qr(f,c,null)),p||(ho(`Translation key "${i}" not found in fallback`),p=i),typeof p!="string"&&(ho(`Translation key "${i}" has a non-string value`),p=i),Iu(p,o)};function Wu(n,e){return(t,i)=>new Intl.NumberFormat([n.value,e.value],i).format(t)}function Eo(n,e,t){const i=We(n,e,n[e]??t.value);return i.value=n[e]??t.value,u.watch(t,s=>{n[e]==null&&(i.value=t.value)}),i}function $u(n){return e=>{const t=Eo(e,"locale",n.current),i=Eo(e,"fallback",n.fallback),s=Eo(e,"messages",n.messages);return{name:"vuetify",current:t,fallback:i,messages:s,t:Bu(t,i,s),n:Wu(t,i),provide:$u({current:t,fallback:i,messages:s})}}}function Sb(n){const e=u.shallowRef((n==null?void 0:n.locale)??"en"),t=u.shallowRef((n==null?void 0:n.fallback)??"en"),i=u.ref({en:Rb,...n==null?void 0:n.messages});return{name:"vuetify",current:e,fallback:t,messages:i,t:Bu(e,t,i),n:Wu(e,t),provide:$u({current:e,fallback:t,messages:i})}}const Us=Symbol.for("vuetify:locale");function Tb(n){return n.name!=null}function Mb(n){const e=n!=null&&n.adapter&&Tb(n==null?void 0:n.adapter)?n==null?void 0:n.adapter:Sb(n),t=Lb(e,n);return{...e,...t}}function js(){const n=u.inject(Us);if(!n)throw new Error("[Vuetify] Could not find injected locale instance");return n}function Lb(n,e){const t=u.ref((e==null?void 0:e.rtl)??kb),i=u.computed(()=>t.value[n.current.value]??!1);return{isRtl:i,rtl:t,rtlClasses:u.computed(()=>`v-locale--is-${i.value?"rtl":"ltr"}`)}}function Zn(){const n=u.inject(Us);if(!n)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:n.isRtl,rtlClasses:n.rtlClasses}}function Db(){var n,e;return(e=(n=st("useRouter"))==null?void 0:n.proxy)==null?void 0:e.$router}function Gu(n,e){const t=u.resolveDynamicComponent("RouterLink"),i=u.computed(()=>!!(n.href||n.to)),s=u.computed(()=>(i==null?void 0:i.value)||nu(e,"click")||nu(n,"click"));if(typeof t=="string")return{isLink:i,isClickable:s,href:u.toRef(n,"href")};const o=n.to?t.useLink(n):void 0;return{isLink:i,isClickable:s,route:o==null?void 0:o.route,navigate:o==null?void 0:o.navigate,isActive:o&&u.computed(()=>{var l,c;return n.exact?(l=o.isExactActive)==null?void 0:l.value:(c=o.isActive)==null?void 0:c.value}),href:u.computed(()=>n.to?o==null?void 0:o.route.value.href:n.href)}}const Uu=Y({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let xo=!1;function Ab(n,e){let t=!1,i,s;Ne&&(u.nextTick(()=>{window.addEventListener("popstate",o),i=n==null?void 0:n.beforeEach((l,c,h)=>{xo?t?e(h):h():setTimeout(()=>t?e(h):h()),xo=!0}),s=n==null?void 0:n.afterEach(()=>{xo=!1})}),u.onScopeDispose(()=>{window.removeEventListener("popstate",o),i==null||i(),s==null||s()}));function o(l){var c;(c=l.state)!=null&&c.replaced||(t=!0,setTimeout(()=>t=!1))}}function _o(){const e=st("useScopeId").vnode.scopeId;return{scopeId:e?{[e]:""}:void 0}}const ju=Symbol.for("vuetify:stack"),Qn=u.reactive([]);function Fb(n,e,t){const i=st("useStack"),s=!t,o=u.inject(ju,void 0),l=u.reactive({activeChildren:new Set});u.provide(ju,l);const c=u.shallowRef(+e.value);Hi(n,()=>{var b;const p=(b=Qn.at(-1))==null?void 0:b[1];c.value=p?p+10:+e.value,s&&Qn.push([i.uid,c.value]),o==null||o.activeChildren.add(i.uid),u.onScopeDispose(()=>{if(s){const g=u.toRaw(Qn).findIndex(w=>w[0]===i.uid);Qn.splice(g,1)}o==null||o.activeChildren.delete(i.uid)})});const h=u.shallowRef(!0);s&&u.watchEffect(()=>{var b;const p=((b=Qn.at(-1))==null?void 0:b[0])===i.uid;setTimeout(()=>h.value=p)});const f=u.computed(()=>!l.activeChildren.size);return{globalTop:u.readonly(h),localTop:f,stackStyles:u.computed(()=>({zIndex:c.value}))}}function Pb(n){return{teleportTarget:u.computed(()=>{const t=n.value;if(t===!0||!Ne)return;const i=t===!1?document.body:typeof t=="string"?document.querySelector(t):t;if(i==null){u.warn(`Unable to locate target ${t}`);return}let s=i.querySelector(":scope > .v-overlay-container");return s||(s=document.createElement("div"),s.className="v-overlay-container",i.appendChild(s)),s})}}const Ks=Symbol.for("vuetify:theme"),Ft=Y({theme:String},"theme"),es={defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#6200EE","primary-darken-1":"#3700B3",secondary:"#03DAC6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-variant":"#BDBDBD","on-surface-variant":"#424242",primary:"#BB86FC","primary-darken-1":"#3700B3",secondary:"#03DAC5","secondary-darken-1":"#03DAC5",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}};function Vb(){var t,i;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:es;if(!n)return{...es,isDisabled:!0};const e={};for(const[s,o]of Object.entries(n.themes??{})){const l=o.dark||s==="dark"?(t=es.themes)==null?void 0:t.dark:(i=es.themes)==null?void 0:i.light;e[s]=At(l,o)}return At(es,{...n,themes:e})}function Ob(n){const e=Vb(n),t=u.ref(e.defaultTheme),i=u.ref(e.themes),s=u.computed(()=>{const p={};for(const[b,g]of Object.entries(i.value)){const w=p[b]={...g,colors:{...g.colors}};if(e.variations)for(const E of e.variations.colors){const x=w.colors[E];if(x)for(const _ of["lighten","darken"]){const k=_==="lighten"?Kg:qg;for(const V of eo(e.variations[_],1))w.colors[`${E}-${_}-${V}`]=Gg(k(ai(x),V))}}for(const E of Object.keys(w.colors)){if(/^on-[a-z]/.test(E)||w.colors[`on-${E}`])continue;const x=`on-${E}`,_=ai(w.colors[E]);w.colors[x]=Ru(_)}}return p}),o=u.computed(()=>s.value[t.value]),l=u.computed(()=>{const p=[];o.value.dark&&Bi(p,":root",["color-scheme: dark"]),Bi(p,":root",Ku(o.value));for(const[E,x]of Object.entries(s.value))Bi(p,`.v-theme--${E}`,[`color-scheme: ${x.dark?"dark":"normal"}`,...Ku(x)]);const b=[],g=[],w=new Set(Object.values(s.value).flatMap(E=>Object.keys(E.colors)));for(const E of w)/^on-[a-z]/.test(E)?Bi(g,`.${E}`,[`color: rgb(var(--v-theme-${E})) !important`]):(Bi(b,`.bg-${E}`,[`--v-theme-overlay-multiplier: var(--v-theme-${E}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${E})) !important`,`color: rgb(var(--v-theme-on-${E})) !important`]),Bi(g,`.text-${E}`,[`color: rgb(var(--v-theme-${E})) !important`]),Bi(g,`.border-${E}`,[`--v-border-color: var(--v-theme-${E})`]));return p.push(...b,...g),p.map((E,x)=>x===0?E:` ${E}`).join("")});function c(){return{style:[{children:l.value,id:"vuetify-theme-stylesheet",nonce:e.cspNonce||!1}]}}function h(p){if(e.isDisabled)return;const b=p._context.provides.usehead;if(b)if(b.push){const g=b.push(c);Ne&&u.watch(l,()=>{g.patch(c)})}else Ne?(b.addHeadObjs(u.computed(c)),u.watchEffect(()=>b.updateDOM())):b.addHeadObjs(c());else{let w=function(){if(typeof document<"u"&&!g){const E=document.createElement("style");E.type="text/css",E.id="vuetify-theme-stylesheet",e.cspNonce&&E.setAttribute("nonce",e.cspNonce),g=E,document.head.appendChild(g)}g&&(g.innerHTML=l.value)},g=Ne?document.getElementById("vuetify-theme-stylesheet"):null;Ne?u.watch(l,w,{immediate:!0}):w()}}const f=u.computed(()=>e.isDisabled?void 0:`v-theme--${t.value}`);return{install:h,isDisabled:e.isDisabled,name:t,themes:i,current:o,computedThemes:s,themeClasses:f,styles:l,global:{name:t,current:o}}}function ei(n){st("provideTheme");const e=u.inject(Ks,null);if(!e)throw new Error("Could not find Vuetify theme injection");const t=u.computed(()=>n.theme??(e==null?void 0:e.name.value)),i=u.computed(()=>e.isDisabled?void 0:`v-theme--${t.value}`),s={...e,name:t,themeClasses:i};return u.provide(Ks,s),s}function Bi(n,e,t){n.push(`${e} {
|
46
|
+
Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),n=this.activeRows.indexOf(e);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(o=>{var l=o.indexOf(e);l>-1&&o.splice(l,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,n){var o=this.addRowActual(e,t,i,n);return o}addRows(e,t,i,n){var o=[];return new Promise((l,h)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((c,f)=>{var m=this.addRow(c,t,i,!0);o.push(m),this.dispatch("row-added",m,c,t,i)}),this.refreshActiveData(n?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),o.length&&this._clearPlaceholder(),l(o)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,n){var o=e instanceof $e?e:new $e(e||{},this),l=this.findAddRowPos(t),h=-1,c,f;return i||(f=this.chain("row-adding-position",[o,l],null,{index:i,top:l}),i=f.index,l=f.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[o,i,l],null,i),i&&(h=this.rows.indexOf(i)),i&&h>-1?(c=this.activeRows.indexOf(i),this.displayRowIterator(function(m){var b=m.indexOf(i);b>-1&&m.splice(l?b:b+1,0,o)}),c>-1&&this.activeRows.splice(l?c:c+1,0,o),this.rows.splice(l?h:h+1,0,o)):l?(this.displayRowIterator(function(m){m.unshift(o)}),this.activeRows.unshift(o),this.rows.unshift(o)):(this.displayRowIterator(function(m){m.push(o)}),this.activeRows.push(o),this.rows.push(o)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",o.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),o}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(n=>{this.moveRowInArray(n,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,n){var o,l,h,c;if(t!==i&&(o=e.indexOf(t),o>-1&&(e.splice(o,1),l=e.indexOf(i),l>-1?n?e.splice(l+1,0,t):e.splice(l,0,t):e.splice(o,0,t)),e===this.getDisplayRows())){h=o<l?o:l,c=l>o?l:o+1;for(let f=h;f<=c;f++)e[f]&&this.styleRow(e[f],f)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i!==!1&&i<this.displayRowsCount-1&&(n=this.getDisplayRows()[i+1]),n&&(!(n instanceof $e)||n.type!="row")?this.nextDisplayRow(n,t):n}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i&&(n=this.getDisplayRows()[i-1]),t&&n&&(!(n instanceof $e)||n.type!="row")?this.prevDisplayRow(n,t):n}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],n=this.getRows(e);return n.forEach(function(o){o.type=="row"&&i.push(o.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(n){t.push(n.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var n=this.table,o="",l=0,h=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(l=this.dataPipeline.findIndex(c=>c.handler===e),l>-1)o="dataPipeline",t&&(l==this.dataPipeline.length-1?o="display":l++);else if(l=this.displayPipeline.findIndex(c=>c.handler===e),l>-1)o="displayPipeline",t&&(l==this.displayPipeline.length-1?o="end":l++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else o=e||"all",l=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&l<this.redrawBlockRestoreConfig.index||h.indexOf(o)<h.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:o,index:l});return}else ve.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,o,l,i)):(this.refreshPipelines(e,o,l,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,o,l,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,n){switch(this.dispatch("data-refreshing"),e||(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let o=i;o<this.dataPipeline.length;o++){let l=this.dataPipeline[o].handler(this.activeRowsPipeline[o].slice(0));this.activeRowsPipeline[o+1]=l||this.activeRowsPipeline[o].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let o=i;o<this.displayPipeline.length;o++){let l=this.displayPipeline[o].handler((o?this.getDisplayRows(o-1):this.activeRows).slice(0),n);this.setDisplayRows(l||this.getDisplayRows(o-1).slice(0),o)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Gg,basic:$g};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach(function(e){e.normalizeHeight()})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let n=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const o="calc(100% - "+n+"px)";this.element.style.minHeight=t||"calc(100% - "+n+"px)",this.element.style.height=o,this.element.style.maxHeight=o}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-n+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){const t=this.adjustTableSize();this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(t&&this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class jg extends Ke{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class Kg extends Ke{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),n={row:["cell"],cell:["row"]};i=i.filter(o=>{var l=n[e];return o!==e&&(!l||l&&!l.includes(o))}),i.forEach(o=>{var l=this.pseudoTrackers[o].target;this.pseudoTrackers[o].target&&(this.dispatch(o+"-mouseleave",t,l),this.pseudoTrackers[o].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let n of e){let o=i+"-"+n;this.subscriptionChange(o,this.subscriptionChanged.bind(this,i,n))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var n=this.listeners[t].components,o=n.indexOf(e),l=!1;i?o===-1&&(n.push(e),l=!0):this.subscribed(e+"-"+t)||o>-1&&(n.splice(o,1),l=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),l&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,n=this.findTargets(i);n=this.bindComponents(e,n),this.triggerEvents(e,t,n),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(n).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let n of e){let o=n.classList?[...n.classList]:[];if(o.filter(c=>this.abortClasses.includes(c)).length)break;let h=o.filter(c=>i.includes(c));for(let c of h)t[this.componentMap[c]]||(t[this.componentMap[c]]=n)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),n=this.listeners[e],o={},l={};for(let h of i){let c,f=t[h],m=this.previousTargets[h];if(m&&m.target===f)c=m.component;else switch(h){case"row":case"group":(n.components.includes("row")||n.components.includes("cell")||n.components.includes("group"))&&(c=this.table.rowManager.getVisibleRows(!0).find(v=>v.getElement()===f),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[h]=!1));break;case"column":n.components.includes("column")&&(c=this.table.columnManager.findColumn(f));break;case"cell":n.components.includes("cell")&&(o.row instanceof $e?c=o.row.findCell(f):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}c&&(o[h]=c,l[h]={target:f,component:c})}return this.previousTargets=l,o}triggerEvents(e,t,i){var n=this.listeners[e];for(let o in i)i[o]&&n.components.includes(o)&&this.dispatch(o+"-"+e,t,i[o])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class qg{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class Yg extends Ke{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,n,o,l){var h=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,o])){this.loading=!0,o||this.alertLoader(),t=this.chain("data-params",[e,i,o],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var c=this.chain("data-load",[e,t,i,o],!1,Promise.resolve([]));return c.then(f=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(f)&&typeof f=="object"&&(f=this.mapParams(f,this.objectInvert(this.table.options.dataReceiveParams)));var m=this.chain("data-loaded",f,null,f);h==this.requestOrder?(this.clearAlert(),m!==!1&&(this.dispatchExternal("dataLoaded",m),this.table.rowManager.setData(m,n,typeof l>"u"?!n:l))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(f=>{console.error("Data Load Error: ",f),this.dispatchExternal("dataLoadError",f),o||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,n,typeof l>"u"?!n:l),Promise.resolve()}mapParams(e,t){var i={};for(let n in e)i[t.hasOwnProperty(n)?t[n]:n]=e[n];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class Xg{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(n=>n===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((n,o)=>{let l=n.apply(this.table,e);o||(i=l)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Jg{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((n,o)=>n.priority-o.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(n=>n.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,n){var o=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((l,h)=>{o=l.callback.apply(this,t.concat([o]))}),o):typeof n=="function"?n():n}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((n,o)=>{n.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class Zg extends Ke{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t){var i="";return typeof this.options(e)<"u"?(i="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(i=i+", Please use the %c"+t+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class it{static register(e){it.tables.push(e)}static deregister(e){var t=it.tables.indexOf(e);t>-1&&it.tables.splice(t,1)}static lookupTable(e,t){var i=[],n,o;if(typeof e=="string"){if(n=document.querySelectorAll(e),n.length)for(var l=0;l<n.length;l++)o=it.matchElement(n[l]),o&&i.push(o)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof mi?(o=it.matchElement(e),o&&i.push(o)):Array.isArray(e)?e.forEach(function(h){i=i.concat(it.lookupTable(h))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i}static matchElement(e){return it.tables.find(function(t){return e instanceof mi?t===e:t.element===e})}}it.tables=[];function Qg(s,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(s),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function nu(s,e){s.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function eb(s,e){var t=0,i=this.table.rowManager.element.clientWidth,n=0,o=!1;s.forEach((l,h)=>{l.widthFixed||l.reinitializeWidth(),(this.table.options.responsiveLayout?l.modules.responsive.visible:l.visible)&&(o=l),l.visible&&(t+=l.getWidth())}),o?(n=i-t+o.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(o.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?o.setWidth(n):o.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function tb(s,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,n=0,o=0,l=0,h=[],c=[],f=0,m=0,b=0;function v(x){var R;return typeof x=="string"?x.indexOf("%")>-1?R=t/100*parseInt(x):R=parseInt(x):R=x,R}function C(x,R,L,k){var H=[],P=0,z=0,V=0,Z=o,N=0,W=0,le=[];function Ee($){return L*($.column.definition.widthGrow||1)}function de($){return v($.width)-L*($.column.definition.widthShrink||0)}return x.forEach(function($,Q){var se=k?de($):Ee($);$.column.minWidth>=se?H.push($):$.column.maxWidth&&$.column.maxWidth<se?($.width=$.column.maxWidth,R-=$.column.maxWidth,Z-=k?$.column.definition.widthShrink||1:$.column.definition.widthGrow||1,Z&&(L=Math.floor(R/Z))):(le.push($),W+=k?$.column.definition.widthShrink||1:$.column.definition.widthGrow||1)}),H.length?(H.forEach(function($){P+=k?$.width-$.column.minWidth:$.column.minWidth,$.width=$.column.minWidth}),z=R-P,V=W?Math.floor(z/W):z,N=C(le,z,V,k)):(N=W?R-Math.floor(R/W)*W:R,le.forEach(function($){$.width=k?de($):Ee($)})),N}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),s.forEach(function(x){var R,L,k;x.visible&&(R=x.definition.width,L=parseInt(x.minWidth),R?(k=v(R),i+=k>L?k:L,x.definition.widthShrink&&(c.push({column:x,width:k>L?k:L}),f+=x.definition.widthShrink)):(h.push({column:x,width:0}),o+=x.definition.widthGrow||1))}),n=t-i,l=Math.floor(n/o),b=C(h,n,l,!1),h.length&&b>0&&(h[h.length-1].width+=b),h.forEach(function(x){n-=x.width}),m=Math.abs(b)+n,m>0&&f&&(b=C(c,m,Math.floor(m/f),!0)),b&&c.length&&(c[c.length-1].width-=b),h.forEach(function(x){x.column.setWidth(x.width)}),c.forEach(function(x){x.column.setWidth(x.width)})}var ib={fitData:Qg,fitDataFill:nu,fitDataTable:nu,fitDataStretch:eb,fitColumns:tb};class zi extends ie{constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;zi.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)}getMode(){return this.mode}layout(e){this.dispatch("layout-refreshing"),zi.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}zi.moduleName="layout",zi.modes=ib;var nb={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class wn extends ie{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=ve.deepClone(wn.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,n){for(var o in i)typeof i[o]=="object"?(n[o]||(n[o]={}),t(i[o],n[o])):n[o]=i[o]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=ve.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,n=i.split("|"),o=this._getLangElement(n,this.locale);return o||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(n){var o;i&&(o=i[n],typeof o<"u"?i=o:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}wn.moduleName="localize",wn.langs=nb;class ru extends ie{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=it.lookupTable(e),i.forEach(n=>{this.table!==n&&t.push(n)}),t}send(e,t,i,n){var o=this.getConnections(e);o.forEach(l=>{l.tableComms(this.table.element,t,i,n)}),!o.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,n){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,n);console.warn("Inter-table Comms Error - no such module:",t)}}ru.moduleName="comms";var rb=Object.freeze({__proto__:null,LayoutModule:zi,LocalizeModule:wn,CommsModule:ru});class su{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,rb,!0),t&&this.bindModules(e,t)}bindStaticFunctionality(e){e.moduleBindings={},e.extendModule=function(t,i,n){if(e.moduleBindings[t]){var o=e.moduleBindings[t][i];if(o)if(typeof n=="object")for(let l in n)o[l]=n[l];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",i)}else console.warn("Module Error - module does not exist:",t)},e.registerModule=function(t){Array.isArray(t)||(t=[t]),t.forEach(i=>{e.registerModuleBinding(i)})},e.registerModuleBinding=function(t){e.moduleBindings[t.moduleName]=t},e.findTable=function(t){var i=it.lookupTable(t,!0);return Array.isArray(i)&&!i.length?!1:i},e.prototype.bindModules=function(){var t=[],i=[],n=[];this.modules={};for(var o in e.moduleBindings){let l=e.moduleBindings[o],h=new l(this);this.modules[o]=h,l.prototype.moduleCore?this.modulesCore.push(h):l.moduleInitOrder?l.moduleInitOrder<0?t.push(h):i.push(h):n.push(h)}t.sort((l,h)=>l.moduleInitOrder>h.moduleInitOrder?1:-1),i.sort((l,h)=>l.moduleInitOrder>h.moduleInitOrder?1:-1),this.modulesRegular=t.concat(n.concat(i))}}bindModules(e,t,i){var n=Object.values(t);i&&n.forEach(o=>{o.prototype.moduleCore=!0}),e.registerModule(n)}}class sb extends Ke{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class mi{constructor(e,t){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new qg(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Zg(this),this.optionsList=new iu(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),it.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Wg(this),this.rowManager=new Ug(this),this.footerManager=new jg(this),this.dataLoader=new Yg(this),this.alertManager=new sb(this),this.bindModules(),this.options=this.optionsList.generate(mi.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Xg(this,this.options,this.options.debugEventsExternal),this.eventBus=new Jg(this.options.debugEventsInternal),this.interactionMonitor=new Kg(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var n=e.attributes;for(var o in n)typeof n[o]=="object"&&i.setAttribute(n[o].name,n[o].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){this.dataLoader.load(this.options.data)}destroy(){var e=this.element;for(this.destroyed=!0,it.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,n;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
|
47
|
+
`),n=i[0]=="Error"?i[2]:i[1],n[0]==" "?e=n.trim().split(" ")[1].split(".")[1]:e=n.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,n)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(o=>{var l=this.rowManager.findRow(o[this.options.index]);l?(t++,l.updateData(o).then(()=>{t--,t||i()}).catch(h=>{n("Update Error - Unable to update row",o,h)})):n("Update Error - Unable to find row",o)}):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((n,o)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(l=>{var h=[];l.forEach(function(c){h.push(c.getComponent())}),n(h)}):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((n,o)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(l=>{var h=this.rowManager.findRow(l[this.options.index]);i++,h?h.updateData(l).then(()=>{i--,t.push(h.getComponent()),i||n(t)}):this.rowManager.addRows(l).then(c=>{i--,t.push(c[0].getComponent()),i||n(t)})}):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let n=this.rowManager.findRow(i,!0);if(n)t.push(n);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,n)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(n)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(n=>n[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(n=>n[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var n=this.rowManager.findRow(e);return n?this.rowManager.scrollToRow(n,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var n=this.rowManager.findRow(e);this.initGuard(),n?n.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var n=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,n).then(o=>o.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var n=this.columnManager.findColumn(e),o=this.columnManager.findColumn(t);this.initGuard(),n?o?this.columnManager.moveColumn(n,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((n,o)=>{var l=this.columnManager.findColumn(e);return l?this.columnManager.scrollToColumn(l,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}mi.defaultOptions=Ig,new su(mi);class ou extends mi{}new su(ou,Ng);const ob=[d.createElementVNode("svg",{class:"h-4 w-4 fill-muted-600 dark:fill-muted-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[d.createElementVNode("path",{d:"M177.7 32h92.5c5.5 0 10.6 2.8 13.6 7.5L299.1 64H148.9l15.3-24.5c2.9-4.7 8.1-7.5 13.6-7.5zM336.9 64L311 22.6C302.2 8.5 286.8 0 270.3 0H177.7C161.2 0 145.8 8.5 137 22.6L111.1 64H64.1 32 16C7.2 64 0 71.2 0 80s7.2 16 16 16H34.3L59.8 452.6C62.1 486.1 90 512 123.6 512H324.4c33.6 0 61.4-25.9 63.8-59.4L413.7 96H432c8.8 0 16-7.2 16-16s-7.2-16-16-16H416 383.9 336.9zm44.8 32L356.3 450.3C355.1 467 341.2 480 324.4 480H123.6c-16.8 0-30.7-13-31.9-29.7L66.4 96H381.6z"})],-1)],ab=[d.createElementVNode("svg",{class:"h-4 w-4 fill-muted-600 dark:fill-muted-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M454.6 45.3l12.1 12.1c12.5 12.5 12.5 32.8 0 45.3L440 129.4 382.6 72l26.7-26.7c12.5-12.5 32.8-12.5 45.3 0zM189 265.6l171-171L417.4 152l-171 171c-4.2 4.2-9.6 7.2-15.4 8.6l-65.6 15.1L180.5 281c1.3-5.8 4.3-11.2 8.6-15.4zm197.7-243L166.4 243c-8.5 8.5-14.4 19.2-17.1 30.9l-20.9 90.6c-1.2 5.4 .4 11 4.3 14.9s9.5 5.5 14.9 4.3l90.6-20.9c11.7-2.7 22.4-8.6 30.9-17.1L489.4 125.3c25-25 25-65.5 0-90.5L477.3 22.6c-25-25-65.5-25-90.5 0zM80 64C35.8 64 0 99.8 0 144V432c0 44.2 35.8 80 80 80H368c44.2 0 80-35.8 80-80V304c0-8.8-7.2-16-16-16s-16 7.2-16 16V432c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48H208c8.8 0 16-7.2 16-16s-7.2-16-16-16H80z"})],-1)],lb={__name:"ActionButton",props:{data:{},index:{}},setup(s){const e=s;return(t,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:i[0]||(i[0]=n=>d.unref(tt.emitter).event("deleteBtn",e.data)),class:"mx-2 inline-flex items-center justify-center w-5 h-5 rounded-full text-gray-500 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"},ob),d.createElementVNode("button",{onClick:i[1]||(i[1]=n=>d.unref(tt.emitter).event("editBtn",e.data)),class:"mx-2 inline-flex items-center justify-center w-5 h-5 rounded-full text-gray-500 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"},ab)],64))}},au={__name:"SelectColumn",props:{data:{default:()=>({})},index:{default:-1},all:{default:!1}},setup(s){const e=s,t=d.ref(!1);tt.emitter.listen("toggle.select.all",n=>{e.all||(t.value=n,tt.emitter.event("toggle.select",e.data.id))});function i(n){if(e.all)return tt.emitter.event("toggle.select.all",t.value);tt.emitter.event("toggle.select",e.data.id)}return(n,o)=>d.withDirectives((d.openBlock(),d.createElementBlock("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>t.value=l),class:"rounded",type:"checkbox",onChange:i,style:{border:"1px dashed rgba(0, 0, 0, 0.2)"}},null,544)),[[d.vModelCheckbox,t.value]])}};let hr;const ub=({element:s,headers:e,options:t}={element:null,headers:[],options:{}})=>(hr=new ou(s,{pagination:!1,paginationMode:"remote",layout:"fitDataStretch",resizableColumnFit:!0,paginationSize:5,paginationInitialPage:1,paginationSizeSelector:[3,6,8,10],paginationCounter:"rows",ajaxLoaderLoading:"<div style='display:inline-block; border:4px solid #333; border-radius:10px; background:#fff; font-weight:bold; font-size:16px; color:#000; padding:10px 20px;'>Loading Data</div>",columns:lu(e),...t}),hr);function lu(s){const e={_select_:{formatter:cb,formatterParams:{component:au},titleFormatter:db},_actions_:{formatter:hb,formatterParams:{component:lb}}};return s.map(t=>t.field in e?{...t,...e[t.field]}:t).map(t=>({...t,headerSort:!1}))}function hb(s,e){const t=s.getRow().getData(),i=s.getRow().getPosition(),n=document.createElement("div"),o=e.component;return d.createApp(o,{data:t,index:i}).mount(n),n}function cb(s,e){const t=s.getRow().getData(),i=s.getRow().getPosition(),n=document.createElement("div"),o=e.component;return d.createApp(o,{data:t,index:i}).mount(n),n}function db(){const s=document.createElement("div");return d.createApp(au,{all:!0}).mount(s),s}function uu(s){hr.setData(s)}function fb(s){hr.setColumns(s)}const pb={up:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMjEyLjcgMTQ4LjdjNi4yLTYuMiAxNi40LTYuMiAyMi42IDBsMTYwIDE2MGM2LjIgNi4yIDYuMiAxNi40IDAgMjIuNnMtMTYuNCA2LjItMjIuNiAwTDIyNCAxODIuNiA3NS4zIDMzMS4zYy02LjIgNi4yLTE2LjQgNi4yLTIyLjYgMHMtNi4yLTE2LjQgMC0yMi42bDE2MC0xNjB6Ii8+PC9zdmc+",down:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMjEyLjcgMzMxLjNjNi4yIDYuMiAxNi40IDYuMiAyMi42IDBsMTYwLTE2MGM2LjItNi4yIDYuMi0xNi40IDAtMjIuNnMtMTYuNC02LjItMjIuNiAwTDIyNCAyOTcuNCA3NS4zIDE0OC43Yy02LjItNi4yLTE2LjQtNi4yLTIyLjYgMHMtNi4yIDE2LjQgMCAyMi42bDE2MCAxNjB6Ii8+PC9zdmc+"},hu=(s="up")=>{const e=document.createElement("img");return e.src=pb[s],e.style.width="10px",e.style.height="10px",e.style.marginLeft="5px",e},cu=(s,e)=>{s._column.titleHolderElement.style.display="flex",s._column.titleHolderElement.style.alignItems="center",s._column.titleHolderElement.appendChild(e)},du=s=>{s._column.titleHolderElement.lastChild.remove()};function mb(s,e){let t=[];e.on("headerClick",(i,n)=>{const o=n.getField();if(!["_index_","_select_","_actions_"].includes(o)){if(t.includes(o+":asc")){let l=t.indexOf(o+":asc");t[l]=o+":desc",du(n),cu(n,hu("down"))}else if(t.includes(o+":desc")){let l=t.indexOf(o+":desc");t.splice(l,1),du(n)}else cu(n,hu()),t.push(o+":asc");s.sorts=t,s.loadItems()}}),d.watch(()=>s.mainItems,i=>{uu(i)},{immediate:!0}),d.watch(()=>s.flatFields,()=>{fb(lu(s.headers))},{deep:!0}),d.watch(()=>s.loadings.mainLoading,i=>{i&&uu([])},{deep:!0})}const g2="",yn=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},fu=s=>(d.pushScopeId("data-v-86bb6d78"),s=s(),d.popScopeId(),s),gb={key:0,id:"paginate"},bb={class:"flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4"},vb={class:"lg:w-5/5 w-full flex items-center justify-between border-t border-gray-200"},wb={class:"sm:flex hidden"},yb=[fu(()=>d.createElementVNode("svg",{class:"rtl:rotate-180 w-[10px] fill-muted-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[d.createElementVNode("path",{d:"M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z"})],-1))],Cb=["onClick"],Eb={key:1,class:"text-sm font-medium leading-none text-gray-600 pt-3 mr-4 px-2"},xb=[fu(()=>d.createElementVNode("svg",{class:"ltr:rotate-180 w-[10px] fill-muted-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[d.createElementVNode("path",{d:"M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z"})],-1))],_b=yn({__name:"MTablePagination",setup(s){const e=d.inject("store");function t(h){e.paginate(h)}function i(){e.mainPagination.currentPage>1&&t(e.mainPagination.currentPage-1)}function n(h){t(h)}function o(){e.mainPagination.currentPage<e.mainPagination.lastPage&&t(e.mainPagination.currentPage+1)}function l(){let h=[];if(e.mainPagination.lastPage>10){let c=e.mainPagination.currentPage,f=c-1,m=c+1;c!=1&&h.push(1),c!=1&&c!=2&&f!=2&&h.push("..."),f>1&&h.push(f),h.push(c),m<e.mainPagination.lastPage&&h.push(m),c!=e.mainPagination.lastPage&&c!=e.mainPagination.lastPage-1&&m!=e.mainPagination.lastPage-1&&h.push("..."),e.mainPagination.lastPage!=c&&h.push(e.mainPagination.lastPage)}else h=e.mainPagination.lastPage;return h}return(h,c)=>d.unref(e).mainPagination.lastPage?(d.openBlock(),d.createElementBlock("div",gb,[d.createElementVNode("div",bb,[d.createElementVNode("div",vb,[d.createElementVNode("div",wb,[d.createElementVNode("div",{onClick:i,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},yb),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(l(),f=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:f},[typeof f=="number"?(d.openBlock(),d.createElementBlock("p",{key:0,class:d.normalizeClass(d.unref(e).mainPagination.currentPage===f?"text-sm font-medium leading-none cursor-pointer text-indigo-700 !border-indigo-400 border-t-[1px] pt-3 mr-4 px-2":"text-sm font-medium leading-none cursor-pointer text-gray-600 hover:text-indigo-700 border-t-[1px] border-transparent hover:border-indigo-400 pt-3 mr-4 px-2"),onClick:m=>n(f)},d.toDisplayString(f),11,Cb)):(d.openBlock(),d.createElementBlock("p",Eb,d.toDisplayString(f),1))],64))),128)),d.createElementVNode("div",{onClick:o,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},xb)])])])])):d.createCommentVNode("",!0)}},[["__scopeId","data-v-86bb6d78"]]),Rb={key:0,class:"mt-[-20px]"},Tb={class:"flex animate-pulse flex-row items-center h-full justify-center"},Sb={class:"w-full flex flex-row items-start rtl:mr-8 ltr:ml-8"},kb={key:1,class:"padding: 100px; mt-[-20px] rounded-b-xl bg-white text-center p-[100px] dark:bg-muted-800"},Mb={class:"dark:text-muted-200 text-muted-600"},Lb={__name:"MTable",setup(s){const e=d.ref(null),t=d.inject("store"),i=d.inject("dir"),n=d.computed(()=>t.mainItems.length===0&&!t.loadings.mainLoading);return d.onMounted(()=>{const o=ub({options:{textDirection:i},element:e.value,headers:t.headers});mb(t,o)}),(o,l)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{ref_key:"table",ref:e,class:"mt-2"},null,512),d.unref(t).loadings.mainLoading?(d.openBlock(),d.createElementBlock("div",Rb,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(10,h=>d.createElementVNode("div",{key:h,class:d.normalizeClass([{"border-t-0":h===1,"border-b-0":h===10,"bg-muted-50 dark:bg-muted-700":h%2!==0,"bg-white dark:bg-muted-800":h%2===0},"w-full py-4 mx-auto border-b-1"])},[d.createElementVNode("div",Tb,[d.createElementVNode("div",Sb,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(9,c=>d.createElementVNode("div",{key:c,class:"mx-1 w-[10%] bg-muted-300 dark:bg-muted-900 h-2.5 rounded-md"})),64))])])],2)),64))])):d.createCommentVNode("",!0),n.value?(d.openBlock(),d.createElementBlock("div",kb,[d.createElementVNode("h2",Mb,d.toDisplayString(o.$fcTr("not_load_or_existing_data")),1)])):d.createCommentVNode("",!0),d.createVNode(_b)],64))}},Db={class:"w-full"},Ab={__name:"MList",setup(s){const e=d.inject("store");tt.emitter.listen("toggle.select",i=>{if(e.selected.has(i))return e.selected.delete(i);e.selected.add(i)});function t(){return{}}return(i,n)=>(d.openBlock(),d.createElementBlock("div",Db,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(Lb),d.normalizeProps(d.guardReactiveProps(t())),null,16))]))}},y2="",C2="";function cr(s,e){let t;function i(){t=d.effectScope(),t.run(()=>e.length?e(()=>{t==null||t.stop(),i()}):e())}d.watch(s,n=>{n&&!t?i():n||(t==null||t.stop(),t=void 0)},{immediate:!0}),d.onScopeDispose(()=>{t==null||t.stop()})}function Zs(s,e){return{x:s.x+e.x,y:s.y+e.y}}function Fb(s,e){return{x:s.x-e.x,y:s.y-e.y}}function pu(s,e){if(s.side==="top"||s.side==="bottom"){const{side:t,align:i}=s,n=i==="left"?0:i==="center"?e.width/2:i==="right"?e.width:i,o=t==="top"?0:t==="bottom"?e.height:t;return Zs({x:n,y:o},e)}else if(s.side==="left"||s.side==="right"){const{side:t,align:i}=s,n=t==="left"?0:t==="right"?e.width:t,o=i==="top"?0:i==="center"?e.height/2:i==="bottom"?e.height:i;return Zs({x:n,y:o},e)}return Zs({x:e.width/2,y:e.height/2},e)}const Re=typeof window<"u",Pb=Re&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function Ob(s,e,t){const i=e.length-1;if(i<0)return s===void 0?t:s;for(let n=0;n<i;n++){if(s==null)return t;s=s[e[n]]}return s==null||s[e[i]]===void 0?t:s[e[i]]}function mu(s,e,t){return s==null||!e||typeof e!="string"?t:s[e]!==void 0?s[e]:(e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,""),Ob(s,e.split("."),t))}function gu(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:s},(t,i)=>e+i)}function Ie(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(s==null||s===""))return isNaN(+s)?String(s):isFinite(+s)?`${Number(s)}${e}`:void 0}function bu(s){return s!==null&&typeof s=="object"&&!Array.isArray(s)}function Hb(s){return s&&"$el"in s?s.$el:s}function Qs(s,e){return e.every(t=>s.hasOwnProperty(t))}function zb(s,e,t){const i=Object.create(null),n=Object.create(null);for(const o in s)e.some(l=>l instanceof RegExp?l.test(o):l===o)&&!(t!=null&&t.some(l=>l===o))?i[o]=s[o]:n[o]=s[o];return[i,n]}function vu(s,e){const t={...s};return e.forEach(i=>delete t[i]),t}const Nb=/^on[^a-z]/,wu=s=>Nb.test(s);function eo(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(e,Math.min(t,s))}function yu(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return s+t.repeat(Math.max(0,e-s.length))}function Ib(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let i=0;for(;i<s.length;)t.push(s.substr(i,e)),i+=e;return t}function ht(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const i={};for(const n in s)i[n]=s[n];for(const n in e){const o=s[n],l=e[n];if(bu(o)&&bu(l)){i[n]=ht(o,l,t);continue}if(Array.isArray(o)&&Array.isArray(l)&&t){i[n]=t(o,l);continue}i[n]=l}return i}function Ni(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ni.cache.has(s))return Ni.cache.get(s);const e=s.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ni.cache.set(s,e),e}Ni.cache=new Map;function Cu(s){const e=d.reactive({}),t=d.computed(s);return d.watchEffect(()=>{for(const i in t.value)e[i]=t.value[i]},{flush:"sync"}),d.toRefs(e)}function to(s,e){return s.includes(e)}function Eu(s){return s[2].toLowerCase()+s.slice(3)}function io(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const t=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(i=>`${i}${e?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...s.querySelectorAll(t)]}function xu(s,e,t){let i,n=s.indexOf(document.activeElement);const o=e==="next"?1:-1;do n+=o,i=s[n];while((!i||i.offsetParent==null||!((t==null?void 0:t(i))??!0))&&n<s.length&&n>=0);return i}function no(s,e){var i,n,o,l;const t=io(s);if(!e)(s===document.activeElement||!s.contains(document.activeElement))&&((i=t[0])==null||i.focus());else if(e==="first")(n=t[0])==null||n.focus();else if(e==="last")(o=t.at(-1))==null||o.focus();else if(typeof e=="number")(l=t[e])==null||l.focus();else{const h=xu(t,e);h?h.focus():no(s,e==="next"?"first":"last")}}function Bb(s,e){if(!(Re&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${e})`)))return null;try{return!!s&&s.matches(e)}catch{return null}}const _u=["top","bottom"],Vb=["start","end","left","right"];function Ru(s,e){let[t,i]=s.split(" ");return i||(i=to(_u,t)?"start":to(Vb,t)?"top":"center"),{side:Tu(t,e),align:Tu(i,e)}}function Tu(s,e){return s==="start"?e?"right":"left":s==="end"?e?"left":"right":s}function ro(s){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[s.side],align:s.align}}function so(s){return{side:s.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[s.align]}}function Su(s){return{side:s.align,align:s.side}}function ku(s){return to(_u,s.side)?"y":"x"}class Ii{constructor(e){let{x:t,y:i,width:n,height:o}=e;this.x=t,this.y=i,this.width=n,this.height=o}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function Mu(s,e){return{x:{before:Math.max(0,e.left-s.left),after:Math.max(0,s.right-e.right)},y:{before:Math.max(0,e.top-s.top),after:Math.max(0,s.bottom-e.bottom)}}}function Lu(s){const e=s.getBoundingClientRect(),t=getComputedStyle(s),i=t.transform;if(i){let n,o,l,h,c;if(i.startsWith("matrix3d("))n=i.slice(9,-1).split(/, /),o=+n[0],l=+n[5],h=+n[12],c=+n[13];else if(i.startsWith("matrix("))n=i.slice(7,-1).split(/, /),o=+n[0],l=+n[3],h=+n[4],c=+n[5];else return new Ii(e);const f=t.transformOrigin,m=e.x-h-(1-o)*parseFloat(f),b=e.y-c-(1-l)*parseFloat(f.slice(f.indexOf(" ")+1)),v=o?e.width/o:s.offsetWidth+1,C=l?e.height/l:s.offsetHeight+1;return new Ii({x:m,y:b,width:v,height:C})}else return new Ii(e)}function Cn(s,e,t){if(typeof s.animate>"u")return{finished:Promise.resolve()};let i;try{i=s.animate(e,t)}catch{return{finished:Promise.resolve()}}return typeof i.finished>"u"&&(i.finished=new Promise(n=>{i.onfinish=()=>{n(i)}})),i}const dr=new WeakMap;function Wb(s,e){Object.keys(e).forEach(t=>{if(wu(t)){const i=Eu(t),n=dr.get(s);if(e[t]==null)n==null||n.forEach(o=>{const[l,h]=o;l===i&&(s.removeEventListener(i,h),n.delete(o))});else if(!n||![...n].some(o=>o[0]===i&&o[1]===e[t])){s.addEventListener(i,e[t]);const o=n||new Set;o.add([i,e[t]]),dr.has(s)||dr.set(s,o)}}else e[t]==null?s.removeAttribute(t):s.setAttribute(t,e[t])})}function $b(s,e){Object.keys(e).forEach(t=>{if(wu(t)){const i=Eu(t),n=dr.get(s);n==null||n.forEach(o=>{const[l,h]=o;l===i&&(s.removeEventListener(i,h),n.delete(o))})}else s.removeAttribute(t)})}const Bi=2.4,Du=.2126729,Au=.7151522,Fu=.072175,Gb=.55,Ub=.58,jb=.57,Kb=.62,fr=.03,Pu=1.45,qb=5e-4,Yb=1.25,Xb=1.25,Ou=.078,Hu=12.82051282051282,pr=.06,zu=.001;function Nu(s,e){const t=(s.r/255)**Bi,i=(s.g/255)**Bi,n=(s.b/255)**Bi,o=(e.r/255)**Bi,l=(e.g/255)**Bi,h=(e.b/255)**Bi;let c=t*Du+i*Au+n*Fu,f=o*Du+l*Au+h*Fu;if(c<=fr&&(c+=(fr-c)**Pu),f<=fr&&(f+=(fr-f)**Pu),Math.abs(f-c)<qb)return 0;let m;if(f>c){const b=(f**Gb-c**Ub)*Yb;m=b<zu?0:b<Ou?b-b*Hu*pr:b-pr}else{const b=(f**Kb-c**jb)*Xb;m=b>-zu?0:b>-Ou?b-b*Hu*pr:b+pr}return m*100}function En(s){d.warn(`Vuetify: ${s}`)}function oo(s){d.warn(`Vuetify error: ${s}`)}const mr=.20689655172413793,Jb=s=>s>mr**3?Math.cbrt(s):s/(3*mr**2)+4/29,Zb=s=>s>mr?s**3:3*mr**2*(s-4/29);function Iu(s){const e=Jb,t=e(s[1]);return[116*t-16,500*(e(s[0]/.95047)-t),200*(t-e(s[2]/1.08883))]}function Bu(s){const e=Zb,t=(s[0]+16)/116;return[e(t+s[1]/500)*.95047,e(t),e(t-s[2]/200)*1.08883]}const Qb=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],ev=s=>s<=.0031308?s*12.92:1.055*s**(1/2.4)-.055,tv=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],iv=s=>s<=.04045?s/12.92:((s+.055)/1.055)**2.4;function Vu(s){const e=Array(3),t=ev,i=Qb;for(let n=0;n<3;++n)e[n]=Math.round(eo(t(i[n][0]*s[0]+i[n][1]*s[1]+i[n][2]*s[2]))*255);return{r:e[0],g:e[1],b:e[2]}}function ao(s){let{r:e,g:t,b:i}=s;const n=[0,0,0],o=iv,l=tv;e=o(e/255),t=o(t/255),i=o(i/255);for(let h=0;h<3;++h)n[h]=l[h][0]*e+l[h][1]*t+l[h][2]*i;return n}function Wu(s){return!!s&&/^(#|var\(--|(rgb|hsl)a?\()/.test(s)}const $u=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,nv={rgb:(s,e,t,i)=>({r:s,g:e,b:t,a:i}),rgba:(s,e,t,i)=>({r:s,g:e,b:t,a:i}),hsl:(s,e,t,i)=>Gu({h:s,s:e,l:t,a:i}),hsla:(s,e,t,i)=>Gu({h:s,s:e,l:t,a:i}),hsv:(s,e,t,i)=>xn({h:s,s:e,v:t,a:i}),hsva:(s,e,t,i)=>xn({h:s,s:e,v:t,a:i})};function Nt(s){if(typeof s=="number")return(isNaN(s)||s<0||s>16777215)&&En(`'${s}' is not a valid hex color`),{r:(s&16711680)>>16,g:(s&65280)>>8,b:s&255};if(typeof s=="string"&&$u.test(s)){const{groups:e}=s.match($u),{fn:t,values:i}=e,n=i.split(/,\s*/).map(o=>o.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(o)/100:parseFloat(o));return nv[t](...n)}else if(typeof s=="string"){let e=s.startsWith("#")?s.slice(1):s;[3,4].includes(e.length)?e=e.split("").map(i=>i+i).join(""):[6,8].includes(e.length)||En(`'${s}' is not a valid hex(a) color`);const t=parseInt(e,16);return(isNaN(t)||t<0||t>4294967295)&&En(`'${s}' is not a valid hex(a) color`),sv(e)}else if(typeof s=="object"){if(Qs(s,["r","g","b"]))return s;if(Qs(s,["h","s","l"]))return xn(Uu(s));if(Qs(s,["h","s","v"]))return xn(s)}throw new TypeError(`Invalid color: ${s==null?s:String(s)||s.constructor.name}
|
48
|
+
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function xn(s){const{h:e,s:t,v:i,a:n}=s,o=h=>{const c=(h+e/60)%6;return i-i*t*Math.max(Math.min(c,4-c,1),0)},l=[o(5),o(3),o(1)].map(h=>Math.round(h*255));return{r:l[0],g:l[1],b:l[2],a:n}}function Gu(s){return xn(Uu(s))}function Uu(s){const{h:e,s:t,l:i,a:n}=s,o=i+t*Math.min(i,1-i),l=o===0?0:2-2*i/o;return{h:e,s:l,v:o,a:n}}function gr(s){const e=Math.round(s).toString(16);return("00".substr(0,2-e.length)+e).toUpperCase()}function rv(s){let{r:e,g:t,b:i,a:n}=s;return`#${[gr(e),gr(t),gr(i),n!==void 0?gr(Math.round(n*255)):""].join("")}`}function sv(s){s=ov(s);let[e,t,i,n]=Ib(s,2).map(o=>parseInt(o,16));return n=n===void 0?n:n/255,{r:e,g:t,b:i,a:n}}function ov(s){return s.startsWith("#")&&(s=s.slice(1)),s=s.replace(/([^0-9a-f])/gi,"F"),(s.length===3||s.length===4)&&(s=s.split("").map(e=>e+e).join("")),s.length!==6&&(s=yu(yu(s,6),8,"F")),s}function av(s,e){const t=Iu(ao(s));return t[0]=t[0]+e*10,Vu(Bu(t))}function lv(s,e){const t=Iu(ao(s));return t[0]=t[0]-e*10,Vu(Bu(t))}function uv(s){const e=Nt(s);return ao(e)[1]}function ju(s){const e=Math.abs(Nu(Nt(0),Nt(s)));return Math.abs(Nu(Nt(16777215),Nt(s)))>Math.min(e,50)?"#fff":"#000"}function Be(s,e){return t=>Object.keys(s).reduce((i,n)=>{const l=typeof s[n]=="object"&&s[n]!=null&&!Array.isArray(s[n])?s[n]:{type:s[n]};return t&&n in t?i[n]={...l,default:t[n]}:i[n]=l,e&&!i[n].source&&(i[n].source=e),i},{})}const hv=Be({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),Vi=Symbol.for("vuetify:defaults");function cv(s){return d.ref(s)}function lo(){const s=d.inject(Vi);if(!s)throw new Error("[Vuetify] Could not find defaults instance");return s}function dv(s,e){const t=lo(),i=d.ref(s),n=d.computed(()=>{if(d.unref(e==null?void 0:e.disabled))return t.value;const l=d.unref(e==null?void 0:e.scoped),h=d.unref(e==null?void 0:e.reset),c=d.unref(e==null?void 0:e.root);if(i.value==null&&!(l||h||c))return t.value;let f=ht(i.value,{prev:t.value});if(l)return f;if(h||c){const m=Number(h||1/0);for(let b=0;b<=m&&!(!f||!("prev"in f));b++)f=f.prev;return f&&typeof c=="string"&&c in f&&(f=ht(ht(f,{prev:f}),f[c])),f}return f.prev?ht(f.prev,f):f});return d.provide(Vi,n),n}function fv(s,e){var t,i;return typeof((t=s.props)==null?void 0:t[e])<"u"||typeof((i=s.props)==null?void 0:i[Ni(e)])<"u"}function pv(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lo();const i=Dt("useDefaults");if(e=e??i.type.name??i.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const n=d.computed(()=>{var c;return(c=t.value)==null?void 0:c[s._as??e]}),o=new Proxy(s,{get(c,f){var b,v,C,x;const m=Reflect.get(c,f);return f==="class"||f==="style"?[(b=n.value)==null?void 0:b[f],m].filter(R=>R!=null):typeof f=="string"&&!fv(i.vnode,f)?((v=n.value)==null?void 0:v[f])??((x=(C=t.value)==null?void 0:C.global)==null?void 0:x[f])??m:m}}),l=d.shallowRef();d.watchEffect(()=>{if(n.value){const c=Object.entries(n.value).filter(f=>{let[m]=f;return m.startsWith(m[0].toUpperCase())});l.value=c.length?Object.fromEntries(c):void 0}else l.value=void 0});function h(){const c=wv(Vi,i);d.provide(Vi,d.computed(()=>l.value?ht((c==null?void 0:c.value)??{},l.value):c==null?void 0:c.value))}return{props:o,provideSubDefaults:h}}function _n(s){if(s._setup=s._setup??s.setup,!s.name)return En("The component is missing an explicit name, unable to generate default prop value"),s;if(s._setup){s.props=Be(s.props??{},s.name)();const e=Object.keys(s.props);s.filterProps=function(i){return zb(i,e,["class","style"])},s.props._as=String,s.setup=function(i,n){const o=lo();if(!o.value)return s._setup(i,n);const{props:l,provideSubDefaults:h}=pv(i,i._as??s.name,o),c=s._setup(l,n);return h(),c}}return s}function Wi(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(s?_n:d.defineComponent)(e)}function Ku(s){if(typeof s.getRootNode!="function"){for(;s.parentNode;)s=s.parentNode;return s!==document?null:document}const e=s.getRootNode();return e!==document&&e.getRootNode({composed:!0})!==document?null:e}const uo="cubic-bezier(0.4, 0, 0.2, 1)",mv="cubic-bezier(0.0, 0, 0.2, 1)",gv="cubic-bezier(0.4, 0, 1, 1)";function Dt(s,e){const t=d.getCurrentInstance();if(!t)throw new Error(`[Vuetify] ${s} ${e||"must be called from inside a setup function"}`);return t}let qu=0,br=new WeakMap;function vr(){const s=Dt("getUid");if(br.has(s))return br.get(s);{const e=qu++;return br.set(s,e),e}}vr.reset=()=>{qu=0,br=new WeakMap};function bv(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;s;){if(e?vv(s):ho(s))return s;s=s.parentElement}return document.scrollingElement}function wr(s,e){const t=[];if(e&&s&&!e.contains(s))return t;for(;s&&(ho(s)&&t.push(s),s!==e);)s=s.parentElement;return t}function ho(s){if(!s||s.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(s);return e.overflowY==="scroll"||e.overflowY==="auto"&&s.scrollHeight>s.clientHeight}function vv(s){if(!s||s.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(s);return["scroll","auto"].includes(e.overflowY)}function wv(s){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dt("injectSelf");const{provides:t}=e;if(t&&s in t)return t[s]}function yv(s){for(;s;){if(window.getComputedStyle(s).position==="fixed")return!0;s=s.offsetParent}return!1}function co(s){const e=Dt("useRender");e.render=s}const Yu={static:xv,connected:Rv},Cv=Be({locationStrategy:{type:[String,Function],default:"static",validator:s=>typeof s=="function"||s in Yu},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function Ev(s,e){const t=d.ref({}),i=d.ref();Re&&(cr(()=>!!(e.isActive.value&&s.locationStrategy),o=>{var l,h;d.watch(()=>s.locationStrategy,o),d.onScopeDispose(()=>{i.value=void 0}),typeof s.locationStrategy=="function"?i.value=(l=s.locationStrategy(e,s,t))==null?void 0:l.updateLocation:i.value=(h=Yu[s.locationStrategy](e,s,t))==null?void 0:h.updateLocation}),window.addEventListener("resize",n,{passive:!0}),d.onScopeDispose(()=>{window.removeEventListener("resize",n),i.value=void 0}));function n(o){var l;(l=i.value)==null||l.call(i,o)}return{contentStyles:t,updateLocation:i}}function xv(){}function _v(s,e){e?s.style.removeProperty("left"):s.style.removeProperty("right");const t=Lu(s);return e?t.x+=parseFloat(s.style.right||0):t.x-=parseFloat(s.style.left||0),t.y-=parseFloat(s.style.top||0),t}function Rv(s,e,t){yv(s.activatorEl.value)&&Object.assign(t.value,{position:"fixed",top:0,[s.isRtl.value?"right":"left"]:0});const{preferredAnchor:n,preferredOrigin:o}=Cu(()=>{const x=Ru(e.location,s.isRtl.value),R=e.origin==="overlap"?x:e.origin==="auto"?ro(x):Ru(e.origin,s.isRtl.value);return x.side===R.side&&x.align===so(R).align?{preferredAnchor:Su(x),preferredOrigin:Su(R)}:{preferredAnchor:x,preferredOrigin:R}}),[l,h,c,f]=["minWidth","minHeight","maxWidth","maxHeight"].map(x=>d.computed(()=>{const R=parseFloat(e[x]);return isNaN(R)?1/0:R})),m=d.computed(()=>{if(Array.isArray(e.offset))return e.offset;if(typeof e.offset=="string"){const x=e.offset.split(" ").map(parseFloat);return x.length<2&&x.push(0),x}return typeof e.offset=="number"?[e.offset,0]:[0,0]});let b=!1;const v=new ResizeObserver(()=>{b&&C()});d.watch([s.activatorEl,s.contentEl],(x,R)=>{let[L,k]=x,[H,P]=R;H&&v.unobserve(H),L&&v.observe(L),P&&v.unobserve(P),k&&v.observe(k)},{immediate:!0}),d.onScopeDispose(()=>{v.disconnect()});function C(){if(b=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>b=!0)}),!s.activatorEl.value||!s.contentEl.value)return;const x=s.activatorEl.value.getBoundingClientRect(),R=_v(s.contentEl.value,s.isRtl.value),L=wr(s.contentEl.value),k=12;L.length||(L.push(document.documentElement),s.contentEl.value.style.top&&s.contentEl.value.style.left||(R.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),R.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const H=L.reduce((de,$)=>{const Q=$.getBoundingClientRect(),se=new Ii({x:$===document.documentElement?0:Q.x,y:$===document.documentElement?0:Q.y,width:$.clientWidth,height:$.clientHeight});return de?new Ii({x:Math.max(de.left,se.left),y:Math.max(de.top,se.top),width:Math.min(de.right,se.right)-Math.max(de.left,se.left),height:Math.min(de.bottom,se.bottom)-Math.max(de.top,se.top)}):se},void 0);H.x+=k,H.y+=k,H.width-=k*2,H.height-=k*2;let P={anchor:n.value,origin:o.value};function z(de){const $=new Ii(R),Q=pu(de.anchor,x),se=pu(de.origin,$);let{x:De,y:Te}=Fb(Q,se);switch(de.anchor.side){case"top":Te-=m.value[0];break;case"bottom":Te+=m.value[0];break;case"left":De-=m.value[0];break;case"right":De+=m.value[0];break}switch(de.anchor.align){case"top":Te-=m.value[1];break;case"bottom":Te+=m.value[1];break;case"left":De-=m.value[1];break;case"right":De+=m.value[1];break}return $.x+=De,$.y+=Te,$.width=Math.min($.width,c.value),$.height=Math.min($.height,f.value),{overflows:Mu($,H),x:De,y:Te}}let V=0,Z=0;const N={x:0,y:0},W={x:!1,y:!1};let le=-1;for(;;){if(le++>10){oo("Infinite loop detected in connectedLocationStrategy");break}const{x:de,y:$,overflows:Q}=z(P);V+=de,Z+=$,R.x+=de,R.y+=$;{const se=ku(P.anchor),De=Q.x.before||Q.x.after,Te=Q.y.before||Q.y.after;let Ye=!1;if(["x","y"].forEach(me=>{if(me==="x"&&De&&!W.x||me==="y"&&Te&&!W.y){const fe={anchor:{...P.anchor},origin:{...P.origin}},Pe=me==="x"?se==="y"?so:ro:se==="y"?ro:so;fe.anchor=Pe(fe.anchor),fe.origin=Pe(fe.origin);const{overflows:Ae}=z(fe);(Ae[me].before<=Q[me].before&&Ae[me].after<=Q[me].after||Ae[me].before+Ae[me].after<(Q[me].before+Q[me].after)/2)&&(P=fe,Ye=W[me]=!0)}}),Ye)continue}Q.x.before&&(V+=Q.x.before,R.x+=Q.x.before),Q.x.after&&(V-=Q.x.after,R.x-=Q.x.after),Q.y.before&&(Z+=Q.y.before,R.y+=Q.y.before),Q.y.after&&(Z-=Q.y.after,R.y-=Q.y.after);{const se=Mu(R,H);N.x=H.width-se.x.before-se.x.after,N.y=H.height-se.y.before-se.y.after,V+=se.x.before,R.x+=se.x.before,Z+=se.y.before,R.y+=se.y.before}break}const Ee=ku(P.anchor);return Object.assign(t.value,{"--v-overlay-anchor-origin":`${P.anchor.side} ${P.anchor.align}`,transformOrigin:`${P.origin.side} ${P.origin.align}`,top:Ie(fo(Z)),left:s.isRtl.value?void 0:Ie(fo(V)),right:s.isRtl.value?Ie(fo(-V)):void 0,minWidth:Ie(Ee==="y"?Math.min(l.value,x.width):l.value),maxWidth:Ie(Xu(eo(N.x,l.value===1/0?0:l.value,c.value))),maxHeight:Ie(Xu(eo(N.y,h.value===1/0?0:h.value,f.value)))}),{available:N,contentBox:R}}return d.watch(()=>[n.value,o.value,e.offset,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight],()=>C()),d.nextTick(()=>{const x=C();if(!x)return;const{available:R,contentBox:L}=x;L.height>R.y&&requestAnimationFrame(()=>{C(),requestAnimationFrame(()=>{C()})})}),{updateLocation:C}}function fo(s){return Math.round(s*devicePixelRatio)/devicePixelRatio}function Xu(s){return Math.ceil(s*devicePixelRatio)/devicePixelRatio}let po=!0;const yr=[];function Tv(s){!po||yr.length?(yr.push(s),mo()):(po=!1,s(),mo())}let Ju=-1;function mo(){cancelAnimationFrame(Ju),Ju=requestAnimationFrame(()=>{const s=yr.shift();s&&s(),yr.length?mo():po=!0})}const Cr={none:null,close:Mv,block:Lv,reposition:Dv},Sv=Be({scrollStrategy:{type:[String,Function],default:"block",validator:s=>typeof s=="function"||s in Cr}},"VOverlay-scroll-strategies");function kv(s,e){if(!Re)return;let t;d.watchEffect(async()=>{t==null||t.stop(),e.isActive.value&&s.scrollStrategy&&(t=d.effectScope(),await d.nextTick(),t.active&&t.run(()=>{var i;typeof s.scrollStrategy=="function"?s.scrollStrategy(e,s,t):(i=Cr[s.scrollStrategy])==null||i.call(Cr,e,s,t)}))}),d.onScopeDispose(()=>{t==null||t.stop()})}function Mv(s){function e(t){s.isActive.value=!1}Zu(s.activatorEl.value??s.contentEl.value,e)}function Lv(s,e){var l;const t=(l=s.root.value)==null?void 0:l.offsetParent,i=[...new Set([...wr(s.activatorEl.value,e.contained?t:void 0),...wr(s.contentEl.value,e.contained?t:void 0)])].filter(h=>!h.classList.contains("v-overlay-scroll-blocked")),n=window.innerWidth-document.documentElement.offsetWidth,o=(h=>ho(h)&&h)(t||document.documentElement);o&&s.root.value.classList.add("v-overlay--scroll-blocked"),i.forEach((h,c)=>{h.style.setProperty("--v-body-scroll-x",Ie(-h.scrollLeft)),h.style.setProperty("--v-body-scroll-y",Ie(-h.scrollTop)),h!==document.documentElement&&h.style.setProperty("--v-scrollbar-offset",Ie(n)),h.classList.add("v-overlay-scroll-blocked")}),d.onScopeDispose(()=>{i.forEach((h,c)=>{const f=parseFloat(h.style.getPropertyValue("--v-body-scroll-x")),m=parseFloat(h.style.getPropertyValue("--v-body-scroll-y"));h.style.removeProperty("--v-body-scroll-x"),h.style.removeProperty("--v-body-scroll-y"),h.style.removeProperty("--v-scrollbar-offset"),h.classList.remove("v-overlay-scroll-blocked"),h.scrollLeft=-f,h.scrollTop=-m}),o&&s.root.value.classList.remove("v-overlay--scroll-blocked")})}function Dv(s,e,t){let i=!1,n=-1,o=-1;function l(h){Tv(()=>{var m,b;const c=performance.now();(b=(m=s.updateLocation).value)==null||b.call(m,h),i=(performance.now()-c)/(1e3/60)>2})}o=(typeof requestIdleCallback>"u"?h=>h():requestIdleCallback)(()=>{t.run(()=>{Zu(s.activatorEl.value??s.contentEl.value,h=>{i?(cancelAnimationFrame(n),n=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{l(h)})})):l(h)})})}),d.onScopeDispose(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(o),cancelAnimationFrame(n)})}function Zu(s,e){const t=[document,...wr(s)];t.forEach(i=>{i.addEventListener("scroll",e,{passive:!0})}),d.onScopeDispose(()=>{t.forEach(i=>{i.removeEventListener("scroll",e)})})}const go=Symbol.for("vuetify:v-menu"),Av=Be({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function Fv(s,e){const t={},i=n=>()=>{if(!Re)return Promise.resolve(!0);const o=n==="openDelay";return t.closeDelay&&window.clearTimeout(t.closeDelay),delete t.closeDelay,t.openDelay&&window.clearTimeout(t.openDelay),delete t.openDelay,new Promise(l=>{const h=parseInt(s[n]??0,10);t[n]=window.setTimeout(()=>{e==null||e(o),l(o)},h)})};return{runCloseDelay:i("closeDelay"),runOpenDelay:i("openDelay")}}const Pv=Be({activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...Av()},"VOverlay-activator");function Ov(s,e){let{isActive:t,isTop:i}=e;const n=d.ref();let o=!1,l=!1,h=!0;const c=d.computed(()=>s.openOnFocus||s.openOnFocus==null&&s.openOnHover),f=d.computed(()=>s.openOnClick||s.openOnClick==null&&!s.openOnHover&&!c.value),{runOpenDelay:m,runCloseDelay:b}=Fv(s,P=>{P===(s.openOnHover&&o||c.value&&l)&&!(s.openOnHover&&t.value&&!i.value)&&(t.value!==P&&(h=!0),t.value=P)}),v={onClick:P=>{P.stopPropagation(),n.value=P.currentTarget||P.target,t.value=!t.value},onMouseenter:P=>{var z;(z=P.sourceCapabilities)!=null&&z.firesTouchEvents||(o=!0,n.value=P.currentTarget||P.target,m())},onMouseleave:P=>{o=!1,b()},onFocus:P=>{Bb(P.target,":focus-visible")!==!1&&(l=!0,P.stopPropagation(),n.value=P.currentTarget||P.target,m())},onBlur:P=>{l=!1,P.stopPropagation(),b()}},C=d.computed(()=>{const P={};return f.value&&(P.onClick=v.onClick),s.openOnHover&&(P.onMouseenter=v.onMouseenter,P.onMouseleave=v.onMouseleave),c.value&&(P.onFocus=v.onFocus,P.onBlur=v.onBlur),P}),x=d.computed(()=>{const P={};if(s.openOnHover&&(P.onMouseenter=()=>{o=!0,m()},P.onMouseleave=()=>{o=!1,b()}),c.value&&(P.onFocusin=()=>{l=!0,m()},P.onFocusout=()=>{l=!1,b()}),s.closeOnContentClick){const z=d.inject(go,null);P.onClick=()=>{t.value=!1,z==null||z.closeParents()}}return P}),R=d.computed(()=>{const P={};return s.openOnHover&&(P.onMouseenter=()=>{h&&(o=!0,h=!1,m())},P.onMouseleave=()=>{o=!1,b()}),P});d.watch(i,P=>{P&&(s.openOnHover&&!o&&(!c.value||!l)||c.value&&!l&&(!s.openOnHover||!o))&&(t.value=!1)});const L=d.ref();d.watchEffect(()=>{L.value&&d.nextTick(()=>{n.value=Hb(L.value)})});const k=Dt("useActivator");let H;return d.watch(()=>!!s.activator,P=>{P&&Re?(H=d.effectScope(),H.run(()=>{Hv(s,k,{activatorEl:n,activatorEvents:C})})):H&&H.stop()},{flush:"post",immediate:!0}),d.onScopeDispose(()=>{H==null||H.stop()}),{activatorEl:n,activatorRef:L,activatorEvents:C,contentEvents:x,scrimEvents:R}}function Hv(s,e,t){let{activatorEl:i,activatorEvents:n}=t;d.watch(()=>s.activator,(c,f)=>{if(f&&c!==f){const m=h(f);m&&l(m)}c&&d.nextTick(()=>o())},{immediate:!0}),d.watch(()=>s.activatorProps,()=>{o()}),d.onScopeDispose(()=>{l()});function o(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h(),f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.activatorProps;c&&Wb(c,d.mergeProps(n.value,f))}function l(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h(),f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.activatorProps;c&&$b(c,d.mergeProps(n.value,f))}function h(){var m,b;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.activator,f;if(c)if(c==="parent"){let v=(b=(m=e==null?void 0:e.proxy)==null?void 0:m.$el)==null?void 0:b.parentNode;for(;v.hasAttribute("data-no-activator");)v=v.parentNode;f=v}else typeof c=="string"?f=document.querySelector(c):"$el"in c?f=c.$el:f=c;return i.value=(f==null?void 0:f.nodeType)===Node.ELEMENT_NODE?f:null,i.value}}function zv(s){return Cu(()=>{const e=[],t={};if(s.value.background)if(Wu(s.value.background)){if(t.backgroundColor=s.value.background,!s.value.text){const i=ju(t.backgroundColor);t.color=i,t.caretColor=i}}else e.push(`bg-${s.value.background}`);return s.value.text&&(Wu(s.value.text)?(t.color=s.value.text,t.caretColor=s.value.text):e.push(`text-${s.value.text}`)),{colorClasses:e,colorStyles:t}})}function Nv(s,e){const t=d.computed(()=>({background:d.isRef(s)?s.value:e?s[e]:null})),{colorClasses:i,colorStyles:n}=zv(t);return{backgroundColorClasses:i,backgroundColorStyles:n}}const Iv=Be({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Bv(s){return{dimensionStyles:d.computed(()=>({height:Ie(s.height),maxHeight:Ie(s.maxHeight),maxWidth:Ie(s.maxWidth),minHeight:Ie(s.minHeight),minWidth:Ie(s.minWidth),width:Ie(s.width)}))}}const bo=Symbol.for("vuetify:display"),Qu={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Vv=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qu;return ht(Qu,s)};function eh(s){return Re&&!s?window.innerWidth:typeof s=="object"&&s.clientWidth||0}function th(s){return Re&&!s?window.innerHeight:typeof s=="object"&&s.clientHeight||0}function ih(s){const e=Re&&!s?window.navigator.userAgent:"ssr";function t(x){return!!e.match(x)}const i=t(/android/i),n=t(/iphone|ipad|ipod/i),o=t(/cordova/i),l=t(/electron/i),h=t(/chrome/i),c=t(/edge/i),f=t(/firefox/i),m=t(/opera/i),b=t(/win/i),v=t(/mac/i),C=t(/linux/i);return{android:i,ios:n,cordova:o,electron:l,chrome:h,edge:c,firefox:f,opera:m,win:b,mac:v,linux:C,touch:Pb,ssr:e==="ssr"}}function Wv(s,e){const{thresholds:t,mobileBreakpoint:i}=Vv(s),n=d.shallowRef(th(e)),o=d.shallowRef(ih(e)),l=d.reactive({}),h=d.shallowRef(eh(e));function c(){n.value=th(),h.value=eh()}function f(){c(),o.value=ih()}return d.watchEffect(()=>{const m=h.value<t.sm,b=h.value<t.md&&!m,v=h.value<t.lg&&!(b||m),C=h.value<t.xl&&!(v||b||m),x=h.value<t.xxl&&!(C||v||b||m),R=h.value>=t.xxl,L=m?"xs":b?"sm":v?"md":C?"lg":x?"xl":"xxl",k=typeof i=="number"?i:t[i],H=h.value<k;l.xs=m,l.sm=b,l.md=v,l.lg=C,l.xl=x,l.xxl=R,l.smAndUp=!m,l.mdAndUp=!(m||b),l.lgAndUp=!(m||b||v),l.xlAndUp=!(m||b||v||C),l.smAndDown=!(v||C||x||R),l.mdAndDown=!(C||x||R),l.lgAndDown=!(x||R),l.xlAndDown=!R,l.name=L,l.height=n.value,l.width=h.value,l.mobile=H,l.mobileBreakpoint=i,l.platform=o.value,l.thresholds=t}),Re&&window.addEventListener("resize",c,{passive:!0}),{...d.toRefs(l),update:f,ssr:!!e}}function $v(){const s=d.inject(bo);if(!s)throw new Error("Could not find Vuetify display injection");return s}function Gv(){if(!Re)return d.shallowRef(!1);const{ssr:s}=$v();if(s){const e=d.shallowRef(!1);return d.onMounted(()=>{e.value=!0}),e}else return d.shallowRef(!0)}const Uv=Be({eager:Boolean},"lazy");function jv(s,e){const t=d.shallowRef(!1),i=d.computed(()=>t.value||s.eager||e.value);d.watch(e,()=>t.value=!0);function n(){s.eager||(t.value=!1)}return{isBooted:t,hasContent:i,onAfterLeave:n}}const Kv={badge:"Badge",open:"Open",close:"Close",dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{ok:"OK",cancel:"Cancel",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},qv={af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1};function Er(s,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b=>b,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:b=>b;const o=Dt("useProxiedModel"),l=d.ref(s[e]!==void 0?s[e]:t),h=Ni(e),f=h!==e?d.computed(()=>{var b,v,C,x;return s[e],!!(((b=o.vnode.props)!=null&&b.hasOwnProperty(e)||(v=o.vnode.props)!=null&&v.hasOwnProperty(h))&&((C=o.vnode.props)!=null&&C.hasOwnProperty(`onUpdate:${e}`)||(x=o.vnode.props)!=null&&x.hasOwnProperty(`onUpdate:${h}`)))}):d.computed(()=>{var b,v;return s[e],!!((b=o.vnode.props)!=null&&b.hasOwnProperty(e)&&((v=o.vnode.props)!=null&&v.hasOwnProperty(`onUpdate:${e}`)))});cr(()=>!f.value,()=>{d.watch(()=>s[e],b=>{l.value=b})});const m=d.computed({get(){const b=s[e];return i(f.value?b:l.value)},set(b){const v=n(b),C=d.toRaw(f.value?s[e]:l.value);C===v||i(C)===b||(l.value=v,o==null||o.emit(`update:${e}`,v))}});return Object.defineProperty(m,"externalValue",{get:()=>f.value?s[e]:l.value}),m}const nh="$vuetify.",rh=(s,e)=>s.replace(/\{(\d+)\}/g,(t,i)=>String(e[+i])),sh=(s,e,t)=>function(i){for(var n=arguments.length,o=new Array(n>1?n-1:0),l=1;l<n;l++)o[l-1]=arguments[l];if(!i.startsWith(nh))return rh(i,o);const h=i.replace(nh,""),c=s.value&&t.value[s.value],f=e.value&&t.value[e.value];let m=mu(c,h,null);return m||(En(`Translation key "${i}" not found in "${s.value}", trying fallback locale`),m=mu(f,h,null)),m||(oo(`Translation key "${i}" not found in fallback`),m=i),typeof m!="string"&&(oo(`Translation key "${i}" has a non-string value`),m=i),rh(m,o)};function oh(s,e){return(t,i)=>new Intl.NumberFormat([s.value,e.value],i).format(t)}function vo(s,e,t){const i=Er(s,e,s[e]??t.value);return i.value=s[e]??t.value,d.watch(t,n=>{s[e]==null&&(i.value=t.value)}),i}function ah(s){return e=>{const t=vo(e,"locale",s.current),i=vo(e,"fallback",s.fallback),n=vo(e,"messages",s.messages);return{name:"vuetify",current:t,fallback:i,messages:n,t:sh(t,i,n),n:oh(t,i),provide:ah({current:t,fallback:i,messages:n})}}}function Yv(s){const e=d.shallowRef((s==null?void 0:s.locale)??"en"),t=d.shallowRef((s==null?void 0:s.fallback)??"en"),i=d.ref({en:Kv,...s==null?void 0:s.messages});return{name:"vuetify",current:e,fallback:t,messages:i,t:sh(e,t,i),n:oh(e,t),provide:ah({current:e,fallback:t,messages:i})}}const wo=Symbol.for("vuetify:locale");function Xv(s){return s.name!=null}function Jv(s){const e=s!=null&&s.adapter&&Xv(s==null?void 0:s.adapter)?s==null?void 0:s.adapter:Yv(s),t=Zv(e,s);return{...e,...t}}function Zv(s,e){const t=d.ref((e==null?void 0:e.rtl)??qv),i=d.computed(()=>t.value[s.current.value]??!1);return{isRtl:i,rtl:t,rtlClasses:d.computed(()=>`v-locale--is-${i.value?"rtl":"ltr"}`)}}function Qv(){const s=d.inject(wo);if(!s)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:s.isRtl,rtlClasses:s.rtlClasses}}function ew(){var s,e;return(e=(s=Dt("useRouter"))==null?void 0:s.proxy)==null?void 0:e.$router}let yo=!1;function tw(s,e){let t=!1,i,n;Re&&(d.nextTick(()=>{window.addEventListener("popstate",o),i=s==null?void 0:s.beforeEach((l,h,c)=>{yo?t?e(c):c():setTimeout(()=>t?e(c):c()),yo=!0}),n=s==null?void 0:s.afterEach(()=>{yo=!1})}),d.onScopeDispose(()=>{window.removeEventListener("popstate",o),i==null||i(),n==null||n()}));function o(l){var h;(h=l.state)!=null&&h.replaced||(t=!0,setTimeout(()=>t=!1))}}function Co(){const e=Dt("useScopeId").vnode.scopeId;return{scopeId:e?{[e]:""}:void 0}}const lh=Symbol.for("vuetify:stack"),Rn=d.reactive([]);function iw(s,e,t){const i=Dt("useStack"),n=!t,o=d.inject(lh,void 0),l=d.reactive({activeChildren:new Set});d.provide(lh,l);const h=d.shallowRef(+e.value);cr(s,()=>{var b;const m=(b=Rn.at(-1))==null?void 0:b[1];h.value=m?m+10:+e.value,n&&Rn.push([i.uid,h.value]),o==null||o.activeChildren.add(i.uid),d.onScopeDispose(()=>{if(n){const v=d.toRaw(Rn).findIndex(C=>C[0]===i.uid);Rn.splice(v,1)}o==null||o.activeChildren.delete(i.uid)})});const c=d.shallowRef(!0);n&&d.watchEffect(()=>{var b;const m=((b=Rn.at(-1))==null?void 0:b[0])===i.uid;setTimeout(()=>c.value=m)});const f=d.computed(()=>!l.activeChildren.size);return{globalTop:d.readonly(c),localTop:f,stackStyles:d.computed(()=>({zIndex:h.value}))}}function nw(s){return{teleportTarget:d.computed(()=>{const t=s.value;if(t===!0||!Re)return;const i=t===!1?document.body:typeof t=="string"?document.querySelector(t):t;if(i==null){d.warn(`Unable to locate target ${t}`);return}let n=i.querySelector(":scope > .v-overlay-container");return n||(n=document.createElement("div"),n.className="v-overlay-container",i.appendChild(n)),n})}}const xr=Symbol.for("vuetify:theme"),rw=Be({theme:String},"theme"),Tn={defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#6200EE","primary-darken-1":"#3700B3",secondary:"#03DAC6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-variant":"#BDBDBD","on-surface-variant":"#424242",primary:"#BB86FC","primary-darken-1":"#3700B3",secondary:"#03DAC5","secondary-darken-1":"#03DAC5",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}};function sw(){var t,i;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn;if(!s)return{...Tn,isDisabled:!0};const e={};for(const[n,o]of Object.entries(s.themes??{})){const l=o.dark||n==="dark"?(t=Tn.themes)==null?void 0:t.dark:(i=Tn.themes)==null?void 0:i.light;e[n]=ht(l,o)}return ht(Tn,{...s,themes:e})}function ow(s){const e=sw(s),t=d.ref(e.defaultTheme),i=d.ref(e.themes),n=d.computed(()=>{const m={};for(const[b,v]of Object.entries(i.value)){const C=m[b]={...v,colors:{...v.colors}};if(e.variations)for(const x of e.variations.colors){const R=C.colors[x];if(R)for(const L of["lighten","darken"]){const k=L==="lighten"?av:lv;for(const H of gu(e.variations[L],1))C.colors[`${x}-${L}-${H}`]=rv(k(Nt(R),H))}}for(const x of Object.keys(C.colors)){if(/^on-[a-z]/.test(x)||C.colors[`on-${x}`])continue;const R=`on-${x}`,L=Nt(C.colors[x]);C.colors[R]=ju(L)}}return m}),o=d.computed(()=>n.value[t.value]),l=d.computed(()=>{const m=[];o.value.dark&&gi(m,":root",["color-scheme: dark"]),gi(m,":root",uh(o.value));for(const[x,R]of Object.entries(n.value))gi(m,`.v-theme--${x}`,[`color-scheme: ${R.dark?"dark":"normal"}`,...uh(R)]);const b=[],v=[],C=new Set(Object.values(n.value).flatMap(x=>Object.keys(x.colors)));for(const x of C)/^on-[a-z]/.test(x)?gi(v,`.${x}`,[`color: rgb(var(--v-theme-${x})) !important`]):(gi(b,`.bg-${x}`,[`--v-theme-overlay-multiplier: var(--v-theme-${x}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${x})) !important`,`color: rgb(var(--v-theme-on-${x})) !important`]),gi(v,`.text-${x}`,[`color: rgb(var(--v-theme-${x})) !important`]),gi(v,`.border-${x}`,[`--v-border-color: var(--v-theme-${x})`]));return m.push(...b,...v),m.map((x,R)=>R===0?x:` ${x}`).join("")});function h(){return{style:[{children:l.value,id:"vuetify-theme-stylesheet",nonce:e.cspNonce||!1}]}}function c(m){if(e.isDisabled)return;const b=m._context.provides.usehead;if(b)if(b.push){const v=b.push(h);Re&&d.watch(l,()=>{v.patch(h)})}else Re?(b.addHeadObjs(d.computed(h)),d.watchEffect(()=>b.updateDOM())):b.addHeadObjs(h());else{let C=function(){if(typeof document<"u"&&!v){const x=document.createElement("style");x.type="text/css",x.id="vuetify-theme-stylesheet",e.cspNonce&&x.setAttribute("nonce",e.cspNonce),v=x,document.head.appendChild(v)}v&&(v.innerHTML=l.value)},v=Re?document.getElementById("vuetify-theme-stylesheet"):null;Re?d.watch(l,C,{immediate:!0}):C()}}const f=d.computed(()=>e.isDisabled?void 0:`v-theme--${t.value}`);return{install:c,isDisabled:e.isDisabled,name:t,themes:i,current:o,computedThemes:n,themeClasses:f,styles:l,global:{name:t,current:o}}}function aw(s){Dt("provideTheme");const e=d.inject(xr,null);if(!e)throw new Error("Could not find Vuetify theme injection");const t=d.computed(()=>s.theme??(e==null?void 0:e.name.value)),i=d.computed(()=>e.isDisabled?void 0:`v-theme--${t.value}`),n={...e,name:t,themeClasses:i};return d.provide(xr,n),n}function gi(s,e,t){s.push(`${e} {
|
46
49
|
`,...t.map(i=>` ${i};
|
47
50
|
`),`}
|
48
|
-
`)}function Ku(n){const e=n.dark?2:1,t=n.dark?1:2,i=[];for(const[s,o]of Object.entries(n.colors)){const l=ai(o);i.push(`--v-theme-${s}: ${l.r},${l.g},${l.b}`),s.startsWith("on-")||i.push(`--v-theme-${s}-overlay-multiplier: ${Yg(o)>.18?e:t}`)}for(const[s,o]of Object.entries(n.variables)){const l=typeof o=="string"&&o.startsWith("#")?ai(o):void 0,c=l?`${l.r}, ${l.g}, ${l.b}`:void 0;i.push(`--v-${s}: ${c??o}`)}return i}const pn=Y({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:n=>n!==!0}},"transition"),_i=(n,e)=>{let{slots:t}=e;const{transition:i,disabled:s,...o}=n,{component:l=u.Transition,...c}=typeof i=="object"?i:{};return u.h(l,u.mergeProps(typeof i=="string"?{name:s?"":i}:c,o,{disabled:s}),t)};function Nb(){return!0}function qu(n,e,t){if(!n||Yu(n,t)===!1)return!1;const i=Su(e);if(typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&i.host===n.target)return!1;const s=(typeof t.value=="object"&&t.value.include||(()=>[]))();return s.push(e),!s.some(o=>o==null?void 0:o.contains(n.target))}function Yu(n,e){return(typeof e.value=="object"&&e.value.closeConditional||Nb)(n)}function zb(n,e,t){const i=typeof t.value=="function"?t.value:t.value.handler;e._clickOutside.lastMousedownWasOutside&&qu(n,e,t)&&setTimeout(()=>{Yu(n,t)&&i&&i(n)},0)}function Xu(n,e){const t=Su(n);e(document),typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&e(t)}const Hb={mounted(n,e){const t=s=>zb(s,n,e),i=s=>{n._clickOutside.lastMousedownWasOutside=qu(s,n,e)};Xu(n,s=>{s.addEventListener("click",t,!0),s.addEventListener("mousedown",i,!0)}),n._clickOutside||(n._clickOutside={lastMousedownWasOutside:!1}),n._clickOutside[e.instance.$.uid]={onClick:t,onMousedown:i}},unmounted(n,e){n._clickOutside&&(Xu(n,t=>{var o;if(!t||!((o=n._clickOutside)!=null&&o[e.instance.$.uid]))return;const{onClick:i,onMousedown:s}=n._clickOutside[e.instance.$.uid];t.removeEventListener("click",i,!0),t.removeEventListener("mousedown",s,!0)}),delete n._clickOutside[e.instance.$.uid])}};function Ib(n){const{modelValue:e,color:t,...i}=n;return u.createVNode(u.Transition,{name:"fade-transition",appear:!0},{default:()=>[n.modelValue&&u.createVNode("div",u.mergeProps({class:["v-overlay__scrim",n.color.backgroundColorClasses.value],style:n.color.backgroundColorStyles.value},i),null)]})}const Ro=Y({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...bb(),...Ve(),...Xn(),...xb(),...sb(),...cb(),...Ft(),...pn()},"VOverlay"),qs=be()({name:"VOverlay",directives:{ClickOutside:Hb},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Ro()},emits:{"click:outside":n=>!0,"update:modelValue":n=>!0,afterLeave:()=>!0},setup(n,e){let{slots:t,attrs:i,emit:s}=e;const o=We(n,"modelValue"),l=u.computed({get:()=>o.value,set:Q=>{Q&&n.disabled||(o.value=Q)}}),{teleportTarget:c}=Pb(u.computed(()=>n.attach||n.contained)),{themeClasses:h}=ei(n),{rtlClasses:f,isRtl:p}=Zn(),{hasContent:b,onAfterLeave:g}=_b(n,l),w=Yn(u.computed(()=>typeof n.scrim=="string"?n.scrim:null)),{globalTop:E,localTop:x,stackStyles:_}=Fb(l,u.toRef(n,"zIndex"),n._disableGlobalStack),{activatorEl:k,activatorRef:V,activatorEvents:L,contentEvents:F,scrimEvents:H}=vb(n,{isActive:l,isTop:x}),{dimensionStyles:W}=Jn(n),P=Eb(),{scopeId:D}=_o();u.watch(()=>n.disabled,Q=>{Q&&(l.value=!1)});const I=u.ref(),Z=u.ref(),{contentStyles:ie,updateLocation:G}=rb(n,{isRtl:p,contentEl:Z,activatorEl:k,isActive:l});db(n,{root:I,contentEl:Z,activatorEl:k,isActive:l,updateLocation:G});function X(Q){s("click:outside",Q),n.persistent?$():l.value=!1}function ee(){return l.value&&E.value}Ne&&u.watch(l,Q=>{Q?window.addEventListener("keydown",ue):window.removeEventListener("keydown",ue)},{immediate:!0});function ue(Q){var me,ye;Q.key==="Escape"&&E.value&&(n.persistent?$():(l.value=!1,(me=Z.value)!=null&&me.contains(document.activeElement)&&((ye=k.value)==null||ye.focus())))}const Re=Db();Hi(()=>n.closeOnBack,()=>{Ab(Re,Q=>{E.value&&l.value?(Q(!1),n.persistent?$():l.value=!1):Q()})});const U=u.ref();u.watch(()=>l.value&&(n.absolute||n.contained)&&c.value==null,Q=>{if(Q){const me=Mu(I.value);me&&me!==document.scrollingElement&&(U.value=me.scrollTop)}});function $(){n.noClickAnimation||Z.value&&cn(Z.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Is})}return Me(()=>{var Q;return u.createVNode(u.Fragment,null,[(Q=t.activator)==null?void 0:Q.call(t,{isActive:l.value,props:u.mergeProps({ref:V},L.value,n.activatorProps)}),P.value&&b.value&&u.createVNode(u.Teleport,{disabled:!c.value,to:c.value},{default:()=>[u.createVNode("div",u.mergeProps({class:["v-overlay",{"v-overlay--absolute":n.absolute||n.contained,"v-overlay--active":l.value,"v-overlay--contained":n.contained},h.value,f.value,n.class],style:[_.value,{top:fe(U.value)},n.style],ref:I},D,i),[u.createVNode(Ib,u.mergeProps({color:w,modelValue:l.value&&!!n.scrim},H.value),null),u.createVNode(_i,{appear:!0,persisted:!0,transition:n.transition,target:k.value,onAfterLeave:()=>{g(),s("afterLeave")}},{default:()=>{var me;return[u.withDirectives(u.createVNode("div",u.mergeProps({ref:Z,class:["v-overlay__content",n.contentClass],style:[W.value,ie.value]},F.value,n.contentProps),[(me=t.default)==null?void 0:me.call(t,{isActive:l})]),[[u.vShow,l.value],[u.resolveDirective("click-outside"),{handler:X,closeConditional:ee,include:()=>[k.value]}]])]}})])]})])}),{activatorEl:k,animateClick:$,contentEl:Z,globalTop:E,localTop:x,updateLocation:G}}}),ko=Symbol("Forwarded refs");function So(n,e){let t=n;for(;t;){const i=Reflect.getOwnPropertyDescriptor(t,e);if(i)return i;t=Object.getPrototypeOf(t)}}function ts(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return n[ko]=t,new Proxy(n,{get(s,o){if(Reflect.has(s,o))return Reflect.get(s,o);if(!(typeof o=="symbol"||o.startsWith("__"))){for(const l of t)if(l.value&&Reflect.has(l.value,o)){const c=Reflect.get(l.value,o);return typeof c=="function"?c.bind(l.value):c}}},has(s,o){if(Reflect.has(s,o))return!0;if(typeof o=="symbol"||o.startsWith("__"))return!1;for(const l of t)if(l.value&&Reflect.has(l.value,o))return!0;return!1},set(s,o,l){if(Reflect.has(s,o))return Reflect.set(s,o,l);if(typeof o=="symbol"||o.startsWith("__"))return!1;for(const c of t)if(c.value&&Reflect.has(c.value,o))return Reflect.set(c.value,o,l);return!1},getOwnPropertyDescriptor(s,o){var c;const l=Reflect.getOwnPropertyDescriptor(s,o);if(l)return l;if(!(typeof o=="symbol"||o.startsWith("__"))){for(const h of t){if(!h.value)continue;const f=So(h.value,o)??("_"in h.value?So((c=h.value._)==null?void 0:c.setupState,o):void 0);if(f)return f}for(const h of t){const f=h.value&&h.value[ko];if(!f)continue;const p=f.slice();for(;p.length;){const b=p.shift(),g=So(b.value,o);if(g)return g;const w=b.value&&b.value[ko];w&&p.push(...w)}}}}})}const Bb=Y({id:String,text:String,...an(Ro({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),is=be()({name:"VTooltip",props:Bb(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=_o(),o=Ut(),l=u.computed(()=>n.id||`v-tooltip-${o}`),c=u.ref(),h=u.computed(()=>n.location.split(" ").length>1?n.location:n.location+" center"),f=u.computed(()=>n.origin==="auto"||n.origin==="overlap"||n.origin.split(" ").length>1||n.location.split(" ").length>1?n.origin:n.origin+" center"),p=u.computed(()=>n.transition?n.transition:i.value?"scale-transition":"fade-transition"),b=u.computed(()=>u.mergeProps({"aria-describedby":l.value},n.activatorProps));return Me(()=>{const[g]=qs.filterProps(n);return u.createVNode(qs,u.mergeProps({ref:c,class:["v-tooltip",n.class],style:n.style,id:l.value},g,{modelValue:i.value,"onUpdate:modelValue":w=>i.value=w,transition:p.value,absolute:!0,location:h.value,origin:f.value,persistent:!0,role:"tooltip",activatorProps:b.value,_disableGlobalStack:!0},s),{activator:t.activator,default:function(){var _;for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return((_=t.default)==null?void 0:_.call(t,...E))??n.text}})}),ts({},c)}}),uT="",Wb=Y({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Ct(n,e,t){return be()({name:n,props:Wb({mode:t,origin:e}),setup(i,s){let{slots:o}=s;const l={onBeforeEnter(c){i.origin&&(c.style.transformOrigin=i.origin)},onLeave(c){if(i.leaveAbsolute){const{offsetTop:h,offsetLeft:f,offsetWidth:p,offsetHeight:b}=c;c._transitionInitialStyles={position:c.style.position,top:c.style.top,left:c.style.left,width:c.style.width,height:c.style.height},c.style.position="absolute",c.style.top=`${h}px`,c.style.left=`${f}px`,c.style.width=`${p}px`,c.style.height=`${b}px`}i.hideOnLeave&&c.style.setProperty("display","none","important")},onAfterLeave(c){if(i.leaveAbsolute&&(c!=null&&c._transitionInitialStyles)){const{position:h,top:f,left:p,width:b,height:g}=c._transitionInitialStyles;delete c._transitionInitialStyles,c.style.position=h||"",c.style.top=f||"",c.style.left=p||"",c.style.width=b||"",c.style.height=g||""}}};return()=>{const c=i.group?u.TransitionGroup:u.Transition;return u.h(c,{name:i.disabled?"":n,css:!i.disabled,...i.group?void 0:{mode:i.mode},...i.disabled?{}:l},o.default)}}})}function Ju(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return be()({name:n,props:{mode:{type:String,default:t},disabled:Boolean},setup(i,s){let{slots:o}=s;return()=>u.h(u.Transition,{name:i.disabled?"":n,css:!i.disabled,...i.disabled?{}:e},o.default)}})}function Zu(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",i=u.camelize(`offset-${t}`);return{onBeforeEnter(l){l._parent=l.parentNode,l._initialStyle={transition:l.style.transition,overflow:l.style.overflow,[t]:l.style[t]}},onEnter(l){const c=l._initialStyle;l.style.setProperty("transition","none","important"),l.style.overflow="hidden";const h=`${l[i]}px`;l.style[t]="0",l.offsetHeight,l.style.transition=c.transition,n&&l._parent&&l._parent.classList.add(n),requestAnimationFrame(()=>{l.style[t]=h})},onAfterEnter:o,onEnterCancelled:o,onLeave(l){l._initialStyle={transition:"",overflow:l.style.overflow,[t]:l.style[t]},l.style.overflow="hidden",l.style[t]=`${l[i]}px`,l.offsetHeight,requestAnimationFrame(()=>l.style[t]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(l){n&&l._parent&&l._parent.classList.remove(n),o(l)}function o(l){const c=l._initialStyle[t];l.style.overflow=l._initialStyle.overflow,c!=null&&(l.style[t]=c),delete l._initialStyle}}const $b=Y({target:Object},"v-dialog-transition"),Qu=be()({name:"VDialogTransition",props:$b(),setup(n,e){let{slots:t}=e;const i={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,o){var g;await new Promise(w=>requestAnimationFrame(w)),await new Promise(w=>requestAnimationFrame(w)),s.style.visibility="";const{x:l,y:c,sx:h,sy:f,speed:p}=tc(n.target,s),b=cn(s,[{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0},{}],{duration:225*p,easing:Qg});(g=ec(s))==null||g.forEach(w=>{cn(w,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*p,easing:Is})}),b.finished.then(()=>o())},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,o){var g;await new Promise(w=>requestAnimationFrame(w));const{x:l,y:c,sx:h,sy:f,speed:p}=tc(n.target,s);cn(s,[{},{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0}],{duration:125*p,easing:eb}).finished.then(()=>o()),(g=ec(s))==null||g.forEach(w=>{cn(w,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*p,easing:Is})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>n.target?u.createVNode(u.Transition,u.mergeProps({name:"dialog-transition"},i,{css:!1}),t):u.createVNode(u.Transition,{name:"dialog-transition"},t)}});function ec(n){var t;const e=(t=n.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:t.children;return e&&[...e]}function tc(n,e){const t=n.getBoundingClientRect(),i=co(e),[s,o]=getComputedStyle(e).transformOrigin.split(" ").map(k=>parseFloat(k)),[l,c]=getComputedStyle(e).getPropertyValue("--v-overlay-anchor-origin").split(" ");let h=t.left+t.width/2;l==="left"||c==="left"?h-=t.width/2:(l==="right"||c==="right")&&(h+=t.width/2);let f=t.top+t.height/2;l==="top"||c==="top"?f-=t.height/2:(l==="bottom"||c==="bottom")&&(f+=t.height/2);const p=t.width/i.width,b=t.height/i.height,g=Math.max(1,p,b),w=p/g||0,E=b/g||0,x=i.width*i.height/(window.innerWidth*window.innerHeight),_=x>.12?Math.min(1.5,(x-.12)*10+1):1;return{x:h-(s+i.left),y:f-(o+i.top),sx:w,sy:E,speed:_}}Ct("fab-transition","center center","out-in"),Ct("dialog-bottom-transition"),Ct("dialog-top-transition"),Ct("fade-transition"),Ct("scale-transition"),Ct("scroll-x-transition"),Ct("scroll-x-reverse-transition"),Ct("scroll-y-transition"),Ct("scroll-y-reverse-transition"),Ct("slide-x-transition"),Ct("slide-x-reverse-transition");const ic=Ct("slide-y-transition");Ct("slide-y-reverse-transition");const Gb=Ju("expand-transition",Zu()),nc=Ju("expand-x-transition",Zu("",!0)),Ub=Y({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),ti=be(!1)({name:"VDefaultsProvider",props:Ub(),setup(n,e){let{slots:t}=e;const{defaults:i,disabled:s,reset:o,root:l,scoped:c}=u.toRefs(n);return Hs(i,{reset:o,root:l,scoped:c,disabled:s}),()=>{var h;return(h=t.default)==null?void 0:h.call(t)}}}),jb=Y({id:String,...an(Ro({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:Qu}}),["absolute"])},"VMenu"),ns=be()({name:"VMenu",props:jb(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=_o(),o=Ut(),l=u.computed(()=>n.id||`v-menu-${o}`),c=u.ref(),h=u.inject(wo,null),f=u.shallowRef(0);u.provide(wo,{register(){++f.value},unregister(){--f.value},closeParents(){setTimeout(()=>{f.value||(i.value=!1,h==null||h.closeParents())},40)}});async function p(x){var V,L,F;const _=x.relatedTarget,k=x.target;await u.nextTick(),i.value&&_!==k&&((V=c.value)!=null&&V.contentEl)&&((L=c.value)!=null&&L.globalTop)&&![document,c.value.contentEl].includes(k)&&!c.value.contentEl.contains(k)&&((F=oo(c.value.contentEl)[0])==null||F.focus())}u.watch(i,x=>{x?(h==null||h.register(),document.addEventListener("focusin",p,{once:!0})):(h==null||h.unregister(),document.removeEventListener("focusin",p))});function b(){h==null||h.closeParents()}function g(x){var _,k,V;n.disabled||x.key==="Tab"&&(su(oo((_=c.value)==null?void 0:_.contentEl,!1),x.shiftKey?"prev":"next",F=>F.tabIndex>=0)||(i.value=!1,(V=(k=c.value)==null?void 0:k.activatorEl)==null||V.focus()))}function w(x){var k;if(n.disabled)return;const _=(k=c.value)==null?void 0:k.contentEl;_&&i.value?x.key==="ArrowDown"?(x.preventDefault(),Fs(_,"next")):x.key==="ArrowUp"&&(x.preventDefault(),Fs(_,"prev")):["ArrowDown","ArrowUp"].includes(x.key)&&(i.value=!0,x.preventDefault(),setTimeout(()=>setTimeout(()=>w(x))))}const E=u.computed(()=>u.mergeProps({"aria-haspopup":"menu","aria-expanded":String(i.value),"aria-owns":l.value,onKeydown:w},n.activatorProps));return Me(()=>{const[x]=qs.filterProps(n);return u.createVNode(qs,u.mergeProps({ref:c,class:["v-menu",n.class],style:n.style},x,{modelValue:i.value,"onUpdate:modelValue":_=>i.value=_,absolute:!0,activatorProps:E.value,"onClick:outside":b,onKeydown:g},s),{activator:t.activator,default:function(){for(var _=arguments.length,k=new Array(_),V=0;V<_;V++)k[V]=arguments[V];return u.createVNode(ti,{root:"VMenu"},{default:()=>{var L;return[(L=t.default)==null?void 0:L.call(t,...k)]}})}})}),ts({id:l,ΨopenChildren:f},c)}}),Kb={class:"flex items-center gap-3 relative hover:bg-muted-200 dark:hover:bg-muted-700 rounded-lg px-5 pl-3 rtl:pl-8 rtl:pr-5 py-2 duration-300"},qb=["modelValue"],Yb={class:"text-success-500 peer-disabled:opacity-75"},Xb=u.createElementVNode("svg",{"aria-hidden":"true",viewBox:"0 0 52 52","data-v-3e8a7b5f":""},[u.createElementVNode("circle",{cx:"26",cy:"26",r:"25",fill:"none",stroke:"currentColor"}),u.createElementVNode("path",{fill:"none",stroke:"currentColor",d:"m14.1 27.2 7.1 7.2 16.7-16.8"})],-1),Jb={class:"font-heading text-muted-800 text-xs font-semibold leading-tight dark:text-white"},Zb={__name:"SelectColumnItem",props:{checked:{default:!1},columnName:{default:""}},setup(n){const e=n;return(t,i)=>(u.openBlock(),u.createElementBlock("div",Kb,[u.createElementVNode("div",{class:u.normalizeClass(["nui-focus block focus-within:outline-current rounded-full",JSON.parse(e.checked)?"is-checked":"is-unchecked"])},[u.createElementVNode("input",{modelValue:e.checked,type:"checkbox",class:"peer cursor-pointer disabled:cursor-not-allowed","true-value":"true","false-value":"false",onClick:i[0]||(i[0]=s=>t.$emit("toggle"))},null,8,qb),u.createElementVNode("label",Yb,[u.createElementVNode("div",{class:u.normalizeClass(["rtl:left-[auto] rtl:!right-0 ltr:right-[auto] ltr:left-0",JSON.parse(e.checked)?"is-opaque":""])},null,2),Xb])],2),u.createElementVNode("div",null,[u.createElementVNode("h6",Jb,u.toDisplayString(n.columnName),1)])]))}},cT="",li=n=>(u.pushScopeId("data-v-09da3a82"),n=n(),u.popScopeId(),n),Qb={class:"fc-header"},ev={class:"fc-header-left-sid"},tv=[li(()=>u.createElementVNode("svg",{viewBox:"0 0 24 24"},[u.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1))],iv={class:"z-[1]"},nv={class:"bg-muted-200 dark:bg-muted-800 cursor-pointer rounded-b-xl fm-light-shadow"},sv={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},rv={class:"text-muted-400 font-sans text-xs"},ov=li(()=>u.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M64 464H96v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V288H336V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"})],-1)),av={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},lv={class:"text-muted-400 font-sans text-xs"},uv=li(()=>u.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"})],-1)),cv={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},dv={class:"text-muted-400 font-sans text-xs"},hv=li(()=>u.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M112 160V64c0-8.8 7.2-16 16-16H357.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c3 3 4.7 7.1 4.7 11.3V160h48V90.5c0-17-6.7-33.3-18.7-45.3L402.7 18.7C390.7 6.7 374.5 0 357.5 0H128C92.7 0 64 28.7 64 64v96h48zm16 208H384v96H128V368zm-16-48c-17.7 0-32 14.3-32 32H48V256c0-8.8 7.2-16 16-16H448c8.8 0 16 7.2 16 16v96H432c0-17.7-14.3-32-32-32H112zm320 80h48c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64V368c0 17.7 14.3 32 32 32H80v80c0 17.7 14.3 32 32 32H400c17.7 0 32-14.3 32-32V400z"})],-1)),fv=[li(()=>u.createElementVNode("path",{d:"M371.2 122.9C340.3 96.2 300 80 256 80C158.8 80 80 158.8 80 256s78.8 176 176 176c39.7 0 76.2-13.1 105.6-35.2c10.6-8 25.6-5.8 33.6 4.8s5.8 25.6-4.8 33.6C353 463.3 306.4 480 256 480C132.3 480 32 379.7 32 256S132.3 32 256 32c57.3 0 109.6 21.5 149.2 56.9l30.5-30.5c6.6-6.6 15.6-10.3 25-10.3C480.2 48 496 63.8 496 83.3V200c0 13.3-10.7 24-24 24H355.3c-19.5 0-35.3-15.8-35.3-35.3c0-9.4 3.7-18.3 10.3-25l40.8-40.8zm76.8-9L385.9 176H448V113.9z"},null,-1))],mv=[li(()=>u.createElementVNode("svg",{viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M384 48c8.8 0 16 7.2 16 16V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H384zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM80 112v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V112c0-8.8-7.2-16-16-16H96c-8.8 0-16 7.2-16 16zM96 352c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16H96zm80-224c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H200c-13.3 0-24 10.7-24 24zm32 128c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H232c-13.3 0-24 10.7-24 24zM176 384c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H200c-13.3 0-24 10.7-24 24zm-4.7-140.7c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L112 257.4 99.3 244.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l24 24c6.2 6.2 16.4 6.2 22.6 0l48-48z"})],-1))],pv=[li(()=>u.createElementVNode("svg",{viewBox:"0 0 448 512",class:"z-[1]"},[u.createElementVNode("path",{d:"M64 448c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32H384c17.7 0 32 14.3 32 32V416c0 17.7-14.3 32-32 32H64zM0 416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416zM128 288c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16V272c0 8.8 7.2 16 16 16zm176 48c0 8.8 7.2 16 16 16s16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16V336zm-80-80c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16z"})],-1))],gv={class:"bg-white dark:bg-muted-800 rounded-xl rtl:text-right ltr:text-left fm-light-shadow"},bv={class:"m-3 mt-2 text-muted-600 dark:text-muted-200"},vv={class:"p-2"},wv={class:"fm-header-rigth-sid flex w-full sm:w-auto rtl:flex-row-reverse rtl:justify-end z-10"},yv={key:0},Cv=[li(()=>u.createElementVNode("span",null,null,-1))],Ev=[li(()=>u.createElementVNode("path",{d:"M0 73.7C0 50.7 18.7 32 41.7 32H470.3c23 0 41.7 18.7 41.7 41.7c0 9.6-3.3 18.9-9.4 26.3L336 304.5V447.7c0 17.8-14.5 32.3-32.3 32.3c-7.3 0-14.4-2.5-20.1-7l-92.5-73.4c-9.6-7.6-15.1-19.1-15.1-31.3V304.5L9.4 100C3.3 92.6 0 83.3 0 73.7zM55 80L218.6 280.8c3.5 4.3 5.4 9.6 5.4 15.2v68.4l64 50.8V296c0-5.5 1.9-10.9 5.4-15.2L457 80H55z"},null,-1))],xv={class:"group/nui-input relative rtl:"},_v=["placeholder"],Rv=u.createStaticVNode('<div class="ltr:left-0 text-muted-400 group-focus-within/nui-input:text-primary-500 absolute end-0 rtl:start-0 top-0 flex items-center justify-center transition-colors duration-300 peer-disabled:cursor-not-allowed peer-disabled:opacity-75 h-10 w-10" data-v-09da3a82><svg class="icon h-[1.15rem] w-[1.15rem]" width="1em" height="1em" viewBox="0 0 24 24" data-v-09da3a82><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-09da3a82><circle cx="11" cy="11" r="8" data-v-09da3a82></circle><path d="m21 21l-4.35-4.35" data-v-09da3a82></path></g></svg></div>',1),kv=sn({__name:"MButtonBox",setup(n){const{event:e}=$t.emitter,t=u.inject("store");function i(h){h===t.panel?t.panel="":t.panel=h}const s=u.ref(null);u.onMounted(()=>{s.value=document.body.getAttribute("dir")}),u.computed(()=>author.books.length>0?"Yes":"No");const o=u.computed(()=>t.flatFields.find(h=>h.field==="_select_")),l=u.computed(()=>{var h;return!!((h=o==null?void 0:o.value)!=null&&h.isHeader)});function c(){o.value.isHeader=!o.value.isHeader}return(h,f)=>(u.openBlock(),u.createElementBlock("div",Qb,[u.createElementVNode("div",ev,[u.createVNode(u.unref(is),{color:"#ec4899",location:"bottom",text:h.$fcTr("add")},{activator:u.withCtx(({props:p})=>[u.createElementVNode("button",u.mergeProps(p,{class:"fc-plus-btn",onClick:f[0]||(f[0]=b=>u.unref(e)("createBtn"))}),tv,16)]),_:1},8,["text"]),u.createVNode(u.unref(ns),null,{activator:u.withCtx(({props:p})=>[u.createElementVNode("button",u.mergeProps({class:JSON.parse(p["aria-expanded"])?"before:block":"before:hidden"},p,{class:"fc-header-icon-btn fc-drop-down-btn min-w-[130px]"}),[u.createElementVNode("span",iv,u.toDisplayString(h.$fcTr("export")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",nv,[u.createElementVNode("a",sv,[u.createElementVNode("p",rv,u.toDisplayString(h.$fcTr("export_as_pdf")),1),ov]),u.createElementVNode("a",av,[u.createElementVNode("p",lv,u.toDisplayString(h.$fcTr("export_as_excel")),1),uv]),u.createElementVNode("a",cv,[u.createElementVNode("p",dv,u.toDisplayString(h.$fcTr("print")),1),hv])])]),_:1}),u.createVNode(u.unref(is),{color:"#ec4899",location:"bottom",text:h.$fcTr("reload")},{activator:u.withCtx(({props:p})=>[u.createElementVNode("button",u.mergeProps(p,{class:"fc-header-icon-btn",onClick:f[1]||(f[1]=(...b)=>u.unref(t).reloadData&&u.unref(t).reloadData(...b))}),[(u.openBlock(),u.createElementBlock("svg",{class:u.normalizeClass({spin:u.unref(t).loadings.mainLoading}),viewBox:"0 0 512 512"},fv,2))],16)]),_:1},8,["text"]),u.createVNode(u.unref(is),{color:"#ec4899",location:"bottom",text:h.$fcTr("select_row")},{activator:u.withCtx(({props:p})=>[u.createElementVNode("button",u.mergeProps(p,{class:["fc-header-icon-btn",{"fm-active-btn":l.value}],onClick:c}),mv,16)]),_:1},8,["text"]),u.createVNode(u.unref(ns),{"close-on-content-click":!1,location:s.value==="rtl"?"end":"start"},{activator:u.withCtx(({props:p})=>[u.createVNode(u.unref(is),{color:"#ec4899",location:"bottom"},{activator:u.withCtx(({props:b})=>[u.createElementVNode("button",u.mergeProps({...p,...b},{class:["fc-header-icon-btn",[JSON.parse(p["aria-expanded"])?"light:!bg-white dark:bg-muted-800":"",JSON.parse(p["aria-expanded"])?s.value==="rtl"?"expanded-rtl":"expanded2":""]]}),pv,16)]),default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(h.$fcTr("custom_column")),1)]),_:2},1024)]),default:u.withCtx(()=>[u.createElementVNode("div",gv,[u.createElementVNode("div",bv,u.toDisplayString(h.$fcTr("custom_column")),1),u.createElementVNode("ul",vv,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(t).flatFieldsWithoutActions,p=>(u.openBlock(),u.createBlock(Zb,{key:p.field,"column-name":p.title,checked:p.isHeader,onToggle:b=>p.isHeader=!p.isHeader},null,8,["column-name","checked","onToggle"]))),128))])])]),_:1},8,["location"])]),u.createElementVNode("div",wv,[u.createVNode(u.unref(is),{color:"#ec4899",location:"bottom",text:h.$fcTr("filter")},{activator:u.withCtx(({props:p})=>[u.createElementVNode("button",u.mergeProps(p,{class:["test fc-header-icon-btn transform transition-all",u.unref(t).panel==="filters"?"!bg-white dark:!bg-muted-800 !rounded-b-none ":""],onClick:f[2]||(f[2]=b=>i("filters"))}),[u.createVNode(u.Transition,{name:"scale"},{default:u.withCtx(()=>[u.unref(t).panel==="filters"?(u.openBlock(),u.createElementBlock("div",yv,Cv)):u.createCommentVNode("",!0)]),_:1}),(u.openBlock(),u.createElementBlock("svg",{class:u.normalizeClass(u.unref(t).panel==="filters"?"light:!fill-primary-700":""),stroke:"currentColor",viewBox:"0 0 512 512"},Ev,2))],16)]),_:1},8,["text"]),u.createElementVNode("div",xv,[u.createElementVNode("input",{type:"text",class:"nui-focus !pl-4 border-muted-300 text-muted-600 placeholder:text-muted-300 dark:border-muted-700 dark:bg-muted-900/75 dark:text-muted-200 dark:placeholder:text-muted-500 dark:focus:border-muted-700 peer w-full border bg-white font-sans transition-all duration-300 disabled:cursor-not-allowed disabled:opacity-75 px-2 h-10 py-2 text-sm leading-5 pe-4 ps-9 rounded-full",placeholder:h.$fcTr("search")},null,8,_v),Rv])])]))}},[["__scopeId","data-v-09da3a82"]]),vT="",wT="",yT="",Sv={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar"},Tv={component:n=>u.h(oc,{...n,class:"mdi"})},$e=[String,Function,Object,Array],To=Symbol.for("vuetify:icons"),Ys=Y({icon:{type:$e},tag:{type:String,required:!0}},"icon"),sc=be()({name:"VComponentIcon",props:Ys(),setup(n,e){let{slots:t}=e;return()=>{const i=n.icon;return u.createVNode(n.tag,null,{default:()=>{var s;return[n.icon?u.createVNode(i,null,null):(s=t.default)==null?void 0:s.call(t)]}})}}}),rc=mn({name:"VSvgIcon",inheritAttrs:!1,props:Ys(),setup(n,e){let{attrs:t}=e;return()=>u.createVNode(n.tag,u.mergeProps(t,{style:null}),{default:()=>[u.createVNode("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(i=>Array.isArray(i)?u.createVNode("path",{d:i[0],"fill-opacity":i[1]},null):u.createVNode("path",{d:i},null)):u.createVNode("path",{d:n.icon},null)])]})}});mn({name:"VLigatureIcon",props:Ys(),setup(n){return()=>u.createVNode(n.tag,null,{default:()=>[n.icon]})}});const oc=mn({name:"VClassIcon",props:Ys(),setup(n){return()=>u.createVNode(n.tag,{class:n.icon},null)}}),Mv={svg:{component:rc},class:{component:oc}};function Lv(n){return At({defaultSet:"mdi",sets:{...Mv,mdi:Tv},aliases:{...Sv,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},n)}const Dv=n=>{const e=u.inject(To);if(!e)throw new Error("Missing Vuetify Icons provide!");return{iconData:u.computed(()=>{var h;const i=u.unref(n);if(!i)return{component:sc};let s=i;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(h=e.aliases)==null?void 0:h[s.slice(1)])),!s)throw new Error(`Could not find aliased icon "${i}"`);if(Array.isArray(s))return{component:rc,icon:s};if(typeof s!="string")return{component:sc,icon:s};const o=Object.keys(e.sets).find(f=>typeof s=="string"&&s.startsWith(`${f}:`)),l=o?s.slice(o.length+1):s;return{component:e.sets[o??e.defaultSet].component,icon:l}})}},Av=["x-small","small","default","large","x-large"],Mo=Y({size:{type:[String,Number],default:"default"}},"size");function Lo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();return ro(()=>{let t,i;return As(Av,n.size)?t=`${e}--size-${n.size}`:n.size&&(i={width:fe(n.size),height:fe(n.size)}),{sizeClasses:t,sizeStyles:i}})}const ui=Y({tag:{type:String,default:"div"}},"tag"),Fv=Y({color:String,start:Boolean,end:Boolean,icon:$e,...Ve(),...Mo(),...ui({tag:"i"}),...Ft()},"VIcon"),Et=be()({name:"VIcon",props:Fv(),setup(n,e){let{attrs:t,slots:i}=e;const s=u.ref(),{themeClasses:o}=ei(n),{iconData:l}=Dv(u.computed(()=>s.value||n.icon)),{sizeClasses:c}=Lo(n),{textColorClasses:h,textColorStyles:f}=xi(u.toRef(n,"color"));return Me(()=>{var b,g;const p=(b=i.default)==null?void 0:b.call(i);return p&&(s.value=(g=tu(p).filter(w=>w.type===u.Text&&w.children&&typeof w.children=="string")[0])==null?void 0:g.children),u.createVNode(l.value.component,{tag:n.tag,icon:l.value.icon,class:["v-icon","notranslate",o.value,c.value,h.value,{"v-icon--clickable":!!t.onClick,"v-icon--start":n.start,"v-icon--end":n.end},n.class],style:[c.value?void 0:{fontSize:fe(n.size),height:fe(n.size),width:fe(n.size)},f.value,n.style],role:t.onClick?"button":void 0,"aria-hidden":!t.onClick},{default:()=>[p]})}),{}}}),CT="",Pv=Y({text:String,clickable:Boolean,...Ve(),...Ft()},"VLabel"),ac=be()({name:"VLabel",props:Pv(),setup(n,e){let{slots:t}=e;return Me(()=>{var i;return u.createVNode("label",{class:["v-label",{"v-label--clickable":n.clickable},n.class],style:n.style},[n.text,(i=t.default)==null?void 0:i.call(t)])}),{}}}),ET="",Vv=[null,"default","comfortable","compact"],gn=Y({density:{type:String,default:"default",validator:n=>Vv.includes(n)}},"density");function bn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();return{densityClasses:u.computed(()=>`${e}--density-${n.density}`)}}const lc=Symbol.for("vuetify:selection-control-group"),uc=Y({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:$e,trueIcon:$e,ripple:{type:Boolean,default:!0},multiple:{type:Boolean,default:null},name:String,readonly:Boolean,modelValue:null,type:String,valueComparator:{type:Function,default:rn},...Ve(),...gn(),...Ft()},"SelectionControlGroup"),Ov=Y({...uc({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");be()({name:"VSelectionControlGroup",props:Ov(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),s=Ut(),o=u.computed(()=>n.id||`v-selection-control-group-${s}`),l=u.computed(()=>n.name||o.value),c=new Set;return u.provide(lc,{modelValue:i,forceUpdate:()=>{c.forEach(h=>h())},onForceUpdate:h=>{c.add(h),u.onScopeDispose(()=>{c.delete(h)})}}),Hs({[n.defaultsTarget]:{color:u.toRef(n,"color"),disabled:u.toRef(n,"disabled"),density:u.toRef(n,"density"),error:u.toRef(n,"error"),inline:u.toRef(n,"inline"),modelValue:i,multiple:u.computed(()=>!!n.multiple||n.multiple==null&&Array.isArray(i.value)),name:l,falseIcon:u.toRef(n,"falseIcon"),trueIcon:u.toRef(n,"trueIcon"),readonly:u.toRef(n,"readonly"),ripple:u.toRef(n,"ripple"),type:u.toRef(n,"type"),valueComparator:u.toRef(n,"valueComparator")}}),Me(()=>{var h;return u.createVNode("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":n.inline},n.class],style:n.style,role:n.type==="radio"?"radiogroup":void 0},[(h=t.default)==null?void 0:h.call(t)])}),{}}});const xT="",Do=Symbol("rippleStop"),Nv=80;function cc(n,e){n.style.transform=e,n.style.webkitTransform=e}function Ao(n){return n.constructor.name==="TouchEvent"}function dc(n){return n.constructor.name==="KeyboardEvent"}const zv=function(n,e){var b;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=0,s=0;if(!dc(n)){const g=e.getBoundingClientRect(),w=Ao(n)?n.touches[n.touches.length-1]:n;i=w.clientX-g.left,s=w.clientY-g.top}let o=0,l=.3;(b=e._ripple)!=null&&b.circle?(l=.15,o=e.clientWidth/2,o=t.center?o:o+Math.sqrt((i-o)**2+(s-o)**2)/4):o=Math.sqrt(e.clientWidth**2+e.clientHeight**2)/2;const c=`${(e.clientWidth-o*2)/2}px`,h=`${(e.clientHeight-o*2)/2}px`,f=t.center?c:`${i-o}px`,p=t.center?h:`${s-o}px`;return{radius:o,scale:l,x:f,y:p,centerX:c,centerY:h}},Xs={show(n,e){var w;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((w=e==null?void 0:e._ripple)!=null&&w.enabled))return;const i=document.createElement("span"),s=document.createElement("span");i.appendChild(s),i.className="v-ripple__container",t.class&&(i.className+=` ${t.class}`);const{radius:o,scale:l,x:c,y:h,centerX:f,centerY:p}=zv(n,e,t),b=`${o*2}px`;s.className="v-ripple__animation",s.style.width=b,s.style.height=b,e.appendChild(i);const g=window.getComputedStyle(e);g&&g.position==="static"&&(e.style.position="relative",e.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),cc(s,`translate(${c}, ${h}) scale3d(${l},${l},${l})`),s.dataset.activated=String(performance.now()),setTimeout(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),cc(s,`translate(${f}, ${p}) scale3d(1,1,1)`)},0)},hide(n){var o;if(!((o=n==null?void 0:n._ripple)!=null&&o.enabled))return;const e=n.getElementsByClassName("v-ripple__animation");if(e.length===0)return;const t=e[e.length-1];if(t.dataset.isHiding)return;t.dataset.isHiding="true";const i=performance.now()-Number(t.dataset.activated),s=Math.max(250-i,0);setTimeout(()=>{t.classList.remove("v-ripple__animation--in"),t.classList.add("v-ripple__animation--out"),setTimeout(()=>{var c;n.getElementsByClassName("v-ripple__animation").length===1&&n.dataset.previousPosition&&(n.style.position=n.dataset.previousPosition,delete n.dataset.previousPosition),((c=t.parentNode)==null?void 0:c.parentNode)===n&&n.removeChild(t.parentNode)},300)},s)}};function hc(n){return typeof n>"u"||!!n}function ss(n){const e={},t=n.currentTarget;if(!(!(t!=null&&t._ripple)||t._ripple.touched||n[Do])){if(n[Do]=!0,Ao(n))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(e.center=t._ripple.centered||dc(n),t._ripple.class&&(e.class=t._ripple.class),Ao(n)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{Xs.show(n,t,e)},t._ripple.showTimer=window.setTimeout(()=>{var i;(i=t==null?void 0:t._ripple)!=null&&i.showTimerCommit&&(t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null)},Nv)}else Xs.show(n,t,e)}}function fc(n){n[Do]=!0}function xt(n){const e=n.currentTarget;if(e!=null&&e._ripple){if(window.clearTimeout(e._ripple.showTimer),n.type==="touchend"&&e._ripple.showTimerCommit){e._ripple.showTimerCommit(),e._ripple.showTimerCommit=null,e._ripple.showTimer=window.setTimeout(()=>{xt(n)});return}window.setTimeout(()=>{e._ripple&&(e._ripple.touched=!1)}),Xs.hide(e)}}function mc(n){const e=n.currentTarget;e!=null&&e._ripple&&(e._ripple.showTimerCommit&&(e._ripple.showTimerCommit=null),window.clearTimeout(e._ripple.showTimer))}let rs=!1;function pc(n){!rs&&(n.keyCode===Jl.enter||n.keyCode===Jl.space)&&(rs=!0,ss(n))}function gc(n){rs=!1,xt(n)}function bc(n){rs&&(rs=!1,xt(n))}function vc(n,e,t){const{value:i,modifiers:s}=e,o=hc(i);if(o||Xs.hide(n),n._ripple=n._ripple??{},n._ripple.enabled=o,n._ripple.centered=s.center,n._ripple.circle=s.circle,to(i)&&i.class&&(n._ripple.class=i.class),o&&!t){if(s.stop){n.addEventListener("touchstart",fc,{passive:!0}),n.addEventListener("mousedown",fc);return}n.addEventListener("touchstart",ss,{passive:!0}),n.addEventListener("touchend",xt,{passive:!0}),n.addEventListener("touchmove",mc,{passive:!0}),n.addEventListener("touchcancel",xt),n.addEventListener("mousedown",ss),n.addEventListener("mouseup",xt),n.addEventListener("mouseleave",xt),n.addEventListener("keydown",pc),n.addEventListener("keyup",gc),n.addEventListener("blur",bc),n.addEventListener("dragstart",xt,{passive:!0})}else!o&&t&&wc(n)}function wc(n){n.removeEventListener("mousedown",ss),n.removeEventListener("touchstart",ss),n.removeEventListener("touchend",xt),n.removeEventListener("touchmove",mc),n.removeEventListener("touchcancel",xt),n.removeEventListener("mouseup",xt),n.removeEventListener("mouseleave",xt),n.removeEventListener("keydown",pc),n.removeEventListener("keyup",gc),n.removeEventListener("dragstart",xt),n.removeEventListener("blur",bc)}function Hv(n,e){vc(n,e,!1)}function Iv(n){delete n._ripple,wc(n)}function Bv(n,e){if(e.value===e.oldValue)return;const t=hc(e.oldValue);vc(n,e,t)}const Fo={mounted:Hv,unmounted:Iv,updated:Bv},yc=Y({label:String,trueValue:null,falseValue:null,value:null,...Ve(),...uc()},"VSelectionControl");function Wv(n){const e=u.inject(lc,void 0),{densityClasses:t}=bn(n),i=We(n,"modelValue"),s=u.computed(()=>n.trueValue!==void 0?n.trueValue:n.value!==void 0?n.value:!0),o=u.computed(()=>n.falseValue!==void 0?n.falseValue:!1),l=u.computed(()=>!!n.multiple||n.multiple==null&&Array.isArray(i.value)),c=u.computed({get(){const b=e?e.modelValue.value:i.value;return l.value?b.some(g=>n.valueComparator(g,s.value)):n.valueComparator(b,s.value)},set(b){if(n.readonly)return;const g=b?s.value:o.value;let w=g;l.value&&(w=b?[...Zt(i.value),g]:Zt(i.value).filter(E=>!n.valueComparator(E,s.value))),e?e.modelValue.value=w:i.value=w}}),{textColorClasses:h,textColorStyles:f}=xi(u.computed(()=>c.value&&!n.error&&!n.disabled?n.color:void 0)),p=u.computed(()=>c.value?n.trueIcon:n.falseIcon);return{group:e,densityClasses:t,trueValue:s,falseValue:o,model:c,textColorClasses:h,textColorStyles:f,icon:p}}const Cc=be()({name:"VSelectionControl",directives:{Ripple:Fo},inheritAttrs:!1,props:yc(),emits:{"update:modelValue":n=>!0},setup(n,e){let{attrs:t,slots:i}=e;const{group:s,densityClasses:o,icon:l,model:c,textColorClasses:h,textColorStyles:f,trueValue:p}=Wv(n),b=Ut(),g=u.computed(()=>n.id||`input-${b}`),w=u.shallowRef(!1),E=u.shallowRef(!1),x=u.ref();s==null||s.onForceUpdate(()=>{x.value&&(x.value.checked=c.value)});function _(L){w.value=!0,ln(L.target,":focus-visible")!==!1&&(E.value=!0)}function k(){w.value=!1,E.value=!1}function V(L){n.readonly&&s&&u.nextTick(()=>s.forceUpdate()),c.value=L.target.checked}return Me(()=>{var P,D;const L=i.label?i.label({label:n.label,props:{for:g.value}}):n.label,[F,H]=Ql(t),W=u.createVNode("input",u.mergeProps({ref:x,checked:c.value,disabled:!!(n.readonly||n.disabled),id:g.value,onBlur:k,onFocus:_,onInput:V,"aria-disabled":!!(n.readonly||n.disabled),type:n.type,value:p.value,name:n.name,"aria-checked":n.type==="checkbox"?c.value:void 0},H),null);return u.createVNode("div",u.mergeProps({class:["v-selection-control",{"v-selection-control--dirty":c.value,"v-selection-control--disabled":n.disabled,"v-selection-control--error":n.error,"v-selection-control--focused":w.value,"v-selection-control--focus-visible":E.value,"v-selection-control--inline":n.inline},o.value,n.class]},F,{style:n.style}),[u.createVNode("div",{class:["v-selection-control__wrapper",h.value],style:f.value},[(P=i.default)==null?void 0:P.call(i),u.withDirectives(u.createVNode("div",{class:["v-selection-control__input"]},[((D=i.input)==null?void 0:D.call(i,{model:c,textColorClasses:h,textColorStyles:f,inputNode:W,icon:l.value,props:{onFocus:_,onBlur:k,id:g.value}}))??u.createVNode(u.Fragment,null,[l.value&&u.createVNode(Et,{key:"icon",icon:l.value},null),W])]),[[u.resolveDirective("ripple"),n.ripple&&[!n.disabled&&!n.readonly,null,["center","circle"]]]])]),L&&u.createVNode(ac,{for:g.value,clickable:!0,onClick:I=>I.stopPropagation()},{default:()=>[L]})])}),{isFocused:w,input:x}}}),$v=Y({indeterminate:Boolean,indeterminateIcon:{type:$e,default:"$checkboxIndeterminate"},...yc({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),Ec=be()({name:"VCheckboxBtn",props:$v(),emits:{"update:modelValue":n=>!0,"update:indeterminate":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"indeterminate"),s=We(n,"modelValue");function o(h){i.value&&(i.value=!1)}const l=u.computed(()=>i.value?n.indeterminateIcon:n.falseIcon),c=u.computed(()=>i.value?n.indeterminateIcon:n.trueIcon);return Me(()=>{const h=an(Cc.filterProps(n)[0],["modelValue"]);return u.createVNode(Cc,u.mergeProps(h,{modelValue:s.value,"onUpdate:modelValue":[f=>s.value=f,o],class:["v-checkbox-btn",n.class],style:n.style,type:"checkbox",falseIcon:l.value,trueIcon:c.value,"aria-checked":i.value?"mixed":void 0}),t)}),{}}}),_T="";function xc(n){const{t:e}=js();function t(i){let{name:s}=i;const o={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],l=n[`onClick:${s}`],c=l&&o?e(`$vuetify.input.${o}`,n.label??""):void 0;return u.createVNode(Et,{icon:n[`${s}Icon`],"aria-label":c,onClick:l},null)}return{InputIcon:t}}const RT="",Gv=Y({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ve(),...pn({transition:{component:ic,leaveAbsolute:!0,group:!0}})},"VMessages"),Uv=be()({name:"VMessages",props:Gv(),setup(n,e){let{slots:t}=e;const i=u.computed(()=>Zt(n.messages)),{textColorClasses:s,textColorStyles:o}=xi(u.computed(()=>n.color));return Me(()=>u.createVNode(_i,{transition:n.transition,tag:"div",class:["v-messages",s.value,n.class],style:[o.value,n.style],role:"alert","aria-live":"polite"},{default:()=>[n.active&&i.value.map((l,c)=>u.createVNode("div",{class:"v-messages__message",key:`${c}-${i.value}`},[t.message?t.message({message:l}):l]))]})),{}}}),_c=Y({focused:Boolean,"onUpdate:focused":Qt()},"focus");function Rc(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();const t=We(n,"focused"),i=u.computed(()=>({[`${e}--focused`]:t.value}));function s(){t.value=!0}function o(){t.value=!1}return{focusClasses:i,isFocused:t,focus:s,blur:o}}const jv=Symbol.for("vuetify:form");function Po(){return u.inject(jv,null)}const Kv=Y({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,..._c()},"validation");function qv(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei(),t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ut();const i=We(n,"modelValue"),s=u.computed(()=>n.validationValue===void 0?i.value:n.validationValue),o=Po(),l=u.ref([]),c=u.shallowRef(!0),h=u.computed(()=>!!(Zt(i.value===""?null:i.value).length||Zt(s.value===""?null:s.value).length)),f=u.computed(()=>!!(n.disabled??(o==null?void 0:o.isDisabled.value))),p=u.computed(()=>!!(n.readonly??(o==null?void 0:o.isReadonly.value))),b=u.computed(()=>n.errorMessages.length?Zt(n.errorMessages).slice(0,Math.max(0,+n.maxErrors)):l.value),g=u.computed(()=>{let F=(n.validateOn??(o==null?void 0:o.validateOn.value))||"input";F==="lazy"&&(F="input lazy");const H=new Set((F==null?void 0:F.split(" "))??[]);return{blur:H.has("blur")||H.has("input"),input:H.has("input"),submit:H.has("submit"),lazy:H.has("lazy")}}),w=u.computed(()=>n.error||n.errorMessages.length?!1:n.rules.length?c.value?l.value.length||g.value.lazy?null:!0:!l.value.length:!0),E=u.shallowRef(!1),x=u.computed(()=>({[`${e}--error`]:w.value===!1,[`${e}--dirty`]:h.value,[`${e}--disabled`]:f.value,[`${e}--readonly`]:p.value})),_=u.computed(()=>n.name??u.unref(t));u.onBeforeMount(()=>{o==null||o.register({id:_.value,validate:L,reset:k,resetValidation:V})}),u.onBeforeUnmount(()=>{o==null||o.unregister(_.value)}),u.onMounted(async()=>{g.value.lazy||await L(!0),o==null||o.update(_.value,w.value,b.value)}),Hi(()=>g.value.input,()=>{u.watch(s,()=>{if(s.value!=null)L();else if(n.focused){const F=u.watch(()=>n.focused,H=>{H||L(),F()})}})}),Hi(()=>g.value.blur,()=>{u.watch(()=>n.focused,F=>{F||L()})}),u.watch(w,()=>{o==null||o.update(_.value,w.value,b.value)});function k(){i.value=null,u.nextTick(V)}function V(){c.value=!0,g.value.lazy?l.value=[]:L(!0)}async function L(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const H=[];E.value=!0;for(const W of n.rules){if(H.length>=+(n.maxErrors??1))break;const D=await(typeof W=="function"?W:()=>W)(s.value);if(D!==!0){if(D!==!1&&typeof D!="string"){console.warn(`${D} is not a valid value. Rule functions must return boolean true or a string.`);continue}H.push(D||"")}}return l.value=H,E.value=!1,c.value=F,l.value}return{errorMessages:b,isDirty:h,isDisabled:f,isReadonly:p,isPristine:c,isValid:w,isValidating:E,reset:k,resetValidation:V,validate:L,validationClasses:x}}const kc=Y({id:String,appendIcon:$e,centerAffix:{type:Boolean,default:!0},prependIcon:$e,hideDetails:[Boolean,String],hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},"onClick:prepend":Qt(),"onClick:append":Qt(),...Ve(),...gn(),...Kv()},"VInput"),Sc=be()({name:"VInput",props:{...kc()},emits:{"update:modelValue":n=>!0},setup(n,e){let{attrs:t,slots:i,emit:s}=e;const{densityClasses:o}=bn(n),{rtlClasses:l}=Zn(),{InputIcon:c}=xc(n),h=Ut(),f=u.computed(()=>n.id||`input-${h}`),p=u.computed(()=>`${f.value}-messages`),{errorMessages:b,isDirty:g,isDisabled:w,isReadonly:E,isPristine:x,isValid:_,isValidating:k,reset:V,resetValidation:L,validate:F,validationClasses:H}=qv(n,"v-input",f),W=u.computed(()=>({id:f,messagesId:p,isDirty:g,isDisabled:w,isReadonly:E,isPristine:x,isValid:_,isValidating:k,reset:V,resetValidation:L,validate:F})),P=u.computed(()=>{var D;return(D=n.errorMessages)!=null&&D.length||!x.value&&b.value.length?b.value:n.hint&&(n.persistentHint||n.focused)?n.hint:n.messages});return Me(()=>{var G,X,ee,ue;const D=!!(i.prepend||n.prependIcon),I=!!(i.append||n.appendIcon),Z=P.value.length>0,ie=!n.hideDetails||n.hideDetails==="auto"&&(Z||!!i.details);return u.createVNode("div",{class:["v-input",`v-input--${n.direction}`,{"v-input--center-affix":n.centerAffix},o.value,l.value,H.value,n.class],style:n.style},[D&&u.createVNode("div",{key:"prepend",class:"v-input__prepend"},[(G=i.prepend)==null?void 0:G.call(i,W.value),n.prependIcon&&u.createVNode(c,{key:"prepend-icon",name:"prepend"},null)]),i.default&&u.createVNode("div",{class:"v-input__control"},[(X=i.default)==null?void 0:X.call(i,W.value)]),I&&u.createVNode("div",{key:"append",class:"v-input__append"},[n.appendIcon&&u.createVNode(c,{key:"append-icon",name:"append"},null),(ee=i.append)==null?void 0:ee.call(i,W.value)]),ie&&u.createVNode("div",{class:"v-input__details"},[u.createVNode(Uv,{id:p.value,active:Z,messages:P.value},{message:i.message}),(ue=i.details)==null?void 0:ue.call(i,W.value)])])}),{reset:V,resetValidation:L,validate:F}}}),kT="",ST="",TT="",MT="";function Yv(n){return{aspectStyles:u.computed(()=>{const e=Number(n.aspectRatio);return e?{paddingBottom:String(1/e*100)+"%"}:void 0})}}const Tc=Y({aspectRatio:[String,Number],contentClass:String,inline:Boolean,...Ve(),...Xn()},"VResponsive"),Mc=be()({name:"VResponsive",props:Tc(),setup(n,e){let{slots:t}=e;const{aspectStyles:i}=Yv(n),{dimensionStyles:s}=Jn(n);return Me(()=>{var o;return u.createVNode("div",{class:["v-responsive",{"v-responsive--inline":n.inline},n.class],style:[s.value,n.style]},[u.createVNode("div",{class:"v-responsive__sizer",style:i.value},null),(o=t.additional)==null?void 0:o.call(t),t.default&&u.createVNode("div",{class:["v-responsive__content",n.contentClass]},[t.default()])])}),{}}});function Xv(n,e){if(!Zr)return;const t=e.modifiers||{},i=e.value,{handler:s,options:o}=typeof i=="object"?i:{handler:i,options:{}},l=new IntersectionObserver(function(){var b;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1?arguments[1]:void 0;const f=(b=n._observe)==null?void 0:b[e.instance.$.uid];if(!f)return;const p=c.some(g=>g.isIntersecting);s&&(!t.quiet||f.init)&&(!t.once||p||f.init)&&s(p,c,h),p&&t.once?Lc(n,e):f.init=!0},o);n._observe=Object(n._observe),n._observe[e.instance.$.uid]={init:!1,observer:l},l.observe(n)}function Lc(n,e){var i;const t=(i=n._observe)==null?void 0:i[e.instance.$.uid];t&&(t.observer.unobserve(n),delete n._observe[e.instance.$.uid])}const Dc={mounted:Xv,unmounted:Lc},Jv=Y({alt:String,cover:Boolean,eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},srcset:String,...Tc(),...Ve(),...pn()},"VImg"),Zv=be()({name:"VImg",directives:{intersect:Dc},props:Jv(),emits:{loadstart:n=>!0,load:n=>!0,error:n=>!0},setup(n,e){let{emit:t,slots:i}=e;const s=u.shallowRef(""),o=u.ref(),l=u.shallowRef(n.eager?"loading":"idle"),c=u.shallowRef(),h=u.shallowRef(),f=u.computed(()=>n.src&&typeof n.src=="object"?{src:n.src.src,srcset:n.srcset||n.src.srcset,lazySrc:n.lazySrc||n.src.lazySrc,aspect:Number(n.aspectRatio||n.src.aspect||0)}:{src:n.src,srcset:n.srcset,lazySrc:n.lazySrc,aspect:Number(n.aspectRatio||0)}),p=u.computed(()=>f.value.aspect||c.value/h.value||0);u.watch(()=>n.src,()=>{b(l.value!=="idle")}),u.watch(p,(D,I)=>{!D&&I&&o.value&&_(o.value)}),u.onBeforeMount(()=>b());function b(D){if(!(n.eager&&D)&&!(Zr&&!D&&!n.eager)){if(l.value="loading",f.value.lazySrc){const I=new Image;I.src=f.value.lazySrc,_(I,null)}f.value.src&&u.nextTick(()=>{var I,Z;if(t("loadstart",((I=o.value)==null?void 0:I.currentSrc)||f.value.src),(Z=o.value)!=null&&Z.complete){if(o.value.naturalWidth||w(),l.value==="error")return;p.value||_(o.value,null),g()}else p.value||_(o.value),E()})}}function g(){var D;E(),l.value="loaded",t("load",((D=o.value)==null?void 0:D.currentSrc)||f.value.src)}function w(){var D;l.value="error",t("error",((D=o.value)==null?void 0:D.currentSrc)||f.value.src)}function E(){const D=o.value;D&&(s.value=D.currentSrc||D.src)}let x=-1;function _(D){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const Z=()=>{clearTimeout(x);const{naturalHeight:ie,naturalWidth:G}=D;ie||G?(c.value=G,h.value=ie):!D.complete&&l.value==="loading"&&I!=null?x=window.setTimeout(Z,I):(D.currentSrc.endsWith(".svg")||D.currentSrc.startsWith("data:image/svg+xml"))&&(c.value=1,h.value=1)};Z()}const k=u.computed(()=>({"v-img__img--cover":n.cover,"v-img__img--contain":!n.cover})),V=()=>{var Z;if(!f.value.src||l.value==="idle")return null;const D=u.createVNode("img",{class:["v-img__img",k.value],src:f.value.src,srcset:f.value.srcset,alt:n.alt,sizes:n.sizes,ref:o,onLoad:g,onError:w},null),I=(Z=i.sources)==null?void 0:Z.call(i);return u.createVNode(_i,{transition:n.transition,appear:!0},{default:()=>[u.withDirectives(I?u.createVNode("picture",{class:"v-img__picture"},[I,D]):D,[[u.vShow,l.value==="loaded"]])]})},L=()=>u.createVNode(_i,{transition:n.transition},{default:()=>[f.value.lazySrc&&l.value!=="loaded"&&u.createVNode("img",{class:["v-img__img","v-img__img--preload",k.value],src:f.value.lazySrc,alt:n.alt},null)]}),F=()=>i.placeholder?u.createVNode(_i,{transition:n.transition,appear:!0},{default:()=>[(l.value==="loading"||l.value==="error"&&!i.error)&&u.createVNode("div",{class:"v-img__placeholder"},[i.placeholder()])]}):null,H=()=>i.error?u.createVNode(_i,{transition:n.transition,appear:!0},{default:()=>[l.value==="error"&&u.createVNode("div",{class:"v-img__error"},[i.error()])]}):null,W=()=>n.gradient?u.createVNode("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${n.gradient})`}},null):null,P=u.shallowRef(!1);{const D=u.watch(p,I=>{I&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{P.value=!0})}),D())})}return Me(()=>{const[D]=Mc.filterProps(n);return u.withDirectives(u.createVNode(Mc,u.mergeProps({class:["v-img",{"v-img--booting":!P.value},n.class],style:[{width:fe(n.width==="auto"?c.value:n.width)},n.style]},D,{aspectRatio:p.value,"aria-label":n.alt,role:n.alt?"img":void 0}),{additional:()=>u.createVNode(u.Fragment,null,[u.createVNode(V,null,null),u.createVNode(L,null,null),u.createVNode(W,null,null),u.createVNode(F,null,null),u.createVNode(H,null,null)]),default:i.default}),[[u.resolveDirective("intersect"),{handler:b,options:n.options},null,{once:!0}]])}),{currentSrc:s,image:o,state:l,naturalWidth:c,naturalHeight:h}}}),vn=Y({rounded:{type:[Boolean,Number,String],default:void 0}},"rounded");function wn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();return{roundedClasses:u.computed(()=>{const i=u.isRef(n)?n.value:n.rounded,s=[];if(i===!0||i==="")s.push(`${e}--rounded`);else if(typeof i=="string"||i===0)for(const o of String(i).split(" "))s.push(`rounded-${o}`);return s})}}const Qv=["elevated","flat","tonal","outlined","text","plain"];function Vo(n,e){return u.createVNode(u.Fragment,null,[n&&u.createVNode("span",{key:"overlay",class:`${e}__overlay`},null),u.createVNode("span",{key:"underlay",class:`${e}__underlay`},null)])}const os=Y({color:String,variant:{type:String,default:"elevated",validator:n=>Qv.includes(n)}},"variant");function Oo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();const t=u.computed(()=>{const{variant:o}=u.unref(n);return`${e}--variant-${o}`}),{colorClasses:i,colorStyles:s}=yo(u.computed(()=>{const{variant:o,color:l}=u.unref(n);return{[["elevated","flat"].includes(o)?"background":"text"]:l}}));return{colorClasses:i,colorStyles:s,variantClasses:t}}const ew=Y({start:Boolean,end:Boolean,icon:$e,image:String,...Ve(),...gn(),...vn(),...Mo(),...ui(),...Ft(),...os({variant:"flat"})},"VAvatar"),Js=be()({name:"VAvatar",props:ew(),setup(n,e){let{slots:t}=e;const{themeClasses:i}=ei(n),{colorClasses:s,colorStyles:o,variantClasses:l}=Oo(n),{densityClasses:c}=bn(n),{roundedClasses:h}=wn(n),{sizeClasses:f,sizeStyles:p}=Lo(n);return Me(()=>u.createVNode(n.tag,{class:["v-avatar",{"v-avatar--start":n.start,"v-avatar--end":n.end},i.value,s.value,c.value,h.value,f.value,l.value,n.class],style:[o.value,p.value,n.style]},{default:()=>{var b;return[n.image?u.createVNode(Zv,{key:"image",src:n.image,alt:"",cover:!0},null):n.icon?u.createVNode(Et,{key:"icon",icon:n.icon},null):(b=t.default)==null?void 0:b.call(t),Vo(!1,"v-avatar")]}})),{}}}),DT="",tw=Y({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),iw=Y({value:null,disabled:Boolean,selectedClass:String},"group-item");function nw(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const i=st("useGroupItem");if(!i)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=Ut();u.provide(Symbol.for(`${e.description}:id`),s);const o=u.inject(e,null);if(!o){if(!t)return o;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${e.description}`)}const l=u.toRef(n,"value"),c=u.computed(()=>!!(o.disabled.value||n.disabled));o.register({id:s,value:l,disabled:c},i),u.onBeforeUnmount(()=>{o.unregister(s)});const h=u.computed(()=>o.isSelected(s)),f=u.computed(()=>h.value&&[o.selectedClass.value,n.selectedClass]);return u.watch(h,p=>{i.emit("group:selected",{value:p})}),{id:s,isSelected:h,toggle:()=>o.select(s,!h.value),select:p=>o.select(s,p),selectedClass:f,value:l,disabled:c,group:o}}function sw(n,e){let t=!1;const i=u.reactive([]),s=We(n,"modelValue",[],g=>g==null?[]:Ac(i,Zt(g)),g=>{const w=ow(i,g);return n.multiple?w:w[0]}),o=st("useGroup");function l(g,w){const E=g,x=Symbol.for(`${e.description}:id`),k=Ds(x,o==null?void 0:o.vnode).indexOf(w);k>-1?i.splice(k,0,E):i.push(E)}function c(g){if(t)return;h();const w=i.findIndex(E=>E.id===g);i.splice(w,1)}function h(){const g=i.find(w=>!w.disabled);g&&n.mandatory==="force"&&!s.value.length&&(s.value=[g.id])}u.onMounted(()=>{h()}),u.onBeforeUnmount(()=>{t=!0});function f(g,w){const E=i.find(x=>x.id===g);if(!(w&&(E!=null&&E.disabled)))if(n.multiple){const x=s.value.slice(),_=x.findIndex(V=>V===g),k=~_;if(w=w??!k,k&&n.mandatory&&x.length<=1||!k&&n.max!=null&&x.length+1>n.max)return;_<0&&w?x.push(g):_>=0&&!w&&x.splice(_,1),s.value=x}else{const x=s.value.includes(g);if(n.mandatory&&x)return;s.value=w??!x?[g]:[]}}function p(g){if(n.multiple&&hn('This method is not supported when using "multiple" prop'),s.value.length){const w=s.value[0],E=i.findIndex(k=>k.id===w);let x=(E+g)%i.length,_=i[x];for(;_.disabled&&x!==E;)x=(x+g)%i.length,_=i[x];if(_.disabled)return;s.value=[i[x].id]}else{const w=i.find(E=>!E.disabled);w&&(s.value=[w.id])}}const b={register:l,unregister:c,selected:s,select:f,disabled:u.toRef(n,"disabled"),prev:()=>p(i.length-1),next:()=>p(1),isSelected:g=>s.value.includes(g),selectedClass:u.computed(()=>n.selectedClass),items:u.computed(()=>i),getItemIndex:g=>rw(i,g)};return u.provide(e,b),b}function rw(n,e){const t=Ac(n,[e]);return t.length?n.findIndex(i=>i.id===t[0]):-1}function Ac(n,e){const t=[];return e.forEach(i=>{const s=n.find(l=>rn(i,l.value)),o=n[i];(s==null?void 0:s.value)!=null?t.push(s.id):o!=null&&t.push(o.id)}),t}function ow(n,e){const t=[];return e.forEach(i=>{const s=n.findIndex(o=>o.id===i);if(~s){const o=n[s];t.push(o.value!=null?o.value:s)}}),t}const Fc=Symbol.for("vuetify:v-chip-group"),aw=Y({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:rn},...Ve(),...tw({selectedClass:"v-chip--selected"}),...ui(),...Ft(),...os({variant:"tonal"})},"VChipGroup");be()({name:"VChipGroup",props:aw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const{themeClasses:i}=ei(n),{isSelected:s,select:o,next:l,prev:c,selected:h}=sw(n,Fc);return Hs({VChip:{color:u.toRef(n,"color"),disabled:u.toRef(n,"disabled"),filter:u.toRef(n,"filter"),variant:u.toRef(n,"variant")}}),Me(()=>u.createVNode(n.tag,{class:["v-chip-group",{"v-chip-group--column":n.column},i.value,n.class],style:n.style},{default:()=>{var f;return[(f=t.default)==null?void 0:f.call(t,{isSelected:s,select:o,next:l,prev:c,selected:h.value})]}})),{}}});const No=Y({border:[Boolean,Number,String]},"border");function zo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();return{borderClasses:u.computed(()=>{const i=u.isRef(n)?n.value:n.border,s=[];if(i===!0||i==="")s.push(`${e}--border`);else if(typeof i=="string"||i===0)for(const o of String(i).split(" "))s.push(`border-${o}`);return s})}}const Ho=Y({elevation:{type:[Number,String],validator(n){const e=parseInt(n);return!isNaN(e)&&e>=0&&e<=24}}},"elevation");function Io(n){return{elevationClasses:u.computed(()=>{const t=u.isRef(n)?n.value:n.elevation,i=[];return t==null||i.push(`elevation-${t}`),i})}}const lw=Y({activeClass:String,appendAvatar:String,appendIcon:$e,closable:Boolean,closeIcon:{type:$e,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:String,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:$e,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:Qt(),onClickOnce:Qt(),...No(),...Ve(),...gn(),...Ho(),...iw(),...vn(),...Uu(),...Mo(),...ui({tag:"span"}),...Ft(),...os({variant:"tonal"})},"VChip"),Pc=be()({name:"VChip",directives:{Ripple:Fo},props:lw(),emits:{"click:close":n=>!0,"update:modelValue":n=>!0,"group:selected":n=>!0,click:n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const{t:o}=js(),{borderClasses:l}=zo(n),{colorClasses:c,colorStyles:h,variantClasses:f}=Oo(n),{densityClasses:p}=bn(n),{elevationClasses:b}=Io(n),{roundedClasses:g}=wn(n),{sizeClasses:w}=Lo(n),{themeClasses:E}=ei(n),x=We(n,"modelValue"),_=nw(n,Fc,!1),k=Gu(n,t),V=u.computed(()=>n.link!==!1&&k.isLink.value),L=u.computed(()=>!n.disabled&&n.link!==!1&&(!!_||n.link||k.isClickable.value)),F=u.computed(()=>({"aria-label":o(n.closeLabel),onClick(P){P.stopPropagation(),x.value=!1,i("click:close",P)}}));function H(P){var D;i("click",P),L.value&&((D=k.navigate)==null||D.call(k,P),_==null||_.toggle())}function W(P){(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),H(P))}return()=>{const P=k.isLink.value?"a":n.tag,D=!!(n.appendIcon||n.appendAvatar),I=!!(D||s.append),Z=!!(s.close||n.closable),ie=!!(s.filter||n.filter)&&_,G=!!(n.prependIcon||n.prependAvatar),X=!!(G||s.prepend),ee=!_||_.isSelected.value;return x.value&&u.withDirectives(u.createVNode(P,{class:["v-chip",{"v-chip--disabled":n.disabled,"v-chip--label":n.label,"v-chip--link":L.value,"v-chip--filter":ie,"v-chip--pill":n.pill},E.value,l.value,ee?c.value:void 0,p.value,b.value,g.value,w.value,f.value,_==null?void 0:_.selectedClass.value,n.class],style:[ee?h.value:void 0,n.style],disabled:n.disabled||void 0,draggable:n.draggable,href:k.href.value,tabindex:L.value?0:void 0,onClick:H,onKeydown:L.value&&!V.value&&W},{default:()=>{var ue;return[Vo(L.value,"v-chip"),ie&&u.createVNode(nc,{key:"filter"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-chip__filter"},[s.filter?u.createVNode(ti,{key:"filter-defaults",disabled:!n.filterIcon,defaults:{VIcon:{icon:n.filterIcon}}},s.filter):u.createVNode(Et,{key:"filter-icon",icon:n.filterIcon},null)]),[[u.vShow,_.isSelected.value]])]}),X&&u.createVNode("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?u.createVNode(ti,{key:"prepend-defaults",disabled:!G,defaults:{VAvatar:{image:n.prependAvatar,start:!0},VIcon:{icon:n.prependIcon,start:!0}}},s.prepend):u.createVNode(u.Fragment,null,[n.prependIcon&&u.createVNode(Et,{key:"prepend-icon",icon:n.prependIcon,start:!0},null),n.prependAvatar&&u.createVNode(Js,{key:"prepend-avatar",image:n.prependAvatar,start:!0},null)])]),u.createVNode("div",{class:"v-chip__content"},[((ue=s.default)==null?void 0:ue.call(s,{isSelected:_==null?void 0:_.isSelected.value,selectedClass:_==null?void 0:_.selectedClass.value,select:_==null?void 0:_.select,toggle:_==null?void 0:_.toggle,value:_==null?void 0:_.value.value,disabled:n.disabled}))??n.text]),I&&u.createVNode("div",{key:"append",class:"v-chip__append"},[s.append?u.createVNode(ti,{key:"append-defaults",disabled:!D,defaults:{VAvatar:{end:!0,image:n.appendAvatar},VIcon:{end:!0,icon:n.appendIcon}}},s.append):u.createVNode(u.Fragment,null,[n.appendIcon&&u.createVNode(Et,{key:"append-icon",end:!0,icon:n.appendIcon},null),n.appendAvatar&&u.createVNode(Js,{key:"append-avatar",end:!0,image:n.appendAvatar},null)])]),Z&&u.createVNode("div",u.mergeProps({key:"close",class:"v-chip__close"},F.value),[s.close?u.createVNode(ti,{key:"close-defaults",defaults:{VIcon:{icon:n.closeIcon,size:"x-small"}}},s.close):u.createVNode(Et,{key:"close-icon",icon:n.closeIcon,size:"x-small"},null)])]}}),[[u.resolveDirective("ripple"),L.value&&n.ripple,null]])}}}),AT="",Bo=Symbol.for("vuetify:list");function Vc(){const n=u.inject(Bo,{hasPrepend:u.shallowRef(!1),updateHasPrepend:()=>null}),e={hasPrepend:u.shallowRef(!1),updateHasPrepend:t=>{t&&(e.hasPrepend.value=t)}};return u.provide(Bo,e),n}function Oc(){return u.inject(Bo,null)}const uw={open:n=>{let{id:e,value:t,opened:i,parents:s}=n;if(t){const o=new Set;o.add(e);let l=s.get(e);for(;l!=null;)o.add(l),l=s.get(l);return o}else return i.delete(e),i},select:()=>null},Nc={open:n=>{let{id:e,value:t,opened:i,parents:s}=n;if(t){let o=s.get(e);for(i.add(e);o!=null&&o!==e;)i.add(o),o=s.get(o);return i}else i.delete(e);return i},select:()=>null},cw={open:Nc.open,select:n=>{let{id:e,value:t,opened:i,parents:s}=n;if(!t)return i;const o=[];let l=s.get(e);for(;l!=null;)o.push(l),l=s.get(l);return new Set(o)}},Wo=n=>{const e={select:t=>{let{id:i,value:s,selected:o}=t;if(i=u.toRaw(i),n&&!s){const l=Array.from(o.entries()).reduce((c,h)=>{let[f,p]=h;return p==="on"?[...c,f]:c},[]);if(l.length===1&&l[0]===i)return o}return o.set(i,s?"on":"off"),o},in:(t,i,s)=>{let o=new Map;for(const l of t||[])o=e.select({id:l,value:!0,selected:new Map(o),children:i,parents:s});return o},out:t=>{const i=[];for(const[s,o]of t.entries())o==="on"&&i.push(s);return i}};return e},zc=n=>{const e=Wo(n);return{select:i=>{let{selected:s,id:o,...l}=i;o=u.toRaw(o);const c=s.has(o)?new Map([[o,s.get(o)]]):new Map;return e.select({...l,id:o,selected:c})},in:(i,s,o)=>{let l=new Map;return i!=null&&i.length&&(l=e.in(i.slice(0,1),s,o)),l},out:(i,s,o)=>e.out(i,s,o)}},dw=n=>{const e=Wo(n);return{select:i=>{let{id:s,selected:o,children:l,...c}=i;return s=u.toRaw(s),l.has(s)?o:e.select({id:s,selected:o,children:l,...c})},in:e.in,out:e.out}},hw=n=>{const e=zc(n);return{select:i=>{let{id:s,selected:o,children:l,...c}=i;return s=u.toRaw(s),l.has(s)?o:e.select({id:s,selected:o,children:l,...c})},in:e.in,out:e.out}},fw=n=>{const e={select:t=>{let{id:i,value:s,selected:o,children:l,parents:c}=t;i=u.toRaw(i);const h=new Map(o),f=[i];for(;f.length;){const b=f.shift();o.set(b,s?"on":"off"),l.has(b)&&f.push(...l.get(b))}let p=c.get(i);for(;p;){const b=l.get(p),g=b.every(E=>o.get(E)==="on"),w=b.every(E=>!o.has(E)||o.get(E)==="off");o.set(p,g?"on":w?"off":"indeterminate"),p=c.get(p)}return n&&!s&&Array.from(o.entries()).reduce((g,w)=>{let[E,x]=w;return x==="on"?[...g,E]:g},[]).length===0?h:o},in:(t,i,s)=>{let o=new Map;for(const l of t||[])o=e.select({id:l,value:!0,selected:new Map(o),children:i,parents:s});return o},out:(t,i)=>{const s=[];for(const[o,l]of t.entries())l==="on"&&!i.has(o)&&s.push(o);return s}};return e},as=Symbol.for("vuetify:nested"),Hc={id:u.shallowRef(),root:{register:()=>null,unregister:()=>null,parents:u.ref(new Map),children:u.ref(new Map),open:()=>null,openOnSelect:()=>null,select:()=>null,opened:u.ref(new Set),selected:u.ref(new Map),selectedValues:u.ref([])}},mw=Y({selectStrategy:[String,Function],openStrategy:[String,Object],opened:Array,selected:Array,mandatory:Boolean},"nested"),pw=n=>{let e=!1;const t=u.ref(new Map),i=u.ref(new Map),s=We(n,"opened",n.opened,b=>new Set(b),b=>[...b.values()]),o=u.computed(()=>{if(typeof n.selectStrategy=="object")return n.selectStrategy;switch(n.selectStrategy){case"single-leaf":return hw(n.mandatory);case"leaf":return dw(n.mandatory);case"independent":return Wo(n.mandatory);case"single-independent":return zc(n.mandatory);case"classic":default:return fw(n.mandatory)}}),l=u.computed(()=>{if(typeof n.openStrategy=="object")return n.openStrategy;switch(n.openStrategy){case"list":return cw;case"single":return uw;case"multiple":default:return Nc}}),c=We(n,"selected",n.selected,b=>o.value.in(b,t.value,i.value),b=>o.value.out(b,t.value,i.value));u.onBeforeUnmount(()=>{e=!0});function h(b){const g=[];let w=b;for(;w!=null;)g.unshift(w),w=i.value.get(w);return g}const f=st("nested"),p={id:u.shallowRef(),root:{opened:s,selected:c,selectedValues:u.computed(()=>{const b=[];for(const[g,w]of c.value.entries())w==="on"&&b.push(g);return b}),register:(b,g,w)=>{g&&b!==g&&i.value.set(b,g),w&&t.value.set(b,[]),g!=null&&t.value.set(g,[...t.value.get(g)||[],b])},unregister:b=>{if(e)return;t.value.delete(b);const g=i.value.get(b);if(g){const w=t.value.get(g)??[];t.value.set(g,w.filter(E=>E!==b))}i.value.delete(b),s.value.delete(b)},open:(b,g,w)=>{f.emit("click:open",{id:b,value:g,path:h(b),event:w});const E=l.value.open({id:b,value:g,opened:new Set(s.value),children:t.value,parents:i.value,event:w});E&&(s.value=E)},openOnSelect:(b,g,w)=>{const E=l.value.select({id:b,value:g,selected:new Map(c.value),opened:new Set(s.value),children:t.value,parents:i.value,event:w});E&&(s.value=E)},select:(b,g,w)=>{f.emit("click:select",{id:b,value:g,path:h(b),event:w});const E=o.value.select({id:b,value:g,selected:new Map(c.value),children:t.value,parents:i.value,event:w});E&&(c.value=E),p.root.openOnSelect(b,g,w)},children:t,parents:i}};return u.provide(as,p),p.root},Ic=(n,e)=>{const t=u.inject(as,Hc),i=Symbol(Ut()),s=u.computed(()=>n.value!==void 0?n.value:i),o={...t,id:s,open:(l,c)=>t.root.open(s.value,l,c),openOnSelect:(l,c)=>t.root.openOnSelect(s.value,l,c),isOpen:u.computed(()=>t.root.opened.value.has(s.value)),parent:u.computed(()=>t.root.parents.value.get(s.value)),select:(l,c)=>t.root.select(s.value,l,c),isSelected:u.computed(()=>t.root.selected.value.get(u.toRaw(s.value))==="on"),isIndeterminate:u.computed(()=>t.root.selected.value.get(s.value)==="indeterminate"),isLeaf:u.computed(()=>!t.root.children.value.get(s.value)),isGroupActivator:t.isGroupActivator};return!t.isGroupActivator&&t.root.register(s.value,t.id.value,e),u.onBeforeUnmount(()=>{!t.isGroupActivator&&t.root.unregister(s.value)}),e&&u.provide(as,o),o},gw=()=>{const n=u.inject(as,Hc);u.provide(as,{...n,isGroupActivator:!0})};function bw(){const n=u.shallowRef(!1);return u.onMounted(()=>{window.requestAnimationFrame(()=>{n.value=!0})}),{ssrBootStyles:u.computed(()=>n.value?void 0:{transition:"none !important"}),isBooted:u.readonly(n)}}const vw=mn({name:"VListGroupActivator",setup(n,e){let{slots:t}=e;return gw(),()=>{var i;return(i=t.default)==null?void 0:i.call(t)}}}),ww=Y({activeColor:String,baseColor:String,color:String,collapseIcon:{type:$e,default:"$collapse"},expandIcon:{type:$e,default:"$expand"},prependIcon:$e,appendIcon:$e,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ve(),...ui()},"VListGroup"),Bc=be()({name:"VListGroup",props:ww(),setup(n,e){let{slots:t}=e;const{isOpen:i,open:s,id:o}=Ic(u.toRef(n,"value"),!0),l=u.computed(()=>`v-list-group--id-${String(o.value)}`),c=Oc(),{isBooted:h}=bw();function f(w){s(!i.value,w)}const p=u.computed(()=>({onClick:f,class:"v-list-group__header",id:l.value})),b=u.computed(()=>i.value?n.collapseIcon:n.expandIcon),g=u.computed(()=>({VListItem:{active:i.value,activeColor:n.activeColor,baseColor:n.baseColor,color:n.color,prependIcon:n.prependIcon||n.subgroup&&b.value,appendIcon:n.appendIcon||!n.subgroup&&b.value,title:n.title,value:n.value}}));return Me(()=>u.createVNode(n.tag,{class:["v-list-group",{"v-list-group--prepend":c==null?void 0:c.hasPrepend.value,"v-list-group--fluid":n.fluid,"v-list-group--subgroup":n.subgroup,"v-list-group--open":i.value},n.class],style:n.style},{default:()=>[t.activator&&u.createVNode(ti,{defaults:g.value},{default:()=>[u.createVNode(vw,null,{default:()=>[t.activator({props:p.value,isOpen:i.value})]})]}),u.createVNode(_i,{transition:{component:Gb},disabled:!h.value},{default:()=>{var w;return[u.withDirectives(u.createVNode("div",{class:"v-list-group__items",role:"group","aria-labelledby":l.value},[(w=t.default)==null?void 0:w.call(t)]),[[u.vShow,i.value]])]}})]})),{}}}),FT="",yw=ku("v-list-item-subtitle"),Cw=ku("v-list-item-title"),Ew=Y({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:$e,baseColor:String,disabled:Boolean,lines:String,link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:$e,ripple:{type:[Boolean,Object],default:!0},subtitle:[String,Number,Boolean],title:[String,Number,Boolean],value:null,onClick:Qt(),onClickOnce:Qt(),...No(),...Ve(),...gn(),...Xn(),...Ho(),...vn(),...Uu(),...ui(),...Ft(),...os({variant:"text"})},"VListItem"),yn=be()({name:"VListItem",directives:{Ripple:Fo},props:Ew(),emits:{click:n=>!0},setup(n,e){let{attrs:t,slots:i,emit:s}=e;const o=Gu(n,t),l=u.computed(()=>n.value===void 0?o.href.value:n.value),{select:c,isSelected:h,isIndeterminate:f,isGroupActivator:p,root:b,parent:g,openOnSelect:w}=Ic(l,!1),E=Oc(),x=u.computed(()=>{var $;return n.active!==!1&&(n.active||(($=o.isActive)==null?void 0:$.value)||h.value)}),_=u.computed(()=>n.link!==!1&&o.isLink.value),k=u.computed(()=>!n.disabled&&n.link!==!1&&(n.link||o.isClickable.value||n.value!=null&&!!E)),V=u.computed(()=>n.rounded||n.nav),L=u.computed(()=>n.color??n.activeColor),F=u.computed(()=>({color:x.value?L.value??n.baseColor:n.baseColor,variant:n.variant}));u.watch(()=>{var $;return($=o.isActive)==null?void 0:$.value},$=>{$&&g.value!=null&&b.open(g.value,!0),$&&w($)},{immediate:!0});const{themeClasses:H}=ei(n),{borderClasses:W}=zo(n),{colorClasses:P,colorStyles:D,variantClasses:I}=Oo(F),{densityClasses:Z}=bn(n),{dimensionStyles:ie}=Jn(n),{elevationClasses:G}=Io(n),{roundedClasses:X}=wn(V),ee=u.computed(()=>n.lines?`v-list-item--${n.lines}-line`:void 0),ue=u.computed(()=>({isActive:x.value,select:c,isSelected:h.value,isIndeterminate:f.value}));function Re($){var Q;s("click",$),!(p||!k.value)&&((Q=o.navigate)==null||Q.call(o,$),n.value!=null&&c(!h.value,$))}function U($){($.key==="Enter"||$.key===" ")&&($.preventDefault(),Re($))}return Me(()=>{const $=_.value?"a":n.tag,Q=i.title||n.title,me=i.subtitle||n.subtitle,ye=!!(n.appendAvatar||n.appendIcon),Ce=!!(ye||i.append),Ie=!!(n.prependAvatar||n.prependIcon),De=!!(Ie||i.prepend);return E==null||E.updateHasPrepend(De),n.activeColor&&Og("active-color",["color","base-color"]),u.withDirectives(u.createVNode($,{class:["v-list-item",{"v-list-item--active":x.value,"v-list-item--disabled":n.disabled,"v-list-item--link":k.value,"v-list-item--nav":n.nav,"v-list-item--prepend":!De&&(E==null?void 0:E.hasPrepend.value),[`${n.activeClass}`]:n.activeClass&&x.value},H.value,W.value,P.value,Z.value,G.value,ee.value,X.value,I.value,n.class],style:[D.value,ie.value,n.style],href:o.href.value,tabindex:k.value?E?-2:0:void 0,onClick:Re,onKeydown:k.value&&!_.value&&U},{default:()=>{var ze;return[Vo(k.value||x.value,"v-list-item"),De&&u.createVNode("div",{key:"prepend",class:"v-list-item__prepend"},[i.prepend?u.createVNode(ti,{key:"prepend-defaults",disabled:!Ie,defaults:{VAvatar:{density:n.density,image:n.prependAvatar},VIcon:{density:n.density,icon:n.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var xe;return[(xe=i.prepend)==null?void 0:xe.call(i,ue.value)]}}):u.createVNode(u.Fragment,null,[n.prependAvatar&&u.createVNode(Js,{key:"prepend-avatar",density:n.density,image:n.prependAvatar},null),n.prependIcon&&u.createVNode(Et,{key:"prepend-icon",density:n.density,icon:n.prependIcon},null)]),u.createVNode("div",{class:"v-list-item__spacer"},null)]),u.createVNode("div",{class:"v-list-item__content","data-no-activator":""},[Q&&u.createVNode(Cw,{key:"title"},{default:()=>{var xe;return[((xe=i.title)==null?void 0:xe.call(i,{title:n.title}))??n.title]}}),me&&u.createVNode(yw,{key:"subtitle"},{default:()=>{var xe;return[((xe=i.subtitle)==null?void 0:xe.call(i,{subtitle:n.subtitle}))??n.subtitle]}}),(ze=i.default)==null?void 0:ze.call(i,ue.value)]),Ce&&u.createVNode("div",{key:"append",class:"v-list-item__append"},[i.append?u.createVNode(ti,{key:"append-defaults",disabled:!ye,defaults:{VAvatar:{density:n.density,image:n.appendAvatar},VIcon:{density:n.density,icon:n.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var xe;return[(xe=i.append)==null?void 0:xe.call(i,ue.value)]}}):u.createVNode(u.Fragment,null,[n.appendIcon&&u.createVNode(Et,{key:"append-icon",density:n.density,icon:n.appendIcon},null),n.appendAvatar&&u.createVNode(Js,{key:"append-avatar",density:n.density,image:n.appendAvatar},null)]),u.createVNode("div",{class:"v-list-item__spacer"},null)])]}}),[[u.resolveDirective("ripple"),k.value&&n.ripple]])}),{}}}),xw=Y({color:String,inset:Boolean,sticky:Boolean,title:String,...Ve(),...ui()},"VListSubheader"),_w=be()({name:"VListSubheader",props:xw(),setup(n,e){let{slots:t}=e;const{textColorClasses:i,textColorStyles:s}=xi(u.toRef(n,"color"));return Me(()=>{const o=!!(t.default||n.title);return u.createVNode(n.tag,{class:["v-list-subheader",{"v-list-subheader--inset":n.inset,"v-list-subheader--sticky":n.sticky},i.value,n.class],style:[{textColorStyles:s},n.style]},{default:()=>{var l;return[o&&u.createVNode("div",{class:"v-list-subheader__text"},[((l=t.default)==null?void 0:l.call(t))??n.title])]}})}),{}}}),PT="",Rw=Y({color:String,inset:Boolean,length:[Number,String],thickness:[Number,String],vertical:Boolean,...Ve(),...Ft()},"VDivider"),kw=be()({name:"VDivider",props:Rw(),setup(n,e){let{attrs:t}=e;const{themeClasses:i}=ei(n),{textColorClasses:s,textColorStyles:o}=xi(u.toRef(n,"color")),l=u.computed(()=>{const c={};return n.length&&(c[n.vertical?"maxHeight":"maxWidth"]=fe(n.length)),n.thickness&&(c[n.vertical?"borderRightWidth":"borderTopWidth"]=fe(n.thickness)),c});return Me(()=>u.createVNode("hr",{class:[{"v-divider":!0,"v-divider--inset":n.inset,"v-divider--vertical":n.vertical},i.value,s.value,n.class],style:[l.value,o.value,n.style],"aria-orientation":!t.role||t.role==="separator"?n.vertical?"vertical":"horizontal":void 0,role:`${t.role||"separator"}`},null)),{}}}),Sw=Y({items:Array},"VListChildren"),Wc=be()({name:"VListChildren",props:Sw(),setup(n,e){let{slots:t}=e;return Vc(),()=>{var i,s;return((i=t.default)==null?void 0:i.call(t))??((s=n.items)==null?void 0:s.map(o=>{var w,E;let{children:l,props:c,type:h,raw:f}=o;if(h==="divider")return((w=t.divider)==null?void 0:w.call(t,{props:c}))??u.createVNode(kw,c,null);if(h==="subheader")return((E=t.subheader)==null?void 0:E.call(t,{props:c}))??u.createVNode(_w,c,null);const p={subtitle:t.subtitle?x=>{var _;return(_=t.subtitle)==null?void 0:_.call(t,{...x,item:f})}:void 0,prepend:t.prepend?x=>{var _;return(_=t.prepend)==null?void 0:_.call(t,{...x,item:f})}:void 0,append:t.append?x=>{var _;return(_=t.append)==null?void 0:_.call(t,{...x,item:f})}:void 0,title:t.title?x=>{var _;return(_=t.title)==null?void 0:_.call(t,{...x,item:f})}:void 0},[b,g]=Bc.filterProps(c);return l?u.createVNode(Bc,u.mergeProps({value:c==null?void 0:c.value},b),{activator:x=>{let{props:_}=x;return t.header?t.header({props:{...c,..._}}):u.createVNode(yn,u.mergeProps(c,_),p)},default:()=>u.createVNode(Wc,{items:l},t)}):t.item?t.item({props:c}):u.createVNode(yn,c,p)}))}}}),$c=Y({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},returnObject:Boolean},"list-items");function Gc(n,e){const t=ht(e,n.itemTitle,e),i=n.returnObject?e:ht(e,n.itemValue,t),s=ht(e,n.itemChildren),o=n.itemProps===!0?typeof e=="object"&&e!=null&&!Array.isArray(e)?"children"in e?on(e,["children"])[1]:e:void 0:ht(e,n.itemProps),l={title:t,value:i,...o};return{title:String(l.title??""),value:l.value,props:l,children:Array.isArray(s)?Uc(n,s):void 0,raw:e}}function Uc(n,e){const t=[];for(const i of e)t.push(Gc(n,i));return t}function jc(n){const e=u.computed(()=>Uc(n,n.items));return Tw(e,t=>Gc(n,t))}function Tw(n,e){function t(s){return s.filter(o=>o!==null||n.value.some(l=>l.value===null)).map(o=>n.value.find(c=>rn(o,c.value))??e(o))}function i(s){return s.map(o=>{let{value:l}=o;return l})}return{items:n,transformIn:t,transformOut:i}}function Mw(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function Lw(n,e){const t=ht(e,n.itemType,"item"),i=Mw(e)?e:ht(e,n.itemTitle),s=ht(e,n.itemValue,void 0),o=ht(e,n.itemChildren),l=n.itemProps===!0?on(e,["children"])[1]:ht(e,n.itemProps),c={title:i,value:s,...l};return{type:t,title:c.title,value:c.value,props:c,children:t==="item"&&o?Kc(n,o):void 0,raw:e}}function Kc(n,e){const t=[];for(const i of e)t.push(Lw(n,i));return t}function Dw(n){return{items:u.computed(()=>Kc(n,n.items))}}const Aw=Y({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,lines:{type:[Boolean,String],default:"one"},nav:Boolean,...mw({selectStrategy:"single-leaf",openStrategy:"list"}),...No(),...Ve(),...gn(),...Xn(),...Ho(),itemType:{type:String,default:"type"},...$c(),...vn(),...ui(),...Ft(),...os({variant:"text"})},"VList"),qc=be()({name:"VList",props:Aw(),emits:{"update:selected":n=>!0,"update:opened":n=>!0,"click:open":n=>!0,"click:select":n=>!0},setup(n,e){let{slots:t}=e;const{items:i}=Dw(n),{themeClasses:s}=ei(n),{backgroundColorClasses:o,backgroundColorStyles:l}=Yn(u.toRef(n,"bgColor")),{borderClasses:c}=zo(n),{densityClasses:h}=bn(n),{dimensionStyles:f}=Jn(n),{elevationClasses:p}=Io(n),{roundedClasses:b}=wn(n),{open:g,select:w}=pw(n),E=u.computed(()=>n.lines?`v-list--${n.lines}-line`:void 0),x=u.toRef(n,"activeColor"),_=u.toRef(n,"baseColor"),k=u.toRef(n,"color");Vc(),Hs({VListGroup:{activeColor:x,baseColor:_,color:k},VListItem:{activeClass:u.toRef(n,"activeClass"),activeColor:x,baseColor:_,color:k,density:u.toRef(n,"density"),disabled:u.toRef(n,"disabled"),lines:u.toRef(n,"lines"),nav:u.toRef(n,"nav"),variant:u.toRef(n,"variant")}});const V=u.shallowRef(!1),L=u.ref();function F(I){V.value=!0}function H(I){V.value=!1}function W(I){var Z;!V.value&&!(I.relatedTarget&&((Z=L.value)!=null&&Z.contains(I.relatedTarget)))&&D()}function P(I){if(L.value){if(I.key==="ArrowDown")D("next");else if(I.key==="ArrowUp")D("prev");else if(I.key==="Home")D("first");else if(I.key==="End")D("last");else return;I.preventDefault()}}function D(I){if(L.value)return Fs(L.value,I)}return Me(()=>u.createVNode(n.tag,{ref:L,class:["v-list",{"v-list--disabled":n.disabled,"v-list--nav":n.nav},s.value,o.value,c.value,h.value,p.value,E.value,b.value,n.class],style:[l.value,f.value,n.style],tabindex:n.disabled||V.value?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:F,onFocusout:H,onFocus:W,onKeydown:P},{default:()=>[u.createVNode(Wc,{items:i.value},t)]})),{open:g,select:w,focus:D}}}),VT="",OT="",NT="",Fw=Y({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ve(),...pn({transition:{component:ic}})},"VCounter"),Pw=be()({name:"VCounter",functional:!0,props:Fw(),setup(n,e){let{slots:t}=e;const i=u.computed(()=>n.max?`${n.value} / ${n.max}`:String(n.value));return Me(()=>u.createVNode(_i,{transition:n.transition},{default:()=>[u.withDirectives(u.createVNode("div",{class:["v-counter",n.class],style:n.style},[t.default?t.default({counter:i.value,max:n.max,value:n.value}):i.value]),[[u.vShow,n.active]])]})),{}}}),zT="",Vw=Y({floating:Boolean,...Ve()},"VFieldLabel"),Zs=be()({name:"VFieldLabel",props:Vw(),setup(n,e){let{slots:t}=e;return Me(()=>u.createVNode(ac,{class:["v-field-label",{"v-field-label--floating":n.floating},n.class],style:n.style,"aria-hidden":n.floating||void 0},t)),{}}}),HT="";function Ow(n,e){const t=u.ref(),i=u.shallowRef(!1);if(Zr){const s=new IntersectionObserver(o=>{n==null||n(o,s),i.value=!!o.find(l=>l.isIntersecting)},e);u.onBeforeUnmount(()=>{s.disconnect()}),u.watch(t,(o,l)=>{l&&(s.unobserve(l),i.value=!1),o&&s.observe(o)},{flush:"post"})}return{intersectionRef:t,isIntersecting:i}}const Yc={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Nw=Y({location:String},"location");function zw(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2?arguments[2]:void 0;const{isRtl:i}=Zn();return{locationStyles:u.computed(()=>{if(!n.location)return{};const{side:o,align:l}=ao(n.location.split(" ").length>1?n.location:`${n.location} center`,i.value);function c(f){return t?t(f):0}const h={};return o!=="center"&&(e?h[Yc[o]]=`calc(100% - ${c(o)}px)`:h[o]=0),l!=="center"?e?h[Yc[l]]=`calc(100% - ${c(l)}px)`:h[l]=0:(o==="center"?h.top=h.left="50%":h[{top:"left",bottom:"left",left:"top",right:"top"}[o]]="50%",h.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[o]),h})}}const Hw=Y({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...Ve(),...Nw({location:"top"}),...vn(),...ui(),...Ft()},"VProgressLinear"),Iw=be()({name:"VProgressLinear",props:Hw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{isRtl:s,rtlClasses:o}=Zn(),{themeClasses:l}=ei(n),{locationStyles:c}=zw(n),{textColorClasses:h,textColorStyles:f}=xi(n,"color"),{backgroundColorClasses:p,backgroundColorStyles:b}=Yn(u.computed(()=>n.bgColor||n.color)),{backgroundColorClasses:g,backgroundColorStyles:w}=Yn(n,"color"),{roundedClasses:E}=wn(n),{intersectionRef:x,isIntersecting:_}=Ow(),k=u.computed(()=>parseInt(n.max,10)),V=u.computed(()=>parseInt(n.height,10)),L=u.computed(()=>parseFloat(n.bufferValue)/k.value*100),F=u.computed(()=>parseFloat(i.value)/k.value*100),H=u.computed(()=>s.value!==n.reverse),W=u.computed(()=>n.indeterminate?"fade-transition":"slide-x-transition"),P=u.computed(()=>n.bgOpacity==null?n.bgOpacity:parseFloat(n.bgOpacity));function D(I){if(!x.value)return;const{left:Z,right:ie,width:G}=x.value.getBoundingClientRect(),X=H.value?G-I.clientX+(ie-G):I.clientX-Z;i.value=Math.round(X/G*k.value)}return Me(()=>u.createVNode(n.tag,{ref:x,class:["v-progress-linear",{"v-progress-linear--absolute":n.absolute,"v-progress-linear--active":n.active&&_.value,"v-progress-linear--reverse":H.value,"v-progress-linear--rounded":n.rounded,"v-progress-linear--rounded-bar":n.roundedBar,"v-progress-linear--striped":n.striped},E.value,l.value,o.value,n.class],style:[{bottom:n.location==="bottom"?0:void 0,top:n.location==="top"?0:void 0,height:n.active?fe(V.value):0,"--v-progress-linear-height":fe(V.value),...c.value},n.style],role:"progressbar","aria-hidden":n.active?"false":"true","aria-valuemin":"0","aria-valuemax":n.max,"aria-valuenow":n.indeterminate?void 0:F.value,onClick:n.clickable&&D},{default:()=>[n.stream&&u.createVNode("div",{key:"stream",class:["v-progress-linear__stream",h.value],style:{...f.value,[H.value?"left":"right"]:fe(-V.value),borderTop:`${fe(V.value/2)} dotted`,opacity:P.value,top:`calc(50% - ${fe(V.value/4)})`,width:fe(100-L.value,"%"),"--v-progress-linear-stream-to":fe(V.value*(H.value?1:-1))}},null),u.createVNode("div",{class:["v-progress-linear__background",p.value],style:[b.value,{opacity:P.value,width:fe(n.stream?L.value:100,"%")}]},null),u.createVNode(u.Transition,{name:W.value},{default:()=>[n.indeterminate?u.createVNode("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(I=>u.createVNode("div",{key:I,class:["v-progress-linear__indeterminate",I,g.value],style:w.value},null))]):u.createVNode("div",{class:["v-progress-linear__determinate",g.value],style:[w.value,{width:fe(F.value,"%")}]},null)]}),t.default&&u.createVNode("div",{class:"v-progress-linear__content"},[t.default({value:F.value,buffer:L.value})])]})),{}}}),Bw=Y({loading:[Boolean,String]},"loader");function Ww(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei();return{loaderClasses:u.computed(()=>({[`${e}--loading`]:n.loading}))}}function $w(n,e){var i;let{slots:t}=e;return u.createVNode("div",{class:`${n.name}__loader`},[((i=t.default)==null?void 0:i.call(t,{color:n.color,isActive:n.active}))||u.createVNode(Iw,{active:n.active,color:n.color,height:"2",indeterminate:!0},null)])}const Gw=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Xc=Y({appendInnerIcon:$e,bgColor:String,clearable:Boolean,clearIcon:{type:$e,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:$e,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:n=>Gw.includes(n)},"onClick:clear":Qt(),"onClick:appendInner":Qt(),"onClick:prependInner":Qt(),...Ve(),...Bw(),...vn(),...Ft()},"VField"),Jc=be()({name:"VField",inheritAttrs:!1,props:{id:String,..._c(),...Xc()},emits:{"update:focused":n=>!0,"update:modelValue":n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const{themeClasses:o}=ei(n),{loaderClasses:l}=Ww(n),{focusClasses:c,isFocused:h,focus:f,blur:p}=Rc(n),{InputIcon:b}=xc(n),{roundedClasses:g}=wn(n),{rtlClasses:w}=Zn(),E=u.computed(()=>n.dirty||n.active),x=u.computed(()=>!n.singleLine&&!!(n.label||s.label)),_=Ut(),k=u.computed(()=>n.id||`input-${_}`),V=u.computed(()=>`${k.value}-messages`),L=u.ref(),F=u.ref(),H=u.ref(),W=u.computed(()=>["plain","underlined"].includes(n.variant)),{backgroundColorClasses:P,backgroundColorStyles:D}=Yn(u.toRef(n,"bgColor")),{textColorClasses:I,textColorStyles:Z}=xi(u.computed(()=>n.error||n.disabled?void 0:E.value&&h.value?n.color:n.baseColor));u.watch(E,X=>{if(x.value){const ee=L.value.$el,ue=F.value.$el;requestAnimationFrame(()=>{const Re=co(ee),U=ue.getBoundingClientRect(),$=U.x-Re.x,Q=U.y-Re.y-(Re.height/2-U.height/2),me=U.width/.75,ye=Math.abs(me-Re.width)>1?{maxWidth:fe(me)}:void 0,Ce=getComputedStyle(ee),Ie=getComputedStyle(ue),De=parseFloat(Ce.transitionDuration)*1e3||150,ze=parseFloat(Ie.getPropertyValue("--v-field-label-scale")),xe=Ie.getPropertyValue("color");ee.style.visibility="visible",ue.style.visibility="hidden",cn(ee,{transform:`translate(${$}px, ${Q}px) scale(${ze})`,color:xe,...ye},{duration:De,easing:Is,direction:X?"normal":"reverse"}).finished.then(()=>{ee.style.removeProperty("visibility"),ue.style.removeProperty("visibility")})})}},{flush:"post"});const ie=u.computed(()=>({isActive:E,isFocused:h,controlRef:H,blur:p,focus:f}));function G(X){X.target!==document.activeElement&&X.preventDefault()}return Me(()=>{var $,Q,me;const X=n.variant==="outlined",ee=s["prepend-inner"]||n.prependInnerIcon,ue=!!(n.clearable||s.clear),Re=!!(s["append-inner"]||n.appendInnerIcon||ue),U=s.label?s.label({...ie.value,label:n.label,props:{for:k.value}}):n.label;return u.createVNode("div",u.mergeProps({class:["v-field",{"v-field--active":E.value,"v-field--appended":Re,"v-field--center-affix":n.centerAffix??!W.value,"v-field--disabled":n.disabled,"v-field--dirty":n.dirty,"v-field--error":n.error,"v-field--flat":n.flat,"v-field--has-background":!!n.bgColor,"v-field--persistent-clear":n.persistentClear,"v-field--prepended":ee,"v-field--reverse":n.reverse,"v-field--single-line":n.singleLine,"v-field--no-label":!U,[`v-field--variant-${n.variant}`]:!0},o.value,P.value,c.value,l.value,g.value,w.value,n.class],style:[D.value,n.style],onClick:G},t),[u.createVNode("div",{class:"v-field__overlay"},null),u.createVNode($w,{name:"v-field",active:!!n.loading,color:n.error?"error":typeof n.loading=="string"?n.loading:n.color},{default:s.loader}),ee&&u.createVNode("div",{key:"prepend",class:"v-field__prepend-inner"},[n.prependInnerIcon&&u.createVNode(b,{key:"prepend-icon",name:"prependInner"},null),($=s["prepend-inner"])==null?void 0:$.call(s,ie.value)]),u.createVNode("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(n.variant)&&x.value&&u.createVNode(Zs,{key:"floating-label",ref:F,class:[I.value],floating:!0,for:k.value,style:Z.value},{default:()=>[U]}),u.createVNode(Zs,{ref:L,for:k.value},{default:()=>[U]}),(Q=s.default)==null?void 0:Q.call(s,{...ie.value,props:{id:k.value,class:"v-field__input","aria-describedby":V.value},focus:f,blur:p})]),ue&&u.createVNode(nc,{key:"clear"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-field__clearable",onMousedown:ye=>{ye.preventDefault(),ye.stopPropagation()}},[s.clear?s.clear():u.createVNode(b,{name:"clear"},null)]),[[u.vShow,n.dirty]])]}),Re&&u.createVNode("div",{key:"append",class:"v-field__append-inner"},[(me=s["append-inner"])==null?void 0:me.call(s,ie.value),n.appendInnerIcon&&u.createVNode(b,{key:"append-icon",name:"appendInner"},null)]),u.createVNode("div",{class:["v-field__outline",I.value],style:Z.value},[X&&u.createVNode(u.Fragment,null,[u.createVNode("div",{class:"v-field__outline__start"},null),x.value&&u.createVNode("div",{class:"v-field__outline__notch"},[u.createVNode(Zs,{ref:F,floating:!0,for:k.value},{default:()=>[U]})]),u.createVNode("div",{class:"v-field__outline__end"},null)]),W.value&&x.value&&u.createVNode(Zs,{ref:F,floating:!0,for:k.value},{default:()=>[U]})])])}),{controlRef:H}}});function Uw(n){const e=Object.keys(Jc.props).filter(t=>!so(t)&&t!=="class"&&t!=="style");return on(n,e)}const jw=["color","file","time","date","datetime-local","week","month"],$o=Y({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...kc(),...Xc()},"VTextField"),Qs=be()({name:"VTextField",directives:{Intersect:Dc},inheritAttrs:!1,props:$o(),emits:{"click:control":n=>!0,"mousedown:control":n=>!0,"update:focused":n=>!0,"update:modelValue":n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const o=We(n,"modelValue"),{isFocused:l,focus:c,blur:h}=Rc(n),f=u.computed(()=>typeof n.counterValue=="function"?n.counterValue(o.value):(o.value??"").toString().length),p=u.computed(()=>{if(t.maxlength)return t.maxlength;if(!(!n.counter||typeof n.counter!="number"&&typeof n.counter!="string"))return n.counter}),b=u.computed(()=>["plain","underlined"].includes(n.variant));function g(W,P){var D,I;!n.autofocus||!W||(I=(D=P[0].target)==null?void 0:D.focus)==null||I.call(D)}const w=u.ref(),E=u.ref(),x=u.ref(),_=u.computed(()=>jw.includes(n.type)||n.persistentPlaceholder||l.value||n.active);function k(){var W;x.value!==document.activeElement&&((W=x.value)==null||W.focus()),l.value||c()}function V(W){i("mousedown:control",W),W.target!==x.value&&(k(),W.preventDefault())}function L(W){k(),i("click:control",W)}function F(W){W.stopPropagation(),k(),u.nextTick(()=>{o.value=null,_g(n["onClick:clear"],W)})}function H(W){var D;const P=W.target;if(o.value=P.value,(D=n.modelModifiers)!=null&&D.trim&&["text","search","password","tel","url"].includes(n.type)){const I=[P.selectionStart,P.selectionEnd];u.nextTick(()=>{P.selectionStart=I[0],P.selectionEnd=I[1]})}}return Me(()=>{const W=!!(s.counter||n.counter||n.counterValue),P=!!(W||s.details),[D,I]=Ql(t),[{modelValue:Z,...ie}]=Sc.filterProps(n),[G]=Uw(n);return u.createVNode(Sc,u.mergeProps({ref:w,modelValue:o.value,"onUpdate:modelValue":X=>o.value=X,class:["v-text-field",{"v-text-field--prefixed":n.prefix,"v-text-field--suffixed":n.suffix,"v-text-field--plain-underlined":["plain","underlined"].includes(n.variant)},n.class],style:n.style},D,ie,{centerAffix:!b.value,focused:l.value}),{...s,default:X=>{let{id:ee,isDisabled:ue,isDirty:Re,isReadonly:U,isValid:$}=X;return u.createVNode(Jc,u.mergeProps({ref:E,onMousedown:V,onClick:L,"onClick:clear":F,"onClick:prependInner":n["onClick:prependInner"],"onClick:appendInner":n["onClick:appendInner"],role:n.role},G,{id:ee.value,active:_.value||Re.value,dirty:Re.value||n.dirty,disabled:ue.value,focused:l.value,error:$.value===!1}),{...s,default:Q=>{let{props:{class:me,...ye}}=Q;const Ce=u.withDirectives(u.createVNode("input",u.mergeProps({ref:x,value:o.value,onInput:H,autofocus:n.autofocus,readonly:U.value,disabled:ue.value,name:n.name,placeholder:n.placeholder,size:1,type:n.type,onFocus:k,onBlur:h},ye,I),null),[[u.resolveDirective("intersect"),{handler:g},null,{once:!0}]]);return u.createVNode(u.Fragment,null,[n.prefix&&u.createVNode("span",{class:"v-text-field__prefix"},[u.createVNode("span",{class:"v-text-field__prefix__text"},[n.prefix])]),s.default?u.createVNode("div",{class:me,"data-no-activator":""},[s.default(),Ce]):u.cloneVNode(Ce,{class:me}),n.suffix&&u.createVNode("span",{class:"v-text-field__suffix"},[u.createVNode("span",{class:"v-text-field__suffix__text"},[n.suffix])])])}})},details:P?X=>{var ee;return u.createVNode(u.Fragment,null,[(ee=s.details)==null?void 0:ee.call(s,X),W&&u.createVNode(u.Fragment,null,[u.createVNode("span",null,null),u.createVNode(Pw,{active:n.persistentCounter||l.value,value:f.value,max:p.value},s.counter)])])}:void 0})}),ts({},w,E,x)}}),IT="";function Zc(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const t=u.ref(),i=u.ref();if(Ne){const s=new ResizeObserver(o=>{n==null||n(o,s),o.length&&(e==="content"?i.value=o[0].contentRect:i.value=o[0].target.getBoundingClientRect())});u.onBeforeUnmount(()=>{s.disconnect()}),u.watch(t,(o,l)=>{l&&(s.unobserve(io(l)),i.value=void 0),o&&s.observe(io(o))},{flush:"post"})}return{resizeRef:t,contentRect:u.readonly(i)}}const Kw=Y({renderless:Boolean,...Ve()},"VVirtualScrollItem"),qw=be()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Kw(),emits:{"update:height":n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const{resizeRef:o,contentRect:l}=Zc(void 0,"border");u.watch(()=>{var c;return(c=l.value)==null?void 0:c.height},c=>{c!=null&&i("update:height",c)}),Me(()=>{var c,h;return n.renderless?u.createVNode(u.Fragment,null,[(c=s.default)==null?void 0:c.call(s,{itemRef:o})]):u.createVNode("div",u.mergeProps({ref:o,class:["v-virtual-scroll__item",n.class],style:n.style},t),[(h=s.default)==null?void 0:h.call(s)])})}}),Qc=-1,ed=1,Yw=Y({itemHeight:{type:[Number,String],default:48}},"virtual");function Xw(n,e,t){const i=u.shallowRef(0),s=u.shallowRef(n.itemHeight),o=u.computed({get:()=>parseInt(s.value??0,10),set(P){s.value=P}}),l=u.ref(),{resizeRef:c,contentRect:h}=Zc();u.watchEffect(()=>{c.value=l.value});const f=zu(),p=new Map;let b=Array.from({length:e.value.length});const g=u.computed(()=>{const P=(!h.value||l.value===document.documentElement?f.height.value:h.value.height)-((t==null?void 0:t.value)??0);return Math.ceil(P/o.value*1.7+1)});function w(P,D){o.value=Math.max(o.value,D),b[P]=D,p.set(e.value[P],D)}function E(P){return b.slice(0,P).reduce((D,I)=>D+(I||o.value),0)}function x(P){const D=e.value.length;let I=0,Z=0;for(;Z<P&&I<D;)Z+=b[I++]||o.value;return I-1}let _=0;function k(){if(!l.value||!h.value)return;const P=h.value.height-56,D=l.value.scrollTop,I=D<_?Qc:ed,Z=x(D+P/2),ie=Math.round(g.value/3),G=Z-ie,X=i.value+ie*2-1;I===Qc&&Z<=X?i.value=Kn(G,0,e.value.length):I===ed&&Z>=X&&(i.value=Kn(G,0,e.value.length-g.value)),_=D}function V(P){if(!l.value)return;const D=E(P);l.value.scrollTop=D}const L=u.computed(()=>Math.min(e.value.length,i.value+g.value)),F=u.computed(()=>e.value.slice(i.value,L.value).map((P,D)=>({raw:P,index:D+i.value}))),H=u.computed(()=>E(i.value)),W=u.computed(()=>E(e.value.length)-E(L.value));return u.watch(()=>e.value.length,()=>{b=eo(e.value.length).map(()=>o.value),p.forEach((P,D)=>{const I=e.value.indexOf(D);I===-1?p.delete(D):b[I]=P})}),{containerRef:l,computedItems:F,itemHeight:o,paddingTop:H,paddingBottom:W,scrollToIndex:V,handleScroll:k,handleItemResize:w}}const Jw=Y({items:{type:Array,default:()=>[]},renderless:Boolean,...Yw(),...Ve(),...Xn()},"VVirtualScroll"),td=be()({name:"VVirtualScroll",props:Jw(),setup(n,e){let{slots:t}=e;const i=st("VVirtualScroll"),{dimensionStyles:s}=Jn(n),{containerRef:o,handleScroll:l,handleItemResize:c,scrollToIndex:h,paddingTop:f,paddingBottom:p,computedItems:b}=Xw(n,u.toRef(n,"items"));return Hi(()=>n.renderless,()=>{u.onMounted(()=>{var g;o.value=Mu(i.vnode.el,!0),(g=o.value)==null||g.addEventListener("scroll",l)}),u.onScopeDispose(()=>{var g;(g=o.value)==null||g.removeEventListener("scroll",l)})}),Me(()=>{const g=b.value.map(w=>u.createVNode(qw,{key:w.index,renderless:n.renderless,"onUpdate:height":E=>c(w.index,E)},{default:E=>{var x;return(x=t.default)==null?void 0:x.call(t,{item:w.raw,index:w.index,...E})}}));return n.renderless?u.createVNode(u.Fragment,null,[u.createVNode("div",{class:"v-virtual-scroll__spacer",style:{paddingTop:fe(f.value)}},null),g,u.createVNode("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:fe(p.value)}},null)]):u.createVNode("div",{ref:o,class:["v-virtual-scroll",n.class],onScroll:l,style:[s.value,n.style]},[u.createVNode("div",{class:"v-virtual-scroll__container",style:{paddingTop:fe(f.value),paddingBottom:fe(p.value)}},[g])])}),{scrollToIndex:h}}});function id(n,e){const t=u.shallowRef(!1);let i;function s(c){cancelAnimationFrame(i),t.value=!0,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{t.value=!1})})}async function o(){await new Promise(c=>requestAnimationFrame(c)),await new Promise(c=>requestAnimationFrame(c)),await new Promise(c=>requestAnimationFrame(c)),await new Promise(c=>{if(t.value){const h=u.watch(t,()=>{h(),c()})}else c()})}async function l(c){var p,b;if(c.key==="Tab"&&((p=e.value)==null||p.focus()),!["PageDown","PageUp","Home","End"].includes(c.key))return;const h=(b=n.value)==null?void 0:b.$el;if(!h)return;(c.key==="Home"||c.key==="End")&&h.scrollTo({top:c.key==="Home"?0:h.scrollHeight,behavior:"smooth"}),await o();const f=h.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(c.key==="PageDown"||c.key==="Home"){const g=h.getBoundingClientRect().top;for(const w of f)if(w.getBoundingClientRect().top>=g){w.focus();break}}else{const g=h.getBoundingClientRect().bottom;for(const w of[...f].reverse())if(w.getBoundingClientRect().bottom<=g){w.focus();break}}}return{onListScroll:s,onListKeydown:l}}const nd=Y({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,menu:Boolean,menuIcon:{type:$e,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,valueComparator:{type:Function,default:rn},itemColor:String,...$c({itemChildren:!1})},"Select"),Zw=Y({...nd(),...an($o({modelValue:null,role:"button"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:{component:Qu}})},"VSelect");be()({name:"VSelect",props:Zw(),emits:{"update:focused":n=>!0,"update:modelValue":n=>!0,"update:menu":n=>!0},setup(n,e){let{slots:t}=e;const{t:i}=js(),s=u.ref(),o=u.ref(),l=u.ref(),c=We(n,"menu"),h=u.computed({get:()=>c.value,set:U=>{var $;c.value&&!U&&(($=o.value)!=null&&$.ΨopenChildren)||(c.value=U)}}),{items:f,transformIn:p,transformOut:b}=jc(n),g=We(n,"modelValue",[],U=>p(U===null?[null]:Zt(U)),U=>{const $=b(U);return n.multiple?$:$[0]??null}),w=Po(),E=u.computed(()=>g.value.map(U=>f.value.find($=>{const Q=ht($.raw,n.itemValue),me=ht(U.raw,n.itemValue);return Q===void 0||me===void 0?!1:n.returnObject?n.valueComparator(Q,me):n.valueComparator($.value,U.value)})||U)),x=u.computed(()=>E.value.map(U=>U.props.value)),_=u.shallowRef(!1),k=u.computed(()=>h.value?n.closeText:n.openText);let V="",L;const F=u.computed(()=>n.hideSelected?f.value.filter(U=>!E.value.some($=>$===U)):f.value),H=u.computed(()=>n.hideNoData&&!f.value.length||n.readonly||(w==null?void 0:w.isReadonly.value)),W=u.ref(),{onListScroll:P,onListKeydown:D}=id(W,s);function I(U){n.openOnClear&&(h.value=!0)}function Z(){H.value||(h.value=!h.value)}function ie(U){var Ce,Ie;if(!U.key||n.readonly||w!=null&&w.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(U.key)&&U.preventDefault(),["Enter","ArrowDown"," "].includes(U.key)&&(h.value=!0),["Escape","Tab"].includes(U.key)&&(h.value=!1),U.key==="Home"?(Ce=W.value)==null||Ce.focus("first"):U.key==="End"&&((Ie=W.value)==null||Ie.focus("last"));const $=1e3;function Q(De){const ze=De.key.length===1,xe=!De.ctrlKey&&!De.metaKey&&!De.altKey;return ze&&xe}if(n.multiple||!Q(U))return;const me=performance.now();me-L>$&&(V=""),V+=U.key.toLowerCase(),L=me;const ye=f.value.find(De=>De.title.toLowerCase().startsWith(V));ye!==void 0&&(g.value=[ye])}function G(U){if(n.multiple){const $=x.value.findIndex(Q=>n.valueComparator(Q,U.value));if($===-1)g.value=[...g.value,U];else{const Q=[...g.value];Q.splice($,1),g.value=Q}}else g.value=[U],h.value=!1}function X(U){var $;($=W.value)!=null&&$.$el.contains(U.relatedTarget)||(h.value=!1)}function ee(){var U;_.value&&((U=s.value)==null||U.focus())}function ue(U){_.value=!0}function Re(U){if(U==null)g.value=[];else if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const $=f.value.find(Q=>Q.title===U);$&&G($)}else s.value&&(s.value.value="")}return u.watch(h,()=>{if(!n.hideSelected&&h.value&&E.value.length){const U=F.value.findIndex($=>E.value.some(Q=>$.value===Q.value));Ne&&window.requestAnimationFrame(()=>{var $;U>=0&&(($=l.value)==null||$.scrollToIndex(U))})}}),Me(()=>{const U=!!(n.chips||t.chip),$=!!(!n.hideNoData||F.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Q=g.value.length>0,[me]=Qs.filterProps(n),ye=Q||!_.value&&n.label&&!n.persistentPlaceholder?void 0:n.placeholder;return u.createVNode(Qs,u.mergeProps({ref:s},me,{modelValue:g.value.map(Ce=>Ce.props.value).join(", "),"onUpdate:modelValue":Re,focused:_.value,"onUpdate:focused":Ce=>_.value=Ce,validationValue:g.externalValue,dirty:Q,class:["v-select",{"v-select--active-menu":h.value,"v-select--chips":!!n.chips,[`v-select--${n.multiple?"multiple":"single"}`]:!0,"v-select--selected":g.value.length,"v-select--selection-slot":!!t.selection},n.class],style:n.style,inputmode:"none",placeholder:ye,"onClick:clear":I,"onMousedown:control":Z,onBlur:X,onKeydown:ie,"aria-label":i(k.value),title:i(k.value)}),{...t,default:()=>u.createVNode(u.Fragment,null,[u.createVNode(ns,u.mergeProps({ref:o,modelValue:h.value,"onUpdate:modelValue":Ce=>h.value=Ce,activator:"parent",contentClass:"v-select__content",disabled:H.value,eager:n.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:n.transition,onAfterLeave:ee},n.menuProps),{default:()=>[$&&u.createVNode(qc,{ref:W,selected:x.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:Ce=>Ce.preventDefault(),onKeydown:D,onFocusin:ue,onScrollPassive:P,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var Ce,Ie,De;return[(Ce=t["prepend-item"])==null?void 0:Ce.call(t),!F.value.length&&!n.hideNoData&&(((Ie=t["no-data"])==null?void 0:Ie.call(t))??u.createVNode(yn,{title:i(n.noDataText)},null)),u.createVNode(td,{ref:l,renderless:!0,items:F.value},{default:ze=>{var K;let{item:xe,index:rt,itemRef:_t}=ze;const et=u.mergeProps(xe.props,{ref:_t,key:rt,onClick:()=>G(xe)});return((K=t.item)==null?void 0:K.call(t,{item:xe,index:rt,props:et}))??u.createVNode(yn,et,{prepend:pe=>{let{isSelected:Se}=pe;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(Ec,{key:xe.value,modelValue:Se,ripple:!1,tabindex:"-1"},null):void 0,xe.props.prependIcon&&u.createVNode(Et,{icon:xe.props.prependIcon},null)])}})}}),(De=t["append-item"])==null?void 0:De.call(t)]}})]}),E.value.map((Ce,Ie)=>{var xe;function De(rt){rt.stopPropagation(),rt.preventDefault(),G(Ce)}const ze={"onClick:close":De,onMousedown(rt){rt.preventDefault(),rt.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:Ce.value,class:"v-select__selection"},[U?t.chip?u.createVNode(ti,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:Ce.title}}},{default:()=>{var rt;return[(rt=t.chip)==null?void 0:rt.call(t,{item:Ce,index:Ie,props:ze})]}}):u.createVNode(Pc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:Ce.title},ze),null):((xe=t.selection)==null?void 0:xe.call(t,{item:Ce,index:Ie}))??u.createVNode("span",{class:"v-select__selection-text"},[Ce.title,n.multiple&&Ie<E.value.length-1&&u.createVNode("span",{class:"v-select__selection-comma"},[u.createTextVNode(",")])])])})]),"append-inner":function(){var ze;for(var Ce=arguments.length,Ie=new Array(Ce),De=0;De<Ce;De++)Ie[De]=arguments[De];return u.createVNode(u.Fragment,null,[(ze=t["append-inner"])==null?void 0:ze.call(t,...Ie),n.menuIcon?u.createVNode(Et,{class:"v-select__menu-icon",icon:n.menuIcon},null):void 0])}})}),ts({isFocused:_,menu:h,select:G},s)}});const Qw=(n,e,t)=>n==null||e==null?-1:n.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),ey=Y({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function ty(n,e,t){var c;const i=[],s=(t==null?void 0:t.default)??Qw,o=t!=null&&t.filterKeys?Zt(t.filterKeys):!1,l=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(n!=null&&n.length))return i;e:for(let h=0;h<n.length;h++){const f=n[h],p={},b={};let g=-1;if(e&&!(t!=null&&t.noFilter)){if(typeof f=="object"){const x=o||Object.keys(f);for(const _ of x){const k=ht(f,_,f),V=(c=t==null?void 0:t.customKeyFilter)==null?void 0:c[_];if(g=V?V(k,e,f):s(k,e,f),g!==-1&&g!==!1)V?p[_]=g:b[_]=g;else if((t==null?void 0:t.filterMode)==="every")continue e}}else g=s(f,e,f),g!==-1&&g!==!1&&(b.title=g);const w=Object.keys(b).length,E=Object.keys(p).length;if(!w&&!E||(t==null?void 0:t.filterMode)==="union"&&E!==l&&!w||(t==null?void 0:t.filterMode)==="intersection"&&(E!==l||!w))continue}i.push({index:h,matches:{...b,...p}})}return i}function iy(n,e,t,i){const s=u.ref([]),o=u.ref(new Map),l=u.computed(()=>i!=null&&i.transform?u.unref(e).map(i==null?void 0:i.transform):u.unref(e));u.watchEffect(()=>{const h=typeof t=="function"?t():u.unref(t),f=typeof h!="string"&&typeof h!="number"?"":String(h),p=ty(l.value,f,{customKeyFilter:n.customKeyFilter,default:n.customFilter,filterKeys:n.filterKeys,filterMode:n.filterMode,noFilter:n.noFilter}),b=u.unref(e),g=[],w=new Map;p.forEach(E=>{let{index:x,matches:_}=E;const k=b[x];g.push(k),w.set(k.value,_)}),s.value=g,o.value=w});function c(h){return o.value.get(h.value)}return{filteredItems:s,filteredMatches:o,getMatches:c}}function ny(n,e,t){if(e==null)return n;if(Array.isArray(e))throw new Error("Multiple matches is not implemented");return typeof e=="number"&&~e?u.createVNode(u.Fragment,null,[u.createVNode("span",{class:"v-autocomplete__unmask"},[n.substr(0,e)]),u.createVNode("span",{class:"v-autocomplete__mask"},[n.substr(e,t)]),u.createVNode("span",{class:"v-autocomplete__unmask"},[n.substr(e+t)])]):n}const sy=Y({autoSelectFirst:{type:[Boolean,String]},search:String,...ey({filterKeys:["title"]}),...nd(),...an($o({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:!1})},"VAutocomplete"),ry=be()({name:"VAutocomplete",props:sy(),emits:{"update:focused":n=>!0,"update:search":n=>!0,"update:modelValue":n=>!0,"update:menu":n=>!0},setup(n,e){let{slots:t}=e;const{t:i}=js(),s=u.ref(),o=u.shallowRef(!1),l=u.shallowRef(!0),c=u.shallowRef(!1),h=u.ref(),f=u.ref(),p=We(n,"menu"),b=u.computed({get:()=>p.value,set:K=>{var pe;p.value&&!K&&((pe=h.value)!=null&&pe.ΨopenChildren)||(p.value=K)}}),g=u.shallowRef(-1),w=u.computed(()=>{var K;return(K=s.value)==null?void 0:K.color}),E=u.computed(()=>b.value?n.closeText:n.openText),{items:x,transformIn:_,transformOut:k}=jc(n),{textColorClasses:V,textColorStyles:L}=xi(w),F=We(n,"search",""),H=We(n,"modelValue",[],K=>_(K===null?[null]:Zt(K)),K=>{const pe=k(K);return n.multiple?pe:pe[0]??null}),W=Po(),{filteredItems:P,getMatches:D}=iy(n,x,()=>l.value?"":F.value),I=u.computed(()=>H.value.map(K=>x.value.find(pe=>{const Se=ht(pe.raw,n.itemValue),Pt=ht(K.raw,n.itemValue);return Se===void 0||Pt===void 0?!1:n.returnObject?n.valueComparator(Se,Pt):n.valueComparator(pe.value,K.value)})||K)),Z=u.computed(()=>n.hideSelected?P.value.filter(K=>!I.value.some(pe=>pe.value===K.value)):P.value),ie=u.computed(()=>I.value.map(K=>K.props.value)),G=u.computed(()=>I.value[g.value]),X=u.computed(()=>{var pe;return(n.autoSelectFirst===!0||n.autoSelectFirst==="exact"&&F.value===((pe=Z.value[0])==null?void 0:pe.title))&&Z.value.length>0&&!l.value&&!c.value}),ee=u.computed(()=>n.hideNoData&&!x.value.length||n.readonly||(W==null?void 0:W.isReadonly.value)),ue=u.ref(),{onListScroll:Re,onListKeydown:U}=id(ue,s);function $(K){n.openOnClear&&(b.value=!0),F.value=""}function Q(){ee.value||(b.value=!0)}function me(K){ee.value||(o.value&&(K.preventDefault(),K.stopPropagation()),b.value=!b.value)}function ye(K){var Pt,ve,je;if(n.readonly||W!=null&&W.isReadonly.value)return;const pe=s.value.selectionStart,Se=ie.value.length;if((g.value>-1||["Enter","ArrowDown","ArrowUp"].includes(K.key))&&K.preventDefault(),["Enter","ArrowDown"].includes(K.key)&&(b.value=!0),["Escape"].includes(K.key)&&(b.value=!1),X.value&&["Enter","Tab"].includes(K.key)&&et(Z.value[0]),K.key==="ArrowDown"&&X.value&&((Pt=ue.value)==null||Pt.focus("next")),!!n.multiple){if(["Backspace","Delete"].includes(K.key)){if(g.value<0){K.key==="Backspace"&&!F.value&&(g.value=Se-1);return}const Ke=g.value;G.value&&et(G.value),g.value=Ke>=Se-1?Se-2:Ke}if(K.key==="ArrowLeft"){if(g.value<0&&pe>0)return;const Ke=g.value>-1?g.value-1:Se-1;I.value[Ke]?g.value=Ke:(g.value=-1,s.value.setSelectionRange((ve=F.value)==null?void 0:ve.length,(je=F.value)==null?void 0:je.length))}if(K.key==="ArrowRight"){if(g.value<0)return;const Ke=g.value+1;I.value[Ke]?g.value=Ke:(g.value=-1,s.value.setSelectionRange(0,0))}}}function Ce(K){F.value=K.target.value}function Ie(K){if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const pe=x.value.find(Se=>Se.title===K.target.value);pe&&et(pe)}}function De(){var K;o.value&&(l.value=!0,(K=s.value)==null||K.focus())}function ze(K){o.value=!0,setTimeout(()=>{c.value=!0})}function xe(K){c.value=!1}function rt(K){(K==null||K===""&&!n.multiple)&&(H.value=[])}const _t=u.shallowRef(!1);function et(K){if(n.multiple){const pe=ie.value.findIndex(Se=>n.valueComparator(Se,K.value));if(pe===-1)H.value=[...H.value,K];else{const Se=[...H.value];Se.splice(pe,1),H.value=Se}}else H.value=[K],_t.value=!0,F.value=K.title,b.value=!1,l.value=!0,u.nextTick(()=>_t.value=!1)}return u.watch(o,(K,pe)=>{var Se;K!==pe&&(K?(_t.value=!0,F.value=n.multiple?"":String(((Se=I.value.at(-1))==null?void 0:Se.props.title)??""),l.value=!0,u.nextTick(()=>_t.value=!1)):(!n.multiple&&!F.value?H.value=[]:X.value&&!c.value&&!I.value.some(Pt=>{let{value:ve}=Pt;return ve===Z.value[0].value})&&et(Z.value[0]),b.value=!1,F.value="",g.value=-1))}),u.watch(F,K=>{!o.value||_t.value||(K&&(b.value=!0),l.value=!K)}),u.watch(b,()=>{if(!n.hideSelected&&b.value&&I.value.length){const K=Z.value.findIndex(pe=>I.value.some(Se=>pe.value===Se.value));Ne&&window.requestAnimationFrame(()=>{var pe;K>=0&&((pe=f.value)==null||pe.scrollToIndex(K))})}}),Me(()=>{const K=!!(n.chips||t.chip),pe=!!(!n.hideNoData||Z.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Se=H.value.length>0,[Pt]=Qs.filterProps(n);return u.createVNode(Qs,u.mergeProps({ref:s},Pt,{modelValue:F.value,"onUpdate:modelValue":rt,focused:o.value,"onUpdate:focused":ve=>o.value=ve,validationValue:H.externalValue,dirty:Se,onInput:Ce,onChange:Ie,class:["v-autocomplete",`v-autocomplete--${n.multiple?"multiple":"single"}`,{"v-autocomplete--active-menu":b.value,"v-autocomplete--chips":!!n.chips,"v-autocomplete--selection-slot":!!t.selection,"v-autocomplete--selecting-index":g.value>-1},n.class],style:n.style,readonly:n.readonly,placeholder:Se?void 0:n.placeholder,"onClick:clear":$,"onMousedown:control":Q,onKeydown:ye}),{...t,default:()=>u.createVNode(u.Fragment,null,[u.createVNode(ns,u.mergeProps({ref:h,modelValue:b.value,"onUpdate:modelValue":ve=>b.value=ve,activator:"parent",contentClass:"v-autocomplete__content",disabled:ee.value,eager:n.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:n.transition,onAfterLeave:De},n.menuProps),{default:()=>[pe&&u.createVNode(qc,{ref:ue,selected:ie.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:ve=>ve.preventDefault(),onKeydown:U,onFocusin:ze,onFocusout:xe,onScrollPassive:Re,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var ve,je,Ke;return[(ve=t["prepend-item"])==null?void 0:ve.call(t),!Z.value.length&&!n.hideNoData&&(((je=t["no-data"])==null?void 0:je.call(t))??u.createVNode(yn,{title:i(n.noDataText)},null)),u.createVNode(td,{ref:f,renderless:!0,items:Z.value},{default:Je=>{var Ri;let{item:ot,index:ft,itemRef:Wi}=Je;const mt=u.mergeProps(ot.props,{ref:Wi,key:ft,active:X.value&&ft===0?!0:void 0,onClick:()=>et(ot)});return((Ri=t.item)==null?void 0:Ri.call(t,{item:ot,index:ft,props:mt}))??u.createVNode(yn,mt,{prepend:ci=>{let{isSelected:xn}=ci;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(Ec,{key:ot.value,modelValue:xn,ripple:!1,tabindex:"-1"},null):void 0,ot.props.prependIcon&&u.createVNode(Et,{icon:ot.props.prependIcon},null)])},title:()=>{var ci,xn;return l.value?ot.title:ny(ot.title,(ci=D(ot))==null?void 0:ci.title,((xn=F.value)==null?void 0:xn.length)??0)}})}}),(Ke=t["append-item"])==null?void 0:Ke.call(t)]}})]}),I.value.map((ve,je)=>{var ot;function Ke(ft){ft.stopPropagation(),ft.preventDefault(),et(ve)}const Je={"onClick:close":Ke,onMousedown(ft){ft.preventDefault(),ft.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:ve.value,class:["v-autocomplete__selection",je===g.value&&["v-autocomplete__selection--selected",V.value]],style:je===g.value?L.value:{}},[K?t.chip?u.createVNode(ti,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:ve.title}}},{default:()=>{var ft;return[(ft=t.chip)==null?void 0:ft.call(t,{item:ve,index:je,props:Je})]}}):u.createVNode(Pc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:ve.title},Je),null):((ot=t.selection)==null?void 0:ot.call(t,{item:ve,index:je}))??u.createVNode("span",{class:"v-autocomplete__selection-text"},[ve.title,n.multiple&&je<I.value.length-1&&u.createVNode("span",{class:"v-autocomplete__selection-comma"},[u.createTextVNode(",")])])])})]),"append-inner":function(){var Je;for(var ve=arguments.length,je=new Array(ve),Ke=0;Ke<ve;Ke++)je[Ke]=arguments[Ke];return u.createVNode(u.Fragment,null,[(Je=t["append-inner"])==null?void 0:Je.call(t,...je),n.menuIcon?u.createVNode(Et,{class:"v-autocomplete__menu-icon",icon:n.menuIcon,onMousedown:me,onClick:Rg,"aria-label":i(E.value),title:i(E.value)},null):void 0])}})}),ts({isFocused:o,isPristine:l,menu:b,search:F,filteredItems:P,select:et},s)}}),oy=1,sd={__name:"SelectField",props:$t.propsField,setup(n){const e=n,t=u.inject("store"),{getFromSchema:i,updateField:s,getProp:o}=e,l=i("rel.get");function c(_){return Array.isArray(Object.getPrototypeOf(_))}function h(_,k){return Array.isArray(_)?re.every(_,V=>re.isType(V,k)):!1}function f(_){return h(_,"object")?_.map(k=>k[i("rel.valueKey","value")]):_}function p(_){return i("rel.key",!1)?i("rel.key"):typeof _=="string"?t.getModelKey(_):"model-"+parseInt(Math.random(1e4)*Math.random(1e4)*1e3)}const b=(_,k,V)=>{k!==null&&(c(k)?t.items[_]=k:typeof k=="function"?t.customLoadItems(_,V,k):typeof k=="object"&&k.route?(t.routes[_]=k.route,t.getItems(_)):typeof k=="string"&&(t.routes[_]=k,t.getItems(_)))},g=p(l);b(g,l,oy);const w=_=>i("rel.withChange")?i("rel.withChange")(_):_,E=u.computed(()=>w(t.items[g])),x={};return(_,k)=>(u.openBlock(),u.createBlock(u.unref(ry),u.mergeProps({variant:"outlined",density:"compact","hide-details":"auto",label:u.unref(i)("rel.textKey","text"),items:E.value,"model-value":f(_.value)},{...x,...u.unref(i)("props",{})},u.toHandlers(u.unref(i)("events",{})),{"item-title":u.unref(i)("rel.textKey"),"item-value":u.unref(i)("rel.valueKey"),"onUpdate:modelValue":u.unref(s)}),null,16,["label","items","model-value","item-title","item-value","onUpdate:modelValue"]))}},ay=["value"],ly={key:0,class:"text-red-900"},uy={__name:"TextField",props:$t.propsField,setup(n){return(e,t)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("input",{class:"border-2 w-full border-indigo-600 rounded",value:e.value,onInput:t[0]||(t[0]=i=>e.updateField(i.target.value))},null,40,ay),e.error?(u.openBlock(),u.createElementBlock("span",ly,u.toDisplayString(e.error),1)):u.createCommentVNode("",!0)],64))}},cy=()=>[{title:"operator",field:"op",groupAttr:{class:"w-[32.5%]"},rel:{get:[{value:"=",text:"equal_to"},{value:"!=",text:"not_equal_to"},{value:">",text:"greater_than"},{value:"<",text:"less_than"},{value:"LIKE",text:"look_like"}],textKey:"text",valueKey:"value"},component:u.markRaw(sd)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},component:u.markRaw(uy)}],dy=async n=>{let e="";return n&&(e="&where="+encodeURIComponent(JSON.stringify({ProgrammingLanguage:{$regex:`${n}|${n.toUpperCase()}|${n[0].toUpperCase()+n.slice(1)}`}}))),(await(await fetch("https://parseapi.back4app.com/classes/All_Programming_Languages?limit=9999&order=ProgrammingLanguage&keys=ProgrammingLanguage"+e,{headers:{"X-Parse-Application-Id":"XpRShKqJcxlqE5EQKs4bmSkozac44osKifZvLXCL","X-Parse-Master-Key":"Mr2UIBiCImScFbbCLndBv8qPRUKwBAq27plwXVuv"}})).json()).results.map(s=>({value:s.ProgrammingLanguage,label:s.ProgrammingLanguage}))},hy=n=>({op:{placeholder:"operator",type:"select",items:[{value:"=",text:"equal_to"},{value:"!=",text:"not_equal_to"}],"label-prop":"text","value-prop":"value",columns:4},value:{type:"tags",placeholder:"value",items:async e=>await dy(e),search:!0,hideSelected:!0,closeOnSelect:!1,columns:4,native:!1,autocomplete:"off",filterResults:!1,minChars:0,resolveOnLoad:!1,infinite:!0,limit:100,clearOnSearch:!0,delay:0,onOpen:e=>{e.noOptions&&e.resolveOptions()}}}),BT="",fy=sn({__name:"DateField",setup(n){return(e,t)=>null}},[["__scopeId","data-v-077220f8"]]),rd={TextFilter:cy,SelectFilter:hy,DateFilter:()=>[{title:"operator",field:"op",groupAttr:{class:"w-[32.5%]"},rel:{get:[{value:"=",text:"equal_to (=)"},{value:"<>",text:"range (<>)"},{value:">",text:"greater_than (>)"},{value:"<",text:"less_than (<)"}],textKey:"text",valueKey:"value"},component:u.markRaw(sd)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},dynamicProps(n){return{range:n.form.op==="<>"}},component:u.markRaw(fy)}]};function my(n){return u.getCurrentScope()?(u.onScopeDispose(n),!0):!1}function Go(n){return typeof n=="function"?n():u.unref(n)}const py=typeof window<"u"&&typeof document<"u",gy=()=>{};function by(n,e){function t(...i){return new Promise((s,o)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(o)})}return t}const od=n=>n();function vy(n=od){const e=u.ref(!0);function t(){e.value=!1}function i(){e.value=!0}const s=(...o)=>{e.value&&n(...o)};return{isActive:u.readonly(e),pause:t,resume:i,eventFilter:s}}function wy(n,e,t={}){const{eventFilter:i=od,...s}=t;return u.watch(n,by(i,e),s)}function yy(n,e,t={}){const{eventFilter:i,...s}=t,{eventFilter:o,pause:l,resume:c,isActive:h}=vy(i);return{stop:wy(n,e,{...s,eventFilter:o}),pause:l,resume:c,isActive:h}}function Cy(n){const e=Go(n);return(e==null?void 0:e.$el)??e}const ls=py?window:void 0;function ad(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=ls):[e,t,i,s]=n,!e)return gy;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],l=()=>{o.forEach(p=>p()),o.length=0},c=(p,b,g,w)=>(p.addEventListener(b,g,w),()=>p.removeEventListener(b,g,w)),h=u.watch(()=>[Cy(e),Go(s)],([p,b])=>{l(),p&&o.push(...t.flatMap(g=>i.map(w=>c(p,g,w,b))))},{immediate:!0,flush:"post"}),f=()=>{h(),l()};return my(f),f}const er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tr="__vueuse_ssr_handlers__",Ey=xy();function xy(){return tr in er||(er[tr]=er[tr]||{}),er[tr]}function _y(n,e){return Ey[n]||e}function Ry(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const ky={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},ld="vueuse-storage";function Sy(n,e,t,i={}){const{flush:s="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:h=!1,shallow:f,window:p=ls,eventFilter:b,onError:g=P=>{console.error(P)}}=i,w=(f?u.shallowRef:u.ref)(e);if(!t)try{t=_y("getDefaultStorage",()=>ls==null?void 0:ls.localStorage)()}catch(P){g(P)}if(!t)return w;const E=Go(e),x=Ry(E),_=i.serializer??ky[x],{pause:k,resume:V}=yy(w,()=>L(w.value),{flush:s,deep:o,eventFilter:b});return p&&l&&(ad(p,"storage",W),ad(p,ld,H)),W(),w;function L(P){try{if(P==null)t.removeItem(n);else{const D=_.write(P),I=t.getItem(n);I!==D&&(t.setItem(n,D),p&&p.dispatchEvent(new CustomEvent(ld,{detail:{key:n,oldValue:I,newValue:D,storageArea:t}})))}}catch(D){g(D)}}function F(P){const D=P?P.newValue:t.getItem(n);if(D==null)return c&&E!==null&&t.setItem(n,_.write(E)),E;if(!P&&h){const I=_.read(D);return typeof h=="function"?h(I,E):x==="object"&&!Array.isArray(I)?{...E,...I}:I}else return typeof D!="string"?D:_.read(D)}function H(P){W(P.detail)}function W(P){if(!(P&&P.storageArea!==t)){if(P&&P.key==null){w.value=E;return}if(!(P&&P.key!==n)){k();try{(P==null?void 0:P.newValue)!==_.write(w.value)&&(w.value=F(P))}catch(D){g(D)}finally{P?u.nextTick(V):V()}}}}}const GT="",Cn=n=>(u.pushScopeId("data-v-380cf3aa"),n=n(),u.popScopeId(),n),Ty={class:"border-muted-200 dark:border-muted-700 dark:bg-muted-800 relative mb-4 w-full rounded-md border bg-white p-6 transition-all duration-300"},My={class:"flex flex-col ml-1 border-[rgba(0,0,0,.1)] pb-4"},Ly={class:"flex flex-row justify-between mb-4 items-center"},Dy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Ay={class:"flex items-center"},Fy={class:"z-[1]"},Py={class:"fc-drop-down-content"},Vy={key:0,class:"p-2 text-center"},Oy=["onClick"],Ny={class:"text-muted-400 font-sans text-sm"},zy=Cn(()=>u.createElementVNode("svg",{"data-v-74b3417a":"","aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-muted-500"},[u.createElementVNode("path",{"data-v-74b3417a":"",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1)),Hy={class:"flex w-full justify-between"},Iy={class:"w-[23%] flex justify-center items-center"},By=["disabled"],Wy=Cn(()=>u.createElementVNode("svg",{class:"icon h-4 w-4",viewBox:"0 0 24 24"},[u.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),$y=Cn(()=>u.createElementVNode("svg",{class:"icon h-4 w-4",viewBox:"0 0 24 24"},[u.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),Gy={class:"flex border-t dark:border-muted-600 flex-col p-2 mt-2"},Uy={class:"flex items-center"},jy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Ky={class:"group-hover:text-red-500"},qy=Cn(()=>u.createElementVNode("svg",{stroke:"currentColor",width:"1em",height:"1em",class:"ml-1 rtl:ml-1 rtl:mr-1 group-hover:fill-red-500 dark:fill-muted-400 fill-muted-600",viewBox:"0 0 512 512"},[u.createElementVNode("path",{d:"M340 148L488 0l24 24L364 172l52 52L257.2 483.9 240 512l-23.3-23.3L23.3 295.3 0 272l28.1-17.2L288 96l52 52zM51.4 278.1l47.9 47.9 33.4-33.4L144 281.4 166.6 304l-11.3 11.3-33.4 33.4L233.9 460.6l89.6-146.6L197.9 188.6 51.4 278.1zM340.6 286l34.9-57.2-92.4-92.4L226 171.4 340.6 286z"})],-1)),Yy={class:"my-2 flex overflow-x-auto slimscroll"},Xy={class:"flex"},Jy=["onClick"],Zy={class:"mt-[0px]"},Qy=["onClick"],eC=[Cn(()=>u.createElementVNode("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-primary-500"},[u.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1))],tC={key:0,class:"flex items-center mx-2 text-[0.75rem]"},iC={class:"flex w-full gap-x-2 justify-between !items-end"},nC={class:"pt-4 md:pt-6"},sC={class:"flex gap-x-2"},rC=["placeholder"],oC=[Cn(()=>u.createElementVNode("svg",{"data-v-74b3417a":"","aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-primary-500"},[u.createElementVNode("path",{"data-v-74b3417a":"",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1))],aC=sn({__name:"MFilter",setup(n){const e=u.inject("store");let t=-1;const i=u.ref(!1),s=u.ref({}),o=u.ref(!1),l=u.ref(""),c=g(),h=u.ref(null);function f(F){const H=re.capitalize(F),W=re.get(rd,H+"Filter"),P=e.flatFields.find(D=>D.filter===F);return typeof W=="function"?re.get(rd,H+"Filter")(P):!1}const p={field:{placeholder:"field",type:"select",native:!1,items:e.headersWithoutActions,"label-prop":"name","value-prop":"filter",search:!0,columns:4}},b=u.ref({...p});u.watch(()=>s.value.field,F=>{b.value={...p};const H=f(F)||[];for(const W in s.value)W!=="field"&&(s.value[W]="");b.value={...b.value,...H}});function g(){const F=window.location.pathname.replace(/^\/|\/$/g,"")+"-filters";return Sy(F,{},localStorage,{mergeDefaults:!0})}function w(){e.filters.push(s.value),s.value={}}function E(){t!==-1&&e.filters.splice(t,1,s.value),i.value=!1,s.value={}}function x(F,H){s.value.field=F.field,i.value=!0,t=H,u.nextTick(()=>{s.value={...F}})}function _(F){e.filters=e.filters.filter(H=>H!==F)}function k(){e.filters=[]}function V(){if(!o.value)return o.value=!0,h.value.focus();l.value&&(c.value[l.value]={...e.filters},o.value=!1,l.value="",h.value.blur())}function L(){e.isFiltering=!0,e.getWithFilter()}return(F,H)=>{const W=u.resolveComponent("Vueform");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(e).panel==="filters"?"accordion-content":"x")},[u.createElementVNode("div",Ty,[u.createElementVNode("div",My,[u.createElementVNode("div",Ly,[u.createElementVNode("h3",Dy,u.toDisplayString(F.$fcTr("filter_data")),1),u.createElementVNode("div",Ay,[u.createVNode(u.unref(ns),{transition:"scale-transition"},{activator:u.withCtx(({props:P})=>[u.createElementVNode("button",u.mergeProps({class:JSON.parse(P["aria-expanded"])?"before:block":"before:hidden"},P,{class:"fc-filter-choose is-button rounded is-button-default min-w-[130px]"}),[u.createElementVNode("span",Fy,u.toDisplayString(F.$fcTr("choose_filter")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",Py,[Object.keys(u.unref(c)).length===0?(u.openBlock(),u.createElementBlock("p",Vy,u.toDisplayString(F.$fcTr("not_filter_create_yes")),1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(c),(P,D)=>(u.openBlock(),u.createElementBlock("a",{class:"group rounded flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-100 dark:hover:bg-muted-700 justify-between rtl:pl-4 rtl:pr-5",key:D,onClick:u.withModifiers(I=>u.unref(e).filters=Object.values(P),["stop"])},[u.createElementVNode("p",Ny,u.toDisplayString(D),1),zy],8,Oy))),128))])]),_:1})])]),u.createElementVNode("div",Hy,[u.createVNode(W,{modelValue:s.value,"onUpdate:modelValue":H[0]||(H[0]=P=>s.value=P),schema:b.value,class:"w-[75%] justify-between",columns:{label:12}},null,8,["modelValue","schema"]),u.createElementVNode("div",Iy,[i.value?(u.openBlock(),u.createElementBlock("button",{key:1,class:"!border-dashed is-button-default is-button w-full rounded-full font-bold py-1 px-2 !border-green-400 !text-green-400 hover:!bg-green-50",onClick:E},[u.createTextVNode(u.toDisplayString(F.$fcTr("edit_filter"))+" ",1),$y])):(u.openBlock(),u.createElementBlock("button",{key:0,disabled:!s.value.field,class:"disabled:cursor-not-allowed disabled:hover:bg-transparent !border-dashed !h-[86%] is-button-default is-button w-full rounded font-bold py-1 px-2 !border-green-400 !text-green-400 dark:active:hover:bg-muted-600 active:hover:!bg-green-50",onClick:w},[u.createTextVNode(u.toDisplayString(F.$fcTr("add_filter"))+" ",1),Wy],8,By))])])]),u.withDirectives(u.createElementVNode("div",Gy,[u.createElementVNode("div",Uy,[u.createElementVNode("h3",jy,u.toDisplayString(F.$fcTr("active_filter")),1),u.createElementVNode("button",{onClick:k,class:"is-button group hover:text-red-500 hover:border-red-500 w-fit text-muted-600 dark:text-muted-400 !text-xs border !px-3 !py-0 !h-[1.5rem] mx-2 !rounded-full"},[u.createElementVNode("span",Ky,u.toDisplayString(F.$fcTr("clear_all")),1),qy])]),u.createElementVNode("div",Yy,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(e).filters,(P,D)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:D},[u.createElementVNode("div",Xy,[u.createElementVNode("span",{class:"flex px-3 font-sans transition-shadow duration-300 py-1 text-[0.75rem] rounded-full bg-primary-100 text-primary-500 border-primary-100 dark:border-primary-500 dark:text-primary-500 border dark:bg-transparent",onClick:I=>x(P,D)},[u.createElementVNode("span",Zy,u.toDisplayString(u.unref(re.get)(P,"field.title")),1),u.createElementVNode("button",{class:"text-white font-bold rounded px-1",onClick:u.withModifiers(I=>_(P),["stop"])},eC,8,Qy)],8,Jy)]),u.unref(e).filters.length-1!==D?(u.openBlock(),u.createElementBlock("span",tC,u.toDisplayString(F.$fcTr("&")),1)):u.createCommentVNode("",!0)],64))),128))])],512),[[u.vShow,u.unref(e).filters.length>0]]),u.createElementVNode("div",iC,[u.createElementVNode("button",{onClick:H[1]||(H[1]=P=>u.unref(e).panel=""),class:"is-button text-muted-500 rounded hover:text-red-500 !underline focus-within:!outline-none"},u.toDisplayString(F.$fcTr("cancel")),1),u.createElementVNode("div",nC,[u.createElementVNode("div",sC,[u.createElementVNode("button",{onClick:H[5]||(H[5]=u.withModifiers(P=>Object.keys(u.unref(e).filters).length!==0?V():"",["self"])),class:u.normalizeClass([{"!bg-muted-100 dark:!bg-muted-700 ltr:pr-1":o.value," focus:outline-none !cursor-not-allowed":Object.keys(u.unref(e).filters).length===0},"transitionX-inp is-button rounded is-button-default"])},[u.createElementVNode("span",{onClick:H[2]||(H[2]=u.withModifiers(P=>Object.keys(u.unref(e).filters).length!==0?V():"",["self"])),class:u.normalizeClass({" bg-green-500 px-2 py-1 rounded text-muted-50":o.value," focus:outline-none !cursor-not-allowed":Object.keys(u.unref(e).filters).length===0})},u.toDisplayString(F.$fcTr("save")),3),u.createElementVNode("span",{class:u.normalizeClass(["transitionX-inp overflow-hidden flex items-center justify-between",o.value?"w-[221px] opacity-1 ltr:pl-3 rtl:mr-3":"opacity-0 w-[0px]"])},[u.withDirectives(u.createElementVNode("input",{"onUpdate:modelValue":H[3]||(H[3]=P=>l.value=P),class:u.normalizeClass(["fc-focus py-1 rounded px-2 dark:bg-muted-800",o.value?" border border-1":"flex "]),placeholder:F.$fcTr("filter_save_placeholder"),ref_key:"filterNameInp",ref:h},null,10,rC),[[u.vModelText,l.value]]),u.createElementVNode("span",{class:"px-2",onClick:H[4]||(H[4]=P=>o.value=!1)},oC)],2)],2),u.createElementVNode("button",{onClick:L,class:"is-button rounded bg-primary-500 dark:bg-primary-500 hover:enabled:bg-primary-400 dark:hover:enabled:bg-primary-400 text-white hover:enabled:shadow-lg hover:enabled:shadow-primary-500/50 dark:hover:enabled:shadow-primary-800/20 focus-visible:outline-primary-400/70 focus-within:outline-primary-400/70 focus-visible:bg-primary-500 active:enabled:bg-primary-500 dark:focus-visible:outline-primary-400 dark:focus-within:outline-primary-400 dark:focus-visible:bg-primary-500 dark:active:enabled:bg-primary-500"},u.toDisplayString(F.$fcTr("filter")),1)])])])])],2)}}},[["__scopeId","data-v-380cf3aa"]]);function lC(n,e){return Array.isArray(n)?re.every(n,t=>re.isType(t,e)):!1}const uC=(n,e)=>{const t=re.get(n,"field"),i=re.get(n,"valueProp");return lC(e,"object")?e.map(s=>re.get(s,i)):re.get(e,t)},ud=(n,e)=>re.get(e,n.field),cC={select:uC,text:ud},dC=(n,e)=>{if(n.normalizer)return n.normalizer(e);const t=cC[n.type];return t?t(n,e):ud(n,e)},qT="",hC=n=>(u.pushScopeId("data-v-a3de2b85"),n=n(),u.popScopeId(),n),fC={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},mC={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},pC=hC(()=>u.createElementVNode("div",{class:"fixed inset-0 transition-opacity"},[u.createElementVNode("div",{class:"absolute inset-0 bg-gray-500 opacity-75"})],-1)),gC={class:"inline-block max-h-full align-bottom bg-white rounded-lg text-left shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},bC={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4 dark:bg-muted-700 dark:text-muted-200"},vC={class:"flex flex-col text-right"},wC={class:"mb-4 flex justify-between w-full"},yC={key:0,class:"text-primerr-700"},CC={key:1,class:"text-primerr-700"},EC={class:"mb-5 flex flex-row flex-wrap"},xC={class:"flex justify-end"},_C=["disabled"],RC={key:0},kC={key:1},SC=sn({__name:"MDialogForm",setup(n){const{event:e,listen:t}=$t.emitter,i=u.inject("store"),s=u.ref({});let o=u.ref(!1),l={};const c=f=>{let p={};for(const b of i.flatFieldsWithoutActions)p[b.field]=dC(b,f);return p};return(()=>{t("createBtn",()=>{l={},i.isEditing=!1,o.value=!0,s.value={}}),t("editBtn",f=>{l=f,i.isEditing=!0,o.value=!0,s.value=c(f)}),t("handleDialogForm",f=>{o.value=f}),t("saveForm",()=>(()=>{i.isEditing?i.editItem({...s.value,id:l==null?void 0:l.id}):i.addItem({...s.value})})()),t(["createBtn"],()=>{Object.assign(s,{})}),t("editTheItem",f=>{edit(f)}),t("addTheItem",f=>{add(f)})})(),(f,p)=>{const b=u.resolveComponent("Vueform");return u.openBlock(),u.createBlock(u.Transition,{name:"fade",appear:""},{default:u.withCtx(()=>[u.unref(o)?(u.openBlock(),u.createElementBlock("div",fC,[u.createElementVNode("div",mC,[pC,u.createElementVNode("div",gC,[u.createElementVNode("div",bC,[u.createElementVNode("div",vC,[u.createElementVNode("h1",wC,[u.unref(i).isEditing?(u.openBlock(),u.createElementBlock("span",yC,u.toDisplayString(f.$fcTr("edit")),1)):(u.openBlock(),u.createElementBlock("span",CC,u.toDisplayString(f.$fcTr("add")),1)),u.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:p[0]||(p[0]=g=>u.isRef(o)?o.value=!1:o=!1)})]),u.createElementVNode("div",EC,[u.createVNode(b,u.mergeProps({modelValue:s.value,"onUpdate:modelValue":p[1]||(p[1]=g=>s.value=g),sync:"",schema:u.unref(i).formFields,columns:{label:12}},u.unref(i).structure),null,16,["modelValue","schema"])]),u.createElementVNode("div",xC,[u.createElementVNode("button",{onClick:p[2]||(p[2]=g=>u.isRef(o)?o.value=!1:o=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(f.$fcTr("cancel")),1),u.createElementVNode("button",{disabled:u.unref(i).loadings.mainLoading,onClick:p[3]||(p[3]=g=>u.unref(e)("saveForm")),class:"border p-2 mx-1 px-8 rounded-md text-green-400 border-green-400"},[u.unref(i).loadings.mainLoading?(u.openBlock(),u.createElementBlock("span",kC,"loading")):(u.openBlock(),u.createElementBlock("span",RC,u.toDisplayString(f.$fcTr("save")),1))],8,_C)])])])])])])):u.createCommentVNode("",!0)]),_:1})}}},[["__scopeId","data-v-a3de2b85"]]),TC={};function MC(n,e){return u.openBlock(),u.createElementBlock("div")}const LC=sn(TC,[["render",MC]]),DC={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},AC={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},FC=u.createElementVNode("div",{class:"fixed inset-0 transition-opacity"},[u.createElementVNode("div",{class:"absolute inset-0 bg-gray-500 opacity-75"})],-1),PC={class:"inline-block max-h-full align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},VC={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},OC={class:"flex flex-col text-right"},NC={class:"mb-4 flex justify-between w-full"},zC=u.createElementVNode("span",{class:"text-primerr-700"},"حذف",-1),HC={class:"mb-5 flex flex-row flex-wrap"},IC={class:"flex justify-end"},BC=["disabled"],WC={key:0},$C={key:1},GC={__name:"MDeleteDialog",setup(n){const e=u.inject("store"),t=u.ref(!1);let i="";return $t.emitter.listen("deleteBtn",s=>{t.value=!0,i=s.id}),$t.emitter.listen("handleDeleteDialog",s=>{t.value=s}),(s,o)=>(u.openBlock(),u.createBlock(u.Transition,{name:"fade",appear:""},{default:u.withCtx(()=>[t.value?(u.openBlock(),u.createElementBlock("div",DC,[u.createElementVNode("div",AC,[FC,u.createElementVNode("div",PC,[u.createElementVNode("div",VC,[u.createElementVNode("div",OC,[u.createElementVNode("h1",NC,[zC,u.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:o[0]||(o[0]=l=>t.value=!1)})]),u.createElementVNode("div",HC,u.toDisplayString(s.$fcTr("alert_to_delete")),1),u.createElementVNode("div",IC,[u.createElementVNode("button",{onClick:o[1]||(o[1]=l=>t.value=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(s.$fcTr("no")),1),u.createElementVNode("button",{disabled:u.unref(e).loadings.mainLoading,class:"border p-2 mx-1 px-8 rounded-md text-green-400 border-green-400",onClick:o[2]||(o[2]=l=>u.unref(e).remove(u.unref(i)))},[u.unref(e).loadings.mainLoading?(u.openBlock(),u.createElementBlock("span",$C,"loading")):(u.openBlock(),u.createElementBlock("span",WC,u.toDisplayString(s.$fcTr("yes")),1))],8,BC)])])])])])])):u.createCommentVNode("",!0)]),_:1}))}},XT="",UC={key:0,class:"w-full border bg-white rounded p-2 flex align-center mt-2"},jC=["onClick"],KC={__name:"MHeaderBox",setup(n){const e=u.inject("store");let t=null;u.watch(()=>e.panel,s=>{e.panel==="headerBox"&&e.headersWithoutActions.forEach(o=>{t=document.querySelector(`[tabulator-field="${o.field}"]`),t.innerHTML=t.innerHTML+'<span class="fc-remove"><button class="text-white font-bold rounded px-1" onclick=""><svg aria-hidden="true" viewBox="0 0 24 24" class="h-4 w-4 text-primary-500"><path data-v-74b3417a="" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6 6 18M6 6l12 12"></path></svg></button></span>'})});function i(s){s.isHeader=!s.isHeader}return(s,o)=>u.unref(e).panel==="headerBox"?(u.openBlock(),u.createElementBlock("div",UC,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(e).flatFields,l=>(u.openBlock(),u.createElementBlock("div",{key:l.field,class:u.normalizeClass(["px-1 mx-1 cursor-pointer divide-y rounded",{"bg-primary-600 text-white":l.isHeader}]),onClick:c=>i(l)},u.toDisplayString(l.title),11,jC))),128))])):u.createCommentVNode("",!0)}},qC={__name:"MCrud",props:{options:{default:()=>({})},hiddenActions:{default:()=>[]},fields:{default:()=>[]},dir:{default:"ltr"},route:{default:"route"}},emits:["mounted"],setup(n,{emit:e}){const t=n,i=Qf({fields:t.fields,hiddenActions:t.hiddenActions,options:t.options,route:t.route});return u.provide("store",i),u.provide("dir",t.dir),document.body.setAttribute("dir",t.dir),u.onMounted(()=>{document.getElementsByClassName("v-overlay-container")[0].setAttribute("dir","ltr"),e("mounted")}),(s,o)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(kv),u.createVNode(aC),u.createVNode(KC),u.createVNode(wg),u.createVNode(SC),u.createVNode(LC),u.createVNode(GC),u.renderSlot(s.$slots,"extra")],64))}},JT="",ZT="",QT="",YC={en:{clear:"Clear",no:"No",yes:"yes",alert_to_delete:"Are you sure to delete?",first:"First",previous:"Previous",next:"Next",last:"Last",apply_filter:"Apply filter",filter:"Filter",add_filter:"Add filter",clear_all:"Clear all",add:"Add",save:"Save",edit:"Edit",cancel:"Cancel",choose_filter:"Choose filter",select_type:"Select type",equal_to:"Equal to",not_equal_to:"Not equal to",greater_than:"Greater than",less_than:"Less than",look_like:"Look like",search:"Search ...",range:"Range",add:"Add",export:"Export",export_as_pdf:"Export as PDF",export_as_excel:" Export as Excel",print:"Print",reload:"Reload",select_row:"Select row",custom_column:"Custom column",filter_data:"Filter data",active_filter:"Active filter"},fa:{clear:"پاک کردن",no:"خیر",yes:"بله",alert_to_delete:"آیا از حذف کردن مطمئن هستید؟",first:"ابتدا",previous:"قبلی",next:"بعدی",last:"آخرین",apply_filter:"اعمال فیلتر",filter:"فیلتر",add_filter:"اضافهکردن فیلتر",clear_all:"حذف فیلترها",add:"افرودن",save:"ذخیره",edit:"ویرایش",cancel:"لغو",choose_filter:"انتخاب فیلتر",select_type:"انتخاب کنید",equal_to:"برابر با",not_equal_to:"نابرابر با",greater_than:"بزرگتر از",less_than:"کوچکتر از",look_like:"مشابه",search:"جستجو ...",range:"محدوده",edit_filter:"ویرایش فیلتر",export:"خروجیگرفتن",export_as_pdf:"PDF خروجی",export_as_excel:"Excel خروجی",print:"خروجی چاپی",reload:"بارگذاری مجدد",select_row:"انتخاب ردیف",custom_column:"ستون سفارشی",filter_data:"فیلترکردن ",active_filter:"فیلترهای فعال",not_load_or_existing_data:"دیتایی وجود ندارد :(",filter_save_placeholder:"اسم فیلتر",not_filter_create_yes:"هنوز فیلتری ایجاد نشده است"}},XC=ml.defineStore("formuCrudLangs",{state:()=>({lang:"fa",langs:YC}),getters:{currentLang(n){return re.get(n.langs,n.lang,"fa")}},actions:{translate(n){return re.get(this.currentLang,n,n)}}}),Uo={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function JC(n,e){const t=[];let i=[];const s=cd(n),o=dd(n),l=s.getDay()-Uo[e.slice(-2).toUpperCase()],c=o.getDay()-Uo[e.slice(-2).toUpperCase()];for(let h=0;h<l;h++){const f=new Date(s);f.setDate(f.getDate()-(l-h)),i.push(f)}for(let h=1;h<=o.getDate();h++){const f=new Date(n.getFullYear(),n.getMonth(),h);i.push(f),i.length===7&&(t.push(i),i=[])}for(let h=1;h<7-c;h++){const f=new Date(o);f.setDate(f.getDate()+h),i.push(f)}return t.push(i),t}function cd(n){return new Date(n.getFullYear(),n.getMonth(),1)}function dd(n){return new Date(n.getFullYear(),n.getMonth()+1,0)}function ZC(n){const e=n.split("-").map(Number);return new Date(e[0],e[1]-1,e[2])}const QC=/([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))/;function e0(n){if(n==null)return new Date;if(n instanceof Date)return n;if(typeof n=="string"){let e;if(QC.test(n))return ZC(n);if(e=Date.parse(n),!isNaN(e))return new Date(e)}return null}const hd=new Date(2e3,0,2);function t0(n){const e=Uo[n.slice(-2).toUpperCase()];return eo(7).map(t=>{const i=new Date(hd);return i.setDate(hd.getDate()+e+t),new Intl.DateTimeFormat(n,{weekday:"narrow"}).format(i)})}function i0(n,e,t){const i=new Date(n);let s={};switch(e){case"fullDateWithWeekday":s={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"normalDateWithWeekday":s={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":s={};break;case"monthAndDate":s={month:"long",day:"numeric"};break;case"monthAndYear":s={month:"long",year:"numeric"};break;case"dayOfMonth":s={day:"numeric"};break;default:s={timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(t,s).format(i)}function n0(n,e){const t=new Date(n);return t.setDate(t.getDate()+e),t}function s0(n,e){const t=new Date(n);return t.setMonth(t.getMonth()+e),t}function r0(n){return n.getFullYear()}function o0(n){return n.getMonth()}function a0(n){return new Date(n.getFullYear(),0,1)}function l0(n){return new Date(n.getFullYear(),11,31)}function u0(n,e){return jo(n,e[0])&&d0(n,e[1])}function c0(n){const e=new Date(n);return e instanceof Date&&!isNaN(e.getTime())}function jo(n,e){return n.getTime()>e.getTime()}function d0(n,e){return n.getTime()<e.getTime()}function fd(n,e){return n.getTime()===e.getTime()}function h0(n,e){return n.getDate()===e.getDate()&&n.getMonth()===e.getMonth()&&n.getFullYear()===e.getFullYear()}function f0(n,e){return n.getMonth()===e.getMonth()&&n.getFullYear()===e.getFullYear()}function m0(n,e,t){const i=new Date(n),s=new Date(e);return t==="month"?i.getMonth()-s.getMonth()+(i.getFullYear()-s.getFullYear())*12:Math.floor((i.getTime()-s.getTime())/(1e3*60*60*24))}function p0(n,e){const t=new Date(n);return t.setFullYear(e),t}class g0{constructor(e){this.locale=e.locale}date(e){return e0(e)}toJsDate(e){return e}addDays(e,t){return n0(e,t)}addMonths(e,t){return s0(e,t)}getWeekArray(e){return JC(e,this.locale)}startOfMonth(e){return cd(e)}endOfMonth(e){return dd(e)}format(e,t){return i0(e,t,this.locale)}isEqual(e,t){return fd(e,t)}isValid(e){return c0(e)}isWithinRange(e,t){return u0(e,t)}isAfter(e,t){return jo(e,t)}isBefore(e,t){return!jo(e,t)&&!fd(e,t)}isSameDay(e,t){return h0(e,t)}isSameMonth(e,t){return f0(e,t)}setYear(e,t){return p0(e,t)}getDiff(e,t,i){return m0(e,t,i)}getWeekdays(){return t0(this.locale)}getYear(e){return r0(e)}getMonth(e){return o0(e)}startOfYear(e){return a0(e)}endOfYear(e){return l0(e)}}const md=Symbol.for("vuetify:date-adapter");function b0(n){return At({adapter:g0,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"nn-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},n)}function pd(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:e,...t}=n,i=At(e,t),{aliases:s={},components:o={},directives:l={}}=i,c=Xg(i.defaults),h=Cb(i.display,i.ssr),f=Ob(i.theme),p=Lv(i.icons),b=Mb(i.locale),g=b0(i.date);return{install:E=>{for(const x in l)E.directive(x,l[x]);for(const x in o)E.component(x,o[x]);for(const x in s)E.component(x,mn({...s[x],name:x,aliasName:s[x].name}));if(f.install(E),E.provide(fn,c),E.provide(Co,h),E.provide(Ks,f),E.provide(To,p),E.provide(Us,b),E.provide(md,g),Ne&&i.ssr)if(E.$nuxt)E.$nuxt.hook("app:suspense:resolve",()=>{h.update()});else{const{mount:x}=E;E.mount=function(){const _=x(...arguments);return u.nextTick(()=>h.update()),E.mount=x,_}}Ut.reset(),E.mixin({computed:{$vuetify(){return u.reactive({defaults:En.call(this,fn),display:En.call(this,Co),theme:En.call(this,Ks),icons:En.call(this,To),locale:En.call(this,Us),date:En.call(this,md)})}}})},defaults:c,display:h,theme:f,icons:p,locale:b,date:g}}const v0="3.3.14";pd.version=v0;function En(n){var i,s;const e=this.$,t=((i=e.parent)==null?void 0:i.provides)??((s=e.vnode.appContext)==null?void 0:s.provides);if(t&&n in t)return t[n]}const w0=({headers:n,baseURL:e}={headers:[],baseURL:""})=>{Xt.defaults.baseURL=e;for(const t in n)re.set(Xt.defaults.headers,t,n[t])},y0=(n,{fields:e,axiosConfig:t}={fields:{},axiosConfig:{}})=>{w0(t);const i=pd({locale:{locale:"customLocale",rtl:{customLocale:!0}}});n.use(i);const s=XC();n.config.globalProperties.$fcTr=o=>s.translate(o),bl(e)};wt.MCrud=qC,wt.defineFields=im,wt.install=y0,wt.registerFields=bl,Object.defineProperty(wt,Symbol.toStringTag,{value:"Module"})});
|
51
|
+
`)}function uh(s){const e=s.dark?2:1,t=s.dark?1:2,i=[];for(const[n,o]of Object.entries(s.colors)){const l=Nt(o);i.push(`--v-theme-${n}: ${l.r},${l.g},${l.b}`),n.startsWith("on-")||i.push(`--v-theme-${n}-overlay-multiplier: ${uv(o)>.18?e:t}`)}for(const[n,o]of Object.entries(s.variables)){const l=typeof o=="string"&&o.startsWith("#")?Nt(o):void 0,h=l?`${l.r}, ${l.g}, ${l.b}`:void 0;i.push(`--v-${n}: ${h??o}`)}return i}const lw=Be({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:s=>s!==!0}},"transition"),uw=(s,e)=>{let{slots:t}=e;const{transition:i,disabled:n,...o}=s,{component:l=d.Transition,...h}=typeof i=="object"?i:{};return d.h(l,d.mergeProps(typeof i=="string"?{name:n?"":i}:h,o,{disabled:n}),t)};function hw(){return!0}function hh(s,e,t){if(!s||ch(s,t)===!1)return!1;const i=Ku(e);if(typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&i.host===s.target)return!1;const n=(typeof t.value=="object"&&t.value.include||(()=>[]))();return n.push(e),!n.some(o=>o==null?void 0:o.contains(s.target))}function ch(s,e){return(typeof e.value=="object"&&e.value.closeConditional||hw)(s)}function cw(s,e,t){const i=typeof t.value=="function"?t.value:t.value.handler;e._clickOutside.lastMousedownWasOutside&&hh(s,e,t)&&setTimeout(()=>{ch(s,t)&&i&&i(s)},0)}function dh(s,e){const t=Ku(s);e(document),typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&e(t)}const dw={mounted(s,e){const t=n=>cw(n,s,e),i=n=>{s._clickOutside.lastMousedownWasOutside=hh(n,s,e)};dh(s,n=>{n.addEventListener("click",t,!0),n.addEventListener("mousedown",i,!0)}),s._clickOutside||(s._clickOutside={lastMousedownWasOutside:!1}),s._clickOutside[e.instance.$.uid]={onClick:t,onMousedown:i}},unmounted(s,e){s._clickOutside&&(dh(s,t=>{var o;if(!t||!((o=s._clickOutside)!=null&&o[e.instance.$.uid]))return;const{onClick:i,onMousedown:n}=s._clickOutside[e.instance.$.uid];t.removeEventListener("click",i,!0),t.removeEventListener("mousedown",n,!0)}),delete s._clickOutside[e.instance.$.uid])}};function fw(s){const{modelValue:e,color:t,...i}=s;return d.createVNode(d.Transition,{name:"fade-transition",appear:!0},{default:()=>[s.modelValue&&d.createVNode("div",d.mergeProps({class:["v-overlay__scrim",s.color.backgroundColorClasses.value],style:s.color.backgroundColorStyles.value},i),null)]})}const Eo=Be({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...Pv(),...hv(),...Iv(),...Uv(),...Cv(),...Sv(),...rw(),...lw()},"VOverlay"),_r=Wi()({name:"VOverlay",directives:{ClickOutside:dw},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Eo()},emits:{"click:outside":s=>!0,"update:modelValue":s=>!0,afterLeave:()=>!0},setup(s,e){let{slots:t,attrs:i,emit:n}=e;const o=Er(s,"modelValue"),l=d.computed({get:()=>o.value,set:fe=>{fe&&s.disabled||(o.value=fe)}}),{teleportTarget:h}=nw(d.computed(()=>s.attach||s.contained)),{themeClasses:c}=aw(s),{rtlClasses:f,isRtl:m}=Qv(),{hasContent:b,onAfterLeave:v}=jv(s,l),C=Nv(d.computed(()=>typeof s.scrim=="string"?s.scrim:null)),{globalTop:x,localTop:R,stackStyles:L}=iw(l,d.toRef(s,"zIndex"),s._disableGlobalStack),{activatorEl:k,activatorRef:H,activatorEvents:P,contentEvents:z,scrimEvents:V}=Ov(s,{isActive:l,isTop:R}),{dimensionStyles:Z}=Bv(s),N=Gv(),{scopeId:W}=Co();d.watch(()=>s.disabled,fe=>{fe&&(l.value=!1)});const le=d.ref(),Ee=d.ref(),{contentStyles:de,updateLocation:$}=Ev(s,{isRtl:m,contentEl:Ee,activatorEl:k,isActive:l});kv(s,{root:le,contentEl:Ee,activatorEl:k,isActive:l,updateLocation:$});function Q(fe){n("click:outside",fe),s.persistent?me():l.value=!1}function se(){return l.value&&x.value}Re&&d.watch(l,fe=>{fe?window.addEventListener("keydown",De):window.removeEventListener("keydown",De)},{immediate:!0});function De(fe){var Pe,Ae;fe.key==="Escape"&&x.value&&(s.persistent?me():(l.value=!1,(Pe=Ee.value)!=null&&Pe.contains(document.activeElement)&&((Ae=k.value)==null||Ae.focus())))}const Te=ew();cr(()=>s.closeOnBack,()=>{tw(Te,fe=>{x.value&&l.value?(fe(!1),s.persistent?me():l.value=!1):fe()})});const Ye=d.ref();d.watch(()=>l.value&&(s.absolute||s.contained)&&h.value==null,fe=>{if(fe){const Pe=bv(le.value);Pe&&Pe!==document.scrollingElement&&(Ye.value=Pe.scrollTop)}});function me(){s.noClickAnimation||Ee.value&&Cn(Ee.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:uo})}return co(()=>{var fe;return d.createVNode(d.Fragment,null,[(fe=t.activator)==null?void 0:fe.call(t,{isActive:l.value,props:d.mergeProps({ref:H},P.value,s.activatorProps)}),N.value&&b.value&&d.createVNode(d.Teleport,{disabled:!h.value,to:h.value},{default:()=>[d.createVNode("div",d.mergeProps({class:["v-overlay",{"v-overlay--absolute":s.absolute||s.contained,"v-overlay--active":l.value,"v-overlay--contained":s.contained},c.value,f.value,s.class],style:[L.value,{top:Ie(Ye.value)},s.style],ref:le},W,i),[d.createVNode(fw,d.mergeProps({color:C,modelValue:l.value&&!!s.scrim},V.value),null),d.createVNode(uw,{appear:!0,persisted:!0,transition:s.transition,target:k.value,onAfterLeave:()=>{v(),n("afterLeave")}},{default:()=>{var Pe;return[d.withDirectives(d.createVNode("div",d.mergeProps({ref:Ee,class:["v-overlay__content",s.contentClass],style:[Z.value,de.value]},z.value,s.contentProps),[(Pe=t.default)==null?void 0:Pe.call(t,{isActive:l})]),[[d.vShow,l.value],[d.resolveDirective("click-outside"),{handler:Q,closeConditional:se,include:()=>[k.value]}]])]}})])]})])}),{activatorEl:k,animateClick:me,contentEl:Ee,globalTop:x,localTop:R,updateLocation:$}}}),xo=Symbol("Forwarded refs");function _o(s,e){let t=s;for(;t;){const i=Reflect.getOwnPropertyDescriptor(t,e);if(i)return i;t=Object.getPrototypeOf(t)}}function fh(s){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return s[xo]=t,new Proxy(s,{get(n,o){if(Reflect.has(n,o))return Reflect.get(n,o);if(!(typeof o=="symbol"||o.startsWith("__"))){for(const l of t)if(l.value&&Reflect.has(l.value,o)){const h=Reflect.get(l.value,o);return typeof h=="function"?h.bind(l.value):h}}},has(n,o){if(Reflect.has(n,o))return!0;if(typeof o=="symbol"||o.startsWith("__"))return!1;for(const l of t)if(l.value&&Reflect.has(l.value,o))return!0;return!1},set(n,o,l){if(Reflect.has(n,o))return Reflect.set(n,o,l);if(typeof o=="symbol"||o.startsWith("__"))return!1;for(const h of t)if(h.value&&Reflect.has(h.value,o))return Reflect.set(h.value,o,l);return!1},getOwnPropertyDescriptor(n,o){var h;const l=Reflect.getOwnPropertyDescriptor(n,o);if(l)return l;if(!(typeof o=="symbol"||o.startsWith("__"))){for(const c of t){if(!c.value)continue;const f=_o(c.value,o)??("_"in c.value?_o((h=c.value._)==null?void 0:h.setupState,o):void 0);if(f)return f}for(const c of t){const f=c.value&&c.value[xo];if(!f)continue;const m=f.slice();for(;m.length;){const b=m.shift(),v=_o(b.value,o);if(v)return v;const C=b.value&&b.value[xo];C&&m.push(...C)}}}}})}const pw=Be({id:String,text:String,...vu(Eo({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),Sn=Wi()({name:"VTooltip",props:pw(),emits:{"update:modelValue":s=>!0},setup(s,e){let{slots:t}=e;const i=Er(s,"modelValue"),{scopeId:n}=Co(),o=vr(),l=d.computed(()=>s.id||`v-tooltip-${o}`),h=d.ref(),c=d.computed(()=>s.location.split(" ").length>1?s.location:s.location+" center"),f=d.computed(()=>s.origin==="auto"||s.origin==="overlap"||s.origin.split(" ").length>1||s.location.split(" ").length>1?s.origin:s.origin+" center"),m=d.computed(()=>s.transition?s.transition:i.value?"scale-transition":"fade-transition"),b=d.computed(()=>d.mergeProps({"aria-describedby":l.value},s.activatorProps));return co(()=>{const[v]=_r.filterProps(s);return d.createVNode(_r,d.mergeProps({ref:h,class:["v-tooltip",s.class],style:s.style,id:l.value},v,{modelValue:i.value,"onUpdate:modelValue":C=>i.value=C,transition:m.value,absolute:!0,location:c.value,origin:f.value,persistent:!0,role:"tooltip",activatorProps:b.value,_disableGlobalStack:!0},n),{activator:t.activator,default:function(){var L;for(var C=arguments.length,x=new Array(C),R=0;R<C;R++)x[R]=arguments[R];return((L=t.default)==null?void 0:L.call(t,...x))??s.text}})}),fh({},h)}}),E2="",mw=Be({target:Object},"v-dialog-transition"),gw=Wi()({name:"VDialogTransition",props:mw(),setup(s,e){let{slots:t}=e;const i={onBeforeEnter(n){n.style.pointerEvents="none",n.style.visibility="hidden"},async onEnter(n,o){var v;await new Promise(C=>requestAnimationFrame(C)),await new Promise(C=>requestAnimationFrame(C)),n.style.visibility="";const{x:l,y:h,sx:c,sy:f,speed:m}=mh(s.target,n),b=Cn(n,[{transform:`translate(${l}px, ${h}px) scale(${c}, ${f})`,opacity:0},{}],{duration:225*m,easing:mv});(v=ph(n))==null||v.forEach(C=>{Cn(C,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*m,easing:uo})}),b.finished.then(()=>o())},onAfterEnter(n){n.style.removeProperty("pointer-events")},onBeforeLeave(n){n.style.pointerEvents="none"},async onLeave(n,o){var v;await new Promise(C=>requestAnimationFrame(C));const{x:l,y:h,sx:c,sy:f,speed:m}=mh(s.target,n);Cn(n,[{},{transform:`translate(${l}px, ${h}px) scale(${c}, ${f})`,opacity:0}],{duration:125*m,easing:gv}).finished.then(()=>o()),(v=ph(n))==null||v.forEach(C=>{Cn(C,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*m,easing:uo})})},onAfterLeave(n){n.style.removeProperty("pointer-events")}};return()=>s.target?d.createVNode(d.Transition,d.mergeProps({name:"dialog-transition"},i,{css:!1}),t):d.createVNode(d.Transition,{name:"dialog-transition"},t)}});function ph(s){var t;const e=(t=s.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:t.children;return e&&[...e]}function mh(s,e){const t=s.getBoundingClientRect(),i=Lu(e),[n,o]=getComputedStyle(e).transformOrigin.split(" ").map(k=>parseFloat(k)),[l,h]=getComputedStyle(e).getPropertyValue("--v-overlay-anchor-origin").split(" ");let c=t.left+t.width/2;l==="left"||h==="left"?c-=t.width/2:(l==="right"||h==="right")&&(c+=t.width/2);let f=t.top+t.height/2;l==="top"||h==="top"?f-=t.height/2:(l==="bottom"||h==="bottom")&&(f+=t.height/2);const m=t.width/i.width,b=t.height/i.height,v=Math.max(1,m,b),C=m/v||0,x=b/v||0,R=i.width*i.height/(window.innerWidth*window.innerHeight),L=R>.12?Math.min(1.5,(R-.12)*10+1):1;return{x:c-(n+i.left),y:f-(o+i.top),sx:C,sy:x,speed:L}}const bw=Be({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),vw=Wi(!1)({name:"VDefaultsProvider",props:bw(),setup(s,e){let{slots:t}=e;const{defaults:i,disabled:n,reset:o,root:l,scoped:h}=d.toRefs(s);return dv(i,{reset:o,root:l,scoped:h,disabled:n}),()=>{var c;return(c=t.default)==null?void 0:c.call(t)}}}),ww=Be({id:String,...vu(Eo({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:gw}}),["absolute"])},"VMenu"),Ro=Wi()({name:"VMenu",props:ww(),emits:{"update:modelValue":s=>!0},setup(s,e){let{slots:t}=e;const i=Er(s,"modelValue"),{scopeId:n}=Co(),o=vr(),l=d.computed(()=>s.id||`v-menu-${o}`),h=d.ref(),c=d.inject(go,null),f=d.shallowRef(0);d.provide(go,{register(){++f.value},unregister(){--f.value},closeParents(){setTimeout(()=>{f.value||(i.value=!1,c==null||c.closeParents())},40)}});async function m(R){var H,P,z;const L=R.relatedTarget,k=R.target;await d.nextTick(),i.value&&L!==k&&((H=h.value)!=null&&H.contentEl)&&((P=h.value)!=null&&P.globalTop)&&![document,h.value.contentEl].includes(k)&&!h.value.contentEl.contains(k)&&((z=io(h.value.contentEl)[0])==null||z.focus())}d.watch(i,R=>{R?(c==null||c.register(),document.addEventListener("focusin",m,{once:!0})):(c==null||c.unregister(),document.removeEventListener("focusin",m))});function b(){c==null||c.closeParents()}function v(R){var L,k,H;s.disabled||R.key==="Tab"&&(xu(io((L=h.value)==null?void 0:L.contentEl,!1),R.shiftKey?"prev":"next",z=>z.tabIndex>=0)||(i.value=!1,(H=(k=h.value)==null?void 0:k.activatorEl)==null||H.focus()))}function C(R){var k;if(s.disabled)return;const L=(k=h.value)==null?void 0:k.contentEl;L&&i.value?R.key==="ArrowDown"?(R.preventDefault(),no(L,"next")):R.key==="ArrowUp"&&(R.preventDefault(),no(L,"prev")):["ArrowDown","ArrowUp"].includes(R.key)&&(i.value=!0,R.preventDefault(),setTimeout(()=>setTimeout(()=>C(R))))}const x=d.computed(()=>d.mergeProps({"aria-haspopup":"menu","aria-expanded":String(i.value),"aria-owns":l.value,onKeydown:C},s.activatorProps));return co(()=>{const[R]=_r.filterProps(s);return d.createVNode(_r,d.mergeProps({ref:h,class:["v-menu",s.class],style:s.style},R,{modelValue:i.value,"onUpdate:modelValue":L=>i.value=L,absolute:!0,activatorProps:x.value,"onClick:outside":b,onKeydown:v},n),{activator:t.activator,default:function(){for(var L=arguments.length,k=new Array(L),H=0;H<L;H++)k[H]=arguments[H];return d.createVNode(vw,{root:"VMenu"},{default:()=>{var P;return[(P=t.default)==null?void 0:P.call(t,...k)]}})}})}),fh({id:l,ΨopenChildren:f},h)}}),yw={class:"flex items-center gap-3 relative hover:bg-muted-200 dark:hover:bg-muted-700 rounded-lg px-5 pl-3 rtl:pl-8 rtl:pr-5 py-2 duration-300"},Cw=["modelValue"],Ew={class:"text-success-500 peer-disabled:opacity-75"},xw=d.createElementVNode("svg",{"aria-hidden":"true",viewBox:"0 0 52 52","data-v-3e8a7b5f":""},[d.createElementVNode("circle",{cx:"26",cy:"26",r:"25",fill:"none",stroke:"currentColor"}),d.createElementVNode("path",{fill:"none",stroke:"currentColor",d:"m14.1 27.2 7.1 7.2 16.7-16.8"})],-1),_w={class:"font-heading text-muted-800 text-xs font-semibold leading-tight dark:text-white"},Rw={__name:"SelectColumnItem",props:{checked:{default:!1},columnName:{default:""}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",yw,[d.createElementVNode("div",{class:d.normalizeClass(["nui-focus block focus-within:outline-current rounded-full",JSON.parse(s.checked)?"is-checked":"is-unchecked"])},[d.createElementVNode("input",{modelValue:s.checked,type:"checkbox",class:"peer cursor-pointer disabled:cursor-not-allowed","true-value":"true","false-value":"false",onClick:t[0]||(t[0]=i=>e.$emit("toggle"))},null,8,Cw),d.createElementVNode("label",Ew,[d.createElementVNode("div",{class:d.normalizeClass(["rtl:left-[auto] rtl:!right-0 ltr:right-[auto] ltr:left-0",JSON.parse(s.checked)?"is-opaque":""])},null,2),xw])],2),d.createElementVNode("div",null,[d.createElementVNode("h6",_w,d.toDisplayString(s.columnName),1)])]))}},x2="",yt=s=>(d.pushScopeId("data-v-5a7c7720"),s=s(),d.popScopeId(),s),Tw={class:"fc-header"},Sw={class:"fc-header-left-sid"},kw=[yt(()=>d.createElementVNode("svg",{viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1))],Mw={class:"z-[1]"},Lw={class:"bg-muted-200 dark:bg-muted-800 cursor-pointer rounded-b-xl fm-light-shadow"},Dw={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},Aw={class:"text-muted-400 font-sans text-xs"},Fw=yt(()=>d.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M64 464H96v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V288H336V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"})],-1)),Pw={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},Ow={class:"text-muted-400 font-sans text-xs"},Hw=yt(()=>d.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"})],-1)),zw={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 dark:hover:bg-muted-700 rounded-xl justify-end flex-row-reverse"},Nw={class:"text-muted-400 font-sans text-xs"},Iw=yt(()=>d.createElementVNode("svg",{class:"fill-muted-400 w-3.5 mx-2",viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M112 160V64c0-8.8 7.2-16 16-16H357.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c3 3 4.7 7.1 4.7 11.3V160h48V90.5c0-17-6.7-33.3-18.7-45.3L402.7 18.7C390.7 6.7 374.5 0 357.5 0H128C92.7 0 64 28.7 64 64v96h48zm16 208H384v96H128V368zm-16-48c-17.7 0-32 14.3-32 32H48V256c0-8.8 7.2-16 16-16H448c8.8 0 16 7.2 16 16v96H432c0-17.7-14.3-32-32-32H112zm320 80h48c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64V368c0 17.7 14.3 32 32 32H80v80c0 17.7 14.3 32 32 32H400c17.7 0 32-14.3 32-32V400z"})],-1)),Bw=[yt(()=>d.createElementVNode("path",{d:"M371.2 122.9C340.3 96.2 300 80 256 80C158.8 80 80 158.8 80 256s78.8 176 176 176c39.7 0 76.2-13.1 105.6-35.2c10.6-8 25.6-5.8 33.6 4.8s5.8 25.6-4.8 33.6C353 463.3 306.4 480 256 480C132.3 480 32 379.7 32 256S132.3 32 256 32c57.3 0 109.6 21.5 149.2 56.9l30.5-30.5c6.6-6.6 15.6-10.3 25-10.3C480.2 48 496 63.8 496 83.3V200c0 13.3-10.7 24-24 24H355.3c-19.5 0-35.3-15.8-35.3-35.3c0-9.4 3.7-18.3 10.3-25l40.8-40.8zm76.8-9L385.9 176H448V113.9z"},null,-1))],Vw=[yt(()=>d.createElementVNode("svg",{viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M384 48c8.8 0 16 7.2 16 16V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H384zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM80 112v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V112c0-8.8-7.2-16-16-16H96c-8.8 0-16 7.2-16 16zM96 352c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16H96zm80-224c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H200c-13.3 0-24 10.7-24 24zm32 128c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H232c-13.3 0-24 10.7-24 24zM176 384c0 13.3 10.7 24 24 24H344c13.3 0 24-10.7 24-24s-10.7-24-24-24H200c-13.3 0-24 10.7-24 24zm-4.7-140.7c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L112 257.4 99.3 244.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l24 24c6.2 6.2 16.4 6.2 22.6 0l48-48z"})],-1))],Ww=[yt(()=>d.createElementVNode("svg",{viewBox:"0 0 448 512",class:"z-[1]"},[d.createElementVNode("path",{d:"M64 448c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32H384c17.7 0 32 14.3 32 32V416c0 17.7-14.3 32-32 32H64zM0 416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416zM128 288c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16V272c0 8.8 7.2 16 16 16zm176 48c0 8.8 7.2 16 16 16s16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16V336zm-80-80c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16z"})],-1))],$w={class:"bg-white dark:bg-muted-800 rounded-xl rtl:text-right ltr:text-left fm-light-shadow"},Gw={class:"m-3 mt-2 text-muted-600 dark:text-muted-200"},Uw={class:"p-2"},jw={class:"fm-header-rigth-sid flex w-full sm:w-auto rtl:flex-row-reverse rtl:justify-end z-10"},Kw={key:0},qw=[yt(()=>d.createElementVNode("span",null,null,-1))],Yw=[yt(()=>d.createElementVNode("path",{d:"M0 73.7C0 50.7 18.7 32 41.7 32H470.3c23 0 41.7 18.7 41.7 41.7c0 9.6-3.3 18.9-9.4 26.3L336 304.5V447.7c0 17.8-14.5 32.3-32.3 32.3c-7.3 0-14.4-2.5-20.1-7l-92.5-73.4c-9.6-7.6-15.1-19.1-15.1-31.3V304.5L9.4 100C3.3 92.6 0 83.3 0 73.7zM55 80L218.6 280.8c3.5 4.3 5.4 9.6 5.4 15.2v68.4l64 50.8V296c0-5.5 1.9-10.9 5.4-15.2L457 80H55z"},null,-1))],Xw={class:"group/nui-input relative rtl:"},Jw=["placeholder"],Zw={class:"ltr:left-0 text-muted-400 group-focus-within/nui-input:text-primary-500 absolute end-0 rtl:start-0 top-0 flex items-center justify-center transition-colors duration-300 peer-disabled:cursor-not-allowed peer-disabled:opacity-75 h-10 w-10"},Qw={key:0,class:"icon h-[1.15rem] w-[1.15rem]",width:"1em",height:"1em",viewBox:"0 0 24 24"},ey=[yt(()=>d.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[d.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),d.createElementVNode("path",{d:"m21 21l-4.35-4.35"})],-1))],ty={key:1,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512",class:"icon animate-spin"},iy=[yt(()=>d.createElementVNode("path",{d:"M457 372c11.5 6.6 26.3 2.7 31.8-9.3C503.7 330.2 512 294.1 512 256C512 122.7 410.1 13.2 280 1.1C266.8-.1 256 10.7 256 24v0c0 13.3 10.8 23.9 24 25.4C383.5 61.2 464 149.2 464 256c0 29.3-6.1 57.3-17 82.6c-5.3 12.2-1.5 26.8 10 33.5v0z"},null,-1))],ny=yn({__name:"MButtonBox",setup(s){const{event:e}=tt.emitter,t=d.inject("store");function i(b){b===t.panel?t.panel="":t.panel=b}const n=d.ref(null);d.onMounted(()=>{n.value=document.body.getAttribute("dir")});const o=d.computed(()=>t.flatFields.find(b=>b.field==="_select_")),l=d.computed(()=>!!o.value.isHeader);function h(){o.value.isHeader=!o.value.isHeader,o.value.isHeader||t.selected.clear()}const c=d.ref(!1);function f(){c.value=!0,t.loadItems().finally(()=>c.value=!1)}const m=U.debounce(f,600);return(b,v)=>(d.openBlock(),d.createElementBlock("div",Tw,[d.createElementVNode("div",Sw,[d.createVNode(d.unref(Sn),{color:"#ec4899",location:"bottom",text:b.$fcTr("add")},{activator:d.withCtx(({props:C})=>[d.createElementVNode("button",d.mergeProps(C,{class:"fc-plus-btn",onClick:v[0]||(v[0]=x=>d.unref(e)("createBtn"))}),kw,16)]),_:1},8,["text"]),d.createVNode(d.unref(Ro),null,{activator:d.withCtx(({props:C})=>[d.createElementVNode("button",d.mergeProps({class:JSON.parse(C["aria-expanded"])?"before:block":"before:hidden"},C,{class:"fc-header-icon-btn fc-drop-down-btn min-w-[130px]"}),[d.createElementVNode("span",Mw,d.toDisplayString(b.$fcTr("export")),1)],16)]),default:d.withCtx(()=>[d.createElementVNode("div",Lw,[d.createElementVNode("a",Dw,[d.createElementVNode("p",Aw,d.toDisplayString(b.$fcTr("export_as_pdf")),1),Fw]),d.createElementVNode("a",Pw,[d.createElementVNode("p",Ow,d.toDisplayString(b.$fcTr("export_as_excel")),1),Hw]),d.createElementVNode("a",zw,[d.createElementVNode("p",Nw,d.toDisplayString(b.$fcTr("print")),1),Iw])])]),_:1}),d.createVNode(d.unref(Sn),{color:"#ec4899",location:"bottom",text:b.$fcTr("reload")},{activator:d.withCtx(({props:C})=>[d.createElementVNode("button",d.mergeProps(C,{class:"fc-header-icon-btn",onClick:v[1]||(v[1]=(...x)=>d.unref(t).reloadData&&d.unref(t).reloadData(...x))}),[(d.openBlock(),d.createElementBlock("svg",{class:d.normalizeClass({spin:d.unref(t).loadings.mainLoading}),viewBox:"0 0 512 512"},Bw,2))],16)]),_:1},8,["text"]),d.createVNode(d.unref(Sn),{color:"#ec4899",location:"bottom",text:b.$fcTr("select_row")},{activator:d.withCtx(({props:C})=>[d.createElementVNode("button",d.mergeProps(C,{class:["fc-header-icon-btn",{"fm-active-btn":l.value}],onClick:h}),Vw,16)]),_:1},8,["text"]),d.createVNode(d.unref(Ro),{"close-on-content-click":!1,location:n.value==="rtl"?"end":"start"},{activator:d.withCtx(({props:C})=>[d.createVNode(d.unref(Sn),{color:"#ec4899",location:"bottom"},{activator:d.withCtx(({props:x})=>[d.createElementVNode("button",d.mergeProps({...C,...x},{class:["fc-header-icon-btn",[JSON.parse(C["aria-expanded"])?"light:!bg-white dark:bg-muted-800":"",JSON.parse(C["aria-expanded"])?n.value==="rtl"?"expanded-rtl":"expanded2":""]]}),Ww,16)]),default:d.withCtx(()=>[d.createElementVNode("span",null,d.toDisplayString(b.$fcTr("custom_column")),1)]),_:2},1024)]),default:d.withCtx(()=>[d.createElementVNode("div",$w,[d.createElementVNode("div",Gw,d.toDisplayString(b.$fcTr("custom_column")),1),d.createElementVNode("ul",Uw,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(t).flatFieldsWithoutActions,C=>(d.openBlock(),d.createBlock(Rw,{key:C.field,"column-name":C.title,checked:C.isHeader,onToggle:x=>C.isHeader=!C.isHeader},null,8,["column-name","checked","onToggle"]))),128))])])]),_:1},8,["location"])]),d.createElementVNode("div",jw,[d.createVNode(d.unref(Sn),{color:"#ec4899",location:"bottom",text:b.$fcTr("filter")},{activator:d.withCtx(({props:C})=>[d.createElementVNode("button",d.mergeProps(C,{class:["test fc-header-icon-btn transform transition-all",d.unref(t).panel==="filters"?"!bg-white dark:!bg-muted-800 !rounded-b-none ":""],onClick:v[2]||(v[2]=x=>i("filters"))}),[d.createVNode(d.Transition,{name:"scale"},{default:d.withCtx(()=>[d.unref(t).panel==="filters"?(d.openBlock(),d.createElementBlock("div",Kw,qw)):d.createCommentVNode("",!0)]),_:1}),(d.openBlock(),d.createElementBlock("svg",{class:d.normalizeClass(d.unref(t).panel==="filters"?"light:!fill-primary-700":""),stroke:"currentColor",viewBox:"0 0 512 512"},Yw,2))],16)]),_:1},8,["text"]),d.createElementVNode("div",Xw,[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":v[3]||(v[3]=C=>d.unref(t).searchParam=C),type:"text",class:"nui-focus !pl-4 border-muted-300 text-muted-600 placeholder:text-muted-300 dark:border-muted-700 dark:bg-muted-900/75 dark:text-muted-200 dark:placeholder:text-muted-500 dark:focus:border-muted-700 peer w-full border bg-white font-sans transition-all duration-300 disabled:cursor-not-allowed disabled:opacity-75 px-2 h-10 py-2 text-sm leading-5 pe-4 ps-9 rounded-full",placeholder:b.$fcTr("search"),onKeyup:v[4]||(v[4]=(...C)=>d.unref(m)&&d.unref(m)(...C))},null,40,Jw),[[d.vModelText,d.unref(t).searchParam]]),d.createElementVNode("div",Zw,[c.value?(d.openBlock(),d.createElementBlock("svg",ty,iy)):(d.openBlock(),d.createElementBlock("svg",Qw,ey))])])])]))}},[["__scopeId","data-v-5a7c7720"]]),ry={en:{clear:"Clear",no:"No",yes:"yes",alert_to_delete:"Are you sure to delete?",first:"First",previous:"Previous",next:"Next",last:"Last",apply_filter:"Apply filter",filter:"Filter",add_filter:"Add filter",clear_all:"Clear all",add:"Add",save:"Save",edit:"Edit",cancel:"Cancel",choose_filter:"Choose filter",select_type:"Select type",equal_to:"Equal to",not_equal_to:"Not equal to",greater_than:"Greater than",less_than:"Less than",look_like:"Look like",search:"Search ...",range:"Range",add:"Add",export:"Export",export_as_pdf:"Export as PDF",export_as_excel:" Export as Excel",print:"Print",reload:"Reload",select_row:"Select row",custom_column:"Custom column",filter_data:"Filter data",active_filter:"Active filter"},fa:{clear:"پاک کردن",no:"خیر",yes:"بله",alert_to_delete:"آیا از حذف کردن مطمئن هستید؟",first:"ابتدا",previous:"قبلی",next:"بعدی",last:"آخرین",apply_filter:"اعمال فیلتر",filter:"فیلتر",add_filter:"افزودن فیلتر",clear_all:"حذف فیلترها",add:"افرودن",save:"ذخیره",edit:"ویرایش",cancel:"لغو",choose_filter:"انتخاب فیلتر",select_type:"انتخاب کنید",equal_to:"برابر با",not_equal_to:"نابرابر با",greater_than:"بزرگتر از",less_than:"کوچکتر از",look_like:"مشابه",search:"جستجو ...",range:"محدوده",edit_filter:"ویرایش فیلتر",export:"خروجیگرفتن",export_as_pdf:"PDF خروجی",export_as_excel:"Excel خروجی",print:"خروجی چاپی",reload:"بارگذاری مجدد",select_row:"انتخاب ردیف",custom_column:"ستون سفارشی",filter_data:"فیلترکردن ",active_filter:"فیلترهای فعال",not_load_or_existing_data:"دیتایی وجود ندارد :(",filter_save_placeholder:"اسم فیلتر",not_filter_create_yes:"هنوز فیلتری ایجاد نشده است",operator:"عملگر",in:"برابر با مقادیر",not_in:"نابرابر با مقادیر",value:"مقدار",between:"از میان"}},Rr=Xa.defineStore("formuCrudLangs",{state:()=>({lang:"fa",langs:ry}),getters:{currentLang(s){return U.get(s.langs,s.lang,"fa")}},actions:{translate(s){return U.get(this.currentLang,s,s)}}}),sy=()=>{const s=Rr();return{op:{placeholder:s.translate("operator"),columns:4,items:[{value:"$eq",text:s.translate("equal_to")},{value:"$ne",text:s.translate("not_equal_to")},{value:"$gt",text:s.translate("greater_than")},{value:"$lt",text:s.translate("less_than")},{value:"$contains",text:s.translate("look_like")}],"label-prop":"text","value-prop":"value",native:!1,type:"select"},value:{placeholder:s.translate("value"),type:"text",columns:4}}},oy=s=>({onChange:(...e)=>{const t=e[2].form$.el$(s);t.clear(),t.updateItems()}}),ay=(s={})=>({search:!0,clearOnSearch:!0,type:"select",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>U.get(e.getValue(),U.get(s,"labelProp")),...s}),ly=(s={})=>({search:!0,clearOnSearch:!0,type:"multiselect",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>U.get(e.getValue(),U.get(s,"labelProp")),...s}),gh=(s={})=>({search:!0,clearOnSearch:!0,type:"tags",delay:1e3,object:!0,filterResults:!1,hideSelected:!0,native:!1,formatter:e=>U.get(e.getValue(),U.get(s,"labelProp")),...s}),bh=(s={})=>({type:"date",...s}),uy={hasRel:oy,select:ay,multiSelect:ly,tags:gh,date:bh},hy={TextFilter:sy,SelectFilter:s=>{const e=Rr();return{op:{placeholder:e.translate("operator"),columns:4,items:[{value:"$in",text:e.translate("in")},{value:"$notIn",text:e.translate("not_in")}],labelProp:"text",valueProp:"value",native:!1,type:"select"},value:gh({placeholder:e.translate("value"),items:"filterItems"in s?s.filterItems:s.items,search:!0,columns:4,labelProp:s.labelProp,valueProp:s.valueProp,object:!1})}},DateFilter:()=>{const s=Rr();return{op:{placeholder:s.translate("operator"),columns:4,items:[{value:"$eq",text:s.translate("equal_to")},{value:"$between",text:s.translate("between")},{value:"$gt",text:s.translate("greater_than")},{value:"$lt",text:s.translate("less_than")}],labelProp:"text",valueProp:"value",native:!1,type:"select"},value:bh({placeholder:s.translate("value"),columns:4})}}};function cy(s){return d.getCurrentScope()?(d.onScopeDispose(s),!0):!1}function To(s){return typeof s=="function"?s():d.unref(s)}const dy=typeof window<"u"&&typeof document<"u",fy=()=>{};function py(s,e){function t(...i){return new Promise((n,o)=>{Promise.resolve(s(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(n).catch(o)})}return t}const vh=s=>s();function my(s=vh){const e=d.ref(!0);function t(){e.value=!1}function i(){e.value=!0}const n=(...o)=>{e.value&&s(...o)};return{isActive:d.readonly(e),pause:t,resume:i,eventFilter:n}}function gy(s,e,t={}){const{eventFilter:i=vh,...n}=t;return d.watch(s,py(i,e),n)}function by(s,e,t={}){const{eventFilter:i,...n}=t,{eventFilter:o,pause:l,resume:h,isActive:c}=my(i);return{stop:gy(s,e,{...n,eventFilter:o}),pause:l,resume:h,isActive:c}}function vy(s){const e=To(s);return(e==null?void 0:e.$el)??e}const kn=dy?window:void 0;function wh(...s){let e,t,i,n;if(typeof s[0]=="string"||Array.isArray(s[0])?([t,i,n]=s,e=kn):[e,t,i,n]=s,!e)return fy;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],l=()=>{o.forEach(m=>m()),o.length=0},h=(m,b,v,C)=>(m.addEventListener(b,v,C),()=>m.removeEventListener(b,v,C)),c=d.watch(()=>[vy(e),To(n)],([m,b])=>{l(),m&&o.push(...t.flatMap(v=>i.map(C=>h(m,v,C,b))))},{immediate:!0,flush:"post"}),f=()=>{c(),l()};return cy(f),f}const Tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Sr="__vueuse_ssr_handlers__",wy=yy();function yy(){return Sr in Tr||(Tr[Sr]=Tr[Sr]||{}),Tr[Sr]}function Cy(s,e){return wy[s]||e}function Ey(s){return s==null?"any":s instanceof Set?"set":s instanceof Map?"map":s instanceof Date?"date":typeof s=="boolean"?"boolean":typeof s=="string"?"string":typeof s=="object"?"object":Number.isNaN(s)?"any":"number"}const xy={boolean:{read:s=>s==="true",write:s=>String(s)},object:{read:s=>JSON.parse(s),write:s=>JSON.stringify(s)},number:{read:s=>Number.parseFloat(s),write:s=>String(s)},any:{read:s=>s,write:s=>String(s)},string:{read:s=>s,write:s=>String(s)},map:{read:s=>new Map(JSON.parse(s)),write:s=>JSON.stringify(Array.from(s.entries()))},set:{read:s=>new Set(JSON.parse(s)),write:s=>JSON.stringify(Array.from(s))},date:{read:s=>new Date(s),write:s=>s.toISOString()}},yh="vueuse-storage";function _y(s,e,t,i={}){const{flush:n="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:h=!0,mergeDefaults:c=!1,shallow:f,window:m=kn,eventFilter:b,onError:v=N=>{console.error(N)}}=i,C=(f?d.shallowRef:d.ref)(e);if(!t)try{t=Cy("getDefaultStorage",()=>kn==null?void 0:kn.localStorage)()}catch(N){v(N)}if(!t)return C;const x=To(e),R=Ey(x),L=i.serializer??xy[R],{pause:k,resume:H}=by(C,()=>P(C.value),{flush:n,deep:o,eventFilter:b});return m&&l&&(wh(m,"storage",Z),wh(m,yh,V)),Z(),C;function P(N){try{if(N==null)t.removeItem(s);else{const W=L.write(N),le=t.getItem(s);le!==W&&(t.setItem(s,W),m&&m.dispatchEvent(new CustomEvent(yh,{detail:{key:s,oldValue:le,newValue:W,storageArea:t}})))}}catch(W){v(W)}}function z(N){const W=N?N.newValue:t.getItem(s);if(W==null)return h&&x!==null&&t.setItem(s,L.write(x)),x;if(!N&&c){const le=L.read(W);return typeof c=="function"?c(le,x):R==="object"&&!Array.isArray(le)?{...x,...le}:le}else return typeof W!="string"?W:L.read(W)}function V(N){Z(N.detail)}function Z(N){if(!(N&&N.storageArea!==t)){if(N&&N.key==null){C.value=x;return}if(!(N&&N.key!==s)){k();try{(N==null?void 0:N.newValue)!==L.write(C.value)&&(C.value=z(N))}catch(W){v(W)}finally{N?d.nextTick(H):H()}}}}}const z2="",$i=s=>(d.pushScopeId("data-v-599e9a19"),s=s(),d.popScopeId(),s),Ry={class:"border-muted-200 dark:border-muted-700 dark:bg-muted-800 relative mb-4 w-full rounded-lg border bg-white p-6 transition-all duration-300"},Ty={class:"flex flex-col ml-1 border-[rgba(0,0,0,.1)] pb-4"},Sy={class:"flex flex-row justify-between mb-4 items-center"},ky={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},My={class:"flex items-center"},Ly={class:"z-[1]"},Dy={class:"fc-drop-down-content"},Ay={key:0,class:"p-2 text-center"},Fy=["onClick"],Py={class:"text-muted-400 font-sans text-sm"},Oy=$i(()=>d.createElementVNode("svg",{"data-v-74b3417a":"","aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-muted-500"},[d.createElementVNode("path",{"data-v-74b3417a":"",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1)),Hy={class:"flex w-full justify-between align-start"},zy={class:"w-[12%] flex justify-center items-center"},Ny=["disabled"],Iy=$i(()=>d.createElementVNode("svg",{class:"icon h-4 ml-1 w-4",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),By=$i(()=>d.createElementVNode("svg",{class:"icon h-4 w-4",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),Vy={class:"flex border-t dark:border-muted-600 flex-col p-2 mt-2"},Wy={class:"flex items-center"},$y={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Gy={class:"group-hover:text-red-500"},Uy=$i(()=>d.createElementVNode("svg",{stroke:"currentColor",width:"1em",height:"1em",class:"ml-1 rtl:ml-1 rtl:mr-1 group-hover:fill-red-500 dark:fill-muted-400 fill-muted-600",viewBox:"0 0 512 512"},[d.createElementVNode("path",{d:"M340 148L488 0l24 24L364 172l52 52L257.2 483.9 240 512l-23.3-23.3L23.3 295.3 0 272l28.1-17.2L288 96l52 52zM51.4 278.1l47.9 47.9 33.4-33.4L144 281.4 166.6 304l-11.3 11.3-33.4 33.4L233.9 460.6l89.6-146.6L197.9 188.6 51.4 278.1zM340.6 286l34.9-57.2-92.4-92.4L226 171.4 340.6 286z"})],-1)),jy={class:"my-2 flex overflow-x-auto slimscroll"},Ky={class:"flex"},qy=["onClick"],Yy={class:"mt-[0px]"},Xy=["onClick"],Jy=[$i(()=>d.createElementVNode("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-primary-500"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1))],Zy={key:0,class:"flex items-center mx-2 text-[0.75rem]"},Qy={class:"flex w-full gap-x-2 justify-between !items-end"},e0={class:"pt-4 md:pt-6"},t0={class:"flex gap-x-2"},i0=["placeholder"],n0=[$i(()=>d.createElementVNode("svg",{"data-v-74b3417a":"","aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4 text-primary-500"},[d.createElementVNode("path",{"data-v-74b3417a":"",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6 6 18M6 6l12 12"})],-1))],r0=yn({__name:"MFilter",setup(s){const e=d.inject("store");let t=-1;const i=d.ref(!1),n=d.ref({field:""}),o=d.ref(!1),l=d.ref(""),h=v(),c=d.ref(null);function f(z){if(!z)return!1;const V={text:"TextFilter",date:"DateFilter",select:"SelectFilter"},Z=U.get(V,z.type),N=U.get(hy,Z);return typeof N=="function"?N(z):!1}const m={field:{placeholder:"field",type:"select",native:!1,items:e.headersWithoutActions,"label-prop":"title","value-prop":"field",object:!0,search:!0,trackBy:["title"],columns:2,onChange(z,V,Z){const N=f(z)||[];for(const W in n.value)W!=="field"&&delete n.value[W];b.value={...m,...N},d.nextTick(()=>{const W=Z.form$.el$("value");"clear"in W&&W.clear(),"updateItems"in W&&W.updateItems()})}}},b=d.ref({...m});function v(){const z=window.location.pathname.replace(/^\/|\/$/g,"")+"-filters";return _y(z,{},localStorage,{mergeDefaults:!0})}function C(){e.filters.push(U.cloneDeep(n.value)),n.value={}}function x(){t!==-1&&e.filters.splice(t,1,n.value),i.value=!1,n.value={}}function R(z,V){i.value=!0,t=V,n.value=z,d.nextTick(()=>{n.value.op=z.op,n.value.value=z.value})}function L(z){e.filters=e.filters.filter(V=>V!==z)}function k(){e.filters=[],e.loadItems()}function H(){if(!o.value)return o.value=!0,c.value.focus();l.value&&(h.value[l.value]={...e.filters},o.value=!1,l.value="",c.value.blur())}function P(){e.loadItems()}return(z,V)=>{const Z=d.resolveComponent("Vueform");return d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["accordion-content",{hide:d.unref(e).panel!=="filters"}])},[d.createElementVNode("div",Ry,[d.createElementVNode("div",Ty,[d.createElementVNode("div",Sy,[d.createElementVNode("h3",ky,d.toDisplayString(z.$fcTr("filter_data")),1),d.createElementVNode("div",My,[d.createVNode(d.unref(Ro),{transition:"scale-transition"},{activator:d.withCtx(({props:N})=>[d.createElementVNode("button",d.mergeProps({class:JSON.parse(N["aria-expanded"])?"before:block":"before:hidden"},N,{class:"fc-filter-choose is-button rounded is-button-default min-w-[130px]"}),[d.createElementVNode("span",Ly,d.toDisplayString(z.$fcTr("choose_filter")),1)],16)]),default:d.withCtx(()=>[d.createElementVNode("div",Dy,[Object.keys(d.unref(h)).length===0?(d.openBlock(),d.createElementBlock("p",Ay,d.toDisplayString(z.$fcTr("not_filter_create_yes")),1)):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(h),(N,W)=>(d.openBlock(),d.createElementBlock("a",{class:"group rounded flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-100 dark:hover:bg-muted-700 justify-between rtl:pl-4 rtl:pr-5",key:W,onClick:d.withModifiers(le=>d.unref(e).filters=Object.values(N),["stop"])},[d.createElementVNode("p",Py,d.toDisplayString(W),1),Oy],8,Fy))),128))])]),_:1})])]),d.createElementVNode("div",Hy,[d.createVNode(Z,{modelValue:n.value,"onUpdate:modelValue":V[0]||(V[0]=N=>n.value=N),schema:b.value,sync:!0,class:"w-[100%] justify-between ml-4",columns:{label:12}},null,8,["modelValue","schema"]),d.createElementVNode("div",zy,[i.value?(d.openBlock(),d.createElementBlock("button",{key:1,class:"!border-dashed is-button-default is-button w-full rounded-full font-bold py-1 px-2 !border-green-400 !text-green-400 hover:!bg-green-50",onClick:x},[d.createTextVNode(d.toDisplayString(z.$fcTr("edit_filter"))+" ",1),By])):(d.openBlock(),d.createElementBlock("button",{key:0,disabled:!n.value.field,class:"disabled:cursor-not-allowed disabled:hover:bg-transparent !border-dashed !h-[86%] is-button-default is-button w-full rounded font-bold py-1 px-2 !border-green-400 !text-green-400 dark:active:hover:bg-muted-600 active:hover:!bg-green-50",onClick:C},[Iy,d.createTextVNode(" "+d.toDisplayString(z.$fcTr("add_filter")),1)],8,Ny))])])]),d.withDirectives(d.createElementVNode("div",Vy,[d.createElementVNode("div",Wy,[d.createElementVNode("h3",$y,d.toDisplayString(z.$fcTr("active_filter")),1),d.createElementVNode("button",{onClick:k,class:"is-button group hover:text-red-500 hover:border-red-500 w-fit text-muted-600 dark:text-muted-400 !text-xs border !px-3 !py-0 !h-[1.5rem] mx-2 !rounded-full"},[d.createElementVNode("span",Gy,d.toDisplayString(z.$fcTr("clear_all")),1),Uy])]),d.createElementVNode("div",jy,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(e).filters,(N,W)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:W},[d.createElementVNode("div",Ky,[d.createElementVNode("span",{class:"flex px-3 font-sans transition-shadow duration-300 py-1 text-[0.75rem] cursor-pointer rounded-full bg-primary-100 text-primary-500 border-primary-100 dark:border-primary-500 dark:text-primary-500 border dark:bg-transparent",onClick:le=>R(N,W)},[d.createElementVNode("span",Yy,d.toDisplayString(d.unref(U.get)(N,"field.title")),1),d.createElementVNode("button",{class:"text-white font-bold rounded px-1 hover:bg-primary-500 hover:text-black-500",onClick:d.withModifiers(le=>L(N),["stop"])},Jy,8,Xy)],8,qy)]),d.unref(e).filters.length-1!==W?(d.openBlock(),d.createElementBlock("span",Zy,d.toDisplayString(z.$fcTr("&")),1)):d.createCommentVNode("",!0)],64))),128))])],512),[[d.vShow,d.unref(e).filters.length>0]]),d.createElementVNode("div",Qy,[d.createElementVNode("button",{onClick:V[1]||(V[1]=N=>d.unref(e).panel=""),class:"is-button text-muted-500 rounded hover:text-red-500 !underline focus-within:!outline-none"},d.toDisplayString(z.$fcTr("cancel")),1),d.createElementVNode("div",e0,[d.createElementVNode("div",t0,[d.createElementVNode("button",{onClick:V[5]||(V[5]=d.withModifiers(N=>Object.keys(d.unref(e).filters).length!==0?H():"",["self"])),class:d.normalizeClass([{"!bg-muted-100 dark:!bg-muted-700 ltr:pr-1":o.value," focus:outline-none !cursor-not-allowed":Object.keys(d.unref(e).filters).length===0},"transitionX-inp is-button rounded is-button-default"])},[d.createElementVNode("span",{onClick:V[2]||(V[2]=d.withModifiers(N=>Object.keys(d.unref(e).filters).length!==0?H():"",["self"])),class:d.normalizeClass({" bg-green-500 px-2 py-1 rounded text-muted-50":o.value," focus:outline-none !cursor-not-allowed":Object.keys(d.unref(e).filters).length===0})},d.toDisplayString(z.$fcTr("save")),3),d.createElementVNode("span",{class:d.normalizeClass(["transitionX-inp overflow-hidden flex items-center justify-between",o.value?"w-[221px] opacity-1 ltr:pl-3 rtl:mr-3":"opacity-0 w-[0px]"])},[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":V[3]||(V[3]=N=>l.value=N),class:d.normalizeClass(["fc-focus py-1 rounded px-2 dark:bg-muted-800",o.value?" border border-1":"flex "]),placeholder:z.$fcTr("filter_save_placeholder"),ref_key:"filterNameInp",ref:c},null,10,i0),[[d.vModelText,l.value]]),d.createElementVNode("span",{class:"px-2",onClick:V[4]||(V[4]=N=>o.value=!1)},n0)],2)],2),d.createElementVNode("button",{onClick:P,class:"is-button rounded bg-primary-500 dark:bg-primary-500 hover:enabled:bg-primary-400 dark:hover:enabled:bg-primary-400 text-white hover:enabled:shadow-lg hover:enabled:shadow-primary-500/50 dark:hover:enabled:shadow-primary-800/20 focus-visible:outline-primary-400/70 focus-within:outline-primary-400/70 focus-visible:bg-primary-500 active:enabled:bg-primary-500 dark:focus-visible:outline-primary-400 dark:focus-within:outline-primary-400 dark:focus-visible:bg-primary-500 dark:active:enabled:bg-primary-500"},d.toDisplayString(z.$fcTr("filter")),1)])])])])],2)),[[d.vShow,d.unref(e).panel==="filters"]])}}},[["__scopeId","data-v-599e9a19"]]);function s0(s,e){return Array.isArray(s)?U.every(s,t=>U.isType(t,e)):!1}const o0=(s,e)=>{const t=U.get(s,"field"),i=U.get(s,"valueProp");return s0(e,"object")?e.map(n=>U.get(n,i)):U.get(e,t)},Ch=(s,e)=>U.get(e,s.field),a0={select:o0,text:Ch},l0=(s,e)=>{if(s.normalizer)return s.normalizer(e);const t=a0[s.type];return t?t(s,e):Ch(s,e)},V2="",u0=s=>(d.pushScopeId("data-v-336ac312"),s=s(),d.popScopeId(),s),h0={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},c0={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},d0=u0(()=>d.createElementVNode("div",{class:"fixed inset-0 transition-opacity"},[d.createElementVNode("div",{class:"absolute inset-0 bg-gray-500 opacity-75"})],-1)),f0={class:"inline-block max-h-full align-bottom bg-white rounded-lg text-left shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},p0={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4 dark:bg-muted-700 dark:text-muted-200"},m0={class:"flex flex-col text-right"},g0={class:"mb-4 flex justify-between w-full"},b0={key:0,class:"text-primerr-700"},v0={key:1,class:"text-primerr-700"},w0={class:"mb-5"},y0={class:"flex justify-end"},C0=["disabled"],E0={key:0},x0={key:1},_0=yn({__name:"MDialogForm",setup(s){const{event:e,listen:t}=tt.emitter,i=d.inject("store");let n=d.ref(!1),o={};const l=c=>{let f={};for(const m of i.flatFieldsWithoutActions)f[m.field]=l0(m,c);return f};return(()=>{t("createBtn",()=>{o={},i.isEditing=!1,n.value=!0,i.form={}}),t("editBtn",c=>{o=c,i.isEditing=!0,n.value=!0,i.form=l(c)}),t("handleDialogForm",c=>{n.value=c}),t("saveForm",()=>(()=>{i.isEditing?i.editItem({...i.form,id:o==null?void 0:o.id}):i.addItem({...i.form})})()),t(["createBtn"],()=>{i.form={}}),t("editTheItem",c=>{edit(c)}),t("addTheItem",c=>{add(c)})})(),(c,f)=>{const m=d.resolveComponent("Vueform");return d.openBlock(),d.createBlock(d.Transition,{name:"fade",appear:""},{default:d.withCtx(()=>[d.unref(n)?(d.openBlock(),d.createElementBlock("div",h0,[d.createElementVNode("div",c0,[d0,d.createElementVNode("div",f0,[d.createElementVNode("div",p0,[d.createElementVNode("div",m0,[d.createElementVNode("h1",g0,[d.unref(i).isEditing?(d.openBlock(),d.createElementBlock("span",b0,d.toDisplayString(c.$fcTr("edit")),1)):(d.openBlock(),d.createElementBlock("span",v0,d.toDisplayString(c.$fcTr("add")),1)),d.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:f[0]||(f[0]=b=>d.isRef(n)?n.value=!1:n=!1)})]),d.createElementVNode("div",w0,[d.createVNode(m,d.mergeProps({modelValue:d.unref(i).form,"onUpdate:modelValue":f[1]||(f[1]=b=>d.unref(i).form=b),schema:d.unref(i).formFields,columns:{label:12}},d.unref(i).structure,{sync:""}),null,16,["modelValue","schema"])]),d.createElementVNode("div",y0,[d.createElementVNode("button",{onClick:f[2]||(f[2]=b=>d.isRef(n)?n.value=!1:n=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},d.toDisplayString(c.$fcTr("cancel")),1),d.createElementVNode("button",{disabled:d.unref(i).loadings.mainLoading,onClick:f[3]||(f[3]=b=>d.unref(e)("saveForm")),class:"border p-2 mx-1 px-8 rounded-md text-green-400 border-green-400"},[d.unref(i).loadings.mainLoading?(d.openBlock(),d.createElementBlock("span",x0,"loading")):(d.openBlock(),d.createElementBlock("span",E0,d.toDisplayString(c.$fcTr("save")),1))],8,C0)])])])])])])):d.createCommentVNode("",!0)]),_:1})}}},[["__scopeId","data-v-336ac312"]]),R0={};function T0(s,e){return d.openBlock(),d.createElementBlock("div")}const S0=yn(R0,[["render",T0]]),k0={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},M0={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},L0=d.createElementVNode("div",{class:"fixed inset-0 transition-opacity"},[d.createElementVNode("div",{class:"absolute inset-0 bg-gray-500 opacity-75"})],-1),D0={class:"inline-block max-h-full align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},A0={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},F0={class:"flex flex-col text-right"},P0={class:"mb-4 flex justify-between w-full"},O0=d.createElementVNode("span",{class:"text-primerr-700"},"حذف",-1),H0={class:"mb-5 flex flex-row flex-wrap"},z0={class:"flex justify-end"},N0=["disabled"],I0={key:0},B0={key:1},V0={__name:"MDeleteDialog",setup(s){const e=d.inject("store"),t=d.ref(!1);let i="";return tt.emitter.listen("deleteBtn",n=>{t.value=!0,i=n.id}),tt.emitter.listen("handleDeleteDialog",n=>{t.value=n}),(n,o)=>(d.openBlock(),d.createBlock(d.Transition,{name:"fade",appear:""},{default:d.withCtx(()=>[t.value?(d.openBlock(),d.createElementBlock("div",k0,[d.createElementVNode("div",M0,[L0,d.createElementVNode("div",D0,[d.createElementVNode("div",A0,[d.createElementVNode("div",F0,[d.createElementVNode("h1",P0,[O0,d.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:o[0]||(o[0]=l=>t.value=!1)})]),d.createElementVNode("div",H0,d.toDisplayString(n.$fcTr("alert_to_delete")),1),d.createElementVNode("div",z0,[d.createElementVNode("button",{onClick:o[1]||(o[1]=l=>t.value=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},d.toDisplayString(n.$fcTr("no")),1),d.createElementVNode("button",{disabled:d.unref(e).loadings.mainLoading,class:"border p-2 mx-1 px-8 rounded-md text-green-400 border-green-400",onClick:o[2]||(o[2]=l=>d.unref(e).remove(d.unref(i)))},[d.unref(e).loadings.mainLoading?(d.openBlock(),d.createElementBlock("span",B0,"loading")):(d.openBlock(),d.createElementBlock("span",I0,d.toDisplayString(n.$fcTr("yes")),1))],8,N0)])])])])])])):d.createCommentVNode("",!0)]),_:1}))}},$2="",W0={key:0,class:"w-full border bg-white rounded p-2 flex align-center mt-2"},$0=["onClick"],G0={__name:"MHeaderBox",setup(s){const e=d.inject("store");let t=null;d.watch(()=>e.panel,n=>{e.panel==="headerBox"&&e.headersWithoutActions.forEach(o=>{t=document.querySelector(`[tabulator-field="${o.field}"]`),t.innerHTML=t.innerHTML+'<span class="fc-remove"><button class="text-white font-bold rounded px-1" onclick=""><svg aria-hidden="true" viewBox="0 0 24 24" class="h-4 w-4 text-primary-500"><path data-v-74b3417a="" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6 6 18M6 6l12 12"></path></svg></button></span>'})});function i(n){n.isHeader=!n.isHeader}return(n,o)=>d.unref(e).panel==="headerBox"?(d.openBlock(),d.createElementBlock("div",W0,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(e).flatFields,l=>(d.openBlock(),d.createElementBlock("div",{key:l.field,class:d.normalizeClass(["px-1 mx-1 cursor-pointer divide-y rounded",{"bg-primary-600 text-white":l.isHeader}]),onClick:h=>i(l)},d.toDisplayString(l.title),11,$0))),128))])):d.createCommentVNode("",!0)}},U0={__name:"MCrud",props:{options:{default:()=>({})},hiddenActions:{default:()=>[]},fields:{default:()=>[]},dir:{default:"ltr"},route:{default:"route"}},emits:["mounted"],setup(s,{emit:e}){const t=s,i=pm({fields:t.fields,hiddenActions:t.hiddenActions,options:t.options,route:t.route});return d.provide("store",i),d.provide("dir",t.dir),document.body.setAttribute("dir",t.dir),d.onMounted(()=>{document.getElementsByClassName("v-overlay-container")[0].setAttribute("dir","ltr"),e("mounted")}),(n,o)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(ny),d.createVNode(r0),d.createVNode(G0),d.createVNode(Ab),d.createVNode(_0),d.createVNode(S0),d.createVNode(V0),d.renderSlot(n.$slots,"extra")],64))}},G2="",U2="",j2="",j0={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar"},K0={component:s=>d.h(xh,{...s,class:"mdi"})},q0=[String,Function,Object,Array],Eh=Symbol.for("vuetify:icons"),kr=Be({icon:{type:q0},tag:{type:String,required:!0}},"icon");Wi()({name:"VComponentIcon",props:kr(),setup(s,e){let{slots:t}=e;return()=>{const i=s.icon;return d.createVNode(s.tag,null,{default:()=>{var n;return[s.icon?d.createVNode(i,null,null):(n=t.default)==null?void 0:n.call(t)]}})}}});const Y0=_n({name:"VSvgIcon",inheritAttrs:!1,props:kr(),setup(s,e){let{attrs:t}=e;return()=>d.createVNode(s.tag,d.mergeProps(t,{style:null}),{default:()=>[d.createVNode("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(s.icon)?s.icon.map(i=>Array.isArray(i)?d.createVNode("path",{d:i[0],"fill-opacity":i[1]},null):d.createVNode("path",{d:i},null)):d.createVNode("path",{d:s.icon},null)])]})}});_n({name:"VLigatureIcon",props:kr(),setup(s){return()=>d.createVNode(s.tag,null,{default:()=>[s.icon]})}});const xh=_n({name:"VClassIcon",props:kr(),setup(s){return()=>d.createVNode(s.tag,{class:s.icon},null)}}),X0={svg:{component:Y0},class:{component:xh}};function J0(s){return ht({defaultSet:"mdi",sets:{...X0,mdi:K0},aliases:{...j0,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},s)}const So={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function Z0(s,e){const t=[];let i=[];const n=_h(s),o=Rh(s),l=n.getDay()-So[e.slice(-2).toUpperCase()],h=o.getDay()-So[e.slice(-2).toUpperCase()];for(let c=0;c<l;c++){const f=new Date(n);f.setDate(f.getDate()-(l-c)),i.push(f)}for(let c=1;c<=o.getDate();c++){const f=new Date(s.getFullYear(),s.getMonth(),c);i.push(f),i.length===7&&(t.push(i),i=[])}for(let c=1;c<7-h;c++){const f=new Date(o);f.setDate(f.getDate()+c),i.push(f)}return t.push(i),t}function _h(s){return new Date(s.getFullYear(),s.getMonth(),1)}function Rh(s){return new Date(s.getFullYear(),s.getMonth()+1,0)}function Q0(s){const e=s.split("-").map(Number);return new Date(e[0],e[1]-1,e[2])}const eC=/([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))/;function tC(s){if(s==null)return new Date;if(s instanceof Date)return s;if(typeof s=="string"){let e;if(eC.test(s))return Q0(s);if(e=Date.parse(s),!isNaN(e))return new Date(e)}return null}const Th=new Date(2e3,0,2);function iC(s){const e=So[s.slice(-2).toUpperCase()];return gu(7).map(t=>{const i=new Date(Th);return i.setDate(Th.getDate()+e+t),new Intl.DateTimeFormat(s,{weekday:"narrow"}).format(i)})}function nC(s,e,t){const i=new Date(s);let n={};switch(e){case"fullDateWithWeekday":n={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"normalDateWithWeekday":n={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":n={};break;case"monthAndDate":n={month:"long",day:"numeric"};break;case"monthAndYear":n={month:"long",year:"numeric"};break;case"dayOfMonth":n={day:"numeric"};break;default:n={timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(t,n).format(i)}function rC(s,e){const t=new Date(s);return t.setDate(t.getDate()+e),t}function sC(s,e){const t=new Date(s);return t.setMonth(t.getMonth()+e),t}function oC(s){return s.getFullYear()}function aC(s){return s.getMonth()}function lC(s){return new Date(s.getFullYear(),0,1)}function uC(s){return new Date(s.getFullYear(),11,31)}function hC(s,e){return ko(s,e[0])&&dC(s,e[1])}function cC(s){const e=new Date(s);return e instanceof Date&&!isNaN(e.getTime())}function ko(s,e){return s.getTime()>e.getTime()}function dC(s,e){return s.getTime()<e.getTime()}function Sh(s,e){return s.getTime()===e.getTime()}function fC(s,e){return s.getDate()===e.getDate()&&s.getMonth()===e.getMonth()&&s.getFullYear()===e.getFullYear()}function pC(s,e){return s.getMonth()===e.getMonth()&&s.getFullYear()===e.getFullYear()}function mC(s,e,t){const i=new Date(s),n=new Date(e);return t==="month"?i.getMonth()-n.getMonth()+(i.getFullYear()-n.getFullYear())*12:Math.floor((i.getTime()-n.getTime())/(1e3*60*60*24))}function gC(s,e){const t=new Date(s);return t.setFullYear(e),t}class bC{constructor(e){this.locale=e.locale}date(e){return tC(e)}toJsDate(e){return e}addDays(e,t){return rC(e,t)}addMonths(e,t){return sC(e,t)}getWeekArray(e){return Z0(e,this.locale)}startOfMonth(e){return _h(e)}endOfMonth(e){return Rh(e)}format(e,t){return nC(e,t,this.locale)}isEqual(e,t){return Sh(e,t)}isValid(e){return cC(e)}isWithinRange(e,t){return hC(e,t)}isAfter(e,t){return ko(e,t)}isBefore(e,t){return!ko(e,t)&&!Sh(e,t)}isSameDay(e,t){return fC(e,t)}isSameMonth(e,t){return pC(e,t)}setYear(e,t){return gC(e,t)}getDiff(e,t,i){return mC(e,t,i)}getWeekdays(){return iC(this.locale)}getYear(e){return oC(e)}getMonth(e){return aC(e)}startOfYear(e){return lC(e)}endOfYear(e){return uC(e)}}const kh=Symbol.for("vuetify:date-adapter");function vC(s){return ht({adapter:bC,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"nn-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},s)}function Mh(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:e,...t}=s,i=ht(e,t),{aliases:n={},components:o={},directives:l={}}=i,h=cv(i.defaults),c=Wv(i.display,i.ssr),f=ow(i.theme),m=J0(i.icons),b=Jv(i.locale),v=vC(i.date);return{install:x=>{for(const R in l)x.directive(R,l[R]);for(const R in o)x.component(R,o[R]);for(const R in n)x.component(R,_n({...n[R],name:R,aliasName:n[R].name}));if(f.install(x),x.provide(Vi,h),x.provide(bo,c),x.provide(xr,f),x.provide(Eh,m),x.provide(wo,b),x.provide(kh,v),Re&&i.ssr)if(x.$nuxt)x.$nuxt.hook("app:suspense:resolve",()=>{c.update()});else{const{mount:R}=x;x.mount=function(){const L=R(...arguments);return d.nextTick(()=>c.update()),x.mount=R,L}}vr.reset(),x.mixin({computed:{$vuetify(){return d.reactive({defaults:Gi.call(this,Vi),display:Gi.call(this,bo),theme:Gi.call(this,xr),icons:Gi.call(this,Eh),locale:Gi.call(this,wo),date:Gi.call(this,kh)})}}})},defaults:h,display:c,theme:f,icons:m,locale:b,date:v}}const wC="3.3.14";Mh.version=wC;function Gi(s){var i,n;const e=this.$,t=((i=e.parent)==null?void 0:i.provides)??((n=e.vnode.appContext)==null?void 0:n.provides);if(t&&s in t)return t[s]}const yC=({headers:s,baseURL:e}={headers:[],baseURL:""})=>{St.defaults.baseURL=e;for(const t in s)U.set(St.defaults.headers,t,s[t])},CC=(s,{fields:e,axiosConfig:t}={fields:{},axiosConfig:{}})=>{yC(t);const i=Mh({locale:{locale:"customLocale",rtl:{customLocale:!0}}});s.use(i);const n=Rr();s.config.globalProperties.$fcTr=o=>n.translate(o),Al(e)};et.MCrud=U0,et.fields=uy,et.install=CC,et.registerFields=Al,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})});
|