@platforma-sdk/ui-vue 1.20.10 → 1.20.13
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/CHANGELOG.md +14 -0
- package/dist/lib.js +3676 -3644
- package/dist/lib.js.map +1 -1
- package/dist/lib.umd.cjs +22 -22
- package/dist/lib.umd.cjs.map +1 -1
- package/dist/src/internal/createApp.d.ts.map +1 -1
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/internal/createApp.ts +29 -15
- package/src/types.ts +8 -0
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
(function(I,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):(I=typeof globalThis<"u"?globalThis:I||self,r(I.SdkVueLib={},I.Vue,I.core$1,I.core,I.clientSideRowModel,I.infiniteRowModel,I.serverSideRowModel,I.csvExport,I.clipboard,I.rangeSelection,I.richSelect,I.menu,I.excelExport,I.theming,I.vue3))})(this,function(I,r,Me,
|
|
1
|
+
(function(I,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):(I=typeof globalThis<"u"?globalThis:I||self,r(I.SdkVueLib={},I.Vue,I.core$1,I.core,I.clientSideRowModel,I.infiniteRowModel,I.serverSideRowModel,I.csvExport,I.clipboard,I.rangeSelection,I.richSelect,I.menu,I.excelExport,I.theming,I.vue3))})(this,function(I,r,Me,x,gs,Gg,il,zg,Jd,Qd,Ug,Zg,Wg,eu,jg){"use strict";var d$=Object.defineProperty;var Og=I=>{throw TypeError(I)};var u$=(I,r,Me)=>r in I?d$(I,r,{enumerable:!0,configurable:!0,writable:!0,value:Me}):I[r]=Me;var Ze=(I,r,Me)=>u$(I,typeof r!="symbol"?r+"":r,Me),Hd=(I,r,Me)=>r.has(I)||Og("Cannot "+Me);var b=(I,r,Me)=>(Hd(I,r,"read from private field"),Me?Me.call(I):r.get(I)),ze=(I,r,Me)=>r.has(I)?Og("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(I):r.set(I,Me),ye=(I,r,Me,x)=>(Hd(I,r,"write to private field"),x?x.call(I,Me):r.set(I,Me),Me),ue=(I,r,Me)=>(Hd(I,r,"access private method"),Me);var nl=(I,r,Me,x)=>({set _(gs){ye(I,r,gs,Me)},get _(){return b(I,r,x)}});var rf,Do,of,sf,vn,Ht,wn,bn,Io,Fo,pt,xn,dt,Xe,ke,Pt,qt,Et,gt,kn,yt,Sn,En,Kt,Tn,Br,Rt,re,qd,eo,Qn,Wi,Yt,$g,to,Lo,ji,Gr,zr,Kd,rl,ol,Qe,Yd,ms,Ur,Xd;function Hg(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function qg(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Kg(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(qg(65,91));return e}function Yg(){return Kg(42)}const ys=Array.isArray;function tu(t){return t!==null&&typeof t=="object"}function Qo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function nu(t){return Object.values(t).reduce((e,n)=>n!==void 0?e+1:e,0)}function dr(t,e){if(!(tu(t)&&tu(e)))return t===e;if(ys(t)&&ys(e))return t.length!==e.length?!1:[...t.keys()].every(n=>dr(t[n],e[n]));if(Qo(t)&&Qo(e))return nu(t)!==nu(e)?!1:Object.keys(t).every(n=>dr(t[n],e[n]));throw Error(`Cannot compare a ${String(t)} and b ${String(e)}`)}function Dn(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Dn(t[n]);return e}else if(Qo(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Dn(t[n])}),e}else return t}function ru(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];Qo(o)&&Qo(i)||ys(o)&&ys(i)&&o.length===i.length?ru(o,i):t[n]=i}),t}function Xg(t){let e=0n,n;return async function(...o){const i=++e;try{await n}catch{}if(e!==i)return{ok:!1};const l=t(...o);return n=l,{ok:!0,value:await l}}}var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ou(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jg=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,l,c)=>`${i}${c===0?"":","}${t(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,i)=>{if(e[i]===void 0||typeof e[i]=="symbol")return o;const l=o.length===0?"":",";return`${o}${l}${t(i)}:${t(e[i])}`},"")}}`};const ur=ou(Jg);class sl extends Error{}class _s extends Error{constructor(e){super(e.join(`
|
|
2
2
|
`)),this.errors=e}toString(){return this.errors.join(`
|
|
3
|
-
`)}}function Xg(t){return{ok:!0,value:t}}function iu(t){if(!t)throw new al;if(!t.ok)throw new _s(t.errors);return t.value}function su(t){return{value:t,errors:void 0}}function Jg(t){if(t.errors)throw new _s(t.errors);if(!t.value)throw new al;return t.value}function Qg(t){return t!==void 0}function ll(t,e){return dr(t)===dr(e)}const cl=t=>t,dl=t=>t instanceof Error?t:Error(String(t)),ul=t=>t.name==="ZodError",pl=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([i,l])=>i+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function hl(t){const e=t.validate??cl,{autoSave:n}=t,o=r.ref(),i=r.ref(),l=T=>{i.value={model:Dn(T)}};r.watch(()=>t.get(),T=>l(T),{immediate:!0});const c=()=>{var T;t.onSave(e(Dn((T=i.value)==null?void 0:T.model)))},d=()=>{l(t.get()),o.value=void 0},p=T=>{const O=dl(T);ul(O)?o.value=Error(pl(O)):o.value=O},h=T=>{o.value=void 0;try{e(T),n&&c()}catch(O){p(O)}},m=r.computed({get:()=>{var T;return(T=i.value)==null?void 0:T.model},set(T){l(T),h(T)}});r.watch(i,(T,O)=>{T&&T===O&&h(T.model)},{deep:!0});const y=r.computed(()=>!o.value),w=r.computed(()=>!ll(t.get(),r.unref(i))),v=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:w,error:o,errorString:v,save:c,revert:d,setError:p})}function ey(t,e,n){const o=t.validate??cl,{autoSave:i}=t,l=r.ref(),c=r.ref(),d=M=>{var x;if(n.deepPatchModel){const Z=(x=c.value)==null?void 0:x.model,V=Object.assign(Dn(M),e??{});c.value={model:Z?ru(Z,V):V,stage:Symbol()}}else c.value={model:Object.assign(Dn(M),e??{}),stage:Symbol()}};r.watch(()=>t.get(),M=>d(M),{immediate:!0});const p=()=>{var M;t.onSave(o(Dn((M=c.value)==null?void 0:M.model)))},h=()=>{d(t.get()),l.value=void 0},m=M=>{const x=dl(M);ul(x)?l.value=Error(pl(x)):l.value=x},y=M=>{l.value=void 0;try{o(M),i&&p()}catch(x){m(x)}},w=r.computed({get:()=>{var M;return(M=c.value)==null?void 0:M.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:w.value.args,ui:w.value.ui}),()=>{var M;return(M=c.value)==null?void 0:M.stage}],([M,x],[Z,V])=>{x===V&&y(M)},{deep:!0});const v=r.computed(()=>!l.value),T=r.computed(()=>{var Z;const{args:M,ui:x}=((Z=r.unref(c))==null?void 0:Z.model)??{};return!ll(t.get(),{args:M,ui:x})}),O=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:w,valid:v,isChanged:T,error:l,errorString:O,save:p,revert:h,setError:m})}const ty=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function ny(t,e,n){const o=(x,...Z)=>{n.debug&&console.log(`%c>>> %c${x}`,"color: orange; font-weight: bold","color: orange",...Z)},l=sl(e.setBlockArgs,100),c=sl(e.setBlockUiState,100),d=sl(e.setBlockArgsAndUiState,100),p=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 x=>{x.forEach(Z=>{Z.key==="args"&&(p.args=Object.freeze(Z.value),o("args patch",p.args)),Z.key==="ui"&&(p.ui=Object.freeze(Z.value),o("ui patch",p.ui)),Z.key==="outputs"&&(p.outputs=Object.freeze(Z.value),o("outputs patch",p.outputs)),Z.key==="navigationState"&&(p.navigationState=Object.freeze(Z.value),o("navigationState patch",p.navigationState))}),await r.nextTick()});const h=()=>Dn(p.args),m=()=>Dn(p.ui),y=()=>Dn(p.navigationState),w={createArgsModel(x={}){return hl({get(){return x.transform?x.transform(p.args):p.args},validate:x.validate,autoSave:!0,onSave(Z){l(Z)}})},createUiModel(x={},Z){return hl({get(){return x.transform?x.transform(p.ui):p.ui??Z()},validate:x.validate,autoSave:!0,onSave(V){c(V)}})},useOutputs(...x){const Z=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(Z,{value:this.unwrapOutputs(...x),errors:void 0})}catch(V){Object.assign(Z,{value:void 0,errors:[String(V)]})}},{immediate:!0,deep:!0}),Z},unwrapOutputs(...x){const Z=p.outputs,V=x.map(H=>[H,iu(Z[H])]);return Object.fromEntries(V)},updateArgs(x){const Z=h();return x(Z),e.setBlockArgs(Z)},updateUiState(x){const Z=m();return e.setBlockUiState(x(Z))},updateNavigationState(x){const Z=y();return x(Z),e.setNavigationState(Z)},navigateTo(x){const Z=y();return Z.href=x,e.setNavigationState(Z)}},v=r.computed(()=>{const x=Object.entries(p.outputs).map(([Z,V])=>[Z,V.ok&&V.value!==void 0?V.value:void 0]);return Object.fromEntries(x)}),T=r.computed(()=>{const x=Object.entries(p.outputs).map(([Z,V])=>[Z,V&&!V.ok?new _s(V.errors):void 0]);return Object.fromEntries(x)}),O={snapshot:p,queryParams:r.computed(()=>ty(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(x=>!(x!=null&&x.ok)))},M=ey({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(x){(!Qo(x.args,p.args)||!Qo(x.ui,p.ui))&&d(x.args,x.ui)}},{outputs:v,outputErrors:T},n);return r.reactive(Object.assign(M,w,O))}var $e;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})($e||($e={}));var fl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(fl||(fl={}));const ae=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ur=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}},ee=$e.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"]),ry=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Zt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};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},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Zt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Zt.create=t=>new Zt(t);const po=(t,e)=>{let n;switch(t.code){case ee.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case ee.invalid_arguments:n="Invalid function arguments";break;case ee.invalid_return_type:n="Invalid function return type";break;case ee.invalid_date:n="Invalid date";break;case ee.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}"`:$e.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ee.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 ee.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 ee.custom:n="Invalid input";break;case ee.invalid_intersection_types:n="Intersection results could not be merged";break;case ee.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ee.not_finite:n="Number must be finite";break;default:n=e.defaultError,$e.assertNever(t)}return{message:n}};let au=po;function oy(t){au=t}function Cs(){return au}const vs=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},iy=[];function ie(t,e){const n=Cs(),o=vs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===po?void 0:po].filter(i=>!!i)});t.common.issues.push(o)}class xt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){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,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return xt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return be;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),ho=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),ml=t=>t.status==="aborted",gl=t=>t.status==="dirty",ti=t=>t.status==="valid",ni=t=>typeof Promise<"u"&&t instanceof Promise;function ws(t,e,n,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 lu(t,e,n,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,n),n}typeof SuppressedError=="function"&&SuppressedError;var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var ri,oi;class In{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,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 cu=(t,e)=>{if(ti(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 Zt(t.common.issues);return this._error=n,this._error}}};function Ve(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||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:(c,d)=>{var p,h;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(h=m??n)!==null&&h!==void 0?h:d.defaultError}},description:i}}class Pe{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 ur(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:ur(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new xt,ctx:{common:e.parent.common,data:e.data,parsedType:ur(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ni(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 o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ur(e)},l=this._parseSync({data:e,path:i.path,parent:i});return cu(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={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:ur(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(ni(i)?i:Promise.resolve(i));return cu(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:ee.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new fn({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ln.create(this,this._def)}nullable(){return mr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return hn.create(this,this._def)}promise(){return yo.create(this,this._def)}or(e){return li.create([this,e],this._def)}and(e){return ci.create(this,e,this._def)}transform(e){return new fn({...Ve(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new fi({...Ve(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Cl({typeName:ve.ZodBranded,type:this,...Ve(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new mi({...Ve(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return gi.create(this,e)}readonly(){return yi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sy=/^c[^\s-]{8,}$/i,ay=/^[0-9a-z]+$/,ly=/^[0-9A-HJKMNP-TV-Z]{26}$/,cy=/^[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,dy=/^[a-z0-9_-]{21}$/i,uy=/^[-+]?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)?)??$/,py=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yl;const fy=/^(?:(?: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])$/,my=/^(([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})))$/,gy=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,du="((\\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])))",yy=new RegExp(`^${du}$`);function uu(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(`^${uu(t)}$`)}function pu(t){let e=`${du}T${uu(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 Cy(t,e){return!!((e==="v4"||!e)&&fy.test(t)||(e==="v6"||!e)&&my.test(t))}class pn extends Pe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.string,received:l.parsedType}),be}const o=new xt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,d=e.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(e,i),c?ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")py.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"email",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")yl||(yl=new RegExp(hy,"u")),yl.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"emoji",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")cy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"uuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")dy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"nanoid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")sy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")ay.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid2",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")ly.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ulid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ie(i,{validation:"url",code:ee.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"regex",code:ee.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.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)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?pu(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?yy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?_y(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?uy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"duration",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?Cy(e.data,l.version)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ip",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?gy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"base64",code:ee.invalid_string,message:l.message}),o.dirty()):$e.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:ee.invalid_string,...he.errToObj(o)})}_addCheck(e){return new pn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var n,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:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...he.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,...he.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...he.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...he.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...he.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...he.errToObj(n)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new pn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pn({...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}}pn.create=t=>{var e;return new pn({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};function vy(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class pr extends Pe{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 l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.number,received:l.parsedType}),be}let o;const i=new xt;for(const l of this._def.checks)l.kind==="int"?$e.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?vy(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_finite,message:l.message}),i.dirty()):$e.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,i){return new pr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(i)}]})}_addCheck(e){return new pr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.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"&&$e.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}pr.create=t=>new pr({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class hr extends Pe{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 l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.bigint,received:l.parsedType}),be}let o;const i=new xt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):$e.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,i){return new hr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(i)}]})}_addCheck(e){return new hr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.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}}hr.create=t=>{var e;return new hr({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};class ii extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.boolean,received:o.parsedType}),be}return Vt(e.data)}}ii.create=t=>new ii({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class Ur extends Pe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.date,received:l.parsedType}),be}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_date}),be}const o=new xt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):$e.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ur({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:he.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}}Ur.create=t=>new Ur({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Ve(t)});class bs extends Pe{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.symbol,received:o.parsedType}),be}return Vt(e.data)}}bs.create=t=>new bs({typeName:ve.ZodSymbol,...Ve(t)});class si extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.undefined,received:o.parsedType}),be}return Vt(e.data)}}si.create=t=>new si({typeName:ve.ZodUndefined,...Ve(t)});class ai extends Pe{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.null,received:o.parsedType}),be}return Vt(e.data)}}ai.create=t=>new ai({typeName:ve.ZodNull,...Ve(t)});class fo extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}fo.create=t=>new fo({typeName:ve.ZodAny,...Ve(t)});class Zr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Zr.create=t=>new Zr({typeName:ve.ZodUnknown,...Ve(t)});class Kn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:ee.invalid_type,expected:ae.never,received:n.parsedType}),be}}Kn.create=t=>new Kn({typeName:ve.ZodNever,...Ve(t)});class xs extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.void,received:o.parsedType}),be}return Vt(e.data)}}xs.create=t=>new xs({typeName:ve.ZodVoid,...Ve(t)});class hn extends Pe{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==ae.array)return ie(n,{code:ee.invalid_type,expected:ae.array,received:n.parsedType}),be;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(ie(n,{code:c?ee.too_big:ee.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ie(n,{code:ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ie(n,{code:ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new In(n,c,n.path,d)))).then(c=>xt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new In(n,c,n.path,d)));return xt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new hn({...this._def,minLength:{value:e,message:he.toString(n)}})}max(e,n){return new hn({...this._def,maxLength:{value:e,message:he.toString(n)}})}length(e,n){return new hn({...this._def,exactLength:{value:e,message:he.toString(n)}})}nonempty(e){return this.min(1,e)}}hn.create=(t,e)=>new hn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ve(e)});function mo(t){if(t instanceof tt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Ln.create(mo(o))}return new tt({...t._def,shape:()=>e})}else return t instanceof hn?new hn({...t._def,type:mo(t.element)}):t instanceof Ln?Ln.create(mo(t.unwrap())):t instanceof mr?mr.create(mo(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>mo(e))):t}class tt extends Pe{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=$e.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const h=this._getOrReturnCtx(e);return ie(h,{code:ee.invalid_type,expected:ae.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof Kn&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const p=[];for(const h of c){const m=l[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:m._parse(new In(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof Kn){const h=this._def.unknownKeys;if(h==="passthrough")for(const m of d)p.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(h==="strict")d.length>0&&(ie(i,{code:ee.unrecognized_keys,keys:d}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const m of d){const y=i.data[m];p.push({key:{status:"valid",value:m},value:h._parse(new In(i,y,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const m of p){const y=await m.key,w=await m.value;h.push({key:y,value:w,alwaysSet:m.alwaysSet})}return h}).then(h=>xt.mergeObjectSync(o,h)):xt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new tt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=he.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(e){return new tt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new tt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new tt({...this._def,catchall:e})}pick(e){const n={};return $e.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new tt({...this._def,shape:()=>n})}omit(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new tt({...this._def,shape:()=>n})}deepPartial(){return mo(this)}partial(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new tt({...this._def,shape:()=>n})}required(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof Ln;)l=l._def.innerType;n[o]=l}}),new tt({...this._def,shape:()=>n})}keyof(){return hu($e.objectKeys(this.shape))}}tt.create=(t,e)=>new tt({shape:()=>t,unknownKeys:"strip",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)}),tt.strictCreate=(t,e)=>new tt({shape:()=>t,unknownKeys:"strict",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)}),tt.lazycreate=(t,e)=>new tt({shape:t,unknownKeys:"strip",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)});class li extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Zt(d.ctx.common.issues));return ie(n,{code:ee.invalid_union,unionErrors:c}),be}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Zt(p));return ie(n,{code:ee.invalid_union,unionErrors:d}),be}}get options(){return this._def.options}}li.create=(t,e)=>new li({options:t,typeName:ve.ZodUnion,...Ve(e)});const Yn=t=>t instanceof ui?Yn(t.schema):t instanceof fn?Yn(t.innerType()):t instanceof pi?[t.value]:t instanceof fr?t.options:t instanceof hi?$e.objectValues(t.enum):t instanceof fi?Yn(t._def.innerType):t instanceof si?[void 0]:t instanceof ai?[null]:t instanceof Ln?[void 0,...Yn(t.unwrap())]:t instanceof mr?[null,...Yn(t.unwrap())]:t instanceof Cl||t instanceof yi?Yn(t.unwrap()):t instanceof mi?Yn(t._def.innerType):[];class ks extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:ee.invalid_type,expected:ae.object,received:n.parsedType}),be;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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}):(ie(n,{code:ee.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,n,o){const i=new Map;for(const l of n){const c=Yn(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new ks({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ve(o)})}}function _l(t,e){const n=ur(t),o=ur(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const i=$e.objectKeys(e),l=$e.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=_l(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=_l(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ci extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(ml(l)||ml(c))return be;const d=_l(l.value,c.value);return d.valid?((gl(l)||gl(c))&&n.dirty(),{status:n.value,value:d.data}):(ie(o,{code:ee.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(([l,c])=>i(l,c)):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}))}}ci.create=(t,e,n)=>new ci({left:t,right:e,typeName:ve.ZodIntersection,...Ve(n)});class Fn extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:ee.invalid_type,expected:ae.array,received:o.parsedType}),be;if(o.data.length<this._def.items.length)return ie(o,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new In(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>xt.mergeArray(n,c)):xt.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Fn({...this._def,rest:e})}}Fn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:t,typeName:ve.ZodTuple,rest:null,...Ve(e)})};class di extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:ee.invalid_type,expected:ae.object,received:o.parsedType}),be;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new In(o,d,o.path,d)),value:c._parse(new In(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?xt.mergeObjectAsync(n,i):xt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Pe?new di({keyType:e,valueType:n,typeName:ve.ZodRecord,...Ve(o)}):new di({keyType:pn.create(),valueType:e,typeName:ve.ZodRecord,...Ve(n)})}}class Ss extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:ee.invalid_type,expected:ae.map,received:o.parsedType}),be;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new In(o,d,o.path,[h,"key"])),value:l._parse(new In(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ss.create=(t,e,n)=>new Ss({valueType:e,keyType:t,typeName:ve.ZodMap,...Ve(n)});class Wr extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:ee.invalid_type,expected:ae.set,received:o.parsedType}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ie(o,{code:ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ie(o,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return be;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new In(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Wr({...this._def,minSize:{value:e,message:he.toString(n)}})}max(e,n){return new Wr({...this._def,maxSize:{value:e,message:he.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Wr.create=(t,e)=>new Wr({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ve(e)});class go extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:ee.invalid_type,expected:ae.function,received:n.parsedType}),be;function o(d,p){return vs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cs(),po].filter(h=>!!h),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function i(d,p){return vs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cs(),po].filter(h=>!!h),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof yo){const d=this;return Vt(async function(...p){const h=new Zt([]),m=await d._def.args.parseAsync(p,l).catch(v=>{throw h.addIssue(o(p,v)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(v=>{throw h.addIssue(i(y,v)),h})})}else{const d=this;return Vt(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Zt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Zt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new go({...this._def,args:Fn.create(e).rest(Zr.create())})}returns(e){return new go({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new go({args:e||Fn.create([]).rest(Zr.create()),returns:n||Zr.create(),typeName:ve.ZodFunction,...Ve(o)})}}class ui extends Pe{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})}}ui.create=(t,e)=>new ui({getter:t,typeName:ve.ZodLazy,...Ve(e)});class pi extends Pe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:ee.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}pi.create=(t,e)=>new pi({value:t,typeName:ve.ZodLiteral,...Ve(e)});function hu(t,e){return new fr({values:t,typeName:ve.ZodEnum,...Ve(e)})}class fr extends Pe{constructor(){super(...arguments),ri.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:$e.joinValues(o),received:n.parsedType,code:ee.invalid_type}),be}if(ws(this,ri)||lu(this,ri,new Set(this._def.values)),!ws(this,ri).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:ee.invalid_enum_value,options:o}),be}return Vt(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 fr.create(e,{...this._def,...n})}exclude(e,n=this._def){return fr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}ri=new WeakMap,fr.create=hu;class hi extends Pe{constructor(){super(...arguments),oi.set(this,void 0)}_parse(e){const n=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const i=$e.objectValues(n);return ie(o,{expected:$e.joinValues(i),received:o.parsedType,code:ee.invalid_type}),be}if(ws(this,oi)||lu(this,oi,new Set($e.getValidEnumValues(this._def.values))),!ws(this,oi).has(e.data)){const i=$e.objectValues(n);return ie(o,{received:o.data,code:ee.invalid_enum_value,options:i}),be}return Vt(e.data)}get enum(){return this._def.values}}oi=new WeakMap,hi.create=(t,e)=>new hi({values:t,typeName:ve.ZodNativeEnum,...Ve(e)});class yo extends Pe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:ee.invalid_type,expected:ae.promise,received:n.parsedType}),be;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Vt(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}yo.create=(t,e)=>new yo({type:t,typeName:ve.ZodPromise,...Ve(e)});class fn extends Pe{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:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||n.value==="dirty"?ho(p.value):p});{if(n.value==="aborted")return be;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?be:d.status==="dirty"||n.value==="dirty"?ho(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ti(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ti(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);$e.assertNever(i)}}fn.create=(t,e,n)=>new fn({schema:t,typeName:ve.ZodEffects,effect:e,...Ve(n)}),fn.createWithPreprocess=(t,e,n)=>new fn({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Ve(n)});class Ln extends Pe{_parse(e){return this._getType(e)===ae.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ln.create=(t,e)=>new Ln({innerType:t,typeName:ve.ZodOptional,...Ve(e)});class mr extends Pe{_parse(e){return this._getType(e)===ae.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mr.create=(t,e)=>new mr({innerType:t,typeName:ve.ZodNullable,...Ve(e)});class fi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fi.create=(t,e)=>new fi({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class mi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return ni(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Zt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}mi.create=(t,e)=>new mi({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class Es extends Pe{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}Es.create=t=>new Es({typeName:ve.ZodNaN,...Ve(t)});const wy=Symbol("zod_brand");class Cl extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class gi extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?be:l.status==="dirty"?(n.dirty(),ho(l.value)):this._def.out._parseAsync({data:l.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"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new gi({in:e,out:n,typeName:ve.ZodPipeline})}}class yi extends Pe{_parse(e){const n=this._def.innerType._parse(e),o=i=>(ti(i)&&(i.value=Object.freeze(i.value)),i);return ni(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}yi.create=(t,e)=>new yi({innerType:t,typeName:ve.ZodReadonly,...Ve(e)});function fu(t,e={},n){return t?fo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):fo.create()}const by={object:tt.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 xy=(t,e={message:`Input not instance of ${t.name}`})=>fu(n=>n instanceof t,e),mu=pn.create,gu=pr.create,ky=Es.create,Sy=hr.create,yu=ii.create,Ey=Ur.create,Ty=bs.create,Ny=si.create,Vy=ai.create,Ay=fo.create,By=Zr.create,Py=Kn.create,Ry=xs.create,Dy=hn.create,Iy=tt.create,Fy=tt.strictCreate,Ly=li.create,Oy=ks.create,My=ci.create,$y=Fn.create,Gy=di.create,zy=Ss.create,Uy=Wr.create,Zy=go.create,Wy=ui.create,jy=pi.create,Hy=fr.create,qy=hi.create,Ky=yo.create,_u=fn.create,Yy=Ln.create,Xy=mr.create,Jy=fn.createWithPreprocess,Qy=gi.create;var On=Object.freeze({__proto__:null,defaultErrorMap:po,setErrorMap:oy,getErrorMap:Cs,makeIssue:vs,EMPTY_PATH:iy,addIssueToContext:ie,ParseStatus:xt,INVALID:be,DIRTY:ho,OK:Vt,isAborted:ml,isDirty:gl,isValid:ti,isAsync:ni,get util(){return $e},get objectUtil(){return fl},ZodParsedType:ae,getParsedType:ur,ZodType:Pe,datetimeRegex:pu,ZodString:pn,ZodNumber:pr,ZodBigInt:hr,ZodBoolean:ii,ZodDate:Ur,ZodSymbol:bs,ZodUndefined:si,ZodNull:ai,ZodAny:fo,ZodUnknown:Zr,ZodNever:Kn,ZodVoid:xs,ZodArray:hn,ZodObject:tt,ZodUnion:li,ZodDiscriminatedUnion:ks,ZodIntersection:ci,ZodTuple:Fn,ZodRecord:di,ZodMap:Ss,ZodSet:Wr,ZodFunction:go,ZodLazy:ui,ZodLiteral:pi,ZodEnum:fr,ZodNativeEnum:hi,ZodPromise:yo,ZodEffects:fn,ZodTransformer:fn,ZodOptional:Ln,ZodNullable:mr,ZodDefault:fi,ZodCatch:mi,ZodNaN:Es,BRAND:wy,ZodBranded:Cl,ZodPipeline:gi,ZodReadonly:yi,custom:fu,Schema:Pe,ZodSchema:Pe,late:by,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>pn.create({...t,coerce:!0}),number:t=>pr.create({...t,coerce:!0}),boolean:t=>ii.create({...t,coerce:!0}),bigint:t=>hr.create({...t,coerce:!0}),date:t=>Ur.create({...t,coerce:!0})},any:Ay,array:Dy,bigint:Sy,boolean:yu,date:Ey,discriminatedUnion:Oy,effect:_u,enum:Hy,function:Zy,instanceof:xy,intersection:My,lazy:Wy,literal:jy,map:zy,nan:ky,nativeEnum:qy,never:Py,null:Vy,nullable:Xy,number:gu,object:Iy,oboolean:()=>yu().optional(),onumber:()=>gu().optional(),optional:Yy,ostring:()=>mu().optional(),pipeline:Qy,preprocess:Jy,promise:Ky,record:Gy,set:Uy,strictObject:Fy,string:mu,symbol:Ty,transformer:_u,tuple:$y,undefined:Ny,union:Ly,unknown:By,void:Ry,NEVER:be,ZodIssueCode:ee,quotelessJson:ry,ZodError:Zt});const e_=-2147483648,Cu=-9007199254740991n,t_=NaN,n_=NaN,r_=null,o_=null;function i_(t,e){switch(e){case"Int":return t===e_;case"Long":return t===Number(Cu)||t===Cu;case"Float":return t===t_;case"Double":return t===n_;case"String":return t===r_;case"Bytes":return t===o_;default:throw Error(`unsupported data type: ${e}`)}}function s_(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}const a_={type:"absent"},l_=null;function c_(t){return typeof t=="object"&&t!==null&&t.type==="absent"}function vu(t,e,n={}){if(s_(t.absent,e))return n.absent===void 0?a_:n.absent;const o=t.data[e],i=t.type;if(i_(o,i))return n.na===void 0?l_:n.na;switch(i){case"Int":return o;case"Long":return Number(o);case"Float":return o;case"Double":return o;case"String":return o;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${i}`)}}function _o(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}On.object({__isRef:On.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:On.string().describe("Upstream block id"),name:On.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 d_(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const u_=On.object({type:On.string(),importance:On.number().optional(),id:On.string().optional(),label:On.string()});On.array(u_);const p_="1.20.6";function Ts(){return d_({sdkVersion:p_})}function h_(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function Co(t){return!!t&&typeof t.children<"u"}function gr(t){return Co(t)?t.groupId:t.colId}function wu(t,e,n){const o=(c,d)=>{const p=c.children.map(gr),h=k._includes(p,gr(d)),m=k._last(c.children),y=m&&gr(m)!==gr(d);return h&&y};if(!Co(t))return!0;const i=t,l=n;if(o(i,l))return i.children.push(l),!0;if(i.groupId===e){const c=i.children.map(gr);if(!k._includes(c,gr(l)))return i.children.push(l),!0}for(let c=i.children.length-1;c>=0&&!wu(i.children[c],e,n);c--);return!1}function f_(t){const e=(i,l)=>Co(i)&&Co(l)&&gr(i)===gr(l),n=(i,l)=>{if(!Co(l))return i;const c=i,d=l;return d.children&&d.groupId&&wu(c,d.groupId,d.children[0])||d.children.forEach(p=>n(c,p)),c},o=[];for(let i=1;i<=t.length;i++){const l=t[i-1],c=t[i];e(l,c)?t[i]=n(l,c):o.push(l)}return o}var m_=class extends k.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(i,l)=>{if(Co(i)){const c=i,d=typeof c.groupId<"u"?c.groupId:c.headerName,p=new k.AgProvidedColumnGroup(c,d,!1,l),h=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&h.push(y)}),p.setChildren(h),p}else{const c=i,d=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(d);return p||e.push(c),p}},o=[];return t.forEach(i=>{const l=n(i,0);l&&o.push(l)}),e.length>0&&k._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=f_(e);t(n)}getLeafPathTrees(){const t=(o,i)=>{let l;if(k.isProvidedColumnGroup(o))if(o.isPadding())l=i;else{const d=Object.assign({},o.getColGroupDef());d.groupId=o.getGroupId(),d.children=[i],l=d}else{const d=Object.assign({},o.getColDef());d.colId=o.getColId(),l=d}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function g_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function y_(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function __(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function C_(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function v_(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function w_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function b_(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function x_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function k_(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return k._unwrapUserComp(n)}function S_(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var E_=class extends k.Component{constructor(t){super(),this.eToggleButton=k.RefPlaceholder,this.eIconWrapper=k.RefPlaceholder,this.eLabel=k.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 Qg(t){return{ok:!0,value:t}}function iu(t){if(!t)throw new sl;if(!t.ok)throw new _s(t.errors);return t.value}function su(t){return{value:t,errors:void 0}}function ey(t){if(t.errors)throw new _s(t.errors);if(!t.value)throw new sl;return t.value}function ty(t){return t!==void 0}function al(t,e){return ur(t)===ur(e)}const ll=t=>t,cl=t=>t instanceof Error?t:Error(String(t)),dl=t=>t.name==="ZodError",ul=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([i,l])=>i+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function pl(t){const e=t.validate??ll,{autoSave:n}=t,o=r.ref(),i=r.ref(),l=T=>{i.value={model:Dn(T)}};r.watch(()=>t.get(),T=>l(T),{immediate:!0});const c=()=>{var T;t.onSave(e(Dn((T=i.value)==null?void 0:T.model)))},d=()=>{l(t.get()),o.value=void 0},p=T=>{const O=cl(T);dl(O)?o.value=Error(ul(O)):o.value=O},h=T=>{o.value=void 0;try{e(T),n&&c()}catch(O){p(O)}},m=r.computed({get:()=>{var T;return(T=i.value)==null?void 0:T.model},set(T){l(T),h(T)}});r.watch(i,(T,O)=>{T&&T===O&&h(T.model)},{deep:!0});const y=r.computed(()=>!o.value),w=r.computed(()=>!al(t.get(),r.unref(i))),v=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:w,error:o,errorString:v,save:c,revert:d,setError:p})}function ny(t,e,n){const o=t.validate??ll,{autoSave:i}=t,l=r.ref(),c=r.ref(),d=M=>{var V;if(n.deepPatchModel){const U=(V=c.value)==null?void 0:V.model,k=Object.assign(Dn(M),e??{});c.value={model:U?ru(U,k):k,stage:Symbol()}}else c.value={model:Object.assign(Dn(M),e??{}),stage:Symbol()}};r.watch(()=>t.get(),M=>d(M),{immediate:!0});const p=()=>{var M;t.onSave(o(Dn((M=c.value)==null?void 0:M.model)))},h=()=>{d(t.get()),l.value=void 0},m=M=>{const V=cl(M);dl(V)?l.value=Error(ul(V)):l.value=V},y=M=>{l.value=void 0;try{o(M),i&&p()}catch(V){m(V)}},w=r.computed({get:()=>{var M;return(M=c.value)==null?void 0:M.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:w.value.args,ui:w.value.ui}),()=>{var M;return(M=c.value)==null?void 0:M.stage}],([M,V],[U,k])=>{V===k&&y(M)},{deep:!0});const v=r.computed(()=>!l.value),T=r.computed(()=>{var U;const{args:M,ui:V}=((U=r.unref(c))==null?void 0:U.model)??{};return!al(t.get(),{args:M,ui:V})}),O=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:w,valid:v,isChanged:T,error:l,errorString:O,save:p,revert:h,setError:m})}const ry=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function au(t){return typeof t=="function"?t():r.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const lu=()=>{};function oy(t,e){function n(...o){return new Promise((i,l)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(i).catch(l)})}return n}function iy(t,e={}){let n,o,i=lu;const l=d=>{clearTimeout(d),i(),i=lu};return d=>{const p=au(t),h=au(e.maxWait);return n&&l(n),p<=0||h!==void 0&&h<=0?(o&&(l(o),o=null),Promise.resolve(d())):new Promise((m,y)=>{i=e.rejectOnCancel?y:m,h&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,m(d())},h)),n=setTimeout(()=>{o&&l(o),o=null,m(d())},p)})}}function hl(t,e=200,n={}){return oy(iy(e,n),t)}function sy(t,e,n){const o=(U,...k)=>{n.debug&&console.log(`%c>>> %c${U}`,"color: orange; font-weight: bold","color: orange",...k)},i=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)}),l=n.debounceSpan??100,c=n.debounceMaxWait??1e3,d=hl(U=>{dr(U,i.args)||e.setBlockArgs(U)},l,{maxWait:c}),p=hl(U=>{dr(U,i.ui)||e.setBlockUiState(U)},l,{maxWait:c}),h=hl((U,k)=>{(!dr(U,i.args)||!dr(k,i.ui))&&e.setBlockArgsAndUiState(U,k)},l,{maxWait:c});e.onStateUpdates(async U=>{U.forEach(k=>{k.key==="args"&&(i.args=Object.freeze(k.value),o("args patch",i.args)),k.key==="ui"&&(i.ui=Object.freeze(k.value),o("ui patch",i.ui)),k.key==="outputs"&&(i.outputs=Object.freeze(k.value),o("outputs patch",i.outputs)),k.key==="navigationState"&&(dr(i.navigationState,k.value)||(i.navigationState=Object.freeze(k.value),o("navigationState patch",i.navigationState)))}),await r.nextTick()});const m=()=>Dn(i.args),y=()=>Dn(i.ui),w=()=>Dn(i.navigationState),v={createArgsModel(U={}){return pl({get(){return U.transform?U.transform(i.args):i.args},validate:U.validate,autoSave:!0,onSave(k){d(k)}})},createUiModel(U={},k){return pl({get(){return U.transform?U.transform(i.ui):i.ui??k()},validate:U.validate,autoSave:!0,onSave(W){p(W)}})},useOutputs(...U){const k=r.reactive({errors:void 0,value:void 0});return r.watch(()=>i.outputs,()=>{try{Object.assign(k,{value:this.unwrapOutputs(...U),errors:void 0})}catch(W){Object.assign(k,{value:void 0,errors:[String(W)]})}},{immediate:!0,deep:!0}),k},unwrapOutputs(...U){const k=i.outputs,W=U.map(A=>[A,iu(k[A])]);return Object.fromEntries(W)},updateArgs(U){const k=m();return U(k),e.setBlockArgs(k)},updateUiState(U){const k=y();return e.setBlockUiState(U(k))},updateNavigationState(U){const k=w();return U(k),e.setNavigationState(k)},navigateTo(U){const k=w();return k.href=U,e.setNavigationState(k)}},T=r.computed(()=>{const U=Object.entries(i.outputs).map(([k,W])=>[k,W.ok&&W.value!==void 0?W.value:void 0]);return Object.fromEntries(U)}),O=r.computed(()=>{const U=Object.entries(i.outputs).map(([k,W])=>[k,W&&!W.ok?new _s(W.errors):void 0]);return Object.fromEntries(U)}),M={snapshot:i,queryParams:r.computed(()=>ry(i.navigationState.href)),href:r.computed(()=>i.navigationState.href),hasErrors:r.computed(()=>Object.values(i.outputs).some(U=>!(U!=null&&U.ok)))},V=ny({get(){return{args:i.args,ui:i.ui}},autoSave:!0,onSave(U){h(U.args,U.ui)}},{outputs:T,outputErrors:O},n);return r.reactive(Object.assign(V,v,M))}var $e;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})($e||($e={}));var fl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(fl||(fl={}));const ae=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pr=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}},ee=$e.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"]),ay=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Zt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};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},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Zt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Zt.create=t=>new Zt(t);const ho=(t,e)=>{let n;switch(t.code){case ee.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case ee.invalid_arguments:n="Invalid function arguments";break;case ee.invalid_return_type:n="Invalid function return type";break;case ee.invalid_date:n="Invalid date";break;case ee.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}"`:$e.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ee.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 ee.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 ee.custom:n="Invalid input";break;case ee.invalid_intersection_types:n="Intersection results could not be merged";break;case ee.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ee.not_finite:n="Number must be finite";break;default:n=e.defaultError,$e.assertNever(t)}return{message:n}};let cu=ho;function ly(t){cu=t}function Cs(){return cu}const vs=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},cy=[];function ie(t,e){const n=Cs(),o=vs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ho?void 0:ho].filter(i=>!!i)});t.common.issues.push(o)}class xt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){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,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return xt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return be;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),fo=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),ml=t=>t.status==="aborted",gl=t=>t.status==="dirty",ti=t=>t.status==="valid",ni=t=>typeof Promise<"u"&&t instanceof Promise;function ws(t,e,n,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 du(t,e,n,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,n),n}typeof SuppressedError=="function"&&SuppressedError;var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var ri,oi;class In{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,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 uu=(t,e)=>{if(ti(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 Zt(t.common.issues);return this._error=n,this._error}}};function Ve(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||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:(c,d)=>{var p,h;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(h=m??n)!==null&&h!==void 0?h:d.defaultError}},description:i}}class Pe{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 pr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new xt,ctx:{common:e.parent.common,data:e.data,parsedType:pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ni(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 o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pr(e)},l=this._parseSync({data:e,path:i.path,parent:i});return uu(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={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:pr(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(ni(i)?i:Promise.resolve(i));return uu(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:ee.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new fn({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ln.create(this,this._def)}nullable(){return gr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return hn.create(this,this._def)}promise(){return _o.create(this,this._def)}or(e){return li.create([this,e],this._def)}and(e){return ci.create(this,e,this._def)}transform(e){return new fn({...Ve(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new fi({...Ve(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Cl({typeName:ve.ZodBranded,type:this,...Ve(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new mi({...Ve(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return gi.create(this,e)}readonly(){return yi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dy=/^c[^\s-]{8,}$/i,uy=/^[0-9a-z]+$/,py=/^[0-9A-HJKMNP-TV-Z]{26}$/,hy=/^[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,fy=/^[a-z0-9_-]{21}$/i,my=/^[-+]?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)?)??$/,gy=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yl;const _y=/^(?:(?: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])$/,Cy=/^(([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})))$/,vy=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pu="((\\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])))",wy=new RegExp(`^${pu}$`);function hu(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 by(t){return new RegExp(`^${hu(t)}$`)}function fu(t){let e=`${pu}T${hu(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 xy(t,e){return!!((e==="v4"||!e)&&_y.test(t)||(e==="v6"||!e)&&Cy.test(t))}class pn extends Pe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.string,received:l.parsedType}),be}const o=new xt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,d=e.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(e,i),c?ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")gy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"email",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")yl||(yl=new RegExp(yy,"u")),yl.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"emoji",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")hy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"uuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")fy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"nanoid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")dy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")uy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid2",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")py.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ulid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ie(i,{validation:"url",code:ee.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"regex",code:ee.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.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)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?fu(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?wy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?by(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?my.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"duration",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?xy(e.data,l.version)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ip",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?vy.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"base64",code:ee.invalid_string,message:l.message}),o.dirty()):$e.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:ee.invalid_string,...he.errToObj(o)})}_addCheck(e){return new pn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var n,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:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...he.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,...he.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...he.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...he.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...he.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...he.errToObj(n)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new pn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pn({...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}}pn.create=t=>{var e;return new pn({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};function ky(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class hr extends Pe{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 l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.number,received:l.parsedType}),be}let o;const i=new xt;for(const l of this._def.checks)l.kind==="int"?$e.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?ky(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_finite,message:l.message}),i.dirty()):$e.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,i){return new hr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(i)}]})}_addCheck(e){return new hr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.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"&&$e.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}hr.create=t=>new hr({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class fr extends Pe{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 l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.bigint,received:l.parsedType}),be}let o;const i=new xt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):$e.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,i){return new fr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(i)}]})}_addCheck(e){return new fr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.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}}fr.create=t=>{var e;return new fr({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};class ii extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.boolean,received:o.parsedType}),be}return Vt(e.data)}}ii.create=t=>new ii({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class Zr extends Pe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.date,received:l.parsedType}),be}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_date}),be}const o=new xt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):$e.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:he.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}}Zr.create=t=>new Zr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Ve(t)});class bs extends Pe{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.symbol,received:o.parsedType}),be}return Vt(e.data)}}bs.create=t=>new bs({typeName:ve.ZodSymbol,...Ve(t)});class si extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.undefined,received:o.parsedType}),be}return Vt(e.data)}}si.create=t=>new si({typeName:ve.ZodUndefined,...Ve(t)});class ai extends Pe{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.null,received:o.parsedType}),be}return Vt(e.data)}}ai.create=t=>new ai({typeName:ve.ZodNull,...Ve(t)});class mo extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}mo.create=t=>new mo({typeName:ve.ZodAny,...Ve(t)});class Wr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Wr.create=t=>new Wr({typeName:ve.ZodUnknown,...Ve(t)});class Kn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:ee.invalid_type,expected:ae.never,received:n.parsedType}),be}}Kn.create=t=>new Kn({typeName:ve.ZodNever,...Ve(t)});class xs extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.void,received:o.parsedType}),be}return Vt(e.data)}}xs.create=t=>new xs({typeName:ve.ZodVoid,...Ve(t)});class hn extends Pe{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==ae.array)return ie(n,{code:ee.invalid_type,expected:ae.array,received:n.parsedType}),be;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(ie(n,{code:c?ee.too_big:ee.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ie(n,{code:ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ie(n,{code:ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new In(n,c,n.path,d)))).then(c=>xt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new In(n,c,n.path,d)));return xt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new hn({...this._def,minLength:{value:e,message:he.toString(n)}})}max(e,n){return new hn({...this._def,maxLength:{value:e,message:he.toString(n)}})}length(e,n){return new hn({...this._def,exactLength:{value:e,message:he.toString(n)}})}nonempty(e){return this.min(1,e)}}hn.create=(t,e)=>new hn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ve(e)});function go(t){if(t instanceof tt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Ln.create(go(o))}return new tt({...t._def,shape:()=>e})}else return t instanceof hn?new hn({...t._def,type:go(t.element)}):t instanceof Ln?Ln.create(go(t.unwrap())):t instanceof gr?gr.create(go(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>go(e))):t}class tt extends Pe{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=$e.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const h=this._getOrReturnCtx(e);return ie(h,{code:ee.invalid_type,expected:ae.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof Kn&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const p=[];for(const h of c){const m=l[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:m._parse(new In(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof Kn){const h=this._def.unknownKeys;if(h==="passthrough")for(const m of d)p.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(h==="strict")d.length>0&&(ie(i,{code:ee.unrecognized_keys,keys:d}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const m of d){const y=i.data[m];p.push({key:{status:"valid",value:m},value:h._parse(new In(i,y,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const m of p){const y=await m.key,w=await m.value;h.push({key:y,value:w,alwaysSet:m.alwaysSet})}return h}).then(h=>xt.mergeObjectSync(o,h)):xt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new tt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=he.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(e){return new tt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new tt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new tt({...this._def,catchall:e})}pick(e){const n={};return $e.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new tt({...this._def,shape:()=>n})}omit(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new tt({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new tt({...this._def,shape:()=>n})}required(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof Ln;)l=l._def.innerType;n[o]=l}}),new tt({...this._def,shape:()=>n})}keyof(){return mu($e.objectKeys(this.shape))}}tt.create=(t,e)=>new tt({shape:()=>t,unknownKeys:"strip",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)}),tt.strictCreate=(t,e)=>new tt({shape:()=>t,unknownKeys:"strict",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)}),tt.lazycreate=(t,e)=>new tt({shape:t,unknownKeys:"strip",catchall:Kn.create(),typeName:ve.ZodObject,...Ve(e)});class li extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Zt(d.ctx.common.issues));return ie(n,{code:ee.invalid_union,unionErrors:c}),be}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Zt(p));return ie(n,{code:ee.invalid_union,unionErrors:d}),be}}get options(){return this._def.options}}li.create=(t,e)=>new li({options:t,typeName:ve.ZodUnion,...Ve(e)});const Yn=t=>t instanceof ui?Yn(t.schema):t instanceof fn?Yn(t.innerType()):t instanceof pi?[t.value]:t instanceof mr?t.options:t instanceof hi?$e.objectValues(t.enum):t instanceof fi?Yn(t._def.innerType):t instanceof si?[void 0]:t instanceof ai?[null]:t instanceof Ln?[void 0,...Yn(t.unwrap())]:t instanceof gr?[null,...Yn(t.unwrap())]:t instanceof Cl||t instanceof yi?Yn(t.unwrap()):t instanceof mi?Yn(t._def.innerType):[];class ks extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:ee.invalid_type,expected:ae.object,received:n.parsedType}),be;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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}):(ie(n,{code:ee.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,n,o){const i=new Map;for(const l of n){const c=Yn(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new ks({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ve(o)})}}function _l(t,e){const n=pr(t),o=pr(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const i=$e.objectKeys(e),l=$e.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=_l(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=_l(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ci extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(ml(l)||ml(c))return be;const d=_l(l.value,c.value);return d.valid?((gl(l)||gl(c))&&n.dirty(),{status:n.value,value:d.data}):(ie(o,{code:ee.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(([l,c])=>i(l,c)):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}))}}ci.create=(t,e,n)=>new ci({left:t,right:e,typeName:ve.ZodIntersection,...Ve(n)});class Fn extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:ee.invalid_type,expected:ae.array,received:o.parsedType}),be;if(o.data.length<this._def.items.length)return ie(o,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new In(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>xt.mergeArray(n,c)):xt.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Fn({...this._def,rest:e})}}Fn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:t,typeName:ve.ZodTuple,rest:null,...Ve(e)})};class di extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:ee.invalid_type,expected:ae.object,received:o.parsedType}),be;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new In(o,d,o.path,d)),value:c._parse(new In(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?xt.mergeObjectAsync(n,i):xt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Pe?new di({keyType:e,valueType:n,typeName:ve.ZodRecord,...Ve(o)}):new di({keyType:pn.create(),valueType:e,typeName:ve.ZodRecord,...Ve(n)})}}class Ss extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:ee.invalid_type,expected:ae.map,received:o.parsedType}),be;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new In(o,d,o.path,[h,"key"])),value:l._parse(new In(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ss.create=(t,e,n)=>new Ss({valueType:e,keyType:t,typeName:ve.ZodMap,...Ve(n)});class jr extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:ee.invalid_type,expected:ae.set,received:o.parsedType}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ie(o,{code:ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ie(o,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return be;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new In(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new jr({...this._def,minSize:{value:e,message:he.toString(n)}})}max(e,n){return new jr({...this._def,maxSize:{value:e,message:he.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}jr.create=(t,e)=>new jr({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ve(e)});class yo extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:ee.invalid_type,expected:ae.function,received:n.parsedType}),be;function o(d,p){return vs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cs(),ho].filter(h=>!!h),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function i(d,p){return vs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cs(),ho].filter(h=>!!h),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof _o){const d=this;return Vt(async function(...p){const h=new Zt([]),m=await d._def.args.parseAsync(p,l).catch(v=>{throw h.addIssue(o(p,v)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(v=>{throw h.addIssue(i(y,v)),h})})}else{const d=this;return Vt(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Zt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Zt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new yo({...this._def,args:Fn.create(e).rest(Wr.create())})}returns(e){return new yo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new yo({args:e||Fn.create([]).rest(Wr.create()),returns:n||Wr.create(),typeName:ve.ZodFunction,...Ve(o)})}}class ui extends Pe{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})}}ui.create=(t,e)=>new ui({getter:t,typeName:ve.ZodLazy,...Ve(e)});class pi extends Pe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:ee.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}pi.create=(t,e)=>new pi({value:t,typeName:ve.ZodLiteral,...Ve(e)});function mu(t,e){return new mr({values:t,typeName:ve.ZodEnum,...Ve(e)})}class mr extends Pe{constructor(){super(...arguments),ri.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:$e.joinValues(o),received:n.parsedType,code:ee.invalid_type}),be}if(ws(this,ri)||du(this,ri,new Set(this._def.values)),!ws(this,ri).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:ee.invalid_enum_value,options:o}),be}return Vt(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 mr.create(e,{...this._def,...n})}exclude(e,n=this._def){return mr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}ri=new WeakMap,mr.create=mu;class hi extends Pe{constructor(){super(...arguments),oi.set(this,void 0)}_parse(e){const n=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const i=$e.objectValues(n);return ie(o,{expected:$e.joinValues(i),received:o.parsedType,code:ee.invalid_type}),be}if(ws(this,oi)||du(this,oi,new Set($e.getValidEnumValues(this._def.values))),!ws(this,oi).has(e.data)){const i=$e.objectValues(n);return ie(o,{received:o.data,code:ee.invalid_enum_value,options:i}),be}return Vt(e.data)}get enum(){return this._def.values}}oi=new WeakMap,hi.create=(t,e)=>new hi({values:t,typeName:ve.ZodNativeEnum,...Ve(e)});class _o extends Pe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:ee.invalid_type,expected:ae.promise,received:n.parsedType}),be;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Vt(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_o.create=(t,e)=>new _o({type:t,typeName:ve.ZodPromise,...Ve(e)});class fn extends Pe{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:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||n.value==="dirty"?fo(p.value):p});{if(n.value==="aborted")return be;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?be:d.status==="dirty"||n.value==="dirty"?fo(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ti(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ti(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);$e.assertNever(i)}}fn.create=(t,e,n)=>new fn({schema:t,typeName:ve.ZodEffects,effect:e,...Ve(n)}),fn.createWithPreprocess=(t,e,n)=>new fn({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Ve(n)});class Ln extends Pe{_parse(e){return this._getType(e)===ae.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ln.create=(t,e)=>new Ln({innerType:t,typeName:ve.ZodOptional,...Ve(e)});class gr extends Pe{_parse(e){return this._getType(e)===ae.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gr.create=(t,e)=>new gr({innerType:t,typeName:ve.ZodNullable,...Ve(e)});class fi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fi.create=(t,e)=>new fi({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class mi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return ni(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Zt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}mi.create=(t,e)=>new mi({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class Es extends Pe{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}Es.create=t=>new Es({typeName:ve.ZodNaN,...Ve(t)});const Sy=Symbol("zod_brand");class Cl extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class gi extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?be:l.status==="dirty"?(n.dirty(),fo(l.value)):this._def.out._parseAsync({data:l.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"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new gi({in:e,out:n,typeName:ve.ZodPipeline})}}class yi extends Pe{_parse(e){const n=this._def.innerType._parse(e),o=i=>(ti(i)&&(i.value=Object.freeze(i.value)),i);return ni(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}yi.create=(t,e)=>new yi({innerType:t,typeName:ve.ZodReadonly,...Ve(e)});function gu(t,e={},n){return t?mo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):mo.create()}const Ey={object:tt.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 Ty=(t,e={message:`Input not instance of ${t.name}`})=>gu(n=>n instanceof t,e),yu=pn.create,_u=hr.create,Ny=Es.create,Vy=fr.create,Cu=ii.create,Ay=Zr.create,By=bs.create,Py=si.create,Ry=ai.create,Dy=mo.create,Iy=Wr.create,Fy=Kn.create,Ly=xs.create,Oy=hn.create,My=tt.create,$y=tt.strictCreate,Gy=li.create,zy=ks.create,Uy=ci.create,Zy=Fn.create,Wy=di.create,jy=Ss.create,Hy=jr.create,qy=yo.create,Ky=ui.create,Yy=pi.create,Xy=mr.create,Jy=hi.create,Qy=_o.create,vu=fn.create,e_=Ln.create,t_=gr.create,n_=fn.createWithPreprocess,r_=gi.create;var On=Object.freeze({__proto__:null,defaultErrorMap:ho,setErrorMap:ly,getErrorMap:Cs,makeIssue:vs,EMPTY_PATH:cy,addIssueToContext:ie,ParseStatus:xt,INVALID:be,DIRTY:fo,OK:Vt,isAborted:ml,isDirty:gl,isValid:ti,isAsync:ni,get util(){return $e},get objectUtil(){return fl},ZodParsedType:ae,getParsedType:pr,ZodType:Pe,datetimeRegex:fu,ZodString:pn,ZodNumber:hr,ZodBigInt:fr,ZodBoolean:ii,ZodDate:Zr,ZodSymbol:bs,ZodUndefined:si,ZodNull:ai,ZodAny:mo,ZodUnknown:Wr,ZodNever:Kn,ZodVoid:xs,ZodArray:hn,ZodObject:tt,ZodUnion:li,ZodDiscriminatedUnion:ks,ZodIntersection:ci,ZodTuple:Fn,ZodRecord:di,ZodMap:Ss,ZodSet:jr,ZodFunction:yo,ZodLazy:ui,ZodLiteral:pi,ZodEnum:mr,ZodNativeEnum:hi,ZodPromise:_o,ZodEffects:fn,ZodTransformer:fn,ZodOptional:Ln,ZodNullable:gr,ZodDefault:fi,ZodCatch:mi,ZodNaN:Es,BRAND:Sy,ZodBranded:Cl,ZodPipeline:gi,ZodReadonly:yi,custom:gu,Schema:Pe,ZodSchema:Pe,late:Ey,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>pn.create({...t,coerce:!0}),number:t=>hr.create({...t,coerce:!0}),boolean:t=>ii.create({...t,coerce:!0}),bigint:t=>fr.create({...t,coerce:!0}),date:t=>Zr.create({...t,coerce:!0})},any:Dy,array:Oy,bigint:Vy,boolean:Cu,date:Ay,discriminatedUnion:zy,effect:vu,enum:Xy,function:qy,instanceof:Ty,intersection:Uy,lazy:Ky,literal:Yy,map:jy,nan:Ny,nativeEnum:Jy,never:Fy,null:Ry,nullable:t_,number:_u,object:My,oboolean:()=>Cu().optional(),onumber:()=>_u().optional(),optional:e_,ostring:()=>yu().optional(),pipeline:r_,preprocess:n_,promise:Qy,record:Wy,set:Hy,strictObject:$y,string:yu,symbol:By,transformer:vu,tuple:Zy,undefined:Py,union:Gy,unknown:Iy,void:Ly,NEVER:be,ZodIssueCode:ee,quotelessJson:ay,ZodError:Zt});const o_=-2147483648,wu=-9007199254740991n,i_=NaN,s_=NaN,a_=null,l_=null;function c_(t,e){switch(e){case"Int":return t===o_;case"Long":return t===Number(wu)||t===wu;case"Float":return t===i_;case"Double":return t===s_;case"String":return t===a_;case"Bytes":return t===l_;default:throw Error(`unsupported data type: ${e}`)}}function d_(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}const u_={type:"absent"},p_=null;function h_(t){return typeof t=="object"&&t!==null&&t.type==="absent"}function bu(t,e,n={}){if(d_(t.absent,e))return n.absent===void 0?u_:n.absent;const o=t.data[e],i=t.type;if(c_(o,i))return n.na===void 0?p_:n.na;switch(i){case"Int":return o;case"Long":return Number(o);case"Float":return o;case"Double":return o;case"String":return o;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${i}`)}}function Co(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}On.object({__isRef:On.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:On.string().describe("Upstream block id"),name:On.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 f_(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const m_=On.object({type:On.string(),importance:On.number().optional(),id:On.string().optional(),label:On.string()});On.array(m_);const g_="1.20.11";function Ts(){return f_({sdkVersion:g_})}function y_(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function vo(t){return!!t&&typeof t.children<"u"}function yr(t){return vo(t)?t.groupId:t.colId}function xu(t,e,n){const o=(c,d)=>{const p=c.children.map(yr),h=x._includes(p,yr(d)),m=x._last(c.children),y=m&&yr(m)!==yr(d);return h&&y};if(!vo(t))return!0;const i=t,l=n;if(o(i,l))return i.children.push(l),!0;if(i.groupId===e){const c=i.children.map(yr);if(!x._includes(c,yr(l)))return i.children.push(l),!0}for(let c=i.children.length-1;c>=0&&!xu(i.children[c],e,n);c--);return!1}function __(t){const e=(i,l)=>vo(i)&&vo(l)&&yr(i)===yr(l),n=(i,l)=>{if(!vo(l))return i;const c=i,d=l;return d.children&&d.groupId&&xu(c,d.groupId,d.children[0])||d.children.forEach(p=>n(c,p)),c},o=[];for(let i=1;i<=t.length;i++){const l=t[i-1],c=t[i];e(l,c)?t[i]=n(l,c):o.push(l)}return o}var C_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(i,l)=>{if(vo(i)){const c=i,d=typeof c.groupId<"u"?c.groupId:c.headerName,p=new x.AgProvidedColumnGroup(c,d,!1,l),h=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&h.push(y)}),p.setChildren(h),p}else{const c=i,d=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(d);return p||e.push(c),p}},o=[];return t.forEach(i=>{const l=n(i,0);l&&o.push(l)}),e.length>0&&x._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=__(e);t(n)}getLeafPathTrees(){const t=(o,i)=>{let l;if(x.isProvidedColumnGroup(o))if(o.isPadding())l=i;else{const d=Object.assign({},o.getColGroupDef());d.groupId=o.getGroupId(),d.children=[i],l=d}else{const d=Object.assign({},o.getColDef());d.colId=o.getColId(),l=d}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function v_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function w_(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function b_(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function x_(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function k_(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function S_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function E_(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function T_(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function N_(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return x._unwrapUserComp(n)}function V_(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var A_=class extends x.Component{constructor(t){super(),this.eToggleButton=x.RefPlaceholder,this.eIconWrapper=x.RefPlaceholder,this.eLabel=x.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,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",
|
|
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",x._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),x._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},B_=class extends x.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!==x.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}x._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new A_(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),x._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},P_={selector:"AG-SIDE-BAR-BUTTONS",component:B_},ku={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Su={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},vl={columns:ku,filters:Su};function wl(t){if(!t)return;if(t===!0)return{toolPanels:[ku,Su],defaultToolPanel:"columns"};if(typeof t=="string")return wl([t]);if(Array.isArray(t)){const n=[];return t.forEach(o=>{const i=vl[o];if(!i){Eu(o);return}n.push(i)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:R_(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function Eu(t){x._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(vl).join(",")}`)}function R_(t){const e=[];return t&&t.forEach(n=>{let o=null;if(typeof n=="string"){const i=vl[n];if(!i){Eu(n);return}o=i}else o=n;e.push(o)}),e}var D_=class extends x.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 o=Math.max(this.minWidth,Math.floor(this.startingWidth-t*n));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}},I_=class extends x.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 D_);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){const{id:n,minWidth:o,maxWidth:i,width:l}=t;this.toolPanelId=n,this.width=l;const c=this.userComponentFactory.getToolPanelCompDetails(t,e),d=c.newAgStackInstance();if(this.params=c.params,d==null){x._warnOnce(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}d.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"),n=t==="left",o=e?n:!n;this.resizeBar.setInverted(o)}refresh(){var t;(t=this.toolPanelCompInstance)==null||t.refresh(this.params)}},F_=class extends x.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>`,[N_]),this.sideBarButtons=k.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:wl(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new k.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),k._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),i=n.getGui(),l=k._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,d)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,d)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=k._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),i=o.findIndex(d=>d.contains(e));let l=null;switch(t.key){case k.KeyCode.LEFT:case k.KeyCode.UP:l=Math.max(0,i-1);break;case k.KeyCode.RIGHT:case k.KeyCode.DOWN:l=Math.min(i+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.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 o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!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: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(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],n==null?void 0:n[i.id])}validateDef(t){var e;if(t.id==null)return k._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(k.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(k.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return k._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 o=this.sideBarButtons.addButtonComp(t);let i;n?i=n:(i=this.createBean(new B_),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const l=i.getGui();this.appendChild(l),this.toolPanelWrappers.push(i),k._setAriaControls(o.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 c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(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){k._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,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 n;const t=wl(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var h,m;const{id:i}=o;if(!i)return;const l=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!c)return;const d=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(d))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),k._removeFromParent(c.getGui()),e[i]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{k._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},R_={selector:"AG-SIDE-BAR",component:P_},D_=class extends k.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return R_}},bl="32.3.3",Su=k._defineModule({version:bl,moduleName:`${k.ModuleNames.SideBarModule}-core`,beans:[m_,D_],dependantModules:[Me.EnterpriseCoreModule]}),I_=k._defineModule({version:bl,moduleName:`${k.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:g_,setSideBarVisible:y_,setSideBarPosition:__,openToolPanel:C_,closeToolPanel:v_,getOpenedToolPanel:w_,refreshToolPanel:b_,isToolPanelShowing:x_,getToolPanelInstance:k_,getSideBar:S_},dependantModules:[Su]}),Eu=k._defineModule({version:bl,moduleName:k.ModuleNames.SideBarModule,dependantModules:[Su,I_]}),F_={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},L_=class extends k.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=O_,t.first=M_,t.last=$_,t.min=G_,t.max=z_,t.count=U_,t.avg=Z_,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=k._includes(n,e),i=k._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return F_[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(k._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return k._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),k._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 O_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?n===null?n=i:n+=typeof n=="number"?i:BigInt(i):typeof i=="bigint"&&(n===null?n=i:n=(typeof n=="bigint"?n:BigInt(n))+i)}return n}function M_(t){return t.values.length>0?t.values[0]:null}function $_(t){return t.values.length>0?k._last(t.values):null}function G_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n>i)&&(n=i)}return n}function z_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n<i)&&(n=i)}return n}function U_(t){var i,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const d=e[c];n+=d!=null&&typeof d.value=="number"?d.value:1}const o=(l=(i=t.rowNode)==null?void 0:i.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function Z_(t){var c,d,p;const{values:e}=t;let n=0,o=0;for(let h=0;h<e.length;h++){const m=e[h];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let i=null;o>0&&(i=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(d=t.column)==null?void 0:d.getColId()];return l&&l.count===o&&l.value===i?l:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var W_=class extends k.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=k._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!k._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return k._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,o=e.pivotColumns.length===0;let i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):n?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={},n=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds!=null){o=!1;continue}const p=d.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,d.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,d.colId),e[d.colId]=this.aggregateValues(h,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds==null||!d.pivotTotalColumnIds.length)continue;const p=d.pivotTotalColumnIds.map(h=>e[h]);e[d.colId]=this.aggregateValues(p,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((d,p)=>{n[d.getId()]=this.aggregateValues(l[p],d.getAggFunc(),d,t)}),i&&c&&i.forEach(d=>{n[d.getId()]=c[d.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let i=0;i<e.length;i++){const l=e[i];o=o?o[l]:null}return o?o.map(i=>this.valueService.getValue(n,i)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const i=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let d=0;d<c;d++){const p=l[d];for(let h=0;h<i;h++){const m=e[h],y=this.valueService.getValue(m,p);o[h].push(y)}}return o}aggregateValues(t,e,n,o,i){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return k._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,d=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return c(d)}},j_=class extends k.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 o=k._isGroupMultiAutoColumn(this.gos);return n&&o&&(k._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,l)=>{e.push(this.createOneAutoCol(i,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${k.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=k.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const i=new k.AgColumn(o,null,n,!0);return this.createBean(i),i}updateOneAutoCol(t,e,n){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=i!=null?this.columnModel.getColDefCol(i):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const i=this.gos.get("autoGroupColumnDef");k._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||k._missing(o.field)&&k._missing(o.valueGetter)&&k._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=k._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(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 l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},H_=class extends Me.PillDragComp{constructor(t,e,n,o,i){super(e,n,i,`
|
|
10
|
+
</div>`,[P_]),this.sideBarButtons=x.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:wl(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new x.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),x._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),i=n.getGui(),l=x._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,d)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,d)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=x._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),i=o.findIndex(d=>d.contains(e));let l=null;switch(t.key){case x.KeyCode.LEFT:case x.KeyCode.UP:l=Math.max(0,i-1);break;case x.KeyCode.RIGHT:case x.KeyCode.DOWN:l=Math.min(i+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.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 o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!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: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(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],n==null?void 0:n[i.id])}validateDef(t){var e;if(t.id==null)return x._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(x.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(x.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return x._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 o=this.sideBarButtons.addButtonComp(t);let i;n?i=n:(i=this.createBean(new I_),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const l=i.getGui();this.appendChild(l),this.toolPanelWrappers.push(i),x._setAriaControls(o.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 c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(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){x._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,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 n;const t=wl(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var h,m;const{id:i}=o;if(!i)return;const l=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!c)return;const d=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(d))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),x._removeFromParent(c.getGui()),e[i]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{x._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},L_={selector:"AG-SIDE-BAR",component:F_},O_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return L_}},bl="32.3.3",Tu=x._defineModule({version:bl,moduleName:`${x.ModuleNames.SideBarModule}-core`,beans:[C_,O_],dependantModules:[Me.EnterpriseCoreModule]}),M_=x._defineModule({version:bl,moduleName:`${x.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:v_,setSideBarVisible:w_,setSideBarPosition:b_,openToolPanel:x_,closeToolPanel:k_,getOpenedToolPanel:S_,refreshToolPanel:E_,isToolPanelShowing:T_,getToolPanelInstance:N_,getSideBar:V_},dependantModules:[Tu]}),Nu=x._defineModule({version:bl,moduleName:x.ModuleNames.SideBarModule,dependantModules:[Tu,M_]}),$_={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},G_=class extends x.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=z_,t.first=U_,t.last=Z_,t.min=W_,t.max=j_,t.count=H_,t.avg=q_,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=x._includes(n,e),i=x._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return $_[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(x._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return x._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),x._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 z_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?n===null?n=i:n+=typeof n=="number"?i:BigInt(i):typeof i=="bigint"&&(n===null?n=i:n=(typeof n=="bigint"?n:BigInt(n))+i)}return n}function U_(t){return t.values.length>0?t.values[0]:null}function Z_(t){return t.values.length>0?x._last(t.values):null}function W_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n>i)&&(n=i)}return n}function j_(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n<i)&&(n=i)}return n}function H_(t){var i,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const d=e[c];n+=d!=null&&typeof d.value=="number"?d.value:1}const o=(l=(i=t.rowNode)==null?void 0:i.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function q_(t){var c,d,p;const{values:e}=t;let n=0,o=0;for(let h=0;h<e.length;h++){const m=e[h];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let i=null;o>0&&(i=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(d=t.column)==null?void 0:d.getColId()];return l&&l.count===o&&l.value===i?l:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var K_=class extends x.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=x._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!x._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return x._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,o=e.pivotColumns.length===0;let i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):n?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={},n=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds!=null){o=!1;continue}const p=d.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,d.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,d.colId),e[d.colId]=this.aggregateValues(h,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds==null||!d.pivotTotalColumnIds.length)continue;const p=d.pivotTotalColumnIds.map(h=>e[h]);e[d.colId]=this.aggregateValues(p,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((d,p)=>{n[d.getId()]=this.aggregateValues(l[p],d.getAggFunc(),d,t)}),i&&c&&i.forEach(d=>{n[d.getId()]=c[d.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let i=0;i<e.length;i++){const l=e[i];o=o?o[l]:null}return o?o.map(i=>this.valueService.getValue(n,i)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const i=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let d=0;d<c;d++){const p=l[d];for(let h=0;h<i;h++){const m=e[h],y=this.valueService.getValue(m,p);o[h].push(y)}}return o}aggregateValues(t,e,n,o,i){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return x._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,d=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return c(d)}},Y_=class extends x.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 o=x._isGroupMultiAutoColumn(this.gos);return n&&o&&(x._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,l)=>{e.push(this.createOneAutoCol(i,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${x.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=x.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const i=new x.AgColumn(o,null,n,!0);return this.createBean(i),i}updateOneAutoCol(t,e,n){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=i!=null?this.columnModel.getColDefCol(i):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const i=this.gos.get("autoGroupColumnDef");x._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||x._missing(o.field)&&x._missing(o.valueGetter)&&x._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=x._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(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 l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},X_=class extends Me.PillDragComp{constructor(t,e,n,o,i){super(e,n,i,`
|
|
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
|
-
`,[k.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=k.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"),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()&&!n){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:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),i={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${i[l]}`].filter(d=>!!d).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"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 n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===k.KeyCode.ENTER&&this.isGroupingZone()&&n(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===k.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 Me.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const i=k._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(i,{focusout:m=>{!i.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:c,ariaLabel:d("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===k.KeyCode.ENTER||m.key===k.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const w=t.getComponentAt(y);w&&w.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(m=>m===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),l=o(i,i);return new q_(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return k.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},q_=class extends k.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},xl=class extends Me.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===k.DragSourceType.HeaderCell||t===k.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 n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new H_(t,e,n,this.dropZonePurpose,o)}},kl=class extends xl{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:k._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()}},Sl=class extends xl{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:k._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()}},K_=class extends k.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"),k._setAriaRole(t,"presentation"),this.rowGroupComp=new Sl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new kl(!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)}},Y_={selector:"AG-GRID-HEADER-DROP-ZONES",component:K_},X_=class extends k.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Y_}},J_=class extends k.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,m;const e=this.columnModel.isPivotMode(),n=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,l=k._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:c}=t,d=(y,w=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,w&&y.childrenAfterAggFilter.forEach(v=>d(v,w)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var w;y.childrenAfterAggFilter=((w=y.childrenAfterFilter)==null?void 0:w.filter(v=>{var M;return l({node:v})&&this.filterManager.doesRowPassAggregateFilters({rowNode:v})?(d(v,!0),!0):(M=v.childrenAfterAggFilter)==null?void 0:M.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:d,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let i=0;i<o;++i)n+=e[i].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)}},Q_=class extends k.TabGuardComp{constructor(){super(`
|
|
17
|
+
`,[x.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=x.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"),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()&&!n){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:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),i={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${i[l]}`].filter(d=>!!d).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"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 n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===x.KeyCode.ENTER&&this.isGroupingZone()&&n(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===x.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 Me.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const i=x._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(i,{focusout:m=>{!i.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:c,ariaLabel:d("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===x.KeyCode.ENTER||m.key===x.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const w=t.getComponentAt(y);w&&w.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(m=>m===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),l=o(i,i);return new J_(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return x.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},J_=class extends x.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},xl=class extends Me.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===x.DragSourceType.HeaderCell||t===x.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 n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new X_(t,e,n,this.dropZonePurpose,o)}},kl=class extends xl{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:x._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()}},Sl=class extends xl{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:x._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()}},Q_=class extends x.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"),x._setAriaRole(t,"presentation"),this.rowGroupComp=new Sl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new kl(!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)}},eC={selector:"AG-GRID-HEADER-DROP-ZONES",component:Q_},tC=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return eC}},nC=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,m;const e=this.columnModel.isPivotMode(),n=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,l=x._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:c}=t,d=(y,w=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,w&&y.childrenAfterAggFilter.forEach(v=>d(v,w)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var w;y.childrenAfterAggFilter=((w=y.childrenAfterFilter)==null?void 0:w.filter(v=>{var M;return l({node:v})&&this.filterManager.doesRowPassAggregateFilters({rowNode:v})?(d(v,!0),!0):(M=v.childrenAfterAggFilter)==null?void 0:M.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:d,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let i=0;i<o;++i)n+=e[i].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)}},rC=class extends x.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=
|
|
22
|
+
`),this.eGroupField=x.RefPlaceholder,this.eUnderlyingFilter=x.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&&x._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&x._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&x._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 x._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||(x._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){x._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],x._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(x._loadTemplate('<div class="ag-filter-separator"></div>')),x._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,x._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new x.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"),x.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const i=this.filterManager.getOrCreateFilterWrapper(o);i!=null&&i.filterPromise&&e.push(i.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),x.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(x._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return x.AgPromise.resolve();const t=this.createManagedBean(new x.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,o;(n=t.afterGuiAttached)==null||n.call(t,this.afterGuiAttachedParams),!((o=this.afterGuiAttachedParams)!=null&&o.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??x.AgPromise.resolve()):x.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 x.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;x._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 n=t.getColId();(o=this.filterColumnPairs)!=null&&o.some(({column:i})=>i.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()}},oC=class extends x.Component{constructor(){super(`
|
|
23
23
|
<div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
|
|
24
|
-
`),this.eFloatingFilter=k.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 k.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,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 k.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,k._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 o,i;this.underlyingFloatingFilter=n,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),k.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,i;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):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.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()}},El=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 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 n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function tC(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(Tu(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(Tu),!0):!1}function Tu(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,i=n>=0,l=o>=0,c=i&&l,d=!i&&!l;return c?n-o:d?t.__objectId-e.__objectId:i?1:-1}var nC=class extends k.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=[],o=[];let i;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!i?i=l:o.push(l):n.push(l)}),i&&o.push(i),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:i}=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:o,rowNodesOrderChanged:!!i,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(d=>d.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new El;k._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),k._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),k._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{tC(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;k._exists(e)&&n(t.rootNode);function n(o){k._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const i=p=>p.key,l=this.getExistingPathForNode(o,e).map(i),c=this.getGroupInfo(o,e).map(i);k._areEqual(l,c)||this.moveNode(o,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 o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,i=n||new El;t.forEach(l=>{this.removeFromParent(l,i),this.forEachParentGroup(e,l.parent,c=>{i.removeFromAllLeafChildren(c,l)})}),o&&i.flush()}removeEmptyGroups(t,e){let n=!0;const o=i=>{var p;const l=this.getChildrenMappedKey(i.key,i.rowGroupColumn),c=i.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const i=new El;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,i),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(k._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.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:k._areEqual(t.groupedCols,e.groupedCols)&&k._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.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,o=t.rootNode;o.leafGroup=n.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 n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),i=this.findParentForNode(t,o,e,n);i.group||k._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,n,o){let i=n.rootNode;return e.forEach((l,c)=>{i=this.getOrCreateNextNode(i,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,n,o){var c;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[i];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const i=new k.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,n),i.level=n,i.leafGroup=n===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=n,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,n){const o=(i,l)=>{if(!i.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return k.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const l=t.rowGroupColumn;l!==null&&i.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.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 o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!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(o=>{let i=this.valueService.getKeyForNode(o,t),l=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(i="",l=!0),l){const d={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(d)}}),n}},rC=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,mt=Object.freeze([]),oC=mt.values(),Ns=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},iC=class Lg{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=mt,this.allLeafChildren=mt,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())??oC}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new Lg(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&Ns(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:i}=this;if(n<0)o!==null&&o!==e&&Ns(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??mt,Ns(o,!1)):e.allLeafChildren=this.allLeafChildren??mt}return e.level=n,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:i,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??mt)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return Ns(e,n<0),!0}addDuplicateRow(e){const{level:n}=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=n,n>=0&&(e.allLeafChildren=mt),e.childrenAfterGroup=mt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??mt,n.childrenAfterGroup=mt,n.allLeafChildren=mt,e.delete(o),e.add(n),this.row=o),o}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,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var d;this.childrenChanged=!1;const e=((d=this.children)==null?void 0:d.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=mt,this.row.childrenAfterGroup=mt,!0);let n=!1,o=this.childrenAfterGroup;o===mt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let i=0,l=-1,c=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<l&&(c=!0),l=h,p.oldSourceRowIndex=h;const m=p.row;o[i]!==m&&(o[i]=m,n=!0),++i}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(rC),o.clear();for(let i=0;i<n;++i){const l=e[i].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,d;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const l=o.length;if(l===0)i=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=mt,this.allLeafChildren=mt;else if(l===1&&((d=o[0].allLeafChildren)!=null&&d.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===mt||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let m=0;for(let y=0;y<l;++y){const w=o[y],v=w.allLeafChildren,T=v.length;if(T)for(let O=0;O<T;++O){const M=v[O];(m>=h||p[m]!==M)&&(p[m]=M,i=!0),++m}else(m>=h||p[m]!==w)&&w&&(p[m]=w,i=!0),++m}h!==m&&(p.length=m,i=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},Nu=t=>(t.treeNodeFlags&1)!==0,Vu=t=>(t.treeNodeFlags&2)!==0,Au=t=>(t.treeNodeFlags&4)!==0,sC=t=>(t.treeNodeFlags&8)!==0,Bu=t=>(t.treeNodeFlags&16)!==0,Pu=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},aC=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},lC=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},yr=t=>{t.treeNodeFlags|=16},Ru=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},_i=t=>{t.treeNodeFlags=0},cC=class extends k.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new iC(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),_i(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,i=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.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(c,e,n):this.handleRowData(c,i,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var i,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const d=((l=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==d&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=d}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:i,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!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,o=t.length;n<o;++n){const i=t[n].treeNode;i&&i.oldSourceRowIndex!==n&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const i=t[n];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||mt;return n.length||k._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const i=e.upsertKey(t[o]);if(o>=n)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:i}=t;if(o<0)return;let l=!1;if(i!==e){const d=e.treeNode;d!==null&&d!==t&&(d.removeRow(e),d.invalidate()),i===null?(t.setRow(e),l=!0):i.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(i,!0),l=!0)}n&&!Au(e)&&(aC(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let i=!1;t.removeRow(e)&&(i=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&yr(n),n.updateHasChildren(),Bu(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Ru(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 i of e.enumChildren()){const l=i.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,lC(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var h,m,y;const o=n.row,i=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&yr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((h=o.childrenAfterGroup)!=null&&h.length),d=c||!o.data,p=o.group;p!==d?(yr(o),o.setGroup(d),!d&&!o.expanded&&Pu(o,!1)):o.hasChildren()!==c&&(yr(o),o.updateHasChildren()),o.group&&!Vu(o)&&(i!==o&&i!==null&&i.group&&Vu(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Pu(o,!0)),Au(o)&&(yr(e.row),sC(o)&&o.setData(o.data)),i!==o&&(n.oldRow=o,i!==null&&(p||n.hasChildren())&&yr(o),e.childrenChanged=!0,yr(e.row)),Bu(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):Nu(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Ru(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,k._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(w=>w.data)]))}createFillerRow(t){const e=new k.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,o=t.parent;for(;o!==null;){const i=o.parent;if(i===null)break;n=`${o.level}-${o.key}-${n}`,o=i}return e.id=k.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var i;const n={};t.groupData=n;const o=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols();if(o)for(const l of o)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:o,level:i}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&yr(e.row)),o!==null&&i>=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:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):_i(e)),o)for(const i of o)n>=0&&!i.data?this.destroyRow(i,!0):_i(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!Nu(t)){_i(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}_i(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)}}},dC=class extends k.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?cC:nC;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()}},Du="PivotRowTotal_",uC=class extends k.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,c=[]){return l.forEach(d=>{d.children!==void 0?n(d.children,c):c.push(d)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(l=>k._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,i){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=i[t].getColDef(),d=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return k._iterateObject(e,m=>{const y=[...n,m],w=this.createColDef(l[0],m,y);w.columnGroupShow="open",h.push(w)}),h.sort(d),h}const p=[];return k._iterateObject(e,(h,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,w=[...n,h];p.push({children:this.recursivelyBuildGroup(t+1,m,w,o,i),headerName:h,pivotKeys:w,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(w)})}),p.sort(d),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(i,l,c)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,l,h)});const m=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const w=this.columnNameService.getDisplayNameForColumn(y,"header"),v=this.createColDef(y,w,i.pivotKeys);v.pivotTotalColumnIds=h.get(y.getColId()),v.columnGroupShow=n?"open":"closed",v.aggFunc=y.getAggFunc(),m||(i.children.push(v),l.push(v))}),this.merge(c,h);return}if(!i.pivotValueColumn)return;const d=i.pivotValueColumn.getColId();c.has(d)?c.get(d).push(i.colId):c.set(d,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(c=>c.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const i=t;if(!i.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(i.children.forEach(c=>{const d=this.recursivelyAddPivotTotal(c,e,n,o);d&&(l=l.concat(d))}),i.children.length>1){const d=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,d,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.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 l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();n||i.reverse();const l=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<i.length;c++){const d=i[c],p=this.columnNameService.getDisplayNameForColumn(d,"header"),h=this.createColDef(d,p,[]),m=[];for(let w=0;w<e.length;w++){const v=e[w];v.pivotValueColumn===d&&m.push(v.colId)}h.pivotTotalColumnIds=m,h.colId=Du+h.colId;const y=l?{children:[h],pivotKeys:[],groupId:`${Du}_pivotGroup_${d.getColId()}`}:h;e.push(h),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const i={};if(t){const l=t.getColDef();Object.assign(i,l),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},i.pivotKeys=n,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,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,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.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 c=t[i].split(this.fieldSeparator);let d=e;for(let p=0;p<c.length;p++){const h=c[p];d[h]==null&&(d[h]={}),d=d[h]}}const n=(i,l,c,d)=>{const p=[];for(const y in c){const w=c[y],v=n(`${i}${this.fieldSeparator}${y}`,y,w,d+1);p.push(v)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const v=this.columnNameService.getDisplayNameForColumn(y,"header")??l,T=this.createColDef(y,v,void 0,!1);return T.colId=i,T.aggFunc=y.getAggFunc(),T.valueGetter=O=>{var M;return(M=O.data)==null?void 0:M[i]},T}return{colId:i,headerName:l,valueGetter:v=>{var T;return(T=v.data)==null?void 0:T[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||d<this.pivotDefaultExpanded,groupId:i,headerName:l,children:p}},o=[];for(const i in e){const l=e[i],c=n(i,i,l,0);o.push(c)}return o}},Iu="Exceeded maximum allowed pivot column count.",pC=class extends k.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 o;try{o=this.bucketUpRowNodes(t)}catch(x){if(x.message===Iu){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:x.message}),this.lastTimeFailed=!0;return}throw x}const i=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(x=>`${x.getId()}-${x.getColDef().headerName}`).join("#"),d=l.map(x=>x.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,h=this.aggregationFuncsHashLastTime!==d;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=d;const m=this.funcColsService.getRowGroupColumns().map(x=>x.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const w=this.gos.get("pivotRowTotals"),v=this.gos.get("pivotColumnGroupTotals"),T=this.gos.get("suppressExpandablePivotGroups"),O=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),M=w!==this.pivotRowTotalsLastTime||v!==this.pivotColumnGroupTotalsLastTime||T!==this.suppressExpandablePivotGroupsLastTime||O!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=w,this.pivotColumnGroupTotalsLastTime=v,this.suppressExpandablePivotGroupsLastTime=T,this.removePivotHeaderRowWhenSingleValueColumnLastTime=O,this.lastTimeFailed||i||p||y||h||M){const{pivotColumnGroupDefs:x,pivotColumnDefs:Z}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=Z,this.pivotResultColsService.setPivotResultCols(x,"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(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.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,o){const i={},l=e[n];if(t.forEach(c=>{let d=this.valueService.getKeyForNode(l,c);if(k._missing(d)&&(d=""),!o[d]){this.currentUniqueCount+=1,o[d]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(Iu)}i[d]||(i[d]=[]),i[d].push(c)}),n===e.length-1)return i;{const c={};return k._iterateObject(i,(d,p)=>{c[d]=this.bucketChildren(p,e,n+1,o[d])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function hC(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function fC(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function mC(t){t.aggFuncService&&t.aggFuncService.clear()}function gC(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function yC(t){return t.columnModel.isPivotMode()}function _C(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function CC(t,e){t.funcColsService.setValueColumns(e,"api")}function vC(t){return t.funcColsService.getValueColumns()}function wC(t,e){t.funcColsService.removeValueColumns([e],"api")}function bC(t,e){t.funcColsService.removeValueColumns(e,"api")}function xC(t,e){t.funcColsService.addValueColumns([e],"api")}function kC(t,e){t.funcColsService.addValueColumns(e,"api")}function SC(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function EC(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function TC(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function NC(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function VC(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function AC(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function BC(t){return t.funcColsService.getRowGroupColumns()}function PC(t,e){t.funcColsService.setPivotColumns(e,"api")}function RC(t,e){t.funcColsService.removePivotColumns([e],"api")}function DC(t,e){t.funcColsService.removePivotColumns(e,"api")}function IC(t,e){t.funcColsService.addPivotColumns([e],"api")}function FC(t,e){t.funcColsService.addPivotColumns(e,"api")}function LC(t){return t.funcColsService.getPivotColumns()}function OC(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function MC(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var $C=class extends k.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,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},Ci="32.3.3",Tl=k._defineModule({version:Ci,moduleName:`${k.ModuleNames.RowGroupingModule}-core`,beans:[W_,J_,dC,uC,pC,L_,j_,$C,X_],userComponents:[{name:"agGroupRowRenderer",classImp:Me.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Me.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Me.GroupCellRendererCtrl}],dependantModules:[Me.EnterpriseCoreModule]}),GC=k._defineModule({version:Ci,moduleName:`${k.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:hC,addAggFuncs:fC,clearAggFuncs:mC,setColumnAggFunc:gC,isPivotMode:yC,getPivotResultColumn:_C,setValueColumns:CC,getValueColumns:vC,removeValueColumn:wC,removeValueColumns:bC,addValueColumn:xC,addValueColumns:kC,setRowGroupColumns:SC,removeRowGroupColumn:EC,removeRowGroupColumns:TC,addRowGroupColumn:NC,addRowGroupColumns:VC,getRowGroupColumns:BC,moveRowGroupColumn:AC,setPivotColumns:PC,removePivotColumn:RC,removePivotColumns:DC,addPivotColumn:IC,addPivotColumns:FC,getPivotColumns:LC,setPivotResultColumns:OC,getPivotResultColumns:MC},dependantModules:[Tl]}),Fu=k._defineModule({version:Ci,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Q_}],dependantModules:[Tl,k._ColumnFilterModule]}),zC=k._defineModule({version:Ci,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:eC}],dependantModules:[Fu,k._FloatingFilterModule]}),UC=k._defineModule({version:Ci,moduleName:k.ModuleNames.RowGroupingModule,dependantModules:[Tl,GC,Fu,zC]}),Lu=class extends xl{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:k._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()}},Ou=300,ZC=class extends k.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
24
|
+
`),this.eFloatingFilter=x.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 x.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,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 x.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,x._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 o,i;this.underlyingFloatingFilter=n,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),x.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,i;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):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.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()}},El=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 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 n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function iC(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(Vu(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(Vu),!0):!1}function Vu(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,i=n>=0,l=o>=0,c=i&&l,d=!i&&!l;return c?n-o:d?t.__objectId-e.__objectId:i?1:-1}var sC=class extends x.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=[],o=[];let i;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!i?i=l:o.push(l):n.push(l)}),i&&o.push(i),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:i}=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:o,rowNodesOrderChanged:!!i,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(d=>d.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new El;x._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),x._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),x._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{iC(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;x._exists(e)&&n(t.rootNode);function n(o){x._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const i=p=>p.key,l=this.getExistingPathForNode(o,e).map(i),c=this.getGroupInfo(o,e).map(i);x._areEqual(l,c)||this.moveNode(o,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 o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,i=n||new El;t.forEach(l=>{this.removeFromParent(l,i),this.forEachParentGroup(e,l.parent,c=>{i.removeFromAllLeafChildren(c,l)})}),o&&i.flush()}removeEmptyGroups(t,e){let n=!0;const o=i=>{var p;const l=this.getChildrenMappedKey(i.key,i.rowGroupColumn),c=i.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const i=new El;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,i),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(x._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.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:x._areEqual(t.groupedCols,e.groupedCols)&&x._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.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,o=t.rootNode;o.leafGroup=n.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 n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),i=this.findParentForNode(t,o,e,n);i.group||x._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,n,o){let i=n.rootNode;return e.forEach((l,c)=>{i=this.getOrCreateNextNode(i,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,n,o){var c;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[i];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const i=new x.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,n),i.level=n,i.leafGroup=n===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=n,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,n){const o=(i,l)=>{if(!i.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return x.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const l=t.rowGroupColumn;l!==null&&i.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.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 o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!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(o=>{let i=this.valueService.getKeyForNode(o,t),l=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(i="",l=!0),l){const d={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(d)}}),n}},aC=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,mt=Object.freeze([]),lC=mt.values(),Ns=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},cC=class Mg{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=mt,this.allLeafChildren=mt,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())??lC}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new Mg(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&Ns(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:i}=this;if(n<0)o!==null&&o!==e&&Ns(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??mt,Ns(o,!1)):e.allLeafChildren=this.allLeafChildren??mt}return e.level=n,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:i,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??mt)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return Ns(e,n<0),!0}addDuplicateRow(e){const{level:n}=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=n,n>=0&&(e.allLeafChildren=mt),e.childrenAfterGroup=mt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??mt,n.childrenAfterGroup=mt,n.allLeafChildren=mt,e.delete(o),e.add(n),this.row=o),o}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,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var d;this.childrenChanged=!1;const e=((d=this.children)==null?void 0:d.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=mt,this.row.childrenAfterGroup=mt,!0);let n=!1,o=this.childrenAfterGroup;o===mt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let i=0,l=-1,c=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<l&&(c=!0),l=h,p.oldSourceRowIndex=h;const m=p.row;o[i]!==m&&(o[i]=m,n=!0),++i}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(aC),o.clear();for(let i=0;i<n;++i){const l=e[i].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,d;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const l=o.length;if(l===0)i=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=mt,this.allLeafChildren=mt;else if(l===1&&((d=o[0].allLeafChildren)!=null&&d.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===mt||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let m=0;for(let y=0;y<l;++y){const w=o[y],v=w.allLeafChildren,T=v.length;if(T)for(let O=0;O<T;++O){const M=v[O];(m>=h||p[m]!==M)&&(p[m]=M,i=!0),++m}else(m>=h||p[m]!==w)&&w&&(p[m]=w,i=!0),++m}h!==m&&(p.length=m,i=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},Au=t=>(t.treeNodeFlags&1)!==0,Bu=t=>(t.treeNodeFlags&2)!==0,Pu=t=>(t.treeNodeFlags&4)!==0,dC=t=>(t.treeNodeFlags&8)!==0,Ru=t=>(t.treeNodeFlags&16)!==0,Du=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},uC=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},pC=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},_r=t=>{t.treeNodeFlags|=16},Iu=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},_i=t=>{t.treeNodeFlags=0},hC=class extends x.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new cC(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),_i(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,i=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.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(c,e,n):this.handleRowData(c,i,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var i,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const d=((l=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==d&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=d}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:i,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!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,o=t.length;n<o;++n){const i=t[n].treeNode;i&&i.oldSourceRowIndex!==n&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const i=t[n];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||mt;return n.length||x._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const i=e.upsertKey(t[o]);if(o>=n)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:i}=t;if(o<0)return;let l=!1;if(i!==e){const d=e.treeNode;d!==null&&d!==t&&(d.removeRow(e),d.invalidate()),i===null?(t.setRow(e),l=!0):i.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(i,!0),l=!0)}n&&!Pu(e)&&(uC(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let i=!1;t.removeRow(e)&&(i=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&_r(n),n.updateHasChildren(),Ru(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Iu(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 i of e.enumChildren()){const l=i.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,pC(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var h,m,y;const o=n.row,i=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&_r(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((h=o.childrenAfterGroup)!=null&&h.length),d=c||!o.data,p=o.group;p!==d?(_r(o),o.setGroup(d),!d&&!o.expanded&&Du(o,!1)):o.hasChildren()!==c&&(_r(o),o.updateHasChildren()),o.group&&!Bu(o)&&(i!==o&&i!==null&&i.group&&Bu(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Du(o,!0)),Pu(o)&&(_r(e.row),dC(o)&&o.setData(o.data)),i!==o&&(n.oldRow=o,i!==null&&(p||n.hasChildren())&&_r(o),e.childrenChanged=!0,_r(e.row)),Ru(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):Au(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Iu(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,x._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(w=>w.data)]))}createFillerRow(t){const e=new x.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,o=t.parent;for(;o!==null;){const i=o.parent;if(i===null)break;n=`${o.level}-${o.key}-${n}`,o=i}return e.id=x.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var i;const n={};t.groupData=n;const o=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols();if(o)for(const l of o)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:o,level:i}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&_r(e.row)),o!==null&&i>=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:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):_i(e)),o)for(const i of o)n>=0&&!i.data?this.destroyRow(i,!0):_i(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!Au(t)){_i(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}_i(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)}}},fC=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?hC:sC;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()}},Fu="PivotRowTotal_",mC=class extends x.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,c=[]){return l.forEach(d=>{d.children!==void 0?n(d.children,c):c.push(d)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(l=>x._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,i){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=i[t].getColDef(),d=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return x._iterateObject(e,m=>{const y=[...n,m],w=this.createColDef(l[0],m,y);w.columnGroupShow="open",h.push(w)}),h.sort(d),h}const p=[];return x._iterateObject(e,(h,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,w=[...n,h];p.push({children:this.recursivelyBuildGroup(t+1,m,w,o,i),headerName:h,pivotKeys:w,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(w)})}),p.sort(d),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(i,l,c)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,l,h)});const m=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const w=this.columnNameService.getDisplayNameForColumn(y,"header"),v=this.createColDef(y,w,i.pivotKeys);v.pivotTotalColumnIds=h.get(y.getColId()),v.columnGroupShow=n?"open":"closed",v.aggFunc=y.getAggFunc(),m||(i.children.push(v),l.push(v))}),this.merge(c,h);return}if(!i.pivotValueColumn)return;const d=i.pivotValueColumn.getColId();c.has(d)?c.get(d).push(i.colId):c.set(d,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(c=>c.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const i=t;if(!i.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(i.children.forEach(c=>{const d=this.recursivelyAddPivotTotal(c,e,n,o);d&&(l=l.concat(d))}),i.children.length>1){const d=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,d,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.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 l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();n||i.reverse();const l=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<i.length;c++){const d=i[c],p=this.columnNameService.getDisplayNameForColumn(d,"header"),h=this.createColDef(d,p,[]),m=[];for(let w=0;w<e.length;w++){const v=e[w];v.pivotValueColumn===d&&m.push(v.colId)}h.pivotTotalColumnIds=m,h.colId=Fu+h.colId;const y=l?{children:[h],pivotKeys:[],groupId:`${Fu}_pivotGroup_${d.getColId()}`}:h;e.push(h),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const i={};if(t){const l=t.getColDef();Object.assign(i,l),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},i.pivotKeys=n,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,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,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.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 c=t[i].split(this.fieldSeparator);let d=e;for(let p=0;p<c.length;p++){const h=c[p];d[h]==null&&(d[h]={}),d=d[h]}}const n=(i,l,c,d)=>{const p=[];for(const y in c){const w=c[y],v=n(`${i}${this.fieldSeparator}${y}`,y,w,d+1);p.push(v)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const v=this.columnNameService.getDisplayNameForColumn(y,"header")??l,T=this.createColDef(y,v,void 0,!1);return T.colId=i,T.aggFunc=y.getAggFunc(),T.valueGetter=O=>{var M;return(M=O.data)==null?void 0:M[i]},T}return{colId:i,headerName:l,valueGetter:v=>{var T;return(T=v.data)==null?void 0:T[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||d<this.pivotDefaultExpanded,groupId:i,headerName:l,children:p}},o=[];for(const i in e){const l=e[i],c=n(i,i,l,0);o.push(c)}return o}},Lu="Exceeded maximum allowed pivot column count.",gC=class extends x.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 o;try{o=this.bucketUpRowNodes(t)}catch(V){if(V.message===Lu){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:V.message}),this.lastTimeFailed=!0;return}throw V}const i=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(V=>`${V.getId()}-${V.getColDef().headerName}`).join("#"),d=l.map(V=>V.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,h=this.aggregationFuncsHashLastTime!==d;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=d;const m=this.funcColsService.getRowGroupColumns().map(V=>V.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const w=this.gos.get("pivotRowTotals"),v=this.gos.get("pivotColumnGroupTotals"),T=this.gos.get("suppressExpandablePivotGroups"),O=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),M=w!==this.pivotRowTotalsLastTime||v!==this.pivotColumnGroupTotalsLastTime||T!==this.suppressExpandablePivotGroupsLastTime||O!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=w,this.pivotColumnGroupTotalsLastTime=v,this.suppressExpandablePivotGroupsLastTime=T,this.removePivotHeaderRowWhenSingleValueColumnLastTime=O,this.lastTimeFailed||i||p||y||h||M){const{pivotColumnGroupDefs:V,pivotColumnDefs:U}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=U,this.pivotResultColsService.setPivotResultCols(V,"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(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.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,o){const i={},l=e[n];if(t.forEach(c=>{let d=this.valueService.getKeyForNode(l,c);if(x._missing(d)&&(d=""),!o[d]){this.currentUniqueCount+=1,o[d]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(Lu)}i[d]||(i[d]=[]),i[d].push(c)}),n===e.length-1)return i;{const c={};return x._iterateObject(i,(d,p)=>{c[d]=this.bucketChildren(p,e,n+1,o[d])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function yC(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function _C(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function CC(t){t.aggFuncService&&t.aggFuncService.clear()}function vC(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function wC(t){return t.columnModel.isPivotMode()}function bC(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function xC(t,e){t.funcColsService.setValueColumns(e,"api")}function kC(t){return t.funcColsService.getValueColumns()}function SC(t,e){t.funcColsService.removeValueColumns([e],"api")}function EC(t,e){t.funcColsService.removeValueColumns(e,"api")}function TC(t,e){t.funcColsService.addValueColumns([e],"api")}function NC(t,e){t.funcColsService.addValueColumns(e,"api")}function VC(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function AC(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function BC(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function PC(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function RC(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function DC(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function IC(t){return t.funcColsService.getRowGroupColumns()}function FC(t,e){t.funcColsService.setPivotColumns(e,"api")}function LC(t,e){t.funcColsService.removePivotColumns([e],"api")}function OC(t,e){t.funcColsService.removePivotColumns(e,"api")}function MC(t,e){t.funcColsService.addPivotColumns([e],"api")}function $C(t,e){t.funcColsService.addPivotColumns(e,"api")}function GC(t){return t.funcColsService.getPivotColumns()}function zC(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function UC(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var ZC=class extends x.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,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},Ci="32.3.3",Tl=x._defineModule({version:Ci,moduleName:`${x.ModuleNames.RowGroupingModule}-core`,beans:[K_,nC,fC,mC,gC,G_,Y_,ZC,tC],userComponents:[{name:"agGroupRowRenderer",classImp:Me.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Me.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Me.GroupCellRendererCtrl}],dependantModules:[Me.EnterpriseCoreModule]}),WC=x._defineModule({version:Ci,moduleName:`${x.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:yC,addAggFuncs:_C,clearAggFuncs:CC,setColumnAggFunc:vC,isPivotMode:wC,getPivotResultColumn:bC,setValueColumns:xC,getValueColumns:kC,removeValueColumn:SC,removeValueColumns:EC,addValueColumn:TC,addValueColumns:NC,setRowGroupColumns:VC,removeRowGroupColumn:AC,removeRowGroupColumns:BC,addRowGroupColumn:PC,addRowGroupColumns:RC,getRowGroupColumns:IC,moveRowGroupColumn:DC,setPivotColumns:FC,removePivotColumn:LC,removePivotColumns:OC,addPivotColumn:MC,addPivotColumns:$C,getPivotColumns:GC,setPivotResultColumns:zC,getPivotResultColumns:UC},dependantModules:[Tl]}),Ou=x._defineModule({version:Ci,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:rC}],dependantModules:[Tl,x._ColumnFilterModule]}),jC=x._defineModule({version:Ci,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:oC}],dependantModules:[Ou,x._FloatingFilterModule]}),HC=x._defineModule({version:Ci,moduleName:x.ModuleNames.RowGroupingModule,dependantModules:[Tl,WC,Ou,jC]}),Mu=class extends xl{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:x._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()}},$u=300,qC=class extends x.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>`,[
|
|
28
|
+
</div>`,[x.AgCheckboxSelector,x.AgInputTextFieldSelector]),this.eExpand=x.RefPlaceholder,this.eSelect=x.RefPlaceholder,this.eFilterTextField=x.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===x.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=x._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=x._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=x._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,o=this.columnModel.isProvidedColGroupsPresent(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),x._setDisplayed(this.eFilterTextField.getGui(),t),x._setDisplayed(this.eSelect.getGui(),e),x._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=x._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},$u)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===x.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),$u)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,x._setDisplayed(this.eExpandChecked,this.expandState===0),x._setDisplayed(this.eExpandUnchecked,this.expandState===1),x._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},KC={selector:"AG-PRIMARY-COLS-HEADER",component:qC},Gu=class{constructor(t,e,n,o=!1,i){this.localEventService=new x.LocalEventService,this.displayName=t,this.dept=n,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)}},zu=class extends x.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(),x.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){x.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 Me.AgMenuList),o=this.localeService.getLocaleTextFunc();let i=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),i()}});const l=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(n.getGui()),ariaLabel:o("ariaLabelContextMenu","Context Menu"),closedCallback:c=>{c instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(n)}});l&&(i=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(i=>e.allowedFunction(i)&&!e.activeFunction(i)),o=this.columns.some(i=>e.allowedFunction(i)&&e.activeFunction(i));n&&t.push({name:e.activateLabel(this.displayName),icon:x._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),o&&t.push({name:e.deactivateLabel(this.displayName),icon:x._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},Uu=class extends x.Component{constructor(t,e,n,o){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=o,this.cbSelect=x.RefPlaceholder,this.eLabel=x.RefPlaceholder,this.eGroupOpenedIcon=x.RefPlaceholder,this.eGroupClosedIcon=x.RefPlaceholder,this.eColumnGroupIcons=x.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>`,[
|
|
35
|
+
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._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(),x._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 n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const o=()=>{const i=t.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};o(),this.addManagedEventListeners({newColumnsLoaded:o})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case x.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case x.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case x.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 o=this.createBean(new zu(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){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.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(o=>{const i=o.getId();e[i]=o.isVisible(),n[i]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(x._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(x._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 x.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(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"),n=this.cbSelect.getValue(),o=n===void 0?t("ariaIndeterminate","indeterminate"):n?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${o})`),x._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,o=0;if(e.forEach(i=>{!t&&i.getColDef().lockVisible||(this.isColumnChecked(i,t)?n++:o++)}),!(n>0&&o>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(),o=t.isRowGroupActive(),i=t.isValueActive();return n||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();x._setDisplayed(this.eGroupClosedIcon,!t),x._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){x._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)}},YC=class extends x.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 Me.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:x.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 x.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(i=>{const l=i.getColDef();return!!l.suppressMovable||!!l.lockPosition})}moveItem(t,e){if(!e)return;const{component:n}=e;let o=null,i=e.position==="top";if(n instanceof Uu?(o=n.getColumns()[0],i=!0):n&&(o=n.getColumn()),!o)return;const l=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:o,isBefore:i});l!=null&&this.columnMoveService.moveColumns(t,l,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:n,isBefore:o}=t;if(!n||!e)return null;const i=this.columnModel.getCols().indexOf(n),l=o?i:i+1,c=this.getMoveDiff(e,l);return l-c}getMoveDiff(t,e){const n=this.columnModel.getCols();if(!t)return 0;const o=t[0],i=t.length;return n.indexOf(o)<e?i:0}},XC=class extends x.Component{constructor(t,e,n,o){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=o,this.eLabel=x.RefPlaceholder,this.cbSelect=x.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>`,[k.AgCheckboxSelector]),this.eDragHandle=k._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=k._escapeString(this.displayName);this.eLabel.innerHTML=n;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(),k._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!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 o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,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 o=this.createBean(new $u(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===k.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"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");k._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),k._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){k._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:k.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 o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,n=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:l,suppressMovable:c,lockVisible:d}=this.column.getColDef(),p=!!o||!!i,h=!!l||!!c;e=!d,n=p||!h}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){k._warnOnce("can not expand a column item that does not represent a column group header")}},qC=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},KC="ag-column-select-list",YC=class extends k.Component{constructor(){super(`<div class="${KC}" 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 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 Me.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,l)=>(k._setAriaLevel(l,i.getDept()+1),this.createComponentFromItem(i,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new jC(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Gu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new HC(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 o=n.getColumnGroup();if(o){const i=t[o.getId()];(i!=null||e)&&n.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(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=c=>{c.addEventListener("expandedChanged",e);const d=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(d)},o=(c,d,p)=>{c.forEach(h=>{k.isProvidedColumnGroup(h)?i(h,d,p):l(h,d,p)})},i=(c,d,p)=>{const h=c.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),d,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),w=new Mu(y,c,d,!0,this.expandGroupsByDefault);p.push(w),n(w),o(c.getChildren(),d+1,w.getChildren())},l=(c,d,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Mu(m,c,d))};this.destroyColumnTree(),o(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 qC(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"),o=this.displayedColsList.length;k._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.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 n=[];this.forEachItem(i=>{if(!i.isGroup())return;const l=i.getColumnGroup().getId();e.indexOf(l)>=0&&(i.setExpanded(t),n.push(l))});const o=e.filter(i=>!k._includes(n,i));o.length>0&&k._warnOnce("unable to find group(s) for supplied groupIds:",o)}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(o=>{if(o.isGroup()||!o.isPassesFilter())return;const i=o.getColumn(),l=i.getColDef();let c;if(n){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;c=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(l.lockVisible)return;c=i.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=k._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!k._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let i=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(d=>{const p=e(d,c||o);p&&(i=p)})}const l=o||i?!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}},XC={selector:"AG-PRIMARY-COLS-LIST",component:YC},JC=class extends k.Component{constructor(){super(`<div class="ag-column-select">
|
|
38
|
+
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._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=x._escapeString(this.displayName);this.eLabel.innerHTML=n;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(),x._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!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 o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,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 o=this.createBean(new zu(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===x.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"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),x._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.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 o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,n=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:l,suppressMovable:c,lockVisible:d}=this.column.getColDef(),p=!!o||!!i,h=!!l||!!c;e=!d,n=p||!h}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){x._warnOnce("can not expand a column item that does not represent a column group header")}},JC=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},QC="ag-column-select-list",ev=class extends x.Component{constructor(){super(`<div class="${QC}" 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 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 Me.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,l)=>(x._setAriaLevel(l,i.getDept()+1),this.createComponentFromItem(i,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new YC(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Uu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new XC(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 o=n.getColumnGroup();if(o){const i=t[o.getId()];(i!=null||e)&&n.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(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=c=>{c.addEventListener("expandedChanged",e);const d=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(d)},o=(c,d,p)=>{c.forEach(h=>{x.isProvidedColumnGroup(h)?i(h,d,p):l(h,d,p)})},i=(c,d,p)=>{const h=c.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),d,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),w=new Gu(y,c,d,!0,this.expandGroupsByDefault);p.push(w),n(w),o(c.getChildren(),d+1,w.getChildren())},l=(c,d,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Gu(m,c,d))};this.destroyColumnTree(),o(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 JC(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"),o=this.displayedColsList.length;x._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.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 n=[];this.forEachItem(i=>{if(!i.isGroup())return;const l=i.getColumnGroup().getId();e.indexOf(l)>=0&&(i.setExpanded(t),n.push(l))});const o=e.filter(i=>!x._includes(n,i));o.length>0&&x._warnOnce("unable to find group(s) for supplied groupIds:",o)}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(o=>{if(o.isGroup()||!o.isPassesFilter())return;const i=o.getColumn(),l=i.getColDef();let c;if(n){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;c=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(l.lockVisible)return;c=i.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=x._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!x._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let i=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(d=>{const p=e(d,c||o);p&&(i=p)})}const l=o||i?!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}},tv={selector:"AG-PRIMARY-COLS-LIST",component:ev},nv=class extends x.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>`,[
|
|
41
|
+
</div>`,[KC,tv]),this.primaryColsHeaderPanel=x.RefPlaceholder,this.primaryColsListPanel=x.RefPlaceholder}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,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 x.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()}},Zu=class extends x.Component{constructor(){super(...arguments),this.cbPivotMode=x.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(),[
|
|
43
|
+
</div>`}postConstruct(){this.setTemplate(this.createTemplate(),[x.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)}},rv=class extends x.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 Zu),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new nv),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 Sl(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Mu(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new kl(!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 Zu),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 Sl(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Mu(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new kl(!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 n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=x._last(n);o&&o.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let n=0;n<e.length;n++){const o=e[n];o.style.removeProperty("height"),o.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(x.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,x._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},ov=class extends x.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 o=this.extractAllLeafColumns(t);this.setAllColumns(o,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=o=>{o.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?n(i.getChildren()):e.push(i.getColumn()))})};return n(t),e}setAllVisible(t,e,n){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},n)}setAllPivot(t,e,n){this.setAllPivotActive(t,e,n)}setAllPivotActive(t,e,n){const o=[],c=e?d=>{var p;if(!d.isAnyFunctionActive())if(d.isAllowValue()){const h=typeof d.getAggFunc()=="string"?d.getAggFunc():(p=this.aggFuncService)==null?void 0:p.getDefaultAggFunc(d);o.push({colId:d.getId(),aggFunc:h})}else d.isAllowRowGroup()?o.push({colId:d.getId(),rowGroup:!0}):d.isAllowPivot()&&o.push({colId:d.getId(),pivot:!0})}:d=>{(d.isPivotActive()||d.isRowGroupActive()||d.isValueActive())&&o.push({colId:d.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(c),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},n)}updateColumns(t){const{columns:e,visibleState:n,pivotState:o,eventType:i}=t,l=e.map(c=>{const d=c.getColId();if(this.columnModel.isPivotMode()){const p=o==null?void 0:o[d];return{colId:d,pivot:p==null?void 0:p.pivot,rowGroup:p==null?void 0:p.rowGroup,aggFunc:p==null?void 0:p.aggFunc}}else return{colId:d,hide:!(n!=null&&n[d])}});this.columnApplyStateService.applyColumnState({state:l},i)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},iv="32.3.3",sv=x._defineModule({version:iv,moduleName:x.ModuleNames.ColumnsToolPanelModule,beans:[ov],userComponents:[{name:"agColumnsToolPanel",classImp:rv},{name:"agMenuItem",classImp:Me.AgMenuItemRenderer}],dependantModules:[Me.EnterpriseCoreModule,HC,Nu]});const av=`.ag-header {
|
|
44
44
|
border-bottom: 1px solid var(--border-color-default);
|
|
45
|
-
}`;function Uu(){k.ModuleRegistry.registerModules([gs.ClientSideRowModelModule,Mg.InfiniteRowModelModule,il.ServerSideRowModelModule,$g.CsvExportModule,Jd.ClipboardModule,Qd.RangeSelectionModule,Gg.RichSelectModule,zg.MenuModule,Ug.ExcelExportModule,Eu,nv]);const t=h_("AGGRID_LICENSE");t?(Me.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const ov=eu.createPart("headerBottomBorder").withCSS(rv),Zu=eu.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",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"}).withPart(ov),Wu=Symbol("sdk-vue");function Nl(){return r.inject(Wu)}function iv(t,e,n={}){let o;Uu();const i=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const d=ny(c,t,n),p=e(d),h=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const w=typeof y=="function"?y():y;return[m,r.markRaw(w)]}));o=Object.assign(d,{...p,getRoute(m){return h[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return Wg(o,"App is not loaded")},install(c){c.provide(Wu,this),i()}});return l}var sv=Object.defineProperty,av=(t,e,n)=>e in t?sv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lv=(t,e,n)=>av(t,e+"",n);function Vs(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function cv(t,e,n){const o=Math.min(e,n),i=Math.max(e,n);return t>=o&&t<=i}function dv(t){return new Promise(e=>setTimeout(e,t))}function uv(t){return t()}function As(t,e,n){return e>t?e:t>n?n:t}function ju(t,e){return e(t)}function _r(t,e){if(t!=null)return e(t)}function pv(t){if(t&&t.ok)return t.value}async function hv(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const Hu=t=>t;function fv(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function mv(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function gv(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(fv(65,91));return e}function qu(){return gv(42)}const vi=Array.isArray;function Bs(t){return t!==null&&typeof t=="object"}function vo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function yv(t,e){return Object.keys(t).map(n=>e(t[n],n))}function Ku(t){return Object.values(t).reduce((e,n)=>n!==void 0?e+1:e,0)}function Ps(t,e){if(!(Bs(t)&&Bs(e)))return t===e;if(vi(t)&&vi(e))return t.length!==e.length?!1:[...t.keys()].every(n=>Ps(t[n],e[n]));if(vo(t)&&vo(e))return Ku(t)!==Ku(e)?!1:Object.keys(t).every(n=>Ps(t[n],e[n]));throw Error(`Cannot compare a ${String(t)} and b ${String(e)}`)}const Rs=Ps;function wi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=wi(t[n]);return e}else if(vo(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=wi(t[n])}),e}else return t}function _v(t){return Array.isArray(t)?Object.assign([],t):Bs(t)?Object.assign({},t):t}function Cv(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function vv(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function wv(t,e,n){return t[e]=n,t}function bv(t,e){return t[e]}function xv(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function kv(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function Sv(t,...e){return e.map(n=>t[n])}function Ev(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function Yu(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];vo(o)&&vo(i)||vi(o)&&vi(i)&&o.length===i.length?Yu(o,i):t[n]=i}),t}const Vl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:vv,deepClone:wi,deepEqual:Rs,deepPatch:Yu,getProp:bv,isArray:vi,isJsonEqual:Ps,isNonPrimitive:Bs,isPlainObject:vo,map:yv,omit:Ev,pick:kv,pickValues:Sv,setProp:wv,shallowClone:_v,shallowDiff:Cv,shiftProp:xv},Symbol.toStringTag,{value:"Module"}));function Tv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}function Nv(t,e,n){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const Vv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Av=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Bv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Pv=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Xu=(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 Al(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?Pv:Bv:e.binary?Av:Vv;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=Xu(t,e.locale);return i+p+" "+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 c=Xu(Number(t),e.locale),d=n[l];return i+c+" "+d}const Rv={class:"context-menu"},Dv=["onClick"],Iv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=i=>{i.cb(),n("close")};return(i,l)=>(r.openBlock(),r.createElementBlock("div",Rv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,Dv))),128))]))}}),Ot=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Fv=Ot(Iv,[["__scopeId","data-v-12530966"]]);function Bl(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(Fv,{options:e,onClose:()=>{n()}});r.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",l=>{i.contains(l.target)||n()}),n}const Ju=Symbol(),Ds=()=>r.inject(Ju),Lv=["value"],Ov={key:1},Mv=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=h=>{var m;const y=(m=h.target)==null?void 0:m.value,w=r.unref(l),v=uv(()=>w==="integer"?parseInt(y,10):w==="float"?Number(y):y);n("update:modelValue",v),i.edit=!1},d=r.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=d.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:d,class:r.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:m[0]||(m[0]=y=>i.edit=!1),onChange:c},null,40,Lv)):(r.openBlock(),r.createElementBlock("div",Ov,r.toDisplayString(h.modelValue),1))],2))}}),$v=["^data-row-index"],Gv={key:0,class:"control-cell"},zv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=Ds(),o=r.computed(()=>e.cell.column.valueType),i=h=>{_r(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,w={...y.dataRow,[e.cell.id]:h};m({...y,dataRow:w})})},l=h=>{h.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(h,m)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=n.settings??{},w=[],{onSelectedRows:v,onSelectedColumns:T}=y.value,O=n.data.selectedRows.has(m.primaryKey);v&&v.length&&(O?w.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):w.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),T&&T.length&&(w.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),w.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),w.length&&Bl(h,w)},d=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:d,class:r.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,h.cell.row))},[h.cell.control?(r.openBlock(),r.createElementBlock("div",Gv,r.toDisplayString(h.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(r.openBlock(),r.createBlock(Mv,{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,$v))}}),Uv={},Zv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Wv(t,e){return r.openBlock(),r.createElementBlock("svg",Zv,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 jv=Ot(Uv,[["render",Wv]]),Hv={class:"tr-head"},qv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Hv,[r.renderSlot(e.$slots,"default")]))}});function Kv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function Yv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}const Xv=["^data-col-id"],Jv=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&Bl(l,c)}function i(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:Kv(d,["DESC","ASC"])})}return(l,c)=>(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:o},[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:c[0]||(c[0]=r.withModifiers(()=>i(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,Xv))}}),Qv=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{_r(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),e0=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=Ds(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function st(t,e,n,o){r.onMounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.addEventListener(e,n,o)}),r.onUnmounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.removeEventListener(e,n,o)})}function t0(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function n0(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function r0(t,e){let n;function o(l){n={...l}}t0(()=>{n=void 0,e()});const i=n0(t);return st(window,"mousemove",l=>{n&&i({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const wo=1,o0=10,i0=30,Qu=60;function ep(){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 tp(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,i=r.ref(!1);let l;const c=d=>{const p=d?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>i.value=d,p):i.value=d};return window&&(st(t,"mouseenter",()=>c(!0)),st(t,"mouseleave",()=>c(!1))),i}function s0(t){var e;const n=_r((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:i,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return Hu({colId:c,width:i,x:l,right:l+i})}).slice(0,n.length-1)}function a0(t,e){const n=ep(),o=tp(e,{}),{data:i}=t,l=r0(d=>{_r(i.resizeTh,p=>{const h=i.columns.find(m=>m.id===p.colId);h&&(h.width=As(d.width+d.diff,i0,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{i.resizeTh&&(i.resize=!0,l.start({x:d.x,width:i.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const d=s0(e).find(p=>Math.abs(n.x-p.right)<o0);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const l0={key:0,class:"command-menu"},c0={key:0},d0=["onClick"],u0=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=Ds(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",l0,[n.value.length?(r.openBlock(),r.createElementBlock("span",c0,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,d0))),128))])):r.createCommentVNode("",!0)}}),p0={key:0,class:"command-menu"},h0={key:0},f0=["onClick"],m0=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=Ds(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",p0,[n.value.length?(r.openBlock(),r.createElementBlock("span",h0,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,f0))),128))])):r.createCommentVNode("",!0)}});function Cr(t,e){const n={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-n.x,dy:i.y-n.y});st(document,"mousedown",i=>{i.target===r.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.el=r.unref(t),n.x=i.x,n.y=i.y)}),st(document,"mouseup",i=>{n.el&&(n.el=void 0,e({...o(i),stop:!0},n))}),st(document,"mousemove",i=>{n.el&&e(o(i),n)})}const g0=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),d=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),h=r.computed(()=>({top:`${d.value}px`,height:`${p.value}px`}));return Cr(i,(m,y)=>{const w=(d.value+m.dy)*o.dataSize/l.value;n("change:offset",w),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:i,class:"t-scroll__handle",style:r.normalizeStyle(h.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function y0(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:i}=e,l=[...e.columns],c=qu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const p=l.map(m=>{const y={...m,offset:d};return d+=m.width+wo,y}),h=p.filter(m=>m.frozen);return Tv(p,m=>m.frozen?!1:i<m.offset+m.width&&m.offset<o+i).concat(h).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function _0(t,e){const n=r.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const i=n.value,{primaryKey:l,offset:c,dataRow:d,height:p}=o,h=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:i[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return Hu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:h,selected:t.selectedRows.has(l)})}))}const C0=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await dv(0),hv({rows:e.getRows(n,o),dataWindow:t})};function v0(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=wi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,h.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+wo,0)),i=r.computed(()=>ju(h.data.dataHeight-h.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>ju(o.value-h.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=y0({data:e,settings:n}),p=_0(e,d),h={data:e,settings:n,tableColumns:d,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((w,v)=>w+v.width+wo,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const w=e.columns[e.columns.length-1];w.width=w.width+(y-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=As(m,0,i.value)},updateScrollLeft(m){e.scrollLeft=As(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,w=m>y?y:m;e.bodyHeight=w},updateDimensions(m){this.updateBodyHeight(),h.data.bodyWidth=m.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const w=m.current;(!w||m.scrollTop<w.scrollTop||m.scrollTop+m.bodyHeight>w.bodyHeight+w.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-Qu,bodyHeight:m.bodyHeight+Qu*2},C0(wi(e.currentWindow),n.value.dataSource).then(({rows:v,dataWindow:T})=>{Rs(e.currentWindow,T)&&(e.rows=v)}))},{deep:!0,immediate:!0}),r.provide(Ju,h),h}const w0={class:"command-menu__container"},b0={key:0,class:"table-body__no-data"},x0={class:"carets"},Pl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,i=v0(o),l=r.computed(()=>i.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":i.data.bodyHeight+"px"}));r.watch(i.data,O=>n("update:data",O),{deep:!0}),r.watch(o,()=>m);const d=r.ref(),p=r.ref(),h=r.ref(),m=()=>{_r(h.value,O=>{i.updateDimensions(O.getBoundingClientRect())})},y=i.tableColumns,w=i.tableRows,{mouseDown:v}=a0(i,d);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),st(window,"resize",()=>r.nextTick(m));const T=O=>{O.preventDefault(),i.updateOffsets(O)};return(O,M)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:M[2]||(M[2]=(...x)=>r.unref(v)&&r.unref(v)(...x))},[r.createElementVNode("div",w0,[r.createVNode(u0),M[3]||(M[3]=r.createTextVNode()),r.createVNode(m0)]),M[7]||(M[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(qv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(x,Z)=>(r.openBlock(),r.createBlock(Jv,{key:Z,col:x,style:r.normalizeStyle(x.style),"onChange:sort":M[0]||(M[0]=V=>O.$emit("change:sort",V))},null,8,["col","style"]))),128))]),_:1})],512),M[8]||(M[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:r.normalizeStyle(c.value),onWheel:T},[l.value?(r.openBlock(),r.createElementBlock("div",b0,[r.createElementVNode("div",null,[r.createVNode(jv),M[4]||(M[4]=r.createTextVNode()),M[5]||(M[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),M[6]||(M[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(w),(x,Z)=>(r.openBlock(),r.createBlock(Qv,{key:Z,row:x},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x.cells,V=>(r.openBlock(),r.createBlock(zv,{key:V.column.id+":"+Z,cell:V,style:r.normalizeStyle(V.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),M[9]||(M[9]=r.createTextVNode()),r.createElementVNode("div",x0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(x,Z)=>(r.openBlock(),r.createBlock(e0,{key:Z,column:x,style:r.normalizeStyle(x.style),"onChange:sort":M[1]||(M[1]=V=>O.$emit("change:sort",V))},null,8,["column","style"]))),128))]),M[10]||(M[10]=r.createTextVNode()),r.createVNode(g0,{offset:r.unref(i).data.scrollTop,"window-size":r.unref(i).data.bodyHeight,"data-size":r.unref(i).data.dataHeight,"onChange:offset":r.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),np=new WeakMap;class k0{constructor(e,n,o){lv(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const i=e.reduce((c,d,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(d,p)+wo,c),{total:0,indices:new Map});this.dataHeight=i.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:Vs(i.indices.get(d)),height:this.resolveHeight(c,d)}));np.set(this,l)}get rows(){return np.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return Yv(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<n+e})}}class S0{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+wo}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=As(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:i})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+wo),height:this.rowHeight}))}}function E0(t){return Object.freeze(t)}function T0(t){return r.h(Pl,{settings:Object.freeze(t)})}function Rl(t,e){const n=new k0(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function N0(t,e){return r.computed(()=>{const n=r.unref(t);return Rl(n,r.unref(e))})}function V0(t,e){const n=r.computed(()=>{const i=r.unref(t);return Rl(i,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(Pl,o))}const A0=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:S0,Component:Pl,factory:T0,rawDataSettings:Rl,settings:E0,useRawData:N0,useRawDataComponent:V0},Symbol.toStringTag,{value:"Module"}));function*B0(t,e){for(const n of t)yield e(n)}function P0(t){const e=[];for(const n of t)e.push(n);return e}function rp(t){return t()}function Dl(t,e){if(t==null)throw Error(e);return t}function Il(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function op(t){return new Promise(e=>setTimeout(e,t))}function ip(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function sp(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function R0(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(sp(65,91));return e}function ap(t){return function(e){return 1-t(1-e)}}function D0(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function lp(t){const{duration:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=(d-i)/e;(p>1||l)&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function I0(t){const{getFraction:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=e(d-i);if(l)return;p>1&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function cp(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function dp(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i==null||i()},e)},new Date().getTime()>o&&i()}}function F0(t){return t.map(e=>({text:String(e),value:e}))}function vr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Fl=new Map;function L0(t){return Fl.has(t)||Fl.set(t,r.ref(localStorage.getItem(t))),Dl(Fl.get(t),"...")}function O0(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function up(t){const e=L0(t);return r.watch(e,n=>O0(t,n)),e}const Ll=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{P0(B0(Ll.values(),e=>e(t.matches?"dark":"light")))});const M0=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",pp=r.ref(M0),Ol=up("theme");function hp(t){const e=r.computed(()=>Ol.value?Ol.value:pp.value),n=i=>{pp.value=i,t==null||t(i)};function o(){Ol.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,i=>{t==null||t(r.unref(i))}),r.onMounted(()=>{Ll.add(n)}),r.onUnmounted(()=>{Ll.delete(n)}),[e,o]}const $0=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=hp();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:i[0]||(i[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},i[1]||(i[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),G0={key:0,class:"pl-block-page__title"},z0={class:"pl-block-page__title__default"},U0={class:"pl-block-page__title__append"},Z0={key:1},W0={class:"pl-block-page__body"},j0={name:"PlBlockPage"},H0=r.defineComponent({...j0,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots(),n=i=>{i.removeAttribute("title"),i.clientWidth<i.scrollWidth&&i.setAttribute("title",i.innerText)},o={mounted:n,updated:n};return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:i.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",G0,[r.createElementVNode("div",z0,[r.withDirectives((r.openBlock(),r.createElementBlock("span",null,[r.renderSlot(i.$slots,"title")])),[[o]]),l[0]||(l[0]=r.createTextVNode()),r.renderSlot(i.$slots,"after-title")]),l[1]||(l[1]=r.createTextVNode()),r.createElementVNode("div",U0,[r.renderSlot(i.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",Z0)),l[2]||(l[2]=r.createTextVNode()),r.createElementVNode("div",W0,[r.renderSlot(i.$slots,"default")])],2))}}),q0={name:"PlContainer"},K0=r.defineComponent({...q0,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),Y0={name:"PlRow"},X0=r.defineComponent({...Y0,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{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))}}),J0={class:"pl-layout-component",style:{"flex-grow":"1"}},Q0={name:"PlSpacer"},fp=r.defineComponent({...Q0,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",J0))}}),ew={name:"PlGrid"},tw=r.defineComponent({...ew,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),nw={key:0,class:"pl-alert__icon"},rw={class:"pl-alert__main"},ow={key:0},iw={class:"pl-alert__main__text"},sw={name:"PlAlert"},aw=r.defineComponent({...sw,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,o)=>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",nw,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",rw,[n.label?(r.openBlock(),r.createElementBlock("label",ow,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",iw,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=i=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),lw=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
}`;function Wu(){x.ModuleRegistry.registerModules([gs.ClientSideRowModelModule,Gg.InfiniteRowModelModule,il.ServerSideRowModelModule,zg.CsvExportModule,Jd.ClipboardModule,Qd.RangeSelectionModule,Ug.RichSelectModule,Zg.MenuModule,Wg.ExcelExportModule,Nu,sv]);const t=y_("AGGRID_LICENSE");t?(Me.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const lv=eu.createPart("headerBottomBorder").withCSS(av),ju=eu.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",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"}).withPart(lv),Hu=Symbol("sdk-vue");function Nl(){return r.inject(Hu)}function cv(t,e,n={}){let o;Wu();const i=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const d=sy(c,t,n),p=e(d),h=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const w=typeof y=="function"?y():y;return[m,r.markRaw(w)]}));o=Object.assign(d,{...p,getRoute(m){return h[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return Hg(o,"App is not loaded")},install(c){c.provide(Hu,this),i()}});return l}var dv=Object.defineProperty,uv=(t,e,n)=>e in t?dv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pv=(t,e,n)=>uv(t,e+"",n);function Vs(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function hv(t,e,n){const o=Math.min(e,n),i=Math.max(e,n);return t>=o&&t<=i}function fv(t){return new Promise(e=>setTimeout(e,t))}function mv(t){return t()}function As(t,e,n){return e>t?e:t>n?n:t}function qu(t,e){return e(t)}function Cr(t,e){if(t!=null)return e(t)}function gv(t){if(t&&t.ok)return t.value}async function yv(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const Ku=t=>t;function _v(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Cv(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function vv(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(_v(65,91));return e}function Yu(){return vv(42)}const vi=Array.isArray;function Bs(t){return t!==null&&typeof t=="object"}function wo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function wv(t,e){return Object.keys(t).map(n=>e(t[n],n))}function Xu(t){return Object.values(t).reduce((e,n)=>n!==void 0?e+1:e,0)}function Ps(t,e){if(!(Bs(t)&&Bs(e)))return t===e;if(vi(t)&&vi(e))return t.length!==e.length?!1:[...t.keys()].every(n=>Ps(t[n],e[n]));if(wo(t)&&wo(e))return Xu(t)!==Xu(e)?!1:Object.keys(t).every(n=>Ps(t[n],e[n]));throw Error(`Cannot compare a ${String(t)} and b ${String(e)}`)}const Rs=Ps;function wi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=wi(t[n]);return e}else if(wo(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=wi(t[n])}),e}else return t}function bv(t){return Array.isArray(t)?Object.assign([],t):Bs(t)?Object.assign({},t):t}function xv(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function kv(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function Sv(t,e,n){return t[e]=n,t}function Ev(t,e){return t[e]}function Tv(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function Nv(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function Vv(t,...e){return e.map(n=>t[n])}function Av(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function Ju(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];wo(o)&&wo(i)||vi(o)&&vi(i)&&o.length===i.length?Ju(o,i):t[n]=i}),t}const Vl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:kv,deepClone:wi,deepEqual:Rs,deepPatch:Ju,getProp:Ev,isArray:vi,isJsonEqual:Ps,isNonPrimitive:Bs,isPlainObject:wo,map:wv,omit:Av,pick:Nv,pickValues:Vv,setProp:Sv,shallowClone:bv,shallowDiff:xv,shiftProp:Tv},Symbol.toStringTag,{value:"Module"}));function Bv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}function Pv(t,e,n){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const Rv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Dv=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Iv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Fv=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Qu=(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 Al(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?Fv:Iv:e.binary?Dv:Rv;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=Qu(t,e.locale);return i+p+" "+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 c=Qu(Number(t),e.locale),d=n[l];return i+c+" "+d}const Lv={class:"context-menu"},Ov=["onClick"],Mv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=i=>{i.cb(),n("close")};return(i,l)=>(r.openBlock(),r.createElementBlock("div",Lv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,Ov))),128))]))}}),Ot=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},$v=Ot(Mv,[["__scopeId","data-v-12530966"]]);function Bl(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h($v,{options:e,onClose:()=>{n()}});r.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",l=>{i.contains(l.target)||n()}),n}const ep=Symbol(),Ds=()=>r.inject(ep),Gv=["value"],zv={key:1},Uv=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=h=>{var m;const y=(m=h.target)==null?void 0:m.value,w=r.unref(l),v=mv(()=>w==="integer"?parseInt(y,10):w==="float"?Number(y):y);n("update:modelValue",v),i.edit=!1},d=r.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=d.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:d,class:r.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:m[0]||(m[0]=y=>i.edit=!1),onChange:c},null,40,Gv)):(r.openBlock(),r.createElementBlock("div",zv,r.toDisplayString(h.modelValue),1))],2))}}),Zv=["^data-row-index"],Wv={key:0,class:"control-cell"},jv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=Ds(),o=r.computed(()=>e.cell.column.valueType),i=h=>{Cr(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,w={...y.dataRow,[e.cell.id]:h};m({...y,dataRow:w})})},l=h=>{h.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(h,m)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=n.settings??{},w=[],{onSelectedRows:v,onSelectedColumns:T}=y.value,O=n.data.selectedRows.has(m.primaryKey);v&&v.length&&(O?w.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):w.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),T&&T.length&&(w.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),w.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),w.length&&Bl(h,w)},d=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:d,class:r.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,h.cell.row))},[h.cell.control?(r.openBlock(),r.createElementBlock("div",Wv,r.toDisplayString(h.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(r.openBlock(),r.createBlock(Uv,{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,Zv))}}),Hv={},qv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kv(t,e){return r.openBlock(),r.createElementBlock("svg",qv,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 Yv=Ot(Hv,[["render",Kv]]),Xv={class:"tr-head"},Jv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Xv,[r.renderSlot(e.$slots,"default")]))}});function Qv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function e0(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}const t0=["^data-col-id"],n0=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&Bl(l,c)}function i(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:Qv(d,["DESC","ASC"])})}return(l,c)=>(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:o},[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:c[0]||(c[0]=r.withModifiers(()=>i(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,t0))}}),r0=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{Cr(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),o0=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=Ds(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function st(t,e,n,o){r.onMounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.addEventListener(e,n,o)}),r.onUnmounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.removeEventListener(e,n,o)})}function i0(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function s0(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function a0(t,e){let n;function o(l){n={...l}}i0(()=>{n=void 0,e()});const i=s0(t);return st(window,"mousemove",l=>{n&&i({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const bo=1,l0=10,c0=30,tp=60;function np(){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 rp(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,i=r.ref(!1);let l;const c=d=>{const p=d?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>i.value=d,p):i.value=d};return window&&(st(t,"mouseenter",()=>c(!0)),st(t,"mouseleave",()=>c(!1))),i}function d0(t){var e;const n=Cr((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:i,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return Ku({colId:c,width:i,x:l,right:l+i})}).slice(0,n.length-1)}function u0(t,e){const n=np(),o=rp(e,{}),{data:i}=t,l=a0(d=>{Cr(i.resizeTh,p=>{const h=i.columns.find(m=>m.id===p.colId);h&&(h.width=As(d.width+d.diff,c0,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{i.resizeTh&&(i.resize=!0,l.start({x:d.x,width:i.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const d=d0(e).find(p=>Math.abs(n.x-p.right)<l0);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const p0={key:0,class:"command-menu"},h0={key:0},f0=["onClick"],m0=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=Ds(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",p0,[n.value.length?(r.openBlock(),r.createElementBlock("span",h0,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,f0))),128))])):r.createCommentVNode("",!0)}}),g0={key:0,class:"command-menu"},y0={key:0},_0=["onClick"],C0=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=Ds(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",g0,[n.value.length?(r.openBlock(),r.createElementBlock("span",y0,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,_0))),128))])):r.createCommentVNode("",!0)}});function vr(t,e){const n={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-n.x,dy:i.y-n.y});st(document,"mousedown",i=>{i.target===r.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.el=r.unref(t),n.x=i.x,n.y=i.y)}),st(document,"mouseup",i=>{n.el&&(n.el=void 0,e({...o(i),stop:!0},n))}),st(document,"mousemove",i=>{n.el&&e(o(i),n)})}const v0=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),d=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),h=r.computed(()=>({top:`${d.value}px`,height:`${p.value}px`}));return vr(i,(m,y)=>{const w=(d.value+m.dy)*o.dataSize/l.value;n("change:offset",w),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:i,class:"t-scroll__handle",style:r.normalizeStyle(h.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function w0(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:i}=e,l=[...e.columns],c=Yu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const p=l.map(m=>{const y={...m,offset:d};return d+=m.width+bo,y}),h=p.filter(m=>m.frozen);return Bv(p,m=>m.frozen?!1:i<m.offset+m.width&&m.offset<o+i).concat(h).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function b0(t,e){const n=r.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const i=n.value,{primaryKey:l,offset:c,dataRow:d,height:p}=o,h=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:i[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return Ku({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:h,selected:t.selectedRows.has(l)})}))}const x0=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await fv(0),yv({rows:e.getRows(n,o),dataWindow:t})};function k0(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=wi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,h.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+bo,0)),i=r.computed(()=>qu(h.data.dataHeight-h.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>qu(o.value-h.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=w0({data:e,settings:n}),p=b0(e,d),h={data:e,settings:n,tableColumns:d,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((w,v)=>w+v.width+bo,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const w=e.columns[e.columns.length-1];w.width=w.width+(y-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=As(m,0,i.value)},updateScrollLeft(m){e.scrollLeft=As(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,w=m>y?y:m;e.bodyHeight=w},updateDimensions(m){this.updateBodyHeight(),h.data.bodyWidth=m.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const w=m.current;(!w||m.scrollTop<w.scrollTop||m.scrollTop+m.bodyHeight>w.bodyHeight+w.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-tp,bodyHeight:m.bodyHeight+tp*2},x0(wi(e.currentWindow),n.value.dataSource).then(({rows:v,dataWindow:T})=>{Rs(e.currentWindow,T)&&(e.rows=v)}))},{deep:!0,immediate:!0}),r.provide(ep,h),h}const S0={class:"command-menu__container"},E0={key:0,class:"table-body__no-data"},T0={class:"carets"},Pl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,i=k0(o),l=r.computed(()=>i.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":i.data.bodyHeight+"px"}));r.watch(i.data,O=>n("update:data",O),{deep:!0}),r.watch(o,()=>m);const d=r.ref(),p=r.ref(),h=r.ref(),m=()=>{Cr(h.value,O=>{i.updateDimensions(O.getBoundingClientRect())})},y=i.tableColumns,w=i.tableRows,{mouseDown:v}=u0(i,d);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),st(window,"resize",()=>r.nextTick(m));const T=O=>{O.preventDefault(),i.updateOffsets(O)};return(O,M)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:M[2]||(M[2]=(...V)=>r.unref(v)&&r.unref(v)(...V))},[r.createElementVNode("div",S0,[r.createVNode(m0),M[3]||(M[3]=r.createTextVNode()),r.createVNode(C0)]),M[7]||(M[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(Jv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(V,U)=>(r.openBlock(),r.createBlock(n0,{key:U,col:V,style:r.normalizeStyle(V.style),"onChange:sort":M[0]||(M[0]=k=>O.$emit("change:sort",k))},null,8,["col","style"]))),128))]),_:1})],512),M[8]||(M[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:r.normalizeStyle(c.value),onWheel:T},[l.value?(r.openBlock(),r.createElementBlock("div",E0,[r.createElementVNode("div",null,[r.createVNode(Yv),M[4]||(M[4]=r.createTextVNode()),M[5]||(M[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),M[6]||(M[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(w),(V,U)=>(r.openBlock(),r.createBlock(r0,{key:U,row:V},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.cells,k=>(r.openBlock(),r.createBlock(jv,{key:k.column.id+":"+U,cell:k,style:r.normalizeStyle(k.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),M[9]||(M[9]=r.createTextVNode()),r.createElementVNode("div",T0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(V,U)=>(r.openBlock(),r.createBlock(o0,{key:U,column:V,style:r.normalizeStyle(V.style),"onChange:sort":M[1]||(M[1]=k=>O.$emit("change:sort",k))},null,8,["column","style"]))),128))]),M[10]||(M[10]=r.createTextVNode()),r.createVNode(v0,{offset:r.unref(i).data.scrollTop,"window-size":r.unref(i).data.bodyHeight,"data-size":r.unref(i).data.dataHeight,"onChange:offset":r.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),op=new WeakMap;class N0{constructor(e,n,o){pv(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const i=e.reduce((c,d,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(d,p)+bo,c),{total:0,indices:new Map});this.dataHeight=i.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:Vs(i.indices.get(d)),height:this.resolveHeight(c,d)}));op.set(this,l)}get rows(){return op.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return e0(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<n+e})}}class V0{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+bo}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=As(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:i})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+bo),height:this.rowHeight}))}}function A0(t){return Object.freeze(t)}function B0(t){return r.h(Pl,{settings:Object.freeze(t)})}function Rl(t,e){const n=new N0(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function P0(t,e){return r.computed(()=>{const n=r.unref(t);return Rl(n,r.unref(e))})}function R0(t,e){const n=r.computed(()=>{const i=r.unref(t);return Rl(i,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(Pl,o))}const D0=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:V0,Component:Pl,factory:B0,rawDataSettings:Rl,settings:A0,useRawData:P0,useRawDataComponent:R0},Symbol.toStringTag,{value:"Module"}));function*I0(t,e){for(const n of t)yield e(n)}function F0(t){const e=[];for(const n of t)e.push(n);return e}function ip(t){return t()}function Dl(t,e){if(t==null)throw Error(e);return t}function Il(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function sp(t){return new Promise(e=>setTimeout(e,t))}function ap(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function lp(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function L0(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(lp(65,91));return e}function cp(t){return function(e){return 1-t(1-e)}}function O0(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function dp(t){const{duration:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=(d-i)/e;(p>1||l)&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function M0(t){const{getFraction:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=e(d-i);if(l)return;p>1&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function up(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function pp(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i==null||i()},e)},new Date().getTime()>o&&i()}}function $0(t){return t.map(e=>({text:String(e),value:e}))}function wr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Fl=new Map;function G0(t){return Fl.has(t)||Fl.set(t,r.ref(localStorage.getItem(t))),Dl(Fl.get(t),"...")}function z0(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function hp(t){const e=G0(t);return r.watch(e,n=>z0(t,n)),e}const Ll=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{F0(I0(Ll.values(),e=>e(t.matches?"dark":"light")))});const U0=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",fp=r.ref(U0),Ol=hp("theme");function mp(t){const e=r.computed(()=>Ol.value?Ol.value:fp.value),n=i=>{fp.value=i,t==null||t(i)};function o(){Ol.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,i=>{t==null||t(r.unref(i))}),r.onMounted(()=>{Ll.add(n)}),r.onUnmounted(()=>{Ll.delete(n)}),[e,o]}const Z0=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=mp();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:i[0]||(i[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},i[1]||(i[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),W0={key:0,class:"pl-block-page__title"},j0={class:"pl-block-page__title__default"},H0={class:"pl-block-page__title__append"},q0={key:1},K0={class:"pl-block-page__body"},Y0={name:"PlBlockPage"},X0=r.defineComponent({...Y0,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots(),n=i=>{i.removeAttribute("title"),i.clientWidth<i.scrollWidth&&i.setAttribute("title",i.innerText)},o={mounted:n,updated:n};return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:i.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",W0,[r.createElementVNode("div",j0,[r.withDirectives((r.openBlock(),r.createElementBlock("span",null,[r.renderSlot(i.$slots,"title")])),[[o]]),l[0]||(l[0]=r.createTextVNode()),r.renderSlot(i.$slots,"after-title")]),l[1]||(l[1]=r.createTextVNode()),r.createElementVNode("div",H0,[r.renderSlot(i.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",q0)),l[2]||(l[2]=r.createTextVNode()),r.createElementVNode("div",K0,[r.renderSlot(i.$slots,"default")])],2))}}),J0={name:"PlContainer"},Q0=r.defineComponent({...J0,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),ew={name:"PlRow"},tw=r.defineComponent({...ew,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{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))}}),nw={class:"pl-layout-component",style:{"flex-grow":"1"}},rw={name:"PlSpacer"},gp=r.defineComponent({...rw,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",nw))}}),ow={name:"PlGrid"},iw=r.defineComponent({...ow,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),sw={key:0,class:"pl-alert__icon"},aw={class:"pl-alert__main"},lw={key:0},cw={class:"pl-alert__main__text"},dw={name:"PlAlert"},uw=r.defineComponent({...dw,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,o)=>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",sw,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",aw,[n.label?(r.openBlock(),r.createElementBlock("label",lw,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",cw,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=i=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),pw=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
46
46
|
<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"/>
|
|
47
47
|
</svg>
|
|
48
|
-
`,
|
|
48
|
+
`,hw=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
|
|
50
50
|
<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"/>
|
|
51
51
|
</svg>
|
|
52
|
-
`,dw=["innerHTML"],uw={class:"dropdown-list-item__title-container"},pw={class:"dropdown-list-item__title text-s"},hw={key:0,class:"dropdown-list-item__description text-description"},fw={key:1,class:"dropdown-list-item__icon flex-self-start"},bo=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(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),i=r.computed(()=>e.isSelected?cw:lw);return(l,c)=>(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(o.value),innerHTML:i.value},null,10,dw)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",uw,[r.createElementVNode("div",pw,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",hw,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",fw)):r.createCommentVNode("",!0)],2))}});function bi(t,e){const n=Il(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,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})}});r.onMounted(n),st(window,"scroll",n,{capture:!0,passive:!0}),st(window,"resize",n,{passive:!0}),st(window,"adjust",n,!0)}const mw=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),gw="_icon_1ugxm_2",yw={icon:gw},_w={$style:yw},Wt=Ot(mw,[["__cssModules",_w]]),Cw=["onKeyup"],vw=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,i=n,l=r.useModel(t,"modelValue"),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(d,A=>{if(A){const S=A.getBoundingClientRect();m.optionsHeight=S.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const w=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),v=r.computed(()=>(o.options??[]).findIndex(A=>Rs(A.value,l.value))),T=r.computed(()=>vr(o.options??[]).map((A,S)=>({...A,index:S,isSelected:S===v.value,isActive:S===m.activeIndex}))),O=r.computed(()=>o.loading||o.options===void 0),M=r.computed(()=>{var A;return((A=T.value.find(S=>Rs(S.value,l.value)))==null?void 0:A.label)??(o.options===void 0?"...":"")});bi(c,A=>{const S=A.top+A.height+3;S+m.optionsHeight>A.clientHeight?y.top=A.top-m.optionsHeight-3+"px":y.top=S+"px",y.left=A.left+"px",y.width=A.width+"px"});const x=A=>{var S;l.value=A,m.open=!1,(S=c==null?void 0:c.value)==null||S.focus()};function Z(){i("click")}const V=A=>{var S,P;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;if(A.target===h.value&&A.code==="Enter"){Z();return}const{open:G,activeIndex:Y}=m;if(!G&&A.target===p.value){A.code==="Enter"&&(m.open=!0);return}A.code==="Escape"&&(m.open=!1,(S=c.value)==null||S.focus());const F=r.unref(T),{length:U}=F;if(!U)return;A.code==="Enter"&&x((P=F.find($=>$.index===Y))==null?void 0:P.value);const z=F.findIndex($=>$.index===Y)??-1,R=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,N=Math.abs(z+R+U)%U;m.activeIndex=T.value[N].index??-1},H=A=>{var S,P;const G=A.relatedTarget;!((S=c.value)!=null&&S.contains(G))&&!((P=d.value)!=null&&P.contains(G))&&(m.open=!1)};return(A,S)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:A.disabled||O.value,loading:O.value},"pl-btn-split d-flex"]),onFocusout:H,onKeydown:V},[r.createElementVNode("div",{ref_key:"buttonAction",ref:h,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:Z,onKeyup:r.withKeys(r.withModifiers(Z,["stop"]),["enter"])},r.toDisplayString(M.value),41,Cw),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:S[0]||(S[0]=P=>m.open=!m.open)},[O.value?(r.openBlock(),r.createBlock(Wt,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([w.value,"pl-btn-split__icon"])},null,2))],512),S[2]||(S[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(P,G)=>(r.openBlock(),r.createBlock(bo,{key:G,option:P,"is-selected":P.isSelected,"is-hovered":P.isActive,size:"medium",onClick:r.withModifiers(Y=>x(P.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function mp(t){function e(n){const o=n.currentTarget,i=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;i.style.width=i.style.height=`${l}px`,i.style.left=`${n.clientX-o.offsetLeft-c}px`,i.style.top=`${n.clientY-o.offsetTop-c}px`,i.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(i)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const ww={key:0},bw={inheritAttrs:!1},Is=r.defineComponent({...bw,__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(),o=r.computed(()=>e.small||e.size==="small"),i=r.computed(()=>e.large||e.size==="large");return mp(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:i.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",ww,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(Wt),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(Wt),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),xw={name:"PlBtnPrimary"},Fs=r.defineComponent({...xw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),kw={name:"PlBtnAccent"},Sw=r.defineComponent({...kw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Ew={name:"PlBtnDanger"},Tw=r.defineComponent({...Ew,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Nw={name:"PlBtnSecondary"},Ml=r.defineComponent({...Nw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Vw=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),Aw="_icon_1ugxm_2",Bw={icon:Aw},Pw={$style:Bw},ut=Ot(Vw,[["__cssModules",Pw]]),Rw={key:0},Dw={name:"PlBtnGhost"},jr=r.defineComponent({...Dw,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"),o=r.computed(()=>e.size==="large"),i=r.ref(),l=r.useSlots();return mp(i),(c,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:i,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",Rw,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(ut),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),Iw=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(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:i[0]||(i[0]=l=>n.value=!0),onMouseleave:i[1]||(i[1]=l=>n.value=!1)},[r.createVNode(Ml,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),i[2]||(i[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function Fw(t,e){const n=r.ref();return bi(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),i=r.unref(e),l=i.position??"top",c=i.gap??8;if(!o)return"";const d=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${d}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:l==="southwest"?`left: ${o.offsetX+o.width}px; top: ${o.offsetY+o.height+c}px;`:""})}function xi(t,e){return e(t)}function Ct(t,e){if(t!=null)return e(t)}function Lw(t){return Array.isArray(t)?t:[t]}function Ow(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function Ls(t,e){st(document,"click",n=>{document.contains(n.target)&&(Lw(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const Mw={},$w={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gw(t,e){return r.openBlock(),r.createElementBlock("svg",$w,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 zw=Ot(Mw,[["render",Gw]]),$l=new Map,Uw={name:"PlTooltip"},vt=r.defineComponent({...Uw,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),i=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});$l.set(o,()=>h()),r.watch(()=>l.open,M=>{requestAnimationFrame(()=>{l.tooltipOpen=M})});let c=()=>{};const d=dp(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(const[M,x]of $l.entries())M!==o&&x()},h=()=>{l.open=!1,n("tooltip:close")},m=async()=>{i.hide||(d(),l.over=!0,c(),await op(100),l.over&&p())},y=()=>{l.over=!1,c=ip(()=>{l.over||h()},i.closeDelay)};r.watch(()=>i.hide,M=>{M&&h()});const w=r.ref(),v=r.ref(),T=Fw(w,r.toRef(i));Ls([w,v],()=>h());const O=r.computed(()=>({"--pl-tooltip-max-width":i.maxWidth}));return r.onUnmounted(()=>{$l.delete(o)}),(M,x)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(M.element),r.mergeProps(M.$attrs,{ref_key:"rootRef",ref:w,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(M.$slots,"default"),x[1]||(x[1]=r.createTextVNode()),M.$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(T))},[r.createElementVNode("div",{ref_key:"tooltip",ref:v,class:r.normalizeClass(["pl-tooltip",M.position]),style:r.normalizeStyle(O.value),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(M.$slots,"tooltip")]),x[0]||(x[0]=r.createTextVNode()),r.createVNode(zw)],38)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),Zw={},Ww={class:"inner-border"};function jw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",Ww,[r.renderSlot(t.$slots,"default")])}const Hw=Ot(Zw,[["render",jw]]),qw={key:0},Kw=["tabindex","onKeydown","onClick"],Yw={key:1,class:"pl-btn-group__helper"},Xw={key:2,class:"pl-btn-group__error"},Jw={name:"PlBtnGroup"},gp=r.defineComponent({...Jw,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=d=>o("update:modelValue",d),l=t,c=r.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(r.openBlock(),r.createElementBlock("label",qw,[r.createElementVNode("span",null,r.toDisplayString(d.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(d.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Hw,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===h.value}]),tabindex:d.modelValue===h.value||d.disabled?void 0:0,onKeydown:r.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},r.toDisplayString(h.label),43,Kw))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),d.helper?(r.openBlock(),r.createElementBlock("div",Yw,r.toDisplayString(d.helper),1)):d.error?(r.openBlock(),r.createElementBlock("div",Xw,r.toDisplayString(d.error),1)):r.createCommentVNode("",!0)],2))}});function Qw(t,e){const n=r.ref(),o=r.ref(),{parse:i,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},d=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const h=i?i(p):p;!l||l(h)?t.value=h:n.value=h}catch(h){n.value=p,o.value=h instanceof Error?h.message:String(h)}}});return r.reactive({value:d,error:o,reset:c})}const eb="_component_1abv8_1",tb="_container_1abv8_15",nb="_error_1abv8_69",Gl={component:eb,container:tb,error:nb},rb={key:0},ob=["placeholder"],ib=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=Qw(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(n.maxLength&&d.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&d.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return d.trim()}}),i=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(Gl).component]),style:r.normalizeStyle(i.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(Gl).container),onClick:p[3]||(p[3]=()=>{var h;return(h=c.value)==null?void 0:h.focus()})},[d.prefix?(r.openBlock(),r.createElementBlock("span",rb,r.toDisplayString(d.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=h=>r.unref(o).value=h),placeholder:d.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...h)=>r.unref(o).reset&&r.unref(o).reset(...h),["escape"])),p[2]||(p[2]=r.withKeys(h=>{var m;return(m=h.target)==null?void 0:m.blur()},["enter"]))]},null,40,ob),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(Gl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),sb={inheritAttrs:!1},ab={class:"double-contour"};function lb(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",ab,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const wr=Ot(sb,[["render",lb]]);function yp(t){r.onMounted(t),r.onUpdated(t)}const zl=new WeakMap,Ul=new ResizeObserver(t=>{for(const e of t)Ct(zl.get(e.target),n=>n(e))});function _p(t,e){zl.set(t,e),Ul.unobserve(t),Ul.observe(t)}function Cp(t){Ul.unobserve(t),zl.delete(t)}const cb=8,vp=4;function Xn(t,e="label"){const n=new Set;yp(()=>{Ct(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(n.add(i),_p(i,()=>{const l=rp(()=>i.getBoundingClientRect().width+xi(cb,c=>Number.isNaN(c)?vp:c+vp));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>Cp(o))})}function db(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&n.push(i)}),{isValid:n.length===0,errors:n}}function wp(t,e){return r.computed(()=>db(t.value,e))}const ub=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),pb="_icon_1ugxm_2",hb={icon:pb},fb={$style:hb},Hr=Ot(ub,[["__cssModules",fb]]),mb={class:"pl-text-field__envelope"},gb={key:0,ref:"label"},yb={key:0,class:"required-icon"},_b={key:1,class:"pl-text-field__prefix"},Cb=["disabled","placeholder","type"],vb={key:0,class:"pl-text-field__error"},wb={key:1,class:"pl-text-field__helper"},bb={name:"PlTextField"},qr=r.defineComponent({...bb,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"),o=t,i=r.ref(void 0),l=r.ref(),c=r.ref(!1),d=r.reactive({cached:void 0}),p=r.computed({get(){return d.cached?d.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(A){if(d.cached=void 0,o.parse)try{n.value=o.parse(A)}catch(S){d.cached={error:S instanceof Error?S.message:String(S),value:A}}else n.value=A}}),h=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(d.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},w=wp(p,o.rules||[]),v=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),T=r.computed(()=>!v.value),O=r.computed(()=>{const A=[];return o.error&&A.push(o.error),d.cached&&A.push(d.cached.error),w.value.isValid||A.push(...w.value.errors),A}),M=r.computed(()=>O.value.length>0),x=r.computed(()=>o.clearable&&T.value&&o.type!=="password"&&!o.disabled),Z=()=>c.value=!c.value,V=()=>{d.cached=void 0},H=()=>{var A;return(A=l.value)==null?void 0:A.focus()};return Xn(i),(A,S)=>(r.openBlock(),r.createElementBlock("div",mb,[r.createElementVNode("div",{ref_key:"rootRef",ref:i,class:r.normalizeClass(["pl-text-field",{error:M.value,disabled:A.disabled,dashed:A.dashed,nonEmpty:T.value}])},[A.label?(r.openBlock(),r.createElementBlock("label",gb,[A.required?(r.openBlock(),r.createElementBlock("i",yb)):r.createCommentVNode("",!0),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(A.label),1),S[2]||(S[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),S[5]||(S[5]=r.createTextVNode()),A.prefix?(r.openBlock(),r.createElementBlock("div",_b,r.toDisplayString(A.prefix),1)):r.createCommentVNode("",!0),S[6]||(S[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":S[0]||(S[0]=P=>p.value=P),disabled:A.disabled,placeholder:A.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:V},null,40,Cb),[[r.vModelDynamic,p.value]]),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",{class:"pl-text-field__append",onClick:H},[x.value?(r.openBlock(),r.createBlock(r.unref(Hr),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:r.withModifiers(y,["stop"])})):r.createCommentVNode("",!0),S[3]||(S[3]=r.createTextVNode()),A.type==="password"?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:m.value,style:{cursor:"pointer"},onClick:r.withModifiers(Z,["stop"])},null,8,["name"])):r.createCommentVNode("",!0),S[4]||(S[4]=r.createTextVNode()),r.renderSlot(A.$slots,"append")]),S[8]||(S[8]=r.createTextVNode()),r.createVNode(wr,{class:"pl-text-field__contour"})],2),S[9]||(S[9]=r.createTextVNode()),M.value?(r.openBlock(),r.createElementBlock("div",vb,r.toDisplayString(O.value.join(" ")),1)):A.helper?(r.openBlock(),r.createElementBlock("div",wb,r.toDisplayString(A.helper),1)):r.createCommentVNode("",!0)]))}}),xb=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),kb="_icon_1ugxm_2",Sb={icon:kb},Eb={$style:Sb},Os=Ot(xb,[["__cssModules",Eb]]),Tb=["disabled","placeholder"],Nb=r.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(h){n("update:modelValue",h)}}),d=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass(["pl-search-field",[h.$style.component]])},[r.createVNode(r.unref(Os),{name:"search"}),m[1]||(m[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=y=>c.value=y),disabled:h.disabled,type:"text",placeholder:h.placeholder||"Find...",spellcheck:"false"},null,8,Tb),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),h.clearable&&d.value?(r.openBlock(),r.createBlock(r.unref(Hr),{key:0,class:r.normalizeClass(h.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),Vb="_component_pz0lo_1",Ab="_clear_pz0lo_35",Bb={component:Vb,clear:Ab},Pb={$style:Bb},bp=Ot(Nb,[["__cssModules",Pb]]),Rb={class:"ui-text-area__envelope"},Db={key:0,ref:"label"},Ib={key:0,class:"required-icon"},Fb=["readonly","rows","disabled","placeholder"],Lb={class:"ui-text-area__append"},Ob={key:0,class:"ui-text-area__error"},Mb={key:1,class:"ui-text-area__helper"},$b={name:"PlTextArea"},Gb=r.defineComponent({...$b,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(),o=e,i=t,l=r.ref(),c=r.ref(),d=r.computed({get(){return i.modelValue??""},set(v){o("update:modelValue",v)}}),p=r.computed(()=>!!i.modelValue),h=wp(d,i.rules||[]);Xn(l);const m=r.computed(()=>{const v=[];return i.error&&v.push(i.error),v.push(...h.value.errors),v}),y=r.computed(()=>m.value.length>0),w=()=>{if(!i.autogrow)return;const v=c.value;v&&(v.style.height="auto",v.style.height=`${v.scrollHeight}px`)};return r.onMounted(()=>{w()}),(v,T)=>(r.openBlock(),r.createElementBlock("div",Rb,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:v.disabled,dashed:v.dashed,nonEmpty:p.value}])},[v.label?(r.openBlock(),r.createElementBlock("label",Db,[v.required?(r.openBlock(),r.createElementBlock("i",Ib)):r.createCommentVNode("",!0),T[1]||(T[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(v.label),1),T[2]||(T[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(v.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),T[3]||(T[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":T[0]||(T[0]=O=>d.value=O),readonly:v.readonly,rows:v.rows,disabled:v.disabled,placeholder:v.placeholder??"...",spellcheck:"false",onInput:w},null,40,Fb),[[r.vModelText,d.value]]),T[4]||(T[4]=r.createTextVNode()),r.createElementVNode("div",Lb,[r.renderSlot(v.$slots,"append")]),T[5]||(T[5]=r.createTextVNode()),r.createVNode(wr,{class:"ui-text-area__contour"})],2),T[6]||(T[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(m.value.join(" ")),1)):v.helper?(r.openBlock(),r.createElementBlock("div",Mb,r.toDisplayString(v.helper),1)):r.createCommentVNode("",!0)]))}});function xp(t){return t!==null&&typeof t=="object"}function Mt(t,e){return xp(t)&&xp(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Mt(t[n],e[n])):t===e}function Zl(t,e){return t.some(n=>Mt(n,e))}const Wl=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"6bc9e89c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),i=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=cp(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function d(){const m=Dl(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){d(),l(!0)}function h(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:h},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(i.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}});function kp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n&&i>n}function Sp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n?"ceil":i>n?"floor":"visible"}function Ms(t,e,n={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=Sp(t,e);if(d==="visible")return;const p=h=>{const m=d==="floor"?c-(i-l):c;t.scrollTop=o+h*(m-o)};kp(t,e)||lp({duration:n.duration||100,timing:ap(h=>h),draw:p})}function jl(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function zb(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}const Hl=r.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(t,{expose:e}){const n=t,o=r.reactive({optionsHeight:0}),i=r.reactive({top:"0px",left:"0px",width:"0px"}),l=r.toRef(n,"root"),c=r.ref();return e({scrollIntoActive:()=>{const d=c.value;d&&_r(d.querySelector(".hovered-item"),p=>{Ms(d,p)})},listRef:c}),r.watch(c,d=>{d&&requestAnimationFrame(()=>{const p=d.getBoundingClientRect();o.optionsHeight=p.height,window.dispatchEvent(new CustomEvent("adjust"))})}),bi(l,d=>{const p=document.body.getBoundingClientRect(),h=d.top-p.top,m=d.left-p.left,y=n.gap??0,w=h+d.height+y;w+o.optionsHeight>d.clientHeight?i.top=h-o.optionsHeight-y+"px":i.top=w+"px",i.left=m+"px",i.width=d.width+"px"}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createElementVNode("div",r.mergeProps({ref_key:"listRef",ref:c},d.$attrs,{style:i,tabindex:"-1"}),[r.renderSlot(d.$slots,"default",{ref:"list"})],16)]))}}),Ub={class:"pl-dropdown__envelope"},Zb=["tabindex"],Wb={class:"pl-dropdown__container"},jb={class:"pl-dropdown__field"},Hb=["disabled","placeholder"],qb={class:"pl-dropdown__controls"},Kb={key:0},Yb={key:0,class:"required-icon"},Xb={key:0,class:"nothing-found"},Jb={key:0,class:"pl-dropdown__error"},Qb={key:1,class:"pl-dropdown__helper"},ex={key:2,class:"pl-dropdown__helper"},tx={name:"PlDropdown"},xo=r.defineComponent({...tx,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,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.useTemplateRef("overlay"),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>xi(V.value.findIndex(z=>Mt(z.value,o.modelValue)),z=>z<0?0:z),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),w=r.computed(()=>y.value?!0:o.disabled),v=r.computed(()=>(o.options??[]).findIndex(z=>Mt(z.value,o.modelValue))),T=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&v.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>vr(o.options??[]).map((z,R)=>({...z,index:R,isSelected:R===v.value,isActive:R===p.activeIndex}))),M=r.computed(()=>{const z=r.unref(O).find(R=>Mt(R.value,o.modelValue));return(z==null?void 0:z.label)||o.modelValue}),x=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(M.value):o.placeholder),Z=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),V=r.computed(()=>{const z=O.value;return p.search?z.filter(R=>{const N=p.search.toLowerCase();return R.label.toLowerCase().includes(N)||R.description&&R.description.toLowerCase().includes(N)?!0:typeof R.value=="string"?R.value.toLowerCase().includes(N):R.value===p.search}):z}),H=r.computed(()=>w.value?void 0:"0"),A=z=>{var R;n("update:modelValue",z),p.search="",p.open=!1,(R=l==null?void 0:l.value)==null||R.focus()},S=()=>n("update:modelValue",void 0),P=()=>{var z;return(z=c.value)==null?void 0:z.focus()},G=()=>p.open=!p.open,Y=()=>p.open=!0,F=z=>{var R,N,$;const j=z.relatedTarget;!((R=l.value)!=null&&R.contains(j))&&!(($=(N=d.value)==null?void 0:N.listRef)!=null&&$.contains(j))&&(p.search="",p.open=!1)},U=z=>{var R,N;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(z.code))z.preventDefault();else return;const{open:$,activeIndex:j}=p;if(!$){z.code==="Enter"&&(p.open=!0);return}z.code==="Escape"&&(p.open=!1,(R=l.value)==null||R.focus());const J=r.unref(V),{length:ne}=J;if(!ne)return;z.code==="Enter"&&A((N=J.find(Se=>Se.index===j))==null?void 0:N.value);const de=J.findIndex(Se=>Se.index===j)??-1,me=z.code==="ArrowDown"?1:z.code==="ArrowUp"?-1:0,Te=Math.abs(de+me+ne)%ne;p.activeIndex=V.value[Te].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,z=>{var R;return z?(R=c.value)==null?void 0:R.focus():""}),r.watchPostEffect(()=>{var z;p.search,p.activeIndex>=0&&p.open&&((z=d.value)==null||z.scrollIntoActive())}),(z,R)=>(r.openBlock(),r.createElementBlock("div",Ub,[r.createElementVNode("div",{ref_key:"rootRef",ref:l,tabindex:H.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:z.error,disabled:w.value}]),onKeydown:U,onFocusout:F},[r.createElementVNode("div",Wb,[r.createElementVNode("div",jb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":R[0]||(R[0]=N=>p.search=N),type:"text",tabindex:"-1",disabled:w.value,placeholder:x.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,Hb),[[r.vModelText,p.search]]),R[4]||(R[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-value",onClick:P},[r.createVNode(Wl,null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(M.value),1)]),_:1})])),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",qb,[y.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:0,name:"loading"})):r.createCommentVNode("",!0),R[1]||(R[1]=r.createTextVNode()),z.clearable&&Z.value?(r.openBlock(),r.createBlock(r.unref(Hr),{key:1,name:"delete-clear",onClick:r.withModifiers(S,["stop"])})):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.renderSlot(z.$slots,"append"),R[3]||(R[3]=r.createTextVNode()),z.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${z.arrowIconLarge}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):z.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${z.arrowIcon}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(G,["stop"])}))])]),R[9]||(R[9]=r.createTextVNode()),z.label?(r.openBlock(),r.createElementBlock("label",Kb,[z.required?(r.openBlock(),r.createElementBlock("i",Yb)):r.createCommentVNode("",!0),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(z.label),1),R[7]||(R[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[10]||(R[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.unref(Hl),{key:1,ref_key:"overlay",ref:d,root:l.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.value,(N,$)=>(r.openBlock(),r.createBlock(bo,{key:$,option:N,"is-selected":N.isSelected,"is-hovered":N.isActive,size:z.optionSize,onClick:r.withModifiers(j=>A(N.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),R[8]||(R[8]=r.createTextVNode()),V.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Xb,"Nothing found"))]),_:1},8,["root"])):r.createCommentVNode("",!0),R[11]||(R[11]=r.createTextVNode()),r.createVNode(wr,{class:"pl-dropdown__contour"})])],42,Zb),R[12]||(R[12]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",Jb,r.toDisplayString(T.value),1)):y.value&&z.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Qb,r.toDisplayString(z.loadingOptionsHelper),1)):z.helper?(r.openBlock(),r.createElementBlock("div",ex,r.toDisplayString(z.helper),1)):r.createCommentVNode("",!0)]))}}),nx={name:"PlDropdownRef"},rx=r.defineComponent({...nx,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 i;return(i=e.options)==null?void 0:i.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,l)=>(r.openBlock(),r.createBlock(r.unref(xo),r.mergeProps(e,{options:n.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function ox(t,e){return r.computed(()=>{const n=vr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const ix={class:"resizable-input"},sx=["placeholder","value","disabled"],ax=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{var d;return n.placeholder?n.placeholder:(d=n.modelValue)==null?void 0:d.replace('"',"")}),l=r.computed(()=>{const d={};return n.width&&(d.width=n.width),n.maxWidth&&(d.maxWidth=n.maxWidth),d});function c(d){o("update:modelValue",d.target.value)}return(d,p)=>(r.openBlock(),r.createElementBlock("div",ix,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(i.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(d.$attrs,{placeholder:d.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,sx)]))}}),lx={class:"dropdown-tab-item__title text-caps13"},cx=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),o=r.computed(()=>{const i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",lx,r.toDisplayString(n.value),1)],2))}}),dx={class:"pl-line-dropdown__prefix"},ux={class:"pl-line-dropdown__icon-wrapper"},px={class:"pl-line-dropdown__icon"},hx={key:0,class:"pl-line-dropdown__no-item"},fx={key:0,class:"pl-line-dropdown__no-item"},Ep=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,o=t,i=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),d=r.computed(()=>{const F=[];return i.isOpen&&F.push("open"),o.disabled&&F.push("disabled"),F.join(" ")}),p=r.ref(""),h=ox(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const F=T();if(F!==-1)return vr(o.options)[F].label}return""}),w=r.ref(y.value);r.watch(y,F=>{w.value=F});const v=r.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value||"...");Ls(l,()=>{o.mode==="list"&&(i.isOpen=!1)}),r.watch(()=>w.value,F=>{y.value!==F?p.value=F:p.value=""}),r.watch(()=>i.isOpen,F=>{var U;F&&l.value&&((U=l.value.querySelector("input"))==null||U.focus(),r.nextTick(()=>P()))}),r.watch(()=>o.modelValue,()=>O(),{immediate:!0});function T(){return o.options.findIndex(F=>Mt(F.value,o.modelValue))}function O(){i.activeOption=xi(h.value.findIndex(F=>Mt(F.value,o.modelValue)),F=>F<0?0:F)}function M(){p.value=""}function x(){o.disabled?i.isOpen=!1:r.nextTick(()=>{i.isOpen=!i.isOpen})}function Z(){o.mode==="list"&&(i.isOpen=!1)}function V(F){F&&(n("update:modelValue",F.value),Z(),M())}function H(F){return Mt(F.value,o.modelValue)}const A=F=>{var U,z;const R=F.relatedTarget;!((U=l.value)!=null&&U.contains(R))&&!((z=c.value)!=null&&z.contains(R))&&(p.value="",i.isOpen=!1)};function S(F){const{activeOption:U}=i;if(!i.isOpen&&F.code==="Enter"){i.isOpen=!0;return}const{length:z}=h.value;if(!z)return;["ArrowDown","ArrowUp","Enter"].includes(F.code)&&F.preventDefault(),F.code==="Enter"&&V(h.value[U]);const R=F.code==="ArrowDown"?1:F.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(U+R+z)%z,requestAnimationFrame(P)}function P(){const F=c.value;F&&Ct(F.querySelector(".hovered-item"),U=>{o.mode==="list"?Ms(F,U):U.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function G(){n("update:modelValue",void 0)}const Y=r.reactive({top:"0px",left:"0px"});return r.watch(c,F=>{if(F){const U=F.getBoundingClientRect();i.optionsHeight=U.height,window.dispatchEvent(new CustomEvent("adjust"))}}),bi(l,F=>{const U=F.top+F.height+2;U+i.optionsHeight>F.clientHeight?Y.top=F.top-i.optionsHeight-2+"px":Y.top=U+"px",Y.left=F.left+"px"}),(F,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:S,onFocusout:A,onClick:x},[r.createElementVNode("div",dx,r.toDisplayString(o==null?void 0:o.prefix),1),U[6]||(U[6]=r.createTextVNode()),r.createVNode(ax,{modelValue:w.value,"onUpdate:modelValue":U[0]||(U[0]=z=>w.value=z),placeholder:v.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),U[7]||(U[7]=r.createTextVNode()),r.createElementVNode("div",ux,[r.withDirectives(r.createElementVNode("div",px,null,512),[[r.vShow,!m.value]]),U[1]||(U[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:G},null,512),[[r.vShow,m.value]])]),U[8]||(U[8]=r.createTextVNode()),i.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(z,R)=>r.renderSlot(F.$slots,"item",{key:R,item:z,textItem:"text",isSelected:H(z),isHovered:i.activeOption==R,onClick:r.withModifiers(N=>V(z),["stop"])},()=>[r.createVNode(bo,{option:z,"text-item":"text","is-selected":H(z),"is-hovered":i.activeOption==R,size:"medium",onClick:r.withModifiers(N=>V(z),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),U[3]||(U[3]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",hx,U[2]||(U[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(z,R)=>r.renderSlot(F.$slots,"item",{key:R,item:z,isSelected:H(z),isHovered:i.activeOption==R,onClick:r.withModifiers(N=>V(z),["stop"])},()=>[r.createVNode(cx,{option:z,"is-selected":H(z),"is-hovered":i.activeOption==R,onClick:r.withModifiers(N=>V(z),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),U[5]||(U[5]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",fx,U[4]||(U[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))}}),mx={class:"ui-dropdown__envelope"},gx=["tabindex"],yx={class:"ui-dropdown__container"},_x={class:"ui-dropdown__field"},Cx=["disabled","placeholder"],vx={class:"ui-dropdown__controls"},wx={key:0},bx={key:0,class:"required-icon"},xx={key:0,class:"nothing-found"},kx={key:0,class:"ui-dropdown__error"},Sx={key:1,class:"ui-dropdown__helper"},Ex={key:2,class:"ui-dropdown__helper"},Tx={name:"PlDropdown"},Nx=r.defineComponent({...Tx,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,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),h=()=>xi(V.value.findIndex(R=>Mt(R.value,o.modelValue)),R=>R<0?0:R),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),w=r.computed(()=>y.value?!0:o.disabled),v=r.computed(()=>(o.options??[]).findIndex(R=>Mt(R.value,o.modelValue))),T=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&v.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>vr(o.options??[]).map((R,N)=>({...R,index:N,isSelected:N===v.value,isActive:N===p.activeIndex}))),M=r.computed(()=>{const R=r.unref(O).find(N=>Mt(N.value,o.modelValue));return(R==null?void 0:R.label)||o.modelValue}),x=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(M.value):o.placeholder),Z=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),V=r.computed(()=>{const R=O.value;return p.search?R.filter(N=>{const $=p.search.toLowerCase();return N.label.toLowerCase().includes($)||N.description&&N.description.toLowerCase().includes($)?!0:typeof N.value=="string"?N.value.toLowerCase().includes($):N.value===p.search}):R}),H=r.computed(()=>w.value?void 0:"0"),A=R=>{var N;n("update:modelValue",R),p.search="",p.open=!1,(N=l==null?void 0:l.value)==null||N.focus()},S=()=>n("update:modelValue",void 0),P=()=>{var R;return(R=d.value)==null?void 0:R.focus()},G=()=>p.open=!p.open,Y=()=>p.open=!0,F=R=>{var N;(N=l==null?void 0:l.value)!=null&&N.contains(R.relatedTarget)||(p.search="",p.open=!1)},U=()=>{const R=c.value;R&&Ct(R.querySelector(".hovered-item"),N=>{Ms(R,N)})},z=R=>{var N,$;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(R.code))R.preventDefault();else return;const{open:j,activeIndex:J}=p;if(!j){R.code==="Enter"&&(p.open=!0);return}R.code==="Escape"&&(p.open=!1,(N=l.value)==null||N.focus());const ne=r.unref(V),{length:de}=ne;if(!de)return;R.code==="Enter"&&A(($=ne.find(je=>je.index===J))==null?void 0:$.value);const me=ne.findIndex(je=>je.index===J)??-1,Te=R.code==="ArrowDown"?1:R.code==="ArrowUp"?-1:0,Se=Math.abs(me+Te+de)%de;p.activeIndex=V.value[Se].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,R=>{var N;return R?(N=d.value)==null?void 0:N.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&U()}),(R,N)=>(r.openBlock(),r.createElementBlock("div",mx,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:H.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:R.error,disabled:w.value}]),onKeydown:z,onFocusout:F},[r.createElementVNode("div",yx,[r.createElementVNode("div",_x,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":N[0]||(N[0]=$=>p.search=$),type:"text",tabindex:"-1",disabled:w.value,placeholder:x.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,Cx),[[r.vModelText,p.search]]),N[4]||(N[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:P},[r.createVNode(Wl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(M.value),1)]),_:1})])),N[5]||(N[5]=r.createTextVNode()),r.createElementVNode("div",vx,[y.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:0,name:"loading"})):r.createCommentVNode("",!0),N[1]||(N[1]=r.createTextVNode()),R.clearable&&Z.value?(r.openBlock(),r.createBlock(r.unref(Hr),{key:1,name:"delete-clear",onClick:r.withModifiers(S,["stop"])})):r.createCommentVNode("",!0),N[2]||(N[2]=r.createTextVNode()),r.renderSlot(R.$slots,"append"),N[3]||(N[3]=r.createTextVNode()),R.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${R.arrowIconLarge}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):R.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${R.arrowIcon}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(G,["stop"])}))])]),N[9]||(N[9]=r.createTextVNode()),R.label?(r.openBlock(),r.createElementBlock("label",wx,[R.required?(r.openBlock(),r.createElementBlock("i",bx)):r.createCommentVNode("",!0),N[6]||(N[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(R.label),1),N[7]||(N[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(R.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),N[10]||(N[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.value,($,j)=>(r.openBlock(),r.createBlock(bo,{key:j,option:$,"is-selected":$.isSelected,"is-hovered":$.isActive,size:R.optionSize,onClick:r.withModifiers(J=>A($.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),N[8]||(N[8]=r.createTextVNode()),V.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",xx,"Nothing found"))],512)):r.createCommentVNode("",!0),N[11]||(N[11]=r.createTextVNode()),r.createVNode(wr,{class:"ui-dropdown__contour"})])],42,gx),N[12]||(N[12]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",kx,r.toDisplayString(T.value),1)):y.value&&R.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Sx,r.toDisplayString(R.loadingOptionsHelper),1)):R.helper?(r.openBlock(),r.createElementBlock("div",Ex,r.toDisplayString(R.helper),1)):r.createCommentVNode("",!0)]))}}),Vx={key:0,class:"ui-progress-bar"},Ax={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},Bx={class:"ui-progress-bar__message flex-grow-1"},Px={class:"ui-progress-bar__percent"},Rx=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(o,i)=>o.loading?(r.openBlock(),r.createElementBlock("div",Vx,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",Ax,[r.createElementVNode("div",Bx,r.toDisplayString(n.value),1),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",Px,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),Dx={class:"mi-number-field__main-wrapper d-flex"},Ix={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},Fx={key:0,class:"text-description"},Lx=["disabled","placeholder"],Ox={class:"mi-number-field__icons d-flex-column"},Mx={key:0,class:"mi-number-field__hint text-description"},$x=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,o=e,i=r.ref(),l=r.useSlots(),c=r.ref();Xn(i);const d=r.ref(!0),p=r.computed({get(){return d.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(x){var Z;x=x.replace(/,/g,""),w(x)?(o("update:modelValue",+x),x.toString()!==((Z=n.modelValue)==null?void 0:Z.toString())&&+x===n.modelValue&&x[x.length-1]!=="."&&(d.value=!1,r.nextTick(()=>{d.value=!0}))):(x.trim()===""&&o("update:modelValue",void 0),d.value=!1,r.nextTick(()=>{d.value=!0}))}}),h=r.computed(()=>{let x=[];return n.errorMessage&&x.push(n.errorMessage),w(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&x.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&x.push(`Model value must be less than ${n.maxValue}`)):x.push("Model value is not a number."),x=[...x],x.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function w(x){return x!==void 0?(x=x==null?void 0:x.toString(),!isNaN(+x)&&!isNaN(parseFloat(x))):!1}function v(){if(!m.value){let x=0;n.modelValue===void 0?x=n.minValue?n.minValue:0:x=+(n.modelValue||0)+n.step,p.value=x.toString()}}function T(){if(!y.value){let x=0;n.modelValue===void 0?x=0:x=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,x).toString():x.toString()}}function O(x){["ArrowDown","ArrowUp"].includes(x.code)&&x.preventDefault(),x.code==="ArrowUp"?v():x.code==="ArrowDown"&&T()}const M=x=>{x.detail>1&&x.preventDefault()};return(x,Z)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass([{error:!!h.value.trim(),disabled:x.disabled},"mi-number-field d-flex-column"]),onMousedown:M,onKeydown:Z[1]||(Z[1]=V=>O(V))},[r.createElementVNode("div",Dx,[r.createVNode(wr,{class:"mi-number-field__contour"}),Z[6]||(Z[6]=r.createTextVNode()),r.createElementVNode("div",Ix,[x.label?(r.openBlock(),r.createElementBlock("label",Fx,[r.createTextVNode(r.toDisplayString(x.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(x.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Z[2]||(Z[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":Z[0]||(Z[0]=V=>p.value=V),disabled:x.disabled,placeholder:x.placeholder,class:"text-s flex-grow"},null,8,Lx),[[r.vModelText,p.value]])]),Z[7]||(Z[7]=r.createTextVNode()),r.createElementVNode("div",Ox,[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:v},Z[3]||(Z[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),Z[5]||(Z[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:T},Z[4]||(Z[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)])]),Z[8]||(Z[8]=r.createTextVNode()),h.value.trim()?(r.openBlock(),r.createElementBlock("div",Mx,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],34))}}),Gx={class:"pl-chip__text"},ql=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 o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(vt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[i[4]||(i[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",Gx,[r.renderSlot(o.$slots,"default")]),i[3]||(i[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},i[2]||(i[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(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),zx={class:"pl-dropdown-multi__envelope"},Ux=["tabindex"],Zx={class:"pl-dropdown-multi__container"},Wx={class:"pl-dropdown-multi__field"},jx=["disabled","placeholder"],Hx={class:"pl-dropdown-multi__append"},qx={key:0},Kx={key:0,class:"required-icon"},Yx={class:"pl-dropdown-multi__open-chips-container"},Xx={key:0,class:"nothing-found"},Jx={key:0,class:"pl-dropdown-multi__error"},Qx={key:1,class:"pl-dropdown-multi__helper"},ek={name:"PlDropdownMulti"},tk=r.defineComponent({...ek,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,o=S=>n("update:modelValue",S),i=r.useSlots(),l=t,c=r.ref(),d=r.ref(),p=r.useTemplateRef("overlay"),h=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>h.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),w=r.computed(()=>vr(l.options).filter(S=>Zl(m.value,S.value))),v=r.computed(()=>{const S=r.unref(m),P=vr(l.options);return(h.search?P.filter(G=>{const Y=h.search.toLowerCase();return G.label.toLowerCase().includes(Y)?!0:typeof G.value=="string"?G.value.toLowerCase().includes(Y):G.value===h.search}):[...P]).map(G=>({...G,selected:Zl(S,G.value)}))}),T=r.computed(()=>l.disabled?void 0:"0"),O=()=>{h.activeOption=xi(v.value.findIndex(S=>Mt(S.value,l.modelValue)),S=>S<0?0:S)},M=S=>{var P;const G=r.unref(m);o(Zl(G,S)?G.filter(Y=>!Mt(Y,S)):[...G,S]),h.search="",(P=c==null?void 0:c.value)==null||P.focus()},x=S=>o(r.unref(m).filter(P=>!Mt(P,S))),Z=()=>{var S;return(S=d.value)==null?void 0:S.focus()},V=()=>h.open=!h.open,H=S=>{var P,G,Y,F;const U=S.relatedTarget;console.log(">>>> overlay.value?.$el",(P=p.value)==null?void 0:P.$el),!((G=c.value)!=null&&G.contains(U))&&!((F=(Y=p.value)==null?void 0:Y.listRef)!=null&&F.contains(U))&&(h.search="",h.open=!1)},A=S=>{var P;const{open:G,activeOption:Y}=h;if(!G){S.code==="Enter"&&(h.open=!0);return}S.code==="Escape"&&(h.open=!1,(P=c.value)==null||P.focus());const F=r.unref(v),{length:U}=F;if(!U)return;["ArrowDown","ArrowUp","Enter"].includes(S.code)&&S.preventDefault(),S.code==="Enter"&&M(F[Y].value);const z=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(Y+z+U)%U,requestAnimationFrame(()=>{var R;return(R=p.value)==null?void 0:R.scrollIntoActive()})};return Xn(c),r.watch(()=>l.modelValue,()=>O(),{immediate:!0}),r.watchPostEffect(()=>{var S;h.search,h.open&&((S=p.value)==null||S.scrollIntoActive())}),(S,P)=>(r.openBlock(),r.createElementBlock("div",zx,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:T.value,class:r.normalizeClass(["pl-dropdown-multi",{open:h.open,error:S.error,disabled:S.disabled}]),onKeydown:A,onFocusout:H},[r.createElementVNode("div",Zx,[r.createElementVNode("div",Wx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":P[0]||(P[0]=G=>h.search=G),type:"text",tabindex:"-1",disabled:S.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:P[1]||(P[1]=G=>h.open=!0)},null,40,jx),[[r.vModelText,h.search]]),P[3]||(P[3]=r.createTextVNode()),h.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:Z},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(G,Y)=>(r.openBlock(),r.createBlock(r.unref(ql),{key:Y,closeable:"",small:"",onClick:P[2]||(P[2]=r.withModifiers(F=>h.open=!0,["stop"])),onClose:F=>x(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))])),P[4]||(P[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(V,["stop"])}),P[5]||(P[5]=r.createTextVNode()),r.createElementVNode("div",Hx,[r.renderSlot(S.$slots,"append")])]),P[10]||(P[10]=r.createTextVNode()),S.label?(r.openBlock(),r.createElementBlock("label",qx,[S.required?(r.openBlock(),r.createElementBlock("i",Kx)):r.createCommentVNode("",!0),P[6]||(P[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(S.label),1),P[7]||(P[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),P[11]||(P[11]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(Hl,{key:1,ref_key:"overlay",ref:p,root:c.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:H},{default:r.withCtx(()=>[r.createElementVNode("div",Yx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(G,Y)=>(r.openBlock(),r.createBlock(r.unref(ql),{key:Y,closeable:"",small:"",onClose:F=>x(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))]),P[8]||(P[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,(G,Y)=>(r.openBlock(),r.createBlock(bo,{key:Y,option:G,"text-item":"text","is-selected":G.selected,"is-hovered":h.activeOption==Y,size:"medium","use-checkbox":"",onClick:r.withModifiers(F=>M(G.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),P[9]||(P[9]=r.createTextVNode()),v.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Xx,"Nothing found"))]),_:1},8,["root"])):r.createCommentVNode("",!0),P[12]||(P[12]=r.createTextVNode()),r.createVNode(wr,{class:"pl-dropdown-multi__contour"})])],42,Ux),P[13]||(P[13]=r.createTextVNode()),S.error?(r.openBlock(),r.createElementBlock("div",Jx,r.toDisplayString(S.error),1)):S.helper?(r.openBlock(),r.createElementBlock("div",Qx,r.toDisplayString(S.helper),1)):r.createCommentVNode("",!0)]))}}),Kl=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(o,i)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),nk={name:"PlCheckbox"},rk=r.defineComponent({...nk,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,i)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode(Kl,r.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=l=>o.$emit("update:modelValue",l))}),null,16),i[3]||(i[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:i[1]||(i[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock(Kl,r.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),ok={key:0},ik=["onClick"],sk={name:"PlCheckboxGroup"},ak=r.defineComponent({...sk,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=c=>o.modelValue.includes(c),l=c=>{const d=o.modelValue??[];n("update:modelValue",i(c)?d.filter(p=>p!==c):[...d,c])};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",ok,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,h)=>(r.openBlock(),r.createElementBlock("div",{key:h},[r.createVNode(Kl,{disabled:c.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),d[0]||(d[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,ik)]))),128))],2))}}),lk="_component_tupwt_1",ck={component:lk},dk={};function uk(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 pk={$style:ck},Tp=Ot(dk,[["render",uk],["__cssModules",pk]]),hk={key:1,class:"pl-dialog-modal__title"},fk={inheritAttrs:!1},Yl=r.defineComponent({...fk,__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},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.ref(),c=r.useAttrs();function d(p){l.value&&i.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return st(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:d},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock(Tp,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",hk,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),h[2]||(h[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),h[3]||(h[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),mk=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),gk={key:0,class:"pl-slide-modal__title"},yk={class:"pl-slide-modal__content"},_k={key:1,class:"pl-slide-modal__actions"},Ck={name:"PlSlideModal",inheritAttrs:!1},$s=r.defineComponent({...Ck,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(),o=e,i=t,l=r.ref(),c=r.useAttrs();return Ls(l,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),st(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(mk,null,{default:r.withCtx(()=>[d.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",gk,[r.renderSlot(d.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",yk,[r.renderSlot(d.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",_k,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),d.modelValue&&d.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),vk={key:0,class:"label"},wk={name:"PlToggleSwitch"},Gs=r.defineComponent({...wk,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]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>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",vk,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Np(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function bk(t){return r.unref(t)}const xk=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function kk(t,e,n={}){const{immediate:o=!0}=n,i=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){i.value=!1,c()}function p(...h){c(),i.value=!0,l=setTimeout(()=>{i.value=!1,l=null,t(...h)},bk(e))}return o&&(i.value=!0,xk&&p()),Np(d),{isPending:r.readonly(i),start:p,stop:d}}function Sk(t,e,n){return r.watch(t,(o,i,l)=>{o&&e(o,i,l)},{...n,once:!1})}function Ek(t,e,n){const{start:o}=kk(l,e,{immediate:!1}),i=r.ref(!1);async function l(){i.value&&(await t(),o())}function c(){i.value||(i.value=!0,l())}function d(){i.value=!1}return n!=null&&n.immediate&&c(),Np(d),{isActive:i,pause:d,resume:c}}const Tk="[==PROGRESS==]";function Nk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vk(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const d=t.mockPlatforma??window.platforma;if(!d){console.warn("Platforma API is not available");return}for(;;){const p=await d.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const h=t.progressPrefix??Tk,m=new TextDecoder().decode(p.data).replace(new RegExp(`${Nk(h)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=Ek(()=>o().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 Sk(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>i.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,i.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,i.resume())},{immediate:!0}),e}const Ak={key:0},Bk={class:"pl-log-view__copy"},Pk={key:1,class:"pl-log-view__error"},Rk={name:"PlLogView"},Vp=r.defineComponent({...Rk,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=T=>{if(T&&T.ok===!1)return T.errors.join(`
|
|
53
|
-
`)},n=t,o=Vk(n),i=r.ref(!0),l=r.ref(),c=r.ref(),d=r.computed(()=>{var T;return((T=o.value)==null?void 0:T.error)??n.error??e(n.output)}),p=r.computed(()=>{var T;return((T=o.value)==null?void 0:T.lines)??n.value??pv(n.output)}),h=r.ref(!1);Xn(c);const m=r.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},w=()=>{_r(l.value,T=>{i.value&&T.scrollTo(T.scrollLeft,T.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{w()})},{immediate:!0});const v=T=>{const O=T.target;i.value=O.scrollTop+20>=O.scrollHeight-O.offsetHeight};return(T,O)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":d.value}])},[T.label?(r.openBlock(),r.createElementBlock("label",Ak,r.toDisplayString(T.label),1)):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),r.createVNode(wr,{class:"pl-log-view__contour"}),O[2]||(O[2]=r.createTextVNode()),r.createElementVNode("div",Bk,[r.createVNode(r.unref(vt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(h.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(ut),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),O[0]||(O[0]=r.createTextVNode())]),_:1})]),O[3]||(O[3]=r.createTextVNode()),d.value?(r.openBlock(),r.createElementBlock("div",Pk,r.toDisplayString(d.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:v},r.toDisplayString(p.value),545))],2))}}),Dk="_component_1ukal_1",Ik="_tab_1ukal_14",Fk="_disabled_1ukal_27",Lk="_active_1ukal_56",Ok="_topLine_1ukal_69",ko={component:Dk,tab:Ik,disabled:Fk,active:Lk,topLine:Ok},Mk=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const i=o.$el.querySelector("span");i&&requestAnimationFrame(()=>{i.offsetWidth<i.scrollWidth&&(n.isOverflown=!0)})}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(vt),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),i[0]||(i[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),$k={name:"PlTabs"},Gk=r.defineComponent({...$k,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i=>n("update:modelValue",i);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(ko).component,{[r.unref(ko).disabled]:i.disabled,[r.unref(ko).topLine]:i.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createBlock(Mk,{key:d,tabindex:i.modelValue===c.value||i.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(ko).active]:i.modelValue===c.value,[r.unref(ko).disabled]:c.disabled},r.unref(ko).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??i.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(i.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),zk=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),Uk="_compact_rhd5u_16",Zk="_content_rhd5u_20",Wk={compact:Uk,content:Zk},jk={$style:Wk},Ap=Ot(zk,[["__cssModules",jk]]),Hk=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),i[0]||(i[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),qk=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Kk=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),i=qu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===i:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===i?"":i)}});return(d,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Ap),{class:r.normalizeClass(d.$style.separator),compact:d.compact,onClick:p[0]||(p[0]=h=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(Wt),{name:"chevron-right",class:r.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(qk,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.$style.content)},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Yk="_content_jmjfk_2",Xk="_separator_jmjfk_14",Jk="_chevron_jmjfk_19",Qk="_down_jmjfk_23",eS={content:Yk,separator:Xk,chevron:Jk,down:Qk},tS={$style:eS},nS=Ot(Kk,[["__cssModules",tS]]),Bp=r.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(t){const e=r.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(n,o)=>n.type?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},n.$attrs,{class:[{[n.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[r.renderSlot(n.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(e.typeToText[n.type]),1)])],16)):r.createCommentVNode("",!0)}}),rS="_component_1ietr_1",oS="_local_1ietr_1",iS="_supported_1ietr_26",sS="_remote_1ietr_32",aS="_search_1ietr_40",lS="_selected_1ietr_72",cS="_breadcrumbs_1ietr_86",dS="_cat_1ietr_116",uS="_message_1ietr_122",pS="_isFile_1ietr_197",hS="_isDir_1ietr_201",fS="_canBeSelected_1ietr_207",mS="_spin_1ietr_1",ct={component:rS,local:oS,supported:iS,remote:sS,search:aS,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:lS,breadcrumbs:cS,"ls-error":"_ls-error_1ietr_108",cat:dS,message:uS,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:pS,isDir:hS,canBeSelected:fS,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:mS},gS=r.defineComponent({__name:"Shortcuts",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(r.unref(vt),{class:"info",position:"southwest","max-width":"420px"},{tooltip:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass(e.$style.title)},"Shortcuts",2),n[2]||(n[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([e.$style.row,e.$style.head])},n[0]||(n[0]=[r.createElementVNode("div",null,null,-1),r.createTextVNode(),r.createElementVNode("div",null,"MacOS",-1),r.createTextVNode(),r.createElementVNode("div",null,"Windows/Linux",-1)]),2),n[3]||(n[3]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([e.$style.row,e.$style.body])},n[1]||(n[1]=[r.createElementVNode("div",null,"Single File",-1),r.createTextVNode(),r.createElementVNode("div",null,"Click the file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Click the file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Adjacent multiple files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Shift, click first and last files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Shift, click first and last files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Non-adjacent multiple files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Ctrl, click each file",-1),r.createTextVNode(),r.createElementVNode("div",null,"All files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Press Command (⌘) + A",-1),r.createTextVNode(),r.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),yS="_title_14dct_2",_S="_row_14dct_10",CS="_head_14dct_30",vS="_body_14dct_58",wS={title:yS,row:_S,head:CS,body:vS},bS={$style:wS},xS=Ot(gS,[["__cssModules",bS]]),Pp=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function kS(t){return r.computed(()=>{let e=t.items;if(t.showHiddenItems||(e=e.filter(n=>!n.name.startsWith("."))),t.search){const n=t.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(n))}return e})}const Rp={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function Dp(t){return t?t.map(e=>"."+mv(e,["."])):void 0}function SS(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(i=>i!=="").join("/")});return n}const ES=["title","onClick"],TS={key:0,class:"ls-loader"},NS=["onClick"],VS=["title"],AS=["onClick"],BS=["title"],PS=r.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(t,{expose:e}){const n=A=>A.ctrlKey||A.metaKey,o=t,i=r.reactive(Pp()),l=()=>{i.search="",i.error="",i.lastSelected=void 0},c=r.computed(()=>Dp(o.extensions)),d=kS(i),p=r.computed(()=>{var A;return{modelValue:o.modelValue,dirPath:i.dirPath,storageHandle:(A=i.storageEntry)==null?void 0:A.handle}}),h=(A,S)=>{window.platforma&&i.currentLoadingPath!==S&&(i.currentLoadingPath=S,window.platforma.lsDriver.listFiles(A,S).then(P=>{S===i.dirPath&&(i.items=Vs(P).entries.map(G=>({path:G.fullPath,name:G.name,isDir:G.type==="dir",canBeSelected:G.type==="file"&&(!c.value||c.value.some(Y=>G.fullPath.endsWith(Y))),handle:G.type==="file"?G.handle:void 0,selected:!1})).sort((G,Y)=>G.isDir&&!Y.isDir?-1:!G.isDir&&Y.isDir?1:G.name.localeCompare(Y.name)).map((G,Y)=>({id:Y,...G})),i.lastSelected=void 0)}).catch(P=>i.error=String(P)).finally(()=>{i.currentLoadingPath=void 0}))},m=()=>{l();const{storageHandle:A,dirPath:S,modelValue:P}=p.value;A&&P&&h(A,S)},y=r.computed(()=>SS(i.dirPath)),w=r.computed(()=>i.items.filter(A=>A.canBeSelected&&A.selected&&!A.isDir)),v=r.computed(()=>{var A;return w.value.length>0&&((A=i.storageEntry)==null?void 0:A.handle)}),T=()=>{var A;return{storageHandle:Vs((A=i.storageEntry)==null?void 0:A.handle),files:w.value.map(S=>S.handle)}},O=A=>{i.dirPath=A},M=(A,S)=>{const{shiftKey:P}=A,G=n(A),{lastSelected:Y}=i;if(A.preventDefault(),S.canBeSelected){if(o.multi||i.items.forEach(F=>F.selected=!1),S.selected=!S.selected,!o.multi)return;!G&&!P&&i.items.forEach(F=>{F.id!==S.id&&(F.selected=!1)}),P&&Y!==void 0&&i.items.forEach(F=>{cv(F.id,Y,S.id)&&(F.selected=!0)}),S.selected&&(i.lastSelected=S.id)}},x=A=>{A&&!o.multi||i.items.filter(S=>S.canBeSelected).forEach(S=>{S.selected=A})},Z=()=>x(!0),V=()=>x(!1),H=()=>{if(l(),V(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(A=>{A=A.filter(S=>S.name!=="local"&&!S.name.startsWith("local_disk_")),i.storageOptions=A.map(S=>({text:S.name,value:S})),o.autoSelectStorage&&_r(A[0],S=>{i.storageEntry=S})}).catch(A=>i.error=String(A))};return r.watch(r.toRef(i,"storageEntry"),A=>{l(),i.dirPath=(A==null?void 0:A.initialFullPath)??""},{immediate:!0}),r.watch([()=>i.dirPath,()=>i.storageEntry],()=>{m()}),r.watch(()=>o.modelValue,A=>{A?H():Object.assign(i,Pp())},{immediate:!0}),st(document,"keydown",A=>{if(!o.modelValue||A.target!==document.body)return;const S=n(A);S&&A.code==="KeyA"&&(A.preventDefault(),Z()),S&&A.shiftKey&&A.code==="Period"&&(A.preventDefault(),i.showHiddenItems=!i.showHiddenItems),A.code==="Enter"&&o.submit()}),e({isReady:v,getFilesToImport:T}),r.onMounted(H),(A,S)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).remote),onClick:r.withModifiers(V,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(xo),{modelValue:i.storageEntry,"onUpdate:modelValue":S[0]||(S[0]=P=>i.storageEntry=P),label:"Select storage",options:i.storageOptions},null,8,["modelValue","options"])]),S[2]||(S[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(bp),{modelValue:i.search,"onUpdate:modelValue":S[1]||(S[1]=P=>i.search=P),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),S[12]||(S[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(P,G)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:G},[r.createElementVNode("div",{title:P.path,onClick:Y=>O(P.path)},r.toDisplayString(P.name),9,ES),S[3]||(S[3]=r.createTextVNode()),P.index!==y.value.length-1?(r.openBlock(),r.createBlock(r.unref(Hr),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),S[5]||(S[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).selected)},[r.createElementVNode("span",null,"Selected: "+r.toDisplayString(w.value.length),1),S[4]||(S[4]=r.createTextVNode()),r.createVNode(xS)],2)],2),S[11]||(S[11]=r.createTextVNode()),i.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",TS,S[6]||(S[6]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):i.storageEntry?i.error?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(r.unref(ct)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),S[8]||(S[8]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},r.toDisplayString(i.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(ct)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d),P=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:P.id},[P.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(ct).isDir),onClick:G=>O(P.path)},[r.createVNode(r.unref(Hr),{name:"chevron-right"}),S[9]||(S[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:P.name},[r.createTextVNode(r.toDisplayString(P.name),1)],8,VS)),[[r.unref(Rp)]])],10,NS)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(ct).canBeSelected]:P.canBeSelected,[r.unref(ct).selected]:P.selected}),onClick:r.withModifiers(G=>M(G,P),["stop"])},[r.createVNode(r.unref(Wt),{name:"box",class:r.normalizeClass(r.unref(ct).isFile)},null,8,["class"]),S[10]||(S[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:P.name},[r.createTextVNode(r.toDisplayString(P.name),1)],8,BS)),[[r.unref(Rp)]])],10,AS))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(ct)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},"Select storage to preview",2)],2))],2)],2))}}),RS={key:1,class:"alert-error"},DS=r.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(t){const e=t,n=r.reactive({error:void 0}),o=r.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),i=async c=>{var d,p,h;const m=(p=(d=window.platforma)==null?void 0:d.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=Dp(e.extensions),w=await Promise.all([...((h=c.dataTransfer)==null?void 0:h.files)??[]].filter(v=>!!v).filter(v=>y?y.some(T=>v.name.endsWith(T)):!0).map(v=>m(v)));w.length&&e.importFiles({files:w})},l=async()=>{var c,d;const p=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=window.platforma)==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:p}).then(({files:h})=>{h&&e.importFiles({files:h})}).catch(h=>n.error=h):(d=window.platforma)==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:h})=>{h&&e.importFiles({files:[h]})}).catch(h=>n.error=h)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).local),onDrop:i,onDragover:d[0]||(d[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(Os),{name:"cloud-upload"}),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),d[2]||(d[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(ct).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),d[3]||(d[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",RS,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),IS={style:{margin:"0 24px"}},Ip=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,i=r.ref("local"),l=r.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],d=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),h=()=>{var y,w;(y=p.value)!=null&&y.isReady&&(n("import:files",Vs((w=p.value)==null?void 0:w.getFilesToImport())),d())},m=y=>{n("import:files",y),d()};return(y,w)=>(r.openBlock(),r.createBlock(r.unref(Yl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(ct).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[w[4]||(w[4]=r.createTextVNode()),r.createElementVNode("div",IS,[r.createVNode(r.unref(gp),{modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=v=>i.value=v),options:c},null,8,["modelValue"])]),w[5]||(w[5]=r.createTextVNode()),i.value==="remote"?(r.openBlock(),r.createBlock(PS,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:h}),null,16)):r.createCommentVNode("",!0),w[6]||(w[6]=r.createTextVNode()),i.value==="local"?(r.openBlock(),r.createBlock(DS,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),w[7]||(w[7]=r.createTextVNode())]),_:2},[i.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var v;return[r.createVNode(r.unref(Fs),{style:{"min-width":"160px"},disabled:!((v=r.unref(p))!=null&&v.isReady),onClick:r.withModifiers(h,["stop"])},{default:r.withCtx(()=>w[1]||(w[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),w[3]||(w[3]=r.createTextVNode()),r.createVNode(r.unref(jr),{"justify-center":!1,onClick:r.withModifiers(d,["stop"])},{default:r.withCtx(()=>w[2]||(w[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var Ge;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var Xl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Xl||(Xl={}));const le=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),br=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},te=Ge.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"]),FS=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class jt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};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},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const So=(t,e)=>{let n;switch(t.code){case te.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ge.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case te.invalid_union:n="Invalid input";break;case te.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case te.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:n="Invalid function arguments";break;case te.invalid_return_type:n="Invalid function return type";break;case te.invalid_date:n="Invalid date";break;case te.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}"`:Ge.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case te.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 te.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 te.custom:n="Invalid input";break;case te.invalid_intersection_types:n="Intersection results could not be merged";break;case te.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ge.assertNever(t)}return{message:n}};let Fp=So;function LS(t){Fp=t}function zs(){return Fp}const Us=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},OS=[];function se(t,e){const n=zs(),o=Us({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===So?void 0:So].filter(i=>!!i)});t.common.issues.push(o)}class kt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return kt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return xe;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const xe=Object.freeze({status:"aborted"}),Zs=t=>({status:"dirty",value:t}),At=t=>({status:"valid",value:t}),Jl=t=>t.status==="aborted",Ql=t=>t.status==="dirty",ki=t=>t.status==="valid",Si=t=>typeof Promise<"u"&&t instanceof Promise;function Ws(t,e,n,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 Lp(t,e,n,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,n),n}var fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));var Ei,Ti;class Mn{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,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 Op=(t,e)=>{if(ki(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 jt(t.common.issues);return this._error=n,this._error}}};function Ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||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:(l,c)=>{var d,p;const{message:h}=t;return l.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=h??n)!==null&&p!==void 0?p:c.defaultError}},description:i}}class Re{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 br(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:br(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Si(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 o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:br(e)},l=this._parseSync({data:e,path:i.path,parent:i});return Op(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={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:br(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(Si(i)?i:Promise.resolve(i));return Op(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:te.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new yn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Gn.create(this,this._def)}nullable(){return Tr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this,this._def)}promise(){return Vo.create(this,this._def)}or(e){return Bi.create([this,e],this._def)}and(e){return Pi.create(this,e,this._def)}transform(e){return new yn({...Ae(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Li({...Ae(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new nc({typeName:we.ZodBranded,type:this,...Ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Oi({...Ae(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Mi.create(this,e)}readonly(){return $i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const MS=/^c[^\s-]{8,}$/i,$S=/^[0-9a-z]+$/,GS=/^[0-9A-HJKMNP-TV-Z]{26}$/,zS=/^[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,US=/^[a-z0-9_-]{21}$/i,ZS=/^[-+]?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)?)??$/,WS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ec;const HS=/^(?:(?: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])$/,qS=/^(([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})))$/,KS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mp="((\\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])))",YS=new RegExp(`^${Mp}$`);function $p(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 XS(t){return new RegExp(`^${$p(t)}$`)}function Gp(t){let e=`${Mp}T${$p(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 JS(t,e){return!!((e==="v4"||!e)&&HS.test(t)||(e==="v6"||!e)&&qS.test(t))}class mn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.string,received:i.parsedType}),xe}const n=new kt;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")WS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ec||(ec=new RegExp(jS,"u")),ec.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")US.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")MS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")$S.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")GS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:te.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:te.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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),se(o,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Gp(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?YS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?XS(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?ZS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?JS(e.data,i.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?KS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:te.invalid_string,message:i.message}),n.dirty()):Ge.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:te.invalid_string,...fe.errToObj(o)})}_addCheck(e){return new mn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.errToObj(e)})}datetime(e){var n,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:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...fe.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,...fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mn({...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}}mn.create=t=>{var e;return new mn({checks:[],typeName:we.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function QS(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class xr extends Re{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)!==le.number){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.number,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="int"?Ge.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.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)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?QS(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_finite,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new xr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new xr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Ge.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}xr.create=t=>new xr({checks:[],typeName:we.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class kr extends Re{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)!==le.bigint){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.bigint,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.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)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new kr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new kr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.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}}kr.create=t=>{var e;return new kr({checks:[],typeName:we.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};class Ni extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.boolean,received:n.parsedType}),xe}return At(e.data)}}Ni.create=t=>new Ni({typeName:we.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class Kr extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.date,received:i.parsedType}),xe}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_date}),xe}const n=new kt;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Ge.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Kr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.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}}Kr.create=t=>new Kr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:we.ZodDate,...Ae(t)});class js extends Re{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.symbol,received:n.parsedType}),xe}return At(e.data)}}js.create=t=>new js({typeName:we.ZodSymbol,...Ae(t)});class Vi extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.undefined,received:n.parsedType}),xe}return At(e.data)}}Vi.create=t=>new Vi({typeName:we.ZodUndefined,...Ae(t)});class Ai extends Re{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.null,received:n.parsedType}),xe}return At(e.data)}}Ai.create=t=>new Ai({typeName:we.ZodNull,...Ae(t)});class Eo extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}Eo.create=t=>new Eo({typeName:we.ZodAny,...Ae(t)});class Yr extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}Yr.create=t=>new Yr({typeName:we.ZodUnknown,...Ae(t)});class Jn extends Re{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.never,received:n.parsedType}),xe}}Jn.create=t=>new Jn({typeName:we.ZodNever,...Ae(t)});class Hs extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.void,received:n.parsedType}),xe}return At(e.data)}}Hs.create=t=>new Hs({typeName:we.ZodVoid,...Ae(t)});class gn extends Re{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==le.array)return se(n,{code:te.invalid_type,expected:le.array,received:n.parsedType}),xe;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(se(n,{code:c?te.too_big:te.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(se(n,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(se(n,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new Mn(n,c,n.path,d)))).then(c=>kt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new Mn(n,c,n.path,d)));return kt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new gn({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new gn({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new gn({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}gn.create=(t,e)=>new gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ae(e)});function To(t){if(t instanceof nt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Gn.create(To(o))}return new nt({...t._def,shape:()=>e})}else return t instanceof gn?new gn({...t._def,type:To(t.element)}):t instanceof Gn?Gn.create(To(t.unwrap())):t instanceof Tr?Tr.create(To(t.unwrap())):t instanceof $n?$n.create(t.items.map(e=>To(e))):t}class nt extends Re{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=Ge.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:te.invalid_type,expected:le.object,received:p.parsedType}),xe}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Jn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const d=[];for(const p of l){const h=i[p],m=o.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Mn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Jn){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")c.length>0&&(se(o,{code:te.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const h of c){const m=o.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Mn(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of d){const m=await h.key,y=await h.value;p.push({key:m,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>kt.mergeObjectSync(n,p)):kt.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=fe.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const n={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}omit(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}deepPartial(){return To(this)}partial(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new nt({...this._def,shape:()=>n})}required(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Gn;)i=i._def.innerType;n[o]=i}}),new nt({...this._def,shape:()=>n})}keyof(){return zp(Ge.objectKeys(this.shape))}}nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)}),nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)}),nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)});class Bi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new jt(d.ctx.common.issues));return se(n,{code:te.invalid_union,unionErrors:c}),xe}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new jt(p));return se(n,{code:te.invalid_union,unionErrors:d}),xe}}get options(){return this._def.options}}Bi.create=(t,e)=>new Bi({options:t,typeName:we.ZodUnion,...Ae(e)});const Sr=t=>t instanceof Di?Sr(t.schema):t instanceof yn?Sr(t.innerType()):t instanceof Ii?[t.value]:t instanceof Er?t.options:t instanceof Fi?Ge.objectValues(t.enum):t instanceof Li?Sr(t._def.innerType):t instanceof Vi?[void 0]:t instanceof Ai?[null]:t instanceof Gn?[void 0,...Sr(t.unwrap())]:t instanceof Tr?[null,...Sr(t.unwrap())]:t instanceof nc||t instanceof $i?Sr(t.unwrap()):t instanceof Oi?Sr(t._def.innerType):[];class qs extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:te.invalid_type,expected:le.object,received:n.parsedType}),xe;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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}):(se(n,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=Sr(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new qs({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ae(o)})}}function tc(t,e){const n=br(t),o=br(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const i=Ge.objectKeys(e),l=Ge.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=tc(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=tc(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Pi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(Jl(l)||Jl(c))return xe;const d=tc(l.value,c.value);return d.valid?((Ql(l)||Ql(c))&&n.dirty(),{status:n.value,value:d.data}):(se(o,{code:te.invalid_intersection_types}),xe)};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(([l,c])=>i(l,c)):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}))}}Pi.create=(t,e,n)=>new Pi({left:t,right:e,typeName:we.ZodIntersection,...Ae(n)});class $n extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:te.invalid_type,expected:le.array,received:o.parsedType}),xe;if(o.data.length<this._def.items.length)return se(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Mn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(i).then(l=>kt.mergeArray(n,l)):kt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new $n({...this._def,rest:e})}}$n.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $n({items:t,typeName:we.ZodTuple,rest:null,...Ae(e)})};class Ri extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:te.invalid_type,expected:le.object,received:o.parsedType}),xe;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new Mn(o,d,o.path,d)),value:c._parse(new Mn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?kt.mergeObjectAsync(n,i):kt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Re?new Ri({keyType:e,valueType:n,typeName:we.ZodRecord,...Ae(o)}):new Ri({keyType:mn.create(),valueType:e,typeName:we.ZodRecord,...Ae(n)})}}class Ks extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:te.invalid_type,expected:le.map,received:o.parsedType}),xe;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new Mn(o,d,o.path,[h,"key"])),value:l._parse(new Mn(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ks.create=(t,e,n)=>new Ks({valueType:e,keyType:t,typeName:we.ZodMap,...Ae(n)});class Xr extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:te.invalid_type,expected:le.set,received:o.parsedType}),xe;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(se(o,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(se(o,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return xe;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new Mn(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Xr({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Xr({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Xr.create=(t,e)=>new Xr({valueType:t,minSize:null,maxSize:null,typeName:we.ZodSet,...Ae(e)});class No extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:te.invalid_type,expected:le.function,received:n.parsedType}),xe;function o(d,p){return Us({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,zs(),So].filter(h=>!!h),issueData:{code:te.invalid_arguments,argumentsError:p}})}function i(d,p){return Us({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,zs(),So].filter(h=>!!h),issueData:{code:te.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof Vo){const d=this;return At(async function(...p){const h=new jt([]),m=await d._def.args.parseAsync(p,l).catch(w=>{throw h.addIssue(o(p,w)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(w=>{throw h.addIssue(i(y,w)),h})})}else{const d=this;return At(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new jt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new jt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new No({...this._def,args:$n.create(e).rest(Yr.create())})}returns(e){return new No({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new No({args:e||$n.create([]).rest(Yr.create()),returns:n||Yr.create(),typeName:we.ZodFunction,...Ae(o)})}}class Di extends Re{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})}}Di.create=(t,e)=>new Di({getter:t,typeName:we.ZodLazy,...Ae(e)});class Ii extends Re{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ii.create=(t,e)=>new Ii({value:t,typeName:we.ZodLiteral,...Ae(e)});function zp(t,e){return new Er({values:t,typeName:we.ZodEnum,...Ae(e)})}class Er extends Re{constructor(){super(...arguments),Ei.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Ge.joinValues(o),received:n.parsedType,code:te.invalid_type}),xe}if(Ws(this,Ei)||Lp(this,Ei,new Set(this._def.values)),!Ws(this,Ei).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:te.invalid_enum_value,options:o}),xe}return At(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 Er.create(e,{...this._def,...n})}exclude(e,n=this._def){return Er.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ei=new WeakMap,Er.create=zp;class Fi extends Re{constructor(){super(...arguments),Ti.set(this,void 0)}_parse(e){const n=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const i=Ge.objectValues(n);return se(o,{expected:Ge.joinValues(i),received:o.parsedType,code:te.invalid_type}),xe}if(Ws(this,Ti)||Lp(this,Ti,new Set(Ge.getValidEnumValues(this._def.values))),!Ws(this,Ti).has(e.data)){const i=Ge.objectValues(n);return se(o,{received:o.data,code:te.invalid_enum_value,options:i}),xe}return At(e.data)}get enum(){return this._def.values}}Ti=new WeakMap,Fi.create=(t,e)=>new Fi({values:t,typeName:we.ZodNativeEnum,...Ae(e)});class Vo extends Re{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:te.invalid_type,expected:le.promise,received:n.parsedType}),xe;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return At(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Vo.create=(t,e)=>new Vo({type:t,typeName:we.ZodPromise,...Ae(e)});class yn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?xe:p.status==="dirty"||n.value==="dirty"?Zs(p.value):p});{if(n.value==="aborted")return xe;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"||n.value==="dirty"?Zs(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ki(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ki(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);Ge.assertNever(i)}}yn.create=(t,e,n)=>new yn({schema:t,typeName:we.ZodEffects,effect:e,...Ae(n)}),yn.createWithPreprocess=(t,e,n)=>new yn({schema:e,effect:{type:"preprocess",transform:t},typeName:we.ZodEffects,...Ae(n)});class Gn extends Re{_parse(e){return this._getType(e)===le.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gn.create=(t,e)=>new Gn({innerType:t,typeName:we.ZodOptional,...Ae(e)});class Tr extends Re{_parse(e){return this._getType(e)===le.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tr.create=(t,e)=>new Tr({innerType:t,typeName:we.ZodNullable,...Ae(e)});class Li extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:we.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class Oi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Si(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Oi.create=(t,e)=>new Oi({innerType:t,typeName:we.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class Ys extends Re{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Ys.create=t=>new Ys({typeName:we.ZodNaN,...Ae(t)});const eE=Symbol("zod_brand");class nc extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mi extends Re{_parse(e){const{status:n,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"?xe:i.status==="dirty"?(n.dirty(),Zs(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"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new Mi({in:e,out:n,typeName:we.ZodPipeline})}}class $i extends Re{_parse(e){const n=this._def.innerType._parse(e),o=i=>(ki(i)&&(i.value=Object.freeze(i.value)),i);return Si(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}$i.create=(t,e)=>new $i({innerType:t,typeName:we.ZodReadonly,...Ae(e)});function Up(t,e={},n){return t?Eo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):Eo.create()}const tE={object:nt.lazycreate};var we;(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"})(we||(we={}));const nE=(t,e={message:`Input not instance of ${t.name}`})=>Up(n=>n instanceof t,e),Zp=mn.create,Wp=xr.create,rE=Ys.create,oE=kr.create,jp=Ni.create,iE=Kr.create,sE=js.create,aE=Vi.create,lE=Ai.create,cE=Eo.create,dE=Yr.create,uE=Jn.create,pE=Hs.create,hE=gn.create,fE=nt.create,mE=nt.strictCreate,gE=Bi.create,yE=qs.create,_E=Pi.create,CE=$n.create,vE=Ri.create,wE=Ks.create,bE=Xr.create,xE=No.create,kE=Di.create,SE=Ii.create,EE=Er.create,TE=Fi.create,NE=Vo.create,Hp=yn.create,VE=Gn.create,AE=Tr.create,BE=yn.createWithPreprocess,PE=Mi.create;var zn=Object.freeze({__proto__:null,defaultErrorMap:So,setErrorMap:LS,getErrorMap:zs,makeIssue:Us,EMPTY_PATH:OS,addIssueToContext:se,ParseStatus:kt,INVALID:xe,DIRTY:Zs,OK:At,isAborted:Jl,isDirty:Ql,isValid:ki,isAsync:Si,get util(){return Ge},get objectUtil(){return Xl},ZodParsedType:le,getParsedType:br,ZodType:Re,datetimeRegex:Gp,ZodString:mn,ZodNumber:xr,ZodBigInt:kr,ZodBoolean:Ni,ZodDate:Kr,ZodSymbol:js,ZodUndefined:Vi,ZodNull:Ai,ZodAny:Eo,ZodUnknown:Yr,ZodNever:Jn,ZodVoid:Hs,ZodArray:gn,ZodObject:nt,ZodUnion:Bi,ZodDiscriminatedUnion:qs,ZodIntersection:Pi,ZodTuple:$n,ZodRecord:Ri,ZodMap:Ks,ZodSet:Xr,ZodFunction:No,ZodLazy:Di,ZodLiteral:Ii,ZodEnum:Er,ZodNativeEnum:Fi,ZodPromise:Vo,ZodEffects:yn,ZodTransformer:yn,ZodOptional:Gn,ZodNullable:Tr,ZodDefault:Li,ZodCatch:Oi,ZodNaN:Ys,BRAND:eE,ZodBranded:nc,ZodPipeline:Mi,ZodReadonly:$i,custom:Up,Schema:Re,ZodSchema:Re,late:tE,get ZodFirstPartyTypeKind(){return we},coerce:{string:t=>mn.create({...t,coerce:!0}),number:t=>xr.create({...t,coerce:!0}),boolean:t=>Ni.create({...t,coerce:!0}),bigint:t=>kr.create({...t,coerce:!0}),date:t=>Kr.create({...t,coerce:!0})},any:cE,array:hE,bigint:oE,boolean:jp,date:iE,discriminatedUnion:yE,effect:Hp,enum:EE,function:xE,instanceof:nE,intersection:_E,lazy:kE,literal:SE,map:wE,nan:rE,nativeEnum:TE,never:uE,null:lE,nullable:AE,number:Wp,object:fE,oboolean:()=>jp().optional(),onumber:()=>Wp().optional(),optional:VE,ostring:()=>Zp().optional(),pipeline:PE,preprocess:BE,promise:NE,record:vE,set:bE,strictObject:mE,string:Zp,symbol:sE,transformer:Hp,tuple:CE,undefined:aE,union:gE,unknown:dE,void:pE,NEVER:xe,ZodIssueCode:te,quotelessJson:FS,ZodError:jt});function RE(t){throw new Error("Unexpected object: "+t)}const qp="upload://upload/",Kp="index://index/";function DE(t){return t.startsWith(qp)}function IE(t){return t.startsWith(Kp)}function Yp(t){if(IE(t)){const e=t.slice(Kp.length);return JSON.parse(decodeURIComponent(e)).path}else if(DE(t)){const e=t.slice(qp.length);return JSON.parse(decodeURIComponent(e)).localPath}RE(t)}function FE(t){return t.replace(/^.*[\\/]/,"")}function LE(t){return FE(Yp(t))}zn.object({__isRef:zn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:zn.string().describe("Upstream block id"),name:zn.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();const OE=zn.object({type:zn.string(),importance:zn.number().optional(),id:zn.string().optional(),label:zn.string()});zn.array(OE);const ME={key:0,ref:"label"},$E={key:0,class:"required-icon"},GE=["data-placeholder"],zE={key:5,class:"pl-file-input__stats"},UE={key:0,class:"pl-file-input__error"},ZE={key:1,class:"pl-file-input__helper"},Xp=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),i=e,l=t,c=(V,H)=>{if(V)try{return H(V)}catch(A){return n.error=A instanceof Error?A.message:String(A),V}},d=r.computed(()=>c(l.modelValue,LE)),p=r.computed(()=>c(l.modelValue,Yp)),h=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),w=r.computed(()=>!!y.value),v=r.computed(()=>{const{status:V,done:H}=l.progress??{};return!V||!V.bytesTotal?"":V.bytesProcessed&&!H?Al(V.bytesProcessed,{})+" / "+Al(V.bytesTotal,{}):Al(V.bytesTotal,{})}),T=r.computed(()=>{var V;const{progress:H}=l;return H?{width:H.done?"100%":Math.round((((V=H.status)==null?void 0:V.progress)??0)*100)+"%"}:{}}),O=()=>{n.fileDialogOpen=!0},M=V=>{V.files.length&&i("update:modelValue",V.files[0])},x=()=>i("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const Z=r.ref();return l.cellStyle||Xn(Z),(V,H)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!V.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:Z,class:r.normalizeClass(["pl-file-input",{dashed:V.dashed,error:w.value}]),tabindex:"0",onKeyup:r.withKeys(O,["enter"]),onClick:r.withModifiers(O,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(T.value)},null,4),H[3]||(H[3]=r.createTextVNode()),!V.cellStyle&&V.label?(r.openBlock(),r.createElementBlock("label",ME,[V.required?(r.openBlock(),r.createElementBlock("i",$E)):r.createCommentVNode("",!0),H[1]||(H[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(V.label),1),H[2]||(H[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(V.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),H[4]||(H[4]=r.createTextVNode()),w.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:"restart"})):h.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(ut),{key:4,name:"paper-clip"})),H[5]||(H[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":V.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(d.value),9,GE),H[6]||(H[6]=r.createTextVNode()),v.value?(r.openBlock(),r.createElementBlock("div",zE,r.toDisplayString(v.value),1)):r.createCommentVNode("",!0),H[7]||(H[7]=r.createTextVNode()),V.modelValue?(r.openBlock(),r.createBlock(r.unref(ut),{key:6,name:"close",onClick:r.withModifiers(x,["stop"])})):r.createCommentVNode("",!0),H[8]||(H[8]=r.createTextVNode()),r.createVNode(wr,{class:"pl-file-input__contour"})],34),H[9]||(H[9]=r.createTextVNode()),w.value?(r.openBlock(),r.createElementBlock("div",UE,r.toDisplayString(y.value),1)):V.helper?(r.openBlock(),r.createElementBlock("div",ZE,r.toDisplayString(V.helper),1)):r.createCommentVNode("",!0)],2),H[10]||(H[10]=r.createTextVNode()),r.createVNode(r.unref(Ip),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":H[0]||(H[0]=A=>n.fileDialogOpen=A),extensions:V.extensions,title:V.fileDialogTitle,"close-on-outside-click":V.fileDialogCloseOnOutsideClick,"onImport:files":M},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),WE={class:"pl-notification-alert__wrapper d-flex text-s"},jE={class:"pl-notification-alert__content flex-grow-1"},HE={key:0,class:"pl-notification-alert__close"},qE={key:0,class:"pl-notification-alert__actions d-flex"},Jp=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 o(){e.closable&&(n.value=!1)}return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${i.width}`})},[r.createElementVNode("div",WE,[r.createElementVNode("div",jE,[r.renderSlot(i.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),i.closable?(r.openBlock(),r.createElementBlock("div",HE,[r.createVNode(r.unref(jr),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),i.$slots.actions?(r.openBlock(),r.createElementBlock("div",qE,[r.renderSlot(i.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),KE=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function St(t,e,n){return e>t?e:t>n?n:t}const rc=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:i}=t.value;let l=n;for(;l<o;){l+=i;const c=(1-(St(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),YE={class:"ui-slider__wrapper"},XE={class:"ui-slider__label-section"},JE={key:0,class:"text-s"},QE={key:1,class:"ui-slider__value-static text-s"},e1={class:"ui-slider__base"},t1={class:"ui-slider__container"},n1={class:"ui-slider__container ui-slider__container-thumb"},r1={class:"ui-slider__input-wrapper d-flex"},o1=["value"],i1={key:0,class:"ui-slider__error"},Qp=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(),o=e,i=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>i.max-i.min),d=r.computed(()=>St((i.modelValue??0)+l.deltaValue,i.min,i.max)),p=r.ref(i.modelValue),h=r.computed(()=>{const A=i.modelValue;return Number.isFinite(A)?A<i.min?`Min value: ${i.min}`:A>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),m=r.computed(()=>i),y=rc(m),w=r.computed(()=>(d.value-i.min)/c.value),v=r.computed(()=>({right:Math.ceil((1-w.value)*100)+"%"})),T=r.computed(()=>({right:`calc(${Math.ceil((1-w.value)*100)}%) `})),O=r.ref(),M=r.ref();r.watch(()=>i.modelValue,A=>{p.value=A});function x(A){const S=St(A,i.min,i.max);return Math.round((S+Number.EPSILON)*(1/i.step))/(1/i.step)}Cr(M,A=>{var S;Ct((S=r.unref(O))==null?void 0:S.getBoundingClientRect(),P=>{const{dx:G}=A;l.deltaValue=G/P.width*c.value,p.value=x(St((i.modelValue??0)+l.deltaValue,i.min,i.max)),A.stop&&(o("update:modelValue",x(d.value)),l.deltaValue=0)})});function Z(A){o("update:modelValue",x(A))}function V(A){Z(+A.target.value)}function H(A){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const S=A.code==="ArrowUp"||A.code==="ArrowRight"?i.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?i.step*-1:0;Z(i.modelValue+S)}return(A,S)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",YE,[r.createElementVNode("div",XE,[A.label?(r.openBlock(),r.createElementBlock("label",JE,[r.createElementVNode("span",null,r.toDisplayString(A.label),1),S[1]||(S[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),S[2]||(S[2]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",QE,r.toDisplayString(p.value)+r.toDisplayString(A.measure),1)):r.createCommentVNode("",!0)]),S[6]||(S[6]=r.createTextVNode()),r.createElementVNode("div",e1,[r.createElementVNode("div",t1,[r.createElementVNode("div",{ref_key:"barRef",ref:O,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(v.value)},null,4)],512)]),S[5]||(S[5]=r.createTextVNode()),r.createElementVNode("div",n1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(P,G)=>(r.openBlock(),r.createElementBlock("div",{key:G,style:r.normalizeStyle({right:`${P}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),S[4]||(S[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:M,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(T.value),onKeydown:H},S[3]||(S[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",r1,[i.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:S[0]||(S[0]=P=>V(P))},null,40,o1)):r.createCommentVNode("",!0)])],2),S[8]||(S[8]=r.createTextVNode()),h.value?(r.openBlock(),r.createElementBlock("div",i1,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],2))}});function s1(t,e=null,n=null){function o(d){const{scrollTop:p,scrollHeight:h,clientHeight:m}=d;if(!(h>m)||!e)return null;const y=h-p-m,w=p>e?e:0,v=y>e?m-e-w:m;return`linear-gradient(
|
|
52
|
+
`,fw=["innerHTML"],mw={class:"dropdown-list-item__title-container"},gw={class:"dropdown-list-item__title text-s"},yw={key:0,class:"dropdown-list-item__description text-description"},_w={key:1,class:"dropdown-list-item__icon flex-self-start"},xo=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(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),i=r.computed(()=>e.isSelected?hw:pw);return(l,c)=>(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(o.value),innerHTML:i.value},null,10,fw)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",mw,[r.createElementVNode("div",gw,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",yw,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",_w)):r.createCommentVNode("",!0)],2))}});function bi(t,e){const n=Il(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,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})}});r.onMounted(n),st(window,"scroll",n,{capture:!0,passive:!0}),st(window,"resize",n,{passive:!0}),st(window,"adjust",n,!0)}const Cw=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),vw="_icon_1ugxm_2",ww={icon:vw},bw={$style:ww},Wt=Ot(Cw,[["__cssModules",bw]]),xw=["onKeyup"],kw=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,i=n,l=r.useModel(t,"modelValue"),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(d,A=>{if(A){const S=A.getBoundingClientRect();m.optionsHeight=S.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const w=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),v=r.computed(()=>(o.options??[]).findIndex(A=>Rs(A.value,l.value))),T=r.computed(()=>wr(o.options??[]).map((A,S)=>({...A,index:S,isSelected:S===v.value,isActive:S===m.activeIndex}))),O=r.computed(()=>o.loading||o.options===void 0),M=r.computed(()=>{var A;return((A=T.value.find(S=>Rs(S.value,l.value)))==null?void 0:A.label)??(o.options===void 0?"...":"")});bi(c,A=>{const S=A.top+A.height+3;S+m.optionsHeight>A.clientHeight?y.top=A.top-m.optionsHeight-3+"px":y.top=S+"px",y.left=A.left+"px",y.width=A.width+"px"});const V=A=>{var S;l.value=A,m.open=!1,(S=c==null?void 0:c.value)==null||S.focus()};function U(){i("click")}const k=A=>{var S,P;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;if(A.target===h.value&&A.code==="Enter"){U();return}const{open:G,activeIndex:Y}=m;if(!G&&A.target===p.value){A.code==="Enter"&&(m.open=!0);return}A.code==="Escape"&&(m.open=!1,(S=c.value)==null||S.focus());const F=r.unref(T),{length:Z}=F;if(!Z)return;A.code==="Enter"&&V((P=F.find($=>$.index===Y))==null?void 0:P.value);const z=F.findIndex($=>$.index===Y)??-1,R=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,N=Math.abs(z+R+Z)%Z;m.activeIndex=T.value[N].index??-1},W=A=>{var S,P;const G=A.relatedTarget;!((S=c.value)!=null&&S.contains(G))&&!((P=d.value)!=null&&P.contains(G))&&(m.open=!1)};return(A,S)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:A.disabled||O.value,loading:O.value},"pl-btn-split d-flex"]),onFocusout:W,onKeydown:k},[r.createElementVNode("div",{ref_key:"buttonAction",ref:h,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:U,onKeyup:r.withKeys(r.withModifiers(U,["stop"]),["enter"])},r.toDisplayString(M.value),41,xw),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:S[0]||(S[0]=P=>m.open=!m.open)},[O.value?(r.openBlock(),r.createBlock(Wt,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([w.value,"pl-btn-split__icon"])},null,2))],512),S[2]||(S[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(P,G)=>(r.openBlock(),r.createBlock(xo,{key:G,option:P,"is-selected":P.isSelected,"is-hovered":P.isActive,size:"medium",onClick:r.withModifiers(Y=>V(P.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function yp(t){function e(n){const o=n.currentTarget,i=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;i.style.width=i.style.height=`${l}px`,i.style.left=`${n.clientX-o.offsetLeft-c}px`,i.style.top=`${n.clientY-o.offsetTop-c}px`,i.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(i)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const Sw={key:0},Ew={inheritAttrs:!1},Is=r.defineComponent({...Ew,__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(),o=r.computed(()=>e.small||e.size==="small"),i=r.computed(()=>e.large||e.size==="large");return yp(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:i.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",Sw,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(Wt),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(Wt),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),Tw={name:"PlBtnPrimary"},Fs=r.defineComponent({...Tw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Nw={name:"PlBtnAccent"},Vw=r.defineComponent({...Nw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Aw={name:"PlBtnDanger"},Bw=r.defineComponent({...Aw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Pw={name:"PlBtnSecondary"},Ml=r.defineComponent({...Pw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Is,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),Rw=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),Dw="_icon_1ugxm_2",Iw={icon:Dw},Fw={$style:Iw},ut=Ot(Rw,[["__cssModules",Fw]]),Lw={key:0},Ow={name:"PlBtnGhost"},Hr=r.defineComponent({...Ow,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"),o=r.computed(()=>e.size==="large"),i=r.ref(),l=r.useSlots();return yp(i),(c,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:i,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",Lw,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(ut),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),Mw=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(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:i[0]||(i[0]=l=>n.value=!0),onMouseleave:i[1]||(i[1]=l=>n.value=!1)},[r.createVNode(Ml,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),i[2]||(i[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function $w(t,e){const n=r.ref();return bi(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),i=r.unref(e),l=i.position??"top",c=i.gap??8;if(!o)return"";const d=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${d}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:l==="southwest"?`left: ${o.offsetX+o.width}px; top: ${o.offsetY+o.height+c}px;`:""})}function xi(t,e){return e(t)}function Ct(t,e){if(t!=null)return e(t)}function Gw(t){return Array.isArray(t)?t:[t]}function zw(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function Ls(t,e){st(document,"click",n=>{document.contains(n.target)&&(Gw(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const Uw={},Zw={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ww(t,e){return r.openBlock(),r.createElementBlock("svg",Zw,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 jw=Ot(Uw,[["render",Ww]]),$l=new Map,Hw={name:"PlTooltip"},vt=r.defineComponent({...Hw,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),i=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});$l.set(o,()=>h()),r.watch(()=>l.open,M=>{requestAnimationFrame(()=>{l.tooltipOpen=M})});let c=()=>{};const d=pp(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(const[M,V]of $l.entries())M!==o&&V()},h=()=>{l.open=!1,n("tooltip:close")},m=async()=>{i.hide||(d(),l.over=!0,c(),await sp(100),l.over&&p())},y=()=>{l.over=!1,c=ap(()=>{l.over||h()},i.closeDelay)};r.watch(()=>i.hide,M=>{M&&h()});const w=r.ref(),v=r.ref(),T=$w(w,r.toRef(i));Ls([w,v],()=>h());const O=r.computed(()=>({"--pl-tooltip-max-width":i.maxWidth}));return r.onUnmounted(()=>{$l.delete(o)}),(M,V)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(M.element),r.mergeProps(M.$attrs,{ref_key:"rootRef",ref:w,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(M.$slots,"default"),V[1]||(V[1]=r.createTextVNode()),M.$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(T))},[r.createElementVNode("div",{ref_key:"tooltip",ref:v,class:r.normalizeClass(["pl-tooltip",M.position]),style:r.normalizeStyle(O.value),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(M.$slots,"tooltip")]),V[0]||(V[0]=r.createTextVNode()),r.createVNode(jw)],38)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),qw={},Kw={class:"inner-border"};function Yw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",Kw,[r.renderSlot(t.$slots,"default")])}const Xw=Ot(qw,[["render",Yw]]),Jw={key:0},Qw=["tabindex","onKeydown","onClick"],eb={key:1,class:"pl-btn-group__helper"},tb={key:2,class:"pl-btn-group__error"},nb={name:"PlBtnGroup"},_p=r.defineComponent({...nb,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=d=>o("update:modelValue",d),l=t,c=r.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(r.openBlock(),r.createElementBlock("label",Jw,[r.createElementVNode("span",null,r.toDisplayString(d.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(d.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Xw,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===h.value}]),tabindex:d.modelValue===h.value||d.disabled?void 0:0,onKeydown:r.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},r.toDisplayString(h.label),43,Qw))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),d.helper?(r.openBlock(),r.createElementBlock("div",eb,r.toDisplayString(d.helper),1)):d.error?(r.openBlock(),r.createElementBlock("div",tb,r.toDisplayString(d.error),1)):r.createCommentVNode("",!0)],2))}});function rb(t,e){const n=r.ref(),o=r.ref(),{parse:i,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},d=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const h=i?i(p):p;!l||l(h)?t.value=h:n.value=h}catch(h){n.value=p,o.value=h instanceof Error?h.message:String(h)}}});return r.reactive({value:d,error:o,reset:c})}const ob="_component_1abv8_1",ib="_container_1abv8_15",sb="_error_1abv8_69",Gl={component:ob,container:ib,error:sb},ab={key:0},lb=["placeholder"],cb=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=rb(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(n.maxLength&&d.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&d.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return d.trim()}}),i=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(Gl).component]),style:r.normalizeStyle(i.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(Gl).container),onClick:p[3]||(p[3]=()=>{var h;return(h=c.value)==null?void 0:h.focus()})},[d.prefix?(r.openBlock(),r.createElementBlock("span",ab,r.toDisplayString(d.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=h=>r.unref(o).value=h),placeholder:d.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...h)=>r.unref(o).reset&&r.unref(o).reset(...h),["escape"])),p[2]||(p[2]=r.withKeys(h=>{var m;return(m=h.target)==null?void 0:m.blur()},["enter"]))]},null,40,lb),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(Gl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),db={inheritAttrs:!1},ub={class:"double-contour"};function pb(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",ub,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const br=Ot(db,[["render",pb]]);function Cp(t){r.onMounted(t),r.onUpdated(t)}const zl=new WeakMap,Ul=new ResizeObserver(t=>{for(const e of t)Ct(zl.get(e.target),n=>n(e))});function vp(t,e){zl.set(t,e),Ul.unobserve(t),Ul.observe(t)}function wp(t){Ul.unobserve(t),zl.delete(t)}const hb=8,bp=4;function Xn(t,e="label"){const n=new Set;Cp(()=>{Ct(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(n.add(i),vp(i,()=>{const l=ip(()=>i.getBoundingClientRect().width+xi(hb,c=>Number.isNaN(c)?bp:c+bp));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>wp(o))})}function fb(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&n.push(i)}),{isValid:n.length===0,errors:n}}function xp(t,e){return r.computed(()=>fb(t.value,e))}const mb=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),gb="_icon_1ugxm_2",yb={icon:gb},_b={$style:yb},qr=Ot(mb,[["__cssModules",_b]]),Cb={class:"pl-text-field__envelope"},vb={key:0,ref:"label"},wb={key:0,class:"required-icon"},bb={key:1,class:"pl-text-field__prefix"},xb=["disabled","placeholder","type"],kb={key:0,class:"pl-text-field__error"},Sb={key:1,class:"pl-text-field__helper"},Eb={name:"PlTextField"},Kr=r.defineComponent({...Eb,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"),o=t,i=r.ref(void 0),l=r.ref(),c=r.ref(!1),d=r.reactive({cached:void 0}),p=r.computed({get(){return d.cached?d.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(A){if(d.cached=void 0,o.parse)try{n.value=o.parse(A)}catch(S){d.cached={error:S instanceof Error?S.message:String(S),value:A}}else n.value=A}}),h=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(d.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},w=xp(p,o.rules||[]),v=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),T=r.computed(()=>!v.value),O=r.computed(()=>{const A=[];return o.error&&A.push(o.error),d.cached&&A.push(d.cached.error),w.value.isValid||A.push(...w.value.errors),A}),M=r.computed(()=>O.value.length>0),V=r.computed(()=>o.clearable&&T.value&&o.type!=="password"&&!o.disabled),U=()=>c.value=!c.value,k=()=>{d.cached=void 0},W=()=>{var A;return(A=l.value)==null?void 0:A.focus()};return Xn(i),(A,S)=>(r.openBlock(),r.createElementBlock("div",Cb,[r.createElementVNode("div",{ref_key:"rootRef",ref:i,class:r.normalizeClass(["pl-text-field",{error:M.value,disabled:A.disabled,dashed:A.dashed,nonEmpty:T.value}])},[A.label?(r.openBlock(),r.createElementBlock("label",vb,[A.required?(r.openBlock(),r.createElementBlock("i",wb)):r.createCommentVNode("",!0),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(A.label),1),S[2]||(S[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),S[5]||(S[5]=r.createTextVNode()),A.prefix?(r.openBlock(),r.createElementBlock("div",bb,r.toDisplayString(A.prefix),1)):r.createCommentVNode("",!0),S[6]||(S[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":S[0]||(S[0]=P=>p.value=P),disabled:A.disabled,placeholder:A.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:k},null,40,xb),[[r.vModelDynamic,p.value]]),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",{class:"pl-text-field__append",onClick:W},[V.value?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:r.withModifiers(y,["stop"])})):r.createCommentVNode("",!0),S[3]||(S[3]=r.createTextVNode()),A.type==="password"?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:m.value,style:{cursor:"pointer"},onClick:r.withModifiers(U,["stop"])},null,8,["name"])):r.createCommentVNode("",!0),S[4]||(S[4]=r.createTextVNode()),r.renderSlot(A.$slots,"append")]),S[8]||(S[8]=r.createTextVNode()),r.createVNode(br,{class:"pl-text-field__contour"})],2),S[9]||(S[9]=r.createTextVNode()),M.value?(r.openBlock(),r.createElementBlock("div",kb,r.toDisplayString(O.value.join(" ")),1)):A.helper?(r.openBlock(),r.createElementBlock("div",Sb,r.toDisplayString(A.helper),1)):r.createCommentVNode("",!0)]))}}),Tb=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),Nb="_icon_1ugxm_2",Vb={icon:Nb},Ab={$style:Vb},Os=Ot(Tb,[["__cssModules",Ab]]),Bb=["disabled","placeholder"],Pb=r.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(h){n("update:modelValue",h)}}),d=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass(["pl-search-field",[h.$style.component]])},[r.createVNode(r.unref(Os),{name:"search"}),m[1]||(m[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=y=>c.value=y),disabled:h.disabled,type:"text",placeholder:h.placeholder||"Find...",spellcheck:"false"},null,8,Bb),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),h.clearable&&d.value?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,class:r.normalizeClass(h.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),Rb="_component_pz0lo_1",Db="_clear_pz0lo_35",Ib={component:Rb,clear:Db},Fb={$style:Ib},kp=Ot(Pb,[["__cssModules",Fb]]),Lb={class:"ui-text-area__envelope"},Ob={key:0,ref:"label"},Mb={key:0,class:"required-icon"},$b=["readonly","rows","disabled","placeholder"],Gb={class:"ui-text-area__append"},zb={key:0,class:"ui-text-area__error"},Ub={key:1,class:"ui-text-area__helper"},Zb={name:"PlTextArea"},Wb=r.defineComponent({...Zb,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(),o=e,i=t,l=r.ref(),c=r.ref(),d=r.computed({get(){return i.modelValue??""},set(v){o("update:modelValue",v)}}),p=r.computed(()=>!!i.modelValue),h=xp(d,i.rules||[]);Xn(l);const m=r.computed(()=>{const v=[];return i.error&&v.push(i.error),v.push(...h.value.errors),v}),y=r.computed(()=>m.value.length>0),w=()=>{if(!i.autogrow)return;const v=c.value;v&&(v.style.height="auto",v.style.height=`${v.scrollHeight}px`)};return r.onMounted(()=>{w()}),(v,T)=>(r.openBlock(),r.createElementBlock("div",Lb,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:v.disabled,dashed:v.dashed,nonEmpty:p.value}])},[v.label?(r.openBlock(),r.createElementBlock("label",Ob,[v.required?(r.openBlock(),r.createElementBlock("i",Mb)):r.createCommentVNode("",!0),T[1]||(T[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(v.label),1),T[2]||(T[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(v.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),T[3]||(T[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":T[0]||(T[0]=O=>d.value=O),readonly:v.readonly,rows:v.rows,disabled:v.disabled,placeholder:v.placeholder??"...",spellcheck:"false",onInput:w},null,40,$b),[[r.vModelText,d.value]]),T[4]||(T[4]=r.createTextVNode()),r.createElementVNode("div",Gb,[r.renderSlot(v.$slots,"append")]),T[5]||(T[5]=r.createTextVNode()),r.createVNode(br,{class:"ui-text-area__contour"})],2),T[6]||(T[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",zb,r.toDisplayString(m.value.join(" ")),1)):v.helper?(r.openBlock(),r.createElementBlock("div",Ub,r.toDisplayString(v.helper),1)):r.createCommentVNode("",!0)]))}});function Sp(t){return t!==null&&typeof t=="object"}function Mt(t,e){return Sp(t)&&Sp(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Mt(t[n],e[n])):t===e}function Zl(t,e){return t.some(n=>Mt(n,e))}const Wl=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"6bc9e89c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),i=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=up(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function d(){const m=Dl(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){d(),l(!0)}function h(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:h},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(i.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}});function Ep(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n&&i>n}function Tp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n?"ceil":i>n?"floor":"visible"}function Ms(t,e,n={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=Tp(t,e);if(d==="visible")return;const p=h=>{const m=d==="floor"?c-(i-l):c;t.scrollTop=o+h*(m-o)};Ep(t,e)||dp({duration:n.duration||100,timing:cp(h=>h),draw:p})}function jl(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function jb(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}const Hl=r.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(t,{expose:e}){const n=t,o=r.reactive({optionsHeight:0}),i=r.reactive({top:"0px",left:"0px",width:"0px"}),l=r.toRef(n,"root"),c=r.ref();return e({scrollIntoActive:()=>{const d=c.value;d&&Cr(d.querySelector(".hovered-item"),p=>{Ms(d,p)})},listRef:c}),r.watch(c,d=>{d&&requestAnimationFrame(()=>{const p=d.getBoundingClientRect();o.optionsHeight=p.height,window.dispatchEvent(new CustomEvent("adjust"))})}),bi(l,d=>{const p=document.body.getBoundingClientRect(),h=d.top-p.top,m=d.left-p.left,y=n.gap??0,w=h+d.height+y;w+o.optionsHeight>d.clientHeight?i.top=h-o.optionsHeight-y+"px":i.top=w+"px",i.left=m+"px",i.width=d.width+"px"}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createElementVNode("div",r.mergeProps({ref_key:"listRef",ref:c},d.$attrs,{style:i,tabindex:"-1"}),[r.renderSlot(d.$slots,"default",{ref:"list"})],16)]))}}),Hb={class:"pl-dropdown__envelope"},qb=["tabindex"],Kb={class:"pl-dropdown__container"},Yb={class:"pl-dropdown__field"},Xb=["disabled","placeholder"],Jb={class:"pl-dropdown__controls"},Qb={key:0},ex={key:0,class:"required-icon"},tx={key:0,class:"nothing-found"},nx={key:0,class:"pl-dropdown__error"},rx={key:1,class:"pl-dropdown__helper"},ox={key:2,class:"pl-dropdown__helper"},ix={name:"PlDropdown"},ko=r.defineComponent({...ix,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,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.useTemplateRef("overlay"),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>xi(k.value.findIndex(z=>Mt(z.value,o.modelValue)),z=>z<0?0:z),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),w=r.computed(()=>y.value?!0:o.disabled),v=r.computed(()=>(o.options??[]).findIndex(z=>Mt(z.value,o.modelValue))),T=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&v.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>wr(o.options??[]).map((z,R)=>({...z,index:R,isSelected:R===v.value,isActive:R===p.activeIndex}))),M=r.computed(()=>{const z=r.unref(O).find(R=>Mt(R.value,o.modelValue));return(z==null?void 0:z.label)||o.modelValue}),V=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(M.value):o.placeholder),U=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),k=r.computed(()=>{const z=O.value;return p.search?z.filter(R=>{const N=p.search.toLowerCase();return R.label.toLowerCase().includes(N)||R.description&&R.description.toLowerCase().includes(N)?!0:typeof R.value=="string"?R.value.toLowerCase().includes(N):R.value===p.search}):z}),W=r.computed(()=>w.value?void 0:"0"),A=z=>{var R;n("update:modelValue",z),p.search="",p.open=!1,(R=l==null?void 0:l.value)==null||R.focus()},S=()=>n("update:modelValue",void 0),P=()=>{var z;return(z=c.value)==null?void 0:z.focus()},G=()=>p.open=!p.open,Y=()=>p.open=!0,F=z=>{var R,N,$;const H=z.relatedTarget;!((R=l.value)!=null&&R.contains(H))&&!(($=(N=d.value)==null?void 0:N.listRef)!=null&&$.contains(H))&&(p.search="",p.open=!1)},Z=z=>{var R,N;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(z.code))z.preventDefault();else return;const{open:$,activeIndex:H}=p;if(!$){z.code==="Enter"&&(p.open=!0);return}z.code==="Escape"&&(p.open=!1,(R=l.value)==null||R.focus());const J=r.unref(k),{length:ne}=J;if(!ne)return;z.code==="Enter"&&A((N=J.find(Se=>Se.index===H))==null?void 0:N.value);const de=J.findIndex(Se=>Se.index===H)??-1,me=z.code==="ArrowDown"?1:z.code==="ArrowUp"?-1:0,Te=Math.abs(de+me+ne)%ne;p.activeIndex=k.value[Te].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,z=>{var R;return z?(R=c.value)==null?void 0:R.focus():""}),r.watchPostEffect(()=>{var z;p.search,p.activeIndex>=0&&p.open&&((z=d.value)==null||z.scrollIntoActive())}),(z,R)=>(r.openBlock(),r.createElementBlock("div",Hb,[r.createElementVNode("div",{ref_key:"rootRef",ref:l,tabindex:W.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:z.error,disabled:w.value}]),onKeydown:Z,onFocusout:F},[r.createElementVNode("div",Kb,[r.createElementVNode("div",Yb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":R[0]||(R[0]=N=>p.search=N),type:"text",tabindex:"-1",disabled:w.value,placeholder:V.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,Xb),[[r.vModelText,p.search]]),R[4]||(R[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"input-value",onClick:P},[r.createVNode(Wl,null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(M.value),1)]),_:1})])),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",Jb,[y.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:0,name:"loading"})):r.createCommentVNode("",!0),R[1]||(R[1]=r.createTextVNode()),z.clearable&&U.value?(r.openBlock(),r.createBlock(r.unref(qr),{key:1,name:"delete-clear",onClick:r.withModifiers(S,["stop"])})):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.renderSlot(z.$slots,"append"),R[3]||(R[3]=r.createTextVNode()),z.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${z.arrowIconLarge}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):z.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${z.arrowIcon}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(G,["stop"])}))])]),R[9]||(R[9]=r.createTextVNode()),z.label?(r.openBlock(),r.createElementBlock("label",Qb,[z.required?(r.openBlock(),r.createElementBlock("i",ex)):r.createCommentVNode("",!0),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(z.label),1),R[7]||(R[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[10]||(R[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.unref(Hl),{key:1,ref_key:"overlay",ref:d,root:l.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(k.value,(N,$)=>(r.openBlock(),r.createBlock(xo,{key:$,option:N,"is-selected":N.isSelected,"is-hovered":N.isActive,size:z.optionSize,onClick:r.withModifiers(H=>A(N.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),R[8]||(R[8]=r.createTextVNode()),k.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",tx,"Nothing found"))]),_:1},8,["root"])):r.createCommentVNode("",!0),R[11]||(R[11]=r.createTextVNode()),r.createVNode(br,{class:"pl-dropdown__contour"})])],42,qb),R[12]||(R[12]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",nx,r.toDisplayString(T.value),1)):y.value&&z.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",rx,r.toDisplayString(z.loadingOptionsHelper),1)):z.helper?(r.openBlock(),r.createElementBlock("div",ox,r.toDisplayString(z.helper),1)):r.createCommentVNode("",!0)]))}}),sx={name:"PlDropdownRef"},ax=r.defineComponent({...sx,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 i;return(i=e.options)==null?void 0:i.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,l)=>(r.openBlock(),r.createBlock(r.unref(ko),r.mergeProps(e,{options:n.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function lx(t,e){return r.computed(()=>{const n=wr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const cx={class:"resizable-input"},dx=["placeholder","value","disabled"],ux=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{var d;return n.placeholder?n.placeholder:(d=n.modelValue)==null?void 0:d.replace('"',"")}),l=r.computed(()=>{const d={};return n.width&&(d.width=n.width),n.maxWidth&&(d.maxWidth=n.maxWidth),d});function c(d){o("update:modelValue",d.target.value)}return(d,p)=>(r.openBlock(),r.createElementBlock("div",cx,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(i.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(d.$attrs,{placeholder:d.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,dx)]))}}),px={class:"dropdown-tab-item__title text-caps13"},hx=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),o=r.computed(()=>{const i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",px,r.toDisplayString(n.value),1)],2))}}),fx={class:"pl-line-dropdown__prefix"},mx={class:"pl-line-dropdown__icon-wrapper"},gx={class:"pl-line-dropdown__icon"},yx={key:0,class:"pl-line-dropdown__no-item"},_x={key:0,class:"pl-line-dropdown__no-item"},Np=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,o=t,i=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),d=r.computed(()=>{const F=[];return i.isOpen&&F.push("open"),o.disabled&&F.push("disabled"),F.join(" ")}),p=r.ref(""),h=lx(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const F=T();if(F!==-1)return wr(o.options)[F].label}return""}),w=r.ref(y.value);r.watch(y,F=>{w.value=F});const v=r.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value||"...");Ls(l,()=>{o.mode==="list"&&(i.isOpen=!1)}),r.watch(()=>w.value,F=>{y.value!==F?p.value=F:p.value=""}),r.watch(()=>i.isOpen,F=>{var Z;F&&l.value&&((Z=l.value.querySelector("input"))==null||Z.focus(),r.nextTick(()=>P()))}),r.watch(()=>o.modelValue,()=>O(),{immediate:!0});function T(){return o.options.findIndex(F=>Mt(F.value,o.modelValue))}function O(){i.activeOption=xi(h.value.findIndex(F=>Mt(F.value,o.modelValue)),F=>F<0?0:F)}function M(){p.value=""}function V(){o.disabled?i.isOpen=!1:r.nextTick(()=>{i.isOpen=!i.isOpen})}function U(){o.mode==="list"&&(i.isOpen=!1)}function k(F){F&&(n("update:modelValue",F.value),U(),M())}function W(F){return Mt(F.value,o.modelValue)}const A=F=>{var Z,z;const R=F.relatedTarget;!((Z=l.value)!=null&&Z.contains(R))&&!((z=c.value)!=null&&z.contains(R))&&(p.value="",i.isOpen=!1)};function S(F){const{activeOption:Z}=i;if(!i.isOpen&&F.code==="Enter"){i.isOpen=!0;return}const{length:z}=h.value;if(!z)return;["ArrowDown","ArrowUp","Enter"].includes(F.code)&&F.preventDefault(),F.code==="Enter"&&k(h.value[Z]);const R=F.code==="ArrowDown"?1:F.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(Z+R+z)%z,requestAnimationFrame(P)}function P(){const F=c.value;F&&Ct(F.querySelector(".hovered-item"),Z=>{o.mode==="list"?Ms(F,Z):Z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function G(){n("update:modelValue",void 0)}const Y=r.reactive({top:"0px",left:"0px"});return r.watch(c,F=>{if(F){const Z=F.getBoundingClientRect();i.optionsHeight=Z.height,window.dispatchEvent(new CustomEvent("adjust"))}}),bi(l,F=>{const Z=F.top+F.height+2;Z+i.optionsHeight>F.clientHeight?Y.top=F.top-i.optionsHeight-2+"px":Y.top=Z+"px",Y.left=F.left+"px"}),(F,Z)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:S,onFocusout:A,onClick:V},[r.createElementVNode("div",fx,r.toDisplayString(o==null?void 0:o.prefix),1),Z[6]||(Z[6]=r.createTextVNode()),r.createVNode(ux,{modelValue:w.value,"onUpdate:modelValue":Z[0]||(Z[0]=z=>w.value=z),placeholder:v.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),Z[7]||(Z[7]=r.createTextVNode()),r.createElementVNode("div",mx,[r.withDirectives(r.createElementVNode("div",gx,null,512),[[r.vShow,!m.value]]),Z[1]||(Z[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:G},null,512),[[r.vShow,m.value]])]),Z[8]||(Z[8]=r.createTextVNode()),i.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(z,R)=>r.renderSlot(F.$slots,"item",{key:R,item:z,textItem:"text",isSelected:W(z),isHovered:i.activeOption==R,onClick:r.withModifiers(N=>k(z),["stop"])},()=>[r.createVNode(xo,{option:z,"text-item":"text","is-selected":W(z),"is-hovered":i.activeOption==R,size:"medium",onClick:r.withModifiers(N=>k(z),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Z[3]||(Z[3]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",yx,Z[2]||(Z[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(z,R)=>r.renderSlot(F.$slots,"item",{key:R,item:z,isSelected:W(z),isHovered:i.activeOption==R,onClick:r.withModifiers(N=>k(z),["stop"])},()=>[r.createVNode(hx,{option:z,"is-selected":W(z),"is-hovered":i.activeOption==R,onClick:r.withModifiers(N=>k(z),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),Z[5]||(Z[5]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",_x,Z[4]||(Z[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))}}),Cx={class:"ui-dropdown__envelope"},vx=["tabindex"],wx={class:"ui-dropdown__container"},bx={class:"ui-dropdown__field"},xx=["disabled","placeholder"],kx={class:"ui-dropdown__controls"},Sx={key:0},Ex={key:0,class:"required-icon"},Tx={key:0,class:"nothing-found"},Nx={key:0,class:"ui-dropdown__error"},Vx={key:1,class:"ui-dropdown__helper"},Ax={key:2,class:"ui-dropdown__helper"},Bx={name:"PlDropdown"},Px=r.defineComponent({...Bx,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,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),h=()=>xi(k.value.findIndex(R=>Mt(R.value,o.modelValue)),R=>R<0?0:R),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),w=r.computed(()=>y.value?!0:o.disabled),v=r.computed(()=>(o.options??[]).findIndex(R=>Mt(R.value,o.modelValue))),T=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&v.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>wr(o.options??[]).map((R,N)=>({...R,index:N,isSelected:N===v.value,isActive:N===p.activeIndex}))),M=r.computed(()=>{const R=r.unref(O).find(N=>Mt(N.value,o.modelValue));return(R==null?void 0:R.label)||o.modelValue}),V=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(M.value):o.placeholder),U=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),k=r.computed(()=>{const R=O.value;return p.search?R.filter(N=>{const $=p.search.toLowerCase();return N.label.toLowerCase().includes($)||N.description&&N.description.toLowerCase().includes($)?!0:typeof N.value=="string"?N.value.toLowerCase().includes($):N.value===p.search}):R}),W=r.computed(()=>w.value?void 0:"0"),A=R=>{var N;n("update:modelValue",R),p.search="",p.open=!1,(N=l==null?void 0:l.value)==null||N.focus()},S=()=>n("update:modelValue",void 0),P=()=>{var R;return(R=d.value)==null?void 0:R.focus()},G=()=>p.open=!p.open,Y=()=>p.open=!0,F=R=>{var N;(N=l==null?void 0:l.value)!=null&&N.contains(R.relatedTarget)||(p.search="",p.open=!1)},Z=()=>{const R=c.value;R&&Ct(R.querySelector(".hovered-item"),N=>{Ms(R,N)})},z=R=>{var N,$;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(R.code))R.preventDefault();else return;const{open:H,activeIndex:J}=p;if(!H){R.code==="Enter"&&(p.open=!0);return}R.code==="Escape"&&(p.open=!1,(N=l.value)==null||N.focus());const ne=r.unref(k),{length:de}=ne;if(!de)return;R.code==="Enter"&&A(($=ne.find(je=>je.index===J))==null?void 0:$.value);const me=ne.findIndex(je=>je.index===J)??-1,Te=R.code==="ArrowDown"?1:R.code==="ArrowUp"?-1:0,Se=Math.abs(me+Te+de)%de;p.activeIndex=k.value[Se].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,R=>{var N;return R?(N=d.value)==null?void 0:N.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&Z()}),(R,N)=>(r.openBlock(),r.createElementBlock("div",Cx,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:W.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:R.error,disabled:w.value}]),onKeydown:z,onFocusout:F},[r.createElementVNode("div",wx,[r.createElementVNode("div",bx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":N[0]||(N[0]=$=>p.search=$),type:"text",tabindex:"-1",disabled:w.value,placeholder:V.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,xx),[[r.vModelText,p.search]]),N[4]||(N[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:P},[r.createVNode(Wl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(M.value),1)]),_:1})])),N[5]||(N[5]=r.createTextVNode()),r.createElementVNode("div",kx,[y.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:0,name:"loading"})):r.createCommentVNode("",!0),N[1]||(N[1]=r.createTextVNode()),R.clearable&&U.value?(r.openBlock(),r.createBlock(r.unref(qr),{key:1,name:"delete-clear",onClick:r.withModifiers(S,["stop"])})):r.createCommentVNode("",!0),N[2]||(N[2]=r.createTextVNode()),r.renderSlot(R.$slots,"append"),N[3]||(N[3]=r.createTextVNode()),R.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${R.arrowIconLarge}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):R.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${R.arrowIcon}`]]),onClick:r.withModifiers(G,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(G,["stop"])}))])]),N[9]||(N[9]=r.createTextVNode()),R.label?(r.openBlock(),r.createElementBlock("label",Sx,[R.required?(r.openBlock(),r.createElementBlock("i",Ex)):r.createCommentVNode("",!0),N[6]||(N[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(R.label),1),N[7]||(N[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(R.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),N[10]||(N[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(k.value,($,H)=>(r.openBlock(),r.createBlock(xo,{key:H,option:$,"is-selected":$.isSelected,"is-hovered":$.isActive,size:R.optionSize,onClick:r.withModifiers(J=>A($.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),N[8]||(N[8]=r.createTextVNode()),k.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Tx,"Nothing found"))],512)):r.createCommentVNode("",!0),N[11]||(N[11]=r.createTextVNode()),r.createVNode(br,{class:"ui-dropdown__contour"})])],42,vx),N[12]||(N[12]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",Nx,r.toDisplayString(T.value),1)):y.value&&R.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Vx,r.toDisplayString(R.loadingOptionsHelper),1)):R.helper?(r.openBlock(),r.createElementBlock("div",Ax,r.toDisplayString(R.helper),1)):r.createCommentVNode("",!0)]))}}),Rx={key:0,class:"ui-progress-bar"},Dx={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},Ix={class:"ui-progress-bar__message flex-grow-1"},Fx={class:"ui-progress-bar__percent"},Lx=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(o,i)=>o.loading?(r.openBlock(),r.createElementBlock("div",Rx,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",Dx,[r.createElementVNode("div",Ix,r.toDisplayString(n.value),1),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",Fx,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),Ox={class:"mi-number-field__main-wrapper d-flex"},Mx={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},$x={key:0,class:"text-description"},Gx=["disabled","placeholder"],zx={class:"mi-number-field__icons d-flex-column"},Ux={key:0,class:"mi-number-field__hint text-description"},Zx=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,o=e,i=r.ref(),l=r.useSlots(),c=r.ref();Xn(i);const d=r.ref(!0),p=r.computed({get(){return d.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(V){var U;V=V.replace(/,/g,""),w(V)?(o("update:modelValue",+V),V.toString()!==((U=n.modelValue)==null?void 0:U.toString())&&+V===n.modelValue&&V[V.length-1]!=="."&&(d.value=!1,r.nextTick(()=>{d.value=!0}))):(V.trim()===""&&o("update:modelValue",void 0),d.value=!1,r.nextTick(()=>{d.value=!0}))}}),h=r.computed(()=>{let V=[];return n.errorMessage&&V.push(n.errorMessage),w(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&V.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&V.push(`Model value must be less than ${n.maxValue}`)):V.push("Model value is not a number."),V=[...V],V.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function w(V){return V!==void 0?(V=V==null?void 0:V.toString(),!isNaN(+V)&&!isNaN(parseFloat(V))):!1}function v(){if(!m.value){let V=0;n.modelValue===void 0?V=n.minValue?n.minValue:0:V=+(n.modelValue||0)+n.step,p.value=V.toString()}}function T(){if(!y.value){let V=0;n.modelValue===void 0?V=0:V=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,V).toString():V.toString()}}function O(V){["ArrowDown","ArrowUp"].includes(V.code)&&V.preventDefault(),V.code==="ArrowUp"?v():V.code==="ArrowDown"&&T()}const M=V=>{V.detail>1&&V.preventDefault()};return(V,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass([{error:!!h.value.trim(),disabled:V.disabled},"mi-number-field d-flex-column"]),onMousedown:M,onKeydown:U[1]||(U[1]=k=>O(k))},[r.createElementVNode("div",Ox,[r.createVNode(br,{class:"mi-number-field__contour"}),U[6]||(U[6]=r.createTextVNode()),r.createElementVNode("div",Mx,[V.label?(r.openBlock(),r.createElementBlock("label",$x,[r.createTextVNode(r.toDisplayString(V.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(V.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),U[2]||(U[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":U[0]||(U[0]=k=>p.value=k),disabled:V.disabled,placeholder:V.placeholder,class:"text-s flex-grow"},null,8,Gx),[[r.vModelText,p.value]])]),U[7]||(U[7]=r.createTextVNode()),r.createElementVNode("div",zx,[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:v},U[3]||(U[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),U[5]||(U[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:T},U[4]||(U[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)])]),U[8]||(U[8]=r.createTextVNode()),h.value.trim()?(r.openBlock(),r.createElementBlock("div",Ux,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],34))}}),Wx={class:"pl-chip__text"},ql=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 o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(vt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[i[4]||(i[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",Wx,[r.renderSlot(o.$slots,"default")]),i[3]||(i[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},i[2]||(i[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(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),jx={class:"pl-dropdown-multi__envelope"},Hx=["tabindex"],qx={class:"pl-dropdown-multi__container"},Kx={class:"pl-dropdown-multi__field"},Yx=["disabled","placeholder"],Xx={class:"pl-dropdown-multi__append"},Jx={key:0},Qx={key:0,class:"required-icon"},ek={class:"pl-dropdown-multi__open-chips-container"},tk={key:0,class:"nothing-found"},nk={key:0,class:"pl-dropdown-multi__error"},rk={key:1,class:"pl-dropdown-multi__helper"},ok={name:"PlDropdownMulti"},ik=r.defineComponent({...ok,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,o=S=>n("update:modelValue",S),i=r.useSlots(),l=t,c=r.ref(),d=r.ref(),p=r.useTemplateRef("overlay"),h=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>h.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),w=r.computed(()=>wr(l.options).filter(S=>Zl(m.value,S.value))),v=r.computed(()=>{const S=r.unref(m),P=wr(l.options);return(h.search?P.filter(G=>{const Y=h.search.toLowerCase();return G.label.toLowerCase().includes(Y)?!0:typeof G.value=="string"?G.value.toLowerCase().includes(Y):G.value===h.search}):[...P]).map(G=>({...G,selected:Zl(S,G.value)}))}),T=r.computed(()=>l.disabled?void 0:"0"),O=()=>{h.activeOption=xi(v.value.findIndex(S=>Mt(S.value,l.modelValue)),S=>S<0?0:S)},M=S=>{var P;const G=r.unref(m);o(Zl(G,S)?G.filter(Y=>!Mt(Y,S)):[...G,S]),h.search="",(P=c==null?void 0:c.value)==null||P.focus()},V=S=>o(r.unref(m).filter(P=>!Mt(P,S))),U=()=>{var S;return(S=d.value)==null?void 0:S.focus()},k=()=>h.open=!h.open,W=S=>{var P,G,Y,F;const Z=S.relatedTarget;console.log(">>>> overlay.value?.$el",(P=p.value)==null?void 0:P.$el),!((G=c.value)!=null&&G.contains(Z))&&!((F=(Y=p.value)==null?void 0:Y.listRef)!=null&&F.contains(Z))&&(h.search="",h.open=!1)},A=S=>{var P;const{open:G,activeOption:Y}=h;if(!G){S.code==="Enter"&&(h.open=!0);return}S.code==="Escape"&&(h.open=!1,(P=c.value)==null||P.focus());const F=r.unref(v),{length:Z}=F;if(!Z)return;["ArrowDown","ArrowUp","Enter"].includes(S.code)&&S.preventDefault(),S.code==="Enter"&&M(F[Y].value);const z=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(Y+z+Z)%Z,requestAnimationFrame(()=>{var R;return(R=p.value)==null?void 0:R.scrollIntoActive()})};return Xn(c),r.watch(()=>l.modelValue,()=>O(),{immediate:!0}),r.watchPostEffect(()=>{var S;h.search,h.open&&((S=p.value)==null||S.scrollIntoActive())}),(S,P)=>(r.openBlock(),r.createElementBlock("div",jx,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:T.value,class:r.normalizeClass(["pl-dropdown-multi",{open:h.open,error:S.error,disabled:S.disabled}]),onKeydown:A,onFocusout:W},[r.createElementVNode("div",qx,[r.createElementVNode("div",Kx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":P[0]||(P[0]=G=>h.search=G),type:"text",tabindex:"-1",disabled:S.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:P[1]||(P[1]=G=>h.open=!0)},null,40,Yx),[[r.vModelText,h.search]]),P[3]||(P[3]=r.createTextVNode()),h.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:U},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(G,Y)=>(r.openBlock(),r.createBlock(r.unref(ql),{key:Y,closeable:"",small:"",onClick:P[2]||(P[2]=r.withModifiers(F=>h.open=!0,["stop"])),onClose:F=>V(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))])),P[4]||(P[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(k,["stop"])}),P[5]||(P[5]=r.createTextVNode()),r.createElementVNode("div",Xx,[r.renderSlot(S.$slots,"append")])]),P[10]||(P[10]=r.createTextVNode()),S.label?(r.openBlock(),r.createElementBlock("label",Jx,[S.required?(r.openBlock(),r.createElementBlock("i",Qx)):r.createCommentVNode("",!0),P[6]||(P[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(S.label),1),P[7]||(P[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),P[11]||(P[11]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(Hl,{key:1,ref_key:"overlay",ref:p,root:c.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:W},{default:r.withCtx(()=>[r.createElementVNode("div",ek,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(G,Y)=>(r.openBlock(),r.createBlock(r.unref(ql),{key:Y,closeable:"",small:"",onClose:F=>V(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))]),P[8]||(P[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.value,(G,Y)=>(r.openBlock(),r.createBlock(xo,{key:Y,option:G,"text-item":"text","is-selected":G.selected,"is-hovered":h.activeOption==Y,size:"medium","use-checkbox":"",onClick:r.withModifiers(F=>M(G.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),P[9]||(P[9]=r.createTextVNode()),v.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",tk,"Nothing found"))]),_:1},8,["root"])):r.createCommentVNode("",!0),P[12]||(P[12]=r.createTextVNode()),r.createVNode(br,{class:"pl-dropdown-multi__contour"})])],42,Hx),P[13]||(P[13]=r.createTextVNode()),S.error?(r.openBlock(),r.createElementBlock("div",nk,r.toDisplayString(S.error),1)):S.helper?(r.openBlock(),r.createElementBlock("div",rk,r.toDisplayString(S.helper),1)):r.createCommentVNode("",!0)]))}}),Kl=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(o,i)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),sk={name:"PlCheckbox"},ak=r.defineComponent({...sk,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,i)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode(Kl,r.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=l=>o.$emit("update:modelValue",l))}),null,16),i[3]||(i[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:i[1]||(i[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock(Kl,r.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),lk={key:0},ck=["onClick"],dk={name:"PlCheckboxGroup"},uk=r.defineComponent({...dk,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=c=>o.modelValue.includes(c),l=c=>{const d=o.modelValue??[];n("update:modelValue",i(c)?d.filter(p=>p!==c):[...d,c])};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",lk,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,h)=>(r.openBlock(),r.createElementBlock("div",{key:h},[r.createVNode(Kl,{disabled:c.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),d[0]||(d[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,ck)]))),128))],2))}}),pk="_component_tupwt_1",hk={component:pk},fk={};function mk(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 gk={$style:hk},Vp=Ot(fk,[["render",mk],["__cssModules",gk]]),yk={key:1,class:"pl-dialog-modal__title"},_k={inheritAttrs:!1},Yl=r.defineComponent({..._k,__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},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.ref(),c=r.useAttrs();function d(p){l.value&&i.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return st(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:d},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock(Vp,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",yk,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),h[2]||(h[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),h[3]||(h[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),Ck=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),vk={key:0,class:"pl-slide-modal__title"},wk={class:"pl-slide-modal__content"},bk={key:1,class:"pl-slide-modal__actions"},xk={name:"PlSlideModal",inheritAttrs:!1},$s=r.defineComponent({...xk,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(),o=e,i=t,l=r.ref(),c=r.useAttrs();return Ls(l,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),st(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Ck,null,{default:r.withCtx(()=>[d.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",vk,[r.renderSlot(d.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",wk,[r.renderSlot(d.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",bk,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),d.modelValue&&d.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),kk={key:0,class:"label"},Sk={name:"PlToggleSwitch"},Gs=r.defineComponent({...Sk,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]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>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",kk,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Ap(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Ek(t){return r.unref(t)}const Tk=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Nk(t,e,n={}){const{immediate:o=!0}=n,i=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){i.value=!1,c()}function p(...h){c(),i.value=!0,l=setTimeout(()=>{i.value=!1,l=null,t(...h)},Ek(e))}return o&&(i.value=!0,Tk&&p()),Ap(d),{isPending:r.readonly(i),start:p,stop:d}}function Vk(t,e,n){return r.watch(t,(o,i,l)=>{o&&e(o,i,l)},{...n,once:!1})}function Ak(t,e,n){const{start:o}=Nk(l,e,{immediate:!1}),i=r.ref(!1);async function l(){i.value&&(await t(),o())}function c(){i.value||(i.value=!0,l())}function d(){i.value=!1}return n!=null&&n.immediate&&c(),Ap(d),{isActive:i,pause:d,resume:c}}const Bk="[==PROGRESS==]";function Pk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rk(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const d=t.mockPlatforma??window.platforma;if(!d){console.warn("Platforma API is not available");return}for(;;){const p=await d.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const h=t.progressPrefix??Bk,m=new TextDecoder().decode(p.data).replace(new RegExp(`${Pk(h)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=Ak(()=>o().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 Vk(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>i.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,i.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,i.resume())},{immediate:!0}),e}const Dk={key:0},Ik={class:"pl-log-view__copy"},Fk={key:1,class:"pl-log-view__error"},Lk={name:"PlLogView"},Bp=r.defineComponent({...Lk,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=T=>{if(T&&T.ok===!1)return T.errors.join(`
|
|
53
|
+
`)},n=t,o=Rk(n),i=r.ref(!0),l=r.ref(),c=r.ref(),d=r.computed(()=>{var T;return((T=o.value)==null?void 0:T.error)??n.error??e(n.output)}),p=r.computed(()=>{var T;return((T=o.value)==null?void 0:T.lines)??n.value??gv(n.output)}),h=r.ref(!1);Xn(c);const m=r.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},w=()=>{Cr(l.value,T=>{i.value&&T.scrollTo(T.scrollLeft,T.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{w()})},{immediate:!0});const v=T=>{const O=T.target;i.value=O.scrollTop+20>=O.scrollHeight-O.offsetHeight};return(T,O)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":d.value}])},[T.label?(r.openBlock(),r.createElementBlock("label",Dk,r.toDisplayString(T.label),1)):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),r.createVNode(br,{class:"pl-log-view__contour"}),O[2]||(O[2]=r.createTextVNode()),r.createElementVNode("div",Ik,[r.createVNode(r.unref(vt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(h.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(ut),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),O[0]||(O[0]=r.createTextVNode())]),_:1})]),O[3]||(O[3]=r.createTextVNode()),d.value?(r.openBlock(),r.createElementBlock("div",Fk,r.toDisplayString(d.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:v},r.toDisplayString(p.value),545))],2))}}),Ok="_component_1ukal_1",Mk="_tab_1ukal_14",$k="_disabled_1ukal_27",Gk="_active_1ukal_56",zk="_topLine_1ukal_69",So={component:Ok,tab:Mk,disabled:$k,active:Gk,topLine:zk},Uk=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const i=o.$el.querySelector("span");i&&requestAnimationFrame(()=>{i.offsetWidth<i.scrollWidth&&(n.isOverflown=!0)})}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(vt),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),i[0]||(i[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),Zk={name:"PlTabs"},Wk=r.defineComponent({...Zk,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i=>n("update:modelValue",i);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(So).component,{[r.unref(So).disabled]:i.disabled,[r.unref(So).topLine]:i.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createBlock(Uk,{key:d,tabindex:i.modelValue===c.value||i.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(So).active]:i.modelValue===c.value,[r.unref(So).disabled]:c.disabled},r.unref(So).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??i.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(i.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),jk=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),Hk="_compact_rhd5u_16",qk="_content_rhd5u_20",Kk={compact:Hk,content:qk},Yk={$style:Kk},Pp=Ot(jk,[["__cssModules",Yk]]),Xk=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),i[0]||(i[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),Jk=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Qk=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),i=Yu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===i:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===i?"":i)}});return(d,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Pp),{class:r.normalizeClass(d.$style.separator),compact:d.compact,onClick:p[0]||(p[0]=h=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(Wt),{name:"chevron-right",class:r.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Jk,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.$style.content)},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),eS="_content_jmjfk_2",tS="_separator_jmjfk_14",nS="_chevron_jmjfk_19",rS="_down_jmjfk_23",oS={content:eS,separator:tS,chevron:nS,down:rS},iS={$style:oS},sS=Ot(Qk,[["__cssModules",iS]]),Rp=r.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(t){const e=r.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(n,o)=>n.type?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},n.$attrs,{class:[{[n.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[r.renderSlot(n.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(e.typeToText[n.type]),1)])],16)):r.createCommentVNode("",!0)}}),aS="_component_1ietr_1",lS="_local_1ietr_1",cS="_supported_1ietr_26",dS="_remote_1ietr_32",uS="_search_1ietr_40",pS="_selected_1ietr_72",hS="_breadcrumbs_1ietr_86",fS="_cat_1ietr_116",mS="_message_1ietr_122",gS="_isFile_1ietr_197",yS="_isDir_1ietr_201",_S="_canBeSelected_1ietr_207",CS="_spin_1ietr_1",ct={component:aS,local:lS,supported:cS,remote:dS,search:uS,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:pS,breadcrumbs:hS,"ls-error":"_ls-error_1ietr_108",cat:fS,message:mS,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:gS,isDir:yS,canBeSelected:_S,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:CS},vS=r.defineComponent({__name:"Shortcuts",setup(t){return(e,n)=>(r.openBlock(),r.createBlock(r.unref(vt),{class:"info",position:"southwest","max-width":"420px"},{tooltip:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass(e.$style.title)},"Shortcuts",2),n[2]||(n[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([e.$style.row,e.$style.head])},n[0]||(n[0]=[r.createElementVNode("div",null,null,-1),r.createTextVNode(),r.createElementVNode("div",null,"MacOS",-1),r.createTextVNode(),r.createElementVNode("div",null,"Windows/Linux",-1)]),2),n[3]||(n[3]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([e.$style.row,e.$style.body])},n[1]||(n[1]=[r.createElementVNode("div",null,"Single File",-1),r.createTextVNode(),r.createElementVNode("div",null,"Click the file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Click the file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Adjacent multiple files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Shift, click first and last files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Shift, click first and last files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Non-adjacent multiple files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),r.createTextVNode(),r.createElementVNode("div",null,"Hold Ctrl, click each file",-1),r.createTextVNode(),r.createElementVNode("div",null,"All files",-1),r.createTextVNode(),r.createElementVNode("div",null,"Press Command (⌘) + A",-1),r.createTextVNode(),r.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),wS="_title_14dct_2",bS="_row_14dct_10",xS="_head_14dct_30",kS="_body_14dct_58",SS={title:wS,row:bS,head:xS,body:kS},ES={$style:SS},TS=Ot(vS,[["__cssModules",ES]]),Dp=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function NS(t){return r.computed(()=>{let e=t.items;if(t.showHiddenItems||(e=e.filter(n=>!n.name.startsWith("."))),t.search){const n=t.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(n))}return e})}const Ip={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function Fp(t){return t?t.map(e=>"."+Cv(e,["."])):void 0}function VS(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(i=>i!=="").join("/")});return n}const AS=["title","onClick"],BS={key:0,class:"ls-loader"},PS=["onClick"],RS=["title"],DS=["onClick"],IS=["title"],FS=r.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(t,{expose:e}){const n=A=>A.ctrlKey||A.metaKey,o=t,i=r.reactive(Dp()),l=()=>{i.search="",i.error="",i.lastSelected=void 0},c=r.computed(()=>Fp(o.extensions)),d=NS(i),p=r.computed(()=>{var A;return{modelValue:o.modelValue,dirPath:i.dirPath,storageHandle:(A=i.storageEntry)==null?void 0:A.handle}}),h=(A,S)=>{window.platforma&&i.currentLoadingPath!==S&&(i.currentLoadingPath=S,window.platforma.lsDriver.listFiles(A,S).then(P=>{S===i.dirPath&&(i.items=Vs(P).entries.map(G=>({path:G.fullPath,name:G.name,isDir:G.type==="dir",canBeSelected:G.type==="file"&&(!c.value||c.value.some(Y=>G.fullPath.endsWith(Y))),handle:G.type==="file"?G.handle:void 0,selected:!1})).sort((G,Y)=>G.isDir&&!Y.isDir?-1:!G.isDir&&Y.isDir?1:G.name.localeCompare(Y.name)).map((G,Y)=>({id:Y,...G})),i.lastSelected=void 0)}).catch(P=>i.error=String(P)).finally(()=>{i.currentLoadingPath=void 0}))},m=()=>{l();const{storageHandle:A,dirPath:S,modelValue:P}=p.value;A&&P&&h(A,S)},y=r.computed(()=>VS(i.dirPath)),w=r.computed(()=>i.items.filter(A=>A.canBeSelected&&A.selected&&!A.isDir)),v=r.computed(()=>{var A;return w.value.length>0&&((A=i.storageEntry)==null?void 0:A.handle)}),T=()=>{var A;return{storageHandle:Vs((A=i.storageEntry)==null?void 0:A.handle),files:w.value.map(S=>S.handle)}},O=A=>{i.dirPath=A},M=(A,S)=>{const{shiftKey:P}=A,G=n(A),{lastSelected:Y}=i;if(A.preventDefault(),S.canBeSelected){if(o.multi||i.items.forEach(F=>F.selected=!1),S.selected=!S.selected,!o.multi)return;!G&&!P&&i.items.forEach(F=>{F.id!==S.id&&(F.selected=!1)}),P&&Y!==void 0&&i.items.forEach(F=>{hv(F.id,Y,S.id)&&(F.selected=!0)}),S.selected&&(i.lastSelected=S.id)}},V=A=>{A&&!o.multi||i.items.filter(S=>S.canBeSelected).forEach(S=>{S.selected=A})},U=()=>V(!0),k=()=>V(!1),W=()=>{if(l(),k(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(A=>{A=A.filter(S=>S.name!=="local"&&!S.name.startsWith("local_disk_")),i.storageOptions=A.map(S=>({text:S.name,value:S})),o.autoSelectStorage&&Cr(A[0],S=>{i.storageEntry=S})}).catch(A=>i.error=String(A))};return r.watch(r.toRef(i,"storageEntry"),A=>{l(),i.dirPath=(A==null?void 0:A.initialFullPath)??""},{immediate:!0}),r.watch([()=>i.dirPath,()=>i.storageEntry],()=>{m()}),r.watch(()=>o.modelValue,A=>{A?W():Object.assign(i,Dp())},{immediate:!0}),st(document,"keydown",A=>{if(!o.modelValue||A.target!==document.body)return;const S=n(A);S&&A.code==="KeyA"&&(A.preventDefault(),U()),S&&A.shiftKey&&A.code==="Period"&&(A.preventDefault(),i.showHiddenItems=!i.showHiddenItems),A.code==="Enter"&&o.submit()}),e({isReady:v,getFilesToImport:T}),r.onMounted(W),(A,S)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).remote),onClick:r.withModifiers(k,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(ko),{modelValue:i.storageEntry,"onUpdate:modelValue":S[0]||(S[0]=P=>i.storageEntry=P),label:"Select storage",options:i.storageOptions},null,8,["modelValue","options"])]),S[2]||(S[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(kp),{modelValue:i.search,"onUpdate:modelValue":S[1]||(S[1]=P=>i.search=P),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),S[12]||(S[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(P,G)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:G},[r.createElementVNode("div",{title:P.path,onClick:Y=>O(P.path)},r.toDisplayString(P.name),9,AS),S[3]||(S[3]=r.createTextVNode()),P.index!==y.value.length-1?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),S[5]||(S[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).selected)},[r.createElementVNode("span",null,"Selected: "+r.toDisplayString(w.value.length),1),S[4]||(S[4]=r.createTextVNode()),r.createVNode(TS)],2)],2),S[11]||(S[11]=r.createTextVNode()),i.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",BS,S[6]||(S[6]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):i.storageEntry?i.error?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(r.unref(ct)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),S[8]||(S[8]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},r.toDisplayString(i.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(ct)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d),P=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:P.id},[P.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(ct).isDir),onClick:G=>O(P.path)},[r.createVNode(r.unref(qr),{name:"chevron-right"}),S[9]||(S[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:P.name},[r.createTextVNode(r.toDisplayString(P.name),1)],8,RS)),[[r.unref(Ip)]])],10,PS)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(ct).canBeSelected]:P.canBeSelected,[r.unref(ct).selected]:P.selected}),onClick:r.withModifiers(G=>M(G,P),["stop"])},[r.createVNode(r.unref(Wt),{name:"box",class:r.normalizeClass(r.unref(ct).isFile)},null,8,["class"]),S[10]||(S[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:P.name},[r.createTextVNode(r.toDisplayString(P.name),1)],8,IS)),[[r.unref(Ip)]])],10,DS))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(ct)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},"Select storage to preview",2)],2))],2)],2))}}),LS={key:1,class:"alert-error"},OS=r.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(t){const e=t,n=r.reactive({error:void 0}),o=r.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),i=async c=>{var d,p,h;const m=(p=(d=window.platforma)==null?void 0:d.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=Fp(e.extensions),w=await Promise.all([...((h=c.dataTransfer)==null?void 0:h.files)??[]].filter(v=>!!v).filter(v=>y?y.some(T=>v.name.endsWith(T)):!0).map(v=>m(v)));w.length&&e.importFiles({files:w})},l=async()=>{var c,d;const p=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=window.platforma)==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:p}).then(({files:h})=>{h&&e.importFiles({files:h})}).catch(h=>n.error=h):(d=window.platforma)==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:h})=>{h&&e.importFiles({files:[h]})}).catch(h=>n.error=h)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).local),onDrop:i,onDragover:d[0]||(d[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(Os),{name:"cloud-upload"}),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),d[2]||(d[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(ct).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),d[3]||(d[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",LS,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),MS={style:{margin:"0 24px"}},Lp=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,i=r.ref("local"),l=r.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],d=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),h=()=>{var y,w;(y=p.value)!=null&&y.isReady&&(n("import:files",Vs((w=p.value)==null?void 0:w.getFilesToImport())),d())},m=y=>{n("import:files",y),d()};return(y,w)=>(r.openBlock(),r.createBlock(r.unref(Yl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(ct).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[w[4]||(w[4]=r.createTextVNode()),r.createElementVNode("div",MS,[r.createVNode(r.unref(_p),{modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=v=>i.value=v),options:c},null,8,["modelValue"])]),w[5]||(w[5]=r.createTextVNode()),i.value==="remote"?(r.openBlock(),r.createBlock(FS,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:h}),null,16)):r.createCommentVNode("",!0),w[6]||(w[6]=r.createTextVNode()),i.value==="local"?(r.openBlock(),r.createBlock(OS,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),w[7]||(w[7]=r.createTextVNode())]),_:2},[i.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var v;return[r.createVNode(r.unref(Fs),{style:{"min-width":"160px"},disabled:!((v=r.unref(p))!=null&&v.isReady),onClick:r.withModifiers(h,["stop"])},{default:r.withCtx(()=>w[1]||(w[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),w[3]||(w[3]=r.createTextVNode()),r.createVNode(r.unref(Hr),{"justify-center":!1,onClick:r.withModifiers(d,["stop"])},{default:r.withCtx(()=>w[2]||(w[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var Ge;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var Xl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Xl||(Xl={}));const le=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},te=Ge.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"]),$S=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class jt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};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},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const Eo=(t,e)=>{let n;switch(t.code){case te.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ge.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case te.invalid_union:n="Invalid input";break;case te.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case te.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:n="Invalid function arguments";break;case te.invalid_return_type:n="Invalid function return type";break;case te.invalid_date:n="Invalid date";break;case te.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}"`:Ge.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case te.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 te.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 te.custom:n="Invalid input";break;case te.invalid_intersection_types:n="Intersection results could not be merged";break;case te.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ge.assertNever(t)}return{message:n}};let Op=Eo;function GS(t){Op=t}function zs(){return Op}const Us=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},zS=[];function se(t,e){const n=zs(),o=Us({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Eo?void 0:Eo].filter(i=>!!i)});t.common.issues.push(o)}class kt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return kt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return xe;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const xe=Object.freeze({status:"aborted"}),Zs=t=>({status:"dirty",value:t}),At=t=>({status:"valid",value:t}),Jl=t=>t.status==="aborted",Ql=t=>t.status==="dirty",ki=t=>t.status==="valid",Si=t=>typeof Promise<"u"&&t instanceof Promise;function Ws(t,e,n,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 Mp(t,e,n,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,n),n}var fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));var Ei,Ti;class Mn{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,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 $p=(t,e)=>{if(ki(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 jt(t.common.issues);return this._error=n,this._error}}};function Ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||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:(l,c)=>{var d,p;const{message:h}=t;return l.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=h??n)!==null&&p!==void 0?p:c.defaultError}},description:i}}class Re{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 xr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Si(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 o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},l=this._parseSync({data:e,path:i.path,parent:i});return $p(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={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:xr(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(Si(i)?i:Promise.resolve(i));return $p(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:te.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new yn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Gn.create(this,this._def)}nullable(){return Nr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this,this._def)}promise(){return Ao.create(this,this._def)}or(e){return Bi.create([this,e],this._def)}and(e){return Pi.create(this,e,this._def)}transform(e){return new yn({...Ae(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Li({...Ae(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new nc({typeName:we.ZodBranded,type:this,...Ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Oi({...Ae(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Mi.create(this,e)}readonly(){return $i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const US=/^c[^\s-]{8,}$/i,ZS=/^[0-9a-z]+$/,WS=/^[0-9A-HJKMNP-TV-Z]{26}$/,jS=/^[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,HS=/^[a-z0-9_-]{21}$/i,qS=/^[-+]?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)?)??$/,KS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,YS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ec;const XS=/^(?:(?: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])$/,JS=/^(([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})))$/,QS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gp="((\\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])))",eE=new RegExp(`^${Gp}$`);function zp(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 tE(t){return new RegExp(`^${zp(t)}$`)}function Up(t){let e=`${Gp}T${zp(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 nE(t,e){return!!((e==="v4"||!e)&&XS.test(t)||(e==="v6"||!e)&&JS.test(t))}class mn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.string,received:i.parsedType}),xe}const n=new kt;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")KS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ec||(ec=new RegExp(YS,"u")),ec.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")jS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")HS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")US.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")ZS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")WS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:te.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:te.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.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),se(o,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Up(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?eE.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?tE(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?qS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?nE(e.data,i.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?QS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:te.invalid_string,message:i.message}),n.dirty()):Ge.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:te.invalid_string,...fe.errToObj(o)})}_addCheck(e){return new mn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.errToObj(e)})}datetime(e){var n,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:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...fe.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,...fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mn({...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}}mn.create=t=>{var e;return new mn({checks:[],typeName:we.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function rE(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class kr extends Re{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)!==le.number){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.number,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="int"?Ge.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.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)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?rE(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_finite,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new kr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new kr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Ge.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}kr.create=t=>new kr({checks:[],typeName:we.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class Sr extends Re{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)!==le.bigint){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.bigint,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.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)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ge.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new Sr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new Sr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.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}}Sr.create=t=>{var e;return new Sr({checks:[],typeName:we.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};class Ni extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.boolean,received:n.parsedType}),xe}return At(e.data)}}Ni.create=t=>new Ni({typeName:we.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class Yr extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.date,received:i.parsedType}),xe}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_date}),xe}const n=new kt;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Ge.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Yr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.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}}Yr.create=t=>new Yr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:we.ZodDate,...Ae(t)});class js extends Re{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.symbol,received:n.parsedType}),xe}return At(e.data)}}js.create=t=>new js({typeName:we.ZodSymbol,...Ae(t)});class Vi extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.undefined,received:n.parsedType}),xe}return At(e.data)}}Vi.create=t=>new Vi({typeName:we.ZodUndefined,...Ae(t)});class Ai extends Re{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.null,received:n.parsedType}),xe}return At(e.data)}}Ai.create=t=>new Ai({typeName:we.ZodNull,...Ae(t)});class To extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}To.create=t=>new To({typeName:we.ZodAny,...Ae(t)});class Xr extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}Xr.create=t=>new Xr({typeName:we.ZodUnknown,...Ae(t)});class Jn extends Re{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.never,received:n.parsedType}),xe}}Jn.create=t=>new Jn({typeName:we.ZodNever,...Ae(t)});class Hs extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.void,received:n.parsedType}),xe}return At(e.data)}}Hs.create=t=>new Hs({typeName:we.ZodVoid,...Ae(t)});class gn extends Re{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==le.array)return se(n,{code:te.invalid_type,expected:le.array,received:n.parsedType}),xe;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(se(n,{code:c?te.too_big:te.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(se(n,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(se(n,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new Mn(n,c,n.path,d)))).then(c=>kt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new Mn(n,c,n.path,d)));return kt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new gn({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new gn({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new gn({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}gn.create=(t,e)=>new gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ae(e)});function No(t){if(t instanceof nt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Gn.create(No(o))}return new nt({...t._def,shape:()=>e})}else return t instanceof gn?new gn({...t._def,type:No(t.element)}):t instanceof Gn?Gn.create(No(t.unwrap())):t instanceof Nr?Nr.create(No(t.unwrap())):t instanceof $n?$n.create(t.items.map(e=>No(e))):t}class nt extends Re{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=Ge.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:te.invalid_type,expected:le.object,received:p.parsedType}),xe}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Jn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const d=[];for(const p of l){const h=i[p],m=o.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Mn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Jn){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")c.length>0&&(se(o,{code:te.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const h of c){const m=o.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Mn(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of d){const m=await h.key,y=await h.value;p.push({key:m,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>kt.mergeObjectSync(n,p)):kt.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=fe.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const n={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}omit(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}deepPartial(){return No(this)}partial(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new nt({...this._def,shape:()=>n})}required(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Gn;)i=i._def.innerType;n[o]=i}}),new nt({...this._def,shape:()=>n})}keyof(){return Zp(Ge.objectKeys(this.shape))}}nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)}),nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)}),nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:Jn.create(),typeName:we.ZodObject,...Ae(e)});class Bi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new jt(d.ctx.common.issues));return se(n,{code:te.invalid_union,unionErrors:c}),xe}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new jt(p));return se(n,{code:te.invalid_union,unionErrors:d}),xe}}get options(){return this._def.options}}Bi.create=(t,e)=>new Bi({options:t,typeName:we.ZodUnion,...Ae(e)});const Er=t=>t instanceof Di?Er(t.schema):t instanceof yn?Er(t.innerType()):t instanceof Ii?[t.value]:t instanceof Tr?t.options:t instanceof Fi?Ge.objectValues(t.enum):t instanceof Li?Er(t._def.innerType):t instanceof Vi?[void 0]:t instanceof Ai?[null]:t instanceof Gn?[void 0,...Er(t.unwrap())]:t instanceof Nr?[null,...Er(t.unwrap())]:t instanceof nc||t instanceof $i?Er(t.unwrap()):t instanceof Oi?Er(t._def.innerType):[];class qs extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:te.invalid_type,expected:le.object,received:n.parsedType}),xe;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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}):(se(n,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=Er(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new qs({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ae(o)})}}function tc(t,e){const n=xr(t),o=xr(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const i=Ge.objectKeys(e),l=Ge.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=tc(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=tc(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Pi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(Jl(l)||Jl(c))return xe;const d=tc(l.value,c.value);return d.valid?((Ql(l)||Ql(c))&&n.dirty(),{status:n.value,value:d.data}):(se(o,{code:te.invalid_intersection_types}),xe)};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(([l,c])=>i(l,c)):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}))}}Pi.create=(t,e,n)=>new Pi({left:t,right:e,typeName:we.ZodIntersection,...Ae(n)});class $n extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:te.invalid_type,expected:le.array,received:o.parsedType}),xe;if(o.data.length<this._def.items.length)return se(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Mn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(i).then(l=>kt.mergeArray(n,l)):kt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new $n({...this._def,rest:e})}}$n.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $n({items:t,typeName:we.ZodTuple,rest:null,...Ae(e)})};class Ri extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:te.invalid_type,expected:le.object,received:o.parsedType}),xe;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new Mn(o,d,o.path,d)),value:c._parse(new Mn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?kt.mergeObjectAsync(n,i):kt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Re?new Ri({keyType:e,valueType:n,typeName:we.ZodRecord,...Ae(o)}):new Ri({keyType:mn.create(),valueType:e,typeName:we.ZodRecord,...Ae(n)})}}class Ks extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:te.invalid_type,expected:le.map,received:o.parsedType}),xe;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new Mn(o,d,o.path,[h,"key"])),value:l._parse(new Mn(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ks.create=(t,e,n)=>new Ks({valueType:e,keyType:t,typeName:we.ZodMap,...Ae(n)});class Jr extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:te.invalid_type,expected:le.set,received:o.parsedType}),xe;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(se(o,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(se(o,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return xe;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new Mn(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Jr({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Jr({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Jr.create=(t,e)=>new Jr({valueType:t,minSize:null,maxSize:null,typeName:we.ZodSet,...Ae(e)});class Vo extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:te.invalid_type,expected:le.function,received:n.parsedType}),xe;function o(d,p){return Us({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,zs(),Eo].filter(h=>!!h),issueData:{code:te.invalid_arguments,argumentsError:p}})}function i(d,p){return Us({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,zs(),Eo].filter(h=>!!h),issueData:{code:te.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof Ao){const d=this;return At(async function(...p){const h=new jt([]),m=await d._def.args.parseAsync(p,l).catch(w=>{throw h.addIssue(o(p,w)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(w=>{throw h.addIssue(i(y,w)),h})})}else{const d=this;return At(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new jt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new jt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Vo({...this._def,args:$n.create(e).rest(Xr.create())})}returns(e){return new Vo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new Vo({args:e||$n.create([]).rest(Xr.create()),returns:n||Xr.create(),typeName:we.ZodFunction,...Ae(o)})}}class Di extends Re{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})}}Di.create=(t,e)=>new Di({getter:t,typeName:we.ZodLazy,...Ae(e)});class Ii extends Re{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ii.create=(t,e)=>new Ii({value:t,typeName:we.ZodLiteral,...Ae(e)});function Zp(t,e){return new Tr({values:t,typeName:we.ZodEnum,...Ae(e)})}class Tr extends Re{constructor(){super(...arguments),Ei.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Ge.joinValues(o),received:n.parsedType,code:te.invalid_type}),xe}if(Ws(this,Ei)||Mp(this,Ei,new Set(this._def.values)),!Ws(this,Ei).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:te.invalid_enum_value,options:o}),xe}return At(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 Tr.create(e,{...this._def,...n})}exclude(e,n=this._def){return Tr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ei=new WeakMap,Tr.create=Zp;class Fi extends Re{constructor(){super(...arguments),Ti.set(this,void 0)}_parse(e){const n=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const i=Ge.objectValues(n);return se(o,{expected:Ge.joinValues(i),received:o.parsedType,code:te.invalid_type}),xe}if(Ws(this,Ti)||Mp(this,Ti,new Set(Ge.getValidEnumValues(this._def.values))),!Ws(this,Ti).has(e.data)){const i=Ge.objectValues(n);return se(o,{received:o.data,code:te.invalid_enum_value,options:i}),xe}return At(e.data)}get enum(){return this._def.values}}Ti=new WeakMap,Fi.create=(t,e)=>new Fi({values:t,typeName:we.ZodNativeEnum,...Ae(e)});class Ao extends Re{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:te.invalid_type,expected:le.promise,received:n.parsedType}),xe;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return At(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ao.create=(t,e)=>new Ao({type:t,typeName:we.ZodPromise,...Ae(e)});class yn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?xe:p.status==="dirty"||n.value==="dirty"?Zs(p.value):p});{if(n.value==="aborted")return xe;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"||n.value==="dirty"?Zs(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ki(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ki(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);Ge.assertNever(i)}}yn.create=(t,e,n)=>new yn({schema:t,typeName:we.ZodEffects,effect:e,...Ae(n)}),yn.createWithPreprocess=(t,e,n)=>new yn({schema:e,effect:{type:"preprocess",transform:t},typeName:we.ZodEffects,...Ae(n)});class Gn extends Re{_parse(e){return this._getType(e)===le.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gn.create=(t,e)=>new Gn({innerType:t,typeName:we.ZodOptional,...Ae(e)});class Nr extends Re{_parse(e){return this._getType(e)===le.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Nr.create=(t,e)=>new Nr({innerType:t,typeName:we.ZodNullable,...Ae(e)});class Li extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:we.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class Oi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Si(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Oi.create=(t,e)=>new Oi({innerType:t,typeName:we.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class Ys extends Re{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Ys.create=t=>new Ys({typeName:we.ZodNaN,...Ae(t)});const oE=Symbol("zod_brand");class nc extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mi extends Re{_parse(e){const{status:n,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"?xe:i.status==="dirty"?(n.dirty(),Zs(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"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new Mi({in:e,out:n,typeName:we.ZodPipeline})}}class $i extends Re{_parse(e){const n=this._def.innerType._parse(e),o=i=>(ki(i)&&(i.value=Object.freeze(i.value)),i);return Si(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}$i.create=(t,e)=>new $i({innerType:t,typeName:we.ZodReadonly,...Ae(e)});function Wp(t,e={},n){return t?To.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):To.create()}const iE={object:nt.lazycreate};var we;(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"})(we||(we={}));const sE=(t,e={message:`Input not instance of ${t.name}`})=>Wp(n=>n instanceof t,e),jp=mn.create,Hp=kr.create,aE=Ys.create,lE=Sr.create,qp=Ni.create,cE=Yr.create,dE=js.create,uE=Vi.create,pE=Ai.create,hE=To.create,fE=Xr.create,mE=Jn.create,gE=Hs.create,yE=gn.create,_E=nt.create,CE=nt.strictCreate,vE=Bi.create,wE=qs.create,bE=Pi.create,xE=$n.create,kE=Ri.create,SE=Ks.create,EE=Jr.create,TE=Vo.create,NE=Di.create,VE=Ii.create,AE=Tr.create,BE=Fi.create,PE=Ao.create,Kp=yn.create,RE=Gn.create,DE=Nr.create,IE=yn.createWithPreprocess,FE=Mi.create;var zn=Object.freeze({__proto__:null,defaultErrorMap:Eo,setErrorMap:GS,getErrorMap:zs,makeIssue:Us,EMPTY_PATH:zS,addIssueToContext:se,ParseStatus:kt,INVALID:xe,DIRTY:Zs,OK:At,isAborted:Jl,isDirty:Ql,isValid:ki,isAsync:Si,get util(){return Ge},get objectUtil(){return Xl},ZodParsedType:le,getParsedType:xr,ZodType:Re,datetimeRegex:Up,ZodString:mn,ZodNumber:kr,ZodBigInt:Sr,ZodBoolean:Ni,ZodDate:Yr,ZodSymbol:js,ZodUndefined:Vi,ZodNull:Ai,ZodAny:To,ZodUnknown:Xr,ZodNever:Jn,ZodVoid:Hs,ZodArray:gn,ZodObject:nt,ZodUnion:Bi,ZodDiscriminatedUnion:qs,ZodIntersection:Pi,ZodTuple:$n,ZodRecord:Ri,ZodMap:Ks,ZodSet:Jr,ZodFunction:Vo,ZodLazy:Di,ZodLiteral:Ii,ZodEnum:Tr,ZodNativeEnum:Fi,ZodPromise:Ao,ZodEffects:yn,ZodTransformer:yn,ZodOptional:Gn,ZodNullable:Nr,ZodDefault:Li,ZodCatch:Oi,ZodNaN:Ys,BRAND:oE,ZodBranded:nc,ZodPipeline:Mi,ZodReadonly:$i,custom:Wp,Schema:Re,ZodSchema:Re,late:iE,get ZodFirstPartyTypeKind(){return we},coerce:{string:t=>mn.create({...t,coerce:!0}),number:t=>kr.create({...t,coerce:!0}),boolean:t=>Ni.create({...t,coerce:!0}),bigint:t=>Sr.create({...t,coerce:!0}),date:t=>Yr.create({...t,coerce:!0})},any:hE,array:yE,bigint:lE,boolean:qp,date:cE,discriminatedUnion:wE,effect:Kp,enum:AE,function:TE,instanceof:sE,intersection:bE,lazy:NE,literal:VE,map:SE,nan:aE,nativeEnum:BE,never:mE,null:pE,nullable:DE,number:Hp,object:_E,oboolean:()=>qp().optional(),onumber:()=>Hp().optional(),optional:RE,ostring:()=>jp().optional(),pipeline:FE,preprocess:IE,promise:PE,record:kE,set:EE,strictObject:CE,string:jp,symbol:dE,transformer:Kp,tuple:xE,undefined:uE,union:vE,unknown:fE,void:gE,NEVER:xe,ZodIssueCode:te,quotelessJson:$S,ZodError:jt});function LE(t){throw new Error("Unexpected object: "+t)}const Yp="upload://upload/",Xp="index://index/";function OE(t){return t.startsWith(Yp)}function ME(t){return t.startsWith(Xp)}function Jp(t){if(ME(t)){const e=t.slice(Xp.length);return JSON.parse(decodeURIComponent(e)).path}else if(OE(t)){const e=t.slice(Yp.length);return JSON.parse(decodeURIComponent(e)).localPath}LE(t)}function $E(t){return t.replace(/^.*[\\/]/,"")}function GE(t){return $E(Jp(t))}zn.object({__isRef:zn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:zn.string().describe("Upstream block id"),name:zn.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();const zE=zn.object({type:zn.string(),importance:zn.number().optional(),id:zn.string().optional(),label:zn.string()});zn.array(zE);const UE={key:0,ref:"label"},ZE={key:0,class:"required-icon"},WE=["data-placeholder"],jE={key:5,class:"pl-file-input__stats"},HE={key:0,class:"pl-file-input__error"},qE={key:1,class:"pl-file-input__helper"},Qp=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),i=e,l=t,c=(k,W)=>{if(k)try{return W(k)}catch(A){return n.error=A instanceof Error?A.message:String(A),k}},d=r.computed(()=>c(l.modelValue,GE)),p=r.computed(()=>c(l.modelValue,Jp)),h=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),w=r.computed(()=>!!y.value),v=r.computed(()=>{const{status:k,done:W}=l.progress??{};return!k||!k.bytesTotal?"":k.bytesProcessed&&!W?Al(k.bytesProcessed,{})+" / "+Al(k.bytesTotal,{}):Al(k.bytesTotal,{})}),T=r.computed(()=>{var k;const{progress:W}=l;return W?{width:W.done?"100%":Math.round((((k=W.status)==null?void 0:k.progress)??0)*100)+"%"}:{}}),O=()=>{n.fileDialogOpen=!0},M=k=>{k.files.length&&i("update:modelValue",k.files[0])},V=()=>i("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const U=r.ref();return l.cellStyle||Xn(U),(k,W)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!k.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:U,class:r.normalizeClass(["pl-file-input",{dashed:k.dashed,error:w.value}]),tabindex:"0",onKeyup:r.withKeys(O,["enter"]),onClick:r.withModifiers(O,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(T.value)},null,4),W[3]||(W[3]=r.createTextVNode()),!k.cellStyle&&k.label?(r.openBlock(),r.createElementBlock("label",UE,[k.required?(r.openBlock(),r.createElementBlock("i",ZE)):r.createCommentVNode("",!0),W[1]||(W[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(k.label),1),W[2]||(W[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(k.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),W[4]||(W[4]=r.createTextVNode()),w.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:1,name:"restart"})):h.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(ut),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(ut),{key:4,name:"paper-clip"})),W[5]||(W[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":k.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(d.value),9,WE),W[6]||(W[6]=r.createTextVNode()),v.value?(r.openBlock(),r.createElementBlock("div",jE,r.toDisplayString(v.value),1)):r.createCommentVNode("",!0),W[7]||(W[7]=r.createTextVNode()),k.modelValue?(r.openBlock(),r.createBlock(r.unref(ut),{key:6,name:"close",onClick:r.withModifiers(V,["stop"])})):r.createCommentVNode("",!0),W[8]||(W[8]=r.createTextVNode()),r.createVNode(br,{class:"pl-file-input__contour"})],34),W[9]||(W[9]=r.createTextVNode()),w.value?(r.openBlock(),r.createElementBlock("div",HE,r.toDisplayString(y.value),1)):k.helper?(r.openBlock(),r.createElementBlock("div",qE,r.toDisplayString(k.helper),1)):r.createCommentVNode("",!0)],2),W[10]||(W[10]=r.createTextVNode()),r.createVNode(r.unref(Lp),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":W[0]||(W[0]=A=>n.fileDialogOpen=A),extensions:k.extensions,title:k.fileDialogTitle,"close-on-outside-click":k.fileDialogCloseOnOutsideClick,"onImport:files":M},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),KE={class:"pl-notification-alert__wrapper d-flex text-s"},YE={class:"pl-notification-alert__content flex-grow-1"},XE={key:0,class:"pl-notification-alert__close"},JE={key:0,class:"pl-notification-alert__actions d-flex"},eh=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 o(){e.closable&&(n.value=!1)}return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${i.width}`})},[r.createElementVNode("div",KE,[r.createElementVNode("div",YE,[r.renderSlot(i.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),i.closable?(r.openBlock(),r.createElementBlock("div",XE,[r.createVNode(r.unref(Hr),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),i.$slots.actions?(r.openBlock(),r.createElementBlock("div",JE,[r.renderSlot(i.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),QE=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function St(t,e,n){return e>t?e:t>n?n:t}const rc=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:i}=t.value;let l=n;for(;l<o;){l+=i;const c=(1-(St(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),e1={class:"ui-slider__wrapper"},t1={class:"ui-slider__label-section"},n1={key:0,class:"text-s"},r1={key:1,class:"ui-slider__value-static text-s"},o1={class:"ui-slider__base"},i1={class:"ui-slider__container"},s1={class:"ui-slider__container ui-slider__container-thumb"},a1={class:"ui-slider__input-wrapper d-flex"},l1=["value"],c1={key:0,class:"ui-slider__error"},th=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(),o=e,i=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>i.max-i.min),d=r.computed(()=>St((i.modelValue??0)+l.deltaValue,i.min,i.max)),p=r.ref(i.modelValue),h=r.computed(()=>{const A=i.modelValue;return Number.isFinite(A)?A<i.min?`Min value: ${i.min}`:A>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),m=r.computed(()=>i),y=rc(m),w=r.computed(()=>(d.value-i.min)/c.value),v=r.computed(()=>({right:Math.ceil((1-w.value)*100)+"%"})),T=r.computed(()=>({right:`calc(${Math.ceil((1-w.value)*100)}%) `})),O=r.ref(),M=r.ref();r.watch(()=>i.modelValue,A=>{p.value=A});function V(A){const S=St(A,i.min,i.max);return Math.round((S+Number.EPSILON)*(1/i.step))/(1/i.step)}vr(M,A=>{var S;Ct((S=r.unref(O))==null?void 0:S.getBoundingClientRect(),P=>{const{dx:G}=A;l.deltaValue=G/P.width*c.value,p.value=V(St((i.modelValue??0)+l.deltaValue,i.min,i.max)),A.stop&&(o("update:modelValue",V(d.value)),l.deltaValue=0)})});function U(A){o("update:modelValue",V(A))}function k(A){U(+A.target.value)}function W(A){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const S=A.code==="ArrowUp"||A.code==="ArrowRight"?i.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?i.step*-1:0;U(i.modelValue+S)}return(A,S)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",e1,[r.createElementVNode("div",t1,[A.label?(r.openBlock(),r.createElementBlock("label",n1,[r.createElementVNode("span",null,r.toDisplayString(A.label),1),S[1]||(S[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),S[2]||(S[2]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",r1,r.toDisplayString(p.value)+r.toDisplayString(A.measure),1)):r.createCommentVNode("",!0)]),S[6]||(S[6]=r.createTextVNode()),r.createElementVNode("div",o1,[r.createElementVNode("div",i1,[r.createElementVNode("div",{ref_key:"barRef",ref:O,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(v.value)},null,4)],512)]),S[5]||(S[5]=r.createTextVNode()),r.createElementVNode("div",s1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(P,G)=>(r.openBlock(),r.createElementBlock("div",{key:G,style:r.normalizeStyle({right:`${P}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),S[4]||(S[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:M,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(T.value),onKeydown:W},S[3]||(S[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),S[7]||(S[7]=r.createTextVNode()),r.createElementVNode("div",a1,[i.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:S[0]||(S[0]=P=>k(P))},null,40,l1)):r.createCommentVNode("",!0)])],2),S[8]||(S[8]=r.createTextVNode()),h.value?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],2))}});function d1(t,e=null,n=null){function o(d){const{scrollTop:p,scrollHeight:h,clientHeight:m}=d;if(!(h>m)||!e)return null;const y=h-p-m,w=p>e?e:0,v=y>e?m-e-w:m;return`linear-gradient(
|
|
54
54
|
to bottom,
|
|
55
55
|
transparent,
|
|
56
56
|
black ${w}px,
|
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
black ${w}px,
|
|
63
63
|
black ${v}px,
|
|
64
64
|
transparent 100%
|
|
65
|
-
)`}function l(){const d=t.value;if(!d)return;const p=[o(d),i(d)].filter(h=>h!==null);d.style.setProperty("-webkit-mask-image",p.join(",")),d.style.setProperty("mask-image",p.join(",")),p.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=Il(l);r.onMounted(l),st(window,"scroll",c,!0),st(window,"resize",c,!0)}function eh(t,e){yp(()=>{Ct(r.unref(t),n=>{_p(n,()=>e(n))})}),r.onUnmounted(()=>{Ct(r.unref(t),n=>{Cp(n)})})}const Nr={item:"sortable__item",animate:"sortable__animate"},Gi=t=>t.getBoundingClientRect().y,th=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},a1=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function nh(t,e){const n={item:void 0,options(){var v;return[...((v=t.value)==null?void 0:v.children)??[]]}},o=r.computed(()=>n.options()),i=e.shakeBuffer??10,l=e.reorderDelay??100;function c(v){const T=e.handle?this.querySelector(e.handle):null;T&&(T&&!T.contains(v.target)||(this.classList.remove(Nr.animate),this.classList.add(Nr.item),n.item={el:this,y:v.y,dy:0,orderChanged:!1}))}function d(v){const T=n.options();return T.slice(0,T.indexOf(v))}function p(v){const T=n.options();return T.slice(T.indexOf(v)+1)}function h(v,T){const O=n.options().filter(x=>x!==T),M=O.indexOf(v);return O.splice(M,0,T),O}function m(v,T){const O=n.options().filter(x=>x!==T),M=O.indexOf(v);return O.splice(M+1,0,T),O}function y(v,T){v.dy=T-v.y,v.el.style.setProperty("transform",`translateY(${v.dy}px)`)}function w(v){var T;if(!n.item)return;const{el:O}=n.item;if(!O.isConnected){n.item=void 0;return}const M=v.map(S=>Gi(S)),x=Gi(O);(T=t.value)==null||T.replaceChildren(...v);const Z=Gi(O),V=v.map(S=>Gi(S)),H=[];for(let S=0;S<V.length;S++){const P=v[S];if(P===n.item.el)continue;const G=V[S],Y=M[S]-G;P.style.transform=`translateY(${Y}px)`,H.push(P)}const A=Z-x;n.item.y=n.item.y+A,n.item.dy=n.item.dy-A,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),H.forEach(S=>S.classList.remove(Nr.animate)),requestAnimationFrame(function(){H.forEach(S=>{S.classList.add(Nr.animate),S.style.transform="",S.addEventListener("transitionend",()=>{S.classList.remove(Nr.animate)})})})}st(window,"mousemove",v=>{if(!n.item)return;const{el:T}=n.item;y(n.item,v.y);const O=Gi(n.item.el),M=a1(n.item.el),x=d(T),Z=p(T);x.forEach(V=>{const H=th(V);O+i<H&&w(h(V,T))}),Z.forEach(V=>{const H=th(V);M-i>H&&w(m(V,T))})}),st(window,"mouseup",()=>{if(!n.item)return;const{el:v,orderChanged:T}=n.item;v.classList.add(Nr.animate),v.style.removeProperty("transform"),v.addEventListener("transitionend",()=>{v.classList.remove(Nr.animate,Nr.item)}),setTimeout(()=>{if(!T)return;const O=n.options().map(x=>Number(x.getAttribute("data-index"))),M=t.value;if(M){for(const x of n.options())M.removeChild(x);o.value.forEach(x=>{M.appendChild(x)})}e.onChange(O)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((v,T)=>{v.removeEventListener("mousedown",c),v.addEventListener("mousedown",c),v.setAttribute("data-index",String(T))})})}function l1(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function c1(t,e,n){const o=r.reactive({data:Vl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,i=>{o.changed?n(Vl.deepClone(i)):o.changed=!0},{deep:!0}),r.watch(t,i=>{Object.assign(o,{data:Vl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function d1(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(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return Nv(()=>{const i=n();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function u1(t,e){function n(c,d){const p=r.unref(t);if(!p)return;const h=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;p.style.setProperty("transform",h),e(d)}function o(c){const d=p=>n(c,p);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",d),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 c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(i),r.onUnmounted(l)}const p1={class:"ui-slider__wrapper"},h1={class:"ui-slider__label-section"},f1={key:0,class:"text-s"},m1={class:"ui-slider__base"},g1={class:"ui-slider__container"},y1={class:"ui-slider__container ui-slider__container-thumb"},_1=["data-percent"],C1=["data-percent"],v1=["data-percent"],w1={key:0,class:"ui-slider__error"},b1=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(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.computed(()=>i.max-i.min),y=r.computed(()=>i),w=rc(y),v=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),T=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),O=r.computed(()=>St((i.modelValue[2]??0)+l.deltaValue3,i.min,i.max)),M=r.computed(()=>{const $=i.modelValue;if(!(Array.isArray($)&&$.length===3&&$.every(J=>Number.isFinite(J))))return"Expected model [number, number, number]";const j=[];return[...i.modelValue].forEach(J=>{J>i.max&&j.push(`Max model value must be lower than max props ${i.max}.`),J<i.min&&j.push("Min model value must be greater than max props.")}),j.length>0?j.join(" "):i.error}),x=r.computed(()=>(v.value-i.min)/m.value),Z=r.computed(()=>(T.value-i.min)/m.value),V=r.computed(()=>(O.value-i.min)/m.value),H=r.computed(()=>F()),A=r.computed(()=>({right:H.value[0]+"%",left:100-H.value[2]+"%"})),S=r.computed(()=>({right:Math.ceil((1-x.value)*100)+"%"})),P=r.computed(()=>({right:Math.ceil((1-Z.value)*100)+"%"})),G=r.computed(()=>({right:Math.ceil((1-V.value)*100)+"%"}));Cr(d,$=>{var j;Ct((j=r.unref(c))==null?void 0:j.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue1=ne/J.width*m.value,d.value&&Y(d.value,i.modelValue[0],l.deltaValue1),$.stop&&(z([U(v.value),U(T.value),U(O.value)]),l.deltaValue1=0)})}),Cr(p,$=>{var j;Ct((j=r.unref(c))==null?void 0:j.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue2=ne/J.width*m.value,p.value&&Y(p.value,i.modelValue[1],l.deltaValue2),$.stop&&(z([U(v.value),U(T.value),U(O.value)]),l.deltaValue2=0)})}),Cr(h,$=>{var j;Ct((j=r.unref(c))==null?void 0:j.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue3=ne/J.width*m.value,h.value&&Y(h.value,i.modelValue[2],l.deltaValue3),$.stop&&(z([U(v.value),U(T.value),U(O.value)]),l.deltaValue3=0)})});function Y($,j,J){const ne=U(St((j??0)+J,i.min,i.max));$.dataset.percent=`${ne}${i.measure}`,R()}function F(){const $=Math.ceil((1-x.value)*100),j=Math.ceil((1-Z.value)*100),J=Math.ceil((1-V.value)*100);return[$,j,J].sort((ne,de)=>ne-de)}function U($){const j=St($,i.min,i.max);return Math.round((j+Number.EPSILON)*(1/i.step))/(1/i.step)}function z($){o("update:modelValue",$)}function R(){const $=Number(S.value.right.substring(0,S.value.right.length-1)),j=Number(P.value.right.substring(0,P.value.right.length-1)),J=Number(G.value.right.substring(0,G.value.right.length-1)),ne=[{r:$,th:d},{r:j,th:p},{r:J,th:h}].sort((de,me)=>de.r-me.r);ne[0].th.value&&(ne[0].th.value.dataset.hint="high"),ne[1].th.value&&(ne[1].th.value.dataset.hint="mid"),ne[2].th.value&&(ne[2].th.value.dataset.hint="low")}function N($,j){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes($.code)&&$.preventDefault();const J=$.code==="ArrowUp"||$.code==="ArrowRight"?i.step*1:$.code==="ArrowDown"||$.code==="ArrowLeft"?i.step*-1:0,ne=[...i.modelValue];ne[j]=St(ne[j]+J,i.min,i.max),z(ne),R()}return r.onMounted(()=>{R()}),($,j)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",p1,[r.createElementVNode("div",h1,[$.label?(r.openBlock(),r.createElementBlock("label",f1,[r.createElementVNode("span",null,r.toDisplayString($.label),1),j[3]||(j[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot($.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),j[11]||(j[11]=r.createTextVNode()),r.createElementVNode("div",m1,[r.createElementVNode("div",g1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(A.value)},null,4)],512)]),j[10]||(j[10]=r.createTextVNode()),r.createElementVNode("div",y1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(w),(J,ne)=>(r.openBlock(),r.createElementBlock("div",{key:ne,style:r.normalizeStyle({right:`${J}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),j[7]||(j[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(S.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:j[0]||(j[0]=J=>N(J,0))},j[4]||(j[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,_1),j[8]||(j[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(P.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:j[1]||(j[1]=J=>N(J,1))},j[5]||(j[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,C1),j[9]||(j[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:r.normalizeStyle(G.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:j[2]||(j[2]=J=>N(J,2))},j[6]||(j[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,v1)])])]),j[12]||(j[12]=r.createTextVNode()),j[13]||(j[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),j[14]||(j[14]=r.createTextVNode()),M.value?(r.openBlock(),r.createElementBlock("div",w1,r.toDisplayString(M.value),1)):r.createCommentVNode("",!0)],2))}}),x1={class:"ui-input-range__separator"},k1=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,i=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),d=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>d.value,m=>(i.left=m.left)&&(i.right=m.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(m,y){const w=y.target.value;/^[0-9]{0,2}$/.test(w)?m?i.left=+w:i.right=+w:m?i.left=+w.slice(0,w.length-1):i.right=+w.slice(0,w.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=w=>d.value.left=w),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=w=>l.value=!0),onFocusout:y[2]||(y[2]=w=>l.value=!1),onInput:y[3]||(y[3]=w=>h(!0,w))},null,544),[[r.vModelText,d.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",x1,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=w=>d.value.right=w),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=w=>l.value=!0),onFocusout:y[6]||(y[6]=w=>l.value=!1),onInput:y[7]||(y[7]=w=>h(!1,w))},null,544),[[r.vModelText,d.value.right]])],16))}}),S1={class:"ui-slider__wrapper"},E1={class:"ui-slider__label-section"},T1={key:0,class:"text-s"},N1={key:1,class:"ui-slider__value-static text-s"},V1={class:"ui-slider__base"},A1={class:"ui-slider__container"},B1={class:"ui-slider__container ui-slider__container-thumb"},P1={class:"ui-slider__input-wrapper d-flex"},R1={key:0,class:"ui-slider__error"},D1=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(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(i.modelValue),m=r.ref(i.modelValue[0]),y=r.ref(i.modelValue[1]),w=r.computed(()=>i),v=rc(w),T=r.computed(()=>[m.value,y.value].sort((R,N)=>R-N).join("-")),O=r.computed(()=>i.max-i.min),M=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),x=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),Z=r.computed(()=>{const R=i.modelValue;return Array.isArray(R)&&R.length===2&&R.every(N=>Number.isFinite(N))?i.error:"Expected model [number, number]"}),V=r.computed(()=>(M.value-i.min)/O.value),H=r.computed(()=>(x.value-i.min)/O.value),A=r.computed(()=>Y()),S=r.computed(()=>({right:A.value[0]+"%",left:100-A.value[1]+"%"})),P=r.computed(()=>({right:Math.ceil((1-V.value)*100)+"%"})),G=r.computed(()=>({right:Math.ceil((1-H.value)*100)+"%"}));r.watch(()=>i.modelValue,R=>{h.value=R,m.value=+R[0],y.value=+R[1]},{immediate:!0}),Cr(d,R=>{var N;Ct((N=r.unref(c))==null?void 0:N.getBoundingClientRect(),$=>{const{dx:j}=R;l.deltaValue1=j/$.width*O.value,m.value=F(St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),h.value=[m.value,y.value].sort((J,ne)=>J-ne),R.stop&&(U([F(M.value),F(x.value)]),l.deltaValue1=0)})}),Cr(p,R=>{var N;Ct((N=r.unref(c))==null?void 0:N.getBoundingClientRect(),$=>{const{dx:j}=R;l.deltaValue2=j/$.width*O.value,y.value=F(St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),h.value=[m.value,y.value].sort((J,ne)=>J-ne),R.stop&&(U([F(M.value),F(x.value)]),l.deltaValue2=0)})});function Y(){const R=Math.ceil((1-V.value)*100),N=Math.ceil((1-H.value)*100);return[R,N].sort(($,j)=>$-j)}function F(R){const N=St(R,i.min,i.max);return Math.round((N+Number.EPSILON)*(1/i.step))/(1/i.step)}function U(R){o("update:modelValue",R)}function z(R,N){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(R.code)&&R.preventDefault();const $=R.code==="ArrowUp"||R.code==="ArrowRight"?i.step*1:R.code==="ArrowDown"||R.code==="ArrowLeft"?i.step*-1:0,j=[...i.modelValue];j[N]=St(j[N]+$,i.min,i.max),U(j)}return(R,N)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",S1,[r.createElementVNode("div",E1,[R.label?(r.openBlock(),r.createElementBlock("label",T1,[r.createElementVNode("span",null,r.toDisplayString(R.label),1),N[3]||(N[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(R.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),N[4]||(N[4]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",N1,r.toDisplayString(T.value),1)):r.createCommentVNode("",!0)]),N[10]||(N[10]=r.createTextVNode()),r.createElementVNode("div",V1,[r.createElementVNode("div",A1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(S.value)},null,4)],512)]),N[9]||(N[9]=r.createTextVNode()),r.createElementVNode("div",B1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(v),($,j)=>(r.openBlock(),r.createElementBlock("div",{key:j,style:r.normalizeStyle({right:`${$}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:N[0]||(N[0]=$=>z($,0))},N[5]||(N[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),N[8]||(N[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(G.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:N[1]||(N[1]=$=>z($,1))},N[6]||(N[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),N[11]||(N[11]=r.createTextVNode()),r.createElementVNode("div",P1,[i.mode==="input"?(r.openBlock(),r.createBlock(k1,{key:0,modelValue:h.value,"onUpdate:modelValue":N[2]||(N[2]=$=>h.value=$),class:"ui-focused-border",onChange:U},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),N[12]||(N[12]=r.createTextVNode()),Z.value?(r.openBlock(),r.createElementBlock("div",R1,r.toDisplayString(Z.value),1)):r.createCommentVNode("",!0)],2))}}),I1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientY:p.clientY},m=jl(document,"mousemove",y=>{const w=(y.clientY-h.clientY)/l.value;n("update:scrollTop",o.scrollTop+w),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),F1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientX:p.clientX},m=jl(document,"mousemove",y=>{const w=(y.clientX-h.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+w),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),L1={class:"ui-scrollable"},O1=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 o(d){Ow(n,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=d=>{d.preventDefault();const p=d.currentTarget;p.scrollTop+=d.deltaY,p.scrollLeft+=d.deltaX,o(p)};function l(d){Ct(r.unref(e),p=>{p.scrollTop=d,o(p)})}function c(d){Ct(r.unref(e),p=>{p.scrollLeft=d,o(p)})}return eh(e,d=>{Ct(d,p=>o(p))}),r.onMounted(()=>{Ct(r.unref(e),d=>{o(d),d.addEventListener("wheel",i)})}),r.onUnmounted(()=>{Ct(r.unref(e),d=>d.removeEventListener("wheel",i))}),(d,p)=>(r.openBlock(),r.createElementBlock("div",L1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[r.renderSlot(d.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(I1,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode(F1,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),M1="add.svg",$1="box.svg",G1="calendar.svg",z1="checkmark.svg",U1="clipboard.svg",Z1="close.svg",W1="copy.svg",j1="download.svg",H1="duplicate.svg",q1="edit.svg",K1="error.svg",Y1="filter.svg",X1="help.svg",J1="info.svg",Q1="link.svg",eT="loading.svg",tT="lock.svg",nT="maximize.svg",rT="minimize.svg",oT="minus.svg",iT="more.svg",sT="open.svg",aT="pause.svg",lT="play.svg",cT="renew.svg",dT="restart.svg",uT="reverse.svg",pT="settings.svg",hT="sort.svg",fT="stop.svg",mT="success.svg",gT="time.svg",yT="tune.svg",_T="warning.svg",CT="zip.svg",vT={add:M1,"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:$1,calendar:G1,"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:z1,"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:U1,close:Z1,copy:W1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:j1,"drag-dots":"drag-dots.svg",duplicate:H1,edit:q1,error:K1,export:"export.svg","filter-on":"filter-on.svg",filter:Y1,"help-outline":"help-outline.svg",help:X1,"info-outline":"info-outline.svg",info:J1,"jump-link":"jump-link.svg",link:Q1,loading:eT,lock:tT,maximize:nT,minimize:rT,minus:oT,more:iT,open:sT,"paper-clip":"paper-clip.svg",pause:aT,play:lT,renew:cT,restart:dT,reverse:uT,settings:pT,sort:hT,stop:fT,success:mT,time:gT,tune:yT,warning:_T,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:CT},wT="add.svg",bT="annotate.svg",xT="annotation.svg",kT="area.svg",ST="axes.svg",ET="bar.svg",TT="bindot.svg",NT="box.svg",VT="boxplot.svg",AT="bubble.svg",BT="calendar.svg",PT="canvas.svg",RT="checkbox.svg",DT="checkmark.svg",IT="clipboard.svg",FT="close.svg",LT="cluster.svg",OT="code.svg",MT="color.svg",$T="columns.svg",GT="container.svg",zT="cookie.svg",UT="copy.svg",ZT="cpu.svg",WT="debug.svg",jT="dna.svg",HT="download.svg",qT="duplicate.svg",KT="edit.svg",YT="error.svg",XT="filter.svg",JT="generate.svg",QT="graph.svg",eN="heatmap.svg",tN="help.svg",nN="info.svg",rN="jitter.svg",oN="lasso.svg",iN="layers.svg",sN="learn.svg",aN="legend.svg",lN="line.svg",cN="link.svg",dN="loading.svg",uN="lock.svg",pN="maximize.svg",hN="menu.svg",fN="minimize.svg",mN="minus.svg",gN="more.svg",yN="pause.svg",_N="pin.svg",CN="play.svg",vN="product.svg",wN="publications.svg",bN="renew.svg",xN="restart.svg",kN="reverse.svg",SN="search.svg",EN="server.svg",TN="settings.svg",NN="sina.svg",VN="skatterplot.svg",AN="slice.svg",BN="sort.svg",PN="statistics.svg",RN="stop.svg",DN="success.svg",IN="table.svg",FN="template.svg",LN="terminal.svg",ON="time.svg",MN="tune.svg",$N="venn.svg",GN="violin.svg",zN="warning.svg",UN="wetlab.svg",ZN="zip.svg",WN={"add-layer":"add-layer.svg",add:wT,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:bT,annotation:xT,area:kT,"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:ST,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:ET,bindot:TT,box:NT,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:VT,bubble:AT,calendar:BT,canvas:PT,"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:RT,checkmark:DT,"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:IT,close:FT,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:LT,code:OT,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:MT,columns:$T,"connected-points":"connected-points.svg",container:GT,cookie:zT,copy:UT,cpu:ZT,"data-dimentions":"data-dimentions.svg",debug:WT,"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-add":"dna-add.svg","dna-import":"dna-import.svg",dna:jT,download:HT,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:qT,edit:KT,"error-bar":"error-bar.svg",error:YT,"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","filter-on":"filter-on.svg",filter:XT,"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:JT,graph:QT,heatmap:eN,"help-outline":"help-outline.svg",help:tN,"info-outline":"info-outline.svg",info:nN,jitter:rN,"jump-link":"jump-link.svg",lasso:oN,layers:iN,learn:sN,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:aN,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:lN,"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:cN,loading:dN,lock:uN,maximize:pN,menu:hN,minimize:fN,minus:mN,more:gN,"paper-clip":"paper-clip.svg",pause:yN,pin:_N,play:CN,"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:vN,publications:wN,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:bN,restart:xN,reverse:kN,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:SN,"server-on":"server-on.svg",server:EN,settings:TN,sina:NN,skatterplot:VN,slice:AN,"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:BN,statistics:PN,stop:RN,"strip-plot":"strip-plot.svg",success:DN,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:IN,template:FN,terminal:LN,"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:ON,tune:MN,venn:$N,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:GN,warning:zN,wetlab:UN,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:ZN,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function jN(){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 HN=["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"],qN=["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-add","dna-import","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","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"],KN={allCssVariables:jN(),icons16:vT,icons24:WN},YN={class:"block__not-found"},XN=r.defineComponent({__name:"NotFound",setup(t){const n=Nl().useApp(),o=()=>{n.updateNavigationState(i=>{i.href="/"})};return(i,l)=>(r.openBlock(),r.createElementBlock("div",YN,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(Ml),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),oc=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},JN={},QN={class:"block__loader-page"};function eV(t,e){return r.openBlock(),r.createElementBlock("div",QN,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const tV=oc(JN,[["render",eV]]),nV={class:"pl-app-notification-alert"},rV={class:"pl-app-notification-alert__content"},oV={class:"pl-app-notification-alert__title"},iV=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),i=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(r.openBlock(),r.createElementBlock("div",nV,[r.createVNode(r.unref(Yl),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>d[2]||(d[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",rV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,p=>{var h;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",oV,r.toDisplayString(p[0]),1),r.createVNode(r.unref(Vp),{value:(h=p[1])==null?void 0:h.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(Jp),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(Fs),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>d[3]||(d[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(fp))]),default:r.withCtx(()=>[d[4]||(d[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),sV={key:0,class:"block__loader"},aV=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const i=e.value;if(typeof i=="number")return i>=1?void 0:(i*100).toFixed(2)+"%"});return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",sV)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),lV={class:"block block__layout"},cV={key:0},dV=r.defineComponent({__name:"BlockLayout",setup(t){const e=Nl(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),i=r.computed(()=>{if(e.loaded){const h=e.useApp(),m=n(h.snapshot.navigationState.href);return m?h.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),d=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0}),p=r.computed(()=>{var h,m;return(m=(h=l.value)==null?void 0:h.progress)==null?void 0:m.call(h)});return(h,m)=>(r.openBlock(),r.createElementBlock("div",lV,[r.createVNode(aV,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",cV,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?i.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:o.value})):(r.openBlock(),r.createBlock(XN,{key:3})):(r.openBlock(),r.createBlock(tV,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&d.value?(r.openBlock(),r.createBlock(r.unref(iV),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var Xs={exports:{}};/**
|
|
65
|
+
)`}function l(){const d=t.value;if(!d)return;const p=[o(d),i(d)].filter(h=>h!==null);d.style.setProperty("-webkit-mask-image",p.join(",")),d.style.setProperty("mask-image",p.join(",")),p.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=Il(l);r.onMounted(l),st(window,"scroll",c,!0),st(window,"resize",c,!0)}function nh(t,e){Cp(()=>{Ct(r.unref(t),n=>{vp(n,()=>e(n))})}),r.onUnmounted(()=>{Ct(r.unref(t),n=>{wp(n)})})}const Vr={item:"sortable__item",animate:"sortable__animate"},Gi=t=>t.getBoundingClientRect().y,rh=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},u1=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function oh(t,e){const n={item:void 0,options(){var v;return[...((v=t.value)==null?void 0:v.children)??[]]}},o=r.computed(()=>n.options()),i=e.shakeBuffer??10,l=e.reorderDelay??100;function c(v){const T=e.handle?this.querySelector(e.handle):null;T&&(T&&!T.contains(v.target)||(this.classList.remove(Vr.animate),this.classList.add(Vr.item),n.item={el:this,y:v.y,dy:0,orderChanged:!1}))}function d(v){const T=n.options();return T.slice(0,T.indexOf(v))}function p(v){const T=n.options();return T.slice(T.indexOf(v)+1)}function h(v,T){const O=n.options().filter(V=>V!==T),M=O.indexOf(v);return O.splice(M,0,T),O}function m(v,T){const O=n.options().filter(V=>V!==T),M=O.indexOf(v);return O.splice(M+1,0,T),O}function y(v,T){v.dy=T-v.y,v.el.style.setProperty("transform",`translateY(${v.dy}px)`)}function w(v){var T;if(!n.item)return;const{el:O}=n.item;if(!O.isConnected){n.item=void 0;return}const M=v.map(S=>Gi(S)),V=Gi(O);(T=t.value)==null||T.replaceChildren(...v);const U=Gi(O),k=v.map(S=>Gi(S)),W=[];for(let S=0;S<k.length;S++){const P=v[S];if(P===n.item.el)continue;const G=k[S],Y=M[S]-G;P.style.transform=`translateY(${Y}px)`,W.push(P)}const A=U-V;n.item.y=n.item.y+A,n.item.dy=n.item.dy-A,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),W.forEach(S=>S.classList.remove(Vr.animate)),requestAnimationFrame(function(){W.forEach(S=>{S.classList.add(Vr.animate),S.style.transform="",S.addEventListener("transitionend",()=>{S.classList.remove(Vr.animate)})})})}st(window,"mousemove",v=>{if(!n.item)return;const{el:T}=n.item;y(n.item,v.y);const O=Gi(n.item.el),M=u1(n.item.el),V=d(T),U=p(T);V.forEach(k=>{const W=rh(k);O+i<W&&w(h(k,T))}),U.forEach(k=>{const W=rh(k);M-i>W&&w(m(k,T))})}),st(window,"mouseup",()=>{if(!n.item)return;const{el:v,orderChanged:T}=n.item;v.classList.add(Vr.animate),v.style.removeProperty("transform"),v.addEventListener("transitionend",()=>{v.classList.remove(Vr.animate,Vr.item)}),setTimeout(()=>{if(!T)return;const O=n.options().map(V=>Number(V.getAttribute("data-index"))),M=t.value;if(M){for(const V of n.options())M.removeChild(V);o.value.forEach(V=>{M.appendChild(V)})}e.onChange(O)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((v,T)=>{v.removeEventListener("mousedown",c),v.addEventListener("mousedown",c),v.setAttribute("data-index",String(T))})})}function p1(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function h1(t,e,n){const o=r.reactive({data:Vl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,i=>{o.changed?n(Vl.deepClone(i)):o.changed=!0},{deep:!0}),r.watch(t,i=>{Object.assign(o,{data:Vl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function f1(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(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return Pv(()=>{const i=n();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function m1(t,e){function n(c,d){const p=r.unref(t);if(!p)return;const h=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;p.style.setProperty("transform",h),e(d)}function o(c){const d=p=>n(c,p);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",d),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 c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(i),r.onUnmounted(l)}const g1={class:"ui-slider__wrapper"},y1={class:"ui-slider__label-section"},_1={key:0,class:"text-s"},C1={class:"ui-slider__base"},v1={class:"ui-slider__container"},w1={class:"ui-slider__container ui-slider__container-thumb"},b1=["data-percent"],x1=["data-percent"],k1=["data-percent"],S1={key:0,class:"ui-slider__error"},E1=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(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.computed(()=>i.max-i.min),y=r.computed(()=>i),w=rc(y),v=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),T=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),O=r.computed(()=>St((i.modelValue[2]??0)+l.deltaValue3,i.min,i.max)),M=r.computed(()=>{const $=i.modelValue;if(!(Array.isArray($)&&$.length===3&&$.every(J=>Number.isFinite(J))))return"Expected model [number, number, number]";const H=[];return[...i.modelValue].forEach(J=>{J>i.max&&H.push(`Max model value must be lower than max props ${i.max}.`),J<i.min&&H.push("Min model value must be greater than max props.")}),H.length>0?H.join(" "):i.error}),V=r.computed(()=>(v.value-i.min)/m.value),U=r.computed(()=>(T.value-i.min)/m.value),k=r.computed(()=>(O.value-i.min)/m.value),W=r.computed(()=>F()),A=r.computed(()=>({right:W.value[0]+"%",left:100-W.value[2]+"%"})),S=r.computed(()=>({right:Math.ceil((1-V.value)*100)+"%"})),P=r.computed(()=>({right:Math.ceil((1-U.value)*100)+"%"})),G=r.computed(()=>({right:Math.ceil((1-k.value)*100)+"%"}));vr(d,$=>{var H;Ct((H=r.unref(c))==null?void 0:H.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue1=ne/J.width*m.value,d.value&&Y(d.value,i.modelValue[0],l.deltaValue1),$.stop&&(z([Z(v.value),Z(T.value),Z(O.value)]),l.deltaValue1=0)})}),vr(p,$=>{var H;Ct((H=r.unref(c))==null?void 0:H.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue2=ne/J.width*m.value,p.value&&Y(p.value,i.modelValue[1],l.deltaValue2),$.stop&&(z([Z(v.value),Z(T.value),Z(O.value)]),l.deltaValue2=0)})}),vr(h,$=>{var H;Ct((H=r.unref(c))==null?void 0:H.getBoundingClientRect(),J=>{const{dx:ne}=$;l.deltaValue3=ne/J.width*m.value,h.value&&Y(h.value,i.modelValue[2],l.deltaValue3),$.stop&&(z([Z(v.value),Z(T.value),Z(O.value)]),l.deltaValue3=0)})});function Y($,H,J){const ne=Z(St((H??0)+J,i.min,i.max));$.dataset.percent=`${ne}${i.measure}`,R()}function F(){const $=Math.ceil((1-V.value)*100),H=Math.ceil((1-U.value)*100),J=Math.ceil((1-k.value)*100);return[$,H,J].sort((ne,de)=>ne-de)}function Z($){const H=St($,i.min,i.max);return Math.round((H+Number.EPSILON)*(1/i.step))/(1/i.step)}function z($){o("update:modelValue",$)}function R(){const $=Number(S.value.right.substring(0,S.value.right.length-1)),H=Number(P.value.right.substring(0,P.value.right.length-1)),J=Number(G.value.right.substring(0,G.value.right.length-1)),ne=[{r:$,th:d},{r:H,th:p},{r:J,th:h}].sort((de,me)=>de.r-me.r);ne[0].th.value&&(ne[0].th.value.dataset.hint="high"),ne[1].th.value&&(ne[1].th.value.dataset.hint="mid"),ne[2].th.value&&(ne[2].th.value.dataset.hint="low")}function N($,H){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes($.code)&&$.preventDefault();const J=$.code==="ArrowUp"||$.code==="ArrowRight"?i.step*1:$.code==="ArrowDown"||$.code==="ArrowLeft"?i.step*-1:0,ne=[...i.modelValue];ne[H]=St(ne[H]+J,i.min,i.max),z(ne),R()}return r.onMounted(()=>{R()}),($,H)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",g1,[r.createElementVNode("div",y1,[$.label?(r.openBlock(),r.createElementBlock("label",_1,[r.createElementVNode("span",null,r.toDisplayString($.label),1),H[3]||(H[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot($.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),H[11]||(H[11]=r.createTextVNode()),r.createElementVNode("div",C1,[r.createElementVNode("div",v1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(A.value)},null,4)],512)]),H[10]||(H[10]=r.createTextVNode()),r.createElementVNode("div",w1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(w),(J,ne)=>(r.openBlock(),r.createElementBlock("div",{key:ne,style:r.normalizeStyle({right:`${J}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),H[7]||(H[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(S.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:H[0]||(H[0]=J=>N(J,0))},H[4]||(H[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,b1),H[8]||(H[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(P.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:H[1]||(H[1]=J=>N(J,1))},H[5]||(H[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,x1),H[9]||(H[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:r.normalizeStyle(G.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:H[2]||(H[2]=J=>N(J,2))},H[6]||(H[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,k1)])])]),H[12]||(H[12]=r.createTextVNode()),H[13]||(H[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),H[14]||(H[14]=r.createTextVNode()),M.value?(r.openBlock(),r.createElementBlock("div",S1,r.toDisplayString(M.value),1)):r.createCommentVNode("",!0)],2))}}),T1={class:"ui-input-range__separator"},N1=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,i=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),d=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>d.value,m=>(i.left=m.left)&&(i.right=m.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(m,y){const w=y.target.value;/^[0-9]{0,2}$/.test(w)?m?i.left=+w:i.right=+w:m?i.left=+w.slice(0,w.length-1):i.right=+w.slice(0,w.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=w=>d.value.left=w),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=w=>l.value=!0),onFocusout:y[2]||(y[2]=w=>l.value=!1),onInput:y[3]||(y[3]=w=>h(!0,w))},null,544),[[r.vModelText,d.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",T1,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=w=>d.value.right=w),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=w=>l.value=!0),onFocusout:y[6]||(y[6]=w=>l.value=!1),onInput:y[7]||(y[7]=w=>h(!1,w))},null,544),[[r.vModelText,d.value.right]])],16))}}),V1={class:"ui-slider__wrapper"},A1={class:"ui-slider__label-section"},B1={key:0,class:"text-s"},P1={key:1,class:"ui-slider__value-static text-s"},R1={class:"ui-slider__base"},D1={class:"ui-slider__container"},I1={class:"ui-slider__container ui-slider__container-thumb"},F1={class:"ui-slider__input-wrapper d-flex"},L1={key:0,class:"ui-slider__error"},O1=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(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(i.modelValue),m=r.ref(i.modelValue[0]),y=r.ref(i.modelValue[1]),w=r.computed(()=>i),v=rc(w),T=r.computed(()=>[m.value,y.value].sort((R,N)=>R-N).join("-")),O=r.computed(()=>i.max-i.min),M=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),V=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),U=r.computed(()=>{const R=i.modelValue;return Array.isArray(R)&&R.length===2&&R.every(N=>Number.isFinite(N))?i.error:"Expected model [number, number]"}),k=r.computed(()=>(M.value-i.min)/O.value),W=r.computed(()=>(V.value-i.min)/O.value),A=r.computed(()=>Y()),S=r.computed(()=>({right:A.value[0]+"%",left:100-A.value[1]+"%"})),P=r.computed(()=>({right:Math.ceil((1-k.value)*100)+"%"})),G=r.computed(()=>({right:Math.ceil((1-W.value)*100)+"%"}));r.watch(()=>i.modelValue,R=>{h.value=R,m.value=+R[0],y.value=+R[1]},{immediate:!0}),vr(d,R=>{var N;Ct((N=r.unref(c))==null?void 0:N.getBoundingClientRect(),$=>{const{dx:H}=R;l.deltaValue1=H/$.width*O.value,m.value=F(St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),h.value=[m.value,y.value].sort((J,ne)=>J-ne),R.stop&&(Z([F(M.value),F(V.value)]),l.deltaValue1=0)})}),vr(p,R=>{var N;Ct((N=r.unref(c))==null?void 0:N.getBoundingClientRect(),$=>{const{dx:H}=R;l.deltaValue2=H/$.width*O.value,y.value=F(St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),h.value=[m.value,y.value].sort((J,ne)=>J-ne),R.stop&&(Z([F(M.value),F(V.value)]),l.deltaValue2=0)})});function Y(){const R=Math.ceil((1-k.value)*100),N=Math.ceil((1-W.value)*100);return[R,N].sort(($,H)=>$-H)}function F(R){const N=St(R,i.min,i.max);return Math.round((N+Number.EPSILON)*(1/i.step))/(1/i.step)}function Z(R){o("update:modelValue",R)}function z(R,N){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(R.code)&&R.preventDefault();const $=R.code==="ArrowUp"||R.code==="ArrowRight"?i.step*1:R.code==="ArrowDown"||R.code==="ArrowLeft"?i.step*-1:0,H=[...i.modelValue];H[N]=St(H[N]+$,i.min,i.max),Z(H)}return(R,N)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",V1,[r.createElementVNode("div",A1,[R.label?(r.openBlock(),r.createElementBlock("label",B1,[r.createElementVNode("span",null,r.toDisplayString(R.label),1),N[3]||(N[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(R.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),N[4]||(N[4]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",P1,r.toDisplayString(T.value),1)):r.createCommentVNode("",!0)]),N[10]||(N[10]=r.createTextVNode()),r.createElementVNode("div",R1,[r.createElementVNode("div",D1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(S.value)},null,4)],512)]),N[9]||(N[9]=r.createTextVNode()),r.createElementVNode("div",I1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(v),($,H)=>(r.openBlock(),r.createElementBlock("div",{key:H,style:r.normalizeStyle({right:`${$}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:N[0]||(N[0]=$=>z($,0))},N[5]||(N[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),N[8]||(N[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(G.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:N[1]||(N[1]=$=>z($,1))},N[6]||(N[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),N[11]||(N[11]=r.createTextVNode()),r.createElementVNode("div",F1,[i.mode==="input"?(r.openBlock(),r.createBlock(N1,{key:0,modelValue:h.value,"onUpdate:modelValue":N[2]||(N[2]=$=>h.value=$),class:"ui-focused-border",onChange:Z},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),N[12]||(N[12]=r.createTextVNode()),U.value?(r.openBlock(),r.createElementBlock("div",L1,r.toDisplayString(U.value),1)):r.createCommentVNode("",!0)],2))}}),M1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientY:p.clientY},m=jl(document,"mousemove",y=>{const w=(y.clientY-h.clientY)/l.value;n("update:scrollTop",o.scrollTop+w),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),$1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientX:p.clientX},m=jl(document,"mousemove",y=>{const w=(y.clientX-h.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+w),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),G1={class:"ui-scrollable"},z1=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 o(d){zw(n,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=d=>{d.preventDefault();const p=d.currentTarget;p.scrollTop+=d.deltaY,p.scrollLeft+=d.deltaX,o(p)};function l(d){Ct(r.unref(e),p=>{p.scrollTop=d,o(p)})}function c(d){Ct(r.unref(e),p=>{p.scrollLeft=d,o(p)})}return nh(e,d=>{Ct(d,p=>o(p))}),r.onMounted(()=>{Ct(r.unref(e),d=>{o(d),d.addEventListener("wheel",i)})}),r.onUnmounted(()=>{Ct(r.unref(e),d=>d.removeEventListener("wheel",i))}),(d,p)=>(r.openBlock(),r.createElementBlock("div",G1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[r.renderSlot(d.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(M1,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode($1,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),U1="add.svg",Z1="box.svg",W1="calendar.svg",j1="checkmark.svg",H1="clipboard.svg",q1="close.svg",K1="copy.svg",Y1="download.svg",X1="duplicate.svg",J1="edit.svg",Q1="error.svg",eT="filter.svg",tT="help.svg",nT="info.svg",rT="link.svg",oT="loading.svg",iT="lock.svg",sT="maximize.svg",aT="minimize.svg",lT="minus.svg",cT="more.svg",dT="open.svg",uT="pause.svg",pT="play.svg",hT="renew.svg",fT="restart.svg",mT="reverse.svg",gT="settings.svg",yT="sort.svg",_T="stop.svg",CT="success.svg",vT="time.svg",wT="tune.svg",bT="warning.svg",xT="zip.svg",kT={add:U1,"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:Z1,calendar:W1,"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:j1,"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:H1,close:q1,copy:K1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:Y1,"drag-dots":"drag-dots.svg",duplicate:X1,edit:J1,error:Q1,export:"export.svg","filter-on":"filter-on.svg",filter:eT,"help-outline":"help-outline.svg",help:tT,"info-outline":"info-outline.svg",info:nT,"jump-link":"jump-link.svg",link:rT,loading:oT,lock:iT,maximize:sT,minimize:aT,minus:lT,more:cT,open:dT,"paper-clip":"paper-clip.svg",pause:uT,play:pT,renew:hT,restart:fT,reverse:mT,settings:gT,sort:yT,stop:_T,success:CT,time:vT,tune:wT,warning:bT,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:xT},ST="add.svg",ET="annotate.svg",TT="annotation.svg",NT="area.svg",VT="axes.svg",AT="bar.svg",BT="bindot.svg",PT="box.svg",RT="boxplot.svg",DT="bubble.svg",IT="calendar.svg",FT="canvas.svg",LT="checkbox.svg",OT="checkmark.svg",MT="clipboard.svg",$T="close.svg",GT="cluster.svg",zT="code.svg",UT="color.svg",ZT="columns.svg",WT="container.svg",jT="cookie.svg",HT="copy.svg",qT="cpu.svg",KT="debug.svg",YT="dna.svg",XT="download.svg",JT="duplicate.svg",QT="edit.svg",eN="error.svg",tN="filter.svg",nN="generate.svg",rN="graph.svg",oN="heatmap.svg",iN="help.svg",sN="info.svg",aN="jitter.svg",lN="lasso.svg",cN="layers.svg",dN="learn.svg",uN="legend.svg",pN="line.svg",hN="link.svg",fN="loading.svg",mN="lock.svg",gN="maximize.svg",yN="menu.svg",_N="minimize.svg",CN="minus.svg",vN="more.svg",wN="pause.svg",bN="pin.svg",xN="play.svg",kN="product.svg",SN="publications.svg",EN="renew.svg",TN="restart.svg",NN="reverse.svg",VN="search.svg",AN="server.svg",BN="settings.svg",PN="sina.svg",RN="skatterplot.svg",DN="slice.svg",IN="sort.svg",FN="statistics.svg",LN="stop.svg",ON="success.svg",MN="table.svg",$N="template.svg",GN="terminal.svg",zN="time.svg",UN="tune.svg",ZN="venn.svg",WN="violin.svg",jN="warning.svg",HN="wetlab.svg",qN="zip.svg",KN={"add-layer":"add-layer.svg",add:ST,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:ET,annotation:TT,area:NT,"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:VT,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:AT,bindot:BT,box:PT,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:RT,bubble:DT,calendar:IT,canvas:FT,"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:LT,checkmark:OT,"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:MT,close:$T,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:GT,code:zT,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:UT,columns:ZT,"connected-points":"connected-points.svg",container:WT,cookie:jT,copy:HT,cpu:qT,"data-dimentions":"data-dimentions.svg",debug:KT,"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-add":"dna-add.svg","dna-import":"dna-import.svg",dna:YT,download:XT,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:JT,edit:QT,"error-bar":"error-bar.svg",error:eN,"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","filter-on":"filter-on.svg",filter:tN,"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:nN,graph:rN,heatmap:oN,"help-outline":"help-outline.svg",help:iN,"info-outline":"info-outline.svg",info:sN,jitter:aN,"jump-link":"jump-link.svg",lasso:lN,layers:cN,learn:dN,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:uN,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:pN,"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:hN,loading:fN,lock:mN,maximize:gN,menu:yN,minimize:_N,minus:CN,more:vN,"paper-clip":"paper-clip.svg",pause:wN,pin:bN,play:xN,"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:kN,publications:SN,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:EN,restart:TN,reverse:NN,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:VN,"server-on":"server-on.svg",server:AN,settings:BN,sina:PN,skatterplot:RN,slice:DN,"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:IN,statistics:FN,stop:LN,"strip-plot":"strip-plot.svg",success:ON,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:MN,template:$N,terminal:GN,"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:zN,tune:UN,venn:ZN,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:WN,warning:jN,wetlab:HN,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:qN,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function YN(){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 XN=["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"],JN=["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-add","dna-import","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","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"],QN={allCssVariables:YN(),icons16:kT,icons24:KN},eV={class:"block__not-found"},tV=r.defineComponent({__name:"NotFound",setup(t){const n=Nl().useApp(),o=()=>{n.updateNavigationState(i=>{i.href="/"})};return(i,l)=>(r.openBlock(),r.createElementBlock("div",eV,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(Ml),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),oc=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},nV={},rV={class:"block__loader-page"};function oV(t,e){return r.openBlock(),r.createElementBlock("div",rV,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const iV=oc(nV,[["render",oV]]),sV={class:"pl-app-notification-alert"},aV={class:"pl-app-notification-alert__content"},lV={class:"pl-app-notification-alert__title"},cV=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),i=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(r.openBlock(),r.createElementBlock("div",sV,[r.createVNode(r.unref(Yl),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>d[2]||(d[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",aV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,p=>{var h;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",lV,r.toDisplayString(p[0]),1),r.createVNode(r.unref(Bp),{value:(h=p[1])==null?void 0:h.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(eh),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(Fs),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>d[3]||(d[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(gp))]),default:r.withCtx(()=>[d[4]||(d[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),dV={key:0,class:"block__loader"},uV=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const i=e.value;if(typeof i=="number")return i>=1?void 0:(i*100).toFixed(2)+"%"});return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",dV)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),pV={class:"block block__layout"},hV={key:0},fV=r.defineComponent({__name:"BlockLayout",setup(t){const e=Nl(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),i=r.computed(()=>{if(e.loaded){const h=e.useApp(),m=n(h.snapshot.navigationState.href);return m?h.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),d=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0}),p=r.computed(()=>{var h,m;return(m=(h=l.value)==null?void 0:h.progress)==null?void 0:m.call(h)});return(h,m)=>(r.openBlock(),r.createElementBlock("div",pV,[r.createVNode(uV,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",hV,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?i.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:o.value})):(r.openBlock(),r.createBlock(tV,{key:3})):(r.openBlock(),r.createBlock(iV,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&d.value?(r.openBlock(),r.createBlock(r.unref(cV),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var Xs={exports:{}};/**
|
|
66
66
|
* @license
|
|
67
67
|
* Lodash <https://lodash.com/>
|
|
68
68
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
69
69
|
* Released under MIT license <https://lodash.com/license>
|
|
70
70
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
71
71
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
72
|
-
*/Xs.exports,function(t,e){(function(){var n,o="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",y=1,w=2,v=4,T=1,O=2,M=1,x=2,Z=4,V=8,H=16,A=32,S=64,P=128,G=256,Y=512,F=30,U="...",z=800,R=16,N=1,$=2,j=3,J=1/0,ne=9007199254740991,de=17976931348623157e292,me=NaN,Te=4294967295,Se=Te-1,je=Te>>>1,Dt=[["ary",P],["bind",M],["bindKey",x],["curry",V],["curryRight",H],["flip",Y],["partial",A],["partialRight",S],["rearg",G]],qe="[object Arguments]",Zn="[object Array]",wP="[object AsyncFunction]",Hi="[object Boolean]",qi="[object Date]",bP="[object DOMException]",ua="[object Error]",pa="[object Function]",of="[object GeneratorFunction]",Nn="[object Map]",Ki="[object Number]",xP="[object Null]",er="[object Object]",sf="[object Promise]",kP="[object Proxy]",Yi="[object RegExp]",Vn="[object Set]",Xi="[object String]",ha="[object Symbol]",SP="[object Undefined]",Ji="[object WeakMap]",EP="[object WeakSet]",Qi="[object ArrayBuffer]",Lo="[object DataView]",Ec="[object Float32Array]",Tc="[object Float64Array]",Nc="[object Int8Array]",Vc="[object Int16Array]",Ac="[object Int32Array]",Bc="[object Uint8Array]",Pc="[object Uint8ClampedArray]",Rc="[object Uint16Array]",Dc="[object Uint32Array]",TP=/\b__p \+= '';/g,NP=/\b(__p \+=) '' \+/g,VP=/(__e\(.*?\)|\b__t\)) \+\n'';/g,af=/&(?:amp|lt|gt|quot|#39);/g,lf=/[&<>"']/g,AP=RegExp(af.source),BP=RegExp(lf.source),PP=/<%-([\s\S]+?)%>/g,RP=/<%([\s\S]+?)%>/g,cf=/<%=([\s\S]+?)%>/g,DP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IP=/^\w*$/,FP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ic=/[\\^$.*+?()[\]{}|]/g,LP=RegExp(Ic.source),Fc=/^\s+/,OP=/\s/,MP=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$P=/\{\n\/\* \[wrapped with (.+)\] \*/,GP=/,? & /,zP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,UP=/[()=,{}\[\]\/\s]/,ZP=/\\(\\)?/g,WP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,df=/\w*$/,jP=/^[-+]0x[0-9a-f]+$/i,HP=/^0b[01]+$/i,qP=/^\[object .+?Constructor\]$/,KP=/^0o[0-7]+$/i,YP=/^(?:0|[1-9]\d*)$/,XP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fa=/($^)/,JP=/['\n\r\u2028\u2029\\]/g,ma="\\ud800-\\udfff",QP="\\u0300-\\u036f",eR="\\ufe20-\\ufe2f",tR="\\u20d0-\\u20ff",uf=QP+eR+tR,pf="\\u2700-\\u27bf",hf="a-z\\xdf-\\xf6\\xf8-\\xff",nR="\\xac\\xb1\\xd7\\xf7",rR="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",oR="\\u2000-\\u206f",iR=" \\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",ff="A-Z\\xc0-\\xd6\\xd8-\\xde",mf="\\ufe0e\\ufe0f",gf=nR+rR+oR+iR,Lc="['’]",sR="["+ma+"]",yf="["+gf+"]",ga="["+uf+"]",_f="\\d+",aR="["+pf+"]",Cf="["+hf+"]",vf="[^"+ma+gf+_f+pf+hf+ff+"]",Oc="\\ud83c[\\udffb-\\udfff]",lR="(?:"+ga+"|"+Oc+")",wf="[^"+ma+"]",Mc="(?:\\ud83c[\\udde6-\\uddff]){2}",$c="[\\ud800-\\udbff][\\udc00-\\udfff]",Oo="["+ff+"]",bf="\\u200d",xf="(?:"+Cf+"|"+vf+")",cR="(?:"+Oo+"|"+vf+")",kf="(?:"+Lc+"(?:d|ll|m|re|s|t|ve))?",Sf="(?:"+Lc+"(?:D|LL|M|RE|S|T|VE))?",Ef=lR+"?",Tf="["+mf+"]?",dR="(?:"+bf+"(?:"+[wf,Mc,$c].join("|")+")"+Tf+Ef+")*",uR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nf=Tf+Ef+dR,hR="(?:"+[aR,Mc,$c].join("|")+")"+Nf,fR="(?:"+[wf+ga+"?",ga,Mc,$c,sR].join("|")+")",mR=RegExp(Lc,"g"),gR=RegExp(ga,"g"),Gc=RegExp(Oc+"(?="+Oc+")|"+fR+Nf,"g"),yR=RegExp([Oo+"?"+Cf+"+"+kf+"(?="+[yf,Oo,"$"].join("|")+")",cR+"+"+Sf+"(?="+[yf,Oo+xf,"$"].join("|")+")",Oo+"?"+xf+"+"+kf,Oo+"+"+Sf,pR,uR,_f,hR].join("|"),"g"),_R=RegExp("["+bf+ma+uf+mf+"]"),CR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vR=["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"],wR=-1,Je={};Je[Ec]=Je[Tc]=Je[Nc]=Je[Vc]=Je[Ac]=Je[Bc]=Je[Pc]=Je[Rc]=Je[Dc]=!0,Je[qe]=Je[Zn]=Je[Qi]=Je[Hi]=Je[Lo]=Je[qi]=Je[ua]=Je[pa]=Je[Nn]=Je[Ki]=Je[er]=Je[Yi]=Je[Vn]=Je[Xi]=Je[Ji]=!1;var Ye={};Ye[qe]=Ye[Zn]=Ye[Qi]=Ye[Lo]=Ye[Hi]=Ye[qi]=Ye[Ec]=Ye[Tc]=Ye[Nc]=Ye[Vc]=Ye[Ac]=Ye[Nn]=Ye[Ki]=Ye[er]=Ye[Yi]=Ye[Vn]=Ye[Xi]=Ye[ha]=Ye[Bc]=Ye[Pc]=Ye[Rc]=Ye[Dc]=!0,Ye[ua]=Ye[pa]=Ye[Ji]=!1;var bR={À:"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"},xR={"&":"&","<":"<",">":">",'"':""","'":"'"},kR={"&":"&","<":"<",">":">",""":'"',"'":"'"},SR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ER=parseFloat,TR=parseInt,Vf=typeof ei=="object"&&ei&&ei.Object===Object&&ei,NR=typeof self=="object"&&self&&self.Object===Object&&self,wt=Vf||NR||Function("return this")(),zc=e&&!e.nodeType&&e,no=zc&&!0&&t&&!t.nodeType&&t,Af=no&&no.exports===zc,Uc=Af&&Vf.process,rn=function(){try{var D=no&&no.require&&no.require("util").types;return D||Uc&&Uc.binding&&Uc.binding("util")}catch{}}(),Bf=rn&&rn.isArrayBuffer,Pf=rn&&rn.isDate,Rf=rn&&rn.isMap,Df=rn&&rn.isRegExp,If=rn&&rn.isSet,Ff=rn&&rn.isTypedArray;function Xt(D,q,W){switch(W.length){case 0:return D.call(q);case 1:return D.call(q,W[0]);case 2:return D.call(q,W[0],W[1]);case 3:return D.call(q,W[0],W[1],W[2])}return D.apply(q,W)}function VR(D,q,W,ce){for(var Ee=-1,Ue=D==null?0:D.length;++Ee<Ue;){var ht=D[Ee];q(ce,ht,W(ht),D)}return ce}function on(D,q){for(var W=-1,ce=D==null?0:D.length;++W<ce&&q(D[W],W,D)!==!1;);return D}function AR(D,q){for(var W=D==null?0:D.length;W--&&q(D[W],W,D)!==!1;);return D}function Lf(D,q){for(var W=-1,ce=D==null?0:D.length;++W<ce;)if(!q(D[W],W,D))return!1;return!0}function Br(D,q){for(var W=-1,ce=D==null?0:D.length,Ee=0,Ue=[];++W<ce;){var ht=D[W];q(ht,W,D)&&(Ue[Ee++]=ht)}return Ue}function ya(D,q){var W=D==null?0:D.length;return!!W&&Mo(D,q,0)>-1}function Zc(D,q,W){for(var ce=-1,Ee=D==null?0:D.length;++ce<Ee;)if(W(q,D[ce]))return!0;return!1}function et(D,q){for(var W=-1,ce=D==null?0:D.length,Ee=Array(ce);++W<ce;)Ee[W]=q(D[W],W,D);return Ee}function Pr(D,q){for(var W=-1,ce=q.length,Ee=D.length;++W<ce;)D[Ee+W]=q[W];return D}function Wc(D,q,W,ce){var Ee=-1,Ue=D==null?0:D.length;for(ce&&Ue&&(W=D[++Ee]);++Ee<Ue;)W=q(W,D[Ee],Ee,D);return W}function BR(D,q,W,ce){var Ee=D==null?0:D.length;for(ce&&Ee&&(W=D[--Ee]);Ee--;)W=q(W,D[Ee],Ee,D);return W}function jc(D,q){for(var W=-1,ce=D==null?0:D.length;++W<ce;)if(q(D[W],W,D))return!0;return!1}var PR=Hc("length");function RR(D){return D.split("")}function DR(D){return D.match(zP)||[]}function Of(D,q,W){var ce;return W(D,function(Ee,Ue,ht){if(q(Ee,Ue,ht))return ce=Ue,!1}),ce}function _a(D,q,W,ce){for(var Ee=D.length,Ue=W+(ce?1:-1);ce?Ue--:++Ue<Ee;)if(q(D[Ue],Ue,D))return Ue;return-1}function Mo(D,q,W){return q===q?jR(D,q,W):_a(D,Mf,W)}function IR(D,q,W,ce){for(var Ee=W-1,Ue=D.length;++Ee<Ue;)if(ce(D[Ee],q))return Ee;return-1}function Mf(D){return D!==D}function $f(D,q){var W=D==null?0:D.length;return W?Kc(D,q)/W:me}function Hc(D){return function(q){return q==null?n:q[D]}}function qc(D){return function(q){return D==null?n:D[q]}}function Gf(D,q,W,ce,Ee){return Ee(D,function(Ue,ht,Ke){W=ce?(ce=!1,Ue):q(W,Ue,ht,Ke)}),W}function FR(D,q){var W=D.length;for(D.sort(q);W--;)D[W]=D[W].value;return D}function Kc(D,q){for(var W,ce=-1,Ee=D.length;++ce<Ee;){var Ue=q(D[ce]);Ue!==n&&(W=W===n?Ue:W+Ue)}return W}function Yc(D,q){for(var W=-1,ce=Array(D);++W<D;)ce[W]=q(W);return ce}function LR(D,q){return et(q,function(W){return[W,D[W]]})}function zf(D){return D&&D.slice(0,jf(D)+1).replace(Fc,"")}function Jt(D){return function(q){return D(q)}}function Xc(D,q){return et(q,function(W){return D[W]})}function es(D,q){return D.has(q)}function Uf(D,q){for(var W=-1,ce=D.length;++W<ce&&Mo(q,D[W],0)>-1;);return W}function Zf(D,q){for(var W=D.length;W--&&Mo(q,D[W],0)>-1;);return W}function OR(D,q){for(var W=D.length,ce=0;W--;)D[W]===q&&++ce;return ce}var MR=qc(bR),$R=qc(xR);function GR(D){return"\\"+SR[D]}function zR(D,q){return D==null?n:D[q]}function $o(D){return _R.test(D)}function UR(D){return CR.test(D)}function ZR(D){for(var q,W=[];!(q=D.next()).done;)W.push(q.value);return W}function Jc(D){var q=-1,W=Array(D.size);return D.forEach(function(ce,Ee){W[++q]=[Ee,ce]}),W}function Wf(D,q){return function(W){return D(q(W))}}function Rr(D,q){for(var W=-1,ce=D.length,Ee=0,Ue=[];++W<ce;){var ht=D[W];(ht===q||ht===m)&&(D[W]=m,Ue[Ee++]=W)}return Ue}function Ca(D){var q=-1,W=Array(D.size);return D.forEach(function(ce){W[++q]=ce}),W}function WR(D){var q=-1,W=Array(D.size);return D.forEach(function(ce){W[++q]=[ce,ce]}),W}function jR(D,q,W){for(var ce=W-1,Ee=D.length;++ce<Ee;)if(D[ce]===q)return ce;return-1}function HR(D,q,W){for(var ce=W+1;ce--;)if(D[ce]===q)return ce;return ce}function Go(D){return $o(D)?KR(D):PR(D)}function An(D){return $o(D)?YR(D):RR(D)}function jf(D){for(var q=D.length;q--&&OP.test(D.charAt(q)););return q}var qR=qc(kR);function KR(D){for(var q=Gc.lastIndex=0;Gc.test(D);)++q;return q}function YR(D){return D.match(Gc)||[]}function XR(D){return D.match(yR)||[]}var JR=function D(q){q=q==null?wt:zo.defaults(wt.Object(),q,zo.pick(wt,vR));var W=q.Array,ce=q.Date,Ee=q.Error,Ue=q.Function,ht=q.Math,Ke=q.Object,Qc=q.RegExp,QR=q.String,sn=q.TypeError,va=W.prototype,eD=Ue.prototype,Uo=Ke.prototype,wa=q["__core-js_shared__"],ba=eD.toString,He=Uo.hasOwnProperty,tD=0,Hf=function(){var s=/[^.]+$/.exec(wa&&wa.keys&&wa.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),xa=Uo.toString,nD=ba.call(Ke),rD=wt._,oD=Qc("^"+ba.call(He).replace(Ic,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ka=Af?q.Buffer:n,Dr=q.Symbol,Sa=q.Uint8Array,qf=ka?ka.allocUnsafe:n,Ea=Wf(Ke.getPrototypeOf,Ke),Kf=Ke.create,Yf=Uo.propertyIsEnumerable,Ta=va.splice,Xf=Dr?Dr.isConcatSpreadable:n,ts=Dr?Dr.iterator:n,ro=Dr?Dr.toStringTag:n,Na=function(){try{var s=lo(Ke,"defineProperty");return s({},"",{}),s}catch{}}(),iD=q.clearTimeout!==wt.clearTimeout&&q.clearTimeout,sD=ce&&ce.now!==wt.Date.now&&ce.now,aD=q.setTimeout!==wt.setTimeout&&q.setTimeout,Va=ht.ceil,Aa=ht.floor,ed=Ke.getOwnPropertySymbols,lD=ka?ka.isBuffer:n,Jf=q.isFinite,cD=va.join,dD=Wf(Ke.keys,Ke),ft=ht.max,Tt=ht.min,uD=ce.now,pD=q.parseInt,Qf=ht.random,hD=va.reverse,td=lo(q,"DataView"),ns=lo(q,"Map"),nd=lo(q,"Promise"),Zo=lo(q,"Set"),rs=lo(q,"WeakMap"),os=lo(Ke,"create"),Ba=rs&&new rs,Wo={},fD=co(td),mD=co(ns),gD=co(nd),yD=co(Zo),_D=co(rs),Pa=Dr?Dr.prototype:n,is=Pa?Pa.valueOf:n,em=Pa?Pa.toString:n;function _(s){if(it(s)&&!Ne(s)&&!(s instanceof Le)){if(s instanceof an)return s;if(He.call(s,"__wrapped__"))return tg(s)}return new an(s)}var jo=function(){function s(){}return function(a){if(!ot(a))return{};if(Kf)return Kf(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function Ra(){}function an(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}_.templateSettings={escape:PP,evaluate:RP,interpolate:cf,variable:"",imports:{_}},_.prototype=Ra.prototype,_.prototype.constructor=_,an.prototype=jo(Ra.prototype),an.prototype.constructor=an;function Le(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Te,this.__views__=[]}function CD(){var s=new Le(this.__wrapped__);return s.__actions__=$t(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=$t(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=$t(this.__views__),s}function vD(){if(this.__filtered__){var s=new Le(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function wD(){var s=this.__wrapped__.value(),a=this.__dir__,u=Ne(s),f=a<0,g=u?s.length:0,C=RI(0,g,this.__views__),E=C.start,B=C.end,L=B-E,K=f?B:E-1,X=this.__iteratees__,Q=X.length,oe=0,pe=Tt(L,this.__takeCount__);if(!u||!f&&g==L&&pe==L)return km(s,this.__actions__);var _e=[];e:for(;L--&&oe<pe;){K+=a;for(var De=-1,Ce=s[K];++De<Q;){var Fe=X[De],Oe=Fe.iteratee,tn=Fe.type,Lt=Oe(Ce);if(tn==$)Ce=Lt;else if(!Lt){if(tn==N)continue e;break e}}_e[oe++]=Ce}return _e}Le.prototype=jo(Ra.prototype),Le.prototype.constructor=Le;function oo(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function bD(){this.__data__=os?os(null):{},this.size=0}function xD(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function kD(s){var a=this.__data__;if(os){var u=a[s];return u===p?n:u}return He.call(a,s)?a[s]:n}function SD(s){var a=this.__data__;return os?a[s]!==n:He.call(a,s)}function ED(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=os&&a===n?p:a,this}oo.prototype.clear=bD,oo.prototype.delete=xD,oo.prototype.get=kD,oo.prototype.has=SD,oo.prototype.set=ED;function tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function TD(){this.__data__=[],this.size=0}function ND(s){var a=this.__data__,u=Da(a,s);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():Ta.call(a,u,1),--this.size,!0}function VD(s){var a=this.__data__,u=Da(a,s);return u<0?n:a[u][1]}function AD(s){return Da(this.__data__,s)>-1}function BD(s,a){var u=this.__data__,f=Da(u,s);return f<0?(++this.size,u.push([s,a])):u[f][1]=a,this}tr.prototype.clear=TD,tr.prototype.delete=ND,tr.prototype.get=VD,tr.prototype.has=AD,tr.prototype.set=BD;function nr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function PD(){this.size=0,this.__data__={hash:new oo,map:new(ns||tr),string:new oo}}function RD(s){var a=ja(this,s).delete(s);return this.size-=a?1:0,a}function DD(s){return ja(this,s).get(s)}function ID(s){return ja(this,s).has(s)}function FD(s,a){var u=ja(this,s),f=u.size;return u.set(s,a),this.size+=u.size==f?0:1,this}nr.prototype.clear=PD,nr.prototype.delete=RD,nr.prototype.get=DD,nr.prototype.has=ID,nr.prototype.set=FD;function io(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new nr;++a<u;)this.add(s[a])}function LD(s){return this.__data__.set(s,p),this}function OD(s){return this.__data__.has(s)}io.prototype.add=io.prototype.push=LD,io.prototype.has=OD;function Bn(s){var a=this.__data__=new tr(s);this.size=a.size}function MD(){this.__data__=new tr,this.size=0}function $D(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function GD(s){return this.__data__.get(s)}function zD(s){return this.__data__.has(s)}function UD(s,a){var u=this.__data__;if(u instanceof tr){var f=u.__data__;if(!ns||f.length<i-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new nr(f)}return u.set(s,a),this.size=u.size,this}Bn.prototype.clear=MD,Bn.prototype.delete=$D,Bn.prototype.get=GD,Bn.prototype.has=zD,Bn.prototype.set=UD;function tm(s,a){var u=Ne(s),f=!u&&uo(s),g=!u&&!f&&Mr(s),C=!u&&!f&&!g&&Yo(s),E=u||f||g||C,B=E?Yc(s.length,QR):[],L=B.length;for(var K in s)(a||He.call(s,K))&&!(E&&(K=="length"||g&&(K=="offset"||K=="parent")||C&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||sr(K,L)))&&B.push(K);return B}function nm(s){var a=s.length;return a?s[hd(0,a-1)]:n}function ZD(s,a){return Ha($t(s),so(a,0,s.length))}function WD(s){return Ha($t(s))}function rd(s,a,u){(u!==n&&!Pn(s[a],u)||u===n&&!(a in s))&&rr(s,a,u)}function ss(s,a,u){var f=s[a];(!(He.call(s,a)&&Pn(f,u))||u===n&&!(a in s))&&rr(s,a,u)}function Da(s,a){for(var u=s.length;u--;)if(Pn(s[u][0],a))return u;return-1}function jD(s,a,u,f){return Ir(s,function(g,C,E){a(f,g,u(g),E)}),f}function rm(s,a){return s&&jn(a,_t(a),s)}function HD(s,a){return s&&jn(a,zt(a),s)}function rr(s,a,u){a=="__proto__"&&Na?Na(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function od(s,a){for(var u=-1,f=a.length,g=W(f),C=s==null;++u<f;)g[u]=C?n:Od(s,a[u]);return g}function so(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function ln(s,a,u,f,g,C){var E,B=a&y,L=a&w,K=a&v;if(u&&(E=g?u(s,f,g,C):u(s)),E!==n)return E;if(!ot(s))return s;var X=Ne(s);if(X){if(E=II(s),!B)return $t(s,E)}else{var Q=Nt(s),oe=Q==pa||Q==of;if(Mr(s))return Tm(s,B);if(Q==er||Q==qe||oe&&!g){if(E=L||oe?{}:jm(s),!B)return L?kI(s,HD(E,s)):xI(s,rm(E,s))}else{if(!Ye[Q])return g?s:{};E=FI(s,Q,B)}}C||(C=new Bn);var pe=C.get(s);if(pe)return pe;C.set(s,E),wg(s)?s.forEach(function(Ce){E.add(ln(Ce,a,u,Ce,s,C))}):Cg(s)&&s.forEach(function(Ce,Fe){E.set(Fe,ln(Ce,a,u,Fe,s,C))});var _e=K?L?kd:xd:L?zt:_t,De=X?n:_e(s);return on(De||s,function(Ce,Fe){De&&(Fe=Ce,Ce=s[Fe]),ss(E,Fe,ln(Ce,a,u,Fe,s,C))}),E}function qD(s){var a=_t(s);return function(u){return om(u,s,a)}}function om(s,a,u){var f=u.length;if(s==null)return!f;for(s=Ke(s);f--;){var g=u[f],C=a[g],E=s[g];if(E===n&&!(g in s)||!C(E))return!1}return!0}function im(s,a,u){if(typeof s!="function")throw new sn(c);return hs(function(){s.apply(n,u)},a)}function as(s,a,u,f){var g=-1,C=ya,E=!0,B=s.length,L=[],K=a.length;if(!B)return L;u&&(a=et(a,Jt(u))),f?(C=Zc,E=!1):a.length>=i&&(C=es,E=!1,a=new io(a));e:for(;++g<B;){var X=s[g],Q=u==null?X:u(X);if(X=f||X!==0?X:0,E&&Q===Q){for(var oe=K;oe--;)if(a[oe]===Q)continue e;L.push(X)}else C(a,Q,f)||L.push(X)}return L}var Ir=Pm(Wn),sm=Pm(sd,!0);function KD(s,a){var u=!0;return Ir(s,function(f,g,C){return u=!!a(f,g,C),u}),u}function Ia(s,a,u){for(var f=-1,g=s.length;++f<g;){var C=s[f],E=a(C);if(E!=null&&(B===n?E===E&&!en(E):u(E,B)))var B=E,L=C}return L}function YD(s,a,u,f){var g=s.length;for(u=Be(u),u<0&&(u=-u>g?0:g+u),f=f===n||f>g?g:Be(f),f<0&&(f+=g),f=u>f?0:xg(f);u<f;)s[u++]=a;return s}function am(s,a){var u=[];return Ir(s,function(f,g,C){a(f,g,C)&&u.push(f)}),u}function bt(s,a,u,f,g){var C=-1,E=s.length;for(u||(u=OI),g||(g=[]);++C<E;){var B=s[C];a>0&&u(B)?a>1?bt(B,a-1,u,f,g):Pr(g,B):f||(g[g.length]=B)}return g}var id=Rm(),lm=Rm(!0);function Wn(s,a){return s&&id(s,a,_t)}function sd(s,a){return s&&lm(s,a,_t)}function Fa(s,a){return Br(a,function(u){return ar(s[u])})}function ao(s,a){a=Lr(a,s);for(var u=0,f=a.length;s!=null&&u<f;)s=s[Hn(a[u++])];return u&&u==f?s:n}function cm(s,a,u){var f=a(s);return Ne(s)?f:Pr(f,u(s))}function It(s){return s==null?s===n?SP:xP:ro&&ro in Ke(s)?PI(s):WI(s)}function ad(s,a){return s>a}function XD(s,a){return s!=null&&He.call(s,a)}function JD(s,a){return s!=null&&a in Ke(s)}function QD(s,a,u){return s>=Tt(a,u)&&s<ft(a,u)}function ld(s,a,u){for(var f=u?Zc:ya,g=s[0].length,C=s.length,E=C,B=W(C),L=1/0,K=[];E--;){var X=s[E];E&&a&&(X=et(X,Jt(a))),L=Tt(X.length,L),B[E]=!u&&(a||g>=120&&X.length>=120)?new io(E&&X):n}X=s[0];var Q=-1,oe=B[0];e:for(;++Q<g&&K.length<L;){var pe=X[Q],_e=a?a(pe):pe;if(pe=u||pe!==0?pe:0,!(oe?es(oe,_e):f(K,_e,u))){for(E=C;--E;){var De=B[E];if(!(De?es(De,_e):f(s[E],_e,u)))continue e}oe&&oe.push(_e),K.push(pe)}}return K}function eI(s,a,u,f){return Wn(s,function(g,C,E){a(f,u(g),C,E)}),f}function ls(s,a,u){a=Lr(a,s),s=Ym(s,a);var f=s==null?s:s[Hn(dn(a))];return f==null?n:Xt(f,s,u)}function dm(s){return it(s)&&It(s)==qe}function tI(s){return it(s)&&It(s)==Qi}function nI(s){return it(s)&&It(s)==qi}function cs(s,a,u,f,g){return s===a?!0:s==null||a==null||!it(s)&&!it(a)?s!==s&&a!==a:rI(s,a,u,f,cs,g)}function rI(s,a,u,f,g,C){var E=Ne(s),B=Ne(a),L=E?Zn:Nt(s),K=B?Zn:Nt(a);L=L==qe?er:L,K=K==qe?er:K;var X=L==er,Q=K==er,oe=L==K;if(oe&&Mr(s)){if(!Mr(a))return!1;E=!0,X=!1}if(oe&&!X)return C||(C=new Bn),E||Yo(s)?Um(s,a,u,f,g,C):AI(s,a,L,u,f,g,C);if(!(u&T)){var pe=X&&He.call(s,"__wrapped__"),_e=Q&&He.call(a,"__wrapped__");if(pe||_e){var De=pe?s.value():s,Ce=_e?a.value():a;return C||(C=new Bn),g(De,Ce,u,f,C)}}return oe?(C||(C=new Bn),BI(s,a,u,f,g,C)):!1}function oI(s){return it(s)&&Nt(s)==Nn}function cd(s,a,u,f){var g=u.length,C=g,E=!f;if(s==null)return!C;for(s=Ke(s);g--;){var B=u[g];if(E&&B[2]?B[1]!==s[B[0]]:!(B[0]in s))return!1}for(;++g<C;){B=u[g];var L=B[0],K=s[L],X=B[1];if(E&&B[2]){if(K===n&&!(L in s))return!1}else{var Q=new Bn;if(f)var oe=f(K,X,L,s,a,Q);if(!(oe===n?cs(X,K,T|O,f,Q):oe))return!1}}return!0}function um(s){if(!ot(s)||$I(s))return!1;var a=ar(s)?oD:qP;return a.test(co(s))}function iI(s){return it(s)&&It(s)==Yi}function sI(s){return it(s)&&Nt(s)==Vn}function aI(s){return it(s)&&Qa(s.length)&&!!Je[It(s)]}function pm(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Ne(s)?mm(s[0],s[1]):fm(s):Dg(s)}function dd(s){if(!ps(s))return dD(s);var a=[];for(var u in Ke(s))He.call(s,u)&&u!="constructor"&&a.push(u);return a}function lI(s){if(!ot(s))return ZI(s);var a=ps(s),u=[];for(var f in s)f=="constructor"&&(a||!He.call(s,f))||u.push(f);return u}function ud(s,a){return s<a}function hm(s,a){var u=-1,f=Gt(s)?W(s.length):[];return Ir(s,function(g,C,E){f[++u]=a(g,C,E)}),f}function fm(s){var a=Ed(s);return a.length==1&&a[0][2]?qm(a[0][0],a[0][1]):function(u){return u===s||cd(u,s,a)}}function mm(s,a){return Nd(s)&&Hm(a)?qm(Hn(s),a):function(u){var f=Od(u,s);return f===n&&f===a?Md(u,s):cs(a,f,T|O)}}function La(s,a,u,f,g){s!==a&&id(a,function(C,E){if(g||(g=new Bn),ot(C))cI(s,a,E,u,La,f,g);else{var B=f?f(Ad(s,E),C,E+"",s,a,g):n;B===n&&(B=C),rd(s,E,B)}},zt)}function cI(s,a,u,f,g,C,E){var B=Ad(s,u),L=Ad(a,u),K=E.get(L);if(K){rd(s,u,K);return}var X=C?C(B,L,u+"",s,a,E):n,Q=X===n;if(Q){var oe=Ne(L),pe=!oe&&Mr(L),_e=!oe&&!pe&&Yo(L);X=L,oe||pe||_e?Ne(B)?X=B:at(B)?X=$t(B):pe?(Q=!1,X=Tm(L,!0)):_e?(Q=!1,X=Nm(L,!0)):X=[]:fs(L)||uo(L)?(X=B,uo(B)?X=kg(B):(!ot(B)||ar(B))&&(X=jm(L))):Q=!1}Q&&(E.set(L,X),g(X,L,f,C,E),E.delete(L)),rd(s,u,X)}function gm(s,a){var u=s.length;if(u)return a+=a<0?u:0,sr(a,u)?s[a]:n}function ym(s,a,u){a.length?a=et(a,function(C){return Ne(C)?function(E){return ao(E,C.length===1?C[0]:C)}:C}):a=[Ut];var f=-1;a=et(a,Jt(ge()));var g=hm(s,function(C,E,B){var L=et(a,function(K){return K(C)});return{criteria:L,index:++f,value:C}});return FR(g,function(C,E){return bI(C,E,u)})}function dI(s,a){return _m(s,a,function(u,f){return Md(s,f)})}function _m(s,a,u){for(var f=-1,g=a.length,C={};++f<g;){var E=a[f],B=ao(s,E);u(B,E)&&ds(C,Lr(E,s),B)}return C}function uI(s){return function(a){return ao(a,s)}}function pd(s,a,u,f){var g=f?IR:Mo,C=-1,E=a.length,B=s;for(s===a&&(a=$t(a)),u&&(B=et(s,Jt(u)));++C<E;)for(var L=0,K=a[C],X=u?u(K):K;(L=g(B,X,L,f))>-1;)B!==s&&Ta.call(B,L,1),Ta.call(s,L,1);return s}function Cm(s,a){for(var u=s?a.length:0,f=u-1;u--;){var g=a[u];if(u==f||g!==C){var C=g;sr(g)?Ta.call(s,g,1):gd(s,g)}}return s}function hd(s,a){return s+Aa(Qf()*(a-s+1))}function pI(s,a,u,f){for(var g=-1,C=ft(Va((a-s)/(u||1)),0),E=W(C);C--;)E[f?C:++g]=s,s+=u;return E}function fd(s,a){var u="";if(!s||a<1||a>ne)return u;do a%2&&(u+=s),a=Aa(a/2),a&&(s+=s);while(a);return u}function Ie(s,a){return Bd(Km(s,a,Ut),s+"")}function hI(s){return nm(Xo(s))}function fI(s,a){var u=Xo(s);return Ha(u,so(a,0,u.length))}function ds(s,a,u,f){if(!ot(s))return s;a=Lr(a,s);for(var g=-1,C=a.length,E=C-1,B=s;B!=null&&++g<C;){var L=Hn(a[g]),K=u;if(L==="__proto__"||L==="constructor"||L==="prototype")return s;if(g!=E){var X=B[L];K=f?f(X,L,B):n,K===n&&(K=ot(X)?X:sr(a[g+1])?[]:{})}ss(B,L,K),B=B[L]}return s}var vm=Ba?function(s,a){return Ba.set(s,a),s}:Ut,mI=Na?function(s,a){return Na(s,"toString",{configurable:!0,enumerable:!1,value:Gd(a),writable:!0})}:Ut;function gI(s){return Ha(Xo(s))}function cn(s,a,u){var f=-1,g=s.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var C=W(g);++f<g;)C[f]=s[f+a];return C}function yI(s,a){var u;return Ir(s,function(f,g,C){return u=a(f,g,C),!u}),!!u}function Oa(s,a,u){var f=0,g=s==null?f:s.length;if(typeof a=="number"&&a===a&&g<=je){for(;f<g;){var C=f+g>>>1,E=s[C];E!==null&&!en(E)&&(u?E<=a:E<a)?f=C+1:g=C}return g}return md(s,a,Ut,u)}function md(s,a,u,f){var g=0,C=s==null?0:s.length;if(C===0)return 0;a=u(a);for(var E=a!==a,B=a===null,L=en(a),K=a===n;g<C;){var X=Aa((g+C)/2),Q=u(s[X]),oe=Q!==n,pe=Q===null,_e=Q===Q,De=en(Q);if(E)var Ce=f||_e;else K?Ce=_e&&(f||oe):B?Ce=_e&&oe&&(f||!pe):L?Ce=_e&&oe&&!pe&&(f||!De):pe||De?Ce=!1:Ce=f?Q<=a:Q<a;Ce?g=X+1:C=X}return Tt(C,Se)}function wm(s,a){for(var u=-1,f=s.length,g=0,C=[];++u<f;){var E=s[u],B=a?a(E):E;if(!u||!Pn(B,L)){var L=B;C[g++]=E===0?0:E}}return C}function bm(s){return typeof s=="number"?s:en(s)?me:+s}function Qt(s){if(typeof s=="string")return s;if(Ne(s))return et(s,Qt)+"";if(en(s))return em?em.call(s):"";var a=s+"";return a=="0"&&1/s==-J?"-0":a}function Fr(s,a,u){var f=-1,g=ya,C=s.length,E=!0,B=[],L=B;if(u)E=!1,g=Zc;else if(C>=i){var K=a?null:NI(s);if(K)return Ca(K);E=!1,g=es,L=new io}else L=a?[]:B;e:for(;++f<C;){var X=s[f],Q=a?a(X):X;if(X=u||X!==0?X:0,E&&Q===Q){for(var oe=L.length;oe--;)if(L[oe]===Q)continue e;a&&L.push(Q),B.push(X)}else g(L,Q,u)||(L!==B&&L.push(Q),B.push(X))}return B}function gd(s,a){return a=Lr(a,s),s=Ym(s,a),s==null||delete s[Hn(dn(a))]}function xm(s,a,u,f){return ds(s,a,u(ao(s,a)),f)}function Ma(s,a,u,f){for(var g=s.length,C=f?g:-1;(f?C--:++C<g)&&a(s[C],C,s););return u?cn(s,f?0:C,f?C+1:g):cn(s,f?C+1:0,f?g:C)}function km(s,a){var u=s;return u instanceof Le&&(u=u.value()),Wc(a,function(f,g){return g.func.apply(g.thisArg,Pr([f],g.args))},u)}function yd(s,a,u){var f=s.length;if(f<2)return f?Fr(s[0]):[];for(var g=-1,C=W(f);++g<f;)for(var E=s[g],B=-1;++B<f;)B!=g&&(C[g]=as(C[g]||E,s[B],a,u));return Fr(bt(C,1),a,u)}function Sm(s,a,u){for(var f=-1,g=s.length,C=a.length,E={};++f<g;){var B=f<C?a[f]:n;u(E,s[f],B)}return E}function _d(s){return at(s)?s:[]}function Cd(s){return typeof s=="function"?s:Ut}function Lr(s,a){return Ne(s)?s:Nd(s,a)?[s]:eg(We(s))}var _I=Ie;function Or(s,a,u){var f=s.length;return u=u===n?f:u,!a&&u>=f?s:cn(s,a,u)}var Em=iD||function(s){return wt.clearTimeout(s)};function Tm(s,a){if(a)return s.slice();var u=s.length,f=qf?qf(u):new s.constructor(u);return s.copy(f),f}function vd(s){var a=new s.constructor(s.byteLength);return new Sa(a).set(new Sa(s)),a}function CI(s,a){var u=a?vd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function vI(s){var a=new s.constructor(s.source,df.exec(s));return a.lastIndex=s.lastIndex,a}function wI(s){return is?Ke(is.call(s)):{}}function Nm(s,a){var u=a?vd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function Vm(s,a){if(s!==a){var u=s!==n,f=s===null,g=s===s,C=en(s),E=a!==n,B=a===null,L=a===a,K=en(a);if(!B&&!K&&!C&&s>a||C&&E&&L&&!B&&!K||f&&E&&L||!u&&L||!g)return 1;if(!f&&!C&&!K&&s<a||K&&u&&g&&!f&&!C||B&&u&&g||!E&&g||!L)return-1}return 0}function bI(s,a,u){for(var f=-1,g=s.criteria,C=a.criteria,E=g.length,B=u.length;++f<E;){var L=Vm(g[f],C[f]);if(L){if(f>=B)return L;var K=u[f];return L*(K=="desc"?-1:1)}}return s.index-a.index}function Am(s,a,u,f){for(var g=-1,C=s.length,E=u.length,B=-1,L=a.length,K=ft(C-E,0),X=W(L+K),Q=!f;++B<L;)X[B]=a[B];for(;++g<E;)(Q||g<C)&&(X[u[g]]=s[g]);for(;K--;)X[B++]=s[g++];return X}function Bm(s,a,u,f){for(var g=-1,C=s.length,E=-1,B=u.length,L=-1,K=a.length,X=ft(C-B,0),Q=W(X+K),oe=!f;++g<X;)Q[g]=s[g];for(var pe=g;++L<K;)Q[pe+L]=a[L];for(;++E<B;)(oe||g<C)&&(Q[pe+u[E]]=s[g++]);return Q}function $t(s,a){var u=-1,f=s.length;for(a||(a=W(f));++u<f;)a[u]=s[u];return a}function jn(s,a,u,f){var g=!u;u||(u={});for(var C=-1,E=a.length;++C<E;){var B=a[C],L=f?f(u[B],s[B],B,u,s):n;L===n&&(L=s[B]),g?rr(u,B,L):ss(u,B,L)}return u}function xI(s,a){return jn(s,Td(s),a)}function kI(s,a){return jn(s,Zm(s),a)}function $a(s,a){return function(u,f){var g=Ne(u)?VR:jD,C=a?a():{};return g(u,s,ge(f,2),C)}}function Ho(s){return Ie(function(a,u){var f=-1,g=u.length,C=g>1?u[g-1]:n,E=g>2?u[2]:n;for(C=s.length>3&&typeof C=="function"?(g--,C):n,E&&Ft(u[0],u[1],E)&&(C=g<3?n:C,g=1),a=Ke(a);++f<g;){var B=u[f];B&&s(a,B,f,C)}return a})}function Pm(s,a){return function(u,f){if(u==null)return u;if(!Gt(u))return s(u,f);for(var g=u.length,C=a?g:-1,E=Ke(u);(a?C--:++C<g)&&f(E[C],C,E)!==!1;);return u}}function Rm(s){return function(a,u,f){for(var g=-1,C=Ke(a),E=f(a),B=E.length;B--;){var L=E[s?B:++g];if(u(C[L],L,C)===!1)break}return a}}function SI(s,a,u){var f=a&M,g=us(s);function C(){var E=this&&this!==wt&&this instanceof C?g:s;return E.apply(f?u:this,arguments)}return C}function Dm(s){return function(a){a=We(a);var u=$o(a)?An(a):n,f=u?u[0]:a.charAt(0),g=u?Or(u,1).join(""):a.slice(1);return f[s]()+g}}function qo(s){return function(a){return Wc(Pg(Bg(a).replace(mR,"")),s,"")}}function us(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=jo(s.prototype),f=s.apply(u,a);return ot(f)?f:u}}function EI(s,a,u){var f=us(s);function g(){for(var C=arguments.length,E=W(C),B=C,L=Ko(g);B--;)E[B]=arguments[B];var K=C<3&&E[0]!==L&&E[C-1]!==L?[]:Rr(E,L);if(C-=K.length,C<u)return Mm(s,a,Ga,g.placeholder,n,E,K,n,n,u-C);var X=this&&this!==wt&&this instanceof g?f:s;return Xt(X,this,E)}return g}function Im(s){return function(a,u,f){var g=Ke(a);if(!Gt(a)){var C=ge(u,3);a=_t(a),u=function(B){return C(g[B],B,g)}}var E=s(a,u,f);return E>-1?g[C?a[E]:E]:n}}function Fm(s){return ir(function(a){var u=a.length,f=u,g=an.prototype.thru;for(s&&a.reverse();f--;){var C=a[f];if(typeof C!="function")throw new sn(c);if(g&&!E&&Wa(C)=="wrapper")var E=new an([],!0)}for(f=E?f:u;++f<u;){C=a[f];var B=Wa(C),L=B=="wrapper"?Sd(C):n;L&&Vd(L[0])&&L[1]==(P|V|A|G)&&!L[4].length&&L[9]==1?E=E[Wa(L[0])].apply(E,L[3]):E=C.length==1&&Vd(C)?E[B]():E.thru(C)}return function(){var K=arguments,X=K[0];if(E&&K.length==1&&Ne(X))return E.plant(X).value();for(var Q=0,oe=u?a[Q].apply(this,K):X;++Q<u;)oe=a[Q].call(this,oe);return oe}})}function Ga(s,a,u,f,g,C,E,B,L,K){var X=a&P,Q=a&M,oe=a&x,pe=a&(V|H),_e=a&Y,De=oe?n:us(s);function Ce(){for(var Fe=arguments.length,Oe=W(Fe),tn=Fe;tn--;)Oe[tn]=arguments[tn];if(pe)var Lt=Ko(Ce),nn=OR(Oe,Lt);if(f&&(Oe=Am(Oe,f,g,pe)),C&&(Oe=Bm(Oe,C,E,pe)),Fe-=nn,pe&&Fe<K){var lt=Rr(Oe,Lt);return Mm(s,a,Ga,Ce.placeholder,u,Oe,lt,B,L,K-Fe)}var Rn=Q?u:this,cr=oe?Rn[s]:s;return Fe=Oe.length,B?Oe=jI(Oe,B):_e&&Fe>1&&Oe.reverse(),X&&L<Fe&&(Oe.length=L),this&&this!==wt&&this instanceof Ce&&(cr=De||us(cr)),cr.apply(Rn,Oe)}return Ce}function Lm(s,a){return function(u,f){return eI(u,s,a(f),{})}}function za(s,a){return function(u,f){var g;if(u===n&&f===n)return a;if(u!==n&&(g=u),f!==n){if(g===n)return f;typeof u=="string"||typeof f=="string"?(u=Qt(u),f=Qt(f)):(u=bm(u),f=bm(f)),g=s(u,f)}return g}}function wd(s){return ir(function(a){return a=et(a,Jt(ge())),Ie(function(u){var f=this;return s(a,function(g){return Xt(g,f,u)})})})}function Ua(s,a){a=a===n?" ":Qt(a);var u=a.length;if(u<2)return u?fd(a,s):a;var f=fd(a,Va(s/Go(a)));return $o(a)?Or(An(f),0,s).join(""):f.slice(0,s)}function TI(s,a,u,f){var g=a&M,C=us(s);function E(){for(var B=-1,L=arguments.length,K=-1,X=f.length,Q=W(X+L),oe=this&&this!==wt&&this instanceof E?C:s;++K<X;)Q[K]=f[K];for(;L--;)Q[K++]=arguments[++B];return Xt(oe,g?u:this,Q)}return E}function Om(s){return function(a,u,f){return f&&typeof f!="number"&&Ft(a,u,f)&&(u=f=n),a=lr(a),u===n?(u=a,a=0):u=lr(u),f=f===n?a<u?1:-1:lr(f),pI(a,u,f,s)}}function Za(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=un(a),u=un(u)),s(a,u)}}function Mm(s,a,u,f,g,C,E,B,L,K){var X=a&V,Q=X?E:n,oe=X?n:E,pe=X?C:n,_e=X?n:C;a|=X?A:S,a&=~(X?S:A),a&Z||(a&=~(M|x));var De=[s,a,g,pe,Q,_e,oe,B,L,K],Ce=u.apply(n,De);return Vd(s)&&Xm(Ce,De),Ce.placeholder=f,Jm(Ce,s,a)}function bd(s){var a=ht[s];return function(u,f){if(u=un(u),f=f==null?0:Tt(Be(f),292),f&&Jf(u)){var g=(We(u)+"e").split("e"),C=a(g[0]+"e"+(+g[1]+f));return g=(We(C)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return a(u)}}var NI=Zo&&1/Ca(new Zo([,-0]))[1]==J?function(s){return new Zo(s)}:Zd;function $m(s){return function(a){var u=Nt(a);return u==Nn?Jc(a):u==Vn?WR(a):LR(a,s(a))}}function or(s,a,u,f,g,C,E,B){var L=a&x;if(!L&&typeof s!="function")throw new sn(c);var K=f?f.length:0;if(K||(a&=~(A|S),f=g=n),E=E===n?E:ft(Be(E),0),B=B===n?B:Be(B),K-=g?g.length:0,a&S){var X=f,Q=g;f=g=n}var oe=L?n:Sd(s),pe=[s,a,u,f,g,X,Q,C,E,B];if(oe&&UI(pe,oe),s=pe[0],a=pe[1],u=pe[2],f=pe[3],g=pe[4],B=pe[9]=pe[9]===n?L?0:s.length:ft(pe[9]-K,0),!B&&a&(V|H)&&(a&=~(V|H)),!a||a==M)var _e=SI(s,a,u);else a==V||a==H?_e=EI(s,a,B):(a==A||a==(M|A))&&!g.length?_e=TI(s,a,u,f):_e=Ga.apply(n,pe);var De=oe?vm:Xm;return Jm(De(_e,pe),s,a)}function Gm(s,a,u,f){return s===n||Pn(s,Uo[u])&&!He.call(f,u)?a:s}function zm(s,a,u,f,g,C){return ot(s)&&ot(a)&&(C.set(a,s),La(s,a,n,zm,C),C.delete(a)),s}function VI(s){return fs(s)?n:s}function Um(s,a,u,f,g,C){var E=u&T,B=s.length,L=a.length;if(B!=L&&!(E&&L>B))return!1;var K=C.get(s),X=C.get(a);if(K&&X)return K==a&&X==s;var Q=-1,oe=!0,pe=u&O?new io:n;for(C.set(s,a),C.set(a,s);++Q<B;){var _e=s[Q],De=a[Q];if(f)var Ce=E?f(De,_e,Q,a,s,C):f(_e,De,Q,s,a,C);if(Ce!==n){if(Ce)continue;oe=!1;break}if(pe){if(!jc(a,function(Fe,Oe){if(!es(pe,Oe)&&(_e===Fe||g(_e,Fe,u,f,C)))return pe.push(Oe)})){oe=!1;break}}else if(!(_e===De||g(_e,De,u,f,C))){oe=!1;break}}return C.delete(s),C.delete(a),oe}function AI(s,a,u,f,g,C,E){switch(u){case Lo:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Qi:return!(s.byteLength!=a.byteLength||!C(new Sa(s),new Sa(a)));case Hi:case qi:case Ki:return Pn(+s,+a);case ua:return s.name==a.name&&s.message==a.message;case Yi:case Xi:return s==a+"";case Nn:var B=Jc;case Vn:var L=f&T;if(B||(B=Ca),s.size!=a.size&&!L)return!1;var K=E.get(s);if(K)return K==a;f|=O,E.set(s,a);var X=Um(B(s),B(a),f,g,C,E);return E.delete(s),X;case ha:if(is)return is.call(s)==is.call(a)}return!1}function BI(s,a,u,f,g,C){var E=u&T,B=xd(s),L=B.length,K=xd(a),X=K.length;if(L!=X&&!E)return!1;for(var Q=L;Q--;){var oe=B[Q];if(!(E?oe in a:He.call(a,oe)))return!1}var pe=C.get(s),_e=C.get(a);if(pe&&_e)return pe==a&&_e==s;var De=!0;C.set(s,a),C.set(a,s);for(var Ce=E;++Q<L;){oe=B[Q];var Fe=s[oe],Oe=a[oe];if(f)var tn=E?f(Oe,Fe,oe,a,s,C):f(Fe,Oe,oe,s,a,C);if(!(tn===n?Fe===Oe||g(Fe,Oe,u,f,C):tn)){De=!1;break}Ce||(Ce=oe=="constructor")}if(De&&!Ce){var Lt=s.constructor,nn=a.constructor;Lt!=nn&&"constructor"in s&&"constructor"in a&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof nn=="function"&&nn instanceof nn)&&(De=!1)}return C.delete(s),C.delete(a),De}function ir(s){return Bd(Km(s,n,og),s+"")}function xd(s){return cm(s,_t,Td)}function kd(s){return cm(s,zt,Zm)}var Sd=Ba?function(s){return Ba.get(s)}:Zd;function Wa(s){for(var a=s.name+"",u=Wo[a],f=He.call(Wo,a)?u.length:0;f--;){var g=u[f],C=g.func;if(C==null||C==s)return g.name}return a}function Ko(s){var a=He.call(_,"placeholder")?_:s;return a.placeholder}function ge(){var s=_.iteratee||zd;return s=s===zd?pm:s,arguments.length?s(arguments[0],arguments[1]):s}function ja(s,a){var u=s.__data__;return MI(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Ed(s){for(var a=_t(s),u=a.length;u--;){var f=a[u],g=s[f];a[u]=[f,g,Hm(g)]}return a}function lo(s,a){var u=zR(s,a);return um(u)?u:n}function PI(s){var a=He.call(s,ro),u=s[ro];try{s[ro]=n;var f=!0}catch{}var g=xa.call(s);return f&&(a?s[ro]=u:delete s[ro]),g}var Td=ed?function(s){return s==null?[]:(s=Ke(s),Br(ed(s),function(a){return Yf.call(s,a)}))}:Wd,Zm=ed?function(s){for(var a=[];s;)Pr(a,Td(s)),s=Ea(s);return a}:Wd,Nt=It;(td&&Nt(new td(new ArrayBuffer(1)))!=Lo||ns&&Nt(new ns)!=Nn||nd&&Nt(nd.resolve())!=sf||Zo&&Nt(new Zo)!=Vn||rs&&Nt(new rs)!=Ji)&&(Nt=function(s){var a=It(s),u=a==er?s.constructor:n,f=u?co(u):"";if(f)switch(f){case fD:return Lo;case mD:return Nn;case gD:return sf;case yD:return Vn;case _D:return Ji}return a});function RI(s,a,u){for(var f=-1,g=u.length;++f<g;){var C=u[f],E=C.size;switch(C.type){case"drop":s+=E;break;case"dropRight":a-=E;break;case"take":a=Tt(a,s+E);break;case"takeRight":s=ft(s,a-E);break}}return{start:s,end:a}}function DI(s){var a=s.match($P);return a?a[1].split(GP):[]}function Wm(s,a,u){a=Lr(a,s);for(var f=-1,g=a.length,C=!1;++f<g;){var E=Hn(a[f]);if(!(C=s!=null&&u(s,E)))break;s=s[E]}return C||++f!=g?C:(g=s==null?0:s.length,!!g&&Qa(g)&&sr(E,g)&&(Ne(s)||uo(s)))}function II(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&He.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function jm(s){return typeof s.constructor=="function"&&!ps(s)?jo(Ea(s)):{}}function FI(s,a,u){var f=s.constructor;switch(a){case Qi:return vd(s);case Hi:case qi:return new f(+s);case Lo:return CI(s,u);case Ec:case Tc:case Nc:case Vc:case Ac:case Bc:case Pc:case Rc:case Dc:return Nm(s,u);case Nn:return new f;case Ki:case Xi:return new f(s);case Yi:return vI(s);case Vn:return new f;case ha:return wI(s)}}function LI(s,a){var u=a.length;if(!u)return s;var f=u-1;return a[f]=(u>1?"& ":"")+a[f],a=a.join(u>2?", ":" "),s.replace(MP,`{
|
|
72
|
+
*/Xs.exports,function(t,e){(function(){var n,o="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",y=1,w=2,v=4,T=1,O=2,M=1,V=2,U=4,k=8,W=16,A=32,S=64,P=128,G=256,Y=512,F=30,Z="...",z=800,R=16,N=1,$=2,H=3,J=1/0,ne=9007199254740991,de=17976931348623157e292,me=NaN,Te=4294967295,Se=Te-1,je=Te>>>1,Dt=[["ary",P],["bind",M],["bindKey",V],["curry",k],["curryRight",W],["flip",Y],["partial",A],["partialRight",S],["rearg",G]],qe="[object Arguments]",Zn="[object Array]",SP="[object AsyncFunction]",Hi="[object Boolean]",qi="[object Date]",EP="[object DOMException]",ua="[object Error]",pa="[object Function]",af="[object GeneratorFunction]",Nn="[object Map]",Ki="[object Number]",TP="[object Null]",er="[object Object]",lf="[object Promise]",NP="[object Proxy]",Yi="[object RegExp]",Vn="[object Set]",Xi="[object String]",ha="[object Symbol]",VP="[object Undefined]",Ji="[object WeakMap]",AP="[object WeakSet]",Qi="[object ArrayBuffer]",Oo="[object DataView]",Ec="[object Float32Array]",Tc="[object Float64Array]",Nc="[object Int8Array]",Vc="[object Int16Array]",Ac="[object Int32Array]",Bc="[object Uint8Array]",Pc="[object Uint8ClampedArray]",Rc="[object Uint16Array]",Dc="[object Uint32Array]",BP=/\b__p \+= '';/g,PP=/\b(__p \+=) '' \+/g,RP=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cf=/&(?:amp|lt|gt|quot|#39);/g,df=/[&<>"']/g,DP=RegExp(cf.source),IP=RegExp(df.source),FP=/<%-([\s\S]+?)%>/g,LP=/<%([\s\S]+?)%>/g,uf=/<%=([\s\S]+?)%>/g,OP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MP=/^\w*$/,$P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ic=/[\\^$.*+?()[\]{}|]/g,GP=RegExp(Ic.source),Fc=/^\s+/,zP=/\s/,UP=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ZP=/\{\n\/\* \[wrapped with (.+)\] \*/,WP=/,? & /,jP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,HP=/[()=,{}\[\]\/\s]/,qP=/\\(\\)?/g,KP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pf=/\w*$/,YP=/^[-+]0x[0-9a-f]+$/i,XP=/^0b[01]+$/i,JP=/^\[object .+?Constructor\]$/,QP=/^0o[0-7]+$/i,eR=/^(?:0|[1-9]\d*)$/,tR=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fa=/($^)/,nR=/['\n\r\u2028\u2029\\]/g,ma="\\ud800-\\udfff",rR="\\u0300-\\u036f",oR="\\ufe20-\\ufe2f",iR="\\u20d0-\\u20ff",hf=rR+oR+iR,ff="\\u2700-\\u27bf",mf="a-z\\xdf-\\xf6\\xf8-\\xff",sR="\\xac\\xb1\\xd7\\xf7",aR="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lR="\\u2000-\\u206f",cR=" \\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",gf="A-Z\\xc0-\\xd6\\xd8-\\xde",yf="\\ufe0e\\ufe0f",_f=sR+aR+lR+cR,Lc="['’]",dR="["+ma+"]",Cf="["+_f+"]",ga="["+hf+"]",vf="\\d+",uR="["+ff+"]",wf="["+mf+"]",bf="[^"+ma+_f+vf+ff+mf+gf+"]",Oc="\\ud83c[\\udffb-\\udfff]",pR="(?:"+ga+"|"+Oc+")",xf="[^"+ma+"]",Mc="(?:\\ud83c[\\udde6-\\uddff]){2}",$c="[\\ud800-\\udbff][\\udc00-\\udfff]",Mo="["+gf+"]",kf="\\u200d",Sf="(?:"+wf+"|"+bf+")",hR="(?:"+Mo+"|"+bf+")",Ef="(?:"+Lc+"(?:d|ll|m|re|s|t|ve))?",Tf="(?:"+Lc+"(?:D|LL|M|RE|S|T|VE))?",Nf=pR+"?",Vf="["+yf+"]?",fR="(?:"+kf+"(?:"+[xf,Mc,$c].join("|")+")"+Vf+Nf+")*",mR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Af=Vf+Nf+fR,yR="(?:"+[uR,Mc,$c].join("|")+")"+Af,_R="(?:"+[xf+ga+"?",ga,Mc,$c,dR].join("|")+")",CR=RegExp(Lc,"g"),vR=RegExp(ga,"g"),Gc=RegExp(Oc+"(?="+Oc+")|"+_R+Af,"g"),wR=RegExp([Mo+"?"+wf+"+"+Ef+"(?="+[Cf,Mo,"$"].join("|")+")",hR+"+"+Tf+"(?="+[Cf,Mo+Sf,"$"].join("|")+")",Mo+"?"+Sf+"+"+Ef,Mo+"+"+Tf,gR,mR,vf,yR].join("|"),"g"),bR=RegExp("["+kf+ma+hf+yf+"]"),xR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kR=["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"],SR=-1,Je={};Je[Ec]=Je[Tc]=Je[Nc]=Je[Vc]=Je[Ac]=Je[Bc]=Je[Pc]=Je[Rc]=Je[Dc]=!0,Je[qe]=Je[Zn]=Je[Qi]=Je[Hi]=Je[Oo]=Je[qi]=Je[ua]=Je[pa]=Je[Nn]=Je[Ki]=Je[er]=Je[Yi]=Je[Vn]=Je[Xi]=Je[Ji]=!1;var Ye={};Ye[qe]=Ye[Zn]=Ye[Qi]=Ye[Oo]=Ye[Hi]=Ye[qi]=Ye[Ec]=Ye[Tc]=Ye[Nc]=Ye[Vc]=Ye[Ac]=Ye[Nn]=Ye[Ki]=Ye[er]=Ye[Yi]=Ye[Vn]=Ye[Xi]=Ye[ha]=Ye[Bc]=Ye[Pc]=Ye[Rc]=Ye[Dc]=!0,Ye[ua]=Ye[pa]=Ye[Ji]=!1;var ER={À:"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"},TR={"&":"&","<":"<",">":">",'"':""","'":"'"},NR={"&":"&","<":"<",">":">",""":'"',"'":"'"},VR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},AR=parseFloat,BR=parseInt,Bf=typeof ei=="object"&&ei&&ei.Object===Object&&ei,PR=typeof self=="object"&&self&&self.Object===Object&&self,wt=Bf||PR||Function("return this")(),zc=e&&!e.nodeType&&e,ro=zc&&!0&&t&&!t.nodeType&&t,Pf=ro&&ro.exports===zc,Uc=Pf&&Bf.process,rn=function(){try{var D=ro&&ro.require&&ro.require("util").types;return D||Uc&&Uc.binding&&Uc.binding("util")}catch{}}(),Rf=rn&&rn.isArrayBuffer,Df=rn&&rn.isDate,If=rn&&rn.isMap,Ff=rn&&rn.isRegExp,Lf=rn&&rn.isSet,Of=rn&&rn.isTypedArray;function Xt(D,q,j){switch(j.length){case 0:return D.call(q);case 1:return D.call(q,j[0]);case 2:return D.call(q,j[0],j[1]);case 3:return D.call(q,j[0],j[1],j[2])}return D.apply(q,j)}function RR(D,q,j,ce){for(var Ee=-1,Ue=D==null?0:D.length;++Ee<Ue;){var ht=D[Ee];q(ce,ht,j(ht),D)}return ce}function on(D,q){for(var j=-1,ce=D==null?0:D.length;++j<ce&&q(D[j],j,D)!==!1;);return D}function DR(D,q){for(var j=D==null?0:D.length;j--&&q(D[j],j,D)!==!1;);return D}function Mf(D,q){for(var j=-1,ce=D==null?0:D.length;++j<ce;)if(!q(D[j],j,D))return!1;return!0}function Pr(D,q){for(var j=-1,ce=D==null?0:D.length,Ee=0,Ue=[];++j<ce;){var ht=D[j];q(ht,j,D)&&(Ue[Ee++]=ht)}return Ue}function ya(D,q){var j=D==null?0:D.length;return!!j&&$o(D,q,0)>-1}function Zc(D,q,j){for(var ce=-1,Ee=D==null?0:D.length;++ce<Ee;)if(j(q,D[ce]))return!0;return!1}function et(D,q){for(var j=-1,ce=D==null?0:D.length,Ee=Array(ce);++j<ce;)Ee[j]=q(D[j],j,D);return Ee}function Rr(D,q){for(var j=-1,ce=q.length,Ee=D.length;++j<ce;)D[Ee+j]=q[j];return D}function Wc(D,q,j,ce){var Ee=-1,Ue=D==null?0:D.length;for(ce&&Ue&&(j=D[++Ee]);++Ee<Ue;)j=q(j,D[Ee],Ee,D);return j}function IR(D,q,j,ce){var Ee=D==null?0:D.length;for(ce&&Ee&&(j=D[--Ee]);Ee--;)j=q(j,D[Ee],Ee,D);return j}function jc(D,q){for(var j=-1,ce=D==null?0:D.length;++j<ce;)if(q(D[j],j,D))return!0;return!1}var FR=Hc("length");function LR(D){return D.split("")}function OR(D){return D.match(jP)||[]}function $f(D,q,j){var ce;return j(D,function(Ee,Ue,ht){if(q(Ee,Ue,ht))return ce=Ue,!1}),ce}function _a(D,q,j,ce){for(var Ee=D.length,Ue=j+(ce?1:-1);ce?Ue--:++Ue<Ee;)if(q(D[Ue],Ue,D))return Ue;return-1}function $o(D,q,j){return q===q?YR(D,q,j):_a(D,Gf,j)}function MR(D,q,j,ce){for(var Ee=j-1,Ue=D.length;++Ee<Ue;)if(ce(D[Ee],q))return Ee;return-1}function Gf(D){return D!==D}function zf(D,q){var j=D==null?0:D.length;return j?Kc(D,q)/j:me}function Hc(D){return function(q){return q==null?n:q[D]}}function qc(D){return function(q){return D==null?n:D[q]}}function Uf(D,q,j,ce,Ee){return Ee(D,function(Ue,ht,Ke){j=ce?(ce=!1,Ue):q(j,Ue,ht,Ke)}),j}function $R(D,q){var j=D.length;for(D.sort(q);j--;)D[j]=D[j].value;return D}function Kc(D,q){for(var j,ce=-1,Ee=D.length;++ce<Ee;){var Ue=q(D[ce]);Ue!==n&&(j=j===n?Ue:j+Ue)}return j}function Yc(D,q){for(var j=-1,ce=Array(D);++j<D;)ce[j]=q(j);return ce}function GR(D,q){return et(q,function(j){return[j,D[j]]})}function Zf(D){return D&&D.slice(0,qf(D)+1).replace(Fc,"")}function Jt(D){return function(q){return D(q)}}function Xc(D,q){return et(q,function(j){return D[j]})}function es(D,q){return D.has(q)}function Wf(D,q){for(var j=-1,ce=D.length;++j<ce&&$o(q,D[j],0)>-1;);return j}function jf(D,q){for(var j=D.length;j--&&$o(q,D[j],0)>-1;);return j}function zR(D,q){for(var j=D.length,ce=0;j--;)D[j]===q&&++ce;return ce}var UR=qc(ER),ZR=qc(TR);function WR(D){return"\\"+VR[D]}function jR(D,q){return D==null?n:D[q]}function Go(D){return bR.test(D)}function HR(D){return xR.test(D)}function qR(D){for(var q,j=[];!(q=D.next()).done;)j.push(q.value);return j}function Jc(D){var q=-1,j=Array(D.size);return D.forEach(function(ce,Ee){j[++q]=[Ee,ce]}),j}function Hf(D,q){return function(j){return D(q(j))}}function Dr(D,q){for(var j=-1,ce=D.length,Ee=0,Ue=[];++j<ce;){var ht=D[j];(ht===q||ht===m)&&(D[j]=m,Ue[Ee++]=j)}return Ue}function Ca(D){var q=-1,j=Array(D.size);return D.forEach(function(ce){j[++q]=ce}),j}function KR(D){var q=-1,j=Array(D.size);return D.forEach(function(ce){j[++q]=[ce,ce]}),j}function YR(D,q,j){for(var ce=j-1,Ee=D.length;++ce<Ee;)if(D[ce]===q)return ce;return-1}function XR(D,q,j){for(var ce=j+1;ce--;)if(D[ce]===q)return ce;return ce}function zo(D){return Go(D)?QR(D):FR(D)}function An(D){return Go(D)?eD(D):LR(D)}function qf(D){for(var q=D.length;q--&&zP.test(D.charAt(q)););return q}var JR=qc(NR);function QR(D){for(var q=Gc.lastIndex=0;Gc.test(D);)++q;return q}function eD(D){return D.match(Gc)||[]}function tD(D){return D.match(wR)||[]}var nD=function D(q){q=q==null?wt:Uo.defaults(wt.Object(),q,Uo.pick(wt,kR));var j=q.Array,ce=q.Date,Ee=q.Error,Ue=q.Function,ht=q.Math,Ke=q.Object,Qc=q.RegExp,rD=q.String,sn=q.TypeError,va=j.prototype,oD=Ue.prototype,Zo=Ke.prototype,wa=q["__core-js_shared__"],ba=oD.toString,He=Zo.hasOwnProperty,iD=0,Kf=function(){var s=/[^.]+$/.exec(wa&&wa.keys&&wa.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),xa=Zo.toString,sD=ba.call(Ke),aD=wt._,lD=Qc("^"+ba.call(He).replace(Ic,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ka=Pf?q.Buffer:n,Ir=q.Symbol,Sa=q.Uint8Array,Yf=ka?ka.allocUnsafe:n,Ea=Hf(Ke.getPrototypeOf,Ke),Xf=Ke.create,Jf=Zo.propertyIsEnumerable,Ta=va.splice,Qf=Ir?Ir.isConcatSpreadable:n,ts=Ir?Ir.iterator:n,oo=Ir?Ir.toStringTag:n,Na=function(){try{var s=co(Ke,"defineProperty");return s({},"",{}),s}catch{}}(),cD=q.clearTimeout!==wt.clearTimeout&&q.clearTimeout,dD=ce&&ce.now!==wt.Date.now&&ce.now,uD=q.setTimeout!==wt.setTimeout&&q.setTimeout,Va=ht.ceil,Aa=ht.floor,ed=Ke.getOwnPropertySymbols,pD=ka?ka.isBuffer:n,em=q.isFinite,hD=va.join,fD=Hf(Ke.keys,Ke),ft=ht.max,Tt=ht.min,mD=ce.now,gD=q.parseInt,tm=ht.random,yD=va.reverse,td=co(q,"DataView"),ns=co(q,"Map"),nd=co(q,"Promise"),Wo=co(q,"Set"),rs=co(q,"WeakMap"),os=co(Ke,"create"),Ba=rs&&new rs,jo={},_D=uo(td),CD=uo(ns),vD=uo(nd),wD=uo(Wo),bD=uo(rs),Pa=Ir?Ir.prototype:n,is=Pa?Pa.valueOf:n,nm=Pa?Pa.toString:n;function _(s){if(it(s)&&!Ne(s)&&!(s instanceof Le)){if(s instanceof an)return s;if(He.call(s,"__wrapped__"))return rg(s)}return new an(s)}var Ho=function(){function s(){}return function(a){if(!ot(a))return{};if(Xf)return Xf(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function Ra(){}function an(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}_.templateSettings={escape:FP,evaluate:LP,interpolate:uf,variable:"",imports:{_}},_.prototype=Ra.prototype,_.prototype.constructor=_,an.prototype=Ho(Ra.prototype),an.prototype.constructor=an;function Le(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Te,this.__views__=[]}function xD(){var s=new Le(this.__wrapped__);return s.__actions__=$t(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=$t(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=$t(this.__views__),s}function kD(){if(this.__filtered__){var s=new Le(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function SD(){var s=this.__wrapped__.value(),a=this.__dir__,u=Ne(s),f=a<0,g=u?s.length:0,C=LI(0,g,this.__views__),E=C.start,B=C.end,L=B-E,K=f?B:E-1,X=this.__iteratees__,Q=X.length,oe=0,pe=Tt(L,this.__takeCount__);if(!u||!f&&g==L&&pe==L)return Em(s,this.__actions__);var _e=[];e:for(;L--&&oe<pe;){K+=a;for(var De=-1,Ce=s[K];++De<Q;){var Fe=X[De],Oe=Fe.iteratee,tn=Fe.type,Lt=Oe(Ce);if(tn==$)Ce=Lt;else if(!Lt){if(tn==N)continue e;break e}}_e[oe++]=Ce}return _e}Le.prototype=Ho(Ra.prototype),Le.prototype.constructor=Le;function io(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function ED(){this.__data__=os?os(null):{},this.size=0}function TD(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function ND(s){var a=this.__data__;if(os){var u=a[s];return u===p?n:u}return He.call(a,s)?a[s]:n}function VD(s){var a=this.__data__;return os?a[s]!==n:He.call(a,s)}function AD(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=os&&a===n?p:a,this}io.prototype.clear=ED,io.prototype.delete=TD,io.prototype.get=ND,io.prototype.has=VD,io.prototype.set=AD;function tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function BD(){this.__data__=[],this.size=0}function PD(s){var a=this.__data__,u=Da(a,s);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():Ta.call(a,u,1),--this.size,!0}function RD(s){var a=this.__data__,u=Da(a,s);return u<0?n:a[u][1]}function DD(s){return Da(this.__data__,s)>-1}function ID(s,a){var u=this.__data__,f=Da(u,s);return f<0?(++this.size,u.push([s,a])):u[f][1]=a,this}tr.prototype.clear=BD,tr.prototype.delete=PD,tr.prototype.get=RD,tr.prototype.has=DD,tr.prototype.set=ID;function nr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function FD(){this.size=0,this.__data__={hash:new io,map:new(ns||tr),string:new io}}function LD(s){var a=ja(this,s).delete(s);return this.size-=a?1:0,a}function OD(s){return ja(this,s).get(s)}function MD(s){return ja(this,s).has(s)}function $D(s,a){var u=ja(this,s),f=u.size;return u.set(s,a),this.size+=u.size==f?0:1,this}nr.prototype.clear=FD,nr.prototype.delete=LD,nr.prototype.get=OD,nr.prototype.has=MD,nr.prototype.set=$D;function so(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new nr;++a<u;)this.add(s[a])}function GD(s){return this.__data__.set(s,p),this}function zD(s){return this.__data__.has(s)}so.prototype.add=so.prototype.push=GD,so.prototype.has=zD;function Bn(s){var a=this.__data__=new tr(s);this.size=a.size}function UD(){this.__data__=new tr,this.size=0}function ZD(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function WD(s){return this.__data__.get(s)}function jD(s){return this.__data__.has(s)}function HD(s,a){var u=this.__data__;if(u instanceof tr){var f=u.__data__;if(!ns||f.length<i-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new nr(f)}return u.set(s,a),this.size=u.size,this}Bn.prototype.clear=UD,Bn.prototype.delete=ZD,Bn.prototype.get=WD,Bn.prototype.has=jD,Bn.prototype.set=HD;function rm(s,a){var u=Ne(s),f=!u&&po(s),g=!u&&!f&&$r(s),C=!u&&!f&&!g&&Xo(s),E=u||f||g||C,B=E?Yc(s.length,rD):[],L=B.length;for(var K in s)(a||He.call(s,K))&&!(E&&(K=="length"||g&&(K=="offset"||K=="parent")||C&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||sr(K,L)))&&B.push(K);return B}function om(s){var a=s.length;return a?s[hd(0,a-1)]:n}function qD(s,a){return Ha($t(s),ao(a,0,s.length))}function KD(s){return Ha($t(s))}function rd(s,a,u){(u!==n&&!Pn(s[a],u)||u===n&&!(a in s))&&rr(s,a,u)}function ss(s,a,u){var f=s[a];(!(He.call(s,a)&&Pn(f,u))||u===n&&!(a in s))&&rr(s,a,u)}function Da(s,a){for(var u=s.length;u--;)if(Pn(s[u][0],a))return u;return-1}function YD(s,a,u,f){return Fr(s,function(g,C,E){a(f,g,u(g),E)}),f}function im(s,a){return s&&jn(a,_t(a),s)}function XD(s,a){return s&&jn(a,zt(a),s)}function rr(s,a,u){a=="__proto__"&&Na?Na(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function od(s,a){for(var u=-1,f=a.length,g=j(f),C=s==null;++u<f;)g[u]=C?n:Od(s,a[u]);return g}function ao(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function ln(s,a,u,f,g,C){var E,B=a&y,L=a&w,K=a&v;if(u&&(E=g?u(s,f,g,C):u(s)),E!==n)return E;if(!ot(s))return s;var X=Ne(s);if(X){if(E=MI(s),!B)return $t(s,E)}else{var Q=Nt(s),oe=Q==pa||Q==af;if($r(s))return Vm(s,B);if(Q==er||Q==qe||oe&&!g){if(E=L||oe?{}:qm(s),!B)return L?NI(s,XD(E,s)):TI(s,im(E,s))}else{if(!Ye[Q])return g?s:{};E=$I(s,Q,B)}}C||(C=new Bn);var pe=C.get(s);if(pe)return pe;C.set(s,E),xg(s)?s.forEach(function(Ce){E.add(ln(Ce,a,u,Ce,s,C))}):wg(s)&&s.forEach(function(Ce,Fe){E.set(Fe,ln(Ce,a,u,Fe,s,C))});var _e=K?L?kd:xd:L?zt:_t,De=X?n:_e(s);return on(De||s,function(Ce,Fe){De&&(Fe=Ce,Ce=s[Fe]),ss(E,Fe,ln(Ce,a,u,Fe,s,C))}),E}function JD(s){var a=_t(s);return function(u){return sm(u,s,a)}}function sm(s,a,u){var f=u.length;if(s==null)return!f;for(s=Ke(s);f--;){var g=u[f],C=a[g],E=s[g];if(E===n&&!(g in s)||!C(E))return!1}return!0}function am(s,a,u){if(typeof s!="function")throw new sn(c);return hs(function(){s.apply(n,u)},a)}function as(s,a,u,f){var g=-1,C=ya,E=!0,B=s.length,L=[],K=a.length;if(!B)return L;u&&(a=et(a,Jt(u))),f?(C=Zc,E=!1):a.length>=i&&(C=es,E=!1,a=new so(a));e:for(;++g<B;){var X=s[g],Q=u==null?X:u(X);if(X=f||X!==0?X:0,E&&Q===Q){for(var oe=K;oe--;)if(a[oe]===Q)continue e;L.push(X)}else C(a,Q,f)||L.push(X)}return L}var Fr=Dm(Wn),lm=Dm(sd,!0);function QD(s,a){var u=!0;return Fr(s,function(f,g,C){return u=!!a(f,g,C),u}),u}function Ia(s,a,u){for(var f=-1,g=s.length;++f<g;){var C=s[f],E=a(C);if(E!=null&&(B===n?E===E&&!en(E):u(E,B)))var B=E,L=C}return L}function eI(s,a,u,f){var g=s.length;for(u=Be(u),u<0&&(u=-u>g?0:g+u),f=f===n||f>g?g:Be(f),f<0&&(f+=g),f=u>f?0:Sg(f);u<f;)s[u++]=a;return s}function cm(s,a){var u=[];return Fr(s,function(f,g,C){a(f,g,C)&&u.push(f)}),u}function bt(s,a,u,f,g){var C=-1,E=s.length;for(u||(u=zI),g||(g=[]);++C<E;){var B=s[C];a>0&&u(B)?a>1?bt(B,a-1,u,f,g):Rr(g,B):f||(g[g.length]=B)}return g}var id=Im(),dm=Im(!0);function Wn(s,a){return s&&id(s,a,_t)}function sd(s,a){return s&&dm(s,a,_t)}function Fa(s,a){return Pr(a,function(u){return ar(s[u])})}function lo(s,a){a=Or(a,s);for(var u=0,f=a.length;s!=null&&u<f;)s=s[Hn(a[u++])];return u&&u==f?s:n}function um(s,a,u){var f=a(s);return Ne(s)?f:Rr(f,u(s))}function It(s){return s==null?s===n?VP:TP:oo&&oo in Ke(s)?FI(s):KI(s)}function ad(s,a){return s>a}function tI(s,a){return s!=null&&He.call(s,a)}function nI(s,a){return s!=null&&a in Ke(s)}function rI(s,a,u){return s>=Tt(a,u)&&s<ft(a,u)}function ld(s,a,u){for(var f=u?Zc:ya,g=s[0].length,C=s.length,E=C,B=j(C),L=1/0,K=[];E--;){var X=s[E];E&&a&&(X=et(X,Jt(a))),L=Tt(X.length,L),B[E]=!u&&(a||g>=120&&X.length>=120)?new so(E&&X):n}X=s[0];var Q=-1,oe=B[0];e:for(;++Q<g&&K.length<L;){var pe=X[Q],_e=a?a(pe):pe;if(pe=u||pe!==0?pe:0,!(oe?es(oe,_e):f(K,_e,u))){for(E=C;--E;){var De=B[E];if(!(De?es(De,_e):f(s[E],_e,u)))continue e}oe&&oe.push(_e),K.push(pe)}}return K}function oI(s,a,u,f){return Wn(s,function(g,C,E){a(f,u(g),C,E)}),f}function ls(s,a,u){a=Or(a,s),s=Jm(s,a);var f=s==null?s:s[Hn(dn(a))];return f==null?n:Xt(f,s,u)}function pm(s){return it(s)&&It(s)==qe}function iI(s){return it(s)&&It(s)==Qi}function sI(s){return it(s)&&It(s)==qi}function cs(s,a,u,f,g){return s===a?!0:s==null||a==null||!it(s)&&!it(a)?s!==s&&a!==a:aI(s,a,u,f,cs,g)}function aI(s,a,u,f,g,C){var E=Ne(s),B=Ne(a),L=E?Zn:Nt(s),K=B?Zn:Nt(a);L=L==qe?er:L,K=K==qe?er:K;var X=L==er,Q=K==er,oe=L==K;if(oe&&$r(s)){if(!$r(a))return!1;E=!0,X=!1}if(oe&&!X)return C||(C=new Bn),E||Xo(s)?Wm(s,a,u,f,g,C):DI(s,a,L,u,f,g,C);if(!(u&T)){var pe=X&&He.call(s,"__wrapped__"),_e=Q&&He.call(a,"__wrapped__");if(pe||_e){var De=pe?s.value():s,Ce=_e?a.value():a;return C||(C=new Bn),g(De,Ce,u,f,C)}}return oe?(C||(C=new Bn),II(s,a,u,f,g,C)):!1}function lI(s){return it(s)&&Nt(s)==Nn}function cd(s,a,u,f){var g=u.length,C=g,E=!f;if(s==null)return!C;for(s=Ke(s);g--;){var B=u[g];if(E&&B[2]?B[1]!==s[B[0]]:!(B[0]in s))return!1}for(;++g<C;){B=u[g];var L=B[0],K=s[L],X=B[1];if(E&&B[2]){if(K===n&&!(L in s))return!1}else{var Q=new Bn;if(f)var oe=f(K,X,L,s,a,Q);if(!(oe===n?cs(X,K,T|O,f,Q):oe))return!1}}return!0}function hm(s){if(!ot(s)||ZI(s))return!1;var a=ar(s)?lD:JP;return a.test(uo(s))}function cI(s){return it(s)&&It(s)==Yi}function dI(s){return it(s)&&Nt(s)==Vn}function uI(s){return it(s)&&Qa(s.length)&&!!Je[It(s)]}function fm(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Ne(s)?ym(s[0],s[1]):gm(s):Fg(s)}function dd(s){if(!ps(s))return fD(s);var a=[];for(var u in Ke(s))He.call(s,u)&&u!="constructor"&&a.push(u);return a}function pI(s){if(!ot(s))return qI(s);var a=ps(s),u=[];for(var f in s)f=="constructor"&&(a||!He.call(s,f))||u.push(f);return u}function ud(s,a){return s<a}function mm(s,a){var u=-1,f=Gt(s)?j(s.length):[];return Fr(s,function(g,C,E){f[++u]=a(g,C,E)}),f}function gm(s){var a=Ed(s);return a.length==1&&a[0][2]?Ym(a[0][0],a[0][1]):function(u){return u===s||cd(u,s,a)}}function ym(s,a){return Nd(s)&&Km(a)?Ym(Hn(s),a):function(u){var f=Od(u,s);return f===n&&f===a?Md(u,s):cs(a,f,T|O)}}function La(s,a,u,f,g){s!==a&&id(a,function(C,E){if(g||(g=new Bn),ot(C))hI(s,a,E,u,La,f,g);else{var B=f?f(Ad(s,E),C,E+"",s,a,g):n;B===n&&(B=C),rd(s,E,B)}},zt)}function hI(s,a,u,f,g,C,E){var B=Ad(s,u),L=Ad(a,u),K=E.get(L);if(K){rd(s,u,K);return}var X=C?C(B,L,u+"",s,a,E):n,Q=X===n;if(Q){var oe=Ne(L),pe=!oe&&$r(L),_e=!oe&&!pe&&Xo(L);X=L,oe||pe||_e?Ne(B)?X=B:at(B)?X=$t(B):pe?(Q=!1,X=Vm(L,!0)):_e?(Q=!1,X=Am(L,!0)):X=[]:fs(L)||po(L)?(X=B,po(B)?X=Eg(B):(!ot(B)||ar(B))&&(X=qm(L))):Q=!1}Q&&(E.set(L,X),g(X,L,f,C,E),E.delete(L)),rd(s,u,X)}function _m(s,a){var u=s.length;if(u)return a+=a<0?u:0,sr(a,u)?s[a]:n}function Cm(s,a,u){a.length?a=et(a,function(C){return Ne(C)?function(E){return lo(E,C.length===1?C[0]:C)}:C}):a=[Ut];var f=-1;a=et(a,Jt(ge()));var g=mm(s,function(C,E,B){var L=et(a,function(K){return K(C)});return{criteria:L,index:++f,value:C}});return $R(g,function(C,E){return EI(C,E,u)})}function fI(s,a){return vm(s,a,function(u,f){return Md(s,f)})}function vm(s,a,u){for(var f=-1,g=a.length,C={};++f<g;){var E=a[f],B=lo(s,E);u(B,E)&&ds(C,Or(E,s),B)}return C}function mI(s){return function(a){return lo(a,s)}}function pd(s,a,u,f){var g=f?MR:$o,C=-1,E=a.length,B=s;for(s===a&&(a=$t(a)),u&&(B=et(s,Jt(u)));++C<E;)for(var L=0,K=a[C],X=u?u(K):K;(L=g(B,X,L,f))>-1;)B!==s&&Ta.call(B,L,1),Ta.call(s,L,1);return s}function wm(s,a){for(var u=s?a.length:0,f=u-1;u--;){var g=a[u];if(u==f||g!==C){var C=g;sr(g)?Ta.call(s,g,1):gd(s,g)}}return s}function hd(s,a){return s+Aa(tm()*(a-s+1))}function gI(s,a,u,f){for(var g=-1,C=ft(Va((a-s)/(u||1)),0),E=j(C);C--;)E[f?C:++g]=s,s+=u;return E}function fd(s,a){var u="";if(!s||a<1||a>ne)return u;do a%2&&(u+=s),a=Aa(a/2),a&&(s+=s);while(a);return u}function Ie(s,a){return Bd(Xm(s,a,Ut),s+"")}function yI(s){return om(Jo(s))}function _I(s,a){var u=Jo(s);return Ha(u,ao(a,0,u.length))}function ds(s,a,u,f){if(!ot(s))return s;a=Or(a,s);for(var g=-1,C=a.length,E=C-1,B=s;B!=null&&++g<C;){var L=Hn(a[g]),K=u;if(L==="__proto__"||L==="constructor"||L==="prototype")return s;if(g!=E){var X=B[L];K=f?f(X,L,B):n,K===n&&(K=ot(X)?X:sr(a[g+1])?[]:{})}ss(B,L,K),B=B[L]}return s}var bm=Ba?function(s,a){return Ba.set(s,a),s}:Ut,CI=Na?function(s,a){return Na(s,"toString",{configurable:!0,enumerable:!1,value:Gd(a),writable:!0})}:Ut;function vI(s){return Ha(Jo(s))}function cn(s,a,u){var f=-1,g=s.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var C=j(g);++f<g;)C[f]=s[f+a];return C}function wI(s,a){var u;return Fr(s,function(f,g,C){return u=a(f,g,C),!u}),!!u}function Oa(s,a,u){var f=0,g=s==null?f:s.length;if(typeof a=="number"&&a===a&&g<=je){for(;f<g;){var C=f+g>>>1,E=s[C];E!==null&&!en(E)&&(u?E<=a:E<a)?f=C+1:g=C}return g}return md(s,a,Ut,u)}function md(s,a,u,f){var g=0,C=s==null?0:s.length;if(C===0)return 0;a=u(a);for(var E=a!==a,B=a===null,L=en(a),K=a===n;g<C;){var X=Aa((g+C)/2),Q=u(s[X]),oe=Q!==n,pe=Q===null,_e=Q===Q,De=en(Q);if(E)var Ce=f||_e;else K?Ce=_e&&(f||oe):B?Ce=_e&&oe&&(f||!pe):L?Ce=_e&&oe&&!pe&&(f||!De):pe||De?Ce=!1:Ce=f?Q<=a:Q<a;Ce?g=X+1:C=X}return Tt(C,Se)}function xm(s,a){for(var u=-1,f=s.length,g=0,C=[];++u<f;){var E=s[u],B=a?a(E):E;if(!u||!Pn(B,L)){var L=B;C[g++]=E===0?0:E}}return C}function km(s){return typeof s=="number"?s:en(s)?me:+s}function Qt(s){if(typeof s=="string")return s;if(Ne(s))return et(s,Qt)+"";if(en(s))return nm?nm.call(s):"";var a=s+"";return a=="0"&&1/s==-J?"-0":a}function Lr(s,a,u){var f=-1,g=ya,C=s.length,E=!0,B=[],L=B;if(u)E=!1,g=Zc;else if(C>=i){var K=a?null:PI(s);if(K)return Ca(K);E=!1,g=es,L=new so}else L=a?[]:B;e:for(;++f<C;){var X=s[f],Q=a?a(X):X;if(X=u||X!==0?X:0,E&&Q===Q){for(var oe=L.length;oe--;)if(L[oe]===Q)continue e;a&&L.push(Q),B.push(X)}else g(L,Q,u)||(L!==B&&L.push(Q),B.push(X))}return B}function gd(s,a){return a=Or(a,s),s=Jm(s,a),s==null||delete s[Hn(dn(a))]}function Sm(s,a,u,f){return ds(s,a,u(lo(s,a)),f)}function Ma(s,a,u,f){for(var g=s.length,C=f?g:-1;(f?C--:++C<g)&&a(s[C],C,s););return u?cn(s,f?0:C,f?C+1:g):cn(s,f?C+1:0,f?g:C)}function Em(s,a){var u=s;return u instanceof Le&&(u=u.value()),Wc(a,function(f,g){return g.func.apply(g.thisArg,Rr([f],g.args))},u)}function yd(s,a,u){var f=s.length;if(f<2)return f?Lr(s[0]):[];for(var g=-1,C=j(f);++g<f;)for(var E=s[g],B=-1;++B<f;)B!=g&&(C[g]=as(C[g]||E,s[B],a,u));return Lr(bt(C,1),a,u)}function Tm(s,a,u){for(var f=-1,g=s.length,C=a.length,E={};++f<g;){var B=f<C?a[f]:n;u(E,s[f],B)}return E}function _d(s){return at(s)?s:[]}function Cd(s){return typeof s=="function"?s:Ut}function Or(s,a){return Ne(s)?s:Nd(s,a)?[s]:ng(We(s))}var bI=Ie;function Mr(s,a,u){var f=s.length;return u=u===n?f:u,!a&&u>=f?s:cn(s,a,u)}var Nm=cD||function(s){return wt.clearTimeout(s)};function Vm(s,a){if(a)return s.slice();var u=s.length,f=Yf?Yf(u):new s.constructor(u);return s.copy(f),f}function vd(s){var a=new s.constructor(s.byteLength);return new Sa(a).set(new Sa(s)),a}function xI(s,a){var u=a?vd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function kI(s){var a=new s.constructor(s.source,pf.exec(s));return a.lastIndex=s.lastIndex,a}function SI(s){return is?Ke(is.call(s)):{}}function Am(s,a){var u=a?vd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function Bm(s,a){if(s!==a){var u=s!==n,f=s===null,g=s===s,C=en(s),E=a!==n,B=a===null,L=a===a,K=en(a);if(!B&&!K&&!C&&s>a||C&&E&&L&&!B&&!K||f&&E&&L||!u&&L||!g)return 1;if(!f&&!C&&!K&&s<a||K&&u&&g&&!f&&!C||B&&u&&g||!E&&g||!L)return-1}return 0}function EI(s,a,u){for(var f=-1,g=s.criteria,C=a.criteria,E=g.length,B=u.length;++f<E;){var L=Bm(g[f],C[f]);if(L){if(f>=B)return L;var K=u[f];return L*(K=="desc"?-1:1)}}return s.index-a.index}function Pm(s,a,u,f){for(var g=-1,C=s.length,E=u.length,B=-1,L=a.length,K=ft(C-E,0),X=j(L+K),Q=!f;++B<L;)X[B]=a[B];for(;++g<E;)(Q||g<C)&&(X[u[g]]=s[g]);for(;K--;)X[B++]=s[g++];return X}function Rm(s,a,u,f){for(var g=-1,C=s.length,E=-1,B=u.length,L=-1,K=a.length,X=ft(C-B,0),Q=j(X+K),oe=!f;++g<X;)Q[g]=s[g];for(var pe=g;++L<K;)Q[pe+L]=a[L];for(;++E<B;)(oe||g<C)&&(Q[pe+u[E]]=s[g++]);return Q}function $t(s,a){var u=-1,f=s.length;for(a||(a=j(f));++u<f;)a[u]=s[u];return a}function jn(s,a,u,f){var g=!u;u||(u={});for(var C=-1,E=a.length;++C<E;){var B=a[C],L=f?f(u[B],s[B],B,u,s):n;L===n&&(L=s[B]),g?rr(u,B,L):ss(u,B,L)}return u}function TI(s,a){return jn(s,Td(s),a)}function NI(s,a){return jn(s,jm(s),a)}function $a(s,a){return function(u,f){var g=Ne(u)?RR:YD,C=a?a():{};return g(u,s,ge(f,2),C)}}function qo(s){return Ie(function(a,u){var f=-1,g=u.length,C=g>1?u[g-1]:n,E=g>2?u[2]:n;for(C=s.length>3&&typeof C=="function"?(g--,C):n,E&&Ft(u[0],u[1],E)&&(C=g<3?n:C,g=1),a=Ke(a);++f<g;){var B=u[f];B&&s(a,B,f,C)}return a})}function Dm(s,a){return function(u,f){if(u==null)return u;if(!Gt(u))return s(u,f);for(var g=u.length,C=a?g:-1,E=Ke(u);(a?C--:++C<g)&&f(E[C],C,E)!==!1;);return u}}function Im(s){return function(a,u,f){for(var g=-1,C=Ke(a),E=f(a),B=E.length;B--;){var L=E[s?B:++g];if(u(C[L],L,C)===!1)break}return a}}function VI(s,a,u){var f=a&M,g=us(s);function C(){var E=this&&this!==wt&&this instanceof C?g:s;return E.apply(f?u:this,arguments)}return C}function Fm(s){return function(a){a=We(a);var u=Go(a)?An(a):n,f=u?u[0]:a.charAt(0),g=u?Mr(u,1).join(""):a.slice(1);return f[s]()+g}}function Ko(s){return function(a){return Wc(Dg(Rg(a).replace(CR,"")),s,"")}}function us(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Ho(s.prototype),f=s.apply(u,a);return ot(f)?f:u}}function AI(s,a,u){var f=us(s);function g(){for(var C=arguments.length,E=j(C),B=C,L=Yo(g);B--;)E[B]=arguments[B];var K=C<3&&E[0]!==L&&E[C-1]!==L?[]:Dr(E,L);if(C-=K.length,C<u)return Gm(s,a,Ga,g.placeholder,n,E,K,n,n,u-C);var X=this&&this!==wt&&this instanceof g?f:s;return Xt(X,this,E)}return g}function Lm(s){return function(a,u,f){var g=Ke(a);if(!Gt(a)){var C=ge(u,3);a=_t(a),u=function(B){return C(g[B],B,g)}}var E=s(a,u,f);return E>-1?g[C?a[E]:E]:n}}function Om(s){return ir(function(a){var u=a.length,f=u,g=an.prototype.thru;for(s&&a.reverse();f--;){var C=a[f];if(typeof C!="function")throw new sn(c);if(g&&!E&&Wa(C)=="wrapper")var E=new an([],!0)}for(f=E?f:u;++f<u;){C=a[f];var B=Wa(C),L=B=="wrapper"?Sd(C):n;L&&Vd(L[0])&&L[1]==(P|k|A|G)&&!L[4].length&&L[9]==1?E=E[Wa(L[0])].apply(E,L[3]):E=C.length==1&&Vd(C)?E[B]():E.thru(C)}return function(){var K=arguments,X=K[0];if(E&&K.length==1&&Ne(X))return E.plant(X).value();for(var Q=0,oe=u?a[Q].apply(this,K):X;++Q<u;)oe=a[Q].call(this,oe);return oe}})}function Ga(s,a,u,f,g,C,E,B,L,K){var X=a&P,Q=a&M,oe=a&V,pe=a&(k|W),_e=a&Y,De=oe?n:us(s);function Ce(){for(var Fe=arguments.length,Oe=j(Fe),tn=Fe;tn--;)Oe[tn]=arguments[tn];if(pe)var Lt=Yo(Ce),nn=zR(Oe,Lt);if(f&&(Oe=Pm(Oe,f,g,pe)),C&&(Oe=Rm(Oe,C,E,pe)),Fe-=nn,pe&&Fe<K){var lt=Dr(Oe,Lt);return Gm(s,a,Ga,Ce.placeholder,u,Oe,lt,B,L,K-Fe)}var Rn=Q?u:this,cr=oe?Rn[s]:s;return Fe=Oe.length,B?Oe=YI(Oe,B):_e&&Fe>1&&Oe.reverse(),X&&L<Fe&&(Oe.length=L),this&&this!==wt&&this instanceof Ce&&(cr=De||us(cr)),cr.apply(Rn,Oe)}return Ce}function Mm(s,a){return function(u,f){return oI(u,s,a(f),{})}}function za(s,a){return function(u,f){var g;if(u===n&&f===n)return a;if(u!==n&&(g=u),f!==n){if(g===n)return f;typeof u=="string"||typeof f=="string"?(u=Qt(u),f=Qt(f)):(u=km(u),f=km(f)),g=s(u,f)}return g}}function wd(s){return ir(function(a){return a=et(a,Jt(ge())),Ie(function(u){var f=this;return s(a,function(g){return Xt(g,f,u)})})})}function Ua(s,a){a=a===n?" ":Qt(a);var u=a.length;if(u<2)return u?fd(a,s):a;var f=fd(a,Va(s/zo(a)));return Go(a)?Mr(An(f),0,s).join(""):f.slice(0,s)}function BI(s,a,u,f){var g=a&M,C=us(s);function E(){for(var B=-1,L=arguments.length,K=-1,X=f.length,Q=j(X+L),oe=this&&this!==wt&&this instanceof E?C:s;++K<X;)Q[K]=f[K];for(;L--;)Q[K++]=arguments[++B];return Xt(oe,g?u:this,Q)}return E}function $m(s){return function(a,u,f){return f&&typeof f!="number"&&Ft(a,u,f)&&(u=f=n),a=lr(a),u===n?(u=a,a=0):u=lr(u),f=f===n?a<u?1:-1:lr(f),gI(a,u,f,s)}}function Za(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=un(a),u=un(u)),s(a,u)}}function Gm(s,a,u,f,g,C,E,B,L,K){var X=a&k,Q=X?E:n,oe=X?n:E,pe=X?C:n,_e=X?n:C;a|=X?A:S,a&=~(X?S:A),a&U||(a&=~(M|V));var De=[s,a,g,pe,Q,_e,oe,B,L,K],Ce=u.apply(n,De);return Vd(s)&&Qm(Ce,De),Ce.placeholder=f,eg(Ce,s,a)}function bd(s){var a=ht[s];return function(u,f){if(u=un(u),f=f==null?0:Tt(Be(f),292),f&&em(u)){var g=(We(u)+"e").split("e"),C=a(g[0]+"e"+(+g[1]+f));return g=(We(C)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return a(u)}}var PI=Wo&&1/Ca(new Wo([,-0]))[1]==J?function(s){return new Wo(s)}:Zd;function zm(s){return function(a){var u=Nt(a);return u==Nn?Jc(a):u==Vn?KR(a):GR(a,s(a))}}function or(s,a,u,f,g,C,E,B){var L=a&V;if(!L&&typeof s!="function")throw new sn(c);var K=f?f.length:0;if(K||(a&=~(A|S),f=g=n),E=E===n?E:ft(Be(E),0),B=B===n?B:Be(B),K-=g?g.length:0,a&S){var X=f,Q=g;f=g=n}var oe=L?n:Sd(s),pe=[s,a,u,f,g,X,Q,C,E,B];if(oe&&HI(pe,oe),s=pe[0],a=pe[1],u=pe[2],f=pe[3],g=pe[4],B=pe[9]=pe[9]===n?L?0:s.length:ft(pe[9]-K,0),!B&&a&(k|W)&&(a&=~(k|W)),!a||a==M)var _e=VI(s,a,u);else a==k||a==W?_e=AI(s,a,B):(a==A||a==(M|A))&&!g.length?_e=BI(s,a,u,f):_e=Ga.apply(n,pe);var De=oe?bm:Qm;return eg(De(_e,pe),s,a)}function Um(s,a,u,f){return s===n||Pn(s,Zo[u])&&!He.call(f,u)?a:s}function Zm(s,a,u,f,g,C){return ot(s)&&ot(a)&&(C.set(a,s),La(s,a,n,Zm,C),C.delete(a)),s}function RI(s){return fs(s)?n:s}function Wm(s,a,u,f,g,C){var E=u&T,B=s.length,L=a.length;if(B!=L&&!(E&&L>B))return!1;var K=C.get(s),X=C.get(a);if(K&&X)return K==a&&X==s;var Q=-1,oe=!0,pe=u&O?new so:n;for(C.set(s,a),C.set(a,s);++Q<B;){var _e=s[Q],De=a[Q];if(f)var Ce=E?f(De,_e,Q,a,s,C):f(_e,De,Q,s,a,C);if(Ce!==n){if(Ce)continue;oe=!1;break}if(pe){if(!jc(a,function(Fe,Oe){if(!es(pe,Oe)&&(_e===Fe||g(_e,Fe,u,f,C)))return pe.push(Oe)})){oe=!1;break}}else if(!(_e===De||g(_e,De,u,f,C))){oe=!1;break}}return C.delete(s),C.delete(a),oe}function DI(s,a,u,f,g,C,E){switch(u){case Oo:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Qi:return!(s.byteLength!=a.byteLength||!C(new Sa(s),new Sa(a)));case Hi:case qi:case Ki:return Pn(+s,+a);case ua:return s.name==a.name&&s.message==a.message;case Yi:case Xi:return s==a+"";case Nn:var B=Jc;case Vn:var L=f&T;if(B||(B=Ca),s.size!=a.size&&!L)return!1;var K=E.get(s);if(K)return K==a;f|=O,E.set(s,a);var X=Wm(B(s),B(a),f,g,C,E);return E.delete(s),X;case ha:if(is)return is.call(s)==is.call(a)}return!1}function II(s,a,u,f,g,C){var E=u&T,B=xd(s),L=B.length,K=xd(a),X=K.length;if(L!=X&&!E)return!1;for(var Q=L;Q--;){var oe=B[Q];if(!(E?oe in a:He.call(a,oe)))return!1}var pe=C.get(s),_e=C.get(a);if(pe&&_e)return pe==a&&_e==s;var De=!0;C.set(s,a),C.set(a,s);for(var Ce=E;++Q<L;){oe=B[Q];var Fe=s[oe],Oe=a[oe];if(f)var tn=E?f(Oe,Fe,oe,a,s,C):f(Fe,Oe,oe,s,a,C);if(!(tn===n?Fe===Oe||g(Fe,Oe,u,f,C):tn)){De=!1;break}Ce||(Ce=oe=="constructor")}if(De&&!Ce){var Lt=s.constructor,nn=a.constructor;Lt!=nn&&"constructor"in s&&"constructor"in a&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof nn=="function"&&nn instanceof nn)&&(De=!1)}return C.delete(s),C.delete(a),De}function ir(s){return Bd(Xm(s,n,sg),s+"")}function xd(s){return um(s,_t,Td)}function kd(s){return um(s,zt,jm)}var Sd=Ba?function(s){return Ba.get(s)}:Zd;function Wa(s){for(var a=s.name+"",u=jo[a],f=He.call(jo,a)?u.length:0;f--;){var g=u[f],C=g.func;if(C==null||C==s)return g.name}return a}function Yo(s){var a=He.call(_,"placeholder")?_:s;return a.placeholder}function ge(){var s=_.iteratee||zd;return s=s===zd?fm:s,arguments.length?s(arguments[0],arguments[1]):s}function ja(s,a){var u=s.__data__;return UI(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Ed(s){for(var a=_t(s),u=a.length;u--;){var f=a[u],g=s[f];a[u]=[f,g,Km(g)]}return a}function co(s,a){var u=jR(s,a);return hm(u)?u:n}function FI(s){var a=He.call(s,oo),u=s[oo];try{s[oo]=n;var f=!0}catch{}var g=xa.call(s);return f&&(a?s[oo]=u:delete s[oo]),g}var Td=ed?function(s){return s==null?[]:(s=Ke(s),Pr(ed(s),function(a){return Jf.call(s,a)}))}:Wd,jm=ed?function(s){for(var a=[];s;)Rr(a,Td(s)),s=Ea(s);return a}:Wd,Nt=It;(td&&Nt(new td(new ArrayBuffer(1)))!=Oo||ns&&Nt(new ns)!=Nn||nd&&Nt(nd.resolve())!=lf||Wo&&Nt(new Wo)!=Vn||rs&&Nt(new rs)!=Ji)&&(Nt=function(s){var a=It(s),u=a==er?s.constructor:n,f=u?uo(u):"";if(f)switch(f){case _D:return Oo;case CD:return Nn;case vD:return lf;case wD:return Vn;case bD:return Ji}return a});function LI(s,a,u){for(var f=-1,g=u.length;++f<g;){var C=u[f],E=C.size;switch(C.type){case"drop":s+=E;break;case"dropRight":a-=E;break;case"take":a=Tt(a,s+E);break;case"takeRight":s=ft(s,a-E);break}}return{start:s,end:a}}function OI(s){var a=s.match(ZP);return a?a[1].split(WP):[]}function Hm(s,a,u){a=Or(a,s);for(var f=-1,g=a.length,C=!1;++f<g;){var E=Hn(a[f]);if(!(C=s!=null&&u(s,E)))break;s=s[E]}return C||++f!=g?C:(g=s==null?0:s.length,!!g&&Qa(g)&&sr(E,g)&&(Ne(s)||po(s)))}function MI(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&He.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function qm(s){return typeof s.constructor=="function"&&!ps(s)?Ho(Ea(s)):{}}function $I(s,a,u){var f=s.constructor;switch(a){case Qi:return vd(s);case Hi:case qi:return new f(+s);case Oo:return xI(s,u);case Ec:case Tc:case Nc:case Vc:case Ac:case Bc:case Pc:case Rc:case Dc:return Am(s,u);case Nn:return new f;case Ki:case Xi:return new f(s);case Yi:return kI(s);case Vn:return new f;case ha:return SI(s)}}function GI(s,a){var u=a.length;if(!u)return s;var f=u-1;return a[f]=(u>1?"& ":"")+a[f],a=a.join(u>2?", ":" "),s.replace(UP,`{
|
|
73
73
|
/* [wrapped with `+a+`] */
|
|
74
|
-
`)}function OI(s){return Ne(s)||uo(s)||!!(Xf&&s&&s[Xf])}function sr(s,a){var u=typeof s;return a=a??ne,!!a&&(u=="number"||u!="symbol"&&YP.test(s))&&s>-1&&s%1==0&&s<a}function Ft(s,a,u){if(!ot(u))return!1;var f=typeof a;return(f=="number"?Gt(u)&&sr(a,u.length):f=="string"&&a in u)?Pn(u[a],s):!1}function Nd(s,a){if(Ne(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||en(s)?!0:IP.test(s)||!DP.test(s)||a!=null&&s in Ke(a)}function MI(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function Vd(s){var a=Wa(s),u=_[a];if(typeof u!="function"||!(a in Le.prototype))return!1;if(s===u)return!0;var f=Sd(u);return!!f&&s===f[0]}function $I(s){return!!Hf&&Hf in s}var GI=wa?ar:jd;function ps(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||Uo;return s===u}function Hm(s){return s===s&&!ot(s)}function qm(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Ke(u))}}function zI(s){var a=Xa(s,function(f){return u.size===h&&u.clear(),f}),u=a.cache;return a}function UI(s,a){var u=s[1],f=a[1],g=u|f,C=g<(M|x|P),E=f==P&&u==V||f==P&&u==G&&s[7].length<=a[8]||f==(P|G)&&a[7].length<=a[8]&&u==V;if(!(C||E))return s;f&M&&(s[2]=a[2],g|=u&M?0:Z);var B=a[3];if(B){var L=s[3];s[3]=L?Am(L,B,a[4]):B,s[4]=L?Rr(s[3],m):a[4]}return B=a[5],B&&(L=s[5],s[5]=L?Bm(L,B,a[6]):B,s[6]=L?Rr(s[5],m):a[6]),B=a[7],B&&(s[7]=B),f&P&&(s[8]=s[8]==null?a[8]:Tt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=g,s}function ZI(s){var a=[];if(s!=null)for(var u in Ke(s))a.push(u);return a}function WI(s){return xa.call(s)}function Km(s,a,u){return a=ft(a===n?s.length-1:a,0),function(){for(var f=arguments,g=-1,C=ft(f.length-a,0),E=W(C);++g<C;)E[g]=f[a+g];g=-1;for(var B=W(a+1);++g<a;)B[g]=f[g];return B[a]=u(E),Xt(s,this,B)}}function Ym(s,a){return a.length<2?s:ao(s,cn(a,0,-1))}function jI(s,a){for(var u=s.length,f=Tt(a.length,u),g=$t(s);f--;){var C=a[f];s[f]=sr(C,u)?g[C]:n}return s}function Ad(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Xm=Qm(vm),hs=aD||function(s,a){return wt.setTimeout(s,a)},Bd=Qm(mI);function Jm(s,a,u){var f=a+"";return Bd(s,LI(f,HI(DI(f),u)))}function Qm(s){var a=0,u=0;return function(){var f=uD(),g=R-(f-u);if(u=f,g>0){if(++a>=z)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Ha(s,a){var u=-1,f=s.length,g=f-1;for(a=a===n?f:a;++u<a;){var C=hd(u,g),E=s[C];s[C]=s[u],s[u]=E}return s.length=a,s}var eg=zI(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(FP,function(u,f,g,C){a.push(g?C.replace(ZP,"$1"):f||u)}),a});function Hn(s){if(typeof s=="string"||en(s))return s;var a=s+"";return a=="0"&&1/s==-J?"-0":a}function co(s){if(s!=null){try{return ba.call(s)}catch{}try{return s+""}catch{}}return""}function HI(s,a){return on(Dt,function(u){var f="_."+u[0];a&u[1]&&!ya(s,f)&&s.push(f)}),s.sort()}function tg(s){if(s instanceof Le)return s.clone();var a=new an(s.__wrapped__,s.__chain__);return a.__actions__=$t(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function qI(s,a,u){(u?Ft(s,a,u):a===n)?a=1:a=ft(Be(a),0);var f=s==null?0:s.length;if(!f||a<1)return[];for(var g=0,C=0,E=W(Va(f/a));g<f;)E[C++]=cn(s,g,g+=a);return E}function KI(s){for(var a=-1,u=s==null?0:s.length,f=0,g=[];++a<u;){var C=s[a];C&&(g[f++]=C)}return g}function YI(){var s=arguments.length;if(!s)return[];for(var a=W(s-1),u=arguments[0],f=s;f--;)a[f-1]=arguments[f];return Pr(Ne(u)?$t(u):[u],bt(a,1))}var XI=Ie(function(s,a){return at(s)?as(s,bt(a,1,at,!0)):[]}),JI=Ie(function(s,a){var u=dn(a);return at(u)&&(u=n),at(s)?as(s,bt(a,1,at,!0),ge(u,2)):[]}),QI=Ie(function(s,a){var u=dn(a);return at(u)&&(u=n),at(s)?as(s,bt(a,1,at,!0),n,u):[]});function eF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),cn(s,a<0?0:a,f)):[]}function tF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,cn(s,0,a<0?0:a)):[]}function nF(s,a){return s&&s.length?Ma(s,ge(a,3),!0,!0):[]}function rF(s,a){return s&&s.length?Ma(s,ge(a,3),!0):[]}function oF(s,a,u,f){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&Ft(s,a,u)&&(u=0,f=g),YD(s,a,u,f)):[]}function ng(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=ft(f+g,0)),_a(s,ge(a,3),g)}function rg(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f-1;return u!==n&&(g=Be(u),g=u<0?ft(f+g,0):Tt(g,f-1)),_a(s,ge(a,3),g,!0)}function og(s){var a=s==null?0:s.length;return a?bt(s,1):[]}function iF(s){var a=s==null?0:s.length;return a?bt(s,J):[]}function sF(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Be(a),bt(s,a)):[]}function aF(s){for(var a=-1,u=s==null?0:s.length,f={};++a<u;){var g=s[a];f[g[0]]=g[1]}return f}function ig(s){return s&&s.length?s[0]:n}function lF(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=ft(f+g,0)),Mo(s,a,g)}function cF(s){var a=s==null?0:s.length;return a?cn(s,0,-1):[]}var dF=Ie(function(s){var a=et(s,_d);return a.length&&a[0]===s[0]?ld(a):[]}),uF=Ie(function(s){var a=dn(s),u=et(s,_d);return a===dn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?ld(u,ge(a,2)):[]}),pF=Ie(function(s){var a=dn(s),u=et(s,_d);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?ld(u,n,a):[]});function hF(s,a){return s==null?"":cD.call(s,a)}function dn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function fF(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f;return u!==n&&(g=Be(u),g=g<0?ft(f+g,0):Tt(g,f-1)),a===a?HR(s,a,g):_a(s,Mf,g,!0)}function mF(s,a){return s&&s.length?gm(s,Be(a)):n}var gF=Ie(sg);function sg(s,a){return s&&s.length&&a&&a.length?pd(s,a):s}function yF(s,a,u){return s&&s.length&&a&&a.length?pd(s,a,ge(u,2)):s}function _F(s,a,u){return s&&s.length&&a&&a.length?pd(s,a,n,u):s}var CF=ir(function(s,a){var u=s==null?0:s.length,f=od(s,a);return Cm(s,et(a,function(g){return sr(g,u)?+g:g}).sort(Vm)),f});function vF(s,a){var u=[];if(!(s&&s.length))return u;var f=-1,g=[],C=s.length;for(a=ge(a,3);++f<C;){var E=s[f];a(E,f,s)&&(u.push(E),g.push(f))}return Cm(s,g),u}function Pd(s){return s==null?s:hD.call(s)}function wF(s,a,u){var f=s==null?0:s.length;return f?(u&&typeof u!="number"&&Ft(s,a,u)?(a=0,u=f):(a=a==null?0:Be(a),u=u===n?f:Be(u)),cn(s,a,u)):[]}function bF(s,a){return Oa(s,a)}function xF(s,a,u){return md(s,a,ge(u,2))}function kF(s,a){var u=s==null?0:s.length;if(u){var f=Oa(s,a);if(f<u&&Pn(s[f],a))return f}return-1}function SF(s,a){return Oa(s,a,!0)}function EF(s,a,u){return md(s,a,ge(u,2),!0)}function TF(s,a){var u=s==null?0:s.length;if(u){var f=Oa(s,a,!0)-1;if(Pn(s[f],a))return f}return-1}function NF(s){return s&&s.length?wm(s):[]}function VF(s,a){return s&&s.length?wm(s,ge(a,2)):[]}function AF(s){var a=s==null?0:s.length;return a?cn(s,1,a):[]}function BF(s,a,u){return s&&s.length?(a=u||a===n?1:Be(a),cn(s,0,a<0?0:a)):[]}function PF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,cn(s,a<0?0:a,f)):[]}function RF(s,a){return s&&s.length?Ma(s,ge(a,3),!1,!0):[]}function DF(s,a){return s&&s.length?Ma(s,ge(a,3)):[]}var IF=Ie(function(s){return Fr(bt(s,1,at,!0))}),FF=Ie(function(s){var a=dn(s);return at(a)&&(a=n),Fr(bt(s,1,at,!0),ge(a,2))}),LF=Ie(function(s){var a=dn(s);return a=typeof a=="function"?a:n,Fr(bt(s,1,at,!0),n,a)});function OF(s){return s&&s.length?Fr(s):[]}function MF(s,a){return s&&s.length?Fr(s,ge(a,2)):[]}function $F(s,a){return a=typeof a=="function"?a:n,s&&s.length?Fr(s,n,a):[]}function Rd(s){if(!(s&&s.length))return[];var a=0;return s=Br(s,function(u){if(at(u))return a=ft(u.length,a),!0}),Yc(a,function(u){return et(s,Hc(u))})}function ag(s,a){if(!(s&&s.length))return[];var u=Rd(s);return a==null?u:et(u,function(f){return Xt(a,n,f)})}var GF=Ie(function(s,a){return at(s)?as(s,a):[]}),zF=Ie(function(s){return yd(Br(s,at))}),UF=Ie(function(s){var a=dn(s);return at(a)&&(a=n),yd(Br(s,at),ge(a,2))}),ZF=Ie(function(s){var a=dn(s);return a=typeof a=="function"?a:n,yd(Br(s,at),n,a)}),WF=Ie(Rd);function jF(s,a){return Sm(s||[],a||[],ss)}function HF(s,a){return Sm(s||[],a||[],ds)}var qF=Ie(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,ag(s,u)});function lg(s){var a=_(s);return a.__chain__=!0,a}function KF(s,a){return a(s),s}function qa(s,a){return a(s)}var YF=ir(function(s){var a=s.length,u=a?s[0]:0,f=this.__wrapped__,g=function(C){return od(C,s)};return a>1||this.__actions__.length||!(f instanceof Le)||!sr(u)?this.thru(g):(f=f.slice(u,+u+(a?1:0)),f.__actions__.push({func:qa,args:[g],thisArg:n}),new an(f,this.__chain__).thru(function(C){return a&&!C.length&&C.push(n),C}))});function XF(){return lg(this)}function JF(){return new an(this.value(),this.__chain__)}function QF(){this.__values__===n&&(this.__values__=bg(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function eL(){return this}function tL(s){for(var a,u=this;u instanceof Ra;){var f=tg(u);f.__index__=0,f.__values__=n,a?g.__wrapped__=f:a=f;var g=f;u=u.__wrapped__}return g.__wrapped__=s,a}function nL(){var s=this.__wrapped__;if(s instanceof Le){var a=s;return this.__actions__.length&&(a=new Le(this)),a=a.reverse(),a.__actions__.push({func:qa,args:[Pd],thisArg:n}),new an(a,this.__chain__)}return this.thru(Pd)}function rL(){return km(this.__wrapped__,this.__actions__)}var oL=$a(function(s,a,u){He.call(s,u)?++s[u]:rr(s,u,1)});function iL(s,a,u){var f=Ne(s)?Lf:KD;return u&&Ft(s,a,u)&&(a=n),f(s,ge(a,3))}function sL(s,a){var u=Ne(s)?Br:am;return u(s,ge(a,3))}var aL=Im(ng),lL=Im(rg);function cL(s,a){return bt(Ka(s,a),1)}function dL(s,a){return bt(Ka(s,a),J)}function uL(s,a,u){return u=u===n?1:Be(u),bt(Ka(s,a),u)}function cg(s,a){var u=Ne(s)?on:Ir;return u(s,ge(a,3))}function dg(s,a){var u=Ne(s)?AR:sm;return u(s,ge(a,3))}var pL=$a(function(s,a,u){He.call(s,u)?s[u].push(a):rr(s,u,[a])});function hL(s,a,u,f){s=Gt(s)?s:Xo(s),u=u&&!f?Be(u):0;var g=s.length;return u<0&&(u=ft(g+u,0)),el(s)?u<=g&&s.indexOf(a,u)>-1:!!g&&Mo(s,a,u)>-1}var fL=Ie(function(s,a,u){var f=-1,g=typeof a=="function",C=Gt(s)?W(s.length):[];return Ir(s,function(E){C[++f]=g?Xt(a,E,u):ls(E,a,u)}),C}),mL=$a(function(s,a,u){rr(s,u,a)});function Ka(s,a){var u=Ne(s)?et:hm;return u(s,ge(a,3))}function gL(s,a,u,f){return s==null?[]:(Ne(a)||(a=a==null?[]:[a]),u=f?n:u,Ne(u)||(u=u==null?[]:[u]),ym(s,a,u))}var yL=$a(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function _L(s,a,u){var f=Ne(s)?Wc:Gf,g=arguments.length<3;return f(s,ge(a,4),u,g,Ir)}function CL(s,a,u){var f=Ne(s)?BR:Gf,g=arguments.length<3;return f(s,ge(a,4),u,g,sm)}function vL(s,a){var u=Ne(s)?Br:am;return u(s,Ja(ge(a,3)))}function wL(s){var a=Ne(s)?nm:hI;return a(s)}function bL(s,a,u){(u?Ft(s,a,u):a===n)?a=1:a=Be(a);var f=Ne(s)?ZD:fI;return f(s,a)}function xL(s){var a=Ne(s)?WD:gI;return a(s)}function kL(s){if(s==null)return 0;if(Gt(s))return el(s)?Go(s):s.length;var a=Nt(s);return a==Nn||a==Vn?s.size:dd(s).length}function SL(s,a,u){var f=Ne(s)?jc:yI;return u&&Ft(s,a,u)&&(a=n),f(s,ge(a,3))}var EL=Ie(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Ft(s,a[0],a[1])?a=[]:u>2&&Ft(a[0],a[1],a[2])&&(a=[a[0]]),ym(s,bt(a,1),[])}),Ya=sD||function(){return wt.Date.now()};function TL(s,a){if(typeof a!="function")throw new sn(c);return s=Be(s),function(){if(--s<1)return a.apply(this,arguments)}}function ug(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,or(s,P,n,n,n,n,a)}function pg(s,a){var u;if(typeof a!="function")throw new sn(c);return s=Be(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Dd=Ie(function(s,a,u){var f=M;if(u.length){var g=Rr(u,Ko(Dd));f|=A}return or(s,f,a,u,g)}),hg=Ie(function(s,a,u){var f=M|x;if(u.length){var g=Rr(u,Ko(hg));f|=A}return or(a,f,s,u,g)});function fg(s,a,u){a=u?n:a;var f=or(s,V,n,n,n,n,n,a);return f.placeholder=fg.placeholder,f}function mg(s,a,u){a=u?n:a;var f=or(s,H,n,n,n,n,n,a);return f.placeholder=mg.placeholder,f}function gg(s,a,u){var f,g,C,E,B,L,K=0,X=!1,Q=!1,oe=!0;if(typeof s!="function")throw new sn(c);a=un(a)||0,ot(u)&&(X=!!u.leading,Q="maxWait"in u,C=Q?ft(un(u.maxWait)||0,a):C,oe="trailing"in u?!!u.trailing:oe);function pe(lt){var Rn=f,cr=g;return f=g=n,K=lt,E=s.apply(cr,Rn),E}function _e(lt){return K=lt,B=hs(Fe,a),X?pe(lt):E}function De(lt){var Rn=lt-L,cr=lt-K,Ig=a-Rn;return Q?Tt(Ig,C-cr):Ig}function Ce(lt){var Rn=lt-L,cr=lt-K;return L===n||Rn>=a||Rn<0||Q&&cr>=C}function Fe(){var lt=Ya();if(Ce(lt))return Oe(lt);B=hs(Fe,De(lt))}function Oe(lt){return B=n,oe&&f?pe(lt):(f=g=n,E)}function tn(){B!==n&&Em(B),K=0,f=L=g=B=n}function Lt(){return B===n?E:Oe(Ya())}function nn(){var lt=Ya(),Rn=Ce(lt);if(f=arguments,g=this,L=lt,Rn){if(B===n)return _e(L);if(Q)return Em(B),B=hs(Fe,a),pe(L)}return B===n&&(B=hs(Fe,a)),E}return nn.cancel=tn,nn.flush=Lt,nn}var NL=Ie(function(s,a){return im(s,1,a)}),VL=Ie(function(s,a,u){return im(s,un(a)||0,u)});function AL(s){return or(s,Y)}function Xa(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new sn(c);var u=function(){var f=arguments,g=a?a.apply(this,f):f[0],C=u.cache;if(C.has(g))return C.get(g);var E=s.apply(this,f);return u.cache=C.set(g,E)||C,E};return u.cache=new(Xa.Cache||nr),u}Xa.Cache=nr;function Ja(s){if(typeof s!="function")throw new sn(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function BL(s){return pg(2,s)}var PL=_I(function(s,a){a=a.length==1&&Ne(a[0])?et(a[0],Jt(ge())):et(bt(a,1),Jt(ge()));var u=a.length;return Ie(function(f){for(var g=-1,C=Tt(f.length,u);++g<C;)f[g]=a[g].call(this,f[g]);return Xt(s,this,f)})}),Id=Ie(function(s,a){var u=Rr(a,Ko(Id));return or(s,A,n,a,u)}),yg=Ie(function(s,a){var u=Rr(a,Ko(yg));return or(s,S,n,a,u)}),RL=ir(function(s,a){return or(s,G,n,n,n,a)});function DL(s,a){if(typeof s!="function")throw new sn(c);return a=a===n?a:Be(a),Ie(s,a)}function IL(s,a){if(typeof s!="function")throw new sn(c);return a=a==null?0:ft(Be(a),0),Ie(function(u){var f=u[a],g=Or(u,0,a);return f&&Pr(g,f),Xt(s,this,g)})}function FL(s,a,u){var f=!0,g=!0;if(typeof s!="function")throw new sn(c);return ot(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),gg(s,a,{leading:f,maxWait:a,trailing:g})}function LL(s){return ug(s,1)}function OL(s,a){return Id(Cd(a),s)}function ML(){if(!arguments.length)return[];var s=arguments[0];return Ne(s)?s:[s]}function $L(s){return ln(s,v)}function GL(s,a){return a=typeof a=="function"?a:n,ln(s,v,a)}function zL(s){return ln(s,y|v)}function UL(s,a){return a=typeof a=="function"?a:n,ln(s,y|v,a)}function ZL(s,a){return a==null||om(s,a,_t(a))}function Pn(s,a){return s===a||s!==s&&a!==a}var WL=Za(ad),jL=Za(function(s,a){return s>=a}),uo=dm(function(){return arguments}())?dm:function(s){return it(s)&&He.call(s,"callee")&&!Yf.call(s,"callee")},Ne=W.isArray,HL=Bf?Jt(Bf):tI;function Gt(s){return s!=null&&Qa(s.length)&&!ar(s)}function at(s){return it(s)&&Gt(s)}function qL(s){return s===!0||s===!1||it(s)&&It(s)==Hi}var Mr=lD||jd,KL=Pf?Jt(Pf):nI;function YL(s){return it(s)&&s.nodeType===1&&!fs(s)}function XL(s){if(s==null)return!0;if(Gt(s)&&(Ne(s)||typeof s=="string"||typeof s.splice=="function"||Mr(s)||Yo(s)||uo(s)))return!s.length;var a=Nt(s);if(a==Nn||a==Vn)return!s.size;if(ps(s))return!dd(s).length;for(var u in s)if(He.call(s,u))return!1;return!0}function JL(s,a){return cs(s,a)}function QL(s,a,u){u=typeof u=="function"?u:n;var f=u?u(s,a):n;return f===n?cs(s,a,n,u):!!f}function Fd(s){if(!it(s))return!1;var a=It(s);return a==ua||a==bP||typeof s.message=="string"&&typeof s.name=="string"&&!fs(s)}function eO(s){return typeof s=="number"&&Jf(s)}function ar(s){if(!ot(s))return!1;var a=It(s);return a==pa||a==of||a==wP||a==kP}function _g(s){return typeof s=="number"&&s==Be(s)}function Qa(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ne}function ot(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function it(s){return s!=null&&typeof s=="object"}var Cg=Rf?Jt(Rf):oI;function tO(s,a){return s===a||cd(s,a,Ed(a))}function nO(s,a,u){return u=typeof u=="function"?u:n,cd(s,a,Ed(a),u)}function rO(s){return vg(s)&&s!=+s}function oO(s){if(GI(s))throw new Ee(l);return um(s)}function iO(s){return s===null}function sO(s){return s==null}function vg(s){return typeof s=="number"||it(s)&&It(s)==Ki}function fs(s){if(!it(s)||It(s)!=er)return!1;var a=Ea(s);if(a===null)return!0;var u=He.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&ba.call(u)==nD}var Ld=Df?Jt(Df):iI;function aO(s){return _g(s)&&s>=-ne&&s<=ne}var wg=If?Jt(If):sI;function el(s){return typeof s=="string"||!Ne(s)&&it(s)&&It(s)==Xi}function en(s){return typeof s=="symbol"||it(s)&&It(s)==ha}var Yo=Ff?Jt(Ff):aI;function lO(s){return s===n}function cO(s){return it(s)&&Nt(s)==Ji}function dO(s){return it(s)&&It(s)==EP}var uO=Za(ud),pO=Za(function(s,a){return s<=a});function bg(s){if(!s)return[];if(Gt(s))return el(s)?An(s):$t(s);if(ts&&s[ts])return ZR(s[ts]());var a=Nt(s),u=a==Nn?Jc:a==Vn?Ca:Xo;return u(s)}function lr(s){if(!s)return s===0?s:0;if(s=un(s),s===J||s===-J){var a=s<0?-1:1;return a*de}return s===s?s:0}function Be(s){var a=lr(s),u=a%1;return a===a?u?a-u:a:0}function xg(s){return s?so(Be(s),0,Te):0}function un(s){if(typeof s=="number")return s;if(en(s))return me;if(ot(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ot(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=zf(s);var u=HP.test(s);return u||KP.test(s)?TR(s.slice(2),u?2:8):jP.test(s)?me:+s}function kg(s){return jn(s,zt(s))}function hO(s){return s?so(Be(s),-ne,ne):s===0?s:0}function We(s){return s==null?"":Qt(s)}var fO=Ho(function(s,a){if(ps(a)||Gt(a)){jn(a,_t(a),s);return}for(var u in a)He.call(a,u)&&ss(s,u,a[u])}),Sg=Ho(function(s,a){jn(a,zt(a),s)}),tl=Ho(function(s,a,u,f){jn(a,zt(a),s,f)}),mO=Ho(function(s,a,u,f){jn(a,_t(a),s,f)}),gO=ir(od);function yO(s,a){var u=jo(s);return a==null?u:rm(u,a)}var _O=Ie(function(s,a){s=Ke(s);var u=-1,f=a.length,g=f>2?a[2]:n;for(g&&Ft(a[0],a[1],g)&&(f=1);++u<f;)for(var C=a[u],E=zt(C),B=-1,L=E.length;++B<L;){var K=E[B],X=s[K];(X===n||Pn(X,Uo[K])&&!He.call(s,K))&&(s[K]=C[K])}return s}),CO=Ie(function(s){return s.push(n,zm),Xt(Eg,n,s)});function vO(s,a){return Of(s,ge(a,3),Wn)}function wO(s,a){return Of(s,ge(a,3),sd)}function bO(s,a){return s==null?s:id(s,ge(a,3),zt)}function xO(s,a){return s==null?s:lm(s,ge(a,3),zt)}function kO(s,a){return s&&Wn(s,ge(a,3))}function SO(s,a){return s&&sd(s,ge(a,3))}function EO(s){return s==null?[]:Fa(s,_t(s))}function TO(s){return s==null?[]:Fa(s,zt(s))}function Od(s,a,u){var f=s==null?n:ao(s,a);return f===n?u:f}function NO(s,a){return s!=null&&Wm(s,a,XD)}function Md(s,a){return s!=null&&Wm(s,a,JD)}var VO=Lm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=xa.call(a)),s[a]=u},Gd(Ut)),AO=Lm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=xa.call(a)),He.call(s,a)?s[a].push(u):s[a]=[u]},ge),BO=Ie(ls);function _t(s){return Gt(s)?tm(s):dd(s)}function zt(s){return Gt(s)?tm(s,!0):lI(s)}function PO(s,a){var u={};return a=ge(a,3),Wn(s,function(f,g,C){rr(u,a(f,g,C),f)}),u}function RO(s,a){var u={};return a=ge(a,3),Wn(s,function(f,g,C){rr(u,g,a(f,g,C))}),u}var DO=Ho(function(s,a,u){La(s,a,u)}),Eg=Ho(function(s,a,u,f){La(s,a,u,f)}),IO=ir(function(s,a){var u={};if(s==null)return u;var f=!1;a=et(a,function(C){return C=Lr(C,s),f||(f=C.length>1),C}),jn(s,kd(s),u),f&&(u=ln(u,y|w|v,VI));for(var g=a.length;g--;)gd(u,a[g]);return u});function FO(s,a){return Tg(s,Ja(ge(a)))}var LO=ir(function(s,a){return s==null?{}:dI(s,a)});function Tg(s,a){if(s==null)return{};var u=et(kd(s),function(f){return[f]});return a=ge(a),_m(s,u,function(f,g){return a(f,g[0])})}function OO(s,a,u){a=Lr(a,s);var f=-1,g=a.length;for(g||(g=1,s=n);++f<g;){var C=s==null?n:s[Hn(a[f])];C===n&&(f=g,C=u),s=ar(C)?C.call(s):C}return s}function MO(s,a,u){return s==null?s:ds(s,a,u)}function $O(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:ds(s,a,u,f)}var Ng=$m(_t),Vg=$m(zt);function GO(s,a,u){var f=Ne(s),g=f||Mr(s)||Yo(s);if(a=ge(a,4),u==null){var C=s&&s.constructor;g?u=f?new C:[]:ot(s)?u=ar(C)?jo(Ea(s)):{}:u={}}return(g?on:Wn)(s,function(E,B,L){return a(u,E,B,L)}),u}function zO(s,a){return s==null?!0:gd(s,a)}function UO(s,a,u){return s==null?s:xm(s,a,Cd(u))}function ZO(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:xm(s,a,Cd(u),f)}function Xo(s){return s==null?[]:Xc(s,_t(s))}function WO(s){return s==null?[]:Xc(s,zt(s))}function jO(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=un(u),u=u===u?u:0),a!==n&&(a=un(a),a=a===a?a:0),so(un(s),a,u)}function HO(s,a,u){return a=lr(a),u===n?(u=a,a=0):u=lr(u),s=un(s),QD(s,a,u)}function qO(s,a,u){if(u&&typeof u!="boolean"&&Ft(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=lr(s),a===n?(a=s,s=0):a=lr(a)),s>a){var f=s;s=a,a=f}if(u||s%1||a%1){var g=Qf();return Tt(s+g*(a-s+ER("1e-"+((g+"").length-1))),a)}return hd(s,a)}var KO=qo(function(s,a,u){return a=a.toLowerCase(),s+(u?Ag(a):a)});function Ag(s){return $d(We(s).toLowerCase())}function Bg(s){return s=We(s),s&&s.replace(XP,MR).replace(gR,"")}function YO(s,a,u){s=We(s),a=Qt(a);var f=s.length;u=u===n?f:so(Be(u),0,f);var g=u;return u-=a.length,u>=0&&s.slice(u,g)==a}function XO(s){return s=We(s),s&&BP.test(s)?s.replace(lf,$R):s}function JO(s){return s=We(s),s&&LP.test(s)?s.replace(Ic,"\\$&"):s}var QO=qo(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),eM=qo(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),tM=Dm("toLowerCase");function nM(s,a,u){s=We(s),a=Be(a);var f=a?Go(s):0;if(!a||f>=a)return s;var g=(a-f)/2;return Ua(Aa(g),u)+s+Ua(Va(g),u)}function rM(s,a,u){s=We(s),a=Be(a);var f=a?Go(s):0;return a&&f<a?s+Ua(a-f,u):s}function oM(s,a,u){s=We(s),a=Be(a);var f=a?Go(s):0;return a&&f<a?Ua(a-f,u)+s:s}function iM(s,a,u){return u||a==null?a=0:a&&(a=+a),pD(We(s).replace(Fc,""),a||0)}function sM(s,a,u){return(u?Ft(s,a,u):a===n)?a=1:a=Be(a),fd(We(s),a)}function aM(){var s=arguments,a=We(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var lM=qo(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function cM(s,a,u){return u&&typeof u!="number"&&Ft(s,a,u)&&(a=u=n),u=u===n?Te:u>>>0,u?(s=We(s),s&&(typeof a=="string"||a!=null&&!Ld(a))&&(a=Qt(a),!a&&$o(s))?Or(An(s),0,u):s.split(a,u)):[]}var dM=qo(function(s,a,u){return s+(u?" ":"")+$d(a)});function uM(s,a,u){return s=We(s),u=u==null?0:so(Be(u),0,s.length),a=Qt(a),s.slice(u,u+a.length)==a}function pM(s,a,u){var f=_.templateSettings;u&&Ft(s,a,u)&&(a=n),s=We(s),a=tl({},a,f,Gm);var g=tl({},a.imports,f.imports,Gm),C=_t(g),E=Xc(g,C),B,L,K=0,X=a.interpolate||fa,Q="__p += '",oe=Qc((a.escape||fa).source+"|"+X.source+"|"+(X===cf?WP:fa).source+"|"+(a.evaluate||fa).source+"|$","g"),pe="//# sourceURL="+(He.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wR+"]")+`
|
|
75
|
-
`;s.replace(oe,function(Ce,Fe,Oe,tn,Lt,nn){return Oe||(Oe=tn),Q+=s.slice(K,nn).replace(
|
|
74
|
+
`)}function zI(s){return Ne(s)||po(s)||!!(Qf&&s&&s[Qf])}function sr(s,a){var u=typeof s;return a=a??ne,!!a&&(u=="number"||u!="symbol"&&eR.test(s))&&s>-1&&s%1==0&&s<a}function Ft(s,a,u){if(!ot(u))return!1;var f=typeof a;return(f=="number"?Gt(u)&&sr(a,u.length):f=="string"&&a in u)?Pn(u[a],s):!1}function Nd(s,a){if(Ne(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||en(s)?!0:MP.test(s)||!OP.test(s)||a!=null&&s in Ke(a)}function UI(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function Vd(s){var a=Wa(s),u=_[a];if(typeof u!="function"||!(a in Le.prototype))return!1;if(s===u)return!0;var f=Sd(u);return!!f&&s===f[0]}function ZI(s){return!!Kf&&Kf in s}var WI=wa?ar:jd;function ps(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||Zo;return s===u}function Km(s){return s===s&&!ot(s)}function Ym(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Ke(u))}}function jI(s){var a=Xa(s,function(f){return u.size===h&&u.clear(),f}),u=a.cache;return a}function HI(s,a){var u=s[1],f=a[1],g=u|f,C=g<(M|V|P),E=f==P&&u==k||f==P&&u==G&&s[7].length<=a[8]||f==(P|G)&&a[7].length<=a[8]&&u==k;if(!(C||E))return s;f&M&&(s[2]=a[2],g|=u&M?0:U);var B=a[3];if(B){var L=s[3];s[3]=L?Pm(L,B,a[4]):B,s[4]=L?Dr(s[3],m):a[4]}return B=a[5],B&&(L=s[5],s[5]=L?Rm(L,B,a[6]):B,s[6]=L?Dr(s[5],m):a[6]),B=a[7],B&&(s[7]=B),f&P&&(s[8]=s[8]==null?a[8]:Tt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=g,s}function qI(s){var a=[];if(s!=null)for(var u in Ke(s))a.push(u);return a}function KI(s){return xa.call(s)}function Xm(s,a,u){return a=ft(a===n?s.length-1:a,0),function(){for(var f=arguments,g=-1,C=ft(f.length-a,0),E=j(C);++g<C;)E[g]=f[a+g];g=-1;for(var B=j(a+1);++g<a;)B[g]=f[g];return B[a]=u(E),Xt(s,this,B)}}function Jm(s,a){return a.length<2?s:lo(s,cn(a,0,-1))}function YI(s,a){for(var u=s.length,f=Tt(a.length,u),g=$t(s);f--;){var C=a[f];s[f]=sr(C,u)?g[C]:n}return s}function Ad(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Qm=tg(bm),hs=uD||function(s,a){return wt.setTimeout(s,a)},Bd=tg(CI);function eg(s,a,u){var f=a+"";return Bd(s,GI(f,XI(OI(f),u)))}function tg(s){var a=0,u=0;return function(){var f=mD(),g=R-(f-u);if(u=f,g>0){if(++a>=z)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Ha(s,a){var u=-1,f=s.length,g=f-1;for(a=a===n?f:a;++u<a;){var C=hd(u,g),E=s[C];s[C]=s[u],s[u]=E}return s.length=a,s}var ng=jI(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace($P,function(u,f,g,C){a.push(g?C.replace(qP,"$1"):f||u)}),a});function Hn(s){if(typeof s=="string"||en(s))return s;var a=s+"";return a=="0"&&1/s==-J?"-0":a}function uo(s){if(s!=null){try{return ba.call(s)}catch{}try{return s+""}catch{}}return""}function XI(s,a){return on(Dt,function(u){var f="_."+u[0];a&u[1]&&!ya(s,f)&&s.push(f)}),s.sort()}function rg(s){if(s instanceof Le)return s.clone();var a=new an(s.__wrapped__,s.__chain__);return a.__actions__=$t(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function JI(s,a,u){(u?Ft(s,a,u):a===n)?a=1:a=ft(Be(a),0);var f=s==null?0:s.length;if(!f||a<1)return[];for(var g=0,C=0,E=j(Va(f/a));g<f;)E[C++]=cn(s,g,g+=a);return E}function QI(s){for(var a=-1,u=s==null?0:s.length,f=0,g=[];++a<u;){var C=s[a];C&&(g[f++]=C)}return g}function eF(){var s=arguments.length;if(!s)return[];for(var a=j(s-1),u=arguments[0],f=s;f--;)a[f-1]=arguments[f];return Rr(Ne(u)?$t(u):[u],bt(a,1))}var tF=Ie(function(s,a){return at(s)?as(s,bt(a,1,at,!0)):[]}),nF=Ie(function(s,a){var u=dn(a);return at(u)&&(u=n),at(s)?as(s,bt(a,1,at,!0),ge(u,2)):[]}),rF=Ie(function(s,a){var u=dn(a);return at(u)&&(u=n),at(s)?as(s,bt(a,1,at,!0),n,u):[]});function oF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),cn(s,a<0?0:a,f)):[]}function iF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,cn(s,0,a<0?0:a)):[]}function sF(s,a){return s&&s.length?Ma(s,ge(a,3),!0,!0):[]}function aF(s,a){return s&&s.length?Ma(s,ge(a,3),!0):[]}function lF(s,a,u,f){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&Ft(s,a,u)&&(u=0,f=g),eI(s,a,u,f)):[]}function og(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=ft(f+g,0)),_a(s,ge(a,3),g)}function ig(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f-1;return u!==n&&(g=Be(u),g=u<0?ft(f+g,0):Tt(g,f-1)),_a(s,ge(a,3),g,!0)}function sg(s){var a=s==null?0:s.length;return a?bt(s,1):[]}function cF(s){var a=s==null?0:s.length;return a?bt(s,J):[]}function dF(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Be(a),bt(s,a)):[]}function uF(s){for(var a=-1,u=s==null?0:s.length,f={};++a<u;){var g=s[a];f[g[0]]=g[1]}return f}function ag(s){return s&&s.length?s[0]:n}function pF(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=ft(f+g,0)),$o(s,a,g)}function hF(s){var a=s==null?0:s.length;return a?cn(s,0,-1):[]}var fF=Ie(function(s){var a=et(s,_d);return a.length&&a[0]===s[0]?ld(a):[]}),mF=Ie(function(s){var a=dn(s),u=et(s,_d);return a===dn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?ld(u,ge(a,2)):[]}),gF=Ie(function(s){var a=dn(s),u=et(s,_d);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?ld(u,n,a):[]});function yF(s,a){return s==null?"":hD.call(s,a)}function dn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function _F(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f;return u!==n&&(g=Be(u),g=g<0?ft(f+g,0):Tt(g,f-1)),a===a?XR(s,a,g):_a(s,Gf,g,!0)}function CF(s,a){return s&&s.length?_m(s,Be(a)):n}var vF=Ie(lg);function lg(s,a){return s&&s.length&&a&&a.length?pd(s,a):s}function wF(s,a,u){return s&&s.length&&a&&a.length?pd(s,a,ge(u,2)):s}function bF(s,a,u){return s&&s.length&&a&&a.length?pd(s,a,n,u):s}var xF=ir(function(s,a){var u=s==null?0:s.length,f=od(s,a);return wm(s,et(a,function(g){return sr(g,u)?+g:g}).sort(Bm)),f});function kF(s,a){var u=[];if(!(s&&s.length))return u;var f=-1,g=[],C=s.length;for(a=ge(a,3);++f<C;){var E=s[f];a(E,f,s)&&(u.push(E),g.push(f))}return wm(s,g),u}function Pd(s){return s==null?s:yD.call(s)}function SF(s,a,u){var f=s==null?0:s.length;return f?(u&&typeof u!="number"&&Ft(s,a,u)?(a=0,u=f):(a=a==null?0:Be(a),u=u===n?f:Be(u)),cn(s,a,u)):[]}function EF(s,a){return Oa(s,a)}function TF(s,a,u){return md(s,a,ge(u,2))}function NF(s,a){var u=s==null?0:s.length;if(u){var f=Oa(s,a);if(f<u&&Pn(s[f],a))return f}return-1}function VF(s,a){return Oa(s,a,!0)}function AF(s,a,u){return md(s,a,ge(u,2),!0)}function BF(s,a){var u=s==null?0:s.length;if(u){var f=Oa(s,a,!0)-1;if(Pn(s[f],a))return f}return-1}function PF(s){return s&&s.length?xm(s):[]}function RF(s,a){return s&&s.length?xm(s,ge(a,2)):[]}function DF(s){var a=s==null?0:s.length;return a?cn(s,1,a):[]}function IF(s,a,u){return s&&s.length?(a=u||a===n?1:Be(a),cn(s,0,a<0?0:a)):[]}function FF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,cn(s,a<0?0:a,f)):[]}function LF(s,a){return s&&s.length?Ma(s,ge(a,3),!1,!0):[]}function OF(s,a){return s&&s.length?Ma(s,ge(a,3)):[]}var MF=Ie(function(s){return Lr(bt(s,1,at,!0))}),$F=Ie(function(s){var a=dn(s);return at(a)&&(a=n),Lr(bt(s,1,at,!0),ge(a,2))}),GF=Ie(function(s){var a=dn(s);return a=typeof a=="function"?a:n,Lr(bt(s,1,at,!0),n,a)});function zF(s){return s&&s.length?Lr(s):[]}function UF(s,a){return s&&s.length?Lr(s,ge(a,2)):[]}function ZF(s,a){return a=typeof a=="function"?a:n,s&&s.length?Lr(s,n,a):[]}function Rd(s){if(!(s&&s.length))return[];var a=0;return s=Pr(s,function(u){if(at(u))return a=ft(u.length,a),!0}),Yc(a,function(u){return et(s,Hc(u))})}function cg(s,a){if(!(s&&s.length))return[];var u=Rd(s);return a==null?u:et(u,function(f){return Xt(a,n,f)})}var WF=Ie(function(s,a){return at(s)?as(s,a):[]}),jF=Ie(function(s){return yd(Pr(s,at))}),HF=Ie(function(s){var a=dn(s);return at(a)&&(a=n),yd(Pr(s,at),ge(a,2))}),qF=Ie(function(s){var a=dn(s);return a=typeof a=="function"?a:n,yd(Pr(s,at),n,a)}),KF=Ie(Rd);function YF(s,a){return Tm(s||[],a||[],ss)}function XF(s,a){return Tm(s||[],a||[],ds)}var JF=Ie(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,cg(s,u)});function dg(s){var a=_(s);return a.__chain__=!0,a}function QF(s,a){return a(s),s}function qa(s,a){return a(s)}var eL=ir(function(s){var a=s.length,u=a?s[0]:0,f=this.__wrapped__,g=function(C){return od(C,s)};return a>1||this.__actions__.length||!(f instanceof Le)||!sr(u)?this.thru(g):(f=f.slice(u,+u+(a?1:0)),f.__actions__.push({func:qa,args:[g],thisArg:n}),new an(f,this.__chain__).thru(function(C){return a&&!C.length&&C.push(n),C}))});function tL(){return dg(this)}function nL(){return new an(this.value(),this.__chain__)}function rL(){this.__values__===n&&(this.__values__=kg(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function oL(){return this}function iL(s){for(var a,u=this;u instanceof Ra;){var f=rg(u);f.__index__=0,f.__values__=n,a?g.__wrapped__=f:a=f;var g=f;u=u.__wrapped__}return g.__wrapped__=s,a}function sL(){var s=this.__wrapped__;if(s instanceof Le){var a=s;return this.__actions__.length&&(a=new Le(this)),a=a.reverse(),a.__actions__.push({func:qa,args:[Pd],thisArg:n}),new an(a,this.__chain__)}return this.thru(Pd)}function aL(){return Em(this.__wrapped__,this.__actions__)}var lL=$a(function(s,a,u){He.call(s,u)?++s[u]:rr(s,u,1)});function cL(s,a,u){var f=Ne(s)?Mf:QD;return u&&Ft(s,a,u)&&(a=n),f(s,ge(a,3))}function dL(s,a){var u=Ne(s)?Pr:cm;return u(s,ge(a,3))}var uL=Lm(og),pL=Lm(ig);function hL(s,a){return bt(Ka(s,a),1)}function fL(s,a){return bt(Ka(s,a),J)}function mL(s,a,u){return u=u===n?1:Be(u),bt(Ka(s,a),u)}function ug(s,a){var u=Ne(s)?on:Fr;return u(s,ge(a,3))}function pg(s,a){var u=Ne(s)?DR:lm;return u(s,ge(a,3))}var gL=$a(function(s,a,u){He.call(s,u)?s[u].push(a):rr(s,u,[a])});function yL(s,a,u,f){s=Gt(s)?s:Jo(s),u=u&&!f?Be(u):0;var g=s.length;return u<0&&(u=ft(g+u,0)),el(s)?u<=g&&s.indexOf(a,u)>-1:!!g&&$o(s,a,u)>-1}var _L=Ie(function(s,a,u){var f=-1,g=typeof a=="function",C=Gt(s)?j(s.length):[];return Fr(s,function(E){C[++f]=g?Xt(a,E,u):ls(E,a,u)}),C}),CL=$a(function(s,a,u){rr(s,u,a)});function Ka(s,a){var u=Ne(s)?et:mm;return u(s,ge(a,3))}function vL(s,a,u,f){return s==null?[]:(Ne(a)||(a=a==null?[]:[a]),u=f?n:u,Ne(u)||(u=u==null?[]:[u]),Cm(s,a,u))}var wL=$a(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function bL(s,a,u){var f=Ne(s)?Wc:Uf,g=arguments.length<3;return f(s,ge(a,4),u,g,Fr)}function xL(s,a,u){var f=Ne(s)?IR:Uf,g=arguments.length<3;return f(s,ge(a,4),u,g,lm)}function kL(s,a){var u=Ne(s)?Pr:cm;return u(s,Ja(ge(a,3)))}function SL(s){var a=Ne(s)?om:yI;return a(s)}function EL(s,a,u){(u?Ft(s,a,u):a===n)?a=1:a=Be(a);var f=Ne(s)?qD:_I;return f(s,a)}function TL(s){var a=Ne(s)?KD:vI;return a(s)}function NL(s){if(s==null)return 0;if(Gt(s))return el(s)?zo(s):s.length;var a=Nt(s);return a==Nn||a==Vn?s.size:dd(s).length}function VL(s,a,u){var f=Ne(s)?jc:wI;return u&&Ft(s,a,u)&&(a=n),f(s,ge(a,3))}var AL=Ie(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Ft(s,a[0],a[1])?a=[]:u>2&&Ft(a[0],a[1],a[2])&&(a=[a[0]]),Cm(s,bt(a,1),[])}),Ya=dD||function(){return wt.Date.now()};function BL(s,a){if(typeof a!="function")throw new sn(c);return s=Be(s),function(){if(--s<1)return a.apply(this,arguments)}}function hg(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,or(s,P,n,n,n,n,a)}function fg(s,a){var u;if(typeof a!="function")throw new sn(c);return s=Be(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Dd=Ie(function(s,a,u){var f=M;if(u.length){var g=Dr(u,Yo(Dd));f|=A}return or(s,f,a,u,g)}),mg=Ie(function(s,a,u){var f=M|V;if(u.length){var g=Dr(u,Yo(mg));f|=A}return or(a,f,s,u,g)});function gg(s,a,u){a=u?n:a;var f=or(s,k,n,n,n,n,n,a);return f.placeholder=gg.placeholder,f}function yg(s,a,u){a=u?n:a;var f=or(s,W,n,n,n,n,n,a);return f.placeholder=yg.placeholder,f}function _g(s,a,u){var f,g,C,E,B,L,K=0,X=!1,Q=!1,oe=!0;if(typeof s!="function")throw new sn(c);a=un(a)||0,ot(u)&&(X=!!u.leading,Q="maxWait"in u,C=Q?ft(un(u.maxWait)||0,a):C,oe="trailing"in u?!!u.trailing:oe);function pe(lt){var Rn=f,cr=g;return f=g=n,K=lt,E=s.apply(cr,Rn),E}function _e(lt){return K=lt,B=hs(Fe,a),X?pe(lt):E}function De(lt){var Rn=lt-L,cr=lt-K,Lg=a-Rn;return Q?Tt(Lg,C-cr):Lg}function Ce(lt){var Rn=lt-L,cr=lt-K;return L===n||Rn>=a||Rn<0||Q&&cr>=C}function Fe(){var lt=Ya();if(Ce(lt))return Oe(lt);B=hs(Fe,De(lt))}function Oe(lt){return B=n,oe&&f?pe(lt):(f=g=n,E)}function tn(){B!==n&&Nm(B),K=0,f=L=g=B=n}function Lt(){return B===n?E:Oe(Ya())}function nn(){var lt=Ya(),Rn=Ce(lt);if(f=arguments,g=this,L=lt,Rn){if(B===n)return _e(L);if(Q)return Nm(B),B=hs(Fe,a),pe(L)}return B===n&&(B=hs(Fe,a)),E}return nn.cancel=tn,nn.flush=Lt,nn}var PL=Ie(function(s,a){return am(s,1,a)}),RL=Ie(function(s,a,u){return am(s,un(a)||0,u)});function DL(s){return or(s,Y)}function Xa(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new sn(c);var u=function(){var f=arguments,g=a?a.apply(this,f):f[0],C=u.cache;if(C.has(g))return C.get(g);var E=s.apply(this,f);return u.cache=C.set(g,E)||C,E};return u.cache=new(Xa.Cache||nr),u}Xa.Cache=nr;function Ja(s){if(typeof s!="function")throw new sn(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function IL(s){return fg(2,s)}var FL=bI(function(s,a){a=a.length==1&&Ne(a[0])?et(a[0],Jt(ge())):et(bt(a,1),Jt(ge()));var u=a.length;return Ie(function(f){for(var g=-1,C=Tt(f.length,u);++g<C;)f[g]=a[g].call(this,f[g]);return Xt(s,this,f)})}),Id=Ie(function(s,a){var u=Dr(a,Yo(Id));return or(s,A,n,a,u)}),Cg=Ie(function(s,a){var u=Dr(a,Yo(Cg));return or(s,S,n,a,u)}),LL=ir(function(s,a){return or(s,G,n,n,n,a)});function OL(s,a){if(typeof s!="function")throw new sn(c);return a=a===n?a:Be(a),Ie(s,a)}function ML(s,a){if(typeof s!="function")throw new sn(c);return a=a==null?0:ft(Be(a),0),Ie(function(u){var f=u[a],g=Mr(u,0,a);return f&&Rr(g,f),Xt(s,this,g)})}function $L(s,a,u){var f=!0,g=!0;if(typeof s!="function")throw new sn(c);return ot(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),_g(s,a,{leading:f,maxWait:a,trailing:g})}function GL(s){return hg(s,1)}function zL(s,a){return Id(Cd(a),s)}function UL(){if(!arguments.length)return[];var s=arguments[0];return Ne(s)?s:[s]}function ZL(s){return ln(s,v)}function WL(s,a){return a=typeof a=="function"?a:n,ln(s,v,a)}function jL(s){return ln(s,y|v)}function HL(s,a){return a=typeof a=="function"?a:n,ln(s,y|v,a)}function qL(s,a){return a==null||sm(s,a,_t(a))}function Pn(s,a){return s===a||s!==s&&a!==a}var KL=Za(ad),YL=Za(function(s,a){return s>=a}),po=pm(function(){return arguments}())?pm:function(s){return it(s)&&He.call(s,"callee")&&!Jf.call(s,"callee")},Ne=j.isArray,XL=Rf?Jt(Rf):iI;function Gt(s){return s!=null&&Qa(s.length)&&!ar(s)}function at(s){return it(s)&&Gt(s)}function JL(s){return s===!0||s===!1||it(s)&&It(s)==Hi}var $r=pD||jd,QL=Df?Jt(Df):sI;function eO(s){return it(s)&&s.nodeType===1&&!fs(s)}function tO(s){if(s==null)return!0;if(Gt(s)&&(Ne(s)||typeof s=="string"||typeof s.splice=="function"||$r(s)||Xo(s)||po(s)))return!s.length;var a=Nt(s);if(a==Nn||a==Vn)return!s.size;if(ps(s))return!dd(s).length;for(var u in s)if(He.call(s,u))return!1;return!0}function nO(s,a){return cs(s,a)}function rO(s,a,u){u=typeof u=="function"?u:n;var f=u?u(s,a):n;return f===n?cs(s,a,n,u):!!f}function Fd(s){if(!it(s))return!1;var a=It(s);return a==ua||a==EP||typeof s.message=="string"&&typeof s.name=="string"&&!fs(s)}function oO(s){return typeof s=="number"&&em(s)}function ar(s){if(!ot(s))return!1;var a=It(s);return a==pa||a==af||a==SP||a==NP}function vg(s){return typeof s=="number"&&s==Be(s)}function Qa(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ne}function ot(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function it(s){return s!=null&&typeof s=="object"}var wg=If?Jt(If):lI;function iO(s,a){return s===a||cd(s,a,Ed(a))}function sO(s,a,u){return u=typeof u=="function"?u:n,cd(s,a,Ed(a),u)}function aO(s){return bg(s)&&s!=+s}function lO(s){if(WI(s))throw new Ee(l);return hm(s)}function cO(s){return s===null}function dO(s){return s==null}function bg(s){return typeof s=="number"||it(s)&&It(s)==Ki}function fs(s){if(!it(s)||It(s)!=er)return!1;var a=Ea(s);if(a===null)return!0;var u=He.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&ba.call(u)==sD}var Ld=Ff?Jt(Ff):cI;function uO(s){return vg(s)&&s>=-ne&&s<=ne}var xg=Lf?Jt(Lf):dI;function el(s){return typeof s=="string"||!Ne(s)&&it(s)&&It(s)==Xi}function en(s){return typeof s=="symbol"||it(s)&&It(s)==ha}var Xo=Of?Jt(Of):uI;function pO(s){return s===n}function hO(s){return it(s)&&Nt(s)==Ji}function fO(s){return it(s)&&It(s)==AP}var mO=Za(ud),gO=Za(function(s,a){return s<=a});function kg(s){if(!s)return[];if(Gt(s))return el(s)?An(s):$t(s);if(ts&&s[ts])return qR(s[ts]());var a=Nt(s),u=a==Nn?Jc:a==Vn?Ca:Jo;return u(s)}function lr(s){if(!s)return s===0?s:0;if(s=un(s),s===J||s===-J){var a=s<0?-1:1;return a*de}return s===s?s:0}function Be(s){var a=lr(s),u=a%1;return a===a?u?a-u:a:0}function Sg(s){return s?ao(Be(s),0,Te):0}function un(s){if(typeof s=="number")return s;if(en(s))return me;if(ot(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ot(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=Zf(s);var u=XP.test(s);return u||QP.test(s)?BR(s.slice(2),u?2:8):YP.test(s)?me:+s}function Eg(s){return jn(s,zt(s))}function yO(s){return s?ao(Be(s),-ne,ne):s===0?s:0}function We(s){return s==null?"":Qt(s)}var _O=qo(function(s,a){if(ps(a)||Gt(a)){jn(a,_t(a),s);return}for(var u in a)He.call(a,u)&&ss(s,u,a[u])}),Tg=qo(function(s,a){jn(a,zt(a),s)}),tl=qo(function(s,a,u,f){jn(a,zt(a),s,f)}),CO=qo(function(s,a,u,f){jn(a,_t(a),s,f)}),vO=ir(od);function wO(s,a){var u=Ho(s);return a==null?u:im(u,a)}var bO=Ie(function(s,a){s=Ke(s);var u=-1,f=a.length,g=f>2?a[2]:n;for(g&&Ft(a[0],a[1],g)&&(f=1);++u<f;)for(var C=a[u],E=zt(C),B=-1,L=E.length;++B<L;){var K=E[B],X=s[K];(X===n||Pn(X,Zo[K])&&!He.call(s,K))&&(s[K]=C[K])}return s}),xO=Ie(function(s){return s.push(n,Zm),Xt(Ng,n,s)});function kO(s,a){return $f(s,ge(a,3),Wn)}function SO(s,a){return $f(s,ge(a,3),sd)}function EO(s,a){return s==null?s:id(s,ge(a,3),zt)}function TO(s,a){return s==null?s:dm(s,ge(a,3),zt)}function NO(s,a){return s&&Wn(s,ge(a,3))}function VO(s,a){return s&&sd(s,ge(a,3))}function AO(s){return s==null?[]:Fa(s,_t(s))}function BO(s){return s==null?[]:Fa(s,zt(s))}function Od(s,a,u){var f=s==null?n:lo(s,a);return f===n?u:f}function PO(s,a){return s!=null&&Hm(s,a,tI)}function Md(s,a){return s!=null&&Hm(s,a,nI)}var RO=Mm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=xa.call(a)),s[a]=u},Gd(Ut)),DO=Mm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=xa.call(a)),He.call(s,a)?s[a].push(u):s[a]=[u]},ge),IO=Ie(ls);function _t(s){return Gt(s)?rm(s):dd(s)}function zt(s){return Gt(s)?rm(s,!0):pI(s)}function FO(s,a){var u={};return a=ge(a,3),Wn(s,function(f,g,C){rr(u,a(f,g,C),f)}),u}function LO(s,a){var u={};return a=ge(a,3),Wn(s,function(f,g,C){rr(u,g,a(f,g,C))}),u}var OO=qo(function(s,a,u){La(s,a,u)}),Ng=qo(function(s,a,u,f){La(s,a,u,f)}),MO=ir(function(s,a){var u={};if(s==null)return u;var f=!1;a=et(a,function(C){return C=Or(C,s),f||(f=C.length>1),C}),jn(s,kd(s),u),f&&(u=ln(u,y|w|v,RI));for(var g=a.length;g--;)gd(u,a[g]);return u});function $O(s,a){return Vg(s,Ja(ge(a)))}var GO=ir(function(s,a){return s==null?{}:fI(s,a)});function Vg(s,a){if(s==null)return{};var u=et(kd(s),function(f){return[f]});return a=ge(a),vm(s,u,function(f,g){return a(f,g[0])})}function zO(s,a,u){a=Or(a,s);var f=-1,g=a.length;for(g||(g=1,s=n);++f<g;){var C=s==null?n:s[Hn(a[f])];C===n&&(f=g,C=u),s=ar(C)?C.call(s):C}return s}function UO(s,a,u){return s==null?s:ds(s,a,u)}function ZO(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:ds(s,a,u,f)}var Ag=zm(_t),Bg=zm(zt);function WO(s,a,u){var f=Ne(s),g=f||$r(s)||Xo(s);if(a=ge(a,4),u==null){var C=s&&s.constructor;g?u=f?new C:[]:ot(s)?u=ar(C)?Ho(Ea(s)):{}:u={}}return(g?on:Wn)(s,function(E,B,L){return a(u,E,B,L)}),u}function jO(s,a){return s==null?!0:gd(s,a)}function HO(s,a,u){return s==null?s:Sm(s,a,Cd(u))}function qO(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:Sm(s,a,Cd(u),f)}function Jo(s){return s==null?[]:Xc(s,_t(s))}function KO(s){return s==null?[]:Xc(s,zt(s))}function YO(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=un(u),u=u===u?u:0),a!==n&&(a=un(a),a=a===a?a:0),ao(un(s),a,u)}function XO(s,a,u){return a=lr(a),u===n?(u=a,a=0):u=lr(u),s=un(s),rI(s,a,u)}function JO(s,a,u){if(u&&typeof u!="boolean"&&Ft(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=lr(s),a===n?(a=s,s=0):a=lr(a)),s>a){var f=s;s=a,a=f}if(u||s%1||a%1){var g=tm();return Tt(s+g*(a-s+AR("1e-"+((g+"").length-1))),a)}return hd(s,a)}var QO=Ko(function(s,a,u){return a=a.toLowerCase(),s+(u?Pg(a):a)});function Pg(s){return $d(We(s).toLowerCase())}function Rg(s){return s=We(s),s&&s.replace(tR,UR).replace(vR,"")}function eM(s,a,u){s=We(s),a=Qt(a);var f=s.length;u=u===n?f:ao(Be(u),0,f);var g=u;return u-=a.length,u>=0&&s.slice(u,g)==a}function tM(s){return s=We(s),s&&IP.test(s)?s.replace(df,ZR):s}function nM(s){return s=We(s),s&&GP.test(s)?s.replace(Ic,"\\$&"):s}var rM=Ko(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),oM=Ko(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),iM=Fm("toLowerCase");function sM(s,a,u){s=We(s),a=Be(a);var f=a?zo(s):0;if(!a||f>=a)return s;var g=(a-f)/2;return Ua(Aa(g),u)+s+Ua(Va(g),u)}function aM(s,a,u){s=We(s),a=Be(a);var f=a?zo(s):0;return a&&f<a?s+Ua(a-f,u):s}function lM(s,a,u){s=We(s),a=Be(a);var f=a?zo(s):0;return a&&f<a?Ua(a-f,u)+s:s}function cM(s,a,u){return u||a==null?a=0:a&&(a=+a),gD(We(s).replace(Fc,""),a||0)}function dM(s,a,u){return(u?Ft(s,a,u):a===n)?a=1:a=Be(a),fd(We(s),a)}function uM(){var s=arguments,a=We(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var pM=Ko(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function hM(s,a,u){return u&&typeof u!="number"&&Ft(s,a,u)&&(a=u=n),u=u===n?Te:u>>>0,u?(s=We(s),s&&(typeof a=="string"||a!=null&&!Ld(a))&&(a=Qt(a),!a&&Go(s))?Mr(An(s),0,u):s.split(a,u)):[]}var fM=Ko(function(s,a,u){return s+(u?" ":"")+$d(a)});function mM(s,a,u){return s=We(s),u=u==null?0:ao(Be(u),0,s.length),a=Qt(a),s.slice(u,u+a.length)==a}function gM(s,a,u){var f=_.templateSettings;u&&Ft(s,a,u)&&(a=n),s=We(s),a=tl({},a,f,Um);var g=tl({},a.imports,f.imports,Um),C=_t(g),E=Xc(g,C),B,L,K=0,X=a.interpolate||fa,Q="__p += '",oe=Qc((a.escape||fa).source+"|"+X.source+"|"+(X===uf?KP:fa).source+"|"+(a.evaluate||fa).source+"|$","g"),pe="//# sourceURL="+(He.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++SR+"]")+`
|
|
75
|
+
`;s.replace(oe,function(Ce,Fe,Oe,tn,Lt,nn){return Oe||(Oe=tn),Q+=s.slice(K,nn).replace(nR,WR),Fe&&(B=!0,Q+=`' +
|
|
76
76
|
__e(`+Fe+`) +
|
|
77
77
|
'`),Lt&&(L=!0,Q+=`';
|
|
78
78
|
`+Lt+`;
|
|
@@ -82,11 +82,11 @@ __p += '`),Oe&&(Q+=`' +
|
|
|
82
82
|
`;var _e=He.call(a,"variable")&&a.variable;if(!_e)Q=`with (obj) {
|
|
83
83
|
`+Q+`
|
|
84
84
|
}
|
|
85
|
-
`;else if(
|
|
85
|
+
`;else if(HP.test(_e))throw new Ee(d);Q=(L?Q.replace(BP,""):Q).replace(PP,"$1").replace(RP,"$1;"),Q="function("+(_e||"obj")+`) {
|
|
86
86
|
`+(_e?"":`obj || (obj = {});
|
|
87
87
|
`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(L?`, __j = Array.prototype.join;
|
|
88
88
|
function print() { __p += __j.call(arguments, '') }
|
|
89
89
|
`:`;
|
|
90
90
|
`)+Q+`return __p
|
|
91
|
-
}`;var De=Rg(function(){return Ue(C,pe+"return "+Q).apply(n,E)});if(De.source=Q,Fd(De))throw De;return De}function hM(s){return We(s).toLowerCase()}function fM(s){return We(s).toUpperCase()}function mM(s,a,u){if(s=We(s),s&&(u||a===n))return zf(s);if(!s||!(a=Qt(a)))return s;var f=An(s),g=An(a),C=Uf(f,g),E=Zf(f,g)+1;return Or(f,C,E).join("")}function gM(s,a,u){if(s=We(s),s&&(u||a===n))return s.slice(0,jf(s)+1);if(!s||!(a=Qt(a)))return s;var f=An(s),g=Zf(f,An(a))+1;return Or(f,0,g).join("")}function yM(s,a,u){if(s=We(s),s&&(u||a===n))return s.replace(Fc,"");if(!s||!(a=Qt(a)))return s;var f=An(s),g=Uf(f,An(a));return Or(f,g).join("")}function _M(s,a){var u=F,f=U;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Qt(a.omission):f}s=We(s);var C=s.length;if($o(s)){var E=An(s);C=E.length}if(u>=C)return s;var B=u-Go(f);if(B<1)return f;var L=E?Or(E,0,B).join(""):s.slice(0,B);if(g===n)return L+f;if(E&&(B+=L.length-B),Ld(g)){if(s.slice(B).search(g)){var K,X=L;for(g.global||(g=Qc(g.source,We(df.exec(g))+"g")),g.lastIndex=0;K=g.exec(X);)var Q=K.index;L=L.slice(0,Q===n?B:Q)}}else if(s.indexOf(Qt(g),B)!=B){var oe=L.lastIndexOf(g);oe>-1&&(L=L.slice(0,oe))}return L+f}function CM(s){return s=We(s),s&&AP.test(s)?s.replace(af,qR):s}var vM=qo(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),$d=Dm("toUpperCase");function Pg(s,a,u){return s=We(s),a=u?n:a,a===n?UR(s)?XR(s):DR(s):s.match(a)||[]}var Rg=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Fd(u)?u:new Ee(u)}}),wM=ir(function(s,a){return on(a,function(u){u=Hn(u),rr(s,u,Dd(s[u],s))}),s});function bM(s){var a=s==null?0:s.length,u=ge();return s=a?et(s,function(f){if(typeof f[1]!="function")throw new sn(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var C=s[g];if(Xt(C[0],this,f))return Xt(C[1],this,f)}})}function xM(s){return qD(ln(s,y))}function Gd(s){return function(){return s}}function kM(s,a){return s==null||s!==s?a:s}var SM=Fm(),EM=Fm(!0);function Ut(s){return s}function zd(s){return pm(typeof s=="function"?s:ln(s,y))}function TM(s){return fm(ln(s,y))}function NM(s,a){return mm(s,ln(a,y))}var VM=Ie(function(s,a){return function(u){return ls(u,s,a)}}),AM=Ie(function(s,a){return function(u){return ls(s,u,a)}});function Ud(s,a,u){var f=_t(a),g=Fa(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Fa(a,_t(a)));var C=!(ot(u)&&"chain"in u)||!!u.chain,E=ar(s);return on(g,function(B){var L=a[B];s[B]=L,E&&(s.prototype[B]=function(){var K=this.__chain__;if(C||K){var X=s(this.__wrapped__),Q=X.__actions__=$t(this.__actions__);return Q.push({func:L,args:arguments,thisArg:s}),X.__chain__=K,X}return L.apply(s,Pr([this.value()],arguments))})}),s}function BM(){return wt._===this&&(wt._=rD),this}function Zd(){}function PM(s){return s=Be(s),Ie(function(a){return gm(a,s)})}var RM=wd(et),DM=wd(Lf),IM=wd(jc);function Dg(s){return Nd(s)?Hc(Hn(s)):uI(s)}function FM(s){return function(a){return s==null?n:ao(s,a)}}var LM=Om(),OM=Om(!0);function Wd(){return[]}function jd(){return!1}function MM(){return{}}function $M(){return""}function GM(){return!0}function zM(s,a){if(s=Be(s),s<1||s>ne)return[];var u=Te,f=Tt(s,Te);a=ge(a),s-=Te;for(var g=Yc(f,a);++u<s;)a(u);return g}function UM(s){return Ne(s)?et(s,Hn):en(s)?[s]:$t(eg(We(s)))}function ZM(s){var a=++tD;return We(s)+a}var WM=za(function(s,a){return s+a},0),jM=bd("ceil"),HM=za(function(s,a){return s/a},1),qM=bd("floor");function KM(s){return s&&s.length?Ia(s,Ut,ad):n}function YM(s,a){return s&&s.length?Ia(s,ge(a,2),ad):n}function XM(s){return $f(s,Ut)}function JM(s,a){return $f(s,ge(a,2))}function QM(s){return s&&s.length?Ia(s,Ut,ud):n}function e$(s,a){return s&&s.length?Ia(s,ge(a,2),ud):n}var t$=za(function(s,a){return s*a},1),n$=bd("round"),r$=za(function(s,a){return s-a},0);function o$(s){return s&&s.length?Kc(s,Ut):0}function i$(s,a){return s&&s.length?Kc(s,ge(a,2)):0}return _.after=TL,_.ary=ug,_.assign=fO,_.assignIn=Sg,_.assignInWith=tl,_.assignWith=mO,_.at=gO,_.before=pg,_.bind=Dd,_.bindAll=wM,_.bindKey=hg,_.castArray=ML,_.chain=lg,_.chunk=qI,_.compact=KI,_.concat=YI,_.cond=bM,_.conforms=xM,_.constant=Gd,_.countBy=oL,_.create=yO,_.curry=fg,_.curryRight=mg,_.debounce=gg,_.defaults=_O,_.defaultsDeep=CO,_.defer=NL,_.delay=VL,_.difference=XI,_.differenceBy=JI,_.differenceWith=QI,_.drop=eF,_.dropRight=tF,_.dropRightWhile=nF,_.dropWhile=rF,_.fill=oF,_.filter=sL,_.flatMap=cL,_.flatMapDeep=dL,_.flatMapDepth=uL,_.flatten=og,_.flattenDeep=iF,_.flattenDepth=sF,_.flip=AL,_.flow=SM,_.flowRight=EM,_.fromPairs=aF,_.functions=EO,_.functionsIn=TO,_.groupBy=pL,_.initial=cF,_.intersection=dF,_.intersectionBy=uF,_.intersectionWith=pF,_.invert=VO,_.invertBy=AO,_.invokeMap=fL,_.iteratee=zd,_.keyBy=mL,_.keys=_t,_.keysIn=zt,_.map=Ka,_.mapKeys=PO,_.mapValues=RO,_.matches=TM,_.matchesProperty=NM,_.memoize=Xa,_.merge=DO,_.mergeWith=Eg,_.method=VM,_.methodOf=AM,_.mixin=Ud,_.negate=Ja,_.nthArg=PM,_.omit=IO,_.omitBy=FO,_.once=BL,_.orderBy=gL,_.over=RM,_.overArgs=PL,_.overEvery=DM,_.overSome=IM,_.partial=Id,_.partialRight=yg,_.partition=yL,_.pick=LO,_.pickBy=Tg,_.property=Dg,_.propertyOf=FM,_.pull=gF,_.pullAll=sg,_.pullAllBy=yF,_.pullAllWith=_F,_.pullAt=CF,_.range=LM,_.rangeRight=OM,_.rearg=RL,_.reject=vL,_.remove=vF,_.rest=DL,_.reverse=Pd,_.sampleSize=bL,_.set=MO,_.setWith=$O,_.shuffle=xL,_.slice=wF,_.sortBy=EL,_.sortedUniq=NF,_.sortedUniqBy=VF,_.split=cM,_.spread=IL,_.tail=AF,_.take=BF,_.takeRight=PF,_.takeRightWhile=RF,_.takeWhile=DF,_.tap=KF,_.throttle=FL,_.thru=qa,_.toArray=bg,_.toPairs=Ng,_.toPairsIn=Vg,_.toPath=UM,_.toPlainObject=kg,_.transform=GO,_.unary=LL,_.union=IF,_.unionBy=FF,_.unionWith=LF,_.uniq=OF,_.uniqBy=MF,_.uniqWith=$F,_.unset=zO,_.unzip=Rd,_.unzipWith=ag,_.update=UO,_.updateWith=ZO,_.values=Xo,_.valuesIn=WO,_.without=GF,_.words=Pg,_.wrap=OL,_.xor=zF,_.xorBy=UF,_.xorWith=ZF,_.zip=WF,_.zipObject=jF,_.zipObjectDeep=HF,_.zipWith=qF,_.entries=Ng,_.entriesIn=Vg,_.extend=Sg,_.extendWith=tl,Ud(_,_),_.add=WM,_.attempt=Rg,_.camelCase=KO,_.capitalize=Ag,_.ceil=jM,_.clamp=jO,_.clone=$L,_.cloneDeep=zL,_.cloneDeepWith=UL,_.cloneWith=GL,_.conformsTo=ZL,_.deburr=Bg,_.defaultTo=kM,_.divide=HM,_.endsWith=YO,_.eq=Pn,_.escape=XO,_.escapeRegExp=JO,_.every=iL,_.find=aL,_.findIndex=ng,_.findKey=vO,_.findLast=lL,_.findLastIndex=rg,_.findLastKey=wO,_.floor=qM,_.forEach=cg,_.forEachRight=dg,_.forIn=bO,_.forInRight=xO,_.forOwn=kO,_.forOwnRight=SO,_.get=Od,_.gt=WL,_.gte=jL,_.has=NO,_.hasIn=Md,_.head=ig,_.identity=Ut,_.includes=hL,_.indexOf=lF,_.inRange=HO,_.invoke=BO,_.isArguments=uo,_.isArray=Ne,_.isArrayBuffer=HL,_.isArrayLike=Gt,_.isArrayLikeObject=at,_.isBoolean=qL,_.isBuffer=Mr,_.isDate=KL,_.isElement=YL,_.isEmpty=XL,_.isEqual=JL,_.isEqualWith=QL,_.isError=Fd,_.isFinite=eO,_.isFunction=ar,_.isInteger=_g,_.isLength=Qa,_.isMap=Cg,_.isMatch=tO,_.isMatchWith=nO,_.isNaN=rO,_.isNative=oO,_.isNil=sO,_.isNull=iO,_.isNumber=vg,_.isObject=ot,_.isObjectLike=it,_.isPlainObject=fs,_.isRegExp=Ld,_.isSafeInteger=aO,_.isSet=wg,_.isString=el,_.isSymbol=en,_.isTypedArray=Yo,_.isUndefined=lO,_.isWeakMap=cO,_.isWeakSet=dO,_.join=hF,_.kebabCase=QO,_.last=dn,_.lastIndexOf=fF,_.lowerCase=eM,_.lowerFirst=tM,_.lt=uO,_.lte=pO,_.max=KM,_.maxBy=YM,_.mean=XM,_.meanBy=JM,_.min=QM,_.minBy=e$,_.stubArray=Wd,_.stubFalse=jd,_.stubObject=MM,_.stubString=$M,_.stubTrue=GM,_.multiply=t$,_.nth=mF,_.noConflict=BM,_.noop=Zd,_.now=Ya,_.pad=nM,_.padEnd=rM,_.padStart=oM,_.parseInt=iM,_.random=qO,_.reduce=_L,_.reduceRight=CL,_.repeat=sM,_.replace=aM,_.result=OO,_.round=n$,_.runInContext=D,_.sample=wL,_.size=kL,_.snakeCase=lM,_.some=SL,_.sortedIndex=bF,_.sortedIndexBy=xF,_.sortedIndexOf=kF,_.sortedLastIndex=SF,_.sortedLastIndexBy=EF,_.sortedLastIndexOf=TF,_.startCase=dM,_.startsWith=uM,_.subtract=r$,_.sum=o$,_.sumBy=i$,_.template=pM,_.times=zM,_.toFinite=lr,_.toInteger=Be,_.toLength=xg,_.toLower=hM,_.toNumber=un,_.toSafeInteger=hO,_.toString=We,_.toUpper=fM,_.trim=mM,_.trimEnd=gM,_.trimStart=yM,_.truncate=_M,_.unescape=CM,_.uniqueId=ZM,_.upperCase=vM,_.upperFirst=$d,_.each=cg,_.eachRight=dg,_.first=ig,Ud(_,function(){var s={};return Wn(_,function(a,u){He.call(_.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),_.VERSION=o,on(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),on(["drop","take"],function(s,a){Le.prototype[s]=function(u){u=u===n?1:ft(Be(u),0);var f=this.__filtered__&&!a?new Le(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,Te),type:s+(f.__dir__<0?"Right":"")}),f},Le.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),on(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==N||u==j;Le.prototype[s]=function(g){var C=this.clone();return C.__iteratees__.push({iteratee:ge(g,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),on(["head","last"],function(s,a){var u="take"+(a?"Right":"");Le.prototype[s]=function(){return this[u](1).value()[0]}}),on(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[u](1)}}),Le.prototype.compact=function(){return this.filter(Ut)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Le(this):this.map(function(u){return ls(u,s,a)})}),Le.prototype.reject=function(s){return this.filter(Ja(ge(s)))},Le.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Le(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(Te)},Wn(Le.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=_[f?"take"+(a=="last"?"Right":""):a],C=f||/^find/.test(a);g&&(_.prototype[a]=function(){var E=this.__wrapped__,B=f?[1]:arguments,L=E instanceof Le,K=B[0],X=L||Ne(E),Q=function(Fe){var Oe=g.apply(_,Pr([Fe],B));return f&&oe?Oe[0]:Oe};X&&u&&typeof K=="function"&&K.length!=1&&(L=X=!1);var oe=this.__chain__,pe=!!this.__actions__.length,_e=C&&!oe,De=L&&!pe;if(!C&&X){E=De?E:new Le(this);var Ce=s.apply(E,B);return Ce.__actions__.push({func:qa,args:[Q],thisArg:n}),new an(Ce,oe)}return _e&&De?s.apply(this,B):(Ce=this.thru(Q),_e?f?Ce.value()[0]:Ce.value():Ce)})}),on(["pop","push","shift","sort","splice","unshift"],function(s){var a=va[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var C=this.value();return a.apply(Ne(C)?C:[],g)}return this[u](function(E){return a.apply(Ne(E)?E:[],g)})}}),Wn(Le.prototype,function(s,a){var u=_[a];if(u){var f=u.name+"";He.call(Wo,f)||(Wo[f]=[]),Wo[f].push({name:a,func:u})}}),Wo[Ga(n,x).name]=[{name:"wrapper",func:n}],Le.prototype.clone=CD,Le.prototype.reverse=vD,Le.prototype.value=wD,_.prototype.at=YF,_.prototype.chain=XF,_.prototype.commit=JF,_.prototype.next=QF,_.prototype.plant=tL,_.prototype.reverse=nL,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=rL,_.prototype.first=_.prototype.head,ts&&(_.prototype[ts]=eL),_},zo=JR();no?((no.exports=zo)._=zo,zc._=zo):wt._=zo}).call(ei)}(Xs,Xs.exports);var rt=Xs.exports;const uV={class:"grid-overlay-container"},rh=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",uV,[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"},"No datasource",-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))]))}}),pV={},hV={class:"grid-overlay-container"};function fV(t,e){return r.openBlock(),r.createElementBlock("div",hV,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const oh=oc(pV,[["render",fV]]);async function mV(t,e){throw Error("not implemented")}const gV={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},ih=r.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(t){const e=t,n=r.computed(()=>{var m,y;const h=(y=(m=e.params.column.getUserProvidedColDef())==null?void 0:m.headerComponentParams)==null?void 0:y.type;switch(h){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";default:throw Error(`unsupported data type: ${h} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=r.ref(null),i=()=>o.value=e.params.column.getSort()??null;r.onMounted(()=>i());function l(){e.params.column.isSortable()&&(e.params.progressSort(),i())}const c=r.computed(()=>{const h=o.value;switch(h){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${h}. Column ${e.params.column.getColId()}`)}}),d=r.ref();function p(){const h=d.value;h&&e.params.showColumnMenu(h)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:l},[r.createElementVNode("div",gV,[r.createVNode(r.unref(Wt),{name:n.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),r.createElementVNode("span",null,r.toDisplayString(h.params.displayName),1),c.value?(r.openBlock(),r.createBlock(r.unref(Wt),{key:0,name:c.value},null,8,["name"])):r.createCommentVNode("",!0)]),h.params.enableMenu?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:r.withModifiers(p,["stop"])},[r.createVNode(r.unref(Wt),{name:"more"})],512)):r.createCommentVNode("",!0)]))}}),yV={class:"pl-ag-grid-open-cell d-flex"},_V={class:"pl-ag-grid-open-cell__value"},sh=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){var o,i;if(e.params.invokeRowsOnDoubleClick){const l=e.params.api,c={rowPinned:e.params.node.rowPinned,api:l,rowIndex:e.params.node.rowIndex,context:l,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};l.dispatchEvent(c)}else(i=(o=e.params).onClick)==null||i.call(o,e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",yV,[r.createElementVNode("div",_V,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(Wt),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}}),Un='"##RowNumberColumnId##"',ah=45;function lh(){return{colId:Un,headerName:"#",valueGetter:t=>t.node===null||t.node.rowIndex===null?null:t.node.rowIndex+1,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:ah,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function CV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",t.style.boxSizing="border-box",t.style.padding="15.5px",t.style.border="1px solid",t.style.width="auto",document.body.appendChild(t),t}function zi(t,e,n){const o=t.getCellValue({rowNode:t.getDisplayedRowAtIndex(t.getLastDisplayedRowIndex()),colKey:Un});if(typeof o!="number")return;const i=o.toString().length;if(!n&&e.innerHTML.length===i)return;const l="5";e.innerHTML=l.repeat(i),r.nextTick(()=>{t.applyColumnState({state:[{colId:Un,pinned:"left",width:Math.max(ah,e.offsetWidth)}]})})}function vV(t){document.body.removeChild(t)}function ch(t){const e=CV();t.addEventListener("firstDataRendered",n=>{zi(n.api,e)}),t.addEventListener("viewportChanged",n=>{zi(n.api,e)}),t.addEventListener("columnVisible",n=>{n.columns&&n.columns.some(o=>o.isVisible()&&o.getColId()===Un)&&zi(n.api,e)}),t.addEventListener("columnResized",n=>{var o;n.finished&&n.source==="autosizeColumns"&&((o=n.columns)!=null&&o.some(i=>i.isVisible()&&i.getColId()===Un))&&zi(n.api,e,!0)}),t.addEventListener("sortChanged",n=>{n.api.refreshCells()}),t.addEventListener("filterChanged",n=>{n.api.refreshCells()}),t.addEventListener("gridPreDestroyed",()=>{vV(e)}),zi(t,e)}function wV(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function bV(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=wV(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=_o(l),d=e.find(p=>rt.isEqual(t[p].id,c));if(d===void 0)throw console.error("axis not found",o,c,t,e),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const dh=(t,e)=>"hC"+(t+e).toString();function xV(t,e,n,o,i,l){let c=-1,d=-1;for(let m=0;m<l.length;++m)l[m]===t.axisIdx&&(c=m),l[m]===t.columnIdx&&(d=m);if(c===-1||d===-1)throw console.error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`,t,l),Error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`);const p=(()=>{const y=o[c].data.filter(w=>w!==null);return Array.from(new Set(y))})();p.sort(),d>c?(n.splice(d+1,1),n.splice(c+1,1)):(n.splice(c+1,1),n.splice(d+1,1));const h=kV(i,o,c,d,p,e.rows);for(let m=0;m<p.length;++m){const y=p[m],w=dr(y+"@"+m);n.push({colId:w,field:dh(o.length,m),headerName:y,valueFormatter:ph})}return{rowModelType:"clientSide",columnDefs:n,rowData:h}}function kV(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let O=0;O<e.length;++O){if(O===n||O===o)continue;const M=t[O].toString();m[M]=e[O].data[h]}let y;const w=dr(Object.values(m))??"";c.has(w)?y=c.get(w):(c.set(w,m),y=m,y.id=d.toString(),d++);const v=i.indexOf(e[n].data[h]);if(v===-1)throw Error("index not found");const T=dh(e.length,v);y[T]=e[o].data[h]}return Array.from(c.values())}function SV(t){return dr(t)}function uh(t){return JSON.parse(t)}const ph=t=>t.value===void 0?"undefined":c_(t.value)||t.value===null?"":t.value.toString();function EV(t,e,n,o){var c,d,p;const i=SV(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:i,context:e,field:t.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(i))??((p=e.spec.annotations)==null?void 0:p["pl7.app/table/visibility"])==="optional",valueFormatter:ph,headerComponent:ih,cellRendererSelector:o?h=>{var y,w;if(e.type!=="axis")return;const m=(w=(y=h.colDef)==null?void 0:y.context)==null?void 0:w.id;if(rt.isEqual(m,o))return{component:sh}}:void 0,cellRendererParams:o?{invokeRowsOnDoubleClick:!0}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function ic(t){return dr(t)}function hh(t,e,n){const o=[];for(let i=0;i<e[0].data.length;++i){const l=n.map(d=>vu(e[d],i)),c={id:ic(l),key:l};t.forEach((d,p)=>{c[d.toString()]=vu(e[p],i)}),o.push(c)}return o}const TV=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function NV(t,e,n,o,i,l){const c=await t.getSpec(e);let d=c.findIndex(V=>V.type==="column");d===-1&&(d=c.length);const p=[...c.keys()].filter(V=>!rt.some(n,H=>rt.isEqual(_o(H.axis),c[V].id)||c[V].type==="column"&&c[V].spec.name==="pl7.app/label"&&c[V].spec.axesSpec.length===1&&rt.isEqual(_o(H.axis),_o(c[V].spec.axesSpec[0])))).sort((V,H)=>{var P,G;if(c[V].type!==c[H].type)return c[V].type==="axis"?-1:1;const A=(P=c[V].spec.annotations)==null?void 0:P["pl7.app/table/orderPriority"],S=(G=c[H].spec.annotations)==null?void 0:G["pl7.app/table/orderPriority"];return A===void 0?S===void 0?0:1:S===void 0?-1:Number(S)-Number(A)}),h=rt.cloneDeep(p),m=bV(c,p);for(let V=p.length-1;V>=0;--V){const H=p[V];if(!TV(c[H]))continue;const A=_o(c[H].spec.axesSpec[0]),S=p.findIndex(G=>rt.isEqual(c[G].id,A));if(S===-1)continue;const P=p[S];p[S]=H;for(const G of m)G.axisIdx===P&&(G.axisIdx=H);p.splice(V,1),h.splice(V,1)}const y=await t.getShape(e),w=y.rows,v=[lh(),...h.map(V=>EV(V,c[V],i,l))];if(m.length>0){let V;if(m.length==1)V=m[0];else{const H=m.filter(A=>{var S;return((S=c[A.columnIdx].spec.annotations)==null?void 0:S["pl7.app/table/hValue"])==="true"});H.length===1&&(V=H[0])}if(!V)console.warn(`Currently, only one heterogeneous axis / column is supported in the table, got ${m.length} transposition will not be applied.`);else return xV(V,y,v,await t.getData(e,p),h,p)}const T=[...p],O=new Map;for(let V=0;V<d;++V)O.set(V,-1);for(let V=0;V<T.length;++V){const H=T[V];O.has(H)&&O.set(H,V)}for(const[V,H]of O)H===-1&&(O.set(V,T.length),T.push(V));const M=[];for(let V=0;V<d;++V){const H=O.get(V);if(H===void 0||H===-1)throw new Error("assertion exception");M.push(H)}if(o)return{rowModelType:"clientSide",columnDefs:v,rowData:hh(h,await t.getData(e,T),M)};let x;return{rowModelType:"serverSide",columnDefs:v,serverSideDatasource:{getRows:async V=>{try{if(w==0){V.success({rowData:[],rowCount:w}),V.api.setGridOption("loading",!1),V.api.showNoRowsOverlay();return}if(x&&!rt.isEqual(x.request.sortModel,V.request.sortModel)){x=void 0,V.api.setGridOption("loading",!0),V.success({rowData:[],rowCount:0});return}x=V;let H=0,A=[];if(w>0&&V.request.startRow!==void 0&&V.request.endRow!==void 0&&(H=Math.min(w,V.request.endRow)-V.request.startRow,H>0)){const S=await t.getData(e,T,{offset:V.request.startRow,length:H});A=hh(h,S,M)}V.success({rowData:A,rowCount:w}),V.api.autoSizeColumns(V.api.getAllDisplayedColumns().filter(S=>S.getColId()!==Un)),V.api.setGridOption("loading",!1)}catch(H){V.api.setGridOption("loading",!0),V.fail(),console.trace(H)}}}}}const Js=qg();function fh(){const t=r.shallowRef([!1,void 0]);return{track:i=>t.value=[!0,i],reset:()=>t.value=[!1,void 0],onceTracked:i=>{const{stop:l}=r.watchEffect(()=>{const[c,d]=t.value;c&&(i(d),l())});return l}}}function mh(t,e){t.addEventListener("firstDataRendered",n=>{n.api.getGridOption("rowModelType")==="clientSide"&&e.track(n.api)}),t.addEventListener("modelUpdated",n=>{if(n.api.getGridOption("rowModelType")==="serverSide"){const o=n.api.getServerSideGroupLevelState();o&&o.length>0&&o[0].lastRowIndexKnown&&e.track(n.api)}}),t.addEventListener("gridPreDestroyed",()=>e.reset())}function VV(t,e){let n=null;const o=i=>i.id===e?(n=i.rowIndex,!0):!1;if(t.ensureNodeVisible(o,"middle"),n){const i=t.getAllDisplayedColumns();i.length>0&&(t.ensureColumnVisible(i[0]),t.setFocusedCell(n,i[0]))}}async function gh(t,e){return new Promise(n=>{r.nextTick(()=>e.onceTracked(o=>{VV(o,t),n()}))})}const AV=["onClick"],BV={key:0,class:"pl-ag-columns__pin"},yh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);function d(h){const m=h.findIndex(y=>y.getId()===Un);if(m!==0){const[y]=h.splice(m,1);return h.splice(0,0,y)}return h}nh(i,{handle:".handle",onChange(h){n.value.moveColumns(d(h.map(m=>o.value[m])),0)}});function p(h){n.value.setColumnsVisible([h],!h.isVisible())}return r.watch(()=>n.value,h=>{o.value=d(h.getAllGridColumns()),o.value.length>0&&h.moveColumns(o.value,0),h.addEventListener("displayedColumnsChanged",m=>{o.value=m.api.getAllGridColumns(),c.value++})},{immediate:!0}),(h,m)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Js)}`},[r.createVNode(r.unref(jr),{onClick:m[0]||(m[0]=r.withModifiers(y=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:"columns"})]),default:r.withCtx(()=>[m[2]||(m[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref($s),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=y=>l.value=y),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>m[3]||(m[3]=[r.createTextVNode("Manage Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,y=>(r.openBlock(),r.createElementBlock("div",{key:y.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!y.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(Wt),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:y.isVisible()},"pl-ag-columns__title text-s-btn"])},r.toDisplayString(y.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:w=>p(y)},[r.createVNode(r.unref(vt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>m[4]||(m[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:y.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,AV),y.getColDef().lockPosition?(r.openBlock(),r.createElementBlock("div",BV,[r.createVNode(r.unref(ut),{name:"pin"})])):r.createCommentVNode("",!0)]))),128))]))]),_:1},8,["modelValue"])]))}}),PV=["id"],RV=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(Js),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,PV))}});function DV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",document.body.appendChild(t),t}function IV(t){document.body.removeChild(t)}async function FV(t,e){var o;const n=t.getGridOption("rowModelType");switch(n){case"clientSide":return t.exportDataAsCsv(),e();case"serverSide":{const i=t.getServerSideGroupLevelState();if(i.length===0||i[0].rowCount<=i[0].cacheBlockSize)return t.exportDataAsCsv(),e();const l=DV(),c={rowModelType:"serverSide",columnDefs:((o=t.getColumnDefs())==null?void 0:o.filter(d=>!("children"in d)).map(d=>({headerName:d.headerName,field:d.field,valueFormatter:d.valueFormatter,valueGetter:d.valueGetter})))??[],serverSideDatasource:t.getGridOption("serverSideDatasource"),cacheBlockSize:i[0].rowCount,onModelUpdated:d=>{const p=d.api.getServerSideGroupLevelState();if(p.length>0&&p[0].rowCount===p[0].cacheBlockSize)return d.api.exportDataAsCsv(),IV(l),e()},defaultCsvExportParams:t.getGridOption("defaultCsvExportParams")};return k.createGrid(l,c,{modules:[il.ServerSideRowModelModule]})}default:throw e(),Error(`exportCsv unsupported for rowModelType = ${n}`)}}const _h=r.defineComponent({__name:"PlAgCsvExporter",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.shallowRef(!1),i=()=>{o.value=!0,FV(n.value,()=>o.value=!1)};return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Js)}`},[r.createVNode(r.unref(jr),{loading:o.value,onClick:r.withModifiers(i,["stop"])},{append:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:"export"})]),default:r.withCtx(()=>[c[0]||(c[0]=r.createTextVNode(" Export "))]),_:1},8,["loading"])],8,["to"]))]))}}),LV={class:"ap-ag-data-table-container"},OV={key:2,class:"ap-ag-data-table-sheets"},MV=oc(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selectedRows:{},selectedRowsModifiers:{}}),emits:r.mergeModels(["rowDoubleClicked","columnsChanged"],["update:modelValue","update:selectedRows"]),setup(t,{expose:e,emit:n}){k.ModuleRegistry.registerModules([gs.ClientSideRowModelModule,Jd.ClipboardModule,il.ServerSideRowModelModule,Qd.RangeSelectionModule]);const o=r.useModel(t,"modelValue"),i=r.useModel(t,"selectedRows"),l=t,{settings:c}=r.toRefs(l),d=n;o.value.pTableParams||(o.value.pTableParams={});function p(P){return(P==null?void 0:P.sortModel.map(G=>{const{spec:Y,...F}=uh(G.colId);return{column:F,ascending:G.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const h=r.computed({get:()=>{const P=o.value;return{columnOrder:P.gridState.columnOrder,sort:P.gridState.sort,columnVisibility:P.gridState.columnVisibility}},set:P=>{var U;const G=((U=c.value)==null?void 0:U.sourceType)!=="ptable"||O.value.rowModelType==="clientSide"?void 0:p(P.sort),Y=o.value,F={...Y,gridState:{...Y.gridState,...P},pTableParams:{...Y.pTableParams,sorting:G}};Qo(Y,F)||(o.value=F)}}),m=P=>dr(_o(P));function y(P){var G,Y;if(((G=c.value)==null?void 0:G.sourceType)==="ptable")return((Y=c.value.sheets)==null?void 0:Y.map(F=>({type:"bySingleColumnV2",column:{type:"axis",id:F.axis},predicate:{operator:"Equal",reference:P[m(F.axis)]}})))??[]}const w=r.computed({get:()=>o.value.gridState.sheets??{},set:P=>{const G=y(P),Y=o.value;o.value={...Y,gridState:{...Y.gridState,sheets:P},pTableParams:{...Y.pTableParams,filters:G}}}});r.watch(()=>c.value,(P,G)=>{if((P==null?void 0:P.sourceType)!=="ptable"||!P.sheets){w.value={};return}if(G&&G.sourceType==="ptable"&&rt.isEqual(P.sheets,G.sheets))return;const Y=w.value,F={};for(const U of P.sheets){const z=m(U.axis);F[z]=Y[z]??U.defaultValue??U.options[0].value}w.value=F},{immediate:!0});const v=r.shallowRef(),T=fh(),O=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:h.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:i.value?{mode:"multiRow"}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:P=>{const G=i.value;if(G){const Y=G.map(F=>P.api.getRowNode(ic(F))).filter(F=>!!F);P.api.setNodesSelected({nodes:Y,newValue:!0})}},onSelectionChanged:P=>{i.value&&(i.value=P.api.getSelectedNodes().map(G=>G.data.key))},onRowDoubleClicked:P=>{P.data&&d("rowDoubleClicked",P.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:P=>P.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:rh,noRowsOverlayComponent:oh,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),M=P=>{const G=P.api;mh(G,T),ch(G),v.value=new Proxy(G,{get(Y,F,U){switch(F){case"setGridOption":return(z,R)=>{const N=O.value;N[z]=R,O.value=N,G.setGridOption(z,R)};case"updateGridOptions":return z=>{O.value={...O.value,...z},G.updateGridOptions(z)};default:return Reflect.get(Y,F,U)}}})},x=P=>({columnOrder:P.columnOrder,sort:P.sort,columnVisibility:P.columnVisibility??(P.columnOrder?{hiddenColIds:[]}:void 0)}),Z=P=>{O.value.initialState=h.value=x(P.state),P.api.autoSizeColumns(P.api.getAllDisplayedColumns().filter(G=>G.getColId()!==Un))},V=()=>{O.value.initialState=h.value=x(v.value.getState()),v.value=void 0};e({focusRow:P=>gh(ic(P),T)});const H=r.ref(0);r.watch(()=>[v.value,h.value],(P,G)=>{if(rt.isEqual(P,G))return;const[Y,F]=P;if(!Y)return;const U=x(Y.getState());rt.isEqual(F,U)||(O.value.initialState=F,++H.value)}),r.watch(()=>O.value,(P,G)=>{var Y,F;if(G){if(P.rowModelType!=G.rowModelType&&++H.value,P.columnDefs&&!rt.isEqual(P.columnDefs,G.columnDefs)){const U=N=>!("children"in N),R=(((Y=P.columnDefs)==null?void 0:Y.filter(U))??[]).map(N=>N.colId).filter(N=>N!==void 0).filter(N=>N!==Un).map(N=>uh(N))??[];d("columnsChanged",R)}!rt.isEqual(P.loadingOverlayComponentParams,G.loadingOverlayComponentParams)&&P.loading&&((F=v.value)==null||F.setGridOption("loading",!1),r.nextTick(()=>{var U;return(U=v.value)==null?void 0:U.setGridOption("loading",!0)}))}},{immediate:!0});const A=(P,G)=>{var F;const Y=w.value;if(Y[P]!==G)return Y[P]=G,w.value=Y,(F=v.value)==null?void 0:F.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let S;return r.watch(()=>[v.value,c.value],async P=>{var U,z;const[G,Y]=P;if(!G||rt.isEqual(Y,S))return;S=Y;const F=Y==null?void 0:Y.sourceType;switch(F){case void 0:return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(Y!=null&&Y.pTable))return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const R=await NV(Ts().pFrameDriver,Y.pTable,Y.sheets??[],!!l.clientSideModel||!!i.value,(z=(U=h.value)==null?void 0:U.columnVisibility)==null?void 0:z.hiddenColIds,l.showCellButtonForAxisId);return G.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...R})}case"xsv":{if(!(Y==null?void 0:Y.xsvFile))return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});Ts().blobDriver;const N=await mV();return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...N})}default:throw Error(`unsupported source type: ${F}`)}}),(P,G)=>{var Y;return r.openBlock(),r.createElementBlock("div",LV,[v.value&&P.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(yh),{key:0,api:v.value},null,8,["api"])):r.createCommentVNode("",!0),v.value&&P.showExportButton?(r.openBlock(),r.createBlock(_h,{key:1,api:v.value},null,8,["api"])):r.createCommentVNode("",!0),((Y=r.unref(c))==null?void 0:Y.sourceType)==="ptable"&&r.unref(c).sheets&&r.unref(c).sheets.length>0?(r.openBlock(),r.createElementBlock("div",OV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c).sheets,(F,U)=>{var z,R;return r.openBlock(),r.createBlock(r.unref(Ep),{key:U,"model-value":w.value[m(F.axis)],options:F.options,prefix:(((R=(z=F.axis.annotations)==null?void 0:z["pl7.app/label"])==null?void 0:R.trim())??`Unlabeled axis ${U}`)+":","onUpdate:modelValue":N=>A(m(F.axis),N)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Zg.AgGridVue),{key:H.value,theme:r.unref(Zu),class:"ap-ag-data-table-grid","grid-options":O.value,onGridReady:M,onStateUpdated:Z,onGridPreDestroyed:V},null,8,["theme","grid-options"]))])}}}),[["__scopeId","data-v-6b8d469d"]]),$V={key:1,class:"alert-error"},GV={key:2},zV=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(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),o.value?(r.openBlock(),r.createElementBlock("div",$V,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",GV,"Unresolved")):r.createCommentVNode("",!0)]))}}),UV={style:{height:"100%"}},ZV=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",UV,[r.createVNode(r.unref(Xp),{"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":o.value,progress:l.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),WV={class:"pl-ag-cell-status-tag d-flex align-center"},jV=r.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(t){return(e,n)=>{var o;return r.openBlock(),r.createElementBlock("div",WV,[r.createVNode(r.unref(Bp),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});var sc={exports:{}};const HV="2.0.0",Ch=256,qV=Number.MAX_SAFE_INTEGER||9007199254740991,KV=16,YV=Ch-6;var Qs={MAX_LENGTH:Ch,MAX_SAFE_COMPONENT_LENGTH:KV,MAX_SAFE_BUILD_LENGTH:YV,MAX_SAFE_INTEGER:qV,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:HV,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ea=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=Qs,l=ea;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",i],[y,o]],v=O=>{for(const[M,x]of w)O=O.split(`${M}*`).join(`${M}{0,${x}}`).split(`${M}+`).join(`${M}{1,${x}}`);return O},T=(O,M,x)=>{const Z=v(M),V=m++;l(O,V,M),h[O]=V,p[V]=M,c[V]=new RegExp(M,x?"g":void 0),d[V]=new RegExp(Z,x?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*"),T("NUMERICIDENTIFIERLOOSE","\\d+"),T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),T("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),T("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),T("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),T("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),T("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),T("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),T("BUILDIDENTIFIER",`${y}+`),T("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),T("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),T("FULL",`^${p[h.FULLPLAIN]}$`),T("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),T("LOOSE",`^${p[h.LOOSEPLAIN]}$`),T("GTLT","((?:<|>)?=?)"),T("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),T("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),T("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),T("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),T("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),T("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),T("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),T("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),T("COERCERTL",p[h.COERCE],!0),T("COERCERTLFULL",p[h.COERCEFULL],!0),T("LONETILDE","(?:~>?)"),T("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",T("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),T("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),T("LONECARET","(?:\\^)"),T("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",T("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),T("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),T("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),T("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),T("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",T("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),T("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),T("STAR","(<|>)?=?\\s*\\*"),T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(sc,sc.exports);var Ui=sc.exports;const XV=Object.freeze({loose:!0}),JV=Object.freeze({});var ac=t=>t?typeof t!="object"?XV:t:JV;const vh=/^[0-9]+$/,wh=(t,e)=>{const n=vh.test(t),o=vh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var bh={compareIdentifiers:wh,rcompareIdentifiers:(t,e)=>wh(e,t)};const ta=ea,{MAX_LENGTH:xh,MAX_SAFE_INTEGER:na}=Qs,{safeRe:kh,t:Sh}=Ui,QV=ac,{compareIdentifiers:Ao}=bh;var Bt=class qn{constructor(e,n){if(n=QV(n),e instanceof qn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>xh)throw new TypeError(`version is longer than ${xh} characters`);ta("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?kh[Sh.LOOSE]:kh[Sh.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>na||this.major<0)throw new TypeError("Invalid major version");if(this.minor>na||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>na||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<na)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ta("SemVer.compare",this.version,this.options,e),!(e instanceof qn)){if(typeof e=="string"&&e===this.version)return 0;e=new qn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof qn||(e=new qn(e,this.options)),Ao(this.major,e.major)||Ao(this.minor,e.minor)||Ao(this.patch,e.patch)}comparePre(e){if(e instanceof qn||(e=new qn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(ta("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Ao(o,i)}while(++n)}compareBuild(e){e instanceof qn||(e=new qn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(ta("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Ao(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),Ao(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Eh=Bt;var Bo=(t,e,n=!1)=>{if(t instanceof Eh)return t;try{return new Eh(t,e)}catch(o){if(!n)return null;throw o}};const eA=Bo;var tA=(t,e)=>{const n=eA(t,e);return n?n.version:null};const nA=Bo;var rA=(t,e)=>{const n=nA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const Th=Bt;var oA=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new Th(t instanceof Th?t.version:t,n).inc(e,o,i).version}catch{return null}};const Nh=Bo;var iA=(t,e)=>{const n=Nh(t,null,!0),o=Nh(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const sA=Bt;var aA=(t,e)=>new sA(t,e).major;const lA=Bt;var cA=(t,e)=>new lA(t,e).minor;const dA=Bt;var uA=(t,e)=>new dA(t,e).patch;const pA=Bo;var hA=(t,e)=>{const n=pA(t,e);return n&&n.prerelease.length?n.prerelease:null};const Vh=Bt;var _n=(t,e,n)=>new Vh(t,n).compare(new Vh(e,n));const fA=_n;var mA=(t,e,n)=>fA(e,t,n);const gA=_n;var yA=(t,e)=>gA(t,e,!0);const Ah=Bt;var lc=(t,e,n)=>{const o=new Ah(t,n),i=new Ah(e,n);return o.compare(i)||o.compareBuild(i)};const _A=lc;var CA=(t,e)=>t.sort((n,o)=>_A(n,o,e));const vA=lc;var wA=(t,e)=>t.sort((n,o)=>vA(o,n,e));const bA=_n;var ra=(t,e,n)=>bA(t,e,n)>0;const xA=_n;var cc=(t,e,n)=>xA(t,e,n)<0;const kA=_n;var Bh=(t,e,n)=>kA(t,e,n)===0;const SA=_n;var Ph=(t,e,n)=>SA(t,e,n)!==0;const EA=_n;var dc=(t,e,n)=>EA(t,e,n)>=0;const TA=_n;var uc=(t,e,n)=>TA(t,e,n)<=0;const NA=Bh,VA=Ph,AA=ra,BA=dc,PA=cc,RA=uc;var Rh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return NA(t,n,o);case"!=":return VA(t,n,o);case">":return AA(t,n,o);case">=":return BA(t,n,o);case"<":return PA(t,n,o);case"<=":return RA(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const DA=Bt,IA=Bo,{safeRe:oa,t:ia}=Ui;var FA=(t,e)=>{if(t instanceof DA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?oa[ia.COERCEFULL]:oa[ia.COERCE]);else{const p=e.includePrerelease?oa[ia.COERCERTLFULL]:oa[ia.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return IA(`${o}.${i}.${l}${c}${d}`,e)},LA=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},pc,Dh;function Cn(){if(Dh)return pc;Dh=1;const t=/\s+/g;class e{constructor($,j){if(j=i(j),$ instanceof e)return $.loose===!!j.loose&&$.includePrerelease===!!j.includePrerelease?$:new e($.raw,j);if($ instanceof l)return this.raw=$.value,this.set=[[$]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=$.trim().replace(t," "),this.set=this.raw.split("||").map(J=>this.parseRange(J.trim())).filter(J=>J.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const J=this.set[0];if(this.set=this.set.filter(ne=>!O(ne[0])),this.set.length===0)this.set=[J];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&M(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let $=0;$<this.set.length;$++){$>0&&(this.formatted+="||");const j=this.set[$];for(let J=0;J<j.length;J++)J>0&&(this.formatted+=" "),this.formatted+=j[J].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange($){const J=((this.options.includePrerelease&&v)|(this.options.loose&&T))+":"+$,ne=o.get(J);if(ne)return ne;const de=this.options.loose,me=de?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];$=$.replace(me,z(this.options.includePrerelease)),c("hyphen replace",$),$=$.replace(p[h.COMPARATORTRIM],m),c("comparator trim",$),$=$.replace(p[h.TILDETRIM],y),c("tilde trim",$),$=$.replace(p[h.CARETTRIM],w),c("caret trim",$);let Te=$.split(" ").map(qe=>Z(qe,this.options)).join(" ").split(/\s+/).map(qe=>U(qe,this.options));de&&(Te=Te.filter(qe=>(c("loose invalid filter",qe,this.options),!!qe.match(p[h.COMPARATORLOOSE])))),c("range list",Te);const Se=new Map,je=Te.map(qe=>new l(qe,this.options));for(const qe of je){if(O(qe))return[qe];Se.set(qe.value,qe)}Se.size>1&&Se.has("")&&Se.delete("");const Dt=[...Se.values()];return o.set(J,Dt),Dt}intersects($,j){if(!($ instanceof e))throw new TypeError("a Range is required");return this.set.some(J=>x(J,j)&&$.set.some(ne=>x(ne,j)&&J.every(de=>ne.every(me=>de.intersects(me,j)))))}test($){if(!$)return!1;if(typeof $=="string")try{$=new d($,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(R(this.set[j],$,this.options))return!0;return!1}}pc=e;const n=LA,o=new n,i=ac,l=sa(),c=ea,d=Bt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:w}=Ui,{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:T}=Qs,O=N=>N.value==="<0.0.0-0",M=N=>N.value==="",x=(N,$)=>{let j=!0;const J=N.slice();let ne=J.pop();for(;j&&J.length;)j=J.every(de=>ne.intersects(de,$)),ne=J.pop();return j},Z=(N,$)=>(c("comp",N,$),N=S(N,$),c("caret",N),N=H(N,$),c("tildes",N),N=G(N,$),c("xrange",N),N=F(N,$),c("stars",N),N),V=N=>!N||N.toLowerCase()==="x"||N==="*",H=(N,$)=>N.trim().split(/\s+/).map(j=>A(j,$)).join(" "),A=(N,$)=>{const j=$.loose?p[h.TILDELOOSE]:p[h.TILDE];return N.replace(j,(J,ne,de,me,Te)=>{c("tilde",N,J,ne,de,me,Te);let Se;return V(ne)?Se="":V(de)?Se=`>=${ne}.0.0 <${+ne+1}.0.0-0`:V(me)?Se=`>=${ne}.${de}.0 <${ne}.${+de+1}.0-0`:Te?(c("replaceTilde pr",Te),Se=`>=${ne}.${de}.${me}-${Te} <${ne}.${+de+1}.0-0`):Se=`>=${ne}.${de}.${me} <${ne}.${+de+1}.0-0`,c("tilde return",Se),Se})},S=(N,$)=>N.trim().split(/\s+/).map(j=>P(j,$)).join(" "),P=(N,$)=>{c("caret",N,$);const j=$.loose?p[h.CARETLOOSE]:p[h.CARET],J=$.includePrerelease?"-0":"";return N.replace(j,(ne,de,me,Te,Se)=>{c("caret",N,ne,de,me,Te,Se);let je;return V(de)?je="":V(me)?je=`>=${de}.0.0${J} <${+de+1}.0.0-0`:V(Te)?de==="0"?je=`>=${de}.${me}.0${J} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.0${J} <${+de+1}.0.0-0`:Se?(c("replaceCaret pr",Se),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}-${Se} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}-${Se} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te}-${Se} <${+de+1}.0.0-0`):(c("no pr"),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}${J} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}${J} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te} <${+de+1}.0.0-0`),c("caret return",je),je})},G=(N,$)=>(c("replaceXRanges",N,$),N.split(/\s+/).map(j=>Y(j,$)).join(" ")),Y=(N,$)=>{N=N.trim();const j=$.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return N.replace(j,(J,ne,de,me,Te,Se)=>{c("xRange",N,J,ne,de,me,Te,Se);const je=V(de),Dt=je||V(me),qe=Dt||V(Te),Zn=qe;return ne==="="&&Zn&&(ne=""),Se=$.includePrerelease?"-0":"",je?ne===">"||ne==="<"?J="<0.0.0-0":J="*":ne&&Zn?(Dt&&(me=0),Te=0,ne===">"?(ne=">=",Dt?(de=+de+1,me=0,Te=0):(me=+me+1,Te=0)):ne==="<="&&(ne="<",Dt?de=+de+1:me=+me+1),ne==="<"&&(Se="-0"),J=`${ne+de}.${me}.${Te}${Se}`):Dt?J=`>=${de}.0.0${Se} <${+de+1}.0.0-0`:qe&&(J=`>=${de}.${me}.0${Se} <${de}.${+me+1}.0-0`),c("xRange return",J),J})},F=(N,$)=>(c("replaceStars",N,$),N.trim().replace(p[h.STAR],"")),U=(N,$)=>(c("replaceGTE0",N,$),N.trim().replace(p[$.includePrerelease?h.GTE0PRE:h.GTE0],"")),z=N=>($,j,J,ne,de,me,Te,Se,je,Dt,qe,Zn)=>(V(J)?j="":V(ne)?j=`>=${J}.0.0${N?"-0":""}`:V(de)?j=`>=${J}.${ne}.0${N?"-0":""}`:me?j=`>=${j}`:j=`>=${j}${N?"-0":""}`,V(je)?Se="":V(Dt)?Se=`<${+je+1}.0.0-0`:V(qe)?Se=`<${je}.${+Dt+1}.0-0`:Zn?Se=`<=${je}.${Dt}.${qe}-${Zn}`:N?Se=`<${je}.${Dt}.${+qe+1}-0`:Se=`<=${Se}`,`${j} ${Se}`.trim()),R=(N,$,j)=>{for(let J=0;J<N.length;J++)if(!N[J].test($))return!1;if($.prerelease.length&&!j.includePrerelease){for(let J=0;J<N.length;J++)if(c(N[J].semver),N[J].semver!==l.ANY&&N[J].semver.prerelease.length>0){const ne=N[J].semver;if(ne.major===$.major&&ne.minor===$.minor&&ne.patch===$.patch)return!0}return!1}return!0};return pc}var hc,Ih;function sa(){if(Ih)return hc;Ih=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],w=m.match(y);if(!w)throw new TypeError(`Invalid comparator: ${m}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new d(w[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}hc=e;const n=ac,{safeRe:o,t:i}=Ui,l=Rh,c=ea,d=Bt,p=Cn();return hc}const OA=Cn();var aa=(t,e,n)=>{try{e=new OA(e,n)}catch{return!1}return e.test(t)};const MA=Cn();var $A=(t,e)=>new MA(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const GA=Bt,zA=Cn();var UA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new zA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new GA(o,n))}),o};const ZA=Bt,WA=Cn();var jA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new WA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new ZA(o,n))}),o};const fc=Bt,HA=Cn(),Fh=ra;var qA=(t,e)=>{t=new HA(t,e);let n=new fc("0.0.0");if(t.test(n)||(n=new fc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new fc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||Fh(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||Fh(n,l))&&(n=l)}return n&&t.test(n)?n:null};const KA=Cn();var YA=(t,e)=>{try{return new KA(t,e).range||"*"}catch{return null}};const XA=Bt,Lh=sa(),{ANY:JA}=Lh,QA=Cn(),eB=aa,Oh=ra,Mh=cc,tB=uc,nB=dc;var mc=(t,e,n,o)=>{t=new XA(t,o),e=new QA(e,o);let i,l,c,d,p;switch(n){case">":i=Oh,l=tB,c=Mh,d=">",p=">=";break;case"<":i=Mh,l=nB,c=Oh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(eB(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,w=null;if(m.forEach(v=>{v.semver===JA&&(v=new Lh(">=0.0.0")),y=y||v,w=w||v,i(v.semver,y.semver,o)?y=v:c(v.semver,w.semver,o)&&(w=v)}),y.operator===d||y.operator===p||(!w.operator||w.operator===d)&&l(t,w.semver))return!1;if(w.operator===p&&c(t,w.semver))return!1}return!0};const rB=mc;var oB=(t,e,n)=>rB(t,e,">",n);const iB=mc;var sB=(t,e,n)=>iB(t,e,"<",n);const $h=Cn();var aB=(t,e,n)=>(t=new $h(t,n),e=new $h(e,n),t.intersects(e,n));const lB=aa,cB=_n;var dB=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>cB(m,y,n));for(const m of c)lB(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Gh=Cn(),gc=sa(),{ANY:yc}=gc,Zi=aa,_c=_n,uB=(t,e,n={})=>{if(t===e)return!0;t=new Gh(t,n),e=new Gh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=hB(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},pB=[new gc(">=0.0.0-0")],zh=[new gc(">=0.0.0")],hB=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===yc){if(e.length===1&&e[0].semver===yc)return!0;n.includePrerelease?t=pB:t=zh}if(e.length===1&&e[0].semver===yc){if(n.includePrerelease)return!0;e=zh}const o=new Set;let i,l;for(const v of t)v.operator===">"||v.operator===">="?i=Uh(i,v,n):v.operator==="<"||v.operator==="<="?l=Zh(l,v,n):o.add(v.semver);if(o.size>1)return null;let c;if(i&&l){if(c=_c(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const v of o){if(i&&!Zi(v,String(i),n)||l&&!Zi(v,String(l),n))return null;for(const T of e)if(!Zi(v,String(T),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,w=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const v of e){if(m=m||v.operator===">"||v.operator===">=",h=h||v.operator==="<"||v.operator==="<=",i){if(w&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===w.major&&v.semver.minor===w.minor&&v.semver.patch===w.patch&&(w=!1),v.operator===">"||v.operator===">="){if(d=Uh(i,v,n),d===v&&d!==i)return!1}else if(i.operator===">="&&!Zi(i.semver,String(v),n))return!1}if(l){if(y&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===y.major&&v.semver.minor===y.minor&&v.semver.patch===y.patch&&(y=!1),v.operator==="<"||v.operator==="<="){if(p=Zh(l,v,n),p===v&&p!==l)return!1}else if(l.operator==="<="&&!Zi(l.semver,String(v),n))return!1}if(!v.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||w||y)},Uh=(t,e,n)=>{if(!t)return e;const o=_c(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Zh=(t,e,n)=>{if(!t)return e;const o=_c(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var fB=uB;const Cc=Ui,Wh=Qs,mB=Bt,jh=bh,gB=Bo,yB=tA,_B=rA,CB=oA,vB=iA,wB=aA,bB=cA,xB=uA,kB=hA,SB=_n,EB=mA,TB=yA,NB=lc,VB=CA,AB=wA,BB=ra,PB=cc,RB=Bh,DB=Ph,IB=dc,FB=uc,LB=Rh,OB=FA,MB=sa(),$B=Cn();var GB={parse:gB,valid:yB,clean:_B,inc:CB,diff:vB,major:wB,minor:bB,patch:xB,prerelease:kB,compare:SB,rcompare:EB,compareLoose:TB,compareBuild:NB,sort:VB,rsort:AB,gt:BB,lt:PB,eq:RB,neq:DB,gte:IB,lte:FB,cmp:LB,coerce:OB,Comparator:MB,Range:$B,satisfies:aa,toComparators:$A,maxSatisfying:UA,minSatisfying:jA,minVersion:qA,validRange:YA,outside:mc,gtr:oB,ltr:sB,intersects:aB,simplifyRange:dB,subset:fB,SemVer:mB,re:Cc.re,src:Cc.src,tokens:Cc.t,SEMVER_SPEC_VERSION:Wh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Wh.RELEASE_TYPES,compareIdentifiers:jh.compareIdentifiers,rcompareIdentifiers:jh.rcompareIdentifiers};const zB=ou(GB);function UB(t){return dr(t.id)}function ZB(t){switch(t){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${t}`)}}const WB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],jB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Hh(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function HB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function qh(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function qB(t,e){return{columnId:t.columnId,filter:qh(e,HB(t.filter)),disabled:t.disabled}}function vc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Kh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function KB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function YB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=rt.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function XB(t,e){var i,l;const n=zB.gt(Ts().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const JB={class:"d-flex flex-column gap-24"},Yh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",JB,[r.createVNode(r.unref(xo),{"model-value":e.value.filter.type,options:r.unref(i),disabled:l.disabled,label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(qB)(e.value,d))},null,8,["model-value","options","disabled"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(qr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),disabled:l.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(qr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),disabled:l.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(qr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Kh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(qr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:r.unref(KB),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(qr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Kh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Qp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,disabled:l.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),disabled:l.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(xo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),disabled:l.disabled,options:r.unref(YB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):r.createCommentVNode("",!0)]))}}),QB={class:"d-flex flex-column gap-24"},eP={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},tP=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,w=>{w?h.value=o.makeFilter(w):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(w,v)=>(r.openBlock(),r.createBlock(r.unref($s),{modelValue:n.value,"onUpdate:modelValue":v[2]||(v[2]=T=>n.value=T),"close-on-outside-click":!1},{title:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Fs),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>v[4]||(v[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(jr),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>v[5]||(v[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",QB,[r.createVNode(r.unref(xo),{modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=T=>p.value=T),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",eP,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Yh,{key:1,modelValue:h.value,"onUpdate:modelValue":v[1]||(v[1]=T=>h.value=T),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),nP=["onClick"],rP={class:"pl-filter-manager__expand-icon"},oP={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},iP={class:"pl-filter-manager__actions d-flex gap-12"},sP=["onClick"],aP=["onClick"],lP={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},cP={class:"d-flex justify-center"},dP=["onClick"],uP={class:"pl-filter-manager__add-btn-icon"},pP={key:0},hP=r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const F=o.value.filter(z=>{const R=z.type;switch(R){case"axis":return z.spec.type!=="Bytes";case"column":return z.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${R}`)}}),U={};for(const z of F)U[UB(z)]=z;return U}),d=r.computed(()=>{const F=i.value??[],U={};for(const[z,R]of Object.entries(c.value)){const N=rt.find(F,$=>rt.isEqual($.column.id,R.id));N&&(U[z]=N.allowedFilterTypes)}return U}),p=r.computed(()=>{const F=l.value??[],U={};for(const[z,R]of Object.entries(c.value)){const N=rt.find(F,$=>rt.isEqual($.column.id,R.id));N&&(U[z]={columnId:z,filter:N.default,disabled:!1})}return U});(()=>{const F=e.value.state;typeof F=="object"&&!Array.isArray(F)&&(e.value.state=Object.entries(F).map(([U,z])=>({columnId:U,filter:z,disabled:!1})))})();const h=F=>F??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,F=>{rt.isEqual(m.state,F.state)||(m.state=h(F.state))}),r.watch(()=>m,F=>{rt.isEqual(F.state,e.value.state)||(e.value={state:rt.cloneDeep(F.state),filters:F.state.filter(U=>!U.disabled).map(U=>{const z=c.value[U.columnId],{spec:R,...N}=z;return{type:"bySingleColumnV2",column:N,predicate:XB(z,U.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,F=>{Object.keys(F).length===0&&m.state!==void 0||(m.state=m.state.filter(U=>!!F[U.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),w=r.computed(()=>{const F=d.value,U={};for(const[z,R]of Object.entries(c.value)){let $=(R.type==="column"?R.spec.valueType:R.spec.type)==="String"?jB:WB;const j=F[z];j&&($=$.filter(J=>j.includes(J))),U[z]=$.map(J=>({value:J,text:ZB(J)}))}return U}),v=r.computed(()=>rt.some(Object.values(w.value),F=>F.length>0)),T=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([F,[U,z]])=>w.value[U].length>0).filter(([F,[U,z]])=>!m.state.some(R=>R.columnId===U)).map(([F,[U,z]])=>({label:Hh(z,F),value:U}))),O=F=>p.value[F]??{columnId:F,filter:qh(w.value[F][0].value),disabled:!1},M=F=>{m.state[F]=O(m.state[F].columnId)},x=F=>m.state.splice(F,1),Z=r.ref(!1),V=r.ref(!1),H=r.ref(!1);r.onMounted(()=>{H.value=!0});const A=r.reactive({}),S=F=>{A[F]?delete A[F]:A[F]=!0},P=r.ref(!1),G=r.ref();let Y;return r.onMounted(()=>{Y=new ResizeObserver(()=>{var U;const F=(U=G.value)==null?void 0:U.parentElement;F&&(P.value=F.scrollHeight>F.clientHeight||F.scrollWidth>F.clientWidth)}),G.value&&G.value.parentElement&&Y.observe(G.value.parentElement)}),r.watch(G,(F,U)=>{U!=null&&U.parentElement&&Y.unobserve(U.parentElement),F!=null&&F.parentElement&&Y.observe(F.parentElement)}),r.onBeforeUnmount(()=>{Y!==void 0&&Y.disconnect()}),(F,U)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[H.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(Js)}`},[r.createVNode(r.unref(jr),{onClick:U[0]||(U[0]=r.withModifiers(z=>Z.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Os),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[U[5]||(U[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref($s),{modelValue:Z.value,"onUpdate:modelValue":U[2]||(U[2]=z=>Z.value=z),"close-on-outside-click":!1},{title:r.withCtx(()=>U[6]||(U[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"filterManager",ref:G,class:"pl-filter-manager d-flex flex-column gap-6"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(z,R)=>(r.openBlock(),r.createElementBlock("div",{key:z.columnId,class:r.normalizeClass([{open:A[z.columnId],disabled:z.disabled},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:N=>S(z.columnId)},[r.createElementVNode("div",rP,[r.createVNode(r.unref(Wt),{name:"chevron-right"})]),r.createElementVNode("div",oP,r.toDisplayString(r.unref(Hh)(c.value[z.columnId],R)),1),r.createElementVNode("div",iP,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(N=>z.disabled=!z.disabled,["stop"])},[r.createVNode(r.unref(ut),{name:z.disabled?"view-hide":"view-show"},null,8,["name"])],8,sP),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(N=>x(R),["stop"])},[r.createVNode(r.unref(ut),{name:"close"})],8,aP)])],8,nP),r.createElementVNode("div",lP,[r.createVNode(Yh,{modelValue:m.state[R],"onUpdate:modelValue":N=>m.state[R]=N,disabled:z.disabled,column:c.value[z.columnId],options:w.value[z.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),r.createElementVNode("div",cP,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:z.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:N=>M(R)},[U[7]||(U[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(ut),{name:"reverse"})],10,dP)])])],2))),128)),r.createElementVNode("div",{class:r.normalizeClass([{"pt-24":P.value},"pl-filter-manager__add-action-wrapper"])},[T.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:U[1]||(U[1]=z=>V.value=!0)},[r.createElementVNode("div",uP,[r.createVNode(r.unref(Wt),{name:"add"})]),U[8]||(U[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):r.createCommentVNode("",!0)],2),v.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",pP,"No filters applicable"))],512)]),_:1},8,["modelValue"]),r.createVNode(tP,{modelValue:V.value,"onUpdate:modelValue":U[3]||(U[3]=z=>V.value=z),"columns-by-id":c.value,"column-options":T.value,"filter-options":w.value,"make-filter":O,onAddFilter:U[4]||(U[4]=z=>m.state.push(z))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),la=new Map;function fP(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{la.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function mP(t){const e=Symbol();return()=>(la.has(e)||la.set(e,fP(e,t)),la.get(e))}function gP(t){return r.computed(()=>{try{return su(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function yP(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Kg(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Po=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Xh=new Set,wc=typeof process=="object"&&process?process:{},Jh=(t,e,n,o)=>{typeof wc.emitWarning=="function"?wc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let ca=globalThis.AbortController,Qh=globalThis.AbortSignal;if(typeof ca>"u"){Qh=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},ca=class{constructor(){Ze(this,"signal",new Qh);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((tf=wc.env)==null?void 0:tf.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Jh("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 _P=t=>!Xh.has(t),Vr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),ef=t=>Vr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?da:null:null;class da extends Array{constructor(e){super(e),this.fill(0)}}const Jr=class Jr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(Jr,Ro))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=ef(e);if(!n)return[];ye(Jr,Ro,!0);const o=new Jr(e,n);return ye(Jr,Ro,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Ro=new WeakMap,ze(Jr,Ro,!1);let bc=Jr;const Sc=class Sc{constructor(e){ze(this,re);ze(this,vn);ze(this,Ht);ze(this,wn);ze(this,bn);ze(this,Do);ze(this,Io);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");ze(this,pt);ze(this,xn);ze(this,dt);ze(this,Xe);ze(this,ke);ze(this,Pt);ze(this,qt);ze(this,Et);ze(this,gt);ze(this,kn);ze(this,yt);ze(this,Sn);ze(this,En);ze(this,Kt);ze(this,Tn);ze(this,Ar);ze(this,Rt);ze(this,Qr,()=>{});ze(this,Qn,()=>{});ze(this,Wi,()=>{});ze(this,Yt,()=>!1);ze(this,eo,e=>{});ze(this,Fo,(e,n,o)=>{});ze(this,ji,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,nf,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:w,maxSize:v=0,maxEntrySize:T=0,sizeCalculation:O,fetchMethod:M,memoMethod:x,noDeleteOnFetchRejection:Z,noDeleteOnStaleGet:V,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:A,ignoreFetchAbort:S}=e;if(n!==0&&!Vr(n))throw new TypeError("max option must be a nonnegative integer");const P=n?ef(n):Array;if(!P)throw new Error("invalid max value: "+n);if(ye(this,vn,n),ye(this,Ht,v),this.maxEntrySize=T||b(this,Ht),this.sizeCalculation=O,this.sizeCalculation){if(!b(this,Ht)&&!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(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Io,x),M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Do,M),ye(this,Ar,!!M),ye(this,dt,new Map),ye(this,Xe,new Array(n).fill(void 0)),ye(this,ke,new Array(n).fill(void 0)),ye(this,Pt,new P(n)),ye(this,qt,new P(n)),ye(this,Et,0),ye(this,gt,0),ye(this,kn,bc.create(n)),ye(this,pt,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,yt,[])):(ye(this,bn,void 0),ye(this,yt,void 0)),ye(this,Tn,!!b(this,wn)),ye(this,Rt,!!b(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!Z,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(b(this,Ht)!==0&&!Vr(b(this,Ht)))throw new TypeError("maxSize must be a positive integer if specified");if(!Vr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,Og).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!V,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Vr(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Vr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,qd).call(this)}if(b(this,vn)===0&&this.ttl===0&&b(this,Ht)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,vn)&&!b(this,Ht)){const G="LRU_CACHE_UNBOUNDED";_P(G)&&(Xh.add(G),Jh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",G,Sc))}}static unsafeExposeInternals(e){return{starts:b(e,En),ttls:b(e,Kt),sizes:b(e,Sn),keyMap:b(e,dt),keyList:b(e,Xe),valList:b(e,ke),next:b(e,Pt),prev:b(e,qt),get head(){return b(e,Et)},get tail(){return b(e,gt)},free:b(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,Qe).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,ol).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ms).call(o,n)},indexes:n=>{var o;return ue(o=e,re,$r).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,Gr).call(o,n)},isStale:n=>{var o;return b(o=e,Yt).call(o,n)}}}get max(){return b(this,vn)}get maxSize(){return b(this,Ht)}get calculatedSize(){return b(this,xn)}get size(){return b(this,pt)}get fetchMethod(){return b(this,Do)}get memoMethod(){return b(this,Io)}get dispose(){return b(this,wn)}get disposeAfter(){return b(this,bn)}getRemainingTTL(e){return b(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,$r).call(this))b(this,ke)[e]!==void 0&&b(this,Xe)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield[b(this,Xe)[e],b(this,ke)[e]])}*rentries(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&b(this,Xe)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield[b(this,Xe)[e],b(this,ke)[e]])}*keys(){for(const e of ue(this,re,$r).call(this)){const n=b(this,Xe)[e];n!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,Gr).call(this)){const n=b(this,Xe)[e];n!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield n)}}*values(){for(const e of ue(this,re,$r).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}*rvalues(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}[(rf=Symbol.iterator,nf=Symbol.toStringTag,rf)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,$r).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,b(this,Xe)[o],this))return this.get(b(this,Xe)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,$r).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Xe)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,Gr).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Xe)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,Gr).call(this,{allowStale:!0}))b(this,Yt).call(this,n)&&(ue(this,re,zr).call(this,b(this,Xe)[n],"expire"),e=!0);return e}info(e){const n=b(this,dt).get(e);if(n===void 0)return;const o=b(this,ke)[n],i=ue(this,re,Qe).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(b(this,Kt)&&b(this,En)){const c=b(this,Kt)[n],d=b(this,En)[n];if(c&&d){const p=c-(Po.now()-d);l.ttl=p,l.start=Date.now()}}return b(this,Sn)&&(l.size=b(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,$r).call(this,{allowStale:!0})){const o=b(this,Xe)[n],i=b(this,ke)[n],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Kt)&&b(this,En)){c.ttl=b(this,Kt)[n];const d=Po.now()-b(this,En)[n];c.start=Math.floor(Date.now()-d)}b(this,Sn)&&(c.size=b(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Po.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var w,v,T,O,M;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=b(this,ji).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,zr).call(this,e,"set"),this;let y=b(this,pt)===0?void 0:b(this,dt).get(e);if(y===void 0)y=b(this,pt)===0?b(this,gt):b(this,kn).length!==0?b(this,kn).pop():b(this,pt)===b(this,vn)?ue(this,re,rl).call(this,!1):b(this,pt),b(this,Xe)[y]=e,b(this,ke)[y]=n,b(this,dt).set(e,y),b(this,Pt)[b(this,gt)]=y,b(this,qt)[y]=b(this,gt),ye(this,gt,y),nl(this,pt)._++,b(this,Fo).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ms).call(this,y);const x=b(this,ke)[y];if(n!==x){if(b(this,Ar)&&ue(this,re,Qe).call(this,x)){x.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:Z}=x;Z!==void 0&&!c&&(b(this,Tn)&&((w=b(this,wn))==null||w.call(this,Z,e,"set")),b(this,Rt)&&((v=b(this,yt))==null||v.push([Z,e,"set"])))}else c||(b(this,Tn)&&((T=b(this,wn))==null||T.call(this,x,e,"set")),b(this,Rt)&&((O=b(this,yt))==null||O.push([x,e,"set"])));if(b(this,eo).call(this,y),b(this,Fo).call(this,y,m,p),b(this,ke)[y]=n,p){p.set="replace";const Z=x&&ue(this,re,Qe).call(this,x)?x.__staleWhileFetching:x;Z!==void 0&&(p.oldValue=Z)}}else p&&(p.set="update")}if(i!==0&&!b(this,Kt)&&ue(this,re,qd).call(this),b(this,Kt)&&(h||b(this,Wi).call(this,y,i,l),p&&b(this,Qn).call(this,p,y)),!c&&b(this,Rt)&&b(this,yt)){const x=b(this,yt);let Z;for(;Z=x==null?void 0:x.shift();)(M=b(this,bn))==null||M.call(this,...Z)}return this}pop(){var e;try{for(;b(this,pt);){const n=b(this,ke)[b(this,Et)];if(ue(this,re,rl).call(this,!0),ue(this,re,Qe).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Rt)&&b(this,yt)){const n=b(this,yt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=b(this,dt).get(e);if(l!==void 0){const c=b(this,ke)[l];if(ue(this,re,Qe).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Yt).call(this,l))i&&(i.has="stale",b(this,Qn).call(this,i,l));else return o&&b(this,Qr).call(this,l),i&&(i.has="hit",b(this,Qn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=b(this,dt).get(e);if(i===void 0||!o&&b(this,Yt).call(this,i))return;const l=b(this,ke)[i];return ue(this,re,Qe).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:O,forceRefresh:M=!1,status:x,signal:Z}=n;if(!b(this,Ar))return x&&(x.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:x});const V={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:T,ignoreFetchAbort:v,status:x,signal:Z};let H=b(this,dt).get(e);if(H===void 0){x&&(x.fetch="miss");const A=ue(this,re,ol).call(this,e,H,V,O);return A.__returned=A}else{const A=b(this,ke)[H];if(ue(this,re,Qe).call(this,A)){const F=o&&A.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",F&&(x.returnedStale=!0)),F?A.__staleWhileFetching:A.__returned=A}const S=b(this,Yt).call(this,H);if(!M&&!S)return x&&(x.fetch="hit"),ue(this,re,ms).call(this,H),i&&b(this,Qr).call(this,H),x&&b(this,Qn).call(this,x,H),A;const P=ue(this,re,ol).call(this,e,H,V,O),Y=P.__staleWhileFetching!==void 0&&o;return x&&(x.fetch=S?"stale":"refresh",Y&&S&&(x.returnedStale=!0)),Y?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Io);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=b(this,dt).get(e);if(d!==void 0){const p=b(this,ke)[d],h=ue(this,re,Qe).call(this,p);return c&&b(this,Qn).call(this,c,d),b(this,Yt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,zr).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ms).call(this,d),i&&b(this,Qr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,zr).call(this,e,"delete")}clear(){return ue(this,re,Xd).call(this,"delete")}};vn=new WeakMap,Ht=new WeakMap,wn=new WeakMap,bn=new WeakMap,Do=new WeakMap,Io=new WeakMap,pt=new WeakMap,xn=new WeakMap,dt=new WeakMap,Xe=new WeakMap,ke=new WeakMap,Pt=new WeakMap,qt=new WeakMap,Et=new WeakMap,gt=new WeakMap,kn=new WeakMap,yt=new WeakMap,Sn=new WeakMap,En=new WeakMap,Kt=new WeakMap,Tn=new WeakMap,Ar=new WeakMap,Rt=new WeakMap,re=new WeakSet,qd=function(){const e=new da(b(this,vn)),n=new da(b(this,vn));ye(this,Kt,e),ye(this,En,n),ye(this,Wi,(l,c,d=Po.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Yt).call(this,l)&&ue(this,re,zr).call(this,b(this,Xe)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Qr,l=>{n[l]=e[l]!==0?Po.now():0}),ye(this,Qn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Po.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Yt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Qr=new WeakMap,Qn=new WeakMap,Wi=new WeakMap,Yt=new WeakMap,Og=function(){const e=new da(b(this,vn));ye(this,xn,0),ye(this,Sn,e),ye(this,eo,n=>{ye(this,xn,b(this,xn)-e[n]),e[n]=0}),ye(this,ji,(n,o,i,l)=>{if(ue(this,re,Qe).call(this,o))return 0;if(!Vr(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Vr(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}),ye(this,Fo,(n,o,i)=>{if(e[n]=o,b(this,Ht)){const l=b(this,Ht)-e[n];for(;b(this,xn)>l;)ue(this,re,rl).call(this,!0)}ye(this,xn,b(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=b(this,xn))})},eo=new WeakMap,Fo=new WeakMap,ji=new WeakMap,$r=function*({allowStale:e=this.allowStale}={}){if(b(this,pt))for(let n=b(this,gt);!(!ue(this,re,Kd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,Et)));)n=b(this,qt)[n]},Gr=function*({allowStale:e=this.allowStale}={}){if(b(this,pt))for(let n=b(this,Et);!(!ue(this,re,Kd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,gt)));)n=b(this,Pt)[n]},Kd=function(e){return e!==void 0&&b(this,dt).get(b(this,Xe)[e])===e},rl=function(e){var l,c;const n=b(this,Et),o=b(this,Xe)[n],i=b(this,ke)[n];return b(this,Ar)&&ue(this,re,Qe).call(this,i)?i.__abortController.abort(new Error("evicted")):(b(this,Tn)||b(this,Rt))&&(b(this,Tn)&&((l=b(this,wn))==null||l.call(this,i,o,"evict")),b(this,Rt)&&((c=b(this,yt))==null||c.push([i,o,"evict"]))),b(this,eo).call(this,n),e&&(b(this,Xe)[n]=void 0,b(this,ke)[n]=void 0,b(this,kn).push(n)),b(this,pt)===1?(ye(this,Et,ye(this,gt,0)),b(this,kn).length=0):ye(this,Et,b(this,Pt)[n]),b(this,dt).delete(o),nl(this,pt)._--,n},ol=function(e,n,o,i){const l=n===void 0?void 0:b(this,ke)[n];if(ue(this,re,Qe).call(this,l))return l;const c=new ca,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(O,M=!1)=>{const{aborted:x}=c.signal,Z=o.ignoreFetchAbort&&O!==void 0;if(o.status&&(x&&!M?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,Z&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),x&&!Z&&!M)return y(c.signal.reason);const V=v;return b(this,ke)[n]===v&&(O===void 0?V.__staleWhileFetching?b(this,ke)[n]=V.__staleWhileFetching:ue(this,re,zr).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,O,p.options))),O},m=O=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=O),y(O)),y=O=>{const{aborted:M}=c.signal,x=M&&o.allowStaleOnFetchAbort,Z=x||o.allowStaleOnFetchRejection,V=Z||o.noDeleteOnFetchRejection,H=v;if(b(this,ke)[n]===v&&(!V||H.__staleWhileFetching===void 0?ue(this,re,zr).call(this,e,"fetch"):x||(b(this,ke)[n]=H.__staleWhileFetching)),Z)return o.status&&H.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw O},w=(O,M)=>{var Z;const x=(Z=b(this,Do))==null?void 0:Z.call(this,e,l,p);x&&x instanceof Promise&&x.then(V=>O(V===void 0?void 0:V),M),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(O(void 0),o.allowStaleOnFetchAbort&&(O=V=>h(V,!0)))})};o.status&&(o.status.fetchDispatched=!0);const v=new Promise(w).then(h,m),T=Object.assign(v,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,T,{...p.options,status:void 0}),n=b(this,dt).get(e)):b(this,ke)[n]=T,T},Qe=function(e){if(!b(this,Ar))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof ca},Yd=function(e,n){b(this,qt)[n]=e,b(this,Pt)[e]=n},ms=function(e){e!==b(this,gt)&&(e===b(this,Et)?ye(this,Et,b(this,Pt)[e]):ue(this,re,Yd).call(this,b(this,qt)[e],b(this,Pt)[e]),ue(this,re,Yd).call(this,b(this,gt),e),ye(this,gt,e))},zr=function(e,n){var i,l,c,d;let o=!1;if(b(this,pt)!==0){const p=b(this,dt).get(e);if(p!==void 0)if(o=!0,b(this,pt)===1)ue(this,re,Xd).call(this,n);else{b(this,eo).call(this,p);const h=b(this,ke)[p];if(ue(this,re,Qe).call(this,h)?h.__abortController.abort(new Error("deleted")):(b(this,Tn)||b(this,Rt))&&(b(this,Tn)&&((i=b(this,wn))==null||i.call(this,h,e,n)),b(this,Rt)&&((l=b(this,yt))==null||l.push([h,e,n]))),b(this,dt).delete(e),b(this,Xe)[p]=void 0,b(this,ke)[p]=void 0,p===b(this,gt))ye(this,gt,b(this,qt)[p]);else if(p===b(this,Et))ye(this,Et,b(this,Pt)[p]);else{const m=b(this,qt)[p];b(this,Pt)[m]=b(this,Pt)[p];const y=b(this,Pt)[p];b(this,qt)[y]=b(this,qt)[p]}nl(this,pt)._--,b(this,kn).push(p)}}if(b(this,Rt)&&((c=b(this,yt))!=null&&c.length)){const p=b(this,yt);let h;for(;h=p==null?void 0:p.shift();)(d=b(this,bn))==null||d.call(this,...h)}return o},Xd=function(e){var n,o,i;for(const l of ue(this,re,Gr).call(this,{allowStale:!0})){const c=b(this,ke)[l];if(ue(this,re,Qe).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=b(this,Xe)[l];b(this,Tn)&&((n=b(this,wn))==null||n.call(this,c,d,e)),b(this,Rt)&&((o=b(this,yt))==null||o.push([c,d,e]))}}if(b(this,dt).clear(),b(this,ke).fill(void 0),b(this,Xe).fill(void 0),b(this,Kt)&&b(this,En)&&(b(this,Kt).fill(0),b(this,En).fill(0)),b(this,Sn)&&b(this,Sn).fill(0),ye(this,Et,0),ye(this,gt,0),b(this,kn).length=0,ye(this,xn,0),ye(this,pt,0),b(this,Rt)&&b(this,yt)){const l=b(this,yt);let c;for(;c=l==null?void 0:l.shift();)(i=b(this,bn))==null||i.call(this,...c)}};let xc=Sc;const CP={cacheSize:15e6};class vP{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 to=class to{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...CP,...e??{}};this.fileDataCache=new xc({maxSize:n.cacheSize,fetchMethod:async o=>new vP(await Ts().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.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 n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return to.globalInstance.getContentBytes(e)}static getContentString(e){return to.globalInstance.getContentString(e)}static getContentJson(e,n){return to.globalInstance.getContentJson(e,n)}};Ze(to,"globalInstance",new to);let kc=to;I.AgGridTheme=Zu,I.BlockLayout=dV,I.ContextProvider=KE,I.DataTable=A0,I.DemoData=KN,I.DropdownListItem=bo,I.DropdownOverlay=Hl,I.LongText=Wl,I.MultiError=_s,I.PlAccordion=Hk,I.PlAccordionSection=nS,I.PlAgCellFile=ZV,I.PlAgCellStatusTag=jV,I.PlAgColumnHeader=ih,I.PlAgCsvExporter=_h,I.PlAgDataTable=MV,I.PlAgDataTableRowNumberColId=Un,I.PlAgDataTableToolsPanel=RV,I.PlAgGridColumnManager=yh,I.PlAgOverlayLoading=rh,I.PlAgOverlayNoRows=oh,I.PlAgTextAndButtonCell=sh,I.PlAlert=aw,I.PlBlockPage=H0,I.PlBtnAccent=Sw,I.PlBtnDanger=Tw,I.PlBtnGhost=jr,I.PlBtnGroup=gp,I.PlBtnLink=Iw,I.PlBtnPrimary=Fs,I.PlBtnSecondary=Ml,I.PlBtnSplit=vw,I.PlCheckbox=rk,I.PlCheckboxGroup=ak,I.PlChip=ql,I.PlCloseModalBtn=Tp,I.PlContainer=K0,I.PlDialogModal=Yl,I.PlDropdown=xo,I.PlDropdownLegacy=Nx,I.PlDropdownLine=Ep,I.PlDropdownMulti=tk,I.PlDropdownRef=rx,I.PlEditableTitle=ib,I.PlFileDialog=Ip,I.PlFileInput=Xp,I.PlGrid=tw,I.PlIcon16=Hr,I.PlIcon24=Os,I.PlLogView=Vp,I.PlMaskIcon16=Wt,I.PlMaskIcon24=ut,I.PlNotificationAlert=Jp,I.PlNumberField=$x,I.PlProgressBar=Rx,I.PlRow=X0,I.PlSearchField=bp,I.PlSectionSeparator=Ap,I.PlSlideModal=$s,I.PlSpacer=fp,I.PlStatusTag=Bp,I.PlTableFilters=hP,I.PlTabs=Gk,I.PlTextArea=Gb,I.PlTextField=qr,I.PlToggleSwitch=Gs,I.PlTooltip=vt,I.ReactiveFileContent=kc,I.Scrollable=O1,I.Slider=Qp,I.SliderRange=D1,I.SliderRangeTriple=b1,I.ThemeSwitcher=$0,I.UnresolvedError=al,I.ValueOrErrorsComponent=zV,I.activateAgGrid=Uu,I.animate=lp,I.animateInfinite=I0,I.autoSizeRowNumberColumn=ch,I.call=rp,I.computedResult=gP,I.createModel=hl,I.debounce=cp,I.defineApp=iv,I.defineStore=mP,I.delay=op,I.detectOutside=zb,I.ensureError=dl,I.eventListener=jl,I.focusRow=gh,I.formatZodError=pl,I.getElementScrollPosition=Sp,I.identity=cl,I.isDefined=Qg,I.isElementVisible=kp,I.isJsonEqual=ll,I.isZodError=ul,I.listToOptions=F0,I.makeEaseInOut=D0,I.makeEaseOut=ap,I.makeOnceTracker=fh,I.makeRowNumberColDef=lh,I.maskIcons16=HN,I.maskIcons24=qN,I.normalizeListOptions=vr,I.notEmpty=Dl,I.randomInt=sp,I.randomString=R0,I.requestTick=Il,I.scrollIntoView=Ms,I.showContextMenu=Bl,I.throttle=dp,I.timeout=ip,I.trackFirstDataRendered=mh,I.unwrapOptionalResult=Jg,I.unwrapValueOrErrors=iu,I.useClickOutside=Ls,I.useDraggable=u1,I.useEventListener=st,I.useFormState=c1,I.useHover=tp,I.useInterval=l1,I.useLabelNotch=Xn,I.useLocalStorage=up,I.useMouse=ep,I.useMouseCapture=Cr,I.usePosition=bi,I.useQuery=d1,I.useResizeObserver=eh,I.useScroll=s1,I.useSdkPlugin=Nl,I.useSortable=nh,I.useTheme=hp,I.useWatchFetch=yP,I.wrapOptionalResult=su,I.wrapValueOrErrors=Xg,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
91
|
+
}`;var De=Ig(function(){return Ue(C,pe+"return "+Q).apply(n,E)});if(De.source=Q,Fd(De))throw De;return De}function yM(s){return We(s).toLowerCase()}function _M(s){return We(s).toUpperCase()}function CM(s,a,u){if(s=We(s),s&&(u||a===n))return Zf(s);if(!s||!(a=Qt(a)))return s;var f=An(s),g=An(a),C=Wf(f,g),E=jf(f,g)+1;return Mr(f,C,E).join("")}function vM(s,a,u){if(s=We(s),s&&(u||a===n))return s.slice(0,qf(s)+1);if(!s||!(a=Qt(a)))return s;var f=An(s),g=jf(f,An(a))+1;return Mr(f,0,g).join("")}function wM(s,a,u){if(s=We(s),s&&(u||a===n))return s.replace(Fc,"");if(!s||!(a=Qt(a)))return s;var f=An(s),g=Wf(f,An(a));return Mr(f,g).join("")}function bM(s,a){var u=F,f=Z;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Qt(a.omission):f}s=We(s);var C=s.length;if(Go(s)){var E=An(s);C=E.length}if(u>=C)return s;var B=u-zo(f);if(B<1)return f;var L=E?Mr(E,0,B).join(""):s.slice(0,B);if(g===n)return L+f;if(E&&(B+=L.length-B),Ld(g)){if(s.slice(B).search(g)){var K,X=L;for(g.global||(g=Qc(g.source,We(pf.exec(g))+"g")),g.lastIndex=0;K=g.exec(X);)var Q=K.index;L=L.slice(0,Q===n?B:Q)}}else if(s.indexOf(Qt(g),B)!=B){var oe=L.lastIndexOf(g);oe>-1&&(L=L.slice(0,oe))}return L+f}function xM(s){return s=We(s),s&&DP.test(s)?s.replace(cf,JR):s}var kM=Ko(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),$d=Fm("toUpperCase");function Dg(s,a,u){return s=We(s),a=u?n:a,a===n?HR(s)?tD(s):OR(s):s.match(a)||[]}var Ig=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Fd(u)?u:new Ee(u)}}),SM=ir(function(s,a){return on(a,function(u){u=Hn(u),rr(s,u,Dd(s[u],s))}),s});function EM(s){var a=s==null?0:s.length,u=ge();return s=a?et(s,function(f){if(typeof f[1]!="function")throw new sn(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var C=s[g];if(Xt(C[0],this,f))return Xt(C[1],this,f)}})}function TM(s){return JD(ln(s,y))}function Gd(s){return function(){return s}}function NM(s,a){return s==null||s!==s?a:s}var VM=Om(),AM=Om(!0);function Ut(s){return s}function zd(s){return fm(typeof s=="function"?s:ln(s,y))}function BM(s){return gm(ln(s,y))}function PM(s,a){return ym(s,ln(a,y))}var RM=Ie(function(s,a){return function(u){return ls(u,s,a)}}),DM=Ie(function(s,a){return function(u){return ls(s,u,a)}});function Ud(s,a,u){var f=_t(a),g=Fa(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Fa(a,_t(a)));var C=!(ot(u)&&"chain"in u)||!!u.chain,E=ar(s);return on(g,function(B){var L=a[B];s[B]=L,E&&(s.prototype[B]=function(){var K=this.__chain__;if(C||K){var X=s(this.__wrapped__),Q=X.__actions__=$t(this.__actions__);return Q.push({func:L,args:arguments,thisArg:s}),X.__chain__=K,X}return L.apply(s,Rr([this.value()],arguments))})}),s}function IM(){return wt._===this&&(wt._=aD),this}function Zd(){}function FM(s){return s=Be(s),Ie(function(a){return _m(a,s)})}var LM=wd(et),OM=wd(Mf),MM=wd(jc);function Fg(s){return Nd(s)?Hc(Hn(s)):mI(s)}function $M(s){return function(a){return s==null?n:lo(s,a)}}var GM=$m(),zM=$m(!0);function Wd(){return[]}function jd(){return!1}function UM(){return{}}function ZM(){return""}function WM(){return!0}function jM(s,a){if(s=Be(s),s<1||s>ne)return[];var u=Te,f=Tt(s,Te);a=ge(a),s-=Te;for(var g=Yc(f,a);++u<s;)a(u);return g}function HM(s){return Ne(s)?et(s,Hn):en(s)?[s]:$t(ng(We(s)))}function qM(s){var a=++iD;return We(s)+a}var KM=za(function(s,a){return s+a},0),YM=bd("ceil"),XM=za(function(s,a){return s/a},1),JM=bd("floor");function QM(s){return s&&s.length?Ia(s,Ut,ad):n}function e$(s,a){return s&&s.length?Ia(s,ge(a,2),ad):n}function t$(s){return zf(s,Ut)}function n$(s,a){return zf(s,ge(a,2))}function r$(s){return s&&s.length?Ia(s,Ut,ud):n}function o$(s,a){return s&&s.length?Ia(s,ge(a,2),ud):n}var i$=za(function(s,a){return s*a},1),s$=bd("round"),a$=za(function(s,a){return s-a},0);function l$(s){return s&&s.length?Kc(s,Ut):0}function c$(s,a){return s&&s.length?Kc(s,ge(a,2)):0}return _.after=BL,_.ary=hg,_.assign=_O,_.assignIn=Tg,_.assignInWith=tl,_.assignWith=CO,_.at=vO,_.before=fg,_.bind=Dd,_.bindAll=SM,_.bindKey=mg,_.castArray=UL,_.chain=dg,_.chunk=JI,_.compact=QI,_.concat=eF,_.cond=EM,_.conforms=TM,_.constant=Gd,_.countBy=lL,_.create=wO,_.curry=gg,_.curryRight=yg,_.debounce=_g,_.defaults=bO,_.defaultsDeep=xO,_.defer=PL,_.delay=RL,_.difference=tF,_.differenceBy=nF,_.differenceWith=rF,_.drop=oF,_.dropRight=iF,_.dropRightWhile=sF,_.dropWhile=aF,_.fill=lF,_.filter=dL,_.flatMap=hL,_.flatMapDeep=fL,_.flatMapDepth=mL,_.flatten=sg,_.flattenDeep=cF,_.flattenDepth=dF,_.flip=DL,_.flow=VM,_.flowRight=AM,_.fromPairs=uF,_.functions=AO,_.functionsIn=BO,_.groupBy=gL,_.initial=hF,_.intersection=fF,_.intersectionBy=mF,_.intersectionWith=gF,_.invert=RO,_.invertBy=DO,_.invokeMap=_L,_.iteratee=zd,_.keyBy=CL,_.keys=_t,_.keysIn=zt,_.map=Ka,_.mapKeys=FO,_.mapValues=LO,_.matches=BM,_.matchesProperty=PM,_.memoize=Xa,_.merge=OO,_.mergeWith=Ng,_.method=RM,_.methodOf=DM,_.mixin=Ud,_.negate=Ja,_.nthArg=FM,_.omit=MO,_.omitBy=$O,_.once=IL,_.orderBy=vL,_.over=LM,_.overArgs=FL,_.overEvery=OM,_.overSome=MM,_.partial=Id,_.partialRight=Cg,_.partition=wL,_.pick=GO,_.pickBy=Vg,_.property=Fg,_.propertyOf=$M,_.pull=vF,_.pullAll=lg,_.pullAllBy=wF,_.pullAllWith=bF,_.pullAt=xF,_.range=GM,_.rangeRight=zM,_.rearg=LL,_.reject=kL,_.remove=kF,_.rest=OL,_.reverse=Pd,_.sampleSize=EL,_.set=UO,_.setWith=ZO,_.shuffle=TL,_.slice=SF,_.sortBy=AL,_.sortedUniq=PF,_.sortedUniqBy=RF,_.split=hM,_.spread=ML,_.tail=DF,_.take=IF,_.takeRight=FF,_.takeRightWhile=LF,_.takeWhile=OF,_.tap=QF,_.throttle=$L,_.thru=qa,_.toArray=kg,_.toPairs=Ag,_.toPairsIn=Bg,_.toPath=HM,_.toPlainObject=Eg,_.transform=WO,_.unary=GL,_.union=MF,_.unionBy=$F,_.unionWith=GF,_.uniq=zF,_.uniqBy=UF,_.uniqWith=ZF,_.unset=jO,_.unzip=Rd,_.unzipWith=cg,_.update=HO,_.updateWith=qO,_.values=Jo,_.valuesIn=KO,_.without=WF,_.words=Dg,_.wrap=zL,_.xor=jF,_.xorBy=HF,_.xorWith=qF,_.zip=KF,_.zipObject=YF,_.zipObjectDeep=XF,_.zipWith=JF,_.entries=Ag,_.entriesIn=Bg,_.extend=Tg,_.extendWith=tl,Ud(_,_),_.add=KM,_.attempt=Ig,_.camelCase=QO,_.capitalize=Pg,_.ceil=YM,_.clamp=YO,_.clone=ZL,_.cloneDeep=jL,_.cloneDeepWith=HL,_.cloneWith=WL,_.conformsTo=qL,_.deburr=Rg,_.defaultTo=NM,_.divide=XM,_.endsWith=eM,_.eq=Pn,_.escape=tM,_.escapeRegExp=nM,_.every=cL,_.find=uL,_.findIndex=og,_.findKey=kO,_.findLast=pL,_.findLastIndex=ig,_.findLastKey=SO,_.floor=JM,_.forEach=ug,_.forEachRight=pg,_.forIn=EO,_.forInRight=TO,_.forOwn=NO,_.forOwnRight=VO,_.get=Od,_.gt=KL,_.gte=YL,_.has=PO,_.hasIn=Md,_.head=ag,_.identity=Ut,_.includes=yL,_.indexOf=pF,_.inRange=XO,_.invoke=IO,_.isArguments=po,_.isArray=Ne,_.isArrayBuffer=XL,_.isArrayLike=Gt,_.isArrayLikeObject=at,_.isBoolean=JL,_.isBuffer=$r,_.isDate=QL,_.isElement=eO,_.isEmpty=tO,_.isEqual=nO,_.isEqualWith=rO,_.isError=Fd,_.isFinite=oO,_.isFunction=ar,_.isInteger=vg,_.isLength=Qa,_.isMap=wg,_.isMatch=iO,_.isMatchWith=sO,_.isNaN=aO,_.isNative=lO,_.isNil=dO,_.isNull=cO,_.isNumber=bg,_.isObject=ot,_.isObjectLike=it,_.isPlainObject=fs,_.isRegExp=Ld,_.isSafeInteger=uO,_.isSet=xg,_.isString=el,_.isSymbol=en,_.isTypedArray=Xo,_.isUndefined=pO,_.isWeakMap=hO,_.isWeakSet=fO,_.join=yF,_.kebabCase=rM,_.last=dn,_.lastIndexOf=_F,_.lowerCase=oM,_.lowerFirst=iM,_.lt=mO,_.lte=gO,_.max=QM,_.maxBy=e$,_.mean=t$,_.meanBy=n$,_.min=r$,_.minBy=o$,_.stubArray=Wd,_.stubFalse=jd,_.stubObject=UM,_.stubString=ZM,_.stubTrue=WM,_.multiply=i$,_.nth=CF,_.noConflict=IM,_.noop=Zd,_.now=Ya,_.pad=sM,_.padEnd=aM,_.padStart=lM,_.parseInt=cM,_.random=JO,_.reduce=bL,_.reduceRight=xL,_.repeat=dM,_.replace=uM,_.result=zO,_.round=s$,_.runInContext=D,_.sample=SL,_.size=NL,_.snakeCase=pM,_.some=VL,_.sortedIndex=EF,_.sortedIndexBy=TF,_.sortedIndexOf=NF,_.sortedLastIndex=VF,_.sortedLastIndexBy=AF,_.sortedLastIndexOf=BF,_.startCase=fM,_.startsWith=mM,_.subtract=a$,_.sum=l$,_.sumBy=c$,_.template=gM,_.times=jM,_.toFinite=lr,_.toInteger=Be,_.toLength=Sg,_.toLower=yM,_.toNumber=un,_.toSafeInteger=yO,_.toString=We,_.toUpper=_M,_.trim=CM,_.trimEnd=vM,_.trimStart=wM,_.truncate=bM,_.unescape=xM,_.uniqueId=qM,_.upperCase=kM,_.upperFirst=$d,_.each=ug,_.eachRight=pg,_.first=ag,Ud(_,function(){var s={};return Wn(_,function(a,u){He.call(_.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),_.VERSION=o,on(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){_[s].placeholder=_}),on(["drop","take"],function(s,a){Le.prototype[s]=function(u){u=u===n?1:ft(Be(u),0);var f=this.__filtered__&&!a?new Le(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,Te),type:s+(f.__dir__<0?"Right":"")}),f},Le.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),on(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==N||u==H;Le.prototype[s]=function(g){var C=this.clone();return C.__iteratees__.push({iteratee:ge(g,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),on(["head","last"],function(s,a){var u="take"+(a?"Right":"");Le.prototype[s]=function(){return this[u](1).value()[0]}}),on(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[u](1)}}),Le.prototype.compact=function(){return this.filter(Ut)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Le(this):this.map(function(u){return ls(u,s,a)})}),Le.prototype.reject=function(s){return this.filter(Ja(ge(s)))},Le.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Le(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(Te)},Wn(Le.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=_[f?"take"+(a=="last"?"Right":""):a],C=f||/^find/.test(a);g&&(_.prototype[a]=function(){var E=this.__wrapped__,B=f?[1]:arguments,L=E instanceof Le,K=B[0],X=L||Ne(E),Q=function(Fe){var Oe=g.apply(_,Rr([Fe],B));return f&&oe?Oe[0]:Oe};X&&u&&typeof K=="function"&&K.length!=1&&(L=X=!1);var oe=this.__chain__,pe=!!this.__actions__.length,_e=C&&!oe,De=L&&!pe;if(!C&&X){E=De?E:new Le(this);var Ce=s.apply(E,B);return Ce.__actions__.push({func:qa,args:[Q],thisArg:n}),new an(Ce,oe)}return _e&&De?s.apply(this,B):(Ce=this.thru(Q),_e?f?Ce.value()[0]:Ce.value():Ce)})}),on(["pop","push","shift","sort","splice","unshift"],function(s){var a=va[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);_.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var C=this.value();return a.apply(Ne(C)?C:[],g)}return this[u](function(E){return a.apply(Ne(E)?E:[],g)})}}),Wn(Le.prototype,function(s,a){var u=_[a];if(u){var f=u.name+"";He.call(jo,f)||(jo[f]=[]),jo[f].push({name:a,func:u})}}),jo[Ga(n,V).name]=[{name:"wrapper",func:n}],Le.prototype.clone=xD,Le.prototype.reverse=kD,Le.prototype.value=SD,_.prototype.at=eL,_.prototype.chain=tL,_.prototype.commit=nL,_.prototype.next=rL,_.prototype.plant=iL,_.prototype.reverse=sL,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=aL,_.prototype.first=_.prototype.head,ts&&(_.prototype[ts]=oL),_},Uo=nD();ro?((ro.exports=Uo)._=Uo,zc._=Uo):wt._=Uo}).call(ei)}(Xs,Xs.exports);var rt=Xs.exports;const mV={class:"grid-overlay-container"},ih=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",mV,[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"},"No datasource",-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))]))}}),gV={},yV={class:"grid-overlay-container"};function _V(t,e){return r.openBlock(),r.createElementBlock("div",yV,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const sh=oc(gV,[["render",_V]]);async function CV(t,e){throw Error("not implemented")}const vV={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},ah=r.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(t){const e=t,n=r.computed(()=>{var m,y;const h=(y=(m=e.params.column.getUserProvidedColDef())==null?void 0:m.headerComponentParams)==null?void 0:y.type;switch(h){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";default:throw Error(`unsupported data type: ${h} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=r.ref(null),i=()=>o.value=e.params.column.getSort()??null;r.onMounted(()=>i());function l(){e.params.column.isSortable()&&(e.params.progressSort(),i())}const c=r.computed(()=>{const h=o.value;switch(h){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${h}. Column ${e.params.column.getColId()}`)}}),d=r.ref();function p(){const h=d.value;h&&e.params.showColumnMenu(h)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:l},[r.createElementVNode("div",vV,[r.createVNode(r.unref(Wt),{name:n.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),r.createElementVNode("span",null,r.toDisplayString(h.params.displayName),1),c.value?(r.openBlock(),r.createBlock(r.unref(Wt),{key:0,name:c.value},null,8,["name"])):r.createCommentVNode("",!0)]),h.params.enableMenu?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:r.withModifiers(p,["stop"])},[r.createVNode(r.unref(Wt),{name:"more"})],512)):r.createCommentVNode("",!0)]))}}),wV={class:"pl-ag-grid-open-cell d-flex"},bV={class:"pl-ag-grid-open-cell__value"},lh=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){var o,i;if(e.params.invokeRowsOnDoubleClick){const l=e.params.api,c={rowPinned:e.params.node.rowPinned,api:l,rowIndex:e.params.node.rowIndex,context:l,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};l.dispatchEvent(c)}else(i=(o=e.params).onClick)==null||i.call(o,e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",wV,[r.createElementVNode("div",bV,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(Wt),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}}),Un='"##RowNumberColumnId##"',ch=45;function dh(){return{colId:Un,headerName:"#",valueGetter:t=>t.node===null||t.node.rowIndex===null?null:t.node.rowIndex+1,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:ch,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function xV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",t.style.boxSizing="border-box",t.style.padding="15.5px",t.style.border="1px solid",t.style.width="auto",document.body.appendChild(t),t}function zi(t,e,n){const o=t.getCellValue({rowNode:t.getDisplayedRowAtIndex(t.getLastDisplayedRowIndex()),colKey:Un});if(typeof o!="number")return;const i=o.toString().length;if(!n&&e.innerHTML.length===i)return;const l="5";e.innerHTML=l.repeat(i),r.nextTick(()=>{t.applyColumnState({state:[{colId:Un,pinned:"left",width:Math.max(ch,e.offsetWidth)}]})})}function kV(t){document.body.removeChild(t)}function uh(t){const e=xV();t.addEventListener("firstDataRendered",n=>{zi(n.api,e)}),t.addEventListener("viewportChanged",n=>{zi(n.api,e)}),t.addEventListener("columnVisible",n=>{n.columns&&n.columns.some(o=>o.isVisible()&&o.getColId()===Un)&&zi(n.api,e)}),t.addEventListener("columnResized",n=>{var o;n.finished&&n.source==="autosizeColumns"&&((o=n.columns)!=null&&o.some(i=>i.isVisible()&&i.getColId()===Un))&&zi(n.api,e,!0)}),t.addEventListener("sortChanged",n=>{n.api.refreshCells()}),t.addEventListener("filterChanged",n=>{n.api.refreshCells()}),t.addEventListener("gridPreDestroyed",()=>{kV(e)}),zi(t,e)}function SV(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function EV(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=SV(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=Co(l),d=e.find(p=>rt.isEqual(t[p].id,c));if(d===void 0)throw console.error("axis not found",o,c,t,e),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const ph=(t,e)=>"hC"+(t+e).toString();function TV(t,e,n,o,i,l){let c=-1,d=-1;for(let m=0;m<l.length;++m)l[m]===t.axisIdx&&(c=m),l[m]===t.columnIdx&&(d=m);if(c===-1||d===-1)throw console.error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`,t,l),Error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`);const p=(()=>{const y=o[c].data.filter(w=>w!==null);return Array.from(new Set(y))})();p.sort(),d>c?(n.splice(d+1,1),n.splice(c+1,1)):(n.splice(c+1,1),n.splice(d+1,1));const h=NV(i,o,c,d,p,e.rows);for(let m=0;m<p.length;++m){const y=p[m],w=ur(y+"@"+m);n.push({colId:w,field:ph(o.length,m),headerName:y,valueFormatter:fh})}return{rowModelType:"clientSide",columnDefs:n,rowData:h}}function NV(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let O=0;O<e.length;++O){if(O===n||O===o)continue;const M=t[O].toString();m[M]=e[O].data[h]}let y;const w=ur(Object.values(m))??"";c.has(w)?y=c.get(w):(c.set(w,m),y=m,y.id=d.toString(),d++);const v=i.indexOf(e[n].data[h]);if(v===-1)throw Error("index not found");const T=ph(e.length,v);y[T]=e[o].data[h]}return Array.from(c.values())}function VV(t){return ur(t)}function hh(t){return JSON.parse(t)}const fh=t=>t.value===void 0?"undefined":h_(t.value)||t.value===null?"":t.value.toString();function AV(t,e,n,o){var c,d,p;const i=VV(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:i,context:e,field:t.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(i))??((p=e.spec.annotations)==null?void 0:p["pl7.app/table/visibility"])==="optional",valueFormatter:fh,headerComponent:ah,cellRendererSelector:o?h=>{var y,w;if(e.type!=="axis")return;const m=(w=(y=h.colDef)==null?void 0:y.context)==null?void 0:w.id;if(rt.isEqual(m,o))return{component:lh}}:void 0,cellRendererParams:o?{invokeRowsOnDoubleClick:!0}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function ic(t){return ur(t)}function mh(t,e,n){const o=[];for(let i=0;i<e[0].data.length;++i){const l=n.map(d=>bu(e[d],i)),c={id:ic(l),key:l};t.forEach((d,p)=>{c[d.toString()]=bu(e[p],i)}),o.push(c)}return o}const BV=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function PV(t,e,n,o,i,l){const c=await t.getSpec(e);let d=c.findIndex(k=>k.type==="column");d===-1&&(d=c.length);const p=[...c.keys()].filter(k=>!rt.some(n,W=>rt.isEqual(Co(W.axis),c[k].id)||c[k].type==="column"&&c[k].spec.name==="pl7.app/label"&&c[k].spec.axesSpec.length===1&&rt.isEqual(Co(W.axis),Co(c[k].spec.axesSpec[0])))).sort((k,W)=>{var P,G;if(c[k].type!==c[W].type)return c[k].type==="axis"?-1:1;const A=(P=c[k].spec.annotations)==null?void 0:P["pl7.app/table/orderPriority"],S=(G=c[W].spec.annotations)==null?void 0:G["pl7.app/table/orderPriority"];return A===void 0?S===void 0?0:1:S===void 0?-1:Number(S)-Number(A)}),h=rt.cloneDeep(p),m=EV(c,p);for(let k=p.length-1;k>=0;--k){const W=p[k];if(!BV(c[W]))continue;const A=Co(c[W].spec.axesSpec[0]),S=p.findIndex(G=>rt.isEqual(c[G].id,A));if(S===-1)continue;const P=p[S];p[S]=W;for(const G of m)G.axisIdx===P&&(G.axisIdx=W);p.splice(k,1),h.splice(k,1)}const y=await t.getShape(e),w=y.rows,v=[dh(),...h.map(k=>AV(k,c[k],i,l))];if(m.length>0){let k;if(m.length==1)k=m[0];else{const W=m.filter(A=>{var S;return((S=c[A.columnIdx].spec.annotations)==null?void 0:S["pl7.app/table/hValue"])==="true"});W.length===1&&(k=W[0])}if(!k)console.warn(`Currently, only one heterogeneous axis / column is supported in the table, got ${m.length} transposition will not be applied.`);else return TV(k,y,v,await t.getData(e,p),h,p)}const T=[...p],O=new Map;for(let k=0;k<d;++k)O.set(k,-1);for(let k=0;k<T.length;++k){const W=T[k];O.has(W)&&O.set(W,k)}for(const[k,W]of O)W===-1&&(O.set(k,T.length),T.push(k));const M=[];for(let k=0;k<d;++k){const W=O.get(k);if(W===void 0||W===-1)throw new Error("assertion exception");M.push(W)}if(o)return{rowModelType:"clientSide",columnDefs:v,rowData:mh(h,await t.getData(e,T),M)};let V;return{rowModelType:"serverSide",columnDefs:v,serverSideDatasource:{getRows:async k=>{try{if(w==0){k.success({rowData:[],rowCount:w}),k.api.setGridOption("loading",!1),k.api.showNoRowsOverlay();return}if(V&&!rt.isEqual(V.request.sortModel,k.request.sortModel)){V=void 0,k.api.setGridOption("loading",!0),k.success({rowData:[],rowCount:0});return}V=k;let W=0,A=[];if(w>0&&k.request.startRow!==void 0&&k.request.endRow!==void 0&&(W=Math.min(w,k.request.endRow)-k.request.startRow,W>0)){const S=await t.getData(e,T,{offset:k.request.startRow,length:W});A=mh(h,S,M)}k.success({rowData:A,rowCount:w}),k.api.autoSizeColumns(k.api.getAllDisplayedColumns().filter(S=>S.getColId()!==Un)),k.api.setGridOption("loading",!1)}catch(W){k.api.setGridOption("loading",!0),k.fail(),console.trace(W)}}}}}const Js=Yg();function gh(){const t=r.shallowRef([!1,void 0]);return{track:i=>t.value=[!0,i],reset:()=>t.value=[!1,void 0],onceTracked:i=>{const{stop:l}=r.watchEffect(()=>{const[c,d]=t.value;c&&(i(d),l())});return l}}}function yh(t,e){t.addEventListener("firstDataRendered",n=>{n.api.getGridOption("rowModelType")==="clientSide"&&e.track(n.api)}),t.addEventListener("modelUpdated",n=>{if(n.api.getGridOption("rowModelType")==="serverSide"){const o=n.api.getServerSideGroupLevelState();o&&o.length>0&&o[0].lastRowIndexKnown&&e.track(n.api)}}),t.addEventListener("gridPreDestroyed",()=>e.reset())}function RV(t,e){let n=null;const o=i=>i.id===e?(n=i.rowIndex,!0):!1;if(t.ensureNodeVisible(o,"middle"),n){const i=t.getAllDisplayedColumns();i.length>0&&(t.ensureColumnVisible(i[0]),t.setFocusedCell(n,i[0]))}}async function _h(t,e){return new Promise(n=>{r.nextTick(()=>e.onceTracked(o=>{RV(o,t),n()}))})}const DV=["onClick"],IV={key:0,class:"pl-ag-columns__pin"},Ch=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);function d(h){const m=h.findIndex(y=>y.getId()===Un);if(m!==0){const[y]=h.splice(m,1);return h.splice(0,0,y)}return h}oh(i,{handle:".handle",onChange(h){n.value.moveColumns(d(h.map(m=>o.value[m])),0)}});function p(h){n.value.setColumnsVisible([h],!h.isVisible())}return r.watch(()=>n.value,h=>{o.value=d(h.getAllGridColumns()),o.value.length>0&&h.moveColumns(o.value,0),h.addEventListener("displayedColumnsChanged",m=>{o.value=m.api.getAllGridColumns(),c.value++})},{immediate:!0}),(h,m)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Js)}`},[r.createVNode(r.unref(Hr),{onClick:m[0]||(m[0]=r.withModifiers(y=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:"columns"})]),default:r.withCtx(()=>[m[2]||(m[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref($s),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=y=>l.value=y),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>m[3]||(m[3]=[r.createTextVNode("Manage Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,y=>(r.openBlock(),r.createElementBlock("div",{key:y.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!y.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(Wt),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:y.isVisible()},"pl-ag-columns__title text-s-btn"])},r.toDisplayString(y.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:w=>p(y)},[r.createVNode(r.unref(vt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>m[4]||(m[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:y.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,DV),y.getColDef().lockPosition?(r.openBlock(),r.createElementBlock("div",IV,[r.createVNode(r.unref(ut),{name:"pin"})])):r.createCommentVNode("",!0)]))),128))]))]),_:1},8,["modelValue"])]))}}),FV=["id"],LV=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(Js),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,FV))}});function OV(){const t=document.createElement("div");return t.style.visibility="hidden",t.style.position="absolute",document.body.appendChild(t),t}function MV(t){document.body.removeChild(t)}async function $V(t,e){var o;const n=t.getGridOption("rowModelType");switch(n){case"clientSide":return t.exportDataAsCsv(),e();case"serverSide":{const i=t.getServerSideGroupLevelState();if(i.length===0||i[0].rowCount<=i[0].cacheBlockSize)return t.exportDataAsCsv(),e();const l=OV(),c={rowModelType:"serverSide",columnDefs:((o=t.getColumnDefs())==null?void 0:o.filter(d=>!("children"in d)).map(d=>({headerName:d.headerName,field:d.field,valueFormatter:d.valueFormatter,valueGetter:d.valueGetter})))??[],serverSideDatasource:t.getGridOption("serverSideDatasource"),cacheBlockSize:i[0].rowCount,onModelUpdated:d=>{const p=d.api.getServerSideGroupLevelState();if(p.length>0&&p[0].rowCount===p[0].cacheBlockSize)return d.api.exportDataAsCsv(),MV(l),e()},defaultCsvExportParams:t.getGridOption("defaultCsvExportParams")};return x.createGrid(l,c,{modules:[il.ServerSideRowModelModule]})}default:throw e(),Error(`exportCsv unsupported for rowModelType = ${n}`)}}const vh=r.defineComponent({__name:"PlAgCsvExporter",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.shallowRef(!1),i=()=>{o.value=!0,$V(n.value,()=>o.value=!1)};return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Js)}`},[r.createVNode(r.unref(Hr),{loading:o.value,onClick:r.withModifiers(i,["stop"])},{append:r.withCtx(()=>[r.createVNode(r.unref(ut),{name:"export"})]),default:r.withCtx(()=>[c[0]||(c[0]=r.createTextVNode(" Export "))]),_:1},8,["loading"])],8,["to"]))]))}}),GV={class:"ap-ag-data-table-container"},zV={key:2,class:"ap-ag-data-table-sheets"},UV=oc(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selectedRows:{},selectedRowsModifiers:{}}),emits:r.mergeModels(["rowDoubleClicked","columnsChanged"],["update:modelValue","update:selectedRows"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([gs.ClientSideRowModelModule,Jd.ClipboardModule,il.ServerSideRowModelModule,Qd.RangeSelectionModule]);const o=r.useModel(t,"modelValue"),i=r.useModel(t,"selectedRows"),l=t,{settings:c}=r.toRefs(l),d=n;o.value.pTableParams||(o.value.pTableParams={});function p(P){return(P==null?void 0:P.sortModel.map(G=>{const{spec:Y,...F}=hh(G.colId);return{column:F,ascending:G.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const h=r.computed({get:()=>{const P=o.value;return{columnOrder:P.gridState.columnOrder,sort:P.gridState.sort,columnVisibility:P.gridState.columnVisibility}},set:P=>{var Z;const G=((Z=c.value)==null?void 0:Z.sourceType)!=="ptable"||O.value.rowModelType==="clientSide"?void 0:p(P.sort),Y=o.value,F={...Y,gridState:{...Y.gridState,...P},pTableParams:{...Y.pTableParams,sorting:G}};dr(Y,F)||(o.value=F)}}),m=P=>ur(Co(P));function y(P){var G,Y;if(((G=c.value)==null?void 0:G.sourceType)==="ptable")return((Y=c.value.sheets)==null?void 0:Y.map(F=>({type:"bySingleColumnV2",column:{type:"axis",id:F.axis},predicate:{operator:"Equal",reference:P[m(F.axis)]}})))??[]}const w=r.computed({get:()=>o.value.gridState.sheets??{},set:P=>{const G=y(P),Y=o.value;o.value={...Y,gridState:{...Y.gridState,sheets:P},pTableParams:{...Y.pTableParams,filters:G}}}});r.watch(()=>c.value,(P,G)=>{if((P==null?void 0:P.sourceType)!=="ptable"||!P.sheets){w.value={};return}if(G&&G.sourceType==="ptable"&&rt.isEqual(P.sheets,G.sheets))return;const Y=w.value,F={};for(const Z of P.sheets){const z=m(Z.axis);F[z]=Y[z]??Z.defaultValue??Z.options[0].value}w.value=F},{immediate:!0});const v=r.shallowRef(),T=gh(),O=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:h.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:i.value?{mode:"multiRow"}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:P=>{const G=i.value;if(G){const Y=G.map(F=>P.api.getRowNode(ic(F))).filter(F=>!!F);P.api.setNodesSelected({nodes:Y,newValue:!0})}},onSelectionChanged:P=>{i.value&&(i.value=P.api.getSelectedNodes().map(G=>G.data.key))},onRowDoubleClicked:P=>{P.data&&d("rowDoubleClicked",P.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:P=>P.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:ih,noRowsOverlayComponent:sh,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),M=P=>{const G=P.api;yh(G,T),uh(G),v.value=new Proxy(G,{get(Y,F,Z){switch(F){case"setGridOption":return(z,R)=>{const N=O.value;N[z]=R,O.value=N,G.setGridOption(z,R)};case"updateGridOptions":return z=>{O.value={...O.value,...z},G.updateGridOptions(z)};default:return Reflect.get(Y,F,Z)}}})},V=P=>({columnOrder:P.columnOrder,sort:P.sort,columnVisibility:P.columnVisibility??(P.columnOrder?{hiddenColIds:[]}:void 0)}),U=P=>{O.value.initialState=h.value=V(P.state),P.api.autoSizeColumns(P.api.getAllDisplayedColumns().filter(G=>G.getColId()!==Un))},k=()=>{O.value.initialState=h.value=V(v.value.getState()),v.value=void 0};e({focusRow:P=>_h(ic(P),T)});const W=r.ref(0);r.watch(()=>[v.value,h.value],(P,G)=>{if(rt.isEqual(P,G))return;const[Y,F]=P;if(!Y)return;const Z=V(Y.getState());rt.isEqual(F,Z)||(O.value.initialState=F,++W.value)}),r.watch(()=>O.value,(P,G)=>{var Y,F;if(G){if(P.rowModelType!=G.rowModelType&&++W.value,P.columnDefs&&!rt.isEqual(P.columnDefs,G.columnDefs)){const Z=N=>!("children"in N),R=(((Y=P.columnDefs)==null?void 0:Y.filter(Z))??[]).map(N=>N.colId).filter(N=>N!==void 0).filter(N=>N!==Un).map(N=>hh(N))??[];d("columnsChanged",R)}!rt.isEqual(P.loadingOverlayComponentParams,G.loadingOverlayComponentParams)&&P.loading&&((F=v.value)==null||F.setGridOption("loading",!1),r.nextTick(()=>{var Z;return(Z=v.value)==null?void 0:Z.setGridOption("loading",!0)}))}},{immediate:!0});const A=(P,G)=>{var F;const Y=w.value;if(Y[P]!==G)return Y[P]=G,w.value=Y,(F=v.value)==null?void 0:F.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let S;return r.watch(()=>[v.value,c.value],async P=>{var Z,z;const[G,Y]=P;if(!G||rt.isEqual(Y,S))return;S=Y;const F=Y==null?void 0:Y.sourceType;switch(F){case void 0:return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(Y!=null&&Y.pTable))return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const R=await PV(Ts().pFrameDriver,Y.pTable,Y.sheets??[],!!l.clientSideModel||!!i.value,(z=(Z=h.value)==null?void 0:Z.columnVisibility)==null?void 0:z.hiddenColIds,l.showCellButtonForAxisId);return G.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...R})}case"xsv":{if(!(Y==null?void 0:Y.xsvFile))return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});Ts().blobDriver;const N=await CV();return G.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...N})}default:throw Error(`unsupported source type: ${F}`)}}),(P,G)=>{var Y;return r.openBlock(),r.createElementBlock("div",GV,[v.value&&P.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(Ch),{key:0,api:v.value},null,8,["api"])):r.createCommentVNode("",!0),v.value&&P.showExportButton?(r.openBlock(),r.createBlock(vh,{key:1,api:v.value},null,8,["api"])):r.createCommentVNode("",!0),((Y=r.unref(c))==null?void 0:Y.sourceType)==="ptable"&&r.unref(c).sheets&&r.unref(c).sheets.length>0?(r.openBlock(),r.createElementBlock("div",zV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c).sheets,(F,Z)=>{var z,R;return r.openBlock(),r.createBlock(r.unref(Np),{key:Z,"model-value":w.value[m(F.axis)],options:F.options,prefix:(((R=(z=F.axis.annotations)==null?void 0:z["pl7.app/label"])==null?void 0:R.trim())??`Unlabeled axis ${Z}`)+":","onUpdate:modelValue":N=>A(m(F.axis),N)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(jg.AgGridVue),{key:W.value,theme:r.unref(ju),class:"ap-ag-data-table-grid","grid-options":O.value,onGridReady:M,onStateUpdated:U,onGridPreDestroyed:k},null,8,["theme","grid-options"]))])}}}),[["__scopeId","data-v-6b8d469d"]]),ZV={key:1,class:"alert-error"},WV={key:2},jV=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(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),o.value?(r.openBlock(),r.createElementBlock("div",ZV,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",WV,"Unresolved")):r.createCommentVNode("",!0)]))}}),HV={style:{height:"100%"}},qV=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",HV,[r.createVNode(r.unref(Qp),{"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":o.value,progress:l.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),KV={class:"pl-ag-cell-status-tag d-flex align-center"},YV=r.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(t){return(e,n)=>{var o;return r.openBlock(),r.createElementBlock("div",KV,[r.createVNode(r.unref(Rp),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});var sc={exports:{}};const XV="2.0.0",wh=256,JV=Number.MAX_SAFE_INTEGER||9007199254740991,QV=16,eA=wh-6;var Qs={MAX_LENGTH:wh,MAX_SAFE_COMPONENT_LENGTH:QV,MAX_SAFE_BUILD_LENGTH:eA,MAX_SAFE_INTEGER:JV,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:XV,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ea=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=Qs,l=ea;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",i],[y,o]],v=O=>{for(const[M,V]of w)O=O.split(`${M}*`).join(`${M}{0,${V}}`).split(`${M}+`).join(`${M}{1,${V}}`);return O},T=(O,M,V)=>{const U=v(M),k=m++;l(O,k,M),h[O]=k,p[k]=M,c[k]=new RegExp(M,V?"g":void 0),d[k]=new RegExp(U,V?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*"),T("NUMERICIDENTIFIERLOOSE","\\d+"),T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),T("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),T("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),T("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),T("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),T("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),T("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),T("BUILDIDENTIFIER",`${y}+`),T("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),T("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),T("FULL",`^${p[h.FULLPLAIN]}$`),T("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),T("LOOSE",`^${p[h.LOOSEPLAIN]}$`),T("GTLT","((?:<|>)?=?)"),T("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),T("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),T("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),T("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),T("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),T("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),T("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),T("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),T("COERCERTL",p[h.COERCE],!0),T("COERCERTLFULL",p[h.COERCEFULL],!0),T("LONETILDE","(?:~>?)"),T("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",T("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),T("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),T("LONECARET","(?:\\^)"),T("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",T("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),T("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),T("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),T("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),T("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",T("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),T("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),T("STAR","(<|>)?=?\\s*\\*"),T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(sc,sc.exports);var Ui=sc.exports;const tA=Object.freeze({loose:!0}),nA=Object.freeze({});var ac=t=>t?typeof t!="object"?tA:t:nA;const bh=/^[0-9]+$/,xh=(t,e)=>{const n=bh.test(t),o=bh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var kh={compareIdentifiers:xh,rcompareIdentifiers:(t,e)=>xh(e,t)};const ta=ea,{MAX_LENGTH:Sh,MAX_SAFE_INTEGER:na}=Qs,{safeRe:Eh,t:Th}=Ui,rA=ac,{compareIdentifiers:Bo}=kh;var Bt=class qn{constructor(e,n){if(n=rA(n),e instanceof qn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Sh)throw new TypeError(`version is longer than ${Sh} characters`);ta("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?Eh[Th.LOOSE]:Eh[Th.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>na||this.major<0)throw new TypeError("Invalid major version");if(this.minor>na||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>na||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<na)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ta("SemVer.compare",this.version,this.options,e),!(e instanceof qn)){if(typeof e=="string"&&e===this.version)return 0;e=new qn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof qn||(e=new qn(e,this.options)),Bo(this.major,e.major)||Bo(this.minor,e.minor)||Bo(this.patch,e.patch)}comparePre(e){if(e instanceof qn||(e=new qn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(ta("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Bo(o,i)}while(++n)}compareBuild(e){e instanceof qn||(e=new qn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(ta("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return Bo(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),Bo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Nh=Bt;var Po=(t,e,n=!1)=>{if(t instanceof Nh)return t;try{return new Nh(t,e)}catch(o){if(!n)return null;throw o}};const oA=Po;var iA=(t,e)=>{const n=oA(t,e);return n?n.version:null};const sA=Po;var aA=(t,e)=>{const n=sA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const Vh=Bt;var lA=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new Vh(t instanceof Vh?t.version:t,n).inc(e,o,i).version}catch{return null}};const Ah=Po;var cA=(t,e)=>{const n=Ah(t,null,!0),o=Ah(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const dA=Bt;var uA=(t,e)=>new dA(t,e).major;const pA=Bt;var hA=(t,e)=>new pA(t,e).minor;const fA=Bt;var mA=(t,e)=>new fA(t,e).patch;const gA=Po;var yA=(t,e)=>{const n=gA(t,e);return n&&n.prerelease.length?n.prerelease:null};const Bh=Bt;var _n=(t,e,n)=>new Bh(t,n).compare(new Bh(e,n));const _A=_n;var CA=(t,e,n)=>_A(e,t,n);const vA=_n;var wA=(t,e)=>vA(t,e,!0);const Ph=Bt;var lc=(t,e,n)=>{const o=new Ph(t,n),i=new Ph(e,n);return o.compare(i)||o.compareBuild(i)};const bA=lc;var xA=(t,e)=>t.sort((n,o)=>bA(n,o,e));const kA=lc;var SA=(t,e)=>t.sort((n,o)=>kA(o,n,e));const EA=_n;var ra=(t,e,n)=>EA(t,e,n)>0;const TA=_n;var cc=(t,e,n)=>TA(t,e,n)<0;const NA=_n;var Rh=(t,e,n)=>NA(t,e,n)===0;const VA=_n;var Dh=(t,e,n)=>VA(t,e,n)!==0;const AA=_n;var dc=(t,e,n)=>AA(t,e,n)>=0;const BA=_n;var uc=(t,e,n)=>BA(t,e,n)<=0;const PA=Rh,RA=Dh,DA=ra,IA=dc,FA=cc,LA=uc;var Ih=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return PA(t,n,o);case"!=":return RA(t,n,o);case">":return DA(t,n,o);case">=":return IA(t,n,o);case"<":return FA(t,n,o);case"<=":return LA(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const OA=Bt,MA=Po,{safeRe:oa,t:ia}=Ui;var $A=(t,e)=>{if(t instanceof OA)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?oa[ia.COERCEFULL]:oa[ia.COERCE]);else{const p=e.includePrerelease?oa[ia.COERCERTLFULL]:oa[ia.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return MA(`${o}.${i}.${l}${c}${d}`,e)},GA=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},pc,Fh;function Cn(){if(Fh)return pc;Fh=1;const t=/\s+/g;class e{constructor($,H){if(H=i(H),$ instanceof e)return $.loose===!!H.loose&&$.includePrerelease===!!H.includePrerelease?$:new e($.raw,H);if($ instanceof l)return this.raw=$.value,this.set=[[$]],this.formatted=void 0,this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=$.trim().replace(t," "),this.set=this.raw.split("||").map(J=>this.parseRange(J.trim())).filter(J=>J.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const J=this.set[0];if(this.set=this.set.filter(ne=>!O(ne[0])),this.set.length===0)this.set=[J];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&M(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let $=0;$<this.set.length;$++){$>0&&(this.formatted+="||");const H=this.set[$];for(let J=0;J<H.length;J++)J>0&&(this.formatted+=" "),this.formatted+=H[J].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange($){const J=((this.options.includePrerelease&&v)|(this.options.loose&&T))+":"+$,ne=o.get(J);if(ne)return ne;const de=this.options.loose,me=de?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];$=$.replace(me,z(this.options.includePrerelease)),c("hyphen replace",$),$=$.replace(p[h.COMPARATORTRIM],m),c("comparator trim",$),$=$.replace(p[h.TILDETRIM],y),c("tilde trim",$),$=$.replace(p[h.CARETTRIM],w),c("caret trim",$);let Te=$.split(" ").map(qe=>U(qe,this.options)).join(" ").split(/\s+/).map(qe=>Z(qe,this.options));de&&(Te=Te.filter(qe=>(c("loose invalid filter",qe,this.options),!!qe.match(p[h.COMPARATORLOOSE])))),c("range list",Te);const Se=new Map,je=Te.map(qe=>new l(qe,this.options));for(const qe of je){if(O(qe))return[qe];Se.set(qe.value,qe)}Se.size>1&&Se.has("")&&Se.delete("");const Dt=[...Se.values()];return o.set(J,Dt),Dt}intersects($,H){if(!($ instanceof e))throw new TypeError("a Range is required");return this.set.some(J=>V(J,H)&&$.set.some(ne=>V(ne,H)&&J.every(de=>ne.every(me=>de.intersects(me,H)))))}test($){if(!$)return!1;if(typeof $=="string")try{$=new d($,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(R(this.set[H],$,this.options))return!0;return!1}}pc=e;const n=GA,o=new n,i=ac,l=sa(),c=ea,d=Bt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:w}=Ui,{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:T}=Qs,O=N=>N.value==="<0.0.0-0",M=N=>N.value==="",V=(N,$)=>{let H=!0;const J=N.slice();let ne=J.pop();for(;H&&J.length;)H=J.every(de=>ne.intersects(de,$)),ne=J.pop();return H},U=(N,$)=>(c("comp",N,$),N=S(N,$),c("caret",N),N=W(N,$),c("tildes",N),N=G(N,$),c("xrange",N),N=F(N,$),c("stars",N),N),k=N=>!N||N.toLowerCase()==="x"||N==="*",W=(N,$)=>N.trim().split(/\s+/).map(H=>A(H,$)).join(" "),A=(N,$)=>{const H=$.loose?p[h.TILDELOOSE]:p[h.TILDE];return N.replace(H,(J,ne,de,me,Te)=>{c("tilde",N,J,ne,de,me,Te);let Se;return k(ne)?Se="":k(de)?Se=`>=${ne}.0.0 <${+ne+1}.0.0-0`:k(me)?Se=`>=${ne}.${de}.0 <${ne}.${+de+1}.0-0`:Te?(c("replaceTilde pr",Te),Se=`>=${ne}.${de}.${me}-${Te} <${ne}.${+de+1}.0-0`):Se=`>=${ne}.${de}.${me} <${ne}.${+de+1}.0-0`,c("tilde return",Se),Se})},S=(N,$)=>N.trim().split(/\s+/).map(H=>P(H,$)).join(" "),P=(N,$)=>{c("caret",N,$);const H=$.loose?p[h.CARETLOOSE]:p[h.CARET],J=$.includePrerelease?"-0":"";return N.replace(H,(ne,de,me,Te,Se)=>{c("caret",N,ne,de,me,Te,Se);let je;return k(de)?je="":k(me)?je=`>=${de}.0.0${J} <${+de+1}.0.0-0`:k(Te)?de==="0"?je=`>=${de}.${me}.0${J} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.0${J} <${+de+1}.0.0-0`:Se?(c("replaceCaret pr",Se),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}-${Se} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}-${Se} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te}-${Se} <${+de+1}.0.0-0`):(c("no pr"),de==="0"?me==="0"?je=`>=${de}.${me}.${Te}${J} <${de}.${me}.${+Te+1}-0`:je=`>=${de}.${me}.${Te}${J} <${de}.${+me+1}.0-0`:je=`>=${de}.${me}.${Te} <${+de+1}.0.0-0`),c("caret return",je),je})},G=(N,$)=>(c("replaceXRanges",N,$),N.split(/\s+/).map(H=>Y(H,$)).join(" ")),Y=(N,$)=>{N=N.trim();const H=$.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return N.replace(H,(J,ne,de,me,Te,Se)=>{c("xRange",N,J,ne,de,me,Te,Se);const je=k(de),Dt=je||k(me),qe=Dt||k(Te),Zn=qe;return ne==="="&&Zn&&(ne=""),Se=$.includePrerelease?"-0":"",je?ne===">"||ne==="<"?J="<0.0.0-0":J="*":ne&&Zn?(Dt&&(me=0),Te=0,ne===">"?(ne=">=",Dt?(de=+de+1,me=0,Te=0):(me=+me+1,Te=0)):ne==="<="&&(ne="<",Dt?de=+de+1:me=+me+1),ne==="<"&&(Se="-0"),J=`${ne+de}.${me}.${Te}${Se}`):Dt?J=`>=${de}.0.0${Se} <${+de+1}.0.0-0`:qe&&(J=`>=${de}.${me}.0${Se} <${de}.${+me+1}.0-0`),c("xRange return",J),J})},F=(N,$)=>(c("replaceStars",N,$),N.trim().replace(p[h.STAR],"")),Z=(N,$)=>(c("replaceGTE0",N,$),N.trim().replace(p[$.includePrerelease?h.GTE0PRE:h.GTE0],"")),z=N=>($,H,J,ne,de,me,Te,Se,je,Dt,qe,Zn)=>(k(J)?H="":k(ne)?H=`>=${J}.0.0${N?"-0":""}`:k(de)?H=`>=${J}.${ne}.0${N?"-0":""}`:me?H=`>=${H}`:H=`>=${H}${N?"-0":""}`,k(je)?Se="":k(Dt)?Se=`<${+je+1}.0.0-0`:k(qe)?Se=`<${je}.${+Dt+1}.0-0`:Zn?Se=`<=${je}.${Dt}.${qe}-${Zn}`:N?Se=`<${je}.${Dt}.${+qe+1}-0`:Se=`<=${Se}`,`${H} ${Se}`.trim()),R=(N,$,H)=>{for(let J=0;J<N.length;J++)if(!N[J].test($))return!1;if($.prerelease.length&&!H.includePrerelease){for(let J=0;J<N.length;J++)if(c(N[J].semver),N[J].semver!==l.ANY&&N[J].semver.prerelease.length>0){const ne=N[J].semver;if(ne.major===$.major&&ne.minor===$.minor&&ne.patch===$.patch)return!0}return!1}return!0};return pc}var hc,Lh;function sa(){if(Lh)return hc;Lh=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],w=m.match(y);if(!w)throw new TypeError(`Invalid comparator: ${m}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new d(w[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}hc=e;const n=ac,{safeRe:o,t:i}=Ui,l=Ih,c=ea,d=Bt,p=Cn();return hc}const zA=Cn();var aa=(t,e,n)=>{try{e=new zA(e,n)}catch{return!1}return e.test(t)};const UA=Cn();var ZA=(t,e)=>new UA(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const WA=Bt,jA=Cn();var HA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new jA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new WA(o,n))}),o};const qA=Bt,KA=Cn();var YA=(t,e,n)=>{let o=null,i=null,l=null;try{l=new KA(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new qA(o,n))}),o};const fc=Bt,XA=Cn(),Oh=ra;var JA=(t,e)=>{t=new XA(t,e);let n=new fc("0.0.0");if(t.test(n)||(n=new fc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new fc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||Oh(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||Oh(n,l))&&(n=l)}return n&&t.test(n)?n:null};const QA=Cn();var eB=(t,e)=>{try{return new QA(t,e).range||"*"}catch{return null}};const tB=Bt,Mh=sa(),{ANY:nB}=Mh,rB=Cn(),oB=aa,$h=ra,Gh=cc,iB=uc,sB=dc;var mc=(t,e,n,o)=>{t=new tB(t,o),e=new rB(e,o);let i,l,c,d,p;switch(n){case">":i=$h,l=iB,c=Gh,d=">",p=">=";break;case"<":i=Gh,l=sB,c=$h,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(oB(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,w=null;if(m.forEach(v=>{v.semver===nB&&(v=new Mh(">=0.0.0")),y=y||v,w=w||v,i(v.semver,y.semver,o)?y=v:c(v.semver,w.semver,o)&&(w=v)}),y.operator===d||y.operator===p||(!w.operator||w.operator===d)&&l(t,w.semver))return!1;if(w.operator===p&&c(t,w.semver))return!1}return!0};const aB=mc;var lB=(t,e,n)=>aB(t,e,">",n);const cB=mc;var dB=(t,e,n)=>cB(t,e,"<",n);const zh=Cn();var uB=(t,e,n)=>(t=new zh(t,n),e=new zh(e,n),t.intersects(e,n));const pB=aa,hB=_n;var fB=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>hB(m,y,n));for(const m of c)pB(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Uh=Cn(),gc=sa(),{ANY:yc}=gc,Zi=aa,_c=_n,mB=(t,e,n={})=>{if(t===e)return!0;t=new Uh(t,n),e=new Uh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=yB(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},gB=[new gc(">=0.0.0-0")],Zh=[new gc(">=0.0.0")],yB=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===yc){if(e.length===1&&e[0].semver===yc)return!0;n.includePrerelease?t=gB:t=Zh}if(e.length===1&&e[0].semver===yc){if(n.includePrerelease)return!0;e=Zh}const o=new Set;let i,l;for(const v of t)v.operator===">"||v.operator===">="?i=Wh(i,v,n):v.operator==="<"||v.operator==="<="?l=jh(l,v,n):o.add(v.semver);if(o.size>1)return null;let c;if(i&&l){if(c=_c(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const v of o){if(i&&!Zi(v,String(i),n)||l&&!Zi(v,String(l),n))return null;for(const T of e)if(!Zi(v,String(T),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,w=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const v of e){if(m=m||v.operator===">"||v.operator===">=",h=h||v.operator==="<"||v.operator==="<=",i){if(w&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===w.major&&v.semver.minor===w.minor&&v.semver.patch===w.patch&&(w=!1),v.operator===">"||v.operator===">="){if(d=Wh(i,v,n),d===v&&d!==i)return!1}else if(i.operator===">="&&!Zi(i.semver,String(v),n))return!1}if(l){if(y&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===y.major&&v.semver.minor===y.minor&&v.semver.patch===y.patch&&(y=!1),v.operator==="<"||v.operator==="<="){if(p=jh(l,v,n),p===v&&p!==l)return!1}else if(l.operator==="<="&&!Zi(l.semver,String(v),n))return!1}if(!v.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||w||y)},Wh=(t,e,n)=>{if(!t)return e;const o=_c(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},jh=(t,e,n)=>{if(!t)return e;const o=_c(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var _B=mB;const Cc=Ui,Hh=Qs,CB=Bt,qh=kh,vB=Po,wB=iA,bB=aA,xB=lA,kB=cA,SB=uA,EB=hA,TB=mA,NB=yA,VB=_n,AB=CA,BB=wA,PB=lc,RB=xA,DB=SA,IB=ra,FB=cc,LB=Rh,OB=Dh,MB=dc,$B=uc,GB=Ih,zB=$A,UB=sa(),ZB=Cn();var WB={parse:vB,valid:wB,clean:bB,inc:xB,diff:kB,major:SB,minor:EB,patch:TB,prerelease:NB,compare:VB,rcompare:AB,compareLoose:BB,compareBuild:PB,sort:RB,rsort:DB,gt:IB,lt:FB,eq:LB,neq:OB,gte:MB,lte:$B,cmp:GB,coerce:zB,Comparator:UB,Range:ZB,satisfies:aa,toComparators:ZA,maxSatisfying:HA,minSatisfying:YA,minVersion:JA,validRange:eB,outside:mc,gtr:lB,ltr:dB,intersects:uB,simplifyRange:fB,subset:_B,SemVer:CB,re:Cc.re,src:Cc.src,tokens:Cc.t,SEMVER_SPEC_VERSION:Hh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Hh.RELEASE_TYPES,compareIdentifiers:qh.compareIdentifiers,rcompareIdentifiers:qh.rcompareIdentifiers};const jB=ou(WB);function HB(t){return ur(t.id)}function qB(t){switch(t){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${t}`)}}const KB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],YB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Kh(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function XB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Yh(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function JB(t,e){return{columnId:t.columnId,filter:Yh(e,XB(t.filter)),disabled:t.disabled}}function vc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Xh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function QB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function eP(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=rt.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function tP(t,e){var i,l;const n=jB.gt(Ts().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const nP={class:"d-flex flex-column gap-24"},Jh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",nP,[r.createVNode(r.unref(ko),{"model-value":e.value.filter.type,options:r.unref(i),disabled:l.disabled,label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(JB)(e.value,d))},null,8,["model-value","options","disabled"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(Kr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(Kr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),disabled:l.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Kr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),disabled:l.disabled,parse:d=>r.unref(vc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),disabled:l.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(Kr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Xh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(Kr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:r.unref(QB),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(Kr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Xh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(th),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,disabled:l.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Gs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),disabled:l.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(ko),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),disabled:l.disabled,options:r.unref(eP)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):r.createCommentVNode("",!0)]))}}),rP={class:"d-flex flex-column gap-24"},oP={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},iP=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,w=>{w?h.value=o.makeFilter(w):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(w,v)=>(r.openBlock(),r.createBlock(r.unref($s),{modelValue:n.value,"onUpdate:modelValue":v[2]||(v[2]=T=>n.value=T),"close-on-outside-click":!1},{title:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Fs),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>v[4]||(v[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(Hr),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>v[5]||(v[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",rP,[r.createVNode(r.unref(ko),{modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=T=>p.value=T),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",oP,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Jh,{key:1,modelValue:h.value,"onUpdate:modelValue":v[1]||(v[1]=T=>h.value=T),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),sP=["onClick"],aP={class:"pl-filter-manager__expand-icon"},lP={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},cP={class:"pl-filter-manager__actions d-flex gap-12"},dP=["onClick"],uP=["onClick"],pP={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},hP={class:"d-flex justify-center"},fP=["onClick"],mP={class:"pl-filter-manager__add-btn-icon"},gP={key:0},yP=r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const F=o.value.filter(z=>{const R=z.type;switch(R){case"axis":return z.spec.type!=="Bytes";case"column":return z.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${R}`)}}),Z={};for(const z of F)Z[HB(z)]=z;return Z}),d=r.computed(()=>{const F=i.value??[],Z={};for(const[z,R]of Object.entries(c.value)){const N=rt.find(F,$=>rt.isEqual($.column.id,R.id));N&&(Z[z]=N.allowedFilterTypes)}return Z}),p=r.computed(()=>{const F=l.value??[],Z={};for(const[z,R]of Object.entries(c.value)){const N=rt.find(F,$=>rt.isEqual($.column.id,R.id));N&&(Z[z]={columnId:z,filter:N.default,disabled:!1})}return Z});(()=>{const F=e.value.state;typeof F=="object"&&!Array.isArray(F)&&(e.value.state=Object.entries(F).map(([Z,z])=>({columnId:Z,filter:z,disabled:!1})))})();const h=F=>F??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,F=>{rt.isEqual(m.state,F.state)||(m.state=h(F.state))}),r.watch(()=>m,F=>{rt.isEqual(F.state,e.value.state)||(e.value={state:rt.cloneDeep(F.state),filters:F.state.filter(Z=>!Z.disabled).map(Z=>{const z=c.value[Z.columnId],{spec:R,...N}=z;return{type:"bySingleColumnV2",column:N,predicate:tP(z,Z.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,F=>{Object.keys(F).length===0&&m.state!==void 0||(m.state=m.state.filter(Z=>!!F[Z.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),w=r.computed(()=>{const F=d.value,Z={};for(const[z,R]of Object.entries(c.value)){let $=(R.type==="column"?R.spec.valueType:R.spec.type)==="String"?YB:KB;const H=F[z];H&&($=$.filter(J=>H.includes(J))),Z[z]=$.map(J=>({value:J,text:qB(J)}))}return Z}),v=r.computed(()=>rt.some(Object.values(w.value),F=>F.length>0)),T=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([F,[Z,z]])=>w.value[Z].length>0).filter(([F,[Z,z]])=>!m.state.some(R=>R.columnId===Z)).map(([F,[Z,z]])=>({label:Kh(z,F),value:Z}))),O=F=>p.value[F]??{columnId:F,filter:Yh(w.value[F][0].value),disabled:!1},M=F=>{m.state[F]=O(m.state[F].columnId)},V=F=>m.state.splice(F,1),U=r.ref(!1),k=r.ref(!1),W=r.ref(!1);r.onMounted(()=>{W.value=!0});const A=r.reactive({}),S=F=>{A[F]?delete A[F]:A[F]=!0},P=r.ref(!1),G=r.ref();let Y;return r.onMounted(()=>{Y=new ResizeObserver(()=>{var Z;const F=(Z=G.value)==null?void 0:Z.parentElement;F&&(P.value=F.scrollHeight>F.clientHeight||F.scrollWidth>F.clientWidth)}),G.value&&G.value.parentElement&&Y.observe(G.value.parentElement)}),r.watch(G,(F,Z)=>{Z!=null&&Z.parentElement&&Y.unobserve(Z.parentElement),F!=null&&F.parentElement&&Y.observe(F.parentElement)}),r.onBeforeUnmount(()=>{Y!==void 0&&Y.disconnect()}),(F,Z)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[W.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(Js)}`},[r.createVNode(r.unref(Hr),{onClick:Z[0]||(Z[0]=r.withModifiers(z=>U.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Os),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[Z[5]||(Z[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref($s),{modelValue:U.value,"onUpdate:modelValue":Z[2]||(Z[2]=z=>U.value=z),"close-on-outside-click":!1},{title:r.withCtx(()=>Z[6]||(Z[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"filterManager",ref:G,class:"pl-filter-manager d-flex flex-column gap-6"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(z,R)=>(r.openBlock(),r.createElementBlock("div",{key:z.columnId,class:r.normalizeClass([{open:A[z.columnId],disabled:z.disabled},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:N=>S(z.columnId)},[r.createElementVNode("div",aP,[r.createVNode(r.unref(Wt),{name:"chevron-right"})]),r.createElementVNode("div",lP,r.toDisplayString(r.unref(Kh)(c.value[z.columnId],R)),1),r.createElementVNode("div",cP,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(N=>z.disabled=!z.disabled,["stop"])},[r.createVNode(r.unref(ut),{name:z.disabled?"view-hide":"view-show"},null,8,["name"])],8,dP),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(N=>V(R),["stop"])},[r.createVNode(r.unref(ut),{name:"close"})],8,uP)])],8,sP),r.createElementVNode("div",pP,[r.createVNode(Jh,{modelValue:m.state[R],"onUpdate:modelValue":N=>m.state[R]=N,disabled:z.disabled,column:c.value[z.columnId],options:w.value[z.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),r.createElementVNode("div",hP,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:z.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:N=>M(R)},[Z[7]||(Z[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(ut),{name:"reverse"})],10,fP)])])],2))),128)),r.createElementVNode("div",{class:r.normalizeClass([{"pt-24":P.value},"pl-filter-manager__add-action-wrapper"])},[T.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:Z[1]||(Z[1]=z=>k.value=!0)},[r.createElementVNode("div",mP,[r.createVNode(r.unref(Wt),{name:"add"})]),Z[8]||(Z[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):r.createCommentVNode("",!0)],2),v.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",gP,"No filters applicable"))],512)]),_:1},8,["modelValue"]),r.createVNode(iP,{modelValue:k.value,"onUpdate:modelValue":Z[3]||(Z[3]=z=>k.value=z),"columns-by-id":c.value,"column-options":T.value,"filter-options":w.value,"make-filter":O,onAddFilter:Z[4]||(Z[4]=z=>m.state.push(z))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),la=new Map;function _P(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{la.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function CP(t){const e=Symbol();return()=>(la.has(e)||la.set(e,_P(e,t)),la.get(e))}function vP(t){return r.computed(()=>{try{return su(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function wP(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Xg(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Ro=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Qh=new Set,wc=typeof process=="object"&&process?process:{},ef=(t,e,n,o)=>{typeof wc.emitWarning=="function"?wc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let ca=globalThis.AbortController,tf=globalThis.AbortSignal;if(typeof ca>"u"){tf=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},ca=class{constructor(){Ze(this,"signal",new tf);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((rf=wc.env)==null?void 0:rf.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,ef("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 bP=t=>!Qh.has(t),Ar=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),nf=t=>Ar(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?da:null:null;class da extends Array{constructor(e){super(e),this.fill(0)}}const Qr=class Qr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(Qr,Do))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=nf(e);if(!n)return[];ye(Qr,Do,!0);const o=new Qr(e,n);return ye(Qr,Do,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Do=new WeakMap,ze(Qr,Do,!1);let bc=Qr;const Sc=class Sc{constructor(e){ze(this,re);ze(this,vn);ze(this,Ht);ze(this,wn);ze(this,bn);ze(this,Io);ze(this,Fo);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");ze(this,pt);ze(this,xn);ze(this,dt);ze(this,Xe);ze(this,ke);ze(this,Pt);ze(this,qt);ze(this,Et);ze(this,gt);ze(this,kn);ze(this,yt);ze(this,Sn);ze(this,En);ze(this,Kt);ze(this,Tn);ze(this,Br);ze(this,Rt);ze(this,eo,()=>{});ze(this,Qn,()=>{});ze(this,Wi,()=>{});ze(this,Yt,()=>!1);ze(this,to,e=>{});ze(this,Lo,(e,n,o)=>{});ze(this,ji,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,of,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:w,maxSize:v=0,maxEntrySize:T=0,sizeCalculation:O,fetchMethod:M,memoMethod:V,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:k,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:A,ignoreFetchAbort:S}=e;if(n!==0&&!Ar(n))throw new TypeError("max option must be a nonnegative integer");const P=n?nf(n):Array;if(!P)throw new Error("invalid max value: "+n);if(ye(this,vn,n),ye(this,Ht,v),this.maxEntrySize=T||b(this,Ht),this.sizeCalculation=O,this.sizeCalculation){if(!b(this,Ht)&&!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(V!==void 0&&typeof V!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Fo,V),M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Io,M),ye(this,Br,!!M),ye(this,dt,new Map),ye(this,Xe,new Array(n).fill(void 0)),ye(this,ke,new Array(n).fill(void 0)),ye(this,Pt,new P(n)),ye(this,qt,new P(n)),ye(this,Et,0),ye(this,gt,0),ye(this,kn,bc.create(n)),ye(this,pt,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,yt,[])):(ye(this,bn,void 0),ye(this,yt,void 0)),ye(this,Tn,!!b(this,wn)),ye(this,Rt,!!b(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!W,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(b(this,Ht)!==0&&!Ar(b(this,Ht)))throw new TypeError("maxSize must be a positive integer if specified");if(!Ar(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,$g).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!k,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Ar(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Ar(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,qd).call(this)}if(b(this,vn)===0&&this.ttl===0&&b(this,Ht)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,vn)&&!b(this,Ht)){const G="LRU_CACHE_UNBOUNDED";bP(G)&&(Qh.add(G),ef("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",G,Sc))}}static unsafeExposeInternals(e){return{starts:b(e,En),ttls:b(e,Kt),sizes:b(e,Sn),keyMap:b(e,dt),keyList:b(e,Xe),valList:b(e,ke),next:b(e,Pt),prev:b(e,qt),get head(){return b(e,Et)},get tail(){return b(e,gt)},free:b(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,Qe).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,ol).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ms).call(o,n)},indexes:n=>{var o;return ue(o=e,re,Gr).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,zr).call(o,n)},isStale:n=>{var o;return b(o=e,Yt).call(o,n)}}}get max(){return b(this,vn)}get maxSize(){return b(this,Ht)}get calculatedSize(){return b(this,xn)}get size(){return b(this,pt)}get fetchMethod(){return b(this,Io)}get memoMethod(){return b(this,Fo)}get dispose(){return b(this,wn)}get disposeAfter(){return b(this,bn)}getRemainingTTL(e){return b(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&b(this,Xe)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield[b(this,Xe)[e],b(this,ke)[e]])}*rentries(){for(const e of ue(this,re,zr).call(this))b(this,ke)[e]!==void 0&&b(this,Xe)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield[b(this,Xe)[e],b(this,ke)[e]])}*keys(){for(const e of ue(this,re,Gr).call(this)){const n=b(this,Xe)[e];n!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,zr).call(this)){const n=b(this,Xe)[e];n!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield n)}}*values(){for(const e of ue(this,re,Gr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}*rvalues(){for(const e of ue(this,re,zr).call(this))b(this,ke)[e]!==void 0&&!ue(this,re,Qe).call(this,b(this,ke)[e])&&(yield b(this,ke)[e])}[(sf=Symbol.iterator,of=Symbol.toStringTag,sf)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,Gr).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,b(this,Xe)[o],this))return this.get(b(this,Xe)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,Gr).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Xe)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,zr).call(this)){const i=b(this,ke)[o],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,b(this,Xe)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,zr).call(this,{allowStale:!0}))b(this,Yt).call(this,n)&&(ue(this,re,Ur).call(this,b(this,Xe)[n],"expire"),e=!0);return e}info(e){const n=b(this,dt).get(e);if(n===void 0)return;const o=b(this,ke)[n],i=ue(this,re,Qe).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(b(this,Kt)&&b(this,En)){const c=b(this,Kt)[n],d=b(this,En)[n];if(c&&d){const p=c-(Ro.now()-d);l.ttl=p,l.start=Date.now()}}return b(this,Sn)&&(l.size=b(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,Gr).call(this,{allowStale:!0})){const o=b(this,Xe)[n],i=b(this,ke)[n],l=ue(this,re,Qe).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Kt)&&b(this,En)){c.ttl=b(this,Kt)[n];const d=Ro.now()-b(this,En)[n];c.start=Math.floor(Date.now()-d)}b(this,Sn)&&(c.size=b(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Ro.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var w,v,T,O,M;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=b(this,ji).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,Ur).call(this,e,"set"),this;let y=b(this,pt)===0?void 0:b(this,dt).get(e);if(y===void 0)y=b(this,pt)===0?b(this,gt):b(this,kn).length!==0?b(this,kn).pop():b(this,pt)===b(this,vn)?ue(this,re,rl).call(this,!1):b(this,pt),b(this,Xe)[y]=e,b(this,ke)[y]=n,b(this,dt).set(e,y),b(this,Pt)[b(this,gt)]=y,b(this,qt)[y]=b(this,gt),ye(this,gt,y),nl(this,pt)._++,b(this,Lo).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ms).call(this,y);const V=b(this,ke)[y];if(n!==V){if(b(this,Br)&&ue(this,re,Qe).call(this,V)){V.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:U}=V;U!==void 0&&!c&&(b(this,Tn)&&((w=b(this,wn))==null||w.call(this,U,e,"set")),b(this,Rt)&&((v=b(this,yt))==null||v.push([U,e,"set"])))}else c||(b(this,Tn)&&((T=b(this,wn))==null||T.call(this,V,e,"set")),b(this,Rt)&&((O=b(this,yt))==null||O.push([V,e,"set"])));if(b(this,to).call(this,y),b(this,Lo).call(this,y,m,p),b(this,ke)[y]=n,p){p.set="replace";const U=V&&ue(this,re,Qe).call(this,V)?V.__staleWhileFetching:V;U!==void 0&&(p.oldValue=U)}}else p&&(p.set="update")}if(i!==0&&!b(this,Kt)&&ue(this,re,qd).call(this),b(this,Kt)&&(h||b(this,Wi).call(this,y,i,l),p&&b(this,Qn).call(this,p,y)),!c&&b(this,Rt)&&b(this,yt)){const V=b(this,yt);let U;for(;U=V==null?void 0:V.shift();)(M=b(this,bn))==null||M.call(this,...U)}return this}pop(){var e;try{for(;b(this,pt);){const n=b(this,ke)[b(this,Et)];if(ue(this,re,rl).call(this,!0),ue(this,re,Qe).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Rt)&&b(this,yt)){const n=b(this,yt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=b(this,dt).get(e);if(l!==void 0){const c=b(this,ke)[l];if(ue(this,re,Qe).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Yt).call(this,l))i&&(i.has="stale",b(this,Qn).call(this,i,l));else return o&&b(this,eo).call(this,l),i&&(i.has="hit",b(this,Qn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=b(this,dt).get(e);if(i===void 0||!o&&b(this,Yt).call(this,i))return;const l=b(this,ke)[i];return ue(this,re,Qe).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:O,forceRefresh:M=!1,status:V,signal:U}=n;if(!b(this,Br))return V&&(V.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:V});const k={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:T,ignoreFetchAbort:v,status:V,signal:U};let W=b(this,dt).get(e);if(W===void 0){V&&(V.fetch="miss");const A=ue(this,re,ol).call(this,e,W,k,O);return A.__returned=A}else{const A=b(this,ke)[W];if(ue(this,re,Qe).call(this,A)){const F=o&&A.__staleWhileFetching!==void 0;return V&&(V.fetch="inflight",F&&(V.returnedStale=!0)),F?A.__staleWhileFetching:A.__returned=A}const S=b(this,Yt).call(this,W);if(!M&&!S)return V&&(V.fetch="hit"),ue(this,re,ms).call(this,W),i&&b(this,eo).call(this,W),V&&b(this,Qn).call(this,V,W),A;const P=ue(this,re,ol).call(this,e,W,k,O),Y=P.__staleWhileFetching!==void 0&&o;return V&&(V.fetch=S?"stale":"refresh",Y&&S&&(V.returnedStale=!0)),Y?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Fo);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=b(this,dt).get(e);if(d!==void 0){const p=b(this,ke)[d],h=ue(this,re,Qe).call(this,p);return c&&b(this,Qn).call(this,c,d),b(this,Yt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,Ur).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ms).call(this,d),i&&b(this,eo).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,Ur).call(this,e,"delete")}clear(){return ue(this,re,Xd).call(this,"delete")}};vn=new WeakMap,Ht=new WeakMap,wn=new WeakMap,bn=new WeakMap,Io=new WeakMap,Fo=new WeakMap,pt=new WeakMap,xn=new WeakMap,dt=new WeakMap,Xe=new WeakMap,ke=new WeakMap,Pt=new WeakMap,qt=new WeakMap,Et=new WeakMap,gt=new WeakMap,kn=new WeakMap,yt=new WeakMap,Sn=new WeakMap,En=new WeakMap,Kt=new WeakMap,Tn=new WeakMap,Br=new WeakMap,Rt=new WeakMap,re=new WeakSet,qd=function(){const e=new da(b(this,vn)),n=new da(b(this,vn));ye(this,Kt,e),ye(this,En,n),ye(this,Wi,(l,c,d=Ro.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Yt).call(this,l)&&ue(this,re,Ur).call(this,b(this,Xe)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,eo,l=>{n[l]=e[l]!==0?Ro.now():0}),ye(this,Qn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Ro.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Yt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},eo=new WeakMap,Qn=new WeakMap,Wi=new WeakMap,Yt=new WeakMap,$g=function(){const e=new da(b(this,vn));ye(this,xn,0),ye(this,Sn,e),ye(this,to,n=>{ye(this,xn,b(this,xn)-e[n]),e[n]=0}),ye(this,ji,(n,o,i,l)=>{if(ue(this,re,Qe).call(this,o))return 0;if(!Ar(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Ar(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}),ye(this,Lo,(n,o,i)=>{if(e[n]=o,b(this,Ht)){const l=b(this,Ht)-e[n];for(;b(this,xn)>l;)ue(this,re,rl).call(this,!0)}ye(this,xn,b(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=b(this,xn))})},to=new WeakMap,Lo=new WeakMap,ji=new WeakMap,Gr=function*({allowStale:e=this.allowStale}={}){if(b(this,pt))for(let n=b(this,gt);!(!ue(this,re,Kd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,Et)));)n=b(this,qt)[n]},zr=function*({allowStale:e=this.allowStale}={}){if(b(this,pt))for(let n=b(this,Et);!(!ue(this,re,Kd).call(this,n)||((e||!b(this,Yt).call(this,n))&&(yield n),n===b(this,gt)));)n=b(this,Pt)[n]},Kd=function(e){return e!==void 0&&b(this,dt).get(b(this,Xe)[e])===e},rl=function(e){var l,c;const n=b(this,Et),o=b(this,Xe)[n],i=b(this,ke)[n];return b(this,Br)&&ue(this,re,Qe).call(this,i)?i.__abortController.abort(new Error("evicted")):(b(this,Tn)||b(this,Rt))&&(b(this,Tn)&&((l=b(this,wn))==null||l.call(this,i,o,"evict")),b(this,Rt)&&((c=b(this,yt))==null||c.push([i,o,"evict"]))),b(this,to).call(this,n),e&&(b(this,Xe)[n]=void 0,b(this,ke)[n]=void 0,b(this,kn).push(n)),b(this,pt)===1?(ye(this,Et,ye(this,gt,0)),b(this,kn).length=0):ye(this,Et,b(this,Pt)[n]),b(this,dt).delete(o),nl(this,pt)._--,n},ol=function(e,n,o,i){const l=n===void 0?void 0:b(this,ke)[n];if(ue(this,re,Qe).call(this,l))return l;const c=new ca,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(O,M=!1)=>{const{aborted:V}=c.signal,U=o.ignoreFetchAbort&&O!==void 0;if(o.status&&(V&&!M?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,U&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),V&&!U&&!M)return y(c.signal.reason);const k=v;return b(this,ke)[n]===v&&(O===void 0?k.__staleWhileFetching?b(this,ke)[n]=k.__staleWhileFetching:ue(this,re,Ur).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,O,p.options))),O},m=O=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=O),y(O)),y=O=>{const{aborted:M}=c.signal,V=M&&o.allowStaleOnFetchAbort,U=V||o.allowStaleOnFetchRejection,k=U||o.noDeleteOnFetchRejection,W=v;if(b(this,ke)[n]===v&&(!k||W.__staleWhileFetching===void 0?ue(this,re,Ur).call(this,e,"fetch"):V||(b(this,ke)[n]=W.__staleWhileFetching)),U)return o.status&&W.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),W.__staleWhileFetching;if(W.__returned===W)throw O},w=(O,M)=>{var U;const V=(U=b(this,Io))==null?void 0:U.call(this,e,l,p);V&&V instanceof Promise&&V.then(k=>O(k===void 0?void 0:k),M),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(O(void 0),o.allowStaleOnFetchAbort&&(O=k=>h(k,!0)))})};o.status&&(o.status.fetchDispatched=!0);const v=new Promise(w).then(h,m),T=Object.assign(v,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,T,{...p.options,status:void 0}),n=b(this,dt).get(e)):b(this,ke)[n]=T,T},Qe=function(e){if(!b(this,Br))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof ca},Yd=function(e,n){b(this,qt)[n]=e,b(this,Pt)[e]=n},ms=function(e){e!==b(this,gt)&&(e===b(this,Et)?ye(this,Et,b(this,Pt)[e]):ue(this,re,Yd).call(this,b(this,qt)[e],b(this,Pt)[e]),ue(this,re,Yd).call(this,b(this,gt),e),ye(this,gt,e))},Ur=function(e,n){var i,l,c,d;let o=!1;if(b(this,pt)!==0){const p=b(this,dt).get(e);if(p!==void 0)if(o=!0,b(this,pt)===1)ue(this,re,Xd).call(this,n);else{b(this,to).call(this,p);const h=b(this,ke)[p];if(ue(this,re,Qe).call(this,h)?h.__abortController.abort(new Error("deleted")):(b(this,Tn)||b(this,Rt))&&(b(this,Tn)&&((i=b(this,wn))==null||i.call(this,h,e,n)),b(this,Rt)&&((l=b(this,yt))==null||l.push([h,e,n]))),b(this,dt).delete(e),b(this,Xe)[p]=void 0,b(this,ke)[p]=void 0,p===b(this,gt))ye(this,gt,b(this,qt)[p]);else if(p===b(this,Et))ye(this,Et,b(this,Pt)[p]);else{const m=b(this,qt)[p];b(this,Pt)[m]=b(this,Pt)[p];const y=b(this,Pt)[p];b(this,qt)[y]=b(this,qt)[p]}nl(this,pt)._--,b(this,kn).push(p)}}if(b(this,Rt)&&((c=b(this,yt))!=null&&c.length)){const p=b(this,yt);let h;for(;h=p==null?void 0:p.shift();)(d=b(this,bn))==null||d.call(this,...h)}return o},Xd=function(e){var n,o,i;for(const l of ue(this,re,zr).call(this,{allowStale:!0})){const c=b(this,ke)[l];if(ue(this,re,Qe).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=b(this,Xe)[l];b(this,Tn)&&((n=b(this,wn))==null||n.call(this,c,d,e)),b(this,Rt)&&((o=b(this,yt))==null||o.push([c,d,e]))}}if(b(this,dt).clear(),b(this,ke).fill(void 0),b(this,Xe).fill(void 0),b(this,Kt)&&b(this,En)&&(b(this,Kt).fill(0),b(this,En).fill(0)),b(this,Sn)&&b(this,Sn).fill(0),ye(this,Et,0),ye(this,gt,0),b(this,kn).length=0,ye(this,xn,0),ye(this,pt,0),b(this,Rt)&&b(this,yt)){const l=b(this,yt);let c;for(;c=l==null?void 0:l.shift();)(i=b(this,bn))==null||i.call(this,...c)}};let xc=Sc;const xP={cacheSize:15e6};class kP{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 no=class no{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...xP,...e??{}};this.fileDataCache=new xc({maxSize:n.cacheSize,fetchMethod:async o=>new kP(await Ts().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.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 n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return no.globalInstance.getContentBytes(e)}static getContentString(e){return no.globalInstance.getContentString(e)}static getContentJson(e,n){return no.globalInstance.getContentJson(e,n)}};Ze(no,"globalInstance",new no);let kc=no;I.AgGridTheme=ju,I.BlockLayout=fV,I.ContextProvider=QE,I.DataTable=D0,I.DemoData=QN,I.DropdownListItem=xo,I.DropdownOverlay=Hl,I.LongText=Wl,I.MultiError=_s,I.PlAccordion=Xk,I.PlAccordionSection=sS,I.PlAgCellFile=qV,I.PlAgCellStatusTag=YV,I.PlAgColumnHeader=ah,I.PlAgCsvExporter=vh,I.PlAgDataTable=UV,I.PlAgDataTableRowNumberColId=Un,I.PlAgDataTableToolsPanel=LV,I.PlAgGridColumnManager=Ch,I.PlAgOverlayLoading=ih,I.PlAgOverlayNoRows=sh,I.PlAgTextAndButtonCell=lh,I.PlAlert=uw,I.PlBlockPage=X0,I.PlBtnAccent=Vw,I.PlBtnDanger=Bw,I.PlBtnGhost=Hr,I.PlBtnGroup=_p,I.PlBtnLink=Mw,I.PlBtnPrimary=Fs,I.PlBtnSecondary=Ml,I.PlBtnSplit=kw,I.PlCheckbox=ak,I.PlCheckboxGroup=uk,I.PlChip=ql,I.PlCloseModalBtn=Vp,I.PlContainer=Q0,I.PlDialogModal=Yl,I.PlDropdown=ko,I.PlDropdownLegacy=Px,I.PlDropdownLine=Np,I.PlDropdownMulti=ik,I.PlDropdownRef=ax,I.PlEditableTitle=cb,I.PlFileDialog=Lp,I.PlFileInput=Qp,I.PlGrid=iw,I.PlIcon16=qr,I.PlIcon24=Os,I.PlLogView=Bp,I.PlMaskIcon16=Wt,I.PlMaskIcon24=ut,I.PlNotificationAlert=eh,I.PlNumberField=Zx,I.PlProgressBar=Lx,I.PlRow=tw,I.PlSearchField=kp,I.PlSectionSeparator=Pp,I.PlSlideModal=$s,I.PlSpacer=gp,I.PlStatusTag=Rp,I.PlTableFilters=yP,I.PlTabs=Wk,I.PlTextArea=Wb,I.PlTextField=Kr,I.PlToggleSwitch=Gs,I.PlTooltip=vt,I.ReactiveFileContent=kc,I.Scrollable=z1,I.Slider=th,I.SliderRange=O1,I.SliderRangeTriple=E1,I.ThemeSwitcher=Z0,I.UnresolvedError=sl,I.ValueOrErrorsComponent=jV,I.activateAgGrid=Wu,I.animate=dp,I.animateInfinite=M0,I.autoSizeRowNumberColumn=uh,I.call=ip,I.computedResult=vP,I.createModel=pl,I.debounce=up,I.defineApp=cv,I.defineStore=CP,I.delay=sp,I.detectOutside=jb,I.ensureError=cl,I.eventListener=jl,I.focusRow=_h,I.formatZodError=ul,I.getElementScrollPosition=Tp,I.identity=ll,I.isDefined=ty,I.isElementVisible=Ep,I.isJsonEqual=al,I.isZodError=dl,I.listToOptions=$0,I.makeEaseInOut=O0,I.makeEaseOut=cp,I.makeOnceTracker=gh,I.makeRowNumberColDef=dh,I.maskIcons16=XN,I.maskIcons24=JN,I.normalizeListOptions=wr,I.notEmpty=Dl,I.randomInt=lp,I.randomString=L0,I.requestTick=Il,I.scrollIntoView=Ms,I.showContextMenu=Bl,I.throttle=pp,I.timeout=ap,I.trackFirstDataRendered=yh,I.unwrapOptionalResult=ey,I.unwrapValueOrErrors=iu,I.useClickOutside=Ls,I.useDraggable=m1,I.useEventListener=st,I.useFormState=h1,I.useHover=rp,I.useInterval=p1,I.useLabelNotch=Xn,I.useLocalStorage=hp,I.useMouse=np,I.useMouseCapture=vr,I.usePosition=bi,I.useQuery=f1,I.useResizeObserver=nh,I.useScroll=d1,I.useSdkPlugin=Nl,I.useSortable=oh,I.useTheme=mp,I.useWatchFetch=wP,I.wrapOptionalResult=su,I.wrapValueOrErrors=Qg,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|
|
92
92
|
//# sourceMappingURL=lib.umd.cjs.map
|