formue-crud 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,10 +5,10 @@
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
- */Rs.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,M=8,F=16,A=32,H=64,B=128,D=256,I=512,Y=30,ie="...",G=800,J=16,ee=1,le=2,_e=3,j=1/0,$=9007199254740991,Q=17976931348623157e292,fe=0/0,we=4294967295,ye=we-1,Ie=we>>>1,De=[["ary",B],["bind",_],["bindKey",k],["curry",M],["curryRight",F],["flip",I],["partial",A],["partialRight",H],["rearg",D]],ze="[object Arguments]",Ee="[object Array]",rt="[object AsyncFunction]",_t="[object Boolean]",et="[object Date]",K="[object DOMException]",me="[object Error]",Se="[object Function]",Vt="[object GeneratorFunction]",be="[object Map]",Ue="[object Number]",Ke="[object Null]",Je="[object Object]",ot="[object Promise]",mt="[object Proxy]",Wi="[object RegExp]",pt="[object Set]",_i="[object String]",ui="[object Symbol]",xn="[object Undefined]",ls="[object WeakMap]",w0="[object WeakSet]",us="[object ArrayBuffer]",_n="[object DataView]",qo="[object Float32Array]",Yo="[object Float64Array]",Xo="[object Int8Array]",Jo="[object Int16Array]",Zo="[object Int32Array]",Qo="[object Uint8Array]",ea="[object Uint8ClampedArray]",ta="[object Uint16Array]",ia="[object Uint32Array]",y0=/\b__p \+= '';/g,C0=/\b(__p \+=) '' \+/g,E0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pd=/&(?:amp|lt|gt|quot|#39);/g,gd=/[&<>"']/g,x0=RegExp(pd.source),_0=RegExp(gd.source),R0=/<%-([\s\S]+?)%>/g,k0=/<%([\s\S]+?)%>/g,bd=/<%=([\s\S]+?)%>/g,S0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T0=/^\w*$/,M0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,na=/[\\^$.*+?()[\]{}|]/g,L0=RegExp(na.source),sa=/^\s+/,D0=/\s/,A0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P0=/\{\n\/\* \[wrapped with (.+)\] \*/,F0=/,? & /,V0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,O0=/[()=,{}\[\]\/\s]/,N0=/\\(\\)?/g,z0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vd=/\w*$/,H0=/^[-+]0x[0-9a-f]+$/i,I0=/^0b[01]+$/i,B0=/^\[object .+?Constructor\]$/,W0=/^0o[0-7]+$/i,$0=/^(?:0|[1-9]\d*)$/,G0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ir=/($^)/,j0=/['\n\r\u2028\u2029\\]/g,nr="\\ud800-\\udfff",U0="\\u0300-\\u036f",K0="\\ufe20-\\ufe2f",q0="\\u20d0-\\u20ff",wd=U0+K0+q0,yd="\\u2700-\\u27bf",Cd="a-z\\xdf-\\xf6\\xf8-\\xff",Y0="\\xac\\xb1\\xd7\\xf7",X0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",J0="\\u2000-\\u206f",Z0=" \\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",Ed="A-Z\\xc0-\\xd6\\xd8-\\xde",xd="\\ufe0e\\ufe0f",_d=Y0+X0+J0+Z0,ra="['’]",Q0="["+nr+"]",Rd="["+_d+"]",sr="["+wd+"]",kd="\\d+",eE="["+yd+"]",Sd="["+Cd+"]",Td="[^"+nr+_d+kd+yd+Cd+Ed+"]",oa="\\ud83c[\\udffb-\\udfff]",tE="(?:"+sr+"|"+oa+")",Md="[^"+nr+"]",aa="(?:\\ud83c[\\udde6-\\uddff]){2}",la="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="["+Ed+"]",Ld="\\u200d",Dd="(?:"+Sd+"|"+Td+")",iE="(?:"+Rn+"|"+Td+")",Ad="(?:"+ra+"(?:d|ll|m|re|s|t|ve))?",Pd="(?:"+ra+"(?:D|LL|M|RE|S|T|VE))?",Fd=tE+"?",Vd="["+xd+"]?",nE="(?:"+Ld+"(?:"+[Md,aa,la].join("|")+")"+Vd+Fd+")*",sE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Od=Vd+Fd+nE,oE="(?:"+[eE,aa,la].join("|")+")"+Od,aE="(?:"+[Md+sr+"?",sr,aa,la,Q0].join("|")+")",lE=RegExp(ra,"g"),uE=RegExp(sr,"g"),ua=RegExp(oa+"(?="+oa+")|"+aE+Od,"g"),cE=RegExp([Rn+"?"+Sd+"+"+Ad+"(?="+[Rd,Rn,"$"].join("|")+")",iE+"+"+Pd+"(?="+[Rd,Rn+Dd,"$"].join("|")+")",Rn+"?"+Dd+"+"+Ad,Rn+"+"+Pd,rE,sE,kd,oE].join("|"),"g"),dE=RegExp("["+Ld+nr+wd+xd+"]"),hE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fE=["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"],mE=-1,Pe={};Pe[qo]=Pe[Yo]=Pe[Xo]=Pe[Jo]=Pe[Zo]=Pe[Qo]=Pe[ea]=Pe[ta]=Pe[ia]=!0,Pe[ze]=Pe[Ee]=Pe[us]=Pe[_t]=Pe[_n]=Pe[et]=Pe[me]=Pe[Se]=Pe[be]=Pe[Ue]=Pe[Je]=Pe[Wi]=Pe[pt]=Pe[_i]=Pe[ls]=!1;var Ae={};Ae[ze]=Ae[Ee]=Ae[us]=Ae[_n]=Ae[_t]=Ae[et]=Ae[qo]=Ae[Yo]=Ae[Xo]=Ae[Jo]=Ae[Zo]=Ae[be]=Ae[Ue]=Ae[Je]=Ae[Wi]=Ae[pt]=Ae[_i]=Ae[ui]=Ae[Qo]=Ae[ea]=Ae[ta]=Ae[ia]=!0,Ae[me]=Ae[Se]=Ae[ls]=!1;var pE={À:"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"},gE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bE={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},vE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wE=parseFloat,yE=parseInt,Nd=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,CE=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Nd||CE||Function("return this")(),ca=e&&!e.nodeType&&e,$i=ca&&!0&&n&&!n.nodeType&&n,zd=$i&&$i.exports===ca,da=zd&&Nd.process,Ot=function(){try{var T=$i&&$i.require&&$i.require("util").types;return T||da&&da.binding&&da.binding("util")}catch{}}(),Hd=Ot&&Ot.isArrayBuffer,Id=Ot&&Ot.isDate,Bd=Ot&&Ot.isMap,Wd=Ot&&Ot.isRegExp,$d=Ot&&Ot.isSet,Gd=Ot&&Ot.isTypedArray;function Rt(T,O,P){switch(P.length){case 0:return T.call(O);case 1:return T.call(O,P[0]);case 2:return T.call(O,P[0],P[1]);case 3:return T.call(O,P[0],P[1],P[2])}return T.apply(O,P)}function EE(T,O,P,q){for(var re=-1,xe=T==null?0:T.length;++re<xe;){var qe=T[re];O(q,qe,P(qe),T)}return q}function Nt(T,O){for(var P=-1,q=T==null?0:T.length;++P<q&&O(T[P],P,T)!==!1;);return T}function xE(T,O){for(var P=T==null?0:T.length;P--&&O(T[P],P,T)!==!1;);return T}function jd(T,O){for(var P=-1,q=T==null?0:T.length;++P<q;)if(!O(T[P],P,T))return!1;return!0}function Ri(T,O){for(var P=-1,q=T==null?0:T.length,re=0,xe=[];++P<q;){var qe=T[P];O(qe,P,T)&&(xe[re++]=qe)}return xe}function rr(T,O){var P=T==null?0:T.length;return!!P&&kn(T,O,0)>-1}function ha(T,O,P){for(var q=-1,re=T==null?0:T.length;++q<re;)if(P(O,T[q]))return!0;return!1}function Oe(T,O){for(var P=-1,q=T==null?0:T.length,re=Array(q);++P<q;)re[P]=O(T[P],P,T);return re}function ki(T,O){for(var P=-1,q=O.length,re=T.length;++P<q;)T[re+P]=O[P];return T}function fa(T,O,P,q){var re=-1,xe=T==null?0:T.length;for(q&&xe&&(P=T[++re]);++re<xe;)P=O(P,T[re],re,T);return P}function _E(T,O,P,q){var re=T==null?0:T.length;for(q&&re&&(P=T[--re]);re--;)P=O(P,T[re],re,T);return P}function ma(T,O){for(var P=-1,q=T==null?0:T.length;++P<q;)if(O(T[P],P,T))return!0;return!1}var RE=pa("length");function kE(T){return T.split("")}function SE(T){return T.match(V0)||[]}function Ud(T,O,P){var q;return P(T,function(re,xe,qe){if(O(re,xe,qe))return q=xe,!1}),q}function or(T,O,P,q){for(var re=T.length,xe=P+(q?1:-1);q?xe--:++xe<re;)if(O(T[xe],xe,T))return xe;return-1}function kn(T,O,P){return O===O?HE(T,O,P):or(T,Kd,P)}function TE(T,O,P,q){for(var re=P-1,xe=T.length;++re<xe;)if(q(T[re],O))return re;return-1}function Kd(T){return T!==T}function qd(T,O){var P=T==null?0:T.length;return P?ba(T,O)/P:fe}function pa(T){return function(O){return O==null?t:O[T]}}function ga(T){return function(O){return T==null?t:T[O]}}function Yd(T,O,P,q,re){return re(T,function(xe,qe,Le){P=q?(q=!1,xe):O(P,xe,qe,Le)}),P}function ME(T,O){var P=T.length;for(T.sort(O);P--;)T[P]=T[P].value;return T}function ba(T,O){for(var P,q=-1,re=T.length;++q<re;){var xe=O(T[q]);xe!==t&&(P=P===t?xe:P+xe)}return P}function va(T,O){for(var P=-1,q=Array(T);++P<T;)q[P]=O(P);return q}function LE(T,O){return Oe(O,function(P){return[P,T[P]]})}function Xd(T){return T&&T.slice(0,eh(T)+1).replace(sa,"")}function kt(T){return function(O){return T(O)}}function wa(T,O){return Oe(O,function(P){return T[P]})}function cs(T,O){return T.has(O)}function Jd(T,O){for(var P=-1,q=T.length;++P<q&&kn(O,T[P],0)>-1;);return P}function Zd(T,O){for(var P=T.length;P--&&kn(O,T[P],0)>-1;);return P}function DE(T,O){for(var P=T.length,q=0;P--;)T[P]===O&&++q;return q}var AE=ga(pE),PE=ga(gE);function FE(T){return"\\"+vE[T]}function VE(T,O){return T==null?t:T[O]}function Sn(T){return dE.test(T)}function OE(T){return hE.test(T)}function NE(T){for(var O,P=[];!(O=T.next()).done;)P.push(O.value);return P}function ya(T){var O=-1,P=Array(T.size);return T.forEach(function(q,re){P[++O]=[re,q]}),P}function Qd(T,O){return function(P){return T(O(P))}}function Si(T,O){for(var P=-1,q=T.length,re=0,xe=[];++P<q;){var qe=T[P];(qe===O||qe===p)&&(T[P]=p,xe[re++]=P)}return xe}function ar(T){var O=-1,P=Array(T.size);return T.forEach(function(q){P[++O]=q}),P}function zE(T){var O=-1,P=Array(T.size);return T.forEach(function(q){P[++O]=[q,q]}),P}function HE(T,O,P){for(var q=P-1,re=T.length;++q<re;)if(T[q]===O)return q;return-1}function IE(T,O,P){for(var q=P+1;q--;)if(T[q]===O)return q;return q}function Tn(T){return Sn(T)?WE(T):RE(T)}function Ut(T){return Sn(T)?$E(T):kE(T)}function eh(T){for(var O=T.length;O--&&D0.test(T.charAt(O)););return O}var BE=ga(bE);function WE(T){for(var O=ua.lastIndex=0;ua.test(T);)++O;return O}function $E(T){return T.match(ua)||[]}function GE(T){return T.match(cE)||[]}var jE=function T(O){O=O==null?Ze:Mn.defaults(Ze.Object(),O,Mn.pick(Ze,fE));var P=O.Array,q=O.Date,re=O.Error,xe=O.Function,qe=O.Math,Le=O.Object,Ca=O.RegExp,UE=O.String,zt=O.TypeError,lr=P.prototype,KE=xe.prototype,Ln=Le.prototype,ur=O["__core-js_shared__"],cr=KE.toString,Te=Ln.hasOwnProperty,qE=0,th=function(){var r=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),dr=Ln.toString,YE=cr.call(Le),XE=Ze._,JE=Ca("^"+cr.call(Te).replace(na,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hr=zd?O.Buffer:t,Ti=O.Symbol,fr=O.Uint8Array,ih=hr?hr.allocUnsafe:t,mr=Qd(Le.getPrototypeOf,Le),nh=Le.create,sh=Ln.propertyIsEnumerable,pr=lr.splice,rh=Ti?Ti.isConcatSpreadable:t,ds=Ti?Ti.iterator:t,Gi=Ti?Ti.toStringTag:t,gr=function(){try{var r=Yi(Le,"defineProperty");return r({},"",{}),r}catch{}}(),ZE=O.clearTimeout!==Ze.clearTimeout&&O.clearTimeout,QE=q&&q.now!==Ze.Date.now&&q.now,e1=O.setTimeout!==Ze.setTimeout&&O.setTimeout,br=qe.ceil,vr=qe.floor,Ea=Le.getOwnPropertySymbols,t1=hr?hr.isBuffer:t,oh=O.isFinite,i1=lr.join,n1=Qd(Le.keys,Le),Ye=qe.max,tt=qe.min,s1=q.now,r1=O.parseInt,ah=qe.random,o1=lr.reverse,xa=Yi(O,"DataView"),hs=Yi(O,"Map"),_a=Yi(O,"Promise"),Dn=Yi(O,"Set"),fs=Yi(O,"WeakMap"),ms=Yi(Le,"create"),wr=fs&&new fs,An={},a1=Xi(xa),l1=Xi(hs),u1=Xi(_a),c1=Xi(Dn),d1=Xi(fs),yr=Ti?Ti.prototype:t,ps=yr?yr.valueOf:t,lh=yr?yr.toString:t;function y(r){if(Be(r)&&!oe(r)&&!(r instanceof ve)){if(r instanceof Ht)return r;if(Te.call(r,"__wrapped__"))return cf(r)}return new Ht(r)}var Pn=function(){function r(){}return function(a){if(!He(a))return{};if(nh)return nh(a);r.prototype=a;var d=new r;return r.prototype=t,d}}();function Cr(){}function Ht(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:R0,evaluate:k0,interpolate:bd,variable:"",imports:{_:y}},y.prototype=Cr.prototype,y.prototype.constructor=y,Ht.prototype=Pn(Cr.prototype),Ht.prototype.constructor=Ht;function ve(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=we,this.__views__=[]}function h1(){var r=new ve(this.__wrapped__);return r.__actions__=gt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=gt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=gt(this.__views__),r}function f1(){if(this.__filtered__){var r=new ve(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function m1(){var r=this.__wrapped__.value(),a=this.__dir__,d=oe(r),m=a<0,v=d?r.length:0,C=kx(0,v,this.__views__),R=C.start,S=C.end,L=S-R,N=m?S:R-1,z=this.__iteratees__,W=z.length,U=0,Z=tt(L,this.__takeCount__);if(!d||!m&&v==L&&Z==L)return Ah(r,this.__actions__);var ne=[];e:for(;L--&&U<Z;){N+=a;for(var ue=-1,se=r[N];++ue<W;){var pe=z[ue],Ce=pe.iteratee,Mt=pe.type,ut=Ce(se);if(Mt==le)se=ut;else if(!ut){if(Mt==ee)continue e;break e}}ne[U++]=se}return ne}ve.prototype=Pn(Cr.prototype),ve.prototype.constructor=ve;function ji(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 p1(){this.__data__=ms?ms(null):{},this.size=0}function g1(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function b1(r){var a=this.__data__;if(ms){var d=a[r];return d===h?t:d}return Te.call(a,r)?a[r]:t}function v1(r){var a=this.__data__;return ms?a[r]!==t:Te.call(a,r)}function w1(r,a){var d=this.__data__;return this.size+=this.has(r)?0:1,d[r]=ms&&a===t?h:a,this}ji.prototype.clear=p1,ji.prototype.delete=g1,ji.prototype.get=b1,ji.prototype.has=v1,ji.prototype.set=w1;function ci(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 y1(){this.__data__=[],this.size=0}function C1(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 E1(r){var a=this.__data__,d=Er(a,r);return d<0?t:a[d][1]}function x1(r){return Er(this.__data__,r)>-1}function _1(r,a){var d=this.__data__,m=Er(d,r);return m<0?(++this.size,d.push([r,a])):d[m][1]=a,this}ci.prototype.clear=y1,ci.prototype.delete=C1,ci.prototype.get=E1,ci.prototype.has=x1,ci.prototype.set=_1;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 R1(){this.size=0,this.__data__={hash:new ji,map:new(hs||ci),string:new ji}}function k1(r){var a=Fr(this,r).delete(r);return this.size-=a?1:0,a}function S1(r){return Fr(this,r).get(r)}function T1(r){return Fr(this,r).has(r)}function M1(r,a){var d=Fr(this,r),m=d.size;return d.set(r,a),this.size+=d.size==m?0:1,this}di.prototype.clear=R1,di.prototype.delete=k1,di.prototype.get=S1,di.prototype.has=T1,di.prototype.set=M1;function Ui(r){var a=-1,d=r==null?0:r.length;for(this.__data__=new di;++a<d;)this.add(r[a])}function L1(r){return this.__data__.set(r,h),this}function D1(r){return this.__data__.has(r)}Ui.prototype.add=Ui.prototype.push=L1,Ui.prototype.has=D1;function Kt(r){var a=this.__data__=new ci(r);this.size=a.size}function A1(){this.__data__=new ci,this.size=0}function P1(r){var a=this.__data__,d=a.delete(r);return this.size=a.size,d}function F1(r){return this.__data__.get(r)}function V1(r){return this.__data__.has(r)}function O1(r,a){var d=this.__data__;if(d instanceof ci){var m=d.__data__;if(!hs||m.length<s-1)return m.push([r,a]),this.size=++d.size,this;d=this.__data__=new di(m)}return d.set(r,a),this.size=d.size,this}Kt.prototype.clear=A1,Kt.prototype.delete=P1,Kt.prototype.get=F1,Kt.prototype.has=V1,Kt.prototype.set=O1;function uh(r,a){var d=oe(r),m=!d&&Ji(r),v=!d&&!m&&Pi(r),C=!d&&!m&&!v&&Nn(r),R=d||m||v||C,S=R?va(r.length,UE):[],L=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")||pi(N,L)))&&S.push(N);return S}function ch(r){var a=r.length;return a?r[Va(0,a-1)]:t}function N1(r,a){return Vr(gt(r),Ki(a,0,r.length))}function z1(r){return Vr(gt(r))}function Ra(r,a,d){(d!==t&&!qt(r[a],d)||d===t&&!(a in r))&&hi(r,a,d)}function gs(r,a,d){var m=r[a];(!(Te.call(r,a)&&qt(m,d))||d===t&&!(a in r))&&hi(r,a,d)}function Er(r,a){for(var d=r.length;d--;)if(qt(r[d][0],a))return d;return-1}function H1(r,a,d,m){return Mi(r,function(v,C,R){a(m,v,d(v),R)}),m}function dh(r,a){return r&&ii(a,Xe(a),r)}function I1(r,a){return r&&ii(a,vt(a),r)}function hi(r,a,d){a=="__proto__"&&gr?gr(r,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):r[a]=d}function ka(r,a){for(var d=-1,m=a.length,v=P(m),C=r==null;++d<m;)v[d]=C?t:ol(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 It(r,a,d,m,v,C){var R,S=a&b,L=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=oe(r);if(z){if(R=Tx(r),!S)return gt(r,R)}else{var W=it(r),U=W==Se||W==Vt;if(Pi(r))return Vh(r,S);if(W==Je||W==ze||U&&!v){if(R=L||U?{}:ef(r),!S)return L?bx(r,I1(R,r)):gx(r,dh(R,r))}else{if(!Ae[W])return v?r:{};R=Mx(r,W,S)}}C||(C=new Kt);var Z=C.get(r);if(Z)return Z;C.set(r,R),Lf(r)?r.forEach(function(se){R.add(It(se,a,d,se,r,C))}):Tf(r)&&r.forEach(function(se,pe){R.set(pe,It(se,a,d,pe,r,C))});var ne=N?L?Ua:ja:L?vt:Xe,ue=z?t:ne(r);return Nt(ue||r,function(se,pe){ue&&(pe=se,se=r[pe]),gs(R,pe,It(se,a,d,pe,r,C))}),R}function B1(r){var a=Xe(r);return function(d){return hh(d,r,a)}}function hh(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 fh(r,a,d){if(typeof r!="function")throw new zt(l);return xs(function(){r.apply(t,d)},a)}function bs(r,a,d,m){var v=-1,C=rr,R=!0,S=r.length,L=[],N=a.length;if(!S)return L;d&&(a=Oe(a,kt(d))),m?(C=ha,R=!1):a.length>=s&&(C=cs,R=!1,a=new Ui(a));e:for(;++v<S;){var z=r[v],W=d==null?z:d(z);if(z=m||z!==0?z:0,R&&W===W){for(var U=N;U--;)if(a[U]===W)continue e;L.push(z)}else C(a,W,m)||L.push(z)}return L}var Mi=Ih(ti),mh=Ih(Ta,!0);function W1(r,a){var d=!0;return Mi(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,L=C}return L}function $1(r,a,d,m){var v=r.length;for(d=ae(d),d<0&&(d=-d>v?0:v+d),m=m===t||m>v?v:ae(m),m<0&&(m+=v),m=d>m?0:Af(m);d<m;)r[d++]=a;return r}function ph(r,a){var d=[];return Mi(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=Dx),v||(v=[]);++C<R;){var S=r[C];a>0&&d(S)?a>1?Qe(S,a-1,d,m,v):ki(v,S):m||(v[v.length]=S)}return v}var Sa=Bh(),gh=Bh(!0);function ti(r,a){return r&&Sa(r,a,Xe)}function Ta(r,a){return r&&gh(r,a,Xe)}function _r(r,a){return Ri(a,function(d){return gi(r[d])})}function qi(r,a){a=Di(a,r);for(var d=0,m=a.length;r!=null&&d<m;)r=r[ni(a[d++])];return d&&d==m?r:t}function bh(r,a,d){var m=a(r);return oe(r)?m:ki(m,d(r))}function at(r){return r==null?r===t?xn:Ke:Gi&&Gi in Le(r)?Rx(r):zx(r)}function Ma(r,a){return r>a}function G1(r,a){return r!=null&&Te.call(r,a)}function j1(r,a){return r!=null&&a in Le(r)}function U1(r,a,d){return r>=tt(a,d)&&r<Ye(a,d)}function La(r,a,d){for(var m=d?ha:rr,v=r[0].length,C=r.length,R=C,S=P(C),L=1/0,N=[];R--;){var z=r[R];R&&a&&(z=Oe(z,kt(a))),L=tt(z.length,L),S[R]=!d&&(a||v>=120&&z.length>=120)?new Ui(R&&z):t}z=r[0];var W=-1,U=S[0];e:for(;++W<v&&N.length<L;){var Z=z[W],ne=a?a(Z):Z;if(Z=d||Z!==0?Z:0,!(U?cs(U,ne):m(N,ne,d))){for(R=C;--R;){var ue=S[R];if(!(ue?cs(ue,ne):m(r[R],ne,d)))continue e}U&&U.push(ne),N.push(Z)}}return N}function K1(r,a,d,m){return ti(r,function(v,C,R){a(m,d(v),C,R)}),m}function vs(r,a,d){a=Di(a,r),r=rf(r,a);var m=r==null?r:r[ni(Wt(a))];return m==null?t:Rt(m,r,d)}function vh(r){return Be(r)&&at(r)==ze}function q1(r){return Be(r)&&at(r)==us}function Y1(r){return Be(r)&&at(r)==et}function ws(r,a,d,m,v){return r===a?!0:r==null||a==null||!Be(r)&&!Be(a)?r!==r&&a!==a:X1(r,a,d,m,ws,v)}function X1(r,a,d,m,v,C){var R=oe(r),S=oe(a),L=R?Ee:it(r),N=S?Ee:it(a);L=L==ze?Je:L,N=N==ze?Je:N;var z=L==Je,W=N==Je,U=L==N;if(U&&Pi(r)){if(!Pi(a))return!1;R=!0,z=!1}if(U&&!z)return C||(C=new Kt),R||Nn(r)?Jh(r,a,d,m,v,C):xx(r,a,L,d,m,v,C);if(!(d&E)){var Z=z&&Te.call(r,"__wrapped__"),ne=W&&Te.call(a,"__wrapped__");if(Z||ne){var ue=Z?r.value():r,se=ne?a.value():a;return C||(C=new Kt),v(ue,se,d,m,C)}}return U?(C||(C=new Kt),_x(r,a,d,m,v,C)):!1}function J1(r){return Be(r)&&it(r)==be}function Da(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 L=S[0],N=r[L],z=S[1];if(R&&S[2]){if(N===t&&!(L in r))return!1}else{var W=new Kt;if(m)var U=m(N,z,L,r,a,W);if(!(U===t?ws(z,N,E|x,m,W):U))return!1}}return!0}function wh(r){if(!He(r)||Px(r))return!1;var a=gi(r)?JE:B0;return a.test(Xi(r))}function Z1(r){return Be(r)&&at(r)==Wi}function Q1(r){return Be(r)&&it(r)==pt}function ex(r){return Be(r)&&Br(r.length)&&!!Pe[at(r)]}function yh(r){return typeof r=="function"?r:r==null?wt:typeof r=="object"?oe(r)?xh(r[0],r[1]):Eh(r):$f(r)}function Aa(r){if(!Es(r))return n1(r);var a=[];for(var d in Le(r))Te.call(r,d)&&d!="constructor"&&a.push(d);return a}function tx(r){if(!He(r))return Nx(r);var a=Es(r),d=[];for(var m in r)m=="constructor"&&(a||!Te.call(r,m))||d.push(m);return d}function Pa(r,a){return r<a}function Ch(r,a){var d=-1,m=bt(r)?P(r.length):[];return Mi(r,function(v,C,R){m[++d]=a(v,C,R)}),m}function Eh(r){var a=qa(r);return a.length==1&&a[0][2]?nf(a[0][0],a[0][1]):function(d){return d===r||Da(d,r,a)}}function xh(r,a){return Xa(r)&&tf(a)?nf(ni(r),a):function(d){var m=ol(d,r);return m===t&&m===a?al(d,r):ws(a,m,E|x)}}function Rr(r,a,d,m,v){r!==a&&Sa(a,function(C,R){if(v||(v=new Kt),He(C))ix(r,a,R,d,Rr,m,v);else{var S=m?m(Za(r,R),C,R+"",r,a,v):t;S===t&&(S=C),Ra(r,R,S)}},vt)}function ix(r,a,d,m,v,C,R){var S=Za(r,d),L=Za(a,d),N=R.get(L);if(N){Ra(r,d,N);return}var z=C?C(S,L,d+"",r,a,R):t,W=z===t;if(W){var U=oe(L),Z=!U&&Pi(L),ne=!U&&!Z&&Nn(L);z=L,U||Z||ne?oe(S)?z=S:Ge(S)?z=gt(S):Z?(W=!1,z=Vh(L,!0)):ne?(W=!1,z=Oh(L,!0)):z=[]:_s(L)||Ji(L)?(z=S,Ji(S)?z=Pf(S):(!He(S)||gi(S))&&(z=ef(L))):W=!1}W&&(R.set(L,z),v(z,L,m,C,R),R.delete(L)),Ra(r,d,z)}function _h(r,a){var d=r.length;if(d)return a+=a<0?d:0,pi(a,d)?r[a]:t}function Rh(r,a,d){a.length?a=Oe(a,function(C){return oe(C)?function(R){return qi(R,C.length===1?C[0]:C)}:C}):a=[wt];var m=-1;a=Oe(a,kt(te()));var v=Ch(r,function(C,R,S){var L=Oe(a,function(N){return N(C)});return{criteria:L,index:++m,value:C}});return ME(v,function(C,R){return px(C,R,d)})}function nx(r,a){return kh(r,a,function(d,m){return al(r,m)})}function kh(r,a,d){for(var m=-1,v=a.length,C={};++m<v;){var R=a[m],S=qi(r,R);d(S,R)&&ys(C,Di(R,r),S)}return C}function sx(r){return function(a){return qi(a,r)}}function Fa(r,a,d,m){var v=m?TE:kn,C=-1,R=a.length,S=r;for(r===a&&(a=gt(a)),d&&(S=Oe(r,kt(d)));++C<R;)for(var L=0,N=a[C],z=d?d(N):N;(L=v(S,z,L,m))>-1;)S!==r&&pr.call(S,L,1),pr.call(r,L,1);return r}function Sh(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;pi(v)?pr.call(r,v,1):za(r,v)}}return r}function Va(r,a){return r+vr(ah()*(a-r+1))}function rx(r,a,d,m){for(var v=-1,C=Ye(br((a-r)/(d||1)),0),R=P(C);C--;)R[m?C:++v]=r,r+=d;return R}function Oa(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 ce(r,a){return Qa(sf(r,a,wt),r+"")}function ox(r){return ch(zn(r))}function ax(r,a){var d=zn(r);return Vr(d,Ki(a,0,d.length))}function ys(r,a,d,m){if(!He(r))return r;a=Di(a,r);for(var v=-1,C=a.length,R=C-1,S=r;S!=null&&++v<C;){var L=ni(a[v]),N=d;if(L==="__proto__"||L==="constructor"||L==="prototype")return r;if(v!=R){var z=S[L];N=m?m(z,L,S):t,N===t&&(N=He(z)?z:pi(a[v+1])?[]:{})}gs(S,L,N),S=S[L]}return r}var Th=wr?function(r,a){return wr.set(r,a),r}:wt,lx=gr?function(r,a){return gr(r,"toString",{configurable:!0,enumerable:!1,value:ul(a),writable:!0})}:wt;function ux(r){return Vr(zn(r))}function Bt(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=P(v);++m<v;)C[m]=r[m+a];return C}function cx(r,a){var d;return Mi(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 Na(r,a,wt,d)}function Na(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,L=Tt(a),N=a===t;v<C;){var z=vr((v+C)/2),W=d(r[z]),U=W!==t,Z=W===null,ne=W===W,ue=Tt(W);if(R)var se=m||ne;else N?se=ne&&(m||U):S?se=ne&&U&&(m||!Z):L?se=ne&&U&&!Z&&(m||!ue):Z||ue?se=!1:se=m?W<=a:W<a;se?v=z+1:C=z}return tt(C,ye)}function Mh(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,L)){var L=S;C[v++]=R===0?0:R}}return C}function Lh(r){return typeof r=="number"?r:Tt(r)?fe:+r}function St(r){if(typeof r=="string")return r;if(oe(r))return Oe(r,St)+"";if(Tt(r))return lh?lh.call(r):"";var a=r+"";return a=="0"&&1/r==-j?"-0":a}function Li(r,a,d){var m=-1,v=rr,C=r.length,R=!0,S=[],L=S;if(d)R=!1,v=ha;else if(C>=s){var N=a?null:Cx(r);if(N)return ar(N);R=!1,v=cs,L=new Ui}else L=a?[]:S;e:for(;++m<C;){var z=r[m],W=a?a(z):z;if(z=d||z!==0?z:0,R&&W===W){for(var U=L.length;U--;)if(L[U]===W)continue e;a&&L.push(W),S.push(z)}else v(L,W,d)||(L!==S&&L.push(W),S.push(z))}return S}function za(r,a){return a=Di(a,r),r=rf(r,a),r==null||delete r[ni(Wt(a))]}function Dh(r,a,d,m){return ys(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?Bt(r,m?0:C,m?C+1:v):Bt(r,m?C+1:0,m?v:C)}function Ah(r,a){var d=r;return d instanceof ve&&(d=d.value()),fa(a,function(m,v){return v.func.apply(v.thisArg,ki([m],v.args))},d)}function Ha(r,a,d){var m=r.length;if(m<2)return m?Li(r[0]):[];for(var v=-1,C=P(m);++v<m;)for(var R=r[v],S=-1;++S<m;)S!=v&&(C[v]=bs(C[v]||R,r[S],a,d));return Li(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 Ia(r){return Ge(r)?r:[]}function Ba(r){return typeof r=="function"?r:wt}function Di(r,a){return oe(r)?r:Xa(r,a)?[r]:uf(Re(r))}var dx=ce;function Ai(r,a,d){var m=r.length;return d=d===t?m:d,!a&&d>=m?r:Bt(r,a,d)}var Fh=ZE||function(r){return Ze.clearTimeout(r)};function Vh(r,a){if(a)return r.slice();var d=r.length,m=ih?ih(d):new r.constructor(d);return r.copy(m),m}function Wa(r){var a=new r.constructor(r.byteLength);return new fr(a).set(new fr(r)),a}function hx(r,a){var d=a?Wa(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.byteLength)}function fx(r){var a=new r.constructor(r.source,vd.exec(r));return a.lastIndex=r.lastIndex,a}function mx(r){return ps?Le(ps.call(r)):{}}function Oh(r,a){var d=a?Wa(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.length)}function Nh(r,a){if(r!==a){var d=r!==t,m=r===null,v=r===r,C=Tt(r),R=a!==t,S=a===null,L=a===a,N=Tt(a);if(!S&&!N&&!C&&r>a||C&&R&&L&&!S&&!N||m&&R&&L||!d&&L||!v)return 1;if(!m&&!C&&!N&&r<a||N&&d&&v&&!m&&!C||S&&d&&v||!R&&v||!L)return-1}return 0}function px(r,a,d){for(var m=-1,v=r.criteria,C=a.criteria,R=v.length,S=d.length;++m<R;){var L=Nh(v[m],C[m]);if(L){if(m>=S)return L;var N=d[m];return L*(N=="desc"?-1:1)}}return r.index-a.index}function zh(r,a,d,m){for(var v=-1,C=r.length,R=d.length,S=-1,L=a.length,N=Ye(C-R,0),z=P(L+N),W=!m;++S<L;)z[S]=a[S];for(;++v<R;)(W||v<C)&&(z[d[v]]=r[v]);for(;N--;)z[S++]=r[v++];return z}function Hh(r,a,d,m){for(var v=-1,C=r.length,R=-1,S=d.length,L=-1,N=a.length,z=Ye(C-S,0),W=P(z+N),U=!m;++v<z;)W[v]=r[v];for(var Z=v;++L<N;)W[Z+L]=a[L];for(;++R<S;)(U||v<C)&&(W[Z+d[R]]=r[v++]);return W}function gt(r,a){var d=-1,m=r.length;for(a||(a=P(m));++d<m;)a[d]=r[d];return a}function ii(r,a,d,m){var v=!d;d||(d={});for(var C=-1,R=a.length;++C<R;){var S=a[C],L=m?m(d[S],r[S],S,d,r):t;L===t&&(L=r[S]),v?hi(d,S,L):gs(d,S,L)}return d}function gx(r,a){return ii(r,Ya(r),a)}function bx(r,a){return ii(r,Zh(r),a)}function Tr(r,a){return function(d,m){var v=oe(d)?EE:H1,C=a?a():{};return v(d,r,te(m,2),C)}}function Fn(r){return ce(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&&lt(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 Ih(r,a){return function(d,m){if(d==null)return d;if(!bt(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 Bh(r){return function(a,d,m){for(var v=-1,C=Le(a),R=m(a),S=R.length;S--;){var L=R[r?S:++v];if(d(C[L],L,C)===!1)break}return a}}function vx(r,a,d){var m=a&_,v=Cs(r);function C(){var R=this&&this!==Ze&&this instanceof C?v:r;return R.apply(m?d:this,arguments)}return C}function Wh(r){return function(a){a=Re(a);var d=Sn(a)?Ut(a):t,m=d?d[0]:a.charAt(0),v=d?Ai(d,1).join(""):a.slice(1);return m[r]()+v}}function Vn(r){return function(a){return fa(Bf(If(a).replace(lE,"")),r,"")}}function Cs(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=Pn(r.prototype),m=r.apply(d,a);return He(m)?m:d}}function wx(r,a,d){var m=Cs(r);function v(){for(var C=arguments.length,R=P(C),S=C,L=On(v);S--;)R[S]=arguments[S];var N=C<3&&R[0]!==L&&R[C-1]!==L?[]:Si(R,L);if(C-=N.length,C<d)return Kh(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 $h(r){return function(a,d,m){var v=Le(a);if(!bt(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 Gh(r){return mi(function(a){var d=a.length,m=d,v=Ht.prototype.thru;for(r&&a.reverse();m--;){var C=a[m];if(typeof C!="function")throw new zt(l);if(v&&!R&&Pr(C)=="wrapper")var R=new Ht([],!0)}for(m=R?m:d;++m<d;){C=a[m];var S=Pr(C),L=S=="wrapper"?Ka(C):t;L&&Ja(L[0])&&L[1]==(B|M|A|D)&&!L[4].length&&L[9]==1?R=R[Pr(L[0])].apply(R,L[3]):R=C.length==1&&Ja(C)?R[S]():R.thru(C)}return function(){var N=arguments,z=N[0];if(R&&N.length==1&&oe(z))return R.plant(z).value();for(var W=0,U=d?a[W].apply(this,N):z;++W<d;)U=a[W].call(this,U);return U}})}function Mr(r,a,d,m,v,C,R,S,L,N){var z=a&B,W=a&_,U=a&k,Z=a&(M|F),ne=a&I,ue=U?t:Cs(r);function se(){for(var pe=arguments.length,Ce=P(pe),Mt=pe;Mt--;)Ce[Mt]=arguments[Mt];if(Z)var ut=On(se),Lt=DE(Ce,ut);if(m&&(Ce=zh(Ce,m,v,Z)),C&&(Ce=Hh(Ce,C,R,Z)),pe-=Lt,Z&&pe<N){var je=Si(Ce,ut);return Kh(r,a,Mr,se.placeholder,d,Ce,je,S,L,N-pe)}var Yt=W?d:this,vi=U?Yt[r]:r;return pe=Ce.length,S?Ce=Hx(Ce,S):ne&&pe>1&&Ce.reverse(),z&&L<pe&&(Ce.length=L),this&&this!==Ze&&this instanceof se&&(vi=ue||Cs(vi)),vi.apply(Yt,Ce)}return se}function jh(r,a){return function(d,m){return K1(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=Lh(d),m=Lh(m)),v=r(d,m)}return v}}function $a(r){return mi(function(a){return a=Oe(a,kt(te())),ce(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?Oa(a,r):a;var m=Oa(a,br(r/Tn(a)));return Sn(a)?Ai(Ut(m),0,r).join(""):m.slice(0,r)}function yx(r,a,d,m){var v=a&_,C=Cs(r);function R(){for(var S=-1,L=arguments.length,N=-1,z=m.length,W=P(z+L),U=this&&this!==Ze&&this instanceof R?C:r;++N<z;)W[N]=m[N];for(;L--;)W[N++]=arguments[++S];return Rt(U,v?d:this,W)}return R}function Uh(r){return function(a,d,m){return m&&typeof m!="number"&&lt(a,d,m)&&(d=m=t),a=bi(a),d===t?(d=a,a=0):d=bi(d),m=m===t?a<d?1:-1:bi(m),rx(a,d,m,r)}}function Ar(r){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=$t(a),d=$t(d)),r(a,d)}}function Kh(r,a,d,m,v,C,R,S,L,N){var z=a&M,W=z?R:t,U=z?t:R,Z=z?C:t,ne=z?t:C;a|=z?A:H,a&=~(z?H:A),a&V||(a&=~(_|k));var ue=[r,a,v,Z,W,ne,U,S,L,N],se=d.apply(t,ue);return Ja(r)&&of(se,ue),se.placeholder=m,af(se,r,a)}function Ga(r){var a=qe[r];return function(d,m){if(d=$t(d),m=m==null?0:tt(ae(m),292),m&&oh(d)){var v=(Re(d)+"e").split("e"),C=a(v[0]+"e"+(+v[1]+m));return v=(Re(C)+"e").split("e"),+(v[0]+"e"+(+v[1]-m))}return a(d)}}var Cx=Dn&&1/ar(new Dn([,-0]))[1]==j?function(r){return new Dn(r)}:hl;function qh(r){return function(a){var d=it(a);return d==be?ya(a):d==pt?zE(a):LE(a,r(a))}}function fi(r,a,d,m,v,C,R,S){var L=a&k;if(!L&&typeof r!="function")throw new zt(l);var N=m?m.length:0;if(N||(a&=~(A|H),m=v=t),R=R===t?R:Ye(ae(R),0),S=S===t?S:ae(S),N-=v?v.length:0,a&H){var z=m,W=v;m=v=t}var U=L?t:Ka(r),Z=[r,a,d,m,v,z,W,C,R,S];if(U&&Ox(Z,U),r=Z[0],a=Z[1],d=Z[2],m=Z[3],v=Z[4],S=Z[9]=Z[9]===t?L?0:r.length:Ye(Z[9]-N,0),!S&&a&(M|F)&&(a&=~(M|F)),!a||a==_)var ne=vx(r,a,d);else a==M||a==F?ne=wx(r,a,S):(a==A||a==(_|A))&&!v.length?ne=yx(r,a,d,m):ne=Mr.apply(t,Z);var ue=U?Th:of;return af(ue(ne,Z),r,a)}function Yh(r,a,d,m){return r===t||qt(r,Ln[d])&&!Te.call(m,d)?a:r}function Xh(r,a,d,m,v,C){return He(r)&&He(a)&&(C.set(a,r),Rr(r,a,t,Xh,C),C.delete(a)),r}function Ex(r){return _s(r)?t:r}function Jh(r,a,d,m,v,C){var R=d&E,S=r.length,L=a.length;if(S!=L&&!(R&&L>S))return!1;var N=C.get(r),z=C.get(a);if(N&&z)return N==a&&z==r;var W=-1,U=!0,Z=d&x?new Ui:t;for(C.set(r,a),C.set(a,r);++W<S;){var ne=r[W],ue=a[W];if(m)var se=R?m(ue,ne,W,a,r,C):m(ne,ue,W,r,a,C);if(se!==t){if(se)continue;U=!1;break}if(Z){if(!ma(a,function(pe,Ce){if(!cs(Z,Ce)&&(ne===pe||v(ne,pe,d,m,C)))return Z.push(Ce)})){U=!1;break}}else if(!(ne===ue||v(ne,ue,d,m,C))){U=!1;break}}return C.delete(r),C.delete(a),U}function xx(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 us:return!(r.byteLength!=a.byteLength||!C(new fr(r),new fr(a)));case _t:case et:case Ue:return qt(+r,+a);case me:return r.name==a.name&&r.message==a.message;case Wi:case _i:return r==a+"";case be:var S=ya;case pt:var L=m&E;if(S||(S=ar),r.size!=a.size&&!L)return!1;var N=R.get(r);if(N)return N==a;m|=x,R.set(r,a);var z=Jh(S(r),S(a),m,v,C,R);return R.delete(r),z;case ui:if(ps)return ps.call(r)==ps.call(a)}return!1}function _x(r,a,d,m,v,C){var R=d&E,S=ja(r),L=S.length,N=ja(a),z=N.length;if(L!=z&&!R)return!1;for(var W=L;W--;){var U=S[W];if(!(R?U in a:Te.call(a,U)))return!1}var Z=C.get(r),ne=C.get(a);if(Z&&ne)return Z==a&&ne==r;var ue=!0;C.set(r,a),C.set(a,r);for(var se=R;++W<L;){U=S[W];var pe=r[U],Ce=a[U];if(m)var Mt=R?m(Ce,pe,U,a,r,C):m(pe,Ce,U,r,a,C);if(!(Mt===t?pe===Ce||v(pe,Ce,d,m,C):Mt)){ue=!1;break}se||(se=U=="constructor")}if(ue&&!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)&&(ue=!1)}return C.delete(r),C.delete(a),ue}function mi(r){return Qa(sf(r,t,ff),r+"")}function ja(r){return bh(r,Xe,Ya)}function Ua(r){return bh(r,vt,Zh)}var Ka=wr?function(r){return wr.get(r)}:hl;function Pr(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||cl;return r=r===cl?yh:r,arguments.length?r(arguments[0],arguments[1]):r}function Fr(r,a){var d=r.__data__;return Ax(a)?d[typeof a=="string"?"string":"hash"]:d.map}function qa(r){for(var a=Xe(r),d=a.length;d--;){var m=a[d],v=r[m];a[d]=[m,v,tf(v)]}return a}function Yi(r,a){var d=VE(r,a);return wh(d)?d:t}function Rx(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 Ya=Ea?function(r){return r==null?[]:(r=Le(r),Ri(Ea(r),function(a){return sh.call(r,a)}))}:fl,Zh=Ea?function(r){for(var a=[];r;)ki(a,Ya(r)),r=mr(r);return a}:fl,it=at;(xa&&it(new xa(new ArrayBuffer(1)))!=_n||hs&&it(new hs)!=be||_a&&it(_a.resolve())!=ot||Dn&&it(new Dn)!=pt||fs&&it(new fs)!=ls)&&(it=function(r){var a=at(r),d=a==Je?r.constructor:t,m=d?Xi(d):"";if(m)switch(m){case a1:return _n;case l1:return be;case u1:return ot;case c1:return pt;case d1:return ls}return a});function kx(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 Sx(r){var a=r.match(P0);return a?a[1].split(F0):[]}function Qh(r,a,d){a=Di(a,r);for(var m=-1,v=a.length,C=!1;++m<v;){var R=ni(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)&&pi(R,v)&&(oe(r)||Ji(r)))}function Tx(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 ef(r){return typeof r.constructor=="function"&&!Es(r)?Pn(mr(r)):{}}function Mx(r,a,d){var m=r.constructor;switch(a){case us:return Wa(r);case _t:case et:return new m(+r);case _n:return hx(r,d);case qo:case Yo:case Xo:case Jo:case Zo:case Qo:case ea:case ta:case ia:return Oh(r,d);case be:return new m;case Ue:case _i:return new m(r);case Wi:return fx(r);case pt:return new m;case ui:return mx(r)}}function Lx(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(A0,`{
8
+ */Rs.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,M=8,P=16,A=32,H=64,B=128,D=256,I=512,Y=30,ie="...",G=800,J=16,ee=1,le=2,_e=3,j=1/0,$=9007199254740991,Q=17976931348623157e292,fe=0/0,we=4294967295,ye=we-1,Ie=we>>>1,De=[["ary",B],["bind",_],["bindKey",k],["curry",M],["curryRight",P],["flip",I],["partial",A],["partialRight",H],["rearg",D]],ze="[object Arguments]",Ee="[object Array]",rt="[object AsyncFunction]",_t="[object Boolean]",et="[object Date]",K="[object DOMException]",me="[object Error]",Se="[object Function]",Vt="[object GeneratorFunction]",be="[object Map]",Ue="[object Number]",Ke="[object Null]",Je="[object Object]",ot="[object Promise]",mt="[object Proxy]",Wi="[object RegExp]",pt="[object Set]",_i="[object String]",ui="[object Symbol]",xn="[object Undefined]",ls="[object WeakMap]",y0="[object WeakSet]",us="[object ArrayBuffer]",_n="[object DataView]",qo="[object Float32Array]",Yo="[object Float64Array]",Xo="[object Int8Array]",Jo="[object Int16Array]",Zo="[object Int32Array]",Qo="[object Uint8Array]",ea="[object Uint8ClampedArray]",ta="[object Uint16Array]",ia="[object Uint32Array]",C0=/\b__p \+= '';/g,E0=/\b(__p \+=) '' \+/g,x0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pd=/&(?:amp|lt|gt|quot|#39);/g,gd=/[&<>"']/g,_0=RegExp(pd.source),R0=RegExp(gd.source),k0=/<%-([\s\S]+?)%>/g,S0=/<%([\s\S]+?)%>/g,bd=/<%=([\s\S]+?)%>/g,T0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M0=/^\w*$/,L0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,na=/[\\^$.*+?()[\]{}|]/g,D0=RegExp(na.source),sa=/^\s+/,A0=/\s/,F0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,P0=/\{\n\/\* \[wrapped with (.+)\] \*/,V0=/,? & /,O0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,N0=/[()=,{}\[\]\/\s]/,z0=/\\(\\)?/g,H0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vd=/\w*$/,I0=/^[-+]0x[0-9a-f]+$/i,B0=/^0b[01]+$/i,W0=/^\[object .+?Constructor\]$/,$0=/^0o[0-7]+$/i,G0=/^(?:0|[1-9]\d*)$/,j0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ir=/($^)/,U0=/['\n\r\u2028\u2029\\]/g,nr="\\ud800-\\udfff",K0="\\u0300-\\u036f",q0="\\ufe20-\\ufe2f",Y0="\\u20d0-\\u20ff",wd=K0+q0+Y0,yd="\\u2700-\\u27bf",Cd="a-z\\xdf-\\xf6\\xf8-\\xff",X0="\\xac\\xb1\\xd7\\xf7",J0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Z0="\\u2000-\\u206f",Q0=" \\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",Ed="A-Z\\xc0-\\xd6\\xd8-\\xde",xd="\\ufe0e\\ufe0f",_d=X0+J0+Z0+Q0,ra="['’]",eE="["+nr+"]",Rd="["+_d+"]",sr="["+wd+"]",kd="\\d+",tE="["+yd+"]",Sd="["+Cd+"]",Td="[^"+nr+_d+kd+yd+Cd+Ed+"]",oa="\\ud83c[\\udffb-\\udfff]",iE="(?:"+sr+"|"+oa+")",Md="[^"+nr+"]",aa="(?:\\ud83c[\\udde6-\\uddff]){2}",la="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="["+Ed+"]",Ld="\\u200d",Dd="(?:"+Sd+"|"+Td+")",nE="(?:"+Rn+"|"+Td+")",Ad="(?:"+ra+"(?:d|ll|m|re|s|t|ve))?",Fd="(?:"+ra+"(?:D|LL|M|RE|S|T|VE))?",Pd=iE+"?",Vd="["+xd+"]?",sE="(?:"+Ld+"(?:"+[Md,aa,la].join("|")+")"+Vd+Pd+")*",rE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Od=Vd+Pd+sE,aE="(?:"+[tE,aa,la].join("|")+")"+Od,lE="(?:"+[Md+sr+"?",sr,aa,la,eE].join("|")+")",uE=RegExp(ra,"g"),cE=RegExp(sr,"g"),ua=RegExp(oa+"(?="+oa+")|"+lE+Od,"g"),dE=RegExp([Rn+"?"+Sd+"+"+Ad+"(?="+[Rd,Rn,"$"].join("|")+")",nE+"+"+Fd+"(?="+[Rd,Rn+Dd,"$"].join("|")+")",Rn+"?"+Dd+"+"+Ad,Rn+"+"+Fd,oE,rE,kd,aE].join("|"),"g"),hE=RegExp("["+Ld+nr+wd+xd+"]"),fE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mE=["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"],pE=-1,Fe={};Fe[qo]=Fe[Yo]=Fe[Xo]=Fe[Jo]=Fe[Zo]=Fe[Qo]=Fe[ea]=Fe[ta]=Fe[ia]=!0,Fe[ze]=Fe[Ee]=Fe[us]=Fe[_t]=Fe[_n]=Fe[et]=Fe[me]=Fe[Se]=Fe[be]=Fe[Ue]=Fe[Je]=Fe[Wi]=Fe[pt]=Fe[_i]=Fe[ls]=!1;var Ae={};Ae[ze]=Ae[Ee]=Ae[us]=Ae[_n]=Ae[_t]=Ae[et]=Ae[qo]=Ae[Yo]=Ae[Xo]=Ae[Jo]=Ae[Zo]=Ae[be]=Ae[Ue]=Ae[Je]=Ae[Wi]=Ae[pt]=Ae[_i]=Ae[ui]=Ae[Qo]=Ae[ea]=Ae[ta]=Ae[ia]=!0,Ae[me]=Ae[Se]=Ae[ls]=!1;var gE={À:"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"},bE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vE={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},wE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yE=parseFloat,CE=parseInt,Nd=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,EE=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Nd||EE||Function("return this")(),ca=e&&!e.nodeType&&e,$i=ca&&!0&&n&&!n.nodeType&&n,zd=$i&&$i.exports===ca,da=zd&&Nd.process,Ot=function(){try{var T=$i&&$i.require&&$i.require("util").types;return T||da&&da.binding&&da.binding("util")}catch{}}(),Hd=Ot&&Ot.isArrayBuffer,Id=Ot&&Ot.isDate,Bd=Ot&&Ot.isMap,Wd=Ot&&Ot.isRegExp,$d=Ot&&Ot.isSet,Gd=Ot&&Ot.isTypedArray;function Rt(T,O,F){switch(F.length){case 0:return T.call(O);case 1:return T.call(O,F[0]);case 2:return T.call(O,F[0],F[1]);case 3:return T.call(O,F[0],F[1],F[2])}return T.apply(O,F)}function xE(T,O,F,q){for(var re=-1,xe=T==null?0:T.length;++re<xe;){var qe=T[re];O(q,qe,F(qe),T)}return q}function Nt(T,O){for(var F=-1,q=T==null?0:T.length;++F<q&&O(T[F],F,T)!==!1;);return T}function _E(T,O){for(var F=T==null?0:T.length;F--&&O(T[F],F,T)!==!1;);return T}function jd(T,O){for(var F=-1,q=T==null?0:T.length;++F<q;)if(!O(T[F],F,T))return!1;return!0}function Ri(T,O){for(var F=-1,q=T==null?0:T.length,re=0,xe=[];++F<q;){var qe=T[F];O(qe,F,T)&&(xe[re++]=qe)}return xe}function rr(T,O){var F=T==null?0:T.length;return!!F&&kn(T,O,0)>-1}function ha(T,O,F){for(var q=-1,re=T==null?0:T.length;++q<re;)if(F(O,T[q]))return!0;return!1}function Oe(T,O){for(var F=-1,q=T==null?0:T.length,re=Array(q);++F<q;)re[F]=O(T[F],F,T);return re}function ki(T,O){for(var F=-1,q=O.length,re=T.length;++F<q;)T[re+F]=O[F];return T}function fa(T,O,F,q){var re=-1,xe=T==null?0:T.length;for(q&&xe&&(F=T[++re]);++re<xe;)F=O(F,T[re],re,T);return F}function RE(T,O,F,q){var re=T==null?0:T.length;for(q&&re&&(F=T[--re]);re--;)F=O(F,T[re],re,T);return F}function ma(T,O){for(var F=-1,q=T==null?0:T.length;++F<q;)if(O(T[F],F,T))return!0;return!1}var kE=pa("length");function SE(T){return T.split("")}function TE(T){return T.match(O0)||[]}function Ud(T,O,F){var q;return F(T,function(re,xe,qe){if(O(re,xe,qe))return q=xe,!1}),q}function or(T,O,F,q){for(var re=T.length,xe=F+(q?1:-1);q?xe--:++xe<re;)if(O(T[xe],xe,T))return xe;return-1}function kn(T,O,F){return O===O?IE(T,O,F):or(T,Kd,F)}function ME(T,O,F,q){for(var re=F-1,xe=T.length;++re<xe;)if(q(T[re],O))return re;return-1}function Kd(T){return T!==T}function qd(T,O){var F=T==null?0:T.length;return F?ba(T,O)/F:fe}function pa(T){return function(O){return O==null?t:O[T]}}function ga(T){return function(O){return T==null?t:T[O]}}function Yd(T,O,F,q,re){return re(T,function(xe,qe,Le){F=q?(q=!1,xe):O(F,xe,qe,Le)}),F}function LE(T,O){var F=T.length;for(T.sort(O);F--;)T[F]=T[F].value;return T}function ba(T,O){for(var F,q=-1,re=T.length;++q<re;){var xe=O(T[q]);xe!==t&&(F=F===t?xe:F+xe)}return F}function va(T,O){for(var F=-1,q=Array(T);++F<T;)q[F]=O(F);return q}function DE(T,O){return Oe(O,function(F){return[F,T[F]]})}function Xd(T){return T&&T.slice(0,eh(T)+1).replace(sa,"")}function kt(T){return function(O){return T(O)}}function wa(T,O){return Oe(O,function(F){return T[F]})}function cs(T,O){return T.has(O)}function Jd(T,O){for(var F=-1,q=T.length;++F<q&&kn(O,T[F],0)>-1;);return F}function Zd(T,O){for(var F=T.length;F--&&kn(O,T[F],0)>-1;);return F}function AE(T,O){for(var F=T.length,q=0;F--;)T[F]===O&&++q;return q}var FE=ga(gE),PE=ga(bE);function VE(T){return"\\"+wE[T]}function OE(T,O){return T==null?t:T[O]}function Sn(T){return hE.test(T)}function NE(T){return fE.test(T)}function zE(T){for(var O,F=[];!(O=T.next()).done;)F.push(O.value);return F}function ya(T){var O=-1,F=Array(T.size);return T.forEach(function(q,re){F[++O]=[re,q]}),F}function Qd(T,O){return function(F){return T(O(F))}}function Si(T,O){for(var F=-1,q=T.length,re=0,xe=[];++F<q;){var qe=T[F];(qe===O||qe===p)&&(T[F]=p,xe[re++]=F)}return xe}function ar(T){var O=-1,F=Array(T.size);return T.forEach(function(q){F[++O]=q}),F}function HE(T){var O=-1,F=Array(T.size);return T.forEach(function(q){F[++O]=[q,q]}),F}function IE(T,O,F){for(var q=F-1,re=T.length;++q<re;)if(T[q]===O)return q;return-1}function BE(T,O,F){for(var q=F+1;q--;)if(T[q]===O)return q;return q}function Tn(T){return Sn(T)?$E(T):kE(T)}function Ut(T){return Sn(T)?GE(T):SE(T)}function eh(T){for(var O=T.length;O--&&A0.test(T.charAt(O)););return O}var WE=ga(vE);function $E(T){for(var O=ua.lastIndex=0;ua.test(T);)++O;return O}function GE(T){return T.match(ua)||[]}function jE(T){return T.match(dE)||[]}var UE=function T(O){O=O==null?Ze:Mn.defaults(Ze.Object(),O,Mn.pick(Ze,mE));var F=O.Array,q=O.Date,re=O.Error,xe=O.Function,qe=O.Math,Le=O.Object,Ca=O.RegExp,KE=O.String,zt=O.TypeError,lr=F.prototype,qE=xe.prototype,Ln=Le.prototype,ur=O["__core-js_shared__"],cr=qE.toString,Te=Ln.hasOwnProperty,YE=0,th=function(){var r=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),dr=Ln.toString,XE=cr.call(Le),JE=Ze._,ZE=Ca("^"+cr.call(Te).replace(na,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hr=zd?O.Buffer:t,Ti=O.Symbol,fr=O.Uint8Array,ih=hr?hr.allocUnsafe:t,mr=Qd(Le.getPrototypeOf,Le),nh=Le.create,sh=Ln.propertyIsEnumerable,pr=lr.splice,rh=Ti?Ti.isConcatSpreadable:t,ds=Ti?Ti.iterator:t,Gi=Ti?Ti.toStringTag:t,gr=function(){try{var r=Yi(Le,"defineProperty");return r({},"",{}),r}catch{}}(),QE=O.clearTimeout!==Ze.clearTimeout&&O.clearTimeout,e1=q&&q.now!==Ze.Date.now&&q.now,t1=O.setTimeout!==Ze.setTimeout&&O.setTimeout,br=qe.ceil,vr=qe.floor,Ea=Le.getOwnPropertySymbols,i1=hr?hr.isBuffer:t,oh=O.isFinite,n1=lr.join,s1=Qd(Le.keys,Le),Ye=qe.max,tt=qe.min,r1=q.now,o1=O.parseInt,ah=qe.random,a1=lr.reverse,xa=Yi(O,"DataView"),hs=Yi(O,"Map"),_a=Yi(O,"Promise"),Dn=Yi(O,"Set"),fs=Yi(O,"WeakMap"),ms=Yi(Le,"create"),wr=fs&&new fs,An={},l1=Xi(xa),u1=Xi(hs),c1=Xi(_a),d1=Xi(Dn),h1=Xi(fs),yr=Ti?Ti.prototype:t,ps=yr?yr.valueOf:t,lh=yr?yr.toString:t;function y(r){if(Be(r)&&!oe(r)&&!(r instanceof ve)){if(r instanceof Ht)return r;if(Te.call(r,"__wrapped__"))return cf(r)}return new Ht(r)}var Fn=function(){function r(){}return function(a){if(!He(a))return{};if(nh)return nh(a);r.prototype=a;var d=new r;return r.prototype=t,d}}();function Cr(){}function Ht(r,a){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:k0,evaluate:S0,interpolate:bd,variable:"",imports:{_:y}},y.prototype=Cr.prototype,y.prototype.constructor=y,Ht.prototype=Fn(Cr.prototype),Ht.prototype.constructor=Ht;function ve(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=we,this.__views__=[]}function f1(){var r=new ve(this.__wrapped__);return r.__actions__=gt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=gt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=gt(this.__views__),r}function m1(){if(this.__filtered__){var r=new ve(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function p1(){var r=this.__wrapped__.value(),a=this.__dir__,d=oe(r),m=a<0,v=d?r.length:0,C=Sx(0,v,this.__views__),R=C.start,S=C.end,L=S-R,N=m?S:R-1,z=this.__iteratees__,W=z.length,U=0,Z=tt(L,this.__takeCount__);if(!d||!m&&v==L&&Z==L)return Ah(r,this.__actions__);var ne=[];e:for(;L--&&U<Z;){N+=a;for(var ue=-1,se=r[N];++ue<W;){var pe=z[ue],Ce=pe.iteratee,Mt=pe.type,ut=Ce(se);if(Mt==le)se=ut;else if(!ut){if(Mt==ee)continue e;break e}}ne[U++]=se}return ne}ve.prototype=Fn(Cr.prototype),ve.prototype.constructor=ve;function ji(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 g1(){this.__data__=ms?ms(null):{},this.size=0}function b1(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function v1(r){var a=this.__data__;if(ms){var d=a[r];return d===h?t:d}return Te.call(a,r)?a[r]:t}function w1(r){var a=this.__data__;return ms?a[r]!==t:Te.call(a,r)}function y1(r,a){var d=this.__data__;return this.size+=this.has(r)?0:1,d[r]=ms&&a===t?h:a,this}ji.prototype.clear=g1,ji.prototype.delete=b1,ji.prototype.get=v1,ji.prototype.has=w1,ji.prototype.set=y1;function ci(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 C1(){this.__data__=[],this.size=0}function E1(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 x1(r){var a=this.__data__,d=Er(a,r);return d<0?t:a[d][1]}function _1(r){return Er(this.__data__,r)>-1}function R1(r,a){var d=this.__data__,m=Er(d,r);return m<0?(++this.size,d.push([r,a])):d[m][1]=a,this}ci.prototype.clear=C1,ci.prototype.delete=E1,ci.prototype.get=x1,ci.prototype.has=_1,ci.prototype.set=R1;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 k1(){this.size=0,this.__data__={hash:new ji,map:new(hs||ci),string:new ji}}function S1(r){var a=Pr(this,r).delete(r);return this.size-=a?1:0,a}function T1(r){return Pr(this,r).get(r)}function M1(r){return Pr(this,r).has(r)}function L1(r,a){var d=Pr(this,r),m=d.size;return d.set(r,a),this.size+=d.size==m?0:1,this}di.prototype.clear=k1,di.prototype.delete=S1,di.prototype.get=T1,di.prototype.has=M1,di.prototype.set=L1;function Ui(r){var a=-1,d=r==null?0:r.length;for(this.__data__=new di;++a<d;)this.add(r[a])}function D1(r){return this.__data__.set(r,h),this}function A1(r){return this.__data__.has(r)}Ui.prototype.add=Ui.prototype.push=D1,Ui.prototype.has=A1;function Kt(r){var a=this.__data__=new ci(r);this.size=a.size}function F1(){this.__data__=new ci,this.size=0}function P1(r){var a=this.__data__,d=a.delete(r);return this.size=a.size,d}function V1(r){return this.__data__.get(r)}function O1(r){return this.__data__.has(r)}function N1(r,a){var d=this.__data__;if(d instanceof ci){var m=d.__data__;if(!hs||m.length<s-1)return m.push([r,a]),this.size=++d.size,this;d=this.__data__=new di(m)}return d.set(r,a),this.size=d.size,this}Kt.prototype.clear=F1,Kt.prototype.delete=P1,Kt.prototype.get=V1,Kt.prototype.has=O1,Kt.prototype.set=N1;function uh(r,a){var d=oe(r),m=!d&&Ji(r),v=!d&&!m&&Fi(r),C=!d&&!m&&!v&&Nn(r),R=d||m||v||C,S=R?va(r.length,KE):[],L=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")||pi(N,L)))&&S.push(N);return S}function ch(r){var a=r.length;return a?r[Va(0,a-1)]:t}function z1(r,a){return Vr(gt(r),Ki(a,0,r.length))}function H1(r){return Vr(gt(r))}function Ra(r,a,d){(d!==t&&!qt(r[a],d)||d===t&&!(a in r))&&hi(r,a,d)}function gs(r,a,d){var m=r[a];(!(Te.call(r,a)&&qt(m,d))||d===t&&!(a in r))&&hi(r,a,d)}function Er(r,a){for(var d=r.length;d--;)if(qt(r[d][0],a))return d;return-1}function I1(r,a,d,m){return Mi(r,function(v,C,R){a(m,v,d(v),R)}),m}function dh(r,a){return r&&ii(a,Xe(a),r)}function B1(r,a){return r&&ii(a,vt(a),r)}function hi(r,a,d){a=="__proto__"&&gr?gr(r,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):r[a]=d}function ka(r,a){for(var d=-1,m=a.length,v=F(m),C=r==null;++d<m;)v[d]=C?t:ol(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 It(r,a,d,m,v,C){var R,S=a&b,L=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=oe(r);if(z){if(R=Mx(r),!S)return gt(r,R)}else{var W=it(r),U=W==Se||W==Vt;if(Fi(r))return Vh(r,S);if(W==Je||W==ze||U&&!v){if(R=L||U?{}:ef(r),!S)return L?vx(r,B1(R,r)):bx(r,dh(R,r))}else{if(!Ae[W])return v?r:{};R=Lx(r,W,S)}}C||(C=new Kt);var Z=C.get(r);if(Z)return Z;C.set(r,R),Lf(r)?r.forEach(function(se){R.add(It(se,a,d,se,r,C))}):Tf(r)&&r.forEach(function(se,pe){R.set(pe,It(se,a,d,pe,r,C))});var ne=N?L?Ua:ja:L?vt:Xe,ue=z?t:ne(r);return Nt(ue||r,function(se,pe){ue&&(pe=se,se=r[pe]),gs(R,pe,It(se,a,d,pe,r,C))}),R}function W1(r){var a=Xe(r);return function(d){return hh(d,r,a)}}function hh(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 fh(r,a,d){if(typeof r!="function")throw new zt(l);return xs(function(){r.apply(t,d)},a)}function bs(r,a,d,m){var v=-1,C=rr,R=!0,S=r.length,L=[],N=a.length;if(!S)return L;d&&(a=Oe(a,kt(d))),m?(C=ha,R=!1):a.length>=s&&(C=cs,R=!1,a=new Ui(a));e:for(;++v<S;){var z=r[v],W=d==null?z:d(z);if(z=m||z!==0?z:0,R&&W===W){for(var U=N;U--;)if(a[U]===W)continue e;L.push(z)}else C(a,W,m)||L.push(z)}return L}var Mi=Ih(ti),mh=Ih(Ta,!0);function $1(r,a){var d=!0;return Mi(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,L=C}return L}function G1(r,a,d,m){var v=r.length;for(d=ae(d),d<0&&(d=-d>v?0:v+d),m=m===t||m>v?v:ae(m),m<0&&(m+=v),m=d>m?0:Af(m);d<m;)r[d++]=a;return r}function ph(r,a){var d=[];return Mi(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=Ax),v||(v=[]);++C<R;){var S=r[C];a>0&&d(S)?a>1?Qe(S,a-1,d,m,v):ki(v,S):m||(v[v.length]=S)}return v}var Sa=Bh(),gh=Bh(!0);function ti(r,a){return r&&Sa(r,a,Xe)}function Ta(r,a){return r&&gh(r,a,Xe)}function _r(r,a){return Ri(a,function(d){return gi(r[d])})}function qi(r,a){a=Di(a,r);for(var d=0,m=a.length;r!=null&&d<m;)r=r[ni(a[d++])];return d&&d==m?r:t}function bh(r,a,d){var m=a(r);return oe(r)?m:ki(m,d(r))}function at(r){return r==null?r===t?xn:Ke:Gi&&Gi in Le(r)?kx(r):Hx(r)}function Ma(r,a){return r>a}function j1(r,a){return r!=null&&Te.call(r,a)}function U1(r,a){return r!=null&&a in Le(r)}function K1(r,a,d){return r>=tt(a,d)&&r<Ye(a,d)}function La(r,a,d){for(var m=d?ha:rr,v=r[0].length,C=r.length,R=C,S=F(C),L=1/0,N=[];R--;){var z=r[R];R&&a&&(z=Oe(z,kt(a))),L=tt(z.length,L),S[R]=!d&&(a||v>=120&&z.length>=120)?new Ui(R&&z):t}z=r[0];var W=-1,U=S[0];e:for(;++W<v&&N.length<L;){var Z=z[W],ne=a?a(Z):Z;if(Z=d||Z!==0?Z:0,!(U?cs(U,ne):m(N,ne,d))){for(R=C;--R;){var ue=S[R];if(!(ue?cs(ue,ne):m(r[R],ne,d)))continue e}U&&U.push(ne),N.push(Z)}}return N}function q1(r,a,d,m){return ti(r,function(v,C,R){a(m,d(v),C,R)}),m}function vs(r,a,d){a=Di(a,r),r=rf(r,a);var m=r==null?r:r[ni(Wt(a))];return m==null?t:Rt(m,r,d)}function vh(r){return Be(r)&&at(r)==ze}function Y1(r){return Be(r)&&at(r)==us}function X1(r){return Be(r)&&at(r)==et}function ws(r,a,d,m,v){return r===a?!0:r==null||a==null||!Be(r)&&!Be(a)?r!==r&&a!==a:J1(r,a,d,m,ws,v)}function J1(r,a,d,m,v,C){var R=oe(r),S=oe(a),L=R?Ee:it(r),N=S?Ee:it(a);L=L==ze?Je:L,N=N==ze?Je:N;var z=L==Je,W=N==Je,U=L==N;if(U&&Fi(r)){if(!Fi(a))return!1;R=!0,z=!1}if(U&&!z)return C||(C=new Kt),R||Nn(r)?Jh(r,a,d,m,v,C):_x(r,a,L,d,m,v,C);if(!(d&E)){var Z=z&&Te.call(r,"__wrapped__"),ne=W&&Te.call(a,"__wrapped__");if(Z||ne){var ue=Z?r.value():r,se=ne?a.value():a;return C||(C=new Kt),v(ue,se,d,m,C)}}return U?(C||(C=new Kt),Rx(r,a,d,m,v,C)):!1}function Z1(r){return Be(r)&&it(r)==be}function Da(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 L=S[0],N=r[L],z=S[1];if(R&&S[2]){if(N===t&&!(L in r))return!1}else{var W=new Kt;if(m)var U=m(N,z,L,r,a,W);if(!(U===t?ws(z,N,E|x,m,W):U))return!1}}return!0}function wh(r){if(!He(r)||Px(r))return!1;var a=gi(r)?ZE:W0;return a.test(Xi(r))}function Q1(r){return Be(r)&&at(r)==Wi}function ex(r){return Be(r)&&it(r)==pt}function tx(r){return Be(r)&&Br(r.length)&&!!Fe[at(r)]}function yh(r){return typeof r=="function"?r:r==null?wt:typeof r=="object"?oe(r)?xh(r[0],r[1]):Eh(r):$f(r)}function Aa(r){if(!Es(r))return s1(r);var a=[];for(var d in Le(r))Te.call(r,d)&&d!="constructor"&&a.push(d);return a}function ix(r){if(!He(r))return zx(r);var a=Es(r),d=[];for(var m in r)m=="constructor"&&(a||!Te.call(r,m))||d.push(m);return d}function Fa(r,a){return r<a}function Ch(r,a){var d=-1,m=bt(r)?F(r.length):[];return Mi(r,function(v,C,R){m[++d]=a(v,C,R)}),m}function Eh(r){var a=qa(r);return a.length==1&&a[0][2]?nf(a[0][0],a[0][1]):function(d){return d===r||Da(d,r,a)}}function xh(r,a){return Xa(r)&&tf(a)?nf(ni(r),a):function(d){var m=ol(d,r);return m===t&&m===a?al(d,r):ws(a,m,E|x)}}function Rr(r,a,d,m,v){r!==a&&Sa(a,function(C,R){if(v||(v=new Kt),He(C))nx(r,a,R,d,Rr,m,v);else{var S=m?m(Za(r,R),C,R+"",r,a,v):t;S===t&&(S=C),Ra(r,R,S)}},vt)}function nx(r,a,d,m,v,C,R){var S=Za(r,d),L=Za(a,d),N=R.get(L);if(N){Ra(r,d,N);return}var z=C?C(S,L,d+"",r,a,R):t,W=z===t;if(W){var U=oe(L),Z=!U&&Fi(L),ne=!U&&!Z&&Nn(L);z=L,U||Z||ne?oe(S)?z=S:Ge(S)?z=gt(S):Z?(W=!1,z=Vh(L,!0)):ne?(W=!1,z=Oh(L,!0)):z=[]:_s(L)||Ji(L)?(z=S,Ji(S)?z=Ff(S):(!He(S)||gi(S))&&(z=ef(L))):W=!1}W&&(R.set(L,z),v(z,L,m,C,R),R.delete(L)),Ra(r,d,z)}function _h(r,a){var d=r.length;if(d)return a+=a<0?d:0,pi(a,d)?r[a]:t}function Rh(r,a,d){a.length?a=Oe(a,function(C){return oe(C)?function(R){return qi(R,C.length===1?C[0]:C)}:C}):a=[wt];var m=-1;a=Oe(a,kt(te()));var v=Ch(r,function(C,R,S){var L=Oe(a,function(N){return N(C)});return{criteria:L,index:++m,value:C}});return LE(v,function(C,R){return gx(C,R,d)})}function sx(r,a){return kh(r,a,function(d,m){return al(r,m)})}function kh(r,a,d){for(var m=-1,v=a.length,C={};++m<v;){var R=a[m],S=qi(r,R);d(S,R)&&ys(C,Di(R,r),S)}return C}function rx(r){return function(a){return qi(a,r)}}function Pa(r,a,d,m){var v=m?ME:kn,C=-1,R=a.length,S=r;for(r===a&&(a=gt(a)),d&&(S=Oe(r,kt(d)));++C<R;)for(var L=0,N=a[C],z=d?d(N):N;(L=v(S,z,L,m))>-1;)S!==r&&pr.call(S,L,1),pr.call(r,L,1);return r}function Sh(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;pi(v)?pr.call(r,v,1):za(r,v)}}return r}function Va(r,a){return r+vr(ah()*(a-r+1))}function ox(r,a,d,m){for(var v=-1,C=Ye(br((a-r)/(d||1)),0),R=F(C);C--;)R[m?C:++v]=r,r+=d;return R}function Oa(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 ce(r,a){return Qa(sf(r,a,wt),r+"")}function ax(r){return ch(zn(r))}function lx(r,a){var d=zn(r);return Vr(d,Ki(a,0,d.length))}function ys(r,a,d,m){if(!He(r))return r;a=Di(a,r);for(var v=-1,C=a.length,R=C-1,S=r;S!=null&&++v<C;){var L=ni(a[v]),N=d;if(L==="__proto__"||L==="constructor"||L==="prototype")return r;if(v!=R){var z=S[L];N=m?m(z,L,S):t,N===t&&(N=He(z)?z:pi(a[v+1])?[]:{})}gs(S,L,N),S=S[L]}return r}var Th=wr?function(r,a){return wr.set(r,a),r}:wt,ux=gr?function(r,a){return gr(r,"toString",{configurable:!0,enumerable:!1,value:ul(a),writable:!0})}:wt;function cx(r){return Vr(zn(r))}function Bt(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=F(v);++m<v;)C[m]=r[m+a];return C}function dx(r,a){var d;return Mi(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 Na(r,a,wt,d)}function Na(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,L=Tt(a),N=a===t;v<C;){var z=vr((v+C)/2),W=d(r[z]),U=W!==t,Z=W===null,ne=W===W,ue=Tt(W);if(R)var se=m||ne;else N?se=ne&&(m||U):S?se=ne&&U&&(m||!Z):L?se=ne&&U&&!Z&&(m||!ue):Z||ue?se=!1:se=m?W<=a:W<a;se?v=z+1:C=z}return tt(C,ye)}function Mh(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,L)){var L=S;C[v++]=R===0?0:R}}return C}function Lh(r){return typeof r=="number"?r:Tt(r)?fe:+r}function St(r){if(typeof r=="string")return r;if(oe(r))return Oe(r,St)+"";if(Tt(r))return lh?lh.call(r):"";var a=r+"";return a=="0"&&1/r==-j?"-0":a}function Li(r,a,d){var m=-1,v=rr,C=r.length,R=!0,S=[],L=S;if(d)R=!1,v=ha;else if(C>=s){var N=a?null:Ex(r);if(N)return ar(N);R=!1,v=cs,L=new Ui}else L=a?[]:S;e:for(;++m<C;){var z=r[m],W=a?a(z):z;if(z=d||z!==0?z:0,R&&W===W){for(var U=L.length;U--;)if(L[U]===W)continue e;a&&L.push(W),S.push(z)}else v(L,W,d)||(L!==S&&L.push(W),S.push(z))}return S}function za(r,a){return a=Di(a,r),r=rf(r,a),r==null||delete r[ni(Wt(a))]}function Dh(r,a,d,m){return ys(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?Bt(r,m?0:C,m?C+1:v):Bt(r,m?C+1:0,m?v:C)}function Ah(r,a){var d=r;return d instanceof ve&&(d=d.value()),fa(a,function(m,v){return v.func.apply(v.thisArg,ki([m],v.args))},d)}function Ha(r,a,d){var m=r.length;if(m<2)return m?Li(r[0]):[];for(var v=-1,C=F(m);++v<m;)for(var R=r[v],S=-1;++S<m;)S!=v&&(C[v]=bs(C[v]||R,r[S],a,d));return Li(Qe(C,1),a,d)}function Fh(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 Ia(r){return Ge(r)?r:[]}function Ba(r){return typeof r=="function"?r:wt}function Di(r,a){return oe(r)?r:Xa(r,a)?[r]:uf(Re(r))}var hx=ce;function Ai(r,a,d){var m=r.length;return d=d===t?m:d,!a&&d>=m?r:Bt(r,a,d)}var Ph=QE||function(r){return Ze.clearTimeout(r)};function Vh(r,a){if(a)return r.slice();var d=r.length,m=ih?ih(d):new r.constructor(d);return r.copy(m),m}function Wa(r){var a=new r.constructor(r.byteLength);return new fr(a).set(new fr(r)),a}function fx(r,a){var d=a?Wa(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.byteLength)}function mx(r){var a=new r.constructor(r.source,vd.exec(r));return a.lastIndex=r.lastIndex,a}function px(r){return ps?Le(ps.call(r)):{}}function Oh(r,a){var d=a?Wa(r.buffer):r.buffer;return new r.constructor(d,r.byteOffset,r.length)}function Nh(r,a){if(r!==a){var d=r!==t,m=r===null,v=r===r,C=Tt(r),R=a!==t,S=a===null,L=a===a,N=Tt(a);if(!S&&!N&&!C&&r>a||C&&R&&L&&!S&&!N||m&&R&&L||!d&&L||!v)return 1;if(!m&&!C&&!N&&r<a||N&&d&&v&&!m&&!C||S&&d&&v||!R&&v||!L)return-1}return 0}function gx(r,a,d){for(var m=-1,v=r.criteria,C=a.criteria,R=v.length,S=d.length;++m<R;){var L=Nh(v[m],C[m]);if(L){if(m>=S)return L;var N=d[m];return L*(N=="desc"?-1:1)}}return r.index-a.index}function zh(r,a,d,m){for(var v=-1,C=r.length,R=d.length,S=-1,L=a.length,N=Ye(C-R,0),z=F(L+N),W=!m;++S<L;)z[S]=a[S];for(;++v<R;)(W||v<C)&&(z[d[v]]=r[v]);for(;N--;)z[S++]=r[v++];return z}function Hh(r,a,d,m){for(var v=-1,C=r.length,R=-1,S=d.length,L=-1,N=a.length,z=Ye(C-S,0),W=F(z+N),U=!m;++v<z;)W[v]=r[v];for(var Z=v;++L<N;)W[Z+L]=a[L];for(;++R<S;)(U||v<C)&&(W[Z+d[R]]=r[v++]);return W}function gt(r,a){var d=-1,m=r.length;for(a||(a=F(m));++d<m;)a[d]=r[d];return a}function ii(r,a,d,m){var v=!d;d||(d={});for(var C=-1,R=a.length;++C<R;){var S=a[C],L=m?m(d[S],r[S],S,d,r):t;L===t&&(L=r[S]),v?hi(d,S,L):gs(d,S,L)}return d}function bx(r,a){return ii(r,Ya(r),a)}function vx(r,a){return ii(r,Zh(r),a)}function Tr(r,a){return function(d,m){var v=oe(d)?xE:I1,C=a?a():{};return v(d,r,te(m,2),C)}}function Pn(r){return ce(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&&lt(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 Ih(r,a){return function(d,m){if(d==null)return d;if(!bt(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 Bh(r){return function(a,d,m){for(var v=-1,C=Le(a),R=m(a),S=R.length;S--;){var L=R[r?S:++v];if(d(C[L],L,C)===!1)break}return a}}function wx(r,a,d){var m=a&_,v=Cs(r);function C(){var R=this&&this!==Ze&&this instanceof C?v:r;return R.apply(m?d:this,arguments)}return C}function Wh(r){return function(a){a=Re(a);var d=Sn(a)?Ut(a):t,m=d?d[0]:a.charAt(0),v=d?Ai(d,1).join(""):a.slice(1);return m[r]()+v}}function Vn(r){return function(a){return fa(Bf(If(a).replace(uE,"")),r,"")}}function Cs(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 yx(r,a,d){var m=Cs(r);function v(){for(var C=arguments.length,R=F(C),S=C,L=On(v);S--;)R[S]=arguments[S];var N=C<3&&R[0]!==L&&R[C-1]!==L?[]:Si(R,L);if(C-=N.length,C<d)return Kh(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 $h(r){return function(a,d,m){var v=Le(a);if(!bt(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 Gh(r){return mi(function(a){var d=a.length,m=d,v=Ht.prototype.thru;for(r&&a.reverse();m--;){var C=a[m];if(typeof C!="function")throw new zt(l);if(v&&!R&&Fr(C)=="wrapper")var R=new Ht([],!0)}for(m=R?m:d;++m<d;){C=a[m];var S=Fr(C),L=S=="wrapper"?Ka(C):t;L&&Ja(L[0])&&L[1]==(B|M|A|D)&&!L[4].length&&L[9]==1?R=R[Fr(L[0])].apply(R,L[3]):R=C.length==1&&Ja(C)?R[S]():R.thru(C)}return function(){var N=arguments,z=N[0];if(R&&N.length==1&&oe(z))return R.plant(z).value();for(var W=0,U=d?a[W].apply(this,N):z;++W<d;)U=a[W].call(this,U);return U}})}function Mr(r,a,d,m,v,C,R,S,L,N){var z=a&B,W=a&_,U=a&k,Z=a&(M|P),ne=a&I,ue=U?t:Cs(r);function se(){for(var pe=arguments.length,Ce=F(pe),Mt=pe;Mt--;)Ce[Mt]=arguments[Mt];if(Z)var ut=On(se),Lt=AE(Ce,ut);if(m&&(Ce=zh(Ce,m,v,Z)),C&&(Ce=Hh(Ce,C,R,Z)),pe-=Lt,Z&&pe<N){var je=Si(Ce,ut);return Kh(r,a,Mr,se.placeholder,d,Ce,je,S,L,N-pe)}var Yt=W?d:this,vi=U?Yt[r]:r;return pe=Ce.length,S?Ce=Ix(Ce,S):ne&&pe>1&&Ce.reverse(),z&&L<pe&&(Ce.length=L),this&&this!==Ze&&this instanceof se&&(vi=ue||Cs(vi)),vi.apply(Yt,Ce)}return se}function jh(r,a){return function(d,m){return q1(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=Lh(d),m=Lh(m)),v=r(d,m)}return v}}function $a(r){return mi(function(a){return a=Oe(a,kt(te())),ce(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?Oa(a,r):a;var m=Oa(a,br(r/Tn(a)));return Sn(a)?Ai(Ut(m),0,r).join(""):m.slice(0,r)}function Cx(r,a,d,m){var v=a&_,C=Cs(r);function R(){for(var S=-1,L=arguments.length,N=-1,z=m.length,W=F(z+L),U=this&&this!==Ze&&this instanceof R?C:r;++N<z;)W[N]=m[N];for(;L--;)W[N++]=arguments[++S];return Rt(U,v?d:this,W)}return R}function Uh(r){return function(a,d,m){return m&&typeof m!="number"&&lt(a,d,m)&&(d=m=t),a=bi(a),d===t?(d=a,a=0):d=bi(d),m=m===t?a<d?1:-1:bi(m),ox(a,d,m,r)}}function Ar(r){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=$t(a),d=$t(d)),r(a,d)}}function Kh(r,a,d,m,v,C,R,S,L,N){var z=a&M,W=z?R:t,U=z?t:R,Z=z?C:t,ne=z?t:C;a|=z?A:H,a&=~(z?H:A),a&V||(a&=~(_|k));var ue=[r,a,v,Z,W,ne,U,S,L,N],se=d.apply(t,ue);return Ja(r)&&of(se,ue),se.placeholder=m,af(se,r,a)}function Ga(r){var a=qe[r];return function(d,m){if(d=$t(d),m=m==null?0:tt(ae(m),292),m&&oh(d)){var v=(Re(d)+"e").split("e"),C=a(v[0]+"e"+(+v[1]+m));return v=(Re(C)+"e").split("e"),+(v[0]+"e"+(+v[1]-m))}return a(d)}}var Ex=Dn&&1/ar(new Dn([,-0]))[1]==j?function(r){return new Dn(r)}:hl;function qh(r){return function(a){var d=it(a);return d==be?ya(a):d==pt?HE(a):DE(a,r(a))}}function fi(r,a,d,m,v,C,R,S){var L=a&k;if(!L&&typeof r!="function")throw new zt(l);var N=m?m.length:0;if(N||(a&=~(A|H),m=v=t),R=R===t?R:Ye(ae(R),0),S=S===t?S:ae(S),N-=v?v.length:0,a&H){var z=m,W=v;m=v=t}var U=L?t:Ka(r),Z=[r,a,d,m,v,z,W,C,R,S];if(U&&Nx(Z,U),r=Z[0],a=Z[1],d=Z[2],m=Z[3],v=Z[4],S=Z[9]=Z[9]===t?L?0:r.length:Ye(Z[9]-N,0),!S&&a&(M|P)&&(a&=~(M|P)),!a||a==_)var ne=wx(r,a,d);else a==M||a==P?ne=yx(r,a,S):(a==A||a==(_|A))&&!v.length?ne=Cx(r,a,d,m):ne=Mr.apply(t,Z);var ue=U?Th:of;return af(ue(ne,Z),r,a)}function Yh(r,a,d,m){return r===t||qt(r,Ln[d])&&!Te.call(m,d)?a:r}function Xh(r,a,d,m,v,C){return He(r)&&He(a)&&(C.set(a,r),Rr(r,a,t,Xh,C),C.delete(a)),r}function xx(r){return _s(r)?t:r}function Jh(r,a,d,m,v,C){var R=d&E,S=r.length,L=a.length;if(S!=L&&!(R&&L>S))return!1;var N=C.get(r),z=C.get(a);if(N&&z)return N==a&&z==r;var W=-1,U=!0,Z=d&x?new Ui:t;for(C.set(r,a),C.set(a,r);++W<S;){var ne=r[W],ue=a[W];if(m)var se=R?m(ue,ne,W,a,r,C):m(ne,ue,W,r,a,C);if(se!==t){if(se)continue;U=!1;break}if(Z){if(!ma(a,function(pe,Ce){if(!cs(Z,Ce)&&(ne===pe||v(ne,pe,d,m,C)))return Z.push(Ce)})){U=!1;break}}else if(!(ne===ue||v(ne,ue,d,m,C))){U=!1;break}}return C.delete(r),C.delete(a),U}function _x(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 us:return!(r.byteLength!=a.byteLength||!C(new fr(r),new fr(a)));case _t:case et:case Ue:return qt(+r,+a);case me:return r.name==a.name&&r.message==a.message;case Wi:case _i:return r==a+"";case be:var S=ya;case pt:var L=m&E;if(S||(S=ar),r.size!=a.size&&!L)return!1;var N=R.get(r);if(N)return N==a;m|=x,R.set(r,a);var z=Jh(S(r),S(a),m,v,C,R);return R.delete(r),z;case ui:if(ps)return ps.call(r)==ps.call(a)}return!1}function Rx(r,a,d,m,v,C){var R=d&E,S=ja(r),L=S.length,N=ja(a),z=N.length;if(L!=z&&!R)return!1;for(var W=L;W--;){var U=S[W];if(!(R?U in a:Te.call(a,U)))return!1}var Z=C.get(r),ne=C.get(a);if(Z&&ne)return Z==a&&ne==r;var ue=!0;C.set(r,a),C.set(a,r);for(var se=R;++W<L;){U=S[W];var pe=r[U],Ce=a[U];if(m)var Mt=R?m(Ce,pe,U,a,r,C):m(pe,Ce,U,r,a,C);if(!(Mt===t?pe===Ce||v(pe,Ce,d,m,C):Mt)){ue=!1;break}se||(se=U=="constructor")}if(ue&&!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)&&(ue=!1)}return C.delete(r),C.delete(a),ue}function mi(r){return Qa(sf(r,t,ff),r+"")}function ja(r){return bh(r,Xe,Ya)}function Ua(r){return bh(r,vt,Zh)}var Ka=wr?function(r){return wr.get(r)}:hl;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||cl;return r=r===cl?yh:r,arguments.length?r(arguments[0],arguments[1]):r}function Pr(r,a){var d=r.__data__;return Fx(a)?d[typeof a=="string"?"string":"hash"]:d.map}function qa(r){for(var a=Xe(r),d=a.length;d--;){var m=a[d],v=r[m];a[d]=[m,v,tf(v)]}return a}function Yi(r,a){var d=OE(r,a);return wh(d)?d:t}function kx(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 Ya=Ea?function(r){return r==null?[]:(r=Le(r),Ri(Ea(r),function(a){return sh.call(r,a)}))}:fl,Zh=Ea?function(r){for(var a=[];r;)ki(a,Ya(r)),r=mr(r);return a}:fl,it=at;(xa&&it(new xa(new ArrayBuffer(1)))!=_n||hs&&it(new hs)!=be||_a&&it(_a.resolve())!=ot||Dn&&it(new Dn)!=pt||fs&&it(new fs)!=ls)&&(it=function(r){var a=at(r),d=a==Je?r.constructor:t,m=d?Xi(d):"";if(m)switch(m){case l1:return _n;case u1:return be;case c1:return ot;case d1:return pt;case h1:return ls}return a});function Sx(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 Tx(r){var a=r.match(P0);return a?a[1].split(V0):[]}function Qh(r,a,d){a=Di(a,r);for(var m=-1,v=a.length,C=!1;++m<v;){var R=ni(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)&&pi(R,v)&&(oe(r)||Ji(r)))}function Mx(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 ef(r){return typeof r.constructor=="function"&&!Es(r)?Fn(mr(r)):{}}function Lx(r,a,d){var m=r.constructor;switch(a){case us:return Wa(r);case _t:case et:return new m(+r);case _n:return fx(r,d);case qo:case Yo:case Xo:case Jo:case Zo:case Qo:case ea:case ta:case ia:return Oh(r,d);case be:return new m;case Ue:case _i:return new m(r);case Wi:return mx(r);case pt:return new m;case ui:return px(r)}}function Dx(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(F0,`{
9
9
  /* [wrapped with `+a+`] */
10
- `)}function Dx(r){return oe(r)||Ji(r)||!!(rh&&r&&r[rh])}function pi(r,a){var d=typeof r;return a=a??$,!!a&&(d=="number"||d!="symbol"&&$0.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"?bt(d)&&pi(a,d.length):m=="string"&&a in d)?qt(d[a],r):!1}function Xa(r,a){if(oe(r))return!1;var d=typeof r;return d=="number"||d=="symbol"||d=="boolean"||r==null||Tt(r)?!0:T0.test(r)||!S0.test(r)||a!=null&&r in Le(a)}function Ax(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Ja(r){var a=Pr(r),d=y[a];if(typeof d!="function"||!(a in ve.prototype))return!1;if(r===d)return!0;var m=Ka(d);return!!m&&r===m[0]}function Px(r){return!!th&&th in r}var Fx=ur?gi:ml;function Es(r){var a=r&&r.constructor,d=typeof a=="function"&&a.prototype||Ln;return r===d}function tf(r){return r===r&&!He(r)}function nf(r,a){return function(d){return d==null?!1:d[r]===a&&(a!==t||r in Le(d))}}function Vx(r){var a=Hr(r,function(m){return d.size===f&&d.clear(),m}),d=a.cache;return a}function Ox(r,a){var d=r[1],m=a[1],v=d|m,C=v<(_|k|B),R=m==B&&d==M||m==B&&d==D&&r[7].length<=a[8]||m==(B|D)&&a[7].length<=a[8]&&d==M;if(!(C||R))return r;m&_&&(r[2]=a[2],v|=d&_?0:V);var S=a[3];if(S){var L=r[3];r[3]=L?zh(L,S,a[4]):S,r[4]=L?Si(r[3],p):a[4]}return S=a[5],S&&(L=r[5],r[5]=L?Hh(L,S,a[6]):S,r[6]=L?Si(r[5],p):a[6]),S=a[7],S&&(r[7]=S),m&B&&(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 Nx(r){var a=[];if(r!=null)for(var d in Le(r))a.push(d);return a}function zx(r){return dr.call(r)}function sf(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=P(C);++v<C;)R[v]=m[a+v];v=-1;for(var S=P(a+1);++v<a;)S[v]=m[v];return S[a]=d(R),Rt(r,this,S)}}function rf(r,a){return a.length<2?r:qi(r,Bt(a,0,-1))}function Hx(r,a){for(var d=r.length,m=tt(a.length,d),v=gt(r);m--;){var C=a[m];r[m]=pi(C,d)?v[C]:t}return r}function Za(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var of=lf(Th),xs=e1||function(r,a){return Ze.setTimeout(r,a)},Qa=lf(lx);function af(r,a,d){var m=a+"";return Qa(r,Lx(m,Ix(Sx(m),d)))}function lf(r){var a=0,d=0;return function(){var m=s1(),v=J-(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=Va(d,v),R=r[C];r[C]=r[d],r[d]=R}return r.length=a,r}var uf=Vx(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(M0,function(d,m,v,C){a.push(v?C.replace(N0,"$1"):m||d)}),a});function ni(r){if(typeof r=="string"||Tt(r))return r;var a=r+"";return a=="0"&&1/r==-j?"-0":a}function Xi(r){if(r!=null){try{return cr.call(r)}catch{}try{return r+""}catch{}}return""}function Ix(r,a){return Nt(De,function(d){var m="_."+d[0];a&d[1]&&!rr(r,m)&&r.push(m)}),r.sort()}function cf(r){if(r instanceof ve)return r.clone();var a=new Ht(r.__wrapped__,r.__chain__);return a.__actions__=gt(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function Bx(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=Ye(ae(a),0);var m=r==null?0:r.length;if(!m||a<1)return[];for(var v=0,C=0,R=P(br(m/a));v<m;)R[C++]=Bt(r,v,v+=a);return R}function Wx(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 $x(){var r=arguments.length;if(!r)return[];for(var a=P(r-1),d=arguments[0],m=r;m--;)a[m-1]=arguments[m];return ki(oe(d)?gt(d):[d],Qe(a,1))}var Gx=ce(function(r,a){return Ge(r)?bs(r,Qe(a,1,Ge,!0)):[]}),jx=ce(function(r,a){var d=Wt(a);return Ge(d)&&(d=t),Ge(r)?bs(r,Qe(a,1,Ge,!0),te(d,2)):[]}),Ux=ce(function(r,a){var d=Wt(a);return Ge(d)&&(d=t),Ge(r)?bs(r,Qe(a,1,Ge,!0),t,d):[]});function Kx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),Bt(r,a<0?0:a,m)):[]}function qx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),a=m-a,Bt(r,0,a<0?0:a)):[]}function Yx(r,a){return r&&r.length?Sr(r,te(a,3),!0,!0):[]}function Xx(r,a){return r&&r.length?Sr(r,te(a,3),!0):[]}function Jx(r,a,d,m){var v=r==null?0:r.length;return v?(d&&typeof d!="number"&&lt(r,a,d)&&(d=0,m=v),$1(r,a,d,m)):[]}function df(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:ae(d);return v<0&&(v=Ye(m+v,0)),or(r,te(a,3),v)}function hf(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m-1;return d!==t&&(v=ae(d),v=d<0?Ye(m+v,0):tt(v,m-1)),or(r,te(a,3),v,!0)}function ff(r){var a=r==null?0:r.length;return a?Qe(r,1):[]}function Zx(r){var a=r==null?0:r.length;return a?Qe(r,j):[]}function Qx(r,a){var d=r==null?0:r.length;return d?(a=a===t?1:ae(a),Qe(r,a)):[]}function e_(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 mf(r){return r&&r.length?r[0]:t}function t_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:ae(d);return v<0&&(v=Ye(m+v,0)),kn(r,a,v)}function i_(r){var a=r==null?0:r.length;return a?Bt(r,0,-1):[]}var n_=ce(function(r){var a=Oe(r,Ia);return a.length&&a[0]===r[0]?La(a):[]}),s_=ce(function(r){var a=Wt(r),d=Oe(r,Ia);return a===Wt(d)?a=t:d.pop(),d.length&&d[0]===r[0]?La(d,te(a,2)):[]}),r_=ce(function(r){var a=Wt(r),d=Oe(r,Ia);return a=typeof a=="function"?a:t,a&&d.pop(),d.length&&d[0]===r[0]?La(d,t,a):[]});function o_(r,a){return r==null?"":i1.call(r,a)}function Wt(r){var a=r==null?0:r.length;return a?r[a-1]:t}function a_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m;return d!==t&&(v=ae(d),v=v<0?Ye(m+v,0):tt(v,m-1)),a===a?IE(r,a,v):or(r,Kd,v,!0)}function l_(r,a){return r&&r.length?_h(r,ae(a)):t}var u_=ce(pf);function pf(r,a){return r&&r.length&&a&&a.length?Fa(r,a):r}function c_(r,a,d){return r&&r.length&&a&&a.length?Fa(r,a,te(d,2)):r}function d_(r,a,d){return r&&r.length&&a&&a.length?Fa(r,a,t,d):r}var h_=mi(function(r,a){var d=r==null?0:r.length,m=ka(r,a);return Sh(r,Oe(a,function(v){return pi(v,d)?+v:v}).sort(Nh)),m});function f_(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 Sh(r,v),d}function el(r){return r==null?r:o1.call(r)}function m_(r,a,d){var m=r==null?0:r.length;return m?(d&&typeof d!="number"&&lt(r,a,d)?(a=0,d=m):(a=a==null?0:ae(a),d=d===t?m:ae(d)),Bt(r,a,d)):[]}function p_(r,a){return kr(r,a)}function g_(r,a,d){return Na(r,a,te(d,2))}function b_(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 v_(r,a){return kr(r,a,!0)}function w_(r,a,d){return Na(r,a,te(d,2),!0)}function y_(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 C_(r){return r&&r.length?Mh(r):[]}function E_(r,a){return r&&r.length?Mh(r,te(a,2)):[]}function x_(r){var a=r==null?0:r.length;return a?Bt(r,1,a):[]}function __(r,a,d){return r&&r.length?(a=d||a===t?1:ae(a),Bt(r,0,a<0?0:a)):[]}function R_(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),a=m-a,Bt(r,a<0?0:a,m)):[]}function k_(r,a){return r&&r.length?Sr(r,te(a,3),!1,!0):[]}function S_(r,a){return r&&r.length?Sr(r,te(a,3)):[]}var T_=ce(function(r){return Li(Qe(r,1,Ge,!0))}),M_=ce(function(r){var a=Wt(r);return Ge(a)&&(a=t),Li(Qe(r,1,Ge,!0),te(a,2))}),L_=ce(function(r){var a=Wt(r);return a=typeof a=="function"?a:t,Li(Qe(r,1,Ge,!0),t,a)});function D_(r){return r&&r.length?Li(r):[]}function A_(r,a){return r&&r.length?Li(r,te(a,2)):[]}function P_(r,a){return a=typeof a=="function"?a:t,r&&r.length?Li(r,t,a):[]}function tl(r){if(!(r&&r.length))return[];var a=0;return r=Ri(r,function(d){if(Ge(d))return a=Ye(d.length,a),!0}),va(a,function(d){return Oe(r,pa(d))})}function gf(r,a){if(!(r&&r.length))return[];var d=tl(r);return a==null?d:Oe(d,function(m){return Rt(a,t,m)})}var F_=ce(function(r,a){return Ge(r)?bs(r,a):[]}),V_=ce(function(r){return Ha(Ri(r,Ge))}),O_=ce(function(r){var a=Wt(r);return Ge(a)&&(a=t),Ha(Ri(r,Ge),te(a,2))}),N_=ce(function(r){var a=Wt(r);return a=typeof a=="function"?a:t,Ha(Ri(r,Ge),t,a)}),z_=ce(tl);function H_(r,a){return Ph(r||[],a||[],gs)}function I_(r,a){return Ph(r||[],a||[],ys)}var B_=ce(function(r){var a=r.length,d=a>1?r[a-1]:t;return d=typeof d=="function"?(r.pop(),d):t,gf(r,d)});function bf(r){var a=y(r);return a.__chain__=!0,a}function W_(r,a){return a(r),r}function Or(r,a){return a(r)}var $_=mi(function(r){var a=r.length,d=a?r[0]:0,m=this.__wrapped__,v=function(C){return ka(C,r)};return a>1||this.__actions__.length||!(m instanceof ve)||!pi(d)?this.thru(v):(m=m.slice(d,+d+(a?1:0)),m.__actions__.push({func:Or,args:[v],thisArg:t}),new Ht(m,this.__chain__).thru(function(C){return a&&!C.length&&C.push(t),C}))});function G_(){return bf(this)}function j_(){return new Ht(this.value(),this.__chain__)}function U_(){this.__values__===t&&(this.__values__=Df(this.value()));var r=this.__index__>=this.__values__.length,a=r?t:this.__values__[this.__index__++];return{done:r,value:a}}function K_(){return this}function q_(r){for(var a,d=this;d instanceof Cr;){var m=cf(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 Y_(){var r=this.__wrapped__;if(r instanceof ve){var a=r;return this.__actions__.length&&(a=new ve(this)),a=a.reverse(),a.__actions__.push({func:Or,args:[el],thisArg:t}),new Ht(a,this.__chain__)}return this.thru(el)}function X_(){return Ah(this.__wrapped__,this.__actions__)}var J_=Tr(function(r,a,d){Te.call(r,d)?++r[d]:hi(r,d,1)});function Z_(r,a,d){var m=oe(r)?jd:W1;return d&&lt(r,a,d)&&(a=t),m(r,te(a,3))}function Q_(r,a){var d=oe(r)?Ri:ph;return d(r,te(a,3))}var eR=$h(df),tR=$h(hf);function iR(r,a){return Qe(Nr(r,a),1)}function nR(r,a){return Qe(Nr(r,a),j)}function sR(r,a,d){return d=d===t?1:ae(d),Qe(Nr(r,a),d)}function vf(r,a){var d=oe(r)?Nt:Mi;return d(r,te(a,3))}function wf(r,a){var d=oe(r)?xE:mh;return d(r,te(a,3))}var rR=Tr(function(r,a,d){Te.call(r,d)?r[d].push(a):hi(r,d,[a])});function oR(r,a,d,m){r=bt(r)?r:zn(r),d=d&&!m?ae(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 aR=ce(function(r,a,d){var m=-1,v=typeof a=="function",C=bt(r)?P(r.length):[];return Mi(r,function(R){C[++m]=v?Rt(a,R,d):vs(R,a,d)}),C}),lR=Tr(function(r,a,d){hi(r,d,a)});function Nr(r,a){var d=oe(r)?Oe:Ch;return d(r,te(a,3))}function uR(r,a,d,m){return r==null?[]:(oe(a)||(a=a==null?[]:[a]),d=m?t:d,oe(d)||(d=d==null?[]:[d]),Rh(r,a,d))}var cR=Tr(function(r,a,d){r[d?0:1].push(a)},function(){return[[],[]]});function dR(r,a,d){var m=oe(r)?fa:Yd,v=arguments.length<3;return m(r,te(a,4),d,v,Mi)}function hR(r,a,d){var m=oe(r)?_E:Yd,v=arguments.length<3;return m(r,te(a,4),d,v,mh)}function fR(r,a){var d=oe(r)?Ri:ph;return d(r,Ir(te(a,3)))}function mR(r){var a=oe(r)?ch:ox;return a(r)}function pR(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=ae(a);var m=oe(r)?N1:ax;return m(r,a)}function gR(r){var a=oe(r)?z1:ux;return a(r)}function bR(r){if(r==null)return 0;if(bt(r))return Wr(r)?Tn(r):r.length;var a=it(r);return a==be||a==pt?r.size:Aa(r).length}function vR(r,a,d){var m=oe(r)?ma:cx;return d&&lt(r,a,d)&&(a=t),m(r,te(a,3))}var wR=ce(function(r,a){if(r==null)return[];var d=a.length;return d>1&&lt(r,a[0],a[1])?a=[]:d>2&&lt(a[0],a[1],a[2])&&(a=[a[0]]),Rh(r,Qe(a,1),[])}),zr=QE||function(){return Ze.Date.now()};function yR(r,a){if(typeof a!="function")throw new zt(l);return r=ae(r),function(){if(--r<1)return a.apply(this,arguments)}}function yf(r,a,d){return a=d?t:a,a=r&&a==null?r.length:a,fi(r,B,t,t,t,t,a)}function Cf(r,a){var d;if(typeof a!="function")throw new zt(l);return r=ae(r),function(){return--r>0&&(d=a.apply(this,arguments)),r<=1&&(a=t),d}}var il=ce(function(r,a,d){var m=_;if(d.length){var v=Si(d,On(il));m|=A}return fi(r,m,a,d,v)}),Ef=ce(function(r,a,d){var m=_|k;if(d.length){var v=Si(d,On(Ef));m|=A}return fi(a,m,r,d,v)});function xf(r,a,d){a=d?t:a;var m=fi(r,M,t,t,t,t,t,a);return m.placeholder=xf.placeholder,m}function _f(r,a,d){a=d?t:a;var m=fi(r,F,t,t,t,t,t,a);return m.placeholder=_f.placeholder,m}function Rf(r,a,d){var m,v,C,R,S,L,N=0,z=!1,W=!1,U=!0;if(typeof r!="function")throw new zt(l);a=$t(a)||0,He(d)&&(z=!!d.leading,W="maxWait"in d,C=W?Ye($t(d.maxWait)||0,a):C,U="trailing"in d?!!d.trailing:U);function Z(je){var Yt=m,vi=v;return m=v=t,N=je,R=r.apply(vi,Yt),R}function ne(je){return N=je,S=xs(pe,a),z?Z(je):R}function ue(je){var Yt=je-L,vi=je-N,Gf=a-Yt;return W?tt(Gf,C-vi):Gf}function se(je){var Yt=je-L,vi=je-N;return L===t||Yt>=a||Yt<0||W&&vi>=C}function pe(){var je=zr();if(se(je))return Ce(je);S=xs(pe,ue(je))}function Ce(je){return S=t,U&&m?Z(je):(m=v=t,R)}function Mt(){S!==t&&Fh(S),N=0,m=L=v=S=t}function ut(){return S===t?R:Ce(zr())}function Lt(){var je=zr(),Yt=se(je);if(m=arguments,v=this,L=je,Yt){if(S===t)return ne(L);if(W)return Fh(S),S=xs(pe,a),Z(L)}return S===t&&(S=xs(pe,a)),R}return Lt.cancel=Mt,Lt.flush=ut,Lt}var CR=ce(function(r,a){return fh(r,1,a)}),ER=ce(function(r,a,d){return fh(r,$t(a)||0,d)});function xR(r){return fi(r,I)}function Hr(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new zt(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||di),d}Hr.Cache=di;function Ir(r){if(typeof r!="function")throw new zt(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 _R(r){return Cf(2,r)}var RR=dx(function(r,a){a=a.length==1&&oe(a[0])?Oe(a[0],kt(te())):Oe(Qe(a,1),kt(te()));var d=a.length;return ce(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)})}),nl=ce(function(r,a){var d=Si(a,On(nl));return fi(r,A,t,a,d)}),kf=ce(function(r,a){var d=Si(a,On(kf));return fi(r,H,t,a,d)}),kR=mi(function(r,a){return fi(r,D,t,t,t,a)});function SR(r,a){if(typeof r!="function")throw new zt(l);return a=a===t?a:ae(a),ce(r,a)}function TR(r,a){if(typeof r!="function")throw new zt(l);return a=a==null?0:Ye(ae(a),0),ce(function(d){var m=d[a],v=Ai(d,0,a);return m&&ki(v,m),Rt(r,this,v)})}function MR(r,a,d){var m=!0,v=!0;if(typeof r!="function")throw new zt(l);return He(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),Rf(r,a,{leading:m,maxWait:a,trailing:v})}function LR(r){return yf(r,1)}function DR(r,a){return nl(Ba(a),r)}function AR(){if(!arguments.length)return[];var r=arguments[0];return oe(r)?r:[r]}function PR(r){return It(r,w)}function FR(r,a){return a=typeof a=="function"?a:t,It(r,w,a)}function VR(r){return It(r,b|w)}function OR(r,a){return a=typeof a=="function"?a:t,It(r,b|w,a)}function NR(r,a){return a==null||hh(r,a,Xe(a))}function qt(r,a){return r===a||r!==r&&a!==a}var zR=Ar(Ma),HR=Ar(function(r,a){return r>=a}),Ji=vh(function(){return arguments}())?vh:function(r){return Be(r)&&Te.call(r,"callee")&&!sh.call(r,"callee")},oe=P.isArray,IR=Hd?kt(Hd):q1;function bt(r){return r!=null&&Br(r.length)&&!gi(r)}function Ge(r){return Be(r)&&bt(r)}function BR(r){return r===!0||r===!1||Be(r)&&at(r)==_t}var Pi=t1||ml,WR=Id?kt(Id):Y1;function $R(r){return Be(r)&&r.nodeType===1&&!_s(r)}function GR(r){if(r==null)return!0;if(bt(r)&&(oe(r)||typeof r=="string"||typeof r.splice=="function"||Pi(r)||Nn(r)||Ji(r)))return!r.length;var a=it(r);if(a==be||a==pt)return!r.size;if(Es(r))return!Aa(r).length;for(var d in r)if(Te.call(r,d))return!1;return!0}function jR(r,a){return ws(r,a)}function UR(r,a,d){d=typeof d=="function"?d:t;var m=d?d(r,a):t;return m===t?ws(r,a,t,d):!!m}function sl(r){if(!Be(r))return!1;var a=at(r);return a==me||a==K||typeof r.message=="string"&&typeof r.name=="string"&&!_s(r)}function KR(r){return typeof r=="number"&&oh(r)}function gi(r){if(!He(r))return!1;var a=at(r);return a==Se||a==Vt||a==rt||a==mt}function Sf(r){return typeof r=="number"&&r==ae(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 Tf=Bd?kt(Bd):J1;function qR(r,a){return r===a||Da(r,a,qa(a))}function YR(r,a,d){return d=typeof d=="function"?d:t,Da(r,a,qa(a),d)}function XR(r){return Mf(r)&&r!=+r}function JR(r){if(Fx(r))throw new re(o);return wh(r)}function ZR(r){return r===null}function QR(r){return r==null}function Mf(r){return typeof r=="number"||Be(r)&&at(r)==Ue}function _s(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)==YE}var rl=Wd?kt(Wd):Z1;function ek(r){return Sf(r)&&r>=-$&&r<=$}var Lf=$d?kt($d):Q1;function Wr(r){return typeof r=="string"||!oe(r)&&Be(r)&&at(r)==_i}function Tt(r){return typeof r=="symbol"||Be(r)&&at(r)==ui}var Nn=Gd?kt(Gd):ex;function tk(r){return r===t}function ik(r){return Be(r)&&it(r)==ls}function nk(r){return Be(r)&&at(r)==w0}var sk=Ar(Pa),rk=Ar(function(r,a){return r<=a});function Df(r){if(!r)return[];if(bt(r))return Wr(r)?Ut(r):gt(r);if(ds&&r[ds])return NE(r[ds]());var a=it(r),d=a==be?ya:a==pt?ar:zn;return d(r)}function bi(r){if(!r)return r===0?r:0;if(r=$t(r),r===j||r===-j){var a=r<0?-1:1;return a*Q}return r===r?r:0}function ae(r){var a=bi(r),d=a%1;return a===a?d?a-d:a:0}function Af(r){return r?Ki(ae(r),0,we):0}function $t(r){if(typeof r=="number")return r;if(Tt(r))return fe;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=Xd(r);var d=I0.test(r);return d||W0.test(r)?yE(r.slice(2),d?2:8):H0.test(r)?fe:+r}function Pf(r){return ii(r,vt(r))}function ok(r){return r?Ki(ae(r),-$,$):r===0?r:0}function Re(r){return r==null?"":St(r)}var ak=Fn(function(r,a){if(Es(a)||bt(a)){ii(a,Xe(a),r);return}for(var d in a)Te.call(a,d)&&gs(r,d,a[d])}),Ff=Fn(function(r,a){ii(a,vt(a),r)}),$r=Fn(function(r,a,d,m){ii(a,vt(a),r,m)}),lk=Fn(function(r,a,d,m){ii(a,Xe(a),r,m)}),uk=mi(ka);function ck(r,a){var d=Pn(r);return a==null?d:dh(d,a)}var dk=ce(function(r,a){r=Le(r);var d=-1,m=a.length,v=m>2?a[2]:t;for(v&&lt(a[0],a[1],v)&&(m=1);++d<m;)for(var C=a[d],R=vt(C),S=-1,L=R.length;++S<L;){var N=R[S],z=r[N];(z===t||qt(z,Ln[N])&&!Te.call(r,N))&&(r[N]=C[N])}return r}),hk=ce(function(r){return r.push(t,Xh),Rt(Vf,t,r)});function fk(r,a){return Ud(r,te(a,3),ti)}function mk(r,a){return Ud(r,te(a,3),Ta)}function pk(r,a){return r==null?r:Sa(r,te(a,3),vt)}function gk(r,a){return r==null?r:gh(r,te(a,3),vt)}function bk(r,a){return r&&ti(r,te(a,3))}function vk(r,a){return r&&Ta(r,te(a,3))}function wk(r){return r==null?[]:_r(r,Xe(r))}function yk(r){return r==null?[]:_r(r,vt(r))}function ol(r,a,d){var m=r==null?t:qi(r,a);return m===t?d:m}function Ck(r,a){return r!=null&&Qh(r,a,G1)}function al(r,a){return r!=null&&Qh(r,a,j1)}var Ek=jh(function(r,a,d){a!=null&&typeof a.toString!="function"&&(a=dr.call(a)),r[a]=d},ul(wt)),xk=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),_k=ce(vs);function Xe(r){return bt(r)?uh(r):Aa(r)}function vt(r){return bt(r)?uh(r,!0):tx(r)}function Rk(r,a){var d={};return a=te(a,3),ti(r,function(m,v,C){hi(d,a(m,v,C),m)}),d}function kk(r,a){var d={};return a=te(a,3),ti(r,function(m,v,C){hi(d,v,a(m,v,C))}),d}var Sk=Fn(function(r,a,d){Rr(r,a,d)}),Vf=Fn(function(r,a,d,m){Rr(r,a,d,m)}),Tk=mi(function(r,a){var d={};if(r==null)return d;var m=!1;a=Oe(a,function(C){return C=Di(C,r),m||(m=C.length>1),C}),ii(r,Ua(r),d),m&&(d=It(d,b|g|w,Ex));for(var v=a.length;v--;)za(d,a[v]);return d});function Mk(r,a){return Of(r,Ir(te(a)))}var Lk=mi(function(r,a){return r==null?{}:nx(r,a)});function Of(r,a){if(r==null)return{};var d=Oe(Ua(r),function(m){return[m]});return a=te(a),kh(r,d,function(m,v){return a(m,v[0])})}function Dk(r,a,d){a=Di(a,r);var m=-1,v=a.length;for(v||(v=1,r=t);++m<v;){var C=r==null?t:r[ni(a[m])];C===t&&(m=v,C=d),r=gi(C)?C.call(r):C}return r}function Ak(r,a,d){return r==null?r:ys(r,a,d)}function Pk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:ys(r,a,d,m)}var Nf=qh(Xe),zf=qh(vt);function Fk(r,a,d){var m=oe(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=gi(C)?Pn(mr(r)):{}:d={}}return(v?Nt:ti)(r,function(R,S,L){return a(d,R,S,L)}),d}function Vk(r,a){return r==null?!0:za(r,a)}function Ok(r,a,d){return r==null?r:Dh(r,a,Ba(d))}function Nk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:Dh(r,a,Ba(d),m)}function zn(r){return r==null?[]:wa(r,Xe(r))}function zk(r){return r==null?[]:wa(r,vt(r))}function Hk(r,a,d){return d===t&&(d=a,a=t),d!==t&&(d=$t(d),d=d===d?d:0),a!==t&&(a=$t(a),a=a===a?a:0),Ki($t(r),a,d)}function Ik(r,a,d){return a=bi(a),d===t?(d=a,a=0):d=bi(d),r=$t(r),U1(r,a,d)}function Bk(r,a,d){if(d&&typeof d!="boolean"&&lt(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=bi(r),a===t?(a=r,r=0):a=bi(a)),r>a){var m=r;r=a,a=m}if(d||r%1||a%1){var v=ah();return tt(r+v*(a-r+wE("1e-"+((v+"").length-1))),a)}return Va(r,a)}var Wk=Vn(function(r,a,d){return a=a.toLowerCase(),r+(d?Hf(a):a)});function Hf(r){return ll(Re(r).toLowerCase())}function If(r){return r=Re(r),r&&r.replace(G0,AE).replace(uE,"")}function $k(r,a,d){r=Re(r),a=St(a);var m=r.length;d=d===t?m:Ki(ae(d),0,m);var v=d;return d-=a.length,d>=0&&r.slice(d,v)==a}function Gk(r){return r=Re(r),r&&_0.test(r)?r.replace(gd,PE):r}function jk(r){return r=Re(r),r&&L0.test(r)?r.replace(na,"\\$&"):r}var Uk=Vn(function(r,a,d){return r+(d?"-":"")+a.toLowerCase()}),Kk=Vn(function(r,a,d){return r+(d?" ":"")+a.toLowerCase()}),qk=Wh("toLowerCase");function Yk(r,a,d){r=Re(r),a=ae(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 Xk(r,a,d){r=Re(r),a=ae(a);var m=a?Tn(r):0;return a&&m<a?r+Dr(a-m,d):r}function Jk(r,a,d){r=Re(r),a=ae(a);var m=a?Tn(r):0;return a&&m<a?Dr(a-m,d)+r:r}function Zk(r,a,d){return d||a==null?a=0:a&&(a=+a),r1(Re(r).replace(sa,""),a||0)}function Qk(r,a,d){return(d?lt(r,a,d):a===t)?a=1:a=ae(a),Oa(Re(r),a)}function eS(){var r=arguments,a=Re(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var tS=Vn(function(r,a,d){return r+(d?"_":"")+a.toLowerCase()});function iS(r,a,d){return d&&typeof d!="number"&&lt(r,a,d)&&(a=d=t),d=d===t?we:d>>>0,d?(r=Re(r),r&&(typeof a=="string"||a!=null&&!rl(a))&&(a=St(a),!a&&Sn(r))?Ai(Ut(r),0,d):r.split(a,d)):[]}var nS=Vn(function(r,a,d){return r+(d?" ":"")+ll(a)});function sS(r,a,d){return r=Re(r),d=d==null?0:Ki(ae(d),0,r.length),a=St(a),r.slice(d,d+a.length)==a}function rS(r,a,d){var m=y.templateSettings;d&&lt(r,a,d)&&(a=t),r=Re(r),a=$r({},a,m,Yh);var v=$r({},a.imports,m.imports,Yh),C=Xe(v),R=wa(v,C),S,L,N=0,z=a.interpolate||ir,W="__p += '",U=Ca((a.escape||ir).source+"|"+z.source+"|"+(z===bd?z0:ir).source+"|"+(a.evaluate||ir).source+"|$","g"),Z="//# sourceURL="+(Te.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mE+"]")+`
11
- `;r.replace(U,function(se,pe,Ce,Mt,ut,Lt){return Ce||(Ce=Mt),W+=r.slice(N,Lt).replace(j0,FE),pe&&(S=!0,W+=`' +
10
+ `)}function Ax(r){return oe(r)||Ji(r)||!!(rh&&r&&r[rh])}function pi(r,a){var d=typeof r;return a=a??$,!!a&&(d=="number"||d!="symbol"&&G0.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"?bt(d)&&pi(a,d.length):m=="string"&&a in d)?qt(d[a],r):!1}function Xa(r,a){if(oe(r))return!1;var d=typeof r;return d=="number"||d=="symbol"||d=="boolean"||r==null||Tt(r)?!0:M0.test(r)||!T0.test(r)||a!=null&&r in Le(a)}function Fx(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function Ja(r){var a=Fr(r),d=y[a];if(typeof d!="function"||!(a in ve.prototype))return!1;if(r===d)return!0;var m=Ka(d);return!!m&&r===m[0]}function Px(r){return!!th&&th in r}var Vx=ur?gi:ml;function Es(r){var a=r&&r.constructor,d=typeof a=="function"&&a.prototype||Ln;return r===d}function tf(r){return r===r&&!He(r)}function nf(r,a){return function(d){return d==null?!1:d[r]===a&&(a!==t||r in Le(d))}}function Ox(r){var a=Hr(r,function(m){return d.size===f&&d.clear(),m}),d=a.cache;return a}function Nx(r,a){var d=r[1],m=a[1],v=d|m,C=v<(_|k|B),R=m==B&&d==M||m==B&&d==D&&r[7].length<=a[8]||m==(B|D)&&a[7].length<=a[8]&&d==M;if(!(C||R))return r;m&_&&(r[2]=a[2],v|=d&_?0:V);var S=a[3];if(S){var L=r[3];r[3]=L?zh(L,S,a[4]):S,r[4]=L?Si(r[3],p):a[4]}return S=a[5],S&&(L=r[5],r[5]=L?Hh(L,S,a[6]):S,r[6]=L?Si(r[5],p):a[6]),S=a[7],S&&(r[7]=S),m&B&&(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 zx(r){var a=[];if(r!=null)for(var d in Le(r))a.push(d);return a}function Hx(r){return dr.call(r)}function sf(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=F(C);++v<C;)R[v]=m[a+v];v=-1;for(var S=F(a+1);++v<a;)S[v]=m[v];return S[a]=d(R),Rt(r,this,S)}}function rf(r,a){return a.length<2?r:qi(r,Bt(a,0,-1))}function Ix(r,a){for(var d=r.length,m=tt(a.length,d),v=gt(r);m--;){var C=a[m];r[m]=pi(C,d)?v[C]:t}return r}function Za(r,a){if(!(a==="constructor"&&typeof r[a]=="function")&&a!="__proto__")return r[a]}var of=lf(Th),xs=t1||function(r,a){return Ze.setTimeout(r,a)},Qa=lf(ux);function af(r,a,d){var m=a+"";return Qa(r,Dx(m,Bx(Tx(m),d)))}function lf(r){var a=0,d=0;return function(){var m=r1(),v=J-(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=Va(d,v),R=r[C];r[C]=r[d],r[d]=R}return r.length=a,r}var uf=Ox(function(r){var a=[];return r.charCodeAt(0)===46&&a.push(""),r.replace(L0,function(d,m,v,C){a.push(v?C.replace(z0,"$1"):m||d)}),a});function ni(r){if(typeof r=="string"||Tt(r))return r;var a=r+"";return a=="0"&&1/r==-j?"-0":a}function Xi(r){if(r!=null){try{return cr.call(r)}catch{}try{return r+""}catch{}}return""}function Bx(r,a){return Nt(De,function(d){var m="_."+d[0];a&d[1]&&!rr(r,m)&&r.push(m)}),r.sort()}function cf(r){if(r instanceof ve)return r.clone();var a=new Ht(r.__wrapped__,r.__chain__);return a.__actions__=gt(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}function Wx(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=Ye(ae(a),0);var m=r==null?0:r.length;if(!m||a<1)return[];for(var v=0,C=0,R=F(br(m/a));v<m;)R[C++]=Bt(r,v,v+=a);return R}function $x(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 Gx(){var r=arguments.length;if(!r)return[];for(var a=F(r-1),d=arguments[0],m=r;m--;)a[m-1]=arguments[m];return ki(oe(d)?gt(d):[d],Qe(a,1))}var jx=ce(function(r,a){return Ge(r)?bs(r,Qe(a,1,Ge,!0)):[]}),Ux=ce(function(r,a){var d=Wt(a);return Ge(d)&&(d=t),Ge(r)?bs(r,Qe(a,1,Ge,!0),te(d,2)):[]}),Kx=ce(function(r,a){var d=Wt(a);return Ge(d)&&(d=t),Ge(r)?bs(r,Qe(a,1,Ge,!0),t,d):[]});function qx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),Bt(r,a<0?0:a,m)):[]}function Yx(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),a=m-a,Bt(r,0,a<0?0:a)):[]}function Xx(r,a){return r&&r.length?Sr(r,te(a,3),!0,!0):[]}function Jx(r,a){return r&&r.length?Sr(r,te(a,3),!0):[]}function Zx(r,a,d,m){var v=r==null?0:r.length;return v?(d&&typeof d!="number"&&lt(r,a,d)&&(d=0,m=v),G1(r,a,d,m)):[]}function df(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:ae(d);return v<0&&(v=Ye(m+v,0)),or(r,te(a,3),v)}function hf(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m-1;return d!==t&&(v=ae(d),v=d<0?Ye(m+v,0):tt(v,m-1)),or(r,te(a,3),v,!0)}function ff(r){var a=r==null?0:r.length;return a?Qe(r,1):[]}function Qx(r){var a=r==null?0:r.length;return a?Qe(r,j):[]}function e_(r,a){var d=r==null?0:r.length;return d?(a=a===t?1:ae(a),Qe(r,a)):[]}function t_(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 mf(r){return r&&r.length?r[0]:t}function i_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=d==null?0:ae(d);return v<0&&(v=Ye(m+v,0)),kn(r,a,v)}function n_(r){var a=r==null?0:r.length;return a?Bt(r,0,-1):[]}var s_=ce(function(r){var a=Oe(r,Ia);return a.length&&a[0]===r[0]?La(a):[]}),r_=ce(function(r){var a=Wt(r),d=Oe(r,Ia);return a===Wt(d)?a=t:d.pop(),d.length&&d[0]===r[0]?La(d,te(a,2)):[]}),o_=ce(function(r){var a=Wt(r),d=Oe(r,Ia);return a=typeof a=="function"?a:t,a&&d.pop(),d.length&&d[0]===r[0]?La(d,t,a):[]});function a_(r,a){return r==null?"":n1.call(r,a)}function Wt(r){var a=r==null?0:r.length;return a?r[a-1]:t}function l_(r,a,d){var m=r==null?0:r.length;if(!m)return-1;var v=m;return d!==t&&(v=ae(d),v=v<0?Ye(m+v,0):tt(v,m-1)),a===a?BE(r,a,v):or(r,Kd,v,!0)}function u_(r,a){return r&&r.length?_h(r,ae(a)):t}var c_=ce(pf);function pf(r,a){return r&&r.length&&a&&a.length?Pa(r,a):r}function d_(r,a,d){return r&&r.length&&a&&a.length?Pa(r,a,te(d,2)):r}function h_(r,a,d){return r&&r.length&&a&&a.length?Pa(r,a,t,d):r}var f_=mi(function(r,a){var d=r==null?0:r.length,m=ka(r,a);return Sh(r,Oe(a,function(v){return pi(v,d)?+v:v}).sort(Nh)),m});function m_(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 Sh(r,v),d}function el(r){return r==null?r:a1.call(r)}function p_(r,a,d){var m=r==null?0:r.length;return m?(d&&typeof d!="number"&&lt(r,a,d)?(a=0,d=m):(a=a==null?0:ae(a),d=d===t?m:ae(d)),Bt(r,a,d)):[]}function g_(r,a){return kr(r,a)}function b_(r,a,d){return Na(r,a,te(d,2))}function v_(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 w_(r,a){return kr(r,a,!0)}function y_(r,a,d){return Na(r,a,te(d,2),!0)}function C_(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 E_(r){return r&&r.length?Mh(r):[]}function x_(r,a){return r&&r.length?Mh(r,te(a,2)):[]}function __(r){var a=r==null?0:r.length;return a?Bt(r,1,a):[]}function R_(r,a,d){return r&&r.length?(a=d||a===t?1:ae(a),Bt(r,0,a<0?0:a)):[]}function k_(r,a,d){var m=r==null?0:r.length;return m?(a=d||a===t?1:ae(a),a=m-a,Bt(r,a<0?0:a,m)):[]}function S_(r,a){return r&&r.length?Sr(r,te(a,3),!1,!0):[]}function T_(r,a){return r&&r.length?Sr(r,te(a,3)):[]}var M_=ce(function(r){return Li(Qe(r,1,Ge,!0))}),L_=ce(function(r){var a=Wt(r);return Ge(a)&&(a=t),Li(Qe(r,1,Ge,!0),te(a,2))}),D_=ce(function(r){var a=Wt(r);return a=typeof a=="function"?a:t,Li(Qe(r,1,Ge,!0),t,a)});function A_(r){return r&&r.length?Li(r):[]}function F_(r,a){return r&&r.length?Li(r,te(a,2)):[]}function P_(r,a){return a=typeof a=="function"?a:t,r&&r.length?Li(r,t,a):[]}function tl(r){if(!(r&&r.length))return[];var a=0;return r=Ri(r,function(d){if(Ge(d))return a=Ye(d.length,a),!0}),va(a,function(d){return Oe(r,pa(d))})}function gf(r,a){if(!(r&&r.length))return[];var d=tl(r);return a==null?d:Oe(d,function(m){return Rt(a,t,m)})}var V_=ce(function(r,a){return Ge(r)?bs(r,a):[]}),O_=ce(function(r){return Ha(Ri(r,Ge))}),N_=ce(function(r){var a=Wt(r);return Ge(a)&&(a=t),Ha(Ri(r,Ge),te(a,2))}),z_=ce(function(r){var a=Wt(r);return a=typeof a=="function"?a:t,Ha(Ri(r,Ge),t,a)}),H_=ce(tl);function I_(r,a){return Fh(r||[],a||[],gs)}function B_(r,a){return Fh(r||[],a||[],ys)}var W_=ce(function(r){var a=r.length,d=a>1?r[a-1]:t;return d=typeof d=="function"?(r.pop(),d):t,gf(r,d)});function bf(r){var a=y(r);return a.__chain__=!0,a}function $_(r,a){return a(r),r}function Or(r,a){return a(r)}var G_=mi(function(r){var a=r.length,d=a?r[0]:0,m=this.__wrapped__,v=function(C){return ka(C,r)};return a>1||this.__actions__.length||!(m instanceof ve)||!pi(d)?this.thru(v):(m=m.slice(d,+d+(a?1:0)),m.__actions__.push({func:Or,args:[v],thisArg:t}),new Ht(m,this.__chain__).thru(function(C){return a&&!C.length&&C.push(t),C}))});function j_(){return bf(this)}function U_(){return new Ht(this.value(),this.__chain__)}function K_(){this.__values__===t&&(this.__values__=Df(this.value()));var r=this.__index__>=this.__values__.length,a=r?t:this.__values__[this.__index__++];return{done:r,value:a}}function q_(){return this}function Y_(r){for(var a,d=this;d instanceof Cr;){var m=cf(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 X_(){var r=this.__wrapped__;if(r instanceof ve){var a=r;return this.__actions__.length&&(a=new ve(this)),a=a.reverse(),a.__actions__.push({func:Or,args:[el],thisArg:t}),new Ht(a,this.__chain__)}return this.thru(el)}function J_(){return Ah(this.__wrapped__,this.__actions__)}var Z_=Tr(function(r,a,d){Te.call(r,d)?++r[d]:hi(r,d,1)});function Q_(r,a,d){var m=oe(r)?jd:$1;return d&&lt(r,a,d)&&(a=t),m(r,te(a,3))}function eR(r,a){var d=oe(r)?Ri:ph;return d(r,te(a,3))}var tR=$h(df),iR=$h(hf);function nR(r,a){return Qe(Nr(r,a),1)}function sR(r,a){return Qe(Nr(r,a),j)}function rR(r,a,d){return d=d===t?1:ae(d),Qe(Nr(r,a),d)}function vf(r,a){var d=oe(r)?Nt:Mi;return d(r,te(a,3))}function wf(r,a){var d=oe(r)?_E:mh;return d(r,te(a,3))}var oR=Tr(function(r,a,d){Te.call(r,d)?r[d].push(a):hi(r,d,[a])});function aR(r,a,d,m){r=bt(r)?r:zn(r),d=d&&!m?ae(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 lR=ce(function(r,a,d){var m=-1,v=typeof a=="function",C=bt(r)?F(r.length):[];return Mi(r,function(R){C[++m]=v?Rt(a,R,d):vs(R,a,d)}),C}),uR=Tr(function(r,a,d){hi(r,d,a)});function Nr(r,a){var d=oe(r)?Oe:Ch;return d(r,te(a,3))}function cR(r,a,d,m){return r==null?[]:(oe(a)||(a=a==null?[]:[a]),d=m?t:d,oe(d)||(d=d==null?[]:[d]),Rh(r,a,d))}var dR=Tr(function(r,a,d){r[d?0:1].push(a)},function(){return[[],[]]});function hR(r,a,d){var m=oe(r)?fa:Yd,v=arguments.length<3;return m(r,te(a,4),d,v,Mi)}function fR(r,a,d){var m=oe(r)?RE:Yd,v=arguments.length<3;return m(r,te(a,4),d,v,mh)}function mR(r,a){var d=oe(r)?Ri:ph;return d(r,Ir(te(a,3)))}function pR(r){var a=oe(r)?ch:ax;return a(r)}function gR(r,a,d){(d?lt(r,a,d):a===t)?a=1:a=ae(a);var m=oe(r)?z1:lx;return m(r,a)}function bR(r){var a=oe(r)?H1:cx;return a(r)}function vR(r){if(r==null)return 0;if(bt(r))return Wr(r)?Tn(r):r.length;var a=it(r);return a==be||a==pt?r.size:Aa(r).length}function wR(r,a,d){var m=oe(r)?ma:dx;return d&&lt(r,a,d)&&(a=t),m(r,te(a,3))}var yR=ce(function(r,a){if(r==null)return[];var d=a.length;return d>1&&lt(r,a[0],a[1])?a=[]:d>2&&lt(a[0],a[1],a[2])&&(a=[a[0]]),Rh(r,Qe(a,1),[])}),zr=e1||function(){return Ze.Date.now()};function CR(r,a){if(typeof a!="function")throw new zt(l);return r=ae(r),function(){if(--r<1)return a.apply(this,arguments)}}function yf(r,a,d){return a=d?t:a,a=r&&a==null?r.length:a,fi(r,B,t,t,t,t,a)}function Cf(r,a){var d;if(typeof a!="function")throw new zt(l);return r=ae(r),function(){return--r>0&&(d=a.apply(this,arguments)),r<=1&&(a=t),d}}var il=ce(function(r,a,d){var m=_;if(d.length){var v=Si(d,On(il));m|=A}return fi(r,m,a,d,v)}),Ef=ce(function(r,a,d){var m=_|k;if(d.length){var v=Si(d,On(Ef));m|=A}return fi(a,m,r,d,v)});function xf(r,a,d){a=d?t:a;var m=fi(r,M,t,t,t,t,t,a);return m.placeholder=xf.placeholder,m}function _f(r,a,d){a=d?t:a;var m=fi(r,P,t,t,t,t,t,a);return m.placeholder=_f.placeholder,m}function Rf(r,a,d){var m,v,C,R,S,L,N=0,z=!1,W=!1,U=!0;if(typeof r!="function")throw new zt(l);a=$t(a)||0,He(d)&&(z=!!d.leading,W="maxWait"in d,C=W?Ye($t(d.maxWait)||0,a):C,U="trailing"in d?!!d.trailing:U);function Z(je){var Yt=m,vi=v;return m=v=t,N=je,R=r.apply(vi,Yt),R}function ne(je){return N=je,S=xs(pe,a),z?Z(je):R}function ue(je){var Yt=je-L,vi=je-N,Gf=a-Yt;return W?tt(Gf,C-vi):Gf}function se(je){var Yt=je-L,vi=je-N;return L===t||Yt>=a||Yt<0||W&&vi>=C}function pe(){var je=zr();if(se(je))return Ce(je);S=xs(pe,ue(je))}function Ce(je){return S=t,U&&m?Z(je):(m=v=t,R)}function Mt(){S!==t&&Ph(S),N=0,m=L=v=S=t}function ut(){return S===t?R:Ce(zr())}function Lt(){var je=zr(),Yt=se(je);if(m=arguments,v=this,L=je,Yt){if(S===t)return ne(L);if(W)return Ph(S),S=xs(pe,a),Z(L)}return S===t&&(S=xs(pe,a)),R}return Lt.cancel=Mt,Lt.flush=ut,Lt}var ER=ce(function(r,a){return fh(r,1,a)}),xR=ce(function(r,a,d){return fh(r,$t(a)||0,d)});function _R(r){return fi(r,I)}function Hr(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new zt(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||di),d}Hr.Cache=di;function Ir(r){if(typeof r!="function")throw new zt(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 RR(r){return Cf(2,r)}var kR=hx(function(r,a){a=a.length==1&&oe(a[0])?Oe(a[0],kt(te())):Oe(Qe(a,1),kt(te()));var d=a.length;return ce(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)})}),nl=ce(function(r,a){var d=Si(a,On(nl));return fi(r,A,t,a,d)}),kf=ce(function(r,a){var d=Si(a,On(kf));return fi(r,H,t,a,d)}),SR=mi(function(r,a){return fi(r,D,t,t,t,a)});function TR(r,a){if(typeof r!="function")throw new zt(l);return a=a===t?a:ae(a),ce(r,a)}function MR(r,a){if(typeof r!="function")throw new zt(l);return a=a==null?0:Ye(ae(a),0),ce(function(d){var m=d[a],v=Ai(d,0,a);return m&&ki(v,m),Rt(r,this,v)})}function LR(r,a,d){var m=!0,v=!0;if(typeof r!="function")throw new zt(l);return He(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),Rf(r,a,{leading:m,maxWait:a,trailing:v})}function DR(r){return yf(r,1)}function AR(r,a){return nl(Ba(a),r)}function FR(){if(!arguments.length)return[];var r=arguments[0];return oe(r)?r:[r]}function PR(r){return It(r,w)}function VR(r,a){return a=typeof a=="function"?a:t,It(r,w,a)}function OR(r){return It(r,b|w)}function NR(r,a){return a=typeof a=="function"?a:t,It(r,b|w,a)}function zR(r,a){return a==null||hh(r,a,Xe(a))}function qt(r,a){return r===a||r!==r&&a!==a}var HR=Ar(Ma),IR=Ar(function(r,a){return r>=a}),Ji=vh(function(){return arguments}())?vh:function(r){return Be(r)&&Te.call(r,"callee")&&!sh.call(r,"callee")},oe=F.isArray,BR=Hd?kt(Hd):Y1;function bt(r){return r!=null&&Br(r.length)&&!gi(r)}function Ge(r){return Be(r)&&bt(r)}function WR(r){return r===!0||r===!1||Be(r)&&at(r)==_t}var Fi=i1||ml,$R=Id?kt(Id):X1;function GR(r){return Be(r)&&r.nodeType===1&&!_s(r)}function jR(r){if(r==null)return!0;if(bt(r)&&(oe(r)||typeof r=="string"||typeof r.splice=="function"||Fi(r)||Nn(r)||Ji(r)))return!r.length;var a=it(r);if(a==be||a==pt)return!r.size;if(Es(r))return!Aa(r).length;for(var d in r)if(Te.call(r,d))return!1;return!0}function UR(r,a){return ws(r,a)}function KR(r,a,d){d=typeof d=="function"?d:t;var m=d?d(r,a):t;return m===t?ws(r,a,t,d):!!m}function sl(r){if(!Be(r))return!1;var a=at(r);return a==me||a==K||typeof r.message=="string"&&typeof r.name=="string"&&!_s(r)}function qR(r){return typeof r=="number"&&oh(r)}function gi(r){if(!He(r))return!1;var a=at(r);return a==Se||a==Vt||a==rt||a==mt}function Sf(r){return typeof r=="number"&&r==ae(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 Tf=Bd?kt(Bd):Z1;function YR(r,a){return r===a||Da(r,a,qa(a))}function XR(r,a,d){return d=typeof d=="function"?d:t,Da(r,a,qa(a),d)}function JR(r){return Mf(r)&&r!=+r}function ZR(r){if(Vx(r))throw new re(o);return wh(r)}function QR(r){return r===null}function ek(r){return r==null}function Mf(r){return typeof r=="number"||Be(r)&&at(r)==Ue}function _s(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)==XE}var rl=Wd?kt(Wd):Q1;function tk(r){return Sf(r)&&r>=-$&&r<=$}var Lf=$d?kt($d):ex;function Wr(r){return typeof r=="string"||!oe(r)&&Be(r)&&at(r)==_i}function Tt(r){return typeof r=="symbol"||Be(r)&&at(r)==ui}var Nn=Gd?kt(Gd):tx;function ik(r){return r===t}function nk(r){return Be(r)&&it(r)==ls}function sk(r){return Be(r)&&at(r)==y0}var rk=Ar(Fa),ok=Ar(function(r,a){return r<=a});function Df(r){if(!r)return[];if(bt(r))return Wr(r)?Ut(r):gt(r);if(ds&&r[ds])return zE(r[ds]());var a=it(r),d=a==be?ya:a==pt?ar:zn;return d(r)}function bi(r){if(!r)return r===0?r:0;if(r=$t(r),r===j||r===-j){var a=r<0?-1:1;return a*Q}return r===r?r:0}function ae(r){var a=bi(r),d=a%1;return a===a?d?a-d:a:0}function Af(r){return r?Ki(ae(r),0,we):0}function $t(r){if(typeof r=="number")return r;if(Tt(r))return fe;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=Xd(r);var d=B0.test(r);return d||$0.test(r)?CE(r.slice(2),d?2:8):I0.test(r)?fe:+r}function Ff(r){return ii(r,vt(r))}function ak(r){return r?Ki(ae(r),-$,$):r===0?r:0}function Re(r){return r==null?"":St(r)}var lk=Pn(function(r,a){if(Es(a)||bt(a)){ii(a,Xe(a),r);return}for(var d in a)Te.call(a,d)&&gs(r,d,a[d])}),Pf=Pn(function(r,a){ii(a,vt(a),r)}),$r=Pn(function(r,a,d,m){ii(a,vt(a),r,m)}),uk=Pn(function(r,a,d,m){ii(a,Xe(a),r,m)}),ck=mi(ka);function dk(r,a){var d=Fn(r);return a==null?d:dh(d,a)}var hk=ce(function(r,a){r=Le(r);var d=-1,m=a.length,v=m>2?a[2]:t;for(v&&lt(a[0],a[1],v)&&(m=1);++d<m;)for(var C=a[d],R=vt(C),S=-1,L=R.length;++S<L;){var N=R[S],z=r[N];(z===t||qt(z,Ln[N])&&!Te.call(r,N))&&(r[N]=C[N])}return r}),fk=ce(function(r){return r.push(t,Xh),Rt(Vf,t,r)});function mk(r,a){return Ud(r,te(a,3),ti)}function pk(r,a){return Ud(r,te(a,3),Ta)}function gk(r,a){return r==null?r:Sa(r,te(a,3),vt)}function bk(r,a){return r==null?r:gh(r,te(a,3),vt)}function vk(r,a){return r&&ti(r,te(a,3))}function wk(r,a){return r&&Ta(r,te(a,3))}function yk(r){return r==null?[]:_r(r,Xe(r))}function Ck(r){return r==null?[]:_r(r,vt(r))}function ol(r,a,d){var m=r==null?t:qi(r,a);return m===t?d:m}function Ek(r,a){return r!=null&&Qh(r,a,j1)}function al(r,a){return r!=null&&Qh(r,a,U1)}var xk=jh(function(r,a,d){a!=null&&typeof a.toString!="function"&&(a=dr.call(a)),r[a]=d},ul(wt)),_k=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),Rk=ce(vs);function Xe(r){return bt(r)?uh(r):Aa(r)}function vt(r){return bt(r)?uh(r,!0):ix(r)}function kk(r,a){var d={};return a=te(a,3),ti(r,function(m,v,C){hi(d,a(m,v,C),m)}),d}function Sk(r,a){var d={};return a=te(a,3),ti(r,function(m,v,C){hi(d,v,a(m,v,C))}),d}var Tk=Pn(function(r,a,d){Rr(r,a,d)}),Vf=Pn(function(r,a,d,m){Rr(r,a,d,m)}),Mk=mi(function(r,a){var d={};if(r==null)return d;var m=!1;a=Oe(a,function(C){return C=Di(C,r),m||(m=C.length>1),C}),ii(r,Ua(r),d),m&&(d=It(d,b|g|w,xx));for(var v=a.length;v--;)za(d,a[v]);return d});function Lk(r,a){return Of(r,Ir(te(a)))}var Dk=mi(function(r,a){return r==null?{}:sx(r,a)});function Of(r,a){if(r==null)return{};var d=Oe(Ua(r),function(m){return[m]});return a=te(a),kh(r,d,function(m,v){return a(m,v[0])})}function Ak(r,a,d){a=Di(a,r);var m=-1,v=a.length;for(v||(v=1,r=t);++m<v;){var C=r==null?t:r[ni(a[m])];C===t&&(m=v,C=d),r=gi(C)?C.call(r):C}return r}function Fk(r,a,d){return r==null?r:ys(r,a,d)}function Pk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:ys(r,a,d,m)}var Nf=qh(Xe),zf=qh(vt);function Vk(r,a,d){var m=oe(r),v=m||Fi(r)||Nn(r);if(a=te(a,4),d==null){var C=r&&r.constructor;v?d=m?new C:[]:He(r)?d=gi(C)?Fn(mr(r)):{}:d={}}return(v?Nt:ti)(r,function(R,S,L){return a(d,R,S,L)}),d}function Ok(r,a){return r==null?!0:za(r,a)}function Nk(r,a,d){return r==null?r:Dh(r,a,Ba(d))}function zk(r,a,d,m){return m=typeof m=="function"?m:t,r==null?r:Dh(r,a,Ba(d),m)}function zn(r){return r==null?[]:wa(r,Xe(r))}function Hk(r){return r==null?[]:wa(r,vt(r))}function Ik(r,a,d){return d===t&&(d=a,a=t),d!==t&&(d=$t(d),d=d===d?d:0),a!==t&&(a=$t(a),a=a===a?a:0),Ki($t(r),a,d)}function Bk(r,a,d){return a=bi(a),d===t?(d=a,a=0):d=bi(d),r=$t(r),K1(r,a,d)}function Wk(r,a,d){if(d&&typeof d!="boolean"&&lt(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=bi(r),a===t?(a=r,r=0):a=bi(a)),r>a){var m=r;r=a,a=m}if(d||r%1||a%1){var v=ah();return tt(r+v*(a-r+yE("1e-"+((v+"").length-1))),a)}return Va(r,a)}var $k=Vn(function(r,a,d){return a=a.toLowerCase(),r+(d?Hf(a):a)});function Hf(r){return ll(Re(r).toLowerCase())}function If(r){return r=Re(r),r&&r.replace(j0,FE).replace(cE,"")}function Gk(r,a,d){r=Re(r),a=St(a);var m=r.length;d=d===t?m:Ki(ae(d),0,m);var v=d;return d-=a.length,d>=0&&r.slice(d,v)==a}function jk(r){return r=Re(r),r&&R0.test(r)?r.replace(gd,PE):r}function Uk(r){return r=Re(r),r&&D0.test(r)?r.replace(na,"\\$&"):r}var Kk=Vn(function(r,a,d){return r+(d?"-":"")+a.toLowerCase()}),qk=Vn(function(r,a,d){return r+(d?" ":"")+a.toLowerCase()}),Yk=Wh("toLowerCase");function Xk(r,a,d){r=Re(r),a=ae(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 Jk(r,a,d){r=Re(r),a=ae(a);var m=a?Tn(r):0;return a&&m<a?r+Dr(a-m,d):r}function Zk(r,a,d){r=Re(r),a=ae(a);var m=a?Tn(r):0;return a&&m<a?Dr(a-m,d)+r:r}function Qk(r,a,d){return d||a==null?a=0:a&&(a=+a),o1(Re(r).replace(sa,""),a||0)}function eS(r,a,d){return(d?lt(r,a,d):a===t)?a=1:a=ae(a),Oa(Re(r),a)}function tS(){var r=arguments,a=Re(r[0]);return r.length<3?a:a.replace(r[1],r[2])}var iS=Vn(function(r,a,d){return r+(d?"_":"")+a.toLowerCase()});function nS(r,a,d){return d&&typeof d!="number"&&lt(r,a,d)&&(a=d=t),d=d===t?we:d>>>0,d?(r=Re(r),r&&(typeof a=="string"||a!=null&&!rl(a))&&(a=St(a),!a&&Sn(r))?Ai(Ut(r),0,d):r.split(a,d)):[]}var sS=Vn(function(r,a,d){return r+(d?" ":"")+ll(a)});function rS(r,a,d){return r=Re(r),d=d==null?0:Ki(ae(d),0,r.length),a=St(a),r.slice(d,d+a.length)==a}function oS(r,a,d){var m=y.templateSettings;d&&lt(r,a,d)&&(a=t),r=Re(r),a=$r({},a,m,Yh);var v=$r({},a.imports,m.imports,Yh),C=Xe(v),R=wa(v,C),S,L,N=0,z=a.interpolate||ir,W="__p += '",U=Ca((a.escape||ir).source+"|"+z.source+"|"+(z===bd?H0:ir).source+"|"+(a.evaluate||ir).source+"|$","g"),Z="//# sourceURL="+(Te.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pE+"]")+`
11
+ `;r.replace(U,function(se,pe,Ce,Mt,ut,Lt){return Ce||(Ce=Mt),W+=r.slice(N,Lt).replace(U0,VE),pe&&(S=!0,W+=`' +
12
12
  __e(`+pe+`) +
13
13
  '`),ut&&(L=!0,W+=`';
14
14
  `+ut+`;
@@ -18,31 +18,31 @@ __p += '`),Ce&&(W+=`' +
18
18
  `;var ne=Te.call(a,"variable")&&a.variable;if(!ne)W=`with (obj) {
19
19
  `+W+`
20
20
  }
21
- `;else if(O0.test(ne))throw new re(c);W=(L?W.replace(y0,""):W).replace(C0,"$1").replace(E0,"$1;"),W="function("+(ne||"obj")+`) {
21
+ `;else if(N0.test(ne))throw new re(c);W=(L?W.replace(C0,""):W).replace(E0,"$1").replace(x0,"$1;"),W="function("+(ne||"obj")+`) {
22
22
  `+(ne?"":`obj || (obj = {});
23
23
  `)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(L?`, __j = Array.prototype.join;
24
24
  function print() { __p += __j.call(arguments, '') }
25
25
  `:`;
26
26
  `)+W+`return __p
27
- }`;var ue=Wf(function(){return xe(C,Z+"return "+W).apply(t,R)});if(ue.source=W,sl(ue))throw ue;return ue}function oS(r){return Re(r).toLowerCase()}function aS(r){return Re(r).toUpperCase()}function lS(r,a,d){if(r=Re(r),r&&(d||a===t))return Xd(r);if(!r||!(a=St(a)))return r;var m=Ut(r),v=Ut(a),C=Jd(m,v),R=Zd(m,v)+1;return Ai(m,C,R).join("")}function uS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.slice(0,eh(r)+1);if(!r||!(a=St(a)))return r;var m=Ut(r),v=Zd(m,Ut(a))+1;return Ai(m,0,v).join("")}function cS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.replace(sa,"");if(!r||!(a=St(a)))return r;var m=Ut(r),v=Jd(m,Ut(a));return Ai(m,v).join("")}function dS(r,a){var d=Y,m=ie;if(He(a)){var v="separator"in a?a.separator:v;d="length"in a?ae(a.length):d,m="omission"in a?St(a.omission):m}r=Re(r);var C=r.length;if(Sn(r)){var R=Ut(r);C=R.length}if(d>=C)return r;var S=d-Tn(m);if(S<1)return m;var L=R?Ai(R,0,S).join(""):r.slice(0,S);if(v===t)return L+m;if(R&&(S+=L.length-S),rl(v)){if(r.slice(S).search(v)){var N,z=L;for(v.global||(v=Ca(v.source,Re(vd.exec(v))+"g")),v.lastIndex=0;N=v.exec(z);)var W=N.index;L=L.slice(0,W===t?S:W)}}else if(r.indexOf(St(v),S)!=S){var U=L.lastIndexOf(v);U>-1&&(L=L.slice(0,U))}return L+m}function hS(r){return r=Re(r),r&&x0.test(r)?r.replace(pd,BE):r}var fS=Vn(function(r,a,d){return r+(d?" ":"")+a.toUpperCase()}),ll=Wh("toUpperCase");function Bf(r,a,d){return r=Re(r),a=d?t:a,a===t?OE(r)?GE(r):SE(r):r.match(a)||[]}var Wf=ce(function(r,a){try{return Rt(r,t,a)}catch(d){return sl(d)?d:new re(d)}}),mS=mi(function(r,a){return Nt(a,function(d){d=ni(d),hi(r,d,il(r[d],r))}),r});function pS(r){var a=r==null?0:r.length,d=te();return r=a?Oe(r,function(m){if(typeof m[1]!="function")throw new zt(l);return[d(m[0]),m[1]]}):[],ce(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 gS(r){return B1(It(r,b))}function ul(r){return function(){return r}}function bS(r,a){return r==null||r!==r?a:r}var vS=Gh(),wS=Gh(!0);function wt(r){return r}function cl(r){return yh(typeof r=="function"?r:It(r,b))}function yS(r){return Eh(It(r,b))}function CS(r,a){return xh(r,It(a,b))}var ES=ce(function(r,a){return function(d){return vs(d,r,a)}}),xS=ce(function(r,a){return function(d){return vs(r,d,a)}});function dl(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=gi(r);return Nt(v,function(S){var L=a[S];r[S]=L,R&&(r.prototype[S]=function(){var N=this.__chain__;if(C||N){var z=r(this.__wrapped__),W=z.__actions__=gt(this.__actions__);return W.push({func:L,args:arguments,thisArg:r}),z.__chain__=N,z}return L.apply(r,ki([this.value()],arguments))})}),r}function _S(){return Ze._===this&&(Ze._=XE),this}function hl(){}function RS(r){return r=ae(r),ce(function(a){return _h(a,r)})}var kS=$a(Oe),SS=$a(jd),TS=$a(ma);function $f(r){return Xa(r)?pa(ni(r)):sx(r)}function MS(r){return function(a){return r==null?t:qi(r,a)}}var LS=Uh(),DS=Uh(!0);function fl(){return[]}function ml(){return!1}function AS(){return{}}function PS(){return""}function FS(){return!0}function VS(r,a){if(r=ae(r),r<1||r>$)return[];var d=we,m=tt(r,we);a=te(a),r-=we;for(var v=va(m,a);++d<r;)a(d);return v}function OS(r){return oe(r)?Oe(r,ni):Tt(r)?[r]:gt(uf(Re(r)))}function NS(r){var a=++qE;return Re(r)+a}var zS=Lr(function(r,a){return r+a},0),HS=Ga("ceil"),IS=Lr(function(r,a){return r/a},1),BS=Ga("floor");function WS(r){return r&&r.length?xr(r,wt,Ma):t}function $S(r,a){return r&&r.length?xr(r,te(a,2),Ma):t}function GS(r){return qd(r,wt)}function jS(r,a){return qd(r,te(a,2))}function US(r){return r&&r.length?xr(r,wt,Pa):t}function KS(r,a){return r&&r.length?xr(r,te(a,2),Pa):t}var qS=Lr(function(r,a){return r*a},1),YS=Ga("round"),XS=Lr(function(r,a){return r-a},0);function JS(r){return r&&r.length?ba(r,wt):0}function ZS(r,a){return r&&r.length?ba(r,te(a,2)):0}return y.after=yR,y.ary=yf,y.assign=ak,y.assignIn=Ff,y.assignInWith=$r,y.assignWith=lk,y.at=uk,y.before=Cf,y.bind=il,y.bindAll=mS,y.bindKey=Ef,y.castArray=AR,y.chain=bf,y.chunk=Bx,y.compact=Wx,y.concat=$x,y.cond=pS,y.conforms=gS,y.constant=ul,y.countBy=J_,y.create=ck,y.curry=xf,y.curryRight=_f,y.debounce=Rf,y.defaults=dk,y.defaultsDeep=hk,y.defer=CR,y.delay=ER,y.difference=Gx,y.differenceBy=jx,y.differenceWith=Ux,y.drop=Kx,y.dropRight=qx,y.dropRightWhile=Yx,y.dropWhile=Xx,y.fill=Jx,y.filter=Q_,y.flatMap=iR,y.flatMapDeep=nR,y.flatMapDepth=sR,y.flatten=ff,y.flattenDeep=Zx,y.flattenDepth=Qx,y.flip=xR,y.flow=vS,y.flowRight=wS,y.fromPairs=e_,y.functions=wk,y.functionsIn=yk,y.groupBy=rR,y.initial=i_,y.intersection=n_,y.intersectionBy=s_,y.intersectionWith=r_,y.invert=Ek,y.invertBy=xk,y.invokeMap=aR,y.iteratee=cl,y.keyBy=lR,y.keys=Xe,y.keysIn=vt,y.map=Nr,y.mapKeys=Rk,y.mapValues=kk,y.matches=yS,y.matchesProperty=CS,y.memoize=Hr,y.merge=Sk,y.mergeWith=Vf,y.method=ES,y.methodOf=xS,y.mixin=dl,y.negate=Ir,y.nthArg=RS,y.omit=Tk,y.omitBy=Mk,y.once=_R,y.orderBy=uR,y.over=kS,y.overArgs=RR,y.overEvery=SS,y.overSome=TS,y.partial=nl,y.partialRight=kf,y.partition=cR,y.pick=Lk,y.pickBy=Of,y.property=$f,y.propertyOf=MS,y.pull=u_,y.pullAll=pf,y.pullAllBy=c_,y.pullAllWith=d_,y.pullAt=h_,y.range=LS,y.rangeRight=DS,y.rearg=kR,y.reject=fR,y.remove=f_,y.rest=SR,y.reverse=el,y.sampleSize=pR,y.set=Ak,y.setWith=Pk,y.shuffle=gR,y.slice=m_,y.sortBy=wR,y.sortedUniq=C_,y.sortedUniqBy=E_,y.split=iS,y.spread=TR,y.tail=x_,y.take=__,y.takeRight=R_,y.takeRightWhile=k_,y.takeWhile=S_,y.tap=W_,y.throttle=MR,y.thru=Or,y.toArray=Df,y.toPairs=Nf,y.toPairsIn=zf,y.toPath=OS,y.toPlainObject=Pf,y.transform=Fk,y.unary=LR,y.union=T_,y.unionBy=M_,y.unionWith=L_,y.uniq=D_,y.uniqBy=A_,y.uniqWith=P_,y.unset=Vk,y.unzip=tl,y.unzipWith=gf,y.update=Ok,y.updateWith=Nk,y.values=zn,y.valuesIn=zk,y.without=F_,y.words=Bf,y.wrap=DR,y.xor=V_,y.xorBy=O_,y.xorWith=N_,y.zip=z_,y.zipObject=H_,y.zipObjectDeep=I_,y.zipWith=B_,y.entries=Nf,y.entriesIn=zf,y.extend=Ff,y.extendWith=$r,dl(y,y),y.add=zS,y.attempt=Wf,y.camelCase=Wk,y.capitalize=Hf,y.ceil=HS,y.clamp=Hk,y.clone=PR,y.cloneDeep=VR,y.cloneDeepWith=OR,y.cloneWith=FR,y.conformsTo=NR,y.deburr=If,y.defaultTo=bS,y.divide=IS,y.endsWith=$k,y.eq=qt,y.escape=Gk,y.escapeRegExp=jk,y.every=Z_,y.find=eR,y.findIndex=df,y.findKey=fk,y.findLast=tR,y.findLastIndex=hf,y.findLastKey=mk,y.floor=BS,y.forEach=vf,y.forEachRight=wf,y.forIn=pk,y.forInRight=gk,y.forOwn=bk,y.forOwnRight=vk,y.get=ol,y.gt=zR,y.gte=HR,y.has=Ck,y.hasIn=al,y.head=mf,y.identity=wt,y.includes=oR,y.indexOf=t_,y.inRange=Ik,y.invoke=_k,y.isArguments=Ji,y.isArray=oe,y.isArrayBuffer=IR,y.isArrayLike=bt,y.isArrayLikeObject=Ge,y.isBoolean=BR,y.isBuffer=Pi,y.isDate=WR,y.isElement=$R,y.isEmpty=GR,y.isEqual=jR,y.isEqualWith=UR,y.isError=sl,y.isFinite=KR,y.isFunction=gi,y.isInteger=Sf,y.isLength=Br,y.isMap=Tf,y.isMatch=qR,y.isMatchWith=YR,y.isNaN=XR,y.isNative=JR,y.isNil=QR,y.isNull=ZR,y.isNumber=Mf,y.isObject=He,y.isObjectLike=Be,y.isPlainObject=_s,y.isRegExp=rl,y.isSafeInteger=ek,y.isSet=Lf,y.isString=Wr,y.isSymbol=Tt,y.isTypedArray=Nn,y.isUndefined=tk,y.isWeakMap=ik,y.isWeakSet=nk,y.join=o_,y.kebabCase=Uk,y.last=Wt,y.lastIndexOf=a_,y.lowerCase=Kk,y.lowerFirst=qk,y.lt=sk,y.lte=rk,y.max=WS,y.maxBy=$S,y.mean=GS,y.meanBy=jS,y.min=US,y.minBy=KS,y.stubArray=fl,y.stubFalse=ml,y.stubObject=AS,y.stubString=PS,y.stubTrue=FS,y.multiply=qS,y.nth=l_,y.noConflict=_S,y.noop=hl,y.now=zr,y.pad=Yk,y.padEnd=Xk,y.padStart=Jk,y.parseInt=Zk,y.random=Bk,y.reduce=dR,y.reduceRight=hR,y.repeat=Qk,y.replace=eS,y.result=Dk,y.round=YS,y.runInContext=T,y.sample=mR,y.size=bR,y.snakeCase=tS,y.some=vR,y.sortedIndex=p_,y.sortedIndexBy=g_,y.sortedIndexOf=b_,y.sortedLastIndex=v_,y.sortedLastIndexBy=w_,y.sortedLastIndexOf=y_,y.startCase=nS,y.startsWith=sS,y.subtract=XS,y.sum=JS,y.sumBy=ZS,y.template=rS,y.times=VS,y.toFinite=bi,y.toInteger=ae,y.toLength=Af,y.toLower=oS,y.toNumber=$t,y.toSafeInteger=ok,y.toString=Re,y.toUpper=aS,y.trim=lS,y.trimEnd=uS,y.trimStart=cS,y.truncate=dS,y.unescape=hS,y.uniqueId=NS,y.upperCase=fS,y.upperFirst=ll,y.each=vf,y.eachRight=wf,y.first=mf,dl(y,function(){var r={};return ti(y,function(a,d){Te.call(y.prototype,d)||(r[d]=a)}),r}(),{chain:!1}),y.VERSION=i,Nt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),Nt(["drop","take"],function(r,a){ve.prototype[r]=function(d){d=d===t?1:Ye(ae(d),0);var m=this.__filtered__&&!a?new ve(this):this.clone();return m.__filtered__?m.__takeCount__=tt(d,m.__takeCount__):m.__views__.push({size:tt(d,we),type:r+(m.__dir__<0?"Right":"")}),m},ve.prototype[r+"Right"]=function(d){return this.reverse()[r](d).reverse()}}),Nt(["filter","map","takeWhile"],function(r,a){var d=a+1,m=d==ee||d==_e;ve.prototype[r]=function(v){var C=this.clone();return C.__iteratees__.push({iteratee:te(v,3),type:d}),C.__filtered__=C.__filtered__||m,C}}),Nt(["head","last"],function(r,a){var d="take"+(a?"Right":"");ve.prototype[r]=function(){return this[d](1).value()[0]}}),Nt(["initial","tail"],function(r,a){var d="drop"+(a?"":"Right");ve.prototype[r]=function(){return this.__filtered__?new ve(this):this[d](1)}}),ve.prototype.compact=function(){return this.filter(wt)},ve.prototype.find=function(r){return this.filter(r).head()},ve.prototype.findLast=function(r){return this.reverse().find(r)},ve.prototype.invokeMap=ce(function(r,a){return typeof r=="function"?new ve(this):this.map(function(d){return vs(d,r,a)})}),ve.prototype.reject=function(r){return this.filter(Ir(te(r)))},ve.prototype.slice=function(r,a){r=ae(r);var d=this;return d.__filtered__&&(r>0||a<0)?new ve(d):(r<0?d=d.takeRight(-r):r&&(d=d.drop(r)),a!==t&&(a=ae(a),d=a<0?d.dropRight(-a):d.take(a-r)),d)},ve.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ve.prototype.toArray=function(){return this.take(we)},ti(ve.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,L=R instanceof ve,N=S[0],z=L||oe(R),W=function(pe){var Ce=v.apply(y,ki([pe],S));return m&&U?Ce[0]:Ce};z&&d&&typeof N=="function"&&N.length!=1&&(L=z=!1);var U=this.__chain__,Z=!!this.__actions__.length,ne=C&&!U,ue=L&&!Z;if(!C&&z){R=ue?R:new ve(this);var se=r.apply(R,S);return se.__actions__.push({func:Or,args:[W],thisArg:t}),new Ht(se,U)}return ne&&ue?r.apply(this,S):(se=this.thru(W),ne?m?se.value()[0]:se.value():se)})}),Nt(["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(oe(C)?C:[],v)}return this[d](function(R){return a.apply(oe(R)?R:[],v)})}}),ti(ve.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}],ve.prototype.clone=h1,ve.prototype.reverse=f1,ve.prototype.value=m1,y.prototype.at=$_,y.prototype.chain=G_,y.prototype.commit=j_,y.prototype.next=U_,y.prototype.plant=q_,y.prototype.reverse=Y_,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=X_,y.prototype.first=y.prototype.head,ds&&(y.prototype[ds]=K_),y},Mn=jE();$i?(($i.exports=Mn)._=Mn,ca._=Mn):Ze._=Mn}).call(Hn)}(Rs,Rs.exports);var ke=Rs.exports;function jf(n,e={}){const t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function Uf(n,e,t={}){const i={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...t},body:JSON.stringify(e)};return fetch(n,i)}function Kf(n,e,t={}){const i={method:"PATCH",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...t},body:JSON.stringify(e)};return fetch(n,i)}function qf(n,e={}){const t={method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function Zi(){return{get:jf,post:Uf,patch:Kf,remove:qf}}const gl=n=>ke.upperFirst(ke.camelCase(n)),{event:si}=ct.emitter,Yf=()=>pl.defineStore("myStore",{state:()=>({mainKey:"",routes:{},items:{},loadings:{},isEditing:!1,fields:[],paginations:{},options:[],filters:[],isFiltering:!1,hiddenActions:[],selected:[],panelName:!1}),getters:{getItems(n){return e=>ke.get(n.items,e,[])},getPaginations(n){return e=>ke.get(n.paginations,e,[])},mainItems(n){return ke.get(n.items,n.mainKey,[])},mainPagination(n){return this.getPaginations(n.mainKey)},mainRoute(n){return ke.get(n.routes,n.mainKey,"")},flatFields(n){return Array.isArray(n.fields)?(n.fields.unshift({title:"",type:"text",value:"_select_",field:"_select_",align:"center",headerSort:!1}),n.fields.map(e=>ke.has(e,"groupLabel")?e.items:e)):[]},flatFieldsWithoutActions(){return this.flatFields.filter(n=>!["_actions_","_index_","_select_"].includes(n.field))},headers(){return Qf(this.flatFields)},headersWithoutActions(){return this.headers.filter(n=>!["_actions_","_index_","_select_"].includes(n.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(n,e){this.items[n]=e},addData(n){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey].push(n)},editData(n){let e=this.items[this.mainKey];e=e.map(t=>t.id==n.id?n:t),this.items[this.mainKey]=[...e]},removeData(n){let e=this.items[this.mainKey];e=e.filter(t=>t.id!=n),this.items[this.mainKey]=[...e]},getModelKey(n){let e=typeof n=="string"?n.substr(n.lastIndexOf("/")+1):n.key;return this.mainKey=this.mainKey||gl(e),gl(e)},setPagination(n,e){e in this.paginations||(this.paginations[e]={total:0,currentPage:0,lastPage:0}),this.paginations[e].total=ke.get(n,"total"),this.paginations[e].currentPage=ke.get(n,"current_page"),this.paginations[e].lastPage=ke.get(n,"last_page")},paginate(n){this.isFiltering?this.getWithFilter(n):this.loadItems(this.mainKey,n)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},loadItemsPlus(n=this.mainKey,e=1,t="",i=()=>{},s=!0){const{get:o}=Zi();let l=ke.get(this.routes,n,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[n]=!0;const c=ke.get(this.routes,n,"")+l+e+"&"+t;o(c).then(h=>h.json()).then(h=>{if(Array.isArray(this.items[n])||(this.items[n]=[]),s)for(const f of h.data)this.items[n].push(f);else this.items[n]=h.data;this.setPagination(h,n)}).finally(()=>{i(),this.loadings[n]=!1})},loadItems(n=this.mainKey,e=1){const{get:t}=Zi();let i=ke.get(this.routes,n,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[n]=!0;const s=ke.get(this.routes,n,"")+i+e;t(s).then(o=>o.json()).then(o=>{this.items[n]=o.data,this.setPagination(o,n)}).finally(()=>{this.loadings[n]=!1})},customLoadItems(n,e=1,t=()=>({})){this.loadings[n]=!0,t(i=>{this.items[n]=i.data,this.setPagination(i,n)},()=>{},()=>{this.loadings[n]=!1},e)},getWithFilter(n=1,e=15){const{post:t}=Zi(),i="http://192.168.190.10:9090/api/filter";this.loadings.filter=!0,t(`${i}?page=${n}`,{model:this.mainKey,itemPerPage:e,filters:this.filters}).then(s=>s.json()).then(s=>{this.items[this.mainKey]=s.data,this.setPagination(s,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(n){n=n.value;const{post:e}=Zi();this.loadings.mainLoading=!0;let t=this.routes[this.mainKey],i=bl(n,this.flatFields);e(t,i).then(async s=>{let o=await s.json();this.addData(o),si("alert",{text:"با موفقیت ثبت شد",color:"green"}),si("handleDialogForm",!1)}).catch(s=>{si("alert",{text:ke.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(n){n=n.value;const{patch:e}=Zi();let t=this.routes[this.mainKey].split("?")[0],i=bl(n,this.flatFields);this.loadings.mainLoading=!0,e(t+"/"+n.id,i).then(async s=>{let o=await s.json();this.editData(o),si("alert",{text:"با موفقیت ویرایش شد",color:"green"}),si("handleDialogForm",!1)}).catch(s=>{si("alert",{text:ke.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(n){const{remove:e}=Zi(),t=Array.isArray(n)?n:[n];let i=this.routes[this.mainKey].split("?")[0];this.loadings.mainLoading=!0,t.forEach(s=>{e(i+"/"+s).then(()=>{si("alert",{text:"با موفقیت حذف شد",color:"green"}),si("handleDeleteDialog",!1),this.removeData(n)}).catch(o=>{si("alert",{text:ke.get(o,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),Xf=n=>Yf()();function bl(n,e){let t={},i=!1;for(let s in n.value){let o=Zf(s,e);if(!o)continue;i=!0;let l=Jf(o);t[l]=n.value[s]}return i?t:n}function Jf(n){return"sendKey"in n?n.sendKey:n.field}function Zf(n,e){return e.find(t=>t.field==n)}function Qf(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 em(n){for(const e of n)"init"in e&&e.init()}function tm({fields:n,hiddenActions:e,options:t,route:i}){const s=Xf();s.fields=n,ct.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,em(s.flatFields),s}let vl={};const wl=n=>{vl=n},im=n=>{const e=ke.get(vl,n);return e?u.markRaw(e):""};function nm(n){return n(im)}class dt{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 Fe{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 Gr extends dt{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=Fe.elOffset(this.container);i-=o.left,s-=o.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=Fe.elOffset(e),s,o,l;switch(this.container!==document.body&&(s=Fe.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 Gr(this.table,e,this),this.childPopup}}class de extends dt{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 Gr(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var sm={};class Qi extends de{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":Qi.accessors[e]?t=Qi.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=Fe.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}}Qi.moduleName="accessor",Qi.accessors=sm;var rm={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 om(n){var e=jr(n),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function yl(n,e,t){return n&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",n+=(n.includes("?")?"&":"?")+om(t)),n}function am(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 Ur(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(Ur(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(Ur(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var lm={json:{headers:{"Content-Type":"application/json"},body:function(n,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(n,e,t){var i=Ur(t),s=new FormData;return i.forEach(function(o){s.append(o.key,o.value)}),s}}};class Gt extends de{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=rm,Gt.defaultURLGenerator=yl,Gt.defaultLoaderPromise=am,Gt.contentTypeFormatters=lm;var um={replace:function(n){return this.table.setData(n)},update:function(n){return this.table.updateOrAddData(n)},insert:function(n){return this.table.addData(n)}},cm={table:function(n){var e=[],t=!0,i=this.table.columnManager.columns,s=[],o=[];return n=n.split(`
28
- `),n.forEach(function(l){e.push(l.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(l){var c=i.find(function(h){return l&&h.definition.title&&l.trim()&&h.definition.title.trim()===l.trim()});c?s.push(c):t=!1}),t||(t=!0,s=[],e[0].forEach(function(l){var c=i.find(function(h){return l&&h.field&&l.trim()&&h.field.trim()===l.trim()});c?s.push(c):t=!1}),t||(s=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(l){var c={};l.forEach(function(h,f){s[f]&&(c[s[f].field]=h)}),o.push(c)}),o):!1}};class Fi extends de{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(s),t=i?this.generatePlainContent(s):"",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 s=[];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}s.push(l)}),t.push(s.join(" "))}),t.join(`
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=Fi.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=Fi.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}}Fi.moduleName="clipboard",Fi.pasteActions=um,Fi.pasteParsers=cm;class dm{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 Cl{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 dt{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 Cl(this)),this.component}}class El{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 Xt?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 xl={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 Xt extends dt{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 Xt(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(Xt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Xt.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||"&nbsp;"}):i.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");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 El(this)),this.component}}Xt.defaultOptionList=xl;class ks{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 dt{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){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),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)}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&&Fe.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 ks(this)),this.component}}var hm={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 wi extends de{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 Xt({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":wi.calculations[t.topCalc]?i.topCalc=wi.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":wi.calculations[t.bottomCalc]?i.botCalc=wi.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 dm(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")}}wi.moduleName="columnCalcs",wi.calculations=hm;class _l extends de{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),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 ks?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.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)}}_l.moduleName="dataTree";function fm(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 mm(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 pm(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 gm(n,e,t){var i=this,s=e.sheetName||"Sheet1",o=XLSX.utils.book_new(),l=new dt(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 M=[];k.columns.forEach(function(F,A){F?(M.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:A},e:{r:V+F.height-1,c:A+F.width-1}})):M.push("")}),w.push(M)}),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 bm(n,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(n),"text/html")}function vm(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 wm={csv:fm,json:mm,jsonLines:vm,pdf:pm,xlsx:gm,html:bm};class en extends de{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:en.downloaders[e]?l=en.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}}}en.moduleName="download",en.downloaders=wm;function Ss(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 ym(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&&Ss(l,s),l}function Cm(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&&Ss(h,s),h}function Em(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&&Ss(c,s),c}function xm(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 _m(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 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="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 km(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 Kr{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&&Ss(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=yl(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 Sm(n,e,t,i,s){this.deprecationMsg("The select editor has been deprecated, please use the new list editor");var o=new Kr(this,n,e,t,i,s);return o.input}function Tm(n,e,t,i,s){var o=new Kr(this,n,e,t,i,s);return o.input}function Mm(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 Kr(this,n,e,t,i,s);return o.input}function Lm(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,M){M<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"),M=g.cloneNode(!0);p.push(M),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(M),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 Dm(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 Am(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 Pm={input:ym,textarea:Cm,number:Em,range:xm,date:_m,time:Rm,datetime:km,select:Sm,list:Tm,autocomplete:Mm,star:Lm,progress:Dm,tickCross:Am};class Bn extends de{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&&Fe.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&&Fe.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=Pm;class Rl{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class qr{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class kl extends de{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 qr(f,h.column.getComponent(),h.width,h.height,h.depth))}else c.push(null)}),s.push(new Rl("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 qr(s.key,s.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(f=>{c.push(new qr(f._column.getFieldValue(l),f,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(h=s.modules.dataTree.index);break}i.push(new Rl(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))})}}}}kl.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 ri extends de{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":ri.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,ri.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,M=this.table.rowManager.element.scrollLeft;V!==M&&(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||{})}:ri.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(s){return ri.filters[e.type](e.value,t.getFieldValue(s),s,e.params||{})}:i=function(s){return ri.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}}ri.moduleName="filter",ri.filters=Fm;function Vm(n,e,t){return this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function Om(n,e,t){return n.getValue()}function Nm(n,e,t){return n.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function zm(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 Hm(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"&nbsp;"}function Im(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 Bm(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 Wm(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 $m(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 Gm(n,e,t){var i=n.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function jm(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 Km(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 Cl)){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 qm(n,e,t){return n.getElement().style.backgroundColor=this.sanitizeHTML(n.getValue()),""}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="#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 Xm(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 Jm(n,e,t){var i=document.createElement("span"),s=n.getRow();return s.watchPosition(o=>{i.innerText=o}),i}function Zm(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 Qm(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">
27
+ }`;var ue=Wf(function(){return xe(C,Z+"return "+W).apply(t,R)});if(ue.source=W,sl(ue))throw ue;return ue}function aS(r){return Re(r).toLowerCase()}function lS(r){return Re(r).toUpperCase()}function uS(r,a,d){if(r=Re(r),r&&(d||a===t))return Xd(r);if(!r||!(a=St(a)))return r;var m=Ut(r),v=Ut(a),C=Jd(m,v),R=Zd(m,v)+1;return Ai(m,C,R).join("")}function cS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.slice(0,eh(r)+1);if(!r||!(a=St(a)))return r;var m=Ut(r),v=Zd(m,Ut(a))+1;return Ai(m,0,v).join("")}function dS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.replace(sa,"");if(!r||!(a=St(a)))return r;var m=Ut(r),v=Jd(m,Ut(a));return Ai(m,v).join("")}function hS(r,a){var d=Y,m=ie;if(He(a)){var v="separator"in a?a.separator:v;d="length"in a?ae(a.length):d,m="omission"in a?St(a.omission):m}r=Re(r);var C=r.length;if(Sn(r)){var R=Ut(r);C=R.length}if(d>=C)return r;var S=d-Tn(m);if(S<1)return m;var L=R?Ai(R,0,S).join(""):r.slice(0,S);if(v===t)return L+m;if(R&&(S+=L.length-S),rl(v)){if(r.slice(S).search(v)){var N,z=L;for(v.global||(v=Ca(v.source,Re(vd.exec(v))+"g")),v.lastIndex=0;N=v.exec(z);)var W=N.index;L=L.slice(0,W===t?S:W)}}else if(r.indexOf(St(v),S)!=S){var U=L.lastIndexOf(v);U>-1&&(L=L.slice(0,U))}return L+m}function fS(r){return r=Re(r),r&&_0.test(r)?r.replace(pd,WE):r}var mS=Vn(function(r,a,d){return r+(d?" ":"")+a.toUpperCase()}),ll=Wh("toUpperCase");function Bf(r,a,d){return r=Re(r),a=d?t:a,a===t?NE(r)?jE(r):TE(r):r.match(a)||[]}var Wf=ce(function(r,a){try{return Rt(r,t,a)}catch(d){return sl(d)?d:new re(d)}}),pS=mi(function(r,a){return Nt(a,function(d){d=ni(d),hi(r,d,il(r[d],r))}),r});function gS(r){var a=r==null?0:r.length,d=te();return r=a?Oe(r,function(m){if(typeof m[1]!="function")throw new zt(l);return[d(m[0]),m[1]]}):[],ce(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 bS(r){return W1(It(r,b))}function ul(r){return function(){return r}}function vS(r,a){return r==null||r!==r?a:r}var wS=Gh(),yS=Gh(!0);function wt(r){return r}function cl(r){return yh(typeof r=="function"?r:It(r,b))}function CS(r){return Eh(It(r,b))}function ES(r,a){return xh(r,It(a,b))}var xS=ce(function(r,a){return function(d){return vs(d,r,a)}}),_S=ce(function(r,a){return function(d){return vs(r,d,a)}});function dl(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=gi(r);return Nt(v,function(S){var L=a[S];r[S]=L,R&&(r.prototype[S]=function(){var N=this.__chain__;if(C||N){var z=r(this.__wrapped__),W=z.__actions__=gt(this.__actions__);return W.push({func:L,args:arguments,thisArg:r}),z.__chain__=N,z}return L.apply(r,ki([this.value()],arguments))})}),r}function RS(){return Ze._===this&&(Ze._=JE),this}function hl(){}function kS(r){return r=ae(r),ce(function(a){return _h(a,r)})}var SS=$a(Oe),TS=$a(jd),MS=$a(ma);function $f(r){return Xa(r)?pa(ni(r)):rx(r)}function LS(r){return function(a){return r==null?t:qi(r,a)}}var DS=Uh(),AS=Uh(!0);function fl(){return[]}function ml(){return!1}function FS(){return{}}function PS(){return""}function VS(){return!0}function OS(r,a){if(r=ae(r),r<1||r>$)return[];var d=we,m=tt(r,we);a=te(a),r-=we;for(var v=va(m,a);++d<r;)a(d);return v}function NS(r){return oe(r)?Oe(r,ni):Tt(r)?[r]:gt(uf(Re(r)))}function zS(r){var a=++YE;return Re(r)+a}var HS=Lr(function(r,a){return r+a},0),IS=Ga("ceil"),BS=Lr(function(r,a){return r/a},1),WS=Ga("floor");function $S(r){return r&&r.length?xr(r,wt,Ma):t}function GS(r,a){return r&&r.length?xr(r,te(a,2),Ma):t}function jS(r){return qd(r,wt)}function US(r,a){return qd(r,te(a,2))}function KS(r){return r&&r.length?xr(r,wt,Fa):t}function qS(r,a){return r&&r.length?xr(r,te(a,2),Fa):t}var YS=Lr(function(r,a){return r*a},1),XS=Ga("round"),JS=Lr(function(r,a){return r-a},0);function ZS(r){return r&&r.length?ba(r,wt):0}function QS(r,a){return r&&r.length?ba(r,te(a,2)):0}return y.after=CR,y.ary=yf,y.assign=lk,y.assignIn=Pf,y.assignInWith=$r,y.assignWith=uk,y.at=ck,y.before=Cf,y.bind=il,y.bindAll=pS,y.bindKey=Ef,y.castArray=FR,y.chain=bf,y.chunk=Wx,y.compact=$x,y.concat=Gx,y.cond=gS,y.conforms=bS,y.constant=ul,y.countBy=Z_,y.create=dk,y.curry=xf,y.curryRight=_f,y.debounce=Rf,y.defaults=hk,y.defaultsDeep=fk,y.defer=ER,y.delay=xR,y.difference=jx,y.differenceBy=Ux,y.differenceWith=Kx,y.drop=qx,y.dropRight=Yx,y.dropRightWhile=Xx,y.dropWhile=Jx,y.fill=Zx,y.filter=eR,y.flatMap=nR,y.flatMapDeep=sR,y.flatMapDepth=rR,y.flatten=ff,y.flattenDeep=Qx,y.flattenDepth=e_,y.flip=_R,y.flow=wS,y.flowRight=yS,y.fromPairs=t_,y.functions=yk,y.functionsIn=Ck,y.groupBy=oR,y.initial=n_,y.intersection=s_,y.intersectionBy=r_,y.intersectionWith=o_,y.invert=xk,y.invertBy=_k,y.invokeMap=lR,y.iteratee=cl,y.keyBy=uR,y.keys=Xe,y.keysIn=vt,y.map=Nr,y.mapKeys=kk,y.mapValues=Sk,y.matches=CS,y.matchesProperty=ES,y.memoize=Hr,y.merge=Tk,y.mergeWith=Vf,y.method=xS,y.methodOf=_S,y.mixin=dl,y.negate=Ir,y.nthArg=kS,y.omit=Mk,y.omitBy=Lk,y.once=RR,y.orderBy=cR,y.over=SS,y.overArgs=kR,y.overEvery=TS,y.overSome=MS,y.partial=nl,y.partialRight=kf,y.partition=dR,y.pick=Dk,y.pickBy=Of,y.property=$f,y.propertyOf=LS,y.pull=c_,y.pullAll=pf,y.pullAllBy=d_,y.pullAllWith=h_,y.pullAt=f_,y.range=DS,y.rangeRight=AS,y.rearg=SR,y.reject=mR,y.remove=m_,y.rest=TR,y.reverse=el,y.sampleSize=gR,y.set=Fk,y.setWith=Pk,y.shuffle=bR,y.slice=p_,y.sortBy=yR,y.sortedUniq=E_,y.sortedUniqBy=x_,y.split=nS,y.spread=MR,y.tail=__,y.take=R_,y.takeRight=k_,y.takeRightWhile=S_,y.takeWhile=T_,y.tap=$_,y.throttle=LR,y.thru=Or,y.toArray=Df,y.toPairs=Nf,y.toPairsIn=zf,y.toPath=NS,y.toPlainObject=Ff,y.transform=Vk,y.unary=DR,y.union=M_,y.unionBy=L_,y.unionWith=D_,y.uniq=A_,y.uniqBy=F_,y.uniqWith=P_,y.unset=Ok,y.unzip=tl,y.unzipWith=gf,y.update=Nk,y.updateWith=zk,y.values=zn,y.valuesIn=Hk,y.without=V_,y.words=Bf,y.wrap=AR,y.xor=O_,y.xorBy=N_,y.xorWith=z_,y.zip=H_,y.zipObject=I_,y.zipObjectDeep=B_,y.zipWith=W_,y.entries=Nf,y.entriesIn=zf,y.extend=Pf,y.extendWith=$r,dl(y,y),y.add=HS,y.attempt=Wf,y.camelCase=$k,y.capitalize=Hf,y.ceil=IS,y.clamp=Ik,y.clone=PR,y.cloneDeep=OR,y.cloneDeepWith=NR,y.cloneWith=VR,y.conformsTo=zR,y.deburr=If,y.defaultTo=vS,y.divide=BS,y.endsWith=Gk,y.eq=qt,y.escape=jk,y.escapeRegExp=Uk,y.every=Q_,y.find=tR,y.findIndex=df,y.findKey=mk,y.findLast=iR,y.findLastIndex=hf,y.findLastKey=pk,y.floor=WS,y.forEach=vf,y.forEachRight=wf,y.forIn=gk,y.forInRight=bk,y.forOwn=vk,y.forOwnRight=wk,y.get=ol,y.gt=HR,y.gte=IR,y.has=Ek,y.hasIn=al,y.head=mf,y.identity=wt,y.includes=aR,y.indexOf=i_,y.inRange=Bk,y.invoke=Rk,y.isArguments=Ji,y.isArray=oe,y.isArrayBuffer=BR,y.isArrayLike=bt,y.isArrayLikeObject=Ge,y.isBoolean=WR,y.isBuffer=Fi,y.isDate=$R,y.isElement=GR,y.isEmpty=jR,y.isEqual=UR,y.isEqualWith=KR,y.isError=sl,y.isFinite=qR,y.isFunction=gi,y.isInteger=Sf,y.isLength=Br,y.isMap=Tf,y.isMatch=YR,y.isMatchWith=XR,y.isNaN=JR,y.isNative=ZR,y.isNil=ek,y.isNull=QR,y.isNumber=Mf,y.isObject=He,y.isObjectLike=Be,y.isPlainObject=_s,y.isRegExp=rl,y.isSafeInteger=tk,y.isSet=Lf,y.isString=Wr,y.isSymbol=Tt,y.isTypedArray=Nn,y.isUndefined=ik,y.isWeakMap=nk,y.isWeakSet=sk,y.join=a_,y.kebabCase=Kk,y.last=Wt,y.lastIndexOf=l_,y.lowerCase=qk,y.lowerFirst=Yk,y.lt=rk,y.lte=ok,y.max=$S,y.maxBy=GS,y.mean=jS,y.meanBy=US,y.min=KS,y.minBy=qS,y.stubArray=fl,y.stubFalse=ml,y.stubObject=FS,y.stubString=PS,y.stubTrue=VS,y.multiply=YS,y.nth=u_,y.noConflict=RS,y.noop=hl,y.now=zr,y.pad=Xk,y.padEnd=Jk,y.padStart=Zk,y.parseInt=Qk,y.random=Wk,y.reduce=hR,y.reduceRight=fR,y.repeat=eS,y.replace=tS,y.result=Ak,y.round=XS,y.runInContext=T,y.sample=pR,y.size=vR,y.snakeCase=iS,y.some=wR,y.sortedIndex=g_,y.sortedIndexBy=b_,y.sortedIndexOf=v_,y.sortedLastIndex=w_,y.sortedLastIndexBy=y_,y.sortedLastIndexOf=C_,y.startCase=sS,y.startsWith=rS,y.subtract=JS,y.sum=ZS,y.sumBy=QS,y.template=oS,y.times=OS,y.toFinite=bi,y.toInteger=ae,y.toLength=Af,y.toLower=aS,y.toNumber=$t,y.toSafeInteger=ak,y.toString=Re,y.toUpper=lS,y.trim=uS,y.trimEnd=cS,y.trimStart=dS,y.truncate=hS,y.unescape=fS,y.uniqueId=zS,y.upperCase=mS,y.upperFirst=ll,y.each=vf,y.eachRight=wf,y.first=mf,dl(y,function(){var r={};return ti(y,function(a,d){Te.call(y.prototype,d)||(r[d]=a)}),r}(),{chain:!1}),y.VERSION=i,Nt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),Nt(["drop","take"],function(r,a){ve.prototype[r]=function(d){d=d===t?1:Ye(ae(d),0);var m=this.__filtered__&&!a?new ve(this):this.clone();return m.__filtered__?m.__takeCount__=tt(d,m.__takeCount__):m.__views__.push({size:tt(d,we),type:r+(m.__dir__<0?"Right":"")}),m},ve.prototype[r+"Right"]=function(d){return this.reverse()[r](d).reverse()}}),Nt(["filter","map","takeWhile"],function(r,a){var d=a+1,m=d==ee||d==_e;ve.prototype[r]=function(v){var C=this.clone();return C.__iteratees__.push({iteratee:te(v,3),type:d}),C.__filtered__=C.__filtered__||m,C}}),Nt(["head","last"],function(r,a){var d="take"+(a?"Right":"");ve.prototype[r]=function(){return this[d](1).value()[0]}}),Nt(["initial","tail"],function(r,a){var d="drop"+(a?"":"Right");ve.prototype[r]=function(){return this.__filtered__?new ve(this):this[d](1)}}),ve.prototype.compact=function(){return this.filter(wt)},ve.prototype.find=function(r){return this.filter(r).head()},ve.prototype.findLast=function(r){return this.reverse().find(r)},ve.prototype.invokeMap=ce(function(r,a){return typeof r=="function"?new ve(this):this.map(function(d){return vs(d,r,a)})}),ve.prototype.reject=function(r){return this.filter(Ir(te(r)))},ve.prototype.slice=function(r,a){r=ae(r);var d=this;return d.__filtered__&&(r>0||a<0)?new ve(d):(r<0?d=d.takeRight(-r):r&&(d=d.drop(r)),a!==t&&(a=ae(a),d=a<0?d.dropRight(-a):d.take(a-r)),d)},ve.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ve.prototype.toArray=function(){return this.take(we)},ti(ve.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,L=R instanceof ve,N=S[0],z=L||oe(R),W=function(pe){var Ce=v.apply(y,ki([pe],S));return m&&U?Ce[0]:Ce};z&&d&&typeof N=="function"&&N.length!=1&&(L=z=!1);var U=this.__chain__,Z=!!this.__actions__.length,ne=C&&!U,ue=L&&!Z;if(!C&&z){R=ue?R:new ve(this);var se=r.apply(R,S);return se.__actions__.push({func:Or,args:[W],thisArg:t}),new Ht(se,U)}return ne&&ue?r.apply(this,S):(se=this.thru(W),ne?m?se.value()[0]:se.value():se)})}),Nt(["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(oe(C)?C:[],v)}return this[d](function(R){return a.apply(oe(R)?R:[],v)})}}),ti(ve.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}],ve.prototype.clone=f1,ve.prototype.reverse=m1,ve.prototype.value=p1,y.prototype.at=G_,y.prototype.chain=j_,y.prototype.commit=U_,y.prototype.next=K_,y.prototype.plant=Y_,y.prototype.reverse=X_,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=J_,y.prototype.first=y.prototype.head,ds&&(y.prototype[ds]=q_),y},Mn=UE();$i?(($i.exports=Mn)._=Mn,ca._=Mn):Ze._=Mn}).call(Hn)}(Rs,Rs.exports);var ke=Rs.exports;function jf(n,e={}){const t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function Uf(n,e,t={}){const i={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...t},body:JSON.stringify(e)};return fetch(n,i)}function Kf(n,e,t={}){const i={method:"PATCH",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...t},body:JSON.stringify(e)};return fetch(n,i)}function qf(n,e={}){const t={method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function Zi(){return{get:jf,post:Uf,patch:Kf,remove:qf}}const gl=n=>ke.upperFirst(ke.camelCase(n)),{event:si}=ct.emitter,Yf=()=>pl.defineStore("myStore",{state:()=>({mainKey:"",routes:{},items:{},loadings:{},isEditing:!1,fields:[],paginations:{},options:[],filters:[],isFiltering:!1,hiddenActions:[],selected:[],panelName:!1}),getters:{getItems(n){return e=>ke.get(n.items,e,[])},getPaginations(n){return e=>ke.get(n.paginations,e,[])},mainItems(n){return ke.get(n.items,n.mainKey,[])},mainPagination(n){return this.getPaginations(n.mainKey)},mainRoute(n){return ke.get(n.routes,n.mainKey,"")},flatFields(n){return Array.isArray(n.fields)?(n.fields.unshift({title:"",type:"text",value:"_select_",field:"_select_",align:"center",headerSort:!1}),n.fields.map(e=>ke.has(e,"groupLabel")?e.items:e)):[]},flatFieldsWithoutActions(){return this.flatFields.filter(n=>!["_actions_","_index_","_select_"].includes(n.field))},headers(){return Qf(this.flatFields)},headersWithoutActions(){return this.headers.filter(n=>!["_actions_","_index_","_select_"].includes(n.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(n,e){this.items[n]=e},addData(n){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey].push(n)},editData(n){let e=this.items[this.mainKey];e=e.map(t=>t.id==n.id?n:t),this.items[this.mainKey]=[...e]},removeData(n){let e=this.items[this.mainKey];e=e.filter(t=>t.id!=n),this.items[this.mainKey]=[...e]},getModelKey(n){let e=typeof n=="string"?n.substr(n.lastIndexOf("/")+1):n.key;return this.mainKey=this.mainKey||gl(e),gl(e)},setPagination(n,e){e in this.paginations||(this.paginations[e]={total:0,currentPage:0,lastPage:0}),this.paginations[e].total=ke.get(n,"total"),this.paginations[e].currentPage=ke.get(n,"current_page"),this.paginations[e].lastPage=ke.get(n,"last_page")},paginate(n){this.isFiltering?this.getWithFilter(n):this.loadItems(this.mainKey,n)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},loadItemsPlus(n=this.mainKey,e=1,t="",i=()=>{},s=!0){const{get:o}=Zi();let l=ke.get(this.routes,n,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[n]=!0;const c=ke.get(this.routes,n,"")+l+e+"&"+t;o(c).then(h=>h.json()).then(h=>{if(Array.isArray(this.items[n])||(this.items[n]=[]),s)for(const f of h.data)this.items[n].push(f);else this.items[n]=h.data;this.setPagination(h,n)}).finally(()=>{i(),this.loadings[n]=!1})},loadItems(n=this.mainKey,e=1){const{get:t}=Zi();let i=ke.get(this.routes,n,"").indexOf("?")>-1?"&page=":"?page=";this.loadings[n]=!0,this.loadings.mainLoading=n===this.mainKey;const s=ke.get(this.routes,n,"")+i+e;t(s).then(o=>o.json()).then(o=>{this.items[n]=o.data,this.setPagination(o,n)}).finally(()=>{this.loadings[n]=!1,this.loadings.mainLoading=!1})},customLoadItems(n,e=1,t=()=>({})){this.loadings[n]=!0,t(i=>{this.items[n]=i.data,this.setPagination(i,n)},()=>{},()=>{this.loadings[n]=!1},e)},getWithFilter(n=1,e=15){const{post:t}=Zi(),i="http://192.168.190.10:9090/api/filter";this.loadings.filter=!0,t(`${i}?page=${n}`,{model:this.mainKey,itemPerPage:e,filters:this.filters}).then(s=>s.json()).then(s=>{this.items[this.mainKey]=s.data,this.setPagination(s,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(n){n=n.value;const{post:e}=Zi();this.loadings.mainLoading=!0;let t=this.routes[this.mainKey],i=bl(n,this.flatFields);e(t,i).then(async s=>{let o=await s.json();this.addData(o),si("alert",{text:"با موفقیت ثبت شد",color:"green"}),si("handleDialogForm",!1)}).catch(s=>{si("alert",{text:ke.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(n){n=n.value;const{patch:e}=Zi();let t=this.routes[this.mainKey].split("?")[0],i=bl(n,this.flatFields);this.loadings.mainLoading=!0,e(t+"/"+n.id,i).then(async s=>{let o=await s.json();this.editData(o),si("alert",{text:"با موفقیت ویرایش شد",color:"green"}),si("handleDialogForm",!1)}).catch(s=>{si("alert",{text:ke.get(s,"response.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(n){const{remove:e}=Zi(),t=Array.isArray(n)?n:[n];let i=this.routes[this.mainKey].split("?")[0];this.loadings.mainLoading=!0,t.forEach(s=>{e(i+"/"+s).then(()=>{si("alert",{text:"با موفقیت حذف شد",color:"green"}),si("handleDeleteDialog",!1),this.removeData(n)}).catch(o=>{si("alert",{text:ke.get(o,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),Xf=n=>Yf()();function bl(n,e){let t={},i=!1;for(let s in n.value){let o=Zf(s,e);if(!o)continue;i=!0;let l=Jf(o);t[l]=n.value[s]}return i?t:n}function Jf(n){return"sendKey"in n?n.sendKey:n.field}function Zf(n,e){return e.find(t=>t.field==n)}function Qf(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 em(n){for(const e of n)"init"in e&&e.init()}function tm({fields:n,hiddenActions:e,options:t,route:i}){const s=Xf();s.fields=n,ct.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,em(s.flatFields),s}let vl={};const wl=n=>{vl=n},im=n=>{const e=ke.get(vl,n);return e?u.markRaw(e):""};function nm(n){return n(im)}class dt{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 Gr extends dt{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 Gr(this.table,e,this),this.childPopup}}class de extends dt{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 Gr(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var sm={};class Qi extends de{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":Qi.accessors[e]?t=Qi.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}}Qi.moduleName="accessor",Qi.accessors=sm;var rm={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 om(n){var e=jr(n),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function yl(n,e,t){return n&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",n+=(n.includes("?")?"&":"?")+om(t)),n}function am(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 Ur(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(Ur(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(Ur(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var lm={json:{headers:{"Content-Type":"application/json"},body:function(n,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(n,e,t){var i=Ur(t),s=new FormData;return i.forEach(function(o){s.append(o.key,o.value)}),s}}};class Gt extends de{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=rm,Gt.defaultURLGenerator=yl,Gt.defaultLoaderPromise=am,Gt.contentTypeFormatters=lm;var um={replace:function(n){return this.table.setData(n)},update:function(n){return this.table.updateOrAddData(n)},insert:function(n){return this.table.addData(n)}},cm={table:function(n){var e=[],t=!0,i=this.table.columnManager.columns,s=[],o=[];return n=n.split(`
28
+ `),n.forEach(function(l){e.push(l.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(l){var c=i.find(function(h){return l&&h.definition.title&&l.trim()&&h.definition.title.trim()===l.trim()});c?s.push(c):t=!1}),t||(t=!0,s=[],e[0].forEach(function(l){var c=i.find(function(h){return l&&h.field&&l.trim()&&h.field.trim()===l.trim()});c?s.push(c):t=!1}),t||(s=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(l){var c={};l.forEach(function(h,f){s[f]&&(c[s[f].field]=h)}),o.push(c)}),o):!1}};class Pi extends de{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,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(s),t=i?this.generatePlainContent(s):"",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 s=[];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}s.push(l)}),t.push(s.join(" "))}),t.join(`
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=Pi.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=Pi.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}}Pi.moduleName="clipboard",Pi.pasteActions=um,Pi.pasteParsers=cm;class dm{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 Cl{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 dt{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 Cl(this)),this.component}}class El{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 Xt?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 xl={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 Xt extends dt{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 Xt(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(Xt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Xt.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||"&nbsp;"}):i.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");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 El(this)),this.component}}Xt.defaultOptionList=xl;class ks{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 dt{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){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),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)}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 ks(this)),this.component}}var hm={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 wi extends de{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 Xt({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":wi.calculations[t.topCalc]?i.topCalc=wi.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":wi.calculations[t.bottomCalc]?i.botCalc=wi.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 dm(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")}}wi.moduleName="columnCalcs",wi.calculations=hm;class _l extends de{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),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 ks?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.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)}}_l.moduleName="dataTree";function fm(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 mm(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 pm(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 gm(n,e,t){var i=this,s=e.sheetName||"Sheet1",o=XLSX.utils.book_new(),l=new dt(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 M=[];k.columns.forEach(function(P,A){P?(M.push(!(P.value instanceof Date)&&typeof P.value=="object"?JSON.stringify(P.value):P.value),(P.width>1||P.height>-1)&&(P.height>1||P.width>1)&&E.push({s:{r:V,c:A},e:{r:V+P.height-1,c:A+P.width-1}})):M.push("")}),w.push(M)}),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 bm(n,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(n),"text/html")}function vm(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 wm={csv:fm,json:mm,jsonLines:vm,pdf:pm,xlsx:gm,html:bm};class en extends de{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:en.downloaders[e]?l=en.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}}}en.moduleName="download",en.downloaders=wm;function Ss(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 ym(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&&Ss(l,s),l}function Cm(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&&Ss(h,s),h}function Em(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&&Ss(c,s),c}function xm(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 _m(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 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="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 km(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 Kr{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&&Ss(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=yl(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 Sm(n,e,t,i,s){this.deprecationMsg("The select editor has been deprecated, please use the new list editor");var o=new Kr(this,n,e,t,i,s);return o.input}function Tm(n,e,t,i,s){var o=new Kr(this,n,e,t,i,s);return o.input}function Mm(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 Kr(this,n,e,t,i,s);return o.input}function Lm(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,M){M<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"),M=g.cloneNode(!0);p.push(M),V.addEventListener("mouseenter",function(P){P.stopPropagation(),P.stopImmediatePropagation(),w(k)}),V.addEventListener("mousemove",function(P){P.stopPropagation(),P.stopImmediatePropagation()}),V.addEventListener("click",function(P){P.stopPropagation(),P.stopImmediatePropagation(),t(k),l.blur()}),V.appendChild(M),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 Dm(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 Am(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 Fm={input:ym,textarea:Cm,number:Em,range:xm,date:_m,time:Rm,datetime:km,select:Sm,list:Tm,autocomplete:Mm,star:Lm,progress:Dm,tickCross:Am};class Bn extends de{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=Fm;class Rl{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class qr{constructor(e,t,i,s,o){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=o}}class kl extends de{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 qr(f,h.column.getComponent(),h.width,h.height,h.depth))}else c.push(null)}),s.push(new Rl("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 qr(s.key,s.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(f=>{c.push(new qr(f._column.getFieldValue(l),f,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(h=s.modules.dataTree.index);break}i.push(new Rl(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))})}}}}kl.moduleName="export";var Pm={"=":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 ri extends de{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":ri.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,ri.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,M=this.table.rowManager.element.scrollLeft;V!==M&&(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||{})}:ri.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(s){return ri.filters[e.type](e.value,t.getFieldValue(s),s,e.params||{})}:i=function(s){return ri.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}}ri.moduleName="filter",ri.filters=Pm;function Vm(n,e,t){return this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function Om(n,e,t){return n.getValue()}function Nm(n,e,t){return n.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function zm(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 Hm(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"&nbsp;"}function Im(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 Bm(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 Wm(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 $m(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 Gm(n,e,t){var i=n.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function jm(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 Km(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 Cl)){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 qm(n,e,t){return n.getElement().style.backgroundColor=this.sanitizeHTML(n.getValue()),""}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="#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 Xm(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 Jm(n,e,t){var i=document.createElement("span"),s=n.getRow();return s.watchPosition(o=>{i.innerText=o}),i}function Zm(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 Qm(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">
32
32
  <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
33
33
  <line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />
34
34
  </svg>
35
35
 
36
36
  <svg class='tabulator-responsive-collapse-toggle-close' viewbox="0 0 24 24">
37
37
  <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 ep(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 ks?(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 tp={plaintext:Vm,html:Om,textarea:Nm,money:zm,link:Hm,image:Im,tickCross:Bm,datetime:Wm,datetimediff:$m,lookup:Gm,star:jm,traffic:Um,progress:Km,color:qm,buttonTick:Ym,buttonCross:Xm,rownum:Jm,handle:Zm,responsiveCollapse:Qm,rowSelection:ep};class At extends de{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":At.formatters[s]?i.formatter=At.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=At.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=At.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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?"&nbsp;":e}getFormatter(e){switch(typeof e){case"string":At.formatters[e]?e=At.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=At.formatters.plaintext);break;case"function":break;default:e=At.formatters.plaintext;break}return e}}At.moduleName="format",At.formatters=tp;class Sl extends de{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}}Sl.moduleName="frozenColumns";class Tl extends de{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)})}}Tl.moduleName="frozenRows";class ip{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 tn{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=>{t.stopPropagation(),t.stopImmediatePropagation(),this.toggleVisibility()}))}_createGroup(e,t){var i=t+"_"+e,s=new tn(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){var t=[];return this.rows.forEach(function(i){t.push(e?i.getComponent():i)}),t}generateGroupHeaderContents(){var e=[];for(this.rows.forEach(function(t){e.push(t.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,Fe.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(){}getComponent(){return this.component||(this.component=new ip(this)),this.component}}class Ml extends de{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 tn&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof tn?t:t.modules.group,o=e instanceof tn?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 tn(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=""}}Ml.moduleName="groupRows";var np={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){this.table.rowManager.moveRowActual(n.component,this.table.rowManager.rows[n.data.posFrom],!n.data.after),this.table.rowManager.redraw()}},sp={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.rows[n.data.posTo],n.data.after),this.table.rowManager.redraw()}};class Vi extends de{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 Vi.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 Vi.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))}})}}Vi.moduleName="history",Vi.undoers=np,Vi.redoers=sp;class Ll extends de{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)}}}Ll.moduleName="htmlTableImport";function rp(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==`
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 ep(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 ks?(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 tp={plaintext:Vm,html:Om,textarea:Nm,money:zm,link:Hm,image:Im,tickCross:Bm,datetime:Wm,datetimediff:$m,lookup:Gm,star:jm,traffic:Um,progress:Km,color:qm,buttonTick:Ym,buttonCross:Xm,rownum:Jm,handle:Zm,responsiveCollapse:Qm,rowSelection:ep};class At extends de{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":At.formatters[s]?i.formatter=At.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=At.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=At.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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?"&nbsp;":e}getFormatter(e){switch(typeof e){case"string":At.formatters[e]?e=At.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=At.formatters.plaintext);break;case"function":break;default:e=At.formatters.plaintext;break}return e}}At.moduleName="format",At.formatters=tp;class Sl extends de{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}}Sl.moduleName="frozenColumns";class Tl extends de{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)})}}Tl.moduleName="frozenRows";class ip{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 tn{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=>{t.stopPropagation(),t.stopImmediatePropagation(),this.toggleVisibility()}))}_createGroup(e,t){var i=t+"_"+e,s=new tn(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){var t=[];return this.rows.forEach(function(i){t.push(e?i.getComponent():i)}),t}generateGroupHeaderContents(){var e=[];for(this.rows.forEach(function(t){e.push(t.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(){}getComponent(){return this.component||(this.component=new ip(this)),this.component}}class Ml extends de{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 tn&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof tn?t:t.modules.group,o=e instanceof tn?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 tn(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=""}}Ml.moduleName="groupRows";var np={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){this.table.rowManager.moveRowActual(n.component,this.table.rowManager.rows[n.data.posFrom],!n.data.after),this.table.rowManager.redraw()}},sp={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.rows[n.data.posTo],n.data.after),this.table.rowManager.redraw()}};class Vi extends de{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 Vi.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 Vi.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))}})}}Vi.moduleName="history",Vi.undoers=np,Vi.redoers=sp;class Ll extends de{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)}}}Ll.moduleName="htmlTableImport";function rp(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
39
  `&&!s){i=0,t++,o++;continue}if((l=="\r"||l==`
40
- `)&&!s){i=0,t++;continue}e[t][i]+=l}return e}function op(n){try{return JSON.parse(n)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function ap(n){return n}var lp={csv:rp,json:op,array:ap};class Wn extends de{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=lp;class Dl extends de{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 Xt&&(o=i.definition[e]),o&&o(t,s)),this.dispatchExternal(e,t,s)}}Dl.moduleName="interaction";var up={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"]},cp={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 yi extends de{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,yi.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)yi.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:yi.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}}yi.moduleName="keybindings",yi.bindings=up,yi.actions=cp;class Al extends de{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="&vellip;",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()))}}}Al.moduleName="menu";class Pl extends de{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)-Fe.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)-Fe.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)-Fe.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)))}}Pl.moduleName="moveColumn";class Ts extends de{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-Fe.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-Fe.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)}}}Ts.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}},Ts.prototype.senders={delete:function(n,e,t){n.delete()}},Ts.moduleName="moveRow";var dp={};class nn extends de{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":nn.mutators[e]?t=nn.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}}nn.moduleName="mutator",nn.mutators=dp;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}),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 fp(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 mp={rows:hp,pages:fp};class $n extends de{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=mp;var pp={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}},gp={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 ht extends de{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:ht.readers[this.table.options.persistenceReaderFunc]?this.readFunc=ht.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):ht.readers[this.mode]?this.readFunc=ht.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:ht.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=ht.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):ht.writers[this.mode]?this.writeFunc=ht.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}}ht.moduleName="persistence",ht.moduleInitOrder=-10,ht.readers=pp,ht.writers=gp;class Fl extends de{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="&vellip;",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())}}Fl.moduleName="popup";class Vl extends de{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}}Vl.moduleName="print";class Ol extends de{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)}}Ol.moduleName="reactiveData";class Nl extends de{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)}}Nl.moduleName="resizeColumns";class zl extends de{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)}}zl.moduleName="resizeRows";class Hl extends de{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)}}Hl.moduleName="resizeTable";class Il extends de{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:""}}Il.moduleName="responsiveLayout";class Bl extends de{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)}}Bl.moduleName="selectRow";function bp(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 vp(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 Yr(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 wp(n,e,t,i,s,o,l){return l.format||(l.format="dd/MM/yyyy"),Yr.call(this,n,e,t,i,s,o,l)}function yp(n,e,t,i,s,o,l){return l.format||(l.format="HH:mm"),Yr.call(this,n,e,t,i,s,o,l)}function Cp(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 Ep(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 xp(n,e,t,i,s,o,l){var c=typeof n>"u"?0:1,h=typeof e>"u"?0:1;return c-h}function _p(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 Rp={number:bp,string:vp,date:wp,time:yp,datetime:Yr,boolean:Cp,array:Ep,exists:xp,alphanum:_p};class Oi extends de{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":Oi.sorters[e.definition.sorter]?t=Oi.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 Oi.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)}}Oi.moduleName="sort",Oi.sorters=Rp;class Wl extends de{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()))}}Wl.moduleName="tooltip";var kp={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 de{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=kp;var Sp=Object.freeze({__proto__:null,AccessorModule:Qi,AjaxModule:Gt,ClipboardModule:Fi,ColumnCalcsModule:wi,DataTreeModule:_l,DownloadModule:en,EditModule:Bn,ExportModule:kl,FilterModule:ri,FormatModule:At,FrozenColumnsModule:Sl,FrozenRowsModule:Tl,GroupRowsModule:Ml,HistoryModule:Vi,HtmlTableImportModule:Ll,ImportModule:Wn,InteractionModule:Dl,KeybindingsModule:yi,MenuModule:Al,MoveColumnsModule:Pl,MoveRowsModule:Ts,MutatorModule:nn,PageModule:$n,PersistenceModule:ht,PopupModule:Fl,PrintModule:Vl,ReactiveDataModule:Ol,ResizeColumnsModule:Nl,ResizeRowsModule:zl,ResizeTableModule:Hl,ResponsiveLayoutModule:Il,SelectRowModule:Bl,SortModule:Oi,TooltipModule:Wl,ValidateModule:Gn}),Tp={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 $l{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 Ms extends dt{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&&Fe.elVisible(o)&&(l=Fe.elOffset(o).top-Fe.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 Mp extends Ms{constructor(e){super(e)}renderRowCells(e){const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Lp extends Ms{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 Dp extends dt{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 $l(this.table,"column definition",xl),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:Lp,basic:Mp};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 Xt(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 Xt)return e;if(e instanceof El)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){Fe.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 Ap extends Ms{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();this.rows().forEach((s,o)=>{this.styleRow(s,o),s.initialize(!0),s.type!=="group"&&(t=!1),i.appendChild(s.getElement())}),e.appendChild(i),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows()}scrollToRowNearestTop(e){var t=Fe.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=Fe.elOffset(t).top-Fe.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Pp extends Ms{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,M=0,F=this.table.rowManager.fixedHeight,A=this.elementVertical.clientHeight,H=this.table.options.rowHeight,B=!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<A&&(e-=Math.ceil((A-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&&Fe.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,F||this.table.options.maxHeight?(H&&(M=A/H+this.vDomWindowBuffer/H),M=Math.max(this.vDomWindowMinTotalRows,Math.ceil(M))):M=w;(M==w||c<=A+this.vDomWindowBuffer||V<this.vDomWindowMinTotalRows)&&this.vDomBottom<w-1;){for(k=[],_=document.createDocumentFragment(),b=0;b<M&&this.vDomBottom<w-1;)E=this.vDomBottom+1,x=g[E],this.styleRow(x,E),x.initialize(),!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.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++}),B=this.table.rowManager.adjustTableSize(),A=this.elementVertical.clientHeight,B&&(F||this.table.options.maxHeight)&&(H=c/V,M=Math.max(this.vDomWindowMinTotalRows,Math.ceil(A/H+this.vDomWindowBuffer/H)))}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-A),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-A:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-A),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-A),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 dt{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 ks)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
40
+ `)&&!s){i=0,t++;continue}e[t][i]+=l}return e}function op(n){try{return JSON.parse(n)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function ap(n){return n}var lp={csv:rp,json:op,array:ap};class Wn extends de{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=lp;class Dl extends de{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 Xt&&(o=i.definition[e]),o&&o(t,s)),this.dispatchExternal(e,t,s)}}Dl.moduleName="interaction";var up={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"]},cp={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 yi extends de{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,yi.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)yi.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:yi.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}}yi.moduleName="keybindings",yi.bindings=up,yi.actions=cp;class Al extends de{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="&vellip;",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()))}}}Al.moduleName="menu";class Fl extends de{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)))}}Fl.moduleName="moveColumn";class Ts extends de{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)}}}Ts.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}},Ts.prototype.senders={delete:function(n,e,t){n.delete()}},Ts.moduleName="moveRow";var dp={};class nn extends de{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":nn.mutators[e]?t=nn.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}}nn.moduleName="mutator",nn.mutators=dp;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}),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 fp(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 mp={rows:hp,pages:fp};class $n extends de{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=mp;var pp={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}},gp={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 ht extends de{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:ht.readers[this.table.options.persistenceReaderFunc]?this.readFunc=ht.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):ht.readers[this.mode]?this.readFunc=ht.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:ht.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=ht.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):ht.writers[this.mode]?this.writeFunc=ht.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}}ht.moduleName="persistence",ht.moduleInitOrder=-10,ht.readers=pp,ht.writers=gp;class Pl extends de{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="&vellip;",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())}}Pl.moduleName="popup";class Vl extends de{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}}Vl.moduleName="print";class Ol extends de{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)}}Ol.moduleName="reactiveData";class Nl extends de{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)}}Nl.moduleName="resizeColumns";class zl extends de{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)}}zl.moduleName="resizeRows";class Hl extends de{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)}}Hl.moduleName="resizeTable";class Il extends de{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:""}}Il.moduleName="responsiveLayout";class Bl extends de{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)}}Bl.moduleName="selectRow";function bp(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 vp(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 Yr(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 wp(n,e,t,i,s,o,l){return l.format||(l.format="dd/MM/yyyy"),Yr.call(this,n,e,t,i,s,o,l)}function yp(n,e,t,i,s,o,l){return l.format||(l.format="HH:mm"),Yr.call(this,n,e,t,i,s,o,l)}function Cp(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 Ep(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 xp(n,e,t,i,s,o,l){var c=typeof n>"u"?0:1,h=typeof e>"u"?0:1;return c-h}function _p(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 Rp={number:bp,string:vp,date:wp,time:yp,datetime:Yr,boolean:Cp,array:Ep,exists:xp,alphanum:_p};class Oi extends de{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":Oi.sorters[e.definition.sorter]?t=Oi.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 Oi.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)}}Oi.moduleName="sort",Oi.sorters=Rp;class Wl extends de{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()))}}Wl.moduleName="tooltip";var kp={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 de{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=kp;var Sp=Object.freeze({__proto__:null,AccessorModule:Qi,AjaxModule:Gt,ClipboardModule:Pi,ColumnCalcsModule:wi,DataTreeModule:_l,DownloadModule:en,EditModule:Bn,ExportModule:kl,FilterModule:ri,FormatModule:At,FrozenColumnsModule:Sl,FrozenRowsModule:Tl,GroupRowsModule:Ml,HistoryModule:Vi,HtmlTableImportModule:Ll,ImportModule:Wn,InteractionModule:Dl,KeybindingsModule:yi,MenuModule:Al,MoveColumnsModule:Fl,MoveRowsModule:Ts,MutatorModule:nn,PageModule:$n,PersistenceModule:ht,PopupModule:Pl,PrintModule:Vl,ReactiveDataModule:Ol,ResizeColumnsModule:Nl,ResizeRowsModule:zl,ResizeTableModule:Hl,ResponsiveLayoutModule:Il,SelectRowModule:Bl,SortModule:Oi,TooltipModule:Wl,ValidateModule:Gn}),Tp={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 $l{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 Ms extends dt{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 Mp extends Ms{constructor(e){super(e)}renderRowCells(e){const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Lp extends Ms{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 Dp extends dt{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 $l(this.table,"column definition",xl),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:Lp,basic:Mp};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 Xt(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 Xt)return e;if(e instanceof El)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 Ap extends Ms{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();this.rows().forEach((s,o)=>{this.styleRow(s,o),s.initialize(!0),s.type!=="group"&&(t=!1),i.appendChild(s.getElement())}),e.appendChild(i),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 Fp extends Ms{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,M=0,P=this.table.rowManager.fixedHeight,A=this.elementVertical.clientHeight,H=this.table.options.rowHeight,B=!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<A&&(e-=Math.ceil((A-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,P||this.table.options.maxHeight?(H&&(M=A/H+this.vDomWindowBuffer/H),M=Math.max(this.vDomWindowMinTotalRows,Math.ceil(M))):M=w;(M==w||c<=A+this.vDomWindowBuffer||V<this.vDomWindowMinTotalRows)&&this.vDomBottom<w-1;){for(k=[],_=document.createDocumentFragment(),b=0;b<M&&this.vDomBottom<w-1;)E=this.vDomBottom+1,x=g[E],this.styleRow(x,E),x.initialize(),!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.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++}),B=this.table.rowManager.adjustTableSize(),A=this.elementVertical.clientHeight,B&&(P||this.table.options.maxHeight)&&(H=c/V,M=Math.max(this.vDomWindowMinTotalRows,Math.ceil(A/H+this.vDomWindowBuffer/H)))}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-A),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-A:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-A),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-A),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 Pp extends dt{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 ks)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
41
  Expecting: array
42
42
  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 Fe.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:Pp,basic:Ap};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())}_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 Vp extends dt{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 Op extends dt{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 Np{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 zp extends dt{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,l){var c=++this.requestOrder;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=>{!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 Hp{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 Ip{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 Bp extends dt{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 Ni?(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 Ni?t===e:t.element===e})}}yt.tables=[];function Wp(n,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(n),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Gl(n,e){n.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function $p(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 Gp(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=[],M=0,F=0,A=0,H=o,B=0,D=0,I=[];function Y(G){return _*(G.column.definition.widthGrow||1)}function ie(G){return g(G.width)-_*(G.column.definition.widthShrink||0)}return E.forEach(function(G,J){var ee=k?ie(G):Y(G);G.column.minWidth>=ee?V.push(G):G.column.maxWidth&&G.column.maxWidth<ee?(G.width=G.column.maxWidth,x-=G.column.maxWidth,H-=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1,H&&(_=Math.floor(x/H))):(I.push(G),D+=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1)}),V.length?(V.forEach(function(G){M+=k?G.width-G.column.minWidth:G.column.minWidth,G.width=G.column.minWidth}),F=x-M,A=D?Math.floor(F/D):F,B=w(I,F,A,k)):(B=D?x-Math.floor(x/D)*D:x,I.forEach(function(G){G.width=k?ie(G):Y(G)})),B}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 jp={fitData:Wp,fitDataFill:Gl,fitDataTable:Gl,fitDataStretch:$p,fitColumns:Gp};class sn extends de{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;sn.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"),sn.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}sn.moduleName="layout",sn.modes=jp;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 jn extends de{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=Fe.deepClone(jn.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=Fe.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)})}}jn.moduleName="localize",jn.langs=Up;class jl extends de{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)}}jl.moduleName="comms";var Kp=Object.freeze({__proto__:null,LayoutModule:sn,LocalizeModule:jn,CommsModule:jl});class Ul{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,Kp,!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 qp extends dt{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 Ni{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 Np(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Bp(this),this.optionsList=new $l(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 Dp(this),this.rowManager=new Fp(this),this.footerManager=new Vp(this),this.dataLoader=new zp(this),this.alertManager=new qp(this),this.bindModules(),this.options=this.optionsList.generate(Ni.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Hp(this,this.options,this.options.debugEventsExternal),this.eventBus=new Ip(this.options.debugEventsInternal),this.interactionMonitor=new Op(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}}Ni.defaultOptions=Tp,new Ul(Ni);class Kl extends Ni{}new Ul(Kl,Sp);const 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 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)],Xp=[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)],Jp={__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(ct.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"},Yp),u.createElementVNode("button",{onClick:i[1]||(i[1]=s=>u.unref(ct.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"},Xp)],64))}},Zp={__name:"SelectColumn",props:{data:{},index:{}},setup(n){const e=u.ref(!1);function t(i){ct.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 zi;const Qp=({element:n,headers:e,data:t,options:i}={element:null,headers:[],data:[],options:{}})=>(zi=new Kl(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:ql(e),...i}),setTimeout(()=>{zi.setData()}),zi);function ql(n){const e={_select_:{formatter:ig,formatterParams:{component:Zp}},_actions_:{formatter:tg,formatterParams:{component:Jp}},_index_:{formatter:eg}};return n.map(t=>t.field in e?{...t,...e[t.field]}:t)}function eg(n){var e=zi.getPage(),t=zi.getPageSize(),i=n.getRow().getPosition(!0)+(e-1)*t;return i}function tg(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 ig(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 ng(n){zi.setData(n)}function sg(n){zi.setColumns(n)}function rg(n){u.watch(()=>n.mainItems,e=>{ng(e)}),u.watch(()=>n.flatFields,()=>{sg(ql(n.headers))},{deep:!0})}const tT="",Un=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Yl=n=>(u.pushScopeId("data-v-653884dd"),n=n(),u.popScopeId(),n),og={key:0,id:"paginate"},ag={class:"flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4"},lg={class:"lg:w-3/5 w-full flex items-center justify-between border-t border-gray-200"},ug={class:"sm:flex hidden"},cg=[Yl(()=>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))],dg=["onClick"],hg={key:1,class:"text-sm font-medium leading-none text-gray-600 pt-3 mr-4 px-2"},fg=[Yl(()=>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))],mg=Un({__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",og,[u.createElementVNode("div",ag,[u.createElementVNode("div",lg,[u.createElementVNode("div",ug,[u.createElementVNode("div",{onClick:i,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},cg),(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,dg)):(u.openBlock(),u.createElementBlock("p",hg,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"},fg)])])])])):u.createCommentVNode("",!0)}},[["__scopeId","data-v-653884dd"]]),pg={key:0,class:"mt-[-20px]"},gg=[u.createElementVNode("div",{class:"flex animate-pulse flex-row items-center h-full justify-center"},[u.createElementVNode("div",{class:"w-full flex flex-col items-start rtl:mr-8 ltr:ml-8"},[u.createElementVNode("div",{class:"w-[70%] bg-muted-300 dark:bg-muted-900 h-2.5 rounded-md"})])],-1)],bg={key:1,class:"padding: 100px; mt-[-20px] rounded-b-xl bg-white text-center p-[100px] dark:bg-muted-800"},vg={__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.Professor);return rg(t),u.onMounted(()=>{Qp({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.Professor?(u.openBlock(),u.createElementBlock("div",pg,[(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"])},gg,2)),64))])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createElementBlock("div",bg,[u.createElementVNode("h2",null,u.toDisplayString(o.$fcTr("not_load_or_existing_data")),1)])):u.createCommentVNode("",!0),u.createVNode(mg)],64))}},wg={class:"w-full"},yg={__name:"MList",setup(n){const e=u.inject("store");function t(l){return"item."+l}function i(l){return"header."+l}function s(l){return e.getItems(e.mainKey).map(c=>c.id).indexOf(l.id)+(15*page-14)}function o(){return{getHeader:i,getField:t,getIndex:s}}return(l,c)=>(u.openBlock(),u.createElementBlock("div",wg,[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(vg),u.normalizeProps(u.guardReactiveProps(o())),null,16))]))}},oT="",aT="";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 Xr(n,e){return{x:n.x+e.x,y:n.y+e.y}}function Cg(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Xl(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 Xr({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 Xr({x:s,y:o},e)}return Xr({x:e.width/2,y:e.height/2},e)}const Ne=typeof window<"u",Jr=Ne&&"IntersectionObserver"in window,Eg=Ne&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function Jl(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 Zr(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(/^\./,""),Jl(n,e.split("."),t))}function ft(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 Zr(n,e,t);if(Array.isArray(e))return Jl(n,e,t);if(typeof e!="function")return t;const i=e(n,t);return typeof i>"u"?t:i}function Qr(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:n},(t,i)=>e+i)}function he(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 eo(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function to(n){return n&&"$el"in n?n.$el:n}const Zl=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 io(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 Ql=/^on[^a-z]/,no=n=>Ql.test(n),xg=["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 eu(n){const[e,t]=on(n,[Ql]),i=an(e,xg),[s,o]=on(t,["class","style","id",/^data-/]);return Object.assign(s,e),Object.assign(o,i),[s,o]}function Jt(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 tu(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 _g(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 Pt(){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(eo(o)&&eo(l)){i[s]=Pt(o,l,t);continue}if(Array.isArray(o)&&Array.isArray(l)&&t){i[s]=t(o,l);continue}i[s]=l}return i}function iu(n){return n.map(e=>e.type===u.Fragment?iu(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 Ls(n,e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.map(t=>Ls(n,t)).flat(1);if(Array.isArray(e.children))return e.children.map(t=>Ls(n,t)).flat(1);if(e.component){if(Object.getOwnPropertySymbols(e.component.provides).includes(n))return[e.component];if(e.component.subTree)return Ls(n,e.component.subTree).flat(1)}return[]}function so(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 Ds(n,e){return n.includes(e)}function nu(n){return n[2].toLowerCase()+n.slice(3)}const Zt=()=>[Function,Array];function su(n,e){return e="on"+u.capitalize(e),!!(n[e]||n[`${e}Once`]||n[`${e}Capture`]||n[`${e}OnceCapture`]||n[`${e}CaptureOnce`])}function Rg(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 ro(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 ru(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 As(n,e){var i,s,o,l;const t=ro(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=ru(t,e);c?c.focus():As(n,e==="next"?"first":"last")}}function kg(){}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 ou=["top","bottom"],Sg=["start","end","left","right"];function oo(n,e){let[t,i]=n.split(" ");return i||(i=Ds(ou,t)?"start":Ds(Sg,t)?"top":"center"),{side:au(t,e),align:au(i,e)}}function au(n,e){return n==="start"?e?"right":"left":n==="end"?e?"left":"right":n}function ao(n){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.side],align:n.align}}function lo(n){return{side:n.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.align]}}function lu(n){return{side:n.align,align:n.side}}function uu(n){return Ds(ou,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 cu(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 uo(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 Tg(n,e){Object.keys(e).forEach(t=>{if(no(t)){const i=nu(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 Mg(n,e){Object.keys(e).forEach(t=>{if(no(t)){const i=nu(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,du=.2126729,hu=.7151522,fu=.072175,Lg=.55,Dg=.58,Ag=.57,Pg=.62,Fs=.03,mu=1.45,Fg=5e-4,Vg=1.25,Og=1.25,pu=.078,gu=12.82051282051282,Vs=.06,bu=.001;function vu(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*du+i*hu+s*fu,f=o*du+l*hu+c*fu;if(h<=Fs&&(h+=(Fs-h)**mu),f<=Fs&&(f+=(Fs-f)**mu),Math.abs(f-h)<Fg)return 0;let p;if(f>h){const b=(f**Lg-h**Dg)*Vg;p=b<bu?0:b<pu?b-b*gu*Vs:b-Vs}else{const b=(f**Pg-h**Ag)*Og;p=b>-bu?0:b>-pu?b-b*gu*Vs:b+Vs}return p*100}function hn(n){u.warn(`Vuetify: ${n}`)}function co(n){u.warn(`Vuetify error: ${n}`)}function Ng(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 Os=.20689655172413793,zg=n=>n>Os**3?Math.cbrt(n):n/(3*Os**2)+4/29,Hg=n=>n>Os?n**3:3*Os**2*(n-4/29);function wu(n){const e=zg,t=e(n[1]);return[116*t-16,500*(e(n[0]/.95047)-t),200*(t-e(n[2]/1.08883))]}function yu(n){const e=Hg,t=(n[0]+16)/116;return[e(t+n[1]/500)*.95047,e(t),e(t-n[2]/200)*1.08883]}const Ig=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Bg=n=>n<=.0031308?n*12.92:1.055*n**(1/2.4)-.055,Wg=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],$g=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4;function Cu(n){const e=Array(3),t=Bg,i=Ig;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 ho(n){let{r:e,g:t,b:i}=n;const s=[0,0,0],o=$g,l=Wg;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 Eu(n){return!!n&&/^(#|var\(--|(rgb|hsl)a?\()/.test(n)}const xu=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,Gg={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)=>_u({h:n,s:e,l:t,a:i}),hsla:(n,e,t,i)=>_u({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 oi(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"&&xu.test(n)){const{groups:e}=n.match(xu),{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 Gg[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(io(n,["r","g","b"]))return n;if(io(n,["h","s","l"]))return qn(Ru(n));if(io(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 _u(n){return qn(Ru(n))}function Ru(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 Ns(n){const e=Math.round(n).toString(16);return("00".substr(0,2-e.length)+e).toUpperCase()}function jg(n){let{r:e,g:t,b:i,a:s}=n;return`#${[Ns(e),Ns(t),Ns(i),s!==void 0?Ns(Math.round(s*255)):""].join("")}`}function Ug(n){n=Kg(n);let[e,t,i,s]=_g(n,2).map(o=>parseInt(o,16));return s=s===void 0?s:s/255,{r:e,g:t,b:i,a:s}}function Kg(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=tu(tu(n,6),8,"F")),n}function qg(n,e){const t=wu(ho(n));return t[0]=t[0]+e*10,Cu(yu(t))}function Yg(n,e){const t=wu(ho(n));return t[0]=t[0]-e*10,Cu(yu(t))}function Xg(n){const e=oi(n);return ho(e)[1]}function ku(n){const e=Math.abs(vu(oi(0),oi(n)));return Math.abs(vu(oi(16777215),oi(n)))>Math.min(e,50)?"#fff":"#000"}function X(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=X({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),fn=Symbol.for("vuetify:defaults");function Jg(n){return u.ref(n)}function fo(){const n=u.inject(fn);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function zs(n,e){const t=fo(),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=Pt(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=Pt(Pt(f,{prev:f}),f[h])),f}return f.prev?Pt(f.prev,f):f});return u.provide(fn,s),s}function Zg(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 Qg(){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]:fo();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"&&!Zg(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=nb(fn,i);u.provide(fn,u.computed(()=>l.value?Pt((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=X(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=fo();if(!o.value)return n._setup(i,s);const{props:l,provideSubDefaults:c}=Qg(i,i._as??n.name,o),h=n._setup(l,s);return c(),h}}return n}function ge(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?mn:u.defineComponent)(e)}function Su(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return ge()({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 Tu(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 Hs="cubic-bezier(0.4, 0, 0.2, 1)",eb="cubic-bezier(0.0, 0, 0.2, 1)",tb="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 Ci(){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 Mu=0,Is=new WeakMap;function jt(){const n=st("getUid");if(Is.has(n))return Is.get(n);{const e=Mu++;return Is.set(n,e),e}}jt.reset=()=>{Mu=0,Is=new WeakMap};function Lu(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;n;){if(e?ib(n):mo(n))return n;n=n.parentElement}return document.scrollingElement}function Bs(n,e){const t=[];if(e&&n&&!e.contains(n))return t;for(;n&&(mo(n)&&t.push(n),n!==e);)n=n.parentElement;return t}function mo(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 ib(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(n);return["scroll","auto"].includes(e.overflowY)}function nb(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 sb(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 Du={static:ab,connected:ub},rb=X({locationStrategy:{type:[String,Function],default:"static",validator:n=>typeof n=="function"||n in Du},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function ob(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=Du[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 ab(){}function lb(n,e){e?n.style.removeProperty("left"):n.style.removeProperty("right");const t=uo(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 ub(n,e,t){sb(n.activatorEl.value)&&Object.assign(t.value,{position:"fixed",top:0,[n.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:o}=so(()=>{const E=oo(e.location,n.isRtl.value),x=e.origin==="overlap"?E:e.origin==="auto"?ao(E):oo(e.origin,n.isRtl.value);return E.side===x.side&&E.align===lo(x).align?{preferredAnchor:lu(E),preferredOrigin:lu(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,M]=x;V&&g.unobserve(V),_&&g.observe(_),M&&g.unobserve(M),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=lb(n.contentEl.value,n.isRtl.value),_=Bs(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 J=G.getBoundingClientRect(),ee=new un({x:G===document.documentElement?0:J.x,y:G===document.documentElement?0:J.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 M={anchor:s.value,origin:o.value};function F(ie){const G=new un(x),J=Xl(ie.anchor,E),ee=Xl(ie.origin,G);let{x:le,y:_e}=Cg(J,ee);switch(ie.anchor.side){case"top":_e-=p.value[0];break;case"bottom":_e+=p.value[0];break;case"left":le-=p.value[0];break;case"right":le+=p.value[0];break}switch(ie.anchor.align){case"top":_e-=p.value[1];break;case"bottom":_e+=p.value[1];break;case"left":le-=p.value[1];break;case"right":le+=p.value[1];break}return G.x+=le,G.y+=_e,G.width=Math.min(G.width,h.value),G.height=Math.min(G.height,f.value),{overflows:cu(G,V),x:le,y:_e}}let A=0,H=0;const B={x:0,y:0},D={x:!1,y:!1};let I=-1;for(;;){if(I++>10){co("Infinite loop detected in connectedLocationStrategy");break}const{x:ie,y:G,overflows:J}=F(M);A+=ie,H+=G,x.x+=ie,x.y+=G;{const ee=uu(M.anchor),le=J.x.before||J.x.after,_e=J.y.before||J.y.after;let j=!1;if(["x","y"].forEach($=>{if($==="x"&&le&&!D.x||$==="y"&&_e&&!D.y){const Q={anchor:{...M.anchor},origin:{...M.origin}},fe=$==="x"?ee==="y"?lo:ao:ee==="y"?ao:lo;Q.anchor=fe(Q.anchor),Q.origin=fe(Q.origin);const{overflows:we}=F(Q);(we[$].before<=J[$].before&&we[$].after<=J[$].after||we[$].before+we[$].after<(J[$].before+J[$].after)/2)&&(M=Q,j=D[$]=!0)}}),j)continue}J.x.before&&(A+=J.x.before,x.x+=J.x.before),J.x.after&&(A-=J.x.after,x.x-=J.x.after),J.y.before&&(H+=J.y.before,x.y+=J.y.before),J.y.after&&(H-=J.y.after,x.y-=J.y.after);{const ee=cu(x,V);B.x=V.width-ee.x.before-ee.x.after,B.y=V.height-ee.y.before-ee.y.after,A+=ee.x.before,x.x+=ee.x.before,H+=ee.y.before,x.y+=ee.y.before}break}const Y=uu(M.anchor);return Object.assign(t.value,{"--v-overlay-anchor-origin":`${M.anchor.side} ${M.anchor.align}`,transformOrigin:`${M.origin.side} ${M.origin.align}`,top:he(po(H)),left:n.isRtl.value?void 0:he(po(A)),right:n.isRtl.value?he(po(-A)):void 0,minWidth:he(Y==="y"?Math.min(l.value,E.width):l.value),maxWidth:he(Au(Kn(B.x,l.value===1/0?0:l.value,h.value))),maxHeight:he(Au(Kn(B.y,c.value===1/0?0:c.value,f.value)))}),{available:B,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 po(n){return Math.round(n*devicePixelRatio)/devicePixelRatio}function Au(n){return Math.ceil(n*devicePixelRatio)/devicePixelRatio}let go=!0;const Ws=[];function cb(n){!go||Ws.length?(Ws.push(n),bo()):(go=!1,n(),bo())}let Pu=-1;function bo(){cancelAnimationFrame(Pu),Pu=requestAnimationFrame(()=>{const n=Ws.shift();n&&n(),Ws.length?bo():go=!0})}const $s={none:null,close:fb,block:mb,reposition:pb},db=X({scrollStrategy:{type:[String,Function],default:"block",validator:n=>typeof n=="function"||n in $s}},"VOverlay-scroll-strategies");function hb(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=$s[n.scrollStrategy])==null||i.call($s,e,n,t)}))}),u.onScopeDispose(()=>{t==null||t.stop()})}function fb(n){function e(t){n.isActive.value=!1}Fu(n.activatorEl.value??n.contentEl.value,e)}function mb(n,e){var l;const t=(l=n.root.value)==null?void 0:l.offsetParent,i=[...new Set([...Bs(n.activatorEl.value,e.contained?t:void 0),...Bs(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=>mo(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",he(-c.scrollLeft)),c.style.setProperty("--v-body-scroll-y",he(-c.scrollTop)),c!==document.documentElement&&c.style.setProperty("--v-scrollbar-offset",he(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 pb(n,e,t){let i=!1,s=-1,o=-1;function l(c){cb(()=>{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,...Bs(n)];t.forEach(i=>{i.addEventListener("scroll",e,{passive:!0})}),u.onScopeDispose(()=>{t.forEach(i=>{i.removeEventListener("scroll",e)})})}const vo=Symbol.for("vuetify:v-menu"),gb=X({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function bb(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 vb=X({activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...gb()},"VOverlay-activator");function wb(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}=bb(n,M=>{M===(n.openOnHover&&o||h.value&&l)&&!(n.openOnHover&&t.value&&!i.value)&&(t.value!==M&&(c=!0),t.value=M)}),g={onClick:M=>{M.stopPropagation(),s.value=M.currentTarget||M.target,t.value=!t.value},onMouseenter:M=>{var F;(F=M.sourceCapabilities)!=null&&F.firesTouchEvents||(o=!0,s.value=M.currentTarget||M.target,p())},onMouseleave:M=>{o=!1,b()},onFocus:M=>{ln(M.target,":focus-visible")!==!1&&(l=!0,M.stopPropagation(),s.value=M.currentTarget||M.target,p())},onBlur:M=>{l=!1,M.stopPropagation(),b()}},w=u.computed(()=>{const M={};return f.value&&(M.onClick=g.onClick),n.openOnHover&&(M.onMouseenter=g.onMouseenter,M.onMouseleave=g.onMouseleave),h.value&&(M.onFocus=g.onFocus,M.onBlur=g.onBlur),M}),E=u.computed(()=>{const M={};if(n.openOnHover&&(M.onMouseenter=()=>{o=!0,p()},M.onMouseleave=()=>{o=!1,b()}),h.value&&(M.onFocusin=()=>{l=!0,p()},M.onFocusout=()=>{l=!1,b()}),n.closeOnContentClick){const F=u.inject(vo,null);M.onClick=()=>{t.value=!1,F==null||F.closeParents()}}return M}),x=u.computed(()=>{const M={};return n.openOnHover&&(M.onMouseenter=()=>{c&&(o=!0,c=!1,p())},M.onMouseleave=()=>{o=!1,b()}),M});u.watch(i,M=>{M&&(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=to(_.value)})});const k=st("useActivator");let V;return u.watch(()=>!!n.activator,M=>{M&&Ne?(V=u.effectScope(),V.run(()=>{yb(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 yb(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&&Tg(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&&Mg(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 wo(n){return so(()=>{const e=[],t={};if(n.value.background)if(Eu(n.value.background)){if(t.backgroundColor=n.value.background,!n.value.text){const i=ku(t.backgroundColor);t.color=i,t.caretColor=i}}else e.push(`bg-${n.value.background}`);return n.value.text&&(Eu(n.value.text)?(t.color=n.value.text,t.caretColor=n.value.text):e.push(`text-${n.value.text}`)),{colorClasses:e,colorStyles:t}})}function Ei(n,e){const t=u.computed(()=>({text:u.isRef(n)?n.value:e?n[e]:null})),{colorClasses:i,colorStyles:s}=wo(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}=wo(t);return{backgroundColorClasses:i,backgroundColorStyles:s}}const Xn=X({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:he(n.height),maxHeight:he(n.maxHeight),maxWidth:he(n.maxWidth),minHeight:he(n.minHeight),minWidth:he(n.minWidth),width:he(n.width)}))}}const yo=Symbol.for("vuetify:display"),Vu={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Cb=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vu;return Pt(Vu,n)};function Ou(n){return Ne&&!n?window.innerWidth:typeof n=="object"&&n.clientWidth||0}function Nu(n){return Ne&&!n?window.innerHeight:typeof n=="object"&&n.clientHeight||0}function zu(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:Eg,ssr:e==="ssr"}}function Eb(n,e){const{thresholds:t,mobileBreakpoint:i}=Cb(n),s=u.shallowRef(Nu(e)),o=u.shallowRef(zu(e)),l=u.reactive({}),c=u.shallowRef(Ou(e));function h(){s.value=Nu(),c.value=Ou()}function f(){h(),o.value=zu()}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 Hu(){const n=u.inject(yo);if(!n)throw new Error("Could not find Vuetify display injection");return n}function xb(){if(!Ne)return u.shallowRef(!1);const{ssr:n}=Hu();if(n){const e=u.shallowRef(!1);return u.onMounted(()=>{e.value=!0}),e}else return u.shallowRef(!0)}const _b=X({eager:Boolean},"lazy");function Rb(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 kb={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"}},Sb={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 Iu="$vuetify.",Bu=(n,e)=>n.replace(/\{(\d+)\}/g,(t,i)=>String(e[+i])),Wu=(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(Iu))return Bu(i,o);const c=i.replace(Iu,""),h=n.value&&t.value[n.value],f=e.value&&t.value[e.value];let p=Zr(h,c,null);return p||(hn(`Translation key "${i}" not found in "${n.value}", trying fallback locale`),p=Zr(f,c,null)),p||(co(`Translation key "${i}" not found in fallback`),p=i),typeof p!="string"&&(co(`Translation key "${i}" has a non-string value`),p=i),Bu(p,o)};function $u(n,e){return(t,i)=>new Intl.NumberFormat([n.value,e.value],i).format(t)}function Co(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 Gu(n){return e=>{const t=Co(e,"locale",n.current),i=Co(e,"fallback",n.fallback),s=Co(e,"messages",n.messages);return{name:"vuetify",current:t,fallback:i,messages:s,t:Wu(t,i,s),n:$u(t,i),provide:Gu({current:t,fallback:i,messages:s})}}}function Tb(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:kb,...n==null?void 0:n.messages});return{name:"vuetify",current:e,fallback:t,messages:i,t:Wu(e,t,i),n:$u(e,t),provide:Gu({current:e,fallback:t,messages:i})}}const Gs=Symbol.for("vuetify:locale");function Mb(n){return n.name!=null}function Lb(n){const e=n!=null&&n.adapter&&Mb(n==null?void 0:n.adapter)?n==null?void 0:n.adapter:Tb(n),t=Db(e,n);return{...e,...t}}function js(){const n=u.inject(Gs);if(!n)throw new Error("[Vuetify] Could not find injected locale instance");return n}function Db(n,e){const t=u.ref((e==null?void 0:e.rtl)??Sb),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(Gs);if(!n)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:n.isRtl,rtlClasses:n.rtlClasses}}function Ab(){var n,e;return(e=(n=st("useRouter"))==null?void 0:n.proxy)==null?void 0:e.$router}function ju(n,e){const t=u.resolveDynamicComponent("RouterLink"),i=u.computed(()=>!!(n.href||n.to)),s=u.computed(()=>(i==null?void 0:i.value)||su(e,"click")||su(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=X({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Eo=!1;function Pb(n,e){let t=!1,i,s;Ne&&(u.nextTick(()=>{window.addEventListener("popstate",o),i=n==null?void 0:n.beforeEach((l,c,h)=>{Eo?t?e(h):h():setTimeout(()=>t?e(h):h()),Eo=!0}),s=n==null?void 0:n.afterEach(()=>{Eo=!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 xo(){const e=st("useScopeId").vnode.scopeId;return{scopeId:e?{[e]:""}:void 0}}const Ku=Symbol.for("vuetify:stack"),Qn=u.reactive([]);function Fb(n,e,t){const i=st("useStack"),s=!t,o=u.inject(Ku,void 0),l=u.reactive({activeChildren:new Set});u.provide(Ku,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 Vb(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 Us=Symbol.for("vuetify:theme"),Ft=X({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 Ob(){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]=Pt(l,o)}return Pt(es,{...n,themes:e})}function Nb(n){const e=Ob(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"?qg:Yg;for(const V of Qr(e.variations[_],1))w.colors[`${E}-${_}-${V}`]=jg(k(oi(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}`,_=oi(w.colors[E]);w.colors[x]=ku(_)}}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",qu(o.value));for(const[E,x]of Object.entries(s.value))Bi(p,`.v-theme--${E}`,[`color-scheme: ${x.dark?"dark":"normal"}`,...qu(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 Qt(n){st("provideTheme");const e=u.inject(Us,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(Us,s),s}function Bi(n,e,t){n.push(`${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:Fp,basic:Ap};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())}_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 Vp extends dt{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 Op extends dt{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 Np{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 zp extends dt{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,o,l){var c=++this.requestOrder;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=>{!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 Hp{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 Ip{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 Bp extends dt{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 Ni?(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 Ni?t===e:t.element===e})}}yt.tables=[];function Wp(n,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(n),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Gl(n,e){n.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function $p(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 Gp(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=[],M=0,P=0,A=0,H=o,B=0,D=0,I=[];function Y(G){return _*(G.column.definition.widthGrow||1)}function ie(G){return g(G.width)-_*(G.column.definition.widthShrink||0)}return E.forEach(function(G,J){var ee=k?ie(G):Y(G);G.column.minWidth>=ee?V.push(G):G.column.maxWidth&&G.column.maxWidth<ee?(G.width=G.column.maxWidth,x-=G.column.maxWidth,H-=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1,H&&(_=Math.floor(x/H))):(I.push(G),D+=k?G.column.definition.widthShrink||1:G.column.definition.widthGrow||1)}),V.length?(V.forEach(function(G){M+=k?G.width-G.column.minWidth:G.column.minWidth,G.width=G.column.minWidth}),P=x-M,A=D?Math.floor(P/D):P,B=w(I,P,A,k)):(B=D?x-Math.floor(x/D)*D:x,I.forEach(function(G){G.width=k?ie(G):Y(G)})),B}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 jp={fitData:Wp,fitDataFill:Gl,fitDataTable:Gl,fitDataStretch:$p,fitColumns:Gp};class sn extends de{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;sn.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"),sn.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}}sn.moduleName="layout",sn.modes=jp;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 jn extends de{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(jn.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)})}}jn.moduleName="localize",jn.langs=Up;class jl extends de{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)}}jl.moduleName="comms";var Kp=Object.freeze({__proto__:null,LayoutModule:sn,LocalizeModule:jn,CommsModule:jl});class Ul{constructor(e,t){this.bindStaticFunctionality(e),this.bindModules(e,Kp,!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 qp extends dt{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 Ni{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 Np(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Bp(this),this.optionsList=new $l(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 Dp(this),this.rowManager=new Pp(this),this.footerManager=new Vp(this),this.dataLoader=new zp(this),this.alertManager=new qp(this),this.bindModules(),this.options=this.optionsList.generate(Ni.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Hp(this,this.options,this.options.debugEventsExternal),this.eventBus=new Ip(this.options.debugEventsInternal),this.interactionMonitor=new Op(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}}Ni.defaultOptions=Tp,new Ul(Ni);class Kl extends Ni{}new Ul(Kl,Sp);const 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 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)],Xp=[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)],Jp={__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(ct.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"},Yp),u.createElementVNode("button",{onClick:i[1]||(i[1]=s=>u.unref(ct.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"},Xp)],64))}},Zp={__name:"SelectColumn",props:{data:{},index:{}},setup(n){const e=u.ref(!1);function t(i){ct.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 zi;const Qp=({element:n,headers:e,data:t,options:i}={element:null,headers:[],data:[],options:{}})=>(zi=new Kl(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:ql(e),...i}),setTimeout(()=>{zi.setData()}),zi);function ql(n){const e={_select_:{formatter:ig,formatterParams:{component:Zp}},_actions_:{formatter:tg,formatterParams:{component:Jp}},_index_:{formatter:eg}};return n.map(t=>t.field in e?{...t,...e[t.field]}:t)}function eg(n){var e=zi.getPage(),t=zi.getPageSize(),i=n.getRow().getPosition(!0)+(e-1)*t;return i}function tg(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 ig(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 ng(n){zi.setData(n)}function sg(n){zi.setColumns(n)}function rg(n){u.watch(()=>n.mainItems,e=>{ng(e)}),u.watch(()=>n.flatFields,()=>{sg(ql(n.headers))},{deep:!0})}const iT="",Un=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Yl=n=>(u.pushScopeId("data-v-86bb6d78"),n=n(),u.popScopeId(),n),og={key:0,id:"paginate"},ag={class:"flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4"},lg={class:"lg:w-5/5 w-full flex items-center justify-between border-t border-gray-200"},ug={class:"sm:flex hidden"},cg=[Yl(()=>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))],dg=["onClick"],hg={key:1,class:"text-sm font-medium leading-none text-gray-600 pt-3 mr-4 px-2"},fg=[Yl(()=>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))],mg=Un({__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",og,[u.createElementVNode("div",ag,[u.createElementVNode("div",lg,[u.createElementVNode("div",ug,[u.createElementVNode("div",{onClick:i,class:"flex items-center pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"},cg),(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,dg)):(u.openBlock(),u.createElementBlock("p",hg,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"},fg)])])])])):u.createCommentVNode("",!0)}},[["__scopeId","data-v-86bb6d78"]]),pg={key:0,class:"mt-[-20px]"},gg=[u.createElementVNode("div",{class:"flex animate-pulse flex-row items-center h-full justify-center"},[u.createElementVNode("div",{class:"w-full flex flex-col items-start rtl:mr-8 ltr:ml-8"},[u.createElementVNode("div",{class:"w-[70%] bg-muted-300 dark:bg-muted-900 h-2.5 rounded-md"})])],-1)],bg={key:1,class:"padding: 100px; mt-[-20px] rounded-b-xl bg-white text-center p-[100px] dark:bg-muted-800"},vg={class:"dark:text-muted-200 text-muted-600"},wg={__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 rg(t),u.onMounted(()=>{Qp({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",pg,[(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"])},gg,2)),64))])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createElementBlock("div",bg,[u.createElementVNode("h2",vg,u.toDisplayString(o.$fcTr("not_load_or_existing_data")),1)])):u.createCommentVNode("",!0),u.createVNode(mg)],64))}},yg={class:"w-full"},Cg={__name:"MList",setup(n){const e=u.inject("store");function t(l){return"item."+l}function i(l){return"header."+l}function s(l){return e.getItems(e.mainKey).map(c=>c.id).indexOf(l.id)+(15*page-14)}function o(){return{getHeader:i,getField:t,getIndex:s}}return(l,c)=>(u.openBlock(),u.createElementBlock("div",yg,[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(wg),u.normalizeProps(u.guardReactiveProps(o())),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 Xr(n,e){return{x:n.x+e.x,y:n.y+e.y}}function Eg(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Xl(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 Xr({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 Xr({x:s,y:o},e)}return Xr({x:e.width/2,y:e.height/2},e)}const Ne=typeof window<"u",Jr=Ne&&"IntersectionObserver"in window,xg=Ne&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function Jl(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 Zr(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(/^\./,""),Jl(n,e.split("."),t))}function ft(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 Zr(n,e,t);if(Array.isArray(e))return Jl(n,e,t);if(typeof e!="function")return t;const i=e(n,t);return typeof i>"u"?t:i}function Qr(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:n},(t,i)=>e+i)}function he(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 eo(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function to(n){return n&&"$el"in n?n.$el:n}const Zl=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 io(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 Ql=/^on[^a-z]/,no=n=>Ql.test(n),_g=["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 eu(n){const[e,t]=on(n,[Ql]),i=an(e,_g),[s,o]=on(t,["class","style","id",/^data-/]);return Object.assign(s,e),Object.assign(o,i),[s,o]}function Jt(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 tu(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 Rg(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 Ft(){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(eo(o)&&eo(l)){i[s]=Ft(o,l,t);continue}if(Array.isArray(o)&&Array.isArray(l)&&t){i[s]=t(o,l);continue}i[s]=l}return i}function iu(n){return n.map(e=>e.type===u.Fragment?iu(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 Ls(n,e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.map(t=>Ls(n,t)).flat(1);if(Array.isArray(e.children))return e.children.map(t=>Ls(n,t)).flat(1);if(e.component){if(Object.getOwnPropertySymbols(e.component.provides).includes(n))return[e.component];if(e.component.subTree)return Ls(n,e.component.subTree).flat(1)}return[]}function so(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 Ds(n,e){return n.includes(e)}function nu(n){return n[2].toLowerCase()+n.slice(3)}const Zt=()=>[Function,Array];function su(n,e){return e="on"+u.capitalize(e),!!(n[e]||n[`${e}Once`]||n[`${e}Capture`]||n[`${e}OnceCapture`]||n[`${e}CaptureOnce`])}function kg(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 ro(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 ru(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 As(n,e){var i,s,o,l;const t=ro(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=ru(t,e);c?c.focus():As(n,e==="next"?"first":"last")}}function Sg(){}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 ou=["top","bottom"],Tg=["start","end","left","right"];function oo(n,e){let[t,i]=n.split(" ");return i||(i=Ds(ou,t)?"start":Ds(Tg,t)?"top":"center"),{side:au(t,e),align:au(i,e)}}function au(n,e){return n==="start"?e?"right":"left":n==="end"?e?"left":"right":n}function ao(n){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.side],align:n.align}}function lo(n){return{side:n.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[n.align]}}function lu(n){return{side:n.align,align:n.side}}function uu(n){return Ds(ou,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 cu(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 uo(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 Fs=new WeakMap;function Mg(n,e){Object.keys(e).forEach(t=>{if(no(t)){const i=nu(t),s=Fs.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]]),Fs.has(n)||Fs.set(n,o)}}else e[t]==null?n.removeAttribute(t):n.setAttribute(t,e[t])})}function Lg(n,e){Object.keys(e).forEach(t=>{if(no(t)){const i=nu(t),s=Fs.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,du=.2126729,hu=.7151522,fu=.072175,Dg=.55,Ag=.58,Fg=.57,Pg=.62,Ps=.03,mu=1.45,Vg=5e-4,Og=1.25,Ng=1.25,pu=.078,gu=12.82051282051282,Vs=.06,bu=.001;function vu(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*du+i*hu+s*fu,f=o*du+l*hu+c*fu;if(h<=Ps&&(h+=(Ps-h)**mu),f<=Ps&&(f+=(Ps-f)**mu),Math.abs(f-h)<Vg)return 0;let p;if(f>h){const b=(f**Dg-h**Ag)*Og;p=b<bu?0:b<pu?b-b*gu*Vs:b-Vs}else{const b=(f**Pg-h**Fg)*Ng;p=b>-bu?0:b>-pu?b-b*gu*Vs:b+Vs}return p*100}function hn(n){u.warn(`Vuetify: ${n}`)}function co(n){u.warn(`Vuetify error: ${n}`)}function zg(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 Os=.20689655172413793,Hg=n=>n>Os**3?Math.cbrt(n):n/(3*Os**2)+4/29,Ig=n=>n>Os?n**3:3*Os**2*(n-4/29);function wu(n){const e=Hg,t=e(n[1]);return[116*t-16,500*(e(n[0]/.95047)-t),200*(t-e(n[2]/1.08883))]}function yu(n){const e=Ig,t=(n[0]+16)/116;return[e(t+n[1]/500)*.95047,e(t),e(t-n[2]/200)*1.08883]}const Bg=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Wg=n=>n<=.0031308?n*12.92:1.055*n**(1/2.4)-.055,$g=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Gg=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4;function Cu(n){const e=Array(3),t=Wg,i=Bg;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 ho(n){let{r:e,g:t,b:i}=n;const s=[0,0,0],o=Gg,l=$g;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 Eu(n){return!!n&&/^(#|var\(--|(rgb|hsl)a?\()/.test(n)}const xu=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,jg={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)=>_u({h:n,s:e,l:t,a:i}),hsla:(n,e,t,i)=>_u({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 oi(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"&&xu.test(n)){const{groups:e}=n.match(xu),{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 jg[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`),Kg(e)}else if(typeof n=="object"){if(io(n,["r","g","b"]))return n;if(io(n,["h","s","l"]))return qn(Ru(n));if(io(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 _u(n){return qn(Ru(n))}function Ru(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 Ns(n){const e=Math.round(n).toString(16);return("00".substr(0,2-e.length)+e).toUpperCase()}function Ug(n){let{r:e,g:t,b:i,a:s}=n;return`#${[Ns(e),Ns(t),Ns(i),s!==void 0?Ns(Math.round(s*255)):""].join("")}`}function Kg(n){n=qg(n);let[e,t,i,s]=Rg(n,2).map(o=>parseInt(o,16));return s=s===void 0?s:s/255,{r:e,g:t,b:i,a:s}}function qg(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=tu(tu(n,6),8,"F")),n}function Yg(n,e){const t=wu(ho(n));return t[0]=t[0]+e*10,Cu(yu(t))}function Xg(n,e){const t=wu(ho(n));return t[0]=t[0]-e*10,Cu(yu(t))}function Jg(n){const e=oi(n);return ho(e)[1]}function ku(n){const e=Math.abs(vu(oi(0),oi(n)));return Math.abs(vu(oi(16777215),oi(n)))>Math.min(e,50)?"#fff":"#000"}function X(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=X({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),fn=Symbol.for("vuetify:defaults");function Zg(n){return u.ref(n)}function fo(){const n=u.inject(fn);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function zs(n,e){const t=fo(),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=Ft(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=Ft(Ft(f,{prev:f}),f[h])),f}return f.prev?Ft(f.prev,f):f});return u.provide(fn,s),s}function Qg(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 eb(){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]:fo();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"&&!Qg(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=sb(fn,i);u.provide(fn,u.computed(()=>l.value?Ft((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=X(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=fo();if(!o.value)return n._setup(i,s);const{props:l,provideSubDefaults:c}=eb(i,i._as??n.name,o),h=n._setup(l,s);return c(),h}}return n}function ge(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?mn:u.defineComponent)(e)}function Su(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return ge()({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 Tu(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 Hs="cubic-bezier(0.4, 0, 0.2, 1)",tb="cubic-bezier(0.0, 0, 0.2, 1)",ib="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 Ci(){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 Mu=0,Is=new WeakMap;function jt(){const n=st("getUid");if(Is.has(n))return Is.get(n);{const e=Mu++;return Is.set(n,e),e}}jt.reset=()=>{Mu=0,Is=new WeakMap};function Lu(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;n;){if(e?nb(n):mo(n))return n;n=n.parentElement}return document.scrollingElement}function Bs(n,e){const t=[];if(e&&n&&!e.contains(n))return t;for(;n&&(mo(n)&&t.push(n),n!==e);)n=n.parentElement;return t}function mo(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 nb(n){if(!n||n.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(n);return["scroll","auto"].includes(e.overflowY)}function sb(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 rb(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 Du={static:lb,connected:cb},ob=X({locationStrategy:{type:[String,Function],default:"static",validator:n=>typeof n=="function"||n in Du},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function ab(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=Du[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 lb(){}function ub(n,e){e?n.style.removeProperty("left"):n.style.removeProperty("right");const t=uo(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 cb(n,e,t){rb(n.activatorEl.value)&&Object.assign(t.value,{position:"fixed",top:0,[n.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:o}=so(()=>{const E=oo(e.location,n.isRtl.value),x=e.origin==="overlap"?E:e.origin==="auto"?ao(E):oo(e.origin,n.isRtl.value);return E.side===x.side&&E.align===lo(x).align?{preferredAnchor:lu(E),preferredOrigin:lu(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,M]=x;V&&g.unobserve(V),_&&g.observe(_),M&&g.unobserve(M),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=ub(n.contentEl.value,n.isRtl.value),_=Bs(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 J=G.getBoundingClientRect(),ee=new un({x:G===document.documentElement?0:J.x,y:G===document.documentElement?0:J.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 M={anchor:s.value,origin:o.value};function P(ie){const G=new un(x),J=Xl(ie.anchor,E),ee=Xl(ie.origin,G);let{x:le,y:_e}=Eg(J,ee);switch(ie.anchor.side){case"top":_e-=p.value[0];break;case"bottom":_e+=p.value[0];break;case"left":le-=p.value[0];break;case"right":le+=p.value[0];break}switch(ie.anchor.align){case"top":_e-=p.value[1];break;case"bottom":_e+=p.value[1];break;case"left":le-=p.value[1];break;case"right":le+=p.value[1];break}return G.x+=le,G.y+=_e,G.width=Math.min(G.width,h.value),G.height=Math.min(G.height,f.value),{overflows:cu(G,V),x:le,y:_e}}let A=0,H=0;const B={x:0,y:0},D={x:!1,y:!1};let I=-1;for(;;){if(I++>10){co("Infinite loop detected in connectedLocationStrategy");break}const{x:ie,y:G,overflows:J}=P(M);A+=ie,H+=G,x.x+=ie,x.y+=G;{const ee=uu(M.anchor),le=J.x.before||J.x.after,_e=J.y.before||J.y.after;let j=!1;if(["x","y"].forEach($=>{if($==="x"&&le&&!D.x||$==="y"&&_e&&!D.y){const Q={anchor:{...M.anchor},origin:{...M.origin}},fe=$==="x"?ee==="y"?lo:ao:ee==="y"?ao:lo;Q.anchor=fe(Q.anchor),Q.origin=fe(Q.origin);const{overflows:we}=P(Q);(we[$].before<=J[$].before&&we[$].after<=J[$].after||we[$].before+we[$].after<(J[$].before+J[$].after)/2)&&(M=Q,j=D[$]=!0)}}),j)continue}J.x.before&&(A+=J.x.before,x.x+=J.x.before),J.x.after&&(A-=J.x.after,x.x-=J.x.after),J.y.before&&(H+=J.y.before,x.y+=J.y.before),J.y.after&&(H-=J.y.after,x.y-=J.y.after);{const ee=cu(x,V);B.x=V.width-ee.x.before-ee.x.after,B.y=V.height-ee.y.before-ee.y.after,A+=ee.x.before,x.x+=ee.x.before,H+=ee.y.before,x.y+=ee.y.before}break}const Y=uu(M.anchor);return Object.assign(t.value,{"--v-overlay-anchor-origin":`${M.anchor.side} ${M.anchor.align}`,transformOrigin:`${M.origin.side} ${M.origin.align}`,top:he(po(H)),left:n.isRtl.value?void 0:he(po(A)),right:n.isRtl.value?he(po(-A)):void 0,minWidth:he(Y==="y"?Math.min(l.value,E.width):l.value),maxWidth:he(Au(Kn(B.x,l.value===1/0?0:l.value,h.value))),maxHeight:he(Au(Kn(B.y,c.value===1/0?0:c.value,f.value)))}),{available:B,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 po(n){return Math.round(n*devicePixelRatio)/devicePixelRatio}function Au(n){return Math.ceil(n*devicePixelRatio)/devicePixelRatio}let go=!0;const Ws=[];function db(n){!go||Ws.length?(Ws.push(n),bo()):(go=!1,n(),bo())}let Fu=-1;function bo(){cancelAnimationFrame(Fu),Fu=requestAnimationFrame(()=>{const n=Ws.shift();n&&n(),Ws.length?bo():go=!0})}const $s={none:null,close:mb,block:pb,reposition:gb},hb=X({scrollStrategy:{type:[String,Function],default:"block",validator:n=>typeof n=="function"||n in $s}},"VOverlay-scroll-strategies");function fb(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=$s[n.scrollStrategy])==null||i.call($s,e,n,t)}))}),u.onScopeDispose(()=>{t==null||t.stop()})}function mb(n){function e(t){n.isActive.value=!1}Pu(n.activatorEl.value??n.contentEl.value,e)}function pb(n,e){var l;const t=(l=n.root.value)==null?void 0:l.offsetParent,i=[...new Set([...Bs(n.activatorEl.value,e.contained?t:void 0),...Bs(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=>mo(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",he(-c.scrollLeft)),c.style.setProperty("--v-body-scroll-y",he(-c.scrollTop)),c!==document.documentElement&&c.style.setProperty("--v-scrollbar-offset",he(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 gb(n,e,t){let i=!1,s=-1,o=-1;function l(c){db(()=>{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(()=>{Pu(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 Pu(n,e){const t=[document,...Bs(n)];t.forEach(i=>{i.addEventListener("scroll",e,{passive:!0})}),u.onScopeDispose(()=>{t.forEach(i=>{i.removeEventListener("scroll",e)})})}const vo=Symbol.for("vuetify:v-menu"),bb=X({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function vb(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 wb=X({activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...bb()},"VOverlay-activator");function yb(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}=vb(n,M=>{M===(n.openOnHover&&o||h.value&&l)&&!(n.openOnHover&&t.value&&!i.value)&&(t.value!==M&&(c=!0),t.value=M)}),g={onClick:M=>{M.stopPropagation(),s.value=M.currentTarget||M.target,t.value=!t.value},onMouseenter:M=>{var P;(P=M.sourceCapabilities)!=null&&P.firesTouchEvents||(o=!0,s.value=M.currentTarget||M.target,p())},onMouseleave:M=>{o=!1,b()},onFocus:M=>{ln(M.target,":focus-visible")!==!1&&(l=!0,M.stopPropagation(),s.value=M.currentTarget||M.target,p())},onBlur:M=>{l=!1,M.stopPropagation(),b()}},w=u.computed(()=>{const M={};return f.value&&(M.onClick=g.onClick),n.openOnHover&&(M.onMouseenter=g.onMouseenter,M.onMouseleave=g.onMouseleave),h.value&&(M.onFocus=g.onFocus,M.onBlur=g.onBlur),M}),E=u.computed(()=>{const M={};if(n.openOnHover&&(M.onMouseenter=()=>{o=!0,p()},M.onMouseleave=()=>{o=!1,b()}),h.value&&(M.onFocusin=()=>{l=!0,p()},M.onFocusout=()=>{l=!1,b()}),n.closeOnContentClick){const P=u.inject(vo,null);M.onClick=()=>{t.value=!1,P==null||P.closeParents()}}return M}),x=u.computed(()=>{const M={};return n.openOnHover&&(M.onMouseenter=()=>{c&&(o=!0,c=!1,p())},M.onMouseleave=()=>{o=!1,b()}),M});u.watch(i,M=>{M&&(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=to(_.value)})});const k=st("useActivator");let V;return u.watch(()=>!!n.activator,M=>{M&&Ne?(V=u.effectScope(),V.run(()=>{Cb(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 Cb(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&&Mg(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&&Lg(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 wo(n){return so(()=>{const e=[],t={};if(n.value.background)if(Eu(n.value.background)){if(t.backgroundColor=n.value.background,!n.value.text){const i=ku(t.backgroundColor);t.color=i,t.caretColor=i}}else e.push(`bg-${n.value.background}`);return n.value.text&&(Eu(n.value.text)?(t.color=n.value.text,t.caretColor=n.value.text):e.push(`text-${n.value.text}`)),{colorClasses:e,colorStyles:t}})}function Ei(n,e){const t=u.computed(()=>({text:u.isRef(n)?n.value:e?n[e]:null})),{colorClasses:i,colorStyles:s}=wo(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}=wo(t);return{backgroundColorClasses:i,backgroundColorStyles:s}}const Xn=X({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:he(n.height),maxHeight:he(n.maxHeight),maxWidth:he(n.maxWidth),minHeight:he(n.minHeight),minWidth:he(n.minWidth),width:he(n.width)}))}}const yo=Symbol.for("vuetify:display"),Vu={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Eb=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vu;return Ft(Vu,n)};function Ou(n){return Ne&&!n?window.innerWidth:typeof n=="object"&&n.clientWidth||0}function Nu(n){return Ne&&!n?window.innerHeight:typeof n=="object"&&n.clientHeight||0}function zu(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:xg,ssr:e==="ssr"}}function xb(n,e){const{thresholds:t,mobileBreakpoint:i}=Eb(n),s=u.shallowRef(Nu(e)),o=u.shallowRef(zu(e)),l=u.reactive({}),c=u.shallowRef(Ou(e));function h(){s.value=Nu(),c.value=Ou()}function f(){h(),o.value=zu()}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 Hu(){const n=u.inject(yo);if(!n)throw new Error("Could not find Vuetify display injection");return n}function _b(){if(!Ne)return u.shallowRef(!1);const{ssr:n}=Hu();if(n){const e=u.shallowRef(!1);return u.onMounted(()=>{e.value=!0}),e}else return u.shallowRef(!0)}const Rb=X({eager:Boolean},"lazy");function kb(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 Sb={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"}},Tb={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 Iu="$vuetify.",Bu=(n,e)=>n.replace(/\{(\d+)\}/g,(t,i)=>String(e[+i])),Wu=(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(Iu))return Bu(i,o);const c=i.replace(Iu,""),h=n.value&&t.value[n.value],f=e.value&&t.value[e.value];let p=Zr(h,c,null);return p||(hn(`Translation key "${i}" not found in "${n.value}", trying fallback locale`),p=Zr(f,c,null)),p||(co(`Translation key "${i}" not found in fallback`),p=i),typeof p!="string"&&(co(`Translation key "${i}" has a non-string value`),p=i),Bu(p,o)};function $u(n,e){return(t,i)=>new Intl.NumberFormat([n.value,e.value],i).format(t)}function Co(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 Gu(n){return e=>{const t=Co(e,"locale",n.current),i=Co(e,"fallback",n.fallback),s=Co(e,"messages",n.messages);return{name:"vuetify",current:t,fallback:i,messages:s,t:Wu(t,i,s),n:$u(t,i),provide:Gu({current:t,fallback:i,messages:s})}}}function Mb(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:Sb,...n==null?void 0:n.messages});return{name:"vuetify",current:e,fallback:t,messages:i,t:Wu(e,t,i),n:$u(e,t),provide:Gu({current:e,fallback:t,messages:i})}}const Gs=Symbol.for("vuetify:locale");function Lb(n){return n.name!=null}function Db(n){const e=n!=null&&n.adapter&&Lb(n==null?void 0:n.adapter)?n==null?void 0:n.adapter:Mb(n),t=Ab(e,n);return{...e,...t}}function js(){const n=u.inject(Gs);if(!n)throw new Error("[Vuetify] Could not find injected locale instance");return n}function Ab(n,e){const t=u.ref((e==null?void 0:e.rtl)??Tb),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(Gs);if(!n)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:n.isRtl,rtlClasses:n.rtlClasses}}function Fb(){var n,e;return(e=(n=st("useRouter"))==null?void 0:n.proxy)==null?void 0:e.$router}function ju(n,e){const t=u.resolveDynamicComponent("RouterLink"),i=u.computed(()=>!!(n.href||n.to)),s=u.computed(()=>(i==null?void 0:i.value)||su(e,"click")||su(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=X({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Eo=!1;function Pb(n,e){let t=!1,i,s;Ne&&(u.nextTick(()=>{window.addEventListener("popstate",o),i=n==null?void 0:n.beforeEach((l,c,h)=>{Eo?t?e(h):h():setTimeout(()=>t?e(h):h()),Eo=!0}),s=n==null?void 0:n.afterEach(()=>{Eo=!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 xo(){const e=st("useScopeId").vnode.scopeId;return{scopeId:e?{[e]:""}:void 0}}const Ku=Symbol.for("vuetify:stack"),Qn=u.reactive([]);function Vb(n,e,t){const i=st("useStack"),s=!t,o=u.inject(Ku,void 0),l=u.reactive({activeChildren:new Set});u.provide(Ku,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 Ob(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 Us=Symbol.for("vuetify:theme"),Pt=X({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 Nb(){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]=Ft(l,o)}return Ft(es,{...n,themes:e})}function zb(n){const e=Nb(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"?Yg:Xg;for(const V of Qr(e.variations[_],1))w.colors[`${E}-${_}-${V}`]=Ug(k(oi(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}`,_=oi(w.colors[E]);w.colors[x]=ku(_)}}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",qu(o.value));for(const[E,x]of Object.entries(s.value))Bi(p,`.v-theme--${E}`,[`color-scheme: ${x.dark?"dark":"normal"}`,...qu(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 Qt(n){st("provideTheme");const e=u.inject(Us,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(Us,s),s}function Bi(n,e,t){n.push(`${e} {
46
46
  `,...t.map(i=>` ${i};
47
47
  `),`}
48
- `)}function qu(n){const e=n.dark?2:1,t=n.dark?1:2,i=[];for(const[s,o]of Object.entries(n.colors)){const l=oi(o);i.push(`--v-theme-${s}: ${l.r},${l.g},${l.b}`),s.startsWith("on-")||i.push(`--v-theme-${s}-overlay-multiplier: ${Xg(o)>.18?e:t}`)}for(const[s,o]of Object.entries(n.variables)){const l=typeof o=="string"&&o.startsWith("#")?oi(o):void 0,c=l?`${l.r}, ${l.g}, ${l.b}`:void 0;i.push(`--v-${s}: ${c??o}`)}return i}const pn=X({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:n=>n!==!0}},"transition"),xi=(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 zb(){return!0}function Yu(n,e,t){if(!n||Xu(n,t)===!1)return!1;const i=Tu(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 Xu(n,e){return(typeof e.value=="object"&&e.value.closeConditional||zb)(n)}function Hb(n,e,t){const i=typeof t.value=="function"?t.value:t.value.handler;e._clickOutside.lastMousedownWasOutside&&Yu(n,e,t)&&setTimeout(()=>{Xu(n,t)&&i&&i(n)},0)}function Ju(n,e){const t=Tu(n);e(document),typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&e(t)}const Ib={mounted(n,e){const t=s=>Hb(s,n,e),i=s=>{n._clickOutside.lastMousedownWasOutside=Yu(s,n,e)};Ju(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&&(Ju(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 Bb(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 _o=X({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},...vb(),...Ve(),...Xn(),..._b(),...rb(),...db(),...Ft(),...pn()},"VOverlay"),Ks=ge()({name:"VOverlay",directives:{ClickOutside:Ib},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,..._o()},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}=Vb(u.computed(()=>n.attach||n.contained)),{themeClasses:h}=Qt(n),{rtlClasses:f,isRtl:p}=Zn(),{hasContent:b,onAfterLeave:g}=Rb(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:M,contentEvents:F,scrimEvents:A}=wb(n,{isActive:l,isTop:x}),{dimensionStyles:H}=Jn(n),B=xb(),{scopeId:D}=xo();u.watch(()=>n.disabled,Q=>{Q&&(l.value=!1)});const I=u.ref(),Y=u.ref(),{contentStyles:ie,updateLocation:G}=ob(n,{isRtl:p,contentEl:Y,activatorEl:k,isActive:l});hb(n,{root:I,contentEl:Y,activatorEl:k,isActive:l,updateLocation:G});function J(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",le):window.removeEventListener("keydown",le)},{immediate:!0});function le(Q){var fe,we;Q.key==="Escape"&&E.value&&(n.persistent?$():(l.value=!1,(fe=Y.value)!=null&&fe.contains(document.activeElement)&&((we=k.value)==null||we.focus())))}const _e=Ab();Hi(()=>n.closeOnBack,()=>{Pb(_e,Q=>{E.value&&l.value?(Q(!1),n.persistent?$():l.value=!1):Q()})});const j=u.ref();u.watch(()=>l.value&&(n.absolute||n.contained)&&c.value==null,Q=>{if(Q){const fe=Lu(I.value);fe&&fe!==document.scrollingElement&&(j.value=fe.scrollTop)}});function $(){n.noClickAnimation||Y.value&&cn(Y.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Hs})}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},M.value,n.activatorProps)}),B.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:he(j.value)},n.style],ref:I},D,i),[u.createVNode(Bb,u.mergeProps({color:w,modelValue:l.value&&!!n.scrim},A.value),null),u.createVNode(xi,{appear:!0,persisted:!0,transition:n.transition,target:k.value,onAfterLeave:()=>{g(),s("afterLeave")}},{default:()=>{var fe;return[u.withDirectives(u.createVNode("div",u.mergeProps({ref:Y,class:["v-overlay__content",n.contentClass],style:[H.value,ie.value]},F.value,n.contentProps),[(fe=t.default)==null?void 0:fe.call(t,{isActive:l})]),[[u.vShow,l.value],[u.resolveDirective("click-outside"),{handler:J,closeConditional:ee,include:()=>[k.value]}]])]}})])]})])}),{activatorEl:k,animateClick:$,contentEl:Y,globalTop:E,localTop:x,updateLocation:G}}}),Ro=Symbol("Forwarded refs");function ko(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[Ro]=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=ko(h.value,o)??("_"in h.value?ko((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[Ro];if(!f)continue;const p=f.slice();for(;p.length;){const b=p.shift(),g=ko(b.value,o);if(g)return g;const w=b.value&&b.value[Ro];w&&p.push(...w)}}}}})}const Wb=X({id:String,text:String,...an(_o({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=ge()({name:"VTooltip",props:Wb(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=xo(),o=jt(),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]=Ks.filterProps(n);return u.createVNode(Ks,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)}}),lT="",$b=X({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Ct(n,e,t){return ge()({name:n,props:$b({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 Zu(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return ge()({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 Qu(){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 Gb=X({target:Object},"v-dialog-transition"),ec=ge()({name:"VDialogTransition",props:Gb(),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}=ic(n.target,s),b=cn(s,[{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0},{}],{duration:225*p,easing:eb});(g=tc(s))==null||g.forEach(w=>{cn(w,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*p,easing:Hs})}),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}=ic(n.target,s);cn(s,[{},{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0}],{duration:125*p,easing:tb}).finished.then(()=>o()),(g=tc(s))==null||g.forEach(w=>{cn(w,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*p,easing:Hs})})},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 tc(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 ic(n,e){const t=n.getBoundingClientRect(),i=uo(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 nc=Ct("slide-y-transition");Ct("slide-y-reverse-transition");const jb=Zu("expand-transition",Qu()),sc=Zu("expand-x-transition",Qu("",!0)),Ub=X({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),ei=ge(!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 zs(i,{reset:o,root:l,scoped:c,disabled:s}),()=>{var h;return(h=t.default)==null?void 0:h.call(t)}}}),Kb=X({id:String,...an(_o({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:ec}}),["absolute"])},"VMenu"),ns=ge()({name:"VMenu",props:Kb(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=xo(),o=jt(),l=u.computed(()=>n.id||`v-menu-${o}`),c=u.ref(),h=u.inject(vo,null),f=u.shallowRef(0);u.provide(vo,{register(){++f.value},unregister(){--f.value},closeParents(){setTimeout(()=>{f.value||(i.value=!1,h==null||h.closeParents())},40)}});async function p(x){var V,M,F;const _=x.relatedTarget,k=x.target;await u.nextTick(),i.value&&_!==k&&((V=c.value)!=null&&V.contentEl)&&((M=c.value)!=null&&M.globalTop)&&![document,c.value.contentEl].includes(k)&&!c.value.contentEl.contains(k)&&((F=ro(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"&&(ru(ro((_=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(),As(_,"next")):x.key==="ArrowUp"&&(x.preventDefault(),As(_,"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]=Ks.filterProps(n);return u.createVNode(Ks,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(ei,{root:"VMenu"},{default:()=>{var M;return[(M=t.default)==null?void 0:M.call(t,...k)]}})}})}),ts({id:l,ΨopenChildren:f},c)}}),qb={class:"flex items-center gap-3 relative hover:bg-muted-200 rounded-lg px-5 pl-3 rtl:pl-8 rtl:pr-5 py-2 duration-300 rtl:flex-row-reverse"},Yb=["modelValue"],Xb={class:"text-success-500 peer-disabled:opacity-75"},Jb=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),Zb={class:"font-heading text-muted-800 text-xs font-semibold leading-tight dark:text-white"},Qb={__name:"SelectColumnItem",props:{checked:{default:!1},columnName:{default:""}},setup(n){const e=n;return(t,i)=>(u.openBlock(),u.createElementBlock("div",qb,[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,onClick:i[0]||(i[0]=s=>t.$emit("toggle")),type:"checkbox",class:"peer cursor-pointer disabled:cursor-not-allowed","true-value":"true","false-value":"false"},null,8,Yb),u.createElementVNode("label",Xb,[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),Jb])],2),u.createElementVNode("div",null,[u.createElementVNode("h6",Zb,u.toDisplayString(n.columnName),1)])]))}},uT="",ai=n=>(u.pushScopeId("data-v-d876d2e0"),n=n(),u.popScopeId(),n),ev={class:"fc-header"},tv={class:"fc-header-left-sid"},iv=[ai(()=>u.createElementVNode("svg",{viewBox:"0 0 24 24"},[u.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1))],nv={class:"z-[1]"},sv={class:"bg-muted-200 cursor-pointer rounded-b-xl fm-light-shadow"},rv={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 rounded-xl justify-end"},ov={class:"text-muted-400 font-sans text-xs"},av=ai(()=>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)),lv={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 rounded-xl justify-end"},uv={class:"text-muted-400 font-sans text-xs"},cv=ai(()=>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)),dv={class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-300 rounded-xl justify-end"},hv={class:"text-muted-400 font-sans text-xs"},fv=ai(()=>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)),mv=[ai(()=>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))],pv=[ai(()=>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))],gv=[ai(()=>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))],bv={class:"bg-white rounded-xl rtl:text-right ltr:text-left fm-light-shadow"},vv={class:"m-3 mt-2"},wv={class:"p-2"},yv={class:"fm-header-rigth-sid flex w-full sm:w-auto rtl:flex-row-reverse rtl:justify-end z-10"},Cv={key:0},Ev=[ai(()=>u.createElementVNode("span",null,null,-1))],xv=[ai(()=>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))],_v={class:"group/nui-input relative rtl:"},Rv=["placeholder"],kv=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-d876d2e0><svg class="icon h-[1.15rem] w-[1.15rem]" width="1em" height="1em" viewBox="0 0 24 24" data-v-d876d2e0><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-d876d2e0><circle cx="11" cy="11" r="8" data-v-d876d2e0></circle><path d="m21 21l-4.35-4.35" data-v-d876d2e0></path></g></svg></div>',1),Sv=Un({__name:"MButtonBox",setup(n){const{event:e}=ct.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",ev,[u.createElementVNode("div",tv,[u.createVNode(u.unref(is),{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"))}),iv,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",nv,u.toDisplayString(h.$fcTr("export")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",sv,[u.createElementVNode("a",rv,[u.createElementVNode("p",ov,u.toDisplayString(h.$fcTr("export_as_pdf")),1),av]),u.createElementVNode("a",lv,[u.createElementVNode("p",uv,u.toDisplayString(h.$fcTr("export_as_excel")),1),cv]),u.createElementVNode("a",dv,[u.createElementVNode("p",hv,u.toDisplayString(h.$fcTr("print")),1),fv])])]),_:1}),u.createVNode(u.unref(is),{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.Professor}),viewBox:"0 0 512 512"},mv,2))],16)]),_:1},8,["text"]),u.createVNode(u.unref(is),{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}),pv,16)]),_:1},8,["text"]),u.createVNode(u.unref(ns),{"close-on-content-click":!1,location:s.value==="rtl"?"start":"end"},{activator:u.withCtx(({props:p})=>[u.createVNode(u.unref(is),{location:"bottom"},{activator:u.withCtx(({props:b})=>[u.createElementVNode("button",u.mergeProps({...p,...b},{class:["fc-header-icon-btn",[JSON.parse(p["aria-expanded"])?"!bg-white":"",JSON.parse(p["aria-expanded"])?s.value==="rtl"?"expanded-rtl":"expanded2":""]]}),gv,16)]),default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(h.$fcTr("custom_column")),1)]),_:2},1024)]),default:u.withCtx(()=>[u.createElementVNode("div",bv,[u.createElementVNode("div",vv,u.toDisplayString(h.$fcTr("custom_column")),1),u.createElementVNode("ul",wv,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(t).flatFieldsWithoutActions,p=>(u.openBlock(),u.createBlock(Qb,{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",yv,[u.createVNode(u.unref(is),{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 !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",Cv,Ev)):u.createCommentVNode("",!0)]),_:1}),(u.openBlock(),u.createElementBlock("svg",{class:u.normalizeClass(u.unref(t).panel==="filters"?"!fill-primary-700":""),stroke:"currentColor",viewBox:"0 0 512 512"},xv,2))],16)]),_:1},8,["text"]),u.createElementVNode("div",_v,[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,Rv),kv])])]))}},[["__scopeId","data-v-d876d2e0"]]),bT="",vT="",wT="",Tv={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"},Mv={component:n=>u.h(ac,{...n,class:"mdi"})},$e=[String,Function,Object,Array],So=Symbol.for("vuetify:icons"),qs=X({icon:{type:$e},tag:{type:String,required:!0}},"icon"),rc=ge()({name:"VComponentIcon",props:qs(),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)]}})}}}),oc=mn({name:"VSvgIcon",inheritAttrs:!1,props:qs(),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:qs(),setup(n){return()=>u.createVNode(n.tag,null,{default:()=>[n.icon]})}});const ac=mn({name:"VClassIcon",props:qs(),setup(n){return()=>u.createVNode(n.tag,{class:n.icon},null)}}),Lv={svg:{component:oc},class:{component:ac}};function Dv(n){return Pt({defaultSet:"mdi",sets:{...Lv,mdi:Mv},aliases:{...Tv,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 Av=n=>{const e=u.inject(So);if(!e)throw new Error("Missing Vuetify Icons provide!");return{iconData:u.computed(()=>{var h;const i=u.unref(n);if(!i)return{component:rc};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:oc,icon:s};if(typeof s!="string")return{component:rc,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}})}},Pv=["x-small","small","default","large","x-large"],To=X({size:{type:[String,Number],default:"default"}},"size");function Mo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return so(()=>{let t,i;return Ds(Pv,n.size)?t=`${e}--size-${n.size}`:n.size&&(i={width:he(n.size),height:he(n.size)}),{sizeClasses:t,sizeStyles:i}})}const li=X({tag:{type:String,default:"div"}},"tag"),Fv=X({color:String,start:Boolean,end:Boolean,icon:$e,...Ve(),...To(),...li({tag:"i"}),...Ft()},"VIcon"),Et=ge()({name:"VIcon",props:Fv(),setup(n,e){let{attrs:t,slots:i}=e;const s=u.ref(),{themeClasses:o}=Qt(n),{iconData:l}=Av(u.computed(()=>s.value||n.icon)),{sizeClasses:c}=Mo(n),{textColorClasses:h,textColorStyles:f}=Ei(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=iu(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:he(n.size),height:he(n.size),width:he(n.size)},f.value,n.style],role:t.onClick?"button":void 0,"aria-hidden":!t.onClick},{default:()=>[p]})}),{}}}),yT="",Vv=X({text:String,clickable:Boolean,...Ve(),...Ft()},"VLabel"),lc=ge()({name:"VLabel",props:Vv(),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)])}),{}}}),CT="",Ov=[null,"default","comfortable","compact"],gn=X({density:{type:String,default:"default",validator:n=>Ov.includes(n)}},"density");function bn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return{densityClasses:u.computed(()=>`${e}--density-${n.density}`)}}const uc=Symbol.for("vuetify:selection-control-group"),cc=X({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"),Nv=X({...cc({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");ge()({name:"VSelectionControlGroup",props:Nv(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),s=jt(),o=u.computed(()=>n.id||`v-selection-control-group-${s}`),l=u.computed(()=>n.name||o.value),c=new Set;return u.provide(uc,{modelValue:i,forceUpdate:()=>{c.forEach(h=>h())},onForceUpdate:h=>{c.add(h),u.onScopeDispose(()=>{c.delete(h)})}}),zs({[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 ET="",Lo=Symbol("rippleStop"),zv=80;function dc(n,e){n.style.transform=e,n.style.webkitTransform=e}function Do(n){return n.constructor.name==="TouchEvent"}function hc(n){return n.constructor.name==="KeyboardEvent"}const Hv=function(n,e){var b;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=0,s=0;if(!hc(n)){const g=e.getBoundingClientRect(),w=Do(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}},Ys={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}=Hv(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"),dc(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"),dc(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 fc(n){return typeof n>"u"||!!n}function ss(n){const e={},t=n.currentTarget;if(!(!(t!=null&&t._ripple)||t._ripple.touched||n[Lo])){if(n[Lo]=!0,Do(n))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(e.center=t._ripple.centered||hc(n),t._ripple.class&&(e.class=t._ripple.class),Do(n)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{Ys.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)},zv)}else Ys.show(n,t,e)}}function mc(n){n[Lo]=!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)}),Ys.hide(e)}}function pc(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 gc(n){!rs&&(n.keyCode===Zl.enter||n.keyCode===Zl.space)&&(rs=!0,ss(n))}function bc(n){rs=!1,xt(n)}function vc(n){rs&&(rs=!1,xt(n))}function wc(n,e,t){const{value:i,modifiers:s}=e,o=fc(i);if(o||Ys.hide(n),n._ripple=n._ripple??{},n._ripple.enabled=o,n._ripple.centered=s.center,n._ripple.circle=s.circle,eo(i)&&i.class&&(n._ripple.class=i.class),o&&!t){if(s.stop){n.addEventListener("touchstart",mc,{passive:!0}),n.addEventListener("mousedown",mc);return}n.addEventListener("touchstart",ss,{passive:!0}),n.addEventListener("touchend",xt,{passive:!0}),n.addEventListener("touchmove",pc,{passive:!0}),n.addEventListener("touchcancel",xt),n.addEventListener("mousedown",ss),n.addEventListener("mouseup",xt),n.addEventListener("mouseleave",xt),n.addEventListener("keydown",gc),n.addEventListener("keyup",bc),n.addEventListener("blur",vc),n.addEventListener("dragstart",xt,{passive:!0})}else!o&&t&&yc(n)}function yc(n){n.removeEventListener("mousedown",ss),n.removeEventListener("touchstart",ss),n.removeEventListener("touchend",xt),n.removeEventListener("touchmove",pc),n.removeEventListener("touchcancel",xt),n.removeEventListener("mouseup",xt),n.removeEventListener("mouseleave",xt),n.removeEventListener("keydown",gc),n.removeEventListener("keyup",bc),n.removeEventListener("dragstart",xt),n.removeEventListener("blur",vc)}function Iv(n,e){wc(n,e,!1)}function Bv(n){delete n._ripple,yc(n)}function Wv(n,e){if(e.value===e.oldValue)return;const t=fc(e.oldValue);wc(n,e,t)}const Ao={mounted:Iv,unmounted:Bv,updated:Wv},Cc=X({label:String,trueValue:null,falseValue:null,value:null,...Ve(),...cc()},"VSelectionControl");function $v(n){const e=u.inject(uc,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?[...Jt(i.value),g]:Jt(i.value).filter(E=>!n.valueComparator(E,s.value))),e?e.modelValue.value=w:i.value=w}}),{textColorClasses:h,textColorStyles:f}=Ei(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 Ec=ge()({name:"VSelectionControl",directives:{Ripple:Ao},inheritAttrs:!1,props:Cc(),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}=$v(n),b=jt(),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 _(M){w.value=!0,ln(M.target,":focus-visible")!==!1&&(E.value=!0)}function k(){w.value=!1,E.value=!1}function V(M){n.readonly&&s&&u.nextTick(()=>s.forceUpdate()),c.value=M.target.checked}return Me(()=>{var B,D;const M=i.label?i.label({label:n.label,props:{for:g.value}}):n.label,[F,A]=eu(t),H=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},A),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},[(B=i.default)==null?void 0:B.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:H,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),H])]),[[u.resolveDirective("ripple"),n.ripple&&[!n.disabled&&!n.readonly,null,["center","circle"]]]])]),M&&u.createVNode(lc,{for:g.value,clickable:!0,onClick:I=>I.stopPropagation()},{default:()=>[M]})])}),{isFocused:w,input:x}}}),Gv=X({indeterminate:Boolean,indeterminateIcon:{type:$e,default:"$checkboxIndeterminate"},...Cc({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),xc=ge()({name:"VCheckboxBtn",props:Gv(),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(Ec.filterProps(n)[0],["modelValue"]);return u.createVNode(Ec,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)}),{}}}),xT="";function _c(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 _T="",jv=X({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ve(),...pn({transition:{component:nc,leaveAbsolute:!0,group:!0}})},"VMessages"),Uv=ge()({name:"VMessages",props:jv(),setup(n,e){let{slots:t}=e;const i=u.computed(()=>Jt(n.messages)),{textColorClasses:s,textColorStyles:o}=Ei(u.computed(()=>n.color));return Me(()=>u.createVNode(xi,{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]))]})),{}}}),Rc=X({focused:Boolean,"onUpdate:focused":Zt()},"focus");function kc(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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 Kv=Symbol.for("vuetify:form");function Po(){return u.inject(Kv,null)}const qv=X({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,...Rc()},"validation");function Yv(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci(),t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jt();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(()=>!!(Jt(i.value===""?null:i.value).length||Jt(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?Jt(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 A=new Set((F==null?void 0:F.split(" "))??[]);return{blur:A.has("blur")||A.has("input"),input:A.has("input"),submit:A.has("submit"),lazy:A.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:M,reset:k,resetValidation:V})}),u.onBeforeUnmount(()=>{o==null||o.unregister(_.value)}),u.onMounted(async()=>{g.value.lazy||await M(!0),o==null||o.update(_.value,w.value,b.value)}),Hi(()=>g.value.input,()=>{u.watch(s,()=>{if(s.value!=null)M();else if(n.focused){const F=u.watch(()=>n.focused,A=>{A||M(),F()})}})}),Hi(()=>g.value.blur,()=>{u.watch(()=>n.focused,F=>{F||M()})}),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=[]:M(!0)}async function M(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const A=[];E.value=!0;for(const H of n.rules){if(A.length>=+(n.maxErrors??1))break;const D=await(typeof H=="function"?H:()=>H)(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}A.push(D||"")}}return l.value=A,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:M,validationClasses:x}}const Sc=X({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":Zt(),"onClick:append":Zt(),...Ve(),...gn(),...qv()},"VInput"),Tc=ge()({name:"VInput",props:{...Sc()},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}=_c(n),h=jt(),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:M,validate:F,validationClasses:A}=Yv(n,"v-input",f),H=u.computed(()=>({id:f,messagesId:p,isDirty:g,isDisabled:w,isReadonly:E,isPristine:x,isValid:_,isValidating:k,reset:V,resetValidation:M,validate:F})),B=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,J,ee,le;const D=!!(i.prepend||n.prependIcon),I=!!(i.append||n.appendIcon),Y=B.value.length>0,ie=!n.hideDetails||n.hideDetails==="auto"&&(Y||!!i.details);return u.createVNode("div",{class:["v-input",`v-input--${n.direction}`,{"v-input--center-affix":n.centerAffix},o.value,l.value,A.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,H.value),n.prependIcon&&u.createVNode(c,{key:"prepend-icon",name:"prepend"},null)]),i.default&&u.createVNode("div",{class:"v-input__control"},[(J=i.default)==null?void 0:J.call(i,H.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,H.value)]),ie&&u.createVNode("div",{class:"v-input__details"},[u.createVNode(Uv,{id:p.value,active:Y,messages:B.value},{message:i.message}),(le=i.details)==null?void 0:le.call(i,H.value)])])}),{reset:V,resetValidation:M,validate:F}}}),RT="",kT="",ST="",TT="";function Xv(n){return{aspectStyles:u.computed(()=>{const e=Number(n.aspectRatio);return e?{paddingBottom:String(1/e*100)+"%"}:void 0})}}const Mc=X({aspectRatio:[String,Number],contentClass:String,inline:Boolean,...Ve(),...Xn()},"VResponsive"),Lc=ge()({name:"VResponsive",props:Mc(),setup(n,e){let{slots:t}=e;const{aspectStyles:i}=Xv(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 Jv(n,e){if(!Jr)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?Dc(n,e):f.init=!0},o);n._observe=Object(n._observe),n._observe[e.instance.$.uid]={init:!1,observer:l},l.observe(n)}function Dc(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 Fo={mounted:Jv,unmounted:Dc},Zv=X({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,...Mc(),...Ve(),...pn()},"VImg"),Qv=ge()({name:"VImg",directives:{intersect:Fo},props:Zv(),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)&&!(Jr&&!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,Y;if(t("loadstart",((I=o.value)==null?void 0:I.currentSrc)||f.value.src),(Y=o.value)!=null&&Y.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 Y=()=>{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(Y,I):(D.currentSrc.endsWith(".svg")||D.currentSrc.startsWith("data:image/svg+xml"))&&(c.value=1,h.value=1)};Y()}const k=u.computed(()=>({"v-img__img--cover":n.cover,"v-img__img--contain":!n.cover})),V=()=>{var Y;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=(Y=i.sources)==null?void 0:Y.call(i);return u.createVNode(xi,{transition:n.transition,appear:!0},{default:()=>[u.withDirectives(I?u.createVNode("picture",{class:"v-img__picture"},[I,D]):D,[[u.vShow,l.value==="loaded"]])]})},M=()=>u.createVNode(xi,{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(xi,{transition:n.transition,appear:!0},{default:()=>[(l.value==="loading"||l.value==="error"&&!i.error)&&u.createVNode("div",{class:"v-img__placeholder"},[i.placeholder()])]}):null,A=()=>i.error?u.createVNode(xi,{transition:n.transition,appear:!0},{default:()=>[l.value==="error"&&u.createVNode("div",{class:"v-img__error"},[i.error()])]}):null,H=()=>n.gradient?u.createVNode("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${n.gradient})`}},null):null,B=u.shallowRef(!1);{const D=u.watch(p,I=>{I&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})}),D())})}return Me(()=>{const[D]=Lc.filterProps(n);return u.withDirectives(u.createVNode(Lc,u.mergeProps({class:["v-img",{"v-img--booting":!B.value},n.class],style:[{width:he(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(M,null,null),u.createVNode(H,null,null),u.createVNode(F,null,null),u.createVNode(A,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=X({rounded:{type:[Boolean,Number,String],default:void 0}},"rounded");function wn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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 ew=["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=X({color:String,variant:{type:String,default:"elevated",validator:n=>ew.includes(n)}},"variant");function Oo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();const t=u.computed(()=>{const{variant:o}=u.unref(n);return`${e}--variant-${o}`}),{colorClasses:i,colorStyles:s}=wo(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 tw=X({start:Boolean,end:Boolean,icon:$e,image:String,...Ve(),...gn(),...vn(),...To(),...li(),...Ft(),...os({variant:"flat"})},"VAvatar"),Xs=ge()({name:"VAvatar",props:tw(),setup(n,e){let{slots:t}=e;const{themeClasses:i}=Qt(n),{colorClasses:s,colorStyles:o,variantClasses:l}=Oo(n),{densityClasses:c}=bn(n),{roundedClasses:h}=wn(n),{sizeClasses:f,sizeStyles:p}=Mo(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(Qv,{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")]}})),{}}}),MT="",iw=X({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),nw=X({value:null,disabled:Boolean,selectedClass:String},"group-item");function sw(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=jt();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 rw(n,e){let t=!1;const i=u.reactive([]),s=We(n,"modelValue",[],g=>g==null?[]:Ac(i,Jt(g)),g=>{const w=aw(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=Ls(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=>ow(i,g)};return u.provide(e,b),b}function ow(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 aw(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 Pc=Symbol.for("vuetify:v-chip-group"),lw=X({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:rn},...Ve(),...iw({selectedClass:"v-chip--selected"}),...li(),...Ft(),...os({variant:"tonal"})},"VChipGroup");ge()({name:"VChipGroup",props:lw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const{themeClasses:i}=Qt(n),{isSelected:s,select:o,next:l,prev:c,selected:h}=rw(n,Pc);return zs({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=X({border:[Boolean,Number,String]},"border");function zo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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=X({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 uw=X({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:Zt(),onClickOnce:Zt(),...No(),...Ve(),...gn(),...Ho(),...nw(),...vn(),...Uu(),...To(),...li({tag:"span"}),...Ft(),...os({variant:"tonal"})},"VChip"),Fc=ge()({name:"VChip",directives:{Ripple:Ao},props:uw(),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}=Mo(n),{themeClasses:E}=Qt(n),x=We(n,"modelValue"),_=sw(n,Pc,!1),k=ju(n,t),V=u.computed(()=>n.link!==!1&&k.isLink.value),M=u.computed(()=>!n.disabled&&n.link!==!1&&(!!_||n.link||k.isClickable.value)),F=u.computed(()=>({"aria-label":o(n.closeLabel),onClick(B){B.stopPropagation(),x.value=!1,i("click:close",B)}}));function A(B){var D;i("click",B),M.value&&((D=k.navigate)==null||D.call(k,B),_==null||_.toggle())}function H(B){(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),A(B))}return()=>{const B=k.isLink.value?"a":n.tag,D=!!(n.appendIcon||n.appendAvatar),I=!!(D||s.append),Y=!!(s.close||n.closable),ie=!!(s.filter||n.filter)&&_,G=!!(n.prependIcon||n.prependAvatar),J=!!(G||s.prepend),ee=!_||_.isSelected.value;return x.value&&u.withDirectives(u.createVNode(B,{class:["v-chip",{"v-chip--disabled":n.disabled,"v-chip--label":n.label,"v-chip--link":M.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:M.value?0:void 0,onClick:A,onKeydown:M.value&&!V.value&&H},{default:()=>{var le;return[Vo(M.value,"v-chip"),ie&&u.createVNode(sc,{key:"filter"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-chip__filter"},[s.filter?u.createVNode(ei,{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]])]}),J&&u.createVNode("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?u.createVNode(ei,{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(Xs,{key:"prepend-avatar",image:n.prependAvatar,start:!0},null)])]),u.createVNode("div",{class:"v-chip__content"},[((le=s.default)==null?void 0:le.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(ei,{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(Xs,{key:"append-avatar",end:!0,image:n.appendAvatar},null)])]),Y&&u.createVNode("div",u.mergeProps({key:"close",class:"v-chip__close"},F.value),[s.close?u.createVNode(ei,{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"),M.value&&n.ripple,null]])}}}),LT="",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 cw={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},dw={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)}},hw=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}},fw=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}},mw=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([])}},pw=X({selectStrategy:[String,Function],openStrategy:[String,Object],opened:Array,selected:Array,mandatory:Boolean},"nested"),gw=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 fw(n.mandatory);case"leaf":return hw(n.mandatory);case"independent":return Wo(n.mandatory);case"single-independent":return zc(n.mandatory);case"classic":default:return mw(n.mandatory)}}),l=u.computed(()=>{if(typeof n.openStrategy=="object")return n.openStrategy;switch(n.openStrategy){case"list":return dw;case"single":return cw;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(jt()),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},bw=()=>{const n=u.inject(as,Hc);u.provide(as,{...n,isGroupActivator:!0})};function vw(){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 ww=mn({name:"VListGroupActivator",setup(n,e){let{slots:t}=e;return bw(),()=>{var i;return(i=t.default)==null?void 0:i.call(t)}}}),yw=X({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(),...li()},"VListGroup"),Bc=ge()({name:"VListGroup",props:yw(),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}=vw();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(ei,{defaults:g.value},{default:()=>[u.createVNode(ww,null,{default:()=>[t.activator({props:p.value,isOpen:i.value})]})]}),u.createVNode(xi,{transition:{component:jb},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]])]}})]})),{}}}),DT="",Cw=Su("v-list-item-subtitle"),Ew=Su("v-list-item-title"),xw=X({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:Zt(),onClickOnce:Zt(),...No(),...Ve(),...gn(),...Xn(),...Ho(),...vn(),...Uu(),...li(),...Ft(),...os({variant:"text"})},"VListItem"),yn=ge()({name:"VListItem",directives:{Ripple:Ao},props:xw(),emits:{click:n=>!0},setup(n,e){let{attrs:t,slots:i,emit:s}=e;const o=ju(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),M=u.computed(()=>n.color??n.activeColor),F=u.computed(()=>({color:x.value?M.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:A}=Qt(n),{borderClasses:H}=zo(n),{colorClasses:B,colorStyles:D,variantClasses:I}=Oo(F),{densityClasses:Y}=bn(n),{dimensionStyles:ie}=Jn(n),{elevationClasses:G}=Io(n),{roundedClasses:J}=wn(V),ee=u.computed(()=>n.lines?`v-list-item--${n.lines}-line`:void 0),le=u.computed(()=>({isActive:x.value,select:c,isSelected:h.value,isIndeterminate:f.value}));function _e($){var Q;s("click",$),!(p||!k.value)&&((Q=o.navigate)==null||Q.call(o,$),n.value!=null&&c(!h.value,$))}function j($){($.key==="Enter"||$.key===" ")&&($.preventDefault(),_e($))}return Me(()=>{const $=_.value?"a":n.tag,Q=i.title||n.title,fe=i.subtitle||n.subtitle,we=!!(n.appendAvatar||n.appendIcon),ye=!!(we||i.append),Ie=!!(n.prependAvatar||n.prependIcon),De=!!(Ie||i.prepend);return E==null||E.updateHasPrepend(De),n.activeColor&&Ng("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},A.value,H.value,B.value,Y.value,G.value,ee.value,J.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:_e,onKeydown:k.value&&!_.value&&j},{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(ei,{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 Ee;return[(Ee=i.prepend)==null?void 0:Ee.call(i,le.value)]}}):u.createVNode(u.Fragment,null,[n.prependAvatar&&u.createVNode(Xs,{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(Ew,{key:"title"},{default:()=>{var Ee;return[((Ee=i.title)==null?void 0:Ee.call(i,{title:n.title}))??n.title]}}),fe&&u.createVNode(Cw,{key:"subtitle"},{default:()=>{var Ee;return[((Ee=i.subtitle)==null?void 0:Ee.call(i,{subtitle:n.subtitle}))??n.subtitle]}}),(ze=i.default)==null?void 0:ze.call(i,le.value)]),ye&&u.createVNode("div",{key:"append",class:"v-list-item__append"},[i.append?u.createVNode(ei,{key:"append-defaults",disabled:!we,defaults:{VAvatar:{density:n.density,image:n.appendAvatar},VIcon:{density:n.density,icon:n.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var Ee;return[(Ee=i.append)==null?void 0:Ee.call(i,le.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(Xs,{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]])}),{}}}),_w=X({color:String,inset:Boolean,sticky:Boolean,title:String,...Ve(),...li()},"VListSubheader"),Rw=ge()({name:"VListSubheader",props:_w(),setup(n,e){let{slots:t}=e;const{textColorClasses:i,textColorStyles:s}=Ei(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])]}})}),{}}}),AT="",kw=X({color:String,inset:Boolean,length:[Number,String],thickness:[Number,String],vertical:Boolean,...Ve(),...Ft()},"VDivider"),Sw=ge()({name:"VDivider",props:kw(),setup(n,e){let{attrs:t}=e;const{themeClasses:i}=Qt(n),{textColorClasses:s,textColorStyles:o}=Ei(u.toRef(n,"color")),l=u.computed(()=>{const c={};return n.length&&(c[n.vertical?"maxHeight":"maxWidth"]=he(n.length)),n.thickness&&(c[n.vertical?"borderRightWidth":"borderTopWidth"]=he(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)),{}}}),Tw=X({items:Array},"VListChildren"),Wc=ge()({name:"VListChildren",props:Tw(),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(Sw,c,null);if(h==="subheader")return((E=t.subheader)==null?void 0:E.call(t,{props:c}))??u.createVNode(Rw,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=X({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=ft(e,n.itemTitle,e),i=n.returnObject?e:ft(e,n.itemValue,t),s=ft(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:ft(e,n.itemProps),l={title:t,value:i,...o};return{title:String(l.title??""),value:l.value,props:l,children:Array.isArray(s)?jc(n,s):void 0,raw:e}}function jc(n,e){const t=[];for(const i of e)t.push(Gc(n,i));return t}function Uc(n){const e=u.computed(()=>jc(n,n.items));return Mw(e,t=>Gc(n,t))}function Mw(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 Lw(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function Dw(n,e){const t=ft(e,n.itemType,"item"),i=Lw(e)?e:ft(e,n.itemTitle),s=ft(e,n.itemValue,void 0),o=ft(e,n.itemChildren),l=n.itemProps===!0?on(e,["children"])[1]:ft(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(Dw(n,i));return t}function Aw(n){return{items:u.computed(()=>Kc(n,n.items))}}const Pw=X({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,lines:{type:[Boolean,String],default:"one"},nav:Boolean,...pw({selectStrategy:"single-leaf",openStrategy:"list"}),...No(),...Ve(),...gn(),...Xn(),...Ho(),itemType:{type:String,default:"type"},...$c(),...vn(),...li(),...Ft(),...os({variant:"text"})},"VList"),qc=ge()({name:"VList",props:Pw(),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}=Aw(n),{themeClasses:s}=Qt(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}=gw(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(),zs({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),M=u.ref();function F(I){V.value=!0}function A(I){V.value=!1}function H(I){var Y;!V.value&&!(I.relatedTarget&&((Y=M.value)!=null&&Y.contains(I.relatedTarget)))&&D()}function B(I){if(M.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(M.value)return As(M.value,I)}return Me(()=>u.createVNode(n.tag,{ref:M,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:A,onFocus:H,onKeydown:B},{default:()=>[u.createVNode(Wc,{items:i.value},t)]})),{open:g,select:w,focus:D}}}),PT="",FT="",VT="",Fw=X({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ve(),...pn({transition:{component:nc}})},"VCounter"),Vw=ge()({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(xi,{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]])]})),{}}}),OT="",Ow=X({floating:Boolean,...Ve()},"VFieldLabel"),Js=ge()({name:"VFieldLabel",props:Ow(),setup(n,e){let{slots:t}=e;return Me(()=>u.createVNode(lc,{class:["v-field-label",{"v-field-label--floating":n.floating},n.class],style:n.style,"aria-hidden":n.floating||void 0},t)),{}}}),NT="";function Nw(n,e){const t=u.ref(),i=u.shallowRef(!1);if(Jr){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"},zw=X({location:String},"location");function Hw(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}=oo(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 Iw=X({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(),...zw({location:"top"}),...vn(),...li(),...Ft()},"VProgressLinear"),Bw=ge()({name:"VProgressLinear",props:Iw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{isRtl:s,rtlClasses:o}=Zn(),{themeClasses:l}=Qt(n),{locationStyles:c}=Hw(n),{textColorClasses:h,textColorStyles:f}=Ei(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:_}=Nw(),k=u.computed(()=>parseInt(n.max,10)),V=u.computed(()=>parseInt(n.height,10)),M=u.computed(()=>parseFloat(n.bufferValue)/k.value*100),F=u.computed(()=>parseFloat(i.value)/k.value*100),A=u.computed(()=>s.value!==n.reverse),H=u.computed(()=>n.indeterminate?"fade-transition":"slide-x-transition"),B=u.computed(()=>n.bgOpacity==null?n.bgOpacity:parseFloat(n.bgOpacity));function D(I){if(!x.value)return;const{left:Y,right:ie,width:G}=x.value.getBoundingClientRect(),J=A.value?G-I.clientX+(ie-G):I.clientX-Y;i.value=Math.round(J/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":A.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?he(V.value):0,"--v-progress-linear-height":he(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,[A.value?"left":"right"]:he(-V.value),borderTop:`${he(V.value/2)} dotted`,opacity:B.value,top:`calc(50% - ${he(V.value/4)})`,width:he(100-M.value,"%"),"--v-progress-linear-stream-to":he(V.value*(A.value?1:-1))}},null),u.createVNode("div",{class:["v-progress-linear__background",p.value],style:[b.value,{opacity:B.value,width:he(n.stream?M.value:100,"%")}]},null),u.createVNode(u.Transition,{name:H.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:he(F.value,"%")}]},null)]}),t.default&&u.createVNode("div",{class:"v-progress-linear__content"},[t.default({value:F.value,buffer:M.value})])]})),{}}}),Ww=X({loading:[Boolean,String]},"loader");function $w(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return{loaderClasses:u.computed(()=>({[`${e}--loading`]:n.loading}))}}function Gw(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(Bw,{active:n.active,color:n.color,height:"2",indeterminate:!0},null)])}const jw=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Xc=X({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=>jw.includes(n)},"onClick:clear":Zt(),"onClick:appendInner":Zt(),"onClick:prependInner":Zt(),...Ve(),...Ww(),...vn(),...Ft()},"VField"),Jc=ge()({name:"VField",inheritAttrs:!1,props:{id:String,...Rc(),...Xc()},emits:{"update:focused":n=>!0,"update:modelValue":n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const{themeClasses:o}=Qt(n),{loaderClasses:l}=$w(n),{focusClasses:c,isFocused:h,focus:f,blur:p}=kc(n),{InputIcon:b}=_c(n),{roundedClasses:g}=wn(n),{rtlClasses:w}=Zn(),E=u.computed(()=>n.dirty||n.active),x=u.computed(()=>!n.singleLine&&!!(n.label||s.label)),_=jt(),k=u.computed(()=>n.id||`input-${_}`),V=u.computed(()=>`${k.value}-messages`),M=u.ref(),F=u.ref(),A=u.ref(),H=u.computed(()=>["plain","underlined"].includes(n.variant)),{backgroundColorClasses:B,backgroundColorStyles:D}=Yn(u.toRef(n,"bgColor")),{textColorClasses:I,textColorStyles:Y}=Ei(u.computed(()=>n.error||n.disabled?void 0:E.value&&h.value?n.color:n.baseColor));u.watch(E,J=>{if(x.value){const ee=M.value.$el,le=F.value.$el;requestAnimationFrame(()=>{const _e=uo(ee),j=le.getBoundingClientRect(),$=j.x-_e.x,Q=j.y-_e.y-(_e.height/2-j.height/2),fe=j.width/.75,we=Math.abs(fe-_e.width)>1?{maxWidth:he(fe)}:void 0,ye=getComputedStyle(ee),Ie=getComputedStyle(le),De=parseFloat(ye.transitionDuration)*1e3||150,ze=parseFloat(Ie.getPropertyValue("--v-field-label-scale")),Ee=Ie.getPropertyValue("color");ee.style.visibility="visible",le.style.visibility="hidden",cn(ee,{transform:`translate(${$}px, ${Q}px) scale(${ze})`,color:Ee,...we},{duration:De,easing:Hs,direction:J?"normal":"reverse"}).finished.then(()=>{ee.style.removeProperty("visibility"),le.style.removeProperty("visibility")})})}},{flush:"post"});const ie=u.computed(()=>({isActive:E,isFocused:h,controlRef:A,blur:p,focus:f}));function G(J){J.target!==document.activeElement&&J.preventDefault()}return Me(()=>{var $,Q,fe;const J=n.variant==="outlined",ee=s["prepend-inner"]||n.prependInnerIcon,le=!!(n.clearable||s.clear),_e=!!(s["append-inner"]||n.appendInnerIcon||le),j=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":_e,"v-field--center-affix":n.centerAffix??!H.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":!j,[`v-field--variant-${n.variant}`]:!0},o.value,B.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(Gw,{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(Js,{key:"floating-label",ref:F,class:[I.value],floating:!0,for:k.value,style:Y.value},{default:()=>[j]}),u.createVNode(Js,{ref:M,for:k.value},{default:()=>[j]}),(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})]),le&&u.createVNode(sc,{key:"clear"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-field__clearable",onMousedown:we=>{we.preventDefault(),we.stopPropagation()}},[s.clear?s.clear():u.createVNode(b,{name:"clear"},null)]),[[u.vShow,n.dirty]])]}),_e&&u.createVNode("div",{key:"append",class:"v-field__append-inner"},[(fe=s["append-inner"])==null?void 0:fe.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:Y.value},[J&&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(Js,{ref:F,floating:!0,for:k.value},{default:()=>[j]})]),u.createVNode("div",{class:"v-field__outline__end"},null)]),H.value&&x.value&&u.createVNode(Js,{ref:F,floating:!0,for:k.value},{default:()=>[j]})])])}),{controlRef:A}}});function Uw(n){const e=Object.keys(Jc.props).filter(t=>!no(t)&&t!=="class"&&t!=="style");return on(n,e)}const Kw=["color","file","time","date","datetime-local","week","month"],$o=X({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,...Sc(),...Xc()},"VTextField"),Zs=ge()({name:"VTextField",directives:{Intersect:Fo},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}=kc(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(H,B){var D,I;!n.autofocus||!H||(I=(D=B[0].target)==null?void 0:D.focus)==null||I.call(D)}const w=u.ref(),E=u.ref(),x=u.ref(),_=u.computed(()=>Kw.includes(n.type)||n.persistentPlaceholder||l.value||n.active);function k(){var H;x.value!==document.activeElement&&((H=x.value)==null||H.focus()),l.value||c()}function V(H){i("mousedown:control",H),H.target!==x.value&&(k(),H.preventDefault())}function M(H){k(),i("click:control",H)}function F(H){H.stopPropagation(),k(),u.nextTick(()=>{o.value=null,Rg(n["onClick:clear"],H)})}function A(H){var D;const B=H.target;if(o.value=B.value,(D=n.modelModifiers)!=null&&D.trim&&["text","search","password","tel","url"].includes(n.type)){const I=[B.selectionStart,B.selectionEnd];u.nextTick(()=>{B.selectionStart=I[0],B.selectionEnd=I[1]})}}return Me(()=>{const H=!!(s.counter||n.counter||n.counterValue),B=!!(H||s.details),[D,I]=eu(t),[{modelValue:Y,...ie}]=Tc.filterProps(n),[G]=Uw(n);return u.createVNode(Tc,u.mergeProps({ref:w,modelValue:o.value,"onUpdate:modelValue":J=>o.value=J,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:J=>{let{id:ee,isDisabled:le,isDirty:_e,isReadonly:j,isValid:$}=J;return u.createVNode(Jc,u.mergeProps({ref:E,onMousedown:V,onClick:M,"onClick:clear":F,"onClick:prependInner":n["onClick:prependInner"],"onClick:appendInner":n["onClick:appendInner"],role:n.role},G,{id:ee.value,active:_.value||_e.value,dirty:_e.value||n.dirty,disabled:le.value,focused:l.value,error:$.value===!1}),{...s,default:Q=>{let{props:{class:fe,...we}}=Q;const ye=u.withDirectives(u.createVNode("input",u.mergeProps({ref:x,value:o.value,onInput:A,autofocus:n.autofocus,readonly:j.value,disabled:le.value,name:n.name,placeholder:n.placeholder,size:1,type:n.type,onFocus:k,onBlur:h},we,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:fe,"data-no-activator":""},[s.default(),ye]):u.cloneVNode(ye,{class:fe}),n.suffix&&u.createVNode("span",{class:"v-text-field__suffix"},[u.createVNode("span",{class:"v-text-field__suffix__text"},[n.suffix])])])}})},details:B?J=>{var ee;return u.createVNode(u.Fragment,null,[(ee=s.details)==null?void 0:ee.call(s,J),H&&u.createVNode(u.Fragment,null,[u.createVNode("span",null,null),u.createVNode(Vw,{active:n.persistentCounter||l.value,value:f.value,max:p.value},s.counter)])])}:void 0})}),ts({},w,E,x)}}),zT="";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(to(l)),i.value=void 0),o&&s.observe(to(o))},{flush:"post"})}return{resizeRef:t,contentRect:u.readonly(i)}}const qw=X({renderless:Boolean,...Ve()},"VVirtualScrollItem"),Yw=ge()({name:"VVirtualScrollItem",inheritAttrs:!1,props:qw(),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,Xw=X({itemHeight:{type:[Number,String],default:48}},"virtual");function Jw(n,e,t){const i=u.shallowRef(0),s=u.shallowRef(n.itemHeight),o=u.computed({get:()=>parseInt(s.value??0,10),set(B){s.value=B}}),l=u.ref(),{resizeRef:c,contentRect:h}=Zc();u.watchEffect(()=>{c.value=l.value});const f=Hu(),p=new Map;let b=Array.from({length:e.value.length});const g=u.computed(()=>{const B=(!h.value||l.value===document.documentElement?f.height.value:h.value.height)-((t==null?void 0:t.value)??0);return Math.ceil(B/o.value*1.7+1)});function w(B,D){o.value=Math.max(o.value,D),b[B]=D,p.set(e.value[B],D)}function E(B){return b.slice(0,B).reduce((D,I)=>D+(I||o.value),0)}function x(B){const D=e.value.length;let I=0,Y=0;for(;Y<B&&I<D;)Y+=b[I++]||o.value;return I-1}let _=0;function k(){if(!l.value||!h.value)return;const B=h.value.height-56,D=l.value.scrollTop,I=D<_?Qc:ed,Y=x(D+B/2),ie=Math.round(g.value/3),G=Y-ie,J=i.value+ie*2-1;I===Qc&&Y<=J?i.value=Kn(G,0,e.value.length):I===ed&&Y>=J&&(i.value=Kn(G,0,e.value.length-g.value)),_=D}function V(B){if(!l.value)return;const D=E(B);l.value.scrollTop=D}const M=u.computed(()=>Math.min(e.value.length,i.value+g.value)),F=u.computed(()=>e.value.slice(i.value,M.value).map((B,D)=>({raw:B,index:D+i.value}))),A=u.computed(()=>E(i.value)),H=u.computed(()=>E(e.value.length)-E(M.value));return u.watch(()=>e.value.length,()=>{b=Qr(e.value.length).map(()=>o.value),p.forEach((B,D)=>{const I=e.value.indexOf(D);I===-1?p.delete(D):b[I]=B})}),{containerRef:l,computedItems:F,itemHeight:o,paddingTop:A,paddingBottom:H,scrollToIndex:V,handleScroll:k,handleItemResize:w}}const Zw=X({items:{type:Array,default:()=>[]},renderless:Boolean,...Xw(),...Ve(),...Xn()},"VVirtualScroll"),td=ge()({name:"VVirtualScroll",props:Zw(),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}=Jw(n,u.toRef(n,"items"));return Hi(()=>n.renderless,()=>{u.onMounted(()=>{var g;o.value=Lu(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(Yw,{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:he(f.value)}},null),g,u.createVNode("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(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:he(f.value),paddingBottom:he(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=X({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"),Qw=X({...nd(),...an($o({modelValue:null,role:"button"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:{component:ec}})},"VSelect");ge()({name:"VSelect",props:Qw(),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:j=>{var $;c.value&&!j&&(($=o.value)!=null&&$.ΨopenChildren)||(c.value=j)}}),{items:f,transformIn:p,transformOut:b}=Uc(n),g=We(n,"modelValue",[],j=>p(j===null?[null]:Jt(j)),j=>{const $=b(j);return n.multiple?$:$[0]??null}),w=Po(),E=u.computed(()=>g.value.map(j=>f.value.find($=>{const Q=ft($.raw,n.itemValue),fe=ft(j.raw,n.itemValue);return Q===void 0||fe===void 0?!1:n.returnObject?n.valueComparator(Q,fe):n.valueComparator($.value,j.value)})||j)),x=u.computed(()=>E.value.map(j=>j.props.value)),_=u.shallowRef(!1),k=u.computed(()=>h.value?n.closeText:n.openText);let V="",M;const F=u.computed(()=>n.hideSelected?f.value.filter(j=>!E.value.some($=>$===j)):f.value),A=u.computed(()=>n.hideNoData&&!f.value.length||n.readonly||(w==null?void 0:w.isReadonly.value)),H=u.ref(),{onListScroll:B,onListKeydown:D}=id(H,s);function I(j){n.openOnClear&&(h.value=!0)}function Y(){A.value||(h.value=!h.value)}function ie(j){var ye,Ie;if(!j.key||n.readonly||w!=null&&w.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(j.key)&&j.preventDefault(),["Enter","ArrowDown"," "].includes(j.key)&&(h.value=!0),["Escape","Tab"].includes(j.key)&&(h.value=!1),j.key==="Home"?(ye=H.value)==null||ye.focus("first"):j.key==="End"&&((Ie=H.value)==null||Ie.focus("last"));const $=1e3;function Q(De){const ze=De.key.length===1,Ee=!De.ctrlKey&&!De.metaKey&&!De.altKey;return ze&&Ee}if(n.multiple||!Q(j))return;const fe=performance.now();fe-M>$&&(V=""),V+=j.key.toLowerCase(),M=fe;const we=f.value.find(De=>De.title.toLowerCase().startsWith(V));we!==void 0&&(g.value=[we])}function G(j){if(n.multiple){const $=x.value.findIndex(Q=>n.valueComparator(Q,j.value));if($===-1)g.value=[...g.value,j];else{const Q=[...g.value];Q.splice($,1),g.value=Q}}else g.value=[j],h.value=!1}function J(j){var $;($=H.value)!=null&&$.$el.contains(j.relatedTarget)||(h.value=!1)}function ee(){var j;_.value&&((j=s.value)==null||j.focus())}function le(j){_.value=!0}function _e(j){if(j==null)g.value=[];else if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const $=f.value.find(Q=>Q.title===j);$&&G($)}else s.value&&(s.value.value="")}return u.watch(h,()=>{if(!n.hideSelected&&h.value&&E.value.length){const j=F.value.findIndex($=>E.value.some(Q=>$.value===Q.value));Ne&&window.requestAnimationFrame(()=>{var $;j>=0&&(($=l.value)==null||$.scrollToIndex(j))})}}),Me(()=>{const j=!!(n.chips||t.chip),$=!!(!n.hideNoData||F.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Q=g.value.length>0,[fe]=Zs.filterProps(n),we=Q||!_.value&&n.label&&!n.persistentPlaceholder?void 0:n.placeholder;return u.createVNode(Zs,u.mergeProps({ref:s},fe,{modelValue:g.value.map(ye=>ye.props.value).join(", "),"onUpdate:modelValue":_e,focused:_.value,"onUpdate:focused":ye=>_.value=ye,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:we,"onClick:clear":I,"onMousedown:control":Y,onBlur:J,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":ye=>h.value=ye,activator:"parent",contentClass:"v-select__content",disabled:A.value,eager:n.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:n.transition,onAfterLeave:ee},n.menuProps),{default:()=>[$&&u.createVNode(qc,{ref:H,selected:x.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:ye=>ye.preventDefault(),onKeydown:D,onFocusin:le,onScrollPassive:B,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var ye,Ie,De;return[(ye=t["prepend-item"])==null?void 0:ye.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:Ee,index:rt,itemRef:_t}=ze;const et=u.mergeProps(Ee.props,{ref:_t,key:rt,onClick:()=>G(Ee)});return((K=t.item)==null?void 0:K.call(t,{item:Ee,index:rt,props:et}))??u.createVNode(yn,et,{prepend:me=>{let{isSelected:Se}=me;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(xc,{key:Ee.value,modelValue:Se,ripple:!1,tabindex:"-1"},null):void 0,Ee.props.prependIcon&&u.createVNode(Et,{icon:Ee.props.prependIcon},null)])}})}}),(De=t["append-item"])==null?void 0:De.call(t)]}})]}),E.value.map((ye,Ie)=>{var Ee;function De(rt){rt.stopPropagation(),rt.preventDefault(),G(ye)}const ze={"onClick:close":De,onMousedown(rt){rt.preventDefault(),rt.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:ye.value,class:"v-select__selection"},[j?t.chip?u.createVNode(ei,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:ye.title}}},{default:()=>{var rt;return[(rt=t.chip)==null?void 0:rt.call(t,{item:ye,index:Ie,props:ze})]}}):u.createVNode(Fc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:ye.title},ze),null):((Ee=t.selection)==null?void 0:Ee.call(t,{item:ye,index:Ie}))??u.createVNode("span",{class:"v-select__selection-text"},[ye.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 ye=arguments.length,Ie=new Array(ye),De=0;De<ye;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 ey=(n,e,t)=>n==null||e==null?-1:n.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),ty=X({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function iy(n,e,t){var c;const i=[],s=(t==null?void 0:t.default)??ey,o=t!=null&&t.filterKeys?Jt(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=ft(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 ny(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=iy(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 sy(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 ry=X({autoSelectFirst:{type:[Boolean,String]},search:String,...ty({filterKeys:["title"]}),...nd(),...an($o({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:!1})},"VAutocomplete"),sd=ge()({name:"VAutocomplete",props:ry(),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 me;p.value&&!K&&((me=h.value)!=null&&me.Ψ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}=Uc(n),{textColorClasses:V,textColorStyles:M}=Ei(w),F=We(n,"search",""),A=We(n,"modelValue",[],K=>_(K===null?[null]:Jt(K)),K=>{const me=k(K);return n.multiple?me:me[0]??null}),H=Po(),{filteredItems:B,getMatches:D}=ny(n,x,()=>l.value?"":F.value),I=u.computed(()=>A.value.map(K=>x.value.find(me=>{const Se=ft(me.raw,n.itemValue),Vt=ft(K.raw,n.itemValue);return Se===void 0||Vt===void 0?!1:n.returnObject?n.valueComparator(Se,Vt):n.valueComparator(me.value,K.value)})||K)),Y=u.computed(()=>n.hideSelected?B.value.filter(K=>!I.value.some(me=>me.value===K.value)):B.value),ie=u.computed(()=>I.value.map(K=>K.props.value)),G=u.computed(()=>I.value[g.value]),J=u.computed(()=>{var me;return(n.autoSelectFirst===!0||n.autoSelectFirst==="exact"&&F.value===((me=Y.value[0])==null?void 0:me.title))&&Y.value.length>0&&!l.value&&!c.value}),ee=u.computed(()=>n.hideNoData&&!x.value.length||n.readonly||(H==null?void 0:H.isReadonly.value)),le=u.ref(),{onListScroll:_e,onListKeydown:j}=id(le,s);function $(K){n.openOnClear&&(b.value=!0),F.value=""}function Q(){ee.value||(b.value=!0)}function fe(K){ee.value||(o.value&&(K.preventDefault(),K.stopPropagation()),b.value=!b.value)}function we(K){var Vt,be,Ue;if(n.readonly||H!=null&&H.isReadonly.value)return;const me=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),J.value&&["Enter","Tab"].includes(K.key)&&et(Y.value[0]),K.key==="ArrowDown"&&J.value&&((Vt=le.value)==null||Vt.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&&me>0)return;const Ke=g.value>-1?g.value-1:Se-1;I.value[Ke]?g.value=Ke:(g.value=-1,s.value.setSelectionRange((be=F.value)==null?void 0:be.length,(Ue=F.value)==null?void 0:Ue.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 ye(K){F.value=K.target.value}function Ie(K){if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const me=x.value.find(Se=>Se.title===K.target.value);me&&et(me)}}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 Ee(K){c.value=!1}function rt(K){(K==null||K===""&&!n.multiple)&&(A.value=[])}const _t=u.shallowRef(!1);function et(K){if(n.multiple){const me=ie.value.findIndex(Se=>n.valueComparator(Se,K.value));if(me===-1)A.value=[...A.value,K];else{const Se=[...A.value];Se.splice(me,1),A.value=Se}}else A.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,me)=>{var Se;K!==me&&(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?A.value=[]:J.value&&!c.value&&!I.value.some(Vt=>{let{value:be}=Vt;return be===Y.value[0].value})&&et(Y.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=Y.value.findIndex(me=>I.value.some(Se=>me.value===Se.value));Ne&&window.requestAnimationFrame(()=>{var me;K>=0&&((me=f.value)==null||me.scrollToIndex(K))})}}),Me(()=>{const K=!!(n.chips||t.chip),me=!!(!n.hideNoData||Y.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Se=A.value.length>0,[Vt]=Zs.filterProps(n);return u.createVNode(Zs,u.mergeProps({ref:s},Vt,{modelValue:F.value,"onUpdate:modelValue":rt,focused:o.value,"onUpdate:focused":be=>o.value=be,validationValue:A.externalValue,dirty:Se,onInput:ye,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:we}),{...t,default:()=>u.createVNode(u.Fragment,null,[u.createVNode(ns,u.mergeProps({ref:h,modelValue:b.value,"onUpdate:modelValue":be=>b.value=be,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:()=>[me&&u.createVNode(qc,{ref:le,selected:ie.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:be=>be.preventDefault(),onKeydown:j,onFocusin:ze,onFocusout:Ee,onScrollPassive:_e,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var be,Ue,Ke;return[(be=t["prepend-item"])==null?void 0:be.call(t),!Y.value.length&&!n.hideNoData&&(((Ue=t["no-data"])==null?void 0:Ue.call(t))??u.createVNode(yn,{title:i(n.noDataText)},null)),u.createVNode(td,{ref:f,renderless:!0,items:Y.value},{default:Je=>{var _i;let{item:ot,index:mt,itemRef:Wi}=Je;const pt=u.mergeProps(ot.props,{ref:Wi,key:mt,active:J.value&&mt===0?!0:void 0,onClick:()=>et(ot)});return((_i=t.item)==null?void 0:_i.call(t,{item:ot,index:mt,props:pt}))??u.createVNode(yn,pt,{prepend:ui=>{let{isSelected:xn}=ui;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(xc,{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 ui,xn;return l.value?ot.title:sy(ot.title,(ui=D(ot))==null?void 0:ui.title,((xn=F.value)==null?void 0:xn.length)??0)}})}}),(Ke=t["append-item"])==null?void 0:Ke.call(t)]}})]}),I.value.map((be,Ue)=>{var ot;function Ke(mt){mt.stopPropagation(),mt.preventDefault(),et(be)}const Je={"onClick:close":Ke,onMousedown(mt){mt.preventDefault(),mt.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:be.value,class:["v-autocomplete__selection",Ue===g.value&&["v-autocomplete__selection--selected",V.value]],style:Ue===g.value?M.value:{}},[K?t.chip?u.createVNode(ei,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:be.title}}},{default:()=>{var mt;return[(mt=t.chip)==null?void 0:mt.call(t,{item:be,index:Ue,props:Je})]}}):u.createVNode(Fc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:be.title},Je),null):((ot=t.selection)==null?void 0:ot.call(t,{item:be,index:Ue}))??u.createVNode("span",{class:"v-autocomplete__selection-text"},[be.title,n.multiple&&Ue<I.value.length-1&&u.createVNode("span",{class:"v-autocomplete__selection-comma"},[u.createTextVNode(",")])])])})]),"append-inner":function(){var Je;for(var be=arguments.length,Ue=new Array(be),Ke=0;Ke<be;Ke++)Ue[Ke]=arguments[Ke];return u.createVNode(u.Fragment,null,[(Je=t["append-inner"])==null?void 0:Je.call(t,...Ue),n.menuIcon?u.createVNode(Et,{class:"v-autocomplete__menu-icon",icon:n.menuIcon,onMousedown:fe,onClick:kg,"aria-label":i(E.value),title:i(E.value)},null):void 0])}})}),ts({isFocused:o,isPristine:l,menu:b,search:F,filteredItems:B,select:et},s)}}),oy=1,Qs={__name:"SelectField",props:ct.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(_)?ke.every(_,V=>ke.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)=>{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(sd),u.mergeProps({variant:"outlined",density:"compact",rounded:"","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:ct.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(Qs)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},component:u.markRaw(uy)}],dy={key:0},hy=1,fy={__name:"InfinitySelectField",props:ct.propsField,setup(n){const e=n,t=u.inject("store"),{getFromSchema:i,updateField:s,getProp:o}=e,l=i("rel.get");function c(A){return Array.isArray(Object.getPrototypeOf(A))}function h(A,H){return Array.isArray(A)?ke.every(A,B=>ke.isType(B,H)):!1}function f(A){return h(A,"object")?A.map(H=>H[o("rel.valueKey","value")]):A}function p(A){return i("rel.key",!1)?i("rel.key"):typeof A=="string"?t.getModelKey(A):"model-"+parseInt(Math.random(1e4)*Math.random(1e4)*1e3)}const b=(A,H,B)=>{c(H)?t.items[A]=H:typeof H=="function"?t.customLoadItems(A,B,H):typeof H=="object"&&H.route?(t.routes[A]=H.route,t.loadItems(A)):typeof H=="string"&&(t.routes[A]=H,t.loadItems(A))},g=p(l);b(g,l,hy);const w=A=>i("rel.withChange")?i("rel.withChange")(A):A,E=u.computed(()=>w(t.items[g])),x=u.computed(()=>t.paginations[g]||{lastPage:0,currentPage:0}),_=u.computed(()=>x.value.lastPage>x.value.currentPage);function k(){const A="";t.loadItemsPlus(g,x.value.currentPage+1,A)}const V=u.computed(()=>t.loadings[g]);function M(A,H,B){A&&k()}const F={};return(A,H)=>(u.openBlock(),u.createBlock(u.unref(sd),u.mergeProps({variant:"outlined",density:"compact",rounded:"",label:u.unref(i)("rel.textKey","text"),items:E.value,"model-value":f(A.value),"item-title":u.unref(i)("rel.textKey"),"item-value":u.unref(i)("rel.valueKey"),loading:V.value},{...F,...u.unref(i)("props",{})},u.toHandlers(u.unref(i)("events",{})),{"single-line":"","onUpdate:modelValue":u.unref(s)}),{"append-item":u.withCtx(()=>[_.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",dy,[u.createTextVNode(u.toDisplayString(A.$fcTr("loading...")),1)])),[[u.unref(Fo),M]]):u.createCommentVNode("",!0)]),_:1},16,["label","items","model-value","item-title","item-value","loading","onUpdate:modelValue"]))}},my=n=>[{title:"operator",field:"op",groupAttr:{class:"w-[32.5%]"},rel:{get:[{value:"=",text:"equal_to"},{value:"!=",text:"not_equal_to"}],valueKey:"value",textKey:"text"},component:u.markRaw(Qs)},{title:"select",field:"value",groupAttr:{class:"w-[32.5%]"},component:u.markRaw(fy),rel:n.rel}],HT="",py=Un({__name:"DateField",setup(n){return(e,t)=>null}},[["__scopeId","data-v-077220f8"]]),rd={TextFilter:cy,SelectFilter:my,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(Qs)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},dynamicProps(n){return{range:n.form.op==="<>"}},component:u.markRaw(py)}]};function gy(n){return u.getCurrentScope()?(u.onScopeDispose(n),!0):!1}function Go(n){return typeof n=="function"?n():u.unref(n)}const by=typeof window<"u"&&typeof document<"u",vy=Object.prototype.toString,wy=n=>vy.call(n)==="[object Object]",yy=()=>{};function Cy(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 Ey(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 xy(n,e,t={}){const{eventFilter:i=od,...s}=t;return u.watch(n,Cy(i,e),s)}function _y(n,e,t={}){const{eventFilter:i,...s}=t,{eventFilter:o,pause:l,resume:c,isActive:h}=Ey(i);return{stop:xy(n,e,{...s,eventFilter:o}),pause:l,resume:c,isActive:h}}function Ry(n){var e;const t=Go(n);return(e=t==null?void 0:t.$el)!=null?e:t}const jo=by?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=jo):[e,t,i,s]=n,!e)return yy;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(()=>[Ry(e),Go(s)],([p,b])=>{if(l(),!p)return;const g=wy(b)?{...b}:b;o.push(...t.flatMap(w=>i.map(E=>c(p,w,E,g))))},{immediate:!0,flush:"post"}),f=()=>{h(),l()};return gy(f),f}const er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tr="__vueuse_ssr_handlers__",ky=Sy();function Sy(){return tr in er||(er[tr]=er[tr]||{}),er[tr]}function Ty(n,e){return ky[n]||e}function My(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 Ly={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 Dy(n,e,t,i={}){var s;const{flush:o="pre",deep:l=!0,listenToStorageChanges:c=!0,writeDefaults:h=!0,mergeDefaults:f=!1,shallow:p,window:b=jo,eventFilter:g,onError:w=D=>{console.error(D)}}=i,E=(p?u.shallowRef:u.ref)(e);if(!t)try{t=Ty("getDefaultStorage",()=>{var D;return(D=jo)==null?void 0:D.localStorage})()}catch(D){w(D)}if(!t)return E;const x=Go(e),_=My(x),k=(s=i.serializer)!=null?s:Ly[_],{pause:V,resume:M}=_y(E,()=>F(E.value),{flush:o,deep:l,eventFilter:g});return b&&c&&(ad(b,"storage",B),ad(b,ld,H)),B(),E;function F(D){try{if(D==null)t.removeItem(n);else{const I=k.write(D),Y=t.getItem(n);Y!==I&&(t.setItem(n,I),b&&b.dispatchEvent(new CustomEvent(ld,{detail:{key:n,oldValue:Y,newValue:I,storageArea:t}})))}}catch(I){w(I)}}function A(D){const I=D?D.newValue:t.getItem(n);if(I==null)return h&&x!==null&&t.setItem(n,k.write(x)),x;if(!D&&f){const Y=k.read(I);return typeof f=="function"?f(Y,x):_==="object"&&!Array.isArray(Y)?{...x,...Y}:Y}else return typeof I!="string"?I:k.read(I)}function H(D){B(D.detail)}function B(D){if(!(D&&D.storageArea!==t)){if(D&&D.key==null){E.value=x;return}if(!(D&&D.key!==n)){V();try{(D==null?void 0:D.newValue)!==k.write(E.value)&&(E.value=A(D))}catch(I){w(I)}finally{D?u.nextTick(M):M()}}}}}const WT="",Cn=n=>(u.pushScopeId("data-v-4e2d85a9"),n=n(),u.popScopeId(),n),Ay={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"},Py={class:"flex flex-col ml-1 border-b border-[rgba(0,0,0,.1)] pb-4"},Fy={class:"flex flex-row justify-between mb-4 items-center"},Vy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Oy={class:"flex items-center"},Ny={class:"z-[1]"},zy={class:"fc-drop-down-content"},Hy={key:0,class:"p-2 text-center"},Iy=["onClick"],By=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)),Wy={class:"text-muted-400 font-sans text-sm"},$y={class:"flex w-full justify-between"},Gy={class:"w-[23%] flex justify-center items-center"},jy=["disabled"],Uy=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)),Ky=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)),qy={class:"flex flex-col p-2 mt-2"},Yy={class:"flex items-center"},Xy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Jy={class:"group-hover:text-red-500"},Zy=Cn(()=>u.createElementVNode("svg",{stroke:"currentColor",width:"1em",height:"1em",class:"ml-1 rtl:ml-1 rtl:mr-1 group-hover:fill-red-500",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)),Qy={class:"my-2 flex"},eC={class:"flex"},tC=["onClick"],iC={class:"mt-[0px]"},nC=["onClick"],sC=[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))],rC={key:0,class:"flex items-center mx-2 text-[0.75rem]"},oC={class:"flex w-full gap-x-2 justify-between !items-end"},aC={class:"pt-4 md:pt-6"},lC={class:"flex gap-x-2"},uC=["placeholder"],cC=[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))],dC=Un({__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=b(),h=u.ref(null);u.ref(!1);function f(M){const F=ke.capitalize(M),A=ke.get(rd,F+"Filter"),H=e.flatFields.find(B=>B.filter===M);return typeof A=="function"?ke.get(rd,F+"Filter")(H):!1}const p=u.ref([{title:"field",field:"field",isHeader:!0,groupAttr:{class:"w-[32.5%]"},rel:{get:e.headersWithoutActions,textKey:"title",valueKey:"filter"},props:{"return-object":!0},component:u.markRaw(Qs)}]);u.watch(()=>s.value.field,M=>{p.value.length=1;const F=f(ke.get(M,"filter"))||[];for(const A in s.value)A!=="field"&&(s.value[A]="");u.nextTick(()=>{for(const A of F)p.value.push(A)})});function b(){const M=window.location.pathname.replace(/^\/|\/$/g,"")+"-filters";return Dy(M,{},localStorage,{mergeDefaults:!0})}function g(){e.filters.push(s.value),s.value={}}function w(){t!==-1&&e.filters.splice(t,1,s.value),i.value=!1,s.value={}}function E(M,F){s.value.field=M.field,i.value=!0,t=F,u.nextTick(()=>{s.value={...M}})}function x(M){e.filters=e.filters.filter(F=>F!==M)}function _(){e.filters=[]}function k(){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 V(){e.isFiltering=!0,e.getWithFilter()}return(M,F)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(e).panel==="filters"?"accordion-content":"x")},[u.createElementVNode("div",Ay,[u.createElementVNode("div",Py,[u.createElementVNode("div",Fy,[u.createElementVNode("h3",Vy,u.toDisplayString(M.$fcTr("filter_data")),1),u.createElementVNode("div",Oy,[u.createVNode(u.unref(ns),{transition:"scale-transition"},{activator:u.withCtx(({props:A})=>[u.createElementVNode("button",u.mergeProps({class:JSON.parse(A["aria-expanded"])?"before:block":"before:hidden"},A,{class:"fc-filter-choose is-button rounded is-button-default min-w-[130px]"}),[u.createElementVNode("span",Ny,u.toDisplayString(M.$fcTr("choose_filter")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",zy,[Object.keys(u.unref(c)).length===0?(u.openBlock(),u.createElementBlock("p",Hy,u.toDisplayString(M.$fcTr("not_filter_create_yes")),1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(c),(A,H)=>(u.openBlock(),u.createElementBlock("a",{class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-100 justify-between rtl:pl-4 rtl:pr-5",key:H,onClick:u.withModifiers(B=>u.unref(e).filters=Object.values(A),["stop"])},[By,u.createElementVNode("p",Wy,u.toDisplayString(H),1)],8,Iy))),128))])]),_:1})])]),u.createElementVNode("div",$y,[u.createVNode(u.unref(ct),{class:"w-[75%] justify-between",fields:p.value,modelValue:s.value,"onUpdate:modelValue":F[0]||(F[0]=A=>s.value=A)},null,8,["fields","modelValue"]),u.createElementVNode("div",Gy,[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:w},[u.createTextVNode(u.toDisplayString(M.$fcTr("edit_filter"))+" ",1),Ky])):(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-full font-bold py-1 px-2 !border-green-400 !text-green-400 dark:active:hover:bg-muted-600 active:hover:!bg-green-50",onClick:g},[u.createTextVNode(u.toDisplayString(M.$fcTr("add_filter"))+" ",1),Uy],8,jy))])])]),u.createElementVNode("div",qy,[u.createElementVNode("div",Yy,[u.createElementVNode("h3",Xy,u.toDisplayString(M.$fcTr("active_filter")),1),u.createElementVNode("button",{onClick:_,class:"is-button group hover:text-red-500 hover:border-red-500 w-fit text-muted-500 !text-xs border !px-3 !py-0 !h-[1.5rem] mx-2 !rounded-full"},[u.createElementVNode("span",Jy,u.toDisplayString(M.$fcTr("clear_all")),1),Zy])]),u.createElementVNode("div",Qy,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(e).filters,(A,H)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:H},[u.createElementVNode("div",eC,[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:B=>E(A,H)},[u.createElementVNode("span",iC,u.toDisplayString(u.unref(ke.get)(A,"field.title")),1),u.createElementVNode("button",{class:"text-white font-bold rounded px-1",onClick:u.withModifiers(B=>x(A),["stop"])},sC,8,nC)],8,tC)]),u.unref(e).filters.length-1!==H?(u.openBlock(),u.createElementBlock("span",rC,u.toDisplayString(M.$fcTr("&")),1)):u.createCommentVNode("",!0)],64))),128))])]),u.createElementVNode("div",oC,[u.createElementVNode("button",{onClick:F[1]||(F[1]=A=>u.unref(e).panel=""),class:"is-button text-muted-500 rounded hover:text-red-500 !underline focus-within:!outline-none"},u.toDisplayString(M.$fcTr("cancel")),1),u.createElementVNode("div",aC,[u.createElementVNode("div",lC,[u.createElementVNode("button",{onClick:F[5]||(F[5]=u.withModifiers(A=>Object.keys(u.unref(e).filters).length!==0?k():"",["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:F[2]||(F[2]=u.withModifiers(A=>Object.keys(u.unref(e).filters).length!==0?k():"",["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(M.$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":F[3]||(F[3]=A=>l.value=A),class:u.normalizeClass(["fc-focus py-1 rounded px-2 dark:bg-muted-800",o.value?" border border-1":"flex "]),placeholder:M.$fcTr("filter_save_placeholder"),ref_key:"filterNameInp",ref:h},null,10,uC),[[u.vModelText,l.value]]),u.createElementVNode("span",{class:"px-2",onClick:F[4]||(F[4]=A=>o.value=!1)},cC)],2)],2),u.createElementVNode("button",{onClick:V,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(M.$fcTr("filter")),1)])])])])],2))}},[["__scopeId","data-v-4e2d85a9"]]),hC={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},fC={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},mC=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"},gC={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},bC={class:"flex flex-col text-right"},vC={class:"mb-4 flex justify-between w-full"},wC={key:0,class:"text-primerr-700"},yC={key:1,class:"text-primerr-700"},CC={class:"mb-5 flex flex-row flex-wrap"},EC={class:"flex justify-end"},xC=["disabled"],_C={key:0},RC={key:1},kC={__name:"MDialogForm",setup(n){const{event:e,listen:t}=ct.emitter,i=u.inject("store"),s=u.ref({});let o=u.ref(!1),l=u.ref({});return(()=>{t("createBtn",()=>{l.value={},i.isEditing=!1,o.value=!0}),t("editBtn",h=>{l.value={...h},i.isEditing=!0,o.value=!0}),t("handleDialogForm",h=>{o.value=h}),t("saveForm",()=>(()=>{i.isEditing?i.editItem(s):i.addItem(s)})()),t(["createBtn"],()=>{Object.assign(s,{})}),t("editTheItem",h=>{edit(h)}),t("addTheItem",h=>{add(h)})})(),(h,f)=>(u.openBlock(),u.createBlock(u.Transition,{name:"fade",appear:""},{default:u.withCtx(()=>[u.unref(o)?(u.openBlock(),u.createElementBlock("div",hC,[u.createElementVNode("div",fC,[mC,u.createElementVNode("div",pC,[u.createElementVNode("div",gC,[u.createElementVNode("div",bC,[u.createElementVNode("h1",vC,[u.unref(i).isEditing?(u.openBlock(),u.createElementBlock("span",wC,u.toDisplayString(h.$fcTr("edit")),1)):(u.openBlock(),u.createElementBlock("span",yC,u.toDisplayString(h.$fcTr("add")),1)),u.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:f[0]||(f[0]=p=>u.isRef(o)?o.value=!1:o=!1)})]),u.createElementVNode("div",CC,[u.createVNode(u.unref(ct),{fields:u.unref(i).fields,modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=p=>s.value=p),"form-data":u.unref(l)},null,8,["fields","modelValue","form-data"])]),u.createElementVNode("div",EC,[u.createElementVNode("button",{onClick:f[2]||(f[2]=p=>u.isRef(o)?o.value=!1:o=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(h.$fcTr("cancel")),1),u.createElementVNode("button",{disabled:u.unref(i).loadings.mainLoading,onClick:f[3]||(f[3]=p=>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",RC,"loading")):(u.openBlock(),u.createElementBlock("span",_C,u.toDisplayString(h.$fcTr("save")),1))],8,xC)])])])])])])):u.createCommentVNode("",!0)]),_:1}))}},SC={};function TC(n,e){return u.openBlock(),u.createElementBlock("div")}const MC=Un(SC,[["render",TC]]),LC={key:0,class:"fixed z-10 inset-0 overflow-y-auto"},DC={class:"flex items-center overflow-y justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},AC=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"},FC={class:"bg-card-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},VC={class:"flex flex-col text-right"},OC={class:"mb-4 flex justify-between w-full"},NC=u.createElementVNode("span",{class:"text-primerr-700"},"حذف",-1),zC={class:"mb-5 flex flex-row flex-wrap"},HC={class:"flex justify-end"},IC=["disabled"],BC={key:0},WC={key:1},$C={__name:"MDeleteDialog",setup(n){const e=u.inject("store"),t=u.ref(!1);let i="",s="";return ct.emitter.listen("deleteBtn",o=>{t.value=!0,i=o.id}),ct.emitter.listen("handleDeleteDialog",o=>{t.value=o}),(o,l)=>(u.openBlock(),u.createBlock(u.Transition,{name:"fade",appear:""},{default:u.withCtx(()=>[t.value?(u.openBlock(),u.createElementBlock("div",LC,[u.createElementVNode("div",DC,[AC,u.createElementVNode("div",PC,[u.createElementVNode("div",FC,[u.createElementVNode("div",VC,[u.createElementVNode("h1",OC,[NC,u.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:l[0]||(l[0]=c=>t.value=!1)})]),u.createElementVNode("div",zC,u.toDisplayString(o.$fcTr("alert_to_delete")),1),u.createElementVNode("div",HC,[u.createElementVNode("button",{onClick:l[1]||(l[1]=c=>t.value=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(o.$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:l[2]||(l[2]=c=>u.unref(e).remove({deleteId:u.unref(i),indexToRemove:u.unref(s)}))},[u.unref(e).loadings.mainLoading?(u.openBlock(),u.createElementBlock("span",WC,"loading")):(u.openBlock(),u.createElementBlock("span",BC,u.toDisplayString(o.$fcTr("yes")),1))],8,IC)])])])])])])):u.createCommentVNode("",!0)]),_:1}))}},UT="",GC={key:0,class:"w-full border bg-white rounded p-2 flex align-center mt-2"},jC=["onClick"],UC={__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",GC,[(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)}},KC={__name:"MCrud",props:{options:{default:()=>({})},hiddenActions:{default:()=>[]},fields:{default:()=>[]},dir:{default:"rtl"},route:{default:"route"}},emits:["mounted"],setup(n,{emit:e}){const t=n,i=tm({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(Sv),u.createVNode(dC),u.createVNode(UC),u.createVNode(yg),u.createVNode(kC),u.createVNode(MC),u.createVNode($C),u.renderSlot(s.$slots,"extra")],64))}},KT="",qT="",YT="",qC={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:"هنوز فیلتری ایجاد نشده است"}},YC=pl.defineStore("formuCrudLangs",{state:()=>({lang:"fa",langs:qC}),getters:{currentLang(n){return ke.get(n.langs,n.lang,"fa")}},actions:{translate(n){return ke.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 XC(n,e){const t=[];let i=[];const s=ud(n),o=cd(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 ud(n){return new Date(n.getFullYear(),n.getMonth(),1)}function cd(n){return new Date(n.getFullYear(),n.getMonth()+1,0)}function JC(n){const e=n.split("-").map(Number);return new Date(e[0],e[1]-1,e[2])}const ZC=/([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))/;function QC(n){if(n==null)return new Date;if(n instanceof Date)return n;if(typeof n=="string"){let e;if(ZC.test(n))return JC(n);if(e=Date.parse(n),!isNaN(e))return new Date(e)}return null}const dd=new Date(2e3,0,2);function e0(n){const e=Uo[n.slice(-2).toUpperCase()];return Qr(7).map(t=>{const i=new Date(dd);return i.setDate(dd.getDate()+e+t),new Intl.DateTimeFormat(n,{weekday:"narrow"}).format(i)})}function t0(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 i0(n,e){const t=new Date(n);return t.setDate(t.getDate()+e),t}function n0(n,e){const t=new Date(n);return t.setMonth(t.getMonth()+e),t}function s0(n){return n.getFullYear()}function r0(n){return n.getMonth()}function o0(n){return new Date(n.getFullYear(),0,1)}function a0(n){return new Date(n.getFullYear(),11,31)}function l0(n,e){return Ko(n,e[0])&&c0(n,e[1])}function u0(n){const e=new Date(n);return e instanceof Date&&!isNaN(e.getTime())}function Ko(n,e){return n.getTime()>e.getTime()}function c0(n,e){return n.getTime()<e.getTime()}function hd(n,e){return n.getTime()===e.getTime()}function d0(n,e){return n.getDate()===e.getDate()&&n.getMonth()===e.getMonth()&&n.getFullYear()===e.getFullYear()}function h0(n,e){return n.getMonth()===e.getMonth()&&n.getFullYear()===e.getFullYear()}function f0(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 m0(n,e){const t=new Date(n);return t.setFullYear(e),t}class p0{constructor(e){this.locale=e.locale}date(e){return QC(e)}toJsDate(e){return e}addDays(e,t){return i0(e,t)}addMonths(e,t){return n0(e,t)}getWeekArray(e){return XC(e,this.locale)}startOfMonth(e){return ud(e)}endOfMonth(e){return cd(e)}format(e,t){return t0(e,t,this.locale)}isEqual(e,t){return hd(e,t)}isValid(e){return u0(e)}isWithinRange(e,t){return l0(e,t)}isAfter(e,t){return Ko(e,t)}isBefore(e,t){return!Ko(e,t)&&!hd(e,t)}isSameDay(e,t){return d0(e,t)}isSameMonth(e,t){return h0(e,t)}setYear(e,t){return m0(e,t)}getDiff(e,t,i){return f0(e,t,i)}getWeekdays(){return e0(this.locale)}getYear(e){return s0(e)}getMonth(e){return r0(e)}startOfYear(e){return o0(e)}endOfYear(e){return a0(e)}}const fd=Symbol.for("vuetify:date-adapter");function g0(n){return Pt({adapter:p0,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 md(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:e,...t}=n,i=Pt(e,t),{aliases:s={},components:o={},directives:l={}}=i,c=Jg(i.defaults),h=Eb(i.display,i.ssr),f=Nb(i.theme),p=Dv(i.icons),b=Lb(i.locale),g=g0(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(yo,h),E.provide(Us,f),E.provide(So,p),E.provide(Gs,b),E.provide(fd,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,_}}jt.reset(),E.mixin({computed:{$vuetify(){return u.reactive({defaults:En.call(this,fn),display:En.call(this,yo),theme:En.call(this,Us),icons:En.call(this,So),locale:En.call(this,Gs),date:En.call(this,fd)})}}})},defaults:c,display:h,theme:f,icons:p,locale:b,date:g}}const b0="3.3.14";md.version=b0;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 v0=(n,{fields:e}={fields:{}})=>{const t=md({});n.use(t);const i=YC();n.config.globalProperties.$fcTr=s=>i.translate(s),wl(e)};Dt.MCrud=KC,Dt.defineFields=nm,Dt.install=v0,Dt.registerFields=wl,Object.defineProperty(Dt,Symbol.toStringTag,{value:"Module"})});
48
+ `)}function qu(n){const e=n.dark?2:1,t=n.dark?1:2,i=[];for(const[s,o]of Object.entries(n.colors)){const l=oi(o);i.push(`--v-theme-${s}: ${l.r},${l.g},${l.b}`),s.startsWith("on-")||i.push(`--v-theme-${s}-overlay-multiplier: ${Jg(o)>.18?e:t}`)}for(const[s,o]of Object.entries(n.variables)){const l=typeof o=="string"&&o.startsWith("#")?oi(o):void 0,c=l?`${l.r}, ${l.g}, ${l.b}`:void 0;i.push(`--v-${s}: ${c??o}`)}return i}const pn=X({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:n=>n!==!0}},"transition"),xi=(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 Hb(){return!0}function Yu(n,e,t){if(!n||Xu(n,t)===!1)return!1;const i=Tu(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 Xu(n,e){return(typeof e.value=="object"&&e.value.closeConditional||Hb)(n)}function Ib(n,e,t){const i=typeof t.value=="function"?t.value:t.value.handler;e._clickOutside.lastMousedownWasOutside&&Yu(n,e,t)&&setTimeout(()=>{Xu(n,t)&&i&&i(n)},0)}function Ju(n,e){const t=Tu(n);e(document),typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&e(t)}const Bb={mounted(n,e){const t=s=>Ib(s,n,e),i=s=>{n._clickOutside.lastMousedownWasOutside=Yu(s,n,e)};Ju(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&&(Ju(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 Wb(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 _o=X({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},...wb(),...Ve(),...Xn(),...Rb(),...ob(),...hb(),...Pt(),...pn()},"VOverlay"),Ks=ge()({name:"VOverlay",directives:{ClickOutside:Bb},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,..._o()},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}=Ob(u.computed(()=>n.attach||n.contained)),{themeClasses:h}=Qt(n),{rtlClasses:f,isRtl:p}=Zn(),{hasContent:b,onAfterLeave:g}=kb(n,l),w=Yn(u.computed(()=>typeof n.scrim=="string"?n.scrim:null)),{globalTop:E,localTop:x,stackStyles:_}=Vb(l,u.toRef(n,"zIndex"),n._disableGlobalStack),{activatorEl:k,activatorRef:V,activatorEvents:M,contentEvents:P,scrimEvents:A}=yb(n,{isActive:l,isTop:x}),{dimensionStyles:H}=Jn(n),B=_b(),{scopeId:D}=xo();u.watch(()=>n.disabled,Q=>{Q&&(l.value=!1)});const I=u.ref(),Y=u.ref(),{contentStyles:ie,updateLocation:G}=ab(n,{isRtl:p,contentEl:Y,activatorEl:k,isActive:l});fb(n,{root:I,contentEl:Y,activatorEl:k,isActive:l,updateLocation:G});function J(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",le):window.removeEventListener("keydown",le)},{immediate:!0});function le(Q){var fe,we;Q.key==="Escape"&&E.value&&(n.persistent?$():(l.value=!1,(fe=Y.value)!=null&&fe.contains(document.activeElement)&&((we=k.value)==null||we.focus())))}const _e=Fb();Hi(()=>n.closeOnBack,()=>{Pb(_e,Q=>{E.value&&l.value?(Q(!1),n.persistent?$():l.value=!1):Q()})});const j=u.ref();u.watch(()=>l.value&&(n.absolute||n.contained)&&c.value==null,Q=>{if(Q){const fe=Lu(I.value);fe&&fe!==document.scrollingElement&&(j.value=fe.scrollTop)}});function $(){n.noClickAnimation||Y.value&&cn(Y.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Hs})}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},M.value,n.activatorProps)}),B.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:he(j.value)},n.style],ref:I},D,i),[u.createVNode(Wb,u.mergeProps({color:w,modelValue:l.value&&!!n.scrim},A.value),null),u.createVNode(xi,{appear:!0,persisted:!0,transition:n.transition,target:k.value,onAfterLeave:()=>{g(),s("afterLeave")}},{default:()=>{var fe;return[u.withDirectives(u.createVNode("div",u.mergeProps({ref:Y,class:["v-overlay__content",n.contentClass],style:[H.value,ie.value]},P.value,n.contentProps),[(fe=t.default)==null?void 0:fe.call(t,{isActive:l})]),[[u.vShow,l.value],[u.resolveDirective("click-outside"),{handler:J,closeConditional:ee,include:()=>[k.value]}]])]}})])]})])}),{activatorEl:k,animateClick:$,contentEl:Y,globalTop:E,localTop:x,updateLocation:G}}}),Ro=Symbol("Forwarded refs");function ko(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[Ro]=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=ko(h.value,o)??("_"in h.value?ko((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[Ro];if(!f)continue;const p=f.slice();for(;p.length;){const b=p.shift(),g=ko(b.value,o);if(g)return g;const w=b.value&&b.value[Ro];w&&p.push(...w)}}}}})}const $b=X({id:String,text:String,...an(_o({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=ge()({name:"VTooltip",props:$b(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=xo(),o=jt(),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]=Ks.filterProps(n);return u.createVNode(Ks,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="",Gb=X({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Ct(n,e,t){return ge()({name:n,props:Gb({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 Zu(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return ge()({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 Qu(){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 jb=X({target:Object},"v-dialog-transition"),ec=ge()({name:"VDialogTransition",props:jb(),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}=ic(n.target,s),b=cn(s,[{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0},{}],{duration:225*p,easing:tb});(g=tc(s))==null||g.forEach(w=>{cn(w,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*p,easing:Hs})}),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}=ic(n.target,s);cn(s,[{},{transform:`translate(${l}px, ${c}px) scale(${h}, ${f})`,opacity:0}],{duration:125*p,easing:ib}).finished.then(()=>o()),(g=tc(s))==null||g.forEach(w=>{cn(w,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*p,easing:Hs})})},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 tc(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 ic(n,e){const t=n.getBoundingClientRect(),i=uo(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 nc=Ct("slide-y-transition");Ct("slide-y-reverse-transition");const Ub=Zu("expand-transition",Qu()),sc=Zu("expand-x-transition",Qu("",!0)),Kb=X({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),ei=ge(!1)({name:"VDefaultsProvider",props:Kb(),setup(n,e){let{slots:t}=e;const{defaults:i,disabled:s,reset:o,root:l,scoped:c}=u.toRefs(n);return zs(i,{reset:o,root:l,scoped:c,disabled:s}),()=>{var h;return(h=t.default)==null?void 0:h.call(t)}}}),qb=X({id:String,...an(_o({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:ec}}),["absolute"])},"VMenu"),ns=ge()({name:"VMenu",props:qb(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{scopeId:s}=xo(),o=jt(),l=u.computed(()=>n.id||`v-menu-${o}`),c=u.ref(),h=u.inject(vo,null),f=u.shallowRef(0);u.provide(vo,{register(){++f.value},unregister(){--f.value},closeParents(){setTimeout(()=>{f.value||(i.value=!1,h==null||h.closeParents())},40)}});async function p(x){var V,M,P;const _=x.relatedTarget,k=x.target;await u.nextTick(),i.value&&_!==k&&((V=c.value)!=null&&V.contentEl)&&((M=c.value)!=null&&M.globalTop)&&![document,c.value.contentEl].includes(k)&&!c.value.contentEl.contains(k)&&((P=ro(c.value.contentEl)[0])==null||P.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"&&(ru(ro((_=c.value)==null?void 0:_.contentEl,!1),x.shiftKey?"prev":"next",P=>P.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(),As(_,"next")):x.key==="ArrowUp"&&(x.preventDefault(),As(_,"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]=Ks.filterProps(n);return u.createVNode(Ks,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(ei,{root:"VMenu"},{default:()=>{var M;return[(M=t.default)==null?void 0:M.call(t,...k)]}})}})}),ts({id:l,ΨopenChildren:f},c)}}),Yb={class:"flex items-center gap-3 relative hover:bg-muted-200 rounded-lg px-5 pl-3 rtl:pl-8 rtl:pr-5 py-2 duration-300 rtl:flex-row-reverse"},Xb=["modelValue"],Jb={class:"text-success-500 peer-disabled:opacity-75"},Zb=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),Qb={class:"font-heading text-muted-800 text-xs font-semibold leading-tight dark:text-white"},ev={__name:"SelectColumnItem",props:{checked:{default:!1},columnName:{default:""}},setup(n){const e=n;return(t,i)=>(u.openBlock(),u.createElementBlock("div",Yb,[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,onClick:i[0]||(i[0]=s=>t.$emit("toggle")),type:"checkbox",class:"peer cursor-pointer disabled:cursor-not-allowed","true-value":"true","false-value":"false"},null,8,Xb),u.createElementVNode("label",Jb,[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),Zb])],2),u.createElementVNode("div",null,[u.createElementVNode("h6",Qb,u.toDisplayString(n.columnName),1)])]))}},cT="",ai=n=>(u.pushScopeId("data-v-6d323442"),n=n(),u.popScopeId(),n),tv={class:"fc-header"},iv={class:"fc-header-left-sid"},nv=[ai(()=>u.createElementVNode("svg",{viewBox:"0 0 24 24"},[u.createElementVNode("path",{stroke:"currentColor","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1))],sv={class:"z-[1]"},rv={class:"bg-muted-200 dark:bg-muted-800 cursor-pointer rounded-b-xl fm-light-shadow"},ov={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"},av={class:"text-muted-400 font-sans text-xs"},lv=ai(()=>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)),uv={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"},cv={class:"text-muted-400 font-sans text-xs"},dv=ai(()=>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)),hv={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"},fv={class:"text-muted-400 font-sans text-xs"},mv=ai(()=>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)),pv=[ai(()=>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))],gv=[ai(()=>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))],bv=[ai(()=>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))],vv={class:"bg-white rounded-xl rtl:text-right ltr:text-left fm-light-shadow"},wv={class:"m-3 mt-2"},yv={class:"p-2"},Cv={class:"fm-header-rigth-sid flex w-full sm:w-auto rtl:flex-row-reverse rtl:justify-end z-10"},Ev={key:0},xv=[ai(()=>u.createElementVNode("span",null,null,-1))],_v=[ai(()=>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))],Rv={class:"group/nui-input relative rtl:"},kv=["placeholder"],Sv=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-6d323442><svg class="icon h-[1.15rem] w-[1.15rem]" width="1em" height="1em" viewBox="0 0 24 24" data-v-6d323442><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" data-v-6d323442><circle cx="11" cy="11" r="8" data-v-6d323442></circle><path d="m21 21l-4.35-4.35" data-v-6d323442></path></g></svg></div>',1),Tv=Un({__name:"MButtonBox",setup(n){const{event:e}=ct.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",tv,[u.createElementVNode("div",iv,[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"))}),nv,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",sv,u.toDisplayString(h.$fcTr("export")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",rv,[u.createElementVNode("a",ov,[u.createElementVNode("p",av,u.toDisplayString(h.$fcTr("export_as_pdf")),1),lv]),u.createElementVNode("a",uv,[u.createElementVNode("p",cv,u.toDisplayString(h.$fcTr("export_as_excel")),1),dv]),u.createElementVNode("a",hv,[u.createElementVNode("p",fv,u.toDisplayString(h.$fcTr("print")),1),mv])])]),_: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"},pv,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}),gv,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"])?"!bg-white":"",JSON.parse(p["aria-expanded"])?s.value==="rtl"?"expanded-rtl":"expanded2":""]]}),bv,16)]),default:u.withCtx(()=>[u.createElementVNode("span",null,u.toDisplayString(h.$fcTr("custom_column")),1)]),_:2},1024)]),default:u.withCtx(()=>[u.createElementVNode("div",vv,[u.createElementVNode("div",wv,u.toDisplayString(h.$fcTr("custom_column")),1),u.createElementVNode("ul",yv,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(t).flatFieldsWithoutActions,p=>(u.openBlock(),u.createBlock(ev,{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",Cv,[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",Ev,xv)):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"},_v,2))],16)]),_:1},8,["text"]),u.createElementVNode("div",Rv,[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,kv),Sv])])]))}},[["__scopeId","data-v-6d323442"]]),vT="",wT="",yT="",Mv={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"},Lv={component:n=>u.h(ac,{...n,class:"mdi"})},$e=[String,Function,Object,Array],So=Symbol.for("vuetify:icons"),qs=X({icon:{type:$e},tag:{type:String,required:!0}},"icon"),rc=ge()({name:"VComponentIcon",props:qs(),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)]}})}}}),oc=mn({name:"VSvgIcon",inheritAttrs:!1,props:qs(),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:qs(),setup(n){return()=>u.createVNode(n.tag,null,{default:()=>[n.icon]})}});const ac=mn({name:"VClassIcon",props:qs(),setup(n){return()=>u.createVNode(n.tag,{class:n.icon},null)}}),Dv={svg:{component:oc},class:{component:ac}};function Av(n){return Ft({defaultSet:"mdi",sets:{...Dv,mdi:Lv},aliases:{...Mv,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 Fv=n=>{const e=u.inject(So);if(!e)throw new Error("Missing Vuetify Icons provide!");return{iconData:u.computed(()=>{var h;const i=u.unref(n);if(!i)return{component:rc};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:oc,icon:s};if(typeof s!="string")return{component:rc,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}})}},Pv=["x-small","small","default","large","x-large"],To=X({size:{type:[String,Number],default:"default"}},"size");function Mo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return so(()=>{let t,i;return Ds(Pv,n.size)?t=`${e}--size-${n.size}`:n.size&&(i={width:he(n.size),height:he(n.size)}),{sizeClasses:t,sizeStyles:i}})}const li=X({tag:{type:String,default:"div"}},"tag"),Vv=X({color:String,start:Boolean,end:Boolean,icon:$e,...Ve(),...To(),...li({tag:"i"}),...Pt()},"VIcon"),Et=ge()({name:"VIcon",props:Vv(),setup(n,e){let{attrs:t,slots:i}=e;const s=u.ref(),{themeClasses:o}=Qt(n),{iconData:l}=Fv(u.computed(()=>s.value||n.icon)),{sizeClasses:c}=Mo(n),{textColorClasses:h,textColorStyles:f}=Ei(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=iu(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:he(n.size),height:he(n.size),width:he(n.size)},f.value,n.style],role:t.onClick?"button":void 0,"aria-hidden":!t.onClick},{default:()=>[p]})}),{}}}),CT="",Ov=X({text:String,clickable:Boolean,...Ve(),...Pt()},"VLabel"),lc=ge()({name:"VLabel",props:Ov(),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="",Nv=[null,"default","comfortable","compact"],gn=X({density:{type:String,default:"default",validator:n=>Nv.includes(n)}},"density");function bn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return{densityClasses:u.computed(()=>`${e}--density-${n.density}`)}}const uc=Symbol.for("vuetify:selection-control-group"),cc=X({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(),...Pt()},"SelectionControlGroup"),zv=X({...cc({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup");ge()({name:"VSelectionControlGroup",props:zv(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),s=jt(),o=u.computed(()=>n.id||`v-selection-control-group-${s}`),l=u.computed(()=>n.name||o.value),c=new Set;return u.provide(uc,{modelValue:i,forceUpdate:()=>{c.forEach(h=>h())},onForceUpdate:h=>{c.add(h),u.onScopeDispose(()=>{c.delete(h)})}}),zs({[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="",Lo=Symbol("rippleStop"),Hv=80;function dc(n,e){n.style.transform=e,n.style.webkitTransform=e}function Do(n){return n.constructor.name==="TouchEvent"}function hc(n){return n.constructor.name==="KeyboardEvent"}const Iv=function(n,e){var b;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=0,s=0;if(!hc(n)){const g=e.getBoundingClientRect(),w=Do(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}},Ys={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}=Iv(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"),dc(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"),dc(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 fc(n){return typeof n>"u"||!!n}function ss(n){const e={},t=n.currentTarget;if(!(!(t!=null&&t._ripple)||t._ripple.touched||n[Lo])){if(n[Lo]=!0,Do(n))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(e.center=t._ripple.centered||hc(n),t._ripple.class&&(e.class=t._ripple.class),Do(n)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{Ys.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)},Hv)}else Ys.show(n,t,e)}}function mc(n){n[Lo]=!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)}),Ys.hide(e)}}function pc(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 gc(n){!rs&&(n.keyCode===Zl.enter||n.keyCode===Zl.space)&&(rs=!0,ss(n))}function bc(n){rs=!1,xt(n)}function vc(n){rs&&(rs=!1,xt(n))}function wc(n,e,t){const{value:i,modifiers:s}=e,o=fc(i);if(o||Ys.hide(n),n._ripple=n._ripple??{},n._ripple.enabled=o,n._ripple.centered=s.center,n._ripple.circle=s.circle,eo(i)&&i.class&&(n._ripple.class=i.class),o&&!t){if(s.stop){n.addEventListener("touchstart",mc,{passive:!0}),n.addEventListener("mousedown",mc);return}n.addEventListener("touchstart",ss,{passive:!0}),n.addEventListener("touchend",xt,{passive:!0}),n.addEventListener("touchmove",pc,{passive:!0}),n.addEventListener("touchcancel",xt),n.addEventListener("mousedown",ss),n.addEventListener("mouseup",xt),n.addEventListener("mouseleave",xt),n.addEventListener("keydown",gc),n.addEventListener("keyup",bc),n.addEventListener("blur",vc),n.addEventListener("dragstart",xt,{passive:!0})}else!o&&t&&yc(n)}function yc(n){n.removeEventListener("mousedown",ss),n.removeEventListener("touchstart",ss),n.removeEventListener("touchend",xt),n.removeEventListener("touchmove",pc),n.removeEventListener("touchcancel",xt),n.removeEventListener("mouseup",xt),n.removeEventListener("mouseleave",xt),n.removeEventListener("keydown",gc),n.removeEventListener("keyup",bc),n.removeEventListener("dragstart",xt),n.removeEventListener("blur",vc)}function Bv(n,e){wc(n,e,!1)}function Wv(n){delete n._ripple,yc(n)}function $v(n,e){if(e.value===e.oldValue)return;const t=fc(e.oldValue);wc(n,e,t)}const Ao={mounted:Bv,unmounted:Wv,updated:$v},Cc=X({label:String,trueValue:null,falseValue:null,value:null,...Ve(),...cc()},"VSelectionControl");function Gv(n){const e=u.inject(uc,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?[...Jt(i.value),g]:Jt(i.value).filter(E=>!n.valueComparator(E,s.value))),e?e.modelValue.value=w:i.value=w}}),{textColorClasses:h,textColorStyles:f}=Ei(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 Ec=ge()({name:"VSelectionControl",directives:{Ripple:Ao},inheritAttrs:!1,props:Cc(),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}=Gv(n),b=jt(),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 _(M){w.value=!0,ln(M.target,":focus-visible")!==!1&&(E.value=!0)}function k(){w.value=!1,E.value=!1}function V(M){n.readonly&&s&&u.nextTick(()=>s.forceUpdate()),c.value=M.target.checked}return Me(()=>{var B,D;const M=i.label?i.label({label:n.label,props:{for:g.value}}):n.label,[P,A]=eu(t),H=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},A),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]},P,{style:n.style}),[u.createVNode("div",{class:["v-selection-control__wrapper",h.value],style:f.value},[(B=i.default)==null?void 0:B.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:H,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),H])]),[[u.resolveDirective("ripple"),n.ripple&&[!n.disabled&&!n.readonly,null,["center","circle"]]]])]),M&&u.createVNode(lc,{for:g.value,clickable:!0,onClick:I=>I.stopPropagation()},{default:()=>[M]})])}),{isFocused:w,input:x}}}),jv=X({indeterminate:Boolean,indeterminateIcon:{type:$e,default:"$checkboxIndeterminate"},...Cc({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),xc=ge()({name:"VCheckboxBtn",props:jv(),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(Ec.filterProps(n)[0],["modelValue"]);return u.createVNode(Ec,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 _c(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="",Uv=X({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ve(),...pn({transition:{component:nc,leaveAbsolute:!0,group:!0}})},"VMessages"),Kv=ge()({name:"VMessages",props:Uv(),setup(n,e){let{slots:t}=e;const i=u.computed(()=>Jt(n.messages)),{textColorClasses:s,textColorStyles:o}=Ei(u.computed(()=>n.color));return Me(()=>u.createVNode(xi,{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]))]})),{}}}),Rc=X({focused:Boolean,"onUpdate:focused":Zt()},"focus");function kc(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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 qv=Symbol.for("vuetify:form");function Fo(){return u.inject(qv,null)}const Yv=X({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,...Rc()},"validation");function Xv(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci(),t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jt();const i=We(n,"modelValue"),s=u.computed(()=>n.validationValue===void 0?i.value:n.validationValue),o=Fo(),l=u.ref([]),c=u.shallowRef(!0),h=u.computed(()=>!!(Jt(i.value===""?null:i.value).length||Jt(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?Jt(n.errorMessages).slice(0,Math.max(0,+n.maxErrors)):l.value),g=u.computed(()=>{let P=(n.validateOn??(o==null?void 0:o.validateOn.value))||"input";P==="lazy"&&(P="input lazy");const A=new Set((P==null?void 0:P.split(" "))??[]);return{blur:A.has("blur")||A.has("input"),input:A.has("input"),submit:A.has("submit"),lazy:A.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:M,reset:k,resetValidation:V})}),u.onBeforeUnmount(()=>{o==null||o.unregister(_.value)}),u.onMounted(async()=>{g.value.lazy||await M(!0),o==null||o.update(_.value,w.value,b.value)}),Hi(()=>g.value.input,()=>{u.watch(s,()=>{if(s.value!=null)M();else if(n.focused){const P=u.watch(()=>n.focused,A=>{A||M(),P()})}})}),Hi(()=>g.value.blur,()=>{u.watch(()=>n.focused,P=>{P||M()})}),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=[]:M(!0)}async function M(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const A=[];E.value=!0;for(const H of n.rules){if(A.length>=+(n.maxErrors??1))break;const D=await(typeof H=="function"?H:()=>H)(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}A.push(D||"")}}return l.value=A,E.value=!1,c.value=P,l.value}return{errorMessages:b,isDirty:h,isDisabled:f,isReadonly:p,isPristine:c,isValid:w,isValidating:E,reset:k,resetValidation:V,validate:M,validationClasses:x}}const Sc=X({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":Zt(),"onClick:append":Zt(),...Ve(),...gn(),...Yv()},"VInput"),Tc=ge()({name:"VInput",props:{...Sc()},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}=_c(n),h=jt(),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:M,validate:P,validationClasses:A}=Xv(n,"v-input",f),H=u.computed(()=>({id:f,messagesId:p,isDirty:g,isDisabled:w,isReadonly:E,isPristine:x,isValid:_,isValidating:k,reset:V,resetValidation:M,validate:P})),B=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,J,ee,le;const D=!!(i.prepend||n.prependIcon),I=!!(i.append||n.appendIcon),Y=B.value.length>0,ie=!n.hideDetails||n.hideDetails==="auto"&&(Y||!!i.details);return u.createVNode("div",{class:["v-input",`v-input--${n.direction}`,{"v-input--center-affix":n.centerAffix},o.value,l.value,A.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,H.value),n.prependIcon&&u.createVNode(c,{key:"prepend-icon",name:"prepend"},null)]),i.default&&u.createVNode("div",{class:"v-input__control"},[(J=i.default)==null?void 0:J.call(i,H.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,H.value)]),ie&&u.createVNode("div",{class:"v-input__details"},[u.createVNode(Kv,{id:p.value,active:Y,messages:B.value},{message:i.message}),(le=i.details)==null?void 0:le.call(i,H.value)])])}),{reset:V,resetValidation:M,validate:P}}}),kT="",ST="",TT="",MT="";function Jv(n){return{aspectStyles:u.computed(()=>{const e=Number(n.aspectRatio);return e?{paddingBottom:String(1/e*100)+"%"}:void 0})}}const Mc=X({aspectRatio:[String,Number],contentClass:String,inline:Boolean,...Ve(),...Xn()},"VResponsive"),Lc=ge()({name:"VResponsive",props:Mc(),setup(n,e){let{slots:t}=e;const{aspectStyles:i}=Jv(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 Zv(n,e){if(!Jr)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?Dc(n,e):f.init=!0},o);n._observe=Object(n._observe),n._observe[e.instance.$.uid]={init:!1,observer:l},l.observe(n)}function Dc(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 Po={mounted:Zv,unmounted:Dc},Qv=X({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,...Mc(),...Ve(),...pn()},"VImg"),ew=ge()({name:"VImg",directives:{intersect:Po},props:Qv(),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)&&!(Jr&&!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,Y;if(t("loadstart",((I=o.value)==null?void 0:I.currentSrc)||f.value.src),(Y=o.value)!=null&&Y.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 Y=()=>{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(Y,I):(D.currentSrc.endsWith(".svg")||D.currentSrc.startsWith("data:image/svg+xml"))&&(c.value=1,h.value=1)};Y()}const k=u.computed(()=>({"v-img__img--cover":n.cover,"v-img__img--contain":!n.cover})),V=()=>{var Y;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=(Y=i.sources)==null?void 0:Y.call(i);return u.createVNode(xi,{transition:n.transition,appear:!0},{default:()=>[u.withDirectives(I?u.createVNode("picture",{class:"v-img__picture"},[I,D]):D,[[u.vShow,l.value==="loaded"]])]})},M=()=>u.createVNode(xi,{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)]}),P=()=>i.placeholder?u.createVNode(xi,{transition:n.transition,appear:!0},{default:()=>[(l.value==="loading"||l.value==="error"&&!i.error)&&u.createVNode("div",{class:"v-img__placeholder"},[i.placeholder()])]}):null,A=()=>i.error?u.createVNode(xi,{transition:n.transition,appear:!0},{default:()=>[l.value==="error"&&u.createVNode("div",{class:"v-img__error"},[i.error()])]}):null,H=()=>n.gradient?u.createVNode("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${n.gradient})`}},null):null,B=u.shallowRef(!1);{const D=u.watch(p,I=>{I&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})}),D())})}return Me(()=>{const[D]=Lc.filterProps(n);return u.withDirectives(u.createVNode(Lc,u.mergeProps({class:["v-img",{"v-img--booting":!B.value},n.class],style:[{width:he(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(M,null,null),u.createVNode(H,null,null),u.createVNode(P,null,null),u.createVNode(A,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=X({rounded:{type:[Boolean,Number,String],default:void 0}},"rounded");function wn(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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 tw=["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=X({color:String,variant:{type:String,default:"elevated",validator:n=>tw.includes(n)}},"variant");function Oo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();const t=u.computed(()=>{const{variant:o}=u.unref(n);return`${e}--variant-${o}`}),{colorClasses:i,colorStyles:s}=wo(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 iw=X({start:Boolean,end:Boolean,icon:$e,image:String,...Ve(),...gn(),...vn(),...To(),...li(),...Pt(),...os({variant:"flat"})},"VAvatar"),Xs=ge()({name:"VAvatar",props:iw(),setup(n,e){let{slots:t}=e;const{themeClasses:i}=Qt(n),{colorClasses:s,colorStyles:o,variantClasses:l}=Oo(n),{densityClasses:c}=bn(n),{roundedClasses:h}=wn(n),{sizeClasses:f,sizeStyles:p}=Mo(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(ew,{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")]}})),{}}}),LT="",nw=X({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),sw=X({value:null,disabled:Boolean,selectedClass:String},"group-item");function rw(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=jt();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 ow(n,e){let t=!1;const i=u.reactive([]),s=We(n,"modelValue",[],g=>g==null?[]:Ac(i,Jt(g)),g=>{const w=lw(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=Ls(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=>aw(i,g)};return u.provide(e,b),b}function aw(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 lw(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"),uw=X({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:rn},...Ve(),...nw({selectedClass:"v-chip--selected"}),...li(),...Pt(),...os({variant:"tonal"})},"VChipGroup");ge()({name:"VChipGroup",props:uw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const{themeClasses:i}=Qt(n),{isSelected:s,select:o,next:l,prev:c,selected:h}=ow(n,Fc);return zs({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=X({border:[Boolean,Number,String]},"border");function zo(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();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=X({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 cw=X({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:Zt(),onClickOnce:Zt(),...No(),...Ve(),...gn(),...Ho(),...sw(),...vn(),...Uu(),...To(),...li({tag:"span"}),...Pt(),...os({variant:"tonal"})},"VChip"),Pc=ge()({name:"VChip",directives:{Ripple:Ao},props:cw(),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}=Mo(n),{themeClasses:E}=Qt(n),x=We(n,"modelValue"),_=rw(n,Fc,!1),k=ju(n,t),V=u.computed(()=>n.link!==!1&&k.isLink.value),M=u.computed(()=>!n.disabled&&n.link!==!1&&(!!_||n.link||k.isClickable.value)),P=u.computed(()=>({"aria-label":o(n.closeLabel),onClick(B){B.stopPropagation(),x.value=!1,i("click:close",B)}}));function A(B){var D;i("click",B),M.value&&((D=k.navigate)==null||D.call(k,B),_==null||_.toggle())}function H(B){(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),A(B))}return()=>{const B=k.isLink.value?"a":n.tag,D=!!(n.appendIcon||n.appendAvatar),I=!!(D||s.append),Y=!!(s.close||n.closable),ie=!!(s.filter||n.filter)&&_,G=!!(n.prependIcon||n.prependAvatar),J=!!(G||s.prepend),ee=!_||_.isSelected.value;return x.value&&u.withDirectives(u.createVNode(B,{class:["v-chip",{"v-chip--disabled":n.disabled,"v-chip--label":n.label,"v-chip--link":M.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:M.value?0:void 0,onClick:A,onKeydown:M.value&&!V.value&&H},{default:()=>{var le;return[Vo(M.value,"v-chip"),ie&&u.createVNode(sc,{key:"filter"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-chip__filter"},[s.filter?u.createVNode(ei,{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]])]}),J&&u.createVNode("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?u.createVNode(ei,{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(Xs,{key:"prepend-avatar",image:n.prependAvatar,start:!0},null)])]),u.createVNode("div",{class:"v-chip__content"},[((le=s.default)==null?void 0:le.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(ei,{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(Xs,{key:"append-avatar",end:!0,image:n.appendAvatar},null)])]),Y&&u.createVNode("div",u.mergeProps({key:"close",class:"v-chip__close"},P.value),[s.close?u.createVNode(ei,{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"),M.value&&n.ripple,null]])}}}),DT="",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 dw={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},hw={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)}},fw=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}},mw=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}},pw=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([])}},gw=X({selectStrategy:[String,Function],openStrategy:[String,Object],opened:Array,selected:Array,mandatory:Boolean},"nested"),bw=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 mw(n.mandatory);case"leaf":return fw(n.mandatory);case"independent":return Wo(n.mandatory);case"single-independent":return zc(n.mandatory);case"classic":default:return pw(n.mandatory)}}),l=u.computed(()=>{if(typeof n.openStrategy=="object")return n.openStrategy;switch(n.openStrategy){case"list":return hw;case"single":return dw;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(jt()),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},vw=()=>{const n=u.inject(as,Hc);u.provide(as,{...n,isGroupActivator:!0})};function ww(){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 yw=mn({name:"VListGroupActivator",setup(n,e){let{slots:t}=e;return vw(),()=>{var i;return(i=t.default)==null?void 0:i.call(t)}}}),Cw=X({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(),...li()},"VListGroup"),Bc=ge()({name:"VListGroup",props:Cw(),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}=ww();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(ei,{defaults:g.value},{default:()=>[u.createVNode(yw,null,{default:()=>[t.activator({props:p.value,isOpen:i.value})]})]}),u.createVNode(xi,{transition:{component:Ub},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]])]}})]})),{}}}),AT="",Ew=Su("v-list-item-subtitle"),xw=Su("v-list-item-title"),_w=X({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:Zt(),onClickOnce:Zt(),...No(),...Ve(),...gn(),...Xn(),...Ho(),...vn(),...Uu(),...li(),...Pt(),...os({variant:"text"})},"VListItem"),yn=ge()({name:"VListItem",directives:{Ripple:Ao},props:_w(),emits:{click:n=>!0},setup(n,e){let{attrs:t,slots:i,emit:s}=e;const o=ju(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),M=u.computed(()=>n.color??n.activeColor),P=u.computed(()=>({color:x.value?M.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:A}=Qt(n),{borderClasses:H}=zo(n),{colorClasses:B,colorStyles:D,variantClasses:I}=Oo(P),{densityClasses:Y}=bn(n),{dimensionStyles:ie}=Jn(n),{elevationClasses:G}=Io(n),{roundedClasses:J}=wn(V),ee=u.computed(()=>n.lines?`v-list-item--${n.lines}-line`:void 0),le=u.computed(()=>({isActive:x.value,select:c,isSelected:h.value,isIndeterminate:f.value}));function _e($){var Q;s("click",$),!(p||!k.value)&&((Q=o.navigate)==null||Q.call(o,$),n.value!=null&&c(!h.value,$))}function j($){($.key==="Enter"||$.key===" ")&&($.preventDefault(),_e($))}return Me(()=>{const $=_.value?"a":n.tag,Q=i.title||n.title,fe=i.subtitle||n.subtitle,we=!!(n.appendAvatar||n.appendIcon),ye=!!(we||i.append),Ie=!!(n.prependAvatar||n.prependIcon),De=!!(Ie||i.prepend);return E==null||E.updateHasPrepend(De),n.activeColor&&zg("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},A.value,H.value,B.value,Y.value,G.value,ee.value,J.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:_e,onKeydown:k.value&&!_.value&&j},{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(ei,{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 Ee;return[(Ee=i.prepend)==null?void 0:Ee.call(i,le.value)]}}):u.createVNode(u.Fragment,null,[n.prependAvatar&&u.createVNode(Xs,{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(xw,{key:"title"},{default:()=>{var Ee;return[((Ee=i.title)==null?void 0:Ee.call(i,{title:n.title}))??n.title]}}),fe&&u.createVNode(Ew,{key:"subtitle"},{default:()=>{var Ee;return[((Ee=i.subtitle)==null?void 0:Ee.call(i,{subtitle:n.subtitle}))??n.subtitle]}}),(ze=i.default)==null?void 0:ze.call(i,le.value)]),ye&&u.createVNode("div",{key:"append",class:"v-list-item__append"},[i.append?u.createVNode(ei,{key:"append-defaults",disabled:!we,defaults:{VAvatar:{density:n.density,image:n.appendAvatar},VIcon:{density:n.density,icon:n.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var Ee;return[(Ee=i.append)==null?void 0:Ee.call(i,le.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(Xs,{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]])}),{}}}),Rw=X({color:String,inset:Boolean,sticky:Boolean,title:String,...Ve(),...li()},"VListSubheader"),kw=ge()({name:"VListSubheader",props:Rw(),setup(n,e){let{slots:t}=e;const{textColorClasses:i,textColorStyles:s}=Ei(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])]}})}),{}}}),FT="",Sw=X({color:String,inset:Boolean,length:[Number,String],thickness:[Number,String],vertical:Boolean,...Ve(),...Pt()},"VDivider"),Tw=ge()({name:"VDivider",props:Sw(),setup(n,e){let{attrs:t}=e;const{themeClasses:i}=Qt(n),{textColorClasses:s,textColorStyles:o}=Ei(u.toRef(n,"color")),l=u.computed(()=>{const c={};return n.length&&(c[n.vertical?"maxHeight":"maxWidth"]=he(n.length)),n.thickness&&(c[n.vertical?"borderRightWidth":"borderTopWidth"]=he(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)),{}}}),Mw=X({items:Array},"VListChildren"),Wc=ge()({name:"VListChildren",props:Mw(),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(Tw,c,null);if(h==="subheader")return((E=t.subheader)==null?void 0:E.call(t,{props:c}))??u.createVNode(kw,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=X({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=ft(e,n.itemTitle,e),i=n.returnObject?e:ft(e,n.itemValue,t),s=ft(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:ft(e,n.itemProps),l={title:t,value:i,...o};return{title:String(l.title??""),value:l.value,props:l,children:Array.isArray(s)?jc(n,s):void 0,raw:e}}function jc(n,e){const t=[];for(const i of e)t.push(Gc(n,i));return t}function Uc(n){const e=u.computed(()=>jc(n,n.items));return Lw(e,t=>Gc(n,t))}function Lw(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 Dw(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function Aw(n,e){const t=ft(e,n.itemType,"item"),i=Dw(e)?e:ft(e,n.itemTitle),s=ft(e,n.itemValue,void 0),o=ft(e,n.itemChildren),l=n.itemProps===!0?on(e,["children"])[1]:ft(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(Aw(n,i));return t}function Fw(n){return{items:u.computed(()=>Kc(n,n.items))}}const Pw=X({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,lines:{type:[Boolean,String],default:"one"},nav:Boolean,...gw({selectStrategy:"single-leaf",openStrategy:"list"}),...No(),...Ve(),...gn(),...Xn(),...Ho(),itemType:{type:String,default:"type"},...$c(),...vn(),...li(),...Pt(),...os({variant:"text"})},"VList"),qc=ge()({name:"VList",props:Pw(),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}=Fw(n),{themeClasses:s}=Qt(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}=bw(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(),zs({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),M=u.ref();function P(I){V.value=!0}function A(I){V.value=!1}function H(I){var Y;!V.value&&!(I.relatedTarget&&((Y=M.value)!=null&&Y.contains(I.relatedTarget)))&&D()}function B(I){if(M.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(M.value)return As(M.value,I)}return Me(()=>u.createVNode(n.tag,{ref:M,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:P,onFocusout:A,onFocus:H,onKeydown:B},{default:()=>[u.createVNode(Wc,{items:i.value},t)]})),{open:g,select:w,focus:D}}}),PT="",VT="",OT="",Vw=X({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ve(),...pn({transition:{component:nc}})},"VCounter"),Ow=ge()({name:"VCounter",functional:!0,props:Vw(),setup(n,e){let{slots:t}=e;const i=u.computed(()=>n.max?`${n.value} / ${n.max}`:String(n.value));return Me(()=>u.createVNode(xi,{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]])]})),{}}}),NT="",Nw=X({floating:Boolean,...Ve()},"VFieldLabel"),Js=ge()({name:"VFieldLabel",props:Nw(),setup(n,e){let{slots:t}=e;return Me(()=>u.createVNode(lc,{class:["v-field-label",{"v-field-label--floating":n.floating},n.class],style:n.style,"aria-hidden":n.floating||void 0},t)),{}}}),zT="";function zw(n,e){const t=u.ref(),i=u.shallowRef(!1);if(Jr){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"},Hw=X({location:String},"location");function Iw(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}=oo(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 Bw=X({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(),...Hw({location:"top"}),...vn(),...li(),...Pt()},"VProgressLinear"),Ww=ge()({name:"VProgressLinear",props:Bw(),emits:{"update:modelValue":n=>!0},setup(n,e){let{slots:t}=e;const i=We(n,"modelValue"),{isRtl:s,rtlClasses:o}=Zn(),{themeClasses:l}=Qt(n),{locationStyles:c}=Iw(n),{textColorClasses:h,textColorStyles:f}=Ei(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:_}=zw(),k=u.computed(()=>parseInt(n.max,10)),V=u.computed(()=>parseInt(n.height,10)),M=u.computed(()=>parseFloat(n.bufferValue)/k.value*100),P=u.computed(()=>parseFloat(i.value)/k.value*100),A=u.computed(()=>s.value!==n.reverse),H=u.computed(()=>n.indeterminate?"fade-transition":"slide-x-transition"),B=u.computed(()=>n.bgOpacity==null?n.bgOpacity:parseFloat(n.bgOpacity));function D(I){if(!x.value)return;const{left:Y,right:ie,width:G}=x.value.getBoundingClientRect(),J=A.value?G-I.clientX+(ie-G):I.clientX-Y;i.value=Math.round(J/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":A.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?he(V.value):0,"--v-progress-linear-height":he(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:P.value,onClick:n.clickable&&D},{default:()=>[n.stream&&u.createVNode("div",{key:"stream",class:["v-progress-linear__stream",h.value],style:{...f.value,[A.value?"left":"right"]:he(-V.value),borderTop:`${he(V.value/2)} dotted`,opacity:B.value,top:`calc(50% - ${he(V.value/4)})`,width:he(100-M.value,"%"),"--v-progress-linear-stream-to":he(V.value*(A.value?1:-1))}},null),u.createVNode("div",{class:["v-progress-linear__background",p.value],style:[b.value,{opacity:B.value,width:he(n.stream?M.value:100,"%")}]},null),u.createVNode(u.Transition,{name:H.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:he(P.value,"%")}]},null)]}),t.default&&u.createVNode("div",{class:"v-progress-linear__content"},[t.default({value:P.value,buffer:M.value})])]})),{}}}),$w=X({loading:[Boolean,String]},"loader");function Gw(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci();return{loaderClasses:u.computed(()=>({[`${e}--loading`]:n.loading}))}}function jw(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(Ww,{active:n.active,color:n.color,height:"2",indeterminate:!0},null)])}const Uw=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Xc=X({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=>Uw.includes(n)},"onClick:clear":Zt(),"onClick:appendInner":Zt(),"onClick:prependInner":Zt(),...Ve(),...$w(),...vn(),...Pt()},"VField"),Jc=ge()({name:"VField",inheritAttrs:!1,props:{id:String,...Rc(),...Xc()},emits:{"update:focused":n=>!0,"update:modelValue":n=>!0},setup(n,e){let{attrs:t,emit:i,slots:s}=e;const{themeClasses:o}=Qt(n),{loaderClasses:l}=Gw(n),{focusClasses:c,isFocused:h,focus:f,blur:p}=kc(n),{InputIcon:b}=_c(n),{roundedClasses:g}=wn(n),{rtlClasses:w}=Zn(),E=u.computed(()=>n.dirty||n.active),x=u.computed(()=>!n.singleLine&&!!(n.label||s.label)),_=jt(),k=u.computed(()=>n.id||`input-${_}`),V=u.computed(()=>`${k.value}-messages`),M=u.ref(),P=u.ref(),A=u.ref(),H=u.computed(()=>["plain","underlined"].includes(n.variant)),{backgroundColorClasses:B,backgroundColorStyles:D}=Yn(u.toRef(n,"bgColor")),{textColorClasses:I,textColorStyles:Y}=Ei(u.computed(()=>n.error||n.disabled?void 0:E.value&&h.value?n.color:n.baseColor));u.watch(E,J=>{if(x.value){const ee=M.value.$el,le=P.value.$el;requestAnimationFrame(()=>{const _e=uo(ee),j=le.getBoundingClientRect(),$=j.x-_e.x,Q=j.y-_e.y-(_e.height/2-j.height/2),fe=j.width/.75,we=Math.abs(fe-_e.width)>1?{maxWidth:he(fe)}:void 0,ye=getComputedStyle(ee),Ie=getComputedStyle(le),De=parseFloat(ye.transitionDuration)*1e3||150,ze=parseFloat(Ie.getPropertyValue("--v-field-label-scale")),Ee=Ie.getPropertyValue("color");ee.style.visibility="visible",le.style.visibility="hidden",cn(ee,{transform:`translate(${$}px, ${Q}px) scale(${ze})`,color:Ee,...we},{duration:De,easing:Hs,direction:J?"normal":"reverse"}).finished.then(()=>{ee.style.removeProperty("visibility"),le.style.removeProperty("visibility")})})}},{flush:"post"});const ie=u.computed(()=>({isActive:E,isFocused:h,controlRef:A,blur:p,focus:f}));function G(J){J.target!==document.activeElement&&J.preventDefault()}return Me(()=>{var $,Q,fe;const J=n.variant==="outlined",ee=s["prepend-inner"]||n.prependInnerIcon,le=!!(n.clearable||s.clear),_e=!!(s["append-inner"]||n.appendInnerIcon||le),j=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":_e,"v-field--center-affix":n.centerAffix??!H.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":!j,[`v-field--variant-${n.variant}`]:!0},o.value,B.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(jw,{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(Js,{key:"floating-label",ref:P,class:[I.value],floating:!0,for:k.value,style:Y.value},{default:()=>[j]}),u.createVNode(Js,{ref:M,for:k.value},{default:()=>[j]}),(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})]),le&&u.createVNode(sc,{key:"clear"},{default:()=>[u.withDirectives(u.createVNode("div",{class:"v-field__clearable",onMousedown:we=>{we.preventDefault(),we.stopPropagation()}},[s.clear?s.clear():u.createVNode(b,{name:"clear"},null)]),[[u.vShow,n.dirty]])]}),_e&&u.createVNode("div",{key:"append",class:"v-field__append-inner"},[(fe=s["append-inner"])==null?void 0:fe.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:Y.value},[J&&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(Js,{ref:P,floating:!0,for:k.value},{default:()=>[j]})]),u.createVNode("div",{class:"v-field__outline__end"},null)]),H.value&&x.value&&u.createVNode(Js,{ref:P,floating:!0,for:k.value},{default:()=>[j]})])])}),{controlRef:A}}});function Kw(n){const e=Object.keys(Jc.props).filter(t=>!no(t)&&t!=="class"&&t!=="style");return on(n,e)}const qw=["color","file","time","date","datetime-local","week","month"],$o=X({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,...Sc(),...Xc()},"VTextField"),Zs=ge()({name:"VTextField",directives:{Intersect:Po},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}=kc(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(H,B){var D,I;!n.autofocus||!H||(I=(D=B[0].target)==null?void 0:D.focus)==null||I.call(D)}const w=u.ref(),E=u.ref(),x=u.ref(),_=u.computed(()=>qw.includes(n.type)||n.persistentPlaceholder||l.value||n.active);function k(){var H;x.value!==document.activeElement&&((H=x.value)==null||H.focus()),l.value||c()}function V(H){i("mousedown:control",H),H.target!==x.value&&(k(),H.preventDefault())}function M(H){k(),i("click:control",H)}function P(H){H.stopPropagation(),k(),u.nextTick(()=>{o.value=null,kg(n["onClick:clear"],H)})}function A(H){var D;const B=H.target;if(o.value=B.value,(D=n.modelModifiers)!=null&&D.trim&&["text","search","password","tel","url"].includes(n.type)){const I=[B.selectionStart,B.selectionEnd];u.nextTick(()=>{B.selectionStart=I[0],B.selectionEnd=I[1]})}}return Me(()=>{const H=!!(s.counter||n.counter||n.counterValue),B=!!(H||s.details),[D,I]=eu(t),[{modelValue:Y,...ie}]=Tc.filterProps(n),[G]=Kw(n);return u.createVNode(Tc,u.mergeProps({ref:w,modelValue:o.value,"onUpdate:modelValue":J=>o.value=J,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:J=>{let{id:ee,isDisabled:le,isDirty:_e,isReadonly:j,isValid:$}=J;return u.createVNode(Jc,u.mergeProps({ref:E,onMousedown:V,onClick:M,"onClick:clear":P,"onClick:prependInner":n["onClick:prependInner"],"onClick:appendInner":n["onClick:appendInner"],role:n.role},G,{id:ee.value,active:_.value||_e.value,dirty:_e.value||n.dirty,disabled:le.value,focused:l.value,error:$.value===!1}),{...s,default:Q=>{let{props:{class:fe,...we}}=Q;const ye=u.withDirectives(u.createVNode("input",u.mergeProps({ref:x,value:o.value,onInput:A,autofocus:n.autofocus,readonly:j.value,disabled:le.value,name:n.name,placeholder:n.placeholder,size:1,type:n.type,onFocus:k,onBlur:h},we,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:fe,"data-no-activator":""},[s.default(),ye]):u.cloneVNode(ye,{class:fe}),n.suffix&&u.createVNode("span",{class:"v-text-field__suffix"},[u.createVNode("span",{class:"v-text-field__suffix__text"},[n.suffix])])])}})},details:B?J=>{var ee;return u.createVNode(u.Fragment,null,[(ee=s.details)==null?void 0:ee.call(s,J),H&&u.createVNode(u.Fragment,null,[u.createVNode("span",null,null),u.createVNode(Ow,{active:n.persistentCounter||l.value,value:f.value,max:p.value},s.counter)])])}:void 0})}),ts({},w,E,x)}}),HT="";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(to(l)),i.value=void 0),o&&s.observe(to(o))},{flush:"post"})}return{resizeRef:t,contentRect:u.readonly(i)}}const Yw=X({renderless:Boolean,...Ve()},"VVirtualScrollItem"),Xw=ge()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Yw(),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,Jw=X({itemHeight:{type:[Number,String],default:48}},"virtual");function Zw(n,e,t){const i=u.shallowRef(0),s=u.shallowRef(n.itemHeight),o=u.computed({get:()=>parseInt(s.value??0,10),set(B){s.value=B}}),l=u.ref(),{resizeRef:c,contentRect:h}=Zc();u.watchEffect(()=>{c.value=l.value});const f=Hu(),p=new Map;let b=Array.from({length:e.value.length});const g=u.computed(()=>{const B=(!h.value||l.value===document.documentElement?f.height.value:h.value.height)-((t==null?void 0:t.value)??0);return Math.ceil(B/o.value*1.7+1)});function w(B,D){o.value=Math.max(o.value,D),b[B]=D,p.set(e.value[B],D)}function E(B){return b.slice(0,B).reduce((D,I)=>D+(I||o.value),0)}function x(B){const D=e.value.length;let I=0,Y=0;for(;Y<B&&I<D;)Y+=b[I++]||o.value;return I-1}let _=0;function k(){if(!l.value||!h.value)return;const B=h.value.height-56,D=l.value.scrollTop,I=D<_?Qc:ed,Y=x(D+B/2),ie=Math.round(g.value/3),G=Y-ie,J=i.value+ie*2-1;I===Qc&&Y<=J?i.value=Kn(G,0,e.value.length):I===ed&&Y>=J&&(i.value=Kn(G,0,e.value.length-g.value)),_=D}function V(B){if(!l.value)return;const D=E(B);l.value.scrollTop=D}const M=u.computed(()=>Math.min(e.value.length,i.value+g.value)),P=u.computed(()=>e.value.slice(i.value,M.value).map((B,D)=>({raw:B,index:D+i.value}))),A=u.computed(()=>E(i.value)),H=u.computed(()=>E(e.value.length)-E(M.value));return u.watch(()=>e.value.length,()=>{b=Qr(e.value.length).map(()=>o.value),p.forEach((B,D)=>{const I=e.value.indexOf(D);I===-1?p.delete(D):b[I]=B})}),{containerRef:l,computedItems:P,itemHeight:o,paddingTop:A,paddingBottom:H,scrollToIndex:V,handleScroll:k,handleItemResize:w}}const Qw=X({items:{type:Array,default:()=>[]},renderless:Boolean,...Jw(),...Ve(),...Xn()},"VVirtualScroll"),td=ge()({name:"VVirtualScroll",props:Qw(),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}=Zw(n,u.toRef(n,"items"));return Hi(()=>n.renderless,()=>{u.onMounted(()=>{var g;o.value=Lu(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(Xw,{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:he(f.value)}},null),g,u.createVNode("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(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:he(f.value),paddingBottom:he(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=X({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"),ey=X({...nd(),...an($o({modelValue:null,role:"button"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:{component:ec}})},"VSelect");ge()({name:"VSelect",props:ey(),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:j=>{var $;c.value&&!j&&(($=o.value)!=null&&$.ΨopenChildren)||(c.value=j)}}),{items:f,transformIn:p,transformOut:b}=Uc(n),g=We(n,"modelValue",[],j=>p(j===null?[null]:Jt(j)),j=>{const $=b(j);return n.multiple?$:$[0]??null}),w=Fo(),E=u.computed(()=>g.value.map(j=>f.value.find($=>{const Q=ft($.raw,n.itemValue),fe=ft(j.raw,n.itemValue);return Q===void 0||fe===void 0?!1:n.returnObject?n.valueComparator(Q,fe):n.valueComparator($.value,j.value)})||j)),x=u.computed(()=>E.value.map(j=>j.props.value)),_=u.shallowRef(!1),k=u.computed(()=>h.value?n.closeText:n.openText);let V="",M;const P=u.computed(()=>n.hideSelected?f.value.filter(j=>!E.value.some($=>$===j)):f.value),A=u.computed(()=>n.hideNoData&&!f.value.length||n.readonly||(w==null?void 0:w.isReadonly.value)),H=u.ref(),{onListScroll:B,onListKeydown:D}=id(H,s);function I(j){n.openOnClear&&(h.value=!0)}function Y(){A.value||(h.value=!h.value)}function ie(j){var ye,Ie;if(!j.key||n.readonly||w!=null&&w.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(j.key)&&j.preventDefault(),["Enter","ArrowDown"," "].includes(j.key)&&(h.value=!0),["Escape","Tab"].includes(j.key)&&(h.value=!1),j.key==="Home"?(ye=H.value)==null||ye.focus("first"):j.key==="End"&&((Ie=H.value)==null||Ie.focus("last"));const $=1e3;function Q(De){const ze=De.key.length===1,Ee=!De.ctrlKey&&!De.metaKey&&!De.altKey;return ze&&Ee}if(n.multiple||!Q(j))return;const fe=performance.now();fe-M>$&&(V=""),V+=j.key.toLowerCase(),M=fe;const we=f.value.find(De=>De.title.toLowerCase().startsWith(V));we!==void 0&&(g.value=[we])}function G(j){if(n.multiple){const $=x.value.findIndex(Q=>n.valueComparator(Q,j.value));if($===-1)g.value=[...g.value,j];else{const Q=[...g.value];Q.splice($,1),g.value=Q}}else g.value=[j],h.value=!1}function J(j){var $;($=H.value)!=null&&$.$el.contains(j.relatedTarget)||(h.value=!1)}function ee(){var j;_.value&&((j=s.value)==null||j.focus())}function le(j){_.value=!0}function _e(j){if(j==null)g.value=[];else if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const $=f.value.find(Q=>Q.title===j);$&&G($)}else s.value&&(s.value.value="")}return u.watch(h,()=>{if(!n.hideSelected&&h.value&&E.value.length){const j=P.value.findIndex($=>E.value.some(Q=>$.value===Q.value));Ne&&window.requestAnimationFrame(()=>{var $;j>=0&&(($=l.value)==null||$.scrollToIndex(j))})}}),Me(()=>{const j=!!(n.chips||t.chip),$=!!(!n.hideNoData||P.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Q=g.value.length>0,[fe]=Zs.filterProps(n),we=Q||!_.value&&n.label&&!n.persistentPlaceholder?void 0:n.placeholder;return u.createVNode(Zs,u.mergeProps({ref:s},fe,{modelValue:g.value.map(ye=>ye.props.value).join(", "),"onUpdate:modelValue":_e,focused:_.value,"onUpdate:focused":ye=>_.value=ye,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:we,"onClick:clear":I,"onMousedown:control":Y,onBlur:J,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":ye=>h.value=ye,activator:"parent",contentClass:"v-select__content",disabled:A.value,eager:n.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:n.transition,onAfterLeave:ee},n.menuProps),{default:()=>[$&&u.createVNode(qc,{ref:H,selected:x.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:ye=>ye.preventDefault(),onKeydown:D,onFocusin:le,onScrollPassive:B,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var ye,Ie,De;return[(ye=t["prepend-item"])==null?void 0:ye.call(t),!P.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:P.value},{default:ze=>{var K;let{item:Ee,index:rt,itemRef:_t}=ze;const et=u.mergeProps(Ee.props,{ref:_t,key:rt,onClick:()=>G(Ee)});return((K=t.item)==null?void 0:K.call(t,{item:Ee,index:rt,props:et}))??u.createVNode(yn,et,{prepend:me=>{let{isSelected:Se}=me;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(xc,{key:Ee.value,modelValue:Se,ripple:!1,tabindex:"-1"},null):void 0,Ee.props.prependIcon&&u.createVNode(Et,{icon:Ee.props.prependIcon},null)])}})}}),(De=t["append-item"])==null?void 0:De.call(t)]}})]}),E.value.map((ye,Ie)=>{var Ee;function De(rt){rt.stopPropagation(),rt.preventDefault(),G(ye)}const ze={"onClick:close":De,onMousedown(rt){rt.preventDefault(),rt.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:ye.value,class:"v-select__selection"},[j?t.chip?u.createVNode(ei,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:ye.title}}},{default:()=>{var rt;return[(rt=t.chip)==null?void 0:rt.call(t,{item:ye,index:Ie,props:ze})]}}):u.createVNode(Pc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:ye.title},ze),null):((Ee=t.selection)==null?void 0:Ee.call(t,{item:ye,index:Ie}))??u.createVNode("span",{class:"v-select__selection-text"},[ye.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 ye=arguments.length,Ie=new Array(ye),De=0;De<ye;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 ty=(n,e,t)=>n==null||e==null?-1:n.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),iy=X({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function ny(n,e,t){var c;const i=[],s=(t==null?void 0:t.default)??ty,o=t!=null&&t.filterKeys?Jt(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=ft(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 sy(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=ny(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 ry(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 oy=X({autoSelectFirst:{type:[Boolean,String]},search:String,...iy({filterKeys:["title"]}),...nd(),...an($o({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...pn({transition:!1})},"VAutocomplete"),sd=ge()({name:"VAutocomplete",props:oy(),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 me;p.value&&!K&&((me=h.value)!=null&&me.Ψ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}=Uc(n),{textColorClasses:V,textColorStyles:M}=Ei(w),P=We(n,"search",""),A=We(n,"modelValue",[],K=>_(K===null?[null]:Jt(K)),K=>{const me=k(K);return n.multiple?me:me[0]??null}),H=Fo(),{filteredItems:B,getMatches:D}=sy(n,x,()=>l.value?"":P.value),I=u.computed(()=>A.value.map(K=>x.value.find(me=>{const Se=ft(me.raw,n.itemValue),Vt=ft(K.raw,n.itemValue);return Se===void 0||Vt===void 0?!1:n.returnObject?n.valueComparator(Se,Vt):n.valueComparator(me.value,K.value)})||K)),Y=u.computed(()=>n.hideSelected?B.value.filter(K=>!I.value.some(me=>me.value===K.value)):B.value),ie=u.computed(()=>I.value.map(K=>K.props.value)),G=u.computed(()=>I.value[g.value]),J=u.computed(()=>{var me;return(n.autoSelectFirst===!0||n.autoSelectFirst==="exact"&&P.value===((me=Y.value[0])==null?void 0:me.title))&&Y.value.length>0&&!l.value&&!c.value}),ee=u.computed(()=>n.hideNoData&&!x.value.length||n.readonly||(H==null?void 0:H.isReadonly.value)),le=u.ref(),{onListScroll:_e,onListKeydown:j}=id(le,s);function $(K){n.openOnClear&&(b.value=!0),P.value=""}function Q(){ee.value||(b.value=!0)}function fe(K){ee.value||(o.value&&(K.preventDefault(),K.stopPropagation()),b.value=!b.value)}function we(K){var Vt,be,Ue;if(n.readonly||H!=null&&H.isReadonly.value)return;const me=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),J.value&&["Enter","Tab"].includes(K.key)&&et(Y.value[0]),K.key==="ArrowDown"&&J.value&&((Vt=le.value)==null||Vt.focus("next")),!!n.multiple){if(["Backspace","Delete"].includes(K.key)){if(g.value<0){K.key==="Backspace"&&!P.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&&me>0)return;const Ke=g.value>-1?g.value-1:Se-1;I.value[Ke]?g.value=Ke:(g.value=-1,s.value.setSelectionRange((be=P.value)==null?void 0:be.length,(Ue=P.value)==null?void 0:Ue.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 ye(K){P.value=K.target.value}function Ie(K){if(ln(s.value,":autofill")||ln(s.value,":-webkit-autofill")){const me=x.value.find(Se=>Se.title===K.target.value);me&&et(me)}}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 Ee(K){c.value=!1}function rt(K){(K==null||K===""&&!n.multiple)&&(A.value=[])}const _t=u.shallowRef(!1);function et(K){if(n.multiple){const me=ie.value.findIndex(Se=>n.valueComparator(Se,K.value));if(me===-1)A.value=[...A.value,K];else{const Se=[...A.value];Se.splice(me,1),A.value=Se}}else A.value=[K],_t.value=!0,P.value=K.title,b.value=!1,l.value=!0,u.nextTick(()=>_t.value=!1)}return u.watch(o,(K,me)=>{var Se;K!==me&&(K?(_t.value=!0,P.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&&!P.value?A.value=[]:J.value&&!c.value&&!I.value.some(Vt=>{let{value:be}=Vt;return be===Y.value[0].value})&&et(Y.value[0]),b.value=!1,P.value="",g.value=-1))}),u.watch(P,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=Y.value.findIndex(me=>I.value.some(Se=>me.value===Se.value));Ne&&window.requestAnimationFrame(()=>{var me;K>=0&&((me=f.value)==null||me.scrollToIndex(K))})}}),Me(()=>{const K=!!(n.chips||t.chip),me=!!(!n.hideNoData||Y.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Se=A.value.length>0,[Vt]=Zs.filterProps(n);return u.createVNode(Zs,u.mergeProps({ref:s},Vt,{modelValue:P.value,"onUpdate:modelValue":rt,focused:o.value,"onUpdate:focused":be=>o.value=be,validationValue:A.externalValue,dirty:Se,onInput:ye,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:we}),{...t,default:()=>u.createVNode(u.Fragment,null,[u.createVNode(ns,u.mergeProps({ref:h,modelValue:b.value,"onUpdate:modelValue":be=>b.value=be,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:()=>[me&&u.createVNode(qc,{ref:le,selected:ie.value,selectStrategy:n.multiple?"independent":"single-independent",onMousedown:be=>be.preventDefault(),onKeydown:j,onFocusin:ze,onFocusout:Ee,onScrollPassive:_e,tabindex:"-1",color:n.itemColor??n.color},{default:()=>{var be,Ue,Ke;return[(be=t["prepend-item"])==null?void 0:be.call(t),!Y.value.length&&!n.hideNoData&&(((Ue=t["no-data"])==null?void 0:Ue.call(t))??u.createVNode(yn,{title:i(n.noDataText)},null)),u.createVNode(td,{ref:f,renderless:!0,items:Y.value},{default:Je=>{var _i;let{item:ot,index:mt,itemRef:Wi}=Je;const pt=u.mergeProps(ot.props,{ref:Wi,key:mt,active:J.value&&mt===0?!0:void 0,onClick:()=>et(ot)});return((_i=t.item)==null?void 0:_i.call(t,{item:ot,index:mt,props:pt}))??u.createVNode(yn,pt,{prepend:ui=>{let{isSelected:xn}=ui;return u.createVNode(u.Fragment,null,[n.multiple&&!n.hideSelected?u.createVNode(xc,{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 ui,xn;return l.value?ot.title:ry(ot.title,(ui=D(ot))==null?void 0:ui.title,((xn=P.value)==null?void 0:xn.length)??0)}})}}),(Ke=t["append-item"])==null?void 0:Ke.call(t)]}})]}),I.value.map((be,Ue)=>{var ot;function Ke(mt){mt.stopPropagation(),mt.preventDefault(),et(be)}const Je={"onClick:close":Ke,onMousedown(mt){mt.preventDefault(),mt.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return u.createVNode("div",{key:be.value,class:["v-autocomplete__selection",Ue===g.value&&["v-autocomplete__selection--selected",V.value]],style:Ue===g.value?M.value:{}},[K?t.chip?u.createVNode(ei,{key:"chip-defaults",defaults:{VChip:{closable:n.closableChips,size:"small",text:be.title}}},{default:()=>{var mt;return[(mt=t.chip)==null?void 0:mt.call(t,{item:be,index:Ue,props:Je})]}}):u.createVNode(Pc,u.mergeProps({key:"chip",closable:n.closableChips,size:"small",text:be.title},Je),null):((ot=t.selection)==null?void 0:ot.call(t,{item:be,index:Ue}))??u.createVNode("span",{class:"v-autocomplete__selection-text"},[be.title,n.multiple&&Ue<I.value.length-1&&u.createVNode("span",{class:"v-autocomplete__selection-comma"},[u.createTextVNode(",")])])])})]),"append-inner":function(){var Je;for(var be=arguments.length,Ue=new Array(be),Ke=0;Ke<be;Ke++)Ue[Ke]=arguments[Ke];return u.createVNode(u.Fragment,null,[(Je=t["append-inner"])==null?void 0:Je.call(t,...Ue),n.menuIcon?u.createVNode(Et,{class:"v-autocomplete__menu-icon",icon:n.menuIcon,onMousedown:fe,onClick:Sg,"aria-label":i(E.value),title:i(E.value)},null):void 0])}})}),ts({isFocused:o,isPristine:l,menu:b,search:P,filteredItems:B,select:et},s)}}),ay=1,Qs={__name:"SelectField",props:ct.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(_)?ke.every(_,V=>ke.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)=>{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,ay);const w=_=>i("rel.withChange")?i("rel.withChange")(_):_,E=u.computed(()=>w(t.items[g])),x={};return(_,k)=>(u.openBlock(),u.createBlock(u.unref(sd),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"]))}},ly=["value"],uy={key:0,class:"text-red-900"},cy={__name:"TextField",props:ct.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,ly),e.error?(u.openBlock(),u.createElementBlock("span",uy,u.toDisplayString(e.error),1)):u.createCommentVNode("",!0)],64))}},dy=()=>[{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(Qs)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},component:u.markRaw(cy)}],hy={key:0},fy=1,my={__name:"InfinitySelectField",props:ct.propsField,setup(n){const e=n,t=u.inject("store"),{getFromSchema:i,updateField:s,getProp:o}=e,l=i("rel.get");function c(A){return Array.isArray(Object.getPrototypeOf(A))}function h(A,H){return Array.isArray(A)?ke.every(A,B=>ke.isType(B,H)):!1}function f(A){return h(A,"object")?A.map(H=>H[o("rel.valueKey","value")]):A}function p(A){return i("rel.key",!1)?i("rel.key"):typeof A=="string"?t.getModelKey(A):"model-"+parseInt(Math.random(1e4)*Math.random(1e4)*1e3)}const b=(A,H,B)=>{c(H)?t.items[A]=H:typeof H=="function"?t.customLoadItems(A,B,H):typeof H=="object"&&H.route?(t.routes[A]=H.route,t.loadItems(A)):typeof H=="string"&&(t.routes[A]=H,t.loadItems(A))},g=p(l);b(g,l,fy);const w=A=>i("rel.withChange")?i("rel.withChange")(A):A,E=u.computed(()=>w(t.items[g])),x=u.computed(()=>t.paginations[g]||{lastPage:0,currentPage:0}),_=u.computed(()=>x.value.lastPage>x.value.currentPage);function k(){const A="";t.loadItemsPlus(g,x.value.currentPage+1,A)}const V=u.computed(()=>t.loadings[g]);function M(A,H,B){A&&k()}const P={};return(A,H)=>(u.openBlock(),u.createBlock(u.unref(sd),u.mergeProps({variant:"outlined",density:"compact",label:u.unref(i)("rel.textKey","text"),items:E.value,"model-value":f(A.value),"item-title":u.unref(i)("rel.textKey"),"item-value":u.unref(i)("rel.valueKey"),loading:V.value},{...P,...u.unref(i)("props",{})},u.toHandlers(u.unref(i)("events",{})),{"single-line":"","onUpdate:modelValue":u.unref(s)}),{"append-item":u.withCtx(()=>[_.value?u.withDirectives((u.openBlock(),u.createElementBlock("div",hy,[u.createTextVNode(u.toDisplayString(A.$fcTr("loading...")),1)])),[[u.unref(Po),M]]):u.createCommentVNode("",!0)]),_:1},16,["label","items","model-value","item-title","item-value","loading","onUpdate:modelValue"]))}},py=n=>[{title:"operator",field:"op",groupAttr:{class:"w-[32.5%]"},rel:{get:[{value:"=",text:"equal_to"},{value:"!=",text:"not_equal_to"}],valueKey:"value",textKey:"text"},component:u.markRaw(Qs)},{title:"select",field:"value",groupAttr:{class:"w-[32.5%]"},component:u.markRaw(my),props:{"hide-details":"ture"},rel:n.rel}],IT="",gy=Un({__name:"DateField",setup(n){return(e,t)=>null}},[["__scopeId","data-v-077220f8"]]),rd={TextFilter:dy,SelectFilter:py,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(Qs)},{title:"search",field:"value",groupAttr:{class:"w-[32.5%]"},dynamicProps(n){return{range:n.form.op==="<>"}},component:u.markRaw(gy)}]};function by(n){return u.getCurrentScope()?(u.onScopeDispose(n),!0):!1}function Go(n){return typeof n=="function"?n():u.unref(n)}const vy=typeof window<"u"&&typeof document<"u",wy=Object.prototype.toString,yy=n=>wy.call(n)==="[object Object]",Cy=()=>{};function Ey(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 xy(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 _y(n,e,t={}){const{eventFilter:i=od,...s}=t;return u.watch(n,Ey(i,e),s)}function Ry(n,e,t={}){const{eventFilter:i,...s}=t,{eventFilter:o,pause:l,resume:c,isActive:h}=xy(i);return{stop:_y(n,e,{...s,eventFilter:o}),pause:l,resume:c,isActive:h}}function ky(n){var e;const t=Go(n);return(e=t==null?void 0:t.$el)!=null?e:t}const jo=vy?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=jo):[e,t,i,s]=n,!e)return Cy;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(()=>[ky(e),Go(s)],([p,b])=>{if(l(),!p)return;const g=yy(b)?{...b}:b;o.push(...t.flatMap(w=>i.map(E=>c(p,w,E,g))))},{immediate:!0,flush:"post"}),f=()=>{h(),l()};return by(f),f}const er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tr="__vueuse_ssr_handlers__",Sy=Ty();function Ty(){return tr in er||(er[tr]=er[tr]||{}),er[tr]}function My(n,e){return Sy[n]||e}function Ly(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 Dy={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 Ay(n,e,t,i={}){var s;const{flush:o="pre",deep:l=!0,listenToStorageChanges:c=!0,writeDefaults:h=!0,mergeDefaults:f=!1,shallow:p,window:b=jo,eventFilter:g,onError:w=D=>{console.error(D)}}=i,E=(p?u.shallowRef:u.ref)(e);if(!t)try{t=My("getDefaultStorage",()=>{var D;return(D=jo)==null?void 0:D.localStorage})()}catch(D){w(D)}if(!t)return E;const x=Go(e),_=Ly(x),k=(s=i.serializer)!=null?s:Dy[_],{pause:V,resume:M}=Ry(E,()=>P(E.value),{flush:o,deep:l,eventFilter:g});return b&&c&&(ad(b,"storage",B),ad(b,ld,H)),B(),E;function P(D){try{if(D==null)t.removeItem(n);else{const I=k.write(D),Y=t.getItem(n);Y!==I&&(t.setItem(n,I),b&&b.dispatchEvent(new CustomEvent(ld,{detail:{key:n,oldValue:Y,newValue:I,storageArea:t}})))}}catch(I){w(I)}}function A(D){const I=D?D.newValue:t.getItem(n);if(I==null)return h&&x!==null&&t.setItem(n,k.write(x)),x;if(!D&&f){const Y=k.read(I);return typeof f=="function"?f(Y,x):_==="object"&&!Array.isArray(Y)?{...x,...Y}:Y}else return typeof I!="string"?I:k.read(I)}function H(D){B(D.detail)}function B(D){if(!(D&&D.storageArea!==t)){if(D&&D.key==null){E.value=x;return}if(!(D&&D.key!==n)){V();try{(D==null?void 0:D.newValue)!==k.write(E.value)&&(E.value=A(D))}catch(I){w(I)}finally{D?u.nextTick(M):M()}}}}}const $T="",Cn=n=>(u.pushScopeId("data-v-7470f29a"),n=n(),u.popScopeId(),n),Fy={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"},Py={class:"flex flex-col ml-1 border-[rgba(0,0,0,.1)] pb-4"},Vy={class:"flex flex-row justify-between mb-4 items-center"},Oy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Ny={class:"flex items-center"},zy={class:"z-[1]"},Hy={class:"fc-drop-down-content"},Iy={key:0,class:"p-2 text-center"},By=["onClick"],Wy=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)),$y={class:"text-muted-400 font-sans text-sm"},Gy={class:"flex w-full justify-between"},jy={class:"w-[23%] flex justify-center items-center"},Uy=["disabled"],Ky=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)),qy=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)),Yy={class:"flex border-t flex-col p-2 mt-2"},Xy={class:"flex items-center"},Jy={class:"font-heading text-base font-semibold leading-tight text-muted-800 dark:text-white"},Zy={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)),eC={class:"my-2 flex overflow-x-auto slimscroll"},tC={class:"flex"},iC=["onClick"],nC={class:"mt-[0px]"},sC=["onClick"],rC=[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))],oC={key:0,class:"flex items-center mx-2 text-[0.75rem]"},aC={class:"flex w-full gap-x-2 justify-between !items-end"},lC={class:"pt-4 md:pt-6"},uC={class:"flex gap-x-2"},cC=["placeholder"],dC=[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))],hC=Un({__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=b(),h=u.ref(null);u.ref(!1);function f(M){const P=ke.capitalize(M),A=ke.get(rd,P+"Filter"),H=e.flatFields.find(B=>B.filter===M);return typeof A=="function"?ke.get(rd,P+"Filter")(H):!1}const p=u.ref([{title:"field",field:"field",isHeader:!0,groupAttr:{class:"w-[32.5%]"},rel:{get:e.headersWithoutActions,textKey:"title",valueKey:"filter"},props:{"return-object":!0},component:u.markRaw(Qs)}]);u.watch(()=>s.value.field,M=>{p.value.length=1;const P=f(ke.get(M,"filter"))||[];for(const A in s.value)A!=="field"&&(s.value[A]="");u.nextTick(()=>{for(const A of P)p.value.push(A)})});function b(){const M=window.location.pathname.replace(/^\/|\/$/g,"")+"-filters";return Ay(M,{},localStorage,{mergeDefaults:!0})}function g(){e.filters.push(s.value),s.value={}}function w(){t!==-1&&e.filters.splice(t,1,s.value),i.value=!1,s.value={}}function E(M,P){s.value.field=M.field,i.value=!0,t=P,u.nextTick(()=>{s.value={...M}})}function x(M){e.filters=e.filters.filter(P=>P!==M)}function _(){e.filters=[]}function k(){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 V(){e.isFiltering=!0,e.getWithFilter()}return(M,P)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(e).panel==="filters"?"accordion-content":"x")},[u.createElementVNode("div",Fy,[u.createElementVNode("div",Py,[u.createElementVNode("div",Vy,[u.createElementVNode("h3",Oy,u.toDisplayString(M.$fcTr("filter_data")),1),u.createElementVNode("div",Ny,[u.createVNode(u.unref(ns),{transition:"scale-transition"},{activator:u.withCtx(({props:A})=>[u.createElementVNode("button",u.mergeProps({class:JSON.parse(A["aria-expanded"])?"before:block":"before:hidden"},A,{class:"fc-filter-choose is-button rounded is-button-default min-w-[130px]"}),[u.createElementVNode("span",zy,u.toDisplayString(M.$fcTr("choose_filter")),1)],16)]),default:u.withCtx(()=>[u.createElementVNode("div",Hy,[Object.keys(u.unref(c)).length===0?(u.openBlock(),u.createElementBlock("p",Iy,u.toDisplayString(M.$fcTr("not_filter_create_yes")),1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(c),(A,H)=>(u.openBlock(),u.createElementBlock("a",{class:"group flex w-full items-center py-3 text-sm duration-300 text-muted-500 hover:bg-muted-100 justify-between rtl:pl-4 rtl:pr-5",key:H,onClick:u.withModifiers(B=>u.unref(e).filters=Object.values(A),["stop"])},[Wy,u.createElementVNode("p",$y,u.toDisplayString(H),1)],8,By))),128))])]),_:1})])]),u.createElementVNode("div",Gy,[u.createVNode(u.unref(ct),{class:"w-[75%] justify-between",fields:p.value,modelValue:s.value,"onUpdate:modelValue":P[0]||(P[0]=A=>s.value=A)},null,8,["fields","modelValue"]),u.createElementVNode("div",jy,[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:w},[u.createTextVNode(u.toDisplayString(M.$fcTr("edit_filter"))+" ",1),qy])):(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:g},[u.createTextVNode(u.toDisplayString(M.$fcTr("add_filter"))+" ",1),Ky],8,Uy))])])]),u.withDirectives(u.createElementVNode("div",Yy,[u.createElementVNode("div",Xy,[u.createElementVNode("h3",Jy,u.toDisplayString(M.$fcTr("active_filter")),1),u.createElementVNode("button",{onClick:_,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",Zy,u.toDisplayString(M.$fcTr("clear_all")),1),Qy])]),u.createElementVNode("div",eC,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(e).filters,(A,H)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:H},[u.createElementVNode("div",tC,[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:B=>E(A,H)},[u.createElementVNode("span",nC,u.toDisplayString(u.unref(ke.get)(A,"field.title")),1),u.createElementVNode("button",{class:"text-white font-bold rounded px-1",onClick:u.withModifiers(B=>x(A),["stop"])},rC,8,sC)],8,iC)]),u.unref(e).filters.length-1!==H?(u.openBlock(),u.createElementBlock("span",oC,u.toDisplayString(M.$fcTr("&")),1)):u.createCommentVNode("",!0)],64))),128))])],512),[[u.vShow,u.unref(e).filters.length>0]]),u.createElementVNode("div",aC,[u.createElementVNode("button",{onClick:P[1]||(P[1]=A=>u.unref(e).panel=""),class:"is-button text-muted-500 rounded hover:text-red-500 !underline focus-within:!outline-none"},u.toDisplayString(M.$fcTr("cancel")),1),u.createElementVNode("div",lC,[u.createElementVNode("div",uC,[u.createElementVNode("button",{onClick:P[5]||(P[5]=u.withModifiers(A=>Object.keys(u.unref(e).filters).length!==0?k():"",["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:P[2]||(P[2]=u.withModifiers(A=>Object.keys(u.unref(e).filters).length!==0?k():"",["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(M.$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":P[3]||(P[3]=A=>l.value=A),class:u.normalizeClass(["fc-focus py-1 rounded px-2 dark:bg-muted-800",o.value?" border border-1":"flex "]),placeholder:M.$fcTr("filter_save_placeholder"),ref_key:"filterNameInp",ref:h},null,10,cC),[[u.vModelText,l.value]]),u.createElementVNode("span",{class:"px-2",onClick:P[4]||(P[4]=A=>o.value=!1)},dC)],2)],2),u.createElementVNode("button",{onClick:V,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(M.$fcTr("filter")),1)])])])])],2))}},[["__scopeId","data-v-7470f29a"]]),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=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 overflow-hidden 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"},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={__name:"MDialogForm",setup(n){const{event:e,listen:t}=ct.emitter,i=u.inject("store"),s=u.ref({});let o=u.ref(!1),l=u.ref({});return(()=>{t("createBtn",()=>{l.value={},i.isEditing=!1,o.value=!0}),t("editBtn",h=>{l.value={...h},i.isEditing=!0,o.value=!0}),t("handleDialogForm",h=>{o.value=h}),t("saveForm",()=>(()=>{i.isEditing?i.editItem(s):i.addItem(s)})()),t(["createBtn"],()=>{Object.assign(s,{})}),t("editTheItem",h=>{edit(h)}),t("addTheItem",h=>{add(h)})})(),(h,f)=>(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(h.$fcTr("edit")),1)):(u.openBlock(),u.createElementBlock("span",CC,u.toDisplayString(h.$fcTr("add")),1)),u.createElementVNode("i",{class:"text-primerr-700 fal fa-times cursor-pointer",onClick:f[0]||(f[0]=p=>u.isRef(o)?o.value=!1:o=!1)})]),u.createElementVNode("div",EC,[u.createVNode(u.unref(ct),{fields:u.unref(i).fields,modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=p=>s.value=p),"form-data":u.unref(l)},null,8,["fields","modelValue","form-data"])]),u.createElementVNode("div",xC,[u.createElementVNode("button",{onClick:f[2]||(f[2]=p=>u.isRef(o)?o.value=!1:o=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(h.$fcTr("cancel")),1),u.createElementVNode("button",{disabled:u.unref(i).loadings.mainLoading,onClick:f[3]||(f[3]=p=>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(h.$fcTr("save")),1))],8,_C)])])])])])])):u.createCommentVNode("",!0)]),_:1}))}},TC={};function MC(n,e){return u.openBlock(),u.createElementBlock("div")}const LC=Un(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="",s="";return ct.emitter.listen("deleteBtn",o=>{t.value=!0,i=o.id}),ct.emitter.listen("handleDeleteDialog",o=>{t.value=o}),(o,l)=>(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:l[0]||(l[0]=c=>t.value=!1)})]),u.createElementVNode("div",HC,u.toDisplayString(o.$fcTr("alert_to_delete")),1),u.createElementVNode("div",IC,[u.createElementVNode("button",{onClick:l[1]||(l[1]=c=>t.value=!1),class:"border p-2 px-8 rounded-md text-red-400 border-red-400"},u.toDisplayString(o.$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:l[2]||(l[2]=c=>u.unref(e).remove({deleteId:u.unref(i),indexToRemove:u.unref(s)}))},[u.unref(e).loadings.mainLoading?(u.openBlock(),u.createElementBlock("span",$C,"loading")):(u.openBlock(),u.createElementBlock("span",WC,u.toDisplayString(o.$fcTr("yes")),1))],8,BC)])])])])])])):u.createCommentVNode("",!0)]),_:1}))}},KT="",jC={key:0,class:"w-full border bg-white rounded p-2 flex align-center mt-2"},UC=["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",jC,[(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,UC))),128))])):u.createCommentVNode("",!0)}},qC={__name:"MCrud",props:{options:{default:()=>({})},hiddenActions:{default:()=>[]},fields:{default:()=>[]},dir:{default:"rtl"},route:{default:"route"}},emits:["mounted"],setup(n,{emit:e}){const t=n,i=tm({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(Tv),u.createVNode(hC),u.createVNode(KC),u.createVNode(Cg),u.createVNode(SC),u.createVNode(LC),u.createVNode(GC),u.renderSlot(s.$slots,"extra")],64))}},qT="",YT="",XT="",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=pl.defineStore("formuCrudLangs",{state:()=>({lang:"fa",langs:YC}),getters:{currentLang(n){return ke.get(n.langs,n.lang,"fa")}},actions:{translate(n){return ke.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=ud(n),o=cd(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 ud(n){return new Date(n.getFullYear(),n.getMonth(),1)}function cd(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 dd=new Date(2e3,0,2);function t0(n){const e=Uo[n.slice(-2).toUpperCase()];return Qr(7).map(t=>{const i=new Date(dd);return i.setDate(dd.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 Ko(n,e[0])&&d0(n,e[1])}function c0(n){const e=new Date(n);return e instanceof Date&&!isNaN(e.getTime())}function Ko(n,e){return n.getTime()>e.getTime()}function d0(n,e){return n.getTime()<e.getTime()}function hd(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 ud(e)}endOfMonth(e){return cd(e)}format(e,t){return i0(e,t,this.locale)}isEqual(e,t){return hd(e,t)}isValid(e){return c0(e)}isWithinRange(e,t){return u0(e,t)}isAfter(e,t){return Ko(e,t)}isBefore(e,t){return!Ko(e,t)&&!hd(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 fd=Symbol.for("vuetify:date-adapter");function b0(n){return Ft({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 md(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:e,...t}=n,i=Ft(e,t),{aliases:s={},components:o={},directives:l={}}=i,c=Zg(i.defaults),h=xb(i.display,i.ssr),f=zb(i.theme),p=Av(i.icons),b=Db(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(yo,h),E.provide(Us,f),E.provide(So,p),E.provide(Gs,b),E.provide(fd,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,_}}jt.reset(),E.mixin({computed:{$vuetify(){return u.reactive({defaults:En.call(this,fn),display:En.call(this,yo),theme:En.call(this,Us),icons:En.call(this,So),locale:En.call(this,Gs),date:En.call(this,fd)})}}})},defaults:c,display:h,theme:f,icons:p,locale:b,date:g}}const v0="3.3.14";md.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=(n,{fields:e}={fields:{}})=>{const t=md({locale:{locale:"customLocale",rtl:{customLocale:!0}}});n.use(t);const i=XC();n.config.globalProperties.$fcTr=s=>i.translate(s),wl(e)};Dt.MCrud=qC,Dt.defineFields=nm,Dt.install=w0,Dt.registerFields=wl,Object.defineProperty(Dt,Symbol.toStringTag,{value:"Module"})});