@platforma-sdk/ui-vue 1.8.21 → 1.8.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.umd.cjs CHANGED
@@ -1,103 +1,89 @@
1
- (function(V,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/vue3"],n):(V=typeof globalThis<"u"?globalThis:V||self,n(V.SdkVueLib={},V.Vue,V.core$1,V.core,V.clientSideRowModel,V.infiniteRowModel,V.serverSideRowModel,V.csvExport,V.clipboard,V.rangeSelection,V.richSelect,V.menu,V.excelExport,V.vue3))})(this,function(V,n,Le,C,Ja,cf,cd,df,dd,ud,uf,pf,gf,hf){"use strict";var E2=Object.defineProperty;var af=V=>{throw TypeError(V)};var N2=(V,n,Le)=>n in V?E2(V,n,{enumerable:!0,configurable:!0,writable:!0,value:Le}):V[n]=Le;var ze=(V,n,Le)=>N2(V,typeof n!="symbol"?n+"":n,Le),rd=(V,n,Le)=>n.has(V)||af("Cannot "+Le);var x=(V,n,Le)=>(rd(V,n,"read from private field"),Le?Le.call(V):n.get(V)),Re=(V,n,Le)=>n.has(V)?af("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(V):n.set(V,Le),ge=(V,n,Le,C)=>(rd(V,n,"write to private field"),C?C.call(V,Le):n.set(V,Le),Le),le=(V,n,Le)=>(rd(V,n,"access private method"),Le);var xl=(V,n,Le,C)=>({set _(Ja){ge(V,n,Ja,Le)},get _(){return x(V,n,C)}});var Sp,uo,Tp,Ep,sr,It,cr,dr,po,go,at,ur,nt,$e,xe,Ct,Ft,vt,ct,pr,dt,gr,hr,Rt,fr,hn,_t,ee,ad,In,Fr,ka,Ot,sf,Fn,ho,Sa,kn,Sn,id,Cl,_l,He,ld,Ya,Tn,sd;function ff(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function mf(t){return t!==null&&typeof t=="object"}function Br(t){if(Array.isArray(t)){const e=[];for(let r=0;r<t.length;r++)e[r]=Br(t[r]);return e}else if(mf(t)){const e={};return Object.keys(t).forEach(r=>{e[r]=Br(t[r])}),e}else return t}function kl(t,e,r=!0){let o=0,i;return function(...s){i=()=>{t.apply(this,s),o=new Date().getTime()+e,i=null,r&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function vf(t){let e=0n,r;return async function(...o){const i=++e;try{await r}catch{}if(e!==i)return{ok:!1};const s=t(...o);return r=s,{ok:!0,value:await s}}}var Bo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bf=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((i,s,d)=>`${i}${d===0?"":","}${t(s===void 0||typeof s=="symbol"?null:s)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,i)=>{if(e[i]===void 0||typeof e[i]=="symbol")return o;const s=o.length===0?"":",";return`${o}${s}${t(i)}:${t(e[i])}`},"")}}`};const Po=yf(bf);class Sl extends Error{}class Tl extends Error{constructor(e){super(e.join(`
1
+ (function(F,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/theming"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/theming","@ag-grid-community/vue3"],r):(F=typeof globalThis<"u"?globalThis:F||self,r(F.SdkVueLib={},F.Vue,F.core$1,F.core,F.clientSideRowModel,F.infiniteRowModel,F.serverSideRowModel,F.csvExport,F.clipboard,F.rangeSelection,F.richSelect,F.menu,F.excelExport,F.theming,F.vue3))})(this,function(F,r,Re,b,qo,Zf,td,$f,nd,rd,Uf,Wf,Hf,jf,qf){"use strict";var xF=Object.defineProperty;var Of=F=>{throw TypeError(F)};var kF=(F,r,Re)=>r in F?xF(F,r,{enumerable:!0,configurable:!0,writable:!0,value:Re}):F[r]=Re;var Ge=(F,r,Re)=>kF(F,typeof r!="symbol"?r+"":r,Re),Yc=(F,r,Re)=>r.has(F)||Of("Cannot "+Re);var w=(F,r,Re)=>(Yc(F,r,"read from private field"),Re?Re.call(F):r.get(F)),Le=(F,r,Re)=>r.has(F)?Of("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(F):r.set(F,Re),pe=(F,r,Re,b)=>(Yc(F,r,"write to private field"),b?b.call(F,Re):r.set(F,Re),Re),ae=(F,r,Re)=>(Yc(F,r,"access private method"),Re);var ya=(F,r,Re,b)=>({set _(qo){pe(F,r,qo,Re)},get _(){return w(F,r,b)}});var ih,li,oh,sh,cn,Mt,dn,un,ci,di,ot,hn,rt,We,we,bt,It,yt,ct,pn,dt,fn,mn,Lt,gn,pr,xt,ee,Jc,Rr,Ln,wo,Ot,zf,Mr,ui,bo,xr,kr,Xc,va,_a,je,Qc,jo,Sr,ed;function Kf(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function Yf(t){return t!==null&&typeof t=="object"}function Nn(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Nn(t[n]);return e}else if(Yf(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Nn(t[n])}),e}else return t}function Ca(t,e,n=!0){let i=0,s;return function(...l){s=()=>{t.apply(this,l),i=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>i&&s()}}function Jf(t){let e=0n,n;return async function(...i){const s=++e;try{await n}catch{}if(e!==s)return{ok:!1};const l=t(...i);return n=l,{ok:!0,value:await l}}}var Ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qf=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((s,l,d)=>`${s}${d===0?"":","}${t(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((i,s)=>{if(e[s]===void 0||typeof e[s]=="symbol")return i;const l=i.length===0?"":",";return`${i}${l}${t(s)}:${t(e[s])}`},"")}}`};const Bi=Xf(Qf);class wa extends Error{}class ba extends Error{constructor(e){super(e.join(`
2
2
  `)),this.errors=e}toString(){return this.errors.join(`
3
- `)}}function wf(t){return{ok:!0,value:t}}function pd(t){if(!t)throw new Sl;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function gd(t){return{value:t,errors:void 0}}function xf(t){if(t.errors)throw new Tl(t.errors);if(!t.value)throw new Sl;return t.value}function Cf(t){return t!==void 0}function El(t,e){return Po(t)===Po(e)}const Nl=t=>t,Al=t=>t instanceof Error?t:Error(String(t)),Ml=t=>t.name==="ZodError",Bl=t=>{const{formErrors:e,fieldErrors:r}=t.flatten(),o=Object.entries(r).map(([i,s])=>i+":"+(s==null?void 0:s.join(",")));return e.concat(o).join("; ")};function Pl(t){const e=t.validate??Nl,{autoSave:r}=t,o=n.ref(),i=n.ref(),s=D=>{i.value={model:Br(D)}};n.watch(()=>t.get(),D=>s(D),{immediate:!0});const d=()=>{var D;t.onSave(e(Br((D=i.value)==null?void 0:D.model)))},u=()=>{s(t.get()),o.value=void 0},p=D=>{const E=Al(D);Ml(E)?o.value=Error(Bl(E)):o.value=E},h=D=>{o.value=void 0;try{e(D),r&&d()}catch(E){p(E)}},f=n.computed({get:()=>{var D;return(D=i.value)==null?void 0:D.model},set(D){s(D),h(D)}});n.watch(i,(D,E)=>{D&&D===E&&h(D.model)},{deep:!0});const y=n.computed(()=>!o.value),S=n.computed(()=>!El(t.get(),n.unref(i))),k=n.computed(()=>o.value?o.value.message:"");return n.reactive({model:f,valid:y,isChanged:S,error:o,errorString:k,save:d,revert:u,setError:p})}function _f(t,e){const r=t.validate??Nl,{autoSave:o}=t,i=n.ref(),s=n.ref(),d=E=>{s.value={model:Object.assign(Br(E),e??{}),stage:Symbol()}};n.watch(()=>t.get(),E=>d(E),{immediate:!0});const u=()=>{var E;t.onSave(r(Br((E=s.value)==null?void 0:E.model)))},p=()=>{d(t.get()),i.value=void 0},h=E=>{const A=Al(E);Ml(A)?i.value=Error(Bl(A)):i.value=A},f=E=>{i.value=void 0;try{r(E),o&&u()}catch(A){h(A)}},y=n.computed({get:()=>{var E;return(E=s.value)==null?void 0:E.model},set(){throw Error("Cannot replace base model")}});n.watch([()=>({args:y.value.args,ui:y.value.ui}),()=>{var E;return(E=s.value)==null?void 0:E.stage}],([E,A],[w,L])=>{A===L&&f(E)},{deep:!0});const S=n.computed(()=>!i.value),k=n.computed(()=>{var w;const{args:E,ui:A}=((w=n.unref(s))==null?void 0:w.model)??{};return!El(t.get(),{args:E,ui:A})}),D=n.computed(()=>i.value?i.value.message:"");return n.reactive({model:y,valid:S,isChanged:k,error:i,errorString:D,save:u,revert:p,setError:h})}const kf=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function Sf(t,e){const o=kl(e.setBlockArgs,100),i=kl(e.setBlockUiState,100),s=kl(e.setBlockArgsAndUiState,100),d=n.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async E=>{E.forEach(A=>{A.key==="args"&&(d.args=Object.freeze(A.value)),A.key==="ui"&&(d.ui=Object.freeze(A.value)),A.key==="outputs"&&(d.outputs=Object.freeze(A.value)),A.key==="navigationState"&&(d.navigationState=Object.freeze(A.value))}),await n.nextTick()});const u=()=>Br(d.args),p=()=>Br(d.ui),h=()=>Br(d.navigationState),f={createArgsModel(E={}){return Pl({get(){return E.transform?E.transform(d.args):d.args},validate:E.validate,autoSave:!0,onSave(A){o(A)}})},createUiModel(E={},A){return Pl({get(){return E.transform?E.transform(d.ui):d.ui??A()},validate:E.validate,autoSave:!0,onSave(w){i(w)}})},useOutputs(...E){const A=n.reactive({errors:void 0,value:void 0});return n.watch(()=>d.outputs,()=>{try{Object.assign(A,{value:this.unwrapOutputs(...E),errors:void 0})}catch(w){Object.assign(A,{value:void 0,errors:[String(w)]})}},{immediate:!0,deep:!0}),A},unwrapOutputs(...E){const A=d.outputs,w=E.map(L=>[L,pd(A[L])]);return Object.fromEntries(w)},getOutputField(E){return d.outputs[E]},getOutputFieldOkOptional(E){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const A=this.getOutputField(E);if(A&&A.ok)return A.value},getOutputFieldErrorsOptional(E){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const A=this.getOutputField(E);if(A&&!A.ok)return A.errors},updateArgs(E){const A=u();return E(A),e.setBlockArgs(A)},updateUiState(E){const A=p();return e.setBlockUiState(E(A))},updateNavigationState(E){const A=h();return E(A),e.setNavigationState(A)},navigateTo(E){const A=h();return A.href=E,e.setNavigationState(A)}},y=n.computed(()=>{const E=Object.entries(d.outputs).map(([A,w])=>[A,w.ok&&w.value!==void 0?w.value:void 0]);return Object.fromEntries(E)}),S=n.computed(()=>{const E=Object.entries(d.outputs).map(([A,w])=>[A,w&&!w.ok?new Tl(w.errors):void 0]);return Object.fromEntries(E)}),k={snapshot:d,queryParams:n.computed(()=>kf(d.navigationState.href)),href:n.computed(()=>d.navigationState.href),hasErrors:n.computed(()=>Object.values(d.outputs).some(E=>!(E!=null&&E.ok))),outputValues:n.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),y.value)),outputErrors:n.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),S.value)),args:n.computed(()=>(console.warn("Change app.args to app.snapshot.args"),d.args)),outputs:n.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),d.outputs)),ui:n.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),d.ui)),navigationState:n.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),d.navigationState))},D=_f({get(){return{args:d.args,ui:d.ui}},autoSave:!0,onSave(E){s(E.args,E.ui)}},{outputs:y,outputErrors:S});return n.reactive(Object.assign(D,f,k))}var Ie;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const d of i)s[d]=d;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),d={};for(const u of s)d[u]=i[u];return t.objectValues(d)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.push(d);return s},t.find=(i,s)=>{for(const d of i)if(s(d))return d},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,s=" | "){return i.map(d=>typeof d=="string"?`'${d}'`:d).join(s)}t.joinValues=o,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ie||(Ie={}));var Dl;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Dl||(Dl={}));const oe=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qr=t=>{switch(typeof t){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return isNaN(t)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(t)?oe.array:t===null?oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?oe.promise:typeof Map<"u"&&t instanceof Map?oe.map:typeof Set<"u"&&t instanceof Set?oe.set:typeof Date<"u"&&t instanceof Date?oe.date:oe.object;default:return oe.unknown}},J=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Tf=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Dt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},o={_errors:[]},i=s=>{for(const d of s.issues)if(d.code==="invalid_union")d.unionErrors.map(i);else if(d.code==="invalid_return_type")i(d.returnTypeError);else if(d.code==="invalid_arguments")i(d.argumentsError);else if(d.path.length===0)o._errors.push(r(d));else{let u=o,p=0;for(;p<d.path.length;){const h=d.path[p];p===d.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(r(d))):u[h]=u[h]||{_errors:[]},u=u[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Dt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},o=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Dt.create=t=>new Dt(t);const Kn=(t,e)=>{let r;switch(t.code){case J.invalid_type:t.received===oe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case J.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case J.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ie.assertNever(t)}return{message:r}};let hd=Kn;function Ef(t){hd=t}function Qa(){return hd}const Xa=t=>{const{data:e,path:r,errorMaps:o,issueData:i}=t,s=[...r,...i.path||[]],d={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let u="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)u=h(d,{data:e,defaultError:u}).message;return{...i,path:s,message:u}},Nf=[];function re(t,e){const r=Qa(),o=Xa({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Kn?void 0:Kn].filter(i=>!!i)});t.common.issues.push(o)}class ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const o=[];for(const i of r){if(i.status==="aborted")return be;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const i of r){const s=await i.key,d=await i.value;o.push({key:s,value:d})}return ht.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const i of r){const{key:s,value:d}=i;if(s.status==="aborted"||d.status==="aborted")return be;s.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof d.value<"u"||i.alwaysSet)&&(o[s.value]=d.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),Yn=t=>({status:"dirty",value:t}),wt=t=>({status:"valid",value:t}),Vl=t=>t.status==="aborted",Ll=t=>t.status==="dirty",Do=t=>t.status==="valid",Vo=t=>typeof Promise<"u"&&t instanceof Promise;function ei(t,e,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function fd(t,e,r,o,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ce||(ce={}));var Lo,Io;class Cr{constructor(e,r,o,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const md=(t,e)=>{if(Do(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Dt(t.common.issues);return this._error=r,this._error}}};function Se(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:i}=t;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(d,u)=>{var p,h;const{message:f}=t;return d.code==="invalid_enum_value"?{message:f??u.defaultError}:typeof u.data>"u"?{message:(p=f??o)!==null&&p!==void 0?p:u.defaultError}:d.code!=="invalid_type"?{message:u.defaultError}:{message:(h=f??r)!==null&&h!==void 0?h:u.defaultError}},description:i}}class Ne{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ht,ctx:{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Vo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const i={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},s=this._parseSync({data:e,path:i.path,parent:i});return md(i,s)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},i=this._parse({data:e,path:o.path,parent:o}),s=await(Vo(i)?i:Promise.resolve(i));return md(o,s)}refine(e,r){const o=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const d=e(i),u=()=>s.addIssue({code:J.custom,...o(i)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,r){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof r=="function"?r(o,i):r),!1))}_refinement(e){return new or({schema:this,typeName:me.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return kr.create(this,this._def)}nullable(){return Qr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nr.create(this,this._def)}promise(){return eo.create(this,this._def)}or(e){return zo.create([this,e],this._def)}and(e){return Go.create(this,e,this._def)}transform(e){return new or({...Se(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Wo({...Se(this._def),innerType:this,defaultValue:r,typeName:me.ZodDefault})}brand(){return new Rl({typeName:me.ZodBranded,type:this,...Se(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Ho({...Se(this._def),innerType:this,catchValue:r,typeName:me.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return qo.create(this,e)}readonly(){return Ko.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Af=/^c[^\s-]{8,}$/i,Mf=/^[0-9a-z]+$/,Bf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Pf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Df=/^[a-z0-9_-]{21}$/i,Vf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Lf=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,If="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Il;const Ff=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Rf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Of=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",zf=new RegExp(`^${vd}$`);function yd(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Gf(t){return new RegExp(`^${yd(t)}$`)}function bd(t){let e=`${vd}T${yd(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function jf(t,e){return!!((e==="v4"||!e)&&Ff.test(t)||(e==="v6"||!e)&&Rf.test(t))}class rr extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==oe.string){const s=this._getOrReturnCtx(e);return re(s,{code:J.invalid_type,expected:oe.string,received:s.parsedType}),be}const o=new ht;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),o.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),o.dirty());else if(s.kind==="length"){const d=e.data.length>s.value,u=e.data.length<s.value;(d||u)&&(i=this._getOrReturnCtx(e,i),d?re(i,{code:J.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&re(i,{code:J.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),o.dirty())}else if(s.kind==="email")Lf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"email",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="emoji")Il||(Il=new RegExp(If,"u")),Il.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"emoji",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="uuid")Pf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"uuid",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="nanoid")Df.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"nanoid",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="cuid")Af.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"cuid",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="cuid2")Mf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"cuid2",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="ulid")Bf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"ulid",code:J.invalid_string,message:s.message}),o.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),re(i,{validation:"url",code:J.invalid_string,message:s.message}),o.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"regex",code:J.invalid_string,message:s.message}),o.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),o.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:{startsWith:s.value},message:s.message}),o.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:{endsWith:s.value},message:s.message}),o.dirty()):s.kind==="datetime"?bd(s).test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:"datetime",message:s.message}),o.dirty()):s.kind==="date"?zf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:"date",message:s.message}),o.dirty()):s.kind==="time"?Gf(s).test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:J.invalid_string,validation:"time",message:s.message}),o.dirty()):s.kind==="duration"?Vf.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"duration",code:J.invalid_string,message:s.message}),o.dirty()):s.kind==="ip"?jf(e.data,s.version)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"ip",code:J.invalid_string,message:s.message}),o.dirty()):s.kind==="base64"?Of.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"base64",code:J.invalid_string,message:s.message}),o.dirty()):Ie.assertNever(s);return{status:o.value,value:e.data}}_regex(e,r,o){return this.refinement(i=>e.test(i),{validation:r,code:J.invalid_string,...ce.errToObj(o)})}_addCheck(e){return new rr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ce.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ce.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ce.errToObj(e)})}datetime(e){var r,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...ce.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ce.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ce.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ce.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ce.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ce.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ce.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ce.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ce.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ce.errToObj(r)})}nonempty(e){return this.min(1,ce.errToObj(e))}trim(){return new rr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new rr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new rr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}rr.create=t=>{var e;return new rr({checks:[],typeName:me.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Se(t)})};function Uf(t,e){const r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=r>o?r:o,s=parseInt(t.toFixed(i).replace(".","")),d=parseInt(e.toFixed(i).replace(".",""));return s%d/Math.pow(10,i)}class Kr extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==oe.number){const s=this._getOrReturnCtx(e);return re(s,{code:J.invalid_type,expected:oe.number,received:s.parsedType}),be}let o;const i=new ht;for(const s of this._def.checks)s.kind==="int"?Ie.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Uf(e.data,s.value)!==0&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),re(o,{code:J.not_finite,message:s.message}),i.dirty()):Ie.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ce.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ce.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ce.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ce.toString(r))}setLimit(e,r,o,i){return new Kr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:ce.toString(i)}]})}_addCheck(e){return new Kr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ie.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Kr.create=t=>new Kr({checks:[],typeName:me.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Se(t)});class Yr extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==oe.bigint){const s=this._getOrReturnCtx(e);return re(s,{code:J.invalid_type,expected:oe.bigint,received:s.parsedType}),be}let o;const i=new ht;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),re(o,{code:J.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ie.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ce.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ce.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ce.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ce.toString(r))}setLimit(e,r,o,i){return new Yr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:ce.toString(i)}]})}_addCheck(e){return new Yr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Yr.create=t=>{var e;return new Yr({checks:[],typeName:me.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Se(t)})};class Fo extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==oe.boolean){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.boolean,received:o.parsedType}),be}return wt(e.data)}}Fo.create=t=>new Fo({typeName:me.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Se(t)});class En extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==oe.date){const s=this._getOrReturnCtx(e);return re(s,{code:J.invalid_type,expected:oe.date,received:s.parsedType}),be}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return re(s,{code:J.invalid_date}),be}const o=new ht;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),o.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:J.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),o.dirty()):Ie.assertNever(s);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new En({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ce.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}En.create=t=>new En({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:me.ZodDate,...Se(t)});class ti extends Ne{_parse(e){if(this._getType(e)!==oe.symbol){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.symbol,received:o.parsedType}),be}return wt(e.data)}}ti.create=t=>new ti({typeName:me.ZodSymbol,...Se(t)});class Ro extends Ne{_parse(e){if(this._getType(e)!==oe.undefined){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.undefined,received:o.parsedType}),be}return wt(e.data)}}Ro.create=t=>new Ro({typeName:me.ZodUndefined,...Se(t)});class Oo extends Ne{_parse(e){if(this._getType(e)!==oe.null){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.null,received:o.parsedType}),be}return wt(e.data)}}Oo.create=t=>new Oo({typeName:me.ZodNull,...Se(t)});class Jn extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return wt(e.data)}}Jn.create=t=>new Jn({typeName:me.ZodAny,...Se(t)});class Nn extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wt(e.data)}}Nn.create=t=>new Nn({typeName:me.ZodUnknown,...Se(t)});class Pr extends Ne{_parse(e){const r=this._getOrReturnCtx(e);return re(r,{code:J.invalid_type,expected:oe.never,received:r.parsedType}),be}}Pr.create=t=>new Pr({typeName:me.ZodNever,...Se(t)});class ri extends Ne{_parse(e){if(this._getType(e)!==oe.undefined){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.void,received:o.parsedType}),be}return wt(e.data)}}ri.create=t=>new ri({typeName:me.ZodVoid,...Se(t)});class nr extends Ne{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),i=this._def;if(r.parsedType!==oe.array)return re(r,{code:J.invalid_type,expected:oe.array,received:r.parsedType}),be;if(i.exactLength!==null){const d=r.data.length>i.exactLength.value,u=r.data.length<i.exactLength.value;(d||u)&&(re(r,{code:d?J.too_big:J.too_small,minimum:u?i.exactLength.value:void 0,maximum:d?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(re(r,{code:J.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(re(r,{code:J.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((d,u)=>i.type._parseAsync(new Cr(r,d,r.path,u)))).then(d=>ht.mergeArray(o,d));const s=[...r.data].map((d,u)=>i.type._parseSync(new Cr(r,d,r.path,u)));return ht.mergeArray(o,s)}get element(){return this._def.type}min(e,r){return new nr({...this._def,minLength:{value:e,message:ce.toString(r)}})}max(e,r){return new nr({...this._def,maxLength:{value:e,message:ce.toString(r)}})}length(e,r){return new nr({...this._def,exactLength:{value:e,message:ce.toString(r)}})}nonempty(e){return this.min(1,e)}}nr.create=(t,e)=>new nr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...Se(e)});function Qn(t){if(t instanceof Ke){const e={};for(const r in t.shape){const o=t.shape[r];e[r]=kr.create(Qn(o))}return new Ke({...t._def,shape:()=>e})}else return t instanceof nr?new nr({...t._def,type:Qn(t.element)}):t instanceof kr?kr.create(Qn(t.unwrap())):t instanceof Qr?Qr.create(Qn(t.unwrap())):t instanceof _r?_r.create(t.items.map(e=>Qn(e))):t}class Ke extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ie.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==oe.object){const h=this._getOrReturnCtx(e);return re(h,{code:J.invalid_type,expected:oe.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:s,keys:d}=this._getCached(),u=[];if(!(this._def.catchall instanceof Pr&&this._def.unknownKeys==="strip"))for(const h in i.data)d.includes(h)||u.push(h);const p=[];for(const h of d){const f=s[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Cr(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof Pr){const h=this._def.unknownKeys;if(h==="passthrough")for(const f of u)p.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(h==="strict")u.length>0&&(re(i,{code:J.unrecognized_keys,keys:u}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const f of u){const y=i.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Cr(i,y,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const f of p){const y=await f.key,S=await f.value;h.push({key:y,value:S,alwaysSet:f.alwaysSet})}return h}).then(h=>ht.mergeObjectSync(o,h)):ht.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return ce.errToObj,new Ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var i,s,d,u;const p=(d=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,o).message)!==null&&d!==void 0?d:o.defaultError;return r.code==="unrecognized_keys"?{message:(u=ce.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new Ke({...this._def,unknownKeys:"strip"})}passthrough(){return new Ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:me.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Ke({...this._def,catchall:e})}pick(e){const r={};return Ie.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new Ke({...this._def,shape:()=>r})}omit(e){const r={};return Ie.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new Ke({...this._def,shape:()=>r})}deepPartial(){return Qn(this)}partial(e){const r={};return Ie.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?r[o]=i:r[o]=i.optional()}),new Ke({...this._def,shape:()=>r})}required(e){const r={};return Ie.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let s=this.shape[o];for(;s instanceof kr;)s=s._def.innerType;r[o]=s}}),new Ke({...this._def,shape:()=>r})}keyof(){return wd(Ie.objectKeys(this.shape))}}Ke.create=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strip",catchall:Pr.create(),typeName:me.ZodObject,...Se(e)}),Ke.strictCreate=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strict",catchall:Pr.create(),typeName:me.ZodObject,...Se(e)}),Ke.lazycreate=(t,e)=>new Ke({shape:t,unknownKeys:"strip",catchall:Pr.create(),typeName:me.ZodObject,...Se(e)});class zo extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function i(s){for(const u of s)if(u.result.status==="valid")return u.result;for(const u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;const d=s.map(u=>new Dt(u.ctx.common.issues));return re(r,{code:J.invalid_union,unionErrors:d}),be}if(r.common.async)return Promise.all(o.map(async s=>{const d={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:d}),ctx:d}})).then(i);{let s;const d=[];for(const p of o){const h={...r,common:{...r.common,issues:[]},parent:null},f=p._parseSync({data:r.data,path:r.path,parent:h});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:h}),h.common.issues.length&&d.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const u=d.map(p=>new Dt(p));return re(r,{code:J.invalid_union,unionErrors:u}),be}}get options(){return this._def.options}}zo.create=(t,e)=>new zo({options:t,typeName:me.ZodUnion,...Se(e)});const Dr=t=>t instanceof Uo?Dr(t.schema):t instanceof or?Dr(t.innerType()):t instanceof Zo?[t.value]:t instanceof Jr?t.options:t instanceof $o?Ie.objectValues(t.enum):t instanceof Wo?Dr(t._def.innerType):t instanceof Ro?[void 0]:t instanceof Oo?[null]:t instanceof kr?[void 0,...Dr(t.unwrap())]:t instanceof Qr?[null,...Dr(t.unwrap())]:t instanceof Rl||t instanceof Ko?Dr(t.unwrap()):t instanceof Ho?Dr(t._def.innerType):[];class ni extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==oe.object)return re(r,{code:J.invalid_type,expected:oe.object,received:r.parsedType}),be;const o=this.discriminator,i=r.data[o],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(re(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const i=new Map;for(const s of r){const d=Dr(s.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(i.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);i.set(u,s)}}return new ni({typeName:me.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Se(o)})}}function Fl(t,e){const r=qr(t),o=qr(e);if(t===e)return{valid:!0,data:t};if(r===oe.object&&o===oe.object){const i=Ie.objectKeys(e),s=Ie.objectKeys(t).filter(u=>i.indexOf(u)!==-1),d={...t,...e};for(const u of s){const p=Fl(t[u],e[u]);if(!p.valid)return{valid:!1};d[u]=p.data}return{valid:!0,data:d}}else if(r===oe.array&&o===oe.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const d=t[s],u=e[s],p=Fl(d,u);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return r===oe.date&&o===oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Go extends Ne{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),i=(s,d)=>{if(Vl(s)||Vl(d))return be;const u=Fl(s.value,d.value);return u.valid?((Ll(s)||Ll(d))&&r.dirty(),{status:r.value,value:u.data}):(re(o,{code:J.invalid_intersection_types}),be)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([s,d])=>i(s,d)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Go.create=(t,e,r)=>new Go({left:t,right:e,typeName:me.ZodIntersection,...Se(r)});class _r extends Ne{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==oe.array)return re(o,{code:J.invalid_type,expected:oe.array,received:o.parsedType}),be;if(o.data.length<this._def.items.length)return re(o,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&o.data.length>this._def.items.length&&(re(o,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...o.data].map((d,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new Cr(o,d,o.path,u)):null}).filter(d=>!!d);return o.common.async?Promise.all(s).then(d=>ht.mergeArray(r,d)):ht.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new _r({...this._def,rest:e})}}_r.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _r({items:t,typeName:me.ZodTuple,rest:null,...Se(e)})};class jo extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==oe.object)return re(o,{code:J.invalid_type,expected:oe.object,received:o.parsedType}),be;const i=[],s=this._def.keyType,d=this._def.valueType;for(const u in o.data)i.push({key:s._parse(new Cr(o,u,o.path,u)),value:d._parse(new Cr(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?ht.mergeObjectAsync(r,i):ht.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Ne?new jo({keyType:e,valueType:r,typeName:me.ZodRecord,...Se(o)}):new jo({keyType:rr.create(),valueType:e,typeName:me.ZodRecord,...Se(r)})}}class oi extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==oe.map)return re(o,{code:J.invalid_type,expected:oe.map,received:o.parsedType}),be;const i=this._def.keyType,s=this._def.valueType,d=[...o.data.entries()].map(([u,p],h)=>({key:i._parse(new Cr(o,u,o.path,[h,"key"])),value:s._parse(new Cr(o,p,o.path,[h,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of d){const h=await p.key,f=await p.value;if(h.status==="aborted"||f.status==="aborted")return be;(h.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(h.value,f.value)}return{status:r.value,value:u}})}else{const u=new Map;for(const p of d){const h=p.key,f=p.value;if(h.status==="aborted"||f.status==="aborted")return be;(h.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(h.value,f.value)}return{status:r.value,value:u}}}}oi.create=(t,e,r)=>new oi({valueType:e,keyType:t,typeName:me.ZodMap,...Se(r)});class An extends Ne{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==oe.set)return re(o,{code:J.invalid_type,expected:oe.set,received:o.parsedType}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(re(o,{code:J.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(re(o,{code:J.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function d(p){const h=new Set;for(const f of p){if(f.status==="aborted")return be;f.status==="dirty"&&r.dirty(),h.add(f.value)}return{status:r.value,value:h}}const u=[...o.data.values()].map((p,h)=>s._parse(new Cr(o,p,o.path,h)));return o.common.async?Promise.all(u).then(p=>d(p)):d(u)}min(e,r){return new An({...this._def,minSize:{value:e,message:ce.toString(r)}})}max(e,r){return new An({...this._def,maxSize:{value:e,message:ce.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}An.create=(t,e)=>new An({valueType:t,minSize:null,maxSize:null,typeName:me.ZodSet,...Se(e)});class Xn extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==oe.function)return re(r,{code:J.invalid_type,expected:oe.function,received:r.parsedType}),be;function o(u,p){return Xa({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qa(),Kn].filter(h=>!!h),issueData:{code:J.invalid_arguments,argumentsError:p}})}function i(u,p){return Xa({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qa(),Kn].filter(h=>!!h),issueData:{code:J.invalid_return_type,returnTypeError:p}})}const s={errorMap:r.common.contextualErrorMap},d=r.data;if(this._def.returns instanceof eo){const u=this;return wt(async function(...p){const h=new Dt([]),f=await u._def.args.parseAsync(p,s).catch(k=>{throw h.addIssue(o(p,k)),h}),y=await Reflect.apply(d,this,f);return await u._def.returns._def.type.parseAsync(y,s).catch(k=>{throw h.addIssue(i(y,k)),h})})}else{const u=this;return wt(function(...p){const h=u._def.args.safeParse(p,s);if(!h.success)throw new Dt([o(p,h.error)]);const f=Reflect.apply(d,this,h.data),y=u._def.returns.safeParse(f,s);if(!y.success)throw new Dt([i(f,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Xn({...this._def,args:_r.create(e).rest(Nn.create())})}returns(e){return new Xn({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new Xn({args:e||_r.create([]).rest(Nn.create()),returns:r||Nn.create(),typeName:me.ZodFunction,...Se(o)})}}class Uo extends Ne{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Uo.create=(t,e)=>new Uo({getter:t,typeName:me.ZodLazy,...Se(e)});class Zo extends Ne{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return re(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}Zo.create=(t,e)=>new Zo({value:t,typeName:me.ZodLiteral,...Se(e)});function wd(t,e){return new Jr({values:t,typeName:me.ZodEnum,...Se(e)})}class Jr extends Ne{constructor(){super(...arguments),Lo.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return re(r,{expected:Ie.joinValues(o),received:r.parsedType,code:J.invalid_type}),be}if(ei(this,Lo)||fd(this,Lo,new Set(this._def.values)),!ei(this,Lo).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return re(r,{received:r.data,code:J.invalid_enum_value,options:o}),be}return wt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Jr.create(e,{...this._def,...r})}exclude(e,r=this._def){return Jr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}Lo=new WeakMap,Jr.create=wd;class $o extends Ne{constructor(){super(...arguments),Io.set(this,void 0)}_parse(e){const r=Ie.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==oe.string&&o.parsedType!==oe.number){const i=Ie.objectValues(r);return re(o,{expected:Ie.joinValues(i),received:o.parsedType,code:J.invalid_type}),be}if(ei(this,Io)||fd(this,Io,new Set(Ie.getValidEnumValues(this._def.values))),!ei(this,Io).has(e.data)){const i=Ie.objectValues(r);return re(o,{received:o.data,code:J.invalid_enum_value,options:i}),be}return wt(e.data)}get enum(){return this._def.values}}Io=new WeakMap,$o.create=(t,e)=>new $o({values:t,typeName:me.ZodNativeEnum,...Se(e)});class eo extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==oe.promise&&r.common.async===!1)return re(r,{code:J.invalid_type,expected:oe.promise,received:r.parsedType}),be;const o=r.parsedType===oe.promise?r.data:Promise.resolve(r.data);return wt(o.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}eo.create=(t,e)=>new eo({type:t,typeName:me.ZodPromise,...Se(e)});class or extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:d=>{re(o,d),d.fatal?r.abort():r.dirty()},get path(){return o.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const d=i.transform(o.data,s);if(o.common.async)return Promise.resolve(d).then(async u=>{if(r.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||r.value==="dirty"?Yn(p.value):p});{if(r.value==="aborted")return be;const u=this._def.schema._parseSync({data:d,path:o.path,parent:o});return u.status==="aborted"?be:u.status==="dirty"||r.value==="dirty"?Yn(u.value):u}}if(i.type==="refinement"){const d=u=>{const p=i.refinement(u,s);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?be:(u.status==="dirty"&&r.dirty(),d(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?be:(u.status==="dirty"&&r.dirty(),d(u.value).then(()=>({status:r.value,value:u.value}))))}if(i.type==="transform")if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Do(d))return d;const u=i.transform(d.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>Do(d)?Promise.resolve(i.transform(d.value,s)).then(u=>({status:r.value,value:u})):d);Ie.assertNever(i)}}or.create=(t,e,r)=>new or({schema:t,typeName:me.ZodEffects,effect:e,...Se(r)}),or.createWithPreprocess=(t,e,r)=>new or({schema:e,effect:{type:"preprocess",transform:t},typeName:me.ZodEffects,...Se(r)});class kr extends Ne{_parse(e){return this._getType(e)===oe.undefined?wt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kr.create=(t,e)=>new kr({innerType:t,typeName:me.ZodOptional,...Se(e)});class Qr extends Ne{_parse(e){return this._getType(e)===oe.null?wt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qr.create=(t,e)=>new Qr({innerType:t,typeName:me.ZodNullable,...Se(e)});class Wo extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===oe.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Wo.create=(t,e)=>new Wo({innerType:t,typeName:me.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Se(e)});class Ho extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Vo(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Dt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Dt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Ho.create=(t,e)=>new Ho({innerType:t,typeName:me.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Se(e)});class ai extends Ne{_parse(e){if(this._getType(e)!==oe.nan){const o=this._getOrReturnCtx(e);return re(o,{code:J.invalid_type,expected:oe.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}ai.create=t=>new ai({typeName:me.ZodNaN,...Se(t)});const Zf=Symbol("zod_brand");class Rl extends Ne{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class qo extends Ne{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?be:s.status==="dirty"?(r.dirty(),Yn(s.value)):this._def.out._parseAsync({data:s.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?be:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,r){return new qo({in:e,out:r,typeName:me.ZodPipeline})}}class Ko extends Ne{_parse(e){const r=this._def.innerType._parse(e),o=i=>(Do(i)&&(i.value=Object.freeze(i.value)),i);return Vo(r)?r.then(i=>o(i)):o(r)}unwrap(){return this._def.innerType}}Ko.create=(t,e)=>new Ko({innerType:t,typeName:me.ZodReadonly,...Se(e)});function xd(t,e={},r){return t?Jn.create().superRefine((o,i)=>{var s,d;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(d=(s=u.fatal)!==null&&s!==void 0?s:r)!==null&&d!==void 0?d:!0,h=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...h,fatal:p})}}):Jn.create()}const $f={object:Ke.lazycreate};var me;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(me||(me={}));const Wf=(t,e={message:`Input not instance of ${t.name}`})=>xd(r=>r instanceof t,e),Cd=rr.create,_d=Kr.create,Hf=ai.create,qf=Yr.create,kd=Fo.create,Kf=En.create,Yf=ti.create,Jf=Ro.create,Qf=Oo.create,Xf=Jn.create,em=Nn.create,tm=Pr.create,rm=ri.create,nm=nr.create,om=Ke.create,am=Ke.strictCreate,im=zo.create,lm=ni.create,sm=Go.create,cm=_r.create,dm=jo.create,um=oi.create,pm=An.create,gm=Xn.create,hm=Uo.create,fm=Zo.create,mm=Jr.create,vm=$o.create,ym=eo.create,Sd=or.create,bm=kr.create,wm=Qr.create,xm=or.createWithPreprocess,Cm=qo.create;var ii=Object.freeze({__proto__:null,defaultErrorMap:Kn,setErrorMap:Ef,getErrorMap:Qa,makeIssue:Xa,EMPTY_PATH:Nf,addIssueToContext:re,ParseStatus:ht,INVALID:be,DIRTY:Yn,OK:wt,isAborted:Vl,isDirty:Ll,isValid:Do,isAsync:Vo,get util(){return Ie},get objectUtil(){return Dl},ZodParsedType:oe,getParsedType:qr,ZodType:Ne,datetimeRegex:bd,ZodString:rr,ZodNumber:Kr,ZodBigInt:Yr,ZodBoolean:Fo,ZodDate:En,ZodSymbol:ti,ZodUndefined:Ro,ZodNull:Oo,ZodAny:Jn,ZodUnknown:Nn,ZodNever:Pr,ZodVoid:ri,ZodArray:nr,ZodObject:Ke,ZodUnion:zo,ZodDiscriminatedUnion:ni,ZodIntersection:Go,ZodTuple:_r,ZodRecord:jo,ZodMap:oi,ZodSet:An,ZodFunction:Xn,ZodLazy:Uo,ZodLiteral:Zo,ZodEnum:Jr,ZodNativeEnum:$o,ZodPromise:eo,ZodEffects:or,ZodTransformer:or,ZodOptional:kr,ZodNullable:Qr,ZodDefault:Wo,ZodCatch:Ho,ZodNaN:ai,BRAND:Zf,ZodBranded:Rl,ZodPipeline:qo,ZodReadonly:Ko,custom:xd,Schema:Ne,ZodSchema:Ne,late:$f,get ZodFirstPartyTypeKind(){return me},coerce:{string:t=>rr.create({...t,coerce:!0}),number:t=>Kr.create({...t,coerce:!0}),boolean:t=>Fo.create({...t,coerce:!0}),bigint:t=>Yr.create({...t,coerce:!0}),date:t=>En.create({...t,coerce:!0})},any:Xf,array:nm,bigint:qf,boolean:kd,date:Kf,discriminatedUnion:lm,effect:Sd,enum:mm,function:gm,instanceof:Wf,intersection:sm,lazy:hm,literal:fm,map:um,nan:Hf,nativeEnum:vm,never:tm,null:Qf,nullable:wm,number:_d,object:om,oboolean:()=>kd().optional(),onumber:()=>_d().optional(),optional:bm,ostring:()=>Cd().optional(),pipeline:Cm,preprocess:xm,promise:ym,record:dm,set:pm,strictObject:am,string:Cd,symbol:Yf,transformer:Sd,tuple:cm,undefined:Jf,union:im,unknown:em,void:rm,NEVER:be,ZodIssueCode:J,quotelessJson:Tf,ZodError:Dt});function _m(t){throw new Error("Unexpected object: "+t)}const km=-2147483648,Td=-9007199254740991n,Sm=NaN,Tm=NaN,Em=null,Nm=null;function Ed(t,e){switch(e){case"Int":return t===km;case"Long":return t===Number(Td)||t===Td;case"Float":return t===Sm;case"Double":return t===Tm;case"String":return t===Em;case"Bytes":return t===Nm;default:throw Error(`unsupported data type: ${e}`)}}function Am(t,e){const r=Math.floor(e/8),o=1<<7-e%8;return(t[r]&o)>0}function Nd(t){const{type:e,name:r,domain:o}=t;return{type:e,name:r,...o&&{domain:o}}}function Ol(t){return t.map(Nd)}function li(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(r=>li(r,e))};case"outer":return{type:"outer",primary:li(t.primary,e),secondary:t.secondary.map(r=>li(r,e))};default:_m(t)}}ii.object({__isRef:ii.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:ii.string().describe("Upstream block id"),name:ii.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Mm(t){if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function Bm(){return Mm()}function Pm(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function to(t){return!!t&&typeof t.children<"u"}function Xr(t){return to(t)?t.groupId:t.colId}function Ad(t,e,r){const o=(d,u)=>{const p=d.children.map(Xr),h=C._includes(p,Xr(u)),f=C._last(d.children),y=f&&Xr(f)!==Xr(u);return h&&y};if(!to(t))return!0;const i=t,s=r;if(o(i,s))return i.children.push(s),!0;if(i.groupId===e){const d=i.children.map(Xr);if(!C._includes(d,Xr(s)))return i.children.push(s),!0}for(let d=i.children.length-1;d>=0&&!Ad(i.children[d],e,r);d--);return!1}function Dm(t){const e=(i,s)=>to(i)&&to(s)&&Xr(i)===Xr(s),r=(i,s)=>{if(!to(s))return i;const d=i,u=s;return u.children&&u.groupId&&Ad(d,u.groupId,u.children[0])||u.children.forEach(p=>r(d,p)),d},o=[];for(let i=1;i<=t.length;i++){const s=t[i-1],d=t[i];e(s,d)?t[i]=r(s,d):o.push(s)}return o}var Vm=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],r=(i,s)=>{if(to(i)){const d=i,u=typeof d.groupId<"u"?d.groupId:d.headerName,p=new C.AgProvidedColumnGroup(d,u,!1,s),h=[];return d.children.forEach(f=>{const y=r(f,s+1);y&&h.push(y)}),p.setChildren(h),p}else{const d=i,u=d.colId?d.colId:d.field,p=this.columnModel.getColDefCol(u);return p||e.push(d),p}},o=[];return t.forEach(i=>{const s=r(i,0);s&&o.push(s)}),e.length>0&&C._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),r=Dm(e);t(r)}getLeafPathTrees(){const t=(o,i)=>{let s;if(C.isProvidedColumnGroup(o))if(o.isPadding())s=i;else{const u=Object.assign({},o.getColGroupDef());u.groupId=o.getGroupId(),u.children=[i],s=u}else{const u=Object.assign({},o.getColDef());u.colId=o.getColId(),s=u}const d=o.getOriginalParent();return d?t(d,s):s};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Lm(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function Im(t,e){var r;(r=t.sideBarService)==null||r.getSideBarComp().setDisplayed(e)}function Fm(t,e){var r;(r=t.sideBarService)==null||r.getSideBarComp().setSideBarPosition(e)}function Rm(t,e){var r;(r=t.sideBarService)==null||r.getSideBarComp().openToolPanel(e,"api")}function Om(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function zm(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function Gm(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function jm(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function Um(t,e){var o;const r=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return C._unwrapUserComp(r)}function Zm(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var $m=class extends C.Component{constructor(t){super(),this.eToggleButton=C.RefPlaceholder,this.eIconWrapper=C.RefPlaceholder,this.eLabel=C.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
3
+ `)}}function em(t){return{ok:!0,value:t}}function id(t){if(!t)throw new wa;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function od(t){return{value:t,errors:void 0}}function tm(t){if(t.errors)throw new ba(t.errors);if(!t.value)throw new wa;return t.value}function nm(t){return t!==void 0}function xa(t,e){return Bi(t)===Bi(e)}const ka=t=>t,Sa=t=>t instanceof Error?t:Error(String(t)),Ea=t=>t.name==="ZodError",Ta=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),i=Object.entries(n).map(([s,l])=>s+":"+(l==null?void 0:l.join(",")));return e.concat(i).join("; ")};function Aa(t){const e=t.validate??ka,{autoSave:n}=t,i=r.ref(),s=r.ref(),l=D=>{s.value={model:Nn(D)}};r.watch(()=>t.get(),D=>l(D),{immediate:!0});const d=()=>{var D;t.onSave(e(Nn((D=s.value)==null?void 0:D.model)))},u=()=>{l(t.get()),i.value=void 0},h=D=>{const T=Sa(D);Ea(T)?i.value=Error(Ta(T)):i.value=T},f=D=>{i.value=void 0;try{e(D),n&&d()}catch(T){h(T)}},m=r.computed({get:()=>{var D;return(D=s.value)==null?void 0:D.model},set(D){l(D),f(D)}});r.watch(s,(D,T)=>{D&&D===T&&f(D.model)},{deep:!0});const v=r.computed(()=>!i.value),S=r.computed(()=>!xa(t.get(),r.unref(s))),k=r.computed(()=>i.value?i.value.message:"");return r.reactive({model:m,valid:v,isChanged:S,error:i,errorString:k,save:d,revert:u,setError:h})}function rm(t,e){const n=t.validate??ka,{autoSave:i}=t,s=r.ref(),l=r.ref(),d=T=>{l.value={model:Object.assign(Nn(T),e??{}),stage:Symbol()}};r.watch(()=>t.get(),T=>d(T),{immediate:!0});const u=()=>{var T;t.onSave(n(Nn((T=l.value)==null?void 0:T.model)))},h=()=>{d(t.get()),s.value=void 0},f=T=>{const B=Sa(T);Ea(B)?s.value=Error(Ta(B)):s.value=B},m=T=>{s.value=void 0;try{n(T),i&&u()}catch(B){f(B)}},v=r.computed({get:()=>{var T;return(T=l.value)==null?void 0:T.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:v.value.args,ui:v.value.ui}),()=>{var T;return(T=l.value)==null?void 0:T.stage}],([T,B],[C,R])=>{B===R&&m(T)},{deep:!0});const S=r.computed(()=>!s.value),k=r.computed(()=>{var C;const{args:T,ui:B}=((C=r.unref(l))==null?void 0:C.model)??{};return!xa(t.get(),{args:T,ui:B})}),D=r.computed(()=>s.value?s.value.message:"");return r.reactive({model:v,valid:S,isChanged:k,error:s,errorString:D,save:u,revert:h,setError:f})}const im=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function om(t,e){const i=Ca(e.setBlockArgs,100),s=Ca(e.setBlockUiState,100),l=Ca(e.setBlockArgsAndUiState,100),d=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async T=>{T.forEach(B=>{B.key==="args"&&(d.args=Object.freeze(B.value)),B.key==="ui"&&(d.ui=Object.freeze(B.value)),B.key==="outputs"&&(d.outputs=Object.freeze(B.value)),B.key==="navigationState"&&(d.navigationState=Object.freeze(B.value))}),await r.nextTick()});const u=()=>Nn(d.args),h=()=>Nn(d.ui),f=()=>Nn(d.navigationState),m={createArgsModel(T={}){return Aa({get(){return T.transform?T.transform(d.args):d.args},validate:T.validate,autoSave:!0,onSave(B){i(B)}})},createUiModel(T={},B){return Aa({get(){return T.transform?T.transform(d.ui):d.ui??B()},validate:T.validate,autoSave:!0,onSave(C){s(C)}})},useOutputs(...T){const B=r.reactive({errors:void 0,value:void 0});return r.watch(()=>d.outputs,()=>{try{Object.assign(B,{value:this.unwrapOutputs(...T),errors:void 0})}catch(C){Object.assign(B,{value:void 0,errors:[String(C)]})}},{immediate:!0,deep:!0}),B},unwrapOutputs(...T){const B=d.outputs,C=T.map(R=>[R,id(B[R])]);return Object.fromEntries(C)},getOutputField(T){return d.outputs[T]},getOutputFieldOkOptional(T){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const B=this.getOutputField(T);if(B&&B.ok)return B.value},getOutputFieldErrorsOptional(T){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const B=this.getOutputField(T);if(B&&!B.ok)return B.errors},updateArgs(T){const B=u();return T(B),e.setBlockArgs(B)},updateUiState(T){const B=h();return e.setBlockUiState(T(B))},updateNavigationState(T){const B=f();return T(B),e.setNavigationState(B)},navigateTo(T){const B=f();return B.href=T,e.setNavigationState(B)}},v=r.computed(()=>{const T=Object.entries(d.outputs).map(([B,C])=>[B,C.ok&&C.value!==void 0?C.value:void 0]);return Object.fromEntries(T)}),S=r.computed(()=>{const T=Object.entries(d.outputs).map(([B,C])=>[B,C&&!C.ok?new ba(C.errors):void 0]);return Object.fromEntries(T)}),k={snapshot:d,queryParams:r.computed(()=>im(d.navigationState.href)),href:r.computed(()=>d.navigationState.href),hasErrors:r.computed(()=>Object.values(d.outputs).some(T=>!(T!=null&&T.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),v.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),S.value)),args:r.computed(()=>(console.warn("Change app.args to app.snapshot.args"),d.args)),outputs:r.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),d.outputs)),ui:r.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),d.ui)),navigationState:r.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),d.navigationState))},D=rm({get(){return{args:d.args,ui:d.ui}},autoSave:!0,onSave(T){l(T.args,T.ui)}},{outputs:v,outputErrors:S});return r.reactive(Object.assign(D,m,k))}var Me;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const d of s)l[d]=d;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),d={};for(const u of l)d[u]=s[u];return t.objectValues(d)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&l.push(d);return l},t.find=(s,l)=>{for(const d of s)if(l(d))return d},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function i(s,l=" | "){return s.map(d=>typeof d=="string"?`'${d}'`:d).join(l)}t.joinValues=i,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Me||(Me={}));var Ba;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ba||(Ba={}));const ie=Me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kn=t=>{switch(typeof t){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return isNaN(t)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(t)?ie.array:t===null?ie.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ie.promise:typeof Map<"u"&&t instanceof Map?ie.map:typeof Set<"u"&&t instanceof Set?ie.set:typeof Date<"u"&&t instanceof Date?ie.date:ie.object;default:return ie.unknown}},J=Me.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),sm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Dt extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},i={_errors:[]},s=l=>{for(const d of l.issues)if(d.code==="invalid_union")d.unionErrors.map(s);else if(d.code==="invalid_return_type")s(d.returnTypeError);else if(d.code==="invalid_arguments")s(d.argumentsError);else if(d.path.length===0)i._errors.push(n(d));else{let u=i,h=0;for(;h<d.path.length;){const f=d.path[h];h===d.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(d))):u[f]=u[f]||{_errors:[]},u=u[f],h++}}};return s(this),i}static assert(e){if(!(e instanceof Dt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Me.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):i.push(e(s));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}Dt.create=t=>new Dt(t);const qr=(t,e)=>{let n;switch(t.code){case J.invalid_type:t.received===ie.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Me.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.joinValues(t.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.joinValues(t.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Me.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Me.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case J.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case J.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=e.defaultError,Me.assertNever(t)}return{message:n}};let sd=qr;function am(t){sd=t}function Ko(){return sd}const Yo=t=>{const{data:e,path:n,errorMaps:i,issueData:s}=t,l=[...n,...s.path||[]],d={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const h=i.filter(f=>!!f).slice().reverse();for(const f of h)u=f(d,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},lm=[];function ne(t,e){const n=Ko(),i=Yo({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===qr?void 0:qr].filter(s=>!!s)});t.common.issues.push(i)}class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const s of n){if(s.status==="aborted")return _e;s.status==="dirty"&&e.dirty(),i.push(s.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const s of n){const l=await s.key,d=await s.value;i.push({key:l,value:d})}return ft.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const s of n){const{key:l,value:d}=s;if(l.status==="aborted"||d.status==="aborted")return _e;l.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof d.value<"u"||s.alwaysSet)&&(i[l.value]=d.value)}return{status:e.value,value:i}}}const _e=Object.freeze({status:"aborted"}),Kr=t=>({status:"dirty",value:t}),Ct=t=>({status:"valid",value:t}),Pa=t=>t.status==="aborted",Va=t=>t.status==="dirty",Pi=t=>t.status==="valid",Vi=t=>typeof Promise<"u"&&t instanceof Promise;function Jo(t,e,n,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function ad(t,e,n,i,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ce||(ce={}));var Ni,Di;class xn{constructor(e,n,i,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ld=(t,e)=>{if(Pi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Dt(t.common.issues);return this._error=n,this._error}}};function Se(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:s}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(d,u)=>{var h,f;const{message:m}=t;return d.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(h=m??i)!==null&&h!==void 0?h:u.defaultError}:d.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:s}}class Ae{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Kn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Kn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ft,ctx:{common:e.parent.common,data:e.data,parsedType:Kn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Vi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){var i;const s={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kn(e)},l=this._parseSync({data:e,path:s.path,parent:s});return ld(s,l)}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Kn(e)},s=this._parse({data:e,path:i.path,parent:i}),l=await(Vi(s)?s:Promise.resolve(s));return ld(i,l)}refine(e,n){const i=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const d=e(s),u=()=>l.addIssue({code:J.custom,...i(s)});return typeof Promise<"u"&&d instanceof Promise?d.then(h=>h?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,n){return this._refinement((i,s)=>e(i)?!0:(s.addIssue(typeof n=="function"?n(i,s):n),!1))}_refinement(e){return new on({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Sn.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return rn.create(this,this._def)}promise(){return Qr.create(this,this._def)}or(e){return Ii.create([this,e],this._def)}and(e){return Li.create(this,e,this._def)}transform(e){return new on({...Se(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new $i({...Se(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new Fa({typeName:ge.ZodBranded,type:this,...Se(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Ui({...Se(this._def),innerType:this,catchValue:n,typeName:ge.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Wi.create(this,e)}readonly(){return Hi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cm=/^c[^\s-]{8,}$/i,dm=/^[0-9a-z]+$/,um=/^[0-9A-HJKMNP-TV-Z]{26}$/,hm=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pm=/^[a-z0-9_-]{21}$/i,fm=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,gm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Na;const ym=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vm=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,_m=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,cd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Cm=new RegExp(`^${cd}$`);function dd(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function wm(t){return new RegExp(`^${dd(t)}$`)}function ud(t){let e=`${cd}T${dd(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function bm(t,e){return!!((e==="v4"||!e)&&ym.test(t)||(e==="v6"||!e)&&vm.test(t))}class nn extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ie.string){const l=this._getOrReturnCtx(e);return ne(l,{code:J.invalid_type,expected:ie.string,received:l.parsedType}),_e}const i=new ft;let s;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")e.data.length>l.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const d=e.data.length>l.value,u=e.data.length<l.value;(d||u)&&(s=this._getOrReturnCtx(e,s),d?ne(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):u&&ne(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")mm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"email",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")Na||(Na=new RegExp(gm,"u")),Na.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"emoji",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")hm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"uuid",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")pm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"nanoid",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")cm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"cuid",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")dm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"cuid2",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")um.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"ulid",code:J.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ne(s,{validation:"url",code:J.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"regex",code:J.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?ud(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?Cm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?wm(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:J.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?fm.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"duration",code:J.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?bm(e.data,l.version)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"ip",code:J.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?_m.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"base64",code:J.invalid_string,message:l.message}),i.dirty()):Me.assertNever(l);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(s=>e.test(s),{validation:n,code:J.invalid_string,...ce.errToObj(i)})}_addCheck(e){return new nn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ce.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ce.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ce.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ce.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ce.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ce.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ce.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ce.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ce.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ce.errToObj(e)})}datetime(e){var n,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...ce.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ce.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ce.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ce.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ce.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ce.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ce.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ce.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ce.errToObj(n)})}nonempty(e){return this.min(1,ce.errToObj(e))}trim(){return new nn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}nn.create=t=>{var e;return new nn({checks:[],typeName:ge.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Se(t)})};function xm(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,s=n>i?n:i,l=parseInt(t.toFixed(s).replace(".","")),d=parseInt(e.toFixed(s).replace(".",""));return l%d/Math.pow(10,s)}class Yn extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ie.number){const l=this._getOrReturnCtx(e);return ne(l,{code:J.invalid_type,expected:ie.number,received:l.parsedType}),_e}let i;const s=new ft;for(const l of this._def.checks)l.kind==="int"?Me.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),ne(i,{code:J.invalid_type,expected:"integer",received:"float",message:l.message}),s.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="multipleOf"?xm(e.data,l.value)!==0&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),ne(i,{code:J.not_finite,message:l.message}),s.dirty()):Me.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ce.toString(n))}setLimit(e,n,i,s){return new Yn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ce.toString(s)}]})}_addCheck(e){return new Yn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ce.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ce.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Me.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Yn.create=t=>new Yn({checks:[],typeName:ge.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Se(t)});class Jn extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ie.bigint){const l=this._getOrReturnCtx(e);return ne(l,{code:J.invalid_type,expected:ie.bigint,received:l.parsedType}),_e}let i;const s=new ft;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),ne(i,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):Me.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ce.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ce.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ce.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ce.toString(n))}setLimit(e,n,i,s){return new Jn({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:ce.toString(s)}]})}_addCheck(e){return new Jn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Jn.create=t=>{var e;return new Jn({checks:[],typeName:ge.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Se(t)})};class Fi extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ie.boolean){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.boolean,received:i.parsedType}),_e}return Ct(e.data)}}Fi.create=t=>new Fi({typeName:ge.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Se(t)});class Er extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ie.date){const l=this._getOrReturnCtx(e);return ne(l,{code:J.invalid_type,expected:ie.date,received:l.parsedType}),_e}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ne(l,{code:J.invalid_date}),_e}const i=new ft;let s;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:J.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:J.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):Me.assertNever(l);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Er({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ce.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Er.create=t=>new Er({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ge.ZodDate,...Se(t)});class Xo extends Ae{_parse(e){if(this._getType(e)!==ie.symbol){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.symbol,received:i.parsedType}),_e}return Ct(e.data)}}Xo.create=t=>new Xo({typeName:ge.ZodSymbol,...Se(t)});class Ri extends Ae{_parse(e){if(this._getType(e)!==ie.undefined){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.undefined,received:i.parsedType}),_e}return Ct(e.data)}}Ri.create=t=>new Ri({typeName:ge.ZodUndefined,...Se(t)});class Mi extends Ae{_parse(e){if(this._getType(e)!==ie.null){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.null,received:i.parsedType}),_e}return Ct(e.data)}}Mi.create=t=>new Mi({typeName:ge.ZodNull,...Se(t)});class Yr extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return Ct(e.data)}}Yr.create=t=>new Yr({typeName:ge.ZodAny,...Se(t)});class Tr extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ct(e.data)}}Tr.create=t=>new Tr({typeName:ge.ZodUnknown,...Se(t)});class Dn extends Ae{_parse(e){const n=this._getOrReturnCtx(e);return ne(n,{code:J.invalid_type,expected:ie.never,received:n.parsedType}),_e}}Dn.create=t=>new Dn({typeName:ge.ZodNever,...Se(t)});class Qo extends Ae{_parse(e){if(this._getType(e)!==ie.undefined){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.void,received:i.parsedType}),_e}return Ct(e.data)}}Qo.create=t=>new Qo({typeName:ge.ZodVoid,...Se(t)});class rn extends Ae{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),s=this._def;if(n.parsedType!==ie.array)return ne(n,{code:J.invalid_type,expected:ie.array,received:n.parsedType}),_e;if(s.exactLength!==null){const d=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(d||u)&&(ne(n,{code:d?J.too_big:J.too_small,minimum:u?s.exactLength.value:void 0,maximum:d?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ne(n,{code:J.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ne(n,{code:J.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((d,u)=>s.type._parseAsync(new xn(n,d,n.path,u)))).then(d=>ft.mergeArray(i,d));const l=[...n.data].map((d,u)=>s.type._parseSync(new xn(n,d,n.path,u)));return ft.mergeArray(i,l)}get element(){return this._def.type}min(e,n){return new rn({...this._def,minLength:{value:e,message:ce.toString(n)}})}max(e,n){return new rn({...this._def,maxLength:{value:e,message:ce.toString(n)}})}length(e,n){return new rn({...this._def,exactLength:{value:e,message:ce.toString(n)}})}nonempty(e){return this.min(1,e)}}rn.create=(t,e)=>new rn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...Se(e)});function Jr(t){if(t instanceof Ke){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=Sn.create(Jr(i))}return new Ke({...t._def,shape:()=>e})}else return t instanceof rn?new rn({...t._def,type:Jr(t.element)}):t instanceof Sn?Sn.create(Jr(t.unwrap())):t instanceof Qn?Qn.create(Jr(t.unwrap())):t instanceof kn?kn.create(t.items.map(e=>Jr(e))):t}class Ke extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Me.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ie.object){const f=this._getOrReturnCtx(e);return ne(f,{code:J.invalid_type,expected:ie.object,received:f.parsedType}),_e}const{status:i,ctx:s}=this._processInputParams(e),{shape:l,keys:d}=this._getCached(),u=[];if(!(this._def.catchall instanceof Dn&&this._def.unknownKeys==="strip"))for(const f in s.data)d.includes(f)||u.push(f);const h=[];for(const f of d){const m=l[f],v=s.data[f];h.push({key:{status:"valid",value:f},value:m._parse(new xn(s,v,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Dn){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)h.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")u.length>0&&(ne(s,{code:J.unrecognized_keys,keys:u}),i.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const v=s.data[m];h.push({key:{status:"valid",value:m},value:f._parse(new xn(s,v,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of h){const v=await m.key,S=await m.value;f.push({key:v,value:S,alwaysSet:m.alwaysSet})}return f}).then(f=>ft.mergeObjectSync(i,f)):ft.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(e){return ce.errToObj,new Ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{var s,l,d,u;const h=(d=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,i).message)!==null&&d!==void 0?d:i.defaultError;return n.code==="unrecognized_keys"?{message:(u=ce.errToObj(e).message)!==null&&u!==void 0?u:h}:{message:h}}}:{}})}strip(){return new Ke({...this._def,unknownKeys:"strip"})}passthrough(){return new Ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ge.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ke({...this._def,catchall:e})}pick(e){const n={};return Me.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new Ke({...this._def,shape:()=>n})}omit(e){const n={};return Me.objectKeys(this.shape).forEach(i=>{e[i]||(n[i]=this.shape[i])}),new Ke({...this._def,shape:()=>n})}deepPartial(){return Jr(this)}partial(e){const n={};return Me.objectKeys(this.shape).forEach(i=>{const s=this.shape[i];e&&!e[i]?n[i]=s:n[i]=s.optional()}),new Ke({...this._def,shape:()=>n})}required(e){const n={};return Me.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])n[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof Sn;)l=l._def.innerType;n[i]=l}}),new Ke({...this._def,shape:()=>n})}keyof(){return hd(Me.objectKeys(this.shape))}}Ke.create=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strip",catchall:Dn.create(),typeName:ge.ZodObject,...Se(e)}),Ke.strictCreate=(t,e)=>new Ke({shape:()=>t,unknownKeys:"strict",catchall:Dn.create(),typeName:ge.ZodObject,...Se(e)}),Ke.lazycreate=(t,e)=>new Ke({shape:t,unknownKeys:"strip",catchall:Dn.create(),typeName:ge.ZodObject,...Se(e)});class Ii extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const d=l.map(u=>new Dt(u.ctx.common.issues));return ne(n,{code:J.invalid_union,unionErrors:d}),_e}if(n.common.async)return Promise.all(i.map(async l=>{const d={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:d}),ctx:d}})).then(s);{let l;const d=[];for(const h of i){const f={...n,common:{...n.common,issues:[]},parent:null},m=h._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&d.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=d.map(h=>new Dt(h));return ne(n,{code:J.invalid_union,unionErrors:u}),_e}}get options(){return this._def.options}}Ii.create=(t,e)=>new Ii({options:t,typeName:ge.ZodUnion,...Se(e)});const Fn=t=>t instanceof Gi?Fn(t.schema):t instanceof on?Fn(t.innerType()):t instanceof zi?[t.value]:t instanceof Xn?t.options:t instanceof Zi?Me.objectValues(t.enum):t instanceof $i?Fn(t._def.innerType):t instanceof Ri?[void 0]:t instanceof Mi?[null]:t instanceof Sn?[void 0,...Fn(t.unwrap())]:t instanceof Qn?[null,...Fn(t.unwrap())]:t instanceof Fa||t instanceof Hi?Fn(t.unwrap()):t instanceof Ui?Fn(t._def.innerType):[];class es extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ie.object)return ne(n,{code:J.invalid_type,expected:ie.object,received:n.parsedType}),_e;const i=this.discriminator,s=n.data[i],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const s=new Map;for(const l of n){const d=Fn(l.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new es({typeName:ge.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Se(i)})}}function Da(t,e){const n=Kn(t),i=Kn(e);if(t===e)return{valid:!0,data:t};if(n===ie.object&&i===ie.object){const s=Me.objectKeys(e),l=Me.objectKeys(t).filter(u=>s.indexOf(u)!==-1),d={...t,...e};for(const u of l){const h=Da(t[u],e[u]);if(!h.valid)return{valid:!1};d[u]=h.data}return{valid:!0,data:d}}else if(n===ie.array&&i===ie.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const d=t[l],u=e[l],h=Da(d,u);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return n===ie.date&&i===ie.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Li extends Ae{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),s=(l,d)=>{if(Pa(l)||Pa(d))return _e;const u=Da(l.value,d.value);return u.valid?((Va(l)||Va(d))&&n.dirty(),{status:n.value,value:u.data}):(ne(i,{code:J.invalid_intersection_types}),_e)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,d])=>s(l,d)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Li.create=(t,e,n)=>new Li({left:t,right:e,typeName:ge.ZodIntersection,...Se(n)});class kn extends Ae{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ie.array)return ne(i,{code:J.invalid_type,expected:ie.array,received:i.parsedType}),_e;if(i.data.length<this._def.items.length)return ne(i,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&i.data.length>this._def.items.length&&(ne(i,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...i.data].map((d,u)=>{const h=this._def.items[u]||this._def.rest;return h?h._parse(new xn(i,d,i.path,u)):null}).filter(d=>!!d);return i.common.async?Promise.all(l).then(d=>ft.mergeArray(n,d)):ft.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new kn({...this._def,rest:e})}}kn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kn({items:t,typeName:ge.ZodTuple,rest:null,...Se(e)})};class Oi extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ie.object)return ne(i,{code:J.invalid_type,expected:ie.object,received:i.parsedType}),_e;const s=[],l=this._def.keyType,d=this._def.valueType;for(const u in i.data)s.push({key:l._parse(new xn(i,u,i.path,u)),value:d._parse(new xn(i,i.data[u],i.path,u)),alwaysSet:u in i.data});return i.common.async?ft.mergeObjectAsync(n,s):ft.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Ae?new Oi({keyType:e,valueType:n,typeName:ge.ZodRecord,...Se(i)}):new Oi({keyType:nn.create(),valueType:e,typeName:ge.ZodRecord,...Se(n)})}}class ts extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ie.map)return ne(i,{code:J.invalid_type,expected:ie.map,received:i.parsedType}),_e;const s=this._def.keyType,l=this._def.valueType,d=[...i.data.entries()].map(([u,h],f)=>({key:s._parse(new xn(i,u,i.path,[f,"key"])),value:l._parse(new xn(i,h,i.path,[f,"value"]))}));if(i.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const h of d){const f=await h.key,m=await h.value;if(f.status==="aborted"||m.status==="aborted")return _e;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const h of d){const f=h.key,m=h.value;if(f.status==="aborted"||m.status==="aborted")return _e;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}ts.create=(t,e,n)=>new ts({valueType:e,keyType:t,typeName:ge.ZodMap,...Se(n)});class Ar extends Ae{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==ie.set)return ne(i,{code:J.invalid_type,expected:ie.set,received:i.parsedType}),_e;const s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(ne(i,{code:J.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(ne(i,{code:J.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function d(h){const f=new Set;for(const m of h){if(m.status==="aborted")return _e;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...i.data.values()].map((h,f)=>l._parse(new xn(i,h,i.path,f)));return i.common.async?Promise.all(u).then(h=>d(h)):d(u)}min(e,n){return new Ar({...this._def,minSize:{value:e,message:ce.toString(n)}})}max(e,n){return new Ar({...this._def,maxSize:{value:e,message:ce.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ar.create=(t,e)=>new Ar({valueType:t,minSize:null,maxSize:null,typeName:ge.ZodSet,...Se(e)});class Xr extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ie.function)return ne(n,{code:J.invalid_type,expected:ie.function,received:n.parsedType}),_e;function i(u,h){return Yo({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ko(),qr].filter(f=>!!f),issueData:{code:J.invalid_arguments,argumentsError:h}})}function s(u,h){return Yo({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ko(),qr].filter(f=>!!f),issueData:{code:J.invalid_return_type,returnTypeError:h}})}const l={errorMap:n.common.contextualErrorMap},d=n.data;if(this._def.returns instanceof Qr){const u=this;return Ct(async function(...h){const f=new Dt([]),m=await u._def.args.parseAsync(h,l).catch(k=>{throw f.addIssue(i(h,k)),f}),v=await Reflect.apply(d,this,m);return await u._def.returns._def.type.parseAsync(v,l).catch(k=>{throw f.addIssue(s(v,k)),f})})}else{const u=this;return Ct(function(...h){const f=u._def.args.safeParse(h,l);if(!f.success)throw new Dt([i(h,f.error)]);const m=Reflect.apply(d,this,f.data),v=u._def.returns.safeParse(m,l);if(!v.success)throw new Dt([s(m,v.error)]);return v.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Xr({...this._def,args:kn.create(e).rest(Tr.create())})}returns(e){return new Xr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new Xr({args:e||kn.create([]).rest(Tr.create()),returns:n||Tr.create(),typeName:ge.ZodFunction,...Se(i)})}}class Gi extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Gi.create=(t,e)=>new Gi({getter:t,typeName:ge.ZodLazy,...Se(e)});class zi extends Ae{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ne(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:e.data}}get value(){return this._def.value}}zi.create=(t,e)=>new zi({value:t,typeName:ge.ZodLiteral,...Se(e)});function hd(t,e){return new Xn({values:t,typeName:ge.ZodEnum,...Se(e)})}class Xn extends Ae{constructor(){super(...arguments),Ni.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return ne(n,{expected:Me.joinValues(i),received:n.parsedType,code:J.invalid_type}),_e}if(Jo(this,Ni)||ad(this,Ni,new Set(this._def.values)),!Jo(this,Ni).has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return ne(n,{received:n.data,code:J.invalid_enum_value,options:i}),_e}return Ct(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Xn.create(e,{...this._def,...n})}exclude(e,n=this._def){return Xn.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}Ni=new WeakMap,Xn.create=hd;class Zi extends Ae{constructor(){super(...arguments),Di.set(this,void 0)}_parse(e){const n=Me.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==ie.string&&i.parsedType!==ie.number){const s=Me.objectValues(n);return ne(i,{expected:Me.joinValues(s),received:i.parsedType,code:J.invalid_type}),_e}if(Jo(this,Di)||ad(this,Di,new Set(Me.getValidEnumValues(this._def.values))),!Jo(this,Di).has(e.data)){const s=Me.objectValues(n);return ne(i,{received:i.data,code:J.invalid_enum_value,options:s}),_e}return Ct(e.data)}get enum(){return this._def.values}}Di=new WeakMap,Zi.create=(t,e)=>new Zi({values:t,typeName:ge.ZodNativeEnum,...Se(e)});class Qr extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ie.promise&&n.common.async===!1)return ne(n,{code:J.invalid_type,expected:ie.promise,received:n.parsedType}),_e;const i=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return Ct(i.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qr.create=(t,e)=>new Qr({type:t,typeName:ge.ZodPromise,...Se(e)});class on extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:d=>{ne(i,d),d.fatal?n.abort():n.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const d=s.transform(i.data,l);if(i.common.async)return Promise.resolve(d).then(async u=>{if(n.value==="aborted")return _e;const h=await this._def.schema._parseAsync({data:u,path:i.path,parent:i});return h.status==="aborted"?_e:h.status==="dirty"||n.value==="dirty"?Kr(h.value):h});{if(n.value==="aborted")return _e;const u=this._def.schema._parseSync({data:d,path:i.path,parent:i});return u.status==="aborted"?_e:u.status==="dirty"||n.value==="dirty"?Kr(u.value):u}}if(s.type==="refinement"){const d=u=>{const h=s.refinement(u,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status==="aborted"?_e:(u.status==="dirty"&&n.dirty(),d(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>u.status==="aborted"?_e:(u.status==="dirty"&&n.dirty(),d(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Pi(d))return d;const u=s.transform(d.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>Pi(d)?Promise.resolve(s.transform(d.value,l)).then(u=>({status:n.value,value:u})):d);Me.assertNever(s)}}on.create=(t,e,n)=>new on({schema:t,typeName:ge.ZodEffects,effect:e,...Se(n)}),on.createWithPreprocess=(t,e,n)=>new on({schema:e,effect:{type:"preprocess",transform:t},typeName:ge.ZodEffects,...Se(n)});class Sn extends Ae{_parse(e){return this._getType(e)===ie.undefined?Ct(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Sn.create=(t,e)=>new Sn({innerType:t,typeName:ge.ZodOptional,...Se(e)});class Qn extends Ae{_parse(e){return this._getType(e)===ie.null?Ct(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qn.create=(t,e)=>new Qn({innerType:t,typeName:ge.ZodNullable,...Se(e)});class $i extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===ie.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}$i.create=(t,e)=>new $i({innerType:t,typeName:ge.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Se(e)});class Ui extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Vi(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Dt(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Dt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Ui.create=(t,e)=>new Ui({innerType:t,typeName:ge.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Se(e)});class ns extends Ae{_parse(e){if(this._getType(e)!==ie.nan){const i=this._getOrReturnCtx(e);return ne(i,{code:J.invalid_type,expected:ie.nan,received:i.parsedType}),_e}return{status:"valid",value:e.data}}}ns.create=t=>new ns({typeName:ge.ZodNaN,...Se(t)});const km=Symbol("zod_brand");class Fa extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wi extends Ae{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?_e:l.status==="dirty"?(n.dirty(),Kr(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?_e:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}static create(e,n){return new Wi({in:e,out:n,typeName:ge.ZodPipeline})}}class Hi extends Ae{_parse(e){const n=this._def.innerType._parse(e),i=s=>(Pi(s)&&(s.value=Object.freeze(s.value)),s);return Vi(n)?n.then(s=>i(s)):i(n)}unwrap(){return this._def.innerType}}Hi.create=(t,e)=>new Hi({innerType:t,typeName:ge.ZodReadonly,...Se(e)});function pd(t,e={},n){return t?Yr.create().superRefine((i,s)=>{var l,d;if(!t(i)){const u=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,h=(d=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&d!==void 0?d:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:h})}}):Yr.create()}const Sm={object:Ke.lazycreate};var ge;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ge||(ge={}));const Em=(t,e={message:`Input not instance of ${t.name}`})=>pd(n=>n instanceof t,e),fd=nn.create,md=Yn.create,Tm=ns.create,Am=Jn.create,gd=Fi.create,Bm=Er.create,Pm=Xo.create,Vm=Ri.create,Nm=Mi.create,Dm=Yr.create,Fm=Tr.create,Rm=Dn.create,Mm=Qo.create,Im=rn.create,Lm=Ke.create,Om=Ke.strictCreate,Gm=Ii.create,zm=es.create,Zm=Li.create,$m=kn.create,Um=Oi.create,Wm=ts.create,Hm=Ar.create,jm=Xr.create,qm=Gi.create,Km=zi.create,Ym=Xn.create,Jm=Zi.create,Xm=Qr.create,yd=on.create,Qm=Sn.create,eg=Qn.create,tg=on.createWithPreprocess,ng=Wi.create;var rs=Object.freeze({__proto__:null,defaultErrorMap:qr,setErrorMap:am,getErrorMap:Ko,makeIssue:Yo,EMPTY_PATH:lm,addIssueToContext:ne,ParseStatus:ft,INVALID:_e,DIRTY:Kr,OK:Ct,isAborted:Pa,isDirty:Va,isValid:Pi,isAsync:Vi,get util(){return Me},get objectUtil(){return Ba},ZodParsedType:ie,getParsedType:Kn,ZodType:Ae,datetimeRegex:ud,ZodString:nn,ZodNumber:Yn,ZodBigInt:Jn,ZodBoolean:Fi,ZodDate:Er,ZodSymbol:Xo,ZodUndefined:Ri,ZodNull:Mi,ZodAny:Yr,ZodUnknown:Tr,ZodNever:Dn,ZodVoid:Qo,ZodArray:rn,ZodObject:Ke,ZodUnion:Ii,ZodDiscriminatedUnion:es,ZodIntersection:Li,ZodTuple:kn,ZodRecord:Oi,ZodMap:ts,ZodSet:Ar,ZodFunction:Xr,ZodLazy:Gi,ZodLiteral:zi,ZodEnum:Xn,ZodNativeEnum:Zi,ZodPromise:Qr,ZodEffects:on,ZodTransformer:on,ZodOptional:Sn,ZodNullable:Qn,ZodDefault:$i,ZodCatch:Ui,ZodNaN:ns,BRAND:km,ZodBranded:Fa,ZodPipeline:Wi,ZodReadonly:Hi,custom:pd,Schema:Ae,ZodSchema:Ae,late:Sm,get ZodFirstPartyTypeKind(){return ge},coerce:{string:t=>nn.create({...t,coerce:!0}),number:t=>Yn.create({...t,coerce:!0}),boolean:t=>Fi.create({...t,coerce:!0}),bigint:t=>Jn.create({...t,coerce:!0}),date:t=>Er.create({...t,coerce:!0})},any:Dm,array:Im,bigint:Am,boolean:gd,date:Bm,discriminatedUnion:zm,effect:yd,enum:Ym,function:jm,instanceof:Em,intersection:Zm,lazy:qm,literal:Km,map:Wm,nan:Tm,nativeEnum:Jm,never:Rm,null:Nm,nullable:eg,number:md,object:Lm,oboolean:()=>gd().optional(),onumber:()=>md().optional(),optional:Qm,ostring:()=>fd().optional(),pipeline:ng,preprocess:tg,promise:Xm,record:Um,set:Hm,strictObject:Om,string:fd,symbol:Pm,transformer:yd,tuple:$m,undefined:Vm,union:Gm,unknown:Fm,void:Mm,NEVER:_e,ZodIssueCode:J,quotelessJson:sm,ZodError:Dt});function rg(t){throw new Error("Unexpected object: "+t)}const ig=-2147483648,vd=-9007199254740991n,og=NaN,sg=NaN,ag=null,lg=null;function _d(t,e){switch(e){case"Int":return t===ig;case"Long":return t===Number(vd)||t===vd;case"Float":return t===og;case"Double":return t===sg;case"String":return t===ag;case"Bytes":return t===lg;default:throw Error(`unsupported data type: ${e}`)}}function cg(t,e){const n=Math.floor(e/8),i=1<<7-e%8;return(t[n]&i)>0}function Cd(t){const{type:e,name:n,domain:i}=t;return{type:e,name:n,...i&&{domain:i}}}function Ra(t){return t.map(Cd)}function is(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(n=>is(n,e))};case"outer":return{type:"outer",primary:is(t.primary,e),secondary:t.secondary.map(n=>is(n,e))};default:rg(t)}}rs.object({__isRef:rs.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:rs.string().describe("Upstream block id"),name:rs.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function dg(t){if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function ug(){return dg()}function hg(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function ei(t){return!!t&&typeof t.children<"u"}function er(t){return ei(t)?t.groupId:t.colId}function wd(t,e,n){const i=(d,u)=>{const h=d.children.map(er),f=b._includes(h,er(u)),m=b._last(d.children),v=m&&er(m)!==er(u);return f&&v};if(!ei(t))return!0;const s=t,l=n;if(i(s,l))return s.children.push(l),!0;if(s.groupId===e){const d=s.children.map(er);if(!b._includes(d,er(l)))return s.children.push(l),!0}for(let d=s.children.length-1;d>=0&&!wd(s.children[d],e,n);d--);return!1}function pg(t){const e=(s,l)=>ei(s)&&ei(l)&&er(s)===er(l),n=(s,l)=>{if(!ei(l))return s;const d=s,u=l;return u.children&&u.groupId&&wd(d,u.groupId,u.children[0])||u.children.forEach(h=>n(d,h)),d},i=[];for(let s=1;s<=t.length;s++){const l=t[s-1],d=t[s];e(l,d)?t[s]=n(l,d):i.push(l)}return i}var fg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(s,l)=>{if(ei(s)){const d=s,u=typeof d.groupId<"u"?d.groupId:d.headerName,h=new b.AgProvidedColumnGroup(d,u,!1,l),f=[];return d.children.forEach(m=>{const v=n(m,l+1);v&&f.push(v)}),h.setChildren(f),h}else{const d=s,u=d.colId?d.colId:d.field,h=this.columnModel.getColDefCol(u);return h||e.push(d),h}},i=[];return t.forEach(s=>{const l=n(s,0);l&&i.push(l)}),e.length>0&&b._warnOnce("unable to find grid columns for the supplied colDef(s):",e),i}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=pg(e);t(n)}getLeafPathTrees(){const t=(i,s)=>{let l;if(b.isProvidedColumnGroup(i))if(i.isPadding())l=s;else{const u=Object.assign({},i.getColGroupDef());u.groupId=i.getGroupId(),u.children=[s],l=u}else{const u=Object.assign({},i.getColDef());u.colId=i.getColId(),l=u}const d=i.getOriginalParent();return d?t(d,l):l};return this.columnModel.getCols().filter(i=>{const s=i.getColDef();return i.isPrimary()&&!s.showRowGroup}).map(i=>t(i,i.getColDef()))}};function mg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function gg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function yg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function vg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function _g(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function Cg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function wg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function bg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function xg(t,e){var i;const n=(i=t.sideBarService)==null?void 0:i.getSideBarComp().getToolPanelInstance(e);return b._unwrapUserComp(n)}function kg(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var Sg=class extends b.Component{constructor(t){super(),this.eToggleButton=b.RefPlaceholder,this.eIconWrapper=b.RefPlaceholder,this.eLabel=b.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
4
4
  <button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
5
5
  <div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
6
6
  <span data-ref="eLabel" class="ag-side-button-label"></span>
7
7
  </button>
8
- </div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,r=t(e.labelKey,e.labelDefault);this.eLabel.innerText=r}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",C._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),C._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},Wm=class extends C.Component{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(t){this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){if(!(t.key!==C.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}C._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new $m(t));return this.buttonComps.push(e),this.appendChild(e),e.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:t.id})}),e}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),C._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},Hm={selector:"AG-SIDE-BAR-BUTTONS",component:Wm},Md={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Bd={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},zl={columns:Md,filters:Bd};function Gl(t){if(!t)return;if(t===!0)return{toolPanels:[Md,Bd],defaultToolPanel:"columns"};if(typeof t=="string")return Gl([t]);if(Array.isArray(t)){const r=[];return t.forEach(o=>{const i=zl[o];if(!i){Pd(o);return}r.push(i)}),r.length===0?void 0:{toolPanels:r,defaultToolPanel:r[0].id}}return{toolPanels:qm(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function Pd(t){C._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(zl).join(",")}`)}function qm(t){const e=[];return t&&t.forEach(r=>{let o=null;if(typeof r=="string"){const i=zl[r];if(!i){Pd(r);return}o=i}else o=r;e.push(o)}),e}var Km=class extends C.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(t){this.horizontalResizeService=t.horizontalResizeService}setElementToResize(t){this.elementToResize=t}postConstruct(){const t=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(t),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(t,e,r){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:r,started:t,ended:e})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(t){return this.onResizing(t,!0)}onResizing(t,e=!1){const r=this.inverted?-1:1;let o=Math.max(this.minWidth,Math.floor(this.startingWidth-t*r));this.maxWidth!=null&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=`${o}px`,this.dispatchResizeEvent(!1,e,o)}setInverted(t){this.inverted=t}setMaxWidth(t){this.maxWidth=t}setMinWidth(t){t!=null?this.minWidth=t:this.minWidth=100}},Ym=class extends C.Component{wireBeans(t){this.userComponentFactory=t.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){const t=this.getGui(),e=this.resizeBar=this.createManagedBean(new Km);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){const{id:r,minWidth:o,maxWidth:i,width:s}=t;this.toolPanelId=r,this.width=s;const d=this.userComponentFactory.getToolPanelCompDetails(t,e),u=d.newAgStackInstance();if(this.params=d.params,u==null){C._warnOnce(`error processing tool panel component ${r}. You need to specify 'toolPanel'`);return}u.then(this.setToolPanelComponent.bind(this)),o!=null&&this.resizeBar.setMinWidth(o),i!=null&&this.resizeBar.setMaxWidth(i)}setToolPanelComponent(t){this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc(()=>{this.destroyBean(t)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(t){const e=this.gos.get("enableRtl"),r=t==="left",o=e?r:!r;this.resizeBar.setInverted(o)}refresh(){var t;(t=this.toolPanelCompInstance)==null||t.refresh(this.params)}},Jm=class extends C.Component{constructor(){super(`<div class="ag-side-bar ag-unselectable">
8
+ </div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",b._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),b._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},Eg=class extends b.Component{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(t){this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){if(!(t.key!==b.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}b._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new Sg(t));return this.buttonComps.push(e),this.appendChild(e),e.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:t.id})}),e}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),b._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},Tg={selector:"AG-SIDE-BAR-BUTTONS",component:Eg},bd={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},xd={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},Ma={columns:bd,filters:xd};function Ia(t){if(!t)return;if(t===!0)return{toolPanels:[bd,xd],defaultToolPanel:"columns"};if(typeof t=="string")return Ia([t]);if(Array.isArray(t)){const n=[];return t.forEach(i=>{const s=Ma[i];if(!s){kd(i);return}n.push(s)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:Ag(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function kd(t){b._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(Ma).join(",")}`)}function Ag(t){const e=[];return t&&t.forEach(n=>{let i=null;if(typeof n=="string"){const s=Ma[n];if(!s){kd(n);return}i=s}else i=n;e.push(i)}),e}var Bg=class extends b.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(t){this.horizontalResizeService=t.horizontalResizeService}setElementToResize(t){this.elementToResize=t}postConstruct(){const t=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(t),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(t,e,n){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:n,started:t,ended:e})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(t){return this.onResizing(t,!0)}onResizing(t,e=!1){const n=this.inverted?-1:1;let i=Math.max(this.minWidth,Math.floor(this.startingWidth-t*n));this.maxWidth!=null&&(i=Math.min(this.maxWidth,i)),this.elementToResize.style.width=`${i}px`,this.dispatchResizeEvent(!1,e,i)}setInverted(t){this.inverted=t}setMaxWidth(t){this.maxWidth=t}setMinWidth(t){t!=null?this.minWidth=t:this.minWidth=100}},Pg=class extends b.Component{wireBeans(t){this.userComponentFactory=t.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){const t=this.getGui(),e=this.resizeBar=this.createManagedBean(new Bg);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){const{id:n,minWidth:i,maxWidth:s,width:l}=t;this.toolPanelId=n,this.width=l;const d=this.userComponentFactory.getToolPanelCompDetails(t,e),u=d.newAgStackInstance();if(this.params=d.params,u==null){b._warnOnce(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}u.then(this.setToolPanelComponent.bind(this)),i!=null&&this.resizeBar.setMinWidth(i),s!=null&&this.resizeBar.setMaxWidth(s)}setToolPanelComponent(t){this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc(()=>{this.destroyBean(t)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(t){const e=this.gos.get("enableRtl"),n=t==="left",i=e?n:!n;this.resizeBar.setInverted(i)}refresh(){var t;(t=this.toolPanelCompInstance)==null||t.refresh(this.params)}},Vg=class extends b.Component{constructor(){super(`<div class="ag-side-bar ag-unselectable">
9
9
  <ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
10
- </div>`,[Hm]),this.sideBarButtons=C.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Gl(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new C.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),C._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:r}=this,o=this.getGui(),i=r.getGui(),s=C._getActiveDomElement(this.gos),d=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),u=t.target;if(!d)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.contains(s)){e.focusInto(d,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;d.contains(s)?p=this.focusService.findNextFocusableElement(d,void 0,!0):e.isTargetUnderManagedComponent(d,u)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(d,u)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=C._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const r=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(r.querySelectorAll(".ag-side-button")),i=o.findIndex(u=>u.contains(e));let s=null;switch(t.key){case C.KeyCode.LEFT:case C.KeyCode.UP:s=Math.max(0,i-1);break;case C.KeyCode.RIGHT:case C.KeyCode.DOWN:s=Math.min(i+1,o.length-1);break}if(s===null)return;const d=o[s].querySelector("button");d&&(d.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:r}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,r),!this.toolPanelWrappers.length)return;const i=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(i),this.setSideBarPosition(e?e.position:this.sideBar.position),i)if(e){const{openToolPanel:s}=e;s&&this.openToolPanel(s,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",r=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(o=>{o.setResizerSizerSide(r)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var r,o;t[e.getToolPanelId()]=(o=(r=e.getToolPanelInstance())==null?void 0:r.getState)==null?void 0:o.call(r)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,r){var o;for(const i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],r==null?void 0:r[i.id])}validateDef(t){var e;if(t.id==null)return C._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(C.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(C.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return C._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,r){if(!this.validateDef(t))return;const o=this.sideBarButtons.addButtonComp(t);let i;r?i=r:(i=this.createBean(new Ym),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const s=i.getGui();this.appendChild(s),this.toolPanelWrappers.push(i),C._setAriaControls(o.getButtonElement(),s)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const r=this.openedItem();if(r===t)return;this.toolPanelWrappers.forEach(s=>{const d=t===s.getToolPanelId();s.setDisplayed(d)});const o=this.openedItem();r!==o&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,r??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(r=>r.getToolPanelId()===t)[0];if(!e){C._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,r){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:r,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:r,key:t,visible:!0,switchingToolPanel:o})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var r;const t=Gl(this.gos.get("sideBar")),e={};t&&this.sideBar&&((r=t.toolPanels)==null||r.forEach(o=>{var h,f;const{id:i}=o;if(!i)return;const s=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!s||o.toolPanel!==s.toolPanel)return;const d=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!d)return;const u=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((f=d.getToolPanelInstance())==null?void 0:f.refresh(u))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==d),C._removeFromParent(d.getGui()),e[i]=d)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{C._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},Qm={selector:"AG-SIDE-BAR",component:Jm},Xm=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return Qm}},jl="32.3.2",Dd=C._defineModule({version:jl,moduleName:`${C.ModuleNames.SideBarModule}-core`,beans:[Vm,Xm],dependantModules:[Le.EnterpriseCoreModule]}),ev=C._defineModule({version:jl,moduleName:`${C.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Lm,setSideBarVisible:Im,setSideBarPosition:Fm,openToolPanel:Rm,closeToolPanel:Om,getOpenedToolPanel:zm,refreshToolPanel:Gm,isToolPanelShowing:jm,getToolPanelInstance:Um,getSideBar:Zm},dependantModules:[Dd]}),Ul=C._defineModule({version:jl,moduleName:C.ModuleNames.SideBarModule,dependantModules:[Dd,ev]}),tv={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},rv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=nv,t.first=ov,t.last=av,t.min=iv,t.max=lv,t.count=sv,t.avg=cv,this.initialised=!0}isAggFuncPossible(t,e){const r=this.getFuncNames(t),o=C._includes(r,e),i=C._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return tv[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(C._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const r=this.getFuncNames(t);return C._existsAndNotEmpty(r)?r[0]:null}addAggFuncs(t){this.init(),C._iterateObject(t,(e,r)=>{this.aggFuncsMap[e]=r})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function nv(t){const{values:e}=t;let r=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?r===null?r=i:r+=typeof r=="number"?i:BigInt(i):typeof i=="bigint"&&(r===null?r=i:r=(typeof r=="bigint"?r:BigInt(r))+i)}return r}function ov(t){return t.values.length>0?t.values[0]:null}function av(t){return t.values.length>0?C._last(t.values):null}function iv(t){const{values:e}=t;let r=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(r===null||r>i)&&(r=i)}return r}function lv(t){const{values:e}=t;let r=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(r===null||r<i)&&(r=i)}return r}function sv(t){var i,s;const{values:e}=t;let r=0;for(let d=0;d<e.length;d++){const u=e[d];r+=u!=null&&typeof u.value=="number"?u.value:1}const o=(s=(i=t.rowNode)==null?void 0:i.aggData)==null?void 0:s[t.column.getColId()];return o&&o.value===r?o:{value:r,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function cv(t){var d,u,p;const{values:e}=t;let r=0,o=0;for(let h=0;h<e.length;h++){const f=e[h];let y=null;typeof f=="number"||typeof f=="bigint"?(y=f,o++):f!=null&&(typeof f.value=="number"||typeof f.value=="bigint")&&typeof f.count=="number"&&(y=f.value*(typeof f.value=="number"?f.count:BigInt(f.count)),o+=f.count),typeof y=="number"?r+=typeof r=="number"?y:BigInt(y):typeof y=="bigint"&&(r=(typeof r=="bigint"?r:BigInt(r))+y)}let i=null;o>0&&(i=r/(typeof r=="number"?o:BigInt(o)));const s=(p=(d=t.rowNode)==null?void 0:d.aggData)==null?void 0:p[(u=t.column)==null?void 0:u.getColId()];return s&&s.count===o&&s.value===i?s:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var dv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=C._missingOrEmpty(this.funcColsService.getValueColumns()),r=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&r&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),r=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!C._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:r,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return C._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=r=>{if(!r.hasChildren()){r.aggData&&r.setAggData(null);return}if(r.level===-1&&!t.groupIncludeTotalFooter){const s=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&s){r.setAggData(null);return}}this.aggregateRowNode(r,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const r=e.valueColumns.length===0,o=e.pivotColumns.length===0;let i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):r?i=null:o?i=this.aggregateRowNodeUsingValuesOnly(t,e):i=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(i),t.sibling&&t.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(t){var i;const e={},r=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let s=0;s<r.length;s++){const d=r[s],u=d.getColDef();if(u.pivotTotalColumnIds!=null){o=!1;continue}const p=u.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,u.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,u.colId),e[u.colId]=this.aggregateValues(h,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,d)}if(!o)for(let s=0;s<r.length;s++){const d=r[s],u=d.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const p=u.pivotTotalColumnIds.map(h=>e[h]);e[u.colId]=this.aggregateValues(p,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,d)}return e}aggregateRowNodeUsingValuesOnly(t,e){const r={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,s=this.getValuesNormal(t,o,e.filteredOnly),d=t.aggData;return o.forEach((u,p)=>{r[u.getId()]=this.aggregateValues(s[p],u.getAggFunc(),u,t)}),i&&d&&i.forEach(u=>{r[u.getId()]=d[u.getId()]}),r}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(r=>r.aggData[e])}getValuesFromMappedSet(t,e,r){let o=t;for(let i=0;i<e.length;i++){const s=e[i];o=o?o[s]:null}return o?o.map(i=>this.valueService.getValue(r,i)):[]}getValuesNormal(t,e,r){const o=[];e.forEach(()=>o.push([]));const i=e.length,s=r?t.childrenAfterFilter:t.childrenAfterGroup,d=s.length;for(let u=0;u<d;u++){const p=s[u];for(let h=0;h<i;h++){const f=e[h],y=this.valueService.getValue(f,p);o[h].push(y)}}return o}aggregateValues(t,e,r,o,i){const s=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof s!="function")return C._errorOnce(`unrecognised aggregation function ${e}`),null;const d=s,u=this.gos.addGridCommonParams({values:t,column:r,colDef:r?r.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return d(u)}},uv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],r=this.gos.get("treeData");let o=C._isGroupMultiAutoColumn(this.gos);return r&&o&&(C._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((i,s)=>{e.push(this.createOneAutoCol(i,s))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((r,o)=>this.updateOneAutoCol(r,o,e))}createOneAutoCol(t,e){let r;t?r=`${C.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:r=C.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(r,t,e);o.colId=r;const i=new C.AgColumn(o,null,r,!0);return this.createBean(i),i}updateOneAutoCol(t,e,r){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,s=i!=null?this.columnModel.getColDefCol(i):void 0,d=this.createAutoColDef(t.getId(),s??void 0,e);t.setColDef(d,null,r),this.columnFactory.applyColumnState(t,d,r)}createAutoColDef(t,e,r){let o=this.createBaseColDef(e);const i=this.gos.get("autoGroupColumnDef");C._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||C._missing(o.field)&&C._missing(o.valueGetter)&&C._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),r&&r>0&&(o.headerCheckboxSelection=!1);const s=C._isColumnsSortingCoupledToGroup(this.gos),d=o.valueGetter||o.field!=null;return s&&!d&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),o={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),t){const s=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:s.headerValueGetter}),s.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:s.cellRenderer,innerRendererParams:s.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},pv=class extends Le.PillDragComp{constructor(t,e,r,o,i){super(e,r,i,`
10
+ </div>`,[Tg]),this.sideBarButtons=b.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Ia(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new b.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),b._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,i=this.getGui(),s=n.getGui(),l=b._getActiveDomElement(this.gos),d=i.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),u=t.target;if(!d)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(s.contains(l)){e.focusInto(d,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let h=null;d.contains(l)?h=this.focusService.findNextFocusableElement(d,void 0,!0):e.isTargetUnderManagedComponent(d,u)&&t.shiftKey&&(h=this.focusService.findFocusableElementBeforeTabGuard(d,u)),h||(h=s.querySelector(".ag-selected button")),h&&h!==t.target&&(t.preventDefault(),h.focus())}handleKeyDown(t){const e=b._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),i=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),s=i.findIndex(u=>u.contains(e));let l=null;switch(t.key){case b.KeyCode.LEFT:case b.KeyCode.UP:l=Math.max(0,s-1);break;case b.KeyCode.RIGHT:case b.KeyCode.DOWN:l=Math.min(s+1,i.length-1);break}if(l===null)return;const d=i[l].querySelector("button");d&&(d.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const i=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(i,e,n),!this.toolPanelWrappers.length)return;const s=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(s),this.setSideBarPosition(e?e.position:this.sideBar.position),s)if(e){const{openToolPanel:l}=e;l&&this.openToolPanel(l,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(i=>{i.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,i;t[e.getToolPanelId()]=(i=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:i.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var i;for(const s of t)this.createToolPanelAndSideButton(s,(i=e==null?void 0:e.toolPanels)==null?void 0:i[s.id],n==null?void 0:n[s.id])}validateDef(t){var e;if(t.id==null)return b._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(b.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(b.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return b._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;const i=this.sideBarButtons.addButtonComp(t);let s;n?s=n:(s=this.createBean(new Pg),s.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),s.setDisplayed(!1);const l=s.getGui();this.appendChild(l),this.toolPanelWrappers.push(s),b._setAriaControls(i.getButtonElement(),l)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(l=>{const d=t===l.getToolPanelId();l.setDisplayed(d)});const i=this.openedItem();n!==i&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){b._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const i=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:i}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:i})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var n;const t=Ia(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(i=>{var f,m;const{id:s}=i;if(!s)return;const l=(f=this.sideBar.toolPanels)==null?void 0:f.find(v=>v.id===s);if(!l||i.toolPanel!==l.toolPanel)return;const d=this.toolPanelWrappers.find(v=>v.getToolPanelId()===s);if(!d)return;const u=this.gos.addGridCommonParams({...i.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=d.getToolPanelInstance())==null?void 0:m.refresh(u))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(v=>v!==d),b._removeFromParent(d.getGui()),e[s]=d)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{b._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},Ng={selector:"AG-SIDE-BAR",component:Vg},Dg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return Ng}},La="32.3.3",Sd=b._defineModule({version:La,moduleName:`${b.ModuleNames.SideBarModule}-core`,beans:[fg,Dg],dependantModules:[Re.EnterpriseCoreModule]}),Fg=b._defineModule({version:La,moduleName:`${b.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:mg,setSideBarVisible:gg,setSideBarPosition:yg,openToolPanel:vg,closeToolPanel:_g,getOpenedToolPanel:Cg,refreshToolPanel:wg,isToolPanelShowing:bg,getToolPanelInstance:xg,getSideBar:kg},dependantModules:[Sd]}),Oa=b._defineModule({version:La,moduleName:b.ModuleNames.SideBarModule,dependantModules:[Sd,Fg]}),Rg={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},Mg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=Ig,t.first=Lg,t.last=Og,t.min=Gg,t.max=zg,t.count=Zg,t.avg=$g,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),i=b._includes(n,e),s=b._exists(this.aggFuncsMap[e]);return i&&s}getDefaultFuncLabel(t){return Rg[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(b._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return b._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),b._iterateObject(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function Ig(t){const{values:e}=t;let n=null;for(let i=0;i<e.length;i++){const s=e[i];typeof s=="number"?n===null?n=s:n+=typeof n=="number"?s:BigInt(s):typeof s=="bigint"&&(n===null?n=s:n=(typeof n=="bigint"?n:BigInt(n))+s)}return n}function Lg(t){return t.values.length>0?t.values[0]:null}function Og(t){return t.values.length>0?b._last(t.values):null}function Gg(t){const{values:e}=t;let n=null;for(let i=0;i<e.length;i++){const s=e[i];(typeof s=="number"||typeof s=="bigint")&&(n===null||n>s)&&(n=s)}return n}function zg(t){const{values:e}=t;let n=null;for(let i=0;i<e.length;i++){const s=e[i];(typeof s=="number"||typeof s=="bigint")&&(n===null||n<s)&&(n=s)}return n}function Zg(t){var s,l;const{values:e}=t;let n=0;for(let d=0;d<e.length;d++){const u=e[d];n+=u!=null&&typeof u.value=="number"?u.value:1}const i=(l=(s=t.rowNode)==null?void 0:s.aggData)==null?void 0:l[t.column.getColId()];return i&&i.value===n?i:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function $g(t){var d,u,h;const{values:e}=t;let n=0,i=0;for(let f=0;f<e.length;f++){const m=e[f];let v=null;typeof m=="number"||typeof m=="bigint"?(v=m,i++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(v=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),i+=m.count),typeof v=="number"?n+=typeof n=="number"?v:BigInt(v):typeof v=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+v)}let s=null;i>0&&(s=n/(typeof n=="number"?i:BigInt(i)));const l=(h=(d=t.rowNode)==null?void 0:d.aggData)==null?void 0:h[(u=t.column)==null?void 0:u.getColId()];return l&&l.count===i&&l.value===s?l:{count:i,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var Ug=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=b._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),i=t.changedPath&&t.changedPath.isActive();if(e&&n&&i)return;const s=this.createAggDetails(t);this.recursivelyCreateAggData(s)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),i=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!b._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:i,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return b._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){const l=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&l){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const n=e.valueColumns.length===0,i=e.pivotColumns.length===0;let s;e.userAggFunc?s=e.userAggFunc({nodes:t.childrenAfterFilter}):n?s=null:i?s=this.aggregateRowNodeUsingValuesOnly(t,e):s=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(s),t.sibling&&t.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(t){var s;const e={},n=((s=this.pivotResultColsService.getPivotResultCols())==null?void 0:s.list)??[];let i=!0;for(let l=0;l<n.length;l++){const d=n[l],u=d.getColDef();if(u.pivotTotalColumnIds!=null){i=!1;continue}const h=u.pivotKeys??[];let f;t.leafGroup?f=this.getValuesFromMappedSet(t.childrenMapped,h,u.pivotValueColumn):f=this.getValuesPivotNonLeaf(t,u.colId),e[u.colId]=this.aggregateValues(f,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,d)}if(!i)for(let l=0;l<n.length;l++){const d=n[l],u=d.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const h=u.pivotTotalColumnIds.map(f=>e[f]);e[u.colId]=this.aggregateValues(h,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,d)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},i=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,s=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,i,e.filteredOnly),d=t.aggData;return i.forEach((u,h)=>{n[u.getId()]=this.aggregateValues(l[h],u.getAggFunc(),u,t)}),s&&d&&s.forEach(u=>{n[u.getId()]=d[u.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let i=t;for(let s=0;s<e.length;s++){const l=e[s];i=i?i[l]:null}return i?i.map(s=>this.valueService.getValue(n,s)):[]}getValuesNormal(t,e,n){const i=[];e.forEach(()=>i.push([]));const s=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,d=l.length;for(let u=0;u<d;u++){const h=l[u];for(let f=0;f<s;f++){const m=e[f],v=this.valueService.getValue(m,h);i[f].push(v)}}return i}aggregateValues(t,e,n,i,s){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return b._errorOnce(`unrecognised aggregation function ${e}`),null;const d=l,u=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:s,rowNode:i,data:i?i.data:void 0});return d(u)}},Wg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],n=this.gos.get("treeData");let i=b._isGroupMultiAutoColumn(this.gos);return n&&i&&(b._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),i=!1),i?t.forEach((s,l)=>{e.push(this.createOneAutoCol(s,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,i)=>this.updateOneAutoCol(n,i,e))}createOneAutoCol(t,e){let n;t?n=`${b.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=b.GROUP_AUTO_COLUMN_ID;const i=this.createAutoColDef(n,t,e);i.colId=n;const s=new b.AgColumn(i,null,n,!0);return this.createBean(s),s}updateOneAutoCol(t,e,n){const i=t.getColDef(),s=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,l=s!=null?this.columnModel.getColDefCol(s):void 0,d=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(d,null,n),this.columnFactory.applyColumnState(t,d,n)}createAutoColDef(t,e,n){let i=this.createBaseColDef(e);const s=this.gos.get("autoGroupColumnDef");b._mergeDeep(i,s),i=this.columnFactory.addColumnDefaultAndTypes(i,t),this.gos.get("treeData")||b._missing(i.field)&&b._missing(i.valueGetter)&&b._missing(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter"&&(i.filter=!1),n&&n>0&&(i.headerCheckboxSelection=!1);const l=b._isColumnsSortingCoupledToGroup(this.gos),d=i.valueGetter||i.field!=null;return l&&!d&&(i.sortIndex=void 0,i.initialSort=void 0),i}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),t){const l=t.getColDef();Object.assign(i,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),i.showRowGroup=t.getColId()}else i.showRowGroup=!0;return i}},Hg=class extends Re.PillDragComp{constructor(t,e,n,i,s){super(e,n,s,`
11
11
  <span role="option">
12
12
  <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
13
13
  <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
14
14
  <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
15
15
  <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
16
16
  </span>
17
- `,[C.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=C.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const r=this.gos.get("rowGroupPanelSuppressSort"),o=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!o){const i=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!r){const i=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(i)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:r}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),i={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},s=this.column.getSort(),d=this.gos.get("rowGroupPanelSuppressSort");return[r&&`${r}${o}`,e,this.isGroupingZone()&&!d&&s&&`, ${i[s]}`].filter(u=>!!u).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const r=this.column.getAggFunc(),o=typeof r=="string"?r:"agg";e=this.localeService.getLocaleTextFunc()(o,o)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const r=o=>{o.preventDefault();const s=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,s,"uiColumnSorted")};this.addGuiEventListener("click",r),this.addGuiEventListener("keydown",o=>{o.key===C.KeyCode.ENTER&&this.isGroupingZone()&&r(o)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===C.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Le.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),r=this.getGui(),o=t.getGui();t.setModel({getRow:function(f){return e[f]},getRowCount:function(){return e.length}}),this.createBean(t);const i=C._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${r.clientWidth}px`;const[s]=this.addManagedElementListeners(i,{focusout:f=>{!i.contains(f.relatedTarget)&&p&&p.hideFunc()}}),d=f=>{this.destroyBean(t),this.popupShowing=!1,(f==null?void 0:f.key)==="Escape"&&r.focus(),s&&s()},u=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:d,ariaLabel:u("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",f=>{if(f.key===C.KeyCode.ENTER||f.key===C.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const S=t.getComponentAt(y);S&&S.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:r,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(f=>f===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const r=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),s=o(i,i);return new gv(r,s)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return C.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},gv=class extends C.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},Zl=class extends Le.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===C.DragSourceType.HeaderCell||t===C.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const o=t.dragSource.getDragItem().columns;this.setColumnsVisible(o,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const r=t.dragSource.getDragItem();this.setColumnsVisible(r.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,r){if(t){const o=t.filter(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,r)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,r,o){return new pv(t,e,r,this.dropZonePurpose,o)}},$l=class extends Zl{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),r=t("pivots","Column Labels");super.init({icon:C._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:r}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},Wl=class extends Zl{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),r=t("groups","Row Groups");super.init({icon:C._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:r}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},hv=class extends C.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),C._setAriaRole(t,"presentation"),this.rowGroupComp=new Wl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new $l(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},fv={selector:"AG-GRID-HEADER-DROP-ZONES",component:hv},mv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return fv}},vv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,f;const e=this.columnModel.isPivotMode(),r=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((f=this.filterManager)==null?void 0:f.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,s=C._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:d}=t,u=(y,S=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,S&&y.childrenAfterAggFilter.forEach(k=>u(k,S)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var S;y.childrenAfterAggFilter=((S=y.childrenAfterFilter)==null?void 0:S.filter(k=>{var A;return s({node:k})&&this.filterManager.doesRowPassAggregateFilters({rowNode:k})?(u(k,!0),!0):(A=k.childrenAfterAggFilter)==null?void 0:A.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};d.forEachChangedNodeDepthFirst(r?p:u,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let r=0;if(e){const o=e.length;r=o;for(let i=0;i<o;++i)r+=e[i].allChildrenCount??0}t.setAllChildrenCount(r===0&&t.level>=0?null:r)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(r=>{r.group?e+=r.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},yv=class extends C.TabGuardComp{constructor(){super(`
17
+ `,[b.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=i,this.eSortIndicator=b.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const n=this.gos.get("rowGroupPanelSuppressSort"),i=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!i){const s=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(s)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const s=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(s)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),i=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),d=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${i}`,e,this.isGroupingZone()&&!d&&l&&`, ${s[l]}`].filter(u=>!!u).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),i=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(i,i)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const n=i=>{i.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?i.ctrlKey||i.metaKey:i.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",i=>{i.key===b.KeyCode.ENTER&&this.isGroupingZone()&&n(i)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===b.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Re.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),i=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const s=b._loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(i),s.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(s,{focusout:m=>{!s.contains(m.relatedTarget)&&h&&h.hideFunc()}}),d=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},u=this.localeService.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:d,ariaLabel:u("ariaLabelAggregationFunction","Aggregation Function")});h&&t.setComponentCreator(this.createAggSelect.bind(this,h.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===b.KeyCode.ENTER||m.key===b.KeyCode.SPACE){const v=t.getLastFocusedRow();if(v==null)return;const S=t.getComponentAt(v);S&&S.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let f=e.findIndex(m=>m===this.column.getAggFunc());f===-1&&(f=0),t.focusRow(f)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},i=this.localeService.getLocaleTextFunc(),s=e.toString(),l=i(s,s);return new jg(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return b.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},jg=class extends b.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},Ga=class extends Re.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===b.DragSourceType.HeaderCell||t===b.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const i=t.dragSource.getDragItem().columns;this.setColumnsVisible(i,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const i=t.filter(s=>!s.getColDef().lockVisible);this.columnModel.setColsVisible(i,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,i){return new Hg(t,e,n,this.dropZonePurpose,i)}},za=class extends Ga{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:b._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},Za=class extends Ga{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:b._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},qg=class extends b.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),b._setAriaRole(t,"presentation"),this.rowGroupComp=new Za(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new za(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},Kg={selector:"AG-GRID-HEADER-DROP-ZONES",component:qg},Yg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Kg}},Jg=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var f,m;const e=this.columnModel.isPivotMode(),n=((f=this.filterManager)==null?void 0:f.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),i=v=>!v.node.group,s=v=>v.node.leafGroup,l=b._getGroupAggFiltering(this.gos)||(e?s:i),{changedPath:d}=t,u=(v,S=!1)=>{v.childrenAfterFilter&&(v.childrenAfterAggFilter=v.childrenAfterFilter,S&&v.childrenAfterAggFilter.forEach(k=>u(k,S)),this.setAllChildrenCount(v)),v.sibling&&(v.sibling.childrenAfterAggFilter=v.childrenAfterAggFilter)},h=v=>{var S;v.childrenAfterAggFilter=((S=v.childrenAfterFilter)==null?void 0:S.filter(k=>{var B;return l({node:k})&&this.filterManager.doesRowPassAggregateFilters({rowNode:k})?(u(k,!0),!0):(B=k.childrenAfterAggFilter)==null?void 0:B.length}))||null,this.setAllChildrenCount(v),v.sibling&&(v.sibling.childrenAfterAggFilter=v.childrenAfterAggFilter)};d.forEachChangedNodeDepthFirst(n?h:u,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const i=e.length;n=i;for(let s=0;s<i;++s)n+=e[s].allChildrenCount??0}t.setAllChildrenCount(n===0&&t.level>=0?null:n)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},Xg=class extends b.TabGuardComp{constructor(){super(`
18
18
  <div class="ag-group-filter">
19
19
  <div data-ref="eGroupField"></div>
20
20
  <div data-ref="eUnderlyingFilter"></div>
21
21
  </div>
22
- `),this.eGroupField=C.RefPlaceholder,this.eUnderlyingFilter=C.RefPlaceholder}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:t}=this.params;t.field&&C._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&C._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&C._warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return C._warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(C._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){C._clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),e=t.filter(r=>r.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],C._setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!e.some(r=>r.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(C._loadTemplate('<div class="ag-filter-separator"></div>')),C._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,C._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new C.AgSelect);const e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(r=>({value:r.getId(),text:this.columnNameService.getDisplayNameForColumn(r,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(r=>this.updateSelectedColumn(r)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),C.AgPromise.resolve();const e=[],r=[];return t.forEach(o=>{const i=this.filterManager.getOrCreateFilterWrapper(o);i!=null&&i.filterPromise&&e.push(i.filterPromise.then(s=>(s&&r.push({filter:s,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=s??void 0),s)))}),C.AgPromise.all(e).then(()=>{this.filterColumnPairs=r,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(C._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return C.AgPromise.resolve();const t=this.createManagedBean(new C.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),((e=t.getFilter())==null?void 0:e.then(()=>{var r,o;(r=t.afterGuiAttached)==null||r.call(t,this.afterGuiAttachedParams),!((o=this.afterGuiAttachedParams)!=null&&o.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??C.AgPromise.resolve()):C.AgPromise.resolve()}updateSelectedColumn(t){var r;if(!t)return;(r=this.filterWrapperComp)==null||r.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const e=this.getFilterColumnPair(t);this.selectedColumn=e==null?void 0:e.column,this.selectedFilter=e==null?void 0:e.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return C.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;C._clearElement(this.eUnderlyingFilter),(e=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||e.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){var o;if(e==="gridDestroyed")return;const r=t.getColId();(o=this.filterColumnPairs)!=null&&o.some(({column:i})=>i.getColId()===r)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(t){var e;if(t)return(e=this.filterColumnPairs)==null?void 0:e.find(({column:r})=>r.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},bv=class extends C.Component{constructor(){super(`
22
+ `),this.eGroupField=b.RefPlaceholder,this.eUnderlyingFilter=b.RefPlaceholder}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:t}=this.params;t.field&&b._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&b._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&b._warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return b._warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(b._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){b._clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),e=t.filter(n=>n.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],b._setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!e.some(n=>n.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(b._loadTemplate('<div class="ag-filter-separator"></div>')),b._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,b._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new b.AgSelect);const e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(n=>({value:n.getId(),text:this.columnNameService.getDisplayNameForColumn(n,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(n=>this.updateSelectedColumn(n)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),b.AgPromise.resolve();const e=[],n=[];return t.forEach(i=>{const s=this.filterManager.getOrCreateFilterWrapper(i);s!=null&&s.filterPromise&&e.push(s.filterPromise.then(l=>(l&&n.push({filter:l,column:i}),i.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),b.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(b._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return b.AgPromise.resolve();const t=this.createManagedBean(new b.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),((e=t.getFilter())==null?void 0:e.then(()=>{var n,i;(n=t.afterGuiAttached)==null||n.call(t,this.afterGuiAttachedParams),!((i=this.afterGuiAttachedParams)!=null&&i.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??b.AgPromise.resolve()):b.AgPromise.resolve()}updateSelectedColumn(t){var n;if(!t)return;(n=this.filterWrapperComp)==null||n.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const e=this.getFilterColumnPair(t);this.selectedColumn=e==null?void 0:e.column,this.selectedFilter=e==null?void 0:e.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return b.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;b._clearElement(this.eUnderlyingFilter),(e=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||e.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){var i;if(e==="gridDestroyed")return;const n=t.getColId();(i=this.filterColumnPairs)!=null&&i.some(({column:s})=>s.getColId()===n)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(t){var e;if(t)return(e=this.filterColumnPairs)==null?void 0:e.find(({column:n})=>n.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},Qg=class extends b.Component{constructor(){super(`
23
23
  <div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
24
- `),this.eFloatingFilter=C.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new C.AgPromise(r=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,e?this.setupUnderlyingFloatingFilterElement().then(()=>r()):(this.setupReadOnlyFloatingFilterElement(),r())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var r;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(r=this.eFloatingFilterText)==null||r.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new C.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,C._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(r=>{var o,i;this.underlyingFloatingFilter=r,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(r.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),C.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var r,o,i;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((r=this.underlyingFloatingFilter)!=null&&r.refresh?this.underlyingFloatingFilter.refresh(e.params):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.call(o,e.params))}onParentModelChanged(t,e){var r,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.onParentModelChanged((r=this.parentFilterInstance.getSelectedFilter())==null?void 0:r.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},Hl=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const r=this.getSet(t);r.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const r=this.getSet(t);delete r.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const r=this.getSet(t);r.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var o;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(i=>!e.removeFromChildrenAfterGroup[i.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(i=>!e.removeFromAllLeafChildren[i.id]))??null,t.updateHasChildren();const r=t.sibling;r&&(r.childrenAfterGroup=t.childrenAfterGroup,r.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function wv(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let r=!1;for(let o=1;o<e;o++)if(Vd(t[o-1],t[o])>0){r=!0;break}return r?(t.sort(Vd),!0):!1}function Vd(t,e){const r=t.sourceRowIndex,o=e.sourceRowIndex,i=r>=0,s=o>=0,d=i&&s,u=!i&&!s;return d?r-o:u?t.__objectId-e.__objectId:i?1:-1}var xv=class extends C.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const r=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,r)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const r=[],o=[];let i;e.childrenAfterGroup.forEach(s=>{var d;(d=s.childrenAfterGroup)!=null&&d.length?s.key===""&&!i?i=s:o.push(s):r.push(s)}),i&&o.push(i),e.childrenAfterGroup=[...r,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:r,rowNodeTransactions:o,rowNodesOrderChanged:i}=t,s=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:s,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(s==null?void 0:s.length)??0,transactions:o,rowNodesOrderChanged:!!i,changedPath:r,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(s==null?void 0:s.map(u=>u.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const r=new Hl;C._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,r),C._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,r),C._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=r.getAllParents().slice();r.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{wv(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;C._exists(e)&&r(t.rootNode);function r(o){C._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((s,d)=>e({nodeA:s,nodeB:d})),o.childrenAfterGroup.forEach(s=>r(s)))}}getExistingPathForNode(t,e){const r=[];let o=t.parent;for(;o&&o!==e.rootNode;)r.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return r.reverse(),r}moveNodesInWrongPath(t,e,r){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const i=p=>p.key,s=this.getExistingPathForNode(o,e).map(i),d=this.getGroupInfo(o,e).map(i);C._areEqual(s,d)||this.moveNode(o,e,r)})}moveNode(t,e,r){if(this.removeNodesFromParents([t],e,r),this.insertOneNode(t,e,r),t.setData(t.data),e.changedPath.isActive()){const o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,r){this.removeNodesFromParents(t,e,r),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,r){let o=e;for(;o&&o!==t.rootNode;)r(o),o=o.parent}removeNodesFromParents(t,e,r){const o=r==null,i=r||new Hl;t.forEach(s=>{this.removeFromParent(s,i),this.forEachParentGroup(e,s.parent,d=>{i.removeFromAllLeafChildren(d,s)})}),o&&i.flush()}removeEmptyGroups(t,e){let r=!0;const o=i=>{var p;const s=this.getChildrenMappedKey(i.key,i.rowGroupColumn),d=i.parent;return(d!=null&&d.childrenMapped?!d.childrenMapped[s]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;r;){r=!1;const i=new Hl;t.forEach(s=>{this.forEachParentGroup(e,s,d=>{o(d)&&(r=!0,this.removeFromParent(d,i),d.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(C._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const r=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.childrenMapped&&delete t.parent.childrenMapped[r],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const r=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[r]!==t&&(e.childrenMapped[r]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:C._areEqual(t.groupedCols,e.groupedCols)&&C._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=r=>{r&&r.forEach(o=>{var d;if(!o.group)return;const s={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(d=o.allLeafChildren)==null?void 0:d[0]};this.setGroupData(o,s,t),e(o.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(s=>s&&!s.group);const{groupedCols:r}=t,o=t.rootNode;o.leafGroup=r.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const i=o.sibling;i&&(i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let r=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(s=>s.getId()).join("-"):"";return e&&(r=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,r}insertNodes(t,e){t.forEach(r=>{this.insertOneNode(r,e),e.changedPath.isActive()&&e.changedPath.addParentNode(r.parent)})}insertOneNode(t,e,r){const o=this.getGroupInfo(t,e),i=this.findParentForNode(t,o,e,r);i.group||C._warnOnce("duplicate group keys for row data, keys should be unique",[i.data,t.data]),t.parent=i,t.level=o.length,i.childrenAfterGroup.push(t),i.updateHasChildren()}findParentForNode(t,e,r,o){let i=r.rootNode;return e.forEach((s,d)=>{i=this.getOrCreateNextNode(i,s,d,r),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,r,o){var d;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let s=(d=t==null?void 0:t.childrenMapped)==null?void 0:d[i];return s||(s=this.createGroup(e,t,r,o),this.addToParent(s,t)),s}createGroup(t,e,r,o){const i=new C.RowNode(this.beans);return i.group=!0,i.field=t.field,i.rowGroupColumn=t.rowGroupColumn,this.setGroupData(i,t,o),i.key=t.key,i.id=this.createGroupId(i,e,r),i.level=r,i.leafGroup=r===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=r,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,r){const o=(i,s)=>{if(!i.rowGroupColumn)return null;const d=s?o(s,s.parent):null;return`${d==null?"":d+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return C.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,r){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const s=t.rowGroupColumn;s!==null&&i.isRowGroupDisplayed(s.getId())&&(r.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.getColId()]=this.valueService.getValue(s,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const r=t.isGroupOpenByDefault;if(r){const o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=r(o)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const r=[];return e.groupedCols.forEach(o=>{let i=this.valueService.getKeyForNode(o,t),s=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!s&&(i="",s=!0),s){const u={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};r.push(u)}}),r}},Cv=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,st=Object.freeze([]),_v=st.values(),si=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},kv=class lf{constructor(e,r,o){this.parent=e,this.key=r,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=st,this.allLeafChildren=st,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,r;return!((e=this.row)!=null&&e.data)&&!((r=this.children)!=null&&r.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??_v}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let r=(o=this.children)==null?void 0:o.get(e);return r||(r=new lf(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.set(r.key,r)),r}destroy(){var o;const{row:e,parent:r}=this;r!==null&&((o=r==null?void 0:r.children)==null||o.delete(this.key),e!==null&&si(e,!0),this.parent=null)}setRow(e){const{level:r,row:o,childrenAfterGroup:i}=this;if(r<0)o!==null&&o!==e&&si(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??st,si(o,!1)):e.allLeafChildren=this.allLeafChildren??st}return e.level=r,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:r,row:o,duplicateRows:i,childrenAfterGroup:s}=this;if(o===e){const d=this.popDuplicateRow();d?(this.row=d,d.childrenAfterGroup=s,r>=0&&(d.allLeafChildren=o.allLeafChildren??this.allLeafChildren??st)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return si(e,r<0),!0}addDuplicateRow(e){const{level:r}=this;let o=this.duplicateRows;if(o===null)o=new Set,this.duplicateRows=o;else if(o.has(e))return!1;return o.add(e),e.treeNode=this,e.level=r,r>=0&&(e.allLeafChildren=st),e.childrenAfterGroup=st,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,r=this.row;if(!r||!e)return r;let o=r;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==r&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=r.allLeafChildren??this.allLeafChildren??st,r.childrenAfterGroup=st,r.allLeafChildren=st,e.delete(o),e.add(r),this.row=o),o}popDuplicateRow(){let e=null;const r=this.duplicateRows;return r!==null&&(e=r.values().next().value,e!==null&&r.delete(e)&&r.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,r=this.parent;for(;r!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=r.invalidatedHead,r.invalidatedHead=e,e=r,r=e.parent}invalidateOrder(){var r,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((r=this.children)==null?void 0:r.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var r,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(r=this.childrenAfterGroup[0])==null?void 0:r.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var u;this.childrenChanged=!1;const e=((u=this.children)==null?void 0:u.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=st,this.row.childrenAfterGroup=st,!0);let r=!1,o=this.childrenAfterGroup;o===st?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,r=!0):o.length!==e&&(o.length=e,r=!0);let i=0,s=-1,d=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<s&&(d=!0),s=h,p.oldSourceRowIndex=h;const f=p.row;o[i]!==f&&(o[i]=f,r=!0),++i}return r&&(this.leafChildrenChanged=!0),d&&this.reorderChildrenList(o),r||d}reorderChildrenList(e){const r=e.length,o=this.children;e.sort(Cv),o.clear();for(let i=0;i<r;++i){const s=e[i].treeNode;o.set(s.key,s)}}updateAllLeafChildren(){var d,u;const{parent:e,row:r,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const s=o.length;if(s===0)i=((d=r.allLeafChildren)==null?void 0:d.length)!==0,r.allLeafChildren=st,this.allLeafChildren=st;else if(s===1&&((u=o[0].allLeafChildren)!=null&&u.length))r.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===st||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let f=0;for(let y=0;y<s;++y){const S=o[y],k=S.allLeafChildren,D=k.length;if(D)for(let E=0;E<D;++E){const A=k[E];(f>=h||p[f]!==A)&&(p[f]=A,i=!0),++f}else(f>=h||p[f]!==S)&&S&&(p[f]=S,i=!0),++f}h!==f&&(p.length=f,i=!0),r.allLeafChildren!==p&&(r.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},Ld=t=>(t.treeNodeFlags&1)!==0,Id=t=>(t.treeNodeFlags&2)!==0,Fd=t=>(t.treeNodeFlags&4)!==0,Sv=t=>(t.treeNodeFlags&8)!==0,Rd=t=>(t.treeNodeFlags&16)!==0,Od=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Tv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},Ev=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},en=t=>{t.treeNodeFlags|=16},zd=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},Yo=t=>{t.treeNodeFlags=0},Nv=class extends C.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new kv(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),Yo(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:r,changedPath:o}=t,i=t.rowNode,s=this.gos,d={changedPath:o,expandByDefault:s.get("groupDefaultExpanded"),suppressGroupMaintainValueType:s.get("suppressGroupMaintainValueType"),getDataPath:s.get("getDataPath"),isGroupOpenByDefault:s.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:s.getCallback("initialGroupOrderComparator")};this.root.setRow(i),i.leafGroup=!1;const p=i.sibling;p&&(p.childrenAfterGroup=i.childrenAfterGroup,p.childrenMapped=i.childrenMapped),e?this.handleTransaction(d,e,r):this.handleRowData(d,i,t.afterColumnsChanged===!0)}handleRowData(t,e,r){var i,s,d;const o=this.root;if(r||this.oldGroupDisplayColIds===void 0){const u=((s=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:s.map(p=>p.getId()).join("-"))??"";if(r){this.oldGroupDisplayColIds!==u&&this.checkAllGroupDataAfterColsChanged((d=o.row)==null?void 0:d.childrenAfterGroup);return}this.oldGroupDisplayColIds=u}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,r){for(const{remove:o,update:i,add:s}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!0),this.addOrUpdateRows(t,s,!1);r&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let r=0,o=t.length;r<o;++r){const i=t[r].treeNode;i&&i.oldSourceRowIndex!==r&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let r=0,o=(t==null?void 0:t.length)??0;r<o;++r){const i=t[r];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,r){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++o){const s=e[o],d=this.upsertPath(this.getDataPath(t,s));d&&this.addOrUpdateRow(d,s,r)}}removeRows(t){for(let e=0,r=(t==null?void 0:t.length)??0;e<r;++e){const o=t[e],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const r=(t==null?void 0:t(e))||st;return r.length||C._warnOnce("getDataPath() should not return an empty path",[e]),r}upsertPath(t){let e=this.root;const r=t.length-1;for(let o=0;o<=r;++o){const i=e.upsertKey(t[o]);if(o>=r)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,r){var d;const{level:o,row:i}=t;if(o<0)return;let s=!1;if(i!==e){const u=e.treeNode;u!==null&&u!==t&&(u.removeRow(e),u.invalidate()),i===null?(t.setRow(e),s=!0):i.data?t.addDuplicateRow(e)&&(s=!0):(t.setRow(e),this.destroyRow(i,!0),s=!0)}r&&!Fd(e)&&(Tv(e),s=!0),s&&t.invalidate(),(d=this.rowsPendingDestruction)==null||d.delete(e)}removeRow(t,e){const{parent:r,level:o}=t;if(o<0)return;let i=!1;t.removeRow(e)&&(i=!0,r&&(r.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const r=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&en(r),r.updateHasChildren(),Rd(r)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(r),zd(r),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const r=e.dequeueInvalidated();if(r===null)break;r.parent===e&&this.commitChild(t,e,r)}}commitChild(t,e,r){if(r.isEmptyFillerNode()){this.clearTree(r);return}this.commitNodePreOrder(e,r),this.commitInvalidatedChildren(t,r),this.commitNodePostOrder(t,e,r)}commitNodePreOrder(t,e){let r=e.row;if(r===null?(r=this.createFillerRow(e),e.setRow(r)):(r=e.sortFirstDuplicateRow(),r.allChildrenCount===void 0&&(r.allChildrenCount=null)),r.parent=t.row,e.oldRow!==r)for(const i of e.enumChildren()){const s=i.row;s!==null&&(s.parent=r)}const o=e.key;r.key!==o?(r.key=o,Ev(r),this.setGroupData(r,o)):r.groupData||this.setGroupData(r,o)}commitNodePostOrder(t,e,r){var h,f,y;const o=r.row,i=r.oldRow;if(r.isEmptyFillerNode()){this.clearTree(r);return}r.childrenChanged&&r.updateChildrenAfterGroup()&&en(o),r.leafChildrenChanged&&r.updateAllLeafChildren();const s=r.getRowPosition();r.oldSourceRowIndex!==s&&(r.oldSourceRowIndex=s,e.childrenChanged=!0);const d=!!((h=o.childrenAfterGroup)!=null&&h.length),u=d||!o.data,p=o.group;p!==u?(en(o),o.setGroup(u),!u&&!o.expanded&&Od(o,!1)):o.hasChildren()!==d&&(en(o),o.updateHasChildren()),o.group&&!Id(o)&&(i!==o&&i!==null&&i.group&&Id(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Od(o,!0)),Fd(o)&&(en(e.row),Sv(o)&&o.setData(o.data)),i!==o&&(r.oldRow=o,i!==null&&(p||r.hasChildren())&&en(o),e.childrenChanged=!0,en(e.row)),Rd(o)?(f=t.changedPath)!=null&&f.isActive()&&t.changedPath.addParentNode(o):Ld(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),zd(o),(y=r.duplicateRows)!=null&&y.size&&!r.duplicateRowsWarned&&(r.duplicateRowsWarned=!0,C._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(r.duplicateRows).map(S=>S.data)]))}createFillerRow(t){const e=new C.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let r=t.level+"-"+t.key,o=t.parent;for(;o!==null;){const i=o.parent;if(i===null)break;r=`${o.level}-${o.key}-${r}`,o=i}return e.id=C.RowNode.ID_PREFIX_ROW_GROUP+r,e}setGroupData(t,e){var i;const r={};t.groupData=r;const o=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols();if(o)for(const s of o)r[s.getColId()]=e}getExpandedInitialValue(t,e){const r=t.isGroupOpenByDefault;return r?r({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:r,row:o,level:i}=t;if(e!==null&&r!==null&&(e.childrenChanged=!0,e.row!==null&&en(e.row)),o!==null&&i>=0){let s=t.row;for(;s!==null&&t.removeRow(s);)this.destroyRow(s,!s.data),s=t.row}for(const s of t.enumChildren())this.clearTree(s);t.destroy()}destroyTree(t){const{row:e,level:r,duplicateRows:o}=t;if(e&&(r>=0&&!e.data?this.destroyRow(e,!0):Yo(e)),o)for(const i of o)r>=0&&!i.data?this.destroyRow(i,!0):Yo(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!Ld(t)){Yo(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}Yo(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},Av=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Nv:xv;let r=this.strategy;(r==null?void 0:r.constructor)!==e&&(this.destroyBean(r),r=this.createManagedBean(new e),this.strategy=r),r.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Gd="PivotRowTotal_",Mv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function r(s,d=[]){return s.forEach(u=>{u.children!==void 0?r(u.children,d):d.push(u)}),d}const o=r(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(s=>C._cloneObject(s));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),r=e.length;return this.recursivelyBuildGroup(0,t,[],r,e)}recursivelyBuildGroup(t,e,r,o,i){const s=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(r);const d=i[t].getColDef(),u=this.headerNameComparator.bind(this,d.pivotComparator);if(s.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return C._iterateObject(e,f=>{const y=[...r,f],S=this.createColDef(s[0],f,y);S.columnGroupShow="open",h.push(S)}),h.sort(u),h}const p=[];return C._iterateObject(e,(h,f)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,S=[...r,h];p.push({children:this.recursivelyBuildGroup(t+1,f,S,o,i),headerName:h,pivotKeys:S,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(S)})}),p.sort(u),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(r=>{const o=this.columnNameService.getDisplayNameForColumn(r,"header");return{...this.createColDef(r,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const r=this.gos.get("suppressExpandablePivotGroups");if(r||this.gos.get("pivotColumnGroupTotals"))return;const o=(i,s,d)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,s,h)});const f=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const S=this.columnNameService.getDisplayNameForColumn(y,"header"),k=this.createColDef(y,S,i.pivotKeys);k.pivotTotalColumnIds=h.get(y.getColId()),k.columnGroupShow=r?"open":"closed",k.aggFunc=y.getAggFunc(),f||(i.children.push(k),s.push(k))}),this.merge(d,h);return}if(!i.pivotValueColumn)return;const u=i.pivotValueColumn.getColId();d.has(u)?d.get(u).push(i.colId):d.set(u,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const r=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(d=>d.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const s=o[0];t.forEach(d=>{this.recursivelyAddPivotTotal(d,e,s,r)})}recursivelyAddPivotTotal(t,e,r,o){const i=t;if(!i.children){const d=t;return d.colId?[d.colId]:null}let s=[];if(i.children.forEach(d=>{const u=this.recursivelyAddPivotTotal(d,e,r,o);u&&(s=s.concat(u))}),i.children.length>1){const u=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(r,u,t.pivotKeys,!0);p.pivotTotalColumnIds=s,p.aggFunc=r.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const h=t.children;o?h.push(p):h.unshift(p),e.push(p)}return s}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const r=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();r||i.reverse();const s=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let d=0;d<i.length;d++){const u=i[d],p=this.columnNameService.getDisplayNameForColumn(u,"header"),h=this.createColDef(u,p,[]),f=[];for(let S=0;S<e.length;S++){const k=e[S];k.pivotValueColumn===u&&f.push(k.colId)}h.pivotTotalColumnIds=f,h.colId=Gd+h.colId;const y=s?{children:[h],pivotKeys:[],groupId:`${Gd}_pivotGroup_${u.getColId()}`}:h;e.push(h),r?t.push(y):t.unshift(y)}}createColDef(t,e,r,o=!1){const i={};if(t){const s=t.getColDef();Object.assign(i,s),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(r||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=s=>{var d;return(d=s.data)==null?void 0:d[s.colDef.field]},i.pivotKeys=r,i.pivotValueColumn=t,i.filter===!0&&(i.filter="agNumberColumnFilter"),i}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,r){return t?t(e.headerName,r.headerName):e.headerName&&!r.headerName?1:!e.headerName&&r.headerName?-1:!e.headerName||!r.headerName?0:e.headerName<r.headerName?-1:e.headerName>r.headerName?1:0}merge(t,e){e.forEach((r,o)=>{const s=[...t.has(o)?t.get(o):[],...r];t.set(o,s)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(r=>r.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let i=0;i<t.length;i++){const d=t[i].split(this.fieldSeparator);let u=e;for(let p=0;p<d.length;p++){const h=d[p];u[h]==null&&(u[h]={}),u=u[h]}}const r=(i,s,d,u)=>{const p=[];for(const y in d){const S=d[y],k=r(`${i}${this.fieldSeparator}${y}`,y,S,u+1);p.push(k)}if(p.length===0){const y=this.columnModel.getColDefCol(s);if(y){const k=this.columnNameService.getDisplayNameForColumn(y,"header")??s,D=this.createColDef(y,k,void 0,!1);return D.colId=i,D.aggFunc=y.getAggFunc(),D.valueGetter=E=>{var A;return(A=E.data)==null?void 0:A[i]},D}return{colId:i,headerName:s,valueGetter:k=>{var D;return(D=k.data)==null?void 0:D[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=s,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||u<this.pivotDefaultExpanded,groupId:i,headerName:s,children:p}},o=[];for(const i in e){const s=e[i],d=r(i,i,s,0);o.push(d)}return o}},jd="Exceeded maximum allowed pivot column count.",Bv=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,r=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=r===-1?-1:r/e;let o;try{o=this.bucketUpRowNodes(t)}catch(w){if(w.message===jd){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:w.message}),this.lastTimeFailed=!0;return}throw w}const i=this.setUniqueValues(o),s=this.funcColsService.getValueColumns(),d=s.map(w=>`${w.getId()}-${w.getColDef().headerName}`).join("#"),u=s.map(w=>w.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==d,h=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=d,this.aggregationFuncsHashLastTime=u;const f=this.funcColsService.getRowGroupColumns().map(w=>w.getId()).join("#"),y=f!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=f;const S=this.gos.get("pivotRowTotals"),k=this.gos.get("pivotColumnGroupTotals"),D=this.gos.get("suppressExpandablePivotGroups"),E=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),A=S!==this.pivotRowTotalsLastTime||k!==this.pivotColumnGroupTotalsLastTime||D!==this.suppressExpandablePivotGroupsLastTime||E!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=S,this.pivotColumnGroupTotalsLastTime=k,this.suppressExpandablePivotGroupsLastTime=D,this.removePivotHeaderRowWhenSingleValueColumnLastTime=E,this.lastTimeFailed||i||p||y||h||A){const{pivotColumnGroupDefs:w,pivotColumnDefs:L}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=L,this.pivotResultColsService.setPivotResultCols(w,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),r=JSON.stringify(this.uniqueValues);return e!==r?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(o=>{o.leafGroup&&(o.childrenMapped=null)});const r=o=>{var i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.forEach(r)};return t.executeFromRootNode(r),e}bucketRowNode(t,e){const r=this.funcColsService.getPivotColumns();r.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,r,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,r,o){const i={},s=e[r];if(t.forEach(d=>{let u=this.valueService.getKeyForNode(s,d);if(C._missing(u)&&(u=""),!o[u]){this.currentUniqueCount+=1,o[u]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(jd)}i[u]||(i[u]=[]),i[u].push(d)}),r===e.length-1)return i;{const d={};return C._iterateObject(i,(u,p)=>{d[u]=this.bucketChildren(p,e,r+1,o[u])}),d}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Pv(t,e,r){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:r})}function Dv(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Vv(t){t.aggFuncService&&t.aggFuncService.clear()}function Lv(t,e,r){t.funcColsService.setColumnAggFunc(e,r,"api")}function Iv(t){return t.columnModel.isPivotMode()}function Fv(t,e,r){return t.pivotResultColsService.lookupPivotResultCol(e,r)}function Rv(t,e){t.funcColsService.setValueColumns(e,"api")}function Ov(t){return t.funcColsService.getValueColumns()}function zv(t,e){t.funcColsService.removeValueColumns([e],"api")}function Gv(t,e){t.funcColsService.removeValueColumns(e,"api")}function jv(t,e){t.funcColsService.addValueColumns([e],"api")}function Uv(t,e){t.funcColsService.addValueColumns(e,"api")}function Zv(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function $v(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function Wv(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function Hv(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function qv(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function Kv(t,e,r){t.funcColsService.moveRowGroupColumn(e,r,"api")}function Yv(t){return t.funcColsService.getRowGroupColumns()}function Jv(t,e){t.funcColsService.setPivotColumns(e,"api")}function Qv(t,e){t.funcColsService.removePivotColumns([e],"api")}function Xv(t,e){t.funcColsService.removePivotColumns(e,"api")}function ey(t,e){t.funcColsService.addPivotColumns([e],"api")}function ty(t,e){t.funcColsService.addPivotColumns(e,"api")}function ry(t){return t.funcColsService.getPivotColumns()}function ny(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function oy(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var ay=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const r=t.getColDef().showRowGroup,o=typeof r=="string";!o&&!(r===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[r]=t:this.funcColsService.getRowGroupColumns().forEach(d=>{this.showRowGroupColsMap[d.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},Jo="32.3.2",ql=C._defineModule({version:Jo,moduleName:`${C.ModuleNames.RowGroupingModule}-core`,beans:[dv,vv,Av,Mv,Bv,rv,uv,ay,mv],userComponents:[{name:"agGroupRowRenderer",classImp:Le.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Le.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Le.GroupCellRendererCtrl}],dependantModules:[Le.EnterpriseCoreModule]}),iy=C._defineModule({version:Jo,moduleName:`${C.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Pv,addAggFuncs:Dv,clearAggFuncs:Vv,setColumnAggFunc:Lv,isPivotMode:Iv,getPivotResultColumn:Fv,setValueColumns:Rv,getValueColumns:Ov,removeValueColumn:zv,removeValueColumns:Gv,addValueColumn:jv,addValueColumns:Uv,setRowGroupColumns:Zv,removeRowGroupColumn:$v,removeRowGroupColumns:Wv,addRowGroupColumn:Hv,addRowGroupColumns:qv,getRowGroupColumns:Yv,moveRowGroupColumn:Kv,setPivotColumns:Jv,removePivotColumn:Qv,removePivotColumns:Xv,addPivotColumn:ey,addPivotColumns:ty,getPivotColumns:ry,setPivotResultColumns:ny,getPivotResultColumns:oy},dependantModules:[ql]}),Ud=C._defineModule({version:Jo,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:yv}],dependantModules:[ql,C._ColumnFilterModule]}),ly=C._defineModule({version:Jo,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:bv}],dependantModules:[Ud,C._FloatingFilterModule]}),sy=C._defineModule({version:Jo,moduleName:C.ModuleNames.RowGroupingModule,dependantModules:[ql,iy,Ud,ly]}),Zd=class extends Zl{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),r=t("values","Values");super.init({icon:C._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:r}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},$d=300,cy=class extends C.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
24
+ `),this.eFloatingFilter=b.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new b.AgPromise(n=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var n;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(n=this.eFloatingFilterText)==null||n.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new b.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,b._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{var i,s;this.underlyingFloatingFilter=n,(s=this.underlyingFloatingFilter)==null||s.onParentModelChanged((i=this.parentFilterInstance.getSelectedFilter())==null?void 0:i.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),b.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,i,s;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((n=this.underlyingFloatingFilter)!=null&&n.refresh?this.underlyingFloatingFilter.refresh(e.params):(s=(i=this.underlyingFloatingFilter)==null?void 0:i.onParamsUpdated)==null||s.call(i,e.params))}onParentModelChanged(t,e){var n,i;this.showingUnderlyingFloatingFilter?(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((n=this.parentFilterInstance.getSelectedFilter())==null?void 0:n.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},$a=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var i;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(s=>!e.removeFromChildrenAfterGroup[s.id]),t.allLeafChildren=((i=t.allLeafChildren)==null?void 0:i.filter(s=>!e.removeFromAllLeafChildren[s.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function ey(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let i=1;i<e;i++)if(Ed(t[i-1],t[i])>0){n=!0;break}return n?(t.sort(Ed),!0):!1}function Ed(t,e){const n=t.sourceRowIndex,i=e.sourceRowIndex,s=n>=0,l=i>=0,d=s&&l,u=!s&&!l;return d?n-i:u?t.__objectId-e.__objectId:s?1:-1}var ty=class extends b.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const n=[],i=[];let s;e.childrenAfterGroup.forEach(l=>{var d;(d=l.childrenAfterGroup)!=null&&d.length?l.key===""&&!s?s=l:i.push(l):n.push(l)}),s&&i.push(s),e.childrenAfterGroup=[...n,...i]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:i,rowNodesOrderChanged:s}=t,l=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(l==null?void 0:l.length)??0,transactions:i,rowNodesOrderChanged:!!s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(l==null?void 0:l.map(u=>u.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new $a;b._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),b._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),b._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const i=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(i,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{ey(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;b._exists(e)&&n(t.rootNode);function n(i){b._exists(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((l,d)=>e({nodeA:l,nodeB:d})),i.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let i=t.parent;for(;i&&i!==e.rootNode;)n.push({key:i.key,rowGroupColumn:i.rowGroupColumn,field:i.field}),i=i.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(i=>{e.changedPath.isActive()&&e.changedPath.addParentNode(i.parent);const s=h=>h.key,l=this.getExistingPathForNode(i,e).map(s),d=this.getGroupInfo(i,e).map(s);b._areEqual(l,d)||this.moveNode(i,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){const i=t.parent;e.changedPath.addParentNode(i)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(i=>e.changedPath.addParentNode(i.parent))}forEachParentGroup(t,e,n){let i=e;for(;i&&i!==t.rootNode;)n(i),i=i.parent}removeNodesFromParents(t,e,n){const i=n==null,s=n||new $a;t.forEach(l=>{this.removeFromParent(l,s),this.forEachParentGroup(e,l.parent,d=>{s.removeFromAllLeafChildren(d,l)})}),i&&s.flush()}removeEmptyGroups(t,e){let n=!0;const i=s=>{var h;const l=this.getChildrenMappedKey(s.key,s.rowGroupColumn),d=s.parent;return(d!=null&&d.childrenMapped?!d.childrenMapped[l]:!0)?!1:!!s.group&&(((h=s.childrenAfterGroup)==null?void 0:h.length)??0)===0};for(;n;){n=!1;const s=new $a;t.forEach(l=>{this.forEachParentGroup(e,l,d=>{i(d)&&(n=!0,this.removeFromParent(d,s),d.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(t,e){var i;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(b._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(i=t.parent)!=null&&i.childrenMapped&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:b._areEqual(t.groupedCols,e.groupedCols)&&b._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(i=>{var d;if(!i.group)return;const l={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:(d=i.allLeafChildren)==null?void 0:d[0]};this.setGroupData(i,l,t),e(i.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(l=>l&&!l.group);const{groupedCols:n}=t,i=t.rootNode;i.leafGroup=n.length===0,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const s=i.sibling;s&&(s.childrenAfterGroup=i.childrenAfterGroup,s.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const i=this.showRowGroupColsService.getShowRowGroupCols(),s=i?i.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=s,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const i=this.getGroupInfo(t,e),s=this.findParentForNode(t,i,e,n);s.group||b._warnOnce("duplicate group keys for row data, keys should be unique",[s.data,t.data]),t.parent=s,t.level=i.length,s.childrenAfterGroup.push(t),s.updateHasChildren()}findParentForNode(t,e,n,i){let s=n.rootNode;return e.forEach((l,d)=>{s=this.getOrCreateNextNode(s,l,d,n),i!=null&&i.isRemoveFromAllLeafChildren(s,t)?i==null||i.preventRemoveFromAllLeafChildren(s,t):s.allLeafChildren.push(t)}),s}getOrCreateNextNode(t,e,n,i){var d;const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(d=t==null?void 0:t.childrenMapped)==null?void 0:d[s];return l||(l=this.createGroup(e,t,n,i),this.addToParent(l,t)),l}createGroup(t,e,n,i){const s=new b.RowNode(this.beans);return s.group=!0,s.field=t.field,s.rowGroupColumn=t.rowGroupColumn,this.setGroupData(s,t,i),s.key=t.key,s.id=this.createGroupId(s,e,n),s.level=n,s.leafGroup=n===i.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=n,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=e,this.setExpandedInitialValue(i,s),s}createGroupId(t,e,n){const i=(s,l)=>{if(!s.rowGroupColumn)return null;const d=l?i(l,l.parent):null;return`${d==null?"":d+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return b.RowNode.ID_PREFIX_ROW_GROUP+i(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{const l=t.rowGroupColumn;l!==null&&s.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[s.getColId()]=e.key:t.groupData[s.getColId()]=this.valueService.getValue(l,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const n=t.isGroupOpenByDefault;if(n){const i={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(i)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const n=[];return e.groupedCols.forEach(i=>{let s=this.valueService.getKeyForNode(i,t),l=s!=null&&s!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(s="",l=!0),l){const u={key:s,field:i.getColDef().field,rowGroupColumn:i,leafNode:t};n.push(u)}}),n}},ny=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,lt=Object.freeze([]),ry=lt.values(),os=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},iy=class Gf{constructor(e,n,i){this.parent=e,this.key=n,this.level=i,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=lt,this.allLeafChildren=lt,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,n;return!((e=this.row)!=null&&e.data)&&!((n=this.children)!=null&&n.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??ry}upsertKey(e){var i,s;typeof e!="string"&&(e=String(e));let n=(i=this.children)==null?void 0:i.get(e);return n||(n=new Gf(this,e,this.level+1),(s=this.children??(this.children=new Map))==null||s.set(n.key,n)),n}destroy(){var i;const{row:e,parent:n}=this;n!==null&&((i=n==null?void 0:n.children)==null||i.delete(this.key),e!==null&&os(e,!0),this.parent=null)}setRow(e){const{level:n,row:i,childrenAfterGroup:s}=this;if(n<0)i!==null&&i!==e&&os(i,!0);else{if(i===e)return!1;i!==null?(e.allLeafChildren=i.allLeafChildren??this.allLeafChildren??lt,os(i,!1)):e.allLeafChildren=this.allLeafChildren??lt}return e.level=n,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:i,duplicateRows:s,childrenAfterGroup:l}=this;if(i===e){const d=this.popDuplicateRow();d?(this.row=d,d.childrenAfterGroup=l,n>=0&&(d.allLeafChildren=i.allLeafChildren??this.allLeafChildren??lt)):this.row=null}else{if(!(s!=null&&s.delete(e)))return!1;s.size===0&&(this.duplicateRows=null)}return os(e,n<0),!0}addDuplicateRow(e){const{level:n}=this;let i=this.duplicateRows;if(i===null)i=new Set,this.duplicateRows=i;else if(i.has(e))return!1;return i.add(e),e.treeNode=this,e.level=n,n>=0&&(e.allLeafChildren=lt),e.childrenAfterGroup=lt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let i=n;for(const s of e)s.sourceRowIndex<i.sourceRowIndex&&(i=s);return i!==n&&(i.childrenAfterGroup=this.childrenAfterGroup,i.allLeafChildren=n.allLeafChildren??this.allLeafChildren??lt,n.childrenAfterGroup=lt,n.allLeafChildren=lt,e.delete(i),e.add(n),this.row=i),i}popDuplicateRow(){let e=null;const n=this.duplicateRows;return n!==null&&(e=n.values().next().value,e!==null&&n.delete(e)&&n.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,n=this.parent;for(;n!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=n.invalidatedHead,n.invalidatedHead=e,e=n,n=e.parent}invalidateOrder(){var n,i;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((i=e.row)!=null&&i.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,i;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((i=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:i.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var u;this.childrenChanged=!1;const e=((u=this.children)==null?void 0:u.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=lt,this.row.childrenAfterGroup=lt,!0);let n=!1,i=this.childrenAfterGroup;i===lt?(i=new Array(e),this.childrenAfterGroup=i,this.row.childrenAfterGroup=i,n=!0):i.length!==e&&(i.length=e,n=!0);let s=0,l=-1,d=!1;for(const h of this.enumChildren()){const f=h.getRowPosition();f<l&&(d=!0),l=f,h.oldSourceRowIndex=f;const m=h.row;i[s]!==m&&(i[s]=m,n=!0),++s}return n&&(this.leafChildrenChanged=!0),d&&this.reorderChildrenList(i),n||d}reorderChildrenList(e){const n=e.length,i=this.children;e.sort(ny),i.clear();for(let s=0;s<n;++s){const l=e[s].treeNode;i.set(l.key,l)}}updateAllLeafChildren(){var d,u;const{parent:e,row:n,childrenAfterGroup:i}=this;this.leafChildrenChanged=!1;let s=!1;const l=i.length;if(l===0)s=((d=n.allLeafChildren)==null?void 0:d.length)!==0,n.allLeafChildren=lt,this.allLeafChildren=lt;else if(l===1&&((u=i[0].allLeafChildren)!=null&&u.length))n.allLeafChildren=i[0].allLeafChildren,this.allLeafChildren=null,s=!0;else{let h=this.allLeafChildren;(h===lt||h===null)&&(h=[],this.allLeafChildren=h);const f=h.length;let m=0;for(let v=0;v<l;++v){const S=i[v],k=S.allLeafChildren,D=k.length;if(D)for(let T=0;T<D;++T){const B=k[T];(m>=f||h[m]!==B)&&(h[m]=B,s=!0),++m}else(m>=f||h[m]!==S)&&S&&(h[m]=S,s=!0),++m}f!==m&&(h.length=m,s=!0),n.allLeafChildren!==h&&(n.allLeafChildren=h,s=!0)}s&&e&&(e.leafChildrenChanged=!0)}},Td=t=>(t.treeNodeFlags&1)!==0,Ad=t=>(t.treeNodeFlags&2)!==0,Bd=t=>(t.treeNodeFlags&4)!==0,oy=t=>(t.treeNodeFlags&8)!==0,Pd=t=>(t.treeNodeFlags&16)!==0,Vd=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},sy=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},ay=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},tr=t=>{t.treeNodeFlags|=16},Nd=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},ji=t=>{t.treeNodeFlags=0},ly=class extends b.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new iy(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),ji(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:i}=t,s=t.rowNode,l=this.gos,d={changedPath:i,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.getCallback("initialGroupOrderComparator")};this.root.setRow(s),s.leafGroup=!1;const h=s.sibling;h&&(h.childrenAfterGroup=s.childrenAfterGroup,h.childrenMapped=s.childrenMapped),e?this.handleTransaction(d,e,n):this.handleRowData(d,s,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var s,l,d;const i=this.root;if(n||this.oldGroupDisplayColIds===void 0){const u=((l=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols())==null?void 0:l.map(h=>h.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==u&&this.checkAllGroupDataAfterColsChanged((d=i.row)==null?void 0:d.childrenAfterGroup);return}this.oldGroupDisplayColIds=u}this.clearTree(i),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:i,update:s,add:l}of e)this.removeRows(i),this.addOrUpdateRows(t,s,!0),this.addOrUpdateRows(t,l,!1);n&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let n=0,i=t.length;n<i;++n){const s=t[n].treeNode;s&&s.oldSourceRowIndex!==n&&s.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,i=(t==null?void 0:t.length)??0;n<i;++n){const s=t[n];this.setGroupData(s,((e=s.treeNode)==null?void 0:e.key)??s.key),this.checkAllGroupDataAfterColsChanged(s.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let i=0,s=(e==null?void 0:e.length)??0;i<s;++i){const l=e[i],d=this.upsertPath(this.getDataPath(t,l));d&&this.addOrUpdateRow(d,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const i=t[e],s=i.treeNode;s!==null&&this.removeRow(s,i)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||lt;return n.length||b._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let i=0;i<=n;++i){const s=e.upsertKey(t[i]);if(i>=n)return s.invalidate(),s;e=s}return null}addOrUpdateRow(t,e,n){var d;const{level:i,row:s}=t;if(i<0)return;let l=!1;if(s!==e){const u=e.treeNode;u!==null&&u!==t&&(u.removeRow(e),u.invalidate()),s===null?(t.setRow(e),l=!0):s.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(s,!0),l=!0)}n&&!Bd(e)&&(sy(e),l=!0),l&&t.invalidate(),(d=this.rowsPendingDestruction)==null||d.delete(e)}removeRow(t,e){const{parent:n,level:i}=t;if(i<0)return;let s=!1;t.removeRow(e)&&(s=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),s&&t.invalidate()}commitTree(t){var i;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&tr(n),n.updateHasChildren(),Pd(n)&&(i=t.changedPath)!=null&&i.isActive()&&t.changedPath.addParentNode(n),Nd(n),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const n=e.dequeueInvalidated();if(n===null)break;n.parent===e&&this.commitChild(t,e,n)}}commitChild(t,e,n){if(n.isEmptyFillerNode()){this.clearTree(n);return}this.commitNodePreOrder(e,n),this.commitInvalidatedChildren(t,n),this.commitNodePostOrder(t,e,n)}commitNodePreOrder(t,e){let n=e.row;if(n===null?(n=this.createFillerRow(e),e.setRow(n)):(n=e.sortFirstDuplicateRow(),n.allChildrenCount===void 0&&(n.allChildrenCount=null)),n.parent=t.row,e.oldRow!==n)for(const s of e.enumChildren()){const l=s.row;l!==null&&(l.parent=n)}const i=e.key;n.key!==i?(n.key=i,ay(n),this.setGroupData(n,i)):n.groupData||this.setGroupData(n,i)}commitNodePostOrder(t,e,n){var f,m,v;const i=n.row,s=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&tr(i),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const d=!!((f=i.childrenAfterGroup)!=null&&f.length),u=d||!i.data,h=i.group;h!==u?(tr(i),i.setGroup(u),!u&&!i.expanded&&Vd(i,!1)):i.hasChildren()!==d&&(tr(i),i.updateHasChildren()),i.group&&!Ad(i)&&(s!==i&&s!==null&&s.group&&Ad(s)&&!t.isGroupOpenByDefault?i.expanded=s.expanded:i.expanded=this.getExpandedInitialValue(t,i),Vd(i,!0)),Bd(i)&&(tr(e.row),oy(i)&&i.setData(i.data)),s!==i&&(n.oldRow=i,s!==null&&(h||n.hasChildren())&&tr(i),e.childrenChanged=!0,tr(e.row)),Pd(i)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(i):Td(i)||(i.childrenAfterFilter||(i.childrenAfterFilter=i.childrenAfterGroup.slice()),i.childrenAfterAggFilter||(i.childrenAfterAggFilter=i.childrenAfterFilter.slice()),i.childrenAfterSort||(i.childrenAfterSort=i.childrenAfterAggFilter.slice())),Nd(i),(v=n.duplicateRows)!=null&&v.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,b._warnOnce("duplicate group keys for row data, keys should be unique",[i.id,i.data,...Array.from(n.duplicateRows).map(S=>S.data)]))}createFillerRow(t){const e=new b.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let n=t.level+"-"+t.key,i=t.parent;for(;i!==null;){const s=i.parent;if(s===null)break;n=`${i.level}-${i.key}-${n}`,i=s}return e.id=b.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var s;const n={};t.groupData=n;const i=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols();if(i)for(const l of i)n[l.getColId()]=e}getExpandedInitialValue(t,e){const n=t.isGroupOpenByDefault;return n?n({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:n,row:i,level:s}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&tr(e.row)),i!==null&&s>=0){let l=t.row;for(;l!==null&&t.removeRow(l);)this.destroyRow(l,!l.data),l=t.row}for(const l of t.enumChildren())this.clearTree(l);t.destroy()}destroyTree(t){const{row:e,level:n,duplicateRows:i}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):ji(e)),i)for(const s of i)n>=0&&!s.data?this.destroyRow(s,!0):ji(s);for(const s of t.enumChildren())this.destroyTree(s);t.destroy()}destroyRow(t,e){if(!Td(t)){ji(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}ji(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},cy=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?ly:ty;let n=this.strategy;(n==null?void 0:n.constructor)!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Dd="PivotRowTotal_",dy=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function n(l,d=[]){return l.forEach(u=>{u.children!==void 0?n(u.children,d):d.push(u)}),d}const i=n(e);this.addRowGroupTotals(e,i),this.addExpandablePivotGroups(e,i),this.addPivotTotalsToGroups(e,i);const s=i.map(l=>b._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,i,s){const l=this.funcColsService.getValueColumns();if(t>=i)return this.buildMeasureCols(n);const d=s[t].getColDef(),u=this.headerNameComparator.bind(this,d.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===i-1){const f=[];return b._iterateObject(e,m=>{const v=[...n,m],S=this.createColDef(l[0],m,v);S.columnGroupShow="open",f.push(S)}),f.sort(u),f}const h=[];return b._iterateObject(e,(f,m)=>{const v=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,S=[...n,f];h.push({children:this.recursivelyBuildGroup(t+1,m,S,i,s),headerName:f,pivotKeys:S,columnGroupShow:"open",openByDefault:v,groupId:this.generateColumnGroupId(S)})}),h.sort(u),h}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const i=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,i,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const i=(s,l,d)=>{if("children"in s){const f=new Map;s.children.forEach(v=>{i(v,l,f)});const m=!s.children.some(v=>v.children);this.funcColsService.getValueColumns().forEach(v=>{const S=this.columnNameService.getDisplayNameForColumn(v,"header"),k=this.createColDef(v,S,s.pivotKeys);k.pivotTotalColumnIds=f.get(v.getColId()),k.columnGroupShow=n?"open":"closed",k.aggFunc=v.getAggFunc(),m||(s.children.push(k),l.push(k))}),this.merge(d,f);return}if(!s.pivotValueColumn)return;const u=s.pivotValueColumn.getColId();d.has(u)?d.get(u).push(s.colId):d.set(u,[s.colId])};t.forEach(s=>{i(s,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",i=this.funcColsService.getValueColumns(),s=i.map(d=>d.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const l=i[0];t.forEach(d=>{this.recursivelyAddPivotTotal(d,e,l,n)})}recursivelyAddPivotTotal(t,e,n,i){const s=t;if(!s.children){const d=t;return d.colId?[d.colId]:null}let l=[];if(s.children.forEach(d=>{const u=this.recursivelyAddPivotTotal(d,e,n,i);u&&(l=l.concat(u))}),s.children.length>1){const u=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),h=this.createColDef(n,u,t.pivotKeys,!0);h.pivotTotalColumnIds=l,h.aggFunc=n.getAggFunc(),h.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const f=t.children;i?f.push(h):f.unshift(h),e.push(h)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",s=this.funcColsService.getValueColumns().slice();n||s.reverse();const l=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let d=0;d<s.length;d++){const u=s[d],h=this.columnNameService.getDisplayNameForColumn(u,"header"),f=this.createColDef(u,h,[]),m=[];for(let S=0;S<e.length;S++){const k=e[S];k.pivotValueColumn===u&&m.push(k.colId)}f.pivotTotalColumnIds=m,f.colId=Dd+f.colId;const v=l?{children:[f],pivotKeys:[],groupId:`${Dd}_pivotGroup_${u.getColId()}`}:f;e.push(f),n?t.push(v):t.unshift(v)}}createColDef(t,e,n,i=!1){const s={};if(t){const l=t.getColDef();Object.assign(s,l),s.hide=!1}return s.headerName=e,s.colId=this.generateColumnId(n||[],t&&!i?t.getColId():""),s.field=s.colId,s.valueGetter=l=>{var d;return(d=l.data)==null?void 0:d[l.colDef.field]},s.pivotKeys=n,s.pivotValueColumn=t,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,i)=>{const l=[...t.has(i)?t.get(i):[],...n];t.set(i,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(i=>i.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let s=0;s<t.length;s++){const d=t[s].split(this.fieldSeparator);let u=e;for(let h=0;h<d.length;h++){const f=d[h];u[f]==null&&(u[f]={}),u=u[f]}}const n=(s,l,d,u)=>{const h=[];for(const v in d){const S=d[v],k=n(`${s}${this.fieldSeparator}${v}`,v,S,u+1);h.push(k)}if(h.length===0){const v=this.columnModel.getColDefCol(l);if(v){const k=this.columnNameService.getDisplayNameForColumn(v,"header")??l,D=this.createColDef(v,k,void 0,!1);return D.colId=s,D.aggFunc=v.getAggFunc(),D.valueGetter=T=>{var B;return(B=T.data)==null?void 0:B[s]},D}return{colId:s,headerName:l,valueGetter:k=>{var D;return(D=k.data)==null?void 0:D[s]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&h.length===1&&"colId"in h[0]?(h[0].headerName=l,h[0]):{openByDefault:this.pivotDefaultExpanded===-1||u<this.pivotDefaultExpanded,groupId:s,headerName:l,children:h}},i=[];for(const s in e){const l=e[s],d=n(s,s,l,0);i.push(d)}return i}},Fd="Exceeded maximum allowed pivot column count.",uy=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let i;try{i=this.bucketUpRowNodes(t)}catch(C){if(C.message===Fd){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:C.message}),this.lastTimeFailed=!0;return}throw C}const s=this.setUniqueValues(i),l=this.funcColsService.getValueColumns(),d=l.map(C=>`${C.getId()}-${C.getColDef().headerName}`).join("#"),u=l.map(C=>C.getAggFunc().toString()).join("#"),h=this.aggregationColumnsHashLastTime!==d,f=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=d,this.aggregationFuncsHashLastTime=u;const m=this.funcColsService.getRowGroupColumns().map(C=>C.getId()).join("#"),v=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const S=this.gos.get("pivotRowTotals"),k=this.gos.get("pivotColumnGroupTotals"),D=this.gos.get("suppressExpandablePivotGroups"),T=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),B=S!==this.pivotRowTotalsLastTime||k!==this.pivotColumnGroupTotalsLastTime||D!==this.suppressExpandablePivotGroupsLastTime||T!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=S,this.pivotColumnGroupTotalsLastTime=k,this.suppressExpandablePivotGroupsLastTime=D,this.removePivotHeaderRowWhenSingleValueColumnLastTime=T,this.lastTimeFailed||s||h||v||f||B){const{pivotColumnGroupDefs:C,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(C,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(i=>{i.leafGroup&&(i.childrenMapped=null)});const n=i=>{var s;i.leafGroup?this.bucketRowNode(i,e):(s=i.childrenAfterFilter)==null||s.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){const n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,i){const s={},l=e[n];if(t.forEach(d=>{let u=this.valueService.getKeyForNode(l,d);if(b._missing(u)&&(u=""),!i[u]){this.currentUniqueCount+=1,i[u]={};const h=this.maxUniqueValues!==-1,f=this.currentUniqueCount>this.maxUniqueValues;if(h&&f)throw Error(Fd)}s[u]||(s[u]=[]),s[u].push(d)}),n===e.length-1)return s;{const d={};return b._iterateObject(s,(u,h)=>{d[u]=this.bucketChildren(h,e,n+1,i[u])}),d}}getPivotColumnDefs(){return this.pivotColumnDefs}};function hy(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function py(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function fy(t){t.aggFuncService&&t.aggFuncService.clear()}function my(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function gy(t){return t.columnModel.isPivotMode()}function yy(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function vy(t,e){t.funcColsService.setValueColumns(e,"api")}function _y(t){return t.funcColsService.getValueColumns()}function Cy(t,e){t.funcColsService.removeValueColumns([e],"api")}function wy(t,e){t.funcColsService.removeValueColumns(e,"api")}function by(t,e){t.funcColsService.addValueColumns([e],"api")}function xy(t,e){t.funcColsService.addValueColumns(e,"api")}function ky(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function Sy(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function Ey(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function Ty(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function Ay(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function By(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function Py(t){return t.funcColsService.getRowGroupColumns()}function Vy(t,e){t.funcColsService.setPivotColumns(e,"api")}function Ny(t,e){t.funcColsService.removePivotColumns([e],"api")}function Dy(t,e){t.funcColsService.removePivotColumns(e,"api")}function Fy(t,e){t.funcColsService.addPivotColumns([e],"api")}function Ry(t,e){t.funcColsService.addPivotColumns(e,"api")}function My(t){return t.funcColsService.getPivotColumns()}function Iy(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function Ly(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var Oy=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const n=t.getColDef().showRowGroup,i=typeof n=="string";!i&&!(n===!0)||(this.showRowGroupCols.push(t),i?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(d=>{this.showRowGroupColsMap[d.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},qi="32.3.3",Ua=b._defineModule({version:qi,moduleName:`${b.ModuleNames.RowGroupingModule}-core`,beans:[Ug,Jg,cy,dy,uy,Mg,Wg,Oy,Yg],userComponents:[{name:"agGroupRowRenderer",classImp:Re.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Re.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Re.GroupCellRendererCtrl}],dependantModules:[Re.EnterpriseCoreModule]}),Gy=b._defineModule({version:qi,moduleName:`${b.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:hy,addAggFuncs:py,clearAggFuncs:fy,setColumnAggFunc:my,isPivotMode:gy,getPivotResultColumn:yy,setValueColumns:vy,getValueColumns:_y,removeValueColumn:Cy,removeValueColumns:wy,addValueColumn:by,addValueColumns:xy,setRowGroupColumns:ky,removeRowGroupColumn:Sy,removeRowGroupColumns:Ey,addRowGroupColumn:Ty,addRowGroupColumns:Ay,getRowGroupColumns:Py,moveRowGroupColumn:By,setPivotColumns:Vy,removePivotColumn:Ny,removePivotColumns:Dy,addPivotColumn:Fy,addPivotColumns:Ry,getPivotColumns:My,setPivotResultColumns:Iy,getPivotResultColumns:Ly},dependantModules:[Ua]}),Rd=b._defineModule({version:qi,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Xg}],dependantModules:[Ua,b._ColumnFilterModule]}),zy=b._defineModule({version:qi,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Qg}],dependantModules:[Rd,b._FloatingFilterModule]}),Zy=b._defineModule({version:qi,moduleName:b.ModuleNames.RowGroupingModule,dependantModules:[Ua,Gy,Rd,zy]}),Md=class extends Ga{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:b._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},Id=300,$y=class extends b.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
25
25
  <div data-ref="eExpand" class="ag-column-select-header-icon"></div>
26
26
  <ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
27
27
  <ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
28
- </div>`,[C.AgCheckboxSelector,C.AgInputTextFieldSelector]),this.eExpand=C.RefPlaceholder,this.eSelect=C.RefPlaceholder,this.eFilterTextField=C.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===C.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=C._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=C._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=C._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,r=!this.params.suppressColumnExpandAll,o=this.columnModel.isProvidedColGroupsPresent(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),C._setDisplayed(this.eFilterTextField.getGui(),t),C._setDisplayed(this.eSelect.getGui(),e),C._setDisplayed(this.eExpand,r&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=C._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},$d)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===C.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),$d)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,C._setDisplayed(this.eExpandChecked,this.expandState===0),C._setDisplayed(this.eExpandUnchecked,this.expandState===1),C._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},dy={selector:"AG-PRIMARY-COLS-HEADER",component:cy},Wd=class{constructor(t,e,r,o=!1,i){this.localEventService=new C.LocalEventService,this.displayName=t,this.dept=r,this.group=o,o?(this.columnGroup=e,this.expanded=i,this.children=[]):this.column=e}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(t){this.passesFilter=t}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}},Hd=class extends C.Component{constructor(t,e,r){super('<div class="ag-menu"></div>'),this.column=t,this.mouseEvent=e,this.parentEl=r,this.displayName=null}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),C.isColumn(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const t=this.getMappedMenuItems();if(t.length===0)return;this.displayContextMenu(t)}}initializeProperties(t){C.isProvidedColumnGroup(t)?this.columns=t.getLeafColumns():this.columns=[t],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${t("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${t("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>t("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>t("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>t("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>t("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(t){return[...t].concat(this.columns.filter(e=>t.indexOf(e)===-1))}removeColumnsFromList(t){return t.filter(e=>this.columns.indexOf(e)===-1)}displayContextMenu(t){const e=this.getGui(),r=this.createBean(new Le.AgMenuList),o=this.localeService.getLocaleTextFunc();let i=()=>{};e.appendChild(r.getGui()),r.addMenuItems(t),r.addManagedListeners(r,{closeMenu:()=>{this.parentEl.focus(),i()}});const s=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(r.getGui()),ariaLabel:o("ariaLabelContextMenu","Context Menu"),closedCallback:d=>{d instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(r)}});s&&(i=s.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:e})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const t=[];for(const e of this.menuItemMap.values()){const r=this.columns.some(i=>e.allowedFunction(i)&&!e.activeFunction(i)),o=this.columns.some(i=>e.allowedFunction(i)&&e.activeFunction(i));r&&t.push({name:e.activateLabel(this.displayName),icon:C._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),o&&t.push({name:e.deactivateLabel(this.displayName),icon:C._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},qd=class extends C.Component{constructor(t,e,r,o){super(),this.modelItem=t,this.allowDragging=e,this.eventType=r,this.focusWrapper=o,this.cbSelect=C.RefPlaceholder,this.eLabel=C.RefPlaceholder,this.eGroupOpenedIcon=C.RefPlaceholder,this.eGroupClosedIcon=C.RefPlaceholder,this.eColumnGroupIcons=C.RefPlaceholder,this.processingColumnStateChange=!1,this.modelItem=t,this.columnGroup=t.getColumnGroup(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName(),this.allowDragging=e}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group">
28
+ </div>`,[b.AgCheckboxSelector,b.AgInputTextFieldSelector]),this.eExpand=b.RefPlaceholder,this.eSelect=b.RefPlaceholder,this.eFilterTextField=b.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===b.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=b._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=b._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=b._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,i=this.columnModel.isProvidedColGroupsPresent(),s=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),b._setDisplayed(this.eFilterTextField.getGui(),t),b._setDisplayed(this.eSelect.getGui(),e),b._setDisplayed(this.eExpand,n&&i)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=b._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Id)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===b.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),Id)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,b._setDisplayed(this.eExpandChecked,this.expandState===0),b._setDisplayed(this.eExpandUnchecked,this.expandState===1),b._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},Uy={selector:"AG-PRIMARY-COLS-HEADER",component:$y},Ld=class{constructor(t,e,n,i=!1,s){this.localEventService=new b.LocalEventService,this.displayName=t,this.dept=n,this.group=i,i?(this.columnGroup=e,this.expanded=s,this.children=[]):this.column=e}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(t){this.passesFilter=t}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}},Od=class extends b.Component{constructor(t,e,n){super('<div class="ag-menu"></div>'),this.column=t,this.mouseEvent=e,this.parentEl=n,this.displayName=null}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),b.isColumn(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const t=this.getMappedMenuItems();if(t.length===0)return;this.displayContextMenu(t)}}initializeProperties(t){b.isProvidedColumnGroup(t)?this.columns=t.getLeafColumns():this.columns=[t],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${t("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${t("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>t("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>t("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>t("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>t("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(t){return[...t].concat(this.columns.filter(e=>t.indexOf(e)===-1))}removeColumnsFromList(t){return t.filter(e=>this.columns.indexOf(e)===-1)}displayContextMenu(t){const e=this.getGui(),n=this.createBean(new Re.AgMenuList),i=this.localeService.getLocaleTextFunc();let s=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),s()}});const l=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(n.getGui()),ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:d=>{d instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(n)}});l&&(s=l.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:e})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const t=[];for(const e of this.menuItemMap.values()){const n=this.columns.some(s=>e.allowedFunction(s)&&!e.activeFunction(s)),i=this.columns.some(s=>e.allowedFunction(s)&&e.activeFunction(s));n&&t.push({name:e.activateLabel(this.displayName),icon:b._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),i&&t.push({name:e.deactivateLabel(this.displayName),icon:b._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},Gd=class extends b.Component{constructor(t,e,n,i){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=i,this.cbSelect=b.RefPlaceholder,this.eLabel=b.RefPlaceholder,this.eGroupOpenedIcon=b.RefPlaceholder,this.eGroupClosedIcon=b.RefPlaceholder,this.eColumnGroupIcons=b.RefPlaceholder,this.processingColumnStateChange=!1,this.modelItem=t,this.columnGroup=t.getColumnGroup(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName(),this.allowDragging=e}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group">
29
29
  <span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
30
30
  <span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
31
31
  <span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
32
32
  </span>
33
33
  <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
34
34
  <span class="ag-column-select-column-label" data-ref="eLabel"></span>
35
- </div>`,[C.AgCheckboxSelector]),this.eDragHandle=C._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),C._getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(o=>this.addOrRemoveCssClass(o,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const t=this.columnGroup.getColGroupDef();if(!t)return;const e=this.gos.get("tooltipShowMode")==="whenTruncated";let r;e&&(r=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const o=()=>{const i=t.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:r})};o(),this.addManagedEventListeners({newColumnsLoaded:o})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case C.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case C.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case C.KeyCode.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){const{columnGroup:e,gos:r}=this;if(r.get("functionsReadOnly"))return;const o=this.createBean(new Hd(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}addVisibilityListenersToAllChildren(){const t=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListeners(e,{visibleChanged:t,columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t})})}setupDragging(){if(!this.allowDragging){C._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:C.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:r=>{t&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:r==null?void 0:r.visibleState,pivotState:r==null?void 0:r.pivotState,eventType:this.eventType})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.columnGroup.getLeafColumns(),e={},r={};return t.forEach(o=>{const i=o.getId();e[i]=o.isVisible(),r[i]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:r}}setupExpandContract(){this.eGroupClosedIcon.appendChild(C._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(C._createIcon("columnSelectOpen",this.gos,null));const t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t});const e=new C.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListeners(e,{tap:t}),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}getVisibleLeafColumns(){const t=[],e=r=>{r.forEach(o=>{o.isPassesFilter()&&(o.isGroup()?e(o.getChildren()):t.push(o.getColumn()))})};return e(this.modelItem.getChildren()),t}onChangeCommon(t){this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),t,this.eventType)}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnGroup","Column Group"),r=this.cbSelect.getValue(),o=r===void 0?t("ariaIndeterminate","indeterminate"):r?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");C._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${o})`),C._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const t=this.workOutSelectedValue(),e=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(t),this.cbSelect.setReadOnly(e),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",e),this.processingColumnStateChange=!1}workOutSelectedValue(){const t=this.columnModel.isPivotMode(),e=this.getVisibleLeafColumns();let r=0,o=0;if(e.forEach(i=>{!t&&i.getColDef().lockVisible||(this.isColumnChecked(i,t)?r++:o++)}),!(r>0&&o>0))return r>0}workOutReadOnlyValue(){const t=this.columnModel.isPivotMode();let e=0;return this.columnGroup.getLeafColumns().forEach(r=>{t?r.isAnyFunctionAllowed()&&e++:r.getColDef().lockVisible||e++}),e===0}isColumnChecked(t,e){if(e){const r=t.isPivotActive(),o=t.isRowGroupActive(),i=t.isValueActive();return r||o||i}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();C._setDisplayed(this.eGroupClosedIcon,!t),C._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){C._setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(t){const e=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(t&&!e||!t&&e)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(t){this.cbSelect.setValue(t,!0)}},uy=class extends C.BeanStub{constructor(t,e){super(),this.comp=t,this.virtualList=e}wireBeans(t){this.columnMoveService=t.columnMoveService,this.columnModel=t.columnModel}postConstruct(){this.createManagedBean(new Le.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:C.DragSourceType.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:t=>this.isMoveBlocked(t),getNumRows:t=>t.getDisplayedColsList().length,moveItem:(t,e)=>this.moveItem(this.getCurrentColumnsBeingMoved(t),e)}))}getCurrentDragValue(t){return t.column}getCurrentColumnsBeingMoved(t){return C.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(i=>{const s=i.getColDef();return!!s.suppressMovable||!!s.lockPosition})}moveItem(t,e){if(!e)return;const{component:r}=e;let o=null,i=e.position==="top";if(r instanceof qd?(o=r.getColumns()[0],i=!0):r&&(o=r.getColumn()),!o)return;const s=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:o,isBefore:i});s!=null&&this.columnMoveService.moveColumns(t,s,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:r,isBefore:o}=t;if(!r||!e)return null;const i=this.columnModel.getCols().indexOf(r),s=o?i:i+1,d=this.getMoveDiff(e,s);return s-d}getMoveDiff(t,e){const r=this.columnModel.getCols();if(!t)return 0;const o=t[0],i=t.length;return r.indexOf(o)<e?i:0}},py=class extends C.Component{constructor(t,e,r,o){super(),this.allowDragging=e,this.groupsExist=r,this.focusWrapper=o,this.eLabel=C.RefPlaceholder,this.cbSelect=C.RefPlaceholder,this.processingColumnStateChange=!1,this.column=t.getColumn(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName()}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column">
35
+ </div>`,[b.AgCheckboxSelector]),this.eDragHandle=b._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),b._getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(i=>this.addOrRemoveCssClass(i,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const t=this.columnGroup.getColGroupDef();if(!t)return;const e=this.gos.get("tooltipShowMode")==="whenTruncated";let n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const i=()=>{const s=t.headerTooltip;this.setTooltip({newTooltipText:s,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case b.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case b.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case b.KeyCode.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){const{columnGroup:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const i=this.createBean(new Od(e,t,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}addVisibilityListenersToAllChildren(){const t=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListeners(e,{visibleChanged:t,columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t})})}setupDragging(){if(!this.allowDragging){b._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:b.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:this.eventType})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.columnGroup.getLeafColumns(),e={},n={};return t.forEach(i=>{const s=i.getId();e[s]=i.isVisible(),n[s]=this.modelItemUtils.createPivotState(i)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(b._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(b._createIcon("columnSelectOpen",this.gos,null));const t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t});const e=new b.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListeners(e,{tap:t}),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}getVisibleLeafColumns(){const t=[],e=n=>{n.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?e(i.getChildren()):t.push(i.getColumn()))})};return e(this.modelItem.getChildren()),t}onChangeCommon(t){this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),t,this.eventType)}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),i=n===void 0?t("ariaIndeterminate","indeterminate"):n?t("ariaVisible","visible"):t("ariaHidden","hidden"),s=t("ariaToggleVisibility","Press SPACE to toggle visibility");b._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${s} (${i})`),b._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const t=this.workOutSelectedValue(),e=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(t),this.cbSelect.setReadOnly(e),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",e),this.processingColumnStateChange=!1}workOutSelectedValue(){const t=this.columnModel.isPivotMode(),e=this.getVisibleLeafColumns();let n=0,i=0;if(e.forEach(s=>{!t&&s.getColDef().lockVisible||(this.isColumnChecked(s,t)?n++:i++)}),!(n>0&&i>0))return n>0}workOutReadOnlyValue(){const t=this.columnModel.isPivotMode();let e=0;return this.columnGroup.getLeafColumns().forEach(n=>{t?n.isAnyFunctionAllowed()&&e++:n.getColDef().lockVisible||e++}),e===0}isColumnChecked(t,e){if(e){const n=t.isPivotActive(),i=t.isRowGroupActive(),s=t.isValueActive();return n||i||s}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();b._setDisplayed(this.eGroupClosedIcon,!t),b._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){b._setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(t){const e=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(t&&!e||!t&&e)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(t){this.cbSelect.setValue(t,!0)}},Wy=class extends b.BeanStub{constructor(t,e){super(),this.comp=t,this.virtualList=e}wireBeans(t){this.columnMoveService=t.columnMoveService,this.columnModel=t.columnModel}postConstruct(){this.createManagedBean(new Re.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:b.DragSourceType.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:t=>this.isMoveBlocked(t),getNumRows:t=>t.getDisplayedColsList().length,moveItem:(t,e)=>this.moveItem(this.getCurrentColumnsBeingMoved(t),e)}))}getCurrentDragValue(t){return t.column}getCurrentColumnsBeingMoved(t){return b.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(s=>{const l=s.getColDef();return!!l.suppressMovable||!!l.lockPosition})}moveItem(t,e){if(!e)return;const{component:n}=e;let i=null,s=e.position==="top";if(n instanceof Gd?(i=n.getColumns()[0],s=!0):n&&(i=n.getColumn()),!i)return;const l=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:i,isBefore:s});l!=null&&this.columnMoveService.moveColumns(t,l,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:n,isBefore:i}=t;if(!n||!e)return null;const s=this.columnModel.getCols().indexOf(n),l=i?s:s+1,d=this.getMoveDiff(e,l);return l-d}getMoveDiff(t,e){const n=this.columnModel.getCols();if(!t)return 0;const i=t[0],s=t.length;return n.indexOf(i)<e?s:0}},Hy=class extends b.Component{constructor(t,e,n,i){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=i,this.eLabel=b.RefPlaceholder,this.cbSelect=b.RefPlaceholder,this.processingColumnStateChange=!1,this.column=t.getColumn(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName()}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column">
36
36
  <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
37
37
  <span class="ag-column-select-column-label" data-ref="eLabel"></span>
38
- </div>`,[C.AgCheckboxSelector]),this.eDragHandle=C._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const r=C._escapeString(this.displayName);this.eLabel.innerHTML=r;const o=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${o}`),this.getGui().style.setProperty("--ag-indentation-level",String(o)),this.setupDragging();const i=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:i}),this.addManagedListeners(this.column,{columnValueChanged:i,columnPivotChanged:i,columnRowGroupChanged:i,visibleChanged:i}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),C._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(d=>this.addOrRemoveCssClass(d,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const r=()=>{const o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};r(),this.addManagedEventListeners({newColumnsLoaded:r})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:r}=this;if(r.get("functionsReadOnly"))return;const o=this.createBean(new Hd(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===C.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),r=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");C._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${r})`),C._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){C._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:C.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:r=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:r==null?void 0:r.visibleState,pivotState:r==null?void 0:r.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},r={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:r}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,r=!0;if(t){const o=this.gos.get("functionsReadOnly"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,r=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:s,suppressMovable:d,lockVisible:u}=this.column.getColDef(),p=!!o||!!i,h=!!s||!!d;e=!u,r=p||!h}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!r),this.addOrRemoveCssClass("ag-column-select-column-readonly",!r&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){C._warnOnce("can not expand a column item that does not represent a column group header")}},gy=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},hy="ag-column-select-list",fy=class extends C.Component{constructor(){super(`<div class="${hy}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,r){this.params=t,this.allowDragging=e,this.eventType=r,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const o=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:o,columnPivotModeChanged:o,columnRowGroupChanged:o,columnValueChanged:o,columnVisible:o,newColumnsLoaded:o}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Le.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,s)=>(C._setAriaLevel(s,i.getDept()+1),this.createComponentFromItem(i,s))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new uy(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new qd(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const r=new py(t,this.allowDragging,this.groupsExist,e);return this.createBean(r),r}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(r=>{t[r]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const r=e.getColumnGroup();r&&(t[r.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(r=>{if(!r.isGroup())return;const o=r.getColumnGroup();if(o){const i=t[o.getId()];(i!=null||e)&&r.setExpanded(!!i)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(r=>r&&typeof r.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),r=d=>{d.addEventListener("expandedChanged",e);const u=d.removeEventListener.bind(d,"expandedChanged",e);this.destroyColumnItemFuncs.push(u)},o=(d,u,p)=>{d.forEach(h=>{C.isProvidedColumnGroup(h)?i(h,u,p):s(h,u,p)})},i=(d,u,p)=>{const h=d.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(d.isPadding()){o(d.getChildren(),u,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,d,"columnToolPanel"),S=new Wd(y,d,u,!0,this.expandGroupsByDefault);p.push(S),r(S),o(d.getChildren(),u+1,S.getChildren())},s=(d,u,p)=>{if(d.getColDef()&&d.getColDef().suppressColumnsToolPanel)return;const f=this.columnNameService.getDisplayNameForColumn(d,"columnToolPanel");p.push(new Wd(f,d,u))};this.destroyColumnTree(),o(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=r=>{r.isPassesFilter()&&(this.displayedColsList.push(r),r.isGroup()&&r.isExpanded()&&r.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new gy(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),r=t("columns","Columns"),o=this.displayedColsList.length;C._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${r}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=r=>{r.forEach(o=>{t(o),o.isGroup()&&e(o.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const r=[];this.forEachItem(i=>{if(!i.isGroup())return;const s=i.getColumnGroup().getId();e.indexOf(s)>=0&&(i.setExpanded(t),r.push(s))});const o=e.filter(i=>!C._includes(r,i));o.length>0&&C._warnOnce("unable to find group(s) for supplied groupIds:",o)}getExpandState(){let t=0,e=0;return this.forEachItem(r=>{r.isGroup()&&(r.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const r=this.columnModel.isPivotMode();if(this.forEachItem(o=>{if(o.isGroup()||!o.isPassesFilter())return;const i=o.getColumn(),s=i.getColDef();let d;if(r){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;d=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(s.lockVisible)return;d=i.isVisible()}d?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=C._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=r=>{if(!C._exists(this.filterText))return!0;const o=r.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(r,o)=>{let i=!1;if(r.isGroup()){const d=t(r);r.getChildren().forEach(u=>{const p=e(u,d||o);p&&(i=p)})}const s=o||i?!0:t(r);return r.setPassesFilter(s),s};this.allColsTree.forEach(r=>e(r,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},my={selector:"AG-PRIMARY-COLS-LIST",component:fy},vy=class extends C.Component{constructor(){super(`<div class="ag-column-select">
38
+ </div>`,[b.AgCheckboxSelector]),this.eDragHandle=b._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const n=b._escapeString(this.displayName);this.eLabel.innerHTML=n;const i=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${i}`),this.getGui().style.setProperty("--ag-indentation-level",String(i)),this.setupDragging();const s=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:s}),this.addManagedListeners(this.column,{columnValueChanged:s,columnPivotChanged:s,columnRowGroupChanged:s,visibleChanged:s}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),b._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(d=>this.addOrRemoveCssClass(d,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const n=()=>{const i=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const i=this.createBean(new Od(e,t,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}handleKeyDown(t){t.key===b.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");b._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${n})`),b._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){b._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:b.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const i=this.column.isAnyFunctionActive();this.cbSelect.setValue(i)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const i=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();e=!i&&!s,n=e}else{const{enableRowGroup:i,enableValue:s,lockPosition:l,suppressMovable:d,lockVisible:u}=this.column.getColDef(),h=!!i||!!s,f=!!l||!!d;e=!u,n=h||!f}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){b._warnOnce("can not expand a column item that does not represent a column group header")}},jy=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},qy="ag-column-select-list",Ky=class extends b.Component{constructor(){super(`<div class="${qy}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const i=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:i,columnPivotModeChanged:i,columnRowGroupChanged:i,columnValueChanged:i,columnVisible:i,newColumnsLoaded:i}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Re.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((s,l)=>(b._setAriaLevel(l,s.getDept()+1),this.createComponentFromItem(s,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new Wy(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const i=new Gd(t,this.allowDragging,this.eventType,e);return this.createBean(i),i}const n=new Hy(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;const i=n.getColumnGroup();if(i){const s=t[i.getId()];(s!=null||e)&&n.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),n=d=>{d.addEventListener("expandedChanged",e);const u=d.removeEventListener.bind(d,"expandedChanged",e);this.destroyColumnItemFuncs.push(u)},i=(d,u,h)=>{d.forEach(f=>{b.isProvidedColumnGroup(f)?s(f,u,h):l(f,u,h)})},s=(d,u,h)=>{const f=d.getColGroupDef();if(f&&f.suppressColumnsToolPanel)return;if(d.isPadding()){i(d.getChildren(),u,h);return}const v=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,d,"columnToolPanel"),S=new Ld(v,d,u,!0,this.expandGroupsByDefault);h.push(S),n(S),i(d.getChildren(),u+1,S.getChildren())},l=(d,u,h)=>{if(d.getColDef()&&d.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(d,"columnToolPanel");h.push(new Ld(m,d,u))};this.destroyColumnTree(),i(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new jy(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),i=this.displayedColsList.length;b._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${i} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.forEach(i=>{t(i),i.isGroup()&&e(i.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const n=[];this.forEachItem(s=>{if(!s.isGroup())return;const l=s.getColumnGroup().getId();e.indexOf(l)>=0&&(s.setExpanded(t),n.push(l))});const i=e.filter(s=>!b._includes(n,s));i.length>0&&b._warnOnce("unable to find group(s) for supplied groupIds:",i)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const n=this.columnModel.isPivotMode();if(this.forEachItem(i=>{if(i.isGroup()||!i.isPassesFilter())return;const s=i.getColumn(),l=s.getColDef();let d;if(n){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;d=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(l.lockVisible)return;d=s.isVisible()}d?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=b._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!b._exists(this.filterText))return!0;const i=n.getDisplayName();return i==null||i.toLowerCase().indexOf(this.filterText)!==-1},e=(n,i)=>{let s=!1;if(n.isGroup()){const d=t(n);n.getChildren().forEach(u=>{const h=e(u,d||i);h&&(s=h)})}const l=i||s?!0:t(n);return n.setPassesFilter(l),l};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},Yy={selector:"AG-PRIMARY-COLS-LIST",component:Ky},Jy=class extends b.Component{constructor(){super(`<div class="ag-column-select">
39
39
  <ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
40
40
  <ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
41
- </div>`,[dy,my]),this.primaryColsHeaderPanel=C.RefPlaceholder,this.primaryColsListPanel=C.RefPlaceholder}init(t,e,r){this.allowDragging=t,this.params=e,this.eventType=r,this.primaryColsHeaderPanel.init(this.params);const o=this.params.suppressColumnFilter,i=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&o&&i&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new C.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1)}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(t){this.primaryColsListPanel.setGroupsExpanded(!0,t)}collapseGroups(t){this.primaryColsListPanel.setGroupsExpanded(!1,t)}setColumnLayout(t){this.primaryColsListPanel.setColumnLayout(t)}onFilterChanged(t){this.primaryColsListPanel.setFilterText(t.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(t){this.primaryColsHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}onSelectionChange(t){this.primaryColsHeaderPanel.setSelectionState(t.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},Kd=class extends C.Component{constructor(){super(...arguments),this.cbPivotMode=C.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
41
+ </div>`,[Uy,Yy]),this.primaryColsHeaderPanel=b.RefPlaceholder,this.primaryColsListPanel=b.RefPlaceholder}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);const i=this.params.suppressColumnFilter,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&s&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new b.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1)}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(t){this.primaryColsListPanel.setGroupsExpanded(!0,t)}collapseGroups(t){this.primaryColsListPanel.setGroupsExpanded(!1,t)}setColumnLayout(t){this.primaryColsListPanel.setColumnLayout(t)}onFilterChanged(t){this.primaryColsListPanel.setFilterText(t.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(t){this.primaryColsHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}onSelectionChange(t){this.primaryColsHeaderPanel.setSelectionState(t.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},zd=class extends b.Component{constructor(){super(...arguments),this.cbPivotMode=b.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
42
42
  <ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
43
- </div>`}postConstruct(){this.setTemplate(this.createTemplate(),[C.AgToggleButtonSelector]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){const t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){const t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},yy=class extends C.Component{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}init(t){const e=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...e,...t},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new Kd),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new vy),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new Wl(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Zd(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new $l(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const[r]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>r())}this.initialised=!0}setPivotModeSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(t):t&&(this.pivotModePanel=this.createBean(new Kd),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(t):t&&(this.rowGroupDropZonePanel=this.createManagedBean(new Wl(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Zd(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new $l(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(t)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(t=>{if(!t)return;const e=t.getGui();t.toggleResizable(!e.classList.contains("ag-last-column-drop")&&!e.classList.contains("ag-hidden"))})}setLastVisible(){const t=this.getGui();Array.prototype.slice.call(t.querySelectorAll(".ag-column-drop")).forEach(i=>i.classList.remove("ag-last-column-drop"));const r=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=C._last(r);o&&o.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let r=0;r<e.length;r++){const o=e[r];o.style.removeProperty("height"),o.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(C.ModuleNames.RowGroupingModule,"Row Grouping")}expandColumnGroups(t){this.primaryColsPanel.expandGroups(t)}collapseColumnGroups(t){this.primaryColsPanel.collapseGroups(t)}setColumnLayout(t){this.primaryColsPanel.setColumnLayout(t)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(t=>t()),this.childDestroyFuncs.length=0,C._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},by=class extends C.BeanStub{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(t){this.aggFuncService=t.aggFuncService,this.columnModel=t.columnModel,this.columnApplyStateService=t.columnApplyStateService}selectAllChildren(t,e,r){const o=this.extractAllLeafColumns(t);this.setAllColumns(o,e,r)}setColumn(t,e,r){this.setAllColumns([t],e,r)}setAllColumns(t,e,r){this.columnModel.isPivotMode()?this.setAllPivot(t,e,r):this.setAllVisible(t,e,r)}extractAllLeafColumns(t){const e=[],r=o=>{o.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?r(i.getChildren()):e.push(i.getColumn()))})};return r(t),e}setAllVisible(t,e,r){const o=[];t.forEach(i=>{i.getColDef().lockVisible||i.isVisible()!=e&&o.push({colId:i.getId(),hide:!e})}),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},r)}setAllPivot(t,e,r){this.setAllPivotActive(t,e,r)}setAllPivotActive(t,e,r){const o=[],d=e?u=>{var p;if(!u.isAnyFunctionActive())if(u.isAllowValue()){const h=typeof u.getAggFunc()=="string"?u.getAggFunc():(p=this.aggFuncService)==null?void 0:p.getDefaultAggFunc(u);o.push({colId:u.getId(),aggFunc:h})}else u.isAllowRowGroup()?o.push({colId:u.getId(),rowGroup:!0}):u.isAllowPivot()&&o.push({colId:u.getId(),pivot:!0})}:u=>{(u.isPivotActive()||u.isRowGroupActive()||u.isValueActive())&&o.push({colId:u.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(d),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},r)}updateColumns(t){const{columns:e,visibleState:r,pivotState:o,eventType:i}=t,s=e.map(d=>{const u=d.getColId();if(this.columnModel.isPivotMode()){const p=o==null?void 0:o[u];return{colId:u,pivot:p==null?void 0:p.pivot,rowGroup:p==null?void 0:p.rowGroup,aggFunc:p==null?void 0:p.aggFunc}}else return{colId:u,hide:!(r!=null&&r[u])}});this.columnApplyStateService.applyColumnState({state:s},i)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},wy="32.3.2",Yd=C._defineModule({version:wy,moduleName:C.ModuleNames.ColumnsToolPanelModule,beans:[by],userComponents:[{name:"agColumnsToolPanel",classImp:yy},{name:"agMenuItem",classImp:Le.AgMenuItemRenderer}],dependantModules:[Le.EnterpriseCoreModule,sy,Ul]}),Jd=(t,e)=>new Qd(t.feature,e,t.defaults,t.css),xy=0,Qo=(t,e=`customPart${++xy}`)=>new Qd(t,e),Qd=class nd{constructor(e,r,o={},i=[]){this.feature=e,this.variant=r,this.defaults=o,this.css=i}get id(){return this.feature?`${this.feature}/${this.variant}`:this.variant}withParams(e){const r={...this.defaults};for(const[o,i]of Object.entries(e))i!=null&&(r[o]=i);return new nd(this.feature,this.variant,r,this.css)}withAdditionalParams(e){return this.withParams(e)}withCSS(e){return new nd(this.feature,this.variant,this.defaults,this.css.concat(e))}},Xd=`:where([class^=ag-]){box-sizing:border-box;outline:none;&:after,&:before,&:focus,&:focus-within{box-sizing:border-box;outline:none}&:where(button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}&:where(button){font-weight:inherit}&::-ms-clear{display:none}}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;right:25px;transition:opacity 1s ease-out 3s;&:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}.ag-ltr .ag-watermark-text{padding-left:.7rem}.ag-rtl .ag-watermark-text{padding-right:.7rem}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container{left:0}.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-full-width-container,.ag-rtl .ag-sticky-bottom-full-width-container,.ag-rtl .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&.ag-scrollbar-invisible{bottom:0;position:absolute;&.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden;&.ag-scrollbar-active,&.ag-scrollbar-scrolling{opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&.ag-scrollbar-invisible{left:0;right:0}}.ag-body-vertical-scroll{height:100%;&.ag-scrollbar-invisible{top:0;z-index:10}}.ag-ltr .ag-body-vertical-scroll{&.ag-scrollbar-invisible{right:0}}.ag-rtl .ag-body-vertical-scroll{&.ag-scrollbar-invisible{left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&.ag-scroller-corner{overflow-x:hidden}}.ag-ltr .ag-column-moving{.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}.ag-rtl .ag-column-moving{.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.ag-row-no-animation .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-sparkline-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}.ag-full-width-row .ag-cell-wrapper.ag-row-group{align-items:center;height:100%}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-floating-bottom{border-top:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-value-slide-out{opacity:1}.ag-ltr .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}.ag-rtl .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:is(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}.ag-ltr .ag-value-slide-out-end{margin-right:10px}.ag-rtl .ag-value-slide-out-end{margin-left:10px}.ag-opacity-zero{opacity:0!important}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}.ag-right-aligned-header{.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}.ag-pill-select{display:flex;flex-direction:column;.ag-column-drop-list{padding:0}.ag-select{padding-top:var(--ag-spacing)}.ag-picker-field-wrapper{background-color:transparent;border:0}.ag-picker-field-display{cursor:pointer}}.ag-ltr{direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}.ag-rtl{direction:rtl;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{overflow:hidden;visibility:hidden;width:0;& div{position:absolute}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}.ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-rtl{text-align:right}.ag-ltr .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}.ag-ltr .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-rtl .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:min(calc(var(--ag-row-height) - 1px),var(--ag-line-height,1000px))}:where(.ag-body-vertical-content-no-gap) .ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important;display:none}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height)}.ag-ltr .ag-cell{border-right:var(--ag-column-border)}.ag-rtl .ag-cell{border-left:var(--ag-column-border)}.ag-ltr :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}.ag-rtl :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;&.ag-row-group{align-items:flex-start}>:not(.ag-cell-value):not(.ag-group-value){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}}.ag-ltr .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-rtl .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-ltr .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-rtl .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-ltr .ag-group-contracted,.ag-ltr .ag-group-expanded,.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-group-contracted,.ag-rtl .ag-group-expanded,.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-ltr .ag-group-child-count{margin-left:3px}.ag-rtl .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}.ag-ltr .ag-row-highlight-above:after,.ag-ltr .ag-row-highlight-below:after{left:1px}.ag-rtl .ag-row-highlight-above:after,.ag-rtl .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:-1px}.ag-row-highlight-above.ag-row-first:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}.ag-ltr .ag-right-aligned-cell{text-align:right}.ag-rtl .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}.ag-cell:not(.ag-cell-inline-editing),.ag-full-width-row .ag-cell-wrapper.ag-row-group{-webkit-font-smoothing:subpixel-antialiased}.ag-ltr .ag-cell:not(.ag-cell-inline-editing),.ag-ltr .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-rtl .ag-cell:not(.ag-cell-inline-editing),.ag-rtl .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.5)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-details-row{padding:calc(var(--ag-spacing)*3.75)}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left):not(.ag-cell-range-single-cell){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header,.ag-pinned-right-header{height:100%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-ltr,.ag-rtl{.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:cell}.ag-ltr .ag-range-handle{cursor:nwse-resize}.ag-rtl .ag-range-handle{cursor:nesw-resize}.ag-cell-inline-editing{border:var(--ag-input-focus-border)!important}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date]{width:1px}.ag-input-field-input{min-width:0;width:100%}.ag-column-select-header-filter-wrapper,.ag-filter-filter,.ag-filter-toolpanel-search,.ag-mini-filter{.ag-input-wrapper:before{background-color:currentColor;content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:50%;position:absolute;width:12px}}.ag-ltr .ag-column-select-header-filter-wrapper,.ag-ltr .ag-filter-filter,.ag-ltr .ag-filter-toolpanel-search,.ag-ltr .ag-mini-filter{.ag-input-wrapper:before{margin-left:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-rtl .ag-column-select-header-filter-wrapper,.ag-rtl .ag-filter-filter,.ag-rtl .ag-filter-toolpanel-search,.ag-rtl .ag-mini-filter{.ag-input-wrapper:before{margin-right:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-advanced-filter-header{align-items:center;background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);display:flex;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);position:relative}.ag-advanced-filter{align-items:center;display:flex;width:100%}.ag-advanced-filter-apply-button,.ag-advanced-filter-builder-button{line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-apply-button,.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-advanced-filter-apply-button,.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-spacing)*2)}.ag-advanced-filter-builder-button{align-items:center;background-color:unset;border:0;display:flex;font-size:var(--ag-font-size);font-weight:600;padding:var(--ag-spacing);&:hover:not(:disabled){background-color:var(--ag-row-hover-color)}&:not(:disabled){cursor:pointer}}.ag-ltr .ag-advanced-filter-builder-button-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-advanced-filter-builder-button-label{margin-right:var(--ag-spacing)}.ag-advanced-filter-builder{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-button-panel{border-top:var(--ag-advanced-filter-builder-button-bar-border);display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-spacing)*2)}}.ag-rtl .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-right:calc(var(--ag-spacing)*2)}}.ag-advanced-filter-builder-item-wrapper{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}.ag-ltr .ag-advanced-filter-builder-item-wrapper{padding-left:calc(var(--ag-icon-size)/2);padding-right:var(--ag-icon-size)}.ag-rtl .ag-advanced-filter-builder-item-wrapper{padding-left:var(--ag-icon-size);padding-right:calc(var(--ag-icon-size)/2)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size);&:before{height:50%;top:50%}}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-bottom,.ag-advanced-filter-builder-item-tree-line-vertical-top{align-items:center;display:flex;height:100%;position:relative;&:after,&:before{content:"";height:100%;position:absolute}}.ag-advanced-filter-builder-item-tree-line-horizontal:after{border-bottom:1px solid var(--ag-border-color);height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size))}.ag-ltr .ag-advanced-filter-builder-item-tree-line-horizontal:after{left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-horizontal:after{right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical:before{top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc(50% - var(--ag-icon-size)*1.5/2);top:calc(50% + var(--ag-icon-size)*1.5/2);width:calc(var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-condition{padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-item-tree-lines,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-pill-wrapper{align-items:center;display:flex;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0 var(--ag-spacing)}.ag-advanced-filter-builder-pill{border-radius:var(--ag-border-radius);min-height:calc(100% - var(--ag-spacing)*3);min-width:calc(var(--ag-spacing)*2);padding:var(--ag-spacing) calc(var(--ag-spacing)*2);position:relative;.ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-value-empty{color:var(--ag-subtle-text-color)}}.ag-ltr .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-right:var(--ag-spacing)}}.ag-rtl .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-left:var(--ag-spacing)}}.ag-advanced-filter-builder-item-button,.ag-advanced-filter-builder-pill{&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-advanced-filter-builder-pill-display{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-advanced-filter-builder-join-pill{background-color:var(--ag-advanced-filter-builder-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{background-color:var(--ag-advanced-filter-builder-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{background-color:var(--ag-advanced-filter-builder-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{background-color:var(--ag-advanced-filter-builder-value-pill-color);cursor:text;max-width:140px;.ag-advanced-filter-builder-pill-display{display:block}}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-spacing)*.5)}.ag-advanced-filter-builder-item-button{color:var(--ag-subtle-text-color);cursor:pointer;position:relative}.ag-advanced-filter-builder-item-button-disabled{cursor:default;opacity:.5}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-spacing)}.ag-advanced-filter-builder-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:hover{background-color:var(--ag-row-hover-color);.ag-advanced-filter-builder-item-button{opacity:100%}}}.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid,.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible{opacity:100%}.ag-advanced-filter-builder-invalid{color:var(--ag-invalid-color);cursor:default;margin:0 var(--ag-spacing)}.ag-cell-inline-editing{border-radius:var(--ag-border-radius);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-editor .ag-wrapper,.ag-cell-editor input,.ag-cell-wrapper{height:100%;line-height:normal;width:100%}}.ag-autocomplete-list-popup,.ag-popup-editor .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-chart{display:flex;height:100%;position:relative;width:100%}.ag-chart-components-wrapper{display:flex}.ag-chart-canvas-wrapper,.ag-chart-components-wrapper{flex:1 1 auto;position:relative}.ag-chart-menu{display:flex;flex-direction:column;position:absolute;top:16px}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{min-width:var(--ag-chart-menu-panel-width);position:relative}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.ag-chart-tabbed-menu-header{cursor:default;flex:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-tabbed-menu-body{align-items:stretch;display:flex;flex:1 1 auto;overflow:hidden}.ag-chart-tab{overflow:hidden;overflow-y:auto;width:100%}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}.ag-chart-settings-nav-bar{align-items:center;display:flex;height:30px;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-chart-settings-card-selector{align-items:center;display:flex;flex:1 1 auto;height:100%;justify-content:space-around;padding:0 10px}.ag-chart-settings-card-item{background-color:var(--ag-foreground-color);border-radius:4px;cursor:pointer;height:10px;height:8px;position:relative;width:10px;width:8px;&.ag-not-selected{opacity:.2}&:before{background-color:transparent;content:" ";display:block;height:20px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;width:20px}&.ag-selected{background-color:var(--ag-accent-color)}}.ag-chart-settings-next,.ag-chart-settings-prev{flex:none;position:relative;&:focus-within{border-radius:1px;box-shadow:var(--ag-focus-shadow)}}.ag-chart-settings-next-button,.ag-chart-settings-prev-button{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.ag-chart-settings-mini-charts-container{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;position:relative}.ag-chart-settings-mini-wrapper{display:flex;flex-direction:column;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%;&.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper,.ag-chart-format-wrapper{display:flex;flex-direction:column;padding-bottom:16px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-chrome-background-color)}.ag-chart-advanced-settings,.ag-chart-advanced-settings-wrapper{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-advanced-settings-section,.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-advanced-settings-section{border-bottom:1px solid var(--ag-border-color)}.ag-chart-empty-text{align-items:center;background-color:var(--ag-background-color);display:flex;height:100%;justify-content:center;top:0;width:100%}.ag-chart .ag-chart-menu{display:none}.ag-chart-menu-hidden:hover .ag-chart-menu{display:block}.ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{display:flex;flex-direction:row;gap:20px;top:8px;width:auto}}}.ag-ltr .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:right;right:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-rtl .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:left;left:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-charts-font-size-color{align-self:stretch;display:flex;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-spacing)}.ag-chart-menu{background:var(--ag-background-color);border-radius:var(--ag-border-radius)}.ag-chart-menu-icon{border-radius:var(--ag-border-radius);cursor:pointer;margin:2px 0;opacity:.5;opacity:.8;&:hover{opacity:1}}.ag-chart-menu-toolbar-button{background-color:unset;border:0;border-radius:1px;padding:0 2px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-border-color);border-radius:5px;&.ag-selected{border-color:var(--ag-accent-color);border-width:2px}&:focus-visible{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}.ag-chart-data-column-drag-handle{margin-left:var(--ag-spacing)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{background-color:unset;position:relative}.ag-charts-advanced-settings-top-level-group-title-bar:focus-visible,.ag-charts-data-group-title-bar:focus-visible,.ag-charts-format-top-level-group-title-bar:focus-visible,.ag-charts-settings-group-title-bar:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding)*.5) var(--ag-widget-container-horizontal-padding);.ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-spacing)}}.ag-charts-advanced-settings-top-level-group-container,.ag-charts-format-top-level-group-container{margin-left:calc(var(--ag-spacing)*2);padding:var(--ag-spacing)}.ag-charts-advanced-settings-top-level-group-item,.ag-charts-format-top-level-group-item{margin:var(--ag-spacing) 0}.ag-charts-format-sub-level-group-container{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-settings-group-container{display:grid;grid-template-columns:60px 1fr 60px 1fr 60px;padding:var(--ag-spacing);row-gap:8px;.ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}}.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-menu-panel{background-color:var(--ag-chrome-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:1px solid var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:1px solid var(--ag-border-color)}.ag-chart-tabbed-menu-body{position:relative;&:after{background:linear-gradient(var(--ag-background-color),transparent);content:"";display:block;height:16px;left:0;position:absolute;right:0;top:0}}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{border-top:none;font-weight:500;padding:0 calc(var(--ag-spacing)*1.5)}.ag-chart-settings-nav-bar{border-top:1px solid var(--ag-border-color)}.ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-chart-data-section,.ag-chart-format-section{.ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-label-align-top .ag-label{margin-bottom:var(--ag-widget-vertical-spacing);margin-top:calc(var(--ag-widget-vertical-spacing)*.5)}.ag-slider.ag-label-align-top .ag-label{margin-bottom:0}& label{display:inline-block}}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-charts-data-group-container,.ag-charts-data-group-title-bar,.ag-charts-format-sub-level-group,.ag-charts-format-sub-level-group-container,.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-group-item:last-child,.ag-charts-format-sub-level-group-title-bar,.ag-charts-format-top-level-group,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-format-top-level-group-item,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{margin:0;padding:0}.ag-charts-data-group,.ag-charts-format-top-level-group{border-top:1px solid var(--ag-border-color)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group .ag-charts-data-group-container,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-charts-format-sub-level-group-container{padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-no-header-group-container>*,.ag-charts-format-top-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-chart-advanced-settings-section,.ag-chart-settings-mini-wrapper,.ag-charts-data-group-item{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding)}.ag-charts-advanced-settings-top-level-group{.ag-charts-advanced-settings-top-level-group-container,.ag-charts-advanced-settings-top-level-group-title-bar{padding:0 var(--ag-widget-container-horizontal-padding)}}.ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-charts-advanced-settings-top-level-group-item{margin-bottom:0;margin-top:calc(var(--ag-widget-vertical-spacing)*2)}.ag-chart-menu{--ag-icon-size:20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-cell,.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{gap:var(--ag-spacing);position:relative}.ag-column-drop-cell-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;position:relative;>*{flex:none}}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{overflow:hidden;white-space:nowrap}.ag-column-drop-cell-button{cursor:pointer}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell{background:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;padding:calc(var(--ag-spacing)*.5);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}.ag-rtl .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-button{min-width:calc(var(--ag-spacing)*4)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}.ag-ltr .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-drop-vertical-empty-message{bottom:0;left:0;margin-top:var(--ag-spacing);overflow:hidden;position:absolute;right:0;top:0}.ag-select-agg-func-popup{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default;&:hover{background-color:var(--ag-selected-row-background-color)}&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-sort-indicator-container{display:contents}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-column-border)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-column-border)}.ag-column-drop-cell-button{min-width:0;opacity:.75;&:hover{opacity:1}}.ag-column-drop-vertical{min-height:75px}.ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);padding:calc(var(--ag-spacing)*2)}.ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}.ag-column-select-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column,.ag-column-select-column-group{&:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}.ag-filter-body-wrapper{display:flex;flex-direction:column}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1}.ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select{border-bottom:var(--ag-tool-panel-separator-border);border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px;&:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}}.ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);max-width:200px;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2))}.ag-dnd-ghost,.ag-header{display:flex;overflow:hidden;white-space:nowrap}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-header-row:not(:first-child){.ag-header-cell:not(.ag-header-span-height.ag-header-span-total),.ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-header-row-border)}}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell,.ag-header-group-cell{align-items:center;display:inline-flex;gap:var(--ag-cell-widget-spacing);height:100%;overflow:hidden;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:not(.ag-floating-filter),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:hover:before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&.ag-header-cell-moving:before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-filter-button,.ag-header-cell.ag-header-active .ag-header-cell-menu-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){opacity:0;transition:opacity .2s}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;gap:var(--ag-spacing);padding:5px 0}.ag-header-cell-label{overflow:hidden;text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;position:sticky}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-cell-sortable .ag-header-cell-label,.ag-header-expand-icon,.ag-panel-title-bar-button{cursor:pointer}.ag-advanced-filter-header-cell,.ag-header-cell,.ag-header-group-cell{&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}.ag-ltr :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-ltr :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}.ag-ltr .ag-header-cell:after,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-right:var(--ag-header-column-border);right:0}.ag-rtl .ag-header-cell:after,.ag-rtl .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}.ag-ltr .ag-header-highlight-before:after{left:0}.ag-ltr .ag-header-highlight-after:after,.ag-rtl .ag-header-highlight-before:after{right:0}.ag-rtl .ag-header-highlight-after:after{left:0}.ag-ltr .ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-rtl .ag-pinned-left-header .ag-header-highlight-after:after{left:1px}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}.ag-ltr .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-rtl .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-header-cell.ag-header-span-height .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group.ag-header-span-height .ag-header-cell-resize{display:none}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;min-width:180px;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-compact-menu-option-icon,.ag-ltr .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-compact-menu-option-icon,.ag-rtl .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}.ag-ltr .ag-compact-menu-option-shortcut,.ag-ltr .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-shortcut,.ag-rtl .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}.ag-ltr .ag-compact-menu-option-popup-pointer,.ag-ltr .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-popup-pointer,.ag-rtl .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;.ag-column-select{height:100%}}.ag-menu.ag-tabs{min-width:290px}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-rtl .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-menu .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-resizer-wrapper{margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-menu-option{cursor:pointer;font-weight:500}.ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-header-text-color);cursor:default;display:flex;flex:none;height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}.ag-rtl .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{color:var(--ag-header-text-color);flex:1 1 auto;font-weight:500}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;&.ag-resizer-topLeft{height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-ltr .ag-resizer{&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}.ag-rtl .ag-resizer{&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}.ag-dragging-fill-handle .ag-dialog,.ag-dragging-range-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}.ag-select{align-items:center;display:flex;flex-direction:row;.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}&.ag-disabled{opacity:.5}}.ag-ltr .ag-select{.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}.ag-rtl .ag-select{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-rich-select{cursor:default;height:100%}.ag-rich-select-value{align-items:center;background-color:var(--ag-input-background-color);display:flex;height:100%;padding:var(--ag-spacing);.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;&.ag-display-as-placeholder{opacity:.5}}}.ag-rich-select-list{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);box-shadow:var(--ag-dropdown-shadow);height:auto;position:relative;width:100%;.ag-loading-text{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}}.ag-rich-select-row{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;padding:0 var(--ag-spacing);white-space:nowrap}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row-highlighted,.ag-rich-select-row:hover{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-rich-select-field-input{flex:1 1 auto;.ag-input-field-input{border:none!important;box-shadow:none!important;padding:0!important;text-overflow:ellipsis;&::-moz-placeholder{opacity:.8}&::placeholder{opacity:.8}}}.ag-ltr .ag-rich-select-field-input{left:var(--ag-spacing)}.ag-rtl .ag-rich-select-field-input{right:var(--ag-spacing)}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-pill-container{display:flex;flex-wrap:nowrap;gap:.25rem}.ag-pill{align-items:center;background:var(--ag-select-cell-background-color);border:var(--ag-select-cell-border);border-radius:var(--ag-border-radius);display:flex;padding:0 .25rem;white-space:nowrap;&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-pill .ag-pill-button{border:none;padding:0;&:hover{color:var(--ag-accent-color);cursor:pointer}}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-spacing)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-spacing)}ag-grid,ag-grid-angular{display:block}.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-tool-panel-wrapper{cursor:default;display:flex;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-side-bar-panel-width)}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;>*{flex:none}}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize,.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{position:relative;width:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-side-button{&.ag-selected{background-color:var(--ag-background-color);border-bottom:1px solid var(--ag-border-color);&:not(:first-of-type){border-top:1px solid var(--ag-border-color)}}}.ag-side-button-button{align-items:center;cursor:pointer;display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*3) 0;position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (max-resolution:1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}.ag-ltr .ag-side-button-label{transform:rotate(.05deg)}.ag-rtl .ag-side-button-label{transform:rotate(-.05deg)}}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-left:var(--ag-side-panel-border)}}.ag-ltr .ag-side-bar-right,.ag-rtl .ag-side-bar-left{border-left:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-right:var(--ag-side-panel-border)}}.ag-ltr .ag-chart-menu-panel{border-left:var(--ag-side-panel-border)}.ag-rtl .ag-chart-menu-panel{border-right:var(--ag-side-panel-border)}.ag-button{border-radius:0}.ag-standard-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}:where(input[class^=ag-][type=button],button[class^=ag-]):focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow-x:hidden;overflow-y:auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;& span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-range-field{align-items:center;display:flex;.ag-input-wrapper{height:100%}}& input[class^=ag-][type=range]{-webkit-appearance:none;background:none;height:100%;overflow:visible;padding:0;width:100%;&::-webkit-slider-runnable-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-moz-range-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&::-moz-ag-range-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&:focus{&::-webkit-slider-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}&::-moz-ag-range-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}&:active{&::-webkit-slider-runnable-track{background-color:var(--ag-accent-color)}&::-moz-ag-range-track{background-color:var(--ag-accent-color)}}&:disabled{opacity:.5}}.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border:solid var(--ag-toggle-button-border-width) var(--ag-toggle-button-off-border-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:before{background-color:var(--ag-toggle-button-switch-background-color);border:var(--ag-toggle-button-border-width) solid var(--ag-toggle-button-switch-border-color);border-radius:100%;content:"";display:block;height:var(--ag-toggle-button-height);pointer-events:none;position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));width:var(--ag-toggle-button-height)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color);&:before{border-color:var(--ag-toggle-button-on-border-color)}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}.ag-ltr .ag-toggle-button-input-wrapper{&:before{left:calc(0px - var(--ag-toggle-button-border-width));transition:left .1s}&.ag-checked{&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-rtl .ag-toggle-button-input-wrapper{&:before{right:calc(0px - var(--ag-toggle-button-border-width));transition:right .1s}&.ag-checked{&:before{right:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-autocomplete{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-autocomplete-list-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-autocomplete-list{height:calc(var(--ag-row-height)*6.5);min-width:200px;position:relative;width:100%}.ag-autocomplete-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:focus-visible:after{content:none}&:hover{background-color:var(--ag-row-hover-color)}}.ag-autocomplete-row{align-items:center;display:flex;flex:1 1 auto;overflow:hidden}.ag-autocomplete-row-label{margin:0 var(--ag-widget-container-horizontal-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:not(.ag-tooltip-interactive),.ag-tooltip:not(.ag-tooltip-interactive){pointer-events:none}.ag-tooltip-custom.ag-tooltip-animate,.ag-tooltip.ag-tooltip-animate{transition:opacity 1s;&.ag-tooltip-hiding{opacity:0}}.ag-angle-select{align-items:center;display:flex}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex;.ag-input-field{flex:1 1 auto}}.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-color-panel{display:flex;flex-direction:column;text-align:center;width:100%}.ag-spectrum-color{cursor:default;flex:1 1 auto;overflow:visible;position:relative}.ag-spectrum-fill{inset:0;position:absolute}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{cursor:pointer;pointer-events:none;position:absolute}.ag-spectrum-alpha,.ag-spectrum-hue{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(270deg,red 3%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%;width:100%}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>') 0 0 /4px 4px;height:100%;width:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{pointer-events:none;position:absolute}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) var(--ag-background-color)}.ag-recent-colors{display:flex;gap:6px;margin-top:10px}.ag-recent-color{cursor:pointer}.ag-angle-select[disabled]{opacity:.5;pointer-events:none}.ag-ltr .ag-angle-select-field,.ag-ltr .ag-slider-field{margin-right:calc(var(--ag-spacing)*2)}.ag-rtl .ag-angle-select-field,.ag-rtl .ag-slider-field{margin-left:calc(var(--ag-spacing)*2)}.ag-angle-select-parent-circle{background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-border-color);border-radius:12px;height:24px;width:24px}.ag-angle-select-child-circle{background-color:var(--ag-foreground-color);border-radius:3px;height:6px;left:12px;margin-left:-3px;margin-top:-4px;top:4px;width:6px}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-picker-field-display{align-items:center;display:flex;flex-direction:row;min-height:var(--ag-list-item-height)}}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-spacing)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-spacing)}.ag-color-panel{padding:var(--ag-spacing)}.ag-spectrum-tools{padding-bottom:0;padding-left:0;padding-right:0}.ag-spectrum-tool{height:12px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:12px}.ag-spectrum-slider{border:3px solid #f8f8f8;border-radius:18px;height:18px;margin-top:-15px;width:18px}.ag-recent-colors{margin-bottom:2px;margin-left:var(--ag-spacing);margin-right:var(--ag-spacing)}.ag-color-input-color,.ag-color-picker-color,.ag-recent-color{border-radius:4px}.ag-recent-color{border:1px solid var(--ag-border-color)}.ag-spectrum-sat{background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0))}.ag-spectrum-val{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.ag-spectrum-dragger{background:#000;border:3px solid #fff;border-radius:18px;box-shadow:0 0 2px 0 rgba(0,0,0,.24);height:18px;width:18px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:2px}.ag-spectrum-tool{border-radius:2px;height:11px;margin-bottom:10px}.ag-spectrum-slider{border:2px solid #fff;border-radius:13px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:13px;margin-top:-12px;width:13px}.ag-recent-color,.ag-spectrum-color,.ag-spectrum-slider{&:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-focus-shadow)}}.ag-color-input{.ag-color-input-color{position:absolute}}.ag-ltr .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-left:var(--ag-spacing)}}.ag-rtl .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-right:var(--ag-spacing)}}.ag-color-input-color,.ag-color-picker-color{border:1px solid var(--ag-border-color);border-radius:2px;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-pill-select{.ag-picker-field-display{font-weight:500}.ag-picker-field-display,.ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-label-color)}}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{align-items:center;display:flex;>*{align-items:center;display:flex}}.ag-filter-toolpanel-header{height:calc(var(--ag-spacing)*6);&:focus-visible{border-radius:var(--ag-border-radius);box-shadow:inset var(--ag-focus-shadow)}}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-spacing)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-spacing)*8)}.ag-filter-toolpanel-group-item{margin-bottom:calc(var(--ag-spacing)*.5);margin-top:calc(var(--ag-spacing)*.5)}.ag-filter-toolpanel-search{margin-bottom:var(--ag-spacing);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-spacing)*4)}.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-filter-toolpanel-expand{cursor:pointer}.ag-ltr .ag-filter-toolpanel-expand{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-expand{margin-left:var(--ag-spacing)}.ag-ltr .ag-filter-toolpanel-group-title-bar,.ag-ltr .ag-filter-toolpanel-instance-header{padding-left:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-rtl .ag-filter-toolpanel-group-title-bar,.ag-rtl .ag-filter-toolpanel-instance-header{padding-right:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-ltr .ag-filter-toolpanel-instance-body{margin-left:var(--ag-filter-tool-panel-group-indent)}.ag-rtl .ag-filter-toolpanel-instance-body{margin-right:var(--ag-filter-tool-panel-group-indent)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-spacing)}.ag-filter-toolpanel-instance-filter{background-color:var(--ag-chrome-background-color)}.ag-filter-toolpanel-group-level-0{border-top:none}.ag-filter-toolpanel-header{height:auto;padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-filter-toolpanel-group-item{margin:0}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{color:var(--ag-header-text-color);font-weight:500}.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}.ag-paging-page-size .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&:focus-visible{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-center,.ag-status-bar-left,.ag-status-bar-right{display:inline-flex}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding)}.ag-status-name-value-value{font-weight:500}.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}.ag-icon{display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}}.ag-column-select-column-readonly .ag-icon-grip,.ag-column-select-column-readonly.ag-icon-grip{opacity:.35}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-contracted .ag-icon,.ag-group-expanded .ag-icon,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;box-shadow:0 0 0 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}.ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}.ag-ltr .ag-filter-active{&:after{right:-1px}}.ag-rtl .ag-filter-active{&:after{left:-1px}}.ag-label-align-right{.ag-label{order:1}>*{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-spacing)}.ag-rtl .ag-label{margin-left:var(--ag-spacing)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-spacing)}`,eu={backgroundColor:"#FFF",foregroundColor:"#181d1f",textColor:{ref:"foregroundColor"},accentColor:"#2196f3",invalidColor:"#e02525",borderColor:{ref:"foregroundColor",mix:.15},wrapperBorder:!0,rowBorder:!0,browserColorScheme:"light",headerRowBorder:{ref:"rowBorder"},footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],chromeBackgroundColor:{ref:"foregroundColor",mix:.02,onto:"backgroundColor"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"backgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:{ref:"accentColor"},rangeSelectionBackgroundColor:{ref:"accentColor",mix:.2},rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:{ref:"accentColor",mix:.5},rowHoverColor:{ref:"accentColor",mix:.08},columnHoverColor:{ref:"accentColor",mix:.05},selectedRowBackgroundColor:{ref:"accentColor",mix:.12},modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:{ref:"backgroundColor"},borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:{radius:16,color:"#00000026"},dropdownShadow:{radius:4,spread:1,offsetY:1,color:"#babfc766"},dragAndDropImageBackgroundColor:{ref:"backgroundColor"},dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:{ref:"foregroundColor",mix:.7},focusShadow:{spread:3,color:{ref:"accentColor",mix:.5}},sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"iconSize + widgetVerticalSpacing"},iconSize:16,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonBorderWidth:2,toggleButtonOnBorderColor:{ref:"accentColor"},toggleButtonOnBackgroundColor:{ref:"accentColor"},toggleButtonOffBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonOffBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonSwitchBorderColor:{ref:"toggleButtonOffBorderColor"},toggleButtonSwitchBackgroundColor:{ref:"backgroundColor"},menuBorder:{color:{ref:"foregroundColor",mix:.2}},menuBackgroundColor:{ref:"foregroundColor",mix:.03,onto:"backgroundColor"},menuTextColor:{ref:"foregroundColor",mix:.95,onto:"backgroundColor"},menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:{ref:"foregroundColor",mix:.8},iconButtonHoverColor:{ref:"foregroundColor",mix:.1},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:{ref:"foregroundColor",mix:.2}},panelBackgroundColor:{ref:"backgroundColor"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:{ref:"foregroundColor",mix:.07},columnDropCellBorder:{color:{ref:"foregroundColor",mix:.13}},selectCellBackgroundColor:{ref:"foregroundColor",mix:.07},selectCellBorder:{color:{ref:"foregroundColor",mix:.13}},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},iconButtonHoverBackgroundColor:{ref:"foregroundColor",mix:.1},rowLoadingSkeletonEffectColor:"rgba(66, 66, 66, 0.2)"},Cy=t=>t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase(),tu=t=>`--ag-${Cy(t)}`,tn=t=>`var(${tu(t)})`,_y=(t,e,r)=>Math.max(e,Math.min(r,t)),ky=t=>{const e=new Map;return r=>{const o=r;return e.has(o)||e.set(o,t(r)),e.get(o)}},Sy=ky(t=>{if(/Color$/.test(t))return"color";if(/Scale?$/.test(t))return"scale";if(t==="spacing"||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(t))return"length";if(/Border$/.test(t))return"border";if(/BorderStyle$/.test(t))return"borderStyle";if(/Shadow$/.test(t))return"shadow";if(/Image$/.test(t))return"image";if(/Family$/.test(t))return"fontFamily";if(/Weight$/.test(t))return"fontWeight";if(/Duration$/.test(t))return"duration";if(/ColorScheme$/.test(t))return"colorScheme";throw new Error(`"${t}" is not a valid theme parameter.`)}),ci=t=>typeof t=="string"?t:typeof t=="number"?String(t):!1,Kl=t=>{if(typeof t=="string")return t;if("ref"in t){const e=tn(t.ref);return t.mix==null?e:`color-mix(in srgb, ${t.onto?"var(--ag-background-color)":"transparent"}, ${e} ${_y(t.mix*100,0,100)}%)`}return!1},Ty=ci,ro=t=>typeof t=="string"?t:typeof t=="number"?`${t}px`:"calc"in t?`calc(${t.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?[a-z][a-z0-9]*\b(?![-(])/gi,r=>r[0]==="-"?r:` ${tn(r)} `)})`:"ref"in t?tn(t.ref):!1,Ey=ci,Ny=(t,e)=>typeof t=="string"?t:t===!0?"solid 1px var(--ag-border-color)":t===!1?e==="columnBorder"?"solid 1px transparent":"none":"ref"in t?tn(t.ref):ru(t.style??"solid")+" "+ro(t.width??1)+" "+Kl(t.color??{ref:"borderColor"}),Ay=t=>typeof t=="string"?t:t===!1?"none":"ref"in t?tn(t.ref):[ro(t.offsetX??0),ro(t.offsetY??0),ro(t.radius??0),ro(t.spread??0),Kl(t.color??{ref:"foregroundColor"})].join(" "),ru=ci,nu=t=>typeof t=="string"?t:"googleFont"in t?nu(t.googleFont):"ref"in t?tn(t.ref):Array.isArray(t)?t.map(e=>(typeof e=="object"&&"googleFont"in e&&(e=e.googleFont),/^[\w-]+$/.test(e)?e:JSON.stringify(e))).join(", "):!1,My=ci,ou=t=>typeof t=="string"?t:"url"in t?`url(${JSON.stringify(t.url)})`:"svg"in t?ou({url:`data:image/svg+xml,${encodeURIComponent(t.svg)}`}):"ref"in t?tn(t.ref):!1,By=(t,e)=>typeof t=="string"?t:typeof t=="number"?(t>50&&C._errorOnce(`Numeric value ${t} passed to ${e} param will be interpreted as ${t} seconds. If this is intentional use "${t}s" to silence this warning.`),`${t}s`):"ref"in t?tn(t.ref):!1,Py={color:Kl,colorScheme:Ty,length:ro,scale:Ey,border:Ny,borderStyle:ru,shadow:Ay,image:ou,fontFamily:nu,fontWeight:My,duration:By},Dy=(t,e)=>{const r=Sy(t);return Py[r](e,t)},Vy=0,Ly=(t=`customTheme${++Vy}`)=>new Ry(t,[],{}),Iy=typeof window!="object"||!window||typeof document!="object"||window.document!==document,Fy=0,au=!1,Ry=class od{constructor(e,r=[],o={}){this.id=e,this.dependencies=r,this.defaults=o,this.useCount=0}withPart(e){return typeof e=="function"&&(e=e()),new od(this.id,this.dependencies.concat(e),this.defaults)}withParams(e){const r={...this.defaults};for(const[o,i]of Object.entries(e))i!=null&&(r[o]=i);return new od(this.id,this.dependencies,r)}getCSS(){return[Xd,...this._getCSSChunks().map(e=>e.css)].join(`
44
-
45
- `)}startUse(e){++this.useCount,this.useCount===1&&this._install(e)}stopUse(){--this.useCount,this.useCount===0&&setTimeout(()=>{this.useCount===0&&iu(this.getCssClass(),this._installRoot)},1e3)}getCssClass(){return this._cssClass==null&&(this._cssClass=`ag-theme-${++Fy}`),this._cssClass}getParams(){if(this._getParamsCache)return this._getParamsCache;const e={...eu};for(const r of this._getFlatUnits())for(const[o,i]of Object.entries(r.defaults)){const s=i??eu[o];s!=null&&(e[o]=s)}return this._getParamsCache=e}async _install({container:e,loadThemeGoogleFonts:r}){if(Iy)return;au||(au=!0,iu("legacy",document.head),getComputedStyle(document.body).getPropertyValue("--ag-legacy-styles-loaded")&&C._errorOnce("both Theming API and the ag-grid.css are used on the same page, styling will be incorrect"));let o=e.getRootNode();o instanceof ShadowRoot||(o=document.head),this._installRoot=o;const i=[];i.push(Yl({css:Xd,part:"core",root:o}));for(const s of zy(this))r?Gy(s):r==null&&C._warnOnce(`theme uses google font ${s} but no value for loadThemeGoogleFonts was provided. Pass true to load fonts from ${su} or false to silence this warning.`);for(const s of this._getCSSChunks())Yl({css:s.css,part:s.id,scope:this.getCssClass(),root:o});return Promise.all(i)}_getFlatUnits(){if(this._getFlatUnitsCache)return this._getFlatUnitsCache;const e={};for(const o of this.dependencies)delete e[o.feature],e[o.feature]=o;const r=[...Object.values(e),this];return this._getFlatUnitsCache=r}_getCSSChunks(){if(this._getCssChunksCache)return this._getCssChunksCache;const e=[];e.push(Oy(this));for(const r of this._getFlatUnits())if(r.css&&r.css.length>0){let o=`/* Part ${r.id} */`;o+=r.css.map(i=>typeof i=="function"?i():i).join(`
46
- `)+`
47
- `,o=`.${this.getCssClass()} {
48
- ${o}
49
- }`,e.push({css:o,id:r.id})}return this._getCssChunksCache=e}},Oy=t=>{let e="",r="";for(const[s,d]of Object.entries(t.getParams())){const u=Dy(s,d);if(u===!1)C._errorOnce(`Invalid value for param ${s} - ${Uy(d)}`);else{const p=tu(s),h=p.replace("--ag-","--ag-inherited-");e+=` ${p}: var(${h}, ${u});
50
- `,r+=` ${h}: var(${p});
51
- `}}const o=`:where(.${t.getCssClass()})`;let i=`${o} {
52
- ${e}}
53
- `;return i+=`:has(> ${o}):not(${o}) {
54
- ${r}}
55
- `,{css:i,id:"variables"}},zy=t=>Array.from(new Set(Object.values(t.getParams()).flat().map(e=>e==null?void 0:e.googleFont).filter(e=>typeof e=="string"))).sort(),Yl=async({root:t,part:e,scope:r,css:o})=>{let i=`:scope > style[data-ag-part="${e}"]`;r&&(i+=`[data-ag-scope="${r}"]`);let s=t.querySelector(i);if(!s){s=document.createElement("style"),s.dataset.agPart=e,r&&(s.dataset.agScope=r);const d=t.querySelectorAll(":scope > style[data-ag-part]"),u=d[d.length-1];u?u.insertAdjacentElement("afterend",s):t.firstElementChild?t.firstElementChild.insertAdjacentElement("beforebegin",s):t.appendChild(s)}if(s._agTextContent!==o)return s.textContent=o,s._agTextContent=o,jy(s)},iu=(t,e)=>{for(const r of Array.from(e.querySelectorAll(`:scope > style[data-ag-scope="${t}"]`)))r.remove()},lu=new Set,Gy=async t=>{if(lu.has(t))return;lu.add(t);const e=`@import url('https://${su}/css2?family=${encodeURIComponent(t)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
56
- `;return Yl({css:e,part:`googleFont:${t}`,root:document.head})},su="fonts.googleapis.com",jy=t=>new Promise(e=>{const r=()=>{t.removeEventListener("load",r),e()};t.addEventListener("load",r)}),Uy=t=>t==null?String(t):`${typeof t} ${t}`,Zy='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&.ag-checked{background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:active,&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&.ag-checked:after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&.ag-indeterminate{background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&.ag-checked:after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',$y=Qo("checkboxStyle","default").withAdditionalParams({checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:{ref:"backgroundColor"},checkboxUncheckedBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxCheckedBackgroundColor:{ref:"accentColor"},checkboxCheckedBorderColor:{ref:"accentColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:{ref:"backgroundColor"},checkboxIndeterminateBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:{ref:"backgroundColor"},radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}}).withCSS(Zy),Wy=Qo("colorScheme","light"),Hy='.ag-icon:before{background-color:currentColor;content:"";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}',cu={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-down":'<path d="m6 9 6 6 6-6"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',"small-up":'<path d="m18 15-6-6-6 6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},qy=(t={})=>{let e=Hy;for(const r of Object.keys(cu)){const o=Ky(r,t.strokeWidth||1.5);e+=`.ag-icon-${r}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
57
- `}return e},Ky=(t,e)=>{const r=cu[t];if(!r)throw new Error(`Missing icon data for ${t}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon ag-icon-${t}" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${e}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+r+"</svg>"},Yy=(t={})=>Qo("iconSet","quartz").withCSS(()=>qy(t)),Jy=":where(input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)){-moz-appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}:where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color)}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}&.ag-ltr :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-left:var(--ag-input-padding-start)}&.ag-rtl :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-right:var(--ag-input-padding-start)}",Qy=Qo("inputStyle","base").withAdditionalParams({inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"}}).withCSS(Jy),Xy=Jd(Qy,"bordered").withParams({inputBackgroundColor:{ref:"backgroundColor"},inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:{ref:"accentColor"}},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:{ref:"foregroundColor",mix:.06,onto:"backgroundColor"},inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}}}),eb='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex;.ag-tabs-header{flex:1}}.ag-tabs-close-button-wrapper{border:0;padding:var(--ag-spacing)}&.ag-ltr .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}&.ag-rtl .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}&.ag-ltr .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-left-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-right-color:var(--ag-tab-selected-border-color)}}}&.ag-rtl .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-right-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-left-color:var(--ag-tab-selected-border-color)}}}',tb=Qo("tabStyle","base").withAdditionalParams({tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:"0",tabSelectedUnderlineTransitionDuration:"0",tabBarBorder:!1}).withCSS(eb),rb=Jd(tb,"quartz").withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"foregroundColor",mix:.05},tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:{ref:"backgroundColor"}}),nb=t=>Ly(t).withPart($y),ob=nb("quartz").withPart(Wy).withPart(Yy).withPart(rb).withPart(()=>Xy).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]});function du(){C.ModuleRegistry.registerModules([Ja.ClientSideRowModelModule,cf.InfiniteRowModelModule,cd.ServerSideRowModelModule,df.CsvExportModule,dd.ClipboardModule,ud.RangeSelectionModule,uf.RichSelectModule,pf.MenuModule,gf.ExcelExportModule,Ul,Yd]);const t=Pm("AGGRID_LICENSE");t?(Le.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const uu=ob.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#110529",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}),pu=Symbol("sdk-vue");function Jl(){return n.inject(pu)}function ab(t,e){let r;du();const o=()=>{t.loadBlockState().then(s=>{i.loaded=!0;const d=Sf(s,t),u=e(d),p=Object.fromEntries(Object.entries(u.routes).map(([h,f])=>{const y=typeof f=="function"?f():f;return[h,n.markRaw(y)]}));r=Object.assign(d,{...u,getRoute(h){return p[h]}})}).catch(s=>{console.error("load initial state error",s),i.error=s})},i=n.reactive({loaded:!1,error:void 0,useApp(){return ff(r,"App is not loaded")},install(s){s.provide(pu,this),o()}});return i}var ib=Object.defineProperty,lb=(t,e,r)=>e in t?ib(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,sb=(t,e,r)=>lb(t,e+"",r);function gu(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function cb(t,e,r){const o=Math.min(e,r),i=Math.max(e,r);return t>=o&&t<=i}function db(t){return new Promise(e=>setTimeout(e,t))}function ub(t){return t()}function di(t,e,r){return e>t?e:t>r?r:t}function hu(t,e){return e(t)}function Mn(t,e){if(t!=null)return e(t)}function pb(t){if(t&&t.ok)return t.value}async function gb(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,r])=>[e,await r])))}const fu=t=>t;function hb(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function fb(t){let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(hb(65,91));return e}function mb(){return fb(42)}function Xo(t){return t!==null&&typeof t=="object"}function vb(t,e){return Object.keys(t).map(r=>e(t[r],r))}function Ql(t,e){return Xo(t)&&Xo(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(r=>Ql(t[r],e[r])):t===e}function ea(t){if(Array.isArray(t)){const e=[];for(let r=0;r<t.length;r++)e[r]=ea(t[r]);return e}else if(Xo(t)){const e={};return Object.keys(t).forEach(r=>{e[r]=ea(t[r])}),e}else return t}function yb(t){return Array.isArray(t)?Object.assign([],t):Xo(t)?Object.assign({},t):t}function bb(t,e){const r={};for(const o in e)e[o]!==t[o]&&(r[o]=t[o]);return r}function wb(t,e,r){return Object.assign({},t,{[e]:r})}function xb(t){return Object.entries(t).forEach(([e,r])=>{r instanceof Function&&(t[e]=r.bind(t))}),t}function Cb(t,e,r){return t[e]=r,t}function _b(t,e){return t[e]}function kb(t,e){t={...t};const r=t[e];return delete t[e],[r,t]}function Sb(t,...e){return Object.assign({},...e.map(r=>({[r]:t[r]})))}function Tb(t,...e){return e.map(r=>t[r])}function Eb(t,...e){const r=Object.assign({},t);return e.forEach(o=>delete r[o]),r}const Xl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:xb,deepClone:ea,deepEqual:Ql,getProp:_b,iSet:wb,isObject:Xo,map:vb,omit:Eb,pick:Sb,pickValues:Tb,setProp:Cb,shallowClone:yb,shallowDiff:bb,shiftProp:kb},Symbol.toStringTag,{value:"Module"}));function Nb(t,e){const r=t.findIndex(e);if(r<0)return[];const o=(()=>{for(let i=r;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(r,o)}function mu(t,e,r){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const Ab=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Mb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Bb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Pb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],vu=(t,e)=>{let r=String(t);return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e):e===!0&&(r=t.toLocaleString(void 0)),r};function es(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const r=e.bits?e.binary?Pb:Bb:e.binary?Mb:Ab;if(e.signed&&t===0)return` 0 ${r[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=vu(t,e.locale);return i+p+" "+r[0]}const s=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),r.length-1);t/=(e.binary?1024:1e3)**s,t=Number(t.toPrecision(3));const d=vu(Number(t),e.locale),u=r[s];return i+d+" "+u}const Db={class:"context-menu"},Vb=["onClick"],Lb=n.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const r=e,o=i=>{i.cb(),r("close")};return(i,s)=>(n.openBlock(),n.createElementBlock("div",Db,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.options,(d,u)=>(n.openBlock(),n.createElementBlock("div",{key:u,onClick:n.withModifiers(p=>o(d),["stop"])},[n.createElementVNode("span",null,n.toDisplayString(d.text),1)],8,Vb))),128))]))}}),rn=(t,e)=>{const r=t.__vccOpts||t;for(const[o,i]of e)r[o]=i;return r},Ib=rn(Lb,[["__scopeId","data-v-12530966"]]);function ts(t,e){t.preventDefault();const r=()=>{n.render(null,document.body)},o=n.h(Ib,{options:e,onClose:()=>{r()}});n.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",s=>{i.contains(s.target)||r()}),r}const yu=Symbol(),ui=()=>n.inject(yu),Fb=["value"],Rb={key:1},Ob=n.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=t,i=n.reactive({edit:!1}),s=n.computed(()=>o.valueType),d=h=>{var f;let y=(f=h.target)==null?void 0:f.value;const S=n.unref(s),k=ub(()=>S==="integer"?parseInt(y,10):S==="float"?Number(y):y);r("update:modelValue",k),i.edit=!1},u=n.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var f,y;(y=(f=u.value)==null?void 0:f.querySelector("input"))==null||y.focus()}))};return(h,f)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"baseRef",ref:u,class:n.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:f[0]||(f[0]=y=>i.edit=!1),onChange:d},null,40,Fb)):(n.openBlock(),n.createElementBlock("div",Rb,n.toDisplayString(h.modelValue),1))],2))}}),zb=["^data-row-index"],Gb={key:0,class:"control-cell"},jb=n.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,r=ui(),o=n.computed(()=>e.cell.column.valueType),i=h=>{Mn(r.settings.value.onUpdatedRow,f=>{const y=e.cell.row,S={...y.dataRow,[e.cell.id]:h};f({...y,dataRow:S})})},s=h=>{h.metaKey&&r.selectRow(e.cell.row.primaryKey)},d=(h,f)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=r.settings??{},S=[],{onSelectedRows:k,onSelectedColumns:D}=y.value,E=r.data.selectedRows.has(f.primaryKey);k&&k.length&&(E?S.push({text:"Deselect row",cb(){r.data.selectedRows.delete(e.cell.row.primaryKey)}}):S.push({text:"Select row",cb(){r.selectRow(e.cell.row.primaryKey)}})),D&&D.length&&(S.push({text:"Select column",cb(){r.selectColumn(e.cell.column.id)}}),S.push({text:"Unselect column",cb(){r.unselectColumn(e.cell.column.id)}})),S.length&&ts(h,S)},u=n.ref(),p=n.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,f)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"cellRef",ref:u,class:n.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:s,onContextmenu:f[0]||(f[0]=y=>d(y,h.cell.row))},[h.cell.control?(n.openBlock(),n.createElementBlock("div",Gb,n.toDisplayString(h.cell.row.index),1)):p.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(n.openBlock(),n.createBlock(Ob,{key:2,"model-value":h.cell.value,"value-type":o.value,editable:h.cell.column.editable,"onUpdate:modelValue":i},null,8,["model-value","value-type","editable"]))],42,zb))}}),Ub={},Zb={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $b(t,e){return n.openBlock(),n.createElementBlock("svg",Zb,e[0]||(e[0]=[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),n.createTextVNode(),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const Wb=rn(Ub,[["render",$b]]),Hb={class:"tr-head"},qb=n.defineComponent({__name:"TrHead",setup(t){return(e,r)=>(n.openBlock(),n.createElementBlock("div",Hb,[n.renderSlot(e.$slots,"default")]))}});function Kb(t,e){const r=e.indexOf(t)+1;return e[r>=e.length?0:r]}function Yb(t,e){const r=t.findIndex(e);if(r<0)return[];const o=(()=>{for(let i=r;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(r,o)}const Jb=["^data-col-id"],Qb=n.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const r=e;function o(s){s.preventDefault();const d=[];d.length&&ts(s,d)}function i(s){var d;const u=((d=s.sort)==null?void 0:d.direction)??"DESC";r("change:sort",{colId:s.id,direction:Kb(u,["DESC","ASC"])})}return(s,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["cell th-cell",{"justify-center":s.col.justify,frozen:s.col.frozen}]),"^data-col-id":s.col.id,onContextmenu:o},[s.col.valueType?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(s.col.valueType)},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(s.col.label)+" ",1),s.col.sort?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["sort",s.col.sort.direction]),onClick:d[0]||(d[0]=n.withModifiers(()=>i(s.col),["stop"]))},null,2)):n.createCommentVNode("",!0)],42,Jb))}}),Xb=n.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=n.ref(),r=()=>{n.nextTick().then(()=>{Mn(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"trRef",ref:e,class:n.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:n.normalizeStyle(o.row.style),onScroll:r},[n.renderSlot(o.$slots,"default")],38))}}),ew=n.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=ui(),r=t,o=n.computed(()=>e.data.selectedColumns.has(r.column.id));return(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function et(t,e,r,o){n.onMounted(()=>{var i;return(i=n.unref(t))==null?void 0:i.addEventListener(e,r,o)}),n.onUnmounted(()=>{var i;return(i=n.unref(t))==null?void 0:i.removeEventListener(e,r,o)})}function tw(t){n.onMounted(()=>window.addEventListener("mouseup",t)),n.onUnmounted(()=>window.removeEventListener("mouseup",t))}function rw(t){let e=!1;return function(...r){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...r),e=!1}),e=!0)}}function nw(t,e){let r;function o(s){r={...s}}tw(()=>{r=void 0,e()});const i=rw(t);return et(window,"mousemove",s=>{r&&i({x:r.x,width:r.width,diff:s.x-r.x})}),{start:o}}const no=1,ow=10,aw=30,bu=60;function wu(){const t=n.reactive({x:0,y:0});function e(r){t.x=r.pageX,t.y=r.pageY}return n.onMounted(()=>window.addEventListener("mousemove",e)),n.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function xu(t,e={}){const{delayEnter:r=0,delayLeave:o=0}=e,i=n.ref(!1);let s;const d=u=>{const p=u?r:o;s&&(clearTimeout(s),s=void 0),p?s=setTimeout(()=>i.value=u,p):i.value=u};return window&&(et(t,"mouseenter",()=>d(!0)),et(t,"mouseleave",()=>d(!1))),i}function iw(t){var e;const r=Mn((e=n.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return r.map(o=>{const{width:i,x:s}=o.getBoundingClientRect(),d=o.getAttribute("data-col-id");return fu({colId:d,width:i,x:s,right:s+i})}).slice(0,r.length-1)}function lw(t,e){const r=wu(),o=xu(e,{}),{data:i}=t,s=nw(u=>{Mn(i.resizeTh,p=>{const h=i.columns.find(f=>f.id===p.colId);h&&(h.width=di(u.width+u.diff,aw,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),d=u=>{i.resizeTh&&(i.resize=!0,s.start({x:u.x,width:i.resizeTh.width}))};return n.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const u=iw(e).find(p=>Math.abs(r.x-p.right)<ow);u?(document.body.style.cursor="col-resize",i.resizeTh=u):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:d}}const sw={key:0,class:"command-menu"},cw={key:0},dw=["onClick"],uw=n.defineComponent({__name:"RowsCommandMenu",setup(t){const e=ui(),r=n.computed(()=>e.getSelectedRows()),o=n.computed(()=>r.value.length>0),i=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedRows)??[]}),s=n.computed(()=>i.value.map(d=>({label:d.label,cb:()=>{d.cb(r.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(d,u)=>o.value?(n.openBlock(),n.createElementBlock("div",sw,[r.value.length?(n.openBlock(),n.createElementBlock("span",cw,n.toDisplayString(r.value.length)+" rows selected",1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,dw))),128))])):n.createCommentVNode("",!0)}}),pw={key:0,class:"command-menu"},gw={key:0},hw=["onClick"],fw=n.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=ui(),r=n.computed(()=>e.getSelectedColumns()),o=n.computed(()=>r.value.length>0),i=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedColumns)??[]}),s=n.computed(()=>i.value.map(d=>({label:d.label,cb:()=>{d.cb(r.value),e.data.selectedColumns.clear()}})));return(d,u)=>o.value?(n.openBlock(),n.createElementBlock("div",pw,[r.value.length?(n.openBlock(),n.createElementBlock("span",gw,"selected columns "+n.toDisplayString(r.value.length),1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,hw))),128))])):n.createCommentVNode("",!0)}});function nn(t,e){const r={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-r.x,dy:i.y-r.y});et(document,"mousedown",i=>{i.target===n.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),r.el=n.unref(t),r.x=i.x,r.y=i.y)}),et(document,"mouseup",i=>{r.el&&(r.el=void 0,e({...o(i),stop:!0},r))}),et(document,"mousemove",i=>{r.el&&e(o(i),r)})}const mw=n.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const r=e,o=t,i=n.ref(),s=n.computed(()=>o.windowSize-12),d=n.computed(()=>o.windowSize<o.dataSize),u=n.computed(()=>Math.ceil(o.offset*(s.value/o.dataSize))),p=n.computed(()=>Math.ceil(s.value*s.value/o.dataSize)),h=n.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return nn(i,(f,y)=>{const S=(u.value+f.dy)*o.dataSize/s.value;r("change:offset",S),y.x=f.x,y.y=f.y}),(f,y)=>(n.openBlock(),n.createElementBlock("div",{class:"t-scroll",style:n.normalizeStyle({height:`${f.windowSize}px`})},[n.createElementVNode("div",null,[d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"handleRef",ref:i,class:"t-scroll__handle",style:n.normalizeStyle(h.value)},null,4)):n.createCommentVNode("",!0)])],4))}});function vw(t){return n.computed(()=>{const{data:e,settings:r}=t,{bodyWidth:o,scrollLeft:i}=e,s=[...e.columns],d=mb();r.value.controlColumn&&s.unshift({id:d,label:"#",width:60,frozen:!0});let u=0;const p=s.map(f=>{const y={...f,offset:u};return u+=f.width+no,y}),h=p.filter(f=>f.frozen);return Nb(p,f=>f.frozen?!1:i<f.offset+f.width&&f.offset<o+i).concat(h).map(f=>({...f,style:{left:f.frozen?`${f.offset}px`:`${f.offset-e.scrollLeft}px`,width:`${f.width}px`},control:f.id===d}))})}function yw(t,e){const r=n.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return n.computed(()=>t.rows.map(o=>{const i=r.value,{primaryKey:s,offset:d,dataRow:u,height:p}=o,h=e.value.map(f=>({id:f.id,column:f,row:o,value:u[f.id],class:i[f.id],editable:f.editable,width:f.width,style:f.style,control:f.control}));return fu({style:{top:`${d-t.scrollTop}px`,height:`${o.height}px`},primaryKey:s,offset:d,height:p,cells:h,selected:t.selectedRows.has(s)})}))}const bw=async(t,e)=>{const{scrollTop:r,bodyHeight:o}=t;return await db(0),gb({rows:e.getRows(r,o),dataWindow:t})};function ww(t){const e=n.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});n.watch(()=>t.settings,f=>{e.columns=ea(f.columns),e.currentWindow=void 0,f.dataSource.getHeight().then(y=>{e.dataHeight=y,h.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const r=n.computed(()=>t.settings),o=n.computed(()=>e.columns.reduce((f,y)=>f+y.width+no,0)),i=n.computed(()=>hu(h.data.dataHeight-h.data.bodyHeight,f=>f>0?f:0)),s=n.computed(()=>hu(o.value-h.data.bodyWidth,f=>f>0?f:0)),d=n.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=vw({data:e,settings:r}),p=yw(e,u),h={data:e,settings:r,tableColumns:u,tableRows:p,adjustWidth:()=>{const f=e.columns.reduce((S,k)=>S+k.width+no,0),y=e.bodyWidth+e.scrollLeft;if(f<y){const S=e.columns[e.columns.length-1];S.width=S.width+(y-f)}},updateOffsets(f){this.updateScrollTop(e.scrollTop+f.deltaY),this.updateScrollLeft(e.scrollLeft+f.deltaX)},getSelectedRows(){return e.rows.filter(f=>e.selectedRows.has(f.primaryKey))},getSelectedColumns(){return e.columns.filter(f=>e.selectedColumns.has(f.id))},selectRow(f){e.selectedRows.add(f)},unselectRow(f){e.selectedRows.delete(f)},selectColumn(f){e.selectedColumns.add(f)},unselectColumn(f){e.selectedColumns.delete(f)},updateScrollTop(f){e.scrollTop=di(f,0,i.value)},updateScrollLeft(f){e.scrollLeft=di(f,0,s.value)},updateBodyHeight(){const{height:f}=t.settings,{dataHeight:y}=e,S=f>y?y:f;e.bodyHeight=S},updateDimensions(f){this.updateBodyHeight(),h.data.bodyWidth=f.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return n.watch(d,(f,y)=>{const S=f.current;(!S||f.scrollTop<S.scrollTop||f.scrollTop+f.bodyHeight>S.bodyHeight+S.scrollTop)&&(e.currentWindow={scrollTop:f.scrollTop-bu,bodyHeight:f.bodyHeight+bu*2},bw(ea(e.currentWindow),r.value.dataSource).then(({rows:k,dataWindow:D})=>{Ql(e.currentWindow,D)&&(e.rows=k)}))},{deep:!0,immediate:!0}),n.provide(yu,h),h}const xw={class:"command-menu__container"},Cw={key:0,class:"table-body__no-data"},_w={class:"carets"},rs=n.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const r=e,o=t,i=ww(o),s=n.computed(()=>i.data.rows.length===0),d=n.computed(()=>({height:s.value?"212px":i.data.bodyHeight+"px"}));n.watch(i.data,E=>r("update:data",E),{deep:!0}),n.watch(o,()=>f);const u=n.ref(),p=n.ref(),h=n.ref(),f=()=>{Mn(h.value,E=>{i.updateDimensions(E.getBoundingClientRect())})},y=i.tableColumns,S=i.tableRows,{mouseDown:k}=lw(i,u);n.onMounted(()=>{n.nextTick(f)}),n.watchPostEffect(()=>{n.unref(o.settings),n.nextTick(f)}),et(window,"resize",()=>n.nextTick(f));const D=E=>{E.preventDefault(),i.updateOffsets(E)};return(E,A)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:A[2]||(A[2]=(...w)=>n.unref(k)&&n.unref(k)(...w))},[n.createElementVNode("div",xw,[n.createVNode(uw),A[3]||(A[3]=n.createTextVNode()),n.createVNode(fw)]),A[7]||(A[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[n.createVNode(qb,null,{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(y),(w,L)=>(n.openBlock(),n.createBlock(Qb,{key:L,col:w,style:n.normalizeStyle(w.style),"onChange:sort":A[0]||(A[0]=R=>E.$emit("change:sort",R))},null,8,["col","style"]))),128))]),_:1})],512),A[8]||(A[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:n.normalizeStyle(d.value),onWheel:D},[s.value?(n.openBlock(),n.createElementBlock("div",Cw,[n.createElementVNode("div",null,[n.createVNode(Wb),A[4]||(A[4]=n.createTextVNode()),A[5]||(A[5]=n.createElementVNode("div",null,"No Data To Show",-1))])])):n.createCommentVNode("",!0),A[6]||(A[6]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(S),(w,L)=>(n.openBlock(),n.createBlock(Xb,{key:L,row:w},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(w.cells,R=>(n.openBlock(),n.createBlock(jb,{key:R.column.id+":"+L,cell:R,style:n.normalizeStyle(R.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),A[9]||(A[9]=n.createTextVNode()),n.createElementVNode("div",_w,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(y),(w,L)=>(n.openBlock(),n.createBlock(ew,{key:L,column:w,style:n.normalizeStyle(w.style),"onChange:sort":A[1]||(A[1]=R=>E.$emit("change:sort",R))},null,8,["column","style"]))),128))]),A[10]||(A[10]=n.createTextVNode()),n.createVNode(mw,{offset:n.unref(i).data.scrollTop,"window-size":n.unref(i).data.bodyHeight,"data-size":n.unref(i).data.dataHeight,"onChange:offset":n.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Cu=new WeakMap;class kw{constructor(e,r,o){sb(this,"dataHeight"),this.datum=e,this.resolveHeight=r,this.resolvePrimaryKey=o;const i=e.reduce((d,u,p)=>(d.indices.set(p,d.total),d.total+=this.resolveHeight(u,p)+no,d),{total:0,indices:new Map});this.dataHeight=i.total;const s=e.map((d,u)=>({dataRow:d,index:u,primaryKey:this.resolvePrimaryKey(d,u),offset:gu(i.indices.get(u)),height:this.resolveHeight(d,u)}));Cu.set(this,s)}get rows(){return Cu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,r){return Yb(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<r+e})}}class Sw{constructor(e,r,o){this.api=e,this.rowHeight=r,this.resolvePrimaryKey=o}get height(){return this.rowHeight+no}async getHeight(){return await this.api.count()*this.height}async getRows(e,r){const o=di(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(r+40/this.height);return(await this.api.query({offset:o,limit:i})).map((s,d)=>({dataRow:s,index:o+d,primaryKey:this.resolvePrimaryKey(s,o+d),offset:(o+d)*(this.rowHeight+no),height:this.rowHeight}))}}function Tw(t){return Object.freeze(t)}function Ew(t){return n.h(rs,{settings:Object.freeze(t)})}function ns(t,e){const r=new kw(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:r}}function Nw(t,e){return n.computed(()=>{const r=n.unref(t);return ns(r,n.unref(e))})}function Aw(t,e){const r=n.computed(()=>{const i=n.unref(t);return ns(i,n.unref(e))}),o=n.reactive({settings:r});return n.computed(()=>n.h(rs,o))}const Mw=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:Sw,Component:rs,factory:Ew,rawDataSettings:ns,settings:Tw,useRawData:Nw,useRawDataComponent:Aw},Symbol.toStringTag,{value:"Module"}));function*Bw(t,e){for(const r of t)yield e(r)}function Pw(t){const e=[];for(const r of t)e.push(r);return e}function _u(t){return t()}function os(t,e){if(t==null)throw Error(e);return t}function as(t){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{t(...r),e=!1}),e=!0)}}function ku(t){return new Promise(e=>setTimeout(e,t))}function Su(t,e){const r=setTimeout(t,e);return()=>{clearTimeout(r)}}function Tu(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Dw(t){let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(Tu(65,91));return e}function Eu(t){return function(e){return 1-t(1-e)}}function Vw(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function Nu(t){const{duration:e,draw:r,timing:o}=t,i=performance.now();let s=!1;return requestAnimationFrame(function d(u){let p=(u-i)/e;(p>1||s)&&(p=1);const h=o(p);r(h),p<1&&requestAnimationFrame(d)}),function(){s=!0}}function Lw(t){const{getFraction:e,draw:r,timing:o}=t,i=performance.now();let s=!1;return requestAnimationFrame(function d(u){let p=e(u-i);if(s)return;p>1&&(p=1);const h=o(p);r(h),p<1&&requestAnimationFrame(d)}),function(){s=!0}}function Au(t,e){let r=-1;return(...o)=>{r!==-1&&(clearTimeout(r),r=-1),r=window.setTimeout(()=>t(...o),e)}}function Mu(t,e,r=!0){let o=0,i;return function(...s){i=()=>{t.apply(this,s),o=new Date().getTime()+e,i=null,r&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function Iw(t){return t.map(e=>({text:String(e),value:e}))}function Bn(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const is=new Map;function Fw(t){return is.has(t)||is.set(t,n.ref(localStorage.getItem(t))),os(is.get(t),"...")}function Rw(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function Bu(t){const e=Fw(t);return n.watch(e,r=>Rw(t,r)),e}const ls=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{Pw(Bw(ls.values(),e=>e(t.matches?"dark":"light")))});const Ow=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",Pu=n.ref(Ow),ss=Bu("theme");function Du(t){const e=n.computed(()=>ss.value?ss.value:Pu.value),r=i=>{Pu.value=i,t&&t(i)};function o(){ss.value=e.value==="light"?"dark":(e.value,"light")}return n.watch(e,i=>{t&&t(n.unref(i))}),n.onMounted(()=>{ls.add(r)}),n.onUnmounted(()=>{ls.delete(r)}),[e,o]}const zw=n.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,r]=Du();return(o,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-theme-switcher",n.unref(e)]),onClick:i[0]||(i[0]=(...s)=>n.unref(r)&&n.unref(r)(...s))},i[1]||(i[1]=[n.createElementVNode("div",null,null,-1)]),2))}}),Gw={class:"pl-layout-component pl-block-page"},jw={key:0,class:"pl-block-page__title"},Uw={class:"pl-block-page__title__append"},Zw={key:1},$w={class:"pl-block-page__body"},Ww={name:"PlBlockPage"},Hw=n.defineComponent({...Ww,setup(t){const e=n.useSlots();return(r,o)=>(n.openBlock(),n.createElementBlock("div",Gw,[n.unref(e).title?(n.openBlock(),n.createElementBlock("div",jw,[n.createElementVNode("h1",null,[n.renderSlot(r.$slots,"title")]),o[0]||(o[0]=n.createTextVNode()),n.createElementVNode("div",Uw,[n.renderSlot(r.$slots,"append")])])):(n.openBlock(),n.createElementBlock("div",Zw)),o[1]||(o[1]=n.createTextVNode()),n.createElementVNode("div",$w,[n.renderSlot(r.$slots,"default")])]))}}),qw={name:"PlContainer"},Kw=n.defineComponent({...qw,props:{width:{}},setup(t){const e=t,r=n.computed(()=>({width:e.width}));return(o,i)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-container pl-layout-component",style:n.normalizeStyle(r.value)},[n.renderSlot(o.$slots,"default")],4))}}),Yw={name:"PlRow"},Jw=n.defineComponent({...Yw,props:{wrap:{type:Boolean},alignCenter:{type:Boolean}},setup(t){return(e,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[n.renderSlot(e.$slots,"default")],2))}}),Qw={class:"pl-layout-component",style:{"flex-grow":"1"}},Xw={name:"PlSpacer"},Vu=n.defineComponent({...Xw,setup(t){return(e,r)=>(n.openBlock(),n.createElementBlock("div",Qw))}}),e0={name:"PlGrid"},t0=n.defineComponent({...e0,props:{columns:{}},setup(t){const e=t,r=n.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-layout-component pl-grid",style:n.normalizeStyle(r.value)},[n.renderSlot(o.$slots,"default")],4))}}),r0={key:0,class:"pl-alert__icon"},n0={class:"pl-alert__main"},o0={key:0},a0={class:"pl-alert__main__text"},i0={name:"PlAlert"},l0=n.defineComponent({...i0,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(r,o)=>r.modelValue?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["pl-alert",[{monospace:r.monospace,whiteSpacePre:r.whiteSpacePre},r.type?`pl-alert__${r.type}`:""]]),style:n.normalizeStyle({maxHeight:r.maxHeight})},[r.icon&&r.type?(n.openBlock(),n.createElementBlock("div",r0,[n.createElementVNode("div",{class:n.normalizeClass(`icon-24 icon-${e[r.type]}`)},null,2)])):n.createCommentVNode("",!0),o[2]||(o[2]=n.createTextVNode()),n.createElementVNode("div",n0,[r.label?(n.openBlock(),n.createElementBlock("label",o0,n.toDisplayString(r.label),1)):n.createCommentVNode("",!0),o[1]||(o[1]=n.createTextVNode()),n.createElementVNode("div",a0,[n.renderSlot(r.$slots,"default")])]),o[3]||(o[3]=n.createTextVNode()),r.closeable?(n.openBlock(),n.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=i=>r.$emit("update:modelValue",!1))})):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0)}}),ta=n.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,r=n.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=n.computed(()=>`mask-16 mask-${e.name}`);return(i,s)=>(n.openBlock(),n.createElementBlock("i",{style:n.normalizeStyle(r.value),class:n.normalizeClass(o.value)},null,6))}});function Lu(t){function e(r){const o=r.currentTarget,i=document.createElement("span"),s=Math.max(o.clientWidth,o.clientHeight),d=s/2;i.style.width=i.style.height=`${s}px`,i.style.left=`${r.clientX-o.offsetLeft-d}px`,i.style.top=`${r.clientY-o.offsetTop-d}px`,i.classList.add("ripple");const u=o.getElementsByClassName("ripple")[0];u&&u.remove(),o.appendChild(i)}n.onMounted(()=>{var r;(r=t.value)==null||r.addEventListener("click",e)})}const s0={key:0},c0={inheritAttrs:!1},pi=n.defineComponent({...c0,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,r=n.ref(),o=n.computed(()=>e.small||e.size==="small"),i=n.computed(()=>e.large||e.size==="large");return Lu(r),(s,d)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btn",ref:r,tabindex:"0",class:{loading:s.loading,small:o.value,large:i.value,round:s.round,reverse:s.reverse,justifyCenter:s.justifyCenter,[s.$attrs.class+""]:!0}},{...s.$attrs,disabled:!!s.$attrs.disabled||s.loading}),[s.round?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",s0,[n.renderSlot(s.$slots,"default")])),d[0]||(d[0]=n.createTextVNode()),s.loading?(n.openBlock(),n.createBlock(n.unref(ta),{key:1,name:"loading",size:s.size},null,8,["size"])):s.icon?(n.openBlock(),n.createBlock(n.unref(ta),{key:2,name:s.icon,size:s.size},null,8,["name","size"])):n.createCommentVNode("",!0)],16))}}),d0={name:"PlBtnPrimary"},cs=n.defineComponent({...d0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(r,o)=>(n.openBlock(),n.createBlock(pi,n.mergeProps({class:"pl-btn-primary"},e),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},16))}}),u0={name:"PlBtnAccent"},p0=n.defineComponent({...u0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(r,o)=>(n.openBlock(),n.createBlock(pi,n.mergeProps({class:"pl-btn-accent"},e),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},16))}}),g0={name:"PlBtnDanger"},h0=n.defineComponent({...g0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(r,o)=>(n.openBlock(),n.createBlock(pi,n.mergeProps({class:"pl-btn-danger"},e),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},16))}}),f0={name:"PlBtnSecondary"},ds=n.defineComponent({...f0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(r,o)=>(n.openBlock(),n.createBlock(pi,n.mergeProps(e,{class:"pl-btn-secondary"}),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},16))}}),m0={key:0},v0={name:"PlBtnGhost"},us=n.defineComponent({...v0,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,r=n.computed(()=>e.size==="small"),o=n.computed(()=>e.size==="large"),i=n.ref(),s=n.useSlots();return Lu(i),(d,u)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btnRef",ref:i,tabindex:"0",class:["pl-btn-ghost",{loading:d.loading,small:r.value,large:o.value,round:d.round,reverse:d.reverse,justifyCenter:d.justifyCenter,[d.$attrs.class+""]:!0}]},{...d.$attrs,disabled:!!d.$attrs.disabled||d.loading}),[n.unref(s).default&&!d.round?(n.openBlock(),n.createElementBlock("span",m0,[n.renderSlot(d.$slots,"default")])):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),d.loading?(n.openBlock(),n.createBlock(n.unref(ta),{key:1,name:"loading",size:d.size},null,8,["size"])):d.icon?(n.openBlock(),n.createBlock(n.unref(ta),{key:2,name:d.icon,size:d.size},null,8,["name","size"])):n.createCommentVNode("",!0),u[1]||(u[1]=n.createTextVNode()),n.renderSlot(d.$slots,"append")],16))}}),y0=n.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,r=n.ref(!1);return(o,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:r.value}]),onMouseover:i[0]||(i[0]=s=>r.value=!0),onMouseleave:i[1]||(i[1]=s=>r.value=!1)},[n.createVNode(ds,n.mergeProps({round:"",hover:r.value},e),null,16,["hover"]),i[2]||(i[2]=n.createTextVNode()),n.renderSlot(o.$slots,"default")],34))}});function ra(t,e){const r=as(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:s,scrollWidth:d,clientHeight:u,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:s,scrollWidth:d,clientHeight:u,clientWidth:p,offsetY:o+h.y,offsetX:i+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});n.onMounted(r),et(window,"scroll",r,{capture:!0,passive:!0}),et(window,"resize",r,{passive:!0}),et(window,"adjust",r,!0)}function b0(t,e){const r=n.ref();return ra(t,o=>{r.value=o}),n.computed(()=>{const o=n.unref(r),i=n.unref(e),s=i.position??"top",d=i.gap??8;if(!o)return"";const u=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return s==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-d}px;`:s==="top"?`left: ${p}px; top: ${o.offsetY-d}px;`:s==="right"?`left: ${o.offsetX+o.width+d}px; top: ${u}px;`:s==="left"?`right: ${o.scrollWidth-o.x+d}px; top: ${u}px;`:""})}function na(t,e){return e(t)}function ot(t,e){if(t!=null)return e(t)}function w0(t){return Array.isArray(t)?t:[t]}function x0(t,e,...r){r.forEach(o=>{t[o]=e[o]})}function gi(t,e){et(document,"click",r=>{document.contains(r.target)&&(w0(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(r.target))||e())})}const C0={},_0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k0(t,e){return n.openBlock(),n.createElementBlock("svg",_0,e[0]||(e[0]=[n.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const S0=rn(C0,[["render",k0]]),ps=new Map,T0={name:"PlTooltip"},Vt=n.defineComponent({...T0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const r=e,o=Symbol(),i=t,s=n.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});ps.set(o,()=>h()),n.watch(()=>s.open,E=>{requestAnimationFrame(()=>{s.tooltipOpen=E})});let d=()=>{};const u=Mu(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{s.open=!0;for(let[E,A]of ps.entries())E!==o&&A()},h=()=>{s.open=!1,r("tooltip:close")},f=async()=>{i.hide||(u(),s.over=!0,d(),await ku(100),s.over&&p())},y=()=>{s.over=!1,d=Su(()=>{s.over||h()},i.closeDelay)};n.watch(()=>i.hide,E=>{E&&h()});const S=n.ref(),k=n.ref(),D=b0(S,n.toRef(i));return gi([S,k],()=>h()),n.onUnmounted(()=>{ps.delete(o)}),(E,A)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(E.element),n.mergeProps(E.$attrs,{ref_key:"rootRef",ref:S,onClick:f,onMouseover:f,onMouseleave:y}),{default:n.withCtx(()=>[n.renderSlot(E.$slots,"default"),A[1]||(A[1]=n.createTextVNode()),E.$slots.tooltip&&s.open?(n.openBlock(),n.createBlock(n.Teleport,{key:0,to:"body"},[n.createVNode(n.Transition,{name:"tooltip-transition"},{default:n.withCtx(()=>[s.tooltipOpen?(n.openBlock(),n.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:n.normalizeStyle(n.unref(D))},[n.createElementVNode("div",{ref_key:"tooltip",ref:k,class:n.normalizeClass(["pl-tooltip",E.position]),onMouseover:f,onMouseleave:y},[n.createElementVNode("div",null,[n.renderSlot(E.$slots,"tooltip")]),A[0]||(A[0]=n.createTextVNode()),n.createVNode(S0)],34)],4)):n.createCommentVNode("",!0)]),_:3})])):n.createCommentVNode("",!0)]),_:3},16))}}),E0={},N0={class:"inner-border"};function A0(t,e,r,o,i,s){return n.openBlock(),n.createElementBlock("div",N0,[n.renderSlot(t.$slots,"default")])}const M0=rn(E0,[["render",A0]]),B0={key:0},P0=["tabindex","onKeydown","onClick"],D0={key:1,class:"ui-btn-group__helper"},V0={key:2,class:"ui-btn-group__error"},L0={name:"PlBtnGroup"},I0=n.defineComponent({...L0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=u=>o("update:modelValue",u),s=t,d=n.computed(()=>s.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-group",{disabled:u.disabled}])},[u.label?(n.openBlock(),n.createElementBlock("label",B0,[n.createElementVNode("span",null,n.toDisplayString(u.label),1),p[0]||(p[0]=n.createTextVNode()),n.unref(r).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(u.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),p[1]||(p[1]=n.createTextVNode()),n.createVNode(M0,{class:"ui-btn-group__container"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(h,f)=>(n.openBlock(),n.createElementBlock("div",{key:f,class:n.normalizeClass(["ui-btn-group__option text-s",{active:u.modelValue===h.value}]),tabindex:u.modelValue===h.value||u.disabled?void 0:0,onKeydown:n.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},n.toDisplayString(h.label),43,P0))),128))]),_:1}),p[2]||(p[2]=n.createTextVNode()),u.helper?(n.openBlock(),n.createElementBlock("div",D0,n.toDisplayString(u.helper),1)):u.error?(n.openBlock(),n.createElementBlock("div",V0,n.toDisplayString(u.error),1)):n.createCommentVNode("",!0)],2))}}),F0={inheritAttrs:!1},R0={class:"double-contour"};function O0(t,e,r,o,i,s){return n.openBlock(),n.createElementBlock("div",R0,[n.createElementVNode("div",n.normalizeProps(n.guardReactiveProps(t.$attrs)),[n.renderSlot(t.$slots,"default")],16)])}const on=rn(F0,[["render",O0]]);function Iu(t){n.onMounted(t),n.onUpdated(t)}const gs=new WeakMap,hs=new ResizeObserver(t=>{for(const e of t)ot(gs.get(e.target),r=>r(e))});function Fu(t,e){gs.set(t,e),hs.unobserve(t),hs.observe(t)}function Ru(t){hs.unobserve(t),gs.delete(t)}const z0=8,Ou=4;function Vr(t,e="label"){const r=new Set;Iu(()=>{ot(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(r.add(i),Fu(i,()=>{const s=_u(()=>i.getBoundingClientRect().width+na(z0,d=>Number.isNaN(d)?Ou:d+Ou));o.style.getPropertyValue("--label-offset-right-x")!==`${s}px`&&o.style.setProperty("--label-offset-right-x",`${s}px`)}))})}),n.onBeforeUnmount(()=>{Array.from(r.values()).map(o=>Ru(o))})}function G0(t,e){const r=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&r.push(i)}),{isValid:r.length===0,errors:r}}function zu(t,e){return n.computed(()=>G0(t.value,e))}const j0=n.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,r=n.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=n.computed(()=>`icon-16 icon-${e.name}`);return(i,s)=>(n.openBlock(),n.createElementBlock("i",{style:n.normalizeStyle(r.value),class:n.normalizeClass([o.value,i.$style.icon])},null,6))}}),U0="_icon_1ugxm_2",Z0={icon:U0},$0={$style:Z0},hi=rn(j0,[["__cssModules",$0]]),W0=n.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,r=n.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(n.openBlock(),n.createElementBlock("i",{class:n.normalizeClass([r.value,o.$style.icon])},null,2))}}),H0="_icon_1ugxm_2",q0={icon:H0},K0={$style:q0},Gu=rn(W0,[["__cssModules",K0]]),Y0={class:"pl-text-field__envelope"},J0={key:0,ref:"label"},Q0={key:0,class:"required-icon"},X0={key:1,class:"pl-text-field__prefix"},ex=["disabled","placeholder","type"],tx={class:"pl-text-field__append"},rx={key:0,class:"pl-text-field__error"},nx={key:1,class:"pl-text-field__helper"},ox={name:"PlTextField"},ju=n.defineComponent({...ox,props:n.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=n.useSlots(),r=n.useModel(t,"modelValue"),o=t,i=n.ref(void 0),s=n.ref(),d=n.ref(!1),u=n.reactive({cached:void 0}),p=n.computed({get(){return u.cached?u.cached.value:r.value===void 0||r.value===null?"":String(r.value)},set(H){if(u.cached=void 0,o.parse)try{r.value=o.parse(H)}catch(G){u.cached={error:G instanceof Error?G.message:String(G),value:H}}else r.value=H}}),h=n.computed(()=>o.type&&o.type==="password"?d.value?"text":o.type:"text"),f=n.computed(()=>d.value?"view-show":"view-hide"),y=()=>{o.clearable&&(u.cached=void 0,r.value=o.clearable===!0?"":o.clearable())},S=zu(p,o.rules||[]),k=n.computed(()=>o.clearable?o.clearable===!0?r.value==="":r.value===o.clearable():r.value===""),D=n.computed(()=>!k.value),E=n.computed(()=>{const H=[];return o.error&&H.push(o.error),u.cached&&H.push(u.cached.error),S.value.isValid||H.push(...S.value.errors),H}),A=n.computed(()=>E.value.length>0),w=n.computed(()=>o.clearable&&D.value&&o.type!=="password"),L=()=>d.value=!d.value,R=()=>{u.cached=void 0};return Vr(i),(H,G)=>(n.openBlock(),n.createElementBlock("div",Y0,[n.createElementVNode("div",{ref_key:"rootRef",ref:i,class:n.normalizeClass(["pl-text-field",{error:A.value,disabled:H.disabled,dashed:H.dashed,nonEmpty:D.value}])},[H.label?(n.openBlock(),n.createElementBlock("label",J0,[H.required?(n.openBlock(),n.createElementBlock("i",Q0)):n.createCommentVNode("",!0),G[1]||(G[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(H.label),1),G[2]||(G[2]=n.createTextVNode()),n.unref(e).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(H.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),G[5]||(G[5]=n.createTextVNode()),H.prefix?(n.openBlock(),n.createElementBlock("div",X0,n.toDisplayString(H.prefix),1)):n.createCommentVNode("",!0),G[6]||(G[6]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":G[0]||(G[0]=K=>p.value=K),disabled:H.disabled,placeholder:H.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:R},null,40,ex),[[n.vModelDynamic,p.value]]),G[7]||(G[7]=n.createTextVNode()),n.createElementVNode("div",tx,[w.value?(n.openBlock(),n.createBlock(n.unref(hi),{key:0,name:"delete-clear",onClick:y})):n.createCommentVNode("",!0),G[3]||(G[3]=n.createTextVNode()),H.type==="password"?(n.openBlock(),n.createBlock(n.unref(Gu),{key:1,name:f.value,style:{cursor:"pointer"},onClick:L},null,8,["name"])):n.createCommentVNode("",!0),G[4]||(G[4]=n.createTextVNode()),n.renderSlot(H.$slots,"append")]),G[8]||(G[8]=n.createTextVNode()),n.createVNode(on,{class:"pl-text-field__contour"})],2),G[9]||(G[9]=n.createTextVNode()),A.value?(n.openBlock(),n.createElementBlock("div",rx,n.toDisplayString(E.value.join(" ")),1)):H.helper?(n.openBlock(),n.createElementBlock("div",nx,n.toDisplayString(H.helper),1)):n.createCommentVNode("",!0)]))}}),ax={class:"ui-text-area__envelope"},ix={key:0,ref:"label"},lx={key:0,class:"required-icon"},sx=["readonly","rows","disabled","placeholder"],cx={class:"ui-text-area__append"},dx={key:0,class:"ui-text-area__error"},ux={key:1,class:"ui-text-area__helper"},px={name:"PlTextArea"},gx=n.defineComponent({...px,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.ref(),d=n.ref(),u=n.computed({get(){return i.modelValue??""},set(k){o("update:modelValue",k)}}),p=n.computed(()=>!!i.modelValue),h=zu(u,i.rules||[]);Vr(s);const f=n.computed(()=>{const k=[];return i.error&&k.push(i.error),k.push(...h.value.errors),k}),y=n.computed(()=>f.value.length>0),S=()=>{if(!i.autogrow)return;const k=d.value;k&&(k.style.height="auto",k.style.height=`${k.scrollHeight}px`)};return n.onMounted(()=>{S()}),(k,D)=>(n.openBlock(),n.createElementBlock("div",ax,[n.createElementVNode("div",{ref_key:"root",ref:s,class:n.normalizeClass(["ui-text-area",{error:y.value,disabled:k.disabled,dashed:k.dashed,nonEmpty:p.value}])},[k.label?(n.openBlock(),n.createElementBlock("label",ix,[k.required?(n.openBlock(),n.createElementBlock("i",lx)):n.createCommentVNode("",!0),D[1]||(D[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(k.label),1),D[2]||(D[2]=n.createTextVNode()),n.unref(r).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(k.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),D[3]||(D[3]=n.createTextVNode()),n.withDirectives(n.createElementVNode("textarea",{ref_key:"input",ref:d,"onUpdate:modelValue":D[0]||(D[0]=E=>u.value=E),readonly:k.readonly,rows:k.rows,disabled:k.disabled,placeholder:k.placeholder??"...",spellcheck:"false",onInput:S},null,40,sx),[[n.vModelText,u.value]]),D[4]||(D[4]=n.createTextVNode()),n.createElementVNode("div",cx,[n.renderSlot(k.$slots,"append")]),D[5]||(D[5]=n.createTextVNode()),n.createVNode(on,{class:"ui-text-area__contour"})],2),D[6]||(D[6]=n.createTextVNode()),y.value?(n.openBlock(),n.createElementBlock("div",dx,n.toDisplayString(f.value.join(" ")),1)):k.helper?(n.openBlock(),n.createElementBlock("div",ux,n.toDisplayString(k.helper),1)):n.createCommentVNode("",!0)]))}});function Uu(t,e){const r=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,s=e.getBoundingClientRect().height;return i+s<o+r&&i>r}function Zu(t,e){const r=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,s=e.getBoundingClientRect().height;return i+s<o+r?"ceil":i>r?"floor":"visible"}function oa(t,e,r={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,s=e.getBoundingClientRect().height,d=e.offsetTop,u=Zu(t,e);if(u==="visible")return;const p=h=>{const f=u==="floor"?d-(i-s):d;t.scrollTop=o+h*(f-o)};Uu(t,e)||Nu({duration:r.duration||100,timing:Eu(h=>h),draw:p})}function fs(t,e,r,o){return t.addEventListener(e,r,o),function(){t.removeEventListener(e,r)}}function hx(t,e){const r=e.getBoundingClientRect();return t.x<r.x||t.x>r.x+r.width||t.y<r.y||t.y>r.y+r.height}function $u(t){return t!==null&&typeof t=="object"}function Et(t,e){return $u(t)&&$u(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(r=>Et(t[r],e[r])):t===e}function ms(t,e){return t.some(r=>Et(r,e))}const fx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
43
+ </div>`}postConstruct(){this.setTemplate(this.createTemplate(),[b.AgToggleButtonSelector]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){const t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){const t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},Xy=class extends b.Component{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}init(t){const e=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...e,...t},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new zd),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new Jy),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new Za(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Md(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new za(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const[n]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>n())}this.initialised=!0}setPivotModeSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(t):t&&(this.pivotModePanel=this.createBean(new zd),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(t):t&&(this.rowGroupDropZonePanel=this.createManagedBean(new Za(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Md(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new za(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(t)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(t=>{if(!t)return;const e=t.getGui();t.toggleResizable(!e.classList.contains("ag-last-column-drop")&&!e.classList.contains("ag-hidden"))})}setLastVisible(){const t=this.getGui();Array.prototype.slice.call(t.querySelectorAll(".ag-column-drop")).forEach(s=>s.classList.remove("ag-last-column-drop"));const n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=b._last(n);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let n=0;n<e.length;n++){const i=e[n];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(b.ModuleNames.RowGroupingModule,"Row Grouping")}expandColumnGroups(t){this.primaryColsPanel.expandGroups(t)}collapseColumnGroups(t){this.primaryColsPanel.collapseGroups(t)}setColumnLayout(t){this.primaryColsPanel.setColumnLayout(t)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(t=>t()),this.childDestroyFuncs.length=0,b._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},Qy=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(t){this.aggFuncService=t.aggFuncService,this.columnModel=t.columnModel,this.columnApplyStateService=t.columnApplyStateService}selectAllChildren(t,e,n){const i=this.extractAllLeafColumns(t);this.setAllColumns(i,e,n)}setColumn(t,e,n){this.setAllColumns([t],e,n)}setAllColumns(t,e,n){this.columnModel.isPivotMode()?this.setAllPivot(t,e,n):this.setAllVisible(t,e,n)}extractAllLeafColumns(t){const e=[],n=i=>{i.forEach(s=>{s.isPassesFilter()&&(s.isGroup()?n(s.getChildren()):e.push(s.getColumn()))})};return n(t),e}setAllVisible(t,e,n){const i=[];t.forEach(s=>{s.getColDef().lockVisible||s.isVisible()!=e&&i.push({colId:s.getId(),hide:!e})}),i.length>0&&this.columnApplyStateService.applyColumnState({state:i},n)}setAllPivot(t,e,n){this.setAllPivotActive(t,e,n)}setAllPivotActive(t,e,n){const i=[],d=e?u=>{var h;if(!u.isAnyFunctionActive())if(u.isAllowValue()){const f=typeof u.getAggFunc()=="string"?u.getAggFunc():(h=this.aggFuncService)==null?void 0:h.getDefaultAggFunc(u);i.push({colId:u.getId(),aggFunc:f})}else u.isAllowRowGroup()?i.push({colId:u.getId(),rowGroup:!0}):u.isAllowPivot()&&i.push({colId:u.getId(),pivot:!0})}:u=>{(u.isPivotActive()||u.isRowGroupActive()||u.isValueActive())&&i.push({colId:u.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(d),i.length>0&&this.columnApplyStateService.applyColumnState({state:i},n)}updateColumns(t){const{columns:e,visibleState:n,pivotState:i,eventType:s}=t,l=e.map(d=>{const u=d.getColId();if(this.columnModel.isPivotMode()){const h=i==null?void 0:i[u];return{colId:u,pivot:h==null?void 0:h.pivot,rowGroup:h==null?void 0:h.rowGroup,aggFunc:h==null?void 0:h.aggFunc}}else return{colId:u,hide:!(n!=null&&n[u])}});this.columnApplyStateService.applyColumnState({state:l},s)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},ev="32.3.3",Zd=b._defineModule({version:ev,moduleName:b.ModuleNames.ColumnsToolPanelModule,beans:[Qy],userComponents:[{name:"agColumnsToolPanel",classImp:Xy},{name:"agMenuItem",classImp:Re.AgMenuItemRenderer}],dependantModules:[Re.EnterpriseCoreModule,Zy,Oa]});function $d(){b.ModuleRegistry.registerModules([qo.ClientSideRowModelModule,Zf.InfiniteRowModelModule,td.ServerSideRowModelModule,$f.CsvExportModule,nd.ClipboardModule,rd.RangeSelectionModule,Uf.RichSelectModule,Wf.MenuModule,Hf.ExcelExportModule,Oa,Zd]);const t=hg("AGGRID_LICENSE");t?(Re.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const Ud=jf.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#110529",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}),Wd=Symbol("sdk-vue");function Wa(){return r.inject(Wd)}function tv(t,e){let n;$d();const i=()=>{t.loadBlockState().then(l=>{s.loaded=!0;const d=om(l,t),u=e(d),h=Object.fromEntries(Object.entries(u.routes).map(([f,m])=>{const v=typeof m=="function"?m():m;return[f,r.markRaw(v)]}));n=Object.assign(d,{...u,getRoute(f){return h[f]}})}).catch(l=>{console.error("load initial state error",l),s.error=l})},s=r.reactive({loaded:!1,error:void 0,useApp(){return Kf(n,"App is not loaded")},install(l){l.provide(Wd,this),i()}});return s}var nv=Object.defineProperty,rv=(t,e,n)=>e in t?nv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iv=(t,e,n)=>rv(t,e+"",n);function Hd(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function ov(t,e,n){const i=Math.min(e,n),s=Math.max(e,n);return t>=i&&t<=s}function sv(t){return new Promise(e=>setTimeout(e,t))}function av(t){return t()}function ss(t,e,n){return e>t?e:t>n?n:t}function jd(t,e){return e(t)}function Br(t,e){if(t!=null)return e(t)}function lv(t){if(t&&t.ok)return t.value}async function cv(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const qd=t=>t;function dv(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function uv(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(dv(65,91));return e}function hv(){return uv(42)}function Ki(t){return t!==null&&typeof t=="object"}function pv(t,e){return Object.keys(t).map(n=>e(t[n],n))}function Ha(t,e){return Ki(t)&&Ki(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ha(t[n],e[n])):t===e}function Yi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Yi(t[n]);return e}else if(Ki(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Yi(t[n])}),e}else return t}function fv(t){return Array.isArray(t)?Object.assign([],t):Ki(t)?Object.assign({},t):t}function mv(t,e){const n={};for(const i in e)e[i]!==t[i]&&(n[i]=t[i]);return n}function gv(t,e,n){return Object.assign({},t,{[e]:n})}function yv(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function vv(t,e,n){return t[e]=n,t}function _v(t,e){return t[e]}function Cv(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function wv(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function bv(t,...e){return e.map(n=>t[n])}function xv(t,...e){const n=Object.assign({},t);return e.forEach(i=>delete n[i]),n}const ja=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:yv,deepClone:Yi,deepEqual:Ha,getProp:_v,iSet:gv,isObject:Ki,map:pv,omit:xv,pick:wv,pickValues:bv,setProp:vv,shallowClone:fv,shallowDiff:mv,shiftProp:Cv},Symbol.toStringTag,{value:"Module"}));function kv(t,e){const n=t.findIndex(e);if(n<0)return[];const i=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,i)}function Kd(t,e,n){let i;return function(...s){i&&clearTimeout(i),i=setTimeout(()=>{i=void 0,t.apply(this,s)},e)}}const Sv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Ev=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Tv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Av=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Yd=(t,e)=>{let n=String(t);return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e):e===!0&&(n=t.toLocaleString(void 0)),n};function qa(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const n=e.bits?e.binary?Av:Tv:e.binary?Ev:Sv;if(e.signed&&t===0)return` 0 ${n[0]}`;const i=t<0,s=i?"-":e.signed?"+":"";if(i&&(t=-t),t<1){const h=Yd(t,e.locale);return s+h+" "+n[0]}const l=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**l,t=Number(t.toPrecision(3));const d=Yd(Number(t),e.locale),u=n[l];return s+d+" "+u}const Bv={class:"context-menu"},Pv=["onClick"],Vv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,i=s=>{s.cb(),n("close")};return(s,l)=>(r.openBlock(),r.createElementBlock("div",Bv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(d,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,onClick:r.withModifiers(h=>i(d),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(d.text),1)],8,Pv))),128))]))}}),nr=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},Nv=nr(Vv,[["__scopeId","data-v-12530966"]]);function Ka(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},i=r.h(Nv,{options:e,onClose:()=>{n()}});r.render(i,document.body);const s=i.el;return s.style.top=t.clientY+"px",s.style.left=t.clientX+"px",document.addEventListener("click",l=>{s.contains(l.target)||n()}),n}const Jd=Symbol(),as=()=>r.inject(Jd),Dv=["value"],Fv={key:1},Rv=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,s=r.reactive({edit:!1}),l=r.computed(()=>i.valueType),d=f=>{var m;let v=(m=f.target)==null?void 0:m.value;const S=r.unref(l),k=av(()=>S==="integer"?parseInt(v,10):S==="float"?Number(v):v);n("update:modelValue",k),s.edit=!1},u=r.ref(),h=f=>{!f.metaKey&&i.editable&&(s.edit=!0,requestAnimationFrame(()=>{var m,v;(v=(m=u.value)==null?void 0:m.querySelector("input"))==null||v.focus()}))};return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:u,class:r.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:h},[s.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:f.modelValue,onFocusout:m[0]||(m[0]=v=>s.edit=!1),onChange:d},null,40,Dv)):(r.openBlock(),r.createElementBlock("div",Fv,r.toDisplayString(f.modelValue),1))],2))}}),Mv=["^data-row-index"],Iv={key:0,class:"control-cell"},Lv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=as(),i=r.computed(()=>e.cell.column.valueType),s=f=>{Br(n.settings.value.onUpdatedRow,m=>{const v=e.cell.row,S={...v.dataRow,[e.cell.id]:f};m({...v,dataRow:S})})},l=f=>{f.metaKey&&n.selectRow(e.cell.row.primaryKey)},d=(f,m)=>{if(f.type==="contextmenu")f.preventDefault();else return;const v=n.settings??{},S=[],{onSelectedRows:k,onSelectedColumns:D}=v.value,T=n.data.selectedRows.has(m.primaryKey);k&&k.length&&(T?S.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):S.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),D&&D.length&&(S.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),S.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),S.length&&Ka(f,S)},u=r.ref(),h=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:u,class:r.normalizeClass(["td-cell",{[f.cell.class]:!0}]),"^data-row-index":f.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=v=>d(v,f.cell.row))},[f.cell.control?(r.openBlock(),r.createElementBlock("div",Iv,r.toDisplayString(f.cell.row.index),1)):h.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.value),{key:1,"model-value":f.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(r.openBlock(),r.createBlock(Rv,{key:2,"model-value":f.cell.value,"value-type":i.value,editable:f.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,Mv))}}),Ov={},Gv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zv(t,e){return r.openBlock(),r.createElementBlock("svg",Gv,e[0]||(e[0]=[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),r.createTextVNode(),r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const Zv=nr(Ov,[["render",zv]]),$v={class:"tr-head"},Uv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",$v,[r.renderSlot(e.$slots,"default")]))}});function Wv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function Hv(t,e){const n=t.findIndex(e);if(n<0)return[];const i=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,i)}const jv=["^data-col-id"],qv=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function i(l){l.preventDefault();const d=[];d.length&&Ka(l,d)}function s(l){var d;const u=((d=l.sort)==null?void 0:d.direction)??"DESC";n("change:sort",{colId:l.id,direction:Wv(u,["DESC","ASC"])})}return(l,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:i},[l.col.valueType?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(l.col.valueType)},null,2)):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(l.col.label)+" ",1),l.col.sort?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["sort",l.col.sort.direction]),onClick:d[0]||(d[0]=r.withModifiers(()=>s(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,jv))}}),Kv=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{Br(e.value,i=>i.scrollLeft=0)})};return(i,s)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:i.row.selected}]),scroll:"no",style:r.normalizeStyle(i.row.style),onScroll:n},[r.renderSlot(i.$slots,"default")],38))}}),Yv=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=as(),n=t,i=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:i.value,frozen:s.column.frozen}])},null,2))}});function et(t,e,n,i){r.onMounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.addEventListener(e,n,i)}),r.onUnmounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.removeEventListener(e,n,i)})}function Jv(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function Xv(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Qv(t,e){let n;function i(l){n={...l}}Jv(()=>{n=void 0,e()});const s=Xv(t);return et(window,"mousemove",l=>{n&&s({x:n.x,width:n.width,diff:l.x-n.x})}),{start:i}}const ti=1,e_=10,t_=30,Xd=60;function Qd(){const t=r.reactive({x:0,y:0});function e(n){t.x=n.pageX,t.y=n.pageY}return r.onMounted(()=>window.addEventListener("mousemove",e)),r.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function eu(t,e={}){const{delayEnter:n=0,delayLeave:i=0}=e,s=r.ref(!1);let l;const d=u=>{const h=u?n:i;l&&(clearTimeout(l),l=void 0),h?l=setTimeout(()=>s.value=u,h):s.value=u};return window&&(et(t,"mouseenter",()=>d(!0)),et(t,"mouseleave",()=>d(!1))),s}function n_(t){var e;const n=Br((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),i=>[...i])??[];return n.map(i=>{const{width:s,x:l}=i.getBoundingClientRect(),d=i.getAttribute("data-col-id");return qd({colId:d,width:s,x:l,right:l+s})}).slice(0,n.length-1)}function r_(t,e){const n=Qd(),i=eu(e,{}),{data:s}=t,l=Qv(u=>{Br(s.resizeTh,h=>{const f=s.columns.find(m=>m.id===h.colId);f&&(f.width=ss(u.width+u.diff,t_,1e4),t.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),d=u=>{s.resizeTh&&(s.resize=!0,l.start({x:u.x,width:s.resizeTh.width}))};return r.watchEffect(()=>{if(!i.value){document.body.style.cursor="";return}if(s.resize)return;const u=n_(e).find(h=>Math.abs(n.x-h.right)<e_);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:d}}const i_={key:0,class:"command-menu"},o_={key:0},s_=["onClick"],a_=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=as(),n=r.computed(()=>e.getSelectedRows()),i=r.computed(()=>n.value.length>0),s=r.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedRows)??[]}),l=r.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(d,u)=>i.value?(r.openBlock(),r.createElementBlock("div",i_,[n.value.length?(r.openBlock(),r.createElementBlock("span",o_,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(h,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(h.cb,["stop"])},r.toDisplayString(h.label),9,s_))),128))])):r.createCommentVNode("",!0)}}),l_={key:0,class:"command-menu"},c_={key:0},d_=["onClick"],u_=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=as(),n=r.computed(()=>e.getSelectedColumns()),i=r.computed(()=>n.value.length>0),s=r.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedColumns)??[]}),l=r.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(n.value),e.data.selectedColumns.clear()}})));return(d,u)=>i.value?(r.openBlock(),r.createElementBlock("div",l_,[n.value.length?(r.openBlock(),r.createElementBlock("span",c_,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(h,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(h.cb,["stop"])},r.toDisplayString(h.label),9,d_))),128))])):r.createCommentVNode("",!0)}});function rr(t,e){const n={el:void 0,x:0,y:0},i=s=>({x:s.x,y:s.y,dx:s.x-n.x,dy:s.y-n.y});et(document,"mousedown",s=>{s.target===r.unref(t)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),n.el=r.unref(t),n.x=s.x,n.y=s.y)}),et(document,"mouseup",s=>{n.el&&(n.el=void 0,e({...i(s),stop:!0},n))}),et(document,"mousemove",s=>{n.el&&e(i(s),n)})}const h_=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,i=t,s=r.ref(),l=r.computed(()=>i.windowSize-12),d=r.computed(()=>i.windowSize<i.dataSize),u=r.computed(()=>Math.ceil(i.offset*(l.value/i.dataSize))),h=r.computed(()=>Math.ceil(l.value*l.value/i.dataSize)),f=r.computed(()=>({top:`${u.value}px`,height:`${h.value}px`}));return rr(s,(m,v)=>{const S=(u.value+m.dy)*i.dataSize/l.value;n("change:offset",S),v.x=m.x,v.y=m.y}),(m,v)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[d.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:r.normalizeStyle(f.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function p_(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:i,scrollLeft:s}=e,l=[...e.columns],d=hv();n.value.controlColumn&&l.unshift({id:d,label:"#",width:60,frozen:!0});let u=0;const h=l.map(m=>{const v={...m,offset:u};return u+=m.width+ti,v}),f=h.filter(m=>m.frozen);return kv(h,m=>m.frozen?!1:s<m.offset+m.width&&m.offset<i+s).concat(f).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===d}))})}function f_(t,e){const n=r.computed(()=>e.value.reduce((i,s)=>(i[s.id]=s.justify?"justify-"+s.justify:"",i),{}));return r.computed(()=>t.rows.map(i=>{const s=n.value,{primaryKey:l,offset:d,dataRow:u,height:h}=i,f=e.value.map(m=>({id:m.id,column:m,row:i,value:u[m.id],class:s[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return qd({style:{top:`${d-t.scrollTop}px`,height:`${i.height}px`},primaryKey:l,offset:d,height:h,cells:f,selected:t.selectedRows.has(l)})}))}const m_=async(t,e)=>{const{scrollTop:n,bodyHeight:i}=t;return await sv(0),cv({rows:e.getRows(n,i),dataWindow:t})};function g_(t){const e=r.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});r.watch(()=>t.settings,m=>{e.columns=Yi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(v=>{e.dataHeight=v,f.updateBodyHeight()}).catch(v=>e.error=v)},{immediate:!0});const n=r.computed(()=>t.settings),i=r.computed(()=>e.columns.reduce((m,v)=>m+v.width+ti,0)),s=r.computed(()=>jd(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>jd(i.value-f.data.bodyWidth,m=>m>0?m:0)),d=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=p_({data:e,settings:n}),h=f_(e,u),f={data:e,settings:n,tableColumns:u,tableRows:h,adjustWidth:()=>{const m=e.columns.reduce((S,k)=>S+k.width+ti,0),v=e.bodyWidth+e.scrollLeft;if(m<v){const S=e.columns[e.columns.length-1];S.width=S.width+(v-m)}},updateOffsets(m){this.updateScrollTop(e.scrollTop+m.deltaY),this.updateScrollLeft(e.scrollLeft+m.deltaX)},getSelectedRows(){return e.rows.filter(m=>e.selectedRows.has(m.primaryKey))},getSelectedColumns(){return e.columns.filter(m=>e.selectedColumns.has(m.id))},selectRow(m){e.selectedRows.add(m)},unselectRow(m){e.selectedRows.delete(m)},selectColumn(m){e.selectedColumns.add(m)},unselectColumn(m){e.selectedColumns.delete(m)},updateScrollTop(m){e.scrollTop=ss(m,0,s.value)},updateScrollLeft(m){e.scrollLeft=ss(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:v}=e,S=m>v?v:m;e.bodyHeight=S},updateDimensions(m){this.updateBodyHeight(),f.data.bodyWidth=m.width,f.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(d,(m,v)=>{const S=m.current;(!S||m.scrollTop<S.scrollTop||m.scrollTop+m.bodyHeight>S.bodyHeight+S.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-Xd,bodyHeight:m.bodyHeight+Xd*2},m_(Yi(e.currentWindow),n.value.dataSource).then(({rows:k,dataWindow:D})=>{Ha(e.currentWindow,D)&&(e.rows=k)}))},{deep:!0,immediate:!0}),r.provide(Jd,f),f}const y_={class:"command-menu__container"},v_={key:0,class:"table-body__no-data"},__={class:"carets"},Ya=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,i=t,s=g_(i),l=r.computed(()=>s.data.rows.length===0),d=r.computed(()=>({height:l.value?"212px":s.data.bodyHeight+"px"}));r.watch(s.data,T=>n("update:data",T),{deep:!0}),r.watch(i,()=>m);const u=r.ref(),h=r.ref(),f=r.ref(),m=()=>{Br(f.value,T=>{s.updateDimensions(T.getBoundingClientRect())})},v=s.tableColumns,S=s.tableRows,{mouseDown:k}=r_(s,u);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(i.settings),r.nextTick(m)}),et(window,"resize",()=>r.nextTick(m));const D=T=>{T.preventDefault(),s.updateOffsets(T)};return(T,B)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:B[2]||(B[2]=(...C)=>r.unref(k)&&r.unref(k)(...C))},[r.createElementVNode("div",y_,[r.createVNode(a_),B[3]||(B[3]=r.createTextVNode()),r.createVNode(u_)]),B[7]||(B[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:h,class:"table-head"},[r.createVNode(Uv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(v),(C,R)=>(r.openBlock(),r.createBlock(qv,{key:R,col:C,style:r.normalizeStyle(C.style),"onChange:sort":B[0]||(B[0]=L=>T.$emit("change:sort",L))},null,8,["col","style"]))),128))]),_:1})],512),B[8]||(B[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:"table-body",style:r.normalizeStyle(d.value),onWheel:D},[l.value?(r.openBlock(),r.createElementBlock("div",v_,[r.createElementVNode("div",null,[r.createVNode(Zv),B[4]||(B[4]=r.createTextVNode()),B[5]||(B[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),B[6]||(B[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(S),(C,R)=>(r.openBlock(),r.createBlock(Kv,{key:R,row:C},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.cells,L=>(r.openBlock(),r.createBlock(Lv,{key:L.column.id+":"+R,cell:L,style:r.normalizeStyle(L.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),B[9]||(B[9]=r.createTextVNode()),r.createElementVNode("div",__,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(v),(C,R)=>(r.openBlock(),r.createBlock(Yv,{key:R,column:C,style:r.normalizeStyle(C.style),"onChange:sort":B[1]||(B[1]=L=>T.$emit("change:sort",L))},null,8,["column","style"]))),128))]),B[10]||(B[10]=r.createTextVNode()),r.createVNode(h_,{offset:r.unref(s).data.scrollTop,"window-size":r.unref(s).data.bodyHeight,"data-size":r.unref(s).data.dataHeight,"onChange:offset":r.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),tu=new WeakMap;class C_{constructor(e,n,i){iv(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=i;const s=e.reduce((d,u,h)=>(d.indices.set(h,d.total),d.total+=this.resolveHeight(u,h)+ti,d),{total:0,indices:new Map});this.dataHeight=s.total;const l=e.map((d,u)=>({dataRow:d,index:u,primaryKey:this.resolvePrimaryKey(d,u),offset:Hd(s.indices.get(u)),height:this.resolveHeight(d,u)}));tu.set(this,l)}get rows(){return tu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return Hv(this.rows,i=>{const s=i.offset;return e<s+i.height&&s<n+e})}}class w_{constructor(e,n,i){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=i}get height(){return this.rowHeight+ti}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const i=ss(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(n+40/this.height);return(await this.api.query({offset:i,limit:s})).map((l,d)=>({dataRow:l,index:i+d,primaryKey:this.resolvePrimaryKey(l,i+d),offset:(i+d)*(this.rowHeight+ti),height:this.rowHeight}))}}function b_(t){return Object.freeze(t)}function x_(t){return r.h(Ya,{settings:Object.freeze(t)})}function Ja(t,e){const n=new C_(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function k_(t,e){return r.computed(()=>{const n=r.unref(t);return Ja(n,r.unref(e))})}function S_(t,e){const n=r.computed(()=>{const s=r.unref(t);return Ja(s,r.unref(e))}),i=r.reactive({settings:n});return r.computed(()=>r.h(Ya,i))}const E_=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:w_,Component:Ya,factory:x_,rawDataSettings:Ja,settings:b_,useRawData:k_,useRawDataComponent:S_},Symbol.toStringTag,{value:"Module"}));function*T_(t,e){for(const n of t)yield e(n)}function A_(t){const e=[];for(const n of t)e.push(n);return e}function nu(t){return t()}function Xa(t,e){if(t==null)throw Error(e);return t}function Qa(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function ru(t){return new Promise(e=>setTimeout(e,t))}function iu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function ou(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function B_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(ou(65,91));return e}function su(t){return function(e){return 1-t(1-e)}}function P_(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function au(t){const{duration:e,draw:n,timing:i}=t,s=performance.now();let l=!1;return requestAnimationFrame(function d(u){let h=(u-s)/e;(h>1||l)&&(h=1);const f=i(h);n(f),h<1&&requestAnimationFrame(d)}),function(){l=!0}}function V_(t){const{getFraction:e,draw:n,timing:i}=t,s=performance.now();let l=!1;return requestAnimationFrame(function d(u){let h=e(u-s);if(l)return;h>1&&(h=1);const f=i(h);n(f),h<1&&requestAnimationFrame(d)}),function(){l=!0}}function lu(t,e){let n=-1;return(...i)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...i),e)}}function cu(t,e,n=!0){let i=0,s;return function(...l){s=()=>{t.apply(this,l),i=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>i&&s()}}function N_(t){return t.map(e=>({text:String(e),value:e}))}function Pr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const el=new Map;function D_(t){return el.has(t)||el.set(t,r.ref(localStorage.getItem(t))),Xa(el.get(t),"...")}function F_(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function du(t){const e=D_(t);return r.watch(e,n=>F_(t,n)),e}const tl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{A_(T_(tl.values(),e=>e(t.matches?"dark":"light")))});const R_=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",uu=r.ref(R_),nl=du("theme");function hu(t){const e=r.computed(()=>nl.value?nl.value:uu.value),n=s=>{uu.value=s,t&&t(s)};function i(){nl.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,s=>{t&&t(r.unref(s))}),r.onMounted(()=>{tl.add(n)}),r.onUnmounted(()=>{tl.delete(n)}),[e,i]}const M_=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=hu();return(i,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:s[0]||(s[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},s[1]||(s[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),I_={class:"pl-layout-component pl-block-page"},L_={key:0,class:"pl-block-page__title"},O_={class:"pl-block-page__title__append"},G_={key:1},z_={class:"pl-block-page__body"},Z_={name:"PlBlockPage"},$_=r.defineComponent({...Z_,setup(t){const e=r.useSlots();return(n,i)=>(r.openBlock(),r.createElementBlock("div",I_,[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",L_,[r.createElementVNode("h1",null,[r.renderSlot(n.$slots,"title")]),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",O_,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",G_)),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",z_,[r.renderSlot(n.$slots,"default")])]))}}),U_={name:"PlContainer"},W_=r.defineComponent({...U_,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(i,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(i.$slots,"default")],4))}}),H_={name:"PlRow"},j_=r.defineComponent({...H_,props:{wrap:{type:Boolean},alignCenter:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[r.renderSlot(e.$slots,"default")],2))}}),q_={class:"pl-layout-component",style:{"flex-grow":"1"}},K_={name:"PlSpacer"},pu=r.defineComponent({...K_,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",q_))}}),Y_={name:"PlGrid"},J_=r.defineComponent({...Y_,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(i,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(i.$slots,"default")],4))}}),X_={key:0,class:"pl-alert__icon"},Q_={class:"pl-alert__main"},eC={key:0},tC={class:"pl-alert__main__text"},nC={name:"PlAlert"},rC=r.defineComponent({...nC,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(n,i)=>n.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-alert",[{monospace:n.monospace,whiteSpacePre:n.whiteSpacePre},n.type?`pl-alert__${n.type}`:""]]),style:r.normalizeStyle({maxHeight:n.maxHeight})},[n.icon&&n.type?(r.openBlock(),r.createElementBlock("div",X_,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),i[2]||(i[2]=r.createTextVNode()),r.createElementVNode("div",Q_,[n.label?(r.openBlock(),r.createElementBlock("label",eC,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",tC,[r.renderSlot(n.$slots,"default")])]),i[3]||(i[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:i[0]||(i[0]=s=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),Ji=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),i=r.computed(()=>`mask-16 mask-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass(i.value)},null,6))}});function fu(t){function e(n){const i=n.currentTarget,s=document.createElement("span"),l=Math.max(i.clientWidth,i.clientHeight),d=l/2;s.style.width=s.style.height=`${l}px`,s.style.left=`${n.clientX-i.offsetLeft-d}px`,s.style.top=`${n.clientY-i.offsetTop-d}px`,s.classList.add("ripple");const u=i.getElementsByClassName("ripple")[0];u&&u.remove(),i.appendChild(s)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const iC={key:0},oC={inheritAttrs:!1},ls=r.defineComponent({...oC,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,n=r.ref(),i=r.computed(()=>e.small||e.size==="small"),s=r.computed(()=>e.large||e.size==="large");return fu(n),(l,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:i.value,large:s.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",iC,[r.renderSlot(l.$slots,"default")])),d[0]||(d[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(Ji),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(Ji),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),sC={name:"PlBtnPrimary"},rl=r.defineComponent({...sC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,i)=>(r.openBlock(),r.createBlock(ls,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),aC={name:"PlBtnAccent"},lC=r.defineComponent({...aC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,i)=>(r.openBlock(),r.createBlock(ls,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),cC={name:"PlBtnDanger"},dC=r.defineComponent({...cC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,i)=>(r.openBlock(),r.createBlock(ls,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),uC={name:"PlBtnSecondary"},il=r.defineComponent({...uC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,i)=>(r.openBlock(),r.createBlock(ls,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),hC={key:0},pC={name:"PlBtnGhost"},ol=r.defineComponent({...pC,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.size==="small"),i=r.computed(()=>e.size==="large"),s=r.ref(),l=r.useSlots();return fu(s),(d,u)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["pl-btn-ghost",{loading:d.loading,small:n.value,large:i.value,round:d.round,reverse:d.reverse,justifyCenter:d.justifyCenter,[d.$attrs.class+""]:!0}]},{...d.$attrs,disabled:!!d.$attrs.disabled||d.loading}),[r.unref(l).default&&!d.round?(r.openBlock(),r.createElementBlock("span",hC,[r.renderSlot(d.$slots,"default")])):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),d.loading?(r.openBlock(),r.createBlock(r.unref(Ji),{key:1,name:"loading",size:d.size},null,8,["size"])):d.icon?(r.openBlock(),r.createBlock(r.unref(Ji),{key:2,name:d.icon,size:d.size},null,8,["name","size"])):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),r.renderSlot(d.$slots,"append")],16))}}),fC=r.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,n=r.ref(!1);return(i,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:i.disabled,loading:i.loading,hover:n.value}]),onMouseover:s[0]||(s[0]=l=>n.value=!0),onMouseleave:s[1]||(s[1]=l=>n.value=!1)},[r.createVNode(il,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),s[2]||(s[2]=r.createTextVNode()),r.renderSlot(i.$slots,"default")],34))}});function Xi(t,e){const n=Qa(()=>{if(t.value){const{scrollTop:i,scrollLeft:s,scrollHeight:l,scrollWidth:d,clientHeight:u,clientWidth:h}=document.documentElement,f=t.value.getBoundingClientRect();e({scrollTop:i,scrollLeft:s,scrollHeight:l,scrollWidth:d,clientHeight:u,clientWidth:h,offsetY:i+f.y,offsetX:s+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});r.onMounted(n),et(window,"scroll",n,{capture:!0,passive:!0}),et(window,"resize",n,{passive:!0}),et(window,"adjust",n,!0)}function mC(t,e){const n=r.ref();return Xi(t,i=>{n.value=i}),r.computed(()=>{const i=r.unref(n),s=r.unref(e),l=s.position??"top",d=s.gap??8;if(!i)return"";const u=i.offsetY+Math.floor(i.height/2),h=i.offsetX+Math.floor(i.width/2);return l==="top-left"?`left: ${i.offsetX}px; top: ${i.offsetY-d}px;`:l==="top"?`left: ${h}px; top: ${i.offsetY-d}px;`:l==="right"?`left: ${i.offsetX+i.width+d}px; top: ${u}px;`:l==="left"?`right: ${i.scrollWidth-i.x+d}px; top: ${u}px;`:""})}function Qi(t,e){return e(t)}function it(t,e){if(t!=null)return e(t)}function gC(t){return Array.isArray(t)?t:[t]}function yC(t,e,...n){n.forEach(i=>{t[i]=e[i]})}function cs(t,e){et(document,"click",n=>{document.contains(n.target)&&(gC(t).map(i=>i.value).filter(i=>!!i).some(i=>i==null?void 0:i.contains(n.target))||e())})}const vC={},_C={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function CC(t,e){return r.openBlock(),r.createElementBlock("svg",_C,e[0]||(e[0]=[r.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const wC=nr(vC,[["render",CC]]),sl=new Map,bC={name:"PlTooltip"},Ft=r.defineComponent({...bC,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,i=Symbol(),s=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});sl.set(i,()=>f()),r.watch(()=>l.open,T=>{requestAnimationFrame(()=>{l.tooltipOpen=T})});let d=()=>{};const u=cu(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),h=()=>{l.open=!0;for(let[T,B]of sl.entries())T!==i&&B()},f=()=>{l.open=!1,n("tooltip:close")},m=async()=>{s.hide||(u(),l.over=!0,d(),await ru(100),l.over&&h())},v=()=>{l.over=!1,d=iu(()=>{l.over||f()},s.closeDelay)};r.watch(()=>s.hide,T=>{T&&f()});const S=r.ref(),k=r.ref(),D=mC(S,r.toRef(s));return cs([S,k],()=>f()),r.onUnmounted(()=>{sl.delete(i)}),(T,B)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(T.element),r.mergeProps(T.$attrs,{ref_key:"rootRef",ref:S,onClick:m,onMouseover:m,onMouseleave:v}),{default:r.withCtx(()=>[r.renderSlot(T.$slots,"default"),B[1]||(B[1]=r.createTextVNode()),T.$slots.tooltip&&l.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createVNode(r.Transition,{name:"tooltip-transition"},{default:r.withCtx(()=>[l.tooltipOpen?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:r.normalizeStyle(r.unref(D))},[r.createElementVNode("div",{ref_key:"tooltip",ref:k,class:r.normalizeClass(["pl-tooltip",T.position]),onMouseover:m,onMouseleave:v},[r.createElementVNode("div",null,[r.renderSlot(T.$slots,"tooltip")]),B[0]||(B[0]=r.createTextVNode()),r.createVNode(wC)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),xC={},kC={class:"inner-border"};function SC(t,e,n,i,s,l){return r.openBlock(),r.createElementBlock("div",kC,[r.renderSlot(t.$slots,"default")])}const EC=nr(xC,[["render",SC]]),TC={key:0},AC=["tabindex","onKeydown","onClick"],BC={key:1,class:"ui-btn-group__helper"},PC={key:2,class:"ui-btn-group__error"},VC={name:"PlBtnGroup"},NC=r.defineComponent({...VC,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=u=>i("update:modelValue",u),l=t,d=r.computed(()=>l.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-group",{disabled:u.disabled}])},[u.label?(r.openBlock(),r.createElementBlock("label",TC,[r.createElementVNode("span",null,r.toDisplayString(u.label),1),h[0]||(h[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(u.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.createVNode(EC,{class:"ui-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,(f,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["ui-btn-group__option text-s",{active:u.modelValue===f.value}]),tabindex:u.modelValue===f.value||u.disabled?void 0:0,onKeydown:r.withKeys(v=>s(f.value),["enter"]),onClick:v=>s(f.value)},r.toDisplayString(f.label),43,AC))),128))]),_:1}),h[2]||(h[2]=r.createTextVNode()),u.helper?(r.openBlock(),r.createElementBlock("div",BC,r.toDisplayString(u.helper),1)):u.error?(r.openBlock(),r.createElementBlock("div",PC,r.toDisplayString(u.error),1)):r.createCommentVNode("",!0)],2))}}),DC={inheritAttrs:!1},FC={class:"double-contour"};function RC(t,e,n,i,s,l){return r.openBlock(),r.createElementBlock("div",FC,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const ir=nr(DC,[["render",RC]]);function mu(t){r.onMounted(t),r.onUpdated(t)}const al=new WeakMap,ll=new ResizeObserver(t=>{for(const e of t)it(al.get(e.target),n=>n(e))});function gu(t,e){al.set(t,e),ll.unobserve(t),ll.observe(t)}function yu(t){ll.unobserve(t),al.delete(t)}const MC=8,vu=4;function Rn(t,e="label"){const n=new Set;mu(()=>{it(t==null?void 0:t.value,i=>{const s=i.querySelector(e);s&&(n.add(s),gu(s,()=>{const l=nu(()=>s.getBoundingClientRect().width+Qi(MC,d=>Number.isNaN(d)?vu:d+vu));i.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&i.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(i=>yu(i))})}function IC(t,e){const n=[];return e&&e.length>0&&e.forEach(i=>{const s=i(t);typeof s=="string"&&n.push(s)}),{isValid:n.length===0,errors:n}}function _u(t,e){return r.computed(()=>IC(t.value,e))}const LC=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),i=r.computed(()=>`icon-16 icon-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([i.value,s.$style.icon])},null,6))}}),OC="_icon_1ugxm_2",GC={icon:OC},zC={$style:GC},ds=nr(LC,[["__cssModules",zC]]),ZC=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(i,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,i.$style.icon])},null,2))}}),$C="_icon_1ugxm_2",UC={icon:$C},WC={$style:UC},Cu=nr(ZC,[["__cssModules",WC]]),HC={class:"pl-text-field__envelope"},jC={key:0,ref:"label"},qC={key:0,class:"required-icon"},KC={key:1,class:"pl-text-field__prefix"},YC=["disabled","placeholder","type"],JC={class:"pl-text-field__append"},XC={key:0,class:"pl-text-field__error"},QC={key:1,class:"pl-text-field__helper"},ew={name:"PlTextField"},wu=r.defineComponent({...ew,props:r.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useSlots(),n=r.useModel(t,"modelValue"),i=t,s=r.ref(void 0),l=r.ref(),d=r.ref(!1),u=r.reactive({cached:void 0}),h=r.computed({get(){return u.cached?u.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(j){if(u.cached=void 0,i.parse)try{n.value=i.parse(j)}catch(z){u.cached={error:z instanceof Error?z.message:String(z),value:j}}else n.value=j}}),f=r.computed(()=>i.type&&i.type==="password"?d.value?"text":i.type:"text"),m=r.computed(()=>d.value?"view-show":"view-hide"),v=()=>{i.clearable&&(u.cached=void 0,n.value=i.clearable===!0?"":i.clearable())},S=_u(h,i.rules||[]),k=r.computed(()=>i.clearable?i.clearable===!0?n.value==="":n.value===i.clearable():n.value===""),D=r.computed(()=>!k.value),T=r.computed(()=>{const j=[];return i.error&&j.push(i.error),u.cached&&j.push(u.cached.error),S.value.isValid||j.push(...S.value.errors),j}),B=r.computed(()=>T.value.length>0),C=r.computed(()=>i.clearable&&D.value&&i.type!=="password"),R=()=>d.value=!d.value,L=()=>{u.cached=void 0};return Rn(s),(j,z)=>(r.openBlock(),r.createElementBlock("div",HC,[r.createElementVNode("div",{ref_key:"rootRef",ref:s,class:r.normalizeClass(["pl-text-field",{error:B.value,disabled:j.disabled,dashed:j.dashed,nonEmpty:D.value}])},[j.label?(r.openBlock(),r.createElementBlock("label",jC,[j.required?(r.openBlock(),r.createElementBlock("i",qC)):r.createCommentVNode("",!0),z[1]||(z[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(j.label),1),z[2]||(z[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(j.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),z[5]||(z[5]=r.createTextVNode()),j.prefix?(r.openBlock(),r.createElementBlock("div",KC,r.toDisplayString(j.prefix),1)):r.createCommentVNode("",!0),z[6]||(z[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":z[0]||(z[0]=K=>h.value=K),disabled:j.disabled,placeholder:j.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:L},null,40,YC),[[r.vModelDynamic,h.value]]),z[7]||(z[7]=r.createTextVNode()),r.createElementVNode("div",JC,[C.value?(r.openBlock(),r.createBlock(r.unref(ds),{key:0,name:"delete-clear",onClick:v})):r.createCommentVNode("",!0),z[3]||(z[3]=r.createTextVNode()),j.type==="password"?(r.openBlock(),r.createBlock(r.unref(Cu),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),z[4]||(z[4]=r.createTextVNode()),r.renderSlot(j.$slots,"append")]),z[8]||(z[8]=r.createTextVNode()),r.createVNode(ir,{class:"pl-text-field__contour"})],2),z[9]||(z[9]=r.createTextVNode()),B.value?(r.openBlock(),r.createElementBlock("div",XC,r.toDisplayString(T.value.join(" ")),1)):j.helper?(r.openBlock(),r.createElementBlock("div",QC,r.toDisplayString(j.helper),1)):r.createCommentVNode("",!0)]))}}),tw={class:"ui-text-area__envelope"},nw={key:0,ref:"label"},rw={key:0,class:"required-icon"},iw=["readonly","rows","disabled","placeholder"],ow={class:"ui-text-area__append"},sw={key:0,class:"ui-text-area__error"},aw={key:1,class:"ui-text-area__helper"},lw={name:"PlTextArea"},cw=r.defineComponent({...lw,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.ref(),d=r.ref(),u=r.computed({get(){return s.modelValue??""},set(k){i("update:modelValue",k)}}),h=r.computed(()=>!!s.modelValue),f=_u(u,s.rules||[]);Rn(l);const m=r.computed(()=>{const k=[];return s.error&&k.push(s.error),k.push(...f.value.errors),k}),v=r.computed(()=>m.value.length>0),S=()=>{if(!s.autogrow)return;const k=d.value;k&&(k.style.height="auto",k.style.height=`${k.scrollHeight}px`)};return r.onMounted(()=>{S()}),(k,D)=>(r.openBlock(),r.createElementBlock("div",tw,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:v.value,disabled:k.disabled,dashed:k.dashed,nonEmpty:h.value}])},[k.label?(r.openBlock(),r.createElementBlock("label",nw,[k.required?(r.openBlock(),r.createElementBlock("i",rw)):r.createCommentVNode("",!0),D[1]||(D[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(k.label),1),D[2]||(D[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(k.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),D[3]||(D[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:d,"onUpdate:modelValue":D[0]||(D[0]=T=>u.value=T),readonly:k.readonly,rows:k.rows,disabled:k.disabled,placeholder:k.placeholder??"...",spellcheck:"false",onInput:S},null,40,iw),[[r.vModelText,u.value]]),D[4]||(D[4]=r.createTextVNode()),r.createElementVNode("div",ow,[r.renderSlot(k.$slots,"append")]),D[5]||(D[5]=r.createTextVNode()),r.createVNode(ir,{class:"ui-text-area__contour"})],2),D[6]||(D[6]=r.createTextVNode()),v.value?(r.openBlock(),r.createElementBlock("div",sw,r.toDisplayString(m.value.join(" ")),1)):k.helper?(r.openBlock(),r.createElementBlock("div",aw,r.toDisplayString(k.helper),1)):r.createCommentVNode("",!0)]))}});function bu(t,e){const n=t.scrollTop,i=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<i+n&&s>n}function xu(t,e){const n=t.scrollTop,i=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<i+n?"ceil":s>n?"floor":"visible"}function eo(t,e,n={}){const i=t.scrollTop,s=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,d=e.offsetTop,u=xu(t,e);if(u==="visible")return;const h=f=>{const m=u==="floor"?d-(s-l):d;t.scrollTop=i+f*(m-i)};bu(t,e)||au({duration:n.duration||100,timing:su(f=>f),draw:h})}function cl(t,e,n,i){return t.addEventListener(e,n,i),function(){t.removeEventListener(e,n)}}function dw(t,e){const n=e.getBoundingClientRect();return t.x<n.x||t.x>n.x+n.width||t.y<n.y||t.y>n.y+n.height}function ku(t){return t!==null&&typeof t=="object"}function Tt(t,e){return ku(t)&&ku(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Tt(t[n],e[n])):t===e}function dl(t,e){return t.some(n=>Tt(n,e))}const uw=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
58
44
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#110529"/>
59
45
  </svg>
60
- `,mx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
46
+ `,hw=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
61
47
  <rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
62
48
  <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
63
49
  </svg>
64
- `,vx=["innerHTML"],yx={class:"dropdown-list-item__title-container"},bx={class:"dropdown-list-item__title text-s"},wx={key:0,class:"dropdown-list-item__description text-description"},xx={key:1,class:"dropdown-list-item__icon flex-self-start"},aa=n.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,r=n.computed(()=>{const s=[];return e.size==="small"&&s.push("dropdown-list-item__small"),e.isSelected&&s.push("dropdown-list-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")}),o=n.computed(()=>{const s=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&s.push("checked"),s.join(" ")}),i=n.computed(()=>e.isSelected?mx:fx);return(s,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([r.value,"dropdown-list-item"])},[e.useCheckbox?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(o.value),innerHTML:i.value},null,10,vx)):n.createCommentVNode("",!0),d[1]||(d[1]=n.createTextVNode()),n.createElementVNode("div",yx,[n.createElementVNode("div",bx,n.toDisplayString(s.option.label),1),d[0]||(d[0]=n.createTextVNode()),s.option.description?(n.openBlock(),n.createElementBlock("div",wx,n.toDisplayString(s.option.description),1)):n.createCommentVNode("",!0)]),d[2]||(d[2]=n.createTextVNode()),!e.useCheckbox&&e.isSelected?(n.openBlock(),n.createElementBlock("div",xx)):n.createCommentVNode("",!0)],2))}}),vs=n.defineComponent({__name:"LongText",setup(t){n.useCssVars(f=>({"8d68520c":d.value}));const e=n.ref(!1),r=n.ref(),o=n.ref(!1),i=n.computed(()=>o.value&&e.value?"ui-lt-animate":""),s=Au(f=>o.value=f,500),d=n.computed(()=>{var f;return r.value?`${((f=r.value)==null?void 0:f.innerHTML.length)*.4}s`:"5s"});function u(){const f=os(r.value,"span cannot be empty");e.value=f.clientWidth<f.scrollWidth}function p(){u(),s(!0)}function h(){s(!1)}return(f,y)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps(f.$attrs,{class:"ui-lt-container"}),[n.createElementVNode("span",{onMouseover:p,onMouseleave:h},[n.createElementVNode("span",{ref_key:"span",ref:r,class:n.normalizeClass(i.value)},[n.renderSlot(f.$slots,"default")],2)],32)],16))}}),Lr=n.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,r=n.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(n.openBlock(),n.createElementBlock("i",{class:n.normalizeClass(r.value)},null,2))}}),Cx={class:"pl-dropdown__envelope"},_x=["tabindex"],kx={class:"pl-dropdown__container"},Sx={class:"pl-dropdown__field"},Tx=["disabled","placeholder"],Ex={class:"pl-dropdown__controls"},Nx={key:0},Ax={key:0,class:"required-icon"},Mx={key:0,class:"nothing-found"},Bx={key:0,class:"pl-dropdown__error"},Px={key:1,class:"pl-dropdown__helper"},Dx={key:2,class:"pl-dropdown__helper"},Vx={name:"PlDropdown"},ys=n.defineComponent({...Vx,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=t,i=n.useSlots(),s=n.ref(),d=n.ref(),u=n.ref(),p=n.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>na(R.value.findIndex(B=>Et(B.value,o.modelValue)),B=>B<0?0:B),f=()=>p.activeIndex=h(),y=n.computed(()=>o.options===void 0),S=n.computed(()=>y.value?!0:o.disabled),k=n.computed(()=>(o.options??[]).findIndex(B=>Et(B.value,o.modelValue))),D=n.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&k.value===-1)return"The selected value is not one of the options"}}),E=n.computed(()=>Bn(o.options??[]).map((B,O)=>({...B,index:O,isSelected:O===k.value,isActive:O===p.activeIndex}))),A=n.computed(()=>{const B=n.unref(E).find(O=>Et(O.value,o.modelValue));return(B==null?void 0:B.label)||o.modelValue}),w=n.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(A.value):o.placeholder),L=n.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),R=n.computed(()=>{const B=E.value;return p.search?B.filter(O=>{const X=p.search.toLowerCase();return O.label.toLowerCase().includes(X)||O.description&&O.description.toLowerCase().includes(X)?!0:typeof O.value=="string"?O.value.toLowerCase().includes(X):O.value===p.search}):B}),H=n.computed(()=>S.value?void 0:"0"),G=B=>{var O;r("update:modelValue",B),p.search="",p.open=!1,(O=s==null?void 0:s.value)==null||O.focus()},K=()=>r("update:modelValue",void 0),U=()=>{var B;return(B=u.value)==null?void 0:B.focus()},P=()=>p.open=!p.open,W=()=>p.open=!0,F=B=>{var O,X;const ye=B.relatedTarget;!((O=s.value)!=null&&O.contains(ye))&&!((X=d.value)!=null&&X.contains(ye))&&(p.search="",p.open=!1)},Y=()=>{const B=d.value;B&&ot(B.querySelector(".hovered-item"),O=>{oa(B,O)})},ue=B=>{var O,X;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(B.code))B.preventDefault();else return;const{open:ye,activeIndex:_e}=p;if(!ye){B.code==="Enter"&&(p.open=!0);return}B.code==="Escape"&&(p.open=!1,(O=s.value)==null||O.focus());const zt=n.unref(R),{length:Ht}=zt;if(!Ht)return;B.code==="Enter"&&G((X=zt.find(Ea=>Ea.index===_e))==null?void 0:X.value);const Nt=zt.findIndex(Ea=>Ea.index===_e)??-1,Ta=B.code==="ArrowDown"?1:B.code==="ArrowUp"?-1:0,On=Math.abs(Nt+Ta+Ht)%Ht;p.activeIndex=R.value[On].index??-1};Vr(s),n.watch(()=>o.modelValue,f,{immediate:!0}),n.watch(()=>p.open,B=>{var O;return B?(O=u.value)==null?void 0:O.focus():""}),n.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&Y()});const j=n.reactive({top:"0px",left:"0px",width:"0px"});return n.watch(d,B=>{if(B){const O=B.getBoundingClientRect();p.optionsHeight=O.height,window.dispatchEvent(new CustomEvent("adjust"))}}),ra(s,B=>{const O=B.top+B.height+3;O+p.optionsHeight>B.clientHeight?j.top=B.top-p.optionsHeight-3+"px":j.top=O+"px",j.left=B.left+"px",j.width=B.width+"px"}),(B,O)=>(n.openBlock(),n.createElementBlock("div",Cx,[n.createElementVNode("div",{ref_key:"root",ref:s,tabindex:H.value,class:n.normalizeClass(["pl-dropdown",{open:p.open,error:B.error,disabled:S.value}]),onKeydown:ue,onFocusout:F},[n.createElementVNode("div",kx,[n.createElementVNode("div",Sx,[n.withDirectives(n.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":O[0]||(O[0]=X=>p.search=X),type:"text",tabindex:"-1",disabled:S.value,placeholder:w.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:W},null,40,Tx),[[n.vModelText,p.search]]),O[4]||(O[4]=n.createTextVNode()),p.open?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,onClick:U},[n.createVNode(vs,{class:"input-value"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.value),1)]),_:1})])),O[5]||(O[5]=n.createTextVNode()),n.createElementVNode("div",Ex,[y.value?(n.openBlock(),n.createBlock(n.unref(Lr),{key:0,name:"loading"})):n.createCommentVNode("",!0),O[1]||(O[1]=n.createTextVNode()),B.clearable&&L.value?(n.openBlock(),n.createBlock(n.unref(hi),{key:1,name:"delete-clear",onClick:n.withModifiers(K,["stop"])})):n.createCommentVNode("",!0),O[2]||(O[2]=n.createTextVNode()),n.renderSlot(B.$slots,"append"),O[3]||(O[3]=n.createTextVNode()),B.arrowIconLarge?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["arrow-icon",[`icon-24 ${B.arrowIconLarge}`]]),onClick:n.withModifiers(P,["stop"])},null,2)):B.arrowIcon?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(["arrow-icon",[`icon-16 ${B.arrowIcon}`]]),onClick:n.withModifiers(P,["stop"])},null,2)):(n.openBlock(),n.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:n.withModifiers(P,["stop"])}))])]),O[9]||(O[9]=n.createTextVNode()),B.label?(n.openBlock(),n.createElementBlock("label",Nx,[B.required?(n.openBlock(),n.createElementBlock("i",Ax)):n.createCommentVNode("",!0),O[6]||(O[6]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(B.label),1),O[7]||(O[7]=n.createTextVNode()),n.unref(i).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(B.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),O[10]||(O[10]=n.createTextVNode()),p.open?(n.openBlock(),n.createBlock(n.Teleport,{key:1,to:"body"},[n.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:n.normalizeStyle(j),tabindex:"-1"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(R.value,(X,ye)=>(n.openBlock(),n.createBlock(aa,{key:ye,option:X,"is-selected":X.isSelected,"is-hovered":X.isActive,size:B.optionSize,onClick:n.withModifiers(_e=>G(X.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),O[8]||(O[8]=n.createTextVNode()),R.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",Mx,"Nothing found"))],4)])):n.createCommentVNode("",!0),O[11]||(O[11]=n.createTextVNode()),n.createVNode(on,{class:"pl-dropdown__contour"})])],42,_x),O[12]||(O[12]=n.createTextVNode()),D.value?(n.openBlock(),n.createElementBlock("div",Bx,n.toDisplayString(D.value),1)):y.value&&B.loadingOptionsHelper?(n.openBlock(),n.createElementBlock("div",Px,n.toDisplayString(B.loadingOptionsHelper),1)):B.helper?(n.openBlock(),n.createElementBlock("div",Dx,n.toDisplayString(B.helper),1)):n.createCommentVNode("",!0)]))}}),Lx={name:"PlDropdownRef"},Ix=n.defineComponent({...Lx,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,r=n.computed(()=>{var i;return(i=e.options)==null?void 0:i.map(s=>({label:s.label,value:s.ref}))}),o=n.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,s)=>(n.openBlock(),n.createBlock(n.unref(ys),n.mergeProps(e,{options:r.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":s[0]||(s[0]=d=>i.$emit("update:modelValue",d))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Fx(t,e){return n.computed(()=>{const r=Bn(t.value);return e.value?r.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):r})}const Rx={class:"resizable-input"},Ox=["placeholder","value","disabled"],zx=n.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const r=t,o=e,i=n.computed(()=>{var u;return r.placeholder?r.placeholder:(u=r.modelValue||r.value)==null?void 0:u.replace('"',"")}),s=n.computed(()=>{const u={};return r.width&&(u.width=r.width),r.maxWidth&&(u.maxWidth=r.maxWidth),u});function d(u){const p=u.target.value;o("update:modelValue",p)}return(u,p)=>(n.openBlock(),n.createElementBlock("div",Rx,[n.createElementVNode("span",{style:n.normalizeStyle(s.value),class:"resizable-input__size-span"},n.toDisplayString(i.value),5),p[0]||(p[0]=n.createTextVNode()),n.createElementVNode("input",n.mergeProps(u.$attrs,{placeholder:u.placeholder,value:r.modelValue,disabled:r.disabled,style:s.value,onInput:d}),null,16,Ox)]))}}),Gx={class:"dropdown-tab-item__title text-caps13"},jx=n.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,r=n.computed(()=>e.option.label),o=n.computed(()=>{const i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([o.value,"dropdown-tab-item"])},[n.createElementVNode("div",Gx,n.toDisplayString(r.value),1)],2))}}),Ux={class:"pl-line-dropdown__prefix"},Zx={class:"pl-line-dropdown__icon-wrapper"},$x={class:"pl-line-dropdown__icon"},Wx={key:0,class:"pl-line-dropdown__no-item"},Hx={key:0,class:"pl-line-dropdown__no-item"},Wu=n.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=t,i=n.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),s=n.ref(),d=n.ref(),u=n.computed(()=>{const F=[];return i.isOpen&&F.push("open"),o.disabled&&F.push("disabled"),F.join(" ")}),p=n.ref(""),h=Fx(n.toRef(o,"options"),p),f=n.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=n.computed(()=>{if(o.modelValue){const F=D();if(F!==-1){const Y=Bn(o.options)[F];return typeof Y.label=="object"?Y.label.title:Y.label}}return""}),S=n.ref(y.value),k=n.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");gi(s,()=>{o.mode==="list"&&(i.isOpen=!1)}),n.watch(()=>S.value,F=>{y.value!==F?p.value=F:p.value=""}),n.watch(()=>i.isOpen,F=>{var Y;F&&s.value&&((Y=s.value.querySelector("input"))==null||Y.focus(),n.nextTick(()=>U()))}),n.watch(()=>o.modelValue,()=>E(),{immediate:!0});function D(){return o.options.findIndex(F=>Et(F.value,o.modelValue))}function E(){i.activeOption=na(h.value.findIndex(F=>Et(F.value,o.modelValue)),F=>F<0?0:F),S.value=y.value}function A(){p.value=""}function w(){o.disabled?i.isOpen=!1:n.nextTick(()=>{i.isOpen=!i.isOpen})}function L(){o.mode==="list"&&(i.isOpen=!1)}function R(F){F&&(r("update:modelValue",F.value),L(),A())}function H(F){return Et(F.value,o.modelValue)}const G=F=>{var Y,ue;const j=F.relatedTarget;!((Y=s.value)!=null&&Y.contains(j))&&!((ue=d.value)!=null&&ue.contains(j))&&(p.value="",i.isOpen=!1)};function K(F){const{activeOption:Y}=i;if(!i.isOpen&&F.code==="Enter"){i.isOpen=!0;return}const{length:ue}=h.value;if(!ue)return;["ArrowDown","ArrowUp","Enter"].includes(F.code)&&F.preventDefault(),F.code==="Enter"&&R(h.value[Y]);const j=F.code==="ArrowDown"?1:F.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(Y+j+ue)%ue,requestAnimationFrame(U)}function U(){const F=d.value;F&&ot(F.querySelector(".hovered-item"),Y=>{o.mode==="list"?oa(F,Y):Y.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function P(){r("update:modelValue",void 0)}const W=n.reactive({top:"0px",left:"0px"});return n.watch(d,F=>{if(F){const Y=F.getBoundingClientRect();i.optionsHeight=Y.height,window.dispatchEvent(new CustomEvent("adjust"))}}),ra(s,F=>{const Y=F.top+F.height+2;Y+i.optionsHeight>F.clientHeight?W.top=F.top-i.optionsHeight-2+"px":W.top=Y+"px",W.left=F.left+"px"}),(F,Y)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"container",ref:s,tabindex:"0",class:n.normalizeClass([u.value,"pl-line-dropdown uc-pointer"]),onKeydown:K,onFocusout:G,onClick:w},[n.createElementVNode("div",Ux,n.toDisplayString(o==null?void 0:o.prefix),1),Y[6]||(Y[6]=n.createTextVNode()),n.createVNode(zx,{modelValue:S.value,"onUpdate:modelValue":Y[0]||(Y[0]=ue=>S.value=ue),placeholder:k.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),Y[7]||(Y[7]=n.createTextVNode()),n.createElementVNode("div",Zx,[n.withDirectives(n.createElementVNode("div",$x,null,512),[[n.vShow,!f.value]]),Y[1]||(Y[1]=n.createTextVNode()),n.withDirectives(n.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:P},null,512),[[n.vShow,f.value]])]),Y[8]||(Y[8]=n.createTextVNode()),i.isOpen?(n.openBlock(),n.createBlock(n.Teleport,{key:0,to:"body"},[o.mode==="list"?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"list",ref:d,style:n.normalizeStyle(W),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:G},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(h),(ue,j)=>n.renderSlot(F.$slots,"item",{key:j,item:ue,textItem:"text",isSelected:H(ue),isHovered:i.activeOption==j,onClick:n.withModifiers(B=>R(ue),["stop"])},()=>[n.createVNode(aa,{option:ue,"text-item":"text","is-selected":H(ue),"is-hovered":i.activeOption==j,size:"medium",onClick:n.withModifiers(B=>R(ue),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Y[3]||(Y[3]=n.createTextVNode()),n.unref(h).length===0?(n.openBlock(),n.createElementBlock("div",Wx,Y[2]||(Y[2]=[n.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):n.createCommentVNode("",!0)],36)):o.mode==="tabs"?(n.openBlock(),n.createElementBlock("div",{key:1,ref_key:"list",ref:d,style:n.normalizeStyle(W),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:G},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(h),(ue,j)=>n.renderSlot(F.$slots,"item",{key:j,item:ue,isSelected:H(ue),isHovered:i.activeOption==j,onClick:n.withModifiers(B=>R(ue),["stop"])},()=>[n.createVNode(jx,{option:ue,"is-selected":H(ue),"is-hovered":i.activeOption==j,onClick:n.withModifiers(B=>R(ue),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Y[5]||(Y[5]=n.createTextVNode()),n.unref(h).length===0?(n.openBlock(),n.createElementBlock("div",Hx,Y[4]||(Y[4]=[n.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):n.createCommentVNode("",!0)],36)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],34))}}),qx={class:"ui-dropdown__envelope"},Kx=["tabindex"],Yx={class:"ui-dropdown__container"},Jx={class:"ui-dropdown__field"},Qx=["disabled","placeholder"],Xx={class:"ui-dropdown__controls"},eC={key:0},tC={key:0,class:"required-icon"},rC={key:0,class:"nothing-found"},nC={key:0,class:"ui-dropdown__error"},oC={key:1,class:"ui-dropdown__helper"},aC={key:2,class:"ui-dropdown__helper"},iC={name:"PlDropdown"},lC=n.defineComponent({...iC,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=t,i=n.useSlots(),s=n.ref(),d=n.ref(),u=n.ref(),p=n.reactive({search:"",activeIndex:-1,open:!1}),h=()=>na(R.value.findIndex(j=>Et(j.value,o.modelValue)),j=>j<0?0:j),f=()=>p.activeIndex=h(),y=n.computed(()=>o.options===void 0),S=n.computed(()=>y.value?!0:o.disabled),k=n.computed(()=>(o.options??[]).findIndex(j=>Et(j.value,o.modelValue))),D=n.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&k.value===-1)return"The selected value is not one of the options"}}),E=n.computed(()=>Bn(o.options??[]).map((j,B)=>({...j,index:B,isSelected:B===k.value,isActive:B===p.activeIndex}))),A=n.computed(()=>{const j=n.unref(E).find(B=>Et(B.value,o.modelValue));return(j==null?void 0:j.label)||o.modelValue}),w=n.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(A.value):o.placeholder),L=n.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),R=n.computed(()=>{const j=E.value;return p.search?j.filter(B=>{const O=p.search.toLowerCase();return B.label.toLowerCase().includes(O)||B.description&&B.description.toLowerCase().includes(O)?!0:typeof B.value=="string"?B.value.toLowerCase().includes(O):B.value===p.search}):j}),H=n.computed(()=>S.value?void 0:"0"),G=j=>{var B;r("update:modelValue",j),p.search="",p.open=!1,(B=s==null?void 0:s.value)==null||B.focus()},K=()=>r("update:modelValue",void 0),U=()=>{var j;return(j=u.value)==null?void 0:j.focus()},P=()=>p.open=!p.open,W=()=>p.open=!0,F=j=>{var B;(B=s==null?void 0:s.value)!=null&&B.contains(j.relatedTarget)||(p.search="",p.open=!1)},Y=()=>{const j=d.value;j&&ot(j.querySelector(".hovered-item"),B=>{oa(j,B)})},ue=j=>{var B,O;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(j.code))j.preventDefault();else return;const{open:X,activeIndex:ye}=p;if(!X){j.code==="Enter"&&(p.open=!0);return}j.code==="Escape"&&(p.open=!1,(B=s.value)==null||B.focus());const _e=n.unref(R),{length:zt}=_e;if(!zt)return;j.code==="Enter"&&G((O=_e.find(On=>On.index===ye))==null?void 0:O.value);const Ht=_e.findIndex(On=>On.index===ye)??-1,Nt=j.code==="ArrowDown"?1:j.code==="ArrowUp"?-1:0,Ta=Math.abs(Ht+Nt+zt)%zt;p.activeIndex=R.value[Ta].index??-1};return Vr(s),n.watch(()=>o.modelValue,f,{immediate:!0}),n.watch(()=>p.open,j=>{var B;return j?(B=u.value)==null?void 0:B.focus():""}),n.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&Y()}),(j,B)=>(n.openBlock(),n.createElementBlock("div",qx,[n.createElementVNode("div",{ref_key:"root",ref:s,tabindex:H.value,class:n.normalizeClass(["ui-dropdown",{open:p.open,error:j.error,disabled:S.value}]),onKeydown:ue,onFocusout:F},[n.createElementVNode("div",Yx,[n.createElementVNode("div",Jx,[n.withDirectives(n.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":B[0]||(B[0]=O=>p.search=O),type:"text",tabindex:"-1",disabled:S.value,placeholder:w.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:W},null,40,Qx),[[n.vModelText,p.search]]),B[4]||(B[4]=n.createTextVNode()),p.open?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,onClick:U},[n.createVNode(vs,{class:"input-value"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.value),1)]),_:1})])),B[5]||(B[5]=n.createTextVNode()),n.createElementVNode("div",Xx,[y.value?(n.openBlock(),n.createBlock(n.unref(Lr),{key:0,name:"loading"})):n.createCommentVNode("",!0),B[1]||(B[1]=n.createTextVNode()),j.clearable&&L.value?(n.openBlock(),n.createBlock(n.unref(hi),{key:1,name:"delete-clear",onClick:n.withModifiers(K,["stop"])})):n.createCommentVNode("",!0),B[2]||(B[2]=n.createTextVNode()),n.renderSlot(j.$slots,"append"),B[3]||(B[3]=n.createTextVNode()),j.arrowIconLarge?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["arrow-icon",[`icon-24 ${j.arrowIconLarge}`]]),onClick:n.withModifiers(P,["stop"])},null,2)):j.arrowIcon?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(["arrow-icon",[`icon-16 ${j.arrowIcon}`]]),onClick:n.withModifiers(P,["stop"])},null,2)):(n.openBlock(),n.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:n.withModifiers(P,["stop"])}))])]),B[9]||(B[9]=n.createTextVNode()),j.label?(n.openBlock(),n.createElementBlock("label",eC,[j.required?(n.openBlock(),n.createElementBlock("i",tC)):n.createCommentVNode("",!0),B[6]||(B[6]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(j.label),1),B[7]||(B[7]=n.createTextVNode()),n.unref(i).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(j.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),B[10]||(B[10]=n.createTextVNode()),p.open?(n.openBlock(),n.createElementBlock("div",{key:1,ref_key:"list",ref:d,class:"ui-dropdown__options"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(R.value,(O,X)=>(n.openBlock(),n.createBlock(aa,{key:X,option:O,"is-selected":O.isSelected,"is-hovered":O.isActive,size:j.optionSize,onClick:n.withModifiers(ye=>G(O.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),B[8]||(B[8]=n.createTextVNode()),R.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",rC,"Nothing found"))],512)):n.createCommentVNode("",!0),B[11]||(B[11]=n.createTextVNode()),n.createVNode(on,{class:"ui-dropdown__contour"})])],42,Kx),B[12]||(B[12]=n.createTextVNode()),D.value?(n.openBlock(),n.createElementBlock("div",nC,n.toDisplayString(D.value),1)):y.value&&j.loadingOptionsHelper?(n.openBlock(),n.createElementBlock("div",oC,n.toDisplayString(j.loadingOptionsHelper),1)):j.helper?(n.openBlock(),n.createElementBlock("div",aC,n.toDisplayString(j.helper),1)):n.createCommentVNode("",!0)]))}}),sC={key:0,class:"ui-progress-bar"},cC={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},dC={class:"ui-progress-bar__message flex-grow-1"},uC={class:"ui-progress-bar__percent"},pC=n.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,r=n.computed(()=>e.progress===100?e.completeMessage:"");return(o,i)=>o.loading?(n.openBlock(),n.createElementBlock("div",sC,[n.createElementVNode("div",{class:"ui-progress-bar__indicator",style:n.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=n.createTextVNode()),n.createElementVNode("div",cC,[n.createElementVNode("div",dC,n.toDisplayString(r.value),1),i[0]||(i[0]=n.createTextVNode()),n.createElementVNode("div",uC,n.toDisplayString(o.progress+"%"),1)])])):n.createCommentVNode("",!0)}}),gC={class:"mi-number-field__main-wrapper d-flex"},hC={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},fC={key:0,class:"text-description"},mC=["disabled","placeholder"],vC={class:"mi-number-field__icons d-flex-column"},yC={key:0,class:"mi-number-field__hint text-description"},bC=n.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,o=e,i=n.ref(),s=n.useSlots(),d=n.ref();Vr(i);const u=n.ref(!0),p=n.computed({get(){return u.value&&r.modelValue!==void 0?new Number(r.modelValue).toString():""},set(w){var L;w=w.replace(/,/g,""),S(w)?(o("update:modelValue",+w),w.toString()!==((L=r.modelValue)==null?void 0:L.toString())&&+w===r.modelValue&&w[w.length-1]!=="."&&(u.value=!1,n.nextTick(()=>{u.value=!0}))):(w.trim()===""&&o("update:modelValue",void 0),u.value=!1,n.nextTick(()=>{u.value=!0}))}}),h=n.computed(()=>{let w=[];return r.errorMessage&&w.push(r.errorMessage),S(r.modelValue)?(r.minValue!==void 0&&r.modelValue!==void 0&&r.modelValue<r.minValue&&w.push(`Model value must be higher than ${r.minValue}`),r.maxValue!==void 0&&r.modelValue!==void 0&&r.modelValue>r.maxValue&&w.push(`Model value must be less than ${r.maxValue}`)):w.push("Model value is not a number."),w=[...w],w.join(" ")}),f=n.computed(()=>!!(r.maxValue&&r.modelValue!==void 0&&(r.modelValue||0)+r.step>r.maxValue)),y=n.computed(()=>!!(r.minValue&&r.modelValue!==void 0&&(r.modelValue||0)-r.step<r.minValue));function S(w){return w!==void 0?(w=w==null?void 0:w.toString(),!isNaN(+w)&&!isNaN(parseFloat(w))):!1}function k(){if(!f.value){let w=0;r.modelValue===void 0?w=r.minValue?r.minValue:0:w=+(r.modelValue||0)+r.step,p.value=w.toString()}}function D(){if(!y.value){let w=0;r.modelValue===void 0?w=0:w=+(r.modelValue||0)-r.step,p.value=r.minValue?Math.max(r.minValue,w).toString():w.toString()}}function E(w){["ArrowDown","ArrowUp"].includes(w.code)&&w.preventDefault(),w.code==="ArrowUp"?k():w.code==="ArrowDown"&&D()}const A=w=>{w.detail>1&&w.preventDefault()};return(w,L)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"root",ref:i,class:n.normalizeClass([{error:!!h.value.trim(),disabled:w.disabled},"mi-number-field d-flex-column"]),onMousedown:A,onKeydown:L[1]||(L[1]=R=>E(R))},[n.createElementVNode("div",gC,[n.createVNode(on,{class:"mi-number-field__contour"}),L[6]||(L[6]=n.createTextVNode()),n.createElementVNode("div",hC,[w.label?(n.openBlock(),n.createElementBlock("label",fC,[n.createTextVNode(n.toDisplayString(w.label)+" ",1),n.unref(s).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(w.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),L[2]||(L[2]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":L[0]||(L[0]=R=>p.value=R),disabled:w.disabled,placeholder:w.placeholder,class:"text-s flex-grow"},null,8,mC),[[n.vModelText,p.value]])]),L[7]||(L[7]=n.createTextVNode()),n.createElementVNode("div",vC,[n.createElementVNode("div",{class:n.normalizeClass([{disabled:f.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:k},L[3]||(L[3]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),L[5]||(L[5]=n.createTextVNode()),n.createElementVNode("div",{class:n.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:D},L[4]||(L[4]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),L[8]||(L[8]=n.createTextVNode()),h.value.trim()?(n.openBlock(),n.createElementBlock("div",yC,n.toDisplayString(h.value),1)):n.createCommentVNode("",!0)],34))}}),wC={class:"pl-chip__text"},bs=n.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=n.ref(),r=n.ref(!1);return n.onMounted(()=>{var o;e.value&&(r.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,i)=>(n.openBlock(),n.createBlock(n.unref(Vt),{position:"top",class:"pl-chip-tooltip",delay:500},n.createSlots({default:n.withCtx(()=>[i[4]||(i[4]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"chip",ref:e,class:n.normalizeClass(["pl-chip",{small:o.small}])},[n.createElementVNode("div",wC,[n.renderSlot(o.$slots,"default")]),i[3]||(i[3]=n.createTextVNode()),o.closeable?(n.openBlock(),n.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=n.withKeys(s=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=n.withModifiers(s=>o.$emit("close"),["stop"]))},i[2]||(i[2]=[n.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):n.createCommentVNode("",!0)],2)]),_:2},[r.value?{name:"tooltip",fn:n.withCtx(()=>[n.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),xC={class:"pl-multi-dropdown__envelope"},CC=["tabindex"],_C={class:"pl-multi-dropdown__container"},kC={class:"pl-multi-dropdown__field"},SC=["disabled","placeholder"],TC={class:"pl-multi-dropdown__append"},EC={key:0},NC={key:0,class:"required-icon"},AC={class:"pl-multi-dropdown__open-chips-container"},MC={key:0,class:"nothing-found"},BC={key:0,class:"pl-multi-dropdown__error"},PC={key:1,class:"pl-multi-dropdown__helper"},DC={name:"PlDropdownMulti"},VC=n.defineComponent({...DC,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=P=>r("update:modelValue",P),i=n.useSlots(),s=t,d=n.ref(),u=n.ref(),p=n.ref(),h=n.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),f=n.computed(()=>Array.isArray(s.modelValue)?s.modelValue:[]),y=n.computed(()=>h.open&&s.modelValue.length>0?s.placeholder:s.modelValue.length>0?"":s.placeholder),S=n.computed(()=>Bn(s.options).filter(P=>ms(f.value,P.value))),k=n.computed(()=>{const P=n.unref(f),W=Bn(s.options);return(h.search?W.filter(F=>{const Y=h.search.toLowerCase();return F.label.toLowerCase().includes(Y)?!0:typeof F.value=="string"?F.value.toLowerCase().includes(Y):F.value===h.search}):[...W]).map(F=>({...F,selected:ms(P,F.value)}))}),D=n.computed(()=>s.disabled?void 0:"0"),E=()=>{h.activeOption=na(k.value.findIndex(P=>Et(P.value,s.modelValue)),P=>P<0?0:P)},A=P=>{var W;const F=n.unref(f);o(ms(F,P)?F.filter(Y=>!Et(Y,P)):[...F,P]),h.search="",(W=d==null?void 0:d.value)==null||W.focus()},w=P=>o(n.unref(f).filter(W=>!Et(W,P))),L=()=>{var P;return(P=p.value)==null?void 0:P.focus()},R=()=>h.open=!h.open,H=P=>{var W,F;const Y=P.relatedTarget;!((W=d.value)!=null&&W.contains(Y))&&!((F=u.value)!=null&&F.contains(Y))&&(h.search="",h.open=!1)},G=()=>{const P=u.value;P&&ot(P.querySelector(".hovered-item"),W=>{oa(P,W)})},K=P=>{var W;const{open:F,activeOption:Y}=h;if(!F){P.code==="Enter"&&(h.open=!0);return}P.code==="Escape"&&(h.open=!1,(W=d.value)==null||W.focus());const ue=n.unref(k),{length:j}=ue;if(!j)return;["ArrowDown","ArrowUp","Enter"].includes(P.code)&&P.preventDefault(),P.code==="Enter"&&A(ue[Y].value);const B=P.code==="ArrowDown"?1:P.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(Y+B+j)%j,requestAnimationFrame(G)};Vr(d),n.watch(()=>s.modelValue,()=>E(),{immediate:!0}),n.watchPostEffect(()=>{h.search,h.open&&G()});const U=n.reactive({top:"0px",left:"0px",width:"0px"});return n.watch(u,P=>{if(P){const W=P.getBoundingClientRect();h.optionsHeight=W.height,window.dispatchEvent(new CustomEvent("adjust"))}}),ra(d,P=>{const W=P.top+P.height+5;W+h.optionsHeight>P.clientHeight?U.top=P.top-h.optionsHeight-5+"px":U.top=W+"px",U.left=P.left+"px",U.width=P.width+"px"}),(P,W)=>(n.openBlock(),n.createElementBlock("div",xC,[n.createElementVNode("div",{ref_key:"rootRef",ref:d,tabindex:D.value,class:n.normalizeClass(["pl-multi-dropdown",{open:h.open,error:P.error,disabled:P.disabled}]),onKeydown:K,onFocusout:H},[n.createElementVNode("div",_C,[n.createElementVNode("div",kC,[n.withDirectives(n.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":W[0]||(W[0]=F=>h.search=F),type:"text",tabindex:"-1",disabled:P.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:W[1]||(W[1]=F=>h.open=!0)},null,40,SC),[[n.vModelText,h.search]]),W[3]||(W[3]=n.createTextVNode()),h.open?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"chips-container",onClick:L},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(S.value,(F,Y)=>(n.openBlock(),n.createBlock(n.unref(bs),{key:Y,closeable:"",small:"",onClick:W[2]||(W[2]=n.withModifiers(ue=>h.open=!0,["stop"])),onClose:ue=>w(F.value)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(F.label||F.value),1)]),_:2},1032,["onClose"]))),128))])),W[4]||(W[4]=n.createTextVNode()),n.createElementVNode("div",{class:"arrow",onClick:n.withModifiers(R,["stop"])}),W[5]||(W[5]=n.createTextVNode()),n.createElementVNode("div",TC,[n.renderSlot(P.$slots,"append")])]),W[10]||(W[10]=n.createTextVNode()),P.label?(n.openBlock(),n.createElementBlock("label",EC,[P.required?(n.openBlock(),n.createElementBlock("i",NC)):n.createCommentVNode("",!0),W[6]||(W[6]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(P.label),1),W[7]||(W[7]=n.createTextVNode()),n.unref(i).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(P.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),W[11]||(W[11]=n.createTextVNode()),h.open?(n.openBlock(),n.createBlock(n.Teleport,{key:1,to:"body"},[n.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-multi-dropdown__options",style:n.normalizeStyle(U),tabindex:"-1",onFocusout:H},[n.createElementVNode("div",AC,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(S.value,(F,Y)=>(n.openBlock(),n.createBlock(n.unref(bs),{key:Y,closeable:"",small:"",onClose:ue=>w(F.value)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(F.label||F.value),1)]),_:2},1032,["onClose"]))),128))]),W[8]||(W[8]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(k.value,(F,Y)=>(n.openBlock(),n.createBlock(aa,{key:Y,option:F,"text-item":"text","is-selected":F.selected,"is-hovered":h.activeOption==Y,size:"medium","use-checkbox":"",onClick:n.withModifiers(ue=>A(F.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),W[9]||(W[9]=n.createTextVNode()),k.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",MC,"Nothing found"))],36)])):n.createCommentVNode("",!0),W[12]||(W[12]=n.createTextVNode()),n.createVNode(on,{class:"pl-multi-dropdown__contour"})])],42,CC),W[13]||(W[13]=n.createTextVNode()),P.error?(n.openBlock(),n.createElementBlock("div",BC,n.toDisplayString(P.error),1)):P.helper?(n.openBlock(),n.createElementBlock("div",PC,n.toDisplayString(P.helper),1)):n.createCommentVNode("",!0)]))}}),ws=n.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,r=n.computed(()=>e.modelValue);return(o,i)=>(n.openBlock(),n.createElementBlock("div",{tabindex:"0",class:n.normalizeClass(["pl-checkbox-base",{checked:r.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=s=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=n.withKeys(s=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),LC={name:"PlCheckbox"},IC=n.defineComponent({...LC,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,r=n.useSlots();return(o,i)=>n.unref(r).default?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[n.createVNode(ws,n.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=s=>o.$emit("update:modelValue",s))}),null,16),i[3]||(i[3]=n.createTextVNode()),n.createElementVNode("label",{onClick:i[1]||(i[1]=s=>o.$emit("update:modelValue",!o.$props.modelValue))},[n.renderSlot(o.$slots,"default")])],2)):(n.openBlock(),n.createBlock(ws,n.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=s=>o.$emit("update:modelValue",s))}),null,16))}}),FC={key:0},RC=["onClick"],OC={name:"PlCheckboxGroup"},zC=n.defineComponent({...OC,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const r=e,o=t,i=d=>o.modelValue.includes(d),s=d=>{const u=o.modelValue??[];r("update:modelValue",i(d)?u.filter(p=>p!==d):[...u,d])};return(d,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-checkbox-group",{disabled:d.disabled}])},[d.label?(n.openBlock(),n.createElementBlock("label",FC,n.toDisplayString(d.label),1)):n.createCommentVNode("",!0),u[1]||(u[1]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,h)=>(n.openBlock(),n.createElementBlock("div",{key:h},[n.createVNode(ws,{disabled:d.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>s(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[0]||(u[0]=n.createTextVNode()),n.createElementVNode("label",{onClick:n.withModifiers(()=>s(p.value),["stop"])},n.toDisplayString(p.label),9,RC)]))),128))],2))}}),GC="_component_tupwt_1",jC={component:GC},UC={};function ZC(t,e){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(t.$style.component)},e[0]||(e[0]=[n.createElementVNode("div",null,null,-1)]),2)}const $C={$style:jC},WC=rn(UC,[["render",ZC],["__cssModules",$C]]),HC={key:1,class:"pl-dialog-modal__title"},qC={inheritAttrs:!1},xs=n.defineComponent({...qC,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.ref(),d=n.useAttrs();function u(p){s.value&&document.contains(p.target)&&!s.value.contains(p.target)&&o("update:modelValue",!1)}return et(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[n.createVNode(n.Transition,{name:"dialog"},{default:n.withCtx(()=>[p.modelValue?(n.openBlock(),n.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:u},[n.createElementVNode("div",n.mergeProps(n.unref(d),{ref_key:"modal",ref:s,class:["pl-dialog-modal",{"has-title":n.unref(r).title,"has-content":n.unref(r).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(n.openBlock(),n.createBlock(WC,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=n.withModifiers(f=>o("update:modelValue",!1),["stop"]))})):n.createCommentVNode("",!0),h[1]||(h[1]=n.createTextVNode()),n.unref(r).title?(n.openBlock(),n.createElementBlock("div",HC,[n.renderSlot(p.$slots,"title")])):n.createCommentVNode("",!0),h[2]||(h[2]=n.createTextVNode()),n.createElementVNode("div",{class:n.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[n.renderSlot(p.$slots,"default")],2),h[3]||(h[3]=n.createTextVNode()),n.unref(r).actions?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[n.renderSlot(p.$slots,"actions")],2)):n.createCommentVNode("",!0)],16)])):n.createCommentVNode("",!0)]),_:3})]))}}),KC=n.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function r(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(n.openBlock(),n.createBlock(n.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:r},{default:n.withCtx(()=>[n.renderSlot(o.$slots,"default")]),_:3}))}}),YC={key:0,class:"pl-slide-modal__title"},JC={class:"pl-slide-modal__content"},QC={key:1,class:"pl-slide-modal__actions"},XC={name:"PlSlideModal",inheritAttrs:!1},e_=n.defineComponent({...XC,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.ref(),d=n.useAttrs();return gi(s,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),et(document,"keydown",u=>{u.key==="Escape"&&o("update:modelValue",!1)}),(u,p)=>(n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[n.createVNode(KC,null,{default:n.withCtx(()=>[u.modelValue?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,ref_key:"modal",ref:s,style:{width:u.width}},n.unref(d),{class:["pl-slide-modal",{"has-title":n.unref(r).title,"has-actions":n.unref(r).actions}],onKeyup:p[1]||(p[1]=n.withKeys(h=>o("update:modelValue",!1),["esc"]))}),[n.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=n.createTextVNode()),n.unref(r).title?(n.openBlock(),n.createElementBlock("div",YC,[n.renderSlot(u.$slots,"title")])):n.createCommentVNode("",!0),p[4]||(p[4]=n.createTextVNode()),n.createElementVNode("div",JC,[n.renderSlot(u.$slots,"default")]),p[5]||(p[5]=n.createTextVNode()),n.unref(r).actions?(n.openBlock(),n.createElementBlock("div",QC,[n.renderSlot(u.$slots,"actions")])):n.createCommentVNode("",!0)],16)):n.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=n.createTextVNode()),u.modelValue&&u.shadow?(n.openBlock(),n.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=n.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):n.createCommentVNode("",!0)]))}}),t_={key:0,class:"label"},r_={name:"PlToggleSwitch"},n_=n.defineComponent({...r_,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,r)=>(n.openBlock(),n.createElementBlock("div",{tabindex:"0",class:n.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:r[0]||(r[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:r[1]||(r[1]=n.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[r[2]||(r[2]=n.createElementVNode("div",{class:"ui-toggle-switch__body"},[n.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),r[3]||(r[3]=n.createTextVNode()),e.label?(n.openBlock(),n.createElementBlock("span",t_,n.toDisplayString(e.label),1)):n.createCommentVNode("",!0)],34))}});function Hu(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function o_(t){return n.unref(t)}const a_=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function i_(t,e,r={}){const{immediate:o=!0}=r,i=n.ref(!1);let s=null;function d(){s&&(clearTimeout(s),s=null)}function u(){i.value=!1,d()}function p(...h){d(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...h)},o_(e))}return o&&(i.value=!0,a_&&p()),Hu(u),{isPending:n.readonly(i),start:p,stop:u}}function l_(t,e,r){return n.watch(t,(o,i,s)=>{o&&e(o,i,s)},{...r,once:!1})}function s_(t,e,r){const{start:o}=i_(s,e,{immediate:!1}),i=n.ref(!1);async function s(){i.value&&(await t(),o())}function d(){i.value||(i.value=!0,s())}function u(){i.value=!1}return r!=null&&r.immediate&&d(),Hu(u),{isActive:i,pause:u,resume:d}}const c_="[==PROGRESS==]";function d_(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function u_(t){const e=n.ref(),r=n.reactive({errorCount:0});async function o(){var s;let d=e.value;if(d===void 0)return;const u=t.mockPlatforma??window.platforma;if(!u){console.warn("Platforma API is not available");return}for(;;){const p=await u.logDriver.readText(d.logHandle,100,d.lastOffset);if(d.error=void 0,r.errorCount=0,p.shouldUpdateHandle||d.logHandle!==((s=e.value)==null?void 0:s.logHandle))return;const h=t.progressPrefix??c_,f=new TextDecoder().decode(p.data).replace(new RegExp(`${d_(h)}`,"g"),"");if(d=Object.assign(d,{lines:d.lines+f,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=s_(()=>o().catch(s=>{e.value&&(r.errorCount++,r.errorCount>(t.maxRetries??3)?e.value.error=s:console.warn("skip error:",s,"retry..."))}),1500,{immediate:!1});return l_(()=>{var s;return(s=e==null?void 0:e.value)==null?void 0:s.finished},()=>i.pause()),n.watch(()=>t.logHandle,s=>{var d;s===void 0?(e.value=void 0,i.pause()):s!==((d=e.value)==null?void 0:d.logHandle)&&(e.value={logHandle:s,lastOffset:0,lines:"",finished:!1,error:void 0},r.errorCount=0,i.resume())},{immediate:!0}),e}const p_={key:0},g_={key:1,class:"pl-log-view__error"},h_={name:"PlLogView"},f_=n.defineComponent({...h_,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=S=>{if(S&&S.ok===!1)return S.errors.join(`
65
- `)},r=t,o=u_(r),i=n.ref(!0),s=n.ref(),d=n.ref(),u=n.computed(()=>{var S;return((S=o.value)==null?void 0:S.error)??r.error??e(r.output)}),p=n.computed(()=>{var S;return((S=o.value)==null?void 0:S.lines)??r.value??pb(r.output)});Vr(d);const h=()=>{p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},f=()=>{Mn(s.value,S=>{i.value&&S.scrollTo(S.scrollLeft,S.scrollHeight)})};n.watch(p,()=>{requestAnimationFrame(()=>{f()})},{immediate:!0});const y=S=>{const k=S.target;i.value=k.scrollTop+20>=k.scrollHeight-k.offsetHeight};return(S,k)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"root",ref:d,class:n.normalizeClass(["pl-log-view",{"has-error":u.value}])},[S.label?(n.openBlock(),n.createElementBlock("label",p_,n.toDisplayString(S.label),1)):n.createCommentVNode("",!0),k[0]||(k[0]=n.createTextVNode()),n.createVNode(on,{class:"pl-log-view__contour"}),k[1]||(k[1]=n.createTextVNode()),n.createVNode(n.unref(Lr),{title:"Copy content",class:"pl-log-view__copy",name:"clipboard",onClick:h}),k[2]||(k[2]=n.createTextVNode()),u.value?(n.openBlock(),n.createElementBlock("div",g_,n.toDisplayString(u.value),1)):(n.openBlock(),n.createElementBlock("div",{key:2,ref_key:"contentRef",ref:s,class:"pl-log-view__content",onScroll:y},n.toDisplayString(p.value),545))],2))}});function m_(t){const e=t.split("/"),r=[];for(let o=0;o<e.length;o++)r.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).join("/")});return r}const v_={class:"file-dialog"},y_={class:"file-dialog__search"},b_={class:"ls-container"},w_={class:"ls-head"},x_={class:"ls-head__breadcrumbs"},C_=["title","onClick"],__={key:0,class:"icon-16 icon-chevron-right"},k_={class:"d-flex ml-auto align-center gap-12"},S_={class:"ls-head__selected"},T_={key:0,class:"ls-loader"},E_={key:1,class:"ls-empty"},N_={key:2,class:"ls-error"},A_={class:"ls-error__message"},M_={key:3,class:"ls-body"},B_=["onClick"],P_=["title"],D_=["onClick"],V_=["title"],qu=n.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const r=e,o=t,i=()=>({dirPath:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1}),s=n.reactive(i()),d=n.computed(()=>s.showHiddenItems?s.items:s.items.filter(U=>!U.name.startsWith("."))),u=n.computed(()=>{var U;return{modelValue:o.modelValue,dirPath:s.dirPath,storageHandle:(U=s.storageEntry)==null?void 0:U.handle}}),p=(U,P)=>{window.platforma&&s.currentLoadingPath!==P&&(s.error="",s.items=[],s.lastSelected=void 0,s.currentLoadingPath=P,window.platforma.lsDriver.listFiles(U,P).then(W=>{P===s.dirPath&&(s.items=gu(W).entries.map(F=>({path:F.fullPath,name:F.name,isDir:F.type==="dir",canBeSelected:F.type==="file"&&(!o.extensions||o.extensions.some(Y=>F.fullPath.endsWith(Y))),handle:F.type==="file"?F.handle:void 0,selected:!1})).sort((F,Y)=>F.isDir&&!Y.isDir?-1:!F.isDir&&Y.isDir?1:F.name.localeCompare(Y.name)).map((F,Y)=>({id:Y,...F})),s.lastSelected=void 0)}).catch(W=>s.error=String(W)).finally(()=>{s.currentLoadingPath=void 0}))},h=()=>{const{storageHandle:U,dirPath:P,modelValue:W}=u.value;U&&W&&p(U,P)},f=mu(U=>{s.dirPath=U??""},1e3),y=n.computed(()=>m_(s.dirPath)),S=n.computed(()=>s.items.filter(U=>U.canBeSelected&&U.selected&&!U.isDir)),k=n.computed(()=>S.value.length>0),D=()=>{r("update:modelValue",!1)},E=()=>{var U;k.value&&(U=s.storageEntry)!=null&&U.handle&&(r("import:files",{storageHandle:s.storageEntry.handle,files:S.value.map(P=>P.handle)}),D())},A=U=>{s.dirPath=U,s.storageEntry&&h()},w=(U,P)=>{const{shiftKey:W,metaKey:F}=U,{lastSelected:Y}=s;if(U.preventDefault(),P.canBeSelected){if(o.multi||s.items.forEach(ue=>ue.selected=!1),P.selected=!0,!o.multi)return;!F&&!W&&s.items.forEach(ue=>{ue.id!==P.id&&(ue.selected=!1)}),W&&Y!==void 0&&s.items.forEach(ue=>{cb(ue.id,Y,P.id)&&(ue.selected=!0)}),P.selected&&(s.lastSelected=P.id)}},L=U=>{U&&!o.multi||s.items.filter(P=>P.canBeSelected).forEach(P=>{P.selected=U})},R=()=>L(!0),H=()=>L(!1),G=()=>{if(s.error="",s.lastSelected=void 0,H(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(U=>{s.storageOptions=U.map(P=>({text:P.name,value:P})),o.autoSelectStorage&&Mn(U.find(P=>P.name==="local"||P.name.startsWith("local_disk_")&&P.initialFullPath.length>4),P=>{s.storageEntry=P,s.dirPath=P.initialFullPath})}).catch(U=>s.error=String(U))};n.watch(n.toRef(s,"storageEntry"),U=>{s.dirPath=(U==null?void 0:U.initialFullPath)??""}),n.watch([()=>s.dirPath,()=>s.storageEntry],()=>{h()}),n.watch(()=>o.modelValue,U=>{U?G():Object.assign(s,i())},{immediate:!0}),et(document,"keydown",U=>{o.modelValue&&U.target===document.body&&(U.metaKey&&U.code==="KeyA"&&(U.preventDefault(),R()),U.metaKey&&U.shiftKey&&U.code==="Period"&&(U.preventDefault(),s.showHiddenItems=!s.showHiddenItems),U.code==="Enter"&&E())}),n.onUpdated(G);const K={mounted:U=>{if(U.clientWidth<U.scrollWidth){const P=U.innerText;U.innerText=P.substring(0,57)+"..."+P.substring(P.length-10)}}};return(U,P)=>(n.openBlock(),n.createBlock(n.unref(xs),{"no-content-gutters":!0,class:"split","model-value":U.modelValue,width:"688px",height:"720px","onUpdate:modelValue":D,onClick:n.withModifiers(H,["stop"])},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(U.title??"Select files"),1)]),actions:n.withCtx(()=>[n.createVNode(n.unref(cs),{style:{"min-width":"160px"},disabled:!k.value,onClick:n.withModifiers(E,["stop"])},{default:n.withCtx(()=>P[14]||(P[14]=[n.createTextVNode("Import")])),_:1},8,["disabled"]),P[16]||(P[16]=n.createTextVNode()),n.createVNode(n.unref(us),{"justify-center":!1,onClick:n.withModifiers(D,["stop"])},{default:n.withCtx(()=>P[15]||(P[15]=[n.createTextVNode("Cancel")])),_:1})]),default:n.withCtx(()=>[P[17]||(P[17]=n.createTextVNode()),n.createElementVNode("div",v_,[n.createElementVNode("div",y_,[n.createVNode(n.unref(ys),{modelValue:s.storageEntry,"onUpdate:modelValue":P[0]||(P[0]=W=>s.storageEntry=W),label:"Select storage",options:s.storageOptions},null,8,["modelValue","options"]),P[1]||(P[1]=n.createTextVNode()),n.createVNode(n.unref(ju),{"model-value":s.dirPath,label:"Enter path","onUpdate:modelValue":n.unref(f)},null,8,["model-value","onUpdate:modelValue"])]),P[13]||(P[13]=n.createTextVNode()),n.createElementVNode("div",b_,[n.createElementVNode("div",w_,[n.createElementVNode("div",x_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(y.value,(W,F)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:F},[n.createElementVNode("div",{title:W.path,onClick:Y=>A(W.path)},n.toDisplayString(W.name),9,C_),P[2]||(P[2]=n.createTextVNode()),W.index!==y.value.length-1?(n.openBlock(),n.createElementBlock("i",__)):n.createCommentVNode("",!0)],64))),128))]),P[3]||(P[3]=n.createTextVNode()),n.createElementVNode("div",k_,[n.createElementVNode("span",S_,"Selected: "+n.toDisplayString(S.value.length),1)])]),P[12]||(P[12]=n.createTextVNode()),s.currentLoadingPath!==void 0?(n.openBlock(),n.createElementBlock("div",T_,P[4]||(P[4]=[n.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):s.storageEntry?s.error?(n.openBlock(),n.createElementBlock("div",N_,[P[6]||(P[6]=n.createElementVNode("div",{class:"ls-error__cat"},null,-1)),P[7]||(P[7]=n.createTextVNode()),n.createElementVNode("div",A_,n.toDisplayString(s.error),1)])):(n.openBlock(),n.createElementBlock("div",M_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,W=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:W.id},[W.isDir?(n.openBlock(),n.createElementBlock("div",{key:0,class:"isDir",onClick:F=>A(W.path)},[P[8]||(P[8]=n.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),P[9]||(P[9]=n.createTextVNode()),n.withDirectives((n.openBlock(),n.createElementBlock("span",{title:W.name},[n.createTextVNode(n.toDisplayString(W.name),1)],8,P_)),[[K]])],8,B_)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass({canBeSelected:W.canBeSelected,selected:W.selected}),onClick:n.withModifiers(F=>w(F,W),["stop"])},[P[10]||(P[10]=n.createElementVNode("i",{class:"mask-16 mask-box isFile"},null,-1)),P[11]||(P[11]=n.createTextVNode()),n.withDirectives((n.openBlock(),n.createElementBlock("span",{title:W.name},[n.createTextVNode(n.toDisplayString(W.name),1)],8,V_)),[[K]])],10,D_))],64))),128))])):(n.openBlock(),n.createElementBlock("div",E_,P[5]||(P[5]=[n.createElementVNode("div",{class:"ls-empty__cat"},null,-1),n.createTextVNode(),n.createElementVNode("div",{class:"ls-empty__message"},"Select storage to preview",-1)])))])]),P[18]||(P[18]=n.createTextVNode())]),_:1},8,["model-value"]))}});var Fe;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const d of i)s[d]=d;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(u=>typeof i[i[u]]!="number"),d={};for(const u of s)d[u]=i[u];return t.objectValues(d)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.push(d);return s},t.find=(i,s)=>{for(const d of i)if(s(d))return d},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,s=" | "){return i.map(d=>typeof d=="string"?`'${d}'`:d).join(s)}t.joinValues=o,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Fe||(Fe={}));var Cs;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Cs||(Cs={}));const ae=Fe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),an=t=>{switch(typeof t){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(t)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(t)?ae.array:t===null?ae.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ae.promise:typeof Map<"u"&&t instanceof Map?ae.map:typeof Set<"u"&&t instanceof Set?ae.set:typeof Date<"u"&&t instanceof Date?ae.date:ae.object;default:return ae.unknown}},Q=Fe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),L_=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Lt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},o={_errors:[]},i=s=>{for(const d of s.issues)if(d.code==="invalid_union")d.unionErrors.map(i);else if(d.code==="invalid_return_type")i(d.returnTypeError);else if(d.code==="invalid_arguments")i(d.argumentsError);else if(d.path.length===0)o._errors.push(r(d));else{let u=o,p=0;for(;p<d.path.length;){const h=d.path[p];p===d.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(r(d))):u[h]=u[h]||{_errors:[]},u=u[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Lt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Fe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},o=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Lt.create=t=>new Lt(t);const oo=(t,e)=>{let r;switch(t.code){case Q.invalid_type:t.received===ae.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Fe.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${Fe.joinValues(t.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Fe.joinValues(t.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${Fe.joinValues(t.options)}, received '${t.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Fe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Q.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Q.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=e.defaultError,Fe.assertNever(t)}return{message:r}};let Ku=oo;function I_(t){Ku=t}function fi(){return Ku}const mi=t=>{const{data:e,path:r,errorMaps:o,issueData:i}=t,s=[...r,...i.path||[]],d={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let u="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)u=h(d,{data:e,defaultError:u}).message;return{...i,path:s,message:u}},F_=[];function ne(t,e){const r=fi(),o=mi({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===oo?void 0:oo].filter(i=>!!i)});t.common.issues.push(o)}class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const o=[];for(const i of r){if(i.status==="aborted")return we;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const i of r){const s=await i.key,d=await i.value;o.push({key:s,value:d})}return ft.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const i of r){const{key:s,value:d}=i;if(s.status==="aborted"||d.status==="aborted")return we;s.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof d.value<"u"||i.alwaysSet)&&(o[s.value]=d.value)}return{status:e.value,value:o}}}const we=Object.freeze({status:"aborted"}),vi=t=>({status:"dirty",value:t}),xt=t=>({status:"valid",value:t}),_s=t=>t.status==="aborted",ks=t=>t.status==="dirty",ia=t=>t.status==="valid",la=t=>typeof Promise<"u"&&t instanceof Promise;function yi(t,e,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Yu(t,e,r,o,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var de;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(de||(de={}));var sa,ca;class Sr{constructor(e,r,o,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ju=(t,e)=>{if(ia(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Lt(t.common.issues);return this._error=r,this._error}}};function Te(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:i}=t;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,d)=>{var u,p;const{message:h}=t;return s.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:(u=h??o)!==null&&u!==void 0?u:d.defaultError}:s.code!=="invalid_type"?{message:d.defaultError}:{message:(p=h??r)!==null&&p!==void 0?p:d.defaultError}},description:i}}class Ae{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return an(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:an(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ft,ctx:{common:e.parent.common,data:e.data,parsedType:an(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(la(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const i={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:an(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Ju(i,s)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:an(e)},i=this._parse({data:e,path:o.path,parent:o}),s=await(la(i)?i:Promise.resolve(i));return Ju(o,s)}refine(e,r){const o=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const d=e(i),u=()=>s.addIssue({code:Q.custom,...o(i)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,r){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof r=="function"?r(o,i):r),!1))}_refinement(e){return new lr({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Er.create(this,this._def)}nullable(){return un.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this,this._def)}promise(){return so.create(this,this._def)}or(e){return ga.create([this,e],this._def)}and(e){return ha.create(this,e,this._def)}transform(e){return new lr({...Te(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new ba({...Te(this._def),innerType:this,defaultValue:r,typeName:ve.ZodDefault})}brand(){return new Es({typeName:ve.ZodBranded,type:this,...Te(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new wa({...Te(this._def),innerType:this,catchValue:r,typeName:ve.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return xa.create(this,e)}readonly(){return Ca.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R_=/^c[^\s-]{8,}$/i,O_=/^[0-9a-z]+$/,z_=/^[0-9A-HJKMNP-TV-Z]{26}$/,G_=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,j_=/^[a-z0-9_-]{21}$/i,U_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Z_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ss;const W_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,H_=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,q_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Qu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",K_=new RegExp(`^${Qu}$`);function Xu(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Y_(t){return new RegExp(`^${Xu(t)}$`)}function ep(t){let e=`${Qu}T${Xu(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function J_(t,e){return!!((e==="v4"||!e)&&W_.test(t)||(e==="v6"||!e)&&H_.test(t))}class ar extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const i=this._getOrReturnCtx(e);return ne(i,{code:Q.invalid_type,expected:ae.string,received:i.parsedType}),we}const r=new ft;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,d=e.data.length<i.value;(s||d)&&(o=this._getOrReturnCtx(e,o),s?ne(o,{code:Q.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):d&&ne(o,{code:Q.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Z_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"email",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ss||(Ss=new RegExp($_,"u")),Ss.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"emoji",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")G_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"uuid",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")j_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"nanoid",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")R_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"cuid",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")O_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"cuid2",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")z_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"ulid",code:Q.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ne(o,{validation:"url",code:Q.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"regex",code:Q.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ep(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?K_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Y_(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?U_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"duration",code:Q.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?J_(e.data,i.version)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"ip",code:Q.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?q_.test(e.data)||(o=this._getOrReturnCtx(e,o),ne(o,{validation:"base64",code:Q.invalid_string,message:i.message}),r.dirty()):Fe.assertNever(i);return{status:r.value,value:e.data}}_regex(e,r,o){return this.refinement(i=>e.test(i),{validation:r,code:Q.invalid_string,...de.errToObj(o)})}_addCheck(e){return new ar({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...de.errToObj(e)})}url(e){return this._addCheck({kind:"url",...de.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...de.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...de.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...de.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...de.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...de.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...de.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...de.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...de.errToObj(e)})}datetime(e){var r,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...de.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...de.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...de.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...de.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...de.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...de.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...de.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...de.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...de.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...de.errToObj(r)})}nonempty(e){return this.min(1,de.errToObj(e))}trim(){return new ar({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ar({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ar({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ar.create=t=>{var e;return new ar({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};function Q_(t,e){const r=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=r>o?r:o,s=parseInt(t.toFixed(i).replace(".","")),d=parseInt(e.toFixed(i).replace(".",""));return s%d/Math.pow(10,i)}class ln extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){const i=this._getOrReturnCtx(e);return ne(i,{code:Q.invalid_type,expected:ae.number,received:i.parsedType}),we}let r;const o=new ft;for(const i of this._def.checks)i.kind==="int"?Fe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Q_(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.not_finite,message:i.message}),o.dirty()):Fe.assertNever(i);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,de.toString(r))}gt(e,r){return this.setLimit("min",e,!1,de.toString(r))}lte(e,r){return this.setLimit("max",e,!0,de.toString(r))}lt(e,r){return this.setLimit("max",e,!1,de.toString(r))}setLimit(e,r,o,i){return new ln({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:de.toString(i)}]})}_addCheck(e){return new ln({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:de.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:de.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Fe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ln.create=t=>new ln({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class sn extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ae.bigint){const i=this._getOrReturnCtx(e);return ne(i,{code:Q.invalid_type,expected:ae.bigint,received:i.parsedType}),we}let r;const o=new ft;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:Q.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Fe.assertNever(i);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,de.toString(r))}gt(e,r){return this.setLimit("min",e,!1,de.toString(r))}lte(e,r){return this.setLimit("max",e,!0,de.toString(r))}lt(e,r){return this.setLimit("max",e,!1,de.toString(r))}setLimit(e,r,o,i){return new sn({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:de.toString(i)}]})}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}sn.create=t=>{var e;return new sn({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};class da extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.boolean,received:r.parsedType}),we}return xt(e.data)}}da.create=t=>new da({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Pn extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const i=this._getOrReturnCtx(e);return ne(i,{code:Q.invalid_type,expected:ae.date,received:i.parsedType}),we}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return ne(i,{code:Q.invalid_date}),we}const r=new ft;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),ne(o,{code:Q.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Fe.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Pn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:de.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:de.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Pn.create=t=>new Pn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Te(t)});class bi extends Ae{_parse(e){if(this._getType(e)!==ae.symbol){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.symbol,received:r.parsedType}),we}return xt(e.data)}}bi.create=t=>new bi({typeName:ve.ZodSymbol,...Te(t)});class ua extends Ae{_parse(e){if(this._getType(e)!==ae.undefined){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.undefined,received:r.parsedType}),we}return xt(e.data)}}ua.create=t=>new ua({typeName:ve.ZodUndefined,...Te(t)});class pa extends Ae{_parse(e){if(this._getType(e)!==ae.null){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.null,received:r.parsedType}),we}return xt(e.data)}}pa.create=t=>new pa({typeName:ve.ZodNull,...Te(t)});class ao extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return xt(e.data)}}ao.create=t=>new ao({typeName:ve.ZodAny,...Te(t)});class Dn extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return xt(e.data)}}Dn.create=t=>new Dn({typeName:ve.ZodUnknown,...Te(t)});class Ir extends Ae{_parse(e){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.never,received:r.parsedType}),we}}Ir.create=t=>new Ir({typeName:ve.ZodNever,...Te(t)});class wi extends Ae{_parse(e){if(this._getType(e)!==ae.undefined){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.void,received:r.parsedType}),we}return xt(e.data)}}wi.create=t=>new wi({typeName:ve.ZodVoid,...Te(t)});class ir extends Ae{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),i=this._def;if(r.parsedType!==ae.array)return ne(r,{code:Q.invalid_type,expected:ae.array,received:r.parsedType}),we;if(i.exactLength!==null){const d=r.data.length>i.exactLength.value,u=r.data.length<i.exactLength.value;(d||u)&&(ne(r,{code:d?Q.too_big:Q.too_small,minimum:u?i.exactLength.value:void 0,maximum:d?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(ne(r,{code:Q.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(ne(r,{code:Q.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((d,u)=>i.type._parseAsync(new Sr(r,d,r.path,u)))).then(d=>ft.mergeArray(o,d));const s=[...r.data].map((d,u)=>i.type._parseSync(new Sr(r,d,r.path,u)));return ft.mergeArray(o,s)}get element(){return this._def.type}min(e,r){return new ir({...this._def,minLength:{value:e,message:de.toString(r)}})}max(e,r){return new ir({...this._def,maxLength:{value:e,message:de.toString(r)}})}length(e,r){return new ir({...this._def,exactLength:{value:e,message:de.toString(r)}})}nonempty(e){return this.min(1,e)}}ir.create=(t,e)=>new ir({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Te(e)});function io(t){if(t instanceof Ye){const e={};for(const r in t.shape){const o=t.shape[r];e[r]=Er.create(io(o))}return new Ye({...t._def,shape:()=>e})}else return t instanceof ir?new ir({...t._def,type:io(t.element)}):t instanceof Er?Er.create(io(t.unwrap())):t instanceof un?un.create(io(t.unwrap())):t instanceof Tr?Tr.create(t.items.map(e=>io(e))):t}class Ye extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Fe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==ae.object){const p=this._getOrReturnCtx(e);return ne(p,{code:Q.invalid_type,expected:ae.object,received:p.parsedType}),we}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),d=[];if(!(this._def.catchall instanceof Ir&&this._def.unknownKeys==="strip"))for(const p in o.data)s.includes(p)||d.push(p);const u=[];for(const p of s){const h=i[p],f=o.data[p];u.push({key:{status:"valid",value:p},value:h._parse(new Sr(o,f,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Ir){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of d)u.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")d.length>0&&(ne(o,{code:Q.unrecognized_keys,keys:d}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const h of d){const f=o.data[h];u.push({key:{status:"valid",value:h},value:p._parse(new Sr(o,f,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of u){const f=await h.key,y=await h.value;p.push({key:f,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>ft.mergeObjectSync(r,p)):ft.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(e){return de.errToObj,new Ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var i,s,d,u;const p=(d=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,o).message)!==null&&d!==void 0?d:o.defaultError;return r.code==="unrecognized_keys"?{message:(u=de.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new Ye({...this._def,unknownKeys:"strip"})}passthrough(){return new Ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Ye({...this._def,catchall:e})}pick(e){const r={};return Fe.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new Ye({...this._def,shape:()=>r})}omit(e){const r={};return Fe.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new Ye({...this._def,shape:()=>r})}deepPartial(){return io(this)}partial(e){const r={};return Fe.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?r[o]=i:r[o]=i.optional()}),new Ye({...this._def,shape:()=>r})}required(e){const r={};return Fe.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Er;)i=i._def.innerType;r[o]=i}}),new Ye({...this._def,shape:()=>r})}keyof(){return tp(Fe.objectKeys(this.shape))}}Ye.create=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strip",catchall:Ir.create(),typeName:ve.ZodObject,...Te(e)}),Ye.strictCreate=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strict",catchall:Ir.create(),typeName:ve.ZodObject,...Te(e)}),Ye.lazycreate=(t,e)=>new Ye({shape:t,unknownKeys:"strip",catchall:Ir.create(),typeName:ve.ZodObject,...Te(e)});class ga extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function i(s){for(const u of s)if(u.result.status==="valid")return u.result;for(const u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;const d=s.map(u=>new Lt(u.ctx.common.issues));return ne(r,{code:Q.invalid_union,unionErrors:d}),we}if(r.common.async)return Promise.all(o.map(async s=>{const d={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:d}),ctx:d}})).then(i);{let s;const d=[];for(const p of o){const h={...r,common:{...r.common,issues:[]},parent:null},f=p._parseSync({data:r.data,path:r.path,parent:h});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:h}),h.common.issues.length&&d.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const u=d.map(p=>new Lt(p));return ne(r,{code:Q.invalid_union,unionErrors:u}),we}}get options(){return this._def.options}}ga.create=(t,e)=>new ga({options:t,typeName:ve.ZodUnion,...Te(e)});const cn=t=>t instanceof ma?cn(t.schema):t instanceof lr?cn(t.innerType()):t instanceof va?[t.value]:t instanceof dn?t.options:t instanceof ya?Fe.objectValues(t.enum):t instanceof ba?cn(t._def.innerType):t instanceof ua?[void 0]:t instanceof pa?[null]:t instanceof Er?[void 0,...cn(t.unwrap())]:t instanceof un?[null,...cn(t.unwrap())]:t instanceof Es||t instanceof Ca?cn(t.unwrap()):t instanceof wa?cn(t._def.innerType):[];class xi extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==ae.object)return ne(r,{code:Q.invalid_type,expected:ae.object,received:r.parsedType}),we;const o=this.discriminator,i=r.data[o],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(ne(r,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const i=new Map;for(const s of r){const d=cn(s.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(i.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);i.set(u,s)}}return new xi({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Te(o)})}}function Ts(t,e){const r=an(t),o=an(e);if(t===e)return{valid:!0,data:t};if(r===ae.object&&o===ae.object){const i=Fe.objectKeys(e),s=Fe.objectKeys(t).filter(u=>i.indexOf(u)!==-1),d={...t,...e};for(const u of s){const p=Ts(t[u],e[u]);if(!p.valid)return{valid:!1};d[u]=p.data}return{valid:!0,data:d}}else if(r===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const d=t[s],u=e[s],p=Ts(d,u);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return r===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ha extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),i=(s,d)=>{if(_s(s)||_s(d))return we;const u=Ts(s.value,d.value);return u.valid?((ks(s)||ks(d))&&r.dirty(),{status:r.value,value:u.data}):(ne(o,{code:Q.invalid_intersection_types}),we)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([s,d])=>i(s,d)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ha.create=(t,e,r)=>new ha({left:t,right:e,typeName:ve.ZodIntersection,...Te(r)});class Tr extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ne(o,{code:Q.invalid_type,expected:ae.array,received:o.parsedType}),we;if(o.data.length<this._def.items.length)return ne(o,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&o.data.length>this._def.items.length&&(ne(o,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...o.data].map((s,d)=>{const u=this._def.items[d]||this._def.rest;return u?u._parse(new Sr(o,s,o.path,d)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>ft.mergeArray(r,s)):ft.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new Tr({...this._def,rest:e})}}Tr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Tr({items:t,typeName:ve.ZodTuple,rest:null,...Te(e)})};class fa extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ne(o,{code:Q.invalid_type,expected:ae.object,received:o.parsedType}),we;const i=[],s=this._def.keyType,d=this._def.valueType;for(const u in o.data)i.push({key:s._parse(new Sr(o,u,o.path,u)),value:d._parse(new Sr(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?ft.mergeObjectAsync(r,i):ft.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Ae?new fa({keyType:e,valueType:r,typeName:ve.ZodRecord,...Te(o)}):new fa({keyType:ar.create(),valueType:e,typeName:ve.ZodRecord,...Te(r)})}}class Ci extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ne(o,{code:Q.invalid_type,expected:ae.map,received:o.parsedType}),we;const i=this._def.keyType,s=this._def.valueType,d=[...o.data.entries()].map(([u,p],h)=>({key:i._parse(new Sr(o,u,o.path,[h,"key"])),value:s._parse(new Sr(o,p,o.path,[h,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of d){const h=await p.key,f=await p.value;if(h.status==="aborted"||f.status==="aborted")return we;(h.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(h.value,f.value)}return{status:r.value,value:u}})}else{const u=new Map;for(const p of d){const h=p.key,f=p.value;if(h.status==="aborted"||f.status==="aborted")return we;(h.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(h.value,f.value)}return{status:r.value,value:u}}}}Ci.create=(t,e,r)=>new Ci({valueType:e,keyType:t,typeName:ve.ZodMap,...Te(r)});class Vn extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ne(o,{code:Q.invalid_type,expected:ae.set,received:o.parsedType}),we;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ne(o,{code:Q.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ne(o,{code:Q.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function d(p){const h=new Set;for(const f of p){if(f.status==="aborted")return we;f.status==="dirty"&&r.dirty(),h.add(f.value)}return{status:r.value,value:h}}const u=[...o.data.values()].map((p,h)=>s._parse(new Sr(o,p,o.path,h)));return o.common.async?Promise.all(u).then(p=>d(p)):d(u)}min(e,r){return new Vn({...this._def,minSize:{value:e,message:de.toString(r)}})}max(e,r){return new Vn({...this._def,maxSize:{value:e,message:de.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Vn.create=(t,e)=>new Vn({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Te(e)});class lo extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==ae.function)return ne(r,{code:Q.invalid_type,expected:ae.function,received:r.parsedType}),we;function o(u,p){return mi({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,fi(),oo].filter(h=>!!h),issueData:{code:Q.invalid_arguments,argumentsError:p}})}function i(u,p){return mi({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,fi(),oo].filter(h=>!!h),issueData:{code:Q.invalid_return_type,returnTypeError:p}})}const s={errorMap:r.common.contextualErrorMap},d=r.data;if(this._def.returns instanceof so){const u=this;return xt(async function(...p){const h=new Lt([]),f=await u._def.args.parseAsync(p,s).catch(S=>{throw h.addIssue(o(p,S)),h}),y=await Reflect.apply(d,this,f);return await u._def.returns._def.type.parseAsync(y,s).catch(S=>{throw h.addIssue(i(y,S)),h})})}else{const u=this;return xt(function(...p){const h=u._def.args.safeParse(p,s);if(!h.success)throw new Lt([o(p,h.error)]);const f=Reflect.apply(d,this,h.data),y=u._def.returns.safeParse(f,s);if(!y.success)throw new Lt([i(f,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new lo({...this._def,args:Tr.create(e).rest(Dn.create())})}returns(e){return new lo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new lo({args:e||Tr.create([]).rest(Dn.create()),returns:r||Dn.create(),typeName:ve.ZodFunction,...Te(o)})}}class ma extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ma.create=(t,e)=>new ma({getter:t,typeName:ve.ZodLazy,...Te(e)});class va extends Ae{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ne(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}}va.create=(t,e)=>new va({value:t,typeName:ve.ZodLiteral,...Te(e)});function tp(t,e){return new dn({values:t,typeName:ve.ZodEnum,...Te(e)})}class dn extends Ae{constructor(){super(...arguments),sa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return ne(r,{expected:Fe.joinValues(o),received:r.parsedType,code:Q.invalid_type}),we}if(yi(this,sa)||Yu(this,sa,new Set(this._def.values)),!yi(this,sa).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return ne(r,{received:r.data,code:Q.invalid_enum_value,options:o}),we}return xt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return dn.create(e,{...this._def,...r})}exclude(e,r=this._def){return dn.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}sa=new WeakMap,dn.create=tp;class ya extends Ae{constructor(){super(...arguments),ca.set(this,void 0)}_parse(e){const r=Fe.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const i=Fe.objectValues(r);return ne(o,{expected:Fe.joinValues(i),received:o.parsedType,code:Q.invalid_type}),we}if(yi(this,ca)||Yu(this,ca,new Set(Fe.getValidEnumValues(this._def.values))),!yi(this,ca).has(e.data)){const i=Fe.objectValues(r);return ne(o,{received:o.data,code:Q.invalid_enum_value,options:i}),we}return xt(e.data)}get enum(){return this._def.values}}ca=new WeakMap,ya.create=(t,e)=>new ya({values:t,typeName:ve.ZodNativeEnum,...Te(e)});class so extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==ae.promise&&r.common.async===!1)return ne(r,{code:Q.invalid_type,expected:ae.promise,received:r.parsedType}),we;const o=r.parsedType===ae.promise?r.data:Promise.resolve(r.data);return xt(o.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}so.create=(t,e)=>new so({type:t,typeName:ve.ZodPromise,...Te(e)});class lr extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:d=>{ne(o,d),d.fatal?r.abort():r.dirty()},get path(){return o.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const d=i.transform(o.data,s);if(o.common.async)return Promise.resolve(d).then(async u=>{if(r.value==="aborted")return we;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?we:p.status==="dirty"||r.value==="dirty"?vi(p.value):p});{if(r.value==="aborted")return we;const u=this._def.schema._parseSync({data:d,path:o.path,parent:o});return u.status==="aborted"?we:u.status==="dirty"||r.value==="dirty"?vi(u.value):u}}if(i.type==="refinement"){const d=u=>{const p=i.refinement(u,s);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?we:(u.status==="dirty"&&r.dirty(),d(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?we:(u.status==="dirty"&&r.dirty(),d(u.value).then(()=>({status:r.value,value:u.value}))))}if(i.type==="transform")if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ia(d))return d;const u=i.transform(d.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>ia(d)?Promise.resolve(i.transform(d.value,s)).then(u=>({status:r.value,value:u})):d);Fe.assertNever(i)}}lr.create=(t,e,r)=>new lr({schema:t,typeName:ve.ZodEffects,effect:e,...Te(r)}),lr.createWithPreprocess=(t,e,r)=>new lr({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Te(r)});class Er extends Ae{_parse(e){return this._getType(e)===ae.undefined?xt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Er.create=(t,e)=>new Er({innerType:t,typeName:ve.ZodOptional,...Te(e)});class un extends Ae{_parse(e){return this._getType(e)===ae.null?xt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}un.create=(t,e)=>new un({innerType:t,typeName:ve.ZodNullable,...Te(e)});class ba extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ba.create=(t,e)=>new ba({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class wa extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return la(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}wa.create=(t,e)=>new wa({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class _i extends Ae{_parse(e){if(this._getType(e)!==ae.nan){const r=this._getOrReturnCtx(e);return ne(r,{code:Q.invalid_type,expected:ae.nan,received:r.parsedType}),we}return{status:"valid",value:e.data}}}_i.create=t=>new _i({typeName:ve.ZodNaN,...Te(t)});const X_=Symbol("zod_brand");class Es extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class xa extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?we:i.status==="dirty"?(r.dirty(),vi(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?we:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,r){return new xa({in:e,out:r,typeName:ve.ZodPipeline})}}class Ca extends Ae{_parse(e){const r=this._def.innerType._parse(e),o=i=>(ia(i)&&(i.value=Object.freeze(i.value)),i);return la(r)?r.then(i=>o(i)):o(r)}unwrap(){return this._def.innerType}}Ca.create=(t,e)=>new Ca({innerType:t,typeName:ve.ZodReadonly,...Te(e)});function rp(t,e={},r){return t?ao.create().superRefine((o,i)=>{var s,d;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(d=(s=u.fatal)!==null&&s!==void 0?s:r)!==null&&d!==void 0?d:!0,h=typeof u=="string"?{message:u}:u;i.addIssue({code:"custom",...h,fatal:p})}}):ao.create()}const e1={object:Ye.lazycreate};var ve;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ve||(ve={}));const t1=(t,e={message:`Input not instance of ${t.name}`})=>rp(r=>r instanceof t,e),np=ar.create,op=ln.create,r1=_i.create,n1=sn.create,ap=da.create,o1=Pn.create,a1=bi.create,i1=ua.create,l1=pa.create,s1=ao.create,c1=Dn.create,d1=Ir.create,u1=wi.create,p1=ir.create,g1=Ye.create,h1=Ye.strictCreate,f1=ga.create,m1=xi.create,v1=ha.create,y1=Tr.create,b1=fa.create,w1=Ci.create,x1=Vn.create,C1=lo.create,_1=ma.create,k1=va.create,S1=dn.create,T1=ya.create,E1=so.create,ip=lr.create,N1=Er.create,A1=un.create,M1=lr.createWithPreprocess,B1=xa.create;var ki=Object.freeze({__proto__:null,defaultErrorMap:oo,setErrorMap:I_,getErrorMap:fi,makeIssue:mi,EMPTY_PATH:F_,addIssueToContext:ne,ParseStatus:ft,INVALID:we,DIRTY:vi,OK:xt,isAborted:_s,isDirty:ks,isValid:ia,isAsync:la,get util(){return Fe},get objectUtil(){return Cs},ZodParsedType:ae,getParsedType:an,ZodType:Ae,datetimeRegex:ep,ZodString:ar,ZodNumber:ln,ZodBigInt:sn,ZodBoolean:da,ZodDate:Pn,ZodSymbol:bi,ZodUndefined:ua,ZodNull:pa,ZodAny:ao,ZodUnknown:Dn,ZodNever:Ir,ZodVoid:wi,ZodArray:ir,ZodObject:Ye,ZodUnion:ga,ZodDiscriminatedUnion:xi,ZodIntersection:ha,ZodTuple:Tr,ZodRecord:fa,ZodMap:Ci,ZodSet:Vn,ZodFunction:lo,ZodLazy:ma,ZodLiteral:va,ZodEnum:dn,ZodNativeEnum:ya,ZodPromise:so,ZodEffects:lr,ZodTransformer:lr,ZodOptional:Er,ZodNullable:un,ZodDefault:ba,ZodCatch:wa,ZodNaN:_i,BRAND:X_,ZodBranded:Es,ZodPipeline:xa,ZodReadonly:Ca,custom:rp,Schema:Ae,ZodSchema:Ae,late:e1,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>ar.create({...t,coerce:!0}),number:t=>ln.create({...t,coerce:!0}),boolean:t=>da.create({...t,coerce:!0}),bigint:t=>sn.create({...t,coerce:!0}),date:t=>Pn.create({...t,coerce:!0})},any:s1,array:p1,bigint:n1,boolean:ap,date:o1,discriminatedUnion:m1,effect:ip,enum:S1,function:C1,instanceof:t1,intersection:v1,lazy:_1,literal:k1,map:w1,nan:r1,nativeEnum:T1,never:d1,null:l1,nullable:A1,number:op,object:g1,oboolean:()=>ap().optional(),onumber:()=>op().optional(),optional:N1,ostring:()=>np().optional(),pipeline:B1,preprocess:M1,promise:E1,record:b1,set:x1,strictObject:h1,string:np,symbol:a1,transformer:ip,tuple:y1,undefined:i1,union:f1,unknown:c1,void:u1,NEVER:we,ZodIssueCode:Q,quotelessJson:L_,ZodError:Lt});function P1(t){throw new Error("Unexpected object: "+t)}const lp="upload://upload/",sp="index://index/";function D1(t){return t.startsWith(lp)}function V1(t){return t.startsWith(sp)}function L1(t){if(V1(t)){const e=t.slice(sp.length);return JSON.parse(decodeURIComponent(e)).path}else if(D1(t)){const e=t.slice(lp.length);return JSON.parse(decodeURIComponent(e)).localPath}P1(t)}ki.object({__isRef:ki.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:ki.string().describe("Upstream block id"),name:ki.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function I1(t){return t.replace(/^.*[\\/]/,"")}const F1={key:0,ref:"label"},R1={key:0,class:"required-icon"},O1=["data-placeholder"],z1={key:5,class:"pl-file-input__stats"},G1={key:0,class:"pl-file-input__error"},j1={key:1,class:"upl-file-input__helper"},cp=n.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},fileDialogTitle:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},showFilenameOnly:{type:Boolean},cellStyle:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.reactive({fileDialogOpen:!1}),o=n.useSlots(),i=e,s=t,d=n.computed(()=>{if(s.modelValue)try{const w=L1(s.modelValue).trim();return s.showFilenameOnly?I1(w):w}catch(w){return console.error(w),s.modelValue}return""}),u=n.computed(()=>s.progress&&!s.progress.done),p=n.computed(()=>s.progress&&s.progress.done),h=n.computed(()=>s.error),f=n.computed(()=>s.error),y=n.computed(()=>{const{status:w,done:L}=s.progress??{};return!w||!w.bytesTotal?"":w.bytesProcessed&&!L?es(w.bytesProcessed,{})+" / "+es(w.bytesTotal,{}):es(w.bytesTotal,{})}),S=n.computed(()=>{var w;const{progress:L}=s;return L?{width:L.done?"100%":Math.round((((w=L.status)==null?void 0:w.progress)??0)*100)+"%"}:{}}),k=()=>{r.fileDialogOpen=!0},D=w=>{w.files.length&&i("update:modelValue",w.files[0])},E=()=>i("update:modelValue",void 0),A=n.ref();return s.cellStyle||Vr(A),(w,L)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("div",{class:n.normalizeClass([{"pl-file-input__cell-style":!!w.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[n.createElementVNode("div",{ref_key:"rootRef",ref:A,class:n.normalizeClass(["pl-file-input",{dashed:w.dashed,error:h.value}]),tabindex:"0",onKeyup:n.withKeys(k,["enter"])},[n.createElementVNode("div",{class:"pl-file-input__progress",style:n.normalizeStyle(S.value)},null,4),L[3]||(L[3]=n.createTextVNode()),!w.cellStyle&&w.label?(n.openBlock(),n.createElementBlock("label",F1,[w.required?(n.openBlock(),n.createElementBlock("i",R1)):n.createCommentVNode("",!0),L[1]||(L[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(w.label),1),L[2]||(L[2]=n.createTextVNode()),n.unref(o).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(w.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),L[4]||(L[4]=n.createTextVNode()),h.value?(n.openBlock(),n.createBlock(n.unref(Lr),{key:1,name:"restart"})):u.value?(n.openBlock(),n.createBlock(n.unref(Lr),{key:2,name:"cloud-upload"})):p.value?(n.openBlock(),n.createBlock(n.unref(Lr),{key:3,name:"success"})):(n.openBlock(),n.createBlock(n.unref(Lr),{key:4,name:"paper-clip"})),L[5]||(L[5]=n.createTextVNode()),n.createElementVNode("div",{"data-placeholder":w.placeholder??"Choose file",class:"pl-file-input__filename",onClick:n.withModifiers(k,["stop"])},n.toDisplayString(d.value),9,O1),L[6]||(L[6]=n.createTextVNode()),y.value?(n.openBlock(),n.createElementBlock("div",z1,n.toDisplayString(y.value),1)):n.createCommentVNode("",!0),L[7]||(L[7]=n.createTextVNode()),w.modelValue?(n.openBlock(),n.createBlock(n.unref(Lr),{key:6,name:"close",onClick:n.withModifiers(E,["stop"])})):n.createCommentVNode("",!0),L[8]||(L[8]=n.createTextVNode()),n.createVNode(on,{class:"pl-file-input__contour"})],34),L[9]||(L[9]=n.createTextVNode()),h.value?(n.openBlock(),n.createElementBlock("div",G1,n.toDisplayString(f.value),1)):w.helper?(n.openBlock(),n.createElementBlock("div",j1,n.toDisplayString(w.helper),1)):n.createCommentVNode("",!0)],2),L[10]||(L[10]=n.createTextVNode()),n.createVNode(n.unref(qu),{modelValue:r.fileDialogOpen,"onUpdate:modelValue":L[0]||(L[0]=R=>r.fileDialogOpen=R),extensions:w.extensions,title:w.fileDialogTitle,"onImport:files":D},null,8,["modelValue","extensions","title"])],64))}}),U1={class:"pl-notification-alert__wrapper d-flex"},Z1={class:"pl-notification-alert__content flex-grow-1"},$1={key:0,class:"pl-notification-alert__close"},W1={key:0,class:"pl-notification-alert__actions d-flex"},dp=n.defineComponent({__name:"PlNotificationAlert",props:n.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=n.useModel(t,"modelValue");function o(){e.closable&&(r.value=!1)}return(i,s)=>r.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:n.normalizeStyle({width:`${i.width}`})},[n.createElementVNode("div",U1,[n.createElementVNode("div",Z1,[n.renderSlot(i.$slots,"default")]),s[0]||(s[0]=n.createTextVNode()),i.closable?(n.openBlock(),n.createElementBlock("div",$1,[n.createVNode(n.unref(us),{icon:"close",onClick:o})])):n.createCommentVNode("",!0)]),s[1]||(s[1]=n.createTextVNode()),i.$slots.actions?(n.openBlock(),n.createElementBlock("div",W1,[n.renderSlot(i.$slots,"actions")])):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0)}}),up=n.defineComponent({__name:"PlCopyData",emits:["copy"],setup(t,{emit:e}){const r=e,o=n.ref(!1),i=n.computed(()=>o.value?"mask-clipboard-copied":"mask-clipboard");function s(){o.value=!0,setTimeout(()=>o.value=!1,700),r("copy")}return(d,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([i.value,"mask-24"]),onClick:s},null,2))}}),H1=n.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return n.provide(e.contextKey,n.computed(()=>e.context)),(r,o)=>n.renderSlot(r.$slots,"default")}});function mt(t,e,r){return e>t?e:t>r?r:t}const Ns=t=>n.computed(()=>{const e=[100],{min:r,max:o,step:i}=t.value;let s=r;for(;s<o;){s+=i;const d=(1-(mt(s,r,o)-r)/(o-r))*100;e.push(d)}return e}),q1={class:"ui-slider__wrapper"},K1={class:"ui-slider__label-section"},Y1={key:0,class:"text-s"},J1={key:1,class:"ui-slider__value-static text-s"},Q1={class:"ui-slider__base"},X1={class:"ui-slider__container"},ek={class:"ui-slider__container ui-slider__container-thumb"},tk={class:"ui-slider__input-wrapper d-flex"},rk=["value"],nk={key:0,class:"ui-slider__error"},ok=n.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.reactive({deltaValue:0}),d=n.computed(()=>i.max-i.min),u=n.computed(()=>mt((i.modelValue??0)+s.deltaValue,i.min,i.max)),p=n.ref(i.modelValue),h=n.computed(()=>{const G=i.modelValue;return Number.isFinite(G)?G<i.min?`Min value: ${i.min}`:G>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),f=n.computed(()=>i),y=Ns(f),S=n.computed(()=>(u.value-i.min)/d.value),k=n.computed(()=>({right:Math.ceil((1-S.value)*100)+"%"})),D=n.computed(()=>({right:`calc(${Math.ceil((1-S.value)*100)}%) `})),E=n.ref(),A=n.ref();n.watch(()=>i.modelValue,G=>{p.value=G});function w(G){const K=mt(G,i.min,i.max);return Math.round((K+Number.EPSILON)*(1/i.step))/(1/i.step)}nn(A,G=>{var K;ot((K=n.unref(E))==null?void 0:K.getBoundingClientRect(),U=>{const{dx:P}=G;s.deltaValue=P/U.width*d.value,p.value=w(mt((i.modelValue??0)+s.deltaValue,i.min,i.max)),G.stop&&(o("update:modelValue",w(u.value)),s.deltaValue=0)})});function L(G){o("update:modelValue",w(G))}function R(G){L(+G.target.value)}function H(G){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(G.code)&&G.preventDefault();const K=G.code==="ArrowUp"||G.code==="ArrowRight"?i.step*1:G.code==="ArrowDown"||G.code==="ArrowLeft"?i.step*-1:0;L(i.modelValue+K)}return(G,K)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[n.createElementVNode("div",q1,[n.createElementVNode("div",K1,[G.label?(n.openBlock(),n.createElementBlock("label",Y1,[n.createElementVNode("span",null,n.toDisplayString(G.label),1),K[1]||(K[1]=n.createTextVNode()),n.unref(r).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(G.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),K[2]||(K[2]=n.createTextVNode()),i.mode==="text"?(n.openBlock(),n.createElementBlock("div",J1,n.toDisplayString(p.value)+n.toDisplayString(G.measure),1)):n.createCommentVNode("",!0)]),K[6]||(K[6]=n.createTextVNode()),n.createElementVNode("div",Q1,[n.createElementVNode("div",X1,[n.createElementVNode("div",{ref_key:"barRef",ref:E,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(k.value)},null,4)],512)]),K[5]||(K[5]=n.createTextVNode()),n.createElementVNode("div",ek,[i.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(y),(U,P)=>(n.openBlock(),n.createElementBlock("div",{key:P,style:n.normalizeStyle({right:`${U}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),K[4]||(K[4]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef",ref:A,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:n.normalizeStyle(D.value),onKeydown:H},K[3]||(K[3]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),K[7]||(K[7]=n.createTextVNode()),n.createElementVNode("div",tk,[i.mode==="input"?(n.openBlock(),n.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:K[0]||(K[0]=U=>R(U))},null,40,rk)):n.createCommentVNode("",!0)])],2),K[8]||(K[8]=n.createTextVNode()),h.value?(n.openBlock(),n.createElementBlock("div",nk,n.toDisplayString(h.value),1)):n.createCommentVNode("",!0)],2))}});function ak(t,e=null,r=null){function o(u){const{scrollTop:p,scrollHeight:h,clientHeight:f}=u;if(!(h>f)||!e)return null;const y=h-p-f,S=p>e?e:0,k=y>e?f-e-S:f;return`linear-gradient(
50
+ `,pw=["innerHTML"],fw={class:"dropdown-list-item__title-container"},mw={class:"dropdown-list-item__title text-s"},gw={key:0,class:"dropdown-list-item__description text-description"},yw={key:1,class:"dropdown-list-item__icon flex-self-start"},to=r.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>{const l=[];return e.size==="small"&&l.push("dropdown-list-item__small"),e.isSelected&&l.push("dropdown-list-item__selected"),e.isHovered&&l.push("hovered-item"),l.join(" ")}),i=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),s=r.computed(()=>e.isSelected?hw:uw);return(l,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([n.value,"dropdown-list-item"])},[e.useCheckbox?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(i.value),innerHTML:s.value},null,10,pw)):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("div",fw,[r.createElementVNode("div",mw,r.toDisplayString(l.option.label),1),d[0]||(d[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",gw,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),d[2]||(d[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",yw)):r.createCommentVNode("",!0)],2))}}),ul=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":d.value}));const e=r.ref(!1),n=r.ref(),i=r.ref(!1),s=r.computed(()=>i.value&&e.value?"ui-lt-animate":""),l=lu(m=>i.value=m,500),d=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function u(){const m=Xa(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function h(){u(),l(!0)}function f(){l(!1)}return(m,v)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:h,onMouseleave:f},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(s.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),Mn=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(i,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass(n.value)},null,2))}}),vw={class:"pl-dropdown__envelope"},_w=["tabindex"],Cw={class:"pl-dropdown__container"},ww={class:"pl-dropdown__field"},bw=["disabled","placeholder"],xw={class:"pl-dropdown__controls"},kw={key:0},Sw={key:0,class:"required-icon"},Ew={key:0,class:"nothing-found"},Tw={key:0,class:"pl-dropdown__error"},Aw={key:1,class:"pl-dropdown__helper"},Bw={key:2,class:"pl-dropdown__helper"},Pw={name:"PlDropdown"},hl=r.defineComponent({...Pw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,s=r.useSlots(),l=r.ref(),d=r.ref(),u=r.ref(),h=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),f=()=>Qi(L.value.findIndex(V=>Tt(V.value,i.modelValue)),V=>V<0?0:V),m=()=>h.activeIndex=f(),v=r.computed(()=>i.options===void 0),S=r.computed(()=>v.value?!0:i.disabled),k=r.computed(()=>(i.options??[]).findIndex(V=>Tt(V.value,i.modelValue))),D=r.computed(()=>{if(!v.value){if(i.error)return i.error;if(i.modelValue!==void 0&&k.value===-1)return"The selected value is not one of the options"}}),T=r.computed(()=>Pr(i.options??[]).map((V,O)=>({...V,index:O,isSelected:O===k.value,isActive:O===h.activeIndex}))),B=r.computed(()=>{const V=r.unref(T).find(O=>Tt(O.value,i.modelValue));return(V==null?void 0:V.label)||i.modelValue}),C=r.computed(()=>!h.open&&i.modelValue?"":i.modelValue?String(B.value):i.placeholder),R=r.computed(()=>i.modelValue!==void 0&&i.modelValue!==null),L=r.computed(()=>{const V=T.value;return h.search?V.filter(O=>{const Q=h.search.toLowerCase();return O.label.toLowerCase().includes(Q)||O.description&&O.description.toLowerCase().includes(Q)?!0:typeof O.value=="string"?O.value.toLowerCase().includes(Q):O.value===h.search}):V}),j=r.computed(()=>S.value?void 0:"0"),z=V=>{var O;n("update:modelValue",V),h.search="",h.open=!1,(O=l==null?void 0:l.value)==null||O.focus()},K=()=>n("update:modelValue",void 0),$=()=>{var V;return(V=u.value)==null?void 0:V.focus()},N=()=>h.open=!h.open,H=()=>h.open=!0,I=V=>{var O,Q;const ve=V.relatedTarget;!((O=l.value)!=null&&O.contains(ve))&&!((Q=d.value)!=null&&Q.contains(ve))&&(h.search="",h.open=!1)},Y=()=>{const V=d.value;V&&it(V.querySelector(".hovered-item"),O=>{eo(V,O)})},ue=V=>{var O,Q;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(V.code))V.preventDefault();else return;const{open:ve,activeIndex:xe}=h;if(!ve){V.code==="Enter"&&(h.open=!0);return}V.code==="Escape"&&(h.open=!1,(O=l.value)==null||O.focus());const Gt=r.unref(L),{length:jt}=Gt;if(!jt)return;V.code==="Enter"&&z((Q=Gt.find(ko=>ko.index===xe))==null?void 0:Q.value);const At=Gt.findIndex(ko=>ko.index===xe)??-1,xo=V.code==="ArrowDown"?1:V.code==="ArrowUp"?-1:0,Lr=Math.abs(At+xo+jt)%jt;h.activeIndex=L.value[Lr].index??-1};Rn(l),r.watch(()=>i.modelValue,m,{immediate:!0}),r.watch(()=>h.open,V=>{var O;return V?(O=u.value)==null?void 0:O.focus():""}),r.watchPostEffect(()=>{h.search,h.activeIndex>=0&&h.open&&Y()});const Z=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(d,V=>{if(V){const O=V.getBoundingClientRect();h.optionsHeight=O.height,window.dispatchEvent(new CustomEvent("adjust"))}}),Xi(l,V=>{const O=V.top+V.height+3;O+h.optionsHeight>V.clientHeight?Z.top=V.top-h.optionsHeight-3+"px":Z.top=O+"px",Z.left=V.left+"px",Z.width=V.width+"px"}),(V,O)=>(r.openBlock(),r.createElementBlock("div",vw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:j.value,class:r.normalizeClass(["pl-dropdown",{open:h.open,error:V.error,disabled:S.value}]),onKeydown:ue,onFocusout:I},[r.createElementVNode("div",Cw,[r.createElementVNode("div",ww,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":O[0]||(O[0]=Q=>h.search=Q),type:"text",tabindex:"-1",disabled:S.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:H},null,40,bw),[[r.vModelText,h.search]]),O[4]||(O[4]=r.createTextVNode()),h.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:$},[r.createVNode(ul,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(B.value),1)]),_:1})])),O[5]||(O[5]=r.createTextVNode()),r.createElementVNode("div",xw,[v.value?(r.openBlock(),r.createBlock(r.unref(Mn),{key:0,name:"loading"})):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),V.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(ds),{key:1,name:"delete-clear",onClick:r.withModifiers(K,["stop"])})):r.createCommentVNode("",!0),O[2]||(O[2]=r.createTextVNode()),r.renderSlot(V.$slots,"append"),O[3]||(O[3]=r.createTextVNode()),V.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${V.arrowIconLarge}`]]),onClick:r.withModifiers(N,["stop"])},null,2)):V.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${V.arrowIcon}`]]),onClick:r.withModifiers(N,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(N,["stop"])}))])]),O[9]||(O[9]=r.createTextVNode()),V.label?(r.openBlock(),r.createElementBlock("label",kw,[V.required?(r.openBlock(),r.createElementBlock("i",Sw)):r.createCommentVNode("",!0),O[6]||(O[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(V.label),1),O[7]||(O[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(V.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),O[10]||(O[10]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:r.normalizeStyle(Z),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L.value,(Q,ve)=>(r.openBlock(),r.createBlock(to,{key:ve,option:Q,"is-selected":Q.isSelected,"is-hovered":Q.isActive,size:V.optionSize,onClick:r.withModifiers(xe=>z(Q.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),O[8]||(O[8]=r.createTextVNode()),L.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ew,"Nothing found"))],4)])):r.createCommentVNode("",!0),O[11]||(O[11]=r.createTextVNode()),r.createVNode(ir,{class:"pl-dropdown__contour"})])],42,_w),O[12]||(O[12]=r.createTextVNode()),D.value?(r.openBlock(),r.createElementBlock("div",Tw,r.toDisplayString(D.value),1)):v.value&&V.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Aw,r.toDisplayString(V.loadingOptionsHelper),1)):V.helper?(r.openBlock(),r.createElementBlock("div",Bw,r.toDisplayString(V.helper),1)):r.createCommentVNode("",!0)]))}}),Vw={name:"PlDropdownRef"},Nw=r.defineComponent({...Vw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>{var s;return(s=e.options)==null?void 0:s.map(l=>({label:l.label,value:l.ref}))}),i=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(s,l)=>(r.openBlock(),r.createBlock(r.unref(hl),r.mergeProps(e,{options:n.value,"loading-options-helper":s.loadingOptionsHelper,"arrow-icon-large":i.value,"onUpdate:modelValue":l[0]||(l[0]=d=>s.$emit("update:modelValue",d))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Dw(t,e){return r.computed(()=>{const n=Pr(t.value);return e.value?n.filter(i=>i.label.toLowerCase().includes(e.value.toLowerCase())):n})}const Fw={class:"resizable-input"},Rw=["placeholder","value","disabled"],Mw=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=r.computed(()=>{var u;return n.placeholder?n.placeholder:(u=n.modelValue||n.value)==null?void 0:u.replace('"',"")}),l=r.computed(()=>{const u={};return n.width&&(u.width=n.width),n.maxWidth&&(u.maxWidth=n.maxWidth),u});function d(u){const h=u.target.value;i("update:modelValue",h)}return(u,h)=>(r.openBlock(),r.createElementBlock("div",Fw,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(s.value),5),h[0]||(h[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(u.$attrs,{placeholder:u.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:d}),null,16,Rw)]))}}),Iw={class:"dropdown-tab-item__title text-caps13"},Lw=r.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.option.label),i=r.computed(()=>{const s=[];return e.isSelected&&s.push("dropdown-tab-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")});return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.value,"dropdown-tab-item"])},[r.createElementVNode("div",Iw,r.toDisplayString(n.value),1)],2))}}),Ow={class:"pl-line-dropdown__prefix"},Gw={class:"pl-line-dropdown__icon-wrapper"},zw={class:"pl-line-dropdown__icon"},Zw={key:0,class:"pl-line-dropdown__no-item"},$w={key:0,class:"pl-line-dropdown__no-item"},Su=r.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,s=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),d=r.ref(),u=r.computed(()=>{const I=[];return s.isOpen&&I.push("open"),i.disabled&&I.push("disabled"),I.join(" ")}),h=r.ref(""),f=Dw(r.toRef(i,"options"),h),m=r.computed(()=>!!(i.clearable&&s.isOpen&&i.modelValue&&v.value)),v=r.computed(()=>{if(i.modelValue){const I=D();if(I!==-1){const Y=Pr(i.options)[I];return typeof Y.label=="object"?Y.label.title:Y.label}}return""}),S=r.ref(v.value),k=r.computed(()=>s.isOpen&&h.value&&h.value.length>=v.value.length-1?h.value:v.value??"...");cs(l,()=>{i.mode==="list"&&(s.isOpen=!1)}),r.watch(()=>S.value,I=>{v.value!==I?h.value=I:h.value=""}),r.watch(()=>s.isOpen,I=>{var Y;I&&l.value&&((Y=l.value.querySelector("input"))==null||Y.focus(),r.nextTick(()=>$()))}),r.watch(()=>i.modelValue,()=>T(),{immediate:!0});function D(){return i.options.findIndex(I=>Tt(I.value,i.modelValue))}function T(){s.activeOption=Qi(f.value.findIndex(I=>Tt(I.value,i.modelValue)),I=>I<0?0:I),S.value=v.value}function B(){h.value=""}function C(){i.disabled?s.isOpen=!1:r.nextTick(()=>{s.isOpen=!s.isOpen})}function R(){i.mode==="list"&&(s.isOpen=!1)}function L(I){I&&(n("update:modelValue",I.value),R(),B())}function j(I){return Tt(I.value,i.modelValue)}const z=I=>{var Y,ue;const Z=I.relatedTarget;!((Y=l.value)!=null&&Y.contains(Z))&&!((ue=d.value)!=null&&ue.contains(Z))&&(h.value="",s.isOpen=!1)};function K(I){const{activeOption:Y}=s;if(!s.isOpen&&I.code==="Enter"){s.isOpen=!0;return}const{length:ue}=f.value;if(!ue)return;["ArrowDown","ArrowUp","Enter"].includes(I.code)&&I.preventDefault(),I.code==="Enter"&&L(f.value[Y]);const Z=I.code==="ArrowDown"?1:I.code==="ArrowUp"?-1:0;s.activeOption=Math.abs(Y+Z+ue)%ue,requestAnimationFrame($)}function $(){const I=d.value;I&&it(I.querySelector(".hovered-item"),Y=>{i.mode==="list"?eo(I,Y):Y.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function N(){n("update:modelValue",void 0)}const H=r.reactive({top:"0px",left:"0px"});return r.watch(d,I=>{if(I){const Y=I.getBoundingClientRect();s.optionsHeight=Y.height,window.dispatchEvent(new CustomEvent("adjust"))}}),Xi(l,I=>{const Y=I.top+I.height+2;Y+s.optionsHeight>I.clientHeight?H.top=I.top-s.optionsHeight-2+"px":H.top=Y+"px",H.left=I.left+"px"}),(I,Y)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([u.value,"pl-line-dropdown uc-pointer"]),onKeydown:K,onFocusout:z,onClick:C},[r.createElementVNode("div",Ow,r.toDisplayString(i==null?void 0:i.prefix),1),Y[6]||(Y[6]=r.createTextVNode()),r.createVNode(Mw,{modelValue:S.value,"onUpdate:modelValue":Y[0]||(Y[0]=ue=>S.value=ue),placeholder:k.value,disabled:i.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),Y[7]||(Y[7]=r.createTextVNode()),r.createElementVNode("div",Gw,[r.withDirectives(r.createElementVNode("div",zw,null,512),[[r.vShow,!m.value]]),Y[1]||(Y[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:N},null,512),[[r.vShow,m.value]])]),Y[8]||(Y[8]=r.createTextVNode()),s.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[i.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:d,style:r.normalizeStyle(H),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:z},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(ue,Z)=>r.renderSlot(I.$slots,"item",{key:Z,item:ue,textItem:"text",isSelected:j(ue),isHovered:s.activeOption==Z,onClick:r.withModifiers(V=>L(ue),["stop"])},()=>[r.createVNode(to,{option:ue,"text-item":"text","is-selected":j(ue),"is-hovered":s.activeOption==Z,size:"medium",onClick:r.withModifiers(V=>L(ue),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Y[3]||(Y[3]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Zw,Y[2]||(Y[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):i.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:d,style:r.normalizeStyle(H),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:z},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(ue,Z)=>r.renderSlot(I.$slots,"item",{key:Z,item:ue,isSelected:j(ue),isHovered:s.activeOption==Z,onClick:r.withModifiers(V=>L(ue),["stop"])},()=>[r.createVNode(Lw,{option:ue,"is-selected":j(ue),"is-hovered":s.activeOption==Z,onClick:r.withModifiers(V=>L(ue),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Y[5]||(Y[5]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",$w,Y[4]||(Y[4]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],34))}}),Uw={class:"ui-dropdown__envelope"},Ww=["tabindex"],Hw={class:"ui-dropdown__container"},jw={class:"ui-dropdown__field"},qw=["disabled","placeholder"],Kw={class:"ui-dropdown__controls"},Yw={key:0},Jw={key:0,class:"required-icon"},Xw={key:0,class:"nothing-found"},Qw={key:0,class:"ui-dropdown__error"},e0={key:1,class:"ui-dropdown__helper"},t0={key:2,class:"ui-dropdown__helper"},n0={name:"PlDropdown"},r0=r.defineComponent({...n0,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,s=r.useSlots(),l=r.ref(),d=r.ref(),u=r.ref(),h=r.reactive({search:"",activeIndex:-1,open:!1}),f=()=>Qi(L.value.findIndex(Z=>Tt(Z.value,i.modelValue)),Z=>Z<0?0:Z),m=()=>h.activeIndex=f(),v=r.computed(()=>i.options===void 0),S=r.computed(()=>v.value?!0:i.disabled),k=r.computed(()=>(i.options??[]).findIndex(Z=>Tt(Z.value,i.modelValue))),D=r.computed(()=>{if(!v.value){if(i.error)return i.error;if(i.modelValue!==void 0&&k.value===-1)return"The selected value is not one of the options"}}),T=r.computed(()=>Pr(i.options??[]).map((Z,V)=>({...Z,index:V,isSelected:V===k.value,isActive:V===h.activeIndex}))),B=r.computed(()=>{const Z=r.unref(T).find(V=>Tt(V.value,i.modelValue));return(Z==null?void 0:Z.label)||i.modelValue}),C=r.computed(()=>!h.open&&i.modelValue?"":i.modelValue?String(B.value):i.placeholder),R=r.computed(()=>i.modelValue!==void 0&&i.modelValue!==null),L=r.computed(()=>{const Z=T.value;return h.search?Z.filter(V=>{const O=h.search.toLowerCase();return V.label.toLowerCase().includes(O)||V.description&&V.description.toLowerCase().includes(O)?!0:typeof V.value=="string"?V.value.toLowerCase().includes(O):V.value===h.search}):Z}),j=r.computed(()=>S.value?void 0:"0"),z=Z=>{var V;n("update:modelValue",Z),h.search="",h.open=!1,(V=l==null?void 0:l.value)==null||V.focus()},K=()=>n("update:modelValue",void 0),$=()=>{var Z;return(Z=u.value)==null?void 0:Z.focus()},N=()=>h.open=!h.open,H=()=>h.open=!0,I=Z=>{var V;(V=l==null?void 0:l.value)!=null&&V.contains(Z.relatedTarget)||(h.search="",h.open=!1)},Y=()=>{const Z=d.value;Z&&it(Z.querySelector(".hovered-item"),V=>{eo(Z,V)})},ue=Z=>{var V,O;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(Z.code))Z.preventDefault();else return;const{open:Q,activeIndex:ve}=h;if(!Q){Z.code==="Enter"&&(h.open=!0);return}Z.code==="Escape"&&(h.open=!1,(V=l.value)==null||V.focus());const xe=r.unref(L),{length:Gt}=xe;if(!Gt)return;Z.code==="Enter"&&z((O=xe.find(Lr=>Lr.index===ve))==null?void 0:O.value);const jt=xe.findIndex(Lr=>Lr.index===ve)??-1,At=Z.code==="ArrowDown"?1:Z.code==="ArrowUp"?-1:0,xo=Math.abs(jt+At+Gt)%Gt;h.activeIndex=L.value[xo].index??-1};return Rn(l),r.watch(()=>i.modelValue,m,{immediate:!0}),r.watch(()=>h.open,Z=>{var V;return Z?(V=u.value)==null?void 0:V.focus():""}),r.watchPostEffect(()=>{h.search,h.activeIndex>=0&&h.open&&Y()}),(Z,V)=>(r.openBlock(),r.createElementBlock("div",Uw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:j.value,class:r.normalizeClass(["ui-dropdown",{open:h.open,error:Z.error,disabled:S.value}]),onKeydown:ue,onFocusout:I},[r.createElementVNode("div",Hw,[r.createElementVNode("div",jw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":V[0]||(V[0]=O=>h.search=O),type:"text",tabindex:"-1",disabled:S.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:H},null,40,qw),[[r.vModelText,h.search]]),V[4]||(V[4]=r.createTextVNode()),h.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:$},[r.createVNode(ul,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(B.value),1)]),_:1})])),V[5]||(V[5]=r.createTextVNode()),r.createElementVNode("div",Kw,[v.value?(r.openBlock(),r.createBlock(r.unref(Mn),{key:0,name:"loading"})):r.createCommentVNode("",!0),V[1]||(V[1]=r.createTextVNode()),Z.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(ds),{key:1,name:"delete-clear",onClick:r.withModifiers(K,["stop"])})):r.createCommentVNode("",!0),V[2]||(V[2]=r.createTextVNode()),r.renderSlot(Z.$slots,"append"),V[3]||(V[3]=r.createTextVNode()),Z.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${Z.arrowIconLarge}`]]),onClick:r.withModifiers(N,["stop"])},null,2)):Z.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${Z.arrowIcon}`]]),onClick:r.withModifiers(N,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(N,["stop"])}))])]),V[9]||(V[9]=r.createTextVNode()),Z.label?(r.openBlock(),r.createElementBlock("label",Yw,[Z.required?(r.openBlock(),r.createElementBlock("i",Jw)):r.createCommentVNode("",!0),V[6]||(V[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(Z.label),1),V[7]||(V[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(Z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),V[10]||(V[10]=r.createTextVNode()),h.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:d,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(L.value,(O,Q)=>(r.openBlock(),r.createBlock(to,{key:Q,option:O,"is-selected":O.isSelected,"is-hovered":O.isActive,size:Z.optionSize,onClick:r.withModifiers(ve=>z(O.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),V[8]||(V[8]=r.createTextVNode()),L.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Xw,"Nothing found"))],512)):r.createCommentVNode("",!0),V[11]||(V[11]=r.createTextVNode()),r.createVNode(ir,{class:"ui-dropdown__contour"})])],42,Ww),V[12]||(V[12]=r.createTextVNode()),D.value?(r.openBlock(),r.createElementBlock("div",Qw,r.toDisplayString(D.value),1)):v.value&&Z.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",e0,r.toDisplayString(Z.loadingOptionsHelper),1)):Z.helper?(r.openBlock(),r.createElementBlock("div",t0,r.toDisplayString(Z.helper),1)):r.createCommentVNode("",!0)]))}}),i0={key:0,class:"ui-progress-bar"},o0={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},s0={class:"ui-progress-bar__message flex-grow-1"},a0={class:"ui-progress-bar__percent"},l0=r.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,n=r.computed(()=>e.progress===100?e.completeMessage:"");return(i,s)=>i.loading?(r.openBlock(),r.createElementBlock("div",i0,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:i.progress+"%"})},null,4),s[1]||(s[1]=r.createTextVNode()),r.createElementVNode("div",o0,[r.createElementVNode("div",s0,r.toDisplayString(n.value),1),s[0]||(s[0]=r.createTextVNode()),r.createElementVNode("div",a0,r.toDisplayString(i.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),c0={class:"mi-number-field__main-wrapper d-flex"},d0={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},u0={key:0,class:"text-description"},h0=["disabled","placeholder"],p0={class:"mi-number-field__icons d-flex-column"},f0={key:0,class:"mi-number-field__hint text-description"},m0=r.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=r.ref(),l=r.useSlots(),d=r.ref();Rn(s);const u=r.ref(!0),h=r.computed({get(){return u.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(C){var R;C=C.replace(/,/g,""),S(C)?(i("update:modelValue",+C),C.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+C===n.modelValue&&C[C.length-1]!=="."&&(u.value=!1,r.nextTick(()=>{u.value=!0}))):(C.trim()===""&&i("update:modelValue",void 0),u.value=!1,r.nextTick(()=>{u.value=!0}))}}),f=r.computed(()=>{let C=[];return n.errorMessage&&C.push(n.errorMessage),S(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&C.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&C.push(`Model value must be less than ${n.maxValue}`)):C.push("Model value is not a number."),C=[...C],C.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),v=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function S(C){return C!==void 0?(C=C==null?void 0:C.toString(),!isNaN(+C)&&!isNaN(parseFloat(C))):!1}function k(){if(!m.value){let C=0;n.modelValue===void 0?C=n.minValue?n.minValue:0:C=+(n.modelValue||0)+n.step,h.value=C.toString()}}function D(){if(!v.value){let C=0;n.modelValue===void 0?C=0:C=+(n.modelValue||0)-n.step,h.value=n.minValue?Math.max(n.minValue,C).toString():C.toString()}}function T(C){["ArrowDown","ArrowUp"].includes(C.code)&&C.preventDefault(),C.code==="ArrowUp"?k():C.code==="ArrowDown"&&D()}const B=C=>{C.detail>1&&C.preventDefault()};return(C,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass([{error:!!f.value.trim(),disabled:C.disabled},"mi-number-field d-flex-column"]),onMousedown:B,onKeydown:R[1]||(R[1]=L=>T(L))},[r.createElementVNode("div",c0,[r.createVNode(ir,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",d0,[C.label?(r.openBlock(),r.createElementBlock("label",u0,[r.createTextVNode(r.toDisplayString(C.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":R[0]||(R[0]=L=>h.value=L),disabled:C.disabled,placeholder:C.placeholder,class:"text-s flex-grow"},null,8,h0),[[r.vModelText,h.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",p0,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:k},R[3]||(R[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:v.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:D},R[4]||(R[4]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),R[8]||(R[8]=r.createTextVNode()),f.value.trim()?(r.openBlock(),r.createElementBlock("div",f0,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],34))}}),g0={class:"pl-chip__text"},pl=r.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=r.ref(),n=r.ref(!1);return r.onMounted(()=>{var i;e.value&&(n.value=((i=e.value)==null?void 0:i.clientWidth)>=256)}),(i,s)=>(r.openBlock(),r.createBlock(r.unref(Ft),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[s[4]||(s[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:i.small}])},[r.createElementVNode("div",g0,[r.renderSlot(i.$slots,"default")]),s[3]||(s[3]=r.createTextVNode()),i.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:s[0]||(s[0]=r.withKeys(l=>i.$emit("close"),["enter"])),onClick:s[1]||(s[1]=r.withModifiers(l=>i.$emit("close"),["stop"]))},s[2]||(s[2]=[r.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):r.createCommentVNode("",!0)],2)]),_:2},[n.value?{name:"tooltip",fn:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),key:"0"}:void 0]),1024))}}),y0={class:"pl-multi-dropdown__envelope"},v0=["tabindex"],_0={class:"pl-multi-dropdown__container"},C0={class:"pl-multi-dropdown__field"},w0=["disabled","placeholder"],b0={class:"pl-multi-dropdown__append"},x0={key:0},k0={key:0,class:"required-icon"},S0={class:"pl-multi-dropdown__open-chips-container"},E0={key:0,class:"nothing-found"},T0={key:0,class:"pl-multi-dropdown__error"},A0={key:1,class:"pl-multi-dropdown__helper"},B0={name:"PlDropdownMulti"},P0=r.defineComponent({...B0,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=N=>n("update:modelValue",N),s=r.useSlots(),l=t,d=r.ref(),u=r.ref(),h=r.ref(),f=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),v=r.computed(()=>f.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),S=r.computed(()=>Pr(l.options).filter(N=>dl(m.value,N.value))),k=r.computed(()=>{const N=r.unref(m),H=Pr(l.options);return(f.search?H.filter(I=>{const Y=f.search.toLowerCase();return I.label.toLowerCase().includes(Y)?!0:typeof I.value=="string"?I.value.toLowerCase().includes(Y):I.value===f.search}):[...H]).map(I=>({...I,selected:dl(N,I.value)}))}),D=r.computed(()=>l.disabled?void 0:"0"),T=()=>{f.activeOption=Qi(k.value.findIndex(N=>Tt(N.value,l.modelValue)),N=>N<0?0:N)},B=N=>{var H;const I=r.unref(m);i(dl(I,N)?I.filter(Y=>!Tt(Y,N)):[...I,N]),f.search="",(H=d==null?void 0:d.value)==null||H.focus()},C=N=>i(r.unref(m).filter(H=>!Tt(H,N))),R=()=>{var N;return(N=h.value)==null?void 0:N.focus()},L=()=>f.open=!f.open,j=N=>{var H,I;const Y=N.relatedTarget;!((H=d.value)!=null&&H.contains(Y))&&!((I=u.value)!=null&&I.contains(Y))&&(f.search="",f.open=!1)},z=()=>{const N=u.value;N&&it(N.querySelector(".hovered-item"),H=>{eo(N,H)})},K=N=>{var H;const{open:I,activeOption:Y}=f;if(!I){N.code==="Enter"&&(f.open=!0);return}N.code==="Escape"&&(f.open=!1,(H=d.value)==null||H.focus());const ue=r.unref(k),{length:Z}=ue;if(!Z)return;["ArrowDown","ArrowUp","Enter"].includes(N.code)&&N.preventDefault(),N.code==="Enter"&&B(ue[Y].value);const V=N.code==="ArrowDown"?1:N.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(Y+V+Z)%Z,requestAnimationFrame(z)};Rn(d),r.watch(()=>l.modelValue,()=>T(),{immediate:!0}),r.watchPostEffect(()=>{f.search,f.open&&z()});const $=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(u,N=>{if(N){const H=N.getBoundingClientRect();f.optionsHeight=H.height,window.dispatchEvent(new CustomEvent("adjust"))}}),Xi(d,N=>{const H=N.top+N.height+5;H+f.optionsHeight>N.clientHeight?$.top=N.top-f.optionsHeight-5+"px":$.top=H+"px",$.left=N.left+"px",$.width=N.width+"px"}),(N,H)=>(r.openBlock(),r.createElementBlock("div",y0,[r.createElementVNode("div",{ref_key:"rootRef",ref:d,tabindex:D.value,class:r.normalizeClass(["pl-multi-dropdown",{open:f.open,error:N.error,disabled:N.disabled}]),onKeydown:K,onFocusout:j},[r.createElementVNode("div",_0,[r.createElementVNode("div",C0,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:h,"onUpdate:modelValue":H[0]||(H[0]=I=>f.search=I),type:"text",tabindex:"-1",disabled:N.disabled,placeholder:v.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:H[1]||(H[1]=I=>f.open=!0)},null,40,w0),[[r.vModelText,f.search]]),H[3]||(H[3]=r.createTextVNode()),f.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:R},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(I,Y)=>(r.openBlock(),r.createBlock(r.unref(pl),{key:Y,closeable:"",small:"",onClick:H[2]||(H[2]=r.withModifiers(ue=>f.open=!0,["stop"])),onClose:ue=>C(I.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(I.label||I.value),1)]),_:2},1032,["onClose"]))),128))])),H[4]||(H[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(L,["stop"])}),H[5]||(H[5]=r.createTextVNode()),r.createElementVNode("div",b0,[r.renderSlot(N.$slots,"append")])]),H[10]||(H[10]=r.createTextVNode()),N.label?(r.openBlock(),r.createElementBlock("label",x0,[N.required?(r.openBlock(),r.createElementBlock("i",k0)):r.createCommentVNode("",!0),H[6]||(H[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(N.label),1),H[7]||(H[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(N.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),H[11]||(H[11]=r.createTextVNode()),f.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-multi-dropdown__options",style:r.normalizeStyle($),tabindex:"-1",onFocusout:j},[r.createElementVNode("div",S0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(I,Y)=>(r.openBlock(),r.createBlock(r.unref(pl),{key:Y,closeable:"",small:"",onClose:ue=>C(I.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(I.label||I.value),1)]),_:2},1032,["onClose"]))),128))]),H[8]||(H[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(k.value,(I,Y)=>(r.openBlock(),r.createBlock(to,{key:Y,option:I,"text-item":"text","is-selected":I.selected,"is-hovered":f.activeOption==Y,size:"medium","use-checkbox":"",onClick:r.withModifiers(ue=>B(I.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),H[9]||(H[9]=r.createTextVNode()),k.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",E0,"Nothing found"))],36)])):r.createCommentVNode("",!0),H[12]||(H[12]=r.createTextVNode()),r.createVNode(ir,{class:"pl-multi-dropdown__contour"})])],42,v0),H[13]||(H[13]=r.createTextVNode()),N.error?(r.openBlock(),r.createElementBlock("div",T0,r.toDisplayString(N.error),1)):N.helper?(r.openBlock(),r.createElementBlock("div",A0,r.toDisplayString(N.helper),1)):r.createCommentVNode("",!0)]))}}),fl=r.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>e.modelValue);return(i,s)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:i.disabled}]),onClick:s[0]||(s[0]=l=>i.$emit("update:modelValue",!i.modelValue)),onKeydown:s[1]||(s[1]=r.withKeys(l=>i.$emit("update:modelValue",!i.modelValue),["enter"]))},null,34))}}),V0={name:"PlCheckbox"},N0=r.defineComponent({...V0,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(i,s)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:i.disabled}])},[r.createVNode(fl,r.mergeProps(e,{"onUpdate:modelValue":s[0]||(s[0]=l=>i.$emit("update:modelValue",l))}),null,16),s[3]||(s[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:s[1]||(s[1]=l=>i.$emit("update:modelValue",!i.$props.modelValue))},[r.renderSlot(i.$slots,"default")])],2)):(r.openBlock(),r.createBlock(fl,r.mergeProps({key:1},e,{"onUpdate:modelValue":s[2]||(s[2]=l=>i.$emit("update:modelValue",l))}),null,16))}}),D0={key:0},F0=["onClick"],R0={name:"PlCheckboxGroup"},M0=r.defineComponent({...R0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,s=d=>i.modelValue.includes(d),l=d=>{const u=i.modelValue??[];n("update:modelValue",s(d)?u.filter(h=>h!==d):[...u,d])};return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:d.disabled}])},[d.label?(r.openBlock(),r.createElementBlock("label",D0,r.toDisplayString(d.label),1)):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.options.map(h=>({label:"label"in h?h.label:h.text,value:h.value})),(h,f)=>(r.openBlock(),r.createElementBlock("div",{key:f},[r.createVNode(fl,{disabled:d.disabled,label:h.label,"model-value":s(h.value),"onUpdate:modelValue":()=>l(h.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[0]||(u[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(h.value),["stop"])},r.toDisplayString(h.label),9,F0)]))),128))],2))}}),I0="_component_tupwt_1",L0={component:I0},O0={};function G0(t,e){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(t.$style.component)},e[0]||(e[0]=[r.createElementVNode("div",null,null,-1)]),2)}const z0={$style:L0},Z0=nr(O0,[["render",G0],["__cssModules",z0]]),$0={key:1,class:"pl-dialog-modal__title"},U0={inheritAttrs:!1},ml=r.defineComponent({...U0,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.ref(),d=r.useAttrs();function u(h){l.value&&document.contains(h.target)&&!l.value.contains(h.target)&&i("update:modelValue",!1)}return et(document.body,"keyup",h=>{s.modelValue&&h.code==="Escape"&&i("update:modelValue",!1)}),(h,f)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[h.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:u},[r.createElementVNode("div",r.mergeProps(r.unref(d),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:h.width,height:h.height,minHeight:h.minHeight,maxHeight:h.maxHeight}}),[h.closable?(r.openBlock(),r.createBlock(Z0,{key:0,class:"close-modal-btn",onClick:f[0]||(f[0]=r.withModifiers(m=>i("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),f[1]||(f[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",$0,[r.renderSlot(h.$slots,"title")])):r.createCommentVNode("",!0),f[2]||(f[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":h.noContentGutters,"no-top-content-gutter":h.noTopContentGutter}])},[r.renderSlot(h.$slots,"default")],2),f[3]||(f[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":h.actionsHasTopBorder}])},[r.renderSlot(h.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),W0=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(i,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"default")]),_:3}))}}),H0={key:0,class:"pl-slide-modal__title"},j0={class:"pl-slide-modal__content"},q0={key:1,class:"pl-slide-modal__actions"},K0={name:"PlSlideModal",inheritAttrs:!1},Y0=r.defineComponent({...K0,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.ref(),d=r.useAttrs();return cs(l,()=>{s.modelValue&&s.closeOnOutsideClick&&i("update:modelValue",!1)}),et(document,"keydown",u=>{u.key==="Escape"&&i("update:modelValue",!1)}),(u,h)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(W0,null,{default:r.withCtx(()=>[u.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:u.width}},r.unref(d),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:h[1]||(h[1]=r.withKeys(f=>i("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:h[0]||(h[0]=f=>i("update:modelValue",!1))}),h[3]||(h[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",H0,[r.renderSlot(u.$slots,"title")])):r.createCommentVNode("",!0),h[4]||(h[4]=r.createTextVNode()),r.createElementVNode("div",j0,[r.renderSlot(u.$slots,"default")]),h[5]||(h[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",q0,[r.renderSlot(u.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),h[6]||(h[6]=r.createTextVNode()),u.modelValue&&u.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:h[2]||(h[2]=r.withKeys(f=>i("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),J0={key:0,class:"label"},X0={name:"PlToggleSwitch"},Q0=r.defineComponent({...X0,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:n[0]||(n[0]=i=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(i=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[n[2]||(n[2]=r.createElementVNode("div",{class:"ui-toggle-switch__body"},[r.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),n[3]||(n[3]=r.createTextVNode()),e.label?(r.openBlock(),r.createElementBlock("span",J0,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Eu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function eb(t){return r.unref(t)}const tb=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function nb(t,e,n={}){const{immediate:i=!0}=n,s=r.ref(!1);let l=null;function d(){l&&(clearTimeout(l),l=null)}function u(){s.value=!1,d()}function h(...f){d(),s.value=!0,l=setTimeout(()=>{s.value=!1,l=null,t(...f)},eb(e))}return i&&(s.value=!0,tb&&h()),Eu(u),{isPending:r.readonly(s),start:h,stop:u}}function rb(t,e,n){return r.watch(t,(i,s,l)=>{i&&e(i,s,l)},{...n,once:!1})}function ib(t,e,n){const{start:i}=nb(l,e,{immediate:!1}),s=r.ref(!1);async function l(){s.value&&(await t(),i())}function d(){s.value||(s.value=!0,l())}function u(){s.value=!1}return n!=null&&n.immediate&&d(),Eu(u),{isActive:s,pause:u,resume:d}}const ob="[==PROGRESS==]";function sb(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ab(t){const e=r.ref(),n=r.reactive({errorCount:0});async function i(){var l;let d=e.value;if(d===void 0)return;const u=t.mockPlatforma??window.platforma;if(!u){console.warn("Platforma API is not available");return}for(;;){const h=await u.logDriver.readText(d.logHandle,100,d.lastOffset);if(d.error=void 0,n.errorCount=0,h.shouldUpdateHandle||d.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const f=t.progressPrefix??ob,m=new TextDecoder().decode(h.data).replace(new RegExp(`${sb(f)}`,"g"),"");if(d=Object.assign(d,{lines:d.lines+m,lastOffset:h.newOffset,finished:!h.live}),h.newOffset>=h.size)break}}const s=ib(()=>i().catch(l=>{e.value&&(n.errorCount++,n.errorCount>(t.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return rb(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>s.pause()),r.watch(()=>t.logHandle,l=>{var d;l===void 0?(e.value=void 0,s.pause()):l!==((d=e.value)==null?void 0:d.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,s.resume())},{immediate:!0}),e}const lb={key:0},cb={key:1,class:"pl-log-view__error"},db={name:"PlLogView"},ub=r.defineComponent({...db,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=S=>{if(S&&S.ok===!1)return S.errors.join(`
51
+ `)},n=t,i=ab(n),s=r.ref(!0),l=r.ref(),d=r.ref(),u=r.computed(()=>{var S;return((S=i.value)==null?void 0:S.error)??n.error??e(n.output)}),h=r.computed(()=>{var S;return((S=i.value)==null?void 0:S.lines)??n.value??lv(n.output)});Rn(d);const f=()=>{h.value&&typeof h.value=="string"&&navigator.clipboard.writeText(h.value)},m=()=>{Br(l.value,S=>{s.value&&S.scrollTo(S.scrollLeft,S.scrollHeight)})};r.watch(h,()=>{requestAnimationFrame(()=>{m()})},{immediate:!0});const v=S=>{const k=S.target;s.value=k.scrollTop+20>=k.scrollHeight-k.offsetHeight};return(S,k)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:d,class:r.normalizeClass(["pl-log-view",{"has-error":u.value}])},[S.label?(r.openBlock(),r.createElementBlock("label",lb,r.toDisplayString(S.label),1)):r.createCommentVNode("",!0),k[0]||(k[0]=r.createTextVNode()),r.createVNode(ir,{class:"pl-log-view__contour"}),k[1]||(k[1]=r.createTextVNode()),r.createVNode(r.unref(Mn),{title:"Copy content",class:"pl-log-view__copy",name:"clipboard",onClick:f}),k[2]||(k[2]=r.createTextVNode()),u.value?(r.openBlock(),r.createElementBlock("div",cb,r.toDisplayString(u.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:v},r.toDisplayString(h.value),545))],2))}});function hb(t){const e=t.split("/"),n=[];for(let i=0;i<e.length;i++)n.push({index:i,name:i===0?"Root":e[i],path:e.slice(0,i+1).join("/")});return n}const pb={class:"file-dialog"},fb={class:"file-dialog__search"},mb={class:"ls-container"},gb={class:"ls-head"},yb={class:"ls-head__breadcrumbs"},vb=["title","onClick"],_b={key:0,class:"icon-16 icon-chevron-right"},Cb={class:"d-flex ml-auto align-center gap-12"},wb={class:"ls-head__selected"},bb={key:0,class:"ls-loader"},xb={key:1,class:"ls-empty"},kb={key:2,class:"ls-error"},Sb={class:"ls-error__message"},Eb={key:3,class:"ls-body"},Tb=["onClick"],Ab=["title"],Bb=["onClick"],Pb=["title"],Tu=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,i=t,s=()=>({dirPath:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1}),l=r.reactive(s()),d=r.computed(()=>l.showHiddenItems?l.items:l.items.filter($=>!$.name.startsWith("."))),u=r.computed(()=>{var $;return{modelValue:i.modelValue,dirPath:l.dirPath,storageHandle:($=l.storageEntry)==null?void 0:$.handle}}),h=($,N)=>{window.platforma&&l.currentLoadingPath!==N&&(l.error="",l.items=[],l.lastSelected=void 0,l.currentLoadingPath=N,window.platforma.lsDriver.listFiles($,N).then(H=>{N===l.dirPath&&(l.items=Hd(H).entries.map(I=>({path:I.fullPath,name:I.name,isDir:I.type==="dir",canBeSelected:I.type==="file"&&(!i.extensions||i.extensions.some(Y=>I.fullPath.endsWith(Y))),handle:I.type==="file"?I.handle:void 0,selected:!1})).sort((I,Y)=>I.isDir&&!Y.isDir?-1:!I.isDir&&Y.isDir?1:I.name.localeCompare(Y.name)).map((I,Y)=>({id:Y,...I})),l.lastSelected=void 0)}).catch(H=>l.error=String(H)).finally(()=>{l.currentLoadingPath=void 0}))},f=()=>{const{storageHandle:$,dirPath:N,modelValue:H}=u.value;$&&H&&h($,N)},m=Kd($=>{l.dirPath=$??""},1e3),v=r.computed(()=>hb(l.dirPath)),S=r.computed(()=>l.items.filter($=>$.canBeSelected&&$.selected&&!$.isDir)),k=r.computed(()=>S.value.length>0),D=()=>{n("update:modelValue",!1)},T=()=>{var $;k.value&&($=l.storageEntry)!=null&&$.handle&&(n("import:files",{storageHandle:l.storageEntry.handle,files:S.value.map(N=>N.handle)}),D())},B=$=>{l.dirPath=$,l.storageEntry&&f()},C=($,N)=>{const{shiftKey:H,metaKey:I}=$,{lastSelected:Y}=l;if($.preventDefault(),N.canBeSelected){if(i.multi||l.items.forEach(ue=>ue.selected=!1),N.selected=!0,!i.multi)return;!I&&!H&&l.items.forEach(ue=>{ue.id!==N.id&&(ue.selected=!1)}),H&&Y!==void 0&&l.items.forEach(ue=>{ov(ue.id,Y,N.id)&&(ue.selected=!0)}),N.selected&&(l.lastSelected=N.id)}},R=$=>{$&&!i.multi||l.items.filter(N=>N.canBeSelected).forEach(N=>{N.selected=$})},L=()=>R(!0),j=()=>R(!1),z=()=>{if(l.error="",l.lastSelected=void 0,j(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then($=>{l.storageOptions=$.map(N=>({text:N.name,value:N})),i.autoSelectStorage&&Br($.find(N=>N.name==="local"||N.name.startsWith("local_disk_")&&N.initialFullPath.length>4),N=>{l.storageEntry=N,l.dirPath=N.initialFullPath})}).catch($=>l.error=String($))};r.watch(r.toRef(l,"storageEntry"),$=>{l.dirPath=($==null?void 0:$.initialFullPath)??""}),r.watch([()=>l.dirPath,()=>l.storageEntry],()=>{f()}),r.watch(()=>i.modelValue,$=>{$?z():Object.assign(l,s())},{immediate:!0}),et(document,"keydown",$=>{i.modelValue&&$.target===document.body&&($.metaKey&&$.code==="KeyA"&&($.preventDefault(),L()),$.metaKey&&$.shiftKey&&$.code==="Period"&&($.preventDefault(),l.showHiddenItems=!l.showHiddenItems),$.code==="Enter"&&T())}),r.onUpdated(z);const K={mounted:$=>{if($.clientWidth<$.scrollWidth){const N=$.innerText;$.innerText=N.substring(0,57)+"..."+N.substring(N.length-10)}}};return($,N)=>(r.openBlock(),r.createBlock(r.unref(ml),{"no-content-gutters":!0,class:"split","model-value":$.modelValue,width:"688px",height:"720px","onUpdate:modelValue":D,onClick:r.withModifiers(j,["stop"])},{title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString($.title??"Select files"),1)]),actions:r.withCtx(()=>[r.createVNode(r.unref(rl),{style:{"min-width":"160px"},disabled:!k.value,onClick:r.withModifiers(T,["stop"])},{default:r.withCtx(()=>N[14]||(N[14]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),N[16]||(N[16]=r.createTextVNode()),r.createVNode(r.unref(ol),{"justify-center":!1,onClick:r.withModifiers(D,["stop"])},{default:r.withCtx(()=>N[15]||(N[15]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[N[17]||(N[17]=r.createTextVNode()),r.createElementVNode("div",pb,[r.createElementVNode("div",fb,[r.createVNode(r.unref(hl),{modelValue:l.storageEntry,"onUpdate:modelValue":N[0]||(N[0]=H=>l.storageEntry=H),label:"Select storage",options:l.storageOptions},null,8,["modelValue","options"]),N[1]||(N[1]=r.createTextVNode()),r.createVNode(r.unref(wu),{"model-value":l.dirPath,label:"Enter path","onUpdate:modelValue":r.unref(m)},null,8,["model-value","onUpdate:modelValue"])]),N[13]||(N[13]=r.createTextVNode()),r.createElementVNode("div",mb,[r.createElementVNode("div",gb,[r.createElementVNode("div",yb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,(H,I)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:I},[r.createElementVNode("div",{title:H.path,onClick:Y=>B(H.path)},r.toDisplayString(H.name),9,vb),N[2]||(N[2]=r.createTextVNode()),H.index!==v.value.length-1?(r.openBlock(),r.createElementBlock("i",_b)):r.createCommentVNode("",!0)],64))),128))]),N[3]||(N[3]=r.createTextVNode()),r.createElementVNode("div",Cb,[r.createElementVNode("span",wb,"Selected: "+r.toDisplayString(S.value.length),1)])]),N[12]||(N[12]=r.createTextVNode()),l.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",bb,N[4]||(N[4]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):l.storageEntry?l.error?(r.openBlock(),r.createElementBlock("div",kb,[N[6]||(N[6]=r.createElementVNode("div",{class:"ls-error__cat"},null,-1)),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",Sb,r.toDisplayString(l.error),1)])):(r.openBlock(),r.createElementBlock("div",Eb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.value,H=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:H.id},[H.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:"isDir",onClick:I=>B(H.path)},[N[8]||(N[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),N[9]||(N[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:H.name},[r.createTextVNode(r.toDisplayString(H.name),1)],8,Ab)),[[K]])],8,Tb)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({canBeSelected:H.canBeSelected,selected:H.selected}),onClick:r.withModifiers(I=>C(I,H),["stop"])},[N[10]||(N[10]=r.createElementVNode("i",{class:"mask-16 mask-box isFile"},null,-1)),N[11]||(N[11]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:H.name},[r.createTextVNode(r.toDisplayString(H.name),1)],8,Pb)),[[K]])],10,Bb))],64))),128))])):(r.openBlock(),r.createElementBlock("div",xb,N[5]||(N[5]=[r.createElementVNode("div",{class:"ls-empty__cat"},null,-1),r.createTextVNode(),r.createElementVNode("div",{class:"ls-empty__message"},"Select storage to preview",-1)])))])]),N[18]||(N[18]=r.createTextVNode())]),_:1},8,["model-value"]))}});var Ie;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const d of s)l[d]=d;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),d={};for(const u of l)d[u]=s[u];return t.objectValues(d)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&l.push(d);return l},t.find=(s,l)=>{for(const d of s)if(l(d))return d},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function i(s,l=" | "){return s.map(d=>typeof d=="string"?`'${d}'`:d).join(l)}t.joinValues=i,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Ie||(Ie={}));var gl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(gl||(gl={}));const oe=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),or=t=>{switch(typeof t){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return isNaN(t)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(t)?oe.array:t===null?oe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?oe.promise:typeof Map<"u"&&t instanceof Map?oe.map:typeof Set<"u"&&t instanceof Set?oe.set:typeof Date<"u"&&t instanceof Date?oe.date:oe.object;default:return oe.unknown}},X=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Vb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Rt extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},i={_errors:[]},s=l=>{for(const d of l.issues)if(d.code==="invalid_union")d.unionErrors.map(s);else if(d.code==="invalid_return_type")s(d.returnTypeError);else if(d.code==="invalid_arguments")s(d.argumentsError);else if(d.path.length===0)i._errors.push(n(d));else{let u=i,h=0;for(;h<d.path.length;){const f=d.path[h];h===d.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(d))):u[f]=u[f]||{_errors:[]},u=u[f],h++}}};return s(this),i}static assert(e){if(!(e instanceof Rt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):i.push(e(s));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}Rt.create=t=>new Rt(t);const ni=(t,e)=>{let n;switch(t.code){case X.invalid_type:t.received===oe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case X.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case X.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ie.assertNever(t)}return{message:n}};let Au=ni;function Nb(t){Au=t}function us(){return Au}const hs=t=>{const{data:e,path:n,errorMaps:i,issueData:s}=t,l=[...n,...s.path||[]],d={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const h=i.filter(f=>!!f).slice().reverse();for(const f of h)u=f(d,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},Db=[];function re(t,e){const n=us(),i=hs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ni?void 0:ni].filter(s=>!!s)});t.common.issues.push(i)}class mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const s of n){if(s.status==="aborted")return Ce;s.status==="dirty"&&e.dirty(),i.push(s.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const s of n){const l=await s.key,d=await s.value;i.push({key:l,value:d})}return mt.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const s of n){const{key:l,value:d}=s;if(l.status==="aborted"||d.status==="aborted")return Ce;l.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof d.value<"u"||s.alwaysSet)&&(i[l.value]=d.value)}return{status:e.value,value:i}}}const Ce=Object.freeze({status:"aborted"}),ps=t=>({status:"dirty",value:t}),wt=t=>({status:"valid",value:t}),yl=t=>t.status==="aborted",vl=t=>t.status==="dirty",no=t=>t.status==="valid",ro=t=>typeof Promise<"u"&&t instanceof Promise;function fs(t,e,n,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Bu(t,e,n,i,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var de;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(de||(de={}));var io,oo;class En{constructor(e,n,i,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Pu=(t,e)=>{if(no(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Rt(t.common.issues);return this._error=n,this._error}}};function Ee(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:s}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(l,d)=>{var u,h;const{message:f}=t;return l.code==="invalid_enum_value"?{message:f??d.defaultError}:typeof d.data>"u"?{message:(u=f??i)!==null&&u!==void 0?u:d.defaultError}:l.code!=="invalid_type"?{message:d.defaultError}:{message:(h=f??n)!==null&&h!==void 0?h:d.defaultError}},description:s}}class Be{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return or(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ro(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){var i;const s={common:{issues:[],async:(i=n==null?void 0:n.async)!==null&&i!==void 0?i:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},l=this._parseSync({data:e,path:s.path,parent:s});return Pu(s,l)}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},s=this._parse({data:e,path:i.path,parent:i}),l=await(ro(s)?s:Promise.resolve(s));return Pu(i,l)}refine(e,n){const i=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const d=e(s),u=()=>l.addIssue({code:X.custom,...i(s)});return typeof Promise<"u"&&d instanceof Promise?d.then(h=>h?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,n){return this._refinement((i,s)=>e(i)?!0:(s.addIssue(typeof n=="function"?n(i,s):n),!1))}_refinement(e){return new ln({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return An.create(this,this._def)}nullable(){return dr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return an.create(this,this._def)}promise(){return si.create(this,this._def)}or(e){return co.create([this,e],this._def)}and(e){return uo.create(this,e,this._def)}transform(e){return new ln({...Ee(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new go({...Ee(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new wl({typeName:ye.ZodBranded,type:this,...Ee(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new yo({...Ee(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return vo.create(this,e)}readonly(){return _o.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fb=/^c[^\s-]{8,}$/i,Rb=/^[0-9a-z]+$/,Mb=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ib=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Lb=/^[a-z0-9_-]{21}$/i,Ob=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Gb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _l;const Zb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$b=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ub=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Wb=new RegExp(`^${Vu}$`);function Nu(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Hb(t){return new RegExp(`^${Nu(t)}$`)}function Du(t){let e=`${Vu}T${Nu(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function jb(t,e){return!!((e==="v4"||!e)&&Zb.test(t)||(e==="v6"||!e)&&$b.test(t))}class sn extends Be{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==oe.string){const s=this._getOrReturnCtx(e);return re(s,{code:X.invalid_type,expected:oe.string,received:s.parsedType}),Ce}const n=new mt;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,d=e.data.length<s.value;(l||d)&&(i=this._getOrReturnCtx(e,i),l?re(i,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):d&&re(i,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Gb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"email",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")_l||(_l=new RegExp(zb,"u")),_l.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"emoji",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Ib.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"uuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Lb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"nanoid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Fb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"cuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Rb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"cuid2",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Mb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"ulid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),re(i,{validation:"url",code:X.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"regex",code:X.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Du(s).test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Wb.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Hb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{code:X.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Ob.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"duration",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?jb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"ip",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Ub.test(e.data)||(i=this._getOrReturnCtx(e,i),re(i,{validation:"base64",code:X.invalid_string,message:s.message}),n.dirty()):Ie.assertNever(s);return{status:n.value,value:e.data}}_regex(e,n,i){return this.refinement(s=>e.test(s),{validation:n,code:X.invalid_string,...de.errToObj(i)})}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...de.errToObj(e)})}url(e){return this._addCheck({kind:"url",...de.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...de.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...de.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...de.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...de.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...de.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...de.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...de.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...de.errToObj(e)})}datetime(e){var n,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...de.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...de.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...de.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...de.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...de.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...de.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...de.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...de.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...de.errToObj(n)})}nonempty(e){return this.min(1,de.errToObj(e))}trim(){return new sn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}sn.create=t=>{var e;return new sn({checks:[],typeName:ye.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ee(t)})};function qb(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,s=n>i?n:i,l=parseInt(t.toFixed(s).replace(".","")),d=parseInt(e.toFixed(s).replace(".",""));return l%d/Math.pow(10,s)}class sr extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==oe.number){const s=this._getOrReturnCtx(e);return re(s,{code:X.invalid_type,expected:oe.number,received:s.parsedType}),Ce}let n;const i=new mt;for(const s of this._def.checks)s.kind==="int"?Ie.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),re(n,{code:X.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?qb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),re(n,{code:X.not_finite,message:s.message}),i.dirty()):Ie.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,de.toString(n))}gt(e,n){return this.setLimit("min",e,!1,de.toString(n))}lte(e,n){return this.setLimit("max",e,!0,de.toString(n))}lt(e,n){return this.setLimit("max",e,!1,de.toString(n))}setLimit(e,n,i,s){return new sr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:de.toString(s)}]})}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:de.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:de.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ie.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}sr.create=t=>new sr({checks:[],typeName:ye.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ee(t)});class ar extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==oe.bigint){const s=this._getOrReturnCtx(e);return re(s,{code:X.invalid_type,expected:oe.bigint,received:s.parsedType}),Ce}let n;const i=new mt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),re(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ie.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,de.toString(n))}gt(e,n){return this.setLimit("min",e,!1,de.toString(n))}lte(e,n){return this.setLimit("max",e,!0,de.toString(n))}lt(e,n){return this.setLimit("max",e,!1,de.toString(n))}setLimit(e,n,i,s){return new ar({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:de.toString(s)}]})}_addCheck(e){return new ar({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:de.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ar.create=t=>{var e;return new ar({checks:[],typeName:ye.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ee(t)})};class so extends Be{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==oe.boolean){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.boolean,received:n.parsedType}),Ce}return wt(e.data)}}so.create=t=>new so({typeName:ye.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ee(t)});class Vr extends Be{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==oe.date){const s=this._getOrReturnCtx(e);return re(s,{code:X.invalid_type,expected:oe.date,received:s.parsedType}),Ce}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return re(s,{code:X.invalid_date}),Ce}const n=new mt;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:X.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),re(i,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ie.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:de.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:de.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Vr.create=t=>new Vr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ye.ZodDate,...Ee(t)});class ms extends Be{_parse(e){if(this._getType(e)!==oe.symbol){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.symbol,received:n.parsedType}),Ce}return wt(e.data)}}ms.create=t=>new ms({typeName:ye.ZodSymbol,...Ee(t)});class ao extends Be{_parse(e){if(this._getType(e)!==oe.undefined){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.undefined,received:n.parsedType}),Ce}return wt(e.data)}}ao.create=t=>new ao({typeName:ye.ZodUndefined,...Ee(t)});class lo extends Be{_parse(e){if(this._getType(e)!==oe.null){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.null,received:n.parsedType}),Ce}return wt(e.data)}}lo.create=t=>new lo({typeName:ye.ZodNull,...Ee(t)});class ri extends Be{constructor(){super(...arguments),this._any=!0}_parse(e){return wt(e.data)}}ri.create=t=>new ri({typeName:ye.ZodAny,...Ee(t)});class Nr extends Be{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wt(e.data)}}Nr.create=t=>new Nr({typeName:ye.ZodUnknown,...Ee(t)});class In extends Be{_parse(e){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.never,received:n.parsedType}),Ce}}In.create=t=>new In({typeName:ye.ZodNever,...Ee(t)});class gs extends Be{_parse(e){if(this._getType(e)!==oe.undefined){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.void,received:n.parsedType}),Ce}return wt(e.data)}}gs.create=t=>new gs({typeName:ye.ZodVoid,...Ee(t)});class an extends Be{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),s=this._def;if(n.parsedType!==oe.array)return re(n,{code:X.invalid_type,expected:oe.array,received:n.parsedType}),Ce;if(s.exactLength!==null){const d=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(d||u)&&(re(n,{code:d?X.too_big:X.too_small,minimum:u?s.exactLength.value:void 0,maximum:d?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(re(n,{code:X.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(re(n,{code:X.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((d,u)=>s.type._parseAsync(new En(n,d,n.path,u)))).then(d=>mt.mergeArray(i,d));const l=[...n.data].map((d,u)=>s.type._parseSync(new En(n,d,n.path,u)));return mt.mergeArray(i,l)}get element(){return this._def.type}min(e,n){return new an({...this._def,minLength:{value:e,message:de.toString(n)}})}max(e,n){return new an({...this._def,maxLength:{value:e,message:de.toString(n)}})}length(e,n){return new an({...this._def,exactLength:{value:e,message:de.toString(n)}})}nonempty(e){return this.min(1,e)}}an.create=(t,e)=>new an({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Ee(e)});function ii(t){if(t instanceof Ye){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=An.create(ii(i))}return new Ye({...t._def,shape:()=>e})}else return t instanceof an?new an({...t._def,type:ii(t.element)}):t instanceof An?An.create(ii(t.unwrap())):t instanceof dr?dr.create(ii(t.unwrap())):t instanceof Tn?Tn.create(t.items.map(e=>ii(e))):t}class Ye extends Be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ie.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==oe.object){const h=this._getOrReturnCtx(e);return re(h,{code:X.invalid_type,expected:oe.object,received:h.parsedType}),Ce}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),d=[];if(!(this._def.catchall instanceof In&&this._def.unknownKeys==="strip"))for(const h in i.data)l.includes(h)||d.push(h);const u=[];for(const h of l){const f=s[h],m=i.data[h];u.push({key:{status:"valid",value:h},value:f._parse(new En(i,m,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof In){const h=this._def.unknownKeys;if(h==="passthrough")for(const f of d)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(h==="strict")d.length>0&&(re(i,{code:X.unrecognized_keys,keys:d}),n.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const f of d){const m=i.data[f];u.push({key:{status:"valid",value:f},value:h._parse(new En(i,m,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const f of u){const m=await f.key,v=await f.value;h.push({key:m,value:v,alwaysSet:f.alwaysSet})}return h}).then(h=>mt.mergeObjectSync(n,h)):mt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return de.errToObj,new Ye({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{var s,l,d,u;const h=(d=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,i).message)!==null&&d!==void 0?d:i.defaultError;return n.code==="unrecognized_keys"?{message:(u=de.errToObj(e).message)!==null&&u!==void 0?u:h}:{message:h}}}:{}})}strip(){return new Ye({...this._def,unknownKeys:"strip"})}passthrough(){return new Ye({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ye({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ye({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ye({...this._def,catchall:e})}pick(e){const n={};return Ie.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(n[i]=this.shape[i])}),new Ye({...this._def,shape:()=>n})}omit(e){const n={};return Ie.objectKeys(this.shape).forEach(i=>{e[i]||(n[i]=this.shape[i])}),new Ye({...this._def,shape:()=>n})}deepPartial(){return ii(this)}partial(e){const n={};return Ie.objectKeys(this.shape).forEach(i=>{const s=this.shape[i];e&&!e[i]?n[i]=s:n[i]=s.optional()}),new Ye({...this._def,shape:()=>n})}required(e){const n={};return Ie.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])n[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof An;)s=s._def.innerType;n[i]=s}}),new Ye({...this._def,shape:()=>n})}keyof(){return Fu(Ie.objectKeys(this.shape))}}Ye.create=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strip",catchall:In.create(),typeName:ye.ZodObject,...Ee(e)}),Ye.strictCreate=(t,e)=>new Ye({shape:()=>t,unknownKeys:"strict",catchall:In.create(),typeName:ye.ZodObject,...Ee(e)}),Ye.lazycreate=(t,e)=>new Ye({shape:t,unknownKeys:"strip",catchall:In.create(),typeName:ye.ZodObject,...Ee(e)});class co extends Be{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const d=l.map(u=>new Rt(u.ctx.common.issues));return re(n,{code:X.invalid_union,unionErrors:d}),Ce}if(n.common.async)return Promise.all(i.map(async l=>{const d={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:d}),ctx:d}})).then(s);{let l;const d=[];for(const h of i){const f={...n,common:{...n.common,issues:[]},parent:null},m=h._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&d.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=d.map(h=>new Rt(h));return re(n,{code:X.invalid_union,unionErrors:u}),Ce}}get options(){return this._def.options}}co.create=(t,e)=>new co({options:t,typeName:ye.ZodUnion,...Ee(e)});const lr=t=>t instanceof po?lr(t.schema):t instanceof ln?lr(t.innerType()):t instanceof fo?[t.value]:t instanceof cr?t.options:t instanceof mo?Ie.objectValues(t.enum):t instanceof go?lr(t._def.innerType):t instanceof ao?[void 0]:t instanceof lo?[null]:t instanceof An?[void 0,...lr(t.unwrap())]:t instanceof dr?[null,...lr(t.unwrap())]:t instanceof wl||t instanceof _o?lr(t.unwrap()):t instanceof yo?lr(t._def.innerType):[];class ys extends Be{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==oe.object)return re(n,{code:X.invalid_type,expected:oe.object,received:n.parsedType}),Ce;const i=this.discriminator,s=n.data[i],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(re(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,i){const s=new Map;for(const l of n){const d=lr(l.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new ys({typeName:ye.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Ee(i)})}}function Cl(t,e){const n=or(t),i=or(e);if(t===e)return{valid:!0,data:t};if(n===oe.object&&i===oe.object){const s=Ie.objectKeys(e),l=Ie.objectKeys(t).filter(u=>s.indexOf(u)!==-1),d={...t,...e};for(const u of l){const h=Cl(t[u],e[u]);if(!h.valid)return{valid:!1};d[u]=h.data}return{valid:!0,data:d}}else if(n===oe.array&&i===oe.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const d=t[l],u=e[l],h=Cl(d,u);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return n===oe.date&&i===oe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class uo extends Be{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),s=(l,d)=>{if(yl(l)||yl(d))return Ce;const u=Cl(l.value,d.value);return u.valid?((vl(l)||vl(d))&&n.dirty(),{status:n.value,value:u.data}):(re(i,{code:X.invalid_intersection_types}),Ce)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,d])=>s(l,d)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}uo.create=(t,e,n)=>new uo({left:t,right:e,typeName:ye.ZodIntersection,...Ee(n)});class Tn extends Be{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==oe.array)return re(i,{code:X.invalid_type,expected:oe.array,received:i.parsedType}),Ce;if(i.data.length<this._def.items.length)return re(i,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&i.data.length>this._def.items.length&&(re(i,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...i.data].map((l,d)=>{const u=this._def.items[d]||this._def.rest;return u?u._parse(new En(i,l,i.path,d)):null}).filter(l=>!!l);return i.common.async?Promise.all(s).then(l=>mt.mergeArray(n,l)):mt.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Tn({...this._def,rest:e})}}Tn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Tn({items:t,typeName:ye.ZodTuple,rest:null,...Ee(e)})};class ho extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==oe.object)return re(i,{code:X.invalid_type,expected:oe.object,received:i.parsedType}),Ce;const s=[],l=this._def.keyType,d=this._def.valueType;for(const u in i.data)s.push({key:l._parse(new En(i,u,i.path,u)),value:d._parse(new En(i,i.data[u],i.path,u)),alwaysSet:u in i.data});return i.common.async?mt.mergeObjectAsync(n,s):mt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Be?new ho({keyType:e,valueType:n,typeName:ye.ZodRecord,...Ee(i)}):new ho({keyType:sn.create(),valueType:e,typeName:ye.ZodRecord,...Ee(n)})}}class vs extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==oe.map)return re(i,{code:X.invalid_type,expected:oe.map,received:i.parsedType}),Ce;const s=this._def.keyType,l=this._def.valueType,d=[...i.data.entries()].map(([u,h],f)=>({key:s._parse(new En(i,u,i.path,[f,"key"])),value:l._parse(new En(i,h,i.path,[f,"value"]))}));if(i.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const h of d){const f=await h.key,m=await h.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const h of d){const f=h.key,m=h.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}vs.create=(t,e,n)=>new vs({valueType:e,keyType:t,typeName:ye.ZodMap,...Ee(n)});class Dr extends Be{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==oe.set)return re(i,{code:X.invalid_type,expected:oe.set,received:i.parsedType}),Ce;const s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(re(i,{code:X.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(re(i,{code:X.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function d(h){const f=new Set;for(const m of h){if(m.status==="aborted")return Ce;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...i.data.values()].map((h,f)=>l._parse(new En(i,h,i.path,f)));return i.common.async?Promise.all(u).then(h=>d(h)):d(u)}min(e,n){return new Dr({...this._def,minSize:{value:e,message:de.toString(n)}})}max(e,n){return new Dr({...this._def,maxSize:{value:e,message:de.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Dr.create=(t,e)=>new Dr({valueType:t,minSize:null,maxSize:null,typeName:ye.ZodSet,...Ee(e)});class oi extends Be{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==oe.function)return re(n,{code:X.invalid_type,expected:oe.function,received:n.parsedType}),Ce;function i(u,h){return hs({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,us(),ni].filter(f=>!!f),issueData:{code:X.invalid_arguments,argumentsError:h}})}function s(u,h){return hs({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,us(),ni].filter(f=>!!f),issueData:{code:X.invalid_return_type,returnTypeError:h}})}const l={errorMap:n.common.contextualErrorMap},d=n.data;if(this._def.returns instanceof si){const u=this;return wt(async function(...h){const f=new Rt([]),m=await u._def.args.parseAsync(h,l).catch(S=>{throw f.addIssue(i(h,S)),f}),v=await Reflect.apply(d,this,m);return await u._def.returns._def.type.parseAsync(v,l).catch(S=>{throw f.addIssue(s(v,S)),f})})}else{const u=this;return wt(function(...h){const f=u._def.args.safeParse(h,l);if(!f.success)throw new Rt([i(h,f.error)]);const m=Reflect.apply(d,this,f.data),v=u._def.returns.safeParse(m,l);if(!v.success)throw new Rt([s(m,v.error)]);return v.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new oi({...this._def,args:Tn.create(e).rest(Nr.create())})}returns(e){return new oi({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,i){return new oi({args:e||Tn.create([]).rest(Nr.create()),returns:n||Nr.create(),typeName:ye.ZodFunction,...Ee(i)})}}class po extends Be{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}po.create=(t,e)=>new po({getter:t,typeName:ye.ZodLazy,...Ee(e)});class fo extends Be{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return re(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}}fo.create=(t,e)=>new fo({value:t,typeName:ye.ZodLiteral,...Ee(e)});function Fu(t,e){return new cr({values:t,typeName:ye.ZodEnum,...Ee(e)})}class cr extends Be{constructor(){super(...arguments),io.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return re(n,{expected:Ie.joinValues(i),received:n.parsedType,code:X.invalid_type}),Ce}if(fs(this,io)||Bu(this,io,new Set(this._def.values)),!fs(this,io).has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return re(n,{received:n.data,code:X.invalid_enum_value,options:i}),Ce}return wt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return cr.create(e,{...this._def,...n})}exclude(e,n=this._def){return cr.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}io=new WeakMap,cr.create=Fu;class mo extends Be{constructor(){super(...arguments),oo.set(this,void 0)}_parse(e){const n=Ie.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==oe.string&&i.parsedType!==oe.number){const s=Ie.objectValues(n);return re(i,{expected:Ie.joinValues(s),received:i.parsedType,code:X.invalid_type}),Ce}if(fs(this,oo)||Bu(this,oo,new Set(Ie.getValidEnumValues(this._def.values))),!fs(this,oo).has(e.data)){const s=Ie.objectValues(n);return re(i,{received:i.data,code:X.invalid_enum_value,options:s}),Ce}return wt(e.data)}get enum(){return this._def.values}}oo=new WeakMap,mo.create=(t,e)=>new mo({values:t,typeName:ye.ZodNativeEnum,...Ee(e)});class si extends Be{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==oe.promise&&n.common.async===!1)return re(n,{code:X.invalid_type,expected:oe.promise,received:n.parsedType}),Ce;const i=n.parsedType===oe.promise?n.data:Promise.resolve(n.data);return wt(i.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}si.create=(t,e)=>new si({type:t,typeName:ye.ZodPromise,...Ee(e)});class ln extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:d=>{re(i,d),d.fatal?n.abort():n.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const d=s.transform(i.data,l);if(i.common.async)return Promise.resolve(d).then(async u=>{if(n.value==="aborted")return Ce;const h=await this._def.schema._parseAsync({data:u,path:i.path,parent:i});return h.status==="aborted"?Ce:h.status==="dirty"||n.value==="dirty"?ps(h.value):h});{if(n.value==="aborted")return Ce;const u=this._def.schema._parseSync({data:d,path:i.path,parent:i});return u.status==="aborted"?Ce:u.status==="dirty"||n.value==="dirty"?ps(u.value):u}}if(s.type==="refinement"){const d=u=>{const h=s.refinement(u,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),d(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),d(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!no(d))return d;const u=s.transform(d.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>no(d)?Promise.resolve(s.transform(d.value,l)).then(u=>({status:n.value,value:u})):d);Ie.assertNever(s)}}ln.create=(t,e,n)=>new ln({schema:t,typeName:ye.ZodEffects,effect:e,...Ee(n)}),ln.createWithPreprocess=(t,e,n)=>new ln({schema:e,effect:{type:"preprocess",transform:t},typeName:ye.ZodEffects,...Ee(n)});class An extends Be{_parse(e){return this._getType(e)===oe.undefined?wt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}An.create=(t,e)=>new An({innerType:t,typeName:ye.ZodOptional,...Ee(e)});class dr extends Be{_parse(e){return this._getType(e)===oe.null?wt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}dr.create=(t,e)=>new dr({innerType:t,typeName:ye.ZodNullable,...Ee(e)});class go extends Be{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===oe.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}go.create=(t,e)=>new go({innerType:t,typeName:ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ee(e)});class yo extends Be{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return ro(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Rt(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Rt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}yo.create=(t,e)=>new yo({innerType:t,typeName:ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ee(e)});class _s extends Be{_parse(e){if(this._getType(e)!==oe.nan){const n=this._getOrReturnCtx(e);return re(n,{code:X.invalid_type,expected:oe.nan,received:n.parsedType}),Ce}return{status:"valid",value:e.data}}}_s.create=t=>new _s({typeName:ye.ZodNaN,...Ee(t)});const Kb=Symbol("zod_brand");class wl extends Be{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class vo extends Be{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?Ce:s.status==="dirty"?(n.dirty(),ps(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{const s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?Ce:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}static create(e,n){return new vo({in:e,out:n,typeName:ye.ZodPipeline})}}class _o extends Be{_parse(e){const n=this._def.innerType._parse(e),i=s=>(no(s)&&(s.value=Object.freeze(s.value)),s);return ro(n)?n.then(s=>i(s)):i(n)}unwrap(){return this._def.innerType}}_o.create=(t,e)=>new _o({innerType:t,typeName:ye.ZodReadonly,...Ee(e)});function Ru(t,e={},n){return t?ri.create().superRefine((i,s)=>{var l,d;if(!t(i)){const u=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,h=(d=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&d!==void 0?d:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:h})}}):ri.create()}const Yb={object:Ye.lazycreate};var ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ye||(ye={}));const Jb=(t,e={message:`Input not instance of ${t.name}`})=>Ru(n=>n instanceof t,e),Mu=sn.create,Iu=sr.create,Xb=_s.create,Qb=ar.create,Lu=so.create,ex=Vr.create,tx=ms.create,nx=ao.create,rx=lo.create,ix=ri.create,ox=Nr.create,sx=In.create,ax=gs.create,lx=an.create,cx=Ye.create,dx=Ye.strictCreate,ux=co.create,hx=ys.create,px=uo.create,fx=Tn.create,mx=ho.create,gx=vs.create,yx=Dr.create,vx=oi.create,_x=po.create,Cx=fo.create,wx=cr.create,bx=mo.create,xx=si.create,Ou=ln.create,kx=An.create,Sx=dr.create,Ex=ln.createWithPreprocess,Tx=vo.create;var Cs=Object.freeze({__proto__:null,defaultErrorMap:ni,setErrorMap:Nb,getErrorMap:us,makeIssue:hs,EMPTY_PATH:Db,addIssueToContext:re,ParseStatus:mt,INVALID:Ce,DIRTY:ps,OK:wt,isAborted:yl,isDirty:vl,isValid:no,isAsync:ro,get util(){return Ie},get objectUtil(){return gl},ZodParsedType:oe,getParsedType:or,ZodType:Be,datetimeRegex:Du,ZodString:sn,ZodNumber:sr,ZodBigInt:ar,ZodBoolean:so,ZodDate:Vr,ZodSymbol:ms,ZodUndefined:ao,ZodNull:lo,ZodAny:ri,ZodUnknown:Nr,ZodNever:In,ZodVoid:gs,ZodArray:an,ZodObject:Ye,ZodUnion:co,ZodDiscriminatedUnion:ys,ZodIntersection:uo,ZodTuple:Tn,ZodRecord:ho,ZodMap:vs,ZodSet:Dr,ZodFunction:oi,ZodLazy:po,ZodLiteral:fo,ZodEnum:cr,ZodNativeEnum:mo,ZodPromise:si,ZodEffects:ln,ZodTransformer:ln,ZodOptional:An,ZodNullable:dr,ZodDefault:go,ZodCatch:yo,ZodNaN:_s,BRAND:Kb,ZodBranded:wl,ZodPipeline:vo,ZodReadonly:_o,custom:Ru,Schema:Be,ZodSchema:Be,late:Yb,get ZodFirstPartyTypeKind(){return ye},coerce:{string:t=>sn.create({...t,coerce:!0}),number:t=>sr.create({...t,coerce:!0}),boolean:t=>so.create({...t,coerce:!0}),bigint:t=>ar.create({...t,coerce:!0}),date:t=>Vr.create({...t,coerce:!0})},any:ix,array:lx,bigint:Qb,boolean:Lu,date:ex,discriminatedUnion:hx,effect:Ou,enum:wx,function:vx,instanceof:Jb,intersection:px,lazy:_x,literal:Cx,map:gx,nan:Xb,nativeEnum:bx,never:sx,null:rx,nullable:Sx,number:Iu,object:cx,oboolean:()=>Lu().optional(),onumber:()=>Iu().optional(),optional:kx,ostring:()=>Mu().optional(),pipeline:Tx,preprocess:Ex,promise:xx,record:mx,set:yx,strictObject:dx,string:Mu,symbol:tx,transformer:Ou,tuple:fx,undefined:nx,union:ux,unknown:ox,void:ax,NEVER:Ce,ZodIssueCode:X,quotelessJson:Vb,ZodError:Rt});function Ax(t){throw new Error("Unexpected object: "+t)}const Gu="upload://upload/",zu="index://index/";function Bx(t){return t.startsWith(Gu)}function Px(t){return t.startsWith(zu)}function Vx(t){if(Px(t)){const e=t.slice(zu.length);return JSON.parse(decodeURIComponent(e)).path}else if(Bx(t)){const e=t.slice(Gu.length);return JSON.parse(decodeURIComponent(e)).localPath}Ax(t)}Cs.object({__isRef:Cs.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Cs.string().describe("Upstream block id"),name:Cs.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Nx(t){return t.replace(/^.*[\\/]/,"")}const Dx={key:0,ref:"label"},Fx={key:0,class:"required-icon"},Rx=["data-placeholder"],Mx={key:5,class:"pl-file-input__stats"},Ix={key:0,class:"pl-file-input__error"},Lx={key:1,class:"upl-file-input__helper"},Zu=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},fileDialogTitle:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},showFilenameOnly:{type:Boolean},cellStyle:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1}),i=r.useSlots(),s=e,l=t,d=r.computed(()=>{if(l.modelValue)try{const C=Vx(l.modelValue).trim();return l.showFilenameOnly?Nx(C):C}catch(C){return console.error(C),l.modelValue}return""}),u=r.computed(()=>l.progress&&!l.progress.done),h=r.computed(()=>l.progress&&l.progress.done),f=r.computed(()=>l.error),m=r.computed(()=>l.error),v=r.computed(()=>{const{status:C,done:R}=l.progress??{};return!C||!C.bytesTotal?"":C.bytesProcessed&&!R?qa(C.bytesProcessed,{})+" / "+qa(C.bytesTotal,{}):qa(C.bytesTotal,{})}),S=r.computed(()=>{var C;const{progress:R}=l;return R?{width:R.done?"100%":Math.round((((C=R.status)==null?void 0:C.progress)??0)*100)+"%"}:{}}),k=()=>{n.fileDialogOpen=!0},D=C=>{C.files.length&&s("update:modelValue",C.files[0])},T=()=>s("update:modelValue",void 0),B=r.ref();return l.cellStyle||Rn(B),(C,R)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!C.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:B,class:r.normalizeClass(["pl-file-input",{dashed:C.dashed,error:f.value}]),tabindex:"0",onKeyup:r.withKeys(k,["enter"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(S.value)},null,4),R[3]||(R[3]=r.createTextVNode()),!C.cellStyle&&C.label?(r.openBlock(),r.createElementBlock("label",Dx,[C.required?(r.openBlock(),r.createElementBlock("i",Fx)):r.createCommentVNode("",!0),R[1]||(R[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(C.label),1),R[2]||(R[2]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),R[4]||(R[4]=r.createTextVNode()),f.value?(r.openBlock(),r.createBlock(r.unref(Mn),{key:1,name:"restart"})):u.value?(r.openBlock(),r.createBlock(r.unref(Mn),{key:2,name:"cloud-upload"})):h.value?(r.openBlock(),r.createBlock(r.unref(Mn),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(Mn),{key:4,name:"paper-clip"})),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":C.placeholder??"Choose file",class:"pl-file-input__filename",onClick:r.withModifiers(k,["stop"])},r.toDisplayString(d.value),9,Rx),R[6]||(R[6]=r.createTextVNode()),v.value?(r.openBlock(),r.createElementBlock("div",Mx,r.toDisplayString(v.value),1)):r.createCommentVNode("",!0),R[7]||(R[7]=r.createTextVNode()),C.modelValue?(r.openBlock(),r.createBlock(r.unref(Mn),{key:6,name:"close",onClick:r.withModifiers(T,["stop"])})):r.createCommentVNode("",!0),R[8]||(R[8]=r.createTextVNode()),r.createVNode(ir,{class:"pl-file-input__contour"})],34),R[9]||(R[9]=r.createTextVNode()),f.value?(r.openBlock(),r.createElementBlock("div",Ix,r.toDisplayString(m.value),1)):C.helper?(r.openBlock(),r.createElementBlock("div",Lx,r.toDisplayString(C.helper),1)):r.createCommentVNode("",!0)],2),R[10]||(R[10]=r.createTextVNode()),r.createVNode(r.unref(Tu),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":R[0]||(R[0]=L=>n.fileDialogOpen=L),extensions:C.extensions,title:C.fileDialogTitle,"onImport:files":D},null,8,["modelValue","extensions","title"])],64))}}),Ox={class:"pl-notification-alert__wrapper d-flex"},Gx={class:"pl-notification-alert__content flex-grow-1"},zx={key:0,class:"pl-notification-alert__close"},Zx={key:0,class:"pl-notification-alert__actions d-flex"},$u=r.defineComponent({__name:"PlNotificationAlert",props:r.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=r.useModel(t,"modelValue");function i(){e.closable&&(n.value=!1)}return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([s.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${s.width}`})},[r.createElementVNode("div",Ox,[r.createElementVNode("div",Gx,[r.renderSlot(s.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),s.closable?(r.openBlock(),r.createElementBlock("div",zx,[r.createVNode(r.unref(ol),{icon:"close",onClick:i})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),s.$slots.actions?(r.openBlock(),r.createElementBlock("div",Zx,[r.renderSlot(s.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),Uu=r.defineComponent({__name:"PlCopyData",emits:["copy"],setup(t,{emit:e}){const n=e,i=r.ref(!1),s=r.computed(()=>i.value?"mask-clipboard-copied":"mask-clipboard");function l(){i.value=!0,setTimeout(()=>i.value=!1,700),n("copy")}return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.value,"mask-24"]),onClick:l},null,2))}}),$x=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,i)=>r.renderSlot(n.$slots,"default")}});function gt(t,e,n){return e>t?e:t>n?n:t}const bl=t=>r.computed(()=>{const e=[100],{min:n,max:i,step:s}=t.value;let l=n;for(;l<i;){l+=s;const d=(1-(gt(l,n,i)-n)/(i-n))*100;e.push(d)}return e}),Ux={class:"ui-slider__wrapper"},Wx={class:"ui-slider__label-section"},Hx={key:0,class:"text-s"},jx={key:1,class:"ui-slider__value-static text-s"},qx={class:"ui-slider__base"},Kx={class:"ui-slider__container"},Yx={class:"ui-slider__container ui-slider__container-thumb"},Jx={class:"ui-slider__input-wrapper d-flex"},Xx=["value"],Qx={key:0,class:"ui-slider__error"},ek=r.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.reactive({deltaValue:0}),d=r.computed(()=>s.max-s.min),u=r.computed(()=>gt((s.modelValue??0)+l.deltaValue,s.min,s.max)),h=r.ref(s.modelValue),f=r.computed(()=>{const z=s.modelValue;return Number.isFinite(z)?z<s.min?`Min value: ${s.min}`:z>s.max?`Max value: ${s.max}`:s.error:"Not a number"}),m=r.computed(()=>s),v=bl(m),S=r.computed(()=>(u.value-s.min)/d.value),k=r.computed(()=>({right:Math.ceil((1-S.value)*100)+"%"})),D=r.computed(()=>({right:`calc(${Math.ceil((1-S.value)*100)}%) `})),T=r.ref(),B=r.ref();r.watch(()=>s.modelValue,z=>{h.value=z});function C(z){const K=gt(z,s.min,s.max);return Math.round((K+Number.EPSILON)*(1/s.step))/(1/s.step)}rr(B,z=>{var K;it((K=r.unref(T))==null?void 0:K.getBoundingClientRect(),$=>{const{dx:N}=z;l.deltaValue=N/$.width*d.value,h.value=C(gt((s.modelValue??0)+l.deltaValue,s.min,s.max)),z.stop&&(i("update:modelValue",C(u.value)),l.deltaValue=0)})});function R(z){i("update:modelValue",C(z))}function L(z){R(+z.target.value)}function j(z){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(z.code)&&z.preventDefault();const K=z.code==="ArrowUp"||z.code==="ArrowRight"?s.step*1:z.code==="ArrowDown"||z.code==="ArrowLeft"?s.step*-1:0;R(s.modelValue+K)}return(z,K)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",Ux,[r.createElementVNode("div",Wx,[z.label?(r.openBlock(),r.createElementBlock("label",Hx,[r.createElementVNode("span",null,r.toDisplayString(z.label),1),K[1]||(K[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),K[2]||(K[2]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",jx,r.toDisplayString(h.value)+r.toDisplayString(z.measure),1)):r.createCommentVNode("",!0)]),K[6]||(K[6]=r.createTextVNode()),r.createElementVNode("div",qx,[r.createElementVNode("div",Kx,[r.createElementVNode("div",{ref_key:"barRef",ref:T,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(k.value)},null,4)],512)]),K[5]||(K[5]=r.createTextVNode()),r.createElementVNode("div",Yx,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(v),($,N)=>(r.openBlock(),r.createElementBlock("div",{key:N,style:r.normalizeStyle({right:`${$}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),K[4]||(K[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:B,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(D.value),onKeydown:j},K[3]||(K[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),K[7]||(K[7]=r.createTextVNode()),r.createElementVNode("div",Jx,[s.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.value,class:"ui-slider__value text-s",onChange:K[0]||(K[0]=$=>L($))},null,40,Xx)):r.createCommentVNode("",!0)])],2),K[8]||(K[8]=r.createTextVNode()),f.value?(r.openBlock(),r.createElementBlock("div",Qx,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],2))}});function tk(t,e=null,n=null){function i(u){const{scrollTop:h,scrollHeight:f,clientHeight:m}=u;if(!(f>m)||!e)return null;const v=f-h-m,S=h>e?e:0,k=v>e?m-e-S:m;return`linear-gradient(
66
52
  to bottom,
67
53
  transparent,
68
54
  black ${S}px,
69
55
  black ${k}px,
70
56
  transparent 100%
71
- )`}function i(u){const{scrollLeft:p,scrollWidth:h,clientWidth:f}=u;if(!(h>f)||!r)return null;const y=h-p-f,S=p>r?r:0,k=y>r?f-r-S:f;return`linear-gradient(
57
+ )`}function s(u){const{scrollLeft:h,scrollWidth:f,clientWidth:m}=u;if(!(f>m)||!n)return null;const v=f-h-m,S=h>n?n:0,k=v>n?m-n-S:m;return`linear-gradient(
72
58
  to right,
73
59
  transparent,
74
60
  black ${S}px,
75
61
  black ${k}px,
76
62
  transparent 100%
77
- )`}function s(){const u=t.value;if(!u)return;const p=[o(u),i(u)].filter(h=>h!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const d=as(s);n.onMounted(s),et(window,"scroll",d,!0),et(window,"resize",d,!0)}function pp(t,e){Iu(()=>{ot(n.unref(t),r=>{Fu(r,()=>e(r))})}),n.onUnmounted(()=>{ot(n.unref(t),r=>{Ru(r)})})}const pn={item:"sortable__item",animate:"sortable__animate"},_a=t=>t.getBoundingClientRect().y,gp=t=>{const{y:e,height:r}=t.getBoundingClientRect();return e+Math.ceil(r/2)},ik=t=>{const{y:e,height:r}=t.getBoundingClientRect();return e+r};function lk(t,e){const r={item:void 0,options(){var k;return[...((k=t.value)==null?void 0:k.children)??[]]}},o=n.computed(()=>r.options()),i=e.shakeBuffer??10,s=e.reorderDelay??100;function d(k){const D=e.handle?this.querySelector(e.handle):null;D&&!D.contains(k.target)||(this.classList.remove(pn.animate),this.classList.add(pn.item),r.item={el:this,y:k.y,dy:0,orderChanged:!1})}function u(k){const D=r.options();return D.slice(0,D.indexOf(k))}function p(k){const D=r.options();return D.slice(D.indexOf(k)+1)}function h(k,D){const E=r.options().filter(w=>w!==D),A=E.indexOf(k);return E.splice(A,0,D),E}function f(k,D){const E=r.options().filter(w=>w!==D),A=E.indexOf(k);return E.splice(A+1,0,D),E}function y(k,D){k.dy=D-k.y,k.el.style.setProperty("transform",`translateY(${k.dy}px)`)}function S(k){var D;if(!r.item)return;const{el:E}=r.item;if(!E.isConnected){r.item=void 0;return}const A=k.map(K=>_a(K)),w=_a(E);(D=t.value)==null||D.replaceChildren(...k);const L=_a(E),R=k.map(K=>_a(K)),H=[];for(let K=0;K<R.length;K++){const U=k[K];if(U===r.item.el)continue;const P=R[K],W=A[K]-P;U.style.transform=`translateY(${W}px)`,H.push(U)}const G=L-w;r.item.y=r.item.y+G,r.item.dy=r.item.dy-G,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),H.forEach(K=>K.classList.remove(pn.animate)),requestAnimationFrame(function(){H.forEach(K=>{K.classList.add(pn.animate),K.style.transform="",K.addEventListener("transitionend",()=>{K.classList.remove(pn.animate)})})})}et(window,"mousemove",k=>{if(!r.item)return;const{el:D}=r.item;y(r.item,k.y);const E=_a(r.item.el),A=ik(r.item.el),w=u(D),L=p(D);w.forEach(R=>{const H=gp(R);E+i<H&&S(h(R,D))}),L.forEach(R=>{const H=gp(R);A-i>H&&S(f(R,D))})}),et(window,"mouseup",()=>{if(!r.item)return;const{el:k,orderChanged:D}=r.item;k.classList.add(pn.animate),k.style.removeProperty("transform"),k.addEventListener("transitionend",()=>{k.classList.remove(pn.animate,pn.item)}),setTimeout(()=>{if(!D)return;const E=r.options().map(w=>Number(w.getAttribute("data-index"))),A=t.value;if(A){for(const w of r.options())A.removeChild(w);o.value.forEach(w=>{A.appendChild(w)})}e.onChange(E)},s),r.item=void 0}),n.watchEffect(()=>{o.value.forEach((k,D)=>{k.removeEventListener("mousedown",d),k.addEventListener("mousedown",d),k.setAttribute("data-index",String(D))})})}function sk(t,e){let r;n.onMounted(()=>{r=setInterval(t,e)}),n.onUnmounted(()=>clearInterval(r))}function ck(t,e,r){const o=n.reactive({data:Xl.deepClone(e(t.value)),changed:!1});return n.watch(()=>o.data,i=>{o.changed?r(Xl.deepClone(i)):o.changed=!0},{deep:!0}),n.watch(t,i=>{Object.assign(o,{data:Xl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function dk(t){const e=n.reactive({isLoading:!1,result:void 0,error:void 0,async run(...r){this.isLoading=!0,this.error=void 0;try{this.result=await t(...r)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(r,o=1e3){return mu(()=>{const i=r();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function uk(t,e){function r(d,u){const p=n.unref(t);if(!p)return;const h=`translate(${u.x-d.x}px, ${u.y-d.y}px)`;p.style.setProperty("transform",h),e(u)}function o(d){const u=p=>r(d,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=n.unref(t);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function i(){var d;(d=n.unref(t))==null||d.addEventListener("mousedown",o)}function s(){var d;(d=n.unref(t))==null||d.removeEventListener("mousedown",o)}n.onMounted(i),n.onUnmounted(s)}const pk={class:"ui-slider__wrapper"},gk={class:"ui-slider__label-section"},hk={key:0,class:"text-s"},fk={class:"ui-slider__base"},mk={class:"ui-slider__container"},vk={class:"ui-slider__container ui-slider__container-thumb"},yk=["data-percent"],bk=["data-percent"],wk=["data-percent"],xk={key:0,class:"ui-slider__error"},Ck=n.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(),f=n.computed(()=>i.max-i.min),y=n.computed(()=>i),S=Ns(y),k=n.computed(()=>mt((i.modelValue[0]??0)+s.deltaValue1,i.min,i.max)),D=n.computed(()=>mt((i.modelValue[1]??0)+s.deltaValue2,i.min,i.max)),E=n.computed(()=>mt((i.modelValue[2]??0)+s.deltaValue3,i.min,i.max)),A=n.computed(()=>{const O=i.modelValue;if(!(Array.isArray(O)&&O.length===3&&O.every(ye=>Number.isFinite(ye))))return"Expected model [number, number, number]";const X=[];return[...i.modelValue].forEach(ye=>{ye>i.max&&X.push(`Max model value must be lower than max props ${i.max}.`),ye<i.min&&X.push("Min model value must be greater than max props.")}),X.length>0?X.join(" "):i.error}),w=n.computed(()=>(k.value-i.min)/f.value),L=n.computed(()=>(D.value-i.min)/f.value),R=n.computed(()=>(E.value-i.min)/f.value),H=n.computed(()=>F()),G=n.computed(()=>({right:H.value[0]+"%",left:100-H.value[2]+"%"})),K=n.computed(()=>({right:Math.ceil((1-w.value)*100)+"%"})),U=n.computed(()=>({right:Math.ceil((1-L.value)*100)+"%"})),P=n.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"}));nn(u,O=>{var X;ot((X=n.unref(d))==null?void 0:X.getBoundingClientRect(),ye=>{const{dx:_e}=O;s.deltaValue1=_e/ye.width*f.value,u.value&&W(u.value,i.modelValue[0],s.deltaValue1),O.stop&&(ue([Y(k.value),Y(D.value),Y(E.value)]),s.deltaValue1=0)})}),nn(p,O=>{var X;ot((X=n.unref(d))==null?void 0:X.getBoundingClientRect(),ye=>{const{dx:_e}=O;s.deltaValue2=_e/ye.width*f.value,p.value&&W(p.value,i.modelValue[1],s.deltaValue2),O.stop&&(ue([Y(k.value),Y(D.value),Y(E.value)]),s.deltaValue2=0)})}),nn(h,O=>{var X;ot((X=n.unref(d))==null?void 0:X.getBoundingClientRect(),ye=>{const{dx:_e}=O;s.deltaValue3=_e/ye.width*f.value,h.value&&W(h.value,i.modelValue[2],s.deltaValue3),O.stop&&(ue([Y(k.value),Y(D.value),Y(E.value)]),s.deltaValue3=0)})});function W(O,X,ye){const _e=Y(mt((X??0)+ye,i.min,i.max));O.dataset.percent=`${_e}${i.measure}`,j()}function F(){const O=Math.ceil((1-w.value)*100),X=Math.ceil((1-L.value)*100),ye=Math.ceil((1-R.value)*100);return[O,X,ye].sort((_e,zt)=>_e-zt)}function Y(O){const X=mt(O,i.min,i.max);return Math.round((X+Number.EPSILON)*(1/i.step))/(1/i.step)}function ue(O){o("update:modelValue",O)}function j(){const O=Number(K.value.right.substring(0,K.value.right.length-1)),X=Number(U.value.right.substring(0,U.value.right.length-1)),ye=Number(P.value.right.substring(0,P.value.right.length-1)),_e=[{r:O,th:u},{r:X,th:p},{r:ye,th:h}].sort((zt,Ht)=>zt.r-Ht.r);_e[0].th.value&&(_e[0].th.value.dataset.hint="high"),_e[1].th.value&&(_e[1].th.value.dataset.hint="mid"),_e[2].th.value&&(_e[2].th.value.dataset.hint="low")}function B(O,X){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(O.code)&&O.preventDefault();const ye=O.code==="ArrowUp"||O.code==="ArrowRight"?i.step*1:O.code==="ArrowDown"||O.code==="ArrowLeft"?i.step*-1:0,_e=[...i.modelValue];_e[X]=mt(_e[X]+ye,i.min,i.max),ue(_e),j()}return n.onMounted(()=>{j()}),(O,X)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[n.createElementVNode("div",pk,[n.createElementVNode("div",gk,[O.label?(n.openBlock(),n.createElementBlock("label",hk,[n.createElementVNode("span",null,n.toDisplayString(O.label),1),X[3]||(X[3]=n.createTextVNode()),n.unref(r).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(O.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),X[11]||(X[11]=n.createTextVNode()),n.createElementVNode("div",fk,[n.createElementVNode("div",mk,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(G.value)},null,4)],512)]),X[10]||(X[10]=n.createTextVNode()),n.createElementVNode("div",vk,[i.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(S),(ye,_e)=>(n.openBlock(),n.createElementBlock("div",{key:_e,style:n.normalizeStyle({right:`${ye}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),X[7]||(X[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(K.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:X[0]||(X[0]=ye=>B(ye,0))},X[4]||(X[4]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,yk),X[8]||(X[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(U.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:X[1]||(X[1]=ye=>B(ye,1))},X[5]||(X[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,bk),X[9]||(X[9]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:n.normalizeStyle(P.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:X[2]||(X[2]=ye=>B(ye,2))},X[6]||(X[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,wk)])])]),X[12]||(X[12]=n.createTextVNode()),X[13]||(X[13]=n.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),X[14]||(X[14]=n.createTextVNode()),A.value?(n.openBlock(),n.createElementBlock("div",xk,n.toDisplayString(A.value),1)):n.createCommentVNode("",!0)],2))}}),_k={class:"ui-input-range__separator"},kk=n.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const r=t,o=e,i=n.reactive({left:r.modelValue[0],right:r.modelValue[1]}),s=n.ref(!1),d=n.computed(()=>(s.value,"ui-input-range-focused")),u=n.computed({get(){return{left:Math.min(...r.modelValue),right:Math.max(...r.modelValue)}},set(){}});n.watch(()=>u.value,f=>(i.left=f.left)&&(i.right=f.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(f,y){const S=y.target.value;/^[0-9]{0,2}$/.test(S)?f?i.left=+S:i.right=+S:f?i.left=+S.slice(0,S.length-1):i.right=+S.slice(0,S.length-1)}return(f,y)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({class:[d.value,"ui-input-range"]},f.$attrs),[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=S=>u.value.left=S),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=S=>s.value=!0),onFocusout:y[2]||(y[2]=S=>s.value=!1),onInput:y[3]||(y[3]=S=>h(!0,S))},null,544),[[n.vModelText,u.value.left]]),y[8]||(y[8]=n.createTextVNode()),n.createElementVNode("div",_k,n.toDisplayString(r.separator),1),y[9]||(y[9]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=S=>u.value.right=S),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=S=>s.value=!0),onFocusout:y[6]||(y[6]=S=>s.value=!1),onInput:y[7]||(y[7]=S=>h(!1,S))},null,544),[[n.vModelText,u.value.right]])],16))}}),Sk={class:"ui-slider__wrapper"},Tk={class:"ui-slider__label-section"},Ek={key:0,class:"text-s"},Nk={key:1,class:"ui-slider__value-static text-s"},Ak={class:"ui-slider__base"},Mk={class:"ui-slider__container"},Bk={class:"ui-slider__container ui-slider__container-thumb"},Pk={class:"ui-slider__input-wrapper d-flex"},Dk={key:0,class:"ui-slider__error"},Vk=n.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const r=n.useSlots(),o=e,i=t,s=n.reactive({deltaValue1:0,deltaValue2:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(i.modelValue),f=n.ref(i.modelValue[0]),y=n.ref(i.modelValue[1]),S=n.computed(()=>i),k=Ns(S),D=n.computed(()=>[f.value,y.value].sort((j,B)=>j-B).join("-")),E=n.computed(()=>i.max-i.min),A=n.computed(()=>mt((i.modelValue[0]??0)+s.deltaValue1,i.min,i.max)),w=n.computed(()=>mt((i.modelValue[1]??0)+s.deltaValue2,i.min,i.max)),L=n.computed(()=>{const j=i.modelValue;return Array.isArray(j)&&j.length===2&&j.every(B=>Number.isFinite(B))?i.error:"Expected model [number, number]"}),R=n.computed(()=>(A.value-i.min)/E.value),H=n.computed(()=>(w.value-i.min)/E.value),G=n.computed(()=>W()),K=n.computed(()=>({right:G.value[0]+"%",left:100-G.value[1]+"%"})),U=n.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),P=n.computed(()=>({right:Math.ceil((1-H.value)*100)+"%"}));n.watch(()=>i.modelValue,j=>{h.value=j,f.value=+j[0],y.value=+j[1]},{immediate:!0}),nn(u,j=>{var B;ot((B=n.unref(d))==null?void 0:B.getBoundingClientRect(),O=>{const{dx:X}=j;s.deltaValue1=X/O.width*E.value,f.value=F(mt((i.modelValue[0]??0)+s.deltaValue1,i.min,i.max)),h.value=[f.value,y.value].sort((ye,_e)=>ye-_e),j.stop&&(Y([F(A.value),F(w.value)]),s.deltaValue1=0)})}),nn(p,j=>{var B;ot((B=n.unref(d))==null?void 0:B.getBoundingClientRect(),O=>{const{dx:X}=j;s.deltaValue2=X/O.width*E.value,y.value=F(mt((i.modelValue[1]??0)+s.deltaValue2,i.min,i.max)),h.value=[f.value,y.value].sort((ye,_e)=>ye-_e),j.stop&&(Y([F(A.value),F(w.value)]),s.deltaValue2=0)})});function W(){const j=Math.ceil((1-R.value)*100),B=Math.ceil((1-H.value)*100);return[j,B].sort((O,X)=>O-X)}function F(j){const B=mt(j,i.min,i.max);return Math.round((B+Number.EPSILON)*(1/i.step))/(1/i.step)}function Y(j){o("update:modelValue",j)}function ue(j,B){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(j.code)&&j.preventDefault();const O=j.code==="ArrowUp"||j.code==="ArrowRight"?i.step*1:j.code==="ArrowDown"||j.code==="ArrowLeft"?i.step*-1:0,X=[...i.modelValue];X[B]=mt(X[B]+O,i.min,i.max),Y(X)}return(j,B)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[n.createElementVNode("div",Sk,[n.createElementVNode("div",Tk,[j.label?(n.openBlock(),n.createElementBlock("label",Ek,[n.createElementVNode("span",null,n.toDisplayString(j.label),1),B[3]||(B[3]=n.createTextVNode()),n.unref(r).tooltip?(n.openBlock(),n.createBlock(n.unref(Vt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(j.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),B[4]||(B[4]=n.createTextVNode()),i.mode==="text"?(n.openBlock(),n.createElementBlock("div",Nk,n.toDisplayString(D.value),1)):n.createCommentVNode("",!0)]),B[10]||(B[10]=n.createTextVNode()),n.createElementVNode("div",Ak,[n.createElementVNode("div",Mk,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(K.value)},null,4)],512)]),B[9]||(B[9]=n.createTextVNode()),n.createElementVNode("div",Bk,[i.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(k),(O,X)=>(n.openBlock(),n.createElementBlock("div",{key:X,style:n.normalizeStyle({right:`${O}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),B[7]||(B[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(U.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:B[0]||(B[0]=O=>ue(O,0))},B[5]||(B[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),B[8]||(B[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:B[1]||(B[1]=O=>ue(O,1))},B[6]||(B[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),B[11]||(B[11]=n.createTextVNode()),n.createElementVNode("div",Pk,[i.mode==="input"?(n.openBlock(),n.createBlock(kk,{key:0,modelValue:h.value,"onUpdate:modelValue":B[2]||(B[2]=O=>h.value=O),class:"ui-focused-border",onChange:Y},null,8,["modelValue"])):n.createCommentVNode("",!0)])],2),B[12]||(B[12]=n.createTextVNode()),L.value?(n.openBlock(),n.createElementBlock("div",Dk,n.toDisplayString(L.value),1)):n.createCommentVNode("",!0)],2))}}),Lk=n.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const r=e,o=t,i=n.ref(),s=n.computed(()=>o.clientHeight/(o.scrollHeight||1)),d=n.computed(()=>s.value<1),u=n.computed(()=>{const p=n.unref(s);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return et(i,"pointerdown",p=>{const h={clientY:p.clientY},f=fs(document,"mousemove",y=>{const S=(y.clientY-h.clientY)/s.value;r("update:scrollTop",o.scrollTop+S),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,f,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[n.createElementVNode("div",{class:"v-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),Ik=n.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const r=e,o=t,i=n.ref(),s=n.computed(()=>o.clientWidth/(o.scrollWidth||1)),d=n.computed(()=>s.value<1),u=n.computed(()=>{const p=n.unref(s);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return et(i,"pointerdown",p=>{const h={clientX:p.clientX},f=fs(document,"mousemove",y=>{const S=(y.clientX-h.clientX)/s.value;r("update:scrollLeft",o.scrollLeft+S),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,f,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[n.createElementVNode("div",{class:"h-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),Fk={class:"ui-scrollable"},Rk=n.defineComponent({__name:"Scrollable",setup(t){const e=n.ref(),r=n.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(u){x0(r,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,o(p)};function s(u){ot(n.unref(e),p=>{p.scrollTop=u,o(p)})}function d(u){ot(n.unref(e),p=>{p.scrollLeft=u,o(p)})}return pp(e,u=>{ot(u,p=>o(p))}),n.onMounted(()=>{ot(n.unref(e),u=>{o(u),u.addEventListener("wheel",i)})}),n.onUnmounted(()=>{ot(n.unref(e),u=>u.removeEventListener("wheel",i))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",Fk,[n.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[n.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=n.createTextVNode()),n.createVNode(Lk,{"scroll-top":r.scrollTop,"client-height":r.clientHeight,"scroll-height":r.scrollHeight,onWheel:p[0]||(p[0]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":s},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=n.createTextVNode()),n.createVNode(Ik,{"scroll-left":r.scrollLeft,"client-width":r.clientWidth,"scroll-width":r.scrollWidth,onWheel:p[1]||(p[1]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":d},null,8,["scroll-left","client-width","scroll-width"])]))}}),Ok="add.svg",zk="box.svg",Gk="calendar.svg",jk="checkmark.svg",Uk="clipboard.svg",Zk="close.svg",$k="copy.svg",Wk="download.svg",Hk="duplicate.svg",qk="edit.svg",Kk="error.svg",Yk="filter.svg",Jk="help.svg",Qk="info.svg",Xk="link.svg",eS="loading.svg",tS="lock.svg",rS="maximize.svg",nS="minimize.svg",oS="minus.svg",aS="more.svg",iS="open.svg",lS="pause.svg",sS="play.svg",cS="renew.svg",dS="restart.svg",uS="reverse.svg",pS="settings.svg",gS="sort.svg",hS="stop.svg",fS="success.svg",mS="time.svg",vS="tune.svg",yS="warning.svg",bS="zip.svg",wS={add:Ok,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:zk,calendar:Gk,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:jk,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:Uk,close:Zk,copy:$k,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:Wk,"drag-dots":"drag-dots.svg",duplicate:Hk,edit:qk,error:Kk,export:"export.svg","filter-on":"filter-on.svg",filter:Yk,"help-outline":"help-outline.svg",help:Jk,"info-outline":"info-outline.svg",info:Qk,"jump-link":"jump-link.svg",link:Xk,loading:eS,lock:tS,maximize:rS,minimize:nS,minus:oS,more:aS,open:iS,"paper-clip":"paper-clip.svg",pause:lS,play:sS,renew:cS,restart:dS,reverse:uS,settings:pS,sort:gS,stop:hS,success:fS,time:mS,tune:vS,warning:yS,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:bS},xS="add.svg",CS="annotate.svg",_S="annotation.svg",kS="area.svg",SS="axes.svg",TS="bar.svg",ES="bindot.svg",NS="box.svg",AS="boxplot.svg",MS="bubble.svg",BS="calendar.svg",PS="canvas.svg",DS="checkbox.svg",VS="checkmark.svg",LS="clipboard.svg",IS="close.svg",FS="cluster.svg",RS="code.svg",OS="color.svg",zS="columns.svg",GS="container.svg",jS="cookie.svg",US="copy.svg",ZS="cpu.svg",$S="debug.svg",WS="dna.svg",HS="download.svg",qS="duplicate.svg",KS="edit.svg",YS="error.svg",JS="filter.svg",QS="generate.svg",XS="graph.svg",eT="heatmap.svg",tT="help.svg",rT="info.svg",nT="jitter.svg",oT="lasso.svg",aT="layers.svg",iT="learn.svg",lT="legend.svg",sT="line.svg",cT="link.svg",dT="loading.svg",uT="lock.svg",pT="maximize.svg",gT="menu.svg",hT="minimize.svg",fT="minus.svg",mT="more.svg",vT="pause.svg",yT="pin.svg",bT="play.svg",wT="product.svg",xT="publications.svg",CT="renew.svg",_T="restart.svg",kT="reverse.svg",ST="search.svg",TT="server.svg",ET="settings.svg",NT="sina.svg",AT="skatterplot.svg",MT="slice.svg",BT="sort.svg",PT="statistics.svg",DT="stop.svg",VT="success.svg",LT="table.svg",IT="template.svg",FT="terminal.svg",RT="time.svg",OT="tune.svg",zT="venn.svg",GT="violin.svg",jT="warning.svg",UT="wetlab.svg",ZT="zip.svg",$T={"add-layer":"add-layer.svg",add:xS,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:CS,annotation:_S,area:kS,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:SS,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:TS,bindot:ES,box:NS,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:AS,bubble:MS,calendar:BS,canvas:PS,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:DS,checkmark:VS,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:LS,close:IS,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:FS,code:RS,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:OS,columns:zS,"connected-points":"connected-points.svg",container:GS,cookie:jS,copy:US,cpu:ZS,"data-dimentions":"data-dimentions.svg",debug:$S,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg",dna:WS,download:HS,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:qS,edit:KS,"error-bar":"error-bar.svg",error:YS,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","files-export":"files-export.svg","files-import":"files-import.svg","filter-on":"filter-on.svg",filter:JS,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:QS,graph:XS,heatmap:eT,"help-outline":"help-outline.svg",help:tT,"info-outline":"info-outline.svg",info:rT,jitter:nT,"jump-link":"jump-link.svg",lasso:oT,layers:aT,learn:iT,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:lT,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:sT,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:cT,loading:dT,lock:uT,maximize:pT,menu:gT,minimize:hT,minus:fT,more:mT,"paper-clip":"paper-clip.svg",pause:vT,pin:yT,play:bT,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:wT,publications:xT,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:CT,restart:_T,reverse:kT,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:ST,"server-on":"server-on.svg",server:TT,settings:ET,sina:NT,skatterplot:AT,slice:MT,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:BT,statistics:PT,stop:DT,"strip-plot":"strip-plot.svg",success:VT,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:LT,template:IT,terminal:FT,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:RT,tune:OT,venn:zT,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:GT,warning:jT,wetlab:UT,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:ZT,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function WT(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const HT=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],qT=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","files-export","files-import","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],KT={allCssVariables:WT(),icons16:wS,icons24:$T},YT={class:"block__not-found"},JT=n.defineComponent({__name:"NotFound",setup(t){const r=Jl().useApp(),o=()=>{r.updateNavigationState(i=>{i.href="/"})};return(i,s)=>(n.openBlock(),n.createElementBlock("div",YT,[n.createElementVNode("h1",null,"Not found route: "+n.toDisplayString(n.unref(r).snapshot.navigationState.href),1),n.createVNode(n.unref(ds),{onClick:n.withModifiers(o,["stop"])},{default:n.withCtx(()=>s[0]||(s[0]=[n.createTextVNode("Return to main page")])),_:1})]))}}),As=(t,e)=>{const r=t.__vccOpts||t;for(const[o,i]of e)r[o]=i;return r},QT={},XT={class:"block__loader-page"};function eE(t,e){return n.openBlock(),n.createElementBlock("div",XT,e[0]||(e[0]=[n.createElementVNode("div",{class:"loader-container"},[n.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const tE=As(QT,[["render",eE]]),rE={class:"pl-app-notification-alert"},nE={class:"pl-app-notification-alert__content"},oE={class:"pl-app-notification-alert__title"},aE={class:"pl-app-notification-alert__error-description"},iE=n.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,r=n.ref(!1),o=n.ref(!0),i=n.computed(()=>Object.entries(e.errors).filter(u=>!!u[1]));function s(){r.value=!0}function d(u){navigator.clipboard&&navigator.clipboard.writeText(JSON.stringify(u))}return n.watch(()=>e.errors,u=>{o.value=Object.values(u).some(p=>!!p)},{immediate:!0,deep:!0}),(u,p)=>(n.openBlock(),n.createElementBlock("div",rE,[n.createVNode(n.unref(xs),{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=h=>r.value=h),width:"50%",style:{"max-height":"100vh"}},{title:n.withCtx(()=>p[2]||(p[2]=[n.createTextVNode(" Errors ")])),default:n.withCtx(()=>[n.createElementVNode("div",nE,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,h=>{var f;return n.openBlock(),n.createElementBlock("div",{key:h[0],class:"pl-app-notification-alert__item"},[n.createElementVNode("div",oE,n.toDisplayString(h[0]),1),n.createElementVNode("div",aE,[n.createElementVNode("code",null,n.toDisplayString((f=h[1])==null?void 0:f.message),1),n.createVNode(n.unref(up),{class:"pl-app-notification-alert__copy-icon",onCopyData:y=>d(h[1])},null,8,["onCopyData"])])])}),128))])]),_:1},8,["modelValue"]),n.createVNode(n.unref(dp),{modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=h=>o.value=h),type:"error",closable:""},{actions:n.withCtx(()=>[n.createVNode(n.unref(cs),{icon:"arrow-right",onClick:s},{default:n.withCtx(()=>p[3]||(p[3]=[n.createTextVNode("See errors")])),_:1}),n.createVNode(n.unref(Vu))]),default:n.withCtx(()=>[p[4]||(p[4]=n.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),lE={class:"block block__layout"},sE={key:0},cE=n.defineComponent({__name:"BlockLayout",setup(t){const e=Jl(),r=p=>{try{return new URL(p,"http://dummy").pathname}catch{console.error("Invalid href",p);return}},o=n.computed(()=>e.loaded?e.useApp().href:void 0),i=n.computed(()=>{if(e.loaded){const p=e.useApp(),h=r(p.snapshot.navigationState.href);return h?p.getRoute(h):void 0}}),s=n.computed(()=>e.loaded?e.useApp():void 0),d=n.computed(()=>s.value?s.value.model.outputErrors:{}),u=n.computed(()=>{var p;return((p=s.value)==null?void 0:p.showErrorsNotification)??!0});return(p,h)=>(n.openBlock(),n.createElementBlock("div",lE,[n.unref(e).error?(n.openBlock(),n.createElementBlock("div",sE,n.toDisplayString(n.unref(e).error),1)):n.unref(e).loaded?i.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.value),{key:o.value})):(n.openBlock(),n.createBlock(JT,{key:3})):(n.openBlock(),n.createBlock(tE,{key:1},{default:n.withCtx(()=>h[0]||(h[0]=[n.createTextVNode("Loading...")])),_:1})),n.unref(e).loaded&&u.value?(n.openBlock(),n.createBlock(n.unref(iE),{key:4,errors:d.value},null,8,["errors"])):n.createCommentVNode("",!0)]))}});var Si={exports:{}};/**
63
+ )`}function l(){const u=t.value;if(!u)return;const h=[i(u),s(u)].filter(f=>f!==null);u.style.setProperty("-webkit-mask-image",h.join(",")),u.style.setProperty("mask-image",h.join(",")),h.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const d=Qa(l);r.onMounted(l),et(window,"scroll",d,!0),et(window,"resize",d,!0)}function Wu(t,e){mu(()=>{it(r.unref(t),n=>{gu(n,()=>e(n))})}),r.onUnmounted(()=>{it(r.unref(t),n=>{yu(n)})})}const ur={item:"sortable__item",animate:"sortable__animate"},Co=t=>t.getBoundingClientRect().y,Hu=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},nk=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function rk(t,e){const n={item:void 0,options(){var k;return[...((k=t.value)==null?void 0:k.children)??[]]}},i=r.computed(()=>n.options()),s=e.shakeBuffer??10,l=e.reorderDelay??100;function d(k){const D=e.handle?this.querySelector(e.handle):null;D&&!D.contains(k.target)||(this.classList.remove(ur.animate),this.classList.add(ur.item),n.item={el:this,y:k.y,dy:0,orderChanged:!1})}function u(k){const D=n.options();return D.slice(0,D.indexOf(k))}function h(k){const D=n.options();return D.slice(D.indexOf(k)+1)}function f(k,D){const T=n.options().filter(C=>C!==D),B=T.indexOf(k);return T.splice(B,0,D),T}function m(k,D){const T=n.options().filter(C=>C!==D),B=T.indexOf(k);return T.splice(B+1,0,D),T}function v(k,D){k.dy=D-k.y,k.el.style.setProperty("transform",`translateY(${k.dy}px)`)}function S(k){var D;if(!n.item)return;const{el:T}=n.item;if(!T.isConnected){n.item=void 0;return}const B=k.map(K=>Co(K)),C=Co(T);(D=t.value)==null||D.replaceChildren(...k);const R=Co(T),L=k.map(K=>Co(K)),j=[];for(let K=0;K<L.length;K++){const $=k[K];if($===n.item.el)continue;const N=L[K],H=B[K]-N;$.style.transform=`translateY(${H}px)`,j.push($)}const z=R-C;n.item.y=n.item.y+z,n.item.dy=n.item.dy-z,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),j.forEach(K=>K.classList.remove(ur.animate)),requestAnimationFrame(function(){j.forEach(K=>{K.classList.add(ur.animate),K.style.transform="",K.addEventListener("transitionend",()=>{K.classList.remove(ur.animate)})})})}et(window,"mousemove",k=>{if(!n.item)return;const{el:D}=n.item;v(n.item,k.y);const T=Co(n.item.el),B=nk(n.item.el),C=u(D),R=h(D);C.forEach(L=>{const j=Hu(L);T+s<j&&S(f(L,D))}),R.forEach(L=>{const j=Hu(L);B-s>j&&S(m(L,D))})}),et(window,"mouseup",()=>{if(!n.item)return;const{el:k,orderChanged:D}=n.item;k.classList.add(ur.animate),k.style.removeProperty("transform"),k.addEventListener("transitionend",()=>{k.classList.remove(ur.animate,ur.item)}),setTimeout(()=>{if(!D)return;const T=n.options().map(C=>Number(C.getAttribute("data-index"))),B=t.value;if(B){for(const C of n.options())B.removeChild(C);i.value.forEach(C=>{B.appendChild(C)})}e.onChange(T)},l),n.item=void 0}),r.watchEffect(()=>{i.value.forEach((k,D)=>{k.removeEventListener("mousedown",d),k.addEventListener("mousedown",d),k.setAttribute("data-index",String(D))})})}function ik(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function ok(t,e,n){const i=r.reactive({data:ja.deepClone(e(t.value)),changed:!1});return r.watch(()=>i.data,s=>{i.changed?n(ja.deepClone(s)):i.changed=!0},{deep:!0}),r.watch(t,s=>{Object.assign(i,{data:ja.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),i}function sk(t){const e=r.reactive({isLoading:!1,result:void 0,error:void 0,async run(...n){this.isLoading=!0,this.error=void 0;try{this.result=await t(...n)}catch(i){this.error=i}finally{this.isLoading=!1}},debounce(n,i=1e3){return Kd(()=>{const s=n();this.run(...s).catch(console.error)},i)}});return e.run=e.run.bind(e),e}function ak(t,e){function n(d,u){const h=r.unref(t);if(!h)return;const f=`translate(${u.x-d.x}px, ${u.y-d.y}px)`;h.style.setProperty("transform",f),e(u)}function i(d){const u=h=>n(d,h);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const h=r.unref(t);document.removeEventListener("mousemove",u),h&&(h.style.setProperty("transition","all .3s ease-in-out"),h.style.removeProperty("transform"),h.addEventListener("transitionend",()=>{h.style.removeProperty("transition")}))},{once:!0})}function s(){var d;(d=r.unref(t))==null||d.addEventListener("mousedown",i)}function l(){var d;(d=r.unref(t))==null||d.removeEventListener("mousedown",i)}r.onMounted(s),r.onUnmounted(l)}const lk={class:"ui-slider__wrapper"},ck={class:"ui-slider__label-section"},dk={key:0,class:"text-s"},uk={class:"ui-slider__base"},hk={class:"ui-slider__container"},pk={class:"ui-slider__container ui-slider__container-thumb"},fk=["data-percent"],mk=["data-percent"],gk=["data-percent"],yk={key:0,class:"ui-slider__error"},vk=r.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),d=r.ref(),u=r.ref(),h=r.ref(),f=r.ref(),m=r.computed(()=>s.max-s.min),v=r.computed(()=>s),S=bl(v),k=r.computed(()=>gt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),D=r.computed(()=>gt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),T=r.computed(()=>gt((s.modelValue[2]??0)+l.deltaValue3,s.min,s.max)),B=r.computed(()=>{const O=s.modelValue;if(!(Array.isArray(O)&&O.length===3&&O.every(ve=>Number.isFinite(ve))))return"Expected model [number, number, number]";const Q=[];return[...s.modelValue].forEach(ve=>{ve>s.max&&Q.push(`Max model value must be lower than max props ${s.max}.`),ve<s.min&&Q.push("Min model value must be greater than max props.")}),Q.length>0?Q.join(" "):s.error}),C=r.computed(()=>(k.value-s.min)/m.value),R=r.computed(()=>(D.value-s.min)/m.value),L=r.computed(()=>(T.value-s.min)/m.value),j=r.computed(()=>I()),z=r.computed(()=>({right:j.value[0]+"%",left:100-j.value[2]+"%"})),K=r.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"})),$=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),N=r.computed(()=>({right:Math.ceil((1-L.value)*100)+"%"}));rr(u,O=>{var Q;it((Q=r.unref(d))==null?void 0:Q.getBoundingClientRect(),ve=>{const{dx:xe}=O;l.deltaValue1=xe/ve.width*m.value,u.value&&H(u.value,s.modelValue[0],l.deltaValue1),O.stop&&(ue([Y(k.value),Y(D.value),Y(T.value)]),l.deltaValue1=0)})}),rr(h,O=>{var Q;it((Q=r.unref(d))==null?void 0:Q.getBoundingClientRect(),ve=>{const{dx:xe}=O;l.deltaValue2=xe/ve.width*m.value,h.value&&H(h.value,s.modelValue[1],l.deltaValue2),O.stop&&(ue([Y(k.value),Y(D.value),Y(T.value)]),l.deltaValue2=0)})}),rr(f,O=>{var Q;it((Q=r.unref(d))==null?void 0:Q.getBoundingClientRect(),ve=>{const{dx:xe}=O;l.deltaValue3=xe/ve.width*m.value,f.value&&H(f.value,s.modelValue[2],l.deltaValue3),O.stop&&(ue([Y(k.value),Y(D.value),Y(T.value)]),l.deltaValue3=0)})});function H(O,Q,ve){const xe=Y(gt((Q??0)+ve,s.min,s.max));O.dataset.percent=`${xe}${s.measure}`,Z()}function I(){const O=Math.ceil((1-C.value)*100),Q=Math.ceil((1-R.value)*100),ve=Math.ceil((1-L.value)*100);return[O,Q,ve].sort((xe,Gt)=>xe-Gt)}function Y(O){const Q=gt(O,s.min,s.max);return Math.round((Q+Number.EPSILON)*(1/s.step))/(1/s.step)}function ue(O){i("update:modelValue",O)}function Z(){const O=Number(K.value.right.substring(0,K.value.right.length-1)),Q=Number($.value.right.substring(0,$.value.right.length-1)),ve=Number(N.value.right.substring(0,N.value.right.length-1)),xe=[{r:O,th:u},{r:Q,th:h},{r:ve,th:f}].sort((Gt,jt)=>Gt.r-jt.r);xe[0].th.value&&(xe[0].th.value.dataset.hint="high"),xe[1].th.value&&(xe[1].th.value.dataset.hint="mid"),xe[2].th.value&&(xe[2].th.value.dataset.hint="low")}function V(O,Q){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(O.code)&&O.preventDefault();const ve=O.code==="ArrowUp"||O.code==="ArrowRight"?s.step*1:O.code==="ArrowDown"||O.code==="ArrowLeft"?s.step*-1:0,xe=[...s.modelValue];xe[Q]=gt(xe[Q]+ve,s.min,s.max),ue(xe),Z()}return r.onMounted(()=>{Z()}),(O,Q)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",lk,[r.createElementVNode("div",ck,[O.label?(r.openBlock(),r.createElementBlock("label",dk,[r.createElementVNode("span",null,r.toDisplayString(O.label),1),Q[3]||(Q[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(O.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),Q[11]||(Q[11]=r.createTextVNode()),r.createElementVNode("div",uk,[r.createElementVNode("div",hk,[r.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(z.value)},null,4)],512)]),Q[10]||(Q[10]=r.createTextVNode()),r.createElementVNode("div",pk,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(S),(ve,xe)=>(r.openBlock(),r.createElementBlock("div",{key:xe,style:r.normalizeStyle({right:`${ve}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),Q[7]||(Q[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(K.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:Q[0]||(Q[0]=ve=>V(ve,0))},Q[4]||(Q[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,fk),Q[8]||(Q[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:h,style:r.normalizeStyle($.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:Q[1]||(Q[1]=ve=>V(ve,1))},Q[5]||(Q[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,mk),Q[9]||(Q[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:r.normalizeStyle(N.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:Q[2]||(Q[2]=ve=>V(ve,2))},Q[6]||(Q[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,gk)])])]),Q[12]||(Q[12]=r.createTextVNode()),Q[13]||(Q[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),Q[14]||(Q[14]=r.createTextVNode()),B.value?(r.openBlock(),r.createElementBlock("div",yk,r.toDisplayString(B.value),1)):r.createCommentVNode("",!0)],2))}}),_k={class:"ui-input-range__separator"},Ck=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,i=e,s=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),d=r.computed(()=>(l.value,"ui-input-range-focused")),u=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>u.value,m=>(s.left=m.left)&&(s.right=m.right));function h(){i("update:modelValue",[+s.left,+s.right]),i("change",[+s.left,+s.right])}function f(m,v){const S=v.target.value;/^[0-9]{0,2}$/.test(S)?m?s.left=+S:s.right=+S:m?s.left=+S.slice(0,S.length-1):s.right=+S.slice(0,S.length-1)}return(m,v)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[d.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":v[0]||(v[0]=S=>u.value.left=S),class:"text-s",type:"text",onChange:h,onFocus:v[1]||(v[1]=S=>l.value=!0),onFocusout:v[2]||(v[2]=S=>l.value=!1),onInput:v[3]||(v[3]=S=>f(!0,S))},null,544),[[r.vModelText,u.value.left]]),v[8]||(v[8]=r.createTextVNode()),r.createElementVNode("div",_k,r.toDisplayString(n.separator),1),v[9]||(v[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":v[4]||(v[4]=S=>u.value.right=S),class:"text-s",type:"text",onChange:h,onFocus:v[5]||(v[5]=S=>l.value=!0),onFocusout:v[6]||(v[6]=S=>l.value=!1),onInput:v[7]||(v[7]=S=>f(!1,S))},null,544),[[r.vModelText,u.value.right]])],16))}}),wk={class:"ui-slider__wrapper"},bk={class:"ui-slider__label-section"},xk={key:0,class:"text-s"},kk={key:1,class:"ui-slider__value-static text-s"},Sk={class:"ui-slider__base"},Ek={class:"ui-slider__container"},Tk={class:"ui-slider__container ui-slider__container-thumb"},Ak={class:"ui-slider__input-wrapper d-flex"},Bk={key:0,class:"ui-slider__error"},Pk=r.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),i=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),d=r.ref(),u=r.ref(),h=r.ref(),f=r.ref(s.modelValue),m=r.ref(s.modelValue[0]),v=r.ref(s.modelValue[1]),S=r.computed(()=>s),k=bl(S),D=r.computed(()=>[m.value,v.value].sort((Z,V)=>Z-V).join("-")),T=r.computed(()=>s.max-s.min),B=r.computed(()=>gt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),C=r.computed(()=>gt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),R=r.computed(()=>{const Z=s.modelValue;return Array.isArray(Z)&&Z.length===2&&Z.every(V=>Number.isFinite(V))?s.error:"Expected model [number, number]"}),L=r.computed(()=>(B.value-s.min)/T.value),j=r.computed(()=>(C.value-s.min)/T.value),z=r.computed(()=>H()),K=r.computed(()=>({right:z.value[0]+"%",left:100-z.value[1]+"%"})),$=r.computed(()=>({right:Math.ceil((1-L.value)*100)+"%"})),N=r.computed(()=>({right:Math.ceil((1-j.value)*100)+"%"}));r.watch(()=>s.modelValue,Z=>{f.value=Z,m.value=+Z[0],v.value=+Z[1]},{immediate:!0}),rr(u,Z=>{var V;it((V=r.unref(d))==null?void 0:V.getBoundingClientRect(),O=>{const{dx:Q}=Z;l.deltaValue1=Q/O.width*T.value,m.value=I(gt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),f.value=[m.value,v.value].sort((ve,xe)=>ve-xe),Z.stop&&(Y([I(B.value),I(C.value)]),l.deltaValue1=0)})}),rr(h,Z=>{var V;it((V=r.unref(d))==null?void 0:V.getBoundingClientRect(),O=>{const{dx:Q}=Z;l.deltaValue2=Q/O.width*T.value,v.value=I(gt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),f.value=[m.value,v.value].sort((ve,xe)=>ve-xe),Z.stop&&(Y([I(B.value),I(C.value)]),l.deltaValue2=0)})});function H(){const Z=Math.ceil((1-L.value)*100),V=Math.ceil((1-j.value)*100);return[Z,V].sort((O,Q)=>O-Q)}function I(Z){const V=gt(Z,s.min,s.max);return Math.round((V+Number.EPSILON)*(1/s.step))/(1/s.step)}function Y(Z){i("update:modelValue",Z)}function ue(Z,V){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(Z.code)&&Z.preventDefault();const O=Z.code==="ArrowUp"||Z.code==="ArrowRight"?s.step*1:Z.code==="ArrowDown"||Z.code==="ArrowLeft"?s.step*-1:0,Q=[...s.modelValue];Q[V]=gt(Q[V]+O,s.min,s.max),Y(Q)}return(Z,V)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",wk,[r.createElementVNode("div",bk,[Z.label?(r.openBlock(),r.createElementBlock("label",xk,[r.createElementVNode("span",null,r.toDisplayString(Z.label),1),V[3]||(V[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ft),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(Z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),V[4]||(V[4]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",kk,r.toDisplayString(D.value),1)):r.createCommentVNode("",!0)]),V[10]||(V[10]=r.createTextVNode()),r.createElementVNode("div",Sk,[r.createElementVNode("div",Ek,[r.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(K.value)},null,4)],512)]),V[9]||(V[9]=r.createTextVNode()),r.createElementVNode("div",Tk,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(k),(O,Q)=>(r.openBlock(),r.createElementBlock("div",{key:Q,style:r.normalizeStyle({right:`${O}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),V[7]||(V[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle($.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:V[0]||(V[0]=O=>ue(O,0))},V[5]||(V[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),V[8]||(V[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:h,style:r.normalizeStyle(N.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:V[1]||(V[1]=O=>ue(O,1))},V[6]||(V[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),V[11]||(V[11]=r.createTextVNode()),r.createElementVNode("div",Ak,[s.mode==="input"?(r.openBlock(),r.createBlock(Ck,{key:0,modelValue:f.value,"onUpdate:modelValue":V[2]||(V[2]=O=>f.value=O),class:"ui-focused-border",onChange:Y},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),V[12]||(V[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",Bk,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),Vk=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,i=t,s=r.ref(),l=r.computed(()=>i.clientHeight/(i.scrollHeight||1)),d=r.computed(()=>l.value<1),u=r.computed(()=>{const h=r.unref(l);return{top:i.scrollTop*h+"px",height:Math.floor(i.clientHeight*h)+"px"}});return et(s,"pointerdown",h=>{const f={clientY:h.clientY},m=cl(document,"mousemove",v=>{const S=(v.clientY-f.clientY)/l.value;n("update:scrollTop",i.scrollTop+S),f.clientY=v.clientY});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,m,{once:!0})})}),(h,f)=>d.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),Nk=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,i=t,s=r.ref(),l=r.computed(()=>i.clientWidth/(i.scrollWidth||1)),d=r.computed(()=>l.value<1),u=r.computed(()=>{const h=r.unref(l);return{left:i.scrollLeft*h+"px",width:Math.floor(i.clientWidth*h)+"px"}});return et(s,"pointerdown",h=>{const f={clientX:h.clientX},m=cl(document,"mousemove",v=>{const S=(v.clientX-f.clientX)/l.value;n("update:scrollLeft",i.scrollLeft+S),f.clientX=v.clientX});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,m,{once:!0})})}),(h,f)=>d.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),Dk={class:"ui-scrollable"},Fk=r.defineComponent({__name:"Scrollable",setup(t){const e=r.ref(),n=r.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function i(u){yC(n,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const h=u.currentTarget;h.scrollTop+=u.deltaY,h.scrollLeft+=u.deltaX,i(h)};function l(u){it(r.unref(e),h=>{h.scrollTop=u,i(h)})}function d(u){it(r.unref(e),h=>{h.scrollLeft=u,i(h)})}return Wu(e,u=>{it(u,h=>i(h))}),r.onMounted(()=>{it(r.unref(e),u=>{i(u),u.addEventListener("wheel",s)})}),r.onUnmounted(()=>{it(r.unref(e),u=>u.removeEventListener("wheel",s))}),(u,h)=>(r.openBlock(),r.createElementBlock("div",Dk,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[r.renderSlot(u.$slots,"default")],544),h[2]||(h[2]=r.createTextVNode()),r.createVNode(Vk,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:h[0]||(h[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),h[3]||(h[3]=r.createTextVNode()),r.createVNode(Nk,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:h[1]||(h[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":d},null,8,["scroll-left","client-width","scroll-width"])]))}}),Rk="add.svg",Mk="box.svg",Ik="calendar.svg",Lk="checkmark.svg",Ok="clipboard.svg",Gk="close.svg",zk="copy.svg",Zk="download.svg",$k="duplicate.svg",Uk="edit.svg",Wk="error.svg",Hk="filter.svg",jk="help.svg",qk="info.svg",Kk="link.svg",Yk="loading.svg",Jk="lock.svg",Xk="maximize.svg",Qk="minimize.svg",eS="minus.svg",tS="more.svg",nS="open.svg",rS="pause.svg",iS="play.svg",oS="renew.svg",sS="restart.svg",aS="reverse.svg",lS="settings.svg",cS="sort.svg",dS="stop.svg",uS="success.svg",hS="time.svg",pS="tune.svg",fS="warning.svg",mS="zip.svg",gS={add:Rk,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:Mk,calendar:Ik,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:Lk,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:Ok,close:Gk,copy:zk,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:Zk,"drag-dots":"drag-dots.svg",duplicate:$k,edit:Uk,error:Wk,export:"export.svg","filter-on":"filter-on.svg",filter:Hk,"help-outline":"help-outline.svg",help:jk,"info-outline":"info-outline.svg",info:qk,"jump-link":"jump-link.svg",link:Kk,loading:Yk,lock:Jk,maximize:Xk,minimize:Qk,minus:eS,more:tS,open:nS,"paper-clip":"paper-clip.svg",pause:rS,play:iS,renew:oS,restart:sS,reverse:aS,settings:lS,sort:cS,stop:dS,success:uS,time:hS,tune:pS,warning:fS,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:mS},yS="add.svg",vS="annotate.svg",_S="annotation.svg",CS="area.svg",wS="axes.svg",bS="bar.svg",xS="bindot.svg",kS="box.svg",SS="boxplot.svg",ES="bubble.svg",TS="calendar.svg",AS="canvas.svg",BS="checkbox.svg",PS="checkmark.svg",VS="clipboard.svg",NS="close.svg",DS="cluster.svg",FS="code.svg",RS="color.svg",MS="columns.svg",IS="container.svg",LS="cookie.svg",OS="copy.svg",GS="cpu.svg",zS="debug.svg",ZS="dna.svg",$S="download.svg",US="duplicate.svg",WS="edit.svg",HS="error.svg",jS="filter.svg",qS="generate.svg",KS="graph.svg",YS="heatmap.svg",JS="help.svg",XS="info.svg",QS="jitter.svg",e1="lasso.svg",t1="layers.svg",n1="learn.svg",r1="legend.svg",i1="line.svg",o1="link.svg",s1="loading.svg",a1="lock.svg",l1="maximize.svg",c1="menu.svg",d1="minimize.svg",u1="minus.svg",h1="more.svg",p1="pause.svg",f1="pin.svg",m1="play.svg",g1="product.svg",y1="publications.svg",v1="renew.svg",_1="restart.svg",C1="reverse.svg",w1="search.svg",b1="server.svg",x1="settings.svg",k1="sina.svg",S1="skatterplot.svg",E1="slice.svg",T1="sort.svg",A1="statistics.svg",B1="stop.svg",P1="success.svg",V1="table.svg",N1="template.svg",D1="terminal.svg",F1="time.svg",R1="tune.svg",M1="venn.svg",I1="violin.svg",L1="warning.svg",O1="wetlab.svg",G1="zip.svg",z1={"add-layer":"add-layer.svg",add:yS,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:vS,annotation:_S,area:CS,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:wS,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:bS,bindot:xS,box:kS,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:SS,bubble:ES,calendar:TS,canvas:AS,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:BS,checkmark:PS,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:VS,close:NS,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:DS,code:FS,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:RS,columns:MS,"connected-points":"connected-points.svg",container:IS,cookie:LS,copy:OS,cpu:GS,"data-dimentions":"data-dimentions.svg",debug:zS,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg",dna:ZS,download:$S,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:US,edit:WS,"error-bar":"error-bar.svg",error:HS,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","files-export":"files-export.svg","files-import":"files-import.svg","filter-on":"filter-on.svg",filter:jS,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:qS,graph:KS,heatmap:YS,"help-outline":"help-outline.svg",help:JS,"info-outline":"info-outline.svg",info:XS,jitter:QS,"jump-link":"jump-link.svg",lasso:e1,layers:t1,learn:n1,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:r1,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:i1,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:o1,loading:s1,lock:a1,maximize:l1,menu:c1,minimize:d1,minus:u1,more:h1,"paper-clip":"paper-clip.svg",pause:p1,pin:f1,play:m1,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:g1,publications:y1,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:v1,restart:_1,reverse:C1,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:w1,"server-on":"server-on.svg",server:b1,settings:x1,sina:k1,skatterplot:S1,slice:E1,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:T1,statistics:A1,stop:B1,"strip-plot":"strip-plot.svg",success:P1,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:V1,template:N1,terminal:D1,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:F1,tune:R1,venn:M1,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:I1,warning:L1,wetlab:O1,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:G1,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function Z1(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const $1=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],U1=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","files-export","files-import","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],W1={allCssVariables:Z1(),icons16:gS,icons24:z1},H1={class:"block__not-found"},j1=r.defineComponent({__name:"NotFound",setup(t){const n=Wa().useApp(),i=()=>{n.updateNavigationState(s=>{s.href="/"})};return(s,l)=>(r.openBlock(),r.createElementBlock("div",H1,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(il),{onClick:r.withModifiers(i,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),xl=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},q1={},K1={class:"block__loader-page"};function Y1(t,e){return r.openBlock(),r.createElementBlock("div",K1,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const J1=xl(q1,[["render",Y1]]),X1={class:"pl-app-notification-alert"},Q1={class:"pl-app-notification-alert__content"},eE={class:"pl-app-notification-alert__title"},tE={class:"pl-app-notification-alert__error-description"},nE=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),i=r.ref(!0),s=r.computed(()=>Object.entries(e.errors).filter(u=>!!u[1]));function l(){n.value=!0}function d(u){navigator.clipboard&&navigator.clipboard.writeText(JSON.stringify(u))}return r.watch(()=>e.errors,u=>{i.value=Object.values(u).some(h=>!!h)},{immediate:!0,deep:!0}),(u,h)=>(r.openBlock(),r.createElementBlock("div",X1,[r.createVNode(r.unref(ml),{modelValue:n.value,"onUpdate:modelValue":h[0]||(h[0]=f=>n.value=f),width:"50%",style:{"max-height":"100vh"}},{title:r.withCtx(()=>h[2]||(h[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",Q1,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,f=>{var m;return r.openBlock(),r.createElementBlock("div",{key:f[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",eE,r.toDisplayString(f[0]),1),r.createElementVNode("div",tE,[r.createElementVNode("code",null,r.toDisplayString((m=f[1])==null?void 0:m.message),1),r.createVNode(r.unref(Uu),{class:"pl-app-notification-alert__copy-icon",onCopyData:v=>d(f[1])},null,8,["onCopyData"])])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref($u),{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=f=>i.value=f),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(rl),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>h[3]||(h[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(pu))]),default:r.withCtx(()=>[h[4]||(h[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),rE={class:"block block__layout"},iE={key:0},oE=r.defineComponent({__name:"BlockLayout",setup(t){const e=Wa(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},i=r.computed(()=>e.loaded?e.useApp().href:void 0),s=r.computed(()=>{if(e.loaded){const h=e.useApp(),f=n(h.snapshot.navigationState.href);return f?h.getRoute(f):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),d=r.computed(()=>l.value?l.value.model.outputErrors:{}),u=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0});return(h,f)=>(r.openBlock(),r.createElementBlock("div",rE,[r.unref(e).error?(r.openBlock(),r.createElementBlock("div",iE,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(s.value),{key:i.value})):(r.openBlock(),r.createBlock(j1,{key:3})):(r.openBlock(),r.createBlock(J1,{key:1},{default:r.withCtx(()=>f[0]||(f[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&u.value?(r.openBlock(),r.createBlock(r.unref(nE),{key:4,errors:d.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var ws={exports:{}};/**
78
64
  * @license
79
65
  * Lodash <https://lodash.com/>
80
66
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
81
67
  * Released under MIT license <https://lodash.com/license>
82
68
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
83
69
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
84
- */Si.exports,function(t,e){(function(){var r,o="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",u="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",y=1,S=2,k=4,D=1,E=2,A=1,w=2,L=4,R=8,H=16,G=32,K=64,U=128,P=256,W=512,F=30,Y="...",ue=800,j=16,B=1,O=2,X=3,ye=1/0,_e=9007199254740991,zt=17976931348623157e292,Ht=NaN,Nt=4294967295,Ta=Nt-1,On=Nt>>>1,Ea=[["ary",U],["bind",A],["bindKey",w],["curry",R],["curryRight",H],["flip",W],["partial",G],["partialRight",K],["rearg",P]],fo="[object Arguments]",Ai="[object Array]",jE="[object AsyncFunction]",Na="[object Boolean]",Aa="[object Date]",UE="[object DOMException]",Mi="[object Error]",Bi="[object Function]",Np="[object GeneratorFunction]",mr="[object Map]",Ma="[object Number]",ZE="[object Null]",Rr="[object Object]",Ap="[object Promise]",$E="[object Proxy]",Ba="[object RegExp]",vr="[object Set]",Pa="[object String]",Pi="[object Symbol]",WE="[object Undefined]",Da="[object WeakMap]",HE="[object WeakSet]",Va="[object ArrayBuffer]",mo="[object DataView]",Ls="[object Float32Array]",Is="[object Float64Array]",Fs="[object Int8Array]",Rs="[object Int16Array]",Os="[object Int32Array]",zs="[object Uint8Array]",Gs="[object Uint8ClampedArray]",js="[object Uint16Array]",Us="[object Uint32Array]",qE=/\b__p \+= '';/g,KE=/\b(__p \+=) '' \+/g,YE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mp=/&(?:amp|lt|gt|quot|#39);/g,Bp=/[&<>"']/g,JE=RegExp(Mp.source),QE=RegExp(Bp.source),XE=/<%-([\s\S]+?)%>/g,eN=/<%([\s\S]+?)%>/g,Pp=/<%=([\s\S]+?)%>/g,tN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rN=/^\w*$/,nN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zs=/[\\^$.*+?()[\]{}|]/g,oN=RegExp(Zs.source),$s=/^\s+/,aN=/\s/,iN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lN=/\{\n\/\* \[wrapped with (.+)\] \*/,sN=/,? & /,cN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dN=/[()=,{}\[\]\/\s]/,uN=/\\(\\)?/g,pN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dp=/\w*$/,gN=/^[-+]0x[0-9a-f]+$/i,hN=/^0b[01]+$/i,fN=/^\[object .+?Constructor\]$/,mN=/^0o[0-7]+$/i,vN=/^(?:0|[1-9]\d*)$/,yN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Di=/($^)/,bN=/['\n\r\u2028\u2029\\]/g,Vi="\\ud800-\\udfff",wN="\\u0300-\\u036f",xN="\\ufe20-\\ufe2f",CN="\\u20d0-\\u20ff",Vp=wN+xN+CN,Lp="\\u2700-\\u27bf",Ip="a-z\\xdf-\\xf6\\xf8-\\xff",_N="\\xac\\xb1\\xd7\\xf7",kN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SN="\\u2000-\\u206f",TN=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fp="A-Z\\xc0-\\xd6\\xd8-\\xde",Rp="\\ufe0e\\ufe0f",Op=_N+kN+SN+TN,Ws="['’]",EN="["+Vi+"]",zp="["+Op+"]",Li="["+Vp+"]",Gp="\\d+",NN="["+Lp+"]",jp="["+Ip+"]",Up="[^"+Vi+Op+Gp+Lp+Ip+Fp+"]",Hs="\\ud83c[\\udffb-\\udfff]",AN="(?:"+Li+"|"+Hs+")",Zp="[^"+Vi+"]",qs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ks="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+Fp+"]",$p="\\u200d",Wp="(?:"+jp+"|"+Up+")",MN="(?:"+vo+"|"+Up+")",Hp="(?:"+Ws+"(?:d|ll|m|re|s|t|ve))?",qp="(?:"+Ws+"(?:D|LL|M|RE|S|T|VE))?",Kp=AN+"?",Yp="["+Rp+"]?",BN="(?:"+$p+"(?:"+[Zp,qs,Ks].join("|")+")"+Yp+Kp+")*",PN="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",DN="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jp=Yp+Kp+BN,VN="(?:"+[NN,qs,Ks].join("|")+")"+Jp,LN="(?:"+[Zp+Li+"?",Li,qs,Ks,EN].join("|")+")",IN=RegExp(Ws,"g"),FN=RegExp(Li,"g"),Ys=RegExp(Hs+"(?="+Hs+")|"+LN+Jp,"g"),RN=RegExp([vo+"?"+jp+"+"+Hp+"(?="+[zp,vo,"$"].join("|")+")",MN+"+"+qp+"(?="+[zp,vo+Wp,"$"].join("|")+")",vo+"?"+Wp+"+"+Hp,vo+"+"+qp,DN,PN,Gp,VN].join("|"),"g"),ON=RegExp("["+$p+Vi+Vp+Rp+"]"),zN=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,GN=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jN=-1,We={};We[Ls]=We[Is]=We[Fs]=We[Rs]=We[Os]=We[zs]=We[Gs]=We[js]=We[Us]=!0,We[fo]=We[Ai]=We[Va]=We[Na]=We[mo]=We[Aa]=We[Mi]=We[Bi]=We[mr]=We[Ma]=We[Rr]=We[Ba]=We[vr]=We[Pa]=We[Da]=!1;var Ze={};Ze[fo]=Ze[Ai]=Ze[Va]=Ze[mo]=Ze[Na]=Ze[Aa]=Ze[Ls]=Ze[Is]=Ze[Fs]=Ze[Rs]=Ze[Os]=Ze[mr]=Ze[Ma]=Ze[Rr]=Ze[Ba]=Ze[vr]=Ze[Pa]=Ze[Pi]=Ze[zs]=Ze[Gs]=Ze[js]=Ze[Us]=!0,Ze[Mi]=Ze[Bi]=Ze[Da]=!1;var UN={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ZN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$N={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},WN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},HN=parseFloat,qN=parseInt,Qp=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo,KN=typeof self=="object"&&self&&self.Object===Object&&self,pt=Qp||KN||Function("return this")(),Js=e&&!e.nodeType&&e,zn=Js&&!0&&t&&!t.nodeType&&t,Xp=zn&&zn.exports===Js,Qs=Xp&&Qp.process,qt=function(){try{var N=zn&&zn.require&&zn.require("util").types;return N||Qs&&Qs.binding&&Qs.binding("util")}catch{}}(),eg=qt&&qt.isArrayBuffer,tg=qt&&qt.isDate,rg=qt&&qt.isMap,ng=qt&&qt.isRegExp,og=qt&&qt.isSet,ag=qt&&qt.isTypedArray;function Gt(N,z,I){switch(I.length){case 0:return N.call(z);case 1:return N.call(z,I[0]);case 2:return N.call(z,I[0],I[1]);case 3:return N.call(z,I[0],I[1],I[2])}return N.apply(z,I)}function YN(N,z,I,ie){for(var Ce=-1,Oe=N==null?0:N.length;++Ce<Oe;){var it=N[Ce];z(ie,it,I(it),N)}return ie}function Kt(N,z){for(var I=-1,ie=N==null?0:N.length;++I<ie&&z(N[I],I,N)!==!1;);return N}function JN(N,z){for(var I=N==null?0:N.length;I--&&z(N[I],I,N)!==!1;);return N}function ig(N,z){for(var I=-1,ie=N==null?0:N.length;++I<ie;)if(!z(N[I],I,N))return!1;return!0}function fn(N,z){for(var I=-1,ie=N==null?0:N.length,Ce=0,Oe=[];++I<ie;){var it=N[I];z(it,I,N)&&(Oe[Ce++]=it)}return Oe}function Ii(N,z){var I=N==null?0:N.length;return!!I&&yo(N,z,0)>-1}function Xs(N,z,I){for(var ie=-1,Ce=N==null?0:N.length;++ie<Ce;)if(I(z,N[ie]))return!0;return!1}function qe(N,z){for(var I=-1,ie=N==null?0:N.length,Ce=Array(ie);++I<ie;)Ce[I]=z(N[I],I,N);return Ce}function mn(N,z){for(var I=-1,ie=z.length,Ce=N.length;++I<ie;)N[Ce+I]=z[I];return N}function ec(N,z,I,ie){var Ce=-1,Oe=N==null?0:N.length;for(ie&&Oe&&(I=N[++Ce]);++Ce<Oe;)I=z(I,N[Ce],Ce,N);return I}function QN(N,z,I,ie){var Ce=N==null?0:N.length;for(ie&&Ce&&(I=N[--Ce]);Ce--;)I=z(I,N[Ce],Ce,N);return I}function tc(N,z){for(var I=-1,ie=N==null?0:N.length;++I<ie;)if(z(N[I],I,N))return!0;return!1}var XN=rc("length");function eA(N){return N.split("")}function tA(N){return N.match(cN)||[]}function lg(N,z,I){var ie;return I(N,function(Ce,Oe,it){if(z(Ce,Oe,it))return ie=Oe,!1}),ie}function Fi(N,z,I,ie){for(var Ce=N.length,Oe=I+(ie?1:-1);ie?Oe--:++Oe<Ce;)if(z(N[Oe],Oe,N))return Oe;return-1}function yo(N,z,I){return z===z?gA(N,z,I):Fi(N,sg,I)}function rA(N,z,I,ie){for(var Ce=I-1,Oe=N.length;++Ce<Oe;)if(ie(N[Ce],z))return Ce;return-1}function sg(N){return N!==N}function cg(N,z){var I=N==null?0:N.length;return I?oc(N,z)/I:Ht}function rc(N){return function(z){return z==null?r:z[N]}}function nc(N){return function(z){return N==null?r:N[z]}}function dg(N,z,I,ie,Ce){return Ce(N,function(Oe,it,Ue){I=ie?(ie=!1,Oe):z(I,Oe,it,Ue)}),I}function nA(N,z){var I=N.length;for(N.sort(z);I--;)N[I]=N[I].value;return N}function oc(N,z){for(var I,ie=-1,Ce=N.length;++ie<Ce;){var Oe=z(N[ie]);Oe!==r&&(I=I===r?Oe:I+Oe)}return I}function ac(N,z){for(var I=-1,ie=Array(N);++I<N;)ie[I]=z(I);return ie}function oA(N,z){return qe(z,function(I){return[I,N[I]]})}function ug(N){return N&&N.slice(0,fg(N)+1).replace($s,"")}function jt(N){return function(z){return N(z)}}function ic(N,z){return qe(z,function(I){return N[I]})}function La(N,z){return N.has(z)}function pg(N,z){for(var I=-1,ie=N.length;++I<ie&&yo(z,N[I],0)>-1;);return I}function gg(N,z){for(var I=N.length;I--&&yo(z,N[I],0)>-1;);return I}function aA(N,z){for(var I=N.length,ie=0;I--;)N[I]===z&&++ie;return ie}var iA=nc(UN),lA=nc(ZN);function sA(N){return"\\"+WN[N]}function cA(N,z){return N==null?r:N[z]}function bo(N){return ON.test(N)}function dA(N){return zN.test(N)}function uA(N){for(var z,I=[];!(z=N.next()).done;)I.push(z.value);return I}function lc(N){var z=-1,I=Array(N.size);return N.forEach(function(ie,Ce){I[++z]=[Ce,ie]}),I}function hg(N,z){return function(I){return N(z(I))}}function vn(N,z){for(var I=-1,ie=N.length,Ce=0,Oe=[];++I<ie;){var it=N[I];(it===z||it===f)&&(N[I]=f,Oe[Ce++]=I)}return Oe}function Ri(N){var z=-1,I=Array(N.size);return N.forEach(function(ie){I[++z]=ie}),I}function pA(N){var z=-1,I=Array(N.size);return N.forEach(function(ie){I[++z]=[ie,ie]}),I}function gA(N,z,I){for(var ie=I-1,Ce=N.length;++ie<Ce;)if(N[ie]===z)return ie;return-1}function hA(N,z,I){for(var ie=I+1;ie--;)if(N[ie]===z)return ie;return ie}function wo(N){return bo(N)?mA(N):XN(N)}function yr(N){return bo(N)?vA(N):eA(N)}function fg(N){for(var z=N.length;z--&&aN.test(N.charAt(z)););return z}var fA=nc($N);function mA(N){for(var z=Ys.lastIndex=0;Ys.test(N);)++z;return z}function vA(N){return N.match(Ys)||[]}function yA(N){return N.match(RN)||[]}var bA=function N(z){z=z==null?pt:xo.defaults(pt.Object(),z,xo.pick(pt,GN));var I=z.Array,ie=z.Date,Ce=z.Error,Oe=z.Function,it=z.Math,Ue=z.Object,sc=z.RegExp,wA=z.String,Yt=z.TypeError,Oi=I.prototype,xA=Oe.prototype,Co=Ue.prototype,zi=z["__core-js_shared__"],Gi=xA.toString,je=Co.hasOwnProperty,CA=0,mg=function(){var a=/[^.]+$/.exec(zi&&zi.keys&&zi.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),ji=Co.toString,_A=Gi.call(Ue),kA=pt._,SA=sc("^"+Gi.call(je).replace(Zs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ui=Xp?z.Buffer:r,yn=z.Symbol,Zi=z.Uint8Array,vg=Ui?Ui.allocUnsafe:r,$i=hg(Ue.getPrototypeOf,Ue),yg=Ue.create,bg=Co.propertyIsEnumerable,Wi=Oi.splice,wg=yn?yn.isConcatSpreadable:r,Ia=yn?yn.iterator:r,Gn=yn?yn.toStringTag:r,Hi=function(){try{var a=Wn(Ue,"defineProperty");return a({},"",{}),a}catch{}}(),TA=z.clearTimeout!==pt.clearTimeout&&z.clearTimeout,EA=ie&&ie.now!==pt.Date.now&&ie.now,NA=z.setTimeout!==pt.setTimeout&&z.setTimeout,qi=it.ceil,Ki=it.floor,cc=Ue.getOwnPropertySymbols,AA=Ui?Ui.isBuffer:r,xg=z.isFinite,MA=Oi.join,BA=hg(Ue.keys,Ue),lt=it.max,yt=it.min,PA=ie.now,DA=z.parseInt,Cg=it.random,VA=Oi.reverse,dc=Wn(z,"DataView"),Fa=Wn(z,"Map"),uc=Wn(z,"Promise"),_o=Wn(z,"Set"),Ra=Wn(z,"WeakMap"),Oa=Wn(Ue,"create"),Yi=Ra&&new Ra,ko={},LA=Hn(dc),IA=Hn(Fa),FA=Hn(uc),RA=Hn(_o),OA=Hn(Ra),Ji=yn?yn.prototype:r,za=Ji?Ji.valueOf:r,_g=Ji?Ji.toString:r;function v(a){if(Xe(a)&&!ke(a)&&!(a instanceof De)){if(a instanceof Jt)return a;if(je.call(a,"__wrapped__"))return kh(a)}return new Jt(a)}var So=function(){function a(){}return function(l){if(!Je(l))return{};if(yg)return yg(l);a.prototype=l;var c=new a;return a.prototype=r,c}}();function Qi(){}function Jt(a,l){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}v.templateSettings={escape:XE,evaluate:eN,interpolate:Pp,variable:"",imports:{_:v}},v.prototype=Qi.prototype,v.prototype.constructor=v,Jt.prototype=So(Qi.prototype),Jt.prototype.constructor=Jt;function De(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nt,this.__views__=[]}function zA(){var a=new De(this.__wrapped__);return a.__actions__=At(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=At(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=At(this.__views__),a}function GA(){if(this.__filtered__){var a=new De(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function jA(){var a=this.__wrapped__.value(),l=this.__dir__,c=ke(a),g=l<0,m=c?a.length:0,b=eB(0,m,this.__views__),_=b.start,T=b.end,M=T-_,Z=g?T:_-1,$=this.__iteratees__,q=$.length,te=0,se=yt(M,this.__takeCount__);if(!c||!g&&m==M&&se==M)return Hg(a,this.__actions__);var he=[];e:for(;M--&&te<se;){Z+=l;for(var Me=-1,fe=a[Z];++Me<q;){var Pe=$[Me],Ve=Pe.iteratee,$t=Pe.type,Tt=Ve(fe);if($t==O)fe=Tt;else if(!Tt){if($t==B)continue e;break e}}he[te++]=fe}return he}De.prototype=So(Qi.prototype),De.prototype.constructor=De;function jn(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var g=a[l];this.set(g[0],g[1])}}function UA(){this.__data__=Oa?Oa(null):{},this.size=0}function ZA(a){var l=this.has(a)&&delete this.__data__[a];return this.size-=l?1:0,l}function $A(a){var l=this.__data__;if(Oa){var c=l[a];return c===p?r:c}return je.call(l,a)?l[a]:r}function WA(a){var l=this.__data__;return Oa?l[a]!==r:je.call(l,a)}function HA(a,l){var c=this.__data__;return this.size+=this.has(a)?0:1,c[a]=Oa&&l===r?p:l,this}jn.prototype.clear=UA,jn.prototype.delete=ZA,jn.prototype.get=$A,jn.prototype.has=WA,jn.prototype.set=HA;function Or(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var g=a[l];this.set(g[0],g[1])}}function qA(){this.__data__=[],this.size=0}function KA(a){var l=this.__data__,c=Xi(l,a);if(c<0)return!1;var g=l.length-1;return c==g?l.pop():Wi.call(l,c,1),--this.size,!0}function YA(a){var l=this.__data__,c=Xi(l,a);return c<0?r:l[c][1]}function JA(a){return Xi(this.__data__,a)>-1}function QA(a,l){var c=this.__data__,g=Xi(c,a);return g<0?(++this.size,c.push([a,l])):c[g][1]=l,this}Or.prototype.clear=qA,Or.prototype.delete=KA,Or.prototype.get=YA,Or.prototype.has=JA,Or.prototype.set=QA;function zr(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var g=a[l];this.set(g[0],g[1])}}function XA(){this.size=0,this.__data__={hash:new jn,map:new(Fa||Or),string:new jn}}function eM(a){var l=ul(this,a).delete(a);return this.size-=l?1:0,l}function tM(a){return ul(this,a).get(a)}function rM(a){return ul(this,a).has(a)}function nM(a,l){var c=ul(this,a),g=c.size;return c.set(a,l),this.size+=c.size==g?0:1,this}zr.prototype.clear=XA,zr.prototype.delete=eM,zr.prototype.get=tM,zr.prototype.has=rM,zr.prototype.set=nM;function Un(a){var l=-1,c=a==null?0:a.length;for(this.__data__=new zr;++l<c;)this.add(a[l])}function oM(a){return this.__data__.set(a,p),this}function aM(a){return this.__data__.has(a)}Un.prototype.add=Un.prototype.push=oM,Un.prototype.has=aM;function br(a){var l=this.__data__=new Or(a);this.size=l.size}function iM(){this.__data__=new Or,this.size=0}function lM(a){var l=this.__data__,c=l.delete(a);return this.size=l.size,c}function sM(a){return this.__data__.get(a)}function cM(a){return this.__data__.has(a)}function dM(a,l){var c=this.__data__;if(c instanceof Or){var g=c.__data__;if(!Fa||g.length<i-1)return g.push([a,l]),this.size=++c.size,this;c=this.__data__=new zr(g)}return c.set(a,l),this.size=c.size,this}br.prototype.clear=iM,br.prototype.delete=lM,br.prototype.get=sM,br.prototype.has=cM,br.prototype.set=dM;function kg(a,l){var c=ke(a),g=!c&&qn(a),m=!c&&!g&&_n(a),b=!c&&!g&&!m&&Ao(a),_=c||g||m||b,T=_?ac(a.length,wA):[],M=T.length;for(var Z in a)(l||je.call(a,Z))&&!(_&&(Z=="length"||m&&(Z=="offset"||Z=="parent")||b&&(Z=="buffer"||Z=="byteLength"||Z=="byteOffset")||Zr(Z,M)))&&T.push(Z);return T}function Sg(a){var l=a.length;return l?a[Cc(0,l-1)]:r}function uM(a,l){return pl(At(a),Zn(l,0,a.length))}function pM(a){return pl(At(a))}function pc(a,l,c){(c!==r&&!wr(a[l],c)||c===r&&!(l in a))&&Gr(a,l,c)}function Ga(a,l,c){var g=a[l];(!(je.call(a,l)&&wr(g,c))||c===r&&!(l in a))&&Gr(a,l,c)}function Xi(a,l){for(var c=a.length;c--;)if(wr(a[c][0],l))return c;return-1}function gM(a,l,c,g){return bn(a,function(m,b,_){l(g,m,c(m),_)}),g}function Tg(a,l){return a&&Ar(l,ut(l),a)}function hM(a,l){return a&&Ar(l,Bt(l),a)}function Gr(a,l,c){l=="__proto__"&&Hi?Hi(a,l,{configurable:!0,enumerable:!0,value:c,writable:!0}):a[l]=c}function gc(a,l){for(var c=-1,g=l.length,m=I(g),b=a==null;++c<g;)m[c]=b?r:Hc(a,l[c]);return m}function Zn(a,l,c){return a===a&&(c!==r&&(a=a<=c?a:c),l!==r&&(a=a>=l?a:l)),a}function Qt(a,l,c,g,m,b){var _,T=l&y,M=l&S,Z=l&k;if(c&&(_=m?c(a,g,m,b):c(a)),_!==r)return _;if(!Je(a))return a;var $=ke(a);if($){if(_=rB(a),!T)return At(a,_)}else{var q=bt(a),te=q==Bi||q==Np;if(_n(a))return Yg(a,T);if(q==Rr||q==fo||te&&!m){if(_=M||te?{}:fh(a),!T)return M?$M(a,hM(_,a)):ZM(a,Tg(_,a))}else{if(!Ze[q])return m?a:{};_=nB(a,q,T)}}b||(b=new br);var se=b.get(a);if(se)return se;b.set(a,_),Zh(a)?a.forEach(function(fe){_.add(Qt(fe,l,c,fe,a,b))}):jh(a)&&a.forEach(function(fe,Pe){_.set(Pe,Qt(fe,l,c,Pe,a,b))});var he=Z?M?Dc:Pc:M?Bt:ut,Me=$?r:he(a);return Kt(Me||a,function(fe,Pe){Me&&(Pe=fe,fe=a[Pe]),Ga(_,Pe,Qt(fe,l,c,Pe,a,b))}),_}function fM(a){var l=ut(a);return function(c){return Eg(c,a,l)}}function Eg(a,l,c){var g=c.length;if(a==null)return!g;for(a=Ue(a);g--;){var m=c[g],b=l[m],_=a[m];if(_===r&&!(m in a)||!b(_))return!1}return!0}function Ng(a,l,c){if(typeof a!="function")throw new Yt(d);return qa(function(){a.apply(r,c)},l)}function ja(a,l,c,g){var m=-1,b=Ii,_=!0,T=a.length,M=[],Z=l.length;if(!T)return M;c&&(l=qe(l,jt(c))),g?(b=Xs,_=!1):l.length>=i&&(b=La,_=!1,l=new Un(l));e:for(;++m<T;){var $=a[m],q=c==null?$:c($);if($=g||$!==0?$:0,_&&q===q){for(var te=Z;te--;)if(l[te]===q)continue e;M.push($)}else b(l,q,g)||M.push($)}return M}var bn=th(Nr),Ag=th(fc,!0);function mM(a,l){var c=!0;return bn(a,function(g,m,b){return c=!!l(g,m,b),c}),c}function el(a,l,c){for(var g=-1,m=a.length;++g<m;){var b=a[g],_=l(b);if(_!=null&&(T===r?_===_&&!Zt(_):c(_,T)))var T=_,M=b}return M}function vM(a,l,c,g){var m=a.length;for(c=Ee(c),c<0&&(c=-c>m?0:m+c),g=g===r||g>m?m:Ee(g),g<0&&(g+=m),g=c>g?0:Wh(g);c<g;)a[c++]=l;return a}function Mg(a,l){var c=[];return bn(a,function(g,m,b){l(g,m,b)&&c.push(g)}),c}function gt(a,l,c,g,m){var b=-1,_=a.length;for(c||(c=aB),m||(m=[]);++b<_;){var T=a[b];l>0&&c(T)?l>1?gt(T,l-1,c,g,m):mn(m,T):g||(m[m.length]=T)}return m}var hc=rh(),Bg=rh(!0);function Nr(a,l){return a&&hc(a,l,ut)}function fc(a,l){return a&&Bg(a,l,ut)}function tl(a,l){return fn(l,function(c){return $r(a[c])})}function $n(a,l){l=xn(l,a);for(var c=0,g=l.length;a!=null&&c<g;)a=a[Mr(l[c++])];return c&&c==g?a:r}function Pg(a,l,c){var g=l(a);return ke(a)?g:mn(g,c(a))}function kt(a){return a==null?a===r?WE:ZE:Gn&&Gn in Ue(a)?XM(a):pB(a)}function mc(a,l){return a>l}function yM(a,l){return a!=null&&je.call(a,l)}function bM(a,l){return a!=null&&l in Ue(a)}function wM(a,l,c){return a>=yt(l,c)&&a<lt(l,c)}function vc(a,l,c){for(var g=c?Xs:Ii,m=a[0].length,b=a.length,_=b,T=I(b),M=1/0,Z=[];_--;){var $=a[_];_&&l&&($=qe($,jt(l))),M=yt($.length,M),T[_]=!c&&(l||m>=120&&$.length>=120)?new Un(_&&$):r}$=a[0];var q=-1,te=T[0];e:for(;++q<m&&Z.length<M;){var se=$[q],he=l?l(se):se;if(se=c||se!==0?se:0,!(te?La(te,he):g(Z,he,c))){for(_=b;--_;){var Me=T[_];if(!(Me?La(Me,he):g(a[_],he,c)))continue e}te&&te.push(he),Z.push(se)}}return Z}function xM(a,l,c,g){return Nr(a,function(m,b,_){l(g,c(m),b,_)}),g}function Ua(a,l,c){l=xn(l,a),a=bh(a,l);var g=a==null?a:a[Mr(er(l))];return g==null?r:Gt(g,a,c)}function Dg(a){return Xe(a)&&kt(a)==fo}function CM(a){return Xe(a)&&kt(a)==Va}function _M(a){return Xe(a)&&kt(a)==Aa}function Za(a,l,c,g,m){return a===l?!0:a==null||l==null||!Xe(a)&&!Xe(l)?a!==a&&l!==l:kM(a,l,c,g,Za,m)}function kM(a,l,c,g,m,b){var _=ke(a),T=ke(l),M=_?Ai:bt(a),Z=T?Ai:bt(l);M=M==fo?Rr:M,Z=Z==fo?Rr:Z;var $=M==Rr,q=Z==Rr,te=M==Z;if(te&&_n(a)){if(!_n(l))return!1;_=!0,$=!1}if(te&&!$)return b||(b=new br),_||Ao(a)?ph(a,l,c,g,m,b):JM(a,l,M,c,g,m,b);if(!(c&D)){var se=$&&je.call(a,"__wrapped__"),he=q&&je.call(l,"__wrapped__");if(se||he){var Me=se?a.value():a,fe=he?l.value():l;return b||(b=new br),m(Me,fe,c,g,b)}}return te?(b||(b=new br),QM(a,l,c,g,m,b)):!1}function SM(a){return Xe(a)&&bt(a)==mr}function yc(a,l,c,g){var m=c.length,b=m,_=!g;if(a==null)return!b;for(a=Ue(a);m--;){var T=c[m];if(_&&T[2]?T[1]!==a[T[0]]:!(T[0]in a))return!1}for(;++m<b;){T=c[m];var M=T[0],Z=a[M],$=T[1];if(_&&T[2]){if(Z===r&&!(M in a))return!1}else{var q=new br;if(g)var te=g(Z,$,M,a,l,q);if(!(te===r?Za($,Z,D|E,g,q):te))return!1}}return!0}function Vg(a){if(!Je(a)||lB(a))return!1;var l=$r(a)?SA:fN;return l.test(Hn(a))}function TM(a){return Xe(a)&&kt(a)==Ba}function EM(a){return Xe(a)&&bt(a)==vr}function NM(a){return Xe(a)&&yl(a.length)&&!!We[kt(a)]}function Lg(a){return typeof a=="function"?a:a==null?Pt:typeof a=="object"?ke(a)?Rg(a[0],a[1]):Fg(a):nf(a)}function bc(a){if(!Ha(a))return BA(a);var l=[];for(var c in Ue(a))je.call(a,c)&&c!="constructor"&&l.push(c);return l}function AM(a){if(!Je(a))return uB(a);var l=Ha(a),c=[];for(var g in a)g=="constructor"&&(l||!je.call(a,g))||c.push(g);return c}function wc(a,l){return a<l}function Ig(a,l){var c=-1,g=Mt(a)?I(a.length):[];return bn(a,function(m,b,_){g[++c]=l(m,b,_)}),g}function Fg(a){var l=Lc(a);return l.length==1&&l[0][2]?vh(l[0][0],l[0][1]):function(c){return c===a||yc(c,a,l)}}function Rg(a,l){return Fc(a)&&mh(l)?vh(Mr(a),l):function(c){var g=Hc(c,a);return g===r&&g===l?qc(c,a):Za(l,g,D|E)}}function rl(a,l,c,g,m){a!==l&&hc(l,function(b,_){if(m||(m=new br),Je(b))MM(a,l,_,c,rl,g,m);else{var T=g?g(Oc(a,_),b,_+"",a,l,m):r;T===r&&(T=b),pc(a,_,T)}},Bt)}function MM(a,l,c,g,m,b,_){var T=Oc(a,c),M=Oc(l,c),Z=_.get(M);if(Z){pc(a,c,Z);return}var $=b?b(T,M,c+"",a,l,_):r,q=$===r;if(q){var te=ke(M),se=!te&&_n(M),he=!te&&!se&&Ao(M);$=M,te||se||he?ke(T)?$=T:tt(T)?$=At(T):se?(q=!1,$=Yg(M,!0)):he?(q=!1,$=Jg(M,!0)):$=[]:Ka(M)||qn(M)?($=T,qn(T)?$=Hh(T):(!Je(T)||$r(T))&&($=fh(M))):q=!1}q&&(_.set(M,$),m($,M,g,b,_),_.delete(M)),pc(a,c,$)}function Og(a,l){var c=a.length;if(c)return l+=l<0?c:0,Zr(l,c)?a[l]:r}function zg(a,l,c){l.length?l=qe(l,function(b){return ke(b)?function(_){return $n(_,b.length===1?b[0]:b)}:b}):l=[Pt];var g=-1;l=qe(l,jt(pe()));var m=Ig(a,function(b,_,T){var M=qe(l,function(Z){return Z(b)});return{criteria:M,index:++g,value:b}});return nA(m,function(b,_){return UM(b,_,c)})}function BM(a,l){return Gg(a,l,function(c,g){return qc(a,g)})}function Gg(a,l,c){for(var g=-1,m=l.length,b={};++g<m;){var _=l[g],T=$n(a,_);c(T,_)&&$a(b,xn(_,a),T)}return b}function PM(a){return function(l){return $n(l,a)}}function xc(a,l,c,g){var m=g?rA:yo,b=-1,_=l.length,T=a;for(a===l&&(l=At(l)),c&&(T=qe(a,jt(c)));++b<_;)for(var M=0,Z=l[b],$=c?c(Z):Z;(M=m(T,$,M,g))>-1;)T!==a&&Wi.call(T,M,1),Wi.call(a,M,1);return a}function jg(a,l){for(var c=a?l.length:0,g=c-1;c--;){var m=l[c];if(c==g||m!==b){var b=m;Zr(m)?Wi.call(a,m,1):Sc(a,m)}}return a}function Cc(a,l){return a+Ki(Cg()*(l-a+1))}function DM(a,l,c,g){for(var m=-1,b=lt(qi((l-a)/(c||1)),0),_=I(b);b--;)_[g?b:++m]=a,a+=c;return _}function _c(a,l){var c="";if(!a||l<1||l>_e)return c;do l%2&&(c+=a),l=Ki(l/2),l&&(a+=a);while(l);return c}function Be(a,l){return zc(yh(a,l,Pt),a+"")}function VM(a){return Sg(Mo(a))}function LM(a,l){var c=Mo(a);return pl(c,Zn(l,0,c.length))}function $a(a,l,c,g){if(!Je(a))return a;l=xn(l,a);for(var m=-1,b=l.length,_=b-1,T=a;T!=null&&++m<b;){var M=Mr(l[m]),Z=c;if(M==="__proto__"||M==="constructor"||M==="prototype")return a;if(m!=_){var $=T[M];Z=g?g($,M,T):r,Z===r&&(Z=Je($)?$:Zr(l[m+1])?[]:{})}Ga(T,M,Z),T=T[M]}return a}var Ug=Yi?function(a,l){return Yi.set(a,l),a}:Pt,IM=Hi?function(a,l){return Hi(a,"toString",{configurable:!0,enumerable:!1,value:Yc(l),writable:!0})}:Pt;function FM(a){return pl(Mo(a))}function Xt(a,l,c){var g=-1,m=a.length;l<0&&(l=-l>m?0:m+l),c=c>m?m:c,c<0&&(c+=m),m=l>c?0:c-l>>>0,l>>>=0;for(var b=I(m);++g<m;)b[g]=a[g+l];return b}function RM(a,l){var c;return bn(a,function(g,m,b){return c=l(g,m,b),!c}),!!c}function nl(a,l,c){var g=0,m=a==null?g:a.length;if(typeof l=="number"&&l===l&&m<=On){for(;g<m;){var b=g+m>>>1,_=a[b];_!==null&&!Zt(_)&&(c?_<=l:_<l)?g=b+1:m=b}return m}return kc(a,l,Pt,c)}function kc(a,l,c,g){var m=0,b=a==null?0:a.length;if(b===0)return 0;l=c(l);for(var _=l!==l,T=l===null,M=Zt(l),Z=l===r;m<b;){var $=Ki((m+b)/2),q=c(a[$]),te=q!==r,se=q===null,he=q===q,Me=Zt(q);if(_)var fe=g||he;else Z?fe=he&&(g||te):T?fe=he&&te&&(g||!se):M?fe=he&&te&&!se&&(g||!Me):se||Me?fe=!1:fe=g?q<=l:q<l;fe?m=$+1:b=$}return yt(b,Ta)}function Zg(a,l){for(var c=-1,g=a.length,m=0,b=[];++c<g;){var _=a[c],T=l?l(_):_;if(!c||!wr(T,M)){var M=T;b[m++]=_===0?0:_}}return b}function $g(a){return typeof a=="number"?a:Zt(a)?Ht:+a}function Ut(a){if(typeof a=="string")return a;if(ke(a))return qe(a,Ut)+"";if(Zt(a))return _g?_g.call(a):"";var l=a+"";return l=="0"&&1/a==-ye?"-0":l}function wn(a,l,c){var g=-1,m=Ii,b=a.length,_=!0,T=[],M=T;if(c)_=!1,m=Xs;else if(b>=i){var Z=l?null:KM(a);if(Z)return Ri(Z);_=!1,m=La,M=new Un}else M=l?[]:T;e:for(;++g<b;){var $=a[g],q=l?l($):$;if($=c||$!==0?$:0,_&&q===q){for(var te=M.length;te--;)if(M[te]===q)continue e;l&&M.push(q),T.push($)}else m(M,q,c)||(M!==T&&M.push(q),T.push($))}return T}function Sc(a,l){return l=xn(l,a),a=bh(a,l),a==null||delete a[Mr(er(l))]}function Wg(a,l,c,g){return $a(a,l,c($n(a,l)),g)}function ol(a,l,c,g){for(var m=a.length,b=g?m:-1;(g?b--:++b<m)&&l(a[b],b,a););return c?Xt(a,g?0:b,g?b+1:m):Xt(a,g?b+1:0,g?m:b)}function Hg(a,l){var c=a;return c instanceof De&&(c=c.value()),ec(l,function(g,m){return m.func.apply(m.thisArg,mn([g],m.args))},c)}function Tc(a,l,c){var g=a.length;if(g<2)return g?wn(a[0]):[];for(var m=-1,b=I(g);++m<g;)for(var _=a[m],T=-1;++T<g;)T!=m&&(b[m]=ja(b[m]||_,a[T],l,c));return wn(gt(b,1),l,c)}function qg(a,l,c){for(var g=-1,m=a.length,b=l.length,_={};++g<m;){var T=g<b?l[g]:r;c(_,a[g],T)}return _}function Ec(a){return tt(a)?a:[]}function Nc(a){return typeof a=="function"?a:Pt}function xn(a,l){return ke(a)?a:Fc(a,l)?[a]:_h(Ge(a))}var OM=Be;function Cn(a,l,c){var g=a.length;return c=c===r?g:c,!l&&c>=g?a:Xt(a,l,c)}var Kg=TA||function(a){return pt.clearTimeout(a)};function Yg(a,l){if(l)return a.slice();var c=a.length,g=vg?vg(c):new a.constructor(c);return a.copy(g),g}function Ac(a){var l=new a.constructor(a.byteLength);return new Zi(l).set(new Zi(a)),l}function zM(a,l){var c=l?Ac(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function GM(a){var l=new a.constructor(a.source,Dp.exec(a));return l.lastIndex=a.lastIndex,l}function jM(a){return za?Ue(za.call(a)):{}}function Jg(a,l){var c=l?Ac(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Qg(a,l){if(a!==l){var c=a!==r,g=a===null,m=a===a,b=Zt(a),_=l!==r,T=l===null,M=l===l,Z=Zt(l);if(!T&&!Z&&!b&&a>l||b&&_&&M&&!T&&!Z||g&&_&&M||!c&&M||!m)return 1;if(!g&&!b&&!Z&&a<l||Z&&c&&m&&!g&&!b||T&&c&&m||!_&&m||!M)return-1}return 0}function UM(a,l,c){for(var g=-1,m=a.criteria,b=l.criteria,_=m.length,T=c.length;++g<_;){var M=Qg(m[g],b[g]);if(M){if(g>=T)return M;var Z=c[g];return M*(Z=="desc"?-1:1)}}return a.index-l.index}function Xg(a,l,c,g){for(var m=-1,b=a.length,_=c.length,T=-1,M=l.length,Z=lt(b-_,0),$=I(M+Z),q=!g;++T<M;)$[T]=l[T];for(;++m<_;)(q||m<b)&&($[c[m]]=a[m]);for(;Z--;)$[T++]=a[m++];return $}function eh(a,l,c,g){for(var m=-1,b=a.length,_=-1,T=c.length,M=-1,Z=l.length,$=lt(b-T,0),q=I($+Z),te=!g;++m<$;)q[m]=a[m];for(var se=m;++M<Z;)q[se+M]=l[M];for(;++_<T;)(te||m<b)&&(q[se+c[_]]=a[m++]);return q}function At(a,l){var c=-1,g=a.length;for(l||(l=I(g));++c<g;)l[c]=a[c];return l}function Ar(a,l,c,g){var m=!c;c||(c={});for(var b=-1,_=l.length;++b<_;){var T=l[b],M=g?g(c[T],a[T],T,c,a):r;M===r&&(M=a[T]),m?Gr(c,T,M):Ga(c,T,M)}return c}function ZM(a,l){return Ar(a,Ic(a),l)}function $M(a,l){return Ar(a,gh(a),l)}function al(a,l){return function(c,g){var m=ke(c)?YN:gM,b=l?l():{};return m(c,a,pe(g,2),b)}}function To(a){return Be(function(l,c){var g=-1,m=c.length,b=m>1?c[m-1]:r,_=m>2?c[2]:r;for(b=a.length>3&&typeof b=="function"?(m--,b):r,_&&St(c[0],c[1],_)&&(b=m<3?r:b,m=1),l=Ue(l);++g<m;){var T=c[g];T&&a(l,T,g,b)}return l})}function th(a,l){return function(c,g){if(c==null)return c;if(!Mt(c))return a(c,g);for(var m=c.length,b=l?m:-1,_=Ue(c);(l?b--:++b<m)&&g(_[b],b,_)!==!1;);return c}}function rh(a){return function(l,c,g){for(var m=-1,b=Ue(l),_=g(l),T=_.length;T--;){var M=_[a?T:++m];if(c(b[M],M,b)===!1)break}return l}}function WM(a,l,c){var g=l&A,m=Wa(a);function b(){var _=this&&this!==pt&&this instanceof b?m:a;return _.apply(g?c:this,arguments)}return b}function nh(a){return function(l){l=Ge(l);var c=bo(l)?yr(l):r,g=c?c[0]:l.charAt(0),m=c?Cn(c,1).join(""):l.slice(1);return g[a]()+m}}function Eo(a){return function(l){return ec(tf(ef(l).replace(IN,"")),a,"")}}function Wa(a){return function(){var l=arguments;switch(l.length){case 0:return new a;case 1:return new a(l[0]);case 2:return new a(l[0],l[1]);case 3:return new a(l[0],l[1],l[2]);case 4:return new a(l[0],l[1],l[2],l[3]);case 5:return new a(l[0],l[1],l[2],l[3],l[4]);case 6:return new a(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new a(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var c=So(a.prototype),g=a.apply(c,l);return Je(g)?g:c}}function HM(a,l,c){var g=Wa(a);function m(){for(var b=arguments.length,_=I(b),T=b,M=No(m);T--;)_[T]=arguments[T];var Z=b<3&&_[0]!==M&&_[b-1]!==M?[]:vn(_,M);if(b-=Z.length,b<c)return sh(a,l,il,m.placeholder,r,_,Z,r,r,c-b);var $=this&&this!==pt&&this instanceof m?g:a;return Gt($,this,_)}return m}function oh(a){return function(l,c,g){var m=Ue(l);if(!Mt(l)){var b=pe(c,3);l=ut(l),c=function(T){return b(m[T],T,m)}}var _=a(l,c,g);return _>-1?m[b?l[_]:_]:r}}function ah(a){return Ur(function(l){var c=l.length,g=c,m=Jt.prototype.thru;for(a&&l.reverse();g--;){var b=l[g];if(typeof b!="function")throw new Yt(d);if(m&&!_&&dl(b)=="wrapper")var _=new Jt([],!0)}for(g=_?g:c;++g<c;){b=l[g];var T=dl(b),M=T=="wrapper"?Vc(b):r;M&&Rc(M[0])&&M[1]==(U|R|G|P)&&!M[4].length&&M[9]==1?_=_[dl(M[0])].apply(_,M[3]):_=b.length==1&&Rc(b)?_[T]():_.thru(b)}return function(){var Z=arguments,$=Z[0];if(_&&Z.length==1&&ke($))return _.plant($).value();for(var q=0,te=c?l[q].apply(this,Z):$;++q<c;)te=l[q].call(this,te);return te}})}function il(a,l,c,g,m,b,_,T,M,Z){var $=l&U,q=l&A,te=l&w,se=l&(R|H),he=l&W,Me=te?r:Wa(a);function fe(){for(var Pe=arguments.length,Ve=I(Pe),$t=Pe;$t--;)Ve[$t]=arguments[$t];if(se)var Tt=No(fe),Wt=aA(Ve,Tt);if(g&&(Ve=Xg(Ve,g,m,se)),b&&(Ve=eh(Ve,b,_,se)),Pe-=Wt,se&&Pe<Z){var rt=vn(Ve,Tt);return sh(a,l,il,fe.placeholder,c,Ve,rt,T,M,Z-Pe)}var xr=q?c:this,Hr=te?xr[a]:a;return Pe=Ve.length,T?Ve=gB(Ve,T):he&&Pe>1&&Ve.reverse(),$&&M<Pe&&(Ve.length=M),this&&this!==pt&&this instanceof fe&&(Hr=Me||Wa(Hr)),Hr.apply(xr,Ve)}return fe}function ih(a,l){return function(c,g){return xM(c,a,l(g),{})}}function ll(a,l){return function(c,g){var m;if(c===r&&g===r)return l;if(c!==r&&(m=c),g!==r){if(m===r)return g;typeof c=="string"||typeof g=="string"?(c=Ut(c),g=Ut(g)):(c=$g(c),g=$g(g)),m=a(c,g)}return m}}function Mc(a){return Ur(function(l){return l=qe(l,jt(pe())),Be(function(c){var g=this;return a(l,function(m){return Gt(m,g,c)})})})}function sl(a,l){l=l===r?" ":Ut(l);var c=l.length;if(c<2)return c?_c(l,a):l;var g=_c(l,qi(a/wo(l)));return bo(l)?Cn(yr(g),0,a).join(""):g.slice(0,a)}function qM(a,l,c,g){var m=l&A,b=Wa(a);function _(){for(var T=-1,M=arguments.length,Z=-1,$=g.length,q=I($+M),te=this&&this!==pt&&this instanceof _?b:a;++Z<$;)q[Z]=g[Z];for(;M--;)q[Z++]=arguments[++T];return Gt(te,m?c:this,q)}return _}function lh(a){return function(l,c,g){return g&&typeof g!="number"&&St(l,c,g)&&(c=g=r),l=Wr(l),c===r?(c=l,l=0):c=Wr(c),g=g===r?l<c?1:-1:Wr(g),DM(l,c,g,a)}}function cl(a){return function(l,c){return typeof l=="string"&&typeof c=="string"||(l=tr(l),c=tr(c)),a(l,c)}}function sh(a,l,c,g,m,b,_,T,M,Z){var $=l&R,q=$?_:r,te=$?r:_,se=$?b:r,he=$?r:b;l|=$?G:K,l&=~($?K:G),l&L||(l&=~(A|w));var Me=[a,l,m,se,q,he,te,T,M,Z],fe=c.apply(r,Me);return Rc(a)&&wh(fe,Me),fe.placeholder=g,xh(fe,a,l)}function Bc(a){var l=it[a];return function(c,g){if(c=tr(c),g=g==null?0:yt(Ee(g),292),g&&xg(c)){var m=(Ge(c)+"e").split("e"),b=l(m[0]+"e"+(+m[1]+g));return m=(Ge(b)+"e").split("e"),+(m[0]+"e"+(+m[1]-g))}return l(c)}}var KM=_o&&1/Ri(new _o([,-0]))[1]==ye?function(a){return new _o(a)}:Xc;function ch(a){return function(l){var c=bt(l);return c==mr?lc(l):c==vr?pA(l):oA(l,a(l))}}function jr(a,l,c,g,m,b,_,T){var M=l&w;if(!M&&typeof a!="function")throw new Yt(d);var Z=g?g.length:0;if(Z||(l&=~(G|K),g=m=r),_=_===r?_:lt(Ee(_),0),T=T===r?T:Ee(T),Z-=m?m.length:0,l&K){var $=g,q=m;g=m=r}var te=M?r:Vc(a),se=[a,l,c,g,m,$,q,b,_,T];if(te&&dB(se,te),a=se[0],l=se[1],c=se[2],g=se[3],m=se[4],T=se[9]=se[9]===r?M?0:a.length:lt(se[9]-Z,0),!T&&l&(R|H)&&(l&=~(R|H)),!l||l==A)var he=WM(a,l,c);else l==R||l==H?he=HM(a,l,T):(l==G||l==(A|G))&&!m.length?he=qM(a,l,c,g):he=il.apply(r,se);var Me=te?Ug:wh;return xh(Me(he,se),a,l)}function dh(a,l,c,g){return a===r||wr(a,Co[c])&&!je.call(g,c)?l:a}function uh(a,l,c,g,m,b){return Je(a)&&Je(l)&&(b.set(l,a),rl(a,l,r,uh,b),b.delete(l)),a}function YM(a){return Ka(a)?r:a}function ph(a,l,c,g,m,b){var _=c&D,T=a.length,M=l.length;if(T!=M&&!(_&&M>T))return!1;var Z=b.get(a),$=b.get(l);if(Z&&$)return Z==l&&$==a;var q=-1,te=!0,se=c&E?new Un:r;for(b.set(a,l),b.set(l,a);++q<T;){var he=a[q],Me=l[q];if(g)var fe=_?g(Me,he,q,l,a,b):g(he,Me,q,a,l,b);if(fe!==r){if(fe)continue;te=!1;break}if(se){if(!tc(l,function(Pe,Ve){if(!La(se,Ve)&&(he===Pe||m(he,Pe,c,g,b)))return se.push(Ve)})){te=!1;break}}else if(!(he===Me||m(he,Me,c,g,b))){te=!1;break}}return b.delete(a),b.delete(l),te}function JM(a,l,c,g,m,b,_){switch(c){case mo:if(a.byteLength!=l.byteLength||a.byteOffset!=l.byteOffset)return!1;a=a.buffer,l=l.buffer;case Va:return!(a.byteLength!=l.byteLength||!b(new Zi(a),new Zi(l)));case Na:case Aa:case Ma:return wr(+a,+l);case Mi:return a.name==l.name&&a.message==l.message;case Ba:case Pa:return a==l+"";case mr:var T=lc;case vr:var M=g&D;if(T||(T=Ri),a.size!=l.size&&!M)return!1;var Z=_.get(a);if(Z)return Z==l;g|=E,_.set(a,l);var $=ph(T(a),T(l),g,m,b,_);return _.delete(a),$;case Pi:if(za)return za.call(a)==za.call(l)}return!1}function QM(a,l,c,g,m,b){var _=c&D,T=Pc(a),M=T.length,Z=Pc(l),$=Z.length;if(M!=$&&!_)return!1;for(var q=M;q--;){var te=T[q];if(!(_?te in l:je.call(l,te)))return!1}var se=b.get(a),he=b.get(l);if(se&&he)return se==l&&he==a;var Me=!0;b.set(a,l),b.set(l,a);for(var fe=_;++q<M;){te=T[q];var Pe=a[te],Ve=l[te];if(g)var $t=_?g(Ve,Pe,te,l,a,b):g(Pe,Ve,te,a,l,b);if(!($t===r?Pe===Ve||m(Pe,Ve,c,g,b):$t)){Me=!1;break}fe||(fe=te=="constructor")}if(Me&&!fe){var Tt=a.constructor,Wt=l.constructor;Tt!=Wt&&"constructor"in a&&"constructor"in l&&!(typeof Tt=="function"&&Tt instanceof Tt&&typeof Wt=="function"&&Wt instanceof Wt)&&(Me=!1)}return b.delete(a),b.delete(l),Me}function Ur(a){return zc(yh(a,r,Eh),a+"")}function Pc(a){return Pg(a,ut,Ic)}function Dc(a){return Pg(a,Bt,gh)}var Vc=Yi?function(a){return Yi.get(a)}:Xc;function dl(a){for(var l=a.name+"",c=ko[l],g=je.call(ko,l)?c.length:0;g--;){var m=c[g],b=m.func;if(b==null||b==a)return m.name}return l}function No(a){var l=je.call(v,"placeholder")?v:a;return l.placeholder}function pe(){var a=v.iteratee||Jc;return a=a===Jc?Lg:a,arguments.length?a(arguments[0],arguments[1]):a}function ul(a,l){var c=a.__data__;return iB(l)?c[typeof l=="string"?"string":"hash"]:c.map}function Lc(a){for(var l=ut(a),c=l.length;c--;){var g=l[c],m=a[g];l[c]=[g,m,mh(m)]}return l}function Wn(a,l){var c=cA(a,l);return Vg(c)?c:r}function XM(a){var l=je.call(a,Gn),c=a[Gn];try{a[Gn]=r;var g=!0}catch{}var m=ji.call(a);return g&&(l?a[Gn]=c:delete a[Gn]),m}var Ic=cc?function(a){return a==null?[]:(a=Ue(a),fn(cc(a),function(l){return bg.call(a,l)}))}:ed,gh=cc?function(a){for(var l=[];a;)mn(l,Ic(a)),a=$i(a);return l}:ed,bt=kt;(dc&&bt(new dc(new ArrayBuffer(1)))!=mo||Fa&&bt(new Fa)!=mr||uc&&bt(uc.resolve())!=Ap||_o&&bt(new _o)!=vr||Ra&&bt(new Ra)!=Da)&&(bt=function(a){var l=kt(a),c=l==Rr?a.constructor:r,g=c?Hn(c):"";if(g)switch(g){case LA:return mo;case IA:return mr;case FA:return Ap;case RA:return vr;case OA:return Da}return l});function eB(a,l,c){for(var g=-1,m=c.length;++g<m;){var b=c[g],_=b.size;switch(b.type){case"drop":a+=_;break;case"dropRight":l-=_;break;case"take":l=yt(l,a+_);break;case"takeRight":a=lt(a,l-_);break}}return{start:a,end:l}}function tB(a){var l=a.match(lN);return l?l[1].split(sN):[]}function hh(a,l,c){l=xn(l,a);for(var g=-1,m=l.length,b=!1;++g<m;){var _=Mr(l[g]);if(!(b=a!=null&&c(a,_)))break;a=a[_]}return b||++g!=m?b:(m=a==null?0:a.length,!!m&&yl(m)&&Zr(_,m)&&(ke(a)||qn(a)))}function rB(a){var l=a.length,c=new a.constructor(l);return l&&typeof a[0]=="string"&&je.call(a,"index")&&(c.index=a.index,c.input=a.input),c}function fh(a){return typeof a.constructor=="function"&&!Ha(a)?So($i(a)):{}}function nB(a,l,c){var g=a.constructor;switch(l){case Va:return Ac(a);case Na:case Aa:return new g(+a);case mo:return zM(a,c);case Ls:case Is:case Fs:case Rs:case Os:case zs:case Gs:case js:case Us:return Jg(a,c);case mr:return new g;case Ma:case Pa:return new g(a);case Ba:return GM(a);case vr:return new g;case Pi:return jM(a)}}function oB(a,l){var c=l.length;if(!c)return a;var g=c-1;return l[g]=(c>1?"& ":"")+l[g],l=l.join(c>2?", ":" "),a.replace(iN,`{
85
- /* [wrapped with `+l+`] */
86
- `)}function aB(a){return ke(a)||qn(a)||!!(wg&&a&&a[wg])}function Zr(a,l){var c=typeof a;return l=l??_e,!!l&&(c=="number"||c!="symbol"&&vN.test(a))&&a>-1&&a%1==0&&a<l}function St(a,l,c){if(!Je(c))return!1;var g=typeof l;return(g=="number"?Mt(c)&&Zr(l,c.length):g=="string"&&l in c)?wr(c[l],a):!1}function Fc(a,l){if(ke(a))return!1;var c=typeof a;return c=="number"||c=="symbol"||c=="boolean"||a==null||Zt(a)?!0:rN.test(a)||!tN.test(a)||l!=null&&a in Ue(l)}function iB(a){var l=typeof a;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?a!=="__proto__":a===null}function Rc(a){var l=dl(a),c=v[l];if(typeof c!="function"||!(l in De.prototype))return!1;if(a===c)return!0;var g=Vc(c);return!!g&&a===g[0]}function lB(a){return!!mg&&mg in a}var sB=zi?$r:td;function Ha(a){var l=a&&a.constructor,c=typeof l=="function"&&l.prototype||Co;return a===c}function mh(a){return a===a&&!Je(a)}function vh(a,l){return function(c){return c==null?!1:c[a]===l&&(l!==r||a in Ue(c))}}function cB(a){var l=ml(a,function(g){return c.size===h&&c.clear(),g}),c=l.cache;return l}function dB(a,l){var c=a[1],g=l[1],m=c|g,b=m<(A|w|U),_=g==U&&c==R||g==U&&c==P&&a[7].length<=l[8]||g==(U|P)&&l[7].length<=l[8]&&c==R;if(!(b||_))return a;g&A&&(a[2]=l[2],m|=c&A?0:L);var T=l[3];if(T){var M=a[3];a[3]=M?Xg(M,T,l[4]):T,a[4]=M?vn(a[3],f):l[4]}return T=l[5],T&&(M=a[5],a[5]=M?eh(M,T,l[6]):T,a[6]=M?vn(a[5],f):l[6]),T=l[7],T&&(a[7]=T),g&U&&(a[8]=a[8]==null?l[8]:yt(a[8],l[8])),a[9]==null&&(a[9]=l[9]),a[0]=l[0],a[1]=m,a}function uB(a){var l=[];if(a!=null)for(var c in Ue(a))l.push(c);return l}function pB(a){return ji.call(a)}function yh(a,l,c){return l=lt(l===r?a.length-1:l,0),function(){for(var g=arguments,m=-1,b=lt(g.length-l,0),_=I(b);++m<b;)_[m]=g[l+m];m=-1;for(var T=I(l+1);++m<l;)T[m]=g[m];return T[l]=c(_),Gt(a,this,T)}}function bh(a,l){return l.length<2?a:$n(a,Xt(l,0,-1))}function gB(a,l){for(var c=a.length,g=yt(l.length,c),m=At(a);g--;){var b=l[g];a[g]=Zr(b,c)?m[b]:r}return a}function Oc(a,l){if(!(l==="constructor"&&typeof a[l]=="function")&&l!="__proto__")return a[l]}var wh=Ch(Ug),qa=NA||function(a,l){return pt.setTimeout(a,l)},zc=Ch(IM);function xh(a,l,c){var g=l+"";return zc(a,oB(g,hB(tB(g),c)))}function Ch(a){var l=0,c=0;return function(){var g=PA(),m=j-(g-c);if(c=g,m>0){if(++l>=ue)return arguments[0]}else l=0;return a.apply(r,arguments)}}function pl(a,l){var c=-1,g=a.length,m=g-1;for(l=l===r?g:l;++c<l;){var b=Cc(c,m),_=a[b];a[b]=a[c],a[c]=_}return a.length=l,a}var _h=cB(function(a){var l=[];return a.charCodeAt(0)===46&&l.push(""),a.replace(nN,function(c,g,m,b){l.push(m?b.replace(uN,"$1"):g||c)}),l});function Mr(a){if(typeof a=="string"||Zt(a))return a;var l=a+"";return l=="0"&&1/a==-ye?"-0":l}function Hn(a){if(a!=null){try{return Gi.call(a)}catch{}try{return a+""}catch{}}return""}function hB(a,l){return Kt(Ea,function(c){var g="_."+c[0];l&c[1]&&!Ii(a,g)&&a.push(g)}),a.sort()}function kh(a){if(a instanceof De)return a.clone();var l=new Jt(a.__wrapped__,a.__chain__);return l.__actions__=At(a.__actions__),l.__index__=a.__index__,l.__values__=a.__values__,l}function fB(a,l,c){(c?St(a,l,c):l===r)?l=1:l=lt(Ee(l),0);var g=a==null?0:a.length;if(!g||l<1)return[];for(var m=0,b=0,_=I(qi(g/l));m<g;)_[b++]=Xt(a,m,m+=l);return _}function mB(a){for(var l=-1,c=a==null?0:a.length,g=0,m=[];++l<c;){var b=a[l];b&&(m[g++]=b)}return m}function vB(){var a=arguments.length;if(!a)return[];for(var l=I(a-1),c=arguments[0],g=a;g--;)l[g-1]=arguments[g];return mn(ke(c)?At(c):[c],gt(l,1))}var yB=Be(function(a,l){return tt(a)?ja(a,gt(l,1,tt,!0)):[]}),bB=Be(function(a,l){var c=er(l);return tt(c)&&(c=r),tt(a)?ja(a,gt(l,1,tt,!0),pe(c,2)):[]}),wB=Be(function(a,l){var c=er(l);return tt(c)&&(c=r),tt(a)?ja(a,gt(l,1,tt,!0),r,c):[]});function xB(a,l,c){var g=a==null?0:a.length;return g?(l=c||l===r?1:Ee(l),Xt(a,l<0?0:l,g)):[]}function CB(a,l,c){var g=a==null?0:a.length;return g?(l=c||l===r?1:Ee(l),l=g-l,Xt(a,0,l<0?0:l)):[]}function _B(a,l){return a&&a.length?ol(a,pe(l,3),!0,!0):[]}function kB(a,l){return a&&a.length?ol(a,pe(l,3),!0):[]}function SB(a,l,c,g){var m=a==null?0:a.length;return m?(c&&typeof c!="number"&&St(a,l,c)&&(c=0,g=m),vM(a,l,c,g)):[]}function Sh(a,l,c){var g=a==null?0:a.length;if(!g)return-1;var m=c==null?0:Ee(c);return m<0&&(m=lt(g+m,0)),Fi(a,pe(l,3),m)}function Th(a,l,c){var g=a==null?0:a.length;if(!g)return-1;var m=g-1;return c!==r&&(m=Ee(c),m=c<0?lt(g+m,0):yt(m,g-1)),Fi(a,pe(l,3),m,!0)}function Eh(a){var l=a==null?0:a.length;return l?gt(a,1):[]}function TB(a){var l=a==null?0:a.length;return l?gt(a,ye):[]}function EB(a,l){var c=a==null?0:a.length;return c?(l=l===r?1:Ee(l),gt(a,l)):[]}function NB(a){for(var l=-1,c=a==null?0:a.length,g={};++l<c;){var m=a[l];g[m[0]]=m[1]}return g}function Nh(a){return a&&a.length?a[0]:r}function AB(a,l,c){var g=a==null?0:a.length;if(!g)return-1;var m=c==null?0:Ee(c);return m<0&&(m=lt(g+m,0)),yo(a,l,m)}function MB(a){var l=a==null?0:a.length;return l?Xt(a,0,-1):[]}var BB=Be(function(a){var l=qe(a,Ec);return l.length&&l[0]===a[0]?vc(l):[]}),PB=Be(function(a){var l=er(a),c=qe(a,Ec);return l===er(c)?l=r:c.pop(),c.length&&c[0]===a[0]?vc(c,pe(l,2)):[]}),DB=Be(function(a){var l=er(a),c=qe(a,Ec);return l=typeof l=="function"?l:r,l&&c.pop(),c.length&&c[0]===a[0]?vc(c,r,l):[]});function VB(a,l){return a==null?"":MA.call(a,l)}function er(a){var l=a==null?0:a.length;return l?a[l-1]:r}function LB(a,l,c){var g=a==null?0:a.length;if(!g)return-1;var m=g;return c!==r&&(m=Ee(c),m=m<0?lt(g+m,0):yt(m,g-1)),l===l?hA(a,l,m):Fi(a,sg,m,!0)}function IB(a,l){return a&&a.length?Og(a,Ee(l)):r}var FB=Be(Ah);function Ah(a,l){return a&&a.length&&l&&l.length?xc(a,l):a}function RB(a,l,c){return a&&a.length&&l&&l.length?xc(a,l,pe(c,2)):a}function OB(a,l,c){return a&&a.length&&l&&l.length?xc(a,l,r,c):a}var zB=Ur(function(a,l){var c=a==null?0:a.length,g=gc(a,l);return jg(a,qe(l,function(m){return Zr(m,c)?+m:m}).sort(Qg)),g});function GB(a,l){var c=[];if(!(a&&a.length))return c;var g=-1,m=[],b=a.length;for(l=pe(l,3);++g<b;){var _=a[g];l(_,g,a)&&(c.push(_),m.push(g))}return jg(a,m),c}function Gc(a){return a==null?a:VA.call(a)}function jB(a,l,c){var g=a==null?0:a.length;return g?(c&&typeof c!="number"&&St(a,l,c)?(l=0,c=g):(l=l==null?0:Ee(l),c=c===r?g:Ee(c)),Xt(a,l,c)):[]}function UB(a,l){return nl(a,l)}function ZB(a,l,c){return kc(a,l,pe(c,2))}function $B(a,l){var c=a==null?0:a.length;if(c){var g=nl(a,l);if(g<c&&wr(a[g],l))return g}return-1}function WB(a,l){return nl(a,l,!0)}function HB(a,l,c){return kc(a,l,pe(c,2),!0)}function qB(a,l){var c=a==null?0:a.length;if(c){var g=nl(a,l,!0)-1;if(wr(a[g],l))return g}return-1}function KB(a){return a&&a.length?Zg(a):[]}function YB(a,l){return a&&a.length?Zg(a,pe(l,2)):[]}function JB(a){var l=a==null?0:a.length;return l?Xt(a,1,l):[]}function QB(a,l,c){return a&&a.length?(l=c||l===r?1:Ee(l),Xt(a,0,l<0?0:l)):[]}function XB(a,l,c){var g=a==null?0:a.length;return g?(l=c||l===r?1:Ee(l),l=g-l,Xt(a,l<0?0:l,g)):[]}function eP(a,l){return a&&a.length?ol(a,pe(l,3),!1,!0):[]}function tP(a,l){return a&&a.length?ol(a,pe(l,3)):[]}var rP=Be(function(a){return wn(gt(a,1,tt,!0))}),nP=Be(function(a){var l=er(a);return tt(l)&&(l=r),wn(gt(a,1,tt,!0),pe(l,2))}),oP=Be(function(a){var l=er(a);return l=typeof l=="function"?l:r,wn(gt(a,1,tt,!0),r,l)});function aP(a){return a&&a.length?wn(a):[]}function iP(a,l){return a&&a.length?wn(a,pe(l,2)):[]}function lP(a,l){return l=typeof l=="function"?l:r,a&&a.length?wn(a,r,l):[]}function jc(a){if(!(a&&a.length))return[];var l=0;return a=fn(a,function(c){if(tt(c))return l=lt(c.length,l),!0}),ac(l,function(c){return qe(a,rc(c))})}function Mh(a,l){if(!(a&&a.length))return[];var c=jc(a);return l==null?c:qe(c,function(g){return Gt(l,r,g)})}var sP=Be(function(a,l){return tt(a)?ja(a,l):[]}),cP=Be(function(a){return Tc(fn(a,tt))}),dP=Be(function(a){var l=er(a);return tt(l)&&(l=r),Tc(fn(a,tt),pe(l,2))}),uP=Be(function(a){var l=er(a);return l=typeof l=="function"?l:r,Tc(fn(a,tt),r,l)}),pP=Be(jc);function gP(a,l){return qg(a||[],l||[],Ga)}function hP(a,l){return qg(a||[],l||[],$a)}var fP=Be(function(a){var l=a.length,c=l>1?a[l-1]:r;return c=typeof c=="function"?(a.pop(),c):r,Mh(a,c)});function Bh(a){var l=v(a);return l.__chain__=!0,l}function mP(a,l){return l(a),a}function gl(a,l){return l(a)}var vP=Ur(function(a){var l=a.length,c=l?a[0]:0,g=this.__wrapped__,m=function(b){return gc(b,a)};return l>1||this.__actions__.length||!(g instanceof De)||!Zr(c)?this.thru(m):(g=g.slice(c,+c+(l?1:0)),g.__actions__.push({func:gl,args:[m],thisArg:r}),new Jt(g,this.__chain__).thru(function(b){return l&&!b.length&&b.push(r),b}))});function yP(){return Bh(this)}function bP(){return new Jt(this.value(),this.__chain__)}function wP(){this.__values__===r&&(this.__values__=$h(this.value()));var a=this.__index__>=this.__values__.length,l=a?r:this.__values__[this.__index__++];return{done:a,value:l}}function xP(){return this}function CP(a){for(var l,c=this;c instanceof Qi;){var g=kh(c);g.__index__=0,g.__values__=r,l?m.__wrapped__=g:l=g;var m=g;c=c.__wrapped__}return m.__wrapped__=a,l}function _P(){var a=this.__wrapped__;if(a instanceof De){var l=a;return this.__actions__.length&&(l=new De(this)),l=l.reverse(),l.__actions__.push({func:gl,args:[Gc],thisArg:r}),new Jt(l,this.__chain__)}return this.thru(Gc)}function kP(){return Hg(this.__wrapped__,this.__actions__)}var SP=al(function(a,l,c){je.call(a,c)?++a[c]:Gr(a,c,1)});function TP(a,l,c){var g=ke(a)?ig:mM;return c&&St(a,l,c)&&(l=r),g(a,pe(l,3))}function EP(a,l){var c=ke(a)?fn:Mg;return c(a,pe(l,3))}var NP=oh(Sh),AP=oh(Th);function MP(a,l){return gt(hl(a,l),1)}function BP(a,l){return gt(hl(a,l),ye)}function PP(a,l,c){return c=c===r?1:Ee(c),gt(hl(a,l),c)}function Ph(a,l){var c=ke(a)?Kt:bn;return c(a,pe(l,3))}function Dh(a,l){var c=ke(a)?JN:Ag;return c(a,pe(l,3))}var DP=al(function(a,l,c){je.call(a,c)?a[c].push(l):Gr(a,c,[l])});function VP(a,l,c,g){a=Mt(a)?a:Mo(a),c=c&&!g?Ee(c):0;var m=a.length;return c<0&&(c=lt(m+c,0)),bl(a)?c<=m&&a.indexOf(l,c)>-1:!!m&&yo(a,l,c)>-1}var LP=Be(function(a,l,c){var g=-1,m=typeof l=="function",b=Mt(a)?I(a.length):[];return bn(a,function(_){b[++g]=m?Gt(l,_,c):Ua(_,l,c)}),b}),IP=al(function(a,l,c){Gr(a,c,l)});function hl(a,l){var c=ke(a)?qe:Ig;return c(a,pe(l,3))}function FP(a,l,c,g){return a==null?[]:(ke(l)||(l=l==null?[]:[l]),c=g?r:c,ke(c)||(c=c==null?[]:[c]),zg(a,l,c))}var RP=al(function(a,l,c){a[c?0:1].push(l)},function(){return[[],[]]});function OP(a,l,c){var g=ke(a)?ec:dg,m=arguments.length<3;return g(a,pe(l,4),c,m,bn)}function zP(a,l,c){var g=ke(a)?QN:dg,m=arguments.length<3;return g(a,pe(l,4),c,m,Ag)}function GP(a,l){var c=ke(a)?fn:Mg;return c(a,vl(pe(l,3)))}function jP(a){var l=ke(a)?Sg:VM;return l(a)}function UP(a,l,c){(c?St(a,l,c):l===r)?l=1:l=Ee(l);var g=ke(a)?uM:LM;return g(a,l)}function ZP(a){var l=ke(a)?pM:FM;return l(a)}function $P(a){if(a==null)return 0;if(Mt(a))return bl(a)?wo(a):a.length;var l=bt(a);return l==mr||l==vr?a.size:bc(a).length}function WP(a,l,c){var g=ke(a)?tc:RM;return c&&St(a,l,c)&&(l=r),g(a,pe(l,3))}var HP=Be(function(a,l){if(a==null)return[];var c=l.length;return c>1&&St(a,l[0],l[1])?l=[]:c>2&&St(l[0],l[1],l[2])&&(l=[l[0]]),zg(a,gt(l,1),[])}),fl=EA||function(){return pt.Date.now()};function qP(a,l){if(typeof l!="function")throw new Yt(d);return a=Ee(a),function(){if(--a<1)return l.apply(this,arguments)}}function Vh(a,l,c){return l=c?r:l,l=a&&l==null?a.length:l,jr(a,U,r,r,r,r,l)}function Lh(a,l){var c;if(typeof l!="function")throw new Yt(d);return a=Ee(a),function(){return--a>0&&(c=l.apply(this,arguments)),a<=1&&(l=r),c}}var Uc=Be(function(a,l,c){var g=A;if(c.length){var m=vn(c,No(Uc));g|=G}return jr(a,g,l,c,m)}),Ih=Be(function(a,l,c){var g=A|w;if(c.length){var m=vn(c,No(Ih));g|=G}return jr(l,g,a,c,m)});function Fh(a,l,c){l=c?r:l;var g=jr(a,R,r,r,r,r,r,l);return g.placeholder=Fh.placeholder,g}function Rh(a,l,c){l=c?r:l;var g=jr(a,H,r,r,r,r,r,l);return g.placeholder=Rh.placeholder,g}function Oh(a,l,c){var g,m,b,_,T,M,Z=0,$=!1,q=!1,te=!0;if(typeof a!="function")throw new Yt(d);l=tr(l)||0,Je(c)&&($=!!c.leading,q="maxWait"in c,b=q?lt(tr(c.maxWait)||0,l):b,te="trailing"in c?!!c.trailing:te);function se(rt){var xr=g,Hr=m;return g=m=r,Z=rt,_=a.apply(Hr,xr),_}function he(rt){return Z=rt,T=qa(Pe,l),$?se(rt):_}function Me(rt){var xr=rt-M,Hr=rt-Z,of=l-xr;return q?yt(of,b-Hr):of}function fe(rt){var xr=rt-M,Hr=rt-Z;return M===r||xr>=l||xr<0||q&&Hr>=b}function Pe(){var rt=fl();if(fe(rt))return Ve(rt);T=qa(Pe,Me(rt))}function Ve(rt){return T=r,te&&g?se(rt):(g=m=r,_)}function $t(){T!==r&&Kg(T),Z=0,g=M=m=T=r}function Tt(){return T===r?_:Ve(fl())}function Wt(){var rt=fl(),xr=fe(rt);if(g=arguments,m=this,M=rt,xr){if(T===r)return he(M);if(q)return Kg(T),T=qa(Pe,l),se(M)}return T===r&&(T=qa(Pe,l)),_}return Wt.cancel=$t,Wt.flush=Tt,Wt}var KP=Be(function(a,l){return Ng(a,1,l)}),YP=Be(function(a,l,c){return Ng(a,tr(l)||0,c)});function JP(a){return jr(a,W)}function ml(a,l){if(typeof a!="function"||l!=null&&typeof l!="function")throw new Yt(d);var c=function(){var g=arguments,m=l?l.apply(this,g):g[0],b=c.cache;if(b.has(m))return b.get(m);var _=a.apply(this,g);return c.cache=b.set(m,_)||b,_};return c.cache=new(ml.Cache||zr),c}ml.Cache=zr;function vl(a){if(typeof a!="function")throw new Yt(d);return function(){var l=arguments;switch(l.length){case 0:return!a.call(this);case 1:return!a.call(this,l[0]);case 2:return!a.call(this,l[0],l[1]);case 3:return!a.call(this,l[0],l[1],l[2])}return!a.apply(this,l)}}function QP(a){return Lh(2,a)}var XP=OM(function(a,l){l=l.length==1&&ke(l[0])?qe(l[0],jt(pe())):qe(gt(l,1),jt(pe()));var c=l.length;return Be(function(g){for(var m=-1,b=yt(g.length,c);++m<b;)g[m]=l[m].call(this,g[m]);return Gt(a,this,g)})}),Zc=Be(function(a,l){var c=vn(l,No(Zc));return jr(a,G,r,l,c)}),zh=Be(function(a,l){var c=vn(l,No(zh));return jr(a,K,r,l,c)}),eD=Ur(function(a,l){return jr(a,P,r,r,r,l)});function tD(a,l){if(typeof a!="function")throw new Yt(d);return l=l===r?l:Ee(l),Be(a,l)}function rD(a,l){if(typeof a!="function")throw new Yt(d);return l=l==null?0:lt(Ee(l),0),Be(function(c){var g=c[l],m=Cn(c,0,l);return g&&mn(m,g),Gt(a,this,m)})}function nD(a,l,c){var g=!0,m=!0;if(typeof a!="function")throw new Yt(d);return Je(c)&&(g="leading"in c?!!c.leading:g,m="trailing"in c?!!c.trailing:m),Oh(a,l,{leading:g,maxWait:l,trailing:m})}function oD(a){return Vh(a,1)}function aD(a,l){return Zc(Nc(l),a)}function iD(){if(!arguments.length)return[];var a=arguments[0];return ke(a)?a:[a]}function lD(a){return Qt(a,k)}function sD(a,l){return l=typeof l=="function"?l:r,Qt(a,k,l)}function cD(a){return Qt(a,y|k)}function dD(a,l){return l=typeof l=="function"?l:r,Qt(a,y|k,l)}function uD(a,l){return l==null||Eg(a,l,ut(l))}function wr(a,l){return a===l||a!==a&&l!==l}var pD=cl(mc),gD=cl(function(a,l){return a>=l}),qn=Dg(function(){return arguments}())?Dg:function(a){return Xe(a)&&je.call(a,"callee")&&!bg.call(a,"callee")},ke=I.isArray,hD=eg?jt(eg):CM;function Mt(a){return a!=null&&yl(a.length)&&!$r(a)}function tt(a){return Xe(a)&&Mt(a)}function fD(a){return a===!0||a===!1||Xe(a)&&kt(a)==Na}var _n=AA||td,mD=tg?jt(tg):_M;function vD(a){return Xe(a)&&a.nodeType===1&&!Ka(a)}function yD(a){if(a==null)return!0;if(Mt(a)&&(ke(a)||typeof a=="string"||typeof a.splice=="function"||_n(a)||Ao(a)||qn(a)))return!a.length;var l=bt(a);if(l==mr||l==vr)return!a.size;if(Ha(a))return!bc(a).length;for(var c in a)if(je.call(a,c))return!1;return!0}function bD(a,l){return Za(a,l)}function wD(a,l,c){c=typeof c=="function"?c:r;var g=c?c(a,l):r;return g===r?Za(a,l,r,c):!!g}function $c(a){if(!Xe(a))return!1;var l=kt(a);return l==Mi||l==UE||typeof a.message=="string"&&typeof a.name=="string"&&!Ka(a)}function xD(a){return typeof a=="number"&&xg(a)}function $r(a){if(!Je(a))return!1;var l=kt(a);return l==Bi||l==Np||l==jE||l==$E}function Gh(a){return typeof a=="number"&&a==Ee(a)}function yl(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=_e}function Je(a){var l=typeof a;return a!=null&&(l=="object"||l=="function")}function Xe(a){return a!=null&&typeof a=="object"}var jh=rg?jt(rg):SM;function CD(a,l){return a===l||yc(a,l,Lc(l))}function _D(a,l,c){return c=typeof c=="function"?c:r,yc(a,l,Lc(l),c)}function kD(a){return Uh(a)&&a!=+a}function SD(a){if(sB(a))throw new Ce(s);return Vg(a)}function TD(a){return a===null}function ED(a){return a==null}function Uh(a){return typeof a=="number"||Xe(a)&&kt(a)==Ma}function Ka(a){if(!Xe(a)||kt(a)!=Rr)return!1;var l=$i(a);if(l===null)return!0;var c=je.call(l,"constructor")&&l.constructor;return typeof c=="function"&&c instanceof c&&Gi.call(c)==_A}var Wc=ng?jt(ng):TM;function ND(a){return Gh(a)&&a>=-_e&&a<=_e}var Zh=og?jt(og):EM;function bl(a){return typeof a=="string"||!ke(a)&&Xe(a)&&kt(a)==Pa}function Zt(a){return typeof a=="symbol"||Xe(a)&&kt(a)==Pi}var Ao=ag?jt(ag):NM;function AD(a){return a===r}function MD(a){return Xe(a)&&bt(a)==Da}function BD(a){return Xe(a)&&kt(a)==HE}var PD=cl(wc),DD=cl(function(a,l){return a<=l});function $h(a){if(!a)return[];if(Mt(a))return bl(a)?yr(a):At(a);if(Ia&&a[Ia])return uA(a[Ia]());var l=bt(a),c=l==mr?lc:l==vr?Ri:Mo;return c(a)}function Wr(a){if(!a)return a===0?a:0;if(a=tr(a),a===ye||a===-ye){var l=a<0?-1:1;return l*zt}return a===a?a:0}function Ee(a){var l=Wr(a),c=l%1;return l===l?c?l-c:l:0}function Wh(a){return a?Zn(Ee(a),0,Nt):0}function tr(a){if(typeof a=="number")return a;if(Zt(a))return Ht;if(Je(a)){var l=typeof a.valueOf=="function"?a.valueOf():a;a=Je(l)?l+"":l}if(typeof a!="string")return a===0?a:+a;a=ug(a);var c=hN.test(a);return c||mN.test(a)?qN(a.slice(2),c?2:8):gN.test(a)?Ht:+a}function Hh(a){return Ar(a,Bt(a))}function VD(a){return a?Zn(Ee(a),-_e,_e):a===0?a:0}function Ge(a){return a==null?"":Ut(a)}var LD=To(function(a,l){if(Ha(l)||Mt(l)){Ar(l,ut(l),a);return}for(var c in l)je.call(l,c)&&Ga(a,c,l[c])}),qh=To(function(a,l){Ar(l,Bt(l),a)}),wl=To(function(a,l,c,g){Ar(l,Bt(l),a,g)}),ID=To(function(a,l,c,g){Ar(l,ut(l),a,g)}),FD=Ur(gc);function RD(a,l){var c=So(a);return l==null?c:Tg(c,l)}var OD=Be(function(a,l){a=Ue(a);var c=-1,g=l.length,m=g>2?l[2]:r;for(m&&St(l[0],l[1],m)&&(g=1);++c<g;)for(var b=l[c],_=Bt(b),T=-1,M=_.length;++T<M;){var Z=_[T],$=a[Z];($===r||wr($,Co[Z])&&!je.call(a,Z))&&(a[Z]=b[Z])}return a}),zD=Be(function(a){return a.push(r,uh),Gt(Kh,r,a)});function GD(a,l){return lg(a,pe(l,3),Nr)}function jD(a,l){return lg(a,pe(l,3),fc)}function UD(a,l){return a==null?a:hc(a,pe(l,3),Bt)}function ZD(a,l){return a==null?a:Bg(a,pe(l,3),Bt)}function $D(a,l){return a&&Nr(a,pe(l,3))}function WD(a,l){return a&&fc(a,pe(l,3))}function HD(a){return a==null?[]:tl(a,ut(a))}function qD(a){return a==null?[]:tl(a,Bt(a))}function Hc(a,l,c){var g=a==null?r:$n(a,l);return g===r?c:g}function KD(a,l){return a!=null&&hh(a,l,yM)}function qc(a,l){return a!=null&&hh(a,l,bM)}var YD=ih(function(a,l,c){l!=null&&typeof l.toString!="function"&&(l=ji.call(l)),a[l]=c},Yc(Pt)),JD=ih(function(a,l,c){l!=null&&typeof l.toString!="function"&&(l=ji.call(l)),je.call(a,l)?a[l].push(c):a[l]=[c]},pe),QD=Be(Ua);function ut(a){return Mt(a)?kg(a):bc(a)}function Bt(a){return Mt(a)?kg(a,!0):AM(a)}function XD(a,l){var c={};return l=pe(l,3),Nr(a,function(g,m,b){Gr(c,l(g,m,b),g)}),c}function eV(a,l){var c={};return l=pe(l,3),Nr(a,function(g,m,b){Gr(c,m,l(g,m,b))}),c}var tV=To(function(a,l,c){rl(a,l,c)}),Kh=To(function(a,l,c,g){rl(a,l,c,g)}),rV=Ur(function(a,l){var c={};if(a==null)return c;var g=!1;l=qe(l,function(b){return b=xn(b,a),g||(g=b.length>1),b}),Ar(a,Dc(a),c),g&&(c=Qt(c,y|S|k,YM));for(var m=l.length;m--;)Sc(c,l[m]);return c});function nV(a,l){return Yh(a,vl(pe(l)))}var oV=Ur(function(a,l){return a==null?{}:BM(a,l)});function Yh(a,l){if(a==null)return{};var c=qe(Dc(a),function(g){return[g]});return l=pe(l),Gg(a,c,function(g,m){return l(g,m[0])})}function aV(a,l,c){l=xn(l,a);var g=-1,m=l.length;for(m||(m=1,a=r);++g<m;){var b=a==null?r:a[Mr(l[g])];b===r&&(g=m,b=c),a=$r(b)?b.call(a):b}return a}function iV(a,l,c){return a==null?a:$a(a,l,c)}function lV(a,l,c,g){return g=typeof g=="function"?g:r,a==null?a:$a(a,l,c,g)}var Jh=ch(ut),Qh=ch(Bt);function sV(a,l,c){var g=ke(a),m=g||_n(a)||Ao(a);if(l=pe(l,4),c==null){var b=a&&a.constructor;m?c=g?new b:[]:Je(a)?c=$r(b)?So($i(a)):{}:c={}}return(m?Kt:Nr)(a,function(_,T,M){return l(c,_,T,M)}),c}function cV(a,l){return a==null?!0:Sc(a,l)}function dV(a,l,c){return a==null?a:Wg(a,l,Nc(c))}function uV(a,l,c,g){return g=typeof g=="function"?g:r,a==null?a:Wg(a,l,Nc(c),g)}function Mo(a){return a==null?[]:ic(a,ut(a))}function pV(a){return a==null?[]:ic(a,Bt(a))}function gV(a,l,c){return c===r&&(c=l,l=r),c!==r&&(c=tr(c),c=c===c?c:0),l!==r&&(l=tr(l),l=l===l?l:0),Zn(tr(a),l,c)}function hV(a,l,c){return l=Wr(l),c===r?(c=l,l=0):c=Wr(c),a=tr(a),wM(a,l,c)}function fV(a,l,c){if(c&&typeof c!="boolean"&&St(a,l,c)&&(l=c=r),c===r&&(typeof l=="boolean"?(c=l,l=r):typeof a=="boolean"&&(c=a,a=r)),a===r&&l===r?(a=0,l=1):(a=Wr(a),l===r?(l=a,a=0):l=Wr(l)),a>l){var g=a;a=l,l=g}if(c||a%1||l%1){var m=Cg();return yt(a+m*(l-a+HN("1e-"+((m+"").length-1))),l)}return Cc(a,l)}var mV=Eo(function(a,l,c){return l=l.toLowerCase(),a+(c?Xh(l):l)});function Xh(a){return Kc(Ge(a).toLowerCase())}function ef(a){return a=Ge(a),a&&a.replace(yN,iA).replace(FN,"")}function vV(a,l,c){a=Ge(a),l=Ut(l);var g=a.length;c=c===r?g:Zn(Ee(c),0,g);var m=c;return c-=l.length,c>=0&&a.slice(c,m)==l}function yV(a){return a=Ge(a),a&&QE.test(a)?a.replace(Bp,lA):a}function bV(a){return a=Ge(a),a&&oN.test(a)?a.replace(Zs,"\\$&"):a}var wV=Eo(function(a,l,c){return a+(c?"-":"")+l.toLowerCase()}),xV=Eo(function(a,l,c){return a+(c?" ":"")+l.toLowerCase()}),CV=nh("toLowerCase");function _V(a,l,c){a=Ge(a),l=Ee(l);var g=l?wo(a):0;if(!l||g>=l)return a;var m=(l-g)/2;return sl(Ki(m),c)+a+sl(qi(m),c)}function kV(a,l,c){a=Ge(a),l=Ee(l);var g=l?wo(a):0;return l&&g<l?a+sl(l-g,c):a}function SV(a,l,c){a=Ge(a),l=Ee(l);var g=l?wo(a):0;return l&&g<l?sl(l-g,c)+a:a}function TV(a,l,c){return c||l==null?l=0:l&&(l=+l),DA(Ge(a).replace($s,""),l||0)}function EV(a,l,c){return(c?St(a,l,c):l===r)?l=1:l=Ee(l),_c(Ge(a),l)}function NV(){var a=arguments,l=Ge(a[0]);return a.length<3?l:l.replace(a[1],a[2])}var AV=Eo(function(a,l,c){return a+(c?"_":"")+l.toLowerCase()});function MV(a,l,c){return c&&typeof c!="number"&&St(a,l,c)&&(l=c=r),c=c===r?Nt:c>>>0,c?(a=Ge(a),a&&(typeof l=="string"||l!=null&&!Wc(l))&&(l=Ut(l),!l&&bo(a))?Cn(yr(a),0,c):a.split(l,c)):[]}var BV=Eo(function(a,l,c){return a+(c?" ":"")+Kc(l)});function PV(a,l,c){return a=Ge(a),c=c==null?0:Zn(Ee(c),0,a.length),l=Ut(l),a.slice(c,c+l.length)==l}function DV(a,l,c){var g=v.templateSettings;c&&St(a,l,c)&&(l=r),a=Ge(a),l=wl({},l,g,dh);var m=wl({},l.imports,g.imports,dh),b=ut(m),_=ic(m,b),T,M,Z=0,$=l.interpolate||Di,q="__p += '",te=sc((l.escape||Di).source+"|"+$.source+"|"+($===Pp?pN:Di).source+"|"+(l.evaluate||Di).source+"|$","g"),se="//# sourceURL="+(je.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jN+"]")+`
87
- `;a.replace(te,function(fe,Pe,Ve,$t,Tt,Wt){return Ve||(Ve=$t),q+=a.slice(Z,Wt).replace(bN,sA),Pe&&(T=!0,q+=`' +
88
- __e(`+Pe+`) +
89
- '`),Tt&&(M=!0,q+=`';
90
- `+Tt+`;
91
- __p += '`),Ve&&(q+=`' +
92
- ((__t = (`+Ve+`)) == null ? '' : __t) +
93
- '`),Z=Wt+fe.length,fe}),q+=`';
94
- `;var he=je.call(l,"variable")&&l.variable;if(!he)q=`with (obj) {
70
+ */ws.exports,function(t,e){(function(){var n,i="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",u="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",v=1,S=2,k=4,D=1,T=2,B=1,C=2,R=4,L=8,j=16,z=32,K=64,$=128,N=256,H=512,I=30,Y="...",ue=800,Z=16,V=1,O=2,Q=3,ve=1/0,xe=9007199254740991,Gt=17976931348623157e292,jt=NaN,At=4294967295,xo=At-1,Lr=At>>>1,ko=[["ary",$],["bind",B],["bindKey",C],["curry",L],["curryRight",j],["flip",H],["partial",z],["partialRight",K],["rearg",N]],hi="[object Arguments]",Ss="[object Array]",LE="[object AsyncFunction]",So="[object Boolean]",Eo="[object Date]",OE="[object DOMException]",Es="[object Error]",Ts="[object Function]",ah="[object GeneratorFunction]",yn="[object Map]",To="[object Number]",GE="[object Null]",On="[object Object]",lh="[object Promise]",zE="[object Proxy]",Ao="[object RegExp]",vn="[object Set]",Bo="[object String]",As="[object Symbol]",ZE="[object Undefined]",Po="[object WeakMap]",$E="[object WeakSet]",Vo="[object ArrayBuffer]",pi="[object DataView]",Bl="[object Float32Array]",Pl="[object Float64Array]",Vl="[object Int8Array]",Nl="[object Int16Array]",Dl="[object Int32Array]",Fl="[object Uint8Array]",Rl="[object Uint8ClampedArray]",Ml="[object Uint16Array]",Il="[object Uint32Array]",UE=/\b__p \+= '';/g,WE=/\b(__p \+=) '' \+/g,HE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ch=/&(?:amp|lt|gt|quot|#39);/g,dh=/[&<>"']/g,jE=RegExp(ch.source),qE=RegExp(dh.source),KE=/<%-([\s\S]+?)%>/g,YE=/<%([\s\S]+?)%>/g,uh=/<%=([\s\S]+?)%>/g,JE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XE=/^\w*$/,QE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ll=/[\\^$.*+?()[\]{}|]/g,eT=RegExp(Ll.source),Ol=/^\s+/,tT=/\s/,nT=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rT=/\{\n\/\* \[wrapped with (.+)\] \*/,iT=/,? & /,oT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sT=/[()=,{}\[\]\/\s]/,aT=/\\(\\)?/g,lT=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hh=/\w*$/,cT=/^[-+]0x[0-9a-f]+$/i,dT=/^0b[01]+$/i,uT=/^\[object .+?Constructor\]$/,hT=/^0o[0-7]+$/i,pT=/^(?:0|[1-9]\d*)$/,fT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bs=/($^)/,mT=/['\n\r\u2028\u2029\\]/g,Ps="\\ud800-\\udfff",gT="\\u0300-\\u036f",yT="\\ufe20-\\ufe2f",vT="\\u20d0-\\u20ff",ph=gT+yT+vT,fh="\\u2700-\\u27bf",mh="a-z\\xdf-\\xf6\\xf8-\\xff",_T="\\xac\\xb1\\xd7\\xf7",CT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wT="\\u2000-\\u206f",bT=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gh="A-Z\\xc0-\\xd6\\xd8-\\xde",yh="\\ufe0e\\ufe0f",vh=_T+CT+wT+bT,Gl="['’]",xT="["+Ps+"]",_h="["+vh+"]",Vs="["+ph+"]",Ch="\\d+",kT="["+fh+"]",wh="["+mh+"]",bh="[^"+Ps+vh+Ch+fh+mh+gh+"]",zl="\\ud83c[\\udffb-\\udfff]",ST="(?:"+Vs+"|"+zl+")",xh="[^"+Ps+"]",Zl="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",fi="["+gh+"]",kh="\\u200d",Sh="(?:"+wh+"|"+bh+")",ET="(?:"+fi+"|"+bh+")",Eh="(?:"+Gl+"(?:d|ll|m|re|s|t|ve))?",Th="(?:"+Gl+"(?:D|LL|M|RE|S|T|VE))?",Ah=ST+"?",Bh="["+yh+"]?",TT="(?:"+kh+"(?:"+[xh,Zl,$l].join("|")+")"+Bh+Ah+")*",AT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",BT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ph=Bh+Ah+TT,PT="(?:"+[kT,Zl,$l].join("|")+")"+Ph,VT="(?:"+[xh+Vs+"?",Vs,Zl,$l,xT].join("|")+")",NT=RegExp(Gl,"g"),DT=RegExp(Vs,"g"),Ul=RegExp(zl+"(?="+zl+")|"+VT+Ph,"g"),FT=RegExp([fi+"?"+wh+"+"+Eh+"(?="+[_h,fi,"$"].join("|")+")",ET+"+"+Th+"(?="+[_h,fi+Sh,"$"].join("|")+")",fi+"?"+Sh+"+"+Eh,fi+"+"+Th,BT,AT,Ch,PT].join("|"),"g"),RT=RegExp("["+kh+Ps+ph+yh+"]"),MT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],LT=-1,He={};He[Bl]=He[Pl]=He[Vl]=He[Nl]=He[Dl]=He[Fl]=He[Rl]=He[Ml]=He[Il]=!0,He[hi]=He[Ss]=He[Vo]=He[So]=He[pi]=He[Eo]=He[Es]=He[Ts]=He[yn]=He[To]=He[On]=He[Ao]=He[vn]=He[Bo]=He[Po]=!1;var Ue={};Ue[hi]=Ue[Ss]=Ue[Vo]=Ue[pi]=Ue[So]=Ue[Eo]=Ue[Bl]=Ue[Pl]=Ue[Vl]=Ue[Nl]=Ue[Dl]=Ue[yn]=Ue[To]=Ue[On]=Ue[Ao]=Ue[vn]=Ue[Bo]=Ue[As]=Ue[Fl]=Ue[Rl]=Ue[Ml]=Ue[Il]=!0,Ue[Es]=Ue[Ts]=Ue[Po]=!1;var OT={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},GT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zT={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ZT={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$T=parseFloat,UT=parseInt,Vh=typeof Ai=="object"&&Ai&&Ai.Object===Object&&Ai,WT=typeof self=="object"&&self&&self.Object===Object&&self,ht=Vh||WT||Function("return this")(),Wl=e&&!e.nodeType&&e,Or=Wl&&!0&&t&&!t.nodeType&&t,Nh=Or&&Or.exports===Wl,Hl=Nh&&Vh.process,qt=function(){try{var A=Or&&Or.require&&Or.require("util").types;return A||Hl&&Hl.binding&&Hl.binding("util")}catch{}}(),Dh=qt&&qt.isArrayBuffer,Fh=qt&&qt.isDate,Rh=qt&&qt.isMap,Mh=qt&&qt.isRegExp,Ih=qt&&qt.isSet,Lh=qt&&qt.isTypedArray;function zt(A,G,M){switch(M.length){case 0:return A.call(G);case 1:return A.call(G,M[0]);case 2:return A.call(G,M[0],M[1]);case 3:return A.call(G,M[0],M[1],M[2])}return A.apply(G,M)}function HT(A,G,M,se){for(var be=-1,Oe=A==null?0:A.length;++be<Oe;){var st=A[be];G(se,st,M(st),A)}return se}function Kt(A,G){for(var M=-1,se=A==null?0:A.length;++M<se&&G(A[M],M,A)!==!1;);return A}function jT(A,G){for(var M=A==null?0:A.length;M--&&G(A[M],M,A)!==!1;);return A}function Oh(A,G){for(var M=-1,se=A==null?0:A.length;++M<se;)if(!G(A[M],M,A))return!1;return!0}function fr(A,G){for(var M=-1,se=A==null?0:A.length,be=0,Oe=[];++M<se;){var st=A[M];G(st,M,A)&&(Oe[be++]=st)}return Oe}function Ns(A,G){var M=A==null?0:A.length;return!!M&&mi(A,G,0)>-1}function jl(A,G,M){for(var se=-1,be=A==null?0:A.length;++se<be;)if(M(G,A[se]))return!0;return!1}function qe(A,G){for(var M=-1,se=A==null?0:A.length,be=Array(se);++M<se;)be[M]=G(A[M],M,A);return be}function mr(A,G){for(var M=-1,se=G.length,be=A.length;++M<se;)A[be+M]=G[M];return A}function ql(A,G,M,se){var be=-1,Oe=A==null?0:A.length;for(se&&Oe&&(M=A[++be]);++be<Oe;)M=G(M,A[be],be,A);return M}function qT(A,G,M,se){var be=A==null?0:A.length;for(se&&be&&(M=A[--be]);be--;)M=G(M,A[be],be,A);return M}function Kl(A,G){for(var M=-1,se=A==null?0:A.length;++M<se;)if(G(A[M],M,A))return!0;return!1}var KT=Yl("length");function YT(A){return A.split("")}function JT(A){return A.match(oT)||[]}function Gh(A,G,M){var se;return M(A,function(be,Oe,st){if(G(be,Oe,st))return se=Oe,!1}),se}function Ds(A,G,M,se){for(var be=A.length,Oe=M+(se?1:-1);se?Oe--:++Oe<be;)if(G(A[Oe],Oe,A))return Oe;return-1}function mi(A,G,M){return G===G?cA(A,G,M):Ds(A,zh,M)}function XT(A,G,M,se){for(var be=M-1,Oe=A.length;++be<Oe;)if(se(A[be],G))return be;return-1}function zh(A){return A!==A}function Zh(A,G){var M=A==null?0:A.length;return M?Xl(A,G)/M:jt}function Yl(A){return function(G){return G==null?n:G[A]}}function Jl(A){return function(G){return A==null?n:A[G]}}function $h(A,G,M,se,be){return be(A,function(Oe,st,$e){M=se?(se=!1,Oe):G(M,Oe,st,$e)}),M}function QT(A,G){var M=A.length;for(A.sort(G);M--;)A[M]=A[M].value;return A}function Xl(A,G){for(var M,se=-1,be=A.length;++se<be;){var Oe=G(A[se]);Oe!==n&&(M=M===n?Oe:M+Oe)}return M}function Ql(A,G){for(var M=-1,se=Array(A);++M<A;)se[M]=G(M);return se}function eA(A,G){return qe(G,function(M){return[M,A[M]]})}function Uh(A){return A&&A.slice(0,qh(A)+1).replace(Ol,"")}function Zt(A){return function(G){return A(G)}}function ec(A,G){return qe(G,function(M){return A[M]})}function No(A,G){return A.has(G)}function Wh(A,G){for(var M=-1,se=A.length;++M<se&&mi(G,A[M],0)>-1;);return M}function Hh(A,G){for(var M=A.length;M--&&mi(G,A[M],0)>-1;);return M}function tA(A,G){for(var M=A.length,se=0;M--;)A[M]===G&&++se;return se}var nA=Jl(OT),rA=Jl(GT);function iA(A){return"\\"+ZT[A]}function oA(A,G){return A==null?n:A[G]}function gi(A){return RT.test(A)}function sA(A){return MT.test(A)}function aA(A){for(var G,M=[];!(G=A.next()).done;)M.push(G.value);return M}function tc(A){var G=-1,M=Array(A.size);return A.forEach(function(se,be){M[++G]=[be,se]}),M}function jh(A,G){return function(M){return A(G(M))}}function gr(A,G){for(var M=-1,se=A.length,be=0,Oe=[];++M<se;){var st=A[M];(st===G||st===m)&&(A[M]=m,Oe[be++]=M)}return Oe}function Fs(A){var G=-1,M=Array(A.size);return A.forEach(function(se){M[++G]=se}),M}function lA(A){var G=-1,M=Array(A.size);return A.forEach(function(se){M[++G]=[se,se]}),M}function cA(A,G,M){for(var se=M-1,be=A.length;++se<be;)if(A[se]===G)return se;return-1}function dA(A,G,M){for(var se=M+1;se--;)if(A[se]===G)return se;return se}function yi(A){return gi(A)?hA(A):KT(A)}function _n(A){return gi(A)?pA(A):YT(A)}function qh(A){for(var G=A.length;G--&&tT.test(A.charAt(G)););return G}var uA=Jl(zT);function hA(A){for(var G=Ul.lastIndex=0;Ul.test(A);)++G;return G}function pA(A){return A.match(Ul)||[]}function fA(A){return A.match(FT)||[]}var mA=function A(G){G=G==null?ht:vi.defaults(ht.Object(),G,vi.pick(ht,IT));var M=G.Array,se=G.Date,be=G.Error,Oe=G.Function,st=G.Math,$e=G.Object,nc=G.RegExp,gA=G.String,Yt=G.TypeError,Rs=M.prototype,yA=Oe.prototype,_i=$e.prototype,Ms=G["__core-js_shared__"],Is=yA.toString,Ze=_i.hasOwnProperty,vA=0,Kh=function(){var o=/[^.]+$/.exec(Ms&&Ms.keys&&Ms.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ls=_i.toString,_A=Is.call($e),CA=ht._,wA=nc("^"+Is.call(Ze).replace(Ll,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Os=Nh?G.Buffer:n,yr=G.Symbol,Gs=G.Uint8Array,Yh=Os?Os.allocUnsafe:n,zs=jh($e.getPrototypeOf,$e),Jh=$e.create,Xh=_i.propertyIsEnumerable,Zs=Rs.splice,Qh=yr?yr.isConcatSpreadable:n,Do=yr?yr.iterator:n,Gr=yr?yr.toStringTag:n,$s=function(){try{var o=Wr($e,"defineProperty");return o({},"",{}),o}catch{}}(),bA=G.clearTimeout!==ht.clearTimeout&&G.clearTimeout,xA=se&&se.now!==ht.Date.now&&se.now,kA=G.setTimeout!==ht.setTimeout&&G.setTimeout,Us=st.ceil,Ws=st.floor,rc=$e.getOwnPropertySymbols,SA=Os?Os.isBuffer:n,ep=G.isFinite,EA=Rs.join,TA=jh($e.keys,$e),at=st.max,vt=st.min,AA=se.now,BA=G.parseInt,tp=st.random,PA=Rs.reverse,ic=Wr(G,"DataView"),Fo=Wr(G,"Map"),oc=Wr(G,"Promise"),Ci=Wr(G,"Set"),Ro=Wr(G,"WeakMap"),Mo=Wr($e,"create"),Hs=Ro&&new Ro,wi={},VA=Hr(ic),NA=Hr(Fo),DA=Hr(oc),FA=Hr(Ci),RA=Hr(Ro),js=yr?yr.prototype:n,Io=js?js.valueOf:n,np=js?js.toString:n;function y(o){if(Qe(o)&&!ke(o)&&!(o instanceof De)){if(o instanceof Jt)return o;if(Ze.call(o,"__wrapped__"))return rf(o)}return new Jt(o)}var bi=function(){function o(){}return function(a){if(!Je(a))return{};if(Jh)return Jh(a);o.prototype=a;var c=new o;return o.prototype=n,c}}();function qs(){}function Jt(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}y.templateSettings={escape:KE,evaluate:YE,interpolate:uh,variable:"",imports:{_:y}},y.prototype=qs.prototype,y.prototype.constructor=y,Jt.prototype=bi(qs.prototype),Jt.prototype.constructor=Jt;function De(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=At,this.__views__=[]}function MA(){var o=new De(this.__wrapped__);return o.__actions__=Bt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Bt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Bt(this.__views__),o}function IA(){if(this.__filtered__){var o=new De(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function LA(){var o=this.__wrapped__.value(),a=this.__dir__,c=ke(o),p=a<0,g=c?o.length:0,_=YB(0,g,this.__views__),x=_.start,E=_.end,P=E-x,U=p?E:x-1,W=this.__iteratees__,q=W.length,te=0,le=vt(P,this.__takeCount__);if(!c||!p&&g==P&&le==P)return Ep(o,this.__actions__);var fe=[];e:for(;P--&&te<le;){U+=a;for(var Pe=-1,me=o[U];++Pe<q;){var Ne=W[Pe],Fe=Ne.iteratee,Wt=Ne.type,Et=Fe(me);if(Wt==O)me=Et;else if(!Et){if(Wt==V)continue e;break e}}fe[te++]=me}return fe}De.prototype=bi(qs.prototype),De.prototype.constructor=De;function zr(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function OA(){this.__data__=Mo?Mo(null):{},this.size=0}function GA(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function zA(o){var a=this.__data__;if(Mo){var c=a[o];return c===h?n:c}return Ze.call(a,o)?a[o]:n}function ZA(o){var a=this.__data__;return Mo?a[o]!==n:Ze.call(a,o)}function $A(o,a){var c=this.__data__;return this.size+=this.has(o)?0:1,c[o]=Mo&&a===n?h:a,this}zr.prototype.clear=OA,zr.prototype.delete=GA,zr.prototype.get=zA,zr.prototype.has=ZA,zr.prototype.set=$A;function Gn(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function UA(){this.__data__=[],this.size=0}function WA(o){var a=this.__data__,c=Ks(a,o);if(c<0)return!1;var p=a.length-1;return c==p?a.pop():Zs.call(a,c,1),--this.size,!0}function HA(o){var a=this.__data__,c=Ks(a,o);return c<0?n:a[c][1]}function jA(o){return Ks(this.__data__,o)>-1}function qA(o,a){var c=this.__data__,p=Ks(c,o);return p<0?(++this.size,c.push([o,a])):c[p][1]=a,this}Gn.prototype.clear=UA,Gn.prototype.delete=WA,Gn.prototype.get=HA,Gn.prototype.has=jA,Gn.prototype.set=qA;function zn(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function KA(){this.size=0,this.__data__={hash:new zr,map:new(Fo||Gn),string:new zr}}function YA(o){var a=aa(this,o).delete(o);return this.size-=a?1:0,a}function JA(o){return aa(this,o).get(o)}function XA(o){return aa(this,o).has(o)}function QA(o,a){var c=aa(this,o),p=c.size;return c.set(o,a),this.size+=c.size==p?0:1,this}zn.prototype.clear=KA,zn.prototype.delete=YA,zn.prototype.get=JA,zn.prototype.has=XA,zn.prototype.set=QA;function Zr(o){var a=-1,c=o==null?0:o.length;for(this.__data__=new zn;++a<c;)this.add(o[a])}function eB(o){return this.__data__.set(o,h),this}function tB(o){return this.__data__.has(o)}Zr.prototype.add=Zr.prototype.push=eB,Zr.prototype.has=tB;function Cn(o){var a=this.__data__=new Gn(o);this.size=a.size}function nB(){this.__data__=new Gn,this.size=0}function rB(o){var a=this.__data__,c=a.delete(o);return this.size=a.size,c}function iB(o){return this.__data__.get(o)}function oB(o){return this.__data__.has(o)}function sB(o,a){var c=this.__data__;if(c instanceof Gn){var p=c.__data__;if(!Fo||p.length<s-1)return p.push([o,a]),this.size=++c.size,this;c=this.__data__=new zn(p)}return c.set(o,a),this.size=c.size,this}Cn.prototype.clear=nB,Cn.prototype.delete=rB,Cn.prototype.get=iB,Cn.prototype.has=oB,Cn.prototype.set=sB;function rp(o,a){var c=ke(o),p=!c&&jr(o),g=!c&&!p&&br(o),_=!c&&!p&&!g&&Ei(o),x=c||p||g||_,E=x?Ql(o.length,gA):[],P=E.length;for(var U in o)(a||Ze.call(o,U))&&!(x&&(U=="length"||g&&(U=="offset"||U=="parent")||_&&(U=="buffer"||U=="byteLength"||U=="byteOffset")||Wn(U,P)))&&E.push(U);return E}function ip(o){var a=o.length;return a?o[gc(0,a-1)]:n}function aB(o,a){return la(Bt(o),$r(a,0,o.length))}function lB(o){return la(Bt(o))}function sc(o,a,c){(c!==n&&!wn(o[a],c)||c===n&&!(a in o))&&Zn(o,a,c)}function Lo(o,a,c){var p=o[a];(!(Ze.call(o,a)&&wn(p,c))||c===n&&!(a in o))&&Zn(o,a,c)}function Ks(o,a){for(var c=o.length;c--;)if(wn(o[c][0],a))return c;return-1}function cB(o,a,c,p){return vr(o,function(g,_,x){a(p,g,c(g),x)}),p}function op(o,a){return o&&Pn(a,ut(a),o)}function dB(o,a){return o&&Pn(a,Vt(a),o)}function Zn(o,a,c){a=="__proto__"&&$s?$s(o,a,{configurable:!0,enumerable:!0,value:c,writable:!0}):o[a]=c}function ac(o,a){for(var c=-1,p=a.length,g=M(p),_=o==null;++c<p;)g[c]=_?n:zc(o,a[c]);return g}function $r(o,a,c){return o===o&&(c!==n&&(o=o<=c?o:c),a!==n&&(o=o>=a?o:a)),o}function Xt(o,a,c,p,g,_){var x,E=a&v,P=a&S,U=a&k;if(c&&(x=g?c(o,p,g,_):c(o)),x!==n)return x;if(!Je(o))return o;var W=ke(o);if(W){if(x=XB(o),!E)return Bt(o,x)}else{var q=_t(o),te=q==Ts||q==ah;if(br(o))return Bp(o,E);if(q==On||q==hi||te&&!g){if(x=P||te?{}:qp(o),!E)return P?zB(o,dB(x,o)):GB(o,op(x,o))}else{if(!Ue[q])return g?o:{};x=QB(o,q,E)}}_||(_=new Cn);var le=_.get(o);if(le)return le;_.set(o,x),kf(o)?o.forEach(function(me){x.add(Xt(me,a,c,me,o,_))}):bf(o)&&o.forEach(function(me,Ne){x.set(Ne,Xt(me,a,c,Ne,o,_))});var fe=U?P?Tc:Ec:P?Vt:ut,Pe=W?n:fe(o);return Kt(Pe||o,function(me,Ne){Pe&&(Ne=me,me=o[Ne]),Lo(x,Ne,Xt(me,a,c,Ne,o,_))}),x}function uB(o){var a=ut(o);return function(c){return sp(c,o,a)}}function sp(o,a,c){var p=c.length;if(o==null)return!p;for(o=$e(o);p--;){var g=c[p],_=a[g],x=o[g];if(x===n&&!(g in o)||!_(x))return!1}return!0}function ap(o,a,c){if(typeof o!="function")throw new Yt(d);return Wo(function(){o.apply(n,c)},a)}function Oo(o,a,c,p){var g=-1,_=Ns,x=!0,E=o.length,P=[],U=a.length;if(!E)return P;c&&(a=qe(a,Zt(c))),p?(_=jl,x=!1):a.length>=s&&(_=No,x=!1,a=new Zr(a));e:for(;++g<E;){var W=o[g],q=c==null?W:c(W);if(W=p||W!==0?W:0,x&&q===q){for(var te=U;te--;)if(a[te]===q)continue e;P.push(W)}else _(a,q,p)||P.push(W)}return P}var vr=Fp(Bn),lp=Fp(cc,!0);function hB(o,a){var c=!0;return vr(o,function(p,g,_){return c=!!a(p,g,_),c}),c}function Ys(o,a,c){for(var p=-1,g=o.length;++p<g;){var _=o[p],x=a(_);if(x!=null&&(E===n?x===x&&!Ut(x):c(x,E)))var E=x,P=_}return P}function pB(o,a,c,p){var g=o.length;for(c=Te(c),c<0&&(c=-c>g?0:g+c),p=p===n||p>g?g:Te(p),p<0&&(p+=g),p=c>p?0:Ef(p);c<p;)o[c++]=a;return o}function cp(o,a){var c=[];return vr(o,function(p,g,_){a(p,g,_)&&c.push(p)}),c}function pt(o,a,c,p,g){var _=-1,x=o.length;for(c||(c=tP),g||(g=[]);++_<x;){var E=o[_];a>0&&c(E)?a>1?pt(E,a-1,c,p,g):mr(g,E):p||(g[g.length]=E)}return g}var lc=Rp(),dp=Rp(!0);function Bn(o,a){return o&&lc(o,a,ut)}function cc(o,a){return o&&dp(o,a,ut)}function Js(o,a){return fr(a,function(c){return Hn(o[c])})}function Ur(o,a){a=Cr(a,o);for(var c=0,p=a.length;o!=null&&c<p;)o=o[Vn(a[c++])];return c&&c==p?o:n}function up(o,a,c){var p=a(o);return ke(o)?p:mr(p,c(o))}function kt(o){return o==null?o===n?ZE:GE:Gr&&Gr in $e(o)?KB(o):lP(o)}function dc(o,a){return o>a}function fB(o,a){return o!=null&&Ze.call(o,a)}function mB(o,a){return o!=null&&a in $e(o)}function gB(o,a,c){return o>=vt(a,c)&&o<at(a,c)}function uc(o,a,c){for(var p=c?jl:Ns,g=o[0].length,_=o.length,x=_,E=M(_),P=1/0,U=[];x--;){var W=o[x];x&&a&&(W=qe(W,Zt(a))),P=vt(W.length,P),E[x]=!c&&(a||g>=120&&W.length>=120)?new Zr(x&&W):n}W=o[0];var q=-1,te=E[0];e:for(;++q<g&&U.length<P;){var le=W[q],fe=a?a(le):le;if(le=c||le!==0?le:0,!(te?No(te,fe):p(U,fe,c))){for(x=_;--x;){var Pe=E[x];if(!(Pe?No(Pe,fe):p(o[x],fe,c)))continue e}te&&te.push(fe),U.push(le)}}return U}function yB(o,a,c,p){return Bn(o,function(g,_,x){a(p,c(g),_,x)}),p}function Go(o,a,c){a=Cr(a,o),o=Xp(o,a);var p=o==null?o:o[Vn(en(a))];return p==null?n:zt(p,o,c)}function hp(o){return Qe(o)&&kt(o)==hi}function vB(o){return Qe(o)&&kt(o)==Vo}function _B(o){return Qe(o)&&kt(o)==Eo}function zo(o,a,c,p,g){return o===a?!0:o==null||a==null||!Qe(o)&&!Qe(a)?o!==o&&a!==a:CB(o,a,c,p,zo,g)}function CB(o,a,c,p,g,_){var x=ke(o),E=ke(a),P=x?Ss:_t(o),U=E?Ss:_t(a);P=P==hi?On:P,U=U==hi?On:U;var W=P==On,q=U==On,te=P==U;if(te&&br(o)){if(!br(a))return!1;x=!0,W=!1}if(te&&!W)return _||(_=new Cn),x||Ei(o)?Wp(o,a,c,p,g,_):jB(o,a,P,c,p,g,_);if(!(c&D)){var le=W&&Ze.call(o,"__wrapped__"),fe=q&&Ze.call(a,"__wrapped__");if(le||fe){var Pe=le?o.value():o,me=fe?a.value():a;return _||(_=new Cn),g(Pe,me,c,p,_)}}return te?(_||(_=new Cn),qB(o,a,c,p,g,_)):!1}function wB(o){return Qe(o)&&_t(o)==yn}function hc(o,a,c,p){var g=c.length,_=g,x=!p;if(o==null)return!_;for(o=$e(o);g--;){var E=c[g];if(x&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++g<_;){E=c[g];var P=E[0],U=o[P],W=E[1];if(x&&E[2]){if(U===n&&!(P in o))return!1}else{var q=new Cn;if(p)var te=p(U,W,P,o,a,q);if(!(te===n?zo(W,U,D|T,p,q):te))return!1}}return!0}function pp(o){if(!Je(o)||rP(o))return!1;var a=Hn(o)?wA:uT;return a.test(Hr(o))}function bB(o){return Qe(o)&&kt(o)==Ao}function xB(o){return Qe(o)&&_t(o)==vn}function kB(o){return Qe(o)&&fa(o.length)&&!!He[kt(o)]}function fp(o){return typeof o=="function"?o:o==null?Nt:typeof o=="object"?ke(o)?yp(o[0],o[1]):gp(o):If(o)}function pc(o){if(!Uo(o))return TA(o);var a=[];for(var c in $e(o))Ze.call(o,c)&&c!="constructor"&&a.push(c);return a}function SB(o){if(!Je(o))return aP(o);var a=Uo(o),c=[];for(var p in o)p=="constructor"&&(a||!Ze.call(o,p))||c.push(p);return c}function fc(o,a){return o<a}function mp(o,a){var c=-1,p=Pt(o)?M(o.length):[];return vr(o,function(g,_,x){p[++c]=a(g,_,x)}),p}function gp(o){var a=Bc(o);return a.length==1&&a[0][2]?Yp(a[0][0],a[0][1]):function(c){return c===o||hc(c,o,a)}}function yp(o,a){return Vc(o)&&Kp(a)?Yp(Vn(o),a):function(c){var p=zc(c,o);return p===n&&p===a?Zc(c,o):zo(a,p,D|T)}}function Xs(o,a,c,p,g){o!==a&&lc(a,function(_,x){if(g||(g=new Cn),Je(_))EB(o,a,x,c,Xs,p,g);else{var E=p?p(Dc(o,x),_,x+"",o,a,g):n;E===n&&(E=_),sc(o,x,E)}},Vt)}function EB(o,a,c,p,g,_,x){var E=Dc(o,c),P=Dc(a,c),U=x.get(P);if(U){sc(o,c,U);return}var W=_?_(E,P,c+"",o,a,x):n,q=W===n;if(q){var te=ke(P),le=!te&&br(P),fe=!te&&!le&&Ei(P);W=P,te||le||fe?ke(E)?W=E:tt(E)?W=Bt(E):le?(q=!1,W=Bp(P,!0)):fe?(q=!1,W=Pp(P,!0)):W=[]:Ho(P)||jr(P)?(W=E,jr(E)?W=Tf(E):(!Je(E)||Hn(E))&&(W=qp(P))):q=!1}q&&(x.set(P,W),g(W,P,p,_,x),x.delete(P)),sc(o,c,W)}function vp(o,a){var c=o.length;if(c)return a+=a<0?c:0,Wn(a,c)?o[a]:n}function _p(o,a,c){a.length?a=qe(a,function(_){return ke(_)?function(x){return Ur(x,_.length===1?_[0]:_)}:_}):a=[Nt];var p=-1;a=qe(a,Zt(he()));var g=mp(o,function(_,x,E){var P=qe(a,function(U){return U(_)});return{criteria:P,index:++p,value:_}});return QT(g,function(_,x){return OB(_,x,c)})}function TB(o,a){return Cp(o,a,function(c,p){return Zc(o,p)})}function Cp(o,a,c){for(var p=-1,g=a.length,_={};++p<g;){var x=a[p],E=Ur(o,x);c(E,x)&&Zo(_,Cr(x,o),E)}return _}function AB(o){return function(a){return Ur(a,o)}}function mc(o,a,c,p){var g=p?XT:mi,_=-1,x=a.length,E=o;for(o===a&&(a=Bt(a)),c&&(E=qe(o,Zt(c)));++_<x;)for(var P=0,U=a[_],W=c?c(U):U;(P=g(E,W,P,p))>-1;)E!==o&&Zs.call(E,P,1),Zs.call(o,P,1);return o}function wp(o,a){for(var c=o?a.length:0,p=c-1;c--;){var g=a[c];if(c==p||g!==_){var _=g;Wn(g)?Zs.call(o,g,1):_c(o,g)}}return o}function gc(o,a){return o+Ws(tp()*(a-o+1))}function BB(o,a,c,p){for(var g=-1,_=at(Us((a-o)/(c||1)),0),x=M(_);_--;)x[p?_:++g]=o,o+=c;return x}function yc(o,a){var c="";if(!o||a<1||a>xe)return c;do a%2&&(c+=o),a=Ws(a/2),a&&(o+=o);while(a);return c}function Ve(o,a){return Fc(Jp(o,a,Nt),o+"")}function PB(o){return ip(Ti(o))}function VB(o,a){var c=Ti(o);return la(c,$r(a,0,c.length))}function Zo(o,a,c,p){if(!Je(o))return o;a=Cr(a,o);for(var g=-1,_=a.length,x=_-1,E=o;E!=null&&++g<_;){var P=Vn(a[g]),U=c;if(P==="__proto__"||P==="constructor"||P==="prototype")return o;if(g!=x){var W=E[P];U=p?p(W,P,E):n,U===n&&(U=Je(W)?W:Wn(a[g+1])?[]:{})}Lo(E,P,U),E=E[P]}return o}var bp=Hs?function(o,a){return Hs.set(o,a),o}:Nt,NB=$s?function(o,a){return $s(o,"toString",{configurable:!0,enumerable:!1,value:Uc(a),writable:!0})}:Nt;function DB(o){return la(Ti(o))}function Qt(o,a,c){var p=-1,g=o.length;a<0&&(a=-a>g?0:g+a),c=c>g?g:c,c<0&&(c+=g),g=a>c?0:c-a>>>0,a>>>=0;for(var _=M(g);++p<g;)_[p]=o[p+a];return _}function FB(o,a){var c;return vr(o,function(p,g,_){return c=a(p,g,_),!c}),!!c}function Qs(o,a,c){var p=0,g=o==null?p:o.length;if(typeof a=="number"&&a===a&&g<=Lr){for(;p<g;){var _=p+g>>>1,x=o[_];x!==null&&!Ut(x)&&(c?x<=a:x<a)?p=_+1:g=_}return g}return vc(o,a,Nt,c)}function vc(o,a,c,p){var g=0,_=o==null?0:o.length;if(_===0)return 0;a=c(a);for(var x=a!==a,E=a===null,P=Ut(a),U=a===n;g<_;){var W=Ws((g+_)/2),q=c(o[W]),te=q!==n,le=q===null,fe=q===q,Pe=Ut(q);if(x)var me=p||fe;else U?me=fe&&(p||te):E?me=fe&&te&&(p||!le):P?me=fe&&te&&!le&&(p||!Pe):le||Pe?me=!1:me=p?q<=a:q<a;me?g=W+1:_=W}return vt(_,xo)}function xp(o,a){for(var c=-1,p=o.length,g=0,_=[];++c<p;){var x=o[c],E=a?a(x):x;if(!c||!wn(E,P)){var P=E;_[g++]=x===0?0:x}}return _}function kp(o){return typeof o=="number"?o:Ut(o)?jt:+o}function $t(o){if(typeof o=="string")return o;if(ke(o))return qe(o,$t)+"";if(Ut(o))return np?np.call(o):"";var a=o+"";return a=="0"&&1/o==-ve?"-0":a}function _r(o,a,c){var p=-1,g=Ns,_=o.length,x=!0,E=[],P=E;if(c)x=!1,g=jl;else if(_>=s){var U=a?null:WB(o);if(U)return Fs(U);x=!1,g=No,P=new Zr}else P=a?[]:E;e:for(;++p<_;){var W=o[p],q=a?a(W):W;if(W=c||W!==0?W:0,x&&q===q){for(var te=P.length;te--;)if(P[te]===q)continue e;a&&P.push(q),E.push(W)}else g(P,q,c)||(P!==E&&P.push(q),E.push(W))}return E}function _c(o,a){return a=Cr(a,o),o=Xp(o,a),o==null||delete o[Vn(en(a))]}function Sp(o,a,c,p){return Zo(o,a,c(Ur(o,a)),p)}function ea(o,a,c,p){for(var g=o.length,_=p?g:-1;(p?_--:++_<g)&&a(o[_],_,o););return c?Qt(o,p?0:_,p?_+1:g):Qt(o,p?_+1:0,p?g:_)}function Ep(o,a){var c=o;return c instanceof De&&(c=c.value()),ql(a,function(p,g){return g.func.apply(g.thisArg,mr([p],g.args))},c)}function Cc(o,a,c){var p=o.length;if(p<2)return p?_r(o[0]):[];for(var g=-1,_=M(p);++g<p;)for(var x=o[g],E=-1;++E<p;)E!=g&&(_[g]=Oo(_[g]||x,o[E],a,c));return _r(pt(_,1),a,c)}function Tp(o,a,c){for(var p=-1,g=o.length,_=a.length,x={};++p<g;){var E=p<_?a[p]:n;c(x,o[p],E)}return x}function wc(o){return tt(o)?o:[]}function bc(o){return typeof o=="function"?o:Nt}function Cr(o,a){return ke(o)?o:Vc(o,a)?[o]:nf(ze(o))}var RB=Ve;function wr(o,a,c){var p=o.length;return c=c===n?p:c,!a&&c>=p?o:Qt(o,a,c)}var Ap=bA||function(o){return ht.clearTimeout(o)};function Bp(o,a){if(a)return o.slice();var c=o.length,p=Yh?Yh(c):new o.constructor(c);return o.copy(p),p}function xc(o){var a=new o.constructor(o.byteLength);return new Gs(a).set(new Gs(o)),a}function MB(o,a){var c=a?xc(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.byteLength)}function IB(o){var a=new o.constructor(o.source,hh.exec(o));return a.lastIndex=o.lastIndex,a}function LB(o){return Io?$e(Io.call(o)):{}}function Pp(o,a){var c=a?xc(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.length)}function Vp(o,a){if(o!==a){var c=o!==n,p=o===null,g=o===o,_=Ut(o),x=a!==n,E=a===null,P=a===a,U=Ut(a);if(!E&&!U&&!_&&o>a||_&&x&&P&&!E&&!U||p&&x&&P||!c&&P||!g)return 1;if(!p&&!_&&!U&&o<a||U&&c&&g&&!p&&!_||E&&c&&g||!x&&g||!P)return-1}return 0}function OB(o,a,c){for(var p=-1,g=o.criteria,_=a.criteria,x=g.length,E=c.length;++p<x;){var P=Vp(g[p],_[p]);if(P){if(p>=E)return P;var U=c[p];return P*(U=="desc"?-1:1)}}return o.index-a.index}function Np(o,a,c,p){for(var g=-1,_=o.length,x=c.length,E=-1,P=a.length,U=at(_-x,0),W=M(P+U),q=!p;++E<P;)W[E]=a[E];for(;++g<x;)(q||g<_)&&(W[c[g]]=o[g]);for(;U--;)W[E++]=o[g++];return W}function Dp(o,a,c,p){for(var g=-1,_=o.length,x=-1,E=c.length,P=-1,U=a.length,W=at(_-E,0),q=M(W+U),te=!p;++g<W;)q[g]=o[g];for(var le=g;++P<U;)q[le+P]=a[P];for(;++x<E;)(te||g<_)&&(q[le+c[x]]=o[g++]);return q}function Bt(o,a){var c=-1,p=o.length;for(a||(a=M(p));++c<p;)a[c]=o[c];return a}function Pn(o,a,c,p){var g=!c;c||(c={});for(var _=-1,x=a.length;++_<x;){var E=a[_],P=p?p(c[E],o[E],E,c,o):n;P===n&&(P=o[E]),g?Zn(c,E,P):Lo(c,E,P)}return c}function GB(o,a){return Pn(o,Pc(o),a)}function zB(o,a){return Pn(o,Hp(o),a)}function ta(o,a){return function(c,p){var g=ke(c)?HT:cB,_=a?a():{};return g(c,o,he(p,2),_)}}function xi(o){return Ve(function(a,c){var p=-1,g=c.length,_=g>1?c[g-1]:n,x=g>2?c[2]:n;for(_=o.length>3&&typeof _=="function"?(g--,_):n,x&&St(c[0],c[1],x)&&(_=g<3?n:_,g=1),a=$e(a);++p<g;){var E=c[p];E&&o(a,E,p,_)}return a})}function Fp(o,a){return function(c,p){if(c==null)return c;if(!Pt(c))return o(c,p);for(var g=c.length,_=a?g:-1,x=$e(c);(a?_--:++_<g)&&p(x[_],_,x)!==!1;);return c}}function Rp(o){return function(a,c,p){for(var g=-1,_=$e(a),x=p(a),E=x.length;E--;){var P=x[o?E:++g];if(c(_[P],P,_)===!1)break}return a}}function ZB(o,a,c){var p=a&B,g=$o(o);function _(){var x=this&&this!==ht&&this instanceof _?g:o;return x.apply(p?c:this,arguments)}return _}function Mp(o){return function(a){a=ze(a);var c=gi(a)?_n(a):n,p=c?c[0]:a.charAt(0),g=c?wr(c,1).join(""):a.slice(1);return p[o]()+g}}function ki(o){return function(a){return ql(Rf(Ff(a).replace(NT,"")),o,"")}}function $o(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var c=bi(o.prototype),p=o.apply(c,a);return Je(p)?p:c}}function $B(o,a,c){var p=$o(o);function g(){for(var _=arguments.length,x=M(_),E=_,P=Si(g);E--;)x[E]=arguments[E];var U=_<3&&x[0]!==P&&x[_-1]!==P?[]:gr(x,P);if(_-=U.length,_<c)return zp(o,a,na,g.placeholder,n,x,U,n,n,c-_);var W=this&&this!==ht&&this instanceof g?p:o;return zt(W,this,x)}return g}function Ip(o){return function(a,c,p){var g=$e(a);if(!Pt(a)){var _=he(c,3);a=ut(a),c=function(E){return _(g[E],E,g)}}var x=o(a,c,p);return x>-1?g[_?a[x]:x]:n}}function Lp(o){return Un(function(a){var c=a.length,p=c,g=Jt.prototype.thru;for(o&&a.reverse();p--;){var _=a[p];if(typeof _!="function")throw new Yt(d);if(g&&!x&&sa(_)=="wrapper")var x=new Jt([],!0)}for(p=x?p:c;++p<c;){_=a[p];var E=sa(_),P=E=="wrapper"?Ac(_):n;P&&Nc(P[0])&&P[1]==($|L|z|N)&&!P[4].length&&P[9]==1?x=x[sa(P[0])].apply(x,P[3]):x=_.length==1&&Nc(_)?x[E]():x.thru(_)}return function(){var U=arguments,W=U[0];if(x&&U.length==1&&ke(W))return x.plant(W).value();for(var q=0,te=c?a[q].apply(this,U):W;++q<c;)te=a[q].call(this,te);return te}})}function na(o,a,c,p,g,_,x,E,P,U){var W=a&$,q=a&B,te=a&C,le=a&(L|j),fe=a&H,Pe=te?n:$o(o);function me(){for(var Ne=arguments.length,Fe=M(Ne),Wt=Ne;Wt--;)Fe[Wt]=arguments[Wt];if(le)var Et=Si(me),Ht=tA(Fe,Et);if(p&&(Fe=Np(Fe,p,g,le)),_&&(Fe=Dp(Fe,_,x,le)),Ne-=Ht,le&&Ne<U){var nt=gr(Fe,Et);return zp(o,a,na,me.placeholder,c,Fe,nt,E,P,U-Ne)}var bn=q?c:this,qn=te?bn[o]:o;return Ne=Fe.length,E?Fe=cP(Fe,E):fe&&Ne>1&&Fe.reverse(),W&&P<Ne&&(Fe.length=P),this&&this!==ht&&this instanceof me&&(qn=Pe||$o(qn)),qn.apply(bn,Fe)}return me}function Op(o,a){return function(c,p){return yB(c,o,a(p),{})}}function ra(o,a){return function(c,p){var g;if(c===n&&p===n)return a;if(c!==n&&(g=c),p!==n){if(g===n)return p;typeof c=="string"||typeof p=="string"?(c=$t(c),p=$t(p)):(c=kp(c),p=kp(p)),g=o(c,p)}return g}}function kc(o){return Un(function(a){return a=qe(a,Zt(he())),Ve(function(c){var p=this;return o(a,function(g){return zt(g,p,c)})})})}function ia(o,a){a=a===n?" ":$t(a);var c=a.length;if(c<2)return c?yc(a,o):a;var p=yc(a,Us(o/yi(a)));return gi(a)?wr(_n(p),0,o).join(""):p.slice(0,o)}function UB(o,a,c,p){var g=a&B,_=$o(o);function x(){for(var E=-1,P=arguments.length,U=-1,W=p.length,q=M(W+P),te=this&&this!==ht&&this instanceof x?_:o;++U<W;)q[U]=p[U];for(;P--;)q[U++]=arguments[++E];return zt(te,g?c:this,q)}return x}function Gp(o){return function(a,c,p){return p&&typeof p!="number"&&St(a,c,p)&&(c=p=n),a=jn(a),c===n?(c=a,a=0):c=jn(c),p=p===n?a<c?1:-1:jn(p),BB(a,c,p,o)}}function oa(o){return function(a,c){return typeof a=="string"&&typeof c=="string"||(a=tn(a),c=tn(c)),o(a,c)}}function zp(o,a,c,p,g,_,x,E,P,U){var W=a&L,q=W?x:n,te=W?n:x,le=W?_:n,fe=W?n:_;a|=W?z:K,a&=~(W?K:z),a&R||(a&=~(B|C));var Pe=[o,a,g,le,q,fe,te,E,P,U],me=c.apply(n,Pe);return Nc(o)&&Qp(me,Pe),me.placeholder=p,ef(me,o,a)}function Sc(o){var a=st[o];return function(c,p){if(c=tn(c),p=p==null?0:vt(Te(p),292),p&&ep(c)){var g=(ze(c)+"e").split("e"),_=a(g[0]+"e"+(+g[1]+p));return g=(ze(_)+"e").split("e"),+(g[0]+"e"+(+g[1]-p))}return a(c)}}var WB=Ci&&1/Fs(new Ci([,-0]))[1]==ve?function(o){return new Ci(o)}:jc;function Zp(o){return function(a){var c=_t(a);return c==yn?tc(a):c==vn?lA(a):eA(a,o(a))}}function $n(o,a,c,p,g,_,x,E){var P=a&C;if(!P&&typeof o!="function")throw new Yt(d);var U=p?p.length:0;if(U||(a&=~(z|K),p=g=n),x=x===n?x:at(Te(x),0),E=E===n?E:Te(E),U-=g?g.length:0,a&K){var W=p,q=g;p=g=n}var te=P?n:Ac(o),le=[o,a,c,p,g,W,q,_,x,E];if(te&&sP(le,te),o=le[0],a=le[1],c=le[2],p=le[3],g=le[4],E=le[9]=le[9]===n?P?0:o.length:at(le[9]-U,0),!E&&a&(L|j)&&(a&=~(L|j)),!a||a==B)var fe=ZB(o,a,c);else a==L||a==j?fe=$B(o,a,E):(a==z||a==(B|z))&&!g.length?fe=UB(o,a,c,p):fe=na.apply(n,le);var Pe=te?bp:Qp;return ef(Pe(fe,le),o,a)}function $p(o,a,c,p){return o===n||wn(o,_i[c])&&!Ze.call(p,c)?a:o}function Up(o,a,c,p,g,_){return Je(o)&&Je(a)&&(_.set(a,o),Xs(o,a,n,Up,_),_.delete(a)),o}function HB(o){return Ho(o)?n:o}function Wp(o,a,c,p,g,_){var x=c&D,E=o.length,P=a.length;if(E!=P&&!(x&&P>E))return!1;var U=_.get(o),W=_.get(a);if(U&&W)return U==a&&W==o;var q=-1,te=!0,le=c&T?new Zr:n;for(_.set(o,a),_.set(a,o);++q<E;){var fe=o[q],Pe=a[q];if(p)var me=x?p(Pe,fe,q,a,o,_):p(fe,Pe,q,o,a,_);if(me!==n){if(me)continue;te=!1;break}if(le){if(!Kl(a,function(Ne,Fe){if(!No(le,Fe)&&(fe===Ne||g(fe,Ne,c,p,_)))return le.push(Fe)})){te=!1;break}}else if(!(fe===Pe||g(fe,Pe,c,p,_))){te=!1;break}}return _.delete(o),_.delete(a),te}function jB(o,a,c,p,g,_,x){switch(c){case pi:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Vo:return!(o.byteLength!=a.byteLength||!_(new Gs(o),new Gs(a)));case So:case Eo:case To:return wn(+o,+a);case Es:return o.name==a.name&&o.message==a.message;case Ao:case Bo:return o==a+"";case yn:var E=tc;case vn:var P=p&D;if(E||(E=Fs),o.size!=a.size&&!P)return!1;var U=x.get(o);if(U)return U==a;p|=T,x.set(o,a);var W=Wp(E(o),E(a),p,g,_,x);return x.delete(o),W;case As:if(Io)return Io.call(o)==Io.call(a)}return!1}function qB(o,a,c,p,g,_){var x=c&D,E=Ec(o),P=E.length,U=Ec(a),W=U.length;if(P!=W&&!x)return!1;for(var q=P;q--;){var te=E[q];if(!(x?te in a:Ze.call(a,te)))return!1}var le=_.get(o),fe=_.get(a);if(le&&fe)return le==a&&fe==o;var Pe=!0;_.set(o,a),_.set(a,o);for(var me=x;++q<P;){te=E[q];var Ne=o[te],Fe=a[te];if(p)var Wt=x?p(Fe,Ne,te,a,o,_):p(Ne,Fe,te,o,a,_);if(!(Wt===n?Ne===Fe||g(Ne,Fe,c,p,_):Wt)){Pe=!1;break}me||(me=te=="constructor")}if(Pe&&!me){var Et=o.constructor,Ht=a.constructor;Et!=Ht&&"constructor"in o&&"constructor"in a&&!(typeof Et=="function"&&Et instanceof Et&&typeof Ht=="function"&&Ht instanceof Ht)&&(Pe=!1)}return _.delete(o),_.delete(a),Pe}function Un(o){return Fc(Jp(o,n,af),o+"")}function Ec(o){return up(o,ut,Pc)}function Tc(o){return up(o,Vt,Hp)}var Ac=Hs?function(o){return Hs.get(o)}:jc;function sa(o){for(var a=o.name+"",c=wi[a],p=Ze.call(wi,a)?c.length:0;p--;){var g=c[p],_=g.func;if(_==null||_==o)return g.name}return a}function Si(o){var a=Ze.call(y,"placeholder")?y:o;return a.placeholder}function he(){var o=y.iteratee||Wc;return o=o===Wc?fp:o,arguments.length?o(arguments[0],arguments[1]):o}function aa(o,a){var c=o.__data__;return nP(a)?c[typeof a=="string"?"string":"hash"]:c.map}function Bc(o){for(var a=ut(o),c=a.length;c--;){var p=a[c],g=o[p];a[c]=[p,g,Kp(g)]}return a}function Wr(o,a){var c=oA(o,a);return pp(c)?c:n}function KB(o){var a=Ze.call(o,Gr),c=o[Gr];try{o[Gr]=n;var p=!0}catch{}var g=Ls.call(o);return p&&(a?o[Gr]=c:delete o[Gr]),g}var Pc=rc?function(o){return o==null?[]:(o=$e(o),fr(rc(o),function(a){return Xh.call(o,a)}))}:qc,Hp=rc?function(o){for(var a=[];o;)mr(a,Pc(o)),o=zs(o);return a}:qc,_t=kt;(ic&&_t(new ic(new ArrayBuffer(1)))!=pi||Fo&&_t(new Fo)!=yn||oc&&_t(oc.resolve())!=lh||Ci&&_t(new Ci)!=vn||Ro&&_t(new Ro)!=Po)&&(_t=function(o){var a=kt(o),c=a==On?o.constructor:n,p=c?Hr(c):"";if(p)switch(p){case VA:return pi;case NA:return yn;case DA:return lh;case FA:return vn;case RA:return Po}return a});function YB(o,a,c){for(var p=-1,g=c.length;++p<g;){var _=c[p],x=_.size;switch(_.type){case"drop":o+=x;break;case"dropRight":a-=x;break;case"take":a=vt(a,o+x);break;case"takeRight":o=at(o,a-x);break}}return{start:o,end:a}}function JB(o){var a=o.match(rT);return a?a[1].split(iT):[]}function jp(o,a,c){a=Cr(a,o);for(var p=-1,g=a.length,_=!1;++p<g;){var x=Vn(a[p]);if(!(_=o!=null&&c(o,x)))break;o=o[x]}return _||++p!=g?_:(g=o==null?0:o.length,!!g&&fa(g)&&Wn(x,g)&&(ke(o)||jr(o)))}function XB(o){var a=o.length,c=new o.constructor(a);return a&&typeof o[0]=="string"&&Ze.call(o,"index")&&(c.index=o.index,c.input=o.input),c}function qp(o){return typeof o.constructor=="function"&&!Uo(o)?bi(zs(o)):{}}function QB(o,a,c){var p=o.constructor;switch(a){case Vo:return xc(o);case So:case Eo:return new p(+o);case pi:return MB(o,c);case Bl:case Pl:case Vl:case Nl:case Dl:case Fl:case Rl:case Ml:case Il:return Pp(o,c);case yn:return new p;case To:case Bo:return new p(o);case Ao:return IB(o);case vn:return new p;case As:return LB(o)}}function eP(o,a){var c=a.length;if(!c)return o;var p=c-1;return a[p]=(c>1?"& ":"")+a[p],a=a.join(c>2?", ":" "),o.replace(nT,`{
71
+ /* [wrapped with `+a+`] */
72
+ `)}function tP(o){return ke(o)||jr(o)||!!(Qh&&o&&o[Qh])}function Wn(o,a){var c=typeof o;return a=a??xe,!!a&&(c=="number"||c!="symbol"&&pT.test(o))&&o>-1&&o%1==0&&o<a}function St(o,a,c){if(!Je(c))return!1;var p=typeof a;return(p=="number"?Pt(c)&&Wn(a,c.length):p=="string"&&a in c)?wn(c[a],o):!1}function Vc(o,a){if(ke(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||Ut(o)?!0:XE.test(o)||!JE.test(o)||a!=null&&o in $e(a)}function nP(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function Nc(o){var a=sa(o),c=y[a];if(typeof c!="function"||!(a in De.prototype))return!1;if(o===c)return!0;var p=Ac(c);return!!p&&o===p[0]}function rP(o){return!!Kh&&Kh in o}var iP=Ms?Hn:Kc;function Uo(o){var a=o&&o.constructor,c=typeof a=="function"&&a.prototype||_i;return o===c}function Kp(o){return o===o&&!Je(o)}function Yp(o,a){return function(c){return c==null?!1:c[o]===a&&(a!==n||o in $e(c))}}function oP(o){var a=ha(o,function(p){return c.size===f&&c.clear(),p}),c=a.cache;return a}function sP(o,a){var c=o[1],p=a[1],g=c|p,_=g<(B|C|$),x=p==$&&c==L||p==$&&c==N&&o[7].length<=a[8]||p==($|N)&&a[7].length<=a[8]&&c==L;if(!(_||x))return o;p&B&&(o[2]=a[2],g|=c&B?0:R);var E=a[3];if(E){var P=o[3];o[3]=P?Np(P,E,a[4]):E,o[4]=P?gr(o[3],m):a[4]}return E=a[5],E&&(P=o[5],o[5]=P?Dp(P,E,a[6]):E,o[6]=P?gr(o[5],m):a[6]),E=a[7],E&&(o[7]=E),p&$&&(o[8]=o[8]==null?a[8]:vt(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=g,o}function aP(o){var a=[];if(o!=null)for(var c in $e(o))a.push(c);return a}function lP(o){return Ls.call(o)}function Jp(o,a,c){return a=at(a===n?o.length-1:a,0),function(){for(var p=arguments,g=-1,_=at(p.length-a,0),x=M(_);++g<_;)x[g]=p[a+g];g=-1;for(var E=M(a+1);++g<a;)E[g]=p[g];return E[a]=c(x),zt(o,this,E)}}function Xp(o,a){return a.length<2?o:Ur(o,Qt(a,0,-1))}function cP(o,a){for(var c=o.length,p=vt(a.length,c),g=Bt(o);p--;){var _=a[p];o[p]=Wn(_,c)?g[_]:n}return o}function Dc(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var Qp=tf(bp),Wo=kA||function(o,a){return ht.setTimeout(o,a)},Fc=tf(NB);function ef(o,a,c){var p=a+"";return Fc(o,eP(p,dP(JB(p),c)))}function tf(o){var a=0,c=0;return function(){var p=AA(),g=Z-(p-c);if(c=p,g>0){if(++a>=ue)return arguments[0]}else a=0;return o.apply(n,arguments)}}function la(o,a){var c=-1,p=o.length,g=p-1;for(a=a===n?p:a;++c<a;){var _=gc(c,g),x=o[_];o[_]=o[c],o[c]=x}return o.length=a,o}var nf=oP(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(QE,function(c,p,g,_){a.push(g?_.replace(aT,"$1"):p||c)}),a});function Vn(o){if(typeof o=="string"||Ut(o))return o;var a=o+"";return a=="0"&&1/o==-ve?"-0":a}function Hr(o){if(o!=null){try{return Is.call(o)}catch{}try{return o+""}catch{}}return""}function dP(o,a){return Kt(ko,function(c){var p="_."+c[0];a&c[1]&&!Ns(o,p)&&o.push(p)}),o.sort()}function rf(o){if(o instanceof De)return o.clone();var a=new Jt(o.__wrapped__,o.__chain__);return a.__actions__=Bt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function uP(o,a,c){(c?St(o,a,c):a===n)?a=1:a=at(Te(a),0);var p=o==null?0:o.length;if(!p||a<1)return[];for(var g=0,_=0,x=M(Us(p/a));g<p;)x[_++]=Qt(o,g,g+=a);return x}function hP(o){for(var a=-1,c=o==null?0:o.length,p=0,g=[];++a<c;){var _=o[a];_&&(g[p++]=_)}return g}function pP(){var o=arguments.length;if(!o)return[];for(var a=M(o-1),c=arguments[0],p=o;p--;)a[p-1]=arguments[p];return mr(ke(c)?Bt(c):[c],pt(a,1))}var fP=Ve(function(o,a){return tt(o)?Oo(o,pt(a,1,tt,!0)):[]}),mP=Ve(function(o,a){var c=en(a);return tt(c)&&(c=n),tt(o)?Oo(o,pt(a,1,tt,!0),he(c,2)):[]}),gP=Ve(function(o,a){var c=en(a);return tt(c)&&(c=n),tt(o)?Oo(o,pt(a,1,tt,!0),n,c):[]});function yP(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:Te(a),Qt(o,a<0?0:a,p)):[]}function vP(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:Te(a),a=p-a,Qt(o,0,a<0?0:a)):[]}function _P(o,a){return o&&o.length?ea(o,he(a,3),!0,!0):[]}function CP(o,a){return o&&o.length?ea(o,he(a,3),!0):[]}function wP(o,a,c,p){var g=o==null?0:o.length;return g?(c&&typeof c!="number"&&St(o,a,c)&&(c=0,p=g),pB(o,a,c,p)):[]}function of(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var g=c==null?0:Te(c);return g<0&&(g=at(p+g,0)),Ds(o,he(a,3),g)}function sf(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var g=p-1;return c!==n&&(g=Te(c),g=c<0?at(p+g,0):vt(g,p-1)),Ds(o,he(a,3),g,!0)}function af(o){var a=o==null?0:o.length;return a?pt(o,1):[]}function bP(o){var a=o==null?0:o.length;return a?pt(o,ve):[]}function xP(o,a){var c=o==null?0:o.length;return c?(a=a===n?1:Te(a),pt(o,a)):[]}function kP(o){for(var a=-1,c=o==null?0:o.length,p={};++a<c;){var g=o[a];p[g[0]]=g[1]}return p}function lf(o){return o&&o.length?o[0]:n}function SP(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var g=c==null?0:Te(c);return g<0&&(g=at(p+g,0)),mi(o,a,g)}function EP(o){var a=o==null?0:o.length;return a?Qt(o,0,-1):[]}var TP=Ve(function(o){var a=qe(o,wc);return a.length&&a[0]===o[0]?uc(a):[]}),AP=Ve(function(o){var a=en(o),c=qe(o,wc);return a===en(c)?a=n:c.pop(),c.length&&c[0]===o[0]?uc(c,he(a,2)):[]}),BP=Ve(function(o){var a=en(o),c=qe(o,wc);return a=typeof a=="function"?a:n,a&&c.pop(),c.length&&c[0]===o[0]?uc(c,n,a):[]});function PP(o,a){return o==null?"":EA.call(o,a)}function en(o){var a=o==null?0:o.length;return a?o[a-1]:n}function VP(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var g=p;return c!==n&&(g=Te(c),g=g<0?at(p+g,0):vt(g,p-1)),a===a?dA(o,a,g):Ds(o,zh,g,!0)}function NP(o,a){return o&&o.length?vp(o,Te(a)):n}var DP=Ve(cf);function cf(o,a){return o&&o.length&&a&&a.length?mc(o,a):o}function FP(o,a,c){return o&&o.length&&a&&a.length?mc(o,a,he(c,2)):o}function RP(o,a,c){return o&&o.length&&a&&a.length?mc(o,a,n,c):o}var MP=Un(function(o,a){var c=o==null?0:o.length,p=ac(o,a);return wp(o,qe(a,function(g){return Wn(g,c)?+g:g}).sort(Vp)),p});function IP(o,a){var c=[];if(!(o&&o.length))return c;var p=-1,g=[],_=o.length;for(a=he(a,3);++p<_;){var x=o[p];a(x,p,o)&&(c.push(x),g.push(p))}return wp(o,g),c}function Rc(o){return o==null?o:PA.call(o)}function LP(o,a,c){var p=o==null?0:o.length;return p?(c&&typeof c!="number"&&St(o,a,c)?(a=0,c=p):(a=a==null?0:Te(a),c=c===n?p:Te(c)),Qt(o,a,c)):[]}function OP(o,a){return Qs(o,a)}function GP(o,a,c){return vc(o,a,he(c,2))}function zP(o,a){var c=o==null?0:o.length;if(c){var p=Qs(o,a);if(p<c&&wn(o[p],a))return p}return-1}function ZP(o,a){return Qs(o,a,!0)}function $P(o,a,c){return vc(o,a,he(c,2),!0)}function UP(o,a){var c=o==null?0:o.length;if(c){var p=Qs(o,a,!0)-1;if(wn(o[p],a))return p}return-1}function WP(o){return o&&o.length?xp(o):[]}function HP(o,a){return o&&o.length?xp(o,he(a,2)):[]}function jP(o){var a=o==null?0:o.length;return a?Qt(o,1,a):[]}function qP(o,a,c){return o&&o.length?(a=c||a===n?1:Te(a),Qt(o,0,a<0?0:a)):[]}function KP(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:Te(a),a=p-a,Qt(o,a<0?0:a,p)):[]}function YP(o,a){return o&&o.length?ea(o,he(a,3),!1,!0):[]}function JP(o,a){return o&&o.length?ea(o,he(a,3)):[]}var XP=Ve(function(o){return _r(pt(o,1,tt,!0))}),QP=Ve(function(o){var a=en(o);return tt(a)&&(a=n),_r(pt(o,1,tt,!0),he(a,2))}),eV=Ve(function(o){var a=en(o);return a=typeof a=="function"?a:n,_r(pt(o,1,tt,!0),n,a)});function tV(o){return o&&o.length?_r(o):[]}function nV(o,a){return o&&o.length?_r(o,he(a,2)):[]}function rV(o,a){return a=typeof a=="function"?a:n,o&&o.length?_r(o,n,a):[]}function Mc(o){if(!(o&&o.length))return[];var a=0;return o=fr(o,function(c){if(tt(c))return a=at(c.length,a),!0}),Ql(a,function(c){return qe(o,Yl(c))})}function df(o,a){if(!(o&&o.length))return[];var c=Mc(o);return a==null?c:qe(c,function(p){return zt(a,n,p)})}var iV=Ve(function(o,a){return tt(o)?Oo(o,a):[]}),oV=Ve(function(o){return Cc(fr(o,tt))}),sV=Ve(function(o){var a=en(o);return tt(a)&&(a=n),Cc(fr(o,tt),he(a,2))}),aV=Ve(function(o){var a=en(o);return a=typeof a=="function"?a:n,Cc(fr(o,tt),n,a)}),lV=Ve(Mc);function cV(o,a){return Tp(o||[],a||[],Lo)}function dV(o,a){return Tp(o||[],a||[],Zo)}var uV=Ve(function(o){var a=o.length,c=a>1?o[a-1]:n;return c=typeof c=="function"?(o.pop(),c):n,df(o,c)});function uf(o){var a=y(o);return a.__chain__=!0,a}function hV(o,a){return a(o),o}function ca(o,a){return a(o)}var pV=Un(function(o){var a=o.length,c=a?o[0]:0,p=this.__wrapped__,g=function(_){return ac(_,o)};return a>1||this.__actions__.length||!(p instanceof De)||!Wn(c)?this.thru(g):(p=p.slice(c,+c+(a?1:0)),p.__actions__.push({func:ca,args:[g],thisArg:n}),new Jt(p,this.__chain__).thru(function(_){return a&&!_.length&&_.push(n),_}))});function fV(){return uf(this)}function mV(){return new Jt(this.value(),this.__chain__)}function gV(){this.__values__===n&&(this.__values__=Sf(this.value()));var o=this.__index__>=this.__values__.length,a=o?n:this.__values__[this.__index__++];return{done:o,value:a}}function yV(){return this}function vV(o){for(var a,c=this;c instanceof qs;){var p=rf(c);p.__index__=0,p.__values__=n,a?g.__wrapped__=p:a=p;var g=p;c=c.__wrapped__}return g.__wrapped__=o,a}function _V(){var o=this.__wrapped__;if(o instanceof De){var a=o;return this.__actions__.length&&(a=new De(this)),a=a.reverse(),a.__actions__.push({func:ca,args:[Rc],thisArg:n}),new Jt(a,this.__chain__)}return this.thru(Rc)}function CV(){return Ep(this.__wrapped__,this.__actions__)}var wV=ta(function(o,a,c){Ze.call(o,c)?++o[c]:Zn(o,c,1)});function bV(o,a,c){var p=ke(o)?Oh:hB;return c&&St(o,a,c)&&(a=n),p(o,he(a,3))}function xV(o,a){var c=ke(o)?fr:cp;return c(o,he(a,3))}var kV=Ip(of),SV=Ip(sf);function EV(o,a){return pt(da(o,a),1)}function TV(o,a){return pt(da(o,a),ve)}function AV(o,a,c){return c=c===n?1:Te(c),pt(da(o,a),c)}function hf(o,a){var c=ke(o)?Kt:vr;return c(o,he(a,3))}function pf(o,a){var c=ke(o)?jT:lp;return c(o,he(a,3))}var BV=ta(function(o,a,c){Ze.call(o,c)?o[c].push(a):Zn(o,c,[a])});function PV(o,a,c,p){o=Pt(o)?o:Ti(o),c=c&&!p?Te(c):0;var g=o.length;return c<0&&(c=at(g+c,0)),ma(o)?c<=g&&o.indexOf(a,c)>-1:!!g&&mi(o,a,c)>-1}var VV=Ve(function(o,a,c){var p=-1,g=typeof a=="function",_=Pt(o)?M(o.length):[];return vr(o,function(x){_[++p]=g?zt(a,x,c):Go(x,a,c)}),_}),NV=ta(function(o,a,c){Zn(o,c,a)});function da(o,a){var c=ke(o)?qe:mp;return c(o,he(a,3))}function DV(o,a,c,p){return o==null?[]:(ke(a)||(a=a==null?[]:[a]),c=p?n:c,ke(c)||(c=c==null?[]:[c]),_p(o,a,c))}var FV=ta(function(o,a,c){o[c?0:1].push(a)},function(){return[[],[]]});function RV(o,a,c){var p=ke(o)?ql:$h,g=arguments.length<3;return p(o,he(a,4),c,g,vr)}function MV(o,a,c){var p=ke(o)?qT:$h,g=arguments.length<3;return p(o,he(a,4),c,g,lp)}function IV(o,a){var c=ke(o)?fr:cp;return c(o,pa(he(a,3)))}function LV(o){var a=ke(o)?ip:PB;return a(o)}function OV(o,a,c){(c?St(o,a,c):a===n)?a=1:a=Te(a);var p=ke(o)?aB:VB;return p(o,a)}function GV(o){var a=ke(o)?lB:DB;return a(o)}function zV(o){if(o==null)return 0;if(Pt(o))return ma(o)?yi(o):o.length;var a=_t(o);return a==yn||a==vn?o.size:pc(o).length}function ZV(o,a,c){var p=ke(o)?Kl:FB;return c&&St(o,a,c)&&(a=n),p(o,he(a,3))}var $V=Ve(function(o,a){if(o==null)return[];var c=a.length;return c>1&&St(o,a[0],a[1])?a=[]:c>2&&St(a[0],a[1],a[2])&&(a=[a[0]]),_p(o,pt(a,1),[])}),ua=xA||function(){return ht.Date.now()};function UV(o,a){if(typeof a!="function")throw new Yt(d);return o=Te(o),function(){if(--o<1)return a.apply(this,arguments)}}function ff(o,a,c){return a=c?n:a,a=o&&a==null?o.length:a,$n(o,$,n,n,n,n,a)}function mf(o,a){var c;if(typeof a!="function")throw new Yt(d);return o=Te(o),function(){return--o>0&&(c=a.apply(this,arguments)),o<=1&&(a=n),c}}var Ic=Ve(function(o,a,c){var p=B;if(c.length){var g=gr(c,Si(Ic));p|=z}return $n(o,p,a,c,g)}),gf=Ve(function(o,a,c){var p=B|C;if(c.length){var g=gr(c,Si(gf));p|=z}return $n(a,p,o,c,g)});function yf(o,a,c){a=c?n:a;var p=$n(o,L,n,n,n,n,n,a);return p.placeholder=yf.placeholder,p}function vf(o,a,c){a=c?n:a;var p=$n(o,j,n,n,n,n,n,a);return p.placeholder=vf.placeholder,p}function _f(o,a,c){var p,g,_,x,E,P,U=0,W=!1,q=!1,te=!0;if(typeof o!="function")throw new Yt(d);a=tn(a)||0,Je(c)&&(W=!!c.leading,q="maxWait"in c,_=q?at(tn(c.maxWait)||0,a):_,te="trailing"in c?!!c.trailing:te);function le(nt){var bn=p,qn=g;return p=g=n,U=nt,x=o.apply(qn,bn),x}function fe(nt){return U=nt,E=Wo(Ne,a),W?le(nt):x}function Pe(nt){var bn=nt-P,qn=nt-U,Lf=a-bn;return q?vt(Lf,_-qn):Lf}function me(nt){var bn=nt-P,qn=nt-U;return P===n||bn>=a||bn<0||q&&qn>=_}function Ne(){var nt=ua();if(me(nt))return Fe(nt);E=Wo(Ne,Pe(nt))}function Fe(nt){return E=n,te&&p?le(nt):(p=g=n,x)}function Wt(){E!==n&&Ap(E),U=0,p=P=g=E=n}function Et(){return E===n?x:Fe(ua())}function Ht(){var nt=ua(),bn=me(nt);if(p=arguments,g=this,P=nt,bn){if(E===n)return fe(P);if(q)return Ap(E),E=Wo(Ne,a),le(P)}return E===n&&(E=Wo(Ne,a)),x}return Ht.cancel=Wt,Ht.flush=Et,Ht}var WV=Ve(function(o,a){return ap(o,1,a)}),HV=Ve(function(o,a,c){return ap(o,tn(a)||0,c)});function jV(o){return $n(o,H)}function ha(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new Yt(d);var c=function(){var p=arguments,g=a?a.apply(this,p):p[0],_=c.cache;if(_.has(g))return _.get(g);var x=o.apply(this,p);return c.cache=_.set(g,x)||_,x};return c.cache=new(ha.Cache||zn),c}ha.Cache=zn;function pa(o){if(typeof o!="function")throw new Yt(d);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function qV(o){return mf(2,o)}var KV=RB(function(o,a){a=a.length==1&&ke(a[0])?qe(a[0],Zt(he())):qe(pt(a,1),Zt(he()));var c=a.length;return Ve(function(p){for(var g=-1,_=vt(p.length,c);++g<_;)p[g]=a[g].call(this,p[g]);return zt(o,this,p)})}),Lc=Ve(function(o,a){var c=gr(a,Si(Lc));return $n(o,z,n,a,c)}),Cf=Ve(function(o,a){var c=gr(a,Si(Cf));return $n(o,K,n,a,c)}),YV=Un(function(o,a){return $n(o,N,n,n,n,a)});function JV(o,a){if(typeof o!="function")throw new Yt(d);return a=a===n?a:Te(a),Ve(o,a)}function XV(o,a){if(typeof o!="function")throw new Yt(d);return a=a==null?0:at(Te(a),0),Ve(function(c){var p=c[a],g=wr(c,0,a);return p&&mr(g,p),zt(o,this,g)})}function QV(o,a,c){var p=!0,g=!0;if(typeof o!="function")throw new Yt(d);return Je(c)&&(p="leading"in c?!!c.leading:p,g="trailing"in c?!!c.trailing:g),_f(o,a,{leading:p,maxWait:a,trailing:g})}function eN(o){return ff(o,1)}function tN(o,a){return Lc(bc(a),o)}function nN(){if(!arguments.length)return[];var o=arguments[0];return ke(o)?o:[o]}function rN(o){return Xt(o,k)}function iN(o,a){return a=typeof a=="function"?a:n,Xt(o,k,a)}function oN(o){return Xt(o,v|k)}function sN(o,a){return a=typeof a=="function"?a:n,Xt(o,v|k,a)}function aN(o,a){return a==null||sp(o,a,ut(a))}function wn(o,a){return o===a||o!==o&&a!==a}var lN=oa(dc),cN=oa(function(o,a){return o>=a}),jr=hp(function(){return arguments}())?hp:function(o){return Qe(o)&&Ze.call(o,"callee")&&!Xh.call(o,"callee")},ke=M.isArray,dN=Dh?Zt(Dh):vB;function Pt(o){return o!=null&&fa(o.length)&&!Hn(o)}function tt(o){return Qe(o)&&Pt(o)}function uN(o){return o===!0||o===!1||Qe(o)&&kt(o)==So}var br=SA||Kc,hN=Fh?Zt(Fh):_B;function pN(o){return Qe(o)&&o.nodeType===1&&!Ho(o)}function fN(o){if(o==null)return!0;if(Pt(o)&&(ke(o)||typeof o=="string"||typeof o.splice=="function"||br(o)||Ei(o)||jr(o)))return!o.length;var a=_t(o);if(a==yn||a==vn)return!o.size;if(Uo(o))return!pc(o).length;for(var c in o)if(Ze.call(o,c))return!1;return!0}function mN(o,a){return zo(o,a)}function gN(o,a,c){c=typeof c=="function"?c:n;var p=c?c(o,a):n;return p===n?zo(o,a,n,c):!!p}function Oc(o){if(!Qe(o))return!1;var a=kt(o);return a==Es||a==OE||typeof o.message=="string"&&typeof o.name=="string"&&!Ho(o)}function yN(o){return typeof o=="number"&&ep(o)}function Hn(o){if(!Je(o))return!1;var a=kt(o);return a==Ts||a==ah||a==LE||a==zE}function wf(o){return typeof o=="number"&&o==Te(o)}function fa(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=xe}function Je(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function Qe(o){return o!=null&&typeof o=="object"}var bf=Rh?Zt(Rh):wB;function vN(o,a){return o===a||hc(o,a,Bc(a))}function _N(o,a,c){return c=typeof c=="function"?c:n,hc(o,a,Bc(a),c)}function CN(o){return xf(o)&&o!=+o}function wN(o){if(iP(o))throw new be(l);return pp(o)}function bN(o){return o===null}function xN(o){return o==null}function xf(o){return typeof o=="number"||Qe(o)&&kt(o)==To}function Ho(o){if(!Qe(o)||kt(o)!=On)return!1;var a=zs(o);if(a===null)return!0;var c=Ze.call(a,"constructor")&&a.constructor;return typeof c=="function"&&c instanceof c&&Is.call(c)==_A}var Gc=Mh?Zt(Mh):bB;function kN(o){return wf(o)&&o>=-xe&&o<=xe}var kf=Ih?Zt(Ih):xB;function ma(o){return typeof o=="string"||!ke(o)&&Qe(o)&&kt(o)==Bo}function Ut(o){return typeof o=="symbol"||Qe(o)&&kt(o)==As}var Ei=Lh?Zt(Lh):kB;function SN(o){return o===n}function EN(o){return Qe(o)&&_t(o)==Po}function TN(o){return Qe(o)&&kt(o)==$E}var AN=oa(fc),BN=oa(function(o,a){return o<=a});function Sf(o){if(!o)return[];if(Pt(o))return ma(o)?_n(o):Bt(o);if(Do&&o[Do])return aA(o[Do]());var a=_t(o),c=a==yn?tc:a==vn?Fs:Ti;return c(o)}function jn(o){if(!o)return o===0?o:0;if(o=tn(o),o===ve||o===-ve){var a=o<0?-1:1;return a*Gt}return o===o?o:0}function Te(o){var a=jn(o),c=a%1;return a===a?c?a-c:a:0}function Ef(o){return o?$r(Te(o),0,At):0}function tn(o){if(typeof o=="number")return o;if(Ut(o))return jt;if(Je(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=Je(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=Uh(o);var c=dT.test(o);return c||hT.test(o)?UT(o.slice(2),c?2:8):cT.test(o)?jt:+o}function Tf(o){return Pn(o,Vt(o))}function PN(o){return o?$r(Te(o),-xe,xe):o===0?o:0}function ze(o){return o==null?"":$t(o)}var VN=xi(function(o,a){if(Uo(a)||Pt(a)){Pn(a,ut(a),o);return}for(var c in a)Ze.call(a,c)&&Lo(o,c,a[c])}),Af=xi(function(o,a){Pn(a,Vt(a),o)}),ga=xi(function(o,a,c,p){Pn(a,Vt(a),o,p)}),NN=xi(function(o,a,c,p){Pn(a,ut(a),o,p)}),DN=Un(ac);function FN(o,a){var c=bi(o);return a==null?c:op(c,a)}var RN=Ve(function(o,a){o=$e(o);var c=-1,p=a.length,g=p>2?a[2]:n;for(g&&St(a[0],a[1],g)&&(p=1);++c<p;)for(var _=a[c],x=Vt(_),E=-1,P=x.length;++E<P;){var U=x[E],W=o[U];(W===n||wn(W,_i[U])&&!Ze.call(o,U))&&(o[U]=_[U])}return o}),MN=Ve(function(o){return o.push(n,Up),zt(Bf,n,o)});function IN(o,a){return Gh(o,he(a,3),Bn)}function LN(o,a){return Gh(o,he(a,3),cc)}function ON(o,a){return o==null?o:lc(o,he(a,3),Vt)}function GN(o,a){return o==null?o:dp(o,he(a,3),Vt)}function zN(o,a){return o&&Bn(o,he(a,3))}function ZN(o,a){return o&&cc(o,he(a,3))}function $N(o){return o==null?[]:Js(o,ut(o))}function UN(o){return o==null?[]:Js(o,Vt(o))}function zc(o,a,c){var p=o==null?n:Ur(o,a);return p===n?c:p}function WN(o,a){return o!=null&&jp(o,a,fB)}function Zc(o,a){return o!=null&&jp(o,a,mB)}var HN=Op(function(o,a,c){a!=null&&typeof a.toString!="function"&&(a=Ls.call(a)),o[a]=c},Uc(Nt)),jN=Op(function(o,a,c){a!=null&&typeof a.toString!="function"&&(a=Ls.call(a)),Ze.call(o,a)?o[a].push(c):o[a]=[c]},he),qN=Ve(Go);function ut(o){return Pt(o)?rp(o):pc(o)}function Vt(o){return Pt(o)?rp(o,!0):SB(o)}function KN(o,a){var c={};return a=he(a,3),Bn(o,function(p,g,_){Zn(c,a(p,g,_),p)}),c}function YN(o,a){var c={};return a=he(a,3),Bn(o,function(p,g,_){Zn(c,g,a(p,g,_))}),c}var JN=xi(function(o,a,c){Xs(o,a,c)}),Bf=xi(function(o,a,c,p){Xs(o,a,c,p)}),XN=Un(function(o,a){var c={};if(o==null)return c;var p=!1;a=qe(a,function(_){return _=Cr(_,o),p||(p=_.length>1),_}),Pn(o,Tc(o),c),p&&(c=Xt(c,v|S|k,HB));for(var g=a.length;g--;)_c(c,a[g]);return c});function QN(o,a){return Pf(o,pa(he(a)))}var eD=Un(function(o,a){return o==null?{}:TB(o,a)});function Pf(o,a){if(o==null)return{};var c=qe(Tc(o),function(p){return[p]});return a=he(a),Cp(o,c,function(p,g){return a(p,g[0])})}function tD(o,a,c){a=Cr(a,o);var p=-1,g=a.length;for(g||(g=1,o=n);++p<g;){var _=o==null?n:o[Vn(a[p])];_===n&&(p=g,_=c),o=Hn(_)?_.call(o):_}return o}function nD(o,a,c){return o==null?o:Zo(o,a,c)}function rD(o,a,c,p){return p=typeof p=="function"?p:n,o==null?o:Zo(o,a,c,p)}var Vf=Zp(ut),Nf=Zp(Vt);function iD(o,a,c){var p=ke(o),g=p||br(o)||Ei(o);if(a=he(a,4),c==null){var _=o&&o.constructor;g?c=p?new _:[]:Je(o)?c=Hn(_)?bi(zs(o)):{}:c={}}return(g?Kt:Bn)(o,function(x,E,P){return a(c,x,E,P)}),c}function oD(o,a){return o==null?!0:_c(o,a)}function sD(o,a,c){return o==null?o:Sp(o,a,bc(c))}function aD(o,a,c,p){return p=typeof p=="function"?p:n,o==null?o:Sp(o,a,bc(c),p)}function Ti(o){return o==null?[]:ec(o,ut(o))}function lD(o){return o==null?[]:ec(o,Vt(o))}function cD(o,a,c){return c===n&&(c=a,a=n),c!==n&&(c=tn(c),c=c===c?c:0),a!==n&&(a=tn(a),a=a===a?a:0),$r(tn(o),a,c)}function dD(o,a,c){return a=jn(a),c===n?(c=a,a=0):c=jn(c),o=tn(o),gB(o,a,c)}function uD(o,a,c){if(c&&typeof c!="boolean"&&St(o,a,c)&&(a=c=n),c===n&&(typeof a=="boolean"?(c=a,a=n):typeof o=="boolean"&&(c=o,o=n)),o===n&&a===n?(o=0,a=1):(o=jn(o),a===n?(a=o,o=0):a=jn(a)),o>a){var p=o;o=a,a=p}if(c||o%1||a%1){var g=tp();return vt(o+g*(a-o+$T("1e-"+((g+"").length-1))),a)}return gc(o,a)}var hD=ki(function(o,a,c){return a=a.toLowerCase(),o+(c?Df(a):a)});function Df(o){return $c(ze(o).toLowerCase())}function Ff(o){return o=ze(o),o&&o.replace(fT,nA).replace(DT,"")}function pD(o,a,c){o=ze(o),a=$t(a);var p=o.length;c=c===n?p:$r(Te(c),0,p);var g=c;return c-=a.length,c>=0&&o.slice(c,g)==a}function fD(o){return o=ze(o),o&&qE.test(o)?o.replace(dh,rA):o}function mD(o){return o=ze(o),o&&eT.test(o)?o.replace(Ll,"\\$&"):o}var gD=ki(function(o,a,c){return o+(c?"-":"")+a.toLowerCase()}),yD=ki(function(o,a,c){return o+(c?" ":"")+a.toLowerCase()}),vD=Mp("toLowerCase");function _D(o,a,c){o=ze(o),a=Te(a);var p=a?yi(o):0;if(!a||p>=a)return o;var g=(a-p)/2;return ia(Ws(g),c)+o+ia(Us(g),c)}function CD(o,a,c){o=ze(o),a=Te(a);var p=a?yi(o):0;return a&&p<a?o+ia(a-p,c):o}function wD(o,a,c){o=ze(o),a=Te(a);var p=a?yi(o):0;return a&&p<a?ia(a-p,c)+o:o}function bD(o,a,c){return c||a==null?a=0:a&&(a=+a),BA(ze(o).replace(Ol,""),a||0)}function xD(o,a,c){return(c?St(o,a,c):a===n)?a=1:a=Te(a),yc(ze(o),a)}function kD(){var o=arguments,a=ze(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var SD=ki(function(o,a,c){return o+(c?"_":"")+a.toLowerCase()});function ED(o,a,c){return c&&typeof c!="number"&&St(o,a,c)&&(a=c=n),c=c===n?At:c>>>0,c?(o=ze(o),o&&(typeof a=="string"||a!=null&&!Gc(a))&&(a=$t(a),!a&&gi(o))?wr(_n(o),0,c):o.split(a,c)):[]}var TD=ki(function(o,a,c){return o+(c?" ":"")+$c(a)});function AD(o,a,c){return o=ze(o),c=c==null?0:$r(Te(c),0,o.length),a=$t(a),o.slice(c,c+a.length)==a}function BD(o,a,c){var p=y.templateSettings;c&&St(o,a,c)&&(a=n),o=ze(o),a=ga({},a,p,$p);var g=ga({},a.imports,p.imports,$p),_=ut(g),x=ec(g,_),E,P,U=0,W=a.interpolate||Bs,q="__p += '",te=nc((a.escape||Bs).source+"|"+W.source+"|"+(W===uh?lT:Bs).source+"|"+(a.evaluate||Bs).source+"|$","g"),le="//# sourceURL="+(Ze.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++LT+"]")+`
73
+ `;o.replace(te,function(me,Ne,Fe,Wt,Et,Ht){return Fe||(Fe=Wt),q+=o.slice(U,Ht).replace(mT,iA),Ne&&(E=!0,q+=`' +
74
+ __e(`+Ne+`) +
75
+ '`),Et&&(P=!0,q+=`';
76
+ `+Et+`;
77
+ __p += '`),Fe&&(q+=`' +
78
+ ((__t = (`+Fe+`)) == null ? '' : __t) +
79
+ '`),U=Ht+me.length,me}),q+=`';
80
+ `;var fe=Ze.call(a,"variable")&&a.variable;if(!fe)q=`with (obj) {
95
81
  `+q+`
96
82
  }
97
- `;else if(dN.test(he))throw new Ce(u);q=(M?q.replace(qE,""):q).replace(KE,"$1").replace(YE,"$1;"),q="function("+(he||"obj")+`) {
98
- `+(he?"":`obj || (obj = {});
99
- `)+"var __t, __p = ''"+(T?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
83
+ `;else if(sT.test(fe))throw new be(u);q=(P?q.replace(UE,""):q).replace(WE,"$1").replace(HE,"$1;"),q="function("+(fe||"obj")+`) {
84
+ `+(fe?"":`obj || (obj = {});
85
+ `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
100
86
  function print() { __p += __j.call(arguments, '') }
101
87
  `:`;
102
88
  `)+q+`return __p
103
- }`;var Me=rf(function(){return Oe(b,se+"return "+q).apply(r,_)});if(Me.source=q,$c(Me))throw Me;return Me}function VV(a){return Ge(a).toLowerCase()}function LV(a){return Ge(a).toUpperCase()}function IV(a,l,c){if(a=Ge(a),a&&(c||l===r))return ug(a);if(!a||!(l=Ut(l)))return a;var g=yr(a),m=yr(l),b=pg(g,m),_=gg(g,m)+1;return Cn(g,b,_).join("")}function FV(a,l,c){if(a=Ge(a),a&&(c||l===r))return a.slice(0,fg(a)+1);if(!a||!(l=Ut(l)))return a;var g=yr(a),m=gg(g,yr(l))+1;return Cn(g,0,m).join("")}function RV(a,l,c){if(a=Ge(a),a&&(c||l===r))return a.replace($s,"");if(!a||!(l=Ut(l)))return a;var g=yr(a),m=pg(g,yr(l));return Cn(g,m).join("")}function OV(a,l){var c=F,g=Y;if(Je(l)){var m="separator"in l?l.separator:m;c="length"in l?Ee(l.length):c,g="omission"in l?Ut(l.omission):g}a=Ge(a);var b=a.length;if(bo(a)){var _=yr(a);b=_.length}if(c>=b)return a;var T=c-wo(g);if(T<1)return g;var M=_?Cn(_,0,T).join(""):a.slice(0,T);if(m===r)return M+g;if(_&&(T+=M.length-T),Wc(m)){if(a.slice(T).search(m)){var Z,$=M;for(m.global||(m=sc(m.source,Ge(Dp.exec(m))+"g")),m.lastIndex=0;Z=m.exec($);)var q=Z.index;M=M.slice(0,q===r?T:q)}}else if(a.indexOf(Ut(m),T)!=T){var te=M.lastIndexOf(m);te>-1&&(M=M.slice(0,te))}return M+g}function zV(a){return a=Ge(a),a&&JE.test(a)?a.replace(Mp,fA):a}var GV=Eo(function(a,l,c){return a+(c?" ":"")+l.toUpperCase()}),Kc=nh("toUpperCase");function tf(a,l,c){return a=Ge(a),l=c?r:l,l===r?dA(a)?yA(a):tA(a):a.match(l)||[]}var rf=Be(function(a,l){try{return Gt(a,r,l)}catch(c){return $c(c)?c:new Ce(c)}}),jV=Ur(function(a,l){return Kt(l,function(c){c=Mr(c),Gr(a,c,Uc(a[c],a))}),a});function UV(a){var l=a==null?0:a.length,c=pe();return a=l?qe(a,function(g){if(typeof g[1]!="function")throw new Yt(d);return[c(g[0]),g[1]]}):[],Be(function(g){for(var m=-1;++m<l;){var b=a[m];if(Gt(b[0],this,g))return Gt(b[1],this,g)}})}function ZV(a){return fM(Qt(a,y))}function Yc(a){return function(){return a}}function $V(a,l){return a==null||a!==a?l:a}var WV=ah(),HV=ah(!0);function Pt(a){return a}function Jc(a){return Lg(typeof a=="function"?a:Qt(a,y))}function qV(a){return Fg(Qt(a,y))}function KV(a,l){return Rg(a,Qt(l,y))}var YV=Be(function(a,l){return function(c){return Ua(c,a,l)}}),JV=Be(function(a,l){return function(c){return Ua(a,c,l)}});function Qc(a,l,c){var g=ut(l),m=tl(l,g);c==null&&!(Je(l)&&(m.length||!g.length))&&(c=l,l=a,a=this,m=tl(l,ut(l)));var b=!(Je(c)&&"chain"in c)||!!c.chain,_=$r(a);return Kt(m,function(T){var M=l[T];a[T]=M,_&&(a.prototype[T]=function(){var Z=this.__chain__;if(b||Z){var $=a(this.__wrapped__),q=$.__actions__=At(this.__actions__);return q.push({func:M,args:arguments,thisArg:a}),$.__chain__=Z,$}return M.apply(a,mn([this.value()],arguments))})}),a}function QV(){return pt._===this&&(pt._=kA),this}function Xc(){}function XV(a){return a=Ee(a),Be(function(l){return Og(l,a)})}var e2=Mc(qe),t2=Mc(ig),r2=Mc(tc);function nf(a){return Fc(a)?rc(Mr(a)):PM(a)}function n2(a){return function(l){return a==null?r:$n(a,l)}}var o2=lh(),a2=lh(!0);function ed(){return[]}function td(){return!1}function i2(){return{}}function l2(){return""}function s2(){return!0}function c2(a,l){if(a=Ee(a),a<1||a>_e)return[];var c=Nt,g=yt(a,Nt);l=pe(l),a-=Nt;for(var m=ac(g,l);++c<a;)l(c);return m}function d2(a){return ke(a)?qe(a,Mr):Zt(a)?[a]:At(_h(Ge(a)))}function u2(a){var l=++CA;return Ge(a)+l}var p2=ll(function(a,l){return a+l},0),g2=Bc("ceil"),h2=ll(function(a,l){return a/l},1),f2=Bc("floor");function m2(a){return a&&a.length?el(a,Pt,mc):r}function v2(a,l){return a&&a.length?el(a,pe(l,2),mc):r}function y2(a){return cg(a,Pt)}function b2(a,l){return cg(a,pe(l,2))}function w2(a){return a&&a.length?el(a,Pt,wc):r}function x2(a,l){return a&&a.length?el(a,pe(l,2),wc):r}var C2=ll(function(a,l){return a*l},1),_2=Bc("round"),k2=ll(function(a,l){return a-l},0);function S2(a){return a&&a.length?oc(a,Pt):0}function T2(a,l){return a&&a.length?oc(a,pe(l,2)):0}return v.after=qP,v.ary=Vh,v.assign=LD,v.assignIn=qh,v.assignInWith=wl,v.assignWith=ID,v.at=FD,v.before=Lh,v.bind=Uc,v.bindAll=jV,v.bindKey=Ih,v.castArray=iD,v.chain=Bh,v.chunk=fB,v.compact=mB,v.concat=vB,v.cond=UV,v.conforms=ZV,v.constant=Yc,v.countBy=SP,v.create=RD,v.curry=Fh,v.curryRight=Rh,v.debounce=Oh,v.defaults=OD,v.defaultsDeep=zD,v.defer=KP,v.delay=YP,v.difference=yB,v.differenceBy=bB,v.differenceWith=wB,v.drop=xB,v.dropRight=CB,v.dropRightWhile=_B,v.dropWhile=kB,v.fill=SB,v.filter=EP,v.flatMap=MP,v.flatMapDeep=BP,v.flatMapDepth=PP,v.flatten=Eh,v.flattenDeep=TB,v.flattenDepth=EB,v.flip=JP,v.flow=WV,v.flowRight=HV,v.fromPairs=NB,v.functions=HD,v.functionsIn=qD,v.groupBy=DP,v.initial=MB,v.intersection=BB,v.intersectionBy=PB,v.intersectionWith=DB,v.invert=YD,v.invertBy=JD,v.invokeMap=LP,v.iteratee=Jc,v.keyBy=IP,v.keys=ut,v.keysIn=Bt,v.map=hl,v.mapKeys=XD,v.mapValues=eV,v.matches=qV,v.matchesProperty=KV,v.memoize=ml,v.merge=tV,v.mergeWith=Kh,v.method=YV,v.methodOf=JV,v.mixin=Qc,v.negate=vl,v.nthArg=XV,v.omit=rV,v.omitBy=nV,v.once=QP,v.orderBy=FP,v.over=e2,v.overArgs=XP,v.overEvery=t2,v.overSome=r2,v.partial=Zc,v.partialRight=zh,v.partition=RP,v.pick=oV,v.pickBy=Yh,v.property=nf,v.propertyOf=n2,v.pull=FB,v.pullAll=Ah,v.pullAllBy=RB,v.pullAllWith=OB,v.pullAt=zB,v.range=o2,v.rangeRight=a2,v.rearg=eD,v.reject=GP,v.remove=GB,v.rest=tD,v.reverse=Gc,v.sampleSize=UP,v.set=iV,v.setWith=lV,v.shuffle=ZP,v.slice=jB,v.sortBy=HP,v.sortedUniq=KB,v.sortedUniqBy=YB,v.split=MV,v.spread=rD,v.tail=JB,v.take=QB,v.takeRight=XB,v.takeRightWhile=eP,v.takeWhile=tP,v.tap=mP,v.throttle=nD,v.thru=gl,v.toArray=$h,v.toPairs=Jh,v.toPairsIn=Qh,v.toPath=d2,v.toPlainObject=Hh,v.transform=sV,v.unary=oD,v.union=rP,v.unionBy=nP,v.unionWith=oP,v.uniq=aP,v.uniqBy=iP,v.uniqWith=lP,v.unset=cV,v.unzip=jc,v.unzipWith=Mh,v.update=dV,v.updateWith=uV,v.values=Mo,v.valuesIn=pV,v.without=sP,v.words=tf,v.wrap=aD,v.xor=cP,v.xorBy=dP,v.xorWith=uP,v.zip=pP,v.zipObject=gP,v.zipObjectDeep=hP,v.zipWith=fP,v.entries=Jh,v.entriesIn=Qh,v.extend=qh,v.extendWith=wl,Qc(v,v),v.add=p2,v.attempt=rf,v.camelCase=mV,v.capitalize=Xh,v.ceil=g2,v.clamp=gV,v.clone=lD,v.cloneDeep=cD,v.cloneDeepWith=dD,v.cloneWith=sD,v.conformsTo=uD,v.deburr=ef,v.defaultTo=$V,v.divide=h2,v.endsWith=vV,v.eq=wr,v.escape=yV,v.escapeRegExp=bV,v.every=TP,v.find=NP,v.findIndex=Sh,v.findKey=GD,v.findLast=AP,v.findLastIndex=Th,v.findLastKey=jD,v.floor=f2,v.forEach=Ph,v.forEachRight=Dh,v.forIn=UD,v.forInRight=ZD,v.forOwn=$D,v.forOwnRight=WD,v.get=Hc,v.gt=pD,v.gte=gD,v.has=KD,v.hasIn=qc,v.head=Nh,v.identity=Pt,v.includes=VP,v.indexOf=AB,v.inRange=hV,v.invoke=QD,v.isArguments=qn,v.isArray=ke,v.isArrayBuffer=hD,v.isArrayLike=Mt,v.isArrayLikeObject=tt,v.isBoolean=fD,v.isBuffer=_n,v.isDate=mD,v.isElement=vD,v.isEmpty=yD,v.isEqual=bD,v.isEqualWith=wD,v.isError=$c,v.isFinite=xD,v.isFunction=$r,v.isInteger=Gh,v.isLength=yl,v.isMap=jh,v.isMatch=CD,v.isMatchWith=_D,v.isNaN=kD,v.isNative=SD,v.isNil=ED,v.isNull=TD,v.isNumber=Uh,v.isObject=Je,v.isObjectLike=Xe,v.isPlainObject=Ka,v.isRegExp=Wc,v.isSafeInteger=ND,v.isSet=Zh,v.isString=bl,v.isSymbol=Zt,v.isTypedArray=Ao,v.isUndefined=AD,v.isWeakMap=MD,v.isWeakSet=BD,v.join=VB,v.kebabCase=wV,v.last=er,v.lastIndexOf=LB,v.lowerCase=xV,v.lowerFirst=CV,v.lt=PD,v.lte=DD,v.max=m2,v.maxBy=v2,v.mean=y2,v.meanBy=b2,v.min=w2,v.minBy=x2,v.stubArray=ed,v.stubFalse=td,v.stubObject=i2,v.stubString=l2,v.stubTrue=s2,v.multiply=C2,v.nth=IB,v.noConflict=QV,v.noop=Xc,v.now=fl,v.pad=_V,v.padEnd=kV,v.padStart=SV,v.parseInt=TV,v.random=fV,v.reduce=OP,v.reduceRight=zP,v.repeat=EV,v.replace=NV,v.result=aV,v.round=_2,v.runInContext=N,v.sample=jP,v.size=$P,v.snakeCase=AV,v.some=WP,v.sortedIndex=UB,v.sortedIndexBy=ZB,v.sortedIndexOf=$B,v.sortedLastIndex=WB,v.sortedLastIndexBy=HB,v.sortedLastIndexOf=qB,v.startCase=BV,v.startsWith=PV,v.subtract=k2,v.sum=S2,v.sumBy=T2,v.template=DV,v.times=c2,v.toFinite=Wr,v.toInteger=Ee,v.toLength=Wh,v.toLower=VV,v.toNumber=tr,v.toSafeInteger=VD,v.toString=Ge,v.toUpper=LV,v.trim=IV,v.trimEnd=FV,v.trimStart=RV,v.truncate=OV,v.unescape=zV,v.uniqueId=u2,v.upperCase=GV,v.upperFirst=Kc,v.each=Ph,v.eachRight=Dh,v.first=Nh,Qc(v,function(){var a={};return Nr(v,function(l,c){je.call(v.prototype,c)||(a[c]=l)}),a}(),{chain:!1}),v.VERSION=o,Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){v[a].placeholder=v}),Kt(["drop","take"],function(a,l){De.prototype[a]=function(c){c=c===r?1:lt(Ee(c),0);var g=this.__filtered__&&!l?new De(this):this.clone();return g.__filtered__?g.__takeCount__=yt(c,g.__takeCount__):g.__views__.push({size:yt(c,Nt),type:a+(g.__dir__<0?"Right":"")}),g},De.prototype[a+"Right"]=function(c){return this.reverse()[a](c).reverse()}}),Kt(["filter","map","takeWhile"],function(a,l){var c=l+1,g=c==B||c==X;De.prototype[a]=function(m){var b=this.clone();return b.__iteratees__.push({iteratee:pe(m,3),type:c}),b.__filtered__=b.__filtered__||g,b}}),Kt(["head","last"],function(a,l){var c="take"+(l?"Right":"");De.prototype[a]=function(){return this[c](1).value()[0]}}),Kt(["initial","tail"],function(a,l){var c="drop"+(l?"":"Right");De.prototype[a]=function(){return this.__filtered__?new De(this):this[c](1)}}),De.prototype.compact=function(){return this.filter(Pt)},De.prototype.find=function(a){return this.filter(a).head()},De.prototype.findLast=function(a){return this.reverse().find(a)},De.prototype.invokeMap=Be(function(a,l){return typeof a=="function"?new De(this):this.map(function(c){return Ua(c,a,l)})}),De.prototype.reject=function(a){return this.filter(vl(pe(a)))},De.prototype.slice=function(a,l){a=Ee(a);var c=this;return c.__filtered__&&(a>0||l<0)?new De(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),l!==r&&(l=Ee(l),c=l<0?c.dropRight(-l):c.take(l-a)),c)},De.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},De.prototype.toArray=function(){return this.take(Nt)},Nr(De.prototype,function(a,l){var c=/^(?:filter|find|map|reject)|While$/.test(l),g=/^(?:head|last)$/.test(l),m=v[g?"take"+(l=="last"?"Right":""):l],b=g||/^find/.test(l);m&&(v.prototype[l]=function(){var _=this.__wrapped__,T=g?[1]:arguments,M=_ instanceof De,Z=T[0],$=M||ke(_),q=function(Pe){var Ve=m.apply(v,mn([Pe],T));return g&&te?Ve[0]:Ve};$&&c&&typeof Z=="function"&&Z.length!=1&&(M=$=!1);var te=this.__chain__,se=!!this.__actions__.length,he=b&&!te,Me=M&&!se;if(!b&&$){_=Me?_:new De(this);var fe=a.apply(_,T);return fe.__actions__.push({func:gl,args:[q],thisArg:r}),new Jt(fe,te)}return he&&Me?a.apply(this,T):(fe=this.thru(q),he?g?fe.value()[0]:fe.value():fe)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(a){var l=Oi[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",g=/^(?:pop|shift)$/.test(a);v.prototype[a]=function(){var m=arguments;if(g&&!this.__chain__){var b=this.value();return l.apply(ke(b)?b:[],m)}return this[c](function(_){return l.apply(ke(_)?_:[],m)})}}),Nr(De.prototype,function(a,l){var c=v[l];if(c){var g=c.name+"";je.call(ko,g)||(ko[g]=[]),ko[g].push({name:l,func:c})}}),ko[il(r,w).name]=[{name:"wrapper",func:r}],De.prototype.clone=zA,De.prototype.reverse=GA,De.prototype.value=jA,v.prototype.at=vP,v.prototype.chain=yP,v.prototype.commit=bP,v.prototype.next=wP,v.prototype.plant=CP,v.prototype.reverse=_P,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=kP,v.prototype.first=v.prototype.head,Ia&&(v.prototype[Ia]=xP),v},xo=bA();zn?((zn.exports=xo)._=xo,Js._=xo):pt._=xo}).call(Bo)}(Si,Si.exports);var Qe=Si.exports;const dE={class:"grid-overlay-container"},hp=n.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,r)=>(n.openBlock(),n.createElementBlock("div",dE,[e.params.notReady?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r[0]||(r[0]=n.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),r[1]||(r[1]=n.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[r[2]||(r[2]=n.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),r[3]||(r[3]=n.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),uE={},pE={class:"grid-overlay-container"};function gE(t,e){return n.openBlock(),n.createElementBlock("div",pE,e[0]||(e[0]=[n.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),n.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const fp=As(uE,[["render",gE]]);async function hE(t,e){throw Error("not implemented")}function fE(t){return t.axesSpec.filter(e=>{var r;return((r=e.annotations)==null?void 0:r["pl7.app/axisNature"])==="heterogeneous"})}function mE(t,e){const r=[];for(const o of e)if(t[o].type==="column"){const i=fE(t[o].spec);for(const s of i){if(s.type!=="String"){console.warn("heterogeneous axis with string type expected, got",s,"skipping");continue}const d=Nd(s),u=t.findIndex(p=>Qe.isEqual(p.id,d));if(u===-1)throw console.error("axis not found",o,d,t),Error("axis not found");r.push({columnIdx:o,axisIdx:u})}}return r}const mp=(t,e)=>(t+e).toString();function vE(t,e,r,o,i,s){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const d=t[0];let u=-1,p=-1;for(let y=0;y<s.length;++y)s[y]===d.axisIdx&&(u=y),s[y]===d.columnIdx&&(p=y);const h=(()=>{const S=o[u].data.filter(k=>k!==null);return Array.from(new Set(S))})();h.sort(),p>u?(r.splice(p,1),r.splice(u,1)):(r.splice(u,1),r.splice(p,1));const f=yE(i,o,u,p,h,e.rows);for(let y=0;y<h.length;++y){const S=h[y],k=S+"@"+y;r.push({colId:k,field:mp(o.length,y),headerName:S,valueFormatter:vp})}return{rowModelType:"clientSide",columnDefs:r,rowData:f}}function yE(t,e,r,o,i,s){const d=new Map;let u=0;for(let h=0;h<s;h++){const f={};for(let E=0;E<e.length;++E){if(E===r||E===o)continue;const A=t[E].toString();f[A]=e[E].data[h]}let y;const S=Po(Object.values(f))??"";d.has(S)?y=d.get(S):(d.set(S,f),y=f,y.id=u.toString(),u++);const k=i.indexOf(e[r].data[h]);if(k===-1)throw Error("index not found");const D=mp(e.length,k);y[D]=e[o].data[h]}return Array.from(d.values())}function bE(t){return Po({type:t.type,id:t.id})}function wE(t){return JSON.parse(t)}const vp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function xE(t,e,r){var i,s,d;const o=bE(e);return{colId:o,field:t.toString(),headerName:((s=(i=e.spec.annotations)==null?void 0:i["pl7.app/label"])==null?void 0:s.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(r==null?void 0:r.includes(o))??((d=e.spec.annotations)==null?void 0:d["pl7.app/table/visibility"])==="optional",valueFormatter:vp,cellDataType:(u=>{switch(u){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${u}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function yp(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function bp(t){const e=[];return li(t,r=>(e.push(r),r)),e}async function CE(t,e,r){return r.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Qe.uniqWith(r.map(i=>Ol(i.spec.axesSpec).map(Qe.cloneDeep)).flat(),Qe.isEqual),strictlyCompatible:!0})).hits.filter(i=>i.spec.axesSpec.length===1):[]}async function _E(t,e,r){const o=bp(r),s=(await CE(t,e,o)).filter(d=>!Qe.find(o,u=>d.columnId===u.columnId));return s.length===0?r:{type:"outer",primary:r,secondary:s.map(d=>({type:"column",column:d}))}}async function kE(t,e,r,o){const i=r.filter(f=>f.type!=="Bytes"),s=bp(o),d=i.map(f=>[]),u=i.map(f=>null);for(let f=0;f<s.length;++f){const y=Ol(s[f].spec.axesSpec);for(let S=0;S<y.length;++S){const k=Qe.findIndex(i,D=>Qe.isEqual(D,y[S]));k===-1||u[k]||(y.length===1&&s[f].spec.name==="pl7.app/label"?(d[k]=[[f,S]],u[k]=s[f].columnId):d[k].push([f,S]))}}for(let f=i.length-1;f>=0;--f)d[f].length||(u.splice(f,1),d.splice(f,1),i.splice(f,1));const p=100,h=i.map(f=>new Set);e:for(let f=i.length-1;f>=0;--f){for(const[y,S]of d[f]){const k=await t.getUniqueValues(e,{columnId:s[y].columnId,...!u[f]&&{axis:Qe.cloneDeep(i[f])},filters:[],limit:p});if(k.overflow){u.splice(f,1),d.splice(f,1),i.splice(f,1);continue e}const D=k.values.type;for(const E of k.values.data)if(!(Ed(E,D)||E===null)&&(h[f].add(yp(E,D)),h[f].size===p)){u.splice(f,1),d.splice(f,1),i.splice(f,1);continue e}}if(!h[f].size){u.splice(f,1),d.splice(f,1),i.splice(f,1);continue e}}return i.map((f,y)=>{const S=[...h[y]].map(D=>({value:D,text:D.toString()})),k=S[0].value;return{axis:Qe.cloneDeep(f),...u[y]&&{column:u[y]},options:S,defaultValue:k}})}function SE(t,e,r){const o=e.length,i=[];for(let s=0;s<e[0].data.length;++s){const d={};for(let u=0;u<o;++u){const p=t[u].toString(),h=e[u].data[s],f=e[u].type;Am(e[u].absent,s)?d[p]=void 0:Ed(h,f)||h===null?d[p]=null:d[p]=yp(h,f)}d.id=(r++).toString(),i.push(d)}return i}const TE=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function EE(t,e,r,o){const i=await t.getSpec(e),s=[...i.keys()].filter(k=>!Qe.find(r,D=>Qe.isEqual(D.axis,i[k].id)||Qe.isEqual(D.column,i[k].id))),d=Qe.cloneDeep(s),u=mE(i,s);for(let k=s.length-1;k>=0;--k){const D=s[k];if(!TE(i[D]))continue;const E=Ol(i[D].spec.axesSpec)[0],A=Qe.findIndex(s,w=>Qe.isEqual(i[w].id,E));if(A!==-1){s[A]=D;for(const w of u)w.axisIdx===D&&(w.axisIdx=A);s.splice(k,1),d.splice(k,1)}}const p=await t.getShape(e),h=p.rows,f=d.map(k=>xE(k,i[k],o));if(u.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",u.length," transposition will not be applied."),u.length===1)return vE(u,p,f,await t.getData(e,s),d,s);let y;return{rowModelType:"serverSide",columnDefs:f,serverSideDatasource:{getRows:async k=>{try{if(h==0){k.success({rowData:[],rowCount:h}),k.api.showNoRowsOverlay(),k.api.setGridOption("loading",!1);return}if(y&&!Qe.isEqual(y.request.sortModel,k.request.sortModel)){y=void 0,k.fail(),k.api.setGridOption("loading",!0);return}y=k;let D=0,E=[];if(h>0&&k.request.startRow!==void 0&&k.request.endRow!==void 0&&(D=Math.min(h,k.request.endRow)-k.request.startRow,D>0)){const A=await t.getData(e,s,{offset:k.request.startRow,length:D});E=SE(d,A,k.request.startRow)}k.success({rowData:E,rowCount:h}),k.api.autoSizeAllColumns(),k.api.setGridOption("loading",!1)}catch{k.fail(),k.api.setGridOption("loading",!0)}}}}}const NE={class:"ap-ag-data-table-container"},AE={key:0,class:"ap-ag-data-table-sheets"},ME=As(n.defineComponent({__name:"PlAgDataTable",props:n.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(t){C.ModuleRegistry.registerModules([Ja.ClientSideRowModelModule,dd.ClipboardModule,cd.ServerSideRowModelModule,ud.RangeSelectionModule,Ul,Yd]);const e=n.useModel(t,"modelValue"),r=t,{settings:o}=n.toRefs(r);n.watch(()=>o.value,async(w,L)=>{if(w.sourceType!=="pframe"||!w.pFrame||!w.join||L&&L.sourceType==="pframe"&&Qe.isEqual(w.pFrame,L.pFrame)&&Qe.isEqual(w.join,L.join))return;const R=window.platforma;if(!R)throw Error("platforma not set");const H=R.pFrameDriver;if(!H)throw Error("platforma.pFrameDriver not set");const G=await _E(H,w.pFrame,w.join),K=e.value;K.pTableParams||(K.pTableParams={sorting:[],filters:[]}),K.pTableParams.join=G,e.value=K});const i=wp(()=>o.value.sourceType,async w=>{var R;const L=o.value.sourceType;switch(L){case"pframe":{const H=window.platforma;if(!H)throw Error("platforma not set");const G=H.pFrameDriver;if(!G)throw Error("platforma.pFrameDriver not set");if(!o.value.pFrame)return[];const K=o.value.pFrame,U=(R=e.value.pTableParams)==null?void 0:R.join;return U?await kE(G,K,o.value.sheetAxes,U):[]}case"ptable":return o.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${L}`)}});function s(w){if(!(o.value.sourceType!=="ptable"&&o.value.sourceType!=="pframe"))return(w==null?void 0:w.sortModel.map(L=>({column:wE(L.colId),ascending:L.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const d=n.computed({get:()=>{const w=e.value;return{columnOrder:w.gridState.columnOrder,sort:w.gridState.sort,columnVisibility:w.gridState.columnVisibility}},set:w=>{const L=e.value,R=y.value.rowModelType==="clientSide"?void 0:s(w.sort);L.gridState.columnOrder=w.columnOrder,L.gridState.sort=w.sort,L.gridState.columnVisibility=w.columnVisibility,(o.value.sourceType==="ptable"||o.value.sourceType==="pframe")&&(L.pTableParams||(L.pTableParams={sorting:[],filters:[]}),L.pTableParams.sorting=R),e.value=L}}),u=w=>Po(w);function p(w){var L;if(!(o.value.sourceType!=="ptable"&&o.value.sourceType!=="pframe"))return((L=i.value)==null?void 0:L.map(R=>({type:"bySingleColumn",column:R.column?{type:"column",id:R.column}:{type:"axis",id:R.axis},predicate:{operator:"Equal",reference:w[u(R.axis)]}})))??[]}const h=n.computed({get:()=>e.value.gridState.sheets??{},set:w=>{const L=p(w),R=e.value;R.gridState.sheets=w,(o.value.sourceType==="ptable"||o.value.sourceType==="pframe")&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.filters=L),e.value=R}});n.watch(()=>[o.value,i.value],(w,L)=>{const[R,H]=w;if(!H)return;if(L){const[K,U]=L;if((R.sourceType==="ptable"||R.sourceType==="pframe")&&R.sourceType===(K==null?void 0:K.sourceType)&&Qe.isEqual(H,U))return}if(R.sourceType!=="ptable"&&R.sourceType!=="pframe"){h.value={};return}const G=h.value;for(const K of H){const U=u(K.axis);G[U]||(G[U]=K.defaultValue??K.options[0].value)}h.value=G},{immediate:!0});const f=n.shallowRef(),y=n.ref({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:d.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:w=>{w.api.autoSizeAllColumns()},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:w=>w.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:hp,noRowsOverlayComponent:fp,sideBar:{toolPanels:[{id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel",toolPanelParams:{suppressRowGroups:!0,suppressValues:!0,suppressPivots:!0,suppressPivotMode:!0,suppressColumnFilter:!0,suppressColumnSelectAll:!0,suppressColumnExpandAll:!0}}],defaultToolPanel:"columns"}}),S=w=>{const L=w.api;f.value=new Proxy(L,{get(R,H,G){switch(H){case"setGridOption":return(K,U)=>{const P=y.value;P[K]=U,y.value=P,L.updateGridOptions(P)};case"updateGridOptions":return K=>{y.value={...y.value,...K},L.updateGridOptions(K)};default:return Reflect.get(R,H,G)}}})},k=w=>{d.value={columnOrder:w.state.columnOrder,sort:w.state.sort,columnVisibility:w.state.columnVisibility??(w.state.columnOrder?{hiddenColIds:[]}:void 0)},y.value.initialState=d.value},D=()=>{const w=f.value.getState();d.value={columnOrder:w.columnOrder,sort:w.sort,columnVisibility:w.columnVisibility??(w.columnOrder?{hiddenColIds:[]}:void 0)},y.value.initialState=d.value,f.value=void 0},E=n.ref(0);n.watch(()=>[f.value,d.value],(w,L)=>{if(Qe.isEqual(w,L))return;const[R,H]=w;if(!R)return;const G=R.getState(),K={columnOrder:G.columnOrder,sort:G.sort,columnVisibility:G.columnVisibility??(G.columnOrder?{hiddenColIds:[]}:void 0)};Qe.isEqual(H,K)||(y.value.initialState=H,++E.value)}),n.watch(()=>y.value,(w,L)=>{L&&w.rowModelType!=L.rowModelType&&++E.value});const A=(w,L)=>{var H;const R=h.value;R[w]!==L&&(R[w]=L,h.value=R,(H=f.value)==null||H.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))};return n.watch(()=>[f.value,o.value,i.value],async(w,L)=>{var P,W;if(Qe.isEqual(w,L))return;const[R,H,G]=w;if(!R)return;const K=window.platforma;if(!K)throw Error("platforma not set");const U=H.sourceType;switch(U){case"pframe":case"ptable":{const F=K.pFrameDriver;if(!F)throw Error("platforma.pFrameDriver not set");const Y=H.pTable;if(!Y||!G)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ue=(W=(P=d.value)==null?void 0:P.columnVisibility)==null?void 0:W.hiddenColIds,j=await EE(F,Y,G,ue);return R.updateGridOptions({loading:j.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...j})}case"xsv":{const F=K.blobDriver;if(!F)throw Error("platforma.blobDriver not set");const Y=H.xsvFile;if(!(Y!=null&&Y.ok)||!Y.value)return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ue=await hE(F,Y.value);return R.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ue})}default:throw Error(`unsupported source type: ${U}`)}}),(w,L)=>(n.openBlock(),n.createElementBlock("div",NE,[n.createVNode(n.Transition,{name:"ap-ag-data-table-sheets-transition"},{default:n.withCtx(()=>[n.unref(i).value&&n.unref(i).value.length>0?(n.openBlock(),n.createElementBlock("div",AE,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(i).value,(R,H)=>(n.openBlock(),n.createBlock(n.unref(Wu),{key:H,"model-value":h.value[u(R.axis)],options:R.options,"onUpdate:modelValue":G=>A(u(R.axis),G)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):n.createCommentVNode("",!0)]),_:1}),(n.openBlock(),n.createBlock(n.unref(hf.AgGridVue),{key:E.value,theme:n.unref(uu),class:"ap-ag-data-table-grid","grid-options":y.value,onGridReady:S,onStateUpdated:k,onGridPreDestroyed:D},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-93a0f82c"]]),BE={key:1,class:"alert-error"},PE={key:2},DE=n.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,r=n.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=n.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=n.computed(()=>r.value===void 0&&o.value===void 0);return(s,d)=>(n.openBlock(),n.createElementBlock("div",null,[r.value!==void 0?n.renderSlot(s.$slots,"default",n.normalizeProps(n.mergeProps({key:0},{value:r.value}))):n.createCommentVNode("",!0),o.value?(n.openBlock(),n.createElementBlock("div",BE,n.toDisplayString(o.value),1)):n.createCommentVNode("",!0),i.value?(n.openBlock(),n.createElementBlock("div",PE,"Unresolved")):n.createCommentVNode("",!0)]))}}),VE={style:{height:"100%"}},LE=n.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,r=n.computed(()=>e.params.extensions),o=n.computed(()=>e.params.value);function i(d){e.params.setValue(d)}const s=n.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(d,u)=>(n.openBlock(),n.createElementBlock("div",VE,[n.createVNode(n.unref(cp),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${r.value?r.value[0]:""}`,extensions:r.value,"model-value":o.value,progress:s.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),Ti=new Map;function IE(t,e){const r=n.getCurrentScope()??n.effectScope(),o=r.run(()=>(n.onScopeDispose(()=>{Ti.delete(t)}),n.reactive(e())));return o[Symbol.dispose]=()=>{r.stop()},o}function FE(t){const e=Symbol();return()=>(Ti.has(e)||Ti.set(e,IE(e,t)),Ti.get(e))}function RE(t){return n.computed(()=>{try{return gd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function wp(t,e,r){const o=n.ref(0),i=n.reactive({loading:n.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),s=vf(e);return n.watch(t,async d=>{i.error=void 0,o.value++,s(d).then(u=>{u.ok&&(i.value=u.value)}).catch(u=>{i.value=void 0,i.error=u}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},r??{})),i}const co=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,xp=new Set,Ms=typeof process=="object"&&process?process:{},Cp=(t,e,r,o)=>{typeof Ms.emitWarning=="function"?Ms.emitWarning(t,e,r,o):console.error(`[${r}] ${e}: ${t}`)};let Ei=globalThis.AbortController,_p=globalThis.AbortSignal;if(typeof Ei>"u"){_p=class{constructor(){ze(this,"onabort");ze(this,"_onabort",[]);ze(this,"reason");ze(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},Ei=class{constructor(){ze(this,"signal",new _p);e()}abort(o){var i,s;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const d of this.signal._onabort)d(o);(s=(i=this.signal).onabort)==null||s.call(i,o)}}};let t=((Sp=Ms.env)==null?void 0:Sp.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Cp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const OE=t=>!xp.has(t),gn=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),kp=t=>gn(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Ni:null:null;class Ni extends Array{constructor(e){super(e),this.fill(0)}}const Ln=class Ln{constructor(e,r){ze(this,"heap");ze(this,"length");if(!x(Ln,uo))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=kp(e);if(!r)return[];ge(Ln,uo,!0);const o=new Ln(e,r);return ge(Ln,uo,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};uo=new WeakMap,Re(Ln,uo,!1);let Bs=Ln;const Vs=class Vs{constructor(e){Re(this,ee);Re(this,sr);Re(this,It);Re(this,cr);Re(this,dr);Re(this,po);Re(this,go);ze(this,"ttl");ze(this,"ttlResolution");ze(this,"ttlAutopurge");ze(this,"updateAgeOnGet");ze(this,"updateAgeOnHas");ze(this,"allowStale");ze(this,"noDisposeOnSet");ze(this,"noUpdateTTL");ze(this,"maxEntrySize");ze(this,"sizeCalculation");ze(this,"noDeleteOnFetchRejection");ze(this,"noDeleteOnStaleGet");ze(this,"allowStaleOnFetchAbort");ze(this,"allowStaleOnFetchRejection");ze(this,"ignoreFetchAbort");Re(this,at);Re(this,ur);Re(this,nt);Re(this,$e);Re(this,xe);Re(this,Ct);Re(this,Ft);Re(this,vt);Re(this,ct);Re(this,pr);Re(this,dt);Re(this,gr);Re(this,hr);Re(this,Rt);Re(this,fr);Re(this,hn);Re(this,_t);Re(this,In,()=>{});Re(this,Fr,()=>{});Re(this,ka,()=>{});Re(this,Ot,()=>!1);Re(this,Fn,e=>{});Re(this,ho,(e,r,o)=>{});Re(this,Sa,(e,r,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});ze(this,Tp,"LRUCache");const{max:r=0,ttl:o,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:d,updateAgeOnHas:u,allowStale:p,dispose:h,disposeAfter:f,noDisposeOnSet:y,noUpdateTTL:S,maxSize:k=0,maxEntrySize:D=0,sizeCalculation:E,fetchMethod:A,memoMethod:w,noDeleteOnFetchRejection:L,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:G,ignoreFetchAbort:K}=e;if(r!==0&&!gn(r))throw new TypeError("max option must be a nonnegative integer");const U=r?kp(r):Array;if(!U)throw new Error("invalid max value: "+r);if(ge(this,sr,r),ge(this,It,k),this.maxEntrySize=D||x(this,It),this.sizeCalculation=E,this.sizeCalculation){if(!x(this,It)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(ge(this,go,w),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(ge(this,po,A),ge(this,hn,!!A),ge(this,nt,new Map),ge(this,$e,new Array(r).fill(void 0)),ge(this,xe,new Array(r).fill(void 0)),ge(this,Ct,new U(r)),ge(this,Ft,new U(r)),ge(this,vt,0),ge(this,ct,0),ge(this,pr,Bs.create(r)),ge(this,at,0),ge(this,ur,0),typeof h=="function"&&ge(this,cr,h),typeof f=="function"?(ge(this,dr,f),ge(this,dt,[])):(ge(this,dr,void 0),ge(this,dt,void 0)),ge(this,fr,!!x(this,cr)),ge(this,_t,!!x(this,dr)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!S,this.noDeleteOnFetchRejection=!!L,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!G,this.ignoreFetchAbort=!!K,this.maxEntrySize!==0){if(x(this,It)!==0&&!gn(x(this,It)))throw new TypeError("maxSize must be a positive integer if specified");if(!gn(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");le(this,ee,sf).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!u,this.ttlResolution=gn(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=o||0,this.ttl){if(!gn(this.ttl))throw new TypeError("ttl must be a positive integer if specified");le(this,ee,ad).call(this)}if(x(this,sr)===0&&this.ttl===0&&x(this,It)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!x(this,sr)&&!x(this,It)){const P="LRU_CACHE_UNBOUNDED";OE(P)&&(xp.add(P),Cp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,Vs))}}static unsafeExposeInternals(e){return{starts:x(e,hr),ttls:x(e,Rt),sizes:x(e,gr),keyMap:x(e,nt),keyList:x(e,$e),valList:x(e,xe),next:x(e,Ct),prev:x(e,Ft),get head(){return x(e,vt)},get tail(){return x(e,ct)},free:x(e,pr),isBackgroundFetch:r=>{var o;return le(o=e,ee,He).call(o,r)},backgroundFetch:(r,o,i,s)=>{var d;return le(d=e,ee,_l).call(d,r,o,i,s)},moveToTail:r=>{var o;return le(o=e,ee,Ya).call(o,r)},indexes:r=>{var o;return le(o=e,ee,kn).call(o,r)},rindexes:r=>{var o;return le(o=e,ee,Sn).call(o,r)},isStale:r=>{var o;return x(o=e,Ot).call(o,r)}}}get max(){return x(this,sr)}get maxSize(){return x(this,It)}get calculatedSize(){return x(this,ur)}get size(){return x(this,at)}get fetchMethod(){return x(this,po)}get memoMethod(){return x(this,go)}get dispose(){return x(this,cr)}get disposeAfter(){return x(this,dr)}getRemainingTTL(e){return x(this,nt).has(e)?1/0:0}*entries(){for(const e of le(this,ee,kn).call(this))x(this,xe)[e]!==void 0&&x(this,$e)[e]!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield[x(this,$e)[e],x(this,xe)[e]])}*rentries(){for(const e of le(this,ee,Sn).call(this))x(this,xe)[e]!==void 0&&x(this,$e)[e]!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield[x(this,$e)[e],x(this,xe)[e]])}*keys(){for(const e of le(this,ee,kn).call(this)){const r=x(this,$e)[e];r!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield r)}}*rkeys(){for(const e of le(this,ee,Sn).call(this)){const r=x(this,$e)[e];r!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield r)}}*values(){for(const e of le(this,ee,kn).call(this))x(this,xe)[e]!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield x(this,xe)[e])}*rvalues(){for(const e of le(this,ee,Sn).call(this))x(this,xe)[e]!==void 0&&!le(this,ee,He).call(this,x(this,xe)[e])&&(yield x(this,xe)[e])}[(Ep=Symbol.iterator,Tp=Symbol.toStringTag,Ep)](){return this.entries()}find(e,r={}){for(const o of le(this,ee,kn).call(this)){const i=x(this,xe)[o],s=le(this,ee,He).call(this,i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,x(this,$e)[o],this))return this.get(x(this,$e)[o],r)}}forEach(e,r=this){for(const o of le(this,ee,kn).call(this)){const i=x(this,xe)[o],s=le(this,ee,He).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,x(this,$e)[o],this)}}rforEach(e,r=this){for(const o of le(this,ee,Sn).call(this)){const i=x(this,xe)[o],s=le(this,ee,He).call(this,i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,x(this,$e)[o],this)}}purgeStale(){let e=!1;for(const r of le(this,ee,Sn).call(this,{allowStale:!0}))x(this,Ot).call(this,r)&&(le(this,ee,Tn).call(this,x(this,$e)[r],"expire"),e=!0);return e}info(e){const r=x(this,nt).get(e);if(r===void 0)return;const o=x(this,xe)[r],i=le(this,ee,He).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const s={value:i};if(x(this,Rt)&&x(this,hr)){const d=x(this,Rt)[r],u=x(this,hr)[r];if(d&&u){const p=d-(co.now()-u);s.ttl=p,s.start=Date.now()}}return x(this,gr)&&(s.size=x(this,gr)[r]),s}dump(){const e=[];for(const r of le(this,ee,kn).call(this,{allowStale:!0})){const o=x(this,$e)[r],i=x(this,xe)[r],s=le(this,ee,He).call(this,i)?i.__staleWhileFetching:i;if(s===void 0||o===void 0)continue;const d={value:s};if(x(this,Rt)&&x(this,hr)){d.ttl=x(this,Rt)[r];const u=co.now()-x(this,hr)[r];d.start=Math.floor(Date.now()-u)}x(this,gr)&&(d.size=x(this,gr)[r]),e.unshift([o,d])}return e}load(e){this.clear();for(const[r,o]of e){if(o.start){const i=Date.now()-o.start;o.start=co.now()-i}this.set(r,o.value,o)}}set(e,r,o={}){var S,k,D,E,A;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:s,noDisposeOnSet:d=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const f=x(this,Sa).call(this,e,r,o.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),le(this,ee,Tn).call(this,e,"set"),this;let y=x(this,at)===0?void 0:x(this,nt).get(e);if(y===void 0)y=x(this,at)===0?x(this,ct):x(this,pr).length!==0?x(this,pr).pop():x(this,at)===x(this,sr)?le(this,ee,Cl).call(this,!1):x(this,at),x(this,$e)[y]=e,x(this,xe)[y]=r,x(this,nt).set(e,y),x(this,Ct)[x(this,ct)]=y,x(this,Ft)[y]=x(this,ct),ge(this,ct,y),xl(this,at)._++,x(this,ho).call(this,y,f,p),p&&(p.set="add"),h=!1;else{le(this,ee,Ya).call(this,y);const w=x(this,xe)[y];if(r!==w){if(x(this,hn)&&le(this,ee,He).call(this,w)){w.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:L}=w;L!==void 0&&!d&&(x(this,fr)&&((S=x(this,cr))==null||S.call(this,L,e,"set")),x(this,_t)&&((k=x(this,dt))==null||k.push([L,e,"set"])))}else d||(x(this,fr)&&((D=x(this,cr))==null||D.call(this,w,e,"set")),x(this,_t)&&((E=x(this,dt))==null||E.push([w,e,"set"])));if(x(this,Fn).call(this,y),x(this,ho).call(this,y,f,p),x(this,xe)[y]=r,p){p.set="replace";const L=w&&le(this,ee,He).call(this,w)?w.__staleWhileFetching:w;L!==void 0&&(p.oldValue=L)}}else p&&(p.set="update")}if(i!==0&&!x(this,Rt)&&le(this,ee,ad).call(this),x(this,Rt)&&(h||x(this,ka).call(this,y,i,s),p&&x(this,Fr).call(this,p,y)),!d&&x(this,_t)&&x(this,dt)){const w=x(this,dt);let L;for(;L=w==null?void 0:w.shift();)(A=x(this,dr))==null||A.call(this,...L)}return this}pop(){var e;try{for(;x(this,at);){const r=x(this,xe)[x(this,vt)];if(le(this,ee,Cl).call(this,!0),le(this,ee,He).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(x(this,_t)&&x(this,dt)){const r=x(this,dt);let o;for(;o=r==null?void 0:r.shift();)(e=x(this,dr))==null||e.call(this,...o)}}}has(e,r={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=r,s=x(this,nt).get(e);if(s!==void 0){const d=x(this,xe)[s];if(le(this,ee,He).call(this,d)&&d.__staleWhileFetching===void 0)return!1;if(x(this,Ot).call(this,s))i&&(i.has="stale",x(this,Fr).call(this,i,s));else return o&&x(this,In).call(this,s),i&&(i.has="hit",x(this,Fr).call(this,i,s)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:o=this.allowStale}=r,i=x(this,nt).get(e);if(i===void 0||!o&&x(this,Ot).call(this,i))return;const s=x(this,xe)[i];return le(this,ee,He).call(this,s)?s.__staleWhileFetching:s}async fetch(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:d=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:S=this.allowStaleOnFetchRejection,ignoreFetchAbort:k=this.ignoreFetchAbort,allowStaleOnFetchAbort:D=this.allowStaleOnFetchAbort,context:E,forceRefresh:A=!1,status:w,signal:L}=r;if(!x(this,hn))return w&&(w.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:w});const R={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:d,noDisposeOnSet:u,size:p,sizeCalculation:h,noUpdateTTL:f,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:D,ignoreFetchAbort:k,status:w,signal:L};let H=x(this,nt).get(e);if(H===void 0){w&&(w.fetch="miss");const G=le(this,ee,_l).call(this,e,H,R,E);return G.__returned=G}else{const G=x(this,xe)[H];if(le(this,ee,He).call(this,G)){const F=o&&G.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",F&&(w.returnedStale=!0)),F?G.__staleWhileFetching:G.__returned=G}const K=x(this,Ot).call(this,H);if(!A&&!K)return w&&(w.fetch="hit"),le(this,ee,Ya).call(this,H),i&&x(this,In).call(this,H),w&&x(this,Fr).call(this,w,H),G;const U=le(this,ee,_l).call(this,e,H,R,E),W=U.__staleWhileFetching!==void 0&&o;return w&&(w.fetch=K?"stale":"refresh",W&&K&&(w.returnedStale=!0)),W?U.__staleWhileFetching:U.__returned=U}}async forceFetch(e,r={}){const o=await this.fetch(e,r);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,r={}){const o=x(this,go);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:s,...d}=r,u=this.get(e,d);if(!s&&u!==void 0)return u;const p=o(e,u,{options:d,context:i});return this.set(e,p,d),p}get(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:d}=r,u=x(this,nt).get(e);if(u!==void 0){const p=x(this,xe)[u],h=le(this,ee,He).call(this,p);return d&&x(this,Fr).call(this,d,u),x(this,Ot).call(this,u)?(d&&(d.get="stale"),h?(d&&o&&p.__staleWhileFetching!==void 0&&(d.returnedStale=!0),o?p.__staleWhileFetching:void 0):(s||le(this,ee,Tn).call(this,e,"expire"),d&&o&&(d.returnedStale=!0),o?p:void 0)):(d&&(d.get="hit"),h?p.__staleWhileFetching:(le(this,ee,Ya).call(this,u),i&&x(this,In).call(this,u),p))}else d&&(d.get="miss")}delete(e){return le(this,ee,Tn).call(this,e,"delete")}clear(){return le(this,ee,sd).call(this,"delete")}};sr=new WeakMap,It=new WeakMap,cr=new WeakMap,dr=new WeakMap,po=new WeakMap,go=new WeakMap,at=new WeakMap,ur=new WeakMap,nt=new WeakMap,$e=new WeakMap,xe=new WeakMap,Ct=new WeakMap,Ft=new WeakMap,vt=new WeakMap,ct=new WeakMap,pr=new WeakMap,dt=new WeakMap,gr=new WeakMap,hr=new WeakMap,Rt=new WeakMap,fr=new WeakMap,hn=new WeakMap,_t=new WeakMap,ee=new WeakSet,ad=function(){const e=new Ni(x(this,sr)),r=new Ni(x(this,sr));ge(this,Rt,e),ge(this,hr,r),ge(this,ka,(s,d,u=co.now())=>{if(r[s]=d!==0?u:0,e[s]=d,d!==0&&this.ttlAutopurge){const p=setTimeout(()=>{x(this,Ot).call(this,s)&&le(this,ee,Tn).call(this,x(this,$e)[s],"expire")},d+1);p.unref&&p.unref()}}),ge(this,In,s=>{r[s]=e[s]!==0?co.now():0}),ge(this,Fr,(s,d)=>{if(e[d]){const u=e[d],p=r[d];if(!u||!p)return;s.ttl=u,s.start=p,s.now=o||i();const h=s.now-p;s.remainingTTL=u-h}});let o=0;const i=()=>{const s=co.now();if(this.ttlResolution>0){o=s;const d=setTimeout(()=>o=0,this.ttlResolution);d.unref&&d.unref()}return s};this.getRemainingTTL=s=>{const d=x(this,nt).get(s);if(d===void 0)return 0;const u=e[d],p=r[d];if(!u||!p)return 1/0;const h=(o||i())-p;return u-h},ge(this,Ot,s=>{const d=r[s],u=e[s];return!!u&&!!d&&(o||i())-d>u})},In=new WeakMap,Fr=new WeakMap,ka=new WeakMap,Ot=new WeakMap,sf=function(){const e=new Ni(x(this,sr));ge(this,ur,0),ge(this,gr,e),ge(this,Fn,r=>{ge(this,ur,x(this,ur)-e[r]),e[r]=0}),ge(this,Sa,(r,o,i,s)=>{if(le(this,ee,He).call(this,o))return 0;if(!gn(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(o,r),!gn(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ge(this,ho,(r,o,i)=>{if(e[r]=o,x(this,It)){const s=x(this,It)-e[r];for(;x(this,ur)>s;)le(this,ee,Cl).call(this,!0)}ge(this,ur,x(this,ur)+e[r]),i&&(i.entrySize=o,i.totalCalculatedSize=x(this,ur))})},Fn=new WeakMap,ho=new WeakMap,Sa=new WeakMap,kn=function*({allowStale:e=this.allowStale}={}){if(x(this,at))for(let r=x(this,ct);!(!le(this,ee,id).call(this,r)||((e||!x(this,Ot).call(this,r))&&(yield r),r===x(this,vt)));)r=x(this,Ft)[r]},Sn=function*({allowStale:e=this.allowStale}={}){if(x(this,at))for(let r=x(this,vt);!(!le(this,ee,id).call(this,r)||((e||!x(this,Ot).call(this,r))&&(yield r),r===x(this,ct)));)r=x(this,Ct)[r]},id=function(e){return e!==void 0&&x(this,nt).get(x(this,$e)[e])===e},Cl=function(e){var s,d;const r=x(this,vt),o=x(this,$e)[r],i=x(this,xe)[r];return x(this,hn)&&le(this,ee,He).call(this,i)?i.__abortController.abort(new Error("evicted")):(x(this,fr)||x(this,_t))&&(x(this,fr)&&((s=x(this,cr))==null||s.call(this,i,o,"evict")),x(this,_t)&&((d=x(this,dt))==null||d.push([i,o,"evict"]))),x(this,Fn).call(this,r),e&&(x(this,$e)[r]=void 0,x(this,xe)[r]=void 0,x(this,pr).push(r)),x(this,at)===1?(ge(this,vt,ge(this,ct,0)),x(this,pr).length=0):ge(this,vt,x(this,Ct)[r]),x(this,nt).delete(o),xl(this,at)._--,r},_l=function(e,r,o,i){const s=r===void 0?void 0:x(this,xe)[r];if(le(this,ee,He).call(this,s))return s;const d=new Ei,{signal:u}=o;u==null||u.addEventListener("abort",()=>d.abort(u.reason),{signal:d.signal});const p={signal:d.signal,options:o,context:i},h=(E,A=!1)=>{const{aborted:w}=d.signal,L=o.ignoreFetchAbort&&E!==void 0;if(o.status&&(w&&!A?(o.status.fetchAborted=!0,o.status.fetchError=d.signal.reason,L&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),w&&!L&&!A)return y(d.signal.reason);const R=k;return x(this,xe)[r]===k&&(E===void 0?R.__staleWhileFetching?x(this,xe)[r]=R.__staleWhileFetching:le(this,ee,Tn).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,E,p.options))),E},f=E=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=E),y(E)),y=E=>{const{aborted:A}=d.signal,w=A&&o.allowStaleOnFetchAbort,L=w||o.allowStaleOnFetchRejection,R=L||o.noDeleteOnFetchRejection,H=k;if(x(this,xe)[r]===k&&(!R||H.__staleWhileFetching===void 0?le(this,ee,Tn).call(this,e,"fetch"):w||(x(this,xe)[r]=H.__staleWhileFetching)),L)return o.status&&H.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw E},S=(E,A)=>{var L;const w=(L=x(this,po))==null?void 0:L.call(this,e,s,p);w&&w instanceof Promise&&w.then(R=>E(R===void 0?void 0:R),A),d.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(E(void 0),o.allowStaleOnFetchAbort&&(E=R=>h(R,!0)))})};o.status&&(o.status.fetchDispatched=!0);const k=new Promise(S).then(h,f),D=Object.assign(k,{__abortController:d,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,D,{...p.options,status:void 0}),r=x(this,nt).get(e)):x(this,xe)[r]=D,D},He=function(e){if(!x(this,hn))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Ei},ld=function(e,r){x(this,Ft)[r]=e,x(this,Ct)[e]=r},Ya=function(e){e!==x(this,ct)&&(e===x(this,vt)?ge(this,vt,x(this,Ct)[e]):le(this,ee,ld).call(this,x(this,Ft)[e],x(this,Ct)[e]),le(this,ee,ld).call(this,x(this,ct),e),ge(this,ct,e))},Tn=function(e,r){var i,s,d,u;let o=!1;if(x(this,at)!==0){const p=x(this,nt).get(e);if(p!==void 0)if(o=!0,x(this,at)===1)le(this,ee,sd).call(this,r);else{x(this,Fn).call(this,p);const h=x(this,xe)[p];if(le(this,ee,He).call(this,h)?h.__abortController.abort(new Error("deleted")):(x(this,fr)||x(this,_t))&&(x(this,fr)&&((i=x(this,cr))==null||i.call(this,h,e,r)),x(this,_t)&&((s=x(this,dt))==null||s.push([h,e,r]))),x(this,nt).delete(e),x(this,$e)[p]=void 0,x(this,xe)[p]=void 0,p===x(this,ct))ge(this,ct,x(this,Ft)[p]);else if(p===x(this,vt))ge(this,vt,x(this,Ct)[p]);else{const f=x(this,Ft)[p];x(this,Ct)[f]=x(this,Ct)[p];const y=x(this,Ct)[p];x(this,Ft)[y]=x(this,Ft)[p]}xl(this,at)._--,x(this,pr).push(p)}}if(x(this,_t)&&((d=x(this,dt))!=null&&d.length)){const p=x(this,dt);let h;for(;h=p==null?void 0:p.shift();)(u=x(this,dr))==null||u.call(this,...h)}return o},sd=function(e){var r,o,i;for(const s of le(this,ee,Sn).call(this,{allowStale:!0})){const d=x(this,xe)[s];if(le(this,ee,He).call(this,d))d.__abortController.abort(new Error("deleted"));else{const u=x(this,$e)[s];x(this,fr)&&((r=x(this,cr))==null||r.call(this,d,u,e)),x(this,_t)&&((o=x(this,dt))==null||o.push([d,u,e]))}}if(x(this,nt).clear(),x(this,xe).fill(void 0),x(this,$e).fill(void 0),x(this,Rt)&&x(this,hr)&&(x(this,Rt).fill(0),x(this,hr).fill(0)),x(this,gr)&&x(this,gr).fill(0),ge(this,vt,0),ge(this,ct,0),x(this,pr).length=0,ge(this,ur,0),ge(this,at,0),x(this,_t)&&x(this,dt)){const s=x(this,dt);let d;for(;d=s==null?void 0:s.shift();)(i=x(this,dr))==null||i.call(this,...d)}};let Ps=Vs;const zE={cacheSize:15e6};class GE{constructor(e){ze(this,"_str");ze(this,"_rawJson");ze(this,"_zodSchema");ze(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Rn=class Rn{constructor(e){ze(this,"fileDataCache");ze(this,"fileDataRefs",new Map);const r={...zE,...e??{}};this.fileDataCache=new Ps({maxSize:r.cacheSize,fetchMethod:async o=>new GE(await Bm().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const r=this.fileDataRefs.get(e);if(r!==void 0)return r;const o=n.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),o}getContentBytes(e){if(e===void 0)return;const r=this.getDataRef(e);return n.computed(()=>{var o;return(o=r.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const r=this.getDataRef(e);return n.computed(()=>{var o;return(o=r==null?void 0:r.value)==null?void 0:o.str})}getContentJson(e,r){if(e===void 0)return;const o=this.getDataRef(e);return n.computed(()=>{var i,s;return r===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(s=o==null?void 0:o.value)==null?void 0:s.validatedJson(r)})}static getContentBytes(e){return Rn.globalInstance.getContentBytes(e)}static getContentString(e){return Rn.globalInstance.getContentString(e)}static getContentJson(e,r){return Rn.globalInstance.getContentJson(e,r)}};ze(Rn,"globalInstance",new Rn);let Ds=Rn;V.AgGridTheme=uu,V.BlockLayout=cE,V.ContextProvider=H1,V.DataTable=Mw,V.DemoData=KT,V.DropdownListItem=aa,V.LongText=vs,V.MultiError=Tl,V.PlAgCellFile=LE,V.PlAgDataTable=ME,V.PlAgOverlayLoading=hp,V.PlAgOverlayNoRows=fp,V.PlAlert=l0,V.PlBlockPage=Hw,V.PlBtnAccent=p0,V.PlBtnDanger=h0,V.PlBtnGhost=us,V.PlBtnGroup=I0,V.PlBtnLink=y0,V.PlBtnPrimary=cs,V.PlBtnSecondary=ds,V.PlCheckbox=IC,V.PlCheckboxGroup=zC,V.PlChip=bs,V.PlContainer=Kw,V.PlCopyData=up,V.PlDialogModal=xs,V.PlDropdown=ys,V.PlDropdownLegacy=lC,V.PlDropdownLine=Wu,V.PlDropdownMulti=VC,V.PlDropdownRef=Ix,V.PlFileDialog=qu,V.PlFileInput=cp,V.PlGrid=t0,V.PlIcon16=hi,V.PlIcon24=Gu,V.PlLogView=f_,V.PlMaskIcon16=ta,V.PlMaskIcon24=Lr,V.PlNotificationAlert=dp,V.PlNumberField=bC,V.PlProgressBar=pC,V.PlRow=Jw,V.PlSlideModal=e_,V.PlSpacer=Vu,V.PlTextArea=gx,V.PlTextField=ju,V.PlToggleSwitch=n_,V.PlTooltip=Vt,V.ReactiveFileContent=Ds,V.Scrollable=Rk,V.Slider=ok,V.SliderRange=Vk,V.SliderRangeTriple=Ck,V.ThemeSwitcher=zw,V.UnresolvedError=Sl,V.ValueOrErrorsComponent=DE,V.activateAgGrid=du,V.animate=Nu,V.animateInfinite=Lw,V.call=_u,V.computedResult=RE,V.createModel=Pl,V.debounce=Au,V.defineApp=ab,V.defineStore=FE,V.delay=ku,V.detectOutside=hx,V.ensureError=Al,V.eventListener=fs,V.formatZodError=Bl,V.getElementScrollPosition=Zu,V.identity=Nl,V.isDefined=Cf,V.isElementVisible=Uu,V.isJsonEqual=El,V.isZodError=Ml,V.listToOptions=Iw,V.makeEaseInOut=Vw,V.makeEaseOut=Eu,V.maskIcons16=HT,V.maskIcons24=qT,V.normalizeListOptions=Bn,V.notEmpty=os,V.randomInt=Tu,V.randomString=Dw,V.requestTick=as,V.scrollIntoView=oa,V.showContextMenu=ts,V.throttle=Mu,V.timeout=Su,V.unwrapOptionalResult=xf,V.unwrapValueOrErrors=pd,V.useClickOutside=gi,V.useDraggable=uk,V.useEventListener=et,V.useFormState=ck,V.useHover=xu,V.useInterval=sk,V.useLabelNotch=Vr,V.useLocalStorage=Bu,V.useMouse=wu,V.useMouseCapture=nn,V.usePosition=ra,V.useQuery=dk,V.useResizeObserver=pp,V.useScroll=ak,V.useSdkPlugin=Jl,V.useSortable=lk,V.useTheme=Du,V.useWatchFetch=wp,V.wrapOptionalResult=gd,V.wrapValueOrErrors=wf,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
89
+ }`;var Pe=Mf(function(){return Oe(_,le+"return "+q).apply(n,x)});if(Pe.source=q,Oc(Pe))throw Pe;return Pe}function PD(o){return ze(o).toLowerCase()}function VD(o){return ze(o).toUpperCase()}function ND(o,a,c){if(o=ze(o),o&&(c||a===n))return Uh(o);if(!o||!(a=$t(a)))return o;var p=_n(o),g=_n(a),_=Wh(p,g),x=Hh(p,g)+1;return wr(p,_,x).join("")}function DD(o,a,c){if(o=ze(o),o&&(c||a===n))return o.slice(0,qh(o)+1);if(!o||!(a=$t(a)))return o;var p=_n(o),g=Hh(p,_n(a))+1;return wr(p,0,g).join("")}function FD(o,a,c){if(o=ze(o),o&&(c||a===n))return o.replace(Ol,"");if(!o||!(a=$t(a)))return o;var p=_n(o),g=Wh(p,_n(a));return wr(p,g).join("")}function RD(o,a){var c=I,p=Y;if(Je(a)){var g="separator"in a?a.separator:g;c="length"in a?Te(a.length):c,p="omission"in a?$t(a.omission):p}o=ze(o);var _=o.length;if(gi(o)){var x=_n(o);_=x.length}if(c>=_)return o;var E=c-yi(p);if(E<1)return p;var P=x?wr(x,0,E).join(""):o.slice(0,E);if(g===n)return P+p;if(x&&(E+=P.length-E),Gc(g)){if(o.slice(E).search(g)){var U,W=P;for(g.global||(g=nc(g.source,ze(hh.exec(g))+"g")),g.lastIndex=0;U=g.exec(W);)var q=U.index;P=P.slice(0,q===n?E:q)}}else if(o.indexOf($t(g),E)!=E){var te=P.lastIndexOf(g);te>-1&&(P=P.slice(0,te))}return P+p}function MD(o){return o=ze(o),o&&jE.test(o)?o.replace(ch,uA):o}var ID=ki(function(o,a,c){return o+(c?" ":"")+a.toUpperCase()}),$c=Mp("toUpperCase");function Rf(o,a,c){return o=ze(o),a=c?n:a,a===n?sA(o)?fA(o):JT(o):o.match(a)||[]}var Mf=Ve(function(o,a){try{return zt(o,n,a)}catch(c){return Oc(c)?c:new be(c)}}),LD=Un(function(o,a){return Kt(a,function(c){c=Vn(c),Zn(o,c,Ic(o[c],o))}),o});function OD(o){var a=o==null?0:o.length,c=he();return o=a?qe(o,function(p){if(typeof p[1]!="function")throw new Yt(d);return[c(p[0]),p[1]]}):[],Ve(function(p){for(var g=-1;++g<a;){var _=o[g];if(zt(_[0],this,p))return zt(_[1],this,p)}})}function GD(o){return uB(Xt(o,v))}function Uc(o){return function(){return o}}function zD(o,a){return o==null||o!==o?a:o}var ZD=Lp(),$D=Lp(!0);function Nt(o){return o}function Wc(o){return fp(typeof o=="function"?o:Xt(o,v))}function UD(o){return gp(Xt(o,v))}function WD(o,a){return yp(o,Xt(a,v))}var HD=Ve(function(o,a){return function(c){return Go(c,o,a)}}),jD=Ve(function(o,a){return function(c){return Go(o,c,a)}});function Hc(o,a,c){var p=ut(a),g=Js(a,p);c==null&&!(Je(a)&&(g.length||!p.length))&&(c=a,a=o,o=this,g=Js(a,ut(a)));var _=!(Je(c)&&"chain"in c)||!!c.chain,x=Hn(o);return Kt(g,function(E){var P=a[E];o[E]=P,x&&(o.prototype[E]=function(){var U=this.__chain__;if(_||U){var W=o(this.__wrapped__),q=W.__actions__=Bt(this.__actions__);return q.push({func:P,args:arguments,thisArg:o}),W.__chain__=U,W}return P.apply(o,mr([this.value()],arguments))})}),o}function qD(){return ht._===this&&(ht._=CA),this}function jc(){}function KD(o){return o=Te(o),Ve(function(a){return vp(a,o)})}var YD=kc(qe),JD=kc(Oh),XD=kc(Kl);function If(o){return Vc(o)?Yl(Vn(o)):AB(o)}function QD(o){return function(a){return o==null?n:Ur(o,a)}}var eF=Gp(),tF=Gp(!0);function qc(){return[]}function Kc(){return!1}function nF(){return{}}function rF(){return""}function iF(){return!0}function oF(o,a){if(o=Te(o),o<1||o>xe)return[];var c=At,p=vt(o,At);a=he(a),o-=At;for(var g=Ql(p,a);++c<o;)a(c);return g}function sF(o){return ke(o)?qe(o,Vn):Ut(o)?[o]:Bt(nf(ze(o)))}function aF(o){var a=++vA;return ze(o)+a}var lF=ra(function(o,a){return o+a},0),cF=Sc("ceil"),dF=ra(function(o,a){return o/a},1),uF=Sc("floor");function hF(o){return o&&o.length?Ys(o,Nt,dc):n}function pF(o,a){return o&&o.length?Ys(o,he(a,2),dc):n}function fF(o){return Zh(o,Nt)}function mF(o,a){return Zh(o,he(a,2))}function gF(o){return o&&o.length?Ys(o,Nt,fc):n}function yF(o,a){return o&&o.length?Ys(o,he(a,2),fc):n}var vF=ra(function(o,a){return o*a},1),_F=Sc("round"),CF=ra(function(o,a){return o-a},0);function wF(o){return o&&o.length?Xl(o,Nt):0}function bF(o,a){return o&&o.length?Xl(o,he(a,2)):0}return y.after=UV,y.ary=ff,y.assign=VN,y.assignIn=Af,y.assignInWith=ga,y.assignWith=NN,y.at=DN,y.before=mf,y.bind=Ic,y.bindAll=LD,y.bindKey=gf,y.castArray=nN,y.chain=uf,y.chunk=uP,y.compact=hP,y.concat=pP,y.cond=OD,y.conforms=GD,y.constant=Uc,y.countBy=wV,y.create=FN,y.curry=yf,y.curryRight=vf,y.debounce=_f,y.defaults=RN,y.defaultsDeep=MN,y.defer=WV,y.delay=HV,y.difference=fP,y.differenceBy=mP,y.differenceWith=gP,y.drop=yP,y.dropRight=vP,y.dropRightWhile=_P,y.dropWhile=CP,y.fill=wP,y.filter=xV,y.flatMap=EV,y.flatMapDeep=TV,y.flatMapDepth=AV,y.flatten=af,y.flattenDeep=bP,y.flattenDepth=xP,y.flip=jV,y.flow=ZD,y.flowRight=$D,y.fromPairs=kP,y.functions=$N,y.functionsIn=UN,y.groupBy=BV,y.initial=EP,y.intersection=TP,y.intersectionBy=AP,y.intersectionWith=BP,y.invert=HN,y.invertBy=jN,y.invokeMap=VV,y.iteratee=Wc,y.keyBy=NV,y.keys=ut,y.keysIn=Vt,y.map=da,y.mapKeys=KN,y.mapValues=YN,y.matches=UD,y.matchesProperty=WD,y.memoize=ha,y.merge=JN,y.mergeWith=Bf,y.method=HD,y.methodOf=jD,y.mixin=Hc,y.negate=pa,y.nthArg=KD,y.omit=XN,y.omitBy=QN,y.once=qV,y.orderBy=DV,y.over=YD,y.overArgs=KV,y.overEvery=JD,y.overSome=XD,y.partial=Lc,y.partialRight=Cf,y.partition=FV,y.pick=eD,y.pickBy=Pf,y.property=If,y.propertyOf=QD,y.pull=DP,y.pullAll=cf,y.pullAllBy=FP,y.pullAllWith=RP,y.pullAt=MP,y.range=eF,y.rangeRight=tF,y.rearg=YV,y.reject=IV,y.remove=IP,y.rest=JV,y.reverse=Rc,y.sampleSize=OV,y.set=nD,y.setWith=rD,y.shuffle=GV,y.slice=LP,y.sortBy=$V,y.sortedUniq=WP,y.sortedUniqBy=HP,y.split=ED,y.spread=XV,y.tail=jP,y.take=qP,y.takeRight=KP,y.takeRightWhile=YP,y.takeWhile=JP,y.tap=hV,y.throttle=QV,y.thru=ca,y.toArray=Sf,y.toPairs=Vf,y.toPairsIn=Nf,y.toPath=sF,y.toPlainObject=Tf,y.transform=iD,y.unary=eN,y.union=XP,y.unionBy=QP,y.unionWith=eV,y.uniq=tV,y.uniqBy=nV,y.uniqWith=rV,y.unset=oD,y.unzip=Mc,y.unzipWith=df,y.update=sD,y.updateWith=aD,y.values=Ti,y.valuesIn=lD,y.without=iV,y.words=Rf,y.wrap=tN,y.xor=oV,y.xorBy=sV,y.xorWith=aV,y.zip=lV,y.zipObject=cV,y.zipObjectDeep=dV,y.zipWith=uV,y.entries=Vf,y.entriesIn=Nf,y.extend=Af,y.extendWith=ga,Hc(y,y),y.add=lF,y.attempt=Mf,y.camelCase=hD,y.capitalize=Df,y.ceil=cF,y.clamp=cD,y.clone=rN,y.cloneDeep=oN,y.cloneDeepWith=sN,y.cloneWith=iN,y.conformsTo=aN,y.deburr=Ff,y.defaultTo=zD,y.divide=dF,y.endsWith=pD,y.eq=wn,y.escape=fD,y.escapeRegExp=mD,y.every=bV,y.find=kV,y.findIndex=of,y.findKey=IN,y.findLast=SV,y.findLastIndex=sf,y.findLastKey=LN,y.floor=uF,y.forEach=hf,y.forEachRight=pf,y.forIn=ON,y.forInRight=GN,y.forOwn=zN,y.forOwnRight=ZN,y.get=zc,y.gt=lN,y.gte=cN,y.has=WN,y.hasIn=Zc,y.head=lf,y.identity=Nt,y.includes=PV,y.indexOf=SP,y.inRange=dD,y.invoke=qN,y.isArguments=jr,y.isArray=ke,y.isArrayBuffer=dN,y.isArrayLike=Pt,y.isArrayLikeObject=tt,y.isBoolean=uN,y.isBuffer=br,y.isDate=hN,y.isElement=pN,y.isEmpty=fN,y.isEqual=mN,y.isEqualWith=gN,y.isError=Oc,y.isFinite=yN,y.isFunction=Hn,y.isInteger=wf,y.isLength=fa,y.isMap=bf,y.isMatch=vN,y.isMatchWith=_N,y.isNaN=CN,y.isNative=wN,y.isNil=xN,y.isNull=bN,y.isNumber=xf,y.isObject=Je,y.isObjectLike=Qe,y.isPlainObject=Ho,y.isRegExp=Gc,y.isSafeInteger=kN,y.isSet=kf,y.isString=ma,y.isSymbol=Ut,y.isTypedArray=Ei,y.isUndefined=SN,y.isWeakMap=EN,y.isWeakSet=TN,y.join=PP,y.kebabCase=gD,y.last=en,y.lastIndexOf=VP,y.lowerCase=yD,y.lowerFirst=vD,y.lt=AN,y.lte=BN,y.max=hF,y.maxBy=pF,y.mean=fF,y.meanBy=mF,y.min=gF,y.minBy=yF,y.stubArray=qc,y.stubFalse=Kc,y.stubObject=nF,y.stubString=rF,y.stubTrue=iF,y.multiply=vF,y.nth=NP,y.noConflict=qD,y.noop=jc,y.now=ua,y.pad=_D,y.padEnd=CD,y.padStart=wD,y.parseInt=bD,y.random=uD,y.reduce=RV,y.reduceRight=MV,y.repeat=xD,y.replace=kD,y.result=tD,y.round=_F,y.runInContext=A,y.sample=LV,y.size=zV,y.snakeCase=SD,y.some=ZV,y.sortedIndex=OP,y.sortedIndexBy=GP,y.sortedIndexOf=zP,y.sortedLastIndex=ZP,y.sortedLastIndexBy=$P,y.sortedLastIndexOf=UP,y.startCase=TD,y.startsWith=AD,y.subtract=CF,y.sum=wF,y.sumBy=bF,y.template=BD,y.times=oF,y.toFinite=jn,y.toInteger=Te,y.toLength=Ef,y.toLower=PD,y.toNumber=tn,y.toSafeInteger=PN,y.toString=ze,y.toUpper=VD,y.trim=ND,y.trimEnd=DD,y.trimStart=FD,y.truncate=RD,y.unescape=MD,y.uniqueId=aF,y.upperCase=ID,y.upperFirst=$c,y.each=hf,y.eachRight=pf,y.first=lf,Hc(y,function(){var o={};return Bn(y,function(a,c){Ze.call(y.prototype,c)||(o[c]=a)}),o}(),{chain:!1}),y.VERSION=i,Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),Kt(["drop","take"],function(o,a){De.prototype[o]=function(c){c=c===n?1:at(Te(c),0);var p=this.__filtered__&&!a?new De(this):this.clone();return p.__filtered__?p.__takeCount__=vt(c,p.__takeCount__):p.__views__.push({size:vt(c,At),type:o+(p.__dir__<0?"Right":"")}),p},De.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),Kt(["filter","map","takeWhile"],function(o,a){var c=a+1,p=c==V||c==Q;De.prototype[o]=function(g){var _=this.clone();return _.__iteratees__.push({iteratee:he(g,3),type:c}),_.__filtered__=_.__filtered__||p,_}}),Kt(["head","last"],function(o,a){var c="take"+(a?"Right":"");De.prototype[o]=function(){return this[c](1).value()[0]}}),Kt(["initial","tail"],function(o,a){var c="drop"+(a?"":"Right");De.prototype[o]=function(){return this.__filtered__?new De(this):this[c](1)}}),De.prototype.compact=function(){return this.filter(Nt)},De.prototype.find=function(o){return this.filter(o).head()},De.prototype.findLast=function(o){return this.reverse().find(o)},De.prototype.invokeMap=Ve(function(o,a){return typeof o=="function"?new De(this):this.map(function(c){return Go(c,o,a)})}),De.prototype.reject=function(o){return this.filter(pa(he(o)))},De.prototype.slice=function(o,a){o=Te(o);var c=this;return c.__filtered__&&(o>0||a<0)?new De(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),a!==n&&(a=Te(a),c=a<0?c.dropRight(-a):c.take(a-o)),c)},De.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},De.prototype.toArray=function(){return this.take(At)},Bn(De.prototype,function(o,a){var c=/^(?:filter|find|map|reject)|While$/.test(a),p=/^(?:head|last)$/.test(a),g=y[p?"take"+(a=="last"?"Right":""):a],_=p||/^find/.test(a);g&&(y.prototype[a]=function(){var x=this.__wrapped__,E=p?[1]:arguments,P=x instanceof De,U=E[0],W=P||ke(x),q=function(Ne){var Fe=g.apply(y,mr([Ne],E));return p&&te?Fe[0]:Fe};W&&c&&typeof U=="function"&&U.length!=1&&(P=W=!1);var te=this.__chain__,le=!!this.__actions__.length,fe=_&&!te,Pe=P&&!le;if(!_&&W){x=Pe?x:new De(this);var me=o.apply(x,E);return me.__actions__.push({func:ca,args:[q],thisArg:n}),new Jt(me,te)}return fe&&Pe?o.apply(this,E):(me=this.thru(q),fe?p?me.value()[0]:me.value():me)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(o){var a=Rs[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",p=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var g=arguments;if(p&&!this.__chain__){var _=this.value();return a.apply(ke(_)?_:[],g)}return this[c](function(x){return a.apply(ke(x)?x:[],g)})}}),Bn(De.prototype,function(o,a){var c=y[a];if(c){var p=c.name+"";Ze.call(wi,p)||(wi[p]=[]),wi[p].push({name:a,func:c})}}),wi[na(n,C).name]=[{name:"wrapper",func:n}],De.prototype.clone=MA,De.prototype.reverse=IA,De.prototype.value=LA,y.prototype.at=pV,y.prototype.chain=fV,y.prototype.commit=mV,y.prototype.next=gV,y.prototype.plant=vV,y.prototype.reverse=_V,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=CV,y.prototype.first=y.prototype.head,Do&&(y.prototype[Do]=yV),y},vi=mA();Or?((Or.exports=vi)._=vi,Wl._=vi):ht._=vi}).call(Ai)}(ws,ws.exports);var Xe=ws.exports;const sE={class:"grid-overlay-container"},ju=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",sE,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),aE={},lE={class:"grid-overlay-container"};function cE(t,e){return r.openBlock(),r.createElementBlock("div",lE,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const qu=xl(aE,[["render",cE]]);async function dE(t,e){throw Error("not implemented")}function uE(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function hE(t,e){const n=[];for(const i of e)if(t[i].type==="column"){const s=uE(t[i].spec);for(const l of s){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const d=Cd(l),u=t.findIndex(h=>Xe.isEqual(h.id,d));if(u===-1)throw console.error("axis not found",i,d,t),Error("axis not found");n.push({columnIdx:i,axisIdx:u})}}return n}const Ku=(t,e)=>(t+e).toString();function pE(t,e,n,i,s,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const d=t[0];let u=-1,h=-1;for(let v=0;v<l.length;++v)l[v]===d.axisIdx&&(u=v),l[v]===d.columnIdx&&(h=v);const f=(()=>{const S=i[u].data.filter(k=>k!==null);return Array.from(new Set(S))})();f.sort(),h>u?(n.splice(h,1),n.splice(u,1)):(n.splice(u,1),n.splice(h,1));const m=fE(s,i,u,h,f,e.rows);for(let v=0;v<f.length;++v){const S=f[v],k=S+"@"+v;n.push({colId:k,field:Ku(i.length,v),headerName:S,valueFormatter:Yu})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function fE(t,e,n,i,s,l){const d=new Map;let u=0;for(let f=0;f<l;f++){const m={};for(let T=0;T<e.length;++T){if(T===n||T===i)continue;const B=t[T].toString();m[B]=e[T].data[f]}let v;const S=Bi(Object.values(m))??"";d.has(S)?v=d.get(S):(d.set(S,m),v=m,v.id=u.toString(),u++);const k=s.indexOf(e[n].data[f]);if(k===-1)throw Error("index not found");const D=Ku(e.length,k);v[D]=e[i].data[f]}return Array.from(d.values())}function mE(t){return Bi({type:t.type,id:t.id})}function gE(t){return JSON.parse(t)}const Yu=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function yE(t,e,n){var s,l,d;const i=mE(e);return{colId:i,field:t.toString(),headerName:((l=(s=e.spec.annotations)==null?void 0:s["pl7.app/label"])==null?void 0:l.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(i))??((d=e.spec.annotations)==null?void 0:d["pl7.app/table/visibility"])==="optional",valueFormatter:Yu,cellDataType:(u=>{switch(u){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${u}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function Ju(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function Xu(t){const e=[];return is(t,n=>(e.push(n),n)),e}async function vE(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Xe.uniqWith(n.map(s=>Ra(s.spec.axesSpec).map(Xe.cloneDeep)).flat(),Xe.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function _E(t,e,n){const i=Xu(n),l=(await vE(t,e,i)).filter(d=>!Xe.find(i,u=>d.columnId===u.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(d=>({type:"column",column:d}))}}async function CE(t,e,n,i){const s=n.filter(m=>m.type!=="Bytes"),l=Xu(i),d=s.map(m=>[]),u=s.map(m=>null);for(let m=0;m<l.length;++m){const v=Ra(l[m].spec.axesSpec);for(let S=0;S<v.length;++S){const k=Xe.findIndex(s,D=>Xe.isEqual(D,v[S]));k===-1||u[k]||(v.length===1&&l[m].spec.name==="pl7.app/label"?(d[k]=[[m,S]],u[k]=l[m].columnId):d[k].push([m,S]))}}for(let m=s.length-1;m>=0;--m)d[m].length||(u.splice(m,1),d.splice(m,1),s.splice(m,1));const h=100,f=s.map(m=>new Set);e:for(let m=s.length-1;m>=0;--m){for(const[v,S]of d[m]){const k=await t.getUniqueValues(e,{columnId:l[v].columnId,...!u[m]&&{axis:Xe.cloneDeep(s[m])},filters:[],limit:h});if(k.overflow){u.splice(m,1),d.splice(m,1),s.splice(m,1);continue e}const D=k.values.type;for(const T of k.values.data)if(!(_d(T,D)||T===null)&&(f[m].add(Ju(T,D)),f[m].size===h)){u.splice(m,1),d.splice(m,1),s.splice(m,1);continue e}}if(!f[m].size){u.splice(m,1),d.splice(m,1),s.splice(m,1);continue e}}return s.map((m,v)=>{const S=[...f[v]].map(D=>({value:D,text:D.toString()})),k=S[0].value;return{axis:Xe.cloneDeep(m),...u[v]&&{column:u[v]},options:S,defaultValue:k}})}function wE(t,e,n){const i=e.length,s=[];for(let l=0;l<e[0].data.length;++l){const d={};for(let u=0;u<i;++u){const h=t[u].toString(),f=e[u].data[l],m=e[u].type;cg(e[u].absent,l)?d[h]=void 0:_d(f,m)||f===null?d[h]=null:d[h]=Ju(f,m)}d.id=(n++).toString(),s.push(d)}return s}const bE=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function xE(t,e,n,i){const s=await t.getSpec(e),l=[...s.keys()].filter(k=>!Xe.find(n,D=>Xe.isEqual(D.axis,s[k].id)||Xe.isEqual(D.column,s[k].id))),d=Xe.cloneDeep(l),u=hE(s,l);for(let k=l.length-1;k>=0;--k){const D=l[k];if(!bE(s[D]))continue;const T=Ra(s[D].spec.axesSpec)[0],B=Xe.findIndex(l,C=>Xe.isEqual(s[C].id,T));if(B!==-1){l[B]=D;for(const C of u)C.axisIdx===D&&(C.axisIdx=B);l.splice(k,1),d.splice(k,1)}}const h=await t.getShape(e),f=h.rows,m=d.map(k=>yE(k,s[k],i));if(u.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",u.length," transposition will not be applied."),u.length===1)return pE(u,h,m,await t.getData(e,l),d,l);let v;return{rowModelType:"serverSide",columnDefs:m,serverSideDatasource:{getRows:async k=>{try{if(f==0){k.success({rowData:[],rowCount:f}),k.api.showNoRowsOverlay(),k.api.setGridOption("loading",!1);return}if(v&&!Xe.isEqual(v.request.sortModel,k.request.sortModel)){v=void 0,k.fail(),k.api.setGridOption("loading",!0);return}v=k;let D=0,T=[];if(f>0&&k.request.startRow!==void 0&&k.request.endRow!==void 0&&(D=Math.min(f,k.request.endRow)-k.request.startRow,D>0)){const B=await t.getData(e,l,{offset:k.request.startRow,length:D});T=wE(d,B,k.request.startRow)}k.success({rowData:T,rowCount:f}),k.api.autoSizeAllColumns(),k.api.setGridOption("loading",!1)}catch{k.fail(),k.api.setGridOption("loading",!0)}}}}}const kE={class:"ap-ag-data-table-container"},SE={key:0,class:"ap-ag-data-table-sheets"},EE=xl(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(t){b.ModuleRegistry.registerModules([qo.ClientSideRowModelModule,nd.ClipboardModule,td.ServerSideRowModelModule,rd.RangeSelectionModule,Oa,Zd]);const e=r.useModel(t,"modelValue"),n=t,{settings:i}=r.toRefs(n);r.watch(()=>i.value,async(C,R)=>{if(C.sourceType!=="pframe"||!C.pFrame||!C.join||R&&R.sourceType==="pframe"&&Xe.isEqual(C.pFrame,R.pFrame)&&Xe.isEqual(C.join,R.join))return;const L=window.platforma;if(!L)throw Error("platforma not set");const j=L.pFrameDriver;if(!j)throw Error("platforma.pFrameDriver not set");const z=await _E(j,C.pFrame,C.join),K=e.value;K.pTableParams||(K.pTableParams={sorting:[],filters:[]}),K.pTableParams.join=z,e.value=K});const s=Qu(()=>i.value.sourceType,async C=>{var L;const R=i.value.sourceType;switch(R){case"pframe":{const j=window.platforma;if(!j)throw Error("platforma not set");const z=j.pFrameDriver;if(!z)throw Error("platforma.pFrameDriver not set");if(!i.value.pFrame)return[];const K=i.value.pFrame,$=(L=e.value.pTableParams)==null?void 0:L.join;return $?await CE(z,K,i.value.sheetAxes,$):[]}case"ptable":return i.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${R}`)}});function l(C){if(!(i.value.sourceType!=="ptable"&&i.value.sourceType!=="pframe"))return(C==null?void 0:C.sortModel.map(R=>({column:gE(R.colId),ascending:R.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const d=r.computed({get:()=>{const C=e.value;return{columnOrder:C.gridState.columnOrder,sort:C.gridState.sort,columnVisibility:C.gridState.columnVisibility}},set:C=>{const R=e.value,L=v.value.rowModelType==="clientSide"?void 0:l(C.sort);R.gridState.columnOrder=C.columnOrder,R.gridState.sort=C.sort,R.gridState.columnVisibility=C.columnVisibility,(i.value.sourceType==="ptable"||i.value.sourceType==="pframe")&&(R.pTableParams||(R.pTableParams={sorting:[],filters:[]}),R.pTableParams.sorting=L),e.value=R}}),u=C=>Bi(C);function h(C){var R;if(!(i.value.sourceType!=="ptable"&&i.value.sourceType!=="pframe"))return((R=s.value)==null?void 0:R.map(L=>({type:"bySingleColumn",column:L.column?{type:"column",id:L.column}:{type:"axis",id:L.axis},predicate:{operator:"Equal",reference:C[u(L.axis)]}})))??[]}const f=r.computed({get:()=>e.value.gridState.sheets??{},set:C=>{const R=h(C),L=e.value;L.gridState.sheets=C,(i.value.sourceType==="ptable"||i.value.sourceType==="pframe")&&(L.pTableParams||(L.pTableParams={sorting:[],filters:[]}),L.pTableParams.filters=R),e.value=L}});r.watch(()=>[i.value,s.value],(C,R)=>{const[L,j]=C;if(!j)return;if(R){const[K,$]=R;if((L.sourceType==="ptable"||L.sourceType==="pframe")&&L.sourceType===(K==null?void 0:K.sourceType)&&Xe.isEqual(j,$))return}if(L.sourceType!=="ptable"&&L.sourceType!=="pframe"){f.value={};return}const z=f.value;for(const K of j){const $=u(K.axis);z[$]||(z[$]=K.defaultValue??K.options[0].value)}f.value=z},{immediate:!0});const m=r.shallowRef(),v=r.ref({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:d.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:C=>{C.api.autoSizeAllColumns()},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:C=>C.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:ju,noRowsOverlayComponent:qu,sideBar:{toolPanels:[{id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel",toolPanelParams:{suppressRowGroups:!0,suppressValues:!0,suppressPivots:!0,suppressPivotMode:!0,suppressColumnFilter:!0,suppressColumnSelectAll:!0,suppressColumnExpandAll:!0}}],defaultToolPanel:"columns"}}),S=C=>{const R=C.api;m.value=new Proxy(R,{get(L,j,z){switch(j){case"setGridOption":return(K,$)=>{const N=v.value;N[K]=$,v.value=N,R.updateGridOptions(N)};case"updateGridOptions":return K=>{v.value={...v.value,...K},R.updateGridOptions(K)};default:return Reflect.get(L,j,z)}}})},k=C=>{d.value={columnOrder:C.state.columnOrder,sort:C.state.sort,columnVisibility:C.state.columnVisibility??(C.state.columnOrder?{hiddenColIds:[]}:void 0)},v.value.initialState=d.value},D=()=>{const C=m.value.getState();d.value={columnOrder:C.columnOrder,sort:C.sort,columnVisibility:C.columnVisibility??(C.columnOrder?{hiddenColIds:[]}:void 0)},v.value.initialState=d.value,m.value=void 0},T=r.ref(0);r.watch(()=>[m.value,d.value],(C,R)=>{if(Xe.isEqual(C,R))return;const[L,j]=C;if(!L)return;const z=L.getState(),K={columnOrder:z.columnOrder,sort:z.sort,columnVisibility:z.columnVisibility??(z.columnOrder?{hiddenColIds:[]}:void 0)};Xe.isEqual(j,K)||(v.value.initialState=j,++T.value)}),r.watch(()=>v.value,(C,R)=>{R&&C.rowModelType!=R.rowModelType&&++T.value});const B=(C,R)=>{var j;const L=f.value;L[C]!==R&&(L[C]=R,f.value=L,(j=m.value)==null||j.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))};return r.watch(()=>[m.value,i.value,s.value],async(C,R)=>{var N,H;if(Xe.isEqual(C,R))return;const[L,j,z]=C;if(!L)return;const K=window.platforma;if(!K)throw Error("platforma not set");const $=j.sourceType;switch($){case"pframe":case"ptable":{const I=K.pFrameDriver;if(!I)throw Error("platforma.pFrameDriver not set");const Y=j.pTable;if(!Y||!z)return L.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ue=(H=(N=d.value)==null?void 0:N.columnVisibility)==null?void 0:H.hiddenColIds,Z=await xE(I,Y,z,ue);return L.updateGridOptions({loading:Z.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...Z})}case"xsv":{const I=K.blobDriver;if(!I)throw Error("platforma.blobDriver not set");const Y=j.xsvFile;if(!(Y!=null&&Y.ok)||!Y.value)return L.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ue=await dE(I,Y.value);return L.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ue})}default:throw Error(`unsupported source type: ${$}`)}}),(C,R)=>(r.openBlock(),r.createElementBlock("div",kE,[r.createVNode(r.Transition,{name:"ap-ag-data-table-sheets-transition"},{default:r.withCtx(()=>[r.unref(s).value&&r.unref(s).value.length>0?(r.openBlock(),r.createElementBlock("div",SE,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s).value,(L,j)=>(r.openBlock(),r.createBlock(r.unref(Su),{key:j,"model-value":f.value[u(L.axis)],options:L.options,"onUpdate:modelValue":z=>B(u(L.axis),z)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0)]),_:1}),(r.openBlock(),r.createBlock(r.unref(qf.AgGridVue),{key:T.value,theme:r.unref(Ud),class:"ap-ag-data-table-grid","grid-options":v.value,onGridReady:S,onStateUpdated:k,onGridPreDestroyed:D},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-93a0f82c"]]),TE={key:1,class:"alert-error"},AE={key:2},BE=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),i=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=r.computed(()=>n.value===void 0&&i.value===void 0);return(l,d)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",TE,r.toDisplayString(i.value),1)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",AE,"Unresolved")):r.createCommentVNode("",!0)]))}}),PE={style:{height:"100%"}},VE=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),i=r.computed(()=>e.params.value);function s(d){e.params.setValue(d)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(i.value):void 0);return(d,u)=>(r.openBlock(),r.createElementBlock("div",PE,[r.createVNode(r.unref(Zu),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":i.value,progress:l.value,"onUpdate:modelValue":s},null,8,["placeholder","extensions","model-value","progress"])]))}}),bs=new Map;function NE(t,e){const n=r.getCurrentScope()??r.effectScope(),i=n.run(()=>(r.onScopeDispose(()=>{bs.delete(t)}),r.reactive(e())));return i[Symbol.dispose]=()=>{n.stop()},i}function DE(t){const e=Symbol();return()=>(bs.has(e)||bs.set(e,NE(e,t)),bs.get(e))}function FE(t){return r.computed(()=>{try{return od(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Qu(t,e,n){const i=r.ref(0),s=r.reactive({loading:r.computed(()=>i.value>0),loadingRef:i,value:void 0,error:void 0}),l=Jf(e);return r.watch(t,async d=>{s.error=void 0,i.value++,l(d).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{i.value--})},Object.assign({immediate:!0,deep:!0},n??{})),s}const ai=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,eh=new Set,kl=typeof process=="object"&&process?process:{},th=(t,e,n,i)=>{typeof kl.emitWarning=="function"?kl.emitWarning(t,e,n,i):console.error(`[${n}] ${e}: ${t}`)};let xs=globalThis.AbortController,nh=globalThis.AbortSignal;if(typeof xs>"u"){nh=class{constructor(){Ge(this,"onabort");Ge(this,"_onabort",[]);Ge(this,"reason");Ge(this,"aborted",!1)}addEventListener(i,s){this._onabort.push(s)}},xs=class{constructor(){Ge(this,"signal",new nh);e()}abort(i){var s,l;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const d of this.signal._onabort)d(i);(l=(s=this.signal).onabort)==null||l.call(s,i)}}};let t=((ih=kl.env)==null?void 0:ih.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,th("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const RE=t=>!eh.has(t),hr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),rh=t=>hr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ks:null:null;class ks extends Array{constructor(e){super(e),this.fill(0)}}const Fr=class Fr{constructor(e,n){Ge(this,"heap");Ge(this,"length");if(!w(Fr,li))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=rh(e);if(!n)return[];pe(Fr,li,!0);const i=new Fr(e,n);return pe(Fr,li,!1),i}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};li=new WeakMap,Le(Fr,li,!1);let Sl=Fr;const Al=class Al{constructor(e){Le(this,ee);Le(this,cn);Le(this,Mt);Le(this,dn);Le(this,un);Le(this,ci);Le(this,di);Ge(this,"ttl");Ge(this,"ttlResolution");Ge(this,"ttlAutopurge");Ge(this,"updateAgeOnGet");Ge(this,"updateAgeOnHas");Ge(this,"allowStale");Ge(this,"noDisposeOnSet");Ge(this,"noUpdateTTL");Ge(this,"maxEntrySize");Ge(this,"sizeCalculation");Ge(this,"noDeleteOnFetchRejection");Ge(this,"noDeleteOnStaleGet");Ge(this,"allowStaleOnFetchAbort");Ge(this,"allowStaleOnFetchRejection");Ge(this,"ignoreFetchAbort");Le(this,ot);Le(this,hn);Le(this,rt);Le(this,We);Le(this,we);Le(this,bt);Le(this,It);Le(this,yt);Le(this,ct);Le(this,pn);Le(this,dt);Le(this,fn);Le(this,mn);Le(this,Lt);Le(this,gn);Le(this,pr);Le(this,xt);Le(this,Rr,()=>{});Le(this,Ln,()=>{});Le(this,wo,()=>{});Le(this,Ot,()=>!1);Le(this,Mr,e=>{});Le(this,ui,(e,n,i)=>{});Le(this,bo,(e,n,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ge(this,oh,"LRUCache");const{max:n=0,ttl:i,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:d,updateAgeOnHas:u,allowStale:h,dispose:f,disposeAfter:m,noDisposeOnSet:v,noUpdateTTL:S,maxSize:k=0,maxEntrySize:D=0,sizeCalculation:T,fetchMethod:B,memoMethod:C,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:j,allowStaleOnFetchAbort:z,ignoreFetchAbort:K}=e;if(n!==0&&!hr(n))throw new TypeError("max option must be a nonnegative integer");const $=n?rh(n):Array;if(!$)throw new Error("invalid max value: "+n);if(pe(this,cn,n),pe(this,Mt,k),this.maxEntrySize=D||w(this,Mt),this.sizeCalculation=T,this.sizeCalculation){if(!w(this,Mt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(pe(this,di,C),B!==void 0&&typeof B!="function")throw new TypeError("fetchMethod must be a function if specified");if(pe(this,ci,B),pe(this,pr,!!B),pe(this,rt,new Map),pe(this,We,new Array(n).fill(void 0)),pe(this,we,new Array(n).fill(void 0)),pe(this,bt,new $(n)),pe(this,It,new $(n)),pe(this,yt,0),pe(this,ct,0),pe(this,pn,Sl.create(n)),pe(this,ot,0),pe(this,hn,0),typeof f=="function"&&pe(this,dn,f),typeof m=="function"?(pe(this,un,m),pe(this,dt,[])):(pe(this,un,void 0),pe(this,dt,void 0)),pe(this,gn,!!w(this,dn)),pe(this,xt,!!w(this,un)),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!S,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!j,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!K,this.maxEntrySize!==0){if(w(this,Mt)!==0&&!hr(w(this,Mt)))throw new TypeError("maxSize must be a positive integer if specified");if(!hr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ae(this,ee,zf).call(this)}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!u,this.ttlResolution=hr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=i||0,this.ttl){if(!hr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ae(this,ee,Jc).call(this)}if(w(this,cn)===0&&this.ttl===0&&w(this,Mt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!w(this,cn)&&!w(this,Mt)){const N="LRU_CACHE_UNBOUNDED";RE(N)&&(eh.add(N),th("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,Al))}}static unsafeExposeInternals(e){return{starts:w(e,mn),ttls:w(e,Lt),sizes:w(e,fn),keyMap:w(e,rt),keyList:w(e,We),valList:w(e,we),next:w(e,bt),prev:w(e,It),get head(){return w(e,yt)},get tail(){return w(e,ct)},free:w(e,pn),isBackgroundFetch:n=>{var i;return ae(i=e,ee,je).call(i,n)},backgroundFetch:(n,i,s,l)=>{var d;return ae(d=e,ee,_a).call(d,n,i,s,l)},moveToTail:n=>{var i;return ae(i=e,ee,jo).call(i,n)},indexes:n=>{var i;return ae(i=e,ee,xr).call(i,n)},rindexes:n=>{var i;return ae(i=e,ee,kr).call(i,n)},isStale:n=>{var i;return w(i=e,Ot).call(i,n)}}}get max(){return w(this,cn)}get maxSize(){return w(this,Mt)}get calculatedSize(){return w(this,hn)}get size(){return w(this,ot)}get fetchMethod(){return w(this,ci)}get memoMethod(){return w(this,di)}get dispose(){return w(this,dn)}get disposeAfter(){return w(this,un)}getRemainingTTL(e){return w(this,rt).has(e)?1/0:0}*entries(){for(const e of ae(this,ee,xr).call(this))w(this,we)[e]!==void 0&&w(this,We)[e]!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield[w(this,We)[e],w(this,we)[e]])}*rentries(){for(const e of ae(this,ee,kr).call(this))w(this,we)[e]!==void 0&&w(this,We)[e]!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield[w(this,We)[e],w(this,we)[e]])}*keys(){for(const e of ae(this,ee,xr).call(this)){const n=w(this,We)[e];n!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield n)}}*rkeys(){for(const e of ae(this,ee,kr).call(this)){const n=w(this,We)[e];n!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield n)}}*values(){for(const e of ae(this,ee,xr).call(this))w(this,we)[e]!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield w(this,we)[e])}*rvalues(){for(const e of ae(this,ee,kr).call(this))w(this,we)[e]!==void 0&&!ae(this,ee,je).call(this,w(this,we)[e])&&(yield w(this,we)[e])}[(sh=Symbol.iterator,oh=Symbol.toStringTag,sh)](){return this.entries()}find(e,n={}){for(const i of ae(this,ee,xr).call(this)){const s=w(this,we)[i],l=ae(this,ee,je).call(this,s)?s.__staleWhileFetching:s;if(l!==void 0&&e(l,w(this,We)[i],this))return this.get(w(this,We)[i],n)}}forEach(e,n=this){for(const i of ae(this,ee,xr).call(this)){const s=w(this,we)[i],l=ae(this,ee,je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,w(this,We)[i],this)}}rforEach(e,n=this){for(const i of ae(this,ee,kr).call(this)){const s=w(this,we)[i],l=ae(this,ee,je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,w(this,We)[i],this)}}purgeStale(){let e=!1;for(const n of ae(this,ee,kr).call(this,{allowStale:!0}))w(this,Ot).call(this,n)&&(ae(this,ee,Sr).call(this,w(this,We)[n],"expire"),e=!0);return e}info(e){const n=w(this,rt).get(e);if(n===void 0)return;const i=w(this,we)[n],s=ae(this,ee,je).call(this,i)?i.__staleWhileFetching:i;if(s===void 0)return;const l={value:s};if(w(this,Lt)&&w(this,mn)){const d=w(this,Lt)[n],u=w(this,mn)[n];if(d&&u){const h=d-(ai.now()-u);l.ttl=h,l.start=Date.now()}}return w(this,fn)&&(l.size=w(this,fn)[n]),l}dump(){const e=[];for(const n of ae(this,ee,xr).call(this,{allowStale:!0})){const i=w(this,We)[n],s=w(this,we)[n],l=ae(this,ee,je).call(this,s)?s.__staleWhileFetching:s;if(l===void 0||i===void 0)continue;const d={value:l};if(w(this,Lt)&&w(this,mn)){d.ttl=w(this,Lt)[n];const u=ai.now()-w(this,mn)[n];d.start=Math.floor(Date.now()-u)}w(this,fn)&&(d.size=w(this,fn)[n]),e.unshift([i,d])}return e}load(e){this.clear();for(const[n,i]of e){if(i.start){const s=Date.now()-i.start;i.start=ai.now()-s}this.set(n,i.value,i)}}set(e,n,i={}){var S,k,D,T,B;if(n===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:l,noDisposeOnSet:d=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:h}=i;let{noUpdateTTL:f=this.noUpdateTTL}=i;const m=w(this,bo).call(this,e,n,i.size||0,u);if(this.maxEntrySize&&m>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),ae(this,ee,Sr).call(this,e,"set"),this;let v=w(this,ot)===0?void 0:w(this,rt).get(e);if(v===void 0)v=w(this,ot)===0?w(this,ct):w(this,pn).length!==0?w(this,pn).pop():w(this,ot)===w(this,cn)?ae(this,ee,va).call(this,!1):w(this,ot),w(this,We)[v]=e,w(this,we)[v]=n,w(this,rt).set(e,v),w(this,bt)[w(this,ct)]=v,w(this,It)[v]=w(this,ct),pe(this,ct,v),ya(this,ot)._++,w(this,ui).call(this,v,m,h),h&&(h.set="add"),f=!1;else{ae(this,ee,jo).call(this,v);const C=w(this,we)[v];if(n!==C){if(w(this,pr)&&ae(this,ee,je).call(this,C)){C.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=C;R!==void 0&&!d&&(w(this,gn)&&((S=w(this,dn))==null||S.call(this,R,e,"set")),w(this,xt)&&((k=w(this,dt))==null||k.push([R,e,"set"])))}else d||(w(this,gn)&&((D=w(this,dn))==null||D.call(this,C,e,"set")),w(this,xt)&&((T=w(this,dt))==null||T.push([C,e,"set"])));if(w(this,Mr).call(this,v),w(this,ui).call(this,v,m,h),w(this,we)[v]=n,h){h.set="replace";const R=C&&ae(this,ee,je).call(this,C)?C.__staleWhileFetching:C;R!==void 0&&(h.oldValue=R)}}else h&&(h.set="update")}if(s!==0&&!w(this,Lt)&&ae(this,ee,Jc).call(this),w(this,Lt)&&(f||w(this,wo).call(this,v,s,l),h&&w(this,Ln).call(this,h,v)),!d&&w(this,xt)&&w(this,dt)){const C=w(this,dt);let R;for(;R=C==null?void 0:C.shift();)(B=w(this,un))==null||B.call(this,...R)}return this}pop(){var e;try{for(;w(this,ot);){const n=w(this,we)[w(this,yt)];if(ae(this,ee,va).call(this,!0),ae(this,ee,je).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(w(this,xt)&&w(this,dt)){const n=w(this,dt);let i;for(;i=n==null?void 0:n.shift();)(e=w(this,un))==null||e.call(this,...i)}}}has(e,n={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=n,l=w(this,rt).get(e);if(l!==void 0){const d=w(this,we)[l];if(ae(this,ee,je).call(this,d)&&d.__staleWhileFetching===void 0)return!1;if(w(this,Ot).call(this,l))s&&(s.has="stale",w(this,Ln).call(this,s,l));else return i&&w(this,Rr).call(this,l),s&&(s.has="hit",w(this,Ln).call(this,s,l)),!0}else s&&(s.has="miss");return!1}peek(e,n={}){const{allowStale:i=this.allowStale}=n,s=w(this,rt).get(e);if(s===void 0||!i&&w(this,Ot).call(this,s))return;const l=w(this,we)[s];return ae(this,ee,je).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:d=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:v=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:S=this.allowStaleOnFetchRejection,ignoreFetchAbort:k=this.ignoreFetchAbort,allowStaleOnFetchAbort:D=this.allowStaleOnFetchAbort,context:T,forceRefresh:B=!1,status:C,signal:R}=n;if(!w(this,pr))return C&&(C.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:l,status:C});const L={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:l,ttl:d,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:m,noDeleteOnFetchRejection:v,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:D,ignoreFetchAbort:k,status:C,signal:R};let j=w(this,rt).get(e);if(j===void 0){C&&(C.fetch="miss");const z=ae(this,ee,_a).call(this,e,j,L,T);return z.__returned=z}else{const z=w(this,we)[j];if(ae(this,ee,je).call(this,z)){const I=i&&z.__staleWhileFetching!==void 0;return C&&(C.fetch="inflight",I&&(C.returnedStale=!0)),I?z.__staleWhileFetching:z.__returned=z}const K=w(this,Ot).call(this,j);if(!B&&!K)return C&&(C.fetch="hit"),ae(this,ee,jo).call(this,j),s&&w(this,Rr).call(this,j),C&&w(this,Ln).call(this,C,j),z;const $=ae(this,ee,_a).call(this,e,j,L,T),H=$.__staleWhileFetching!==void 0&&i;return C&&(C.fetch=K?"stale":"refresh",H&&K&&(C.returnedStale=!0)),H?$.__staleWhileFetching:$.__returned=$}}async forceFetch(e,n={}){const i=await this.fetch(e,n);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,n={}){const i=w(this,di);if(!i)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:l,...d}=n,u=this.get(e,d);if(!l&&u!==void 0)return u;const h=i(e,u,{options:d,context:s});return this.set(e,h,d),h}get(e,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:d}=n,u=w(this,rt).get(e);if(u!==void 0){const h=w(this,we)[u],f=ae(this,ee,je).call(this,h);return d&&w(this,Ln).call(this,d,u),w(this,Ot).call(this,u)?(d&&(d.get="stale"),f?(d&&i&&h.__staleWhileFetching!==void 0&&(d.returnedStale=!0),i?h.__staleWhileFetching:void 0):(l||ae(this,ee,Sr).call(this,e,"expire"),d&&i&&(d.returnedStale=!0),i?h:void 0)):(d&&(d.get="hit"),f?h.__staleWhileFetching:(ae(this,ee,jo).call(this,u),s&&w(this,Rr).call(this,u),h))}else d&&(d.get="miss")}delete(e){return ae(this,ee,Sr).call(this,e,"delete")}clear(){return ae(this,ee,ed).call(this,"delete")}};cn=new WeakMap,Mt=new WeakMap,dn=new WeakMap,un=new WeakMap,ci=new WeakMap,di=new WeakMap,ot=new WeakMap,hn=new WeakMap,rt=new WeakMap,We=new WeakMap,we=new WeakMap,bt=new WeakMap,It=new WeakMap,yt=new WeakMap,ct=new WeakMap,pn=new WeakMap,dt=new WeakMap,fn=new WeakMap,mn=new WeakMap,Lt=new WeakMap,gn=new WeakMap,pr=new WeakMap,xt=new WeakMap,ee=new WeakSet,Jc=function(){const e=new ks(w(this,cn)),n=new ks(w(this,cn));pe(this,Lt,e),pe(this,mn,n),pe(this,wo,(l,d,u=ai.now())=>{if(n[l]=d!==0?u:0,e[l]=d,d!==0&&this.ttlAutopurge){const h=setTimeout(()=>{w(this,Ot).call(this,l)&&ae(this,ee,Sr).call(this,w(this,We)[l],"expire")},d+1);h.unref&&h.unref()}}),pe(this,Rr,l=>{n[l]=e[l]!==0?ai.now():0}),pe(this,Ln,(l,d)=>{if(e[d]){const u=e[d],h=n[d];if(!u||!h)return;l.ttl=u,l.start=h,l.now=i||s();const f=l.now-h;l.remainingTTL=u-f}});let i=0;const s=()=>{const l=ai.now();if(this.ttlResolution>0){i=l;const d=setTimeout(()=>i=0,this.ttlResolution);d.unref&&d.unref()}return l};this.getRemainingTTL=l=>{const d=w(this,rt).get(l);if(d===void 0)return 0;const u=e[d],h=n[d];if(!u||!h)return 1/0;const f=(i||s())-h;return u-f},pe(this,Ot,l=>{const d=n[l],u=e[l];return!!u&&!!d&&(i||s())-d>u})},Rr=new WeakMap,Ln=new WeakMap,wo=new WeakMap,Ot=new WeakMap,zf=function(){const e=new ks(w(this,cn));pe(this,hn,0),pe(this,fn,e),pe(this,Mr,n=>{pe(this,hn,w(this,hn)-e[n]),e[n]=0}),pe(this,bo,(n,i,s,l)=>{if(ae(this,ee,je).call(this,i))return 0;if(!hr(s))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(s=l(i,n),!hr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),pe(this,ui,(n,i,s)=>{if(e[n]=i,w(this,Mt)){const l=w(this,Mt)-e[n];for(;w(this,hn)>l;)ae(this,ee,va).call(this,!0)}pe(this,hn,w(this,hn)+e[n]),s&&(s.entrySize=i,s.totalCalculatedSize=w(this,hn))})},Mr=new WeakMap,ui=new WeakMap,bo=new WeakMap,xr=function*({allowStale:e=this.allowStale}={}){if(w(this,ot))for(let n=w(this,ct);!(!ae(this,ee,Xc).call(this,n)||((e||!w(this,Ot).call(this,n))&&(yield n),n===w(this,yt)));)n=w(this,It)[n]},kr=function*({allowStale:e=this.allowStale}={}){if(w(this,ot))for(let n=w(this,yt);!(!ae(this,ee,Xc).call(this,n)||((e||!w(this,Ot).call(this,n))&&(yield n),n===w(this,ct)));)n=w(this,bt)[n]},Xc=function(e){return e!==void 0&&w(this,rt).get(w(this,We)[e])===e},va=function(e){var l,d;const n=w(this,yt),i=w(this,We)[n],s=w(this,we)[n];return w(this,pr)&&ae(this,ee,je).call(this,s)?s.__abortController.abort(new Error("evicted")):(w(this,gn)||w(this,xt))&&(w(this,gn)&&((l=w(this,dn))==null||l.call(this,s,i,"evict")),w(this,xt)&&((d=w(this,dt))==null||d.push([s,i,"evict"]))),w(this,Mr).call(this,n),e&&(w(this,We)[n]=void 0,w(this,we)[n]=void 0,w(this,pn).push(n)),w(this,ot)===1?(pe(this,yt,pe(this,ct,0)),w(this,pn).length=0):pe(this,yt,w(this,bt)[n]),w(this,rt).delete(i),ya(this,ot)._--,n},_a=function(e,n,i,s){const l=n===void 0?void 0:w(this,we)[n];if(ae(this,ee,je).call(this,l))return l;const d=new xs,{signal:u}=i;u==null||u.addEventListener("abort",()=>d.abort(u.reason),{signal:d.signal});const h={signal:d.signal,options:i,context:s},f=(T,B=!1)=>{const{aborted:C}=d.signal,R=i.ignoreFetchAbort&&T!==void 0;if(i.status&&(C&&!B?(i.status.fetchAborted=!0,i.status.fetchError=d.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),C&&!R&&!B)return v(d.signal.reason);const L=k;return w(this,we)[n]===k&&(T===void 0?L.__staleWhileFetching?w(this,we)[n]=L.__staleWhileFetching:ae(this,ee,Sr).call(this,e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,T,h.options))),T},m=T=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=T),v(T)),v=T=>{const{aborted:B}=d.signal,C=B&&i.allowStaleOnFetchAbort,R=C||i.allowStaleOnFetchRejection,L=R||i.noDeleteOnFetchRejection,j=k;if(w(this,we)[n]===k&&(!L||j.__staleWhileFetching===void 0?ae(this,ee,Sr).call(this,e,"fetch"):C||(w(this,we)[n]=j.__staleWhileFetching)),R)return i.status&&j.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),j.__staleWhileFetching;if(j.__returned===j)throw T},S=(T,B)=>{var R;const C=(R=w(this,ci))==null?void 0:R.call(this,e,l,h);C&&C instanceof Promise&&C.then(L=>T(L===void 0?void 0:L),B),d.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(T(void 0),i.allowStaleOnFetchAbort&&(T=L=>f(L,!0)))})};i.status&&(i.status.fetchDispatched=!0);const k=new Promise(S).then(f,m),D=Object.assign(k,{__abortController:d,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,D,{...h.options,status:void 0}),n=w(this,rt).get(e)):w(this,we)[n]=D,D},je=function(e){if(!w(this,pr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof xs},Qc=function(e,n){w(this,It)[n]=e,w(this,bt)[e]=n},jo=function(e){e!==w(this,ct)&&(e===w(this,yt)?pe(this,yt,w(this,bt)[e]):ae(this,ee,Qc).call(this,w(this,It)[e],w(this,bt)[e]),ae(this,ee,Qc).call(this,w(this,ct),e),pe(this,ct,e))},Sr=function(e,n){var s,l,d,u;let i=!1;if(w(this,ot)!==0){const h=w(this,rt).get(e);if(h!==void 0)if(i=!0,w(this,ot)===1)ae(this,ee,ed).call(this,n);else{w(this,Mr).call(this,h);const f=w(this,we)[h];if(ae(this,ee,je).call(this,f)?f.__abortController.abort(new Error("deleted")):(w(this,gn)||w(this,xt))&&(w(this,gn)&&((s=w(this,dn))==null||s.call(this,f,e,n)),w(this,xt)&&((l=w(this,dt))==null||l.push([f,e,n]))),w(this,rt).delete(e),w(this,We)[h]=void 0,w(this,we)[h]=void 0,h===w(this,ct))pe(this,ct,w(this,It)[h]);else if(h===w(this,yt))pe(this,yt,w(this,bt)[h]);else{const m=w(this,It)[h];w(this,bt)[m]=w(this,bt)[h];const v=w(this,bt)[h];w(this,It)[v]=w(this,It)[h]}ya(this,ot)._--,w(this,pn).push(h)}}if(w(this,xt)&&((d=w(this,dt))!=null&&d.length)){const h=w(this,dt);let f;for(;f=h==null?void 0:h.shift();)(u=w(this,un))==null||u.call(this,...f)}return i},ed=function(e){var n,i,s;for(const l of ae(this,ee,kr).call(this,{allowStale:!0})){const d=w(this,we)[l];if(ae(this,ee,je).call(this,d))d.__abortController.abort(new Error("deleted"));else{const u=w(this,We)[l];w(this,gn)&&((n=w(this,dn))==null||n.call(this,d,u,e)),w(this,xt)&&((i=w(this,dt))==null||i.push([d,u,e]))}}if(w(this,rt).clear(),w(this,we).fill(void 0),w(this,We).fill(void 0),w(this,Lt)&&w(this,mn)&&(w(this,Lt).fill(0),w(this,mn).fill(0)),w(this,fn)&&w(this,fn).fill(0),pe(this,yt,0),pe(this,ct,0),w(this,pn).length=0,pe(this,hn,0),pe(this,ot,0),w(this,xt)&&w(this,dt)){const l=w(this,dt);let d;for(;d=l==null?void 0:l.shift();)(s=w(this,un))==null||s.call(this,...d)}};let El=Al;const ME={cacheSize:15e6};class IE{constructor(e){Ge(this,"_str");Ge(this,"_rawJson");Ge(this,"_zodSchema");Ge(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Ir=class Ir{constructor(e){Ge(this,"fileDataCache");Ge(this,"fileDataRefs",new Map);const n={...ME,...e??{}};this.fileDataCache=new El({maxSize:n.cacheSize,fetchMethod:async i=>new IE(await ug().blobDriver.getContent(i)),sizeCalculation:i=>i.bytes.length,dispose:(i,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const i=r.shallowRef();return this.fileDataRefs.set(e,i),(async()=>{try{const s=await this.fileDataCache.fetch(e);i.value=s}catch(s){console.error(s)}})(),i}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var i;return(i=n.value)==null?void 0:i.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var i;return(i=n==null?void 0:n.value)==null?void 0:i.str})}getContentJson(e,n){if(e===void 0)return;const i=this.getDataRef(e);return r.computed(()=>{var s,l;return n===void 0?(s=i==null?void 0:i.value)==null?void 0:s.rawJson:(l=i==null?void 0:i.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Ir.globalInstance.getContentBytes(e)}static getContentString(e){return Ir.globalInstance.getContentString(e)}static getContentJson(e,n){return Ir.globalInstance.getContentJson(e,n)}};Ge(Ir,"globalInstance",new Ir);let Tl=Ir;F.AgGridTheme=Ud,F.BlockLayout=oE,F.ContextProvider=$x,F.DataTable=E_,F.DemoData=W1,F.DropdownListItem=to,F.LongText=ul,F.MultiError=ba,F.PlAgCellFile=VE,F.PlAgDataTable=EE,F.PlAgOverlayLoading=ju,F.PlAgOverlayNoRows=qu,F.PlAlert=rC,F.PlBlockPage=$_,F.PlBtnAccent=lC,F.PlBtnDanger=dC,F.PlBtnGhost=ol,F.PlBtnGroup=NC,F.PlBtnLink=fC,F.PlBtnPrimary=rl,F.PlBtnSecondary=il,F.PlCheckbox=N0,F.PlCheckboxGroup=M0,F.PlChip=pl,F.PlContainer=W_,F.PlCopyData=Uu,F.PlDialogModal=ml,F.PlDropdown=hl,F.PlDropdownLegacy=r0,F.PlDropdownLine=Su,F.PlDropdownMulti=P0,F.PlDropdownRef=Nw,F.PlFileDialog=Tu,F.PlFileInput=Zu,F.PlGrid=J_,F.PlIcon16=ds,F.PlIcon24=Cu,F.PlLogView=ub,F.PlMaskIcon16=Ji,F.PlMaskIcon24=Mn,F.PlNotificationAlert=$u,F.PlNumberField=m0,F.PlProgressBar=l0,F.PlRow=j_,F.PlSlideModal=Y0,F.PlSpacer=pu,F.PlTextArea=cw,F.PlTextField=wu,F.PlToggleSwitch=Q0,F.PlTooltip=Ft,F.ReactiveFileContent=Tl,F.Scrollable=Fk,F.Slider=ek,F.SliderRange=Pk,F.SliderRangeTriple=vk,F.ThemeSwitcher=M_,F.UnresolvedError=wa,F.ValueOrErrorsComponent=BE,F.activateAgGrid=$d,F.animate=au,F.animateInfinite=V_,F.call=nu,F.computedResult=FE,F.createModel=Aa,F.debounce=lu,F.defineApp=tv,F.defineStore=DE,F.delay=ru,F.detectOutside=dw,F.ensureError=Sa,F.eventListener=cl,F.formatZodError=Ta,F.getElementScrollPosition=xu,F.identity=ka,F.isDefined=nm,F.isElementVisible=bu,F.isJsonEqual=xa,F.isZodError=Ea,F.listToOptions=N_,F.makeEaseInOut=P_,F.makeEaseOut=su,F.maskIcons16=$1,F.maskIcons24=U1,F.normalizeListOptions=Pr,F.notEmpty=Xa,F.randomInt=ou,F.randomString=B_,F.requestTick=Qa,F.scrollIntoView=eo,F.showContextMenu=Ka,F.throttle=cu,F.timeout=iu,F.unwrapOptionalResult=tm,F.unwrapValueOrErrors=id,F.useClickOutside=cs,F.useDraggable=ak,F.useEventListener=et,F.useFormState=ok,F.useHover=eu,F.useInterval=ik,F.useLabelNotch=Rn,F.useLocalStorage=du,F.useMouse=Qd,F.useMouseCapture=rr,F.usePosition=Xi,F.useQuery=sk,F.useResizeObserver=Wu,F.useScroll=tk,F.useSdkPlugin=Wa,F.useSortable=rk,F.useTheme=hu,F.useWatchFetch=Qu,F.wrapOptionalResult=od,F.wrapValueOrErrors=em,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});