formue-crud 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -3967,7 +3967,10 @@ function N0({ fields: n, hiddenActions: e, options: t, route: i }) {
3967
3967
  let zh = {};
3968
3968
  const W0 = (n) => {
3969
3969
  zh = n;
3970
- }, $0 = (n) => Zi(Ve.get(zh, n));
3970
+ }, $0 = (n) => {
3971
+ const e = Ve.get(zh, n);
3972
+ return e ? Zi(e) : "";
3973
+ };
3971
3974
  function bM(n) {
3972
3975
  return n($0);
3973
3976
  }
@@ -24,7 +24,7 @@ __p += '`),Ce&&(W+=`' +
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,_)});if(ue.source=W,rl(ue))throw ue;return ue}function tS(r){return Re(r).toLowerCase()}function iS(r){return Re(r).toUpperCase()}function nS(r,a,d){if(r=Re(r),r&&(d||a===t))return Xd(r);if(!r||!(a=St(a)))return r;var m=jt(r),v=jt(a),C=Jd(m,v),_=Zd(m,v)+1;return Ai(m,C,_).join("")}function sS(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=jt(r),v=Zd(m,jt(a))+1;return Ai(m,0,v).join("")}function rS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.replace(ra,"");if(!r||!(a=St(a)))return r;var m=jt(r),v=Jd(m,jt(a));return Ai(m,v).join("")}function oS(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(kn(r)){var _=jt(r);C=_.length}if(d>=C)return r;var k=d-Sn(m);if(k<1)return m;var M=_?Ai(_,0,k).join(""):r.slice(0,k);if(v===t)return M+m;if(_&&(k+=M.length-k),ol(v)){if(r.slice(k).search(v)){var N,z=M;for(v.global||(v=Ea(v.source,Re(vd.exec(v))+"g")),v.lastIndex=0;N=v.exec(z);)var W=N.index;M=M.slice(0,W===t?k:W)}}else if(r.indexOf(St(v),k)!=k){var j=M.lastIndexOf(v);j>-1&&(M=M.slice(0,j))}return M+m}function aS(r){return r=Re(r),r&&v0.test(r)?r.replace(pd,OE):r}var lS=Fn(function(r,a,d){return r+(d?" ":"")+a.toUpperCase()}),ul=Wh("toUpperCase");function Bf(r,a,d){return r=Re(r),a=d?t:a,a===t?DE(r)?HE(r):EE(r):r.match(a)||[]}var Wf=ce(function(r,a){try{return Rt(r,t,a)}catch(d){return rl(d)?d:new re(d)}}),uS=mi(function(r,a){return Nt(a,function(d){d=ni(d),hi(r,d,nl(r[d],r))}),r});function cS(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 dS(r){return O1(It(r,b))}function cl(r){return function(){return r}}function hS(r,a){return r==null||r!==r?a:r}var fS=Gh(),mS=Gh(!0);function wt(r){return r}function dl(r){return yh(typeof r=="function"?r:It(r,b))}function pS(r){return Eh(It(r,b))}function gS(r,a){return xh(r,It(a,b))}var bS=ce(function(r,a){return function(d){return bs(d,r,a)}}),vS=ce(function(r,a){return function(d){return bs(r,d,a)}});function hl(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,_=gi(r);return Nt(v,function(k){var M=a[k];r[k]=M,_&&(r.prototype[k]=function(){var N=this.__chain__;if(C||N){var z=r(this.__wrapped__),W=z.__actions__=gt(this.__actions__);return W.push({func:M,args:arguments,thisArg:r}),z.__chain__=N,z}return M.apply(r,ki([this.value()],arguments))})}),r}function wS(){return Ze._===this&&(Ze._=UE),this}function fl(){}function yS(r){return r=ae(r),ce(function(a){return _h(a,r)})}var CS=Ga(Oe),ES=Ga(Ud),xS=Ga(pa);function $f(r){return Ja(r)?ga(ni(r)):Q1(r)}function _S(r){return function(a){return r==null?t:qi(r,a)}}var RS=jh(),kS=jh(!0);function ml(){return[]}function pl(){return!1}function SS(){return{}}function TS(){return""}function MS(){return!0}function LS(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=wa(m,a);++d<r;)a(d);return v}function DS(r){return oe(r)?Oe(r,ni):Tt(r)?[r]:gt(uf(Re(r)))}function AS(r){var a=++$E;return Re(r)+a}var PS=Lr(function(r,a){return r+a},0),FS=Ua("ceil"),VS=Lr(function(r,a){return r/a},1),OS=Ua("floor");function NS(r){return r&&r.length?xr(r,wt,La):t}function zS(r,a){return r&&r.length?xr(r,te(a,2),La):t}function HS(r){return qd(r,wt)}function IS(r,a){return qd(r,te(a,2))}function BS(r){return r&&r.length?xr(r,wt,Fa):t}function WS(r,a){return r&&r.length?xr(r,te(a,2),Fa):t}var $S=Lr(function(r,a){return r*a},1),GS=Ua("round"),US=Lr(function(r,a){return r-a},0);function jS(r){return r&&r.length?va(r,wt):0}function KS(r,a){return r&&r.length?va(r,te(a,2)):0}return y.after=pR,y.ary=yf,y.assign=ik,y.assignIn=Ff,y.assignInWith=$r,y.assignWith=nk,y.at=sk,y.before=Cf,y.bind=nl,y.bindAll=uS,y.bindKey=Ef,y.castArray=SR,y.chain=bf,y.chunk=Ox,y.compact=Nx,y.concat=zx,y.cond=cS,y.conforms=dS,y.constant=cl,y.countBy=j_,y.create=rk,y.curry=xf,y.curryRight=_f,y.debounce=Rf,y.defaults=ok,y.defaultsDeep=ak,y.defer=gR,y.delay=bR,y.difference=Hx,y.differenceBy=Ix,y.differenceWith=Bx,y.drop=Wx,y.dropRight=$x,y.dropRightWhile=Gx,y.dropWhile=Ux,y.fill=jx,y.filter=q_,y.flatMap=J_,y.flatMapDeep=Z_,y.flatMapDepth=Q_,y.flatten=ff,y.flattenDeep=Kx,y.flattenDepth=qx,y.flip=vR,y.flow=fS,y.flowRight=mS,y.fromPairs=Yx,y.functions=mk,y.functionsIn=pk,y.groupBy=eR,y.initial=Jx,y.intersection=Zx,y.intersectionBy=Qx,y.intersectionWith=e_,y.invert=bk,y.invertBy=vk,y.invokeMap=iR,y.iteratee=dl,y.keyBy=nR,y.keys=Xe,y.keysIn=vt,y.map=Nr,y.mapKeys=yk,y.mapValues=Ck,y.matches=pS,y.matchesProperty=gS,y.memoize=Hr,y.merge=Ek,y.mergeWith=Vf,y.method=bS,y.methodOf=vS,y.mixin=hl,y.negate=Ir,y.nthArg=yS,y.omit=xk,y.omitBy=_k,y.once=wR,y.orderBy=sR,y.over=CS,y.overArgs=yR,y.overEvery=ES,y.overSome=xS,y.partial=sl,y.partialRight=kf,y.partition=rR,y.pick=Rk,y.pickBy=Of,y.property=$f,y.propertyOf=_S,y.pull=s_,y.pullAll=pf,y.pullAllBy=r_,y.pullAllWith=o_,y.pullAt=a_,y.range=RS,y.rangeRight=kS,y.rearg=CR,y.reject=lR,y.remove=l_,y.rest=ER,y.reverse=tl,y.sampleSize=cR,y.set=Sk,y.setWith=Tk,y.shuffle=dR,y.slice=u_,y.sortBy=mR,y.sortedUniq=g_,y.sortedUniqBy=b_,y.split=Jk,y.spread=xR,y.tail=v_,y.take=w_,y.takeRight=y_,y.takeRightWhile=C_,y.takeWhile=E_,y.tap=N_,y.throttle=_R,y.thru=Or,y.toArray=Df,y.toPairs=Nf,y.toPairsIn=zf,y.toPath=DS,y.toPlainObject=Pf,y.transform=Mk,y.unary=RR,y.union=x_,y.unionBy=__,y.unionWith=R_,y.uniq=k_,y.uniqBy=S_,y.uniqWith=T_,y.unset=Lk,y.unzip=il,y.unzipWith=gf,y.update=Dk,y.updateWith=Ak,y.values=Nn,y.valuesIn=Pk,y.without=M_,y.words=Bf,y.wrap=kR,y.xor=L_,y.xorBy=D_,y.xorWith=A_,y.zip=P_,y.zipObject=F_,y.zipObjectDeep=V_,y.zipWith=O_,y.entries=Nf,y.entriesIn=zf,y.extend=Ff,y.extendWith=$r,hl(y,y),y.add=PS,y.attempt=Wf,y.camelCase=Nk,y.capitalize=Hf,y.ceil=FS,y.clamp=Fk,y.clone=TR,y.cloneDeep=LR,y.cloneDeepWith=DR,y.cloneWith=MR,y.conformsTo=AR,y.deburr=If,y.defaultTo=hS,y.divide=VS,y.endsWith=zk,y.eq=qt,y.escape=Hk,y.escapeRegExp=Ik,y.every=K_,y.find=Y_,y.findIndex=df,y.findKey=lk,y.findLast=X_,y.findLastIndex=hf,y.findLastKey=uk,y.floor=OS,y.forEach=vf,y.forEachRight=wf,y.forIn=ck,y.forInRight=dk,y.forOwn=hk,y.forOwnRight=fk,y.get=al,y.gt=PR,y.gte=FR,y.has=gk,y.hasIn=ll,y.head=mf,y.identity=wt,y.includes=tR,y.indexOf=Xx,y.inRange=Vk,y.invoke=wk,y.isArguments=Ji,y.isArray=oe,y.isArrayBuffer=VR,y.isArrayLike=bt,y.isArrayLikeObject=Ge,y.isBoolean=OR,y.isBuffer=Pi,y.isDate=NR,y.isElement=zR,y.isEmpty=HR,y.isEqual=IR,y.isEqualWith=BR,y.isError=rl,y.isFinite=WR,y.isFunction=gi,y.isInteger=Sf,y.isLength=Br,y.isMap=Tf,y.isMatch=$R,y.isMatchWith=GR,y.isNaN=UR,y.isNative=jR,y.isNil=qR,y.isNull=KR,y.isNumber=Mf,y.isObject=He,y.isObjectLike=Be,y.isPlainObject=xs,y.isRegExp=ol,y.isSafeInteger=YR,y.isSet=Lf,y.isString=Wr,y.isSymbol=Tt,y.isTypedArray=On,y.isUndefined=XR,y.isWeakMap=JR,y.isWeakSet=ZR,y.join=t_,y.kebabCase=Bk,y.last=Wt,y.lastIndexOf=i_,y.lowerCase=Wk,y.lowerFirst=$k,y.lt=QR,y.lte=ek,y.max=NS,y.maxBy=zS,y.mean=HS,y.meanBy=IS,y.min=BS,y.minBy=WS,y.stubArray=ml,y.stubFalse=pl,y.stubObject=SS,y.stubString=TS,y.stubTrue=MS,y.multiply=$S,y.nth=n_,y.noConflict=wS,y.noop=fl,y.now=zr,y.pad=Gk,y.padEnd=Uk,y.padStart=jk,y.parseInt=Kk,y.random=Ok,y.reduce=oR,y.reduceRight=aR,y.repeat=qk,y.replace=Yk,y.result=kk,y.round=GS,y.runInContext=T,y.sample=uR,y.size=hR,y.snakeCase=Xk,y.some=fR,y.sortedIndex=c_,y.sortedIndexBy=d_,y.sortedIndexOf=h_,y.sortedLastIndex=f_,y.sortedLastIndexBy=m_,y.sortedLastIndexOf=p_,y.startCase=Zk,y.startsWith=Qk,y.subtract=US,y.sum=jS,y.sumBy=KS,y.template=eS,y.times=LS,y.toFinite=bi,y.toInteger=ae,y.toLength=Af,y.toLower=tS,y.toNumber=$t,y.toSafeInteger=tk,y.toString=Re,y.toUpper=iS,y.trim=nS,y.trimEnd=sS,y.trimStart=rS,y.truncate=oS,y.unescape=aS,y.uniqueId=AS,y.upperCase=lS,y.upperFirst=ul,y.each=vf,y.eachRight=wf,y.first=mf,hl(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 bs(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 _=this.__wrapped__,k=m?[1]:arguments,M=_ instanceof ve,N=k[0],z=M||oe(_),W=function(pe){var Ce=v.apply(y,ki([pe],k));return m&&j?Ce[0]:Ce};z&&d&&typeof N=="function"&&N.length!=1&&(M=z=!1);var j=this.__chain__,Z=!!this.__actions__.length,ne=C&&!j,ue=M&&!Z;if(!C&&z){_=ue?_:new ve(this);var se=r.apply(_,k);return se.__actions__.push({func:Or,args:[W],thisArg:t}),new Ht(se,j)}return ne&&ue?r.apply(this,k):(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(_){return a.apply(oe(_)?_:[],v)})}}),ti(ve.prototype,function(r,a){var d=y[a];if(d){var m=d.name+"";Te.call(Dn,m)||(Dn[m]=[]),Dn[m].push({name:a,func:d})}}),Dn[Mr(t,S).name]=[{name:"wrapper",func:t}],ve.prototype.clone=a1,ve.prototype.reverse=l1,ve.prototype.value=u1,y.prototype.at=z_,y.prototype.chain=H_,y.prototype.commit=I_,y.prototype.next=B_,y.prototype.plant=$_,y.prototype.reverse=G_,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=U_,y.prototype.first=y.prototype.head,cs&&(y.prototype[cs]=W_),y},Tn=IE();$i?(($i.exports=Tn)._=Tn,da._=Tn):Ze._=Tn}).call(zn)}(_s,_s.exports);var ke=_s.exports;function Uf(n,e={}){const t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function jf(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:Uf,post:jf,patch:Kf,remove:qf}}const Gr=n=>ke.upperFirst(ke.camelCase(n)),{event:si}=ct.emitter,Yf=()=>gl.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]},addRoute(n){let e=typeof n=="string"?n.substr(n.lastIndexOf("/")+1):n.key;return this.mainKey=this.mainKey||Gr(e),this.routes[Gr(e)]=typeof n=="string"?n:n.route,Gr(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})},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();return s.fields=n,ct.emitter.event("beforeFormueInit"),s.addRoute(i),s.loadItems(),s.options=t,s.hiddenActions=e,em(s.flatFields),s}let vl={};const wl=n=>{vl=n},im=n=>u.markRaw(ke.get(vl,n));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 Ur 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 Ur(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 Ur(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 Kr(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(Kr(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(Kr(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var 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=Kr(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(`
27
+ }`;var ue=Wf(function(){return xe(C,Z+"return "+W).apply(t,_)});if(ue.source=W,rl(ue))throw ue;return ue}function tS(r){return Re(r).toLowerCase()}function iS(r){return Re(r).toUpperCase()}function nS(r,a,d){if(r=Re(r),r&&(d||a===t))return Xd(r);if(!r||!(a=St(a)))return r;var m=jt(r),v=jt(a),C=Jd(m,v),_=Zd(m,v)+1;return Ai(m,C,_).join("")}function sS(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=jt(r),v=Zd(m,jt(a))+1;return Ai(m,0,v).join("")}function rS(r,a,d){if(r=Re(r),r&&(d||a===t))return r.replace(ra,"");if(!r||!(a=St(a)))return r;var m=jt(r),v=Jd(m,jt(a));return Ai(m,v).join("")}function oS(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(kn(r)){var _=jt(r);C=_.length}if(d>=C)return r;var k=d-Sn(m);if(k<1)return m;var M=_?Ai(_,0,k).join(""):r.slice(0,k);if(v===t)return M+m;if(_&&(k+=M.length-k),ol(v)){if(r.slice(k).search(v)){var N,z=M;for(v.global||(v=Ea(v.source,Re(vd.exec(v))+"g")),v.lastIndex=0;N=v.exec(z);)var W=N.index;M=M.slice(0,W===t?k:W)}}else if(r.indexOf(St(v),k)!=k){var j=M.lastIndexOf(v);j>-1&&(M=M.slice(0,j))}return M+m}function aS(r){return r=Re(r),r&&v0.test(r)?r.replace(pd,OE):r}var lS=Fn(function(r,a,d){return r+(d?" ":"")+a.toUpperCase()}),ul=Wh("toUpperCase");function Bf(r,a,d){return r=Re(r),a=d?t:a,a===t?DE(r)?HE(r):EE(r):r.match(a)||[]}var Wf=ce(function(r,a){try{return Rt(r,t,a)}catch(d){return rl(d)?d:new re(d)}}),uS=mi(function(r,a){return Nt(a,function(d){d=ni(d),hi(r,d,nl(r[d],r))}),r});function cS(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 dS(r){return O1(It(r,b))}function cl(r){return function(){return r}}function hS(r,a){return r==null||r!==r?a:r}var fS=Gh(),mS=Gh(!0);function wt(r){return r}function dl(r){return yh(typeof r=="function"?r:It(r,b))}function pS(r){return Eh(It(r,b))}function gS(r,a){return xh(r,It(a,b))}var bS=ce(function(r,a){return function(d){return bs(d,r,a)}}),vS=ce(function(r,a){return function(d){return bs(r,d,a)}});function hl(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,_=gi(r);return Nt(v,function(k){var M=a[k];r[k]=M,_&&(r.prototype[k]=function(){var N=this.__chain__;if(C||N){var z=r(this.__wrapped__),W=z.__actions__=gt(this.__actions__);return W.push({func:M,args:arguments,thisArg:r}),z.__chain__=N,z}return M.apply(r,ki([this.value()],arguments))})}),r}function wS(){return Ze._===this&&(Ze._=UE),this}function fl(){}function yS(r){return r=ae(r),ce(function(a){return _h(a,r)})}var CS=Ga(Oe),ES=Ga(Ud),xS=Ga(pa);function $f(r){return Ja(r)?ga(ni(r)):Q1(r)}function _S(r){return function(a){return r==null?t:qi(r,a)}}var RS=jh(),kS=jh(!0);function ml(){return[]}function pl(){return!1}function SS(){return{}}function TS(){return""}function MS(){return!0}function LS(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=wa(m,a);++d<r;)a(d);return v}function DS(r){return oe(r)?Oe(r,ni):Tt(r)?[r]:gt(uf(Re(r)))}function AS(r){var a=++$E;return Re(r)+a}var PS=Lr(function(r,a){return r+a},0),FS=Ua("ceil"),VS=Lr(function(r,a){return r/a},1),OS=Ua("floor");function NS(r){return r&&r.length?xr(r,wt,La):t}function zS(r,a){return r&&r.length?xr(r,te(a,2),La):t}function HS(r){return qd(r,wt)}function IS(r,a){return qd(r,te(a,2))}function BS(r){return r&&r.length?xr(r,wt,Fa):t}function WS(r,a){return r&&r.length?xr(r,te(a,2),Fa):t}var $S=Lr(function(r,a){return r*a},1),GS=Ua("round"),US=Lr(function(r,a){return r-a},0);function jS(r){return r&&r.length?va(r,wt):0}function KS(r,a){return r&&r.length?va(r,te(a,2)):0}return y.after=pR,y.ary=yf,y.assign=ik,y.assignIn=Ff,y.assignInWith=$r,y.assignWith=nk,y.at=sk,y.before=Cf,y.bind=nl,y.bindAll=uS,y.bindKey=Ef,y.castArray=SR,y.chain=bf,y.chunk=Ox,y.compact=Nx,y.concat=zx,y.cond=cS,y.conforms=dS,y.constant=cl,y.countBy=j_,y.create=rk,y.curry=xf,y.curryRight=_f,y.debounce=Rf,y.defaults=ok,y.defaultsDeep=ak,y.defer=gR,y.delay=bR,y.difference=Hx,y.differenceBy=Ix,y.differenceWith=Bx,y.drop=Wx,y.dropRight=$x,y.dropRightWhile=Gx,y.dropWhile=Ux,y.fill=jx,y.filter=q_,y.flatMap=J_,y.flatMapDeep=Z_,y.flatMapDepth=Q_,y.flatten=ff,y.flattenDeep=Kx,y.flattenDepth=qx,y.flip=vR,y.flow=fS,y.flowRight=mS,y.fromPairs=Yx,y.functions=mk,y.functionsIn=pk,y.groupBy=eR,y.initial=Jx,y.intersection=Zx,y.intersectionBy=Qx,y.intersectionWith=e_,y.invert=bk,y.invertBy=vk,y.invokeMap=iR,y.iteratee=dl,y.keyBy=nR,y.keys=Xe,y.keysIn=vt,y.map=Nr,y.mapKeys=yk,y.mapValues=Ck,y.matches=pS,y.matchesProperty=gS,y.memoize=Hr,y.merge=Ek,y.mergeWith=Vf,y.method=bS,y.methodOf=vS,y.mixin=hl,y.negate=Ir,y.nthArg=yS,y.omit=xk,y.omitBy=_k,y.once=wR,y.orderBy=sR,y.over=CS,y.overArgs=yR,y.overEvery=ES,y.overSome=xS,y.partial=sl,y.partialRight=kf,y.partition=rR,y.pick=Rk,y.pickBy=Of,y.property=$f,y.propertyOf=_S,y.pull=s_,y.pullAll=pf,y.pullAllBy=r_,y.pullAllWith=o_,y.pullAt=a_,y.range=RS,y.rangeRight=kS,y.rearg=CR,y.reject=lR,y.remove=l_,y.rest=ER,y.reverse=tl,y.sampleSize=cR,y.set=Sk,y.setWith=Tk,y.shuffle=dR,y.slice=u_,y.sortBy=mR,y.sortedUniq=g_,y.sortedUniqBy=b_,y.split=Jk,y.spread=xR,y.tail=v_,y.take=w_,y.takeRight=y_,y.takeRightWhile=C_,y.takeWhile=E_,y.tap=N_,y.throttle=_R,y.thru=Or,y.toArray=Df,y.toPairs=Nf,y.toPairsIn=zf,y.toPath=DS,y.toPlainObject=Pf,y.transform=Mk,y.unary=RR,y.union=x_,y.unionBy=__,y.unionWith=R_,y.uniq=k_,y.uniqBy=S_,y.uniqWith=T_,y.unset=Lk,y.unzip=il,y.unzipWith=gf,y.update=Dk,y.updateWith=Ak,y.values=Nn,y.valuesIn=Pk,y.without=M_,y.words=Bf,y.wrap=kR,y.xor=L_,y.xorBy=D_,y.xorWith=A_,y.zip=P_,y.zipObject=F_,y.zipObjectDeep=V_,y.zipWith=O_,y.entries=Nf,y.entriesIn=zf,y.extend=Ff,y.extendWith=$r,hl(y,y),y.add=PS,y.attempt=Wf,y.camelCase=Nk,y.capitalize=Hf,y.ceil=FS,y.clamp=Fk,y.clone=TR,y.cloneDeep=LR,y.cloneDeepWith=DR,y.cloneWith=MR,y.conformsTo=AR,y.deburr=If,y.defaultTo=hS,y.divide=VS,y.endsWith=zk,y.eq=qt,y.escape=Hk,y.escapeRegExp=Ik,y.every=K_,y.find=Y_,y.findIndex=df,y.findKey=lk,y.findLast=X_,y.findLastIndex=hf,y.findLastKey=uk,y.floor=OS,y.forEach=vf,y.forEachRight=wf,y.forIn=ck,y.forInRight=dk,y.forOwn=hk,y.forOwnRight=fk,y.get=al,y.gt=PR,y.gte=FR,y.has=gk,y.hasIn=ll,y.head=mf,y.identity=wt,y.includes=tR,y.indexOf=Xx,y.inRange=Vk,y.invoke=wk,y.isArguments=Ji,y.isArray=oe,y.isArrayBuffer=VR,y.isArrayLike=bt,y.isArrayLikeObject=Ge,y.isBoolean=OR,y.isBuffer=Pi,y.isDate=NR,y.isElement=zR,y.isEmpty=HR,y.isEqual=IR,y.isEqualWith=BR,y.isError=rl,y.isFinite=WR,y.isFunction=gi,y.isInteger=Sf,y.isLength=Br,y.isMap=Tf,y.isMatch=$R,y.isMatchWith=GR,y.isNaN=UR,y.isNative=jR,y.isNil=qR,y.isNull=KR,y.isNumber=Mf,y.isObject=He,y.isObjectLike=Be,y.isPlainObject=xs,y.isRegExp=ol,y.isSafeInteger=YR,y.isSet=Lf,y.isString=Wr,y.isSymbol=Tt,y.isTypedArray=On,y.isUndefined=XR,y.isWeakMap=JR,y.isWeakSet=ZR,y.join=t_,y.kebabCase=Bk,y.last=Wt,y.lastIndexOf=i_,y.lowerCase=Wk,y.lowerFirst=$k,y.lt=QR,y.lte=ek,y.max=NS,y.maxBy=zS,y.mean=HS,y.meanBy=IS,y.min=BS,y.minBy=WS,y.stubArray=ml,y.stubFalse=pl,y.stubObject=SS,y.stubString=TS,y.stubTrue=MS,y.multiply=$S,y.nth=n_,y.noConflict=wS,y.noop=fl,y.now=zr,y.pad=Gk,y.padEnd=Uk,y.padStart=jk,y.parseInt=Kk,y.random=Ok,y.reduce=oR,y.reduceRight=aR,y.repeat=qk,y.replace=Yk,y.result=kk,y.round=GS,y.runInContext=T,y.sample=uR,y.size=hR,y.snakeCase=Xk,y.some=fR,y.sortedIndex=c_,y.sortedIndexBy=d_,y.sortedIndexOf=h_,y.sortedLastIndex=f_,y.sortedLastIndexBy=m_,y.sortedLastIndexOf=p_,y.startCase=Zk,y.startsWith=Qk,y.subtract=US,y.sum=jS,y.sumBy=KS,y.template=eS,y.times=LS,y.toFinite=bi,y.toInteger=ae,y.toLength=Af,y.toLower=tS,y.toNumber=$t,y.toSafeInteger=tk,y.toString=Re,y.toUpper=iS,y.trim=nS,y.trimEnd=sS,y.trimStart=rS,y.truncate=oS,y.unescape=aS,y.uniqueId=AS,y.upperCase=lS,y.upperFirst=ul,y.each=vf,y.eachRight=wf,y.first=mf,hl(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 bs(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 _=this.__wrapped__,k=m?[1]:arguments,M=_ instanceof ve,N=k[0],z=M||oe(_),W=function(pe){var Ce=v.apply(y,ki([pe],k));return m&&j?Ce[0]:Ce};z&&d&&typeof N=="function"&&N.length!=1&&(M=z=!1);var j=this.__chain__,Z=!!this.__actions__.length,ne=C&&!j,ue=M&&!Z;if(!C&&z){_=ue?_:new ve(this);var se=r.apply(_,k);return se.__actions__.push({func:Or,args:[W],thisArg:t}),new Ht(se,j)}return ne&&ue?r.apply(this,k):(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(_){return a.apply(oe(_)?_:[],v)})}}),ti(ve.prototype,function(r,a){var d=y[a];if(d){var m=d.name+"";Te.call(Dn,m)||(Dn[m]=[]),Dn[m].push({name:a,func:d})}}),Dn[Mr(t,S).name]=[{name:"wrapper",func:t}],ve.prototype.clone=a1,ve.prototype.reverse=l1,ve.prototype.value=u1,y.prototype.at=z_,y.prototype.chain=H_,y.prototype.commit=I_,y.prototype.next=B_,y.prototype.plant=$_,y.prototype.reverse=G_,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=U_,y.prototype.first=y.prototype.head,cs&&(y.prototype[cs]=W_),y},Tn=IE();$i?(($i.exports=Tn)._=Tn,da._=Tn):Ze._=Tn}).call(zn)}(_s,_s.exports);var ke=_s.exports;function Uf(n,e={}){const t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json;charset=UTF-8",...e}};return fetch(n,t)}function jf(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:Uf,post:jf,patch:Kf,remove:qf}}const Gr=n=>ke.upperFirst(ke.camelCase(n)),{event:si}=ct.emitter,Yf=()=>gl.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]},addRoute(n){let e=typeof n=="string"?n.substr(n.lastIndexOf("/")+1):n.key;return this.mainKey=this.mainKey||Gr(e),this.routes[Gr(e)]=typeof n=="string"?n:n.route,Gr(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})},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();return s.fields=n,ct.emitter.event("beforeFormueInit"),s.addRoute(i),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 Ur 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 Ur(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 Ur(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 Kr(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((s,o)=>{t=t.concat(Kr(s,e?e+"["+o+"]":o))});else if(typeof n=="object")for(var i in n)t=t.concat(Kr(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var 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=Kr(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
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
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 Hn 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 Hn(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 Rs{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,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach(function(s){var o=s.getHeight();o>t&&(t=o)}),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&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 Rs(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 Hn(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:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,s){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,s){return t.dataTreeStartExpanded[s]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&typeof t=="object"&&t!==null;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:s?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&s?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&s?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:s}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),s=e.modules.dataTree;s.branchEl&&(s.branchEl.parentNode&&s.branchEl.parentNode.removeChild(s.branchEl),s.branchEl=!1),s.controlEl&&(s.controlEl.parentNode&&s.controlEl.parentNode.removeChild(s.controlEl),s.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+s.index),s.index&&(this.branchEl?(s.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(s.branchEl,i.firstChild),this.table.rtl?s.branchEl.style.marginRight=(s.branchEl.offsetWidth+s.branchEl.style.marginLeft)*(s.index-1)+s.index*this.indent+"px":s.branchEl.style.marginLeft=(s.branchEl.offsetWidth+s.branchEl.style.marginRight)*(s.index-1)+s.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+s.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+s.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",o=>{o.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",o=>{o.stopPropagation()}),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,s)=>{var o,l;t.push(i),i instanceof nt&&(i.create(),o=i.modules.dataTree,!o.index&&o.children!==!1&&(l=this.getChildren(i),l.forEach(c=>{c.create(),t.push(c)})))}),t}getChildren(e,t){var i=e.modules.dataTree,s=[],o=[];return i.children!==!1&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(i.children):s=i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s),s.forEach(l=>{o.push(l);var c=this.getChildren(l);c.forEach(h=>{o.push(h)})})),o}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(s=>{var o=new nt(s||{},this.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=this.startOpen(o.getComponent(),o.modules.dataTree.index)),t.push(o)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],s;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(t.children):s=t.children,s.forEach(o=>{o instanceof nt&&i.push(o)})),i}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var o=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof s<"u"&&(o=this.findChildIndex(s,e),o!==!1&&e.data[this.field].splice(i?o:o+1,0,t)),o===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof nt?i=e.data:e instanceof Rs?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(s=>s instanceof nt?s.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(s=>s.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,o=[];return s&&s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach(l=>{l instanceof nt&&(o.push(t?l.getComponent():l),i&&(o=o.concat(this.getTreeChildren(l,t,i))))})),o}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}_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
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 R;if(x){switch(typeof x.value){case"object":x.value=x.value!==null?JSON.stringify(x.value):"";break;case"undefined":x.value="";break}R={content:x.value,colSpan:x.width,rowSpan:x.height},w&&(R.styles=w),E.push(R)}}),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={},R={s:{c:0,r:0},e:{c:n[0]?n[0].columns.reduce((S,F)=>S+(F&&F.width?F.width:1),0):0,r:n.length}};return n.forEach((S,F)=>{var L=[];S.columns.forEach(function(A,O){A?(L.push(!(A.value instanceof Date)&&typeof A.value=="object"?JSON.stringify(A.value):A.value),(A.width>1||A.height>-1)&&(A.height>1||A.width>1)&&E.push({s:{r:F,c:O},e:{r:F+A.height-1,c:O+A.width-1}})):L.push("")}),w.push(L)}),XLSX.utils.sheet_add_aoa(x,w),x["!ref"]=XLSX.utils.encode_range(R),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),R=0;R!=w.length;++R)x[R]=w.charCodeAt(R)&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(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formue-crud",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",