@milaboratories/milaboratories.monetization-test.ui 1.1.89 → 1.1.90
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/assets/{index-Ce-vlSVy.js → index-BffgXBr-.js} +2 -2
- package/dist/assets/{index-Ce-vlSVy.js.map → index-BffgXBr-.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +6 -6
|
@@ -14,7 +14,7 @@ var S4=Object.defineProperty;var TE=A=>{throw TypeError(A)};var R4=(A,e,t)=>e in
|
|
|
14
14
|
* @vue/runtime-dom v3.5.13
|
|
15
15
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
16
|
* @license MIT
|
|
17
|
-
**/let qC;const r2=typeof window<"u"&&window.trustedTypes;if(r2)try{qC=r2.createPolicy("vue",{createHTML:A=>A})}catch{}const N1=qC?A=>qC.createHTML(A):A=>A,yy="http://www.w3.org/2000/svg",Sy="http://www.w3.org/1998/Math/MathML",or=typeof document<"u"?document:null,s2=or&&or.createElement("template"),Ry={insert:(A,e,t)=>{e.insertBefore(A,t||null)},remove:A=>{const e=A.parentNode;e&&e.removeChild(A)},createElement:(A,e,t,i)=>{const o=e==="svg"?or.createElementNS(yy,A):e==="mathml"?or.createElementNS(Sy,A):t?or.createElement(A,{is:t}):or.createElement(A);return A==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:A=>or.createTextNode(A),createComment:A=>or.createComment(A),setText:(A,e)=>{A.nodeValue=e},setElementText:(A,e)=>{A.textContent=e},parentNode:A=>A.parentNode,nextSibling:A=>A.nextSibling,querySelector:A=>or.querySelector(A),setScopeId(A,e){A.setAttribute(e,"")},insertStaticContent(A,e,t,i,o,r){const s=t?t.previousSibling:e.lastChild;if(o&&(o===r||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),t),!(o===r||!(o=o.nextSibling)););else{s2.innerHTML=N1(i==="svg"?`<svg>${A}</svg>`:i==="mathml"?`<math>${A}</math>`:A);const n=s2.content;if(i==="svg"||i==="mathml"){const a=n.firstChild;for(;a.firstChild;)n.appendChild(a.firstChild);n.removeChild(a)}e.insertBefore(n,t)}return[s?s.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},Sr="transition",Na="animation",Ol=Symbol("_vtc"),H1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ky=Xe({},$Q,H1),Py=A=>(A.displayName="Transition",A.props=ky,A),YB=Py((A,{slots:e})=>xy(S3,Yy(A),e)),bs=(A,e=[])=>{SA(A)?A.forEach(t=>t(...e)):A&&A(...e)},n2=A=>A?SA(A)?A.some(e=>e.length>1):A.length>1:!1;function Yy(A){const e={};for(const M in A)M in H1||(e[M]=A[M]);if(A.css===!1)return e;const{name:t="v",type:i,duration:o,enterFromClass:r=`${t}-enter-from`,enterActiveClass:s=`${t}-enter-active`,enterToClass:n=`${t}-enter-to`,appearFromClass:a=r,appearActiveClass:l=s,appearToClass:g=n,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:h=`${t}-leave-to`}=A,u=Gy(o),p=u&&u[0],C=u&&u[1],{onBeforeEnter:B,onEnter:f,onEnterCancelled:E,onLeave:w,onLeaveCancelled:I,onBeforeAppear:m=B,onAppear:x=f,onAppearCancelled:D=E}=e,v=(M,z,T,y)=>{M._enterCancelled=y,Ms(M,z?g:n),Ms(M,z?l:s),T&&T()},U=(M,z)=>{M._isLeaving=!1,Ms(M,c),Ms(M,h),Ms(M,d),z&&z()},S=M=>(z,T)=>{const y=M?x:f,H=()=>v(z,M,T);bs(y,[z,H]),a2(()=>{Ms(z,M?a:r),Ar(z,M?g:n),n2(y)||l2(z,i,p,H)})};return Xe(e,{onBeforeEnter(M){bs(B,[M]),Ar(M,r),Ar(M,s)},onBeforeAppear(M){bs(m,[M]),Ar(M,a),Ar(M,l)},onEnter:S(!1),onAppear:S(!0),onLeave(M,z){M._isLeaving=!0;const T=()=>U(M,z);Ar(M,c),M._enterCancelled?(Ar(M,d),d2()):(d2(),Ar(M,d)),a2(()=>{M._isLeaving&&(Ms(M,c),Ar(M,h),n2(w)||l2(M,i,C,T))}),bs(w,[M,T])},onEnterCancelled(M){v(M,!1,void 0,!0),bs(E,[M])},onAppearCancelled(M){v(M,!0,void 0,!0),bs(D,[M])},onLeaveCancelled(M){U(M),bs(I,[M])}})}function Gy(A){if(A==null)return null;if(pe(A))return[Pu(A.enter),Pu(A.leave)];{const e=Pu(A);return[e,e]}}function Pu(A){return T4(A)}function Ar(A,e){e.split(/\s+/).forEach(t=>t&&A.classList.add(t)),(A[Ol]||(A[Ol]=new Set)).add(e)}function Ms(A,e){e.split(/\s+/).forEach(i=>i&&A.classList.remove(i));const t=A[Ol];t&&(t.delete(e),t.size||(A[Ol]=void 0))}function a2(A){requestAnimationFrame(()=>{requestAnimationFrame(A)})}let Ly=0;function l2(A,e,t,i){const o=A._endId=++Ly,r=()=>{o===A._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:s,timeout:n,propCount:a}=Ty(A,e);if(!s)return i();const l=s+"end";let g=0;const c=()=>{A.removeEventListener(l,d),r()},d=h=>{h.target===A&&++g>=a&&c()};setTimeout(()=>{g<a&&c()},n+1),A.addEventListener(l,d)}function Ty(A,e){const t=window.getComputedStyle(A),i=u=>(t[u]||"").split(", "),o=i(`${Sr}Delay`),r=i(`${Sr}Duration`),s=g2(o,r),n=i(`${Na}Delay`),a=i(`${Na}Duration`),l=g2(n,a);let g=null,c=0,d=0;e===Sr?s>0&&(g=Sr,c=s,d=r.length):e===Na?l>0&&(g=Na,c=l,d=a.length):(c=Math.max(s,l),g=c>0?s>l?Sr:Na:null,d=g?g===Sr?r.length:a.length:0);const h=g===Sr&&/\b(transform|all)(,|$)/.test(i(`${Sr}Property`).toString());return{type:g,timeout:c,propCount:d,hasTransform:h}}function g2(A,e){for(;A.length<e.length;)A=A.concat(A);return Math.max(...e.map((t,i)=>c2(t)+c2(A[i])))}function c2(A){return A==="auto"?0:Number(A.slice(0,-1).replace(",","."))*1e3}function d2(){return document.body.offsetHeight}function Uy(A,e,t){const i=A[Ol];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?A.removeAttribute("class"):t?A.setAttribute("class",e):A.className=e}const h2=Symbol("_vod"),Ny=Symbol("_vsh"),z1=Symbol("");function Hy(A){const e=Rg();if(!e)return;const t=e.ut=(o=A(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>Ed(r,o))},i=()=>{const o=A(e.proxy);e.ce?Ed(e.ce,o):XC(e.subTree,o),t(o)};s1(()=>{JQ(i)}),jo(()=>{ne(i,$i,{flush:"post"});const o=new MutationObserver(i);o.observe(e.subTree.el.parentNode,{childList:!0}),yg(()=>o.disconnect())})}function XC(A,e){if(A.shapeFlag&128){const t=A.suspense;A=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{XC(t.activeBranch,e)})}for(;A.component;)A=A.component.subTree;if(A.shapeFlag&1&&A.el)Ed(A.el,e);else if(A.type===oe)A.children.forEach(t=>XC(t,e));else if(A.type===Nc){let{el:t,anchor:i}=A;for(;t&&(Ed(t,e),t!==i);)t=t.nextSibling}}function Ed(A,e){if(A.nodeType===1){const t=A.style;let i="";for(const o in e)t.setProperty(`--${o}`,e[o]),i+=`--${o}: ${e[o]};`;t[z1]=i}}const zy=/(^|;)\s*display\s*:/;function Oy(A,e,t){const i=A.style,o=Re(t);let r=!1;if(t&&!o){if(e)if(Re(e))for(const s of e.split(";")){const n=s.slice(0,s.indexOf(":")).trim();t[n]==null&&zc(i,n,"")}else for(const s in e)t[s]==null&&zc(i,s,"");for(const s in t)s==="display"&&(r=!0),zc(i,s,t[s])}else if(o){if(e!==t){const s=i[z1];s&&(t+=";"+s),i.cssText=t,r=zy.test(t)}}else e&&A.removeAttribute("style");h2 in A&&(A[h2]=r?i.display:"",A[Ny]&&(i.display="none"))}const u2=/\s*!important$/;function zc(A,e,t){if(SA(t))t.forEach(i=>zc(A,e,i));else if(t==null&&(t=""),e.startsWith("--"))A.setProperty(e,t);else{const i=Vy(A,e);u2.test(t)?A.setProperty(Dr(i),t.replace(u2,""),"important"):A[i]=t}}const p2=["Webkit","Moz","ms"],Yu={};function Vy(A,e){const t=Yu[e];if(t)return t;let i=mi(e);if(i!=="filter"&&i in A)return Yu[e]=i;i=Bh(i);for(let o=0;o<p2.length;o++){const r=p2[o]+i;if(r in A)return Yu[e]=r}return e}const C2="http://www.w3.org/1999/xlink";function B2(A,e,t,i,o,r=J4(e)){i&&e.startsWith("xlink:")?t==null?A.removeAttributeNS(C2,e.slice(6,e.length)):A.setAttributeNS(C2,e,t):t==null||r&&!EQ(t)?A.removeAttribute(e):A.setAttribute(e,r?"":no(t)?String(t):t)}function f2(A,e,t,i,o){if(e==="innerHTML"||e==="textContent"){t!=null&&(A[e]=e==="innerHTML"?N1(t):t);return}const r=A.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const n=r==="OPTION"?A.getAttribute("value")||"":A.value,a=t==null?A.type==="checkbox"?"on":"":String(t);(n!==a||!("_value"in A))&&(A.value=a),t==null&&A.removeAttribute(e),A._value=t;return}let s=!1;if(t===""||t==null){const n=typeof A[e];n==="boolean"?t=EQ(t):t==null&&n==="string"?(t="",s=!0):n==="number"&&(t=0,s=!0)}try{A[e]=t}catch{}s&&A.removeAttribute(o||e)}function cr(A,e,t,i){A.addEventListener(e,t,i)}function Jy(A,e,t,i){A.removeEventListener(e,t,i)}const E2=Symbol("_vei");function jy(A,e,t,i,o=null){const r=A[E2]||(A[E2]={}),s=r[e];if(i&&s)s.value=i;else{const[n,a]=Wy(e);if(i){const l=r[e]=Xy(i,o);cr(A,n,l,a)}else s&&(Jy(A,n,s,a),r[e]=void 0)}}const w2=/(?:Once|Passive|Capture)$/;function Wy(A){let e;if(w2.test(A)){e={};let i;for(;i=A.match(w2);)A=A.slice(0,A.length-i[0].length),e[i[0].toLowerCase()]=!0}return[A[2]===":"?A.slice(3):Dr(A.slice(2)),e]}let Gu=0;const Ky=Promise.resolve(),qy=()=>Gu||(Ky.then(()=>Gu=0),Gu=Date.now());function Xy(A,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ao(Zy(i,t.value),e,5,[i])};return t.value=A,t.attached=qy(),t}function Zy(A,e){if(SA(e)){const t=A.stopImmediatePropagation;return A.stopImmediatePropagation=()=>{t.call(A),A._stopped=!0},e.map(i=>o=>!o._stopped&&i&&i(o))}else return e}const I2=A=>A.charCodeAt(0)===111&&A.charCodeAt(1)===110&&A.charCodeAt(2)>96&&A.charCodeAt(2)<123,_y=(A,e,t,i,o,r)=>{const s=o==="svg";e==="class"?Uy(A,i,s):e==="style"?Oy(A,t,i):ph(e)?wB(e)||jy(A,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):$y(A,e,i,s))?(f2(A,e,i),!A.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&B2(A,e,i,s,r,e!=="value")):A._isVueCE&&(/[A-Z]/.test(e)||!Re(i))?f2(A,mi(e),i,r,e):(e==="true-value"?A._trueValue=i:e==="false-value"&&(A._falseValue=i),B2(A,e,i,s))};function $y(A,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in A&&I2(e)&&JA(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&A.tagName==="INPUT"||e==="type"&&A.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=A.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return I2(e)&&Re(t)?!1:e in A}const ls=A=>{const e=A.props["onUpdate:modelValue"]||!1;return SA(e)?t=>Tc(e,t):e};function AS(A){A.target.composing=!0}function m2(A){const e=A.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ki=Symbol("_assign"),Vl={created(A,{modifiers:{lazy:e,trim:t,number:i}},o){A[ki]=ls(o);const r=i||o.props&&o.props.type==="number";cr(A,e?"change":"input",s=>{if(s.target.composing)return;let n=A.value;t&&(n=n.trim()),r&&(n=gd(n)),A[ki](n)}),t&&cr(A,"change",()=>{A.value=A.value.trim()}),e||(cr(A,"compositionstart",AS),cr(A,"compositionend",m2),cr(A,"change",m2))},mounted(A,{value:e}){A.value=e??""},beforeUpdate(A,{value:e,oldValue:t,modifiers:{lazy:i,trim:o,number:r}},s){if(A[ki]=ls(s),A.composing)return;const n=(r||A.type==="number")&&!/^0\d/.test(A.value)?gd(A.value):A.value,a=e??"";n!==a&&(document.activeElement===A&&A.type!=="range"&&(i&&e===t||o&&A.value.trim()===a)||(A.value=a))}},eS={deep:!0,created(A,e,t){A[ki]=ls(t),cr(A,"change",()=>{const i=A._modelValue,o=ua(A),r=A.checked,s=A[ki];if(SA(i)){const n=QB(i,o),a=n!==-1;if(r&&!a)s(i.concat(o));else if(!r&&a){const l=[...i];l.splice(n,1),s(l)}}else if(Ma(i)){const n=new Set(i);r?n.add(o):n.delete(o),s(n)}else s(O1(A,r))})},mounted:Q2,beforeUpdate(A,e,t){A[ki]=ls(t),Q2(A,e,t)}};function Q2(A,{value:e,oldValue:t},i){A._modelValue=e;let o;if(SA(e))o=QB(e,i.props.value)>-1;else if(Ma(e))o=e.has(i.props.value);else{if(e===t)return;o=tn(e,O1(A,!0))}A.checked!==o&&(A.checked=o)}const tS={created(A,{value:e},t){A.checked=tn(e,t.props.value),A[ki]=ls(t),cr(A,"change",()=>{A[ki](ua(A))})},beforeUpdate(A,{value:e,oldValue:t},i){A[ki]=ls(i),e!==t&&(A.checked=tn(e,i.props.value))}},iS={deep:!0,created(A,{value:e,modifiers:{number:t}},i){const o=Ma(e);cr(A,"change",()=>{const r=Array.prototype.filter.call(A.options,s=>s.selected).map(s=>t?gd(ua(s)):ua(s));A[ki](A.multiple?o?new Set(r):r:r[0]),A._assigning=!0,vh(()=>{A._assigning=!1})}),A[ki]=ls(i)},mounted(A,{value:e}){v2(A,e)},beforeUpdate(A,e,t){A[ki]=ls(t)},updated(A,{value:e}){A._assigning||v2(A,e)}};function v2(A,e){const t=A.multiple,i=SA(e);if(!(t&&!i&&!Ma(e))){for(let o=0,r=A.options.length;o<r;o++){const s=A.options[o],n=ua(s);if(t)if(i){const a=typeof n;a==="string"||a==="number"?s.selected=e.some(l=>String(l)===String(n)):s.selected=QB(e,n)>-1}else s.selected=e.has(n);else if(tn(ua(s),e)){A.selectedIndex!==o&&(A.selectedIndex=o);return}}!t&&A.selectedIndex!==-1&&(A.selectedIndex=-1)}}function ua(A){return"_value"in A?A._value:A.value}function O1(A,e){const t=e?"_trueValue":"_falseValue";return t in A?A[t]:e}const oS={created(A,e,t){ac(A,e,t,null,"created")},mounted(A,e,t){ac(A,e,t,null,"mounted")},beforeUpdate(A,e,t,i){ac(A,e,t,i,"beforeUpdate")},updated(A,e,t,i){ac(A,e,t,i,"updated")}};function rS(A,e){switch(A){case"SELECT":return iS;case"TEXTAREA":return Vl;default:switch(e){case"checkbox":return eS;case"radio":return tS;default:return Vl}}}function ac(A,e,t,i,o){const s=rS(A.tagName,t.props&&t.props.type)[o];s&&s(A,e,t,i)}const sS=["ctrl","shift","alt","meta"],nS={stop:A=>A.stopPropagation(),prevent:A=>A.preventDefault(),self:A=>A.target!==A.currentTarget,ctrl:A=>!A.ctrlKey,shift:A=>!A.shiftKey,alt:A=>!A.altKey,meta:A=>!A.metaKey,left:A=>"button"in A&&A.button!==0,middle:A=>"button"in A&&A.button!==1,right:A=>"button"in A&&A.button!==2,exact:(A,e)=>sS.some(t=>A[`${t}Key`]&&!e.includes(t))},fe=(A,e)=>{const t=A._withMods||(A._withMods={}),i=e.join(".");return t[i]||(t[i]=(o,...r)=>{for(let s=0;s<e.length;s++){const n=nS[e[s]];if(n&&n(o,e))return}return A(o,...r)})},aS={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},pa=(A,e)=>{const t=A._withKeys||(A._withKeys={}),i=e.join(".");return t[i]||(t[i]=o=>{if(!("key"in o))return;const r=Dr(o.key);if(e.some(s=>s===r||aS[s]===r))return A(o)})},lS=Xe({patchProp:_y},Ry);let D2;function gS(){return D2||(D2=iy(lS))}const cS=(...A)=>{const e=gS().createApp(...A),{mount:t}=e;return e.mount=i=>{const o=hS(i);if(!o)return;const r=e._component;!JA(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=t(o,!1,dS(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},e};function dS(A){if(A instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&A instanceof MathMLElement)return"mathml"}function hS(A){return Re(A)?document.querySelector(A):A}function uS(A,e){if(A==null)throw Error(e);return A}function ol(A){return new Promise(e=>setTimeout(e,A))}function pS(A,e){return e(A)}var CS={};function BS(A,e){if(!A)return e;const t=A.trim().toLowerCase().match(/^(\d+)(ms|s|m|h)?$/);if(!t)return e;const i=Number(t[1]);switch(t[2]){case"ms":return i;case"s":return i*1e3;case"m":return i*6e4;case"h":return i*36e5;default:return i}}function fS(A=6e4){return BS(CS.TEST_TIMEOUT,A)}fS();function Lu(A){return{type:"Immediate",value:A}}function ES(){return typeof globalThis.getPlatforma<"u"||typeof globalThis.platforma<"u"}function V1(A){if(A&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(A);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function wS(){if(typeof globalThis.cfgRenderCtx<"u")return globalThis.cfgRenderCtx}function ge(){if(typeof globalThis.cfgRenderCtx<"u")return globalThis.cfgRenderCtx;throw new Error("Not in config rendering context")}function Ha(A,e){const t=wS();if(t===void 0)return!1;if(A in t.callbackRegistry)throw new Error(`Callback with key ${A} already registered.`);return t.callbackRegistry[A]=e,!0}const Tu=new Map;function IS(A,e){A in ge().callbackRegistry||(ge().callbackRegistry[A]=t=>{for(const i of Tu.get(A))i(t)},Tu.set(A,[])),Tu.get(A).push(e)}var te;(function(A){A.assertEqual=o=>o;function e(o){}A.assertIs=e;function t(o){throw new Error}A.assertNever=t,A.arrayToEnum=o=>{const r={};for(const s of o)r[s]=s;return r},A.getValidEnumValues=o=>{const r=A.objectKeys(o).filter(n=>typeof o[o[n]]!="number"),s={};for(const n of r)s[n]=o[n];return A.objectValues(s)},A.objectValues=o=>A.objectKeys(o).map(function(r){return o[r]}),A.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const r=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&r.push(s);return r},A.find=(o,r)=>{for(const s of o)if(r(s))return s},A.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function i(o,r=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(r)}A.joinValues=i,A.jsonStringifyReplacer=(o,r)=>typeof r=="bigint"?r.toString():r})(te||(te={}));var ZC;(function(A){A.mergeShapes=(e,t)=>({...e,...t})})(ZC||(ZC={}));const IA=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qr=A=>{switch(typeof A){case"undefined":return IA.undefined;case"string":return IA.string;case"number":return isNaN(A)?IA.nan:IA.number;case"boolean":return IA.boolean;case"function":return IA.function;case"bigint":return IA.bigint;case"symbol":return IA.symbol;case"object":return Array.isArray(A)?IA.array:A===null?IA.null:A.then&&typeof A.then=="function"&&A.catch&&typeof A.catch=="function"?IA.promise:typeof Map<"u"&&A instanceof Map?IA.map:typeof Set<"u"&&A instanceof Set?IA.set:typeof Date<"u"&&A instanceof Date?IA.date:IA.object;default:return IA.unknown}},iA=te.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"]),mS=A=>JSON.stringify(A,null,2).replace(/"([^"]+)":/g,"$1:");class Ei extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(r){return r.message},i={_errors:[]},o=r=>{for(const s of r.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)i._errors.push(t(s));else{let n=i,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(t(s))):n[l]=n[l]||{_errors:[]},n=n[l],a++}}};return o(this),i}static assert(e){if(!(e instanceof Ei))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},i=[];for(const o of this.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(e(o))):i.push(e(o));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}}Ei.create=A=>new Ei(A);const Ca=(A,e)=>{let t;switch(A.code){case iA.invalid_type:A.received===IA.undefined?t="Required":t=`Expected ${A.expected}, received ${A.received}`;break;case iA.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(A.expected,te.jsonStringifyReplacer)}`;break;case iA.unrecognized_keys:t=`Unrecognized key(s) in object: ${te.joinValues(A.keys,", ")}`;break;case iA.invalid_union:t="Invalid input";break;case iA.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${te.joinValues(A.options)}`;break;case iA.invalid_enum_value:t=`Invalid enum value. Expected ${te.joinValues(A.options)}, received '${A.received}'`;break;case iA.invalid_arguments:t="Invalid function arguments";break;case iA.invalid_return_type:t="Invalid function return type";break;case iA.invalid_date:t="Invalid date";break;case iA.invalid_string:typeof A.validation=="object"?"includes"in A.validation?(t=`Invalid input: must include "${A.validation.includes}"`,typeof A.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${A.validation.position}`)):"startsWith"in A.validation?t=`Invalid input: must start with "${A.validation.startsWith}"`:"endsWith"in A.validation?t=`Invalid input: must end with "${A.validation.endsWith}"`:te.assertNever(A.validation):A.validation!=="regex"?t=`Invalid ${A.validation}`:t="Invalid";break;case iA.too_small:A.type==="array"?t=`Array must contain ${A.exact?"exactly":A.inclusive?"at least":"more than"} ${A.minimum} element(s)`:A.type==="string"?t=`String must contain ${A.exact?"exactly":A.inclusive?"at least":"over"} ${A.minimum} character(s)`:A.type==="number"?t=`Number must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${A.minimum}`:A.type==="date"?t=`Date must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(A.minimum))}`:t="Invalid input";break;case iA.too_big:A.type==="array"?t=`Array must contain ${A.exact?"exactly":A.inclusive?"at most":"less than"} ${A.maximum} element(s)`:A.type==="string"?t=`String must contain ${A.exact?"exactly":A.inclusive?"at most":"under"} ${A.maximum} character(s)`:A.type==="number"?t=`Number must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`:A.type==="bigint"?t=`BigInt must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`:A.type==="date"?t=`Date must be ${A.exact?"exactly":A.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(A.maximum))}`:t="Invalid input";break;case iA.custom:t="Invalid input";break;case iA.invalid_intersection_types:t="Intersection results could not be merged";break;case iA.not_multiple_of:t=`Number must be a multiple of ${A.multipleOf}`;break;case iA.not_finite:t="Number must be finite";break;default:t=e.defaultError,te.assertNever(A)}return{message:t}};let J1=Ca;function QS(A){J1=A}function wd(){return J1}const Id=A=>{const{data:e,path:t,errorMaps:i,issueData:o}=A,r=[...t,...o.path||[]],s={...o,path:r};if(o.message!==void 0)return{...o,path:r,message:o.message};let n="";const a=i.filter(l=>!!l).slice().reverse();for(const l of a)n=l(s,{data:e,defaultError:n}).message;return{...o,path:r,message:n}},vS=[];function EA(A,e){const t=wd(),i=Id({issueData:e,data:A.data,path:A.path,errorMaps:[A.common.contextualErrorMap,A.schemaErrorMap,t,t===Ca?void 0:Ca].filter(o=>!!o)});A.common.issues.push(i)}class mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const i=[];for(const o of t){if(o.status==="aborted")return zA;o.status==="dirty"&&e.dirty(),i.push(o.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const i=[];for(const o of t){const r=await o.key,s=await o.value;i.push({key:r,value:s})}return mt.mergeObjectSync(e,i)}static mergeObjectSync(e,t){const i={};for(const o of t){const{key:r,value:s}=o;if(r.status==="aborted"||s.status==="aborted")return zA;r.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(i[r.value]=s.value)}return{status:e.value,value:i}}}const zA=Object.freeze({status:"aborted"}),Un=A=>({status:"dirty",value:A}),Ht=A=>({status:"valid",value:A}),_C=A=>A.status==="aborted",$C=A=>A.status==="dirty",Jl=A=>A.status==="valid",jl=A=>typeof Promise<"u"&&A instanceof Promise;function md(A,e,t,i){if(typeof e=="function"?A!==e||!0:!e.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(A)}function j1(A,e,t,i,o){if(typeof e=="function"?A!==e||!0:!e.has(A))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(A,t),t}var yA;(function(A){A.errToObj=e=>typeof e=="string"?{message:e}:e||{},A.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(yA||(yA={}));var rl,sl;class Lo{constructor(e,t,i,o){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=o}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 b2=(A,e)=>{if(Jl(e))return{success:!0,data:e.value};if(!A.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ei(A.common.issues);return this._error=t,this._error}}};function ZA(A){if(!A)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:o}=A;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,n)=>{var a,l;const{message:g}=A;return s.code==="invalid_enum_value"?{message:g??n.defaultError}:typeof n.data>"u"?{message:(a=g??i)!==null&&a!==void 0?a:n.defaultError}:s.code!=="invalid_type"?{message:n.defaultError}:{message:(l=g??t)!==null&&l!==void 0?l:n.defaultError}},description:o}}class _A{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qr(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(jl(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;const o={common:{issues:[],async:(i=t==null?void 0:t.async)!==null&&i!==void 0?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},r=this._parseSync({data:e,path:o.path,parent:o});return b2(o,r)}async parseAsync(e,t){const i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){const i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},o=this._parse({data:e,path:i.path,parent:i}),r=await(jl(o)?o:Promise.resolve(o));return b2(i,r)}refine(e,t){const i=o=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(o):t;return this._refinement((o,r)=>{const s=e(o),n=()=>r.addIssue({code:iA.custom,...i(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(a=>a?!0:(n(),!1)):s?!0:(n(),!1)})}refinement(e,t){return this._refinement((i,o)=>e(i)?!0:(o.addIssue(typeof t=="function"?t(i,o):t),!1))}_refinement(e){return new lo({schema:this,typeName:HA.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ko.create(this,this._def)}nullable(){return hs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eo.create(this,this._def)}promise(){return fa.create(this,this._def)}or(e){return Xl.create([this,e],this._def)}and(e){return Zl.create(this,e,this._def)}transform(e){return new lo({...ZA(this._def),schema:this,typeName:HA.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new tg({...ZA(this._def),innerType:this,defaultValue:t,typeName:HA.ZodDefault})}brand(){return new GB({typeName:HA.ZodBranded,type:this,...ZA(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ig({...ZA(this._def),innerType:this,catchValue:t,typeName:HA.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Pg.create(this,e)}readonly(){return og.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const DS=/^c[^\s-]{8,}$/i,bS=/^[0-9a-z]+$/,MS=/^[0-9A-HJKMNP-TV-Z]{26}$/,xS=/^[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,FS=/^[a-z0-9_-]{21}$/i,yS=/^[-+]?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)?)??$/,SS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uu;const kS=/^(?:(?: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])$/,PS=/^(([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})))$/,YS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W1="((\\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])))",GS=new RegExp(`^${W1}$`);function K1(A){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return A.precision?e=`${e}\\.\\d{${A.precision}}`:A.precision==null&&(e=`${e}(\\.\\d+)?`),e}function LS(A){return new RegExp(`^${K1(A)}$`)}function q1(A){let e=`${W1}T${K1(A)}`;const t=[];return t.push(A.local?"Z?":"Z"),A.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function TS(A,e){return!!((e==="v4"||!e)&&kS.test(A)||(e==="v6"||!e)&&PS.test(A))}class _i extends _A{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==IA.string){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.string,received:r.parsedType}),zA}const i=new mt;let o;for(const r of this._def.checks)if(r.kind==="min")e.data.length<r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),i.dirty());else if(r.kind==="max")e.data.length>r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),i.dirty());else if(r.kind==="length"){const s=e.data.length>r.value,n=e.data.length<r.value;(s||n)&&(o=this._getOrReturnCtx(e,o),s?EA(o,{code:iA.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&EA(o,{code:iA.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),i.dirty())}else if(r.kind==="email")SS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"email",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="emoji")Uu||(Uu=new RegExp(RS,"u")),Uu.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"emoji",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="uuid")xS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"uuid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="nanoid")FS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"nanoid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="cuid")DS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"cuid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="cuid2")bS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"cuid2",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="ulid")MS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"ulid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),EA(o,{validation:"url",code:iA.invalid_string,message:r.message}),i.dirty()}else r.kind==="regex"?(r.regex.lastIndex=0,r.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"regex",code:iA.invalid_string,message:r.message}),i.dirty())):r.kind==="trim"?e.data=e.data.trim():r.kind==="includes"?e.data.includes(r.value,r.position)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),i.dirty()):r.kind==="toLowerCase"?e.data=e.data.toLowerCase():r.kind==="toUpperCase"?e.data=e.data.toUpperCase():r.kind==="startsWith"?e.data.startsWith(r.value)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{startsWith:r.value},message:r.message}),i.dirty()):r.kind==="endsWith"?e.data.endsWith(r.value)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{endsWith:r.value},message:r.message}),i.dirty()):r.kind==="datetime"?q1(r).test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"datetime",message:r.message}),i.dirty()):r.kind==="date"?GS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"date",message:r.message}),i.dirty()):r.kind==="time"?LS(r).test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"time",message:r.message}),i.dirty()):r.kind==="duration"?yS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"duration",code:iA.invalid_string,message:r.message}),i.dirty()):r.kind==="ip"?TS(e.data,r.version)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"ip",code:iA.invalid_string,message:r.message}),i.dirty()):r.kind==="base64"?YS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"base64",code:iA.invalid_string,message:r.message}),i.dirty()):te.assertNever(r);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(o=>e.test(o),{validation:t,code:iA.invalid_string,...yA.errToObj(i)})}_addCheck(e){return new _i({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...yA.errToObj(e)})}url(e){return this._addCheck({kind:"url",...yA.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...yA.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...yA.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...yA.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...yA.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...yA.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...yA.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...yA.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...yA.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...yA.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,...yA.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...yA.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...yA.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...yA.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...yA.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...yA.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...yA.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...yA.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...yA.errToObj(t)})}nonempty(e){return this.min(1,yA.errToObj(e))}trim(){return new _i({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _i({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}_i.create=A=>{var e;return new _i({checks:[],typeName:HA.ZodString,coerce:(e=A==null?void 0:A.coerce)!==null&&e!==void 0?e:!1,...ZA(A)})};function US(A,e){const t=(A.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,o=t>i?t:i,r=parseInt(A.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return r%s/Math.pow(10,o)}class gs extends _A{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)!==IA.number){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.number,received:r.parsedType}),zA}let i;const o=new mt;for(const r of this._def.checks)r.kind==="int"?te.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.invalid_type,expected:"integer",received:"float",message:r.message}),o.dirty()):r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty()):r.kind==="multipleOf"?US(e.data,r.value)!==0&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_finite,message:r.message}),o.dirty()):te.assertNever(r);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,yA.toString(t))}gt(e,t){return this.setLimit("min",e,!1,yA.toString(t))}lte(e,t){return this.setLimit("max",e,!0,yA.toString(t))}lt(e,t){return this.setLimit("max",e,!1,yA.toString(t))}setLimit(e,t,i,o){return new gs({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:yA.toString(o)}]})}_addCheck(e){return new gs({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:yA.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:yA.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:yA.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:yA.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:yA.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:yA.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:yA.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:yA.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:yA.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&te.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}}gs.create=A=>new gs({checks:[],typeName:HA.ZodNumber,coerce:(A==null?void 0:A.coerce)||!1,...ZA(A)});class cs extends _A{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)!==IA.bigint){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.bigint,received:r.parsedType}),zA}let i;const o=new mt;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):te.assertNever(r);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,yA.toString(t))}gt(e,t){return this.setLimit("min",e,!1,yA.toString(t))}lte(e,t){return this.setLimit("max",e,!0,yA.toString(t))}lt(e,t){return this.setLimit("max",e,!1,yA.toString(t))}setLimit(e,t,i,o){return new cs({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:yA.toString(o)}]})}_addCheck(e){return new cs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:yA.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:yA.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:yA.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:yA.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:yA.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}cs.create=A=>{var e;return new cs({checks:[],typeName:HA.ZodBigInt,coerce:(e=A==null?void 0:A.coerce)!==null&&e!==void 0?e:!1,...ZA(A)})};class Wl extends _A{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==IA.boolean){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.boolean,received:i.parsedType}),zA}return Ht(e.data)}}Wl.create=A=>new Wl({typeName:HA.ZodBoolean,coerce:(A==null?void 0:A.coerce)||!1,...ZA(A)});class sn extends _A{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==IA.date){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.date,received:r.parsedType}),zA}if(isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_date}),zA}const i=new mt;let o;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()<r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),i.dirty()):r.kind==="max"?e.data.getTime()>r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),i.dirty()):te.assertNever(r);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:yA.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:yA.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}sn.create=A=>new sn({checks:[],coerce:(A==null?void 0:A.coerce)||!1,typeName:HA.ZodDate,...ZA(A)});class Qd extends _A{_parse(e){if(this._getType(e)!==IA.symbol){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.symbol,received:i.parsedType}),zA}return Ht(e.data)}}Qd.create=A=>new Qd({typeName:HA.ZodSymbol,...ZA(A)});class Kl extends _A{_parse(e){if(this._getType(e)!==IA.undefined){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.undefined,received:i.parsedType}),zA}return Ht(e.data)}}Kl.create=A=>new Kl({typeName:HA.ZodUndefined,...ZA(A)});class ql extends _A{_parse(e){if(this._getType(e)!==IA.null){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.null,received:i.parsedType}),zA}return Ht(e.data)}}ql.create=A=>new ql({typeName:HA.ZodNull,...ZA(A)});class Ba extends _A{constructor(){super(...arguments),this._any=!0}_parse(e){return Ht(e.data)}}Ba.create=A=>new Ba({typeName:HA.ZodAny,...ZA(A)});class Ws extends _A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ht(e.data)}}Ws.create=A=>new Ws({typeName:HA.ZodUnknown,...ZA(A)});class Er extends _A{_parse(e){const t=this._getOrReturnCtx(e);return EA(t,{code:iA.invalid_type,expected:IA.never,received:t.parsedType}),zA}}Er.create=A=>new Er({typeName:HA.ZodNever,...ZA(A)});class vd extends _A{_parse(e){if(this._getType(e)!==IA.undefined){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.void,received:i.parsedType}),zA}return Ht(e.data)}}vd.create=A=>new vd({typeName:HA.ZodVoid,...ZA(A)});class eo extends _A{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),o=this._def;if(t.parsedType!==IA.array)return EA(t,{code:iA.invalid_type,expected:IA.array,received:t.parsedType}),zA;if(o.exactLength!==null){const s=t.data.length>o.exactLength.value,n=t.data.length<o.exactLength.value;(s||n)&&(EA(t,{code:s?iA.too_big:iA.too_small,minimum:n?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&t.data.length<o.minLength.value&&(EA(t,{code:iA.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&t.data.length>o.maxLength.value&&(EA(t,{code:iA.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((s,n)=>o.type._parseAsync(new Lo(t,s,t.path,n)))).then(s=>mt.mergeArray(i,s));const r=[...t.data].map((s,n)=>o.type._parseSync(new Lo(t,s,t.path,n)));return mt.mergeArray(i,r)}get element(){return this._def.type}min(e,t){return new eo({...this._def,minLength:{value:e,message:yA.toString(t)}})}max(e,t){return new eo({...this._def,maxLength:{value:e,message:yA.toString(t)}})}length(e,t){return new eo({...this._def,exactLength:{value:e,message:yA.toString(t)}})}nonempty(e){return this.min(1,e)}}eo.create=(A,e)=>new eo({type:A,minLength:null,maxLength:null,exactLength:null,typeName:HA.ZodArray,...ZA(e)});function Yn(A){if(A instanceof ke){const e={};for(const t in A.shape){const i=A.shape[t];e[t]=ko.create(Yn(i))}return new ke({...A._def,shape:()=>e})}else return A instanceof eo?new eo({...A._def,type:Yn(A.element)}):A instanceof ko?ko.create(Yn(A.unwrap())):A instanceof hs?hs.create(Yn(A.unwrap())):A instanceof To?To.create(A.items.map(e=>Yn(e))):A}class ke extends _A{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(),t=te.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==IA.object){const l=this._getOrReturnCtx(e);return EA(l,{code:iA.invalid_type,expected:IA.object,received:l.parsedType}),zA}const{status:i,ctx:o}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),n=[];if(!(this._def.catchall instanceof Er&&this._def.unknownKeys==="strip"))for(const l in o.data)s.includes(l)||n.push(l);const a=[];for(const l of s){const g=r[l],c=o.data[l];a.push({key:{status:"valid",value:l},value:g._parse(new Lo(o,c,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Er){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of n)a.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(l==="strict")n.length>0&&(EA(o,{code:iA.unrecognized_keys,keys:n}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const g of n){const c=o.data[g];a.push({key:{status:"valid",value:g},value:l._parse(new Lo(o,c,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of a){const c=await g.key,d=await g.value;l.push({key:c,value:d,alwaysSet:g.alwaysSet})}return l}).then(l=>mt.mergeObjectSync(i,l)):mt.mergeObjectSync(i,a)}get shape(){return this._def.shape()}strict(e){return yA.errToObj,new ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var o,r,s,n;const a=(s=(r=(o=this._def).errorMap)===null||r===void 0?void 0:r.call(o,t,i).message)!==null&&s!==void 0?s:i.defaultError;return t.code==="unrecognized_keys"?{message:(n=yA.errToObj(e).message)!==null&&n!==void 0?n:a}:{message:a}}}:{}})}strip(){return new ke({...this._def,unknownKeys:"strip"})}passthrough(){return new ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:HA.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ke({...this._def,catchall:e})}pick(e){const t={};return te.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}omit(e){const t={};return te.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}deepPartial(){return Yn(this)}partial(e){const t={};return te.objectKeys(this.shape).forEach(i=>{const o=this.shape[i];e&&!e[i]?t[i]=o:t[i]=o.optional()}),new ke({...this._def,shape:()=>t})}required(e){const t={};return te.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let r=this.shape[i];for(;r instanceof ko;)r=r._def.innerType;t[i]=r}}),new ke({...this._def,shape:()=>t})}keyof(){return X1(te.objectKeys(this.shape))}}ke.create=(A,e)=>new ke({shape:()=>A,unknownKeys:"strip",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});ke.strictCreate=(A,e)=>new ke({shape:()=>A,unknownKeys:"strict",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});ke.lazycreate=(A,e)=>new ke({shape:A,unknownKeys:"strip",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});class Xl extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i=this._def.options;function o(r){for(const n of r)if(n.result.status==="valid")return n.result;for(const n of r)if(n.result.status==="dirty")return t.common.issues.push(...n.ctx.common.issues),n.result;const s=r.map(n=>new Ei(n.ctx.common.issues));return EA(t,{code:iA.invalid_union,unionErrors:s}),zA}if(t.common.async)return Promise.all(i.map(async r=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(o);{let r;const s=[];for(const a of i){const l={...t,common:{...t.common,issues:[]},parent:null},g=a._parseSync({data:t.data,path:t.path,parent:l});if(g.status==="valid")return g;g.status==="dirty"&&!r&&(r={result:g,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=s.map(a=>new Ei(a));return EA(t,{code:iA.invalid_union,unionErrors:n}),zA}}get options(){return this._def.options}}Xl.create=(A,e)=>new Xl({options:A,typeName:HA.ZodUnion,...ZA(e)});const tr=A=>A instanceof $l?tr(A.schema):A instanceof lo?tr(A.innerType()):A instanceof Ag?[A.value]:A instanceof ds?A.options:A instanceof eg?te.objectValues(A.enum):A instanceof tg?tr(A._def.innerType):A instanceof Kl?[void 0]:A instanceof ql?[null]:A instanceof ko?[void 0,...tr(A.unwrap())]:A instanceof hs?[null,...tr(A.unwrap())]:A instanceof GB||A instanceof og?tr(A.unwrap()):A instanceof ig?tr(A._def.innerType):[];class Sh extends _A{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.object)return EA(t,{code:iA.invalid_type,expected:IA.object,received:t.parsedType}),zA;const i=this.discriminator,o=t.data[i],r=this.optionsMap.get(o);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(EA(t,{code:iA.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),zA)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){const o=new Map;for(const r of t){const s=tr(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of s){if(o.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);o.set(n,r)}}return new Sh({typeName:HA.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:o,...ZA(i)})}}function A0(A,e){const t=qr(A),i=qr(e);if(A===e)return{valid:!0,data:A};if(t===IA.object&&i===IA.object){const o=te.objectKeys(e),r=te.objectKeys(A).filter(n=>o.indexOf(n)!==-1),s={...A,...e};for(const n of r){const a=A0(A[n],e[n]);if(!a.valid)return{valid:!1};s[n]=a.data}return{valid:!0,data:s}}else if(t===IA.array&&i===IA.array){if(A.length!==e.length)return{valid:!1};const o=[];for(let r=0;r<A.length;r++){const s=A[r],n=e[r],a=A0(s,n);if(!a.valid)return{valid:!1};o.push(a.data)}return{valid:!0,data:o}}else return t===IA.date&&i===IA.date&&+A==+e?{valid:!0,data:A}:{valid:!1}}class Zl extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),o=(r,s)=>{if(_C(r)||_C(s))return zA;const n=A0(r.value,s.value);return n.valid?(($C(r)||$C(s))&&t.dirty(),{status:t.value,value:n.data}):(EA(i,{code:iA.invalid_intersection_types}),zA)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([r,s])=>o(r,s)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Zl.create=(A,e,t)=>new Zl({left:A,right:e,typeName:HA.ZodIntersection,...ZA(t)});class To extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.array)return EA(i,{code:iA.invalid_type,expected:IA.array,received:i.parsedType}),zA;if(i.data.length<this._def.items.length)return EA(i,{code:iA.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zA;!this._def.rest&&i.data.length>this._def.items.length&&(EA(i,{code:iA.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...i.data].map((s,n)=>{const a=this._def.items[n]||this._def.rest;return a?a._parse(new Lo(i,s,i.path,n)):null}).filter(s=>!!s);return i.common.async?Promise.all(r).then(s=>mt.mergeArray(t,s)):mt.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new To({...this._def,rest:e})}}To.create=(A,e)=>{if(!Array.isArray(A))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new To({items:A,typeName:HA.ZodTuple,rest:null,...ZA(e)})};class _l extends _A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.object)return EA(i,{code:iA.invalid_type,expected:IA.object,received:i.parsedType}),zA;const o=[],r=this._def.keyType,s=this._def.valueType;for(const n in i.data)o.push({key:r._parse(new Lo(i,n,i.path,n)),value:s._parse(new Lo(i,i.data[n],i.path,n)),alwaysSet:n in i.data});return i.common.async?mt.mergeObjectAsync(t,o):mt.mergeObjectSync(t,o)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof _A?new _l({keyType:e,valueType:t,typeName:HA.ZodRecord,...ZA(i)}):new _l({keyType:_i.create(),valueType:e,typeName:HA.ZodRecord,...ZA(t)})}}class Dd extends _A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.map)return EA(i,{code:iA.invalid_type,expected:IA.map,received:i.parsedType}),zA;const o=this._def.keyType,r=this._def.valueType,s=[...i.data.entries()].map(([n,a],l)=>({key:o._parse(new Lo(i,n,i.path,[l,"key"])),value:r._parse(new Lo(i,a,i.path,[l,"value"]))}));if(i.common.async){const n=new Map;return Promise.resolve().then(async()=>{for(const a of s){const l=await a.key,g=await a.value;if(l.status==="aborted"||g.status==="aborted")return zA;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),n.set(l.value,g.value)}return{status:t.value,value:n}})}else{const n=new Map;for(const a of s){const l=a.key,g=a.value;if(l.status==="aborted"||g.status==="aborted")return zA;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),n.set(l.value,g.value)}return{status:t.value,value:n}}}}Dd.create=(A,e,t)=>new Dd({valueType:e,keyType:A,typeName:HA.ZodMap,...ZA(t)});class nn extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.set)return EA(i,{code:iA.invalid_type,expected:IA.set,received:i.parsedType}),zA;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(EA(i,{code:iA.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),t.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(EA(i,{code:iA.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),t.dirty());const r=this._def.valueType;function s(a){const l=new Set;for(const g of a){if(g.status==="aborted")return zA;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const n=[...i.data.values()].map((a,l)=>r._parse(new Lo(i,a,i.path,l)));return i.common.async?Promise.all(n).then(a=>s(a)):s(n)}min(e,t){return new nn({...this._def,minSize:{value:e,message:yA.toString(t)}})}max(e,t){return new nn({...this._def,maxSize:{value:e,message:yA.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}nn.create=(A,e)=>new nn({valueType:A,minSize:null,maxSize:null,typeName:HA.ZodSet,...ZA(e)});class Xn extends _A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.function)return EA(t,{code:iA.invalid_type,expected:IA.function,received:t.parsedType}),zA;function i(n,a){return Id({data:n,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wd(),Ca].filter(l=>!!l),issueData:{code:iA.invalid_arguments,argumentsError:a}})}function o(n,a){return Id({data:n,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wd(),Ca].filter(l=>!!l),issueData:{code:iA.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof fa){const n=this;return Ht(async function(...a){const l=new Ei([]),g=await n._def.args.parseAsync(a,r).catch(h=>{throw l.addIssue(i(a,h)),l}),c=await Reflect.apply(s,this,g);return await n._def.returns._def.type.parseAsync(c,r).catch(h=>{throw l.addIssue(o(c,h)),l})})}else{const n=this;return Ht(function(...a){const l=n._def.args.safeParse(a,r);if(!l.success)throw new Ei([i(a,l.error)]);const g=Reflect.apply(s,this,l.data),c=n._def.returns.safeParse(g,r);if(!c.success)throw new Ei([o(g,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Xn({...this._def,args:To.create(e).rest(Ws.create())})}returns(e){return new Xn({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new Xn({args:e||To.create([]).rest(Ws.create()),returns:t||Ws.create(),typeName:HA.ZodFunction,...ZA(i)})}}class $l extends _A{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}$l.create=(A,e)=>new $l({getter:A,typeName:HA.ZodLazy,...ZA(e)});class Ag extends _A{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return EA(t,{received:t.data,code:iA.invalid_literal,expected:this._def.value}),zA}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ag.create=(A,e)=>new Ag({value:A,typeName:HA.ZodLiteral,...ZA(e)});function X1(A,e){return new ds({values:A,typeName:HA.ZodEnum,...ZA(e)})}class ds extends _A{constructor(){super(...arguments),rl.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return EA(t,{expected:te.joinValues(i),received:t.parsedType,code:iA.invalid_type}),zA}if(md(this,rl)||j1(this,rl,new Set(this._def.values)),!md(this,rl).has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return EA(t,{received:t.data,code:iA.invalid_enum_value,options:i}),zA}return Ht(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ds.create(e,{...this._def,...t})}exclude(e,t=this._def){return ds.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}rl=new WeakMap;ds.create=X1;class eg extends _A{constructor(){super(...arguments),sl.set(this,void 0)}_parse(e){const t=te.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==IA.string&&i.parsedType!==IA.number){const o=te.objectValues(t);return EA(i,{expected:te.joinValues(o),received:i.parsedType,code:iA.invalid_type}),zA}if(md(this,sl)||j1(this,sl,new Set(te.getValidEnumValues(this._def.values))),!md(this,sl).has(e.data)){const o=te.objectValues(t);return EA(i,{received:i.data,code:iA.invalid_enum_value,options:o}),zA}return Ht(e.data)}get enum(){return this._def.values}}sl=new WeakMap;eg.create=(A,e)=>new eg({values:A,typeName:HA.ZodNativeEnum,...ZA(e)});class fa extends _A{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.promise&&t.common.async===!1)return EA(t,{code:iA.invalid_type,expected:IA.promise,received:t.parsedType}),zA;const i=t.parsedType===IA.promise?t.data:Promise.resolve(t.data);return Ht(i.then(o=>this._def.type.parseAsync(o,{path:t.path,errorMap:t.common.contextualErrorMap})))}}fa.create=(A,e)=>new fa({type:A,typeName:HA.ZodPromise,...ZA(e)});class lo extends _A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===HA.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:i}=this._processInputParams(e),o=this._def.effect||null,r={addIssue:s=>{EA(i,s),s.fatal?t.abort():t.dirty()},get path(){return i.path}};if(r.addIssue=r.addIssue.bind(r),o.type==="preprocess"){const s=o.transform(i.data,r);if(i.common.async)return Promise.resolve(s).then(async n=>{if(t.value==="aborted")return zA;const a=await this._def.schema._parseAsync({data:n,path:i.path,parent:i});return a.status==="aborted"?zA:a.status==="dirty"||t.value==="dirty"?Un(a.value):a});{if(t.value==="aborted")return zA;const n=this._def.schema._parseSync({data:s,path:i.path,parent:i});return n.status==="aborted"?zA:n.status==="dirty"||t.value==="dirty"?Un(n.value):n}}if(o.type==="refinement"){const s=n=>{const a=o.refinement(n,r);if(i.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return n};if(i.common.async===!1){const n=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?zA:(n.status==="dirty"&&t.dirty(),s(n.value),{status:t.value,value:n.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(n=>n.status==="aborted"?zA:(n.status==="dirty"&&t.dirty(),s(n.value).then(()=>({status:t.value,value:n.value}))))}if(o.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Jl(s))return s;const n=o.transform(s.value,r);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>Jl(s)?Promise.resolve(o.transform(s.value,r)).then(n=>({status:t.value,value:n})):s);te.assertNever(o)}}lo.create=(A,e,t)=>new lo({schema:A,typeName:HA.ZodEffects,effect:e,...ZA(t)});lo.createWithPreprocess=(A,e,t)=>new lo({schema:e,effect:{type:"preprocess",transform:A},typeName:HA.ZodEffects,...ZA(t)});class ko extends _A{_parse(e){return this._getType(e)===IA.undefined?Ht(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ko.create=(A,e)=>new ko({innerType:A,typeName:HA.ZodOptional,...ZA(e)});class hs extends _A{_parse(e){return this._getType(e)===IA.null?Ht(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hs.create=(A,e)=>new hs({innerType:A,typeName:HA.ZodNullable,...ZA(e)});class tg extends _A{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===IA.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}tg.create=(A,e)=>new tg({innerType:A,typeName:HA.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ZA(e)});class ig extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return jl(o)?o.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ei(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ei(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}ig.create=(A,e)=>new ig({innerType:A,typeName:HA.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ZA(e)});class bd extends _A{_parse(e){if(this._getType(e)!==IA.nan){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.nan,received:i.parsedType}),zA}return{status:"valid",value:e.data}}}bd.create=A=>new bd({typeName:HA.ZodNaN,...ZA(A)});const NS=Symbol("zod_brand");class GB extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}}class Pg extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?zA:r.status==="dirty"?(t.dirty(),Un(r.value)):this._def.out._parseAsync({data:r.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?zA:o.status==="dirty"?(t.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(e,t){return new Pg({in:e,out:t,typeName:HA.ZodPipeline})}}class og extends _A{_parse(e){const t=this._def.innerType._parse(e),i=o=>(Jl(o)&&(o.value=Object.freeze(o.value)),o);return jl(t)?t.then(o=>i(o)):i(t)}unwrap(){return this._def.innerType}}og.create=(A,e)=>new og({innerType:A,typeName:HA.ZodReadonly,...ZA(e)});function Z1(A,e={},t){return A?Ba.create().superRefine((i,o)=>{var r,s;if(!A(i)){const n=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,a=(s=(r=n.fatal)!==null&&r!==void 0?r:t)!==null&&s!==void 0?s:!0,l=typeof n=="string"?{message:n}:n;o.addIssue({code:"custom",...l,fatal:a})}}):Ba.create()}const HS={object:ke.lazycreate};var HA;(function(A){A.ZodString="ZodString",A.ZodNumber="ZodNumber",A.ZodNaN="ZodNaN",A.ZodBigInt="ZodBigInt",A.ZodBoolean="ZodBoolean",A.ZodDate="ZodDate",A.ZodSymbol="ZodSymbol",A.ZodUndefined="ZodUndefined",A.ZodNull="ZodNull",A.ZodAny="ZodAny",A.ZodUnknown="ZodUnknown",A.ZodNever="ZodNever",A.ZodVoid="ZodVoid",A.ZodArray="ZodArray",A.ZodObject="ZodObject",A.ZodUnion="ZodUnion",A.ZodDiscriminatedUnion="ZodDiscriminatedUnion",A.ZodIntersection="ZodIntersection",A.ZodTuple="ZodTuple",A.ZodRecord="ZodRecord",A.ZodMap="ZodMap",A.ZodSet="ZodSet",A.ZodFunction="ZodFunction",A.ZodLazy="ZodLazy",A.ZodLiteral="ZodLiteral",A.ZodEnum="ZodEnum",A.ZodEffects="ZodEffects",A.ZodNativeEnum="ZodNativeEnum",A.ZodOptional="ZodOptional",A.ZodNullable="ZodNullable",A.ZodDefault="ZodDefault",A.ZodCatch="ZodCatch",A.ZodPromise="ZodPromise",A.ZodBranded="ZodBranded",A.ZodPipeline="ZodPipeline",A.ZodReadonly="ZodReadonly"})(HA||(HA={}));const zS=(A,e={message:`Input not instance of ${A.name}`})=>Z1(t=>t instanceof A,e),_1=_i.create,$1=gs.create,OS=bd.create,VS=cs.create,Av=Wl.create,JS=sn.create,jS=Qd.create,WS=Kl.create,KS=ql.create,qS=Ba.create,XS=Ws.create,ZS=Er.create,_S=vd.create,$S=eo.create,AR=ke.create,eR=ke.strictCreate,tR=Xl.create,iR=Sh.create,oR=Zl.create,rR=To.create,sR=_l.create,nR=Dd.create,aR=nn.create,lR=Xn.create,gR=$l.create,cR=Ag.create,dR=ds.create,hR=eg.create,uR=fa.create,M2=lo.create,pR=ko.create,CR=hs.create,BR=lo.createWithPreprocess,fR=Pg.create,ER=()=>_1().optional(),wR=()=>$1().optional(),IR=()=>Av().optional(),mR={string:A=>_i.create({...A,coerce:!0}),number:A=>gs.create({...A,coerce:!0}),boolean:A=>Wl.create({...A,coerce:!0}),bigint:A=>cs.create({...A,coerce:!0}),date:A=>sn.create({...A,coerce:!0})},QR=zA;var gA=Object.freeze({__proto__:null,defaultErrorMap:Ca,setErrorMap:QS,getErrorMap:wd,makeIssue:Id,EMPTY_PATH:vS,addIssueToContext:EA,ParseStatus:mt,INVALID:zA,DIRTY:Un,OK:Ht,isAborted:_C,isDirty:$C,isValid:Jl,isAsync:jl,get util(){return te},get objectUtil(){return ZC},ZodParsedType:IA,getParsedType:qr,ZodType:_A,datetimeRegex:q1,ZodString:_i,ZodNumber:gs,ZodBigInt:cs,ZodBoolean:Wl,ZodDate:sn,ZodSymbol:Qd,ZodUndefined:Kl,ZodNull:ql,ZodAny:Ba,ZodUnknown:Ws,ZodNever:Er,ZodVoid:vd,ZodArray:eo,ZodObject:ke,ZodUnion:Xl,ZodDiscriminatedUnion:Sh,ZodIntersection:Zl,ZodTuple:To,ZodRecord:_l,ZodMap:Dd,ZodSet:nn,ZodFunction:Xn,ZodLazy:$l,ZodLiteral:Ag,ZodEnum:ds,ZodNativeEnum:eg,ZodPromise:fa,ZodEffects:lo,ZodTransformer:lo,ZodOptional:ko,ZodNullable:hs,ZodDefault:tg,ZodCatch:ig,ZodNaN:bd,BRAND:NS,ZodBranded:GB,ZodPipeline:Pg,ZodReadonly:og,custom:Z1,Schema:_A,ZodSchema:_A,late:HS,get ZodFirstPartyTypeKind(){return HA},coerce:mR,any:qS,array:$S,bigint:VS,boolean:Av,date:JS,discriminatedUnion:iR,effect:M2,enum:dR,function:lR,instanceof:zS,intersection:oR,lazy:gR,literal:cR,map:nR,nan:OS,nativeEnum:hR,never:ZS,null:KS,nullable:CR,number:$1,object:AR,oboolean:IR,onumber:wR,optional:pR,ostring:ER,pipeline:fR,preprocess:BR,promise:uR,record:sR,set:aR,strictObject:eR,string:_1,symbol:jS,transformer:M2,tuple:rR,undefined:WS,union:tR,unknown:XS,void:_S,NEVER:QR,ZodIssueCode:iA,quotelessJson:mS,ZodError:Ei});gA.object({from:gA.number(),to:gA.number()});function Yg(A){throw new Error("Unexpected object: "+A)}const ev="upload://upload/",tv="index://index/";function vR(A){return A.startsWith(ev)}function DR(A){return A.startsWith(tv)}function iv(A){if(DR(A)){const e=A.slice(tv.length);return JSON.parse(decodeURIComponent(e)).path}else if(vR(A)){const e=A.slice(ev.length);return JSON.parse(decodeURIComponent(e)).localPath}Yg(A)}function bR(A){return A.replace(/^.*[\\/]/,"")}function ov(A){return bR(iv(A))}function LB(A){if(!A||typeof A!="object")return!1;const e=A;if(!("type"in e))return!1;switch(e.type){case"Json":return typeof e.keyLength=="number"&&e.data!==void 0&&typeof e.data=="object";case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof e.partitionKeyLength=="number"&&e.parts!==void 0&&typeof e.parts=="object";default:return!1}}function MR(A,e){if(A!==void 0)switch(A.type){case"Json":return A;case"JsonPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]=e(o);return{...A,parts:t}}case"BinaryPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]={index:e(o.index),values:e(o.values)};return{...A,parts:t}}case"ParquetPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]=e(o);return{...A,parts:t}}}}function TB(A){if(!A||typeof A!="object")return!1;const e=A;if(!("type"in e))return!1;switch(e.type){case"Json":return typeof e.keyLength=="number"&&Array.isArray(e.data);case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof e.partitionKeyLength=="number"&&Array.isArray(e.parts);default:return!1}}function xR(A){if(!TB(A))return!1;switch(A.type){case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return!0;default:return!1}}function FR(A){switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength,data:Object.entries(A.data).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};default:Yg(A)}}function yR(A){switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength,data:Object.fromEntries(A.data.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};default:Yg(A)}}function UB(A){return A instanceof Error?A.name==="AbortError"||UB(A.cause):!1}function SR(A){if(typeof A=="string")return`String value was thrown: ${A}`;if(A&&typeof A=="object")try{return`Plain object was thrown: ${JSON.stringify(A)}`}catch(e){return`Non-serializable object was thrown (JSON.stringify failed: ${e instanceof Error?e.message:String(e)}): ${String(A)}`}return`Non-Error value (${typeof A}) was thrown: ${A}`}function rv(A){return A instanceof Error?A:new Error(SR(A))}function sv(A){const e=A.cause?sv(A.cause):void 0,t=new Error(A.message,e!==void 0?{cause:e}:void 0);return t.name=A.name||"Error",t.stack=A.stack,t}function ir(A){if(A.error)throw A.error instanceof Error?A.error:sv(A.error);return A.value}function RR(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var Nu,x2;function kR(){return x2||(x2=1,Nu=function A(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?A(e.toJSON()):Array.isArray(e)?`[${e.reduce((o,r,s)=>`${o}${s===0?"":","}${A(r===void 0||typeof r=="symbol"?null:r)}`,"")}]`:`{${Object.keys(e).sort().reduce((i,o)=>{if(e[o]===void 0||typeof e[o]=="symbol")return i;const r=i.length===0?"":",";return`${i}${r}${A(o)}:${A(e[o])}`},"")}}`}),Nu}var PR=kR();const mn=RR(PR);function YR(A){return JSON.stringify(A)}function Nn(A){return mn(A)}function Il(A){return JSON.parse(A)}const hi={Int:"Int",Long:"Long",Float:"Float",Double:"Double",String:"String",Bytes:"Bytes"};function nv(A,e){return A==null?void 0:A[e]}function GR(A,e,t,i="readMetadataJsonOrThrow"){const o=nv(A,t);if(o===void 0)return;const r=e[t];try{const s=JSON.parse(o);return r.parse(s)}catch(s){throw new Error(`${i} failed, key: ${String(t)}, value: ${o}, error: ${rv(s)}`)}}function LR(A,e,t){try{return GR(A,e,t)}catch{return}}const be={DiscreteValues:"pl7.app/discreteValues",Graph:{IsVirtual:"pl7.app/graph/isVirtual"},HideDataFromUi:"pl7.app/hideDataFromUi",IsLinkerColumn:"pl7.app/isLinkerColumn",Label:"pl7.app/label",Max:"pl7.app/max",Min:"pl7.app/min",Parents:"pl7.app/parents",Sequence:{Annotation:{Mapping:"pl7.app/sequence/annotation/mapping"},IsAnnotation:"pl7.app/sequence/isAnnotation"},Table:{OrderPriority:"pl7.app/table/orderPriority"},Trace:"pl7.app/trace"},TR={[be.DiscreteValues]:gA.array(gA.string()).or(gA.array(gA.number())),[be.Graph.IsVirtual]:gA.boolean(),[be.HideDataFromUi]:gA.boolean(),[be.IsLinkerColumn]:gA.boolean(),[be.Max]:gA.number(),[be.Min]:gA.number(),[be.Parents]:gA.array(gA.string()),[be.Sequence.Annotation.Mapping]:gA.record(gA.string(),gA.string()),[be.Sequence.IsAnnotation]:gA.boolean(),[be.Table.OrderPriority]:gA.number(),[be.Trace]:gA.record(gA.string(),gA.unknown())};function Br(A,e){return nv(A==null?void 0:A.annotations,e)}function NB(A,e){return LR(A==null?void 0:A.annotations,TR,e)}const HB={Label:"pl7.app/label",Table:{RowSelection:"pl7.app/table/row-selection"}};function go(A){const{type:e,name:t,domain:i}=A,o={type:e,name:t};return i&&Object.entries(i).length>0&&Object.assign(o,{domain:i}),o}function UR(A){return A.map(go)}function NR(A){return Nn(go(A))}function HR(A,e){if(A===void 0)return e===void 0;if(e===void 0)return!0;for(const t in e)if(A[t]!==e[t])return!1;return!0}function av(A,e){return A.name===e.name&&HR(A.domain,e.domain)}function lv(A,e){const t=Math.floor(e/8),i=1<<7-e%8;return(A[t]&i)>0}function zR(A,e){return lv(A.absent,e)}function OR(A,e){if(A.isNA)return lv(A.isNA,e);const t=A.type,i=A.data[e];switch(t){case hi.Int:return i===-2147483648;case hi.Long:return i===-9007199254740991n;case hi.Float:return Number.isNaN(i);case hi.Double:return Number.isNaN(i);case hi.String:return i===null;case hi.Bytes:return i===null;default:throw Error(`unsupported data type: ${t}`)}}const VR={type:"absent"};function JR(A){return typeof A=="object"&&A!==null&&"type"in A&&A.type==="absent"}const jR=null;function WR(A,e,t){const i=A.type;if(i===hi.Bytes)throw Error("Bytes not yet supported");if(t&&"dataType"in t&&t.dataType!==void 0&&t.dataType!==i)throw Error(`expected column of type ${t.dataType}, got ${i}`);if(zR(A,e))return(t==null?void 0:t.absent)!==void 0?t.absent:VR;if(OR(A,e))return(t==null?void 0:t.na)!==void 0?t.na:jR;const o=A.data[e];switch(i){case hi.Int:return o;case hi.Long:return Number(o);case hi.Float:return o;case hi.Double:return o;case hi.String:return o}}function Hu(A,e,t){return WR(A,e,t)}function KR(A,e){return{...A,src:Oc(A.src,e)}}function Oc(A,e){switch(A.type){case"column":return{type:"column",column:e(A.column)};case"slicedColumn":return{type:"slicedColumn",column:e(A.column),newId:A.newId,axisFilters:A.axisFilters};case"inlineColumn":return A;case"inner":case"full":return{type:A.type,entries:A.entries.map(t=>Oc(t,e))};case"outer":return{type:"outer",primary:Oc(A.primary,e),secondary:A.secondary.map(t=>Oc(t,e))};default:Yg(A)}}function qR(A){return mn(A)}function F2(A){return mn(go(A))}function y2(A,e){return JSON.stringify([A,e])}class S2{constructor(e){RA(this,"anchors");RA(this,"domains",new Map);RA(this,"axes",new Map);RA(this,"domainPacks",[]);RA(this,"domainPackToAnchor",new Map);this.anchors=e;const t=Object.entries(e);t.sort((i,o)=>i[0].localeCompare(o[0]));for(const[i,o]of t){for(let r=0;r<o.axesSpec.length;r++){const s=o.axesSpec[r],n=F2(s);this.axes.set(n,{anchor:i,idx:r})}if(o.domain!==void 0){const r=Object.entries(o.domain);r.sort((s,n)=>s[0].localeCompare(n[0])),this.domainPackToAnchor.set(JSON.stringify(r),i),this.domainPacks.push(r.map(([s])=>s));for(const[s,n]of r){const a=y2(s,n);this.domains.set(a,i)}}}}derive(e,t){const i={name:e.name,axes:[]};let o;if(e.domain!==void 0)A:for(const s of this.domainPacks){const n=[];for(const l of s){const g=e.domain[l];if(g!==void 0)n.push([l,g]);else break A}const a=this.domainPackToAnchor.get(JSON.stringify(n));if(a!==void 0){i.domainAnchor=a,o=new Set(s);break}}for(const[s,n]of Object.entries(e.domain??{})){if(o!==void 0&&o.has(s))continue;const a=y2(s,n),l=this.domains.get(a);i.domain??(i.domain={}),i.domain[s]=l?{anchor:l}:n}if(i.axes=e.axesSpec.map(s=>{const n=F2(s),a=this.axes.get(n);return a===void 0?go(s):a}),!t||t.length===0)return i;const r=[];for(const s of t){const[n,a]=s;if(typeof n=="number"){if(n<0||n>=e.axesSpec.length)throw new Error(`Axis index ${n} is out of bounds (0-${e.axesSpec.length-1})`);r.push([n,a])}else{const l=e.axesSpec.findIndex(g=>g.name===n);if(l===-1)throw new Error(`Axis with name "${n}" not found in the column specification`);r.push([l,a])}}return r.sort((s,n)=>s[0]-n[0]),{source:i,axisFilters:r}}deriveS(e,t){return qR(this.derive(e,t))}}function R2(A,e,t){const i={...e},o=(t==null?void 0:t.ignoreMissingDomains)??!1;if(i.domainAnchor!==void 0){const r=A[i.domainAnchor];if(!r)throw new Error(`Anchor "${i.domainAnchor}" not found`);const s=r.domain||{};i.domain={...s,...i.domain},delete i.domainAnchor}if(i.domain){const r={};for(const[s,n]of Object.entries(i.domain))if(typeof n=="string")r[s]=n;else{const a=A[n.anchor];if(!a)throw new Error(`Anchor "${n.anchor}" not found for domain key "${s}"`);if(!a.domain||a.domain[s]===void 0){if(!o)throw new Error(`Domain key "${s}" not found in anchor "${n.anchor}"`);continue}r[s]=a.domain[s]}i.domain=r}return i.axes&&(i.axes=i.axes.map(r=>XR(A,r))),i}function XR(A,e){if(!ZR(e))return e;const t=e.anchor,i=A[t];if(!i)throw new Error(`Anchor "${t}" not found for axis reference`);if("idx"in e){if(e.idx<0||e.idx>=i.axesSpec.length)throw new Error(`Axis index ${e.idx} out of bounds for anchor "${t}"`);return i.axesSpec[e.idx]}else if("name"in e){const o=i.axesSpec.filter(r=>r.name===e.name);if(o.length>1)throw new Error(`Multiple axes with name "${e.name}" found in anchor "${t}"`);if(o.length===0)throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);return o[0]}else if("id"in e){const o=i.axesSpec.filter(r=>av(e.id,go(r)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${t}"`);return o[0]}throw new Error("Unsupported axis reference type")}function ZR(A){return typeof A=="object"&&"anchor"in A}function As(A){return A.kind==="PColumn"}function zB(A){return As(A.spec)}function _R(A){if(!zB(A))throw new Error(`not a PColumn (kind = ${A.spec.kind})`);return A}function OB(A,e){return A===void 0?void 0:{...A,data:e(A.data)}}function $R(A){const e=new Map,t=i=>{switch(i.type){case"column":e.set(i.column.id,i.column);return;case"slicedColumn":e.set(i.column.id,i.column);return;case"inlineColumn":return;case"full":case"inner":for(const o of i.entries)t(o);return;case"outer":t(i.primary);for(const o of i.secondary)t(o);return;default:Yg(i)}};return t(A),[...e.values()]}function k2(A,e){if(A.name!==void 0&&A.name!==e.name)return!1;if(A.type!==void 0){if(Array.isArray(A.type)){if(!A.type.includes(e.type))return!1}else if(A.type!==e.type)return!1}if(A.domain!==void 0){const t=e.domain||{};for(const[i,o]of Object.entries(A.domain))if(t[i]!==o)return!1}return!0}function P2(A,e){if(e.name!==void 0&&A.name!==e.name||e.namePattern!==void 0&&!new RegExp(e.namePattern).test(A.name))return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(A.valueType))return!1}else if(e.type!==A.valueType)return!1}if(e.domain!==void 0){const t=A.domain||{};for(const[i,o]of Object.entries(e.domain))if(t[i]!==o)return!1}if(e.axes!==void 0){const t=A.axesSpec.map(go);if(e.partialAxesMatch){for(const i of e.axes)if(!t.some(o=>k2(i,o)))return!1}else{if(t.length!==e.axes.length)return!1;for(let i=0;i<e.axes.length;i++)if(!k2(e.axes[i],t[i]))return!1}}if(e.annotations!==void 0){const t=A.annotations||{};for(const[i,o]of Object.entries(e.annotations))if(t[i]!==o)return!1}if(e.annotationPatterns!==void 0){const t=A.annotations||{};for(const[i,o]of Object.entries(e.annotationPatterns)){const r=t[i];if(r===void 0||!new RegExp(o).test(r))return!1}}return!0}function rg(A){return Array.isArray(A)?e=>A.some(t=>As(e)&&P2(e,t)):e=>As(e)&&P2(e,A)}function A5(A){const e={kind:A.kind,name:A.name};return A.domain!==void 0&&(e.domain=A.domain),As(A)&&(e.axesSpec=UR(A.axesSpec)),mn(e)}function e5(A){if(A instanceof Int8Array||A instanceof Uint8Array||A instanceof Uint8ClampedArray)return new DataView(A.buffer,A.byteOffset,A.byteLength);if(A instanceof ArrayBuffer)return new DataView(A);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const t5="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i5="0123456789ABCDEFGHIJKLMNOPQRSTUV",o5="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function r5(A,e,t){t=t||{};let i,o;switch(e){case"RFC3548":case"RFC4648":i=t5,o=!0;break;case"RFC4648-HEX":i=i5,o=!0;break;case"Crockford":i=o5,o=!1;break;default:throw new Error("Unknown base32 variant: "+String(e))}const r=t.padding!==void 0?t.padding:o,s=e5(A);let n=0,a=0,l="";for(let g=0;g<s.byteLength;g++)for(a=a<<8|s.getUint8(g),n+=8;n>=5;)l+=i[a>>>n-5&31],n-=5;if(n>0&&(l+=i[a<<5-n&31]),r)for(;l.length%8!==0;)l+="=";return l}const s5=15,n5=24,a5=gA.string().length(n5).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function l5(){const A=new Uint8Array(s5);return crypto.getRandomValues(A),a5.parse(r5(A,"RFC4648"))}gA.object({__isRef:gA.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:gA.string().describe("Upstream block id"),name:gA.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:gA.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly();function g5(A){return typeof A=="object"&&A!==null&&"__isRef"in A&&A.__isRef===!0&&"blockId"in A&&"name"in A}function Y2(A,e=!0){if(e)return{...A,requireEnrichments:!0};{const{requireEnrichments:t,...i}=A;return i}}function c5(A,e){return A.ok?{ok:!0,value:e(A.value)}:A}class Zt{constructor(e,t=i=>i){RA(this,"handle");RA(this,"postProcess");RA(this,"isResolved",!1);RA(this,"resolvedValue");this.handle=e,this.postProcess=t,IS(e,i=>{this.resolvedValue=t(i),this.isResolved=!0})}map(e){return new Zt(this.handle,t=>e(this.postProcess(t)))}mapDefined(e){return new Zt(this.handle,t=>{const i=this.postProcess(t);return i?e(i):void 0})}toJSON(){return this.isResolved?this.resolvedValue:{__awaited_futures__:[this.handle]}}}function e0(A,e){return A===void 0?void 0:e(A)}class to{constructor(e,t){RA(this,"handle");RA(this,"resolvePath");this.handle=e,this.resolvePath=t}resolve(...e){const t=e.map(i=>({assertFieldType:"Input",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveOutput(...e){const t=e.map(i=>({assertFieldType:"Output",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveInput(...e){const t=e.map(i=>({assertFieldType:"Input",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveAny(...e){return this.resolveWithCommon({},...e)}resolveWithCommon(e,...t){const i=[...this.resolvePath,...t.map(o=>typeof o=="string"?o:o.field)];return e0(ge().resolveWithCommon(this.handle,e,...t),o=>new to(o,i))}get resourceType(){return ge().getResourceType(this.handle)}getInputsLocked(){return ge().getInputsLocked(this.handle)}getOutputsLocked(){return ge().getOutputsLocked(this.handle)}getIsReadyOrError(){return ge().getIsReadyOrError(this.handle)}getIsFinal(){return ge().getIsFinal(this.handle)}getError(){const e=[...this.resolvePath,"error"];return e0(ge().getError(this.handle),t=>new to(t,e))}listInputFields(){return ge().listInputFields(this.handle)}listOutputFields(){return ge().listOutputFields(this.handle)}listDynamicFields(){return ge().listDynamicFields(this.handle)}getKeyValueBase64(e){return ge().getKeyValueBase64(this.handle,e)}getKeyValueAsString(e){return ge().getKeyValueAsString(this.handle,e)}getKeyValueAsJson(e){const t=this.getKeyValueAsString(e);if(t==null)throw new Error("Resource has no content.");return JSON.parse(t)}getDataBase64(){return ge().getDataBase64(this.handle)}getDataAsString(){return ge().getDataAsString(this.handle)}getDataAsJson(){const e=this.getDataAsString();if(e==null)throw new Error("Resource has no content.");return JSON.parse(e)}getPColumns(e=!1,t=""){const i=this.parsePObjectCollection(e,t);return i===void 0?void 0:Object.entries(i).map(([,r])=>{if(!zB(r))throw new Error(`not a PColumn (kind = ${r.spec.kind})`);return r})}parsePObjectCollection(e=!1,t=""){const i=ge().parsePObjectCollection(this.handle,e,t,...this.resolvePath);if(i===void 0)return;const o={};for(const[r,s]of Object.entries(i)){const n=[...this.resolvePath,r];o[r]=OB(s,a=>new to(a,n))}return o}getFileContentAsBase64(e){return new Zt(ge().getBlobContentAsBase64(this.handle,e))}getFileContentAsString(e){return new Zt(ge().getBlobContentAsString(this.handle,e))}getFileContentAsJson(e){return new Zt(ge().getBlobContentAsString(this.handle,e)).mapDefined(t=>JSON.parse(t))}getBlobContentAsBase64(){return this.getFileContentAsBase64()}getBlobContentAsString(){return this.getFileContentAsString()}getFileHandle(){return new Zt(ge().getDownloadedBlobContentHandle(this.handle))}getDownloadedBlobHandle(){return this.getFileHandle()}getRemoteFileHandle(){return new Zt(ge().getOnDemandBlobContentHandle(this.handle))}getOnDemandBlobHandle(){return this.getRemoteFileHandle()}extractArchiveAndGetURL(e){return new Zt(ge().extractArchiveAndGetURL(this.handle,e))}getImportProgress(){return new Zt(ge().getImportProgress(this.handle))}getLastLogs(e){return new Zt(ge().getLastLogs(this.handle,e))}getProgressLog(e){return new Zt(ge().getProgressLog(this.handle,e))}getProgressLogWithInfo(e){return new Zt(ge().getProgressLogWithInfo(this.handle,e))}getLogHandle(){return new Zt(ge().getLogHandle(this.handle))}allFieldsResolved(e="Input"){switch(e){case"Input":return this.getInputsLocked()&&this.listInputFields().every(t=>this.resolve({field:t,assertFieldType:"Input"})!==void 0);case"Output":return this.getOutputsLocked()&&this.listOutputFields().every(t=>this.resolve({field:t,assertFieldType:"Output"})!==void 0)}}mapFields(e,t){const{fieldType:i,requireLocked:o,skipUnresolved:r}={fieldType:"Input",requireLocked:!0,skipUnresolved:!1,...t},s=e;if(o&&(i==="Input"&&!this.getInputsLocked()||i==="Output"&&!this.getOutputsLocked()))return;let a=(i==="Input"?this.listInputFields():i==="Output"?this.listOutputFields():this.listDynamicFields()).map(l=>[l,this.resolve({field:l,assertFieldType:i})]);return r&&(a=a.filter(l=>l[1]!==void 0)),a.map(([l,g])=>s(l,g))}}const d5="staging",h5="main",u5=gA.object({type:gA.string(),importance:gA.number().optional(),id:gA.string().optional(),label:gA.string()}),p5=gA.array(u5),C5=.001,B5="__LABEL__",G2="__LABEL__@1";function gv(A,e,t={}){const i=new Map,o=t.forceTraceElements!==void 0&&t.forceTraceElements.length>0?new Set(t.forceTraceElements):void 0,r=new Map,s=A.map(h=>{const u=e(h);let p,C,B;"spec"in u&&typeof u.spec=="object"?(p=u.spec,C=u.prefixTrace,B=u.suffixTrace):p=u;const f=Br(p,be.Label),E=Br(p,be.Trace),w=(E?p5.safeParse(Il(E)).data:void 0)??[],I=[...C??[],...w,...B??[]];if(f!==void 0){const D={label:f,type:B5,importance:-2};t.addLabelAsSuffix?I.push(D):I.splice(0,0,D)}const m=[],x=new Map;for(let D=I.length-1;D>=0;--D){const{type:v}=I[D],U=I[D].importance??0,S=(x.get(v)??0)+1;x.set(v,S);const M=`${v}@${S}`;r.set(M,(r.get(M)??0)+1),i.set(M,Math.max(i.get(M)??Number.NEGATIVE_INFINITY,U-(I.length-D)*C5)),m.push({...I[D],fullType:M,occurrenceIndex:S})}return m.reverse(),{value:h,spec:p,label:f,fullTrace:m}}),n=[],a=[],l=[...i];l.sort(([,h],[,u])=>u-h);for(const[h]of l)h.endsWith("@1")||r.get(h)===A.length?n.push(h):a.push(h);const g=(h,u=!1)=>{const p=[];for(let C=0;C<s.length;C++){const B=s[C],f=B.fullTrace.filter(I=>h.has(I.fullType)||o&&o.has(I.type));if(f.length===0)if(u)p.push({label:"Unlabeled",value:B.value});else return;const E=f.map(I=>I.label),w=t.separator??" / ";p.push({label:E.join(w),value:B.value})}return p};if(n.length===0){if(a.length!==0)throw new Error("Non-empty secondary types list while main types list is empty.");return g(new Set(G2),!0)}let c=0,d=-1;for(;c<n.length;){const h=new Set;t.includeNativeLabel&&h.add(G2);for(let p=0;p<c;++p)h.add(n[p]);d>=0&&h.add(n[d]);const u=g(h);if(u!==void 0&&new Set(u.map(p=>p.label)).size===A.length)return u;d++,d>=n.length&&(c++,d=c)}return g(new Set([...n,...a]),!0)}const Gg="PColumnData/",t0=Gg+"ResourceMap",i0=Gg+"Partitioned/ResourceMap",ml=Gg+"JsonPartitioned",Zn=Gg+"BinaryPartitioned",cv=Gg+"Partitioned/",Md=cv+"JsonPartitioned",Ql=cv+"BinaryPartitioned",o0=A=>{if(A.endsWith(".index"))return{baseKey:A.substring(0,A.length-6),type:"index"};if(A.endsWith(".values"))return{baseKey:A.substring(0,A.length-7),type:"values"};throw new Error(`key must ends on .index/.values for binary p-column, got: ${A}`)};function f5(A){if(!A)return;const e=A.resourceType.name,t=A.getDataAsJson(),i=[];let o=0;switch(e){case t0:o=t.keyLength;break;case i0:o=t.partitionKeyLength+t.keyLength;break;case ml:case Zn:o=t.partitionKeyLength;break;case Ql:case Md:o=t.superPartitionKeyLength+t.partitionKeyLength;break}switch(e){case t0:case ml:case Zn:for(let r of A.listInputFields()){e===Zn&&(r=o0(r).baseKey);const s=[...JSON.parse(r)];i.push(s)}break;case i0:case Ql:case Md:for(const r of A.listInputFields()){const s=[...JSON.parse(r)],n=A.resolve({field:r,assertFieldType:"Input"});if(n!==void 0)for(let a of n.listInputFields()){e===Ql&&(a=o0(a).baseKey);const l=[...s,...JSON.parse(a)];i.push(l)}}break}return{data:i,keyLength:o}}function E5(A){if(A.type!=="JsonPartitioned"&&A.type!=="BinaryPartitioned")throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${A.type}`);const{parts:e,partitionKeyLength:t}=A,i=[];for(let o=0;o<t;++o)i.push(new Set);for(const o of e){const r=o.key;if(r.length!==t)throw new Error(`Key length (${r.length}) does not match partition length (${t}) for key: ${JSON.stringify(r)}`);for(let s=0;s<t;++s)i[s].add(r[s])}return i.map(o=>Array.from(o.values()))}function w5(A){if(A===void 0)return;if(TB(A))return E5(A);const e=f5(A);if(!e)return;const{data:t,keyLength:i}=e,o=[];for(let r=0;r<i;++r)o.push(new Set);for(const r of t){if(r.length!==i)throw new Error("key length does not match partition length");for(let s=0;s<i;++s)o[s].add(r[s])}return o.map(r=>Array.from(r.values()))}function r0(A,e=[]){if(A===void 0||!A.getIsReadyOrError())return;const t=A.resourceType.name,i=A.getDataAsJson();if(e.length>0&&(t===Md||t===Ql))throw new Error(`Unexpected nested super-partitioned resource: ${t}`);switch(t){case t0:case i0:throw new Error(`Only data columns are supported, got: ${t}`);case ml:{if(typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing partitionKeyLength in metadata for ${t}`);const o=[];for(const r of A.listInputFields()){const s=A.resolve({field:r,assertFieldType:"Input"});if(s===void 0)return;const n=[...e,...JSON.parse(r)];o.push({key:n,value:s})}return{type:"JsonPartitioned",partitionKeyLength:i.partitionKeyLength,parts:o}}case Zn:{if(typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing partitionKeyLength in metadata for ${t}`);const o=[],r=new Map;for(const s of A.listInputFields()){const n=o0(s),a=A.resolve({field:s,assertFieldType:"Input"});if(a===void 0)return;let l=r.get(n.baseKey);l||(l={},r.set(n.baseKey,l)),n.type==="index"?l.index=a:l.values=a}for(const[s,n]of r.entries()){if(!n.index||!n.values)return;const a=[...e,...JSON.parse(s)];o.push({key:a,value:{index:n.index,values:n.values}})}return{type:"BinaryPartitioned",partitionKeyLength:i.partitionKeyLength,parts:o}}case Md:{if(typeof(i==null?void 0:i.superPartitionKeyLength)!="number"||typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);const o=i.superPartitionKeyLength+i.partitionKeyLength,r=[];for(const s of A.listInputFields()){const n=A.resolve({field:s,assertFieldType:"Input"});if(n===void 0)return;if(n.resourceType.name!==ml)throw new Error(`Expected ${ml} inside ${t}, but got ${n.resourceType.name}`);const a=r0(n,JSON.parse(s));if(a===void 0)return;if(a.type!=="JsonPartitioned")throw new Error(`Unexpected inner result type for ${t}: ${a.type}`);r.push(...a.parts)}return{type:"JsonPartitioned",partitionKeyLength:o,parts:r}}case Ql:{if(typeof(i==null?void 0:i.superPartitionKeyLength)!="number"||typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);const o=i.superPartitionKeyLength+i.partitionKeyLength,r=[];for(const s of A.listInputFields()){const n=A.resolve({field:s,assertFieldType:"Input"});if(n===void 0)return;if(n.resourceType.name!==Zn)throw new Error(`Expected ${Zn} inside ${t}, but got ${n.resourceType.name}`);const a=r0(n,JSON.parse(s));if(a===void 0)return;if(a.type!=="BinaryPartitioned")throw new Error(`Unexpected inner result type for ${t}: ${a.type}`);r.push(...a.parts)}return{type:"BinaryPartitioned",partitionKeyLength:o,parts:r}}default:throw new Error(`Unknown resource type: ${t}`)}}function I5(A){if(A!==void 0){if(TB(A))return A;if(LB(A))return FR(A);if(A instanceof to)return r0(A);throw new Error(`Unexpected input type: ${typeof A}`)}}function m5(A,e){const t=[...e].sort((s,n)=>n[0]-s[0]),{type:i}=A;switch(i){case"Json":{const{keyLength:s}=A;for(const[n]of e)if(n>=s)throw new Error(`Can't filter on non-data axis ${n}. Must be >= ${s}`);break}case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":{const{partitionKeyLength:s}=A;for(const[n]of e)if(n>=s)throw new Error(`Can't filter on non-partitioned axis ${n}. Must be >= ${s}`);break}default:throw new Error(`Unsupported data info type: ${i}`)}const o=s=>{for(const[n,a]of t)if(s[n]!==a)return!1;return!0},r=s=>{const n=[...s];for(const[a]of t)n.splice(a,1);return n};switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength-e.length,data:A.data.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))}}}function Q5(A){if(!Array.isArray(A))return!1;if(A.length===0)return!0;const e=A[0];return typeof e=="object"&&e!==null&&"key"in e&&"val"in e}class v5{constructor(e){RA(this,"columns");this.columns=e}selectColumns(e){const t=typeof e=="function"?e:rg(e);return this.columns.filter(i=>t(i.spec))}}function D5(A){if(A)return A.map(e=>({type:`split:${NR(e.axisId)}`,label:e.label,importance:1e6}))}function b5(A){if(A)return A.map(e=>[e.axisIdx,e.value])}function M5(A,e){if(!e||e.length===0)return A;const t=[...e].sort((i,o)=>i[0]-o[0]);return mn({id:A,axisFilters:t})}function L2(A){if(!A||typeof A!="object")return!1;const e=A,t=e.domain&&typeof e.domain=="object"&&Object.values(e.domain).some(o=>typeof o=="object"&&o!==null&&"anchor"in o),i=e.axes&&Array.isArray(e.axes)&&e.axes.some(o=>typeof o=="object"&&o!==null&&"anchor"in o);return!!e.domainAnchor||t||i}function x5(A){if(typeof A!="object"||!("axes"in A)||A.axes===void 0)return[];const e=A.axes.map((t,i)=>typeof t=="object"&&"split"in t&&t.split===!0?i:-1).filter(t=>t!==-1);if(e.length>0&&A.partialAxesMatch!==void 0)throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");return e.sort((t,i)=>t-i),e}class T2{constructor(){RA(this,"defaultProviderStore",[]);RA(this,"providers",[new v5(this.defaultProviderStore)]);RA(this,"axisLabelProviders",[])}addColumnProvider(e){return this.providers.push(e),this}addAxisLabelProvider(e){return this.axisLabelProviders.push(e),this}addColumns(e){return this.defaultProviderStore.push(...e),this}addColumn(e){return this.defaultProviderStore.push(e),this}findLabels(e){for(const t of this.axisLabelProviders){const i=t.findLabels(e);if(i)return i}}getUniversalEntries(e,t){const{anchorCtx:i,labelOps:o,dontWaitAllData:r=!1,overrideLabelAnnotation:s=!1,exclude:n}=t??{},a={...s&&(o==null?void 0:o.includeNativeLabel)!==!1?{includeNativeLabel:!0}:{},...o??{}};let l=()=>!1;if(n){const p=(Array.isArray(n)?n:[n]).map(C=>{if(L2(C)){if(!i)throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");return rg(R2(i.anchors,C,t))}else return rg(C)});l=C=>p.some(B=>B(C))}const g=typeof e=="function"?[e]:Array.isArray(e)?e:[e],c=[],d=new Set;for(const p of g){const C=L2(p);let B;if(C){if(!i)throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");B=R2(i.anchors,p,t)}else B=p;const f=new Set,E=[];for(const m of this.providers){const x=m.selectColumns(B);for(const D of x){if(l(D.spec))continue;if(f.has(D.id))throw new Error(`Duplicate column id ${D.id} in provider ${m.constructor.name}`);const v=A5(D.spec);d.has(v)||(f.add(D.id),d.add(v),E.push(D))}}if(E.length===0)continue;const w=x5(p),I=w.length>0;for(const m of E){if(!As(m.spec))continue;const x=m.spec;if(I){if(Q5(m.data))throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${m.id}`);const D=I5(m.data);if(!D){if(r)continue;return}if(!xR(D))throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${D.type} for column ${m.id}`);const v=w5(D),U=w[w.length-1];if(U>=D.partitionKeyLength)throw new Error(`Not enough partition keys (${D.partitionKeyLength}) for requested split axes (max index ${U}) in column ${x.name}`);const S=w.map(O=>this.findLabels(go(x.axesSpec[O]))),M=[],z=(O,X)=>{if(X>=w.length){if(M.push([...O]),M.length>1e4)throw new Error("Too many key combinations, aborting.");return}const AA=w[X];if(AA>=v.length)throw new Error(`Axis index ${AA} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${m.id}`);const aA=v[AA];if(!aA||aA.length===0){M.length=0;return}for(const bA of aA)O.push(bA),z(O,X+1),O.pop()};if(z([],0),M.length===0)continue;const T=[...x.axesSpec],y=w.map(O=>O);for(let O=w.length-1;O>=0;O--)T.splice(w[O],1);const H={...x,axesSpec:T};for(const O of M){const X=O.map((AA,aA)=>{const bA=y[aA],mA=go(x.axesSpec[bA]),PA=S[aA],uA=(PA==null?void 0:PA[AA])??String(AA);return{axisIdx:bA,axisId:mA,value:AA,label:uA}});c.push({type:"split",originalColumn:m,spec:x,adjustedSpec:H,dataEntries:D,axisFilters:X})}}else c.push({type:"direct",originalColumn:m,spec:x,adjustedSpec:x})}}if(c.length===0)return[];const h=gv(c,p=>({spec:p.spec,suffixTrace:p.type==="split"?D5(p.axisFilters):void 0}),a),u=[];for(const{value:p,label:C}of h){const{originalColumn:B,spec:f}=p,E=p.type==="split"?p.axisFilters:void 0,w=b5(E);let I;i?I=i.deriveS(f,w):I=M5(B.id,w);let m={...p.adjustedSpec};s&&(m={...m,annotations:{...m.annotations??{},[be.Label]:C}}),u.push({id:I,spec:m,data:()=>p.type==="split"?yR(m5(p.dataEntries,w)):p.originalColumn.data,label:C})}return u}getColumns(e,t){const i=this.getUniversalEntries(e,{overrideLabelAnnotation:!0,...t??{}});if(!i)return;const o=[];for(const r of i){const s=r.data();if(!s){if(t!=null&&t.dontWaitAllData)continue;return}o.push({id:r.id,spec:r.spec,data:s})}return o}}function U2(A){const e=o=>o.operator!=="InSet"?o:{operator:"Or",operands:o.references.map(r=>({operator:"Equal",reference:r}))},t=(o,r)=>{switch(o.operator){case"And":return{...o,operands:o.operands.map(n=>t(n,r))};case"Or":return{...o,operands:o.operands.map(n=>t(n,r))};case"Not":return{...o,operand:t(o.operand,r)};default:return r(o)}},i=(o,r)=>({...o,predicate:t(o.predicate,r)});return A.map(o=>i(o,e))}function zu(A,e){if(A===void 0)return e===void 0;if(e===void 0)return!0;for(const t in e)if(A[t]!==e[t])return!1;return!0}function N2(A){return OB(A,e=>e instanceof to?e.handle:LB(e)?MR(e,t=>t.handle):e)}class F5{constructor(){RA(this,"ctx",ge())}calculateOptions(e){return this.ctx.calculateOptions(e)}getOptions(e,t){const i=typeof e=="function"?e:rg(e),o=this.getSpecs().entries.filter(n=>i(n.obj));let r={},s=!1;return typeof t<"u"&&(typeof t=="function"?r=t:typeof t=="object"&&("includeNativeLabel"in t||"separator"in t||"addLabelAsSuffix"in t?r=t:(t=t,r=t.label??{},s=t.refsWithEnrichments??!1))),typeof r=="object"?gv(o,n=>n.obj,r??{}).map(({value:{ref:n},label:a})=>({ref:Y2(n,s),label:a})):o.map(({ref:n,obj:a})=>({ref:Y2(n,s),label:r(a,n)}))}resolveAnchorCtx(e){if(e instanceof S2)return e;const t={};for(const[i,o]of Object.entries(e))if(g5(o)){const r=this.getPColumnSpecByRef(o);if(!r)return;t[i]=r}else t[i]=o;return new S2(t)}getAnchoredPColumns(e,t,i){const o=this.resolveAnchorCtx(e);if(o)return new T2().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t,{...i,anchorCtx:o})}getCanonicalOptions(e,t,i){const o=this.resolveAnchorCtx(e);if(!o)return;const r=new T2().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t,{...i,anchorCtx:o});if(r)return r.map(s=>({value:s.id,label:s.label}))}getDataFromResultPool(){return this.getData()}getData(){const e=this.ctx.getDataFromResultPool();return{isComplete:e.isComplete,entries:e.entries.map(t=>({ref:t.ref,obj:{...t.obj,data:new to(t.obj.data,[t.ref.blockId,t.ref.name])}}))}}getDataWithErrorsFromResultPool(){return this.getDataWithErrors()}getDataWithErrors(){const e=this.ctx.getDataWithErrorsFromResultPool();return{isComplete:e.isComplete,entries:e.entries.map(t=>({ref:t.ref,obj:{...t.obj,data:c5(t.obj.data,i=>new to(i,[t.ref.blockId,t.ref.name]))}}))}}getSpecsFromResultPool(){return this.getSpecs()}getSpecs(){return this.ctx.getSpecsFromResultPool()}getDataByRef(e){var i;if(typeof this.ctx.getDataFromResultPoolByRef>"u")return(i=this.getData().entries.find(o=>o.ref.blockId===e.blockId&&o.ref.name===e.name))==null?void 0:i.obj;const t=this.ctx.getDataFromResultPoolByRef(e.blockId,e.name);if(t)return OB(t,o=>new to(o,[e.blockId,e.name]))}getPColumnByRef(e){const t=this.getDataByRef(e);if(t)return _R(t)}getPColumnSpecByRef(e){const t=this.getSpecByRef(e);if(t){if(!As(t))throw new Error(`not a PColumn spec (kind = ${t.kind})`);return t}}getSpecByRef(e){return this.ctx.getSpecFromResultPoolByRef(e.blockId,e.name)}findDataWithCompatibleSpec(e){const t=[];A:for(const i of this.getData().entries){if(!As(i.obj.spec))continue;const o=i.obj.spec;if(e.name===o.name&&e.valueType===o.valueType&&e.axesSpec.length===o.axesSpec.length&&zu(e.domain,o.domain)){for(let r=0;r<e.axesSpec.length;++r){const s=e.axesSpec[r],n=o.axesSpec[r];if(s.name!==n.name||s.type!==n.type||!zu(s.domain,n.domain))continue A}t.push(i.obj)}}return t}findLabels(e){const t=this.getData();for(const i of t.entries){if(!zB(i.obj))continue;const o=i.obj.spec;if(o.name===HB.Label&&o.axesSpec.length===1&&o.axesSpec[0].name===e.name&&o.axesSpec[0].type===e.type&&zu(e.domain,o.axesSpec[0].domain)){if(i.obj.data.resourceType.name!=="PColumnData/Json")throw Error(`Expected JSON column for labels, got: ${i.obj.data.resourceType.name}`);return Object.fromEntries(Object.entries(i.obj.data.getDataAsJson().data).map(s=>[JSON.parse(s[0])[0],s[1]]))}}}selectColumns(e){const t=typeof e=="function"?e:rg(e);return this.getSpecs().entries.filter(({obj:o})=>As(o)?t(o):!1).map(({ref:o,obj:r})=>{const s=r;let n=null;const a=this;return{id:mn(o),spec:s,get data(){var l;return n!==null||(n=(l=a.getPColumnByRef(o))==null?void 0:l.data),n}}})}findLabelsForColumnAxis(e,t){const i=this.findLabels(e.axesSpec[t]);if(!i)return;const o=Br(e,`pl7.app/axisKeys/${t}`);if(o!==void 0){const r=JSON.parse(o);return Object.fromEntries(r.map(s=>[s,i[s]??"Unlabelled"]))}else return i}}class lc{constructor(){RA(this,"ctx");RA(this,"_argsCache");RA(this,"_uiStateCache");RA(this,"_activeArgsCache");RA(this,"resultPool",new F5);this.ctx=ge()}get args(){if(this._argsCache===void 0){const e=this.ctx.args,t=typeof e=="function"?e():e;this._argsCache={v:JSON.parse(t)}}return this._argsCache.v}get uiState(){if(this._uiStateCache===void 0){const e=this.ctx.uiState,t=typeof e=="function"?e():e;this._uiStateCache={v:t?JSON.parse(t):{}}}return this._uiStateCache.v}get activeArgs(){if(this._activeArgsCache===void 0){const e=this.ctx.activeArgs,t=typeof e=="function"?e():e;this._activeArgsCache={v:t?JSON.parse(t):void 0}}return this._activeArgsCache.v}getNamedAccessor(e){return e0(this.ctx.getAccessorHandleByName(e),t=>new to(t,[e]))}get prerun(){return this.getNamedAccessor(d5)}get outputs(){return this.getNamedAccessor(h5)}findLabels(e){return this.resultPool.findLabels(e)}verifyInlineAndExplicitColumnsSupport(e){var o;const t=e.some(r=>!(r.data instanceof to)||LB(r.data)),i=((o=this.ctx.featureFlags)==null?void 0:o.inlineColumnsSupport)===!0;if(t&&!i)throw Error("Inline or explicit columns not supported")}patchPTableDef(e){var t,i;return(t=this.ctx.featureFlags)!=null&&t.pTablePartitionFiltersSupport||(e={...e,partitionFilters:[],filters:[...e.partitionFilters,...e.filters]}),(i=this.ctx.featureFlags)!=null&&i.pFrameInSetFilterSupport||(e={...e,partitionFilters:U2(e.partitionFilters),filters:U2(e.filters)}),e}createPFrame(e){return this.verifyInlineAndExplicitColumnsSupport(e),this.ctx.createPFrame(e.map(t=>N2(t)))}createPTable(e){let t;return"columns"in e?t=this.patchPTableDef({src:{type:"full",entries:e.columns.map(i=>({type:"column",column:i}))},partitionFilters:e.filters??[],filters:[],sorting:e.sorting??[]}):t=this.patchPTableDef(e),this.verifyInlineAndExplicitColumnsSupport($R(t.src)),this.ctx.createPTable(KR(t,i=>N2(i)))}getBlockLabel(e){return this.ctx.getBlockLabel(e)}getCurrentUnstableMarker(){return this.ctx.getCurrentUnstableMarker()}logInfo(e){this.ctx.logInfo(e)}logWarn(e){this.ctx.logWarn(e)}logError(e){this.ctx.logError(e)}}var y5="1.42.36";const Vc=y5;function S5(A){return A.__renderLambda===!0}function Ou(A){if(A!==void 0)return S5(A)?A.handle:A}const rt=class rt{constructor(e,t,i,o,r,s,n,a,l){RA(this,"_renderingMode");RA(this,"_initialArgs");RA(this,"_initialUiState");RA(this,"_outputs");RA(this,"_inputsValid");RA(this,"_sections");RA(this,"_title");RA(this,"_enrichmentTargets");RA(this,"_featureFlags");this._renderingMode=e,this._initialArgs=t,this._initialUiState=i,this._outputs=o,this._inputsValid=r,this._sections=s,this._title=n,this._enrichmentTargets=a,this._featureFlags=l}static create(e="Heavy"){return new rt(e,void 0,{},{},Lu(!0),Lu([]),void 0,void 0,{...rt.INITIAL_BLOCK_FEATURE_FLAGS})}output(e,t,i={}){if(typeof t=="function"){const o=`output#${e}`;return Ha(o,()=>t(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,{...this._outputs,[e]:{__renderLambda:!0,handle:o,...i}},this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}else return new rt(this._renderingMode,this._initialArgs,this._initialUiState,{...this._outputs,[e]:t},this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}retentiveOutput(e,t){return this.output(e,t,{retentive:!0})}argsValid(e){return typeof e=="function"?(Ha("inputsValid",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,{__renderLambda:!0,handle:"inputsValid"},this._sections,this._title,this._enrichmentTargets,this._featureFlags)):new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,e,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}sections(e){return Array.isArray(e)?this.sections(Lu(e)):typeof e=="function"?(Ha("sections",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,{__renderLambda:!0,handle:"sections"},this._title,this._enrichmentTargets,this._featureFlags)):new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,e,this._title,this._enrichmentTargets,this._featureFlags)}title(e){return Ha("title",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,{__renderLambda:!0,handle:"title"},this._enrichmentTargets,this._featureFlags)}initialArgs(e){return new rt(this._renderingMode,e,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withArgs(e){return new rt(this._renderingMode,e,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withUiState(e){return new rt(this._renderingMode,this._initialArgs,e,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withFeatureFlags(e){return new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,{...this._featureFlags,...e})}enriches(e){return Ha("enrichmentTargets",e),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,{__renderLambda:!0,handle:"enrichmentTargets"},this._featureFlags)}done(e){const t=e??1;return this.withFeatureFlags({...this._featureFlags,requiresUIAPIVersion:t})._done(t)}_done(e){if(this._initialArgs===void 0)throw new Error("Initial arguments not set.");const t={v3:{sdkVersion:Vc,renderingMode:this._renderingMode,initialArgs:this._initialArgs,initialUiState:this._initialUiState,inputsValid:this._inputsValid,sections:this._sections,title:this._title,outputs:this._outputs,enrichmentTargets:this._enrichmentTargets,featureFlags:this._featureFlags},sdkVersion:Vc,renderingMode:this._renderingMode,initialArgs:this._initialArgs,inputsValid:Ou(this._inputsValid),sections:Ou(this._sections),outputs:Object.fromEntries(Object.entries(this._outputs).map(([i,o])=>[i,Ou(o)]))};return globalThis.platformaApiVersion=e,ES()?V1({sdkVersion:Vc,apiVersion:platformaApiVersion}):{config:t}}};RA(rt,"INITIAL_BLOCK_FEATURE_FLAGS",{supportsLazyState:!0,requiresUIAPIVersion:1,requiresModelAPIVersion:1});let s0=rt;function H2(A){return A.axesSpec.length===1&&A.name===HB.Label}function R5(A){return!!NB(A,be.IsLinkerColumn)}function k5({selection:A,columnId:e=l5(),label:t="Selection marker",domain:i}){if(!(A!=null&&A.axesSpec.length))return;const o=A.selectedKeys.filter(r=>r.every(s=>!JR(s))).map(r=>({key:r,val:1}));if(o.length)return{id:e,spec:{kind:"PColumn",valueType:hi.Int,name:HB.Table.RowSelection,axesSpec:A.axesSpec,...i&&Object.keys(i).length&&{domain:i},annotations:{[be.Label]:t,[be.DiscreteValues]:YR([1])}},data:o}}function P5(){return platformaApiVersion??1}function Fo(){return V1({sdkVersion:Vc,apiVersion:platformaApiVersion})}var gc={exports:{}},z2;function Y5(){return z2||(z2=1,function(A,e){e=A.exports=t,e.getSerialize=i;function t(o,r,s,n){return JSON.stringify(o,i(r,n),s)}function i(o,r){var s=[],n=[];return r==null&&(r=function(a,l){return s[0]===l?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(l)).join(".")+"]"}),function(a,l){if(s.length>0){var g=s.indexOf(this);~g?s.splice(g+1):s.push(this),~g?n.splice(g,1/0,a):n.push(a),~s.indexOf(l)&&(l=r.call(this,a,l))}else s.push(l);return o==null?l:o.call(this,a,l)}}}(gc,gc.exports)),gc.exports}Y5();const G5=gA.object({type:gA.literal("PlError"),name:gA.string(),message:gA.string(),fullMessage:gA.string().optional(),stack:gA.string().optional()}),L5=G5.extend({cause:gA.lazy(()=>xd).optional(),errors:gA.lazy(()=>xd.array()).optional()}),T5=gA.object({type:gA.literal("StandardError"),name:gA.string(),message:gA.string(),stack:gA.string().optional()}),U5=T5.extend({cause:gA.lazy(()=>xd).optional(),errors:gA.lazy(()=>xd.array()).optional()}),xd=gA.union([U5,L5]),N5=gA.object({name:gA.string(),message:gA.string(),fullMessage:gA.string().optional(),stack:gA.string().optional()}),O2=N5.extend({cause:gA.lazy(()=>O2).optional(),errors:gA.lazy(()=>O2.array()).optional()});function H5(A){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(A)}const V2=Array.isArray;function J2(A){return A!==null&&typeof A=="object"}function z5(A){return typeof A=="object"&&A!==null}function n0(A){if(!z5(A))return!1;const e=Object.getPrototypeOf(A);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function j2(A){return Object.values(A).reduce((e,t)=>t!==void 0?e+1:e,0)}function Pt(A,e){if(!(J2(A)&&J2(e)))return A===e;if(V2(A)&&V2(e))return A.length!==e.length?!1:[...A.keys()].every(t=>Pt(A[t],e[t]));if(n0(A)&&n0(e))return j2(A)!==j2(e)?!1:Object.keys(A).every(t=>Pt(A[t],e[t]));throw Error(`Cannot compare a ${String(A)} and b ${String(e)}`)}function st(A){if(Array.isArray(A)){const e=[];for(let t=0;t<A.length;t++)e[t]=st(A[t]);return e}else if(n0(A)){const e={};return Object.keys(A).forEach(t=>{e[t]=st(A[t])}),e}else return A}var O5=Object.defineProperty,V5=(A,e,t)=>e in A?O5(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t,a0=(A,e,t)=>V5(A,typeof e!="symbol"?e+"":e,t);let J5=class extends Error{constructor(){super(...arguments),a0(this,"name","UnresolvedError")}},VB=class extends Error{constructor(e){super(e.map(t=>typeof t=="string"?t:t.message).join(`
|
|
17
|
+
**/let qC;const r2=typeof window<"u"&&window.trustedTypes;if(r2)try{qC=r2.createPolicy("vue",{createHTML:A=>A})}catch{}const N1=qC?A=>qC.createHTML(A):A=>A,yy="http://www.w3.org/2000/svg",Sy="http://www.w3.org/1998/Math/MathML",or=typeof document<"u"?document:null,s2=or&&or.createElement("template"),Ry={insert:(A,e,t)=>{e.insertBefore(A,t||null)},remove:A=>{const e=A.parentNode;e&&e.removeChild(A)},createElement:(A,e,t,i)=>{const o=e==="svg"?or.createElementNS(yy,A):e==="mathml"?or.createElementNS(Sy,A):t?or.createElement(A,{is:t}):or.createElement(A);return A==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:A=>or.createTextNode(A),createComment:A=>or.createComment(A),setText:(A,e)=>{A.nodeValue=e},setElementText:(A,e)=>{A.textContent=e},parentNode:A=>A.parentNode,nextSibling:A=>A.nextSibling,querySelector:A=>or.querySelector(A),setScopeId(A,e){A.setAttribute(e,"")},insertStaticContent(A,e,t,i,o,r){const s=t?t.previousSibling:e.lastChild;if(o&&(o===r||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),t),!(o===r||!(o=o.nextSibling)););else{s2.innerHTML=N1(i==="svg"?`<svg>${A}</svg>`:i==="mathml"?`<math>${A}</math>`:A);const n=s2.content;if(i==="svg"||i==="mathml"){const a=n.firstChild;for(;a.firstChild;)n.appendChild(a.firstChild);n.removeChild(a)}e.insertBefore(n,t)}return[s?s.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},Sr="transition",Na="animation",Ol=Symbol("_vtc"),H1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ky=Xe({},$Q,H1),Py=A=>(A.displayName="Transition",A.props=ky,A),YB=Py((A,{slots:e})=>xy(S3,Yy(A),e)),bs=(A,e=[])=>{SA(A)?A.forEach(t=>t(...e)):A&&A(...e)},n2=A=>A?SA(A)?A.some(e=>e.length>1):A.length>1:!1;function Yy(A){const e={};for(const M in A)M in H1||(e[M]=A[M]);if(A.css===!1)return e;const{name:t="v",type:i,duration:o,enterFromClass:r=`${t}-enter-from`,enterActiveClass:s=`${t}-enter-active`,enterToClass:n=`${t}-enter-to`,appearFromClass:a=r,appearActiveClass:l=s,appearToClass:g=n,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:h=`${t}-leave-to`}=A,u=Gy(o),p=u&&u[0],C=u&&u[1],{onBeforeEnter:B,onEnter:f,onEnterCancelled:E,onLeave:w,onLeaveCancelled:I,onBeforeAppear:m=B,onAppear:x=f,onAppearCancelled:D=E}=e,v=(M,z,T,y)=>{M._enterCancelled=y,Ms(M,z?g:n),Ms(M,z?l:s),T&&T()},U=(M,z)=>{M._isLeaving=!1,Ms(M,c),Ms(M,h),Ms(M,d),z&&z()},S=M=>(z,T)=>{const y=M?x:f,H=()=>v(z,M,T);bs(y,[z,H]),a2(()=>{Ms(z,M?a:r),Ar(z,M?g:n),n2(y)||l2(z,i,p,H)})};return Xe(e,{onBeforeEnter(M){bs(B,[M]),Ar(M,r),Ar(M,s)},onBeforeAppear(M){bs(m,[M]),Ar(M,a),Ar(M,l)},onEnter:S(!1),onAppear:S(!0),onLeave(M,z){M._isLeaving=!0;const T=()=>U(M,z);Ar(M,c),M._enterCancelled?(Ar(M,d),d2()):(d2(),Ar(M,d)),a2(()=>{M._isLeaving&&(Ms(M,c),Ar(M,h),n2(w)||l2(M,i,C,T))}),bs(w,[M,T])},onEnterCancelled(M){v(M,!1,void 0,!0),bs(E,[M])},onAppearCancelled(M){v(M,!0,void 0,!0),bs(D,[M])},onLeaveCancelled(M){U(M),bs(I,[M])}})}function Gy(A){if(A==null)return null;if(pe(A))return[Pu(A.enter),Pu(A.leave)];{const e=Pu(A);return[e,e]}}function Pu(A){return T4(A)}function Ar(A,e){e.split(/\s+/).forEach(t=>t&&A.classList.add(t)),(A[Ol]||(A[Ol]=new Set)).add(e)}function Ms(A,e){e.split(/\s+/).forEach(i=>i&&A.classList.remove(i));const t=A[Ol];t&&(t.delete(e),t.size||(A[Ol]=void 0))}function a2(A){requestAnimationFrame(()=>{requestAnimationFrame(A)})}let Ly=0;function l2(A,e,t,i){const o=A._endId=++Ly,r=()=>{o===A._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:s,timeout:n,propCount:a}=Ty(A,e);if(!s)return i();const l=s+"end";let g=0;const c=()=>{A.removeEventListener(l,d),r()},d=h=>{h.target===A&&++g>=a&&c()};setTimeout(()=>{g<a&&c()},n+1),A.addEventListener(l,d)}function Ty(A,e){const t=window.getComputedStyle(A),i=u=>(t[u]||"").split(", "),o=i(`${Sr}Delay`),r=i(`${Sr}Duration`),s=g2(o,r),n=i(`${Na}Delay`),a=i(`${Na}Duration`),l=g2(n,a);let g=null,c=0,d=0;e===Sr?s>0&&(g=Sr,c=s,d=r.length):e===Na?l>0&&(g=Na,c=l,d=a.length):(c=Math.max(s,l),g=c>0?s>l?Sr:Na:null,d=g?g===Sr?r.length:a.length:0);const h=g===Sr&&/\b(transform|all)(,|$)/.test(i(`${Sr}Property`).toString());return{type:g,timeout:c,propCount:d,hasTransform:h}}function g2(A,e){for(;A.length<e.length;)A=A.concat(A);return Math.max(...e.map((t,i)=>c2(t)+c2(A[i])))}function c2(A){return A==="auto"?0:Number(A.slice(0,-1).replace(",","."))*1e3}function d2(){return document.body.offsetHeight}function Uy(A,e,t){const i=A[Ol];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?A.removeAttribute("class"):t?A.setAttribute("class",e):A.className=e}const h2=Symbol("_vod"),Ny=Symbol("_vsh"),z1=Symbol("");function Hy(A){const e=Rg();if(!e)return;const t=e.ut=(o=A(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>Ed(r,o))},i=()=>{const o=A(e.proxy);e.ce?Ed(e.ce,o):XC(e.subTree,o),t(o)};s1(()=>{JQ(i)}),jo(()=>{ne(i,$i,{flush:"post"});const o=new MutationObserver(i);o.observe(e.subTree.el.parentNode,{childList:!0}),yg(()=>o.disconnect())})}function XC(A,e){if(A.shapeFlag&128){const t=A.suspense;A=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{XC(t.activeBranch,e)})}for(;A.component;)A=A.component.subTree;if(A.shapeFlag&1&&A.el)Ed(A.el,e);else if(A.type===oe)A.children.forEach(t=>XC(t,e));else if(A.type===Nc){let{el:t,anchor:i}=A;for(;t&&(Ed(t,e),t!==i);)t=t.nextSibling}}function Ed(A,e){if(A.nodeType===1){const t=A.style;let i="";for(const o in e)t.setProperty(`--${o}`,e[o]),i+=`--${o}: ${e[o]};`;t[z1]=i}}const zy=/(^|;)\s*display\s*:/;function Oy(A,e,t){const i=A.style,o=Re(t);let r=!1;if(t&&!o){if(e)if(Re(e))for(const s of e.split(";")){const n=s.slice(0,s.indexOf(":")).trim();t[n]==null&&zc(i,n,"")}else for(const s in e)t[s]==null&&zc(i,s,"");for(const s in t)s==="display"&&(r=!0),zc(i,s,t[s])}else if(o){if(e!==t){const s=i[z1];s&&(t+=";"+s),i.cssText=t,r=zy.test(t)}}else e&&A.removeAttribute("style");h2 in A&&(A[h2]=r?i.display:"",A[Ny]&&(i.display="none"))}const u2=/\s*!important$/;function zc(A,e,t){if(SA(t))t.forEach(i=>zc(A,e,i));else if(t==null&&(t=""),e.startsWith("--"))A.setProperty(e,t);else{const i=Vy(A,e);u2.test(t)?A.setProperty(Dr(i),t.replace(u2,""),"important"):A[i]=t}}const p2=["Webkit","Moz","ms"],Yu={};function Vy(A,e){const t=Yu[e];if(t)return t;let i=mi(e);if(i!=="filter"&&i in A)return Yu[e]=i;i=Bh(i);for(let o=0;o<p2.length;o++){const r=p2[o]+i;if(r in A)return Yu[e]=r}return e}const C2="http://www.w3.org/1999/xlink";function B2(A,e,t,i,o,r=J4(e)){i&&e.startsWith("xlink:")?t==null?A.removeAttributeNS(C2,e.slice(6,e.length)):A.setAttributeNS(C2,e,t):t==null||r&&!EQ(t)?A.removeAttribute(e):A.setAttribute(e,r?"":no(t)?String(t):t)}function f2(A,e,t,i,o){if(e==="innerHTML"||e==="textContent"){t!=null&&(A[e]=e==="innerHTML"?N1(t):t);return}const r=A.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const n=r==="OPTION"?A.getAttribute("value")||"":A.value,a=t==null?A.type==="checkbox"?"on":"":String(t);(n!==a||!("_value"in A))&&(A.value=a),t==null&&A.removeAttribute(e),A._value=t;return}let s=!1;if(t===""||t==null){const n=typeof A[e];n==="boolean"?t=EQ(t):t==null&&n==="string"?(t="",s=!0):n==="number"&&(t=0,s=!0)}try{A[e]=t}catch{}s&&A.removeAttribute(o||e)}function cr(A,e,t,i){A.addEventListener(e,t,i)}function Jy(A,e,t,i){A.removeEventListener(e,t,i)}const E2=Symbol("_vei");function jy(A,e,t,i,o=null){const r=A[E2]||(A[E2]={}),s=r[e];if(i&&s)s.value=i;else{const[n,a]=Wy(e);if(i){const l=r[e]=Xy(i,o);cr(A,n,l,a)}else s&&(Jy(A,n,s,a),r[e]=void 0)}}const w2=/(?:Once|Passive|Capture)$/;function Wy(A){let e;if(w2.test(A)){e={};let i;for(;i=A.match(w2);)A=A.slice(0,A.length-i[0].length),e[i[0].toLowerCase()]=!0}return[A[2]===":"?A.slice(3):Dr(A.slice(2)),e]}let Gu=0;const Ky=Promise.resolve(),qy=()=>Gu||(Ky.then(()=>Gu=0),Gu=Date.now());function Xy(A,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ao(Zy(i,t.value),e,5,[i])};return t.value=A,t.attached=qy(),t}function Zy(A,e){if(SA(e)){const t=A.stopImmediatePropagation;return A.stopImmediatePropagation=()=>{t.call(A),A._stopped=!0},e.map(i=>o=>!o._stopped&&i&&i(o))}else return e}const I2=A=>A.charCodeAt(0)===111&&A.charCodeAt(1)===110&&A.charCodeAt(2)>96&&A.charCodeAt(2)<123,_y=(A,e,t,i,o,r)=>{const s=o==="svg";e==="class"?Uy(A,i,s):e==="style"?Oy(A,t,i):ph(e)?wB(e)||jy(A,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):$y(A,e,i,s))?(f2(A,e,i),!A.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&B2(A,e,i,s,r,e!=="value")):A._isVueCE&&(/[A-Z]/.test(e)||!Re(i))?f2(A,mi(e),i,r,e):(e==="true-value"?A._trueValue=i:e==="false-value"&&(A._falseValue=i),B2(A,e,i,s))};function $y(A,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in A&&I2(e)&&JA(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&A.tagName==="INPUT"||e==="type"&&A.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=A.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return I2(e)&&Re(t)?!1:e in A}const ls=A=>{const e=A.props["onUpdate:modelValue"]||!1;return SA(e)?t=>Tc(e,t):e};function AS(A){A.target.composing=!0}function m2(A){const e=A.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ki=Symbol("_assign"),Vl={created(A,{modifiers:{lazy:e,trim:t,number:i}},o){A[ki]=ls(o);const r=i||o.props&&o.props.type==="number";cr(A,e?"change":"input",s=>{if(s.target.composing)return;let n=A.value;t&&(n=n.trim()),r&&(n=gd(n)),A[ki](n)}),t&&cr(A,"change",()=>{A.value=A.value.trim()}),e||(cr(A,"compositionstart",AS),cr(A,"compositionend",m2),cr(A,"change",m2))},mounted(A,{value:e}){A.value=e??""},beforeUpdate(A,{value:e,oldValue:t,modifiers:{lazy:i,trim:o,number:r}},s){if(A[ki]=ls(s),A.composing)return;const n=(r||A.type==="number")&&!/^0\d/.test(A.value)?gd(A.value):A.value,a=e??"";n!==a&&(document.activeElement===A&&A.type!=="range"&&(i&&e===t||o&&A.value.trim()===a)||(A.value=a))}},eS={deep:!0,created(A,e,t){A[ki]=ls(t),cr(A,"change",()=>{const i=A._modelValue,o=ua(A),r=A.checked,s=A[ki];if(SA(i)){const n=QB(i,o),a=n!==-1;if(r&&!a)s(i.concat(o));else if(!r&&a){const l=[...i];l.splice(n,1),s(l)}}else if(Ma(i)){const n=new Set(i);r?n.add(o):n.delete(o),s(n)}else s(O1(A,r))})},mounted:Q2,beforeUpdate(A,e,t){A[ki]=ls(t),Q2(A,e,t)}};function Q2(A,{value:e,oldValue:t},i){A._modelValue=e;let o;if(SA(e))o=QB(e,i.props.value)>-1;else if(Ma(e))o=e.has(i.props.value);else{if(e===t)return;o=tn(e,O1(A,!0))}A.checked!==o&&(A.checked=o)}const tS={created(A,{value:e},t){A.checked=tn(e,t.props.value),A[ki]=ls(t),cr(A,"change",()=>{A[ki](ua(A))})},beforeUpdate(A,{value:e,oldValue:t},i){A[ki]=ls(i),e!==t&&(A.checked=tn(e,i.props.value))}},iS={deep:!0,created(A,{value:e,modifiers:{number:t}},i){const o=Ma(e);cr(A,"change",()=>{const r=Array.prototype.filter.call(A.options,s=>s.selected).map(s=>t?gd(ua(s)):ua(s));A[ki](A.multiple?o?new Set(r):r:r[0]),A._assigning=!0,vh(()=>{A._assigning=!1})}),A[ki]=ls(i)},mounted(A,{value:e}){v2(A,e)},beforeUpdate(A,e,t){A[ki]=ls(t)},updated(A,{value:e}){A._assigning||v2(A,e)}};function v2(A,e){const t=A.multiple,i=SA(e);if(!(t&&!i&&!Ma(e))){for(let o=0,r=A.options.length;o<r;o++){const s=A.options[o],n=ua(s);if(t)if(i){const a=typeof n;a==="string"||a==="number"?s.selected=e.some(l=>String(l)===String(n)):s.selected=QB(e,n)>-1}else s.selected=e.has(n);else if(tn(ua(s),e)){A.selectedIndex!==o&&(A.selectedIndex=o);return}}!t&&A.selectedIndex!==-1&&(A.selectedIndex=-1)}}function ua(A){return"_value"in A?A._value:A.value}function O1(A,e){const t=e?"_trueValue":"_falseValue";return t in A?A[t]:e}const oS={created(A,e,t){ac(A,e,t,null,"created")},mounted(A,e,t){ac(A,e,t,null,"mounted")},beforeUpdate(A,e,t,i){ac(A,e,t,i,"beforeUpdate")},updated(A,e,t,i){ac(A,e,t,i,"updated")}};function rS(A,e){switch(A){case"SELECT":return iS;case"TEXTAREA":return Vl;default:switch(e){case"checkbox":return eS;case"radio":return tS;default:return Vl}}}function ac(A,e,t,i,o){const s=rS(A.tagName,t.props&&t.props.type)[o];s&&s(A,e,t,i)}const sS=["ctrl","shift","alt","meta"],nS={stop:A=>A.stopPropagation(),prevent:A=>A.preventDefault(),self:A=>A.target!==A.currentTarget,ctrl:A=>!A.ctrlKey,shift:A=>!A.shiftKey,alt:A=>!A.altKey,meta:A=>!A.metaKey,left:A=>"button"in A&&A.button!==0,middle:A=>"button"in A&&A.button!==1,right:A=>"button"in A&&A.button!==2,exact:(A,e)=>sS.some(t=>A[`${t}Key`]&&!e.includes(t))},fe=(A,e)=>{const t=A._withMods||(A._withMods={}),i=e.join(".");return t[i]||(t[i]=(o,...r)=>{for(let s=0;s<e.length;s++){const n=nS[e[s]];if(n&&n(o,e))return}return A(o,...r)})},aS={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},pa=(A,e)=>{const t=A._withKeys||(A._withKeys={}),i=e.join(".");return t[i]||(t[i]=o=>{if(!("key"in o))return;const r=Dr(o.key);if(e.some(s=>s===r||aS[s]===r))return A(o)})},lS=Xe({patchProp:_y},Ry);let D2;function gS(){return D2||(D2=iy(lS))}const cS=(...A)=>{const e=gS().createApp(...A),{mount:t}=e;return e.mount=i=>{const o=hS(i);if(!o)return;const r=e._component;!JA(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=t(o,!1,dS(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},e};function dS(A){if(A instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&A instanceof MathMLElement)return"mathml"}function hS(A){return Re(A)?document.querySelector(A):A}function uS(A,e){if(A==null)throw Error(e);return A}function ol(A){return new Promise(e=>setTimeout(e,A))}function pS(A,e){return e(A)}var CS={};function BS(A,e){if(!A)return e;const t=A.trim().toLowerCase().match(/^(\d+)(ms|s|m|h)?$/);if(!t)return e;const i=Number(t[1]);switch(t[2]){case"ms":return i;case"s":return i*1e3;case"m":return i*6e4;case"h":return i*36e5;default:return i}}function fS(A=6e4){return BS(CS.TEST_TIMEOUT,A)}fS();function Lu(A){return{type:"Immediate",value:A}}function ES(){return typeof globalThis.getPlatforma<"u"||typeof globalThis.platforma<"u"}function V1(A){if(A&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(A);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function wS(){if(typeof globalThis.cfgRenderCtx<"u")return globalThis.cfgRenderCtx}function ge(){if(typeof globalThis.cfgRenderCtx<"u")return globalThis.cfgRenderCtx;throw new Error("Not in config rendering context")}function Ha(A,e){const t=wS();if(t===void 0)return!1;if(A in t.callbackRegistry)throw new Error(`Callback with key ${A} already registered.`);return t.callbackRegistry[A]=e,!0}const Tu=new Map;function IS(A,e){A in ge().callbackRegistry||(ge().callbackRegistry[A]=t=>{for(const i of Tu.get(A))i(t)},Tu.set(A,[])),Tu.get(A).push(e)}var te;(function(A){A.assertEqual=o=>o;function e(o){}A.assertIs=e;function t(o){throw new Error}A.assertNever=t,A.arrayToEnum=o=>{const r={};for(const s of o)r[s]=s;return r},A.getValidEnumValues=o=>{const r=A.objectKeys(o).filter(n=>typeof o[o[n]]!="number"),s={};for(const n of r)s[n]=o[n];return A.objectValues(s)},A.objectValues=o=>A.objectKeys(o).map(function(r){return o[r]}),A.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const r=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&r.push(s);return r},A.find=(o,r)=>{for(const s of o)if(r(s))return s},A.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function i(o,r=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(r)}A.joinValues=i,A.jsonStringifyReplacer=(o,r)=>typeof r=="bigint"?r.toString():r})(te||(te={}));var ZC;(function(A){A.mergeShapes=(e,t)=>({...e,...t})})(ZC||(ZC={}));const IA=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qr=A=>{switch(typeof A){case"undefined":return IA.undefined;case"string":return IA.string;case"number":return isNaN(A)?IA.nan:IA.number;case"boolean":return IA.boolean;case"function":return IA.function;case"bigint":return IA.bigint;case"symbol":return IA.symbol;case"object":return Array.isArray(A)?IA.array:A===null?IA.null:A.then&&typeof A.then=="function"&&A.catch&&typeof A.catch=="function"?IA.promise:typeof Map<"u"&&A instanceof Map?IA.map:typeof Set<"u"&&A instanceof Set?IA.set:typeof Date<"u"&&A instanceof Date?IA.date:IA.object;default:return IA.unknown}},iA=te.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"]),mS=A=>JSON.stringify(A,null,2).replace(/"([^"]+)":/g,"$1:");class Ei extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(r){return r.message},i={_errors:[]},o=r=>{for(const s of r.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)i._errors.push(t(s));else{let n=i,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(t(s))):n[l]=n[l]||{_errors:[]},n=n[l],a++}}};return o(this),i}static assert(e){if(!(e instanceof Ei))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},i=[];for(const o of this.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(e(o))):i.push(e(o));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}}Ei.create=A=>new Ei(A);const Ca=(A,e)=>{let t;switch(A.code){case iA.invalid_type:A.received===IA.undefined?t="Required":t=`Expected ${A.expected}, received ${A.received}`;break;case iA.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(A.expected,te.jsonStringifyReplacer)}`;break;case iA.unrecognized_keys:t=`Unrecognized key(s) in object: ${te.joinValues(A.keys,", ")}`;break;case iA.invalid_union:t="Invalid input";break;case iA.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${te.joinValues(A.options)}`;break;case iA.invalid_enum_value:t=`Invalid enum value. Expected ${te.joinValues(A.options)}, received '${A.received}'`;break;case iA.invalid_arguments:t="Invalid function arguments";break;case iA.invalid_return_type:t="Invalid function return type";break;case iA.invalid_date:t="Invalid date";break;case iA.invalid_string:typeof A.validation=="object"?"includes"in A.validation?(t=`Invalid input: must include "${A.validation.includes}"`,typeof A.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${A.validation.position}`)):"startsWith"in A.validation?t=`Invalid input: must start with "${A.validation.startsWith}"`:"endsWith"in A.validation?t=`Invalid input: must end with "${A.validation.endsWith}"`:te.assertNever(A.validation):A.validation!=="regex"?t=`Invalid ${A.validation}`:t="Invalid";break;case iA.too_small:A.type==="array"?t=`Array must contain ${A.exact?"exactly":A.inclusive?"at least":"more than"} ${A.minimum} element(s)`:A.type==="string"?t=`String must contain ${A.exact?"exactly":A.inclusive?"at least":"over"} ${A.minimum} character(s)`:A.type==="number"?t=`Number must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${A.minimum}`:A.type==="date"?t=`Date must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(A.minimum))}`:t="Invalid input";break;case iA.too_big:A.type==="array"?t=`Array must contain ${A.exact?"exactly":A.inclusive?"at most":"less than"} ${A.maximum} element(s)`:A.type==="string"?t=`String must contain ${A.exact?"exactly":A.inclusive?"at most":"under"} ${A.maximum} character(s)`:A.type==="number"?t=`Number must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`:A.type==="bigint"?t=`BigInt must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`:A.type==="date"?t=`Date must be ${A.exact?"exactly":A.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(A.maximum))}`:t="Invalid input";break;case iA.custom:t="Invalid input";break;case iA.invalid_intersection_types:t="Intersection results could not be merged";break;case iA.not_multiple_of:t=`Number must be a multiple of ${A.multipleOf}`;break;case iA.not_finite:t="Number must be finite";break;default:t=e.defaultError,te.assertNever(A)}return{message:t}};let J1=Ca;function QS(A){J1=A}function wd(){return J1}const Id=A=>{const{data:e,path:t,errorMaps:i,issueData:o}=A,r=[...t,...o.path||[]],s={...o,path:r};if(o.message!==void 0)return{...o,path:r,message:o.message};let n="";const a=i.filter(l=>!!l).slice().reverse();for(const l of a)n=l(s,{data:e,defaultError:n}).message;return{...o,path:r,message:n}},vS=[];function EA(A,e){const t=wd(),i=Id({issueData:e,data:A.data,path:A.path,errorMaps:[A.common.contextualErrorMap,A.schemaErrorMap,t,t===Ca?void 0:Ca].filter(o=>!!o)});A.common.issues.push(i)}class mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const i=[];for(const o of t){if(o.status==="aborted")return zA;o.status==="dirty"&&e.dirty(),i.push(o.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const i=[];for(const o of t){const r=await o.key,s=await o.value;i.push({key:r,value:s})}return mt.mergeObjectSync(e,i)}static mergeObjectSync(e,t){const i={};for(const o of t){const{key:r,value:s}=o;if(r.status==="aborted"||s.status==="aborted")return zA;r.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(i[r.value]=s.value)}return{status:e.value,value:i}}}const zA=Object.freeze({status:"aborted"}),Un=A=>({status:"dirty",value:A}),Ht=A=>({status:"valid",value:A}),_C=A=>A.status==="aborted",$C=A=>A.status==="dirty",Jl=A=>A.status==="valid",jl=A=>typeof Promise<"u"&&A instanceof Promise;function md(A,e,t,i){if(typeof e=="function"?A!==e||!0:!e.has(A))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(A)}function j1(A,e,t,i,o){if(typeof e=="function"?A!==e||!0:!e.has(A))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(A,t),t}var yA;(function(A){A.errToObj=e=>typeof e=="string"?{message:e}:e||{},A.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(yA||(yA={}));var rl,sl;class Lo{constructor(e,t,i,o){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=o}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 b2=(A,e)=>{if(Jl(e))return{success:!0,data:e.value};if(!A.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ei(A.common.issues);return this._error=t,this._error}}};function ZA(A){if(!A)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:o}=A;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,n)=>{var a,l;const{message:g}=A;return s.code==="invalid_enum_value"?{message:g??n.defaultError}:typeof n.data>"u"?{message:(a=g??i)!==null&&a!==void 0?a:n.defaultError}:s.code!=="invalid_type"?{message:n.defaultError}:{message:(l=g??t)!==null&&l!==void 0?l:n.defaultError}},description:o}}class _A{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qr(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mt,ctx:{common:e.parent.common,data:e.data,parsedType:qr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(jl(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;const o={common:{issues:[],async:(i=t==null?void 0:t.async)!==null&&i!==void 0?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},r=this._parseSync({data:e,path:o.path,parent:o});return b2(o,r)}async parseAsync(e,t){const i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){const i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qr(e)},o=this._parse({data:e,path:i.path,parent:i}),r=await(jl(o)?o:Promise.resolve(o));return b2(i,r)}refine(e,t){const i=o=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(o):t;return this._refinement((o,r)=>{const s=e(o),n=()=>r.addIssue({code:iA.custom,...i(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(a=>a?!0:(n(),!1)):s?!0:(n(),!1)})}refinement(e,t){return this._refinement((i,o)=>e(i)?!0:(o.addIssue(typeof t=="function"?t(i,o):t),!1))}_refinement(e){return new lo({schema:this,typeName:HA.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ko.create(this,this._def)}nullable(){return hs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eo.create(this,this._def)}promise(){return fa.create(this,this._def)}or(e){return Xl.create([this,e],this._def)}and(e){return Zl.create(this,e,this._def)}transform(e){return new lo({...ZA(this._def),schema:this,typeName:HA.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new tg({...ZA(this._def),innerType:this,defaultValue:t,typeName:HA.ZodDefault})}brand(){return new GB({typeName:HA.ZodBranded,type:this,...ZA(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ig({...ZA(this._def),innerType:this,catchValue:t,typeName:HA.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Pg.create(this,e)}readonly(){return og.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const DS=/^c[^\s-]{8,}$/i,bS=/^[0-9a-z]+$/,MS=/^[0-9A-HJKMNP-TV-Z]{26}$/,xS=/^[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,FS=/^[a-z0-9_-]{21}$/i,yS=/^[-+]?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)?)??$/,SS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,RS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uu;const kS=/^(?:(?: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])$/,PS=/^(([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})))$/,YS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W1="((\\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])))",GS=new RegExp(`^${W1}$`);function K1(A){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return A.precision?e=`${e}\\.\\d{${A.precision}}`:A.precision==null&&(e=`${e}(\\.\\d+)?`),e}function LS(A){return new RegExp(`^${K1(A)}$`)}function q1(A){let e=`${W1}T${K1(A)}`;const t=[];return t.push(A.local?"Z?":"Z"),A.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function TS(A,e){return!!((e==="v4"||!e)&&kS.test(A)||(e==="v6"||!e)&&PS.test(A))}class _i extends _A{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==IA.string){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.string,received:r.parsedType}),zA}const i=new mt;let o;for(const r of this._def.checks)if(r.kind==="min")e.data.length<r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),i.dirty());else if(r.kind==="max")e.data.length>r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),i.dirty());else if(r.kind==="length"){const s=e.data.length>r.value,n=e.data.length<r.value;(s||n)&&(o=this._getOrReturnCtx(e,o),s?EA(o,{code:iA.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&EA(o,{code:iA.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),i.dirty())}else if(r.kind==="email")SS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"email",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="emoji")Uu||(Uu=new RegExp(RS,"u")),Uu.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"emoji",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="uuid")xS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"uuid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="nanoid")FS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"nanoid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="cuid")DS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"cuid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="cuid2")bS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"cuid2",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="ulid")MS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"ulid",code:iA.invalid_string,message:r.message}),i.dirty());else if(r.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),EA(o,{validation:"url",code:iA.invalid_string,message:r.message}),i.dirty()}else r.kind==="regex"?(r.regex.lastIndex=0,r.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"regex",code:iA.invalid_string,message:r.message}),i.dirty())):r.kind==="trim"?e.data=e.data.trim():r.kind==="includes"?e.data.includes(r.value,r.position)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),i.dirty()):r.kind==="toLowerCase"?e.data=e.data.toLowerCase():r.kind==="toUpperCase"?e.data=e.data.toUpperCase():r.kind==="startsWith"?e.data.startsWith(r.value)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{startsWith:r.value},message:r.message}),i.dirty()):r.kind==="endsWith"?e.data.endsWith(r.value)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:{endsWith:r.value},message:r.message}),i.dirty()):r.kind==="datetime"?q1(r).test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"datetime",message:r.message}),i.dirty()):r.kind==="date"?GS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"date",message:r.message}),i.dirty()):r.kind==="time"?LS(r).test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.invalid_string,validation:"time",message:r.message}),i.dirty()):r.kind==="duration"?yS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"duration",code:iA.invalid_string,message:r.message}),i.dirty()):r.kind==="ip"?TS(e.data,r.version)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"ip",code:iA.invalid_string,message:r.message}),i.dirty()):r.kind==="base64"?YS.test(e.data)||(o=this._getOrReturnCtx(e,o),EA(o,{validation:"base64",code:iA.invalid_string,message:r.message}),i.dirty()):te.assertNever(r);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(o=>e.test(o),{validation:t,code:iA.invalid_string,...yA.errToObj(i)})}_addCheck(e){return new _i({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...yA.errToObj(e)})}url(e){return this._addCheck({kind:"url",...yA.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...yA.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...yA.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...yA.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...yA.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...yA.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...yA.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...yA.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...yA.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...yA.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,...yA.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...yA.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...yA.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...yA.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...yA.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...yA.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...yA.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...yA.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...yA.errToObj(t)})}nonempty(e){return this.min(1,yA.errToObj(e))}trim(){return new _i({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _i({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}_i.create=A=>{var e;return new _i({checks:[],typeName:HA.ZodString,coerce:(e=A==null?void 0:A.coerce)!==null&&e!==void 0?e:!1,...ZA(A)})};function US(A,e){const t=(A.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,o=t>i?t:i,r=parseInt(A.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return r%s/Math.pow(10,o)}class gs extends _A{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)!==IA.number){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.number,received:r.parsedType}),zA}let i;const o=new mt;for(const r of this._def.checks)r.kind==="int"?te.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.invalid_type,expected:"integer",received:"float",message:r.message}),o.dirty()):r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty()):r.kind==="multipleOf"?US(e.data,r.value)!==0&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_finite,message:r.message}),o.dirty()):te.assertNever(r);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,yA.toString(t))}gt(e,t){return this.setLimit("min",e,!1,yA.toString(t))}lte(e,t){return this.setLimit("max",e,!0,yA.toString(t))}lt(e,t){return this.setLimit("max",e,!1,yA.toString(t))}setLimit(e,t,i,o){return new gs({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:yA.toString(o)}]})}_addCheck(e){return new gs({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:yA.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:yA.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:yA.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:yA.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:yA.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:yA.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:yA.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:yA.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:yA.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&te.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}}gs.create=A=>new gs({checks:[],typeName:HA.ZodNumber,coerce:(A==null?void 0:A.coerce)||!1,...ZA(A)});class cs extends _A{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)!==IA.bigint){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.bigint,received:r.parsedType}),zA}let i;const o=new mt;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),EA(i,{code:iA.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):te.assertNever(r);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,yA.toString(t))}gt(e,t){return this.setLimit("min",e,!1,yA.toString(t))}lte(e,t){return this.setLimit("max",e,!0,yA.toString(t))}lt(e,t){return this.setLimit("max",e,!1,yA.toString(t))}setLimit(e,t,i,o){return new cs({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:yA.toString(o)}]})}_addCheck(e){return new cs({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:yA.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:yA.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:yA.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:yA.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:yA.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}cs.create=A=>{var e;return new cs({checks:[],typeName:HA.ZodBigInt,coerce:(e=A==null?void 0:A.coerce)!==null&&e!==void 0?e:!1,...ZA(A)})};class Wl extends _A{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==IA.boolean){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.boolean,received:i.parsedType}),zA}return Ht(e.data)}}Wl.create=A=>new Wl({typeName:HA.ZodBoolean,coerce:(A==null?void 0:A.coerce)||!1,...ZA(A)});class sn extends _A{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==IA.date){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_type,expected:IA.date,received:r.parsedType}),zA}if(isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return EA(r,{code:iA.invalid_date}),zA}const i=new mt;let o;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()<r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),i.dirty()):r.kind==="max"?e.data.getTime()>r.value&&(o=this._getOrReturnCtx(e,o),EA(o,{code:iA.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),i.dirty()):te.assertNever(r);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:yA.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:yA.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}sn.create=A=>new sn({checks:[],coerce:(A==null?void 0:A.coerce)||!1,typeName:HA.ZodDate,...ZA(A)});class Qd extends _A{_parse(e){if(this._getType(e)!==IA.symbol){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.symbol,received:i.parsedType}),zA}return Ht(e.data)}}Qd.create=A=>new Qd({typeName:HA.ZodSymbol,...ZA(A)});class Kl extends _A{_parse(e){if(this._getType(e)!==IA.undefined){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.undefined,received:i.parsedType}),zA}return Ht(e.data)}}Kl.create=A=>new Kl({typeName:HA.ZodUndefined,...ZA(A)});class ql extends _A{_parse(e){if(this._getType(e)!==IA.null){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.null,received:i.parsedType}),zA}return Ht(e.data)}}ql.create=A=>new ql({typeName:HA.ZodNull,...ZA(A)});class Ba extends _A{constructor(){super(...arguments),this._any=!0}_parse(e){return Ht(e.data)}}Ba.create=A=>new Ba({typeName:HA.ZodAny,...ZA(A)});class Ws extends _A{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ht(e.data)}}Ws.create=A=>new Ws({typeName:HA.ZodUnknown,...ZA(A)});class Er extends _A{_parse(e){const t=this._getOrReturnCtx(e);return EA(t,{code:iA.invalid_type,expected:IA.never,received:t.parsedType}),zA}}Er.create=A=>new Er({typeName:HA.ZodNever,...ZA(A)});class vd extends _A{_parse(e){if(this._getType(e)!==IA.undefined){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.void,received:i.parsedType}),zA}return Ht(e.data)}}vd.create=A=>new vd({typeName:HA.ZodVoid,...ZA(A)});class eo extends _A{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),o=this._def;if(t.parsedType!==IA.array)return EA(t,{code:iA.invalid_type,expected:IA.array,received:t.parsedType}),zA;if(o.exactLength!==null){const s=t.data.length>o.exactLength.value,n=t.data.length<o.exactLength.value;(s||n)&&(EA(t,{code:s?iA.too_big:iA.too_small,minimum:n?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&t.data.length<o.minLength.value&&(EA(t,{code:iA.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&t.data.length>o.maxLength.value&&(EA(t,{code:iA.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((s,n)=>o.type._parseAsync(new Lo(t,s,t.path,n)))).then(s=>mt.mergeArray(i,s));const r=[...t.data].map((s,n)=>o.type._parseSync(new Lo(t,s,t.path,n)));return mt.mergeArray(i,r)}get element(){return this._def.type}min(e,t){return new eo({...this._def,minLength:{value:e,message:yA.toString(t)}})}max(e,t){return new eo({...this._def,maxLength:{value:e,message:yA.toString(t)}})}length(e,t){return new eo({...this._def,exactLength:{value:e,message:yA.toString(t)}})}nonempty(e){return this.min(1,e)}}eo.create=(A,e)=>new eo({type:A,minLength:null,maxLength:null,exactLength:null,typeName:HA.ZodArray,...ZA(e)});function Yn(A){if(A instanceof ke){const e={};for(const t in A.shape){const i=A.shape[t];e[t]=ko.create(Yn(i))}return new ke({...A._def,shape:()=>e})}else return A instanceof eo?new eo({...A._def,type:Yn(A.element)}):A instanceof ko?ko.create(Yn(A.unwrap())):A instanceof hs?hs.create(Yn(A.unwrap())):A instanceof To?To.create(A.items.map(e=>Yn(e))):A}class ke extends _A{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(),t=te.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==IA.object){const l=this._getOrReturnCtx(e);return EA(l,{code:iA.invalid_type,expected:IA.object,received:l.parsedType}),zA}const{status:i,ctx:o}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),n=[];if(!(this._def.catchall instanceof Er&&this._def.unknownKeys==="strip"))for(const l in o.data)s.includes(l)||n.push(l);const a=[];for(const l of s){const g=r[l],c=o.data[l];a.push({key:{status:"valid",value:l},value:g._parse(new Lo(o,c,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Er){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of n)a.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(l==="strict")n.length>0&&(EA(o,{code:iA.unrecognized_keys,keys:n}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const g of n){const c=o.data[g];a.push({key:{status:"valid",value:g},value:l._parse(new Lo(o,c,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of a){const c=await g.key,d=await g.value;l.push({key:c,value:d,alwaysSet:g.alwaysSet})}return l}).then(l=>mt.mergeObjectSync(i,l)):mt.mergeObjectSync(i,a)}get shape(){return this._def.shape()}strict(e){return yA.errToObj,new ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var o,r,s,n;const a=(s=(r=(o=this._def).errorMap)===null||r===void 0?void 0:r.call(o,t,i).message)!==null&&s!==void 0?s:i.defaultError;return t.code==="unrecognized_keys"?{message:(n=yA.errToObj(e).message)!==null&&n!==void 0?n:a}:{message:a}}}:{}})}strip(){return new ke({...this._def,unknownKeys:"strip"})}passthrough(){return new ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:HA.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ke({...this._def,catchall:e})}pick(e){const t={};return te.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}omit(e){const t={};return te.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}deepPartial(){return Yn(this)}partial(e){const t={};return te.objectKeys(this.shape).forEach(i=>{const o=this.shape[i];e&&!e[i]?t[i]=o:t[i]=o.optional()}),new ke({...this._def,shape:()=>t})}required(e){const t={};return te.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let r=this.shape[i];for(;r instanceof ko;)r=r._def.innerType;t[i]=r}}),new ke({...this._def,shape:()=>t})}keyof(){return X1(te.objectKeys(this.shape))}}ke.create=(A,e)=>new ke({shape:()=>A,unknownKeys:"strip",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});ke.strictCreate=(A,e)=>new ke({shape:()=>A,unknownKeys:"strict",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});ke.lazycreate=(A,e)=>new ke({shape:A,unknownKeys:"strip",catchall:Er.create(),typeName:HA.ZodObject,...ZA(e)});class Xl extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i=this._def.options;function o(r){for(const n of r)if(n.result.status==="valid")return n.result;for(const n of r)if(n.result.status==="dirty")return t.common.issues.push(...n.ctx.common.issues),n.result;const s=r.map(n=>new Ei(n.ctx.common.issues));return EA(t,{code:iA.invalid_union,unionErrors:s}),zA}if(t.common.async)return Promise.all(i.map(async r=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(o);{let r;const s=[];for(const a of i){const l={...t,common:{...t.common,issues:[]},parent:null},g=a._parseSync({data:t.data,path:t.path,parent:l});if(g.status==="valid")return g;g.status==="dirty"&&!r&&(r={result:g,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=s.map(a=>new Ei(a));return EA(t,{code:iA.invalid_union,unionErrors:n}),zA}}get options(){return this._def.options}}Xl.create=(A,e)=>new Xl({options:A,typeName:HA.ZodUnion,...ZA(e)});const tr=A=>A instanceof $l?tr(A.schema):A instanceof lo?tr(A.innerType()):A instanceof Ag?[A.value]:A instanceof ds?A.options:A instanceof eg?te.objectValues(A.enum):A instanceof tg?tr(A._def.innerType):A instanceof Kl?[void 0]:A instanceof ql?[null]:A instanceof ko?[void 0,...tr(A.unwrap())]:A instanceof hs?[null,...tr(A.unwrap())]:A instanceof GB||A instanceof og?tr(A.unwrap()):A instanceof ig?tr(A._def.innerType):[];class Sh extends _A{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.object)return EA(t,{code:iA.invalid_type,expected:IA.object,received:t.parsedType}),zA;const i=this.discriminator,o=t.data[i],r=this.optionsMap.get(o);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(EA(t,{code:iA.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),zA)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){const o=new Map;for(const r of t){const s=tr(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of s){if(o.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);o.set(n,r)}}return new Sh({typeName:HA.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:o,...ZA(i)})}}function A0(A,e){const t=qr(A),i=qr(e);if(A===e)return{valid:!0,data:A};if(t===IA.object&&i===IA.object){const o=te.objectKeys(e),r=te.objectKeys(A).filter(n=>o.indexOf(n)!==-1),s={...A,...e};for(const n of r){const a=A0(A[n],e[n]);if(!a.valid)return{valid:!1};s[n]=a.data}return{valid:!0,data:s}}else if(t===IA.array&&i===IA.array){if(A.length!==e.length)return{valid:!1};const o=[];for(let r=0;r<A.length;r++){const s=A[r],n=e[r],a=A0(s,n);if(!a.valid)return{valid:!1};o.push(a.data)}return{valid:!0,data:o}}else return t===IA.date&&i===IA.date&&+A==+e?{valid:!0,data:A}:{valid:!1}}class Zl extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),o=(r,s)=>{if(_C(r)||_C(s))return zA;const n=A0(r.value,s.value);return n.valid?(($C(r)||$C(s))&&t.dirty(),{status:t.value,value:n.data}):(EA(i,{code:iA.invalid_intersection_types}),zA)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([r,s])=>o(r,s)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Zl.create=(A,e,t)=>new Zl({left:A,right:e,typeName:HA.ZodIntersection,...ZA(t)});class To extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.array)return EA(i,{code:iA.invalid_type,expected:IA.array,received:i.parsedType}),zA;if(i.data.length<this._def.items.length)return EA(i,{code:iA.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zA;!this._def.rest&&i.data.length>this._def.items.length&&(EA(i,{code:iA.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...i.data].map((s,n)=>{const a=this._def.items[n]||this._def.rest;return a?a._parse(new Lo(i,s,i.path,n)):null}).filter(s=>!!s);return i.common.async?Promise.all(r).then(s=>mt.mergeArray(t,s)):mt.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new To({...this._def,rest:e})}}To.create=(A,e)=>{if(!Array.isArray(A))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new To({items:A,typeName:HA.ZodTuple,rest:null,...ZA(e)})};class _l extends _A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.object)return EA(i,{code:iA.invalid_type,expected:IA.object,received:i.parsedType}),zA;const o=[],r=this._def.keyType,s=this._def.valueType;for(const n in i.data)o.push({key:r._parse(new Lo(i,n,i.path,n)),value:s._parse(new Lo(i,i.data[n],i.path,n)),alwaysSet:n in i.data});return i.common.async?mt.mergeObjectAsync(t,o):mt.mergeObjectSync(t,o)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof _A?new _l({keyType:e,valueType:t,typeName:HA.ZodRecord,...ZA(i)}):new _l({keyType:_i.create(),valueType:e,typeName:HA.ZodRecord,...ZA(t)})}}class Dd extends _A{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.map)return EA(i,{code:iA.invalid_type,expected:IA.map,received:i.parsedType}),zA;const o=this._def.keyType,r=this._def.valueType,s=[...i.data.entries()].map(([n,a],l)=>({key:o._parse(new Lo(i,n,i.path,[l,"key"])),value:r._parse(new Lo(i,a,i.path,[l,"value"]))}));if(i.common.async){const n=new Map;return Promise.resolve().then(async()=>{for(const a of s){const l=await a.key,g=await a.value;if(l.status==="aborted"||g.status==="aborted")return zA;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),n.set(l.value,g.value)}return{status:t.value,value:n}})}else{const n=new Map;for(const a of s){const l=a.key,g=a.value;if(l.status==="aborted"||g.status==="aborted")return zA;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),n.set(l.value,g.value)}return{status:t.value,value:n}}}}Dd.create=(A,e,t)=>new Dd({valueType:e,keyType:A,typeName:HA.ZodMap,...ZA(t)});class nn extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==IA.set)return EA(i,{code:iA.invalid_type,expected:IA.set,received:i.parsedType}),zA;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(EA(i,{code:iA.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),t.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(EA(i,{code:iA.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),t.dirty());const r=this._def.valueType;function s(a){const l=new Set;for(const g of a){if(g.status==="aborted")return zA;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const n=[...i.data.values()].map((a,l)=>r._parse(new Lo(i,a,i.path,l)));return i.common.async?Promise.all(n).then(a=>s(a)):s(n)}min(e,t){return new nn({...this._def,minSize:{value:e,message:yA.toString(t)}})}max(e,t){return new nn({...this._def,maxSize:{value:e,message:yA.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}nn.create=(A,e)=>new nn({valueType:A,minSize:null,maxSize:null,typeName:HA.ZodSet,...ZA(e)});class Xn extends _A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.function)return EA(t,{code:iA.invalid_type,expected:IA.function,received:t.parsedType}),zA;function i(n,a){return Id({data:n,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wd(),Ca].filter(l=>!!l),issueData:{code:iA.invalid_arguments,argumentsError:a}})}function o(n,a){return Id({data:n,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,wd(),Ca].filter(l=>!!l),issueData:{code:iA.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof fa){const n=this;return Ht(async function(...a){const l=new Ei([]),g=await n._def.args.parseAsync(a,r).catch(h=>{throw l.addIssue(i(a,h)),l}),c=await Reflect.apply(s,this,g);return await n._def.returns._def.type.parseAsync(c,r).catch(h=>{throw l.addIssue(o(c,h)),l})})}else{const n=this;return Ht(function(...a){const l=n._def.args.safeParse(a,r);if(!l.success)throw new Ei([i(a,l.error)]);const g=Reflect.apply(s,this,l.data),c=n._def.returns.safeParse(g,r);if(!c.success)throw new Ei([o(g,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Xn({...this._def,args:To.create(e).rest(Ws.create())})}returns(e){return new Xn({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new Xn({args:e||To.create([]).rest(Ws.create()),returns:t||Ws.create(),typeName:HA.ZodFunction,...ZA(i)})}}class $l extends _A{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}$l.create=(A,e)=>new $l({getter:A,typeName:HA.ZodLazy,...ZA(e)});class Ag extends _A{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return EA(t,{received:t.data,code:iA.invalid_literal,expected:this._def.value}),zA}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ag.create=(A,e)=>new Ag({value:A,typeName:HA.ZodLiteral,...ZA(e)});function X1(A,e){return new ds({values:A,typeName:HA.ZodEnum,...ZA(e)})}class ds extends _A{constructor(){super(...arguments),rl.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return EA(t,{expected:te.joinValues(i),received:t.parsedType,code:iA.invalid_type}),zA}if(md(this,rl)||j1(this,rl,new Set(this._def.values)),!md(this,rl).has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return EA(t,{received:t.data,code:iA.invalid_enum_value,options:i}),zA}return Ht(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ds.create(e,{...this._def,...t})}exclude(e,t=this._def){return ds.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}rl=new WeakMap;ds.create=X1;class eg extends _A{constructor(){super(...arguments),sl.set(this,void 0)}_parse(e){const t=te.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==IA.string&&i.parsedType!==IA.number){const o=te.objectValues(t);return EA(i,{expected:te.joinValues(o),received:i.parsedType,code:iA.invalid_type}),zA}if(md(this,sl)||j1(this,sl,new Set(te.getValidEnumValues(this._def.values))),!md(this,sl).has(e.data)){const o=te.objectValues(t);return EA(i,{received:i.data,code:iA.invalid_enum_value,options:o}),zA}return Ht(e.data)}get enum(){return this._def.values}}sl=new WeakMap;eg.create=(A,e)=>new eg({values:A,typeName:HA.ZodNativeEnum,...ZA(e)});class fa extends _A{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==IA.promise&&t.common.async===!1)return EA(t,{code:iA.invalid_type,expected:IA.promise,received:t.parsedType}),zA;const i=t.parsedType===IA.promise?t.data:Promise.resolve(t.data);return Ht(i.then(o=>this._def.type.parseAsync(o,{path:t.path,errorMap:t.common.contextualErrorMap})))}}fa.create=(A,e)=>new fa({type:A,typeName:HA.ZodPromise,...ZA(e)});class lo extends _A{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===HA.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:i}=this._processInputParams(e),o=this._def.effect||null,r={addIssue:s=>{EA(i,s),s.fatal?t.abort():t.dirty()},get path(){return i.path}};if(r.addIssue=r.addIssue.bind(r),o.type==="preprocess"){const s=o.transform(i.data,r);if(i.common.async)return Promise.resolve(s).then(async n=>{if(t.value==="aborted")return zA;const a=await this._def.schema._parseAsync({data:n,path:i.path,parent:i});return a.status==="aborted"?zA:a.status==="dirty"||t.value==="dirty"?Un(a.value):a});{if(t.value==="aborted")return zA;const n=this._def.schema._parseSync({data:s,path:i.path,parent:i});return n.status==="aborted"?zA:n.status==="dirty"||t.value==="dirty"?Un(n.value):n}}if(o.type==="refinement"){const s=n=>{const a=o.refinement(n,r);if(i.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return n};if(i.common.async===!1){const n=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?zA:(n.status==="dirty"&&t.dirty(),s(n.value),{status:t.value,value:n.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(n=>n.status==="aborted"?zA:(n.status==="dirty"&&t.dirty(),s(n.value).then(()=>({status:t.value,value:n.value}))))}if(o.type==="transform")if(i.common.async===!1){const s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Jl(s))return s;const n=o.transform(s.value,r);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>Jl(s)?Promise.resolve(o.transform(s.value,r)).then(n=>({status:t.value,value:n})):s);te.assertNever(o)}}lo.create=(A,e,t)=>new lo({schema:A,typeName:HA.ZodEffects,effect:e,...ZA(t)});lo.createWithPreprocess=(A,e,t)=>new lo({schema:e,effect:{type:"preprocess",transform:A},typeName:HA.ZodEffects,...ZA(t)});class ko extends _A{_parse(e){return this._getType(e)===IA.undefined?Ht(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ko.create=(A,e)=>new ko({innerType:A,typeName:HA.ZodOptional,...ZA(e)});class hs extends _A{_parse(e){return this._getType(e)===IA.null?Ht(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hs.create=(A,e)=>new hs({innerType:A,typeName:HA.ZodNullable,...ZA(e)});class tg extends _A{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===IA.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}tg.create=(A,e)=>new tg({innerType:A,typeName:HA.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ZA(e)});class ig extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return jl(o)?o.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ei(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ei(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}ig.create=(A,e)=>new ig({innerType:A,typeName:HA.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ZA(e)});class bd extends _A{_parse(e){if(this._getType(e)!==IA.nan){const i=this._getOrReturnCtx(e);return EA(i,{code:iA.invalid_type,expected:IA.nan,received:i.parsedType}),zA}return{status:"valid",value:e.data}}}bd.create=A=>new bd({typeName:HA.ZodNaN,...ZA(A)});const NS=Symbol("zod_brand");class GB extends _A{_parse(e){const{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}}class Pg extends _A{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return r.status==="aborted"?zA:r.status==="dirty"?(t.dirty(),Un(r.value)):this._def.out._parseAsync({data:r.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?zA:o.status==="dirty"?(t.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(e,t){return new Pg({in:e,out:t,typeName:HA.ZodPipeline})}}class og extends _A{_parse(e){const t=this._def.innerType._parse(e),i=o=>(Jl(o)&&(o.value=Object.freeze(o.value)),o);return jl(t)?t.then(o=>i(o)):i(t)}unwrap(){return this._def.innerType}}og.create=(A,e)=>new og({innerType:A,typeName:HA.ZodReadonly,...ZA(e)});function Z1(A,e={},t){return A?Ba.create().superRefine((i,o)=>{var r,s;if(!A(i)){const n=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,a=(s=(r=n.fatal)!==null&&r!==void 0?r:t)!==null&&s!==void 0?s:!0,l=typeof n=="string"?{message:n}:n;o.addIssue({code:"custom",...l,fatal:a})}}):Ba.create()}const HS={object:ke.lazycreate};var HA;(function(A){A.ZodString="ZodString",A.ZodNumber="ZodNumber",A.ZodNaN="ZodNaN",A.ZodBigInt="ZodBigInt",A.ZodBoolean="ZodBoolean",A.ZodDate="ZodDate",A.ZodSymbol="ZodSymbol",A.ZodUndefined="ZodUndefined",A.ZodNull="ZodNull",A.ZodAny="ZodAny",A.ZodUnknown="ZodUnknown",A.ZodNever="ZodNever",A.ZodVoid="ZodVoid",A.ZodArray="ZodArray",A.ZodObject="ZodObject",A.ZodUnion="ZodUnion",A.ZodDiscriminatedUnion="ZodDiscriminatedUnion",A.ZodIntersection="ZodIntersection",A.ZodTuple="ZodTuple",A.ZodRecord="ZodRecord",A.ZodMap="ZodMap",A.ZodSet="ZodSet",A.ZodFunction="ZodFunction",A.ZodLazy="ZodLazy",A.ZodLiteral="ZodLiteral",A.ZodEnum="ZodEnum",A.ZodEffects="ZodEffects",A.ZodNativeEnum="ZodNativeEnum",A.ZodOptional="ZodOptional",A.ZodNullable="ZodNullable",A.ZodDefault="ZodDefault",A.ZodCatch="ZodCatch",A.ZodPromise="ZodPromise",A.ZodBranded="ZodBranded",A.ZodPipeline="ZodPipeline",A.ZodReadonly="ZodReadonly"})(HA||(HA={}));const zS=(A,e={message:`Input not instance of ${A.name}`})=>Z1(t=>t instanceof A,e),_1=_i.create,$1=gs.create,OS=bd.create,VS=cs.create,Av=Wl.create,JS=sn.create,jS=Qd.create,WS=Kl.create,KS=ql.create,qS=Ba.create,XS=Ws.create,ZS=Er.create,_S=vd.create,$S=eo.create,AR=ke.create,eR=ke.strictCreate,tR=Xl.create,iR=Sh.create,oR=Zl.create,rR=To.create,sR=_l.create,nR=Dd.create,aR=nn.create,lR=Xn.create,gR=$l.create,cR=Ag.create,dR=ds.create,hR=eg.create,uR=fa.create,M2=lo.create,pR=ko.create,CR=hs.create,BR=lo.createWithPreprocess,fR=Pg.create,ER=()=>_1().optional(),wR=()=>$1().optional(),IR=()=>Av().optional(),mR={string:A=>_i.create({...A,coerce:!0}),number:A=>gs.create({...A,coerce:!0}),boolean:A=>Wl.create({...A,coerce:!0}),bigint:A=>cs.create({...A,coerce:!0}),date:A=>sn.create({...A,coerce:!0})},QR=zA;var gA=Object.freeze({__proto__:null,defaultErrorMap:Ca,setErrorMap:QS,getErrorMap:wd,makeIssue:Id,EMPTY_PATH:vS,addIssueToContext:EA,ParseStatus:mt,INVALID:zA,DIRTY:Un,OK:Ht,isAborted:_C,isDirty:$C,isValid:Jl,isAsync:jl,get util(){return te},get objectUtil(){return ZC},ZodParsedType:IA,getParsedType:qr,ZodType:_A,datetimeRegex:q1,ZodString:_i,ZodNumber:gs,ZodBigInt:cs,ZodBoolean:Wl,ZodDate:sn,ZodSymbol:Qd,ZodUndefined:Kl,ZodNull:ql,ZodAny:Ba,ZodUnknown:Ws,ZodNever:Er,ZodVoid:vd,ZodArray:eo,ZodObject:ke,ZodUnion:Xl,ZodDiscriminatedUnion:Sh,ZodIntersection:Zl,ZodTuple:To,ZodRecord:_l,ZodMap:Dd,ZodSet:nn,ZodFunction:Xn,ZodLazy:$l,ZodLiteral:Ag,ZodEnum:ds,ZodNativeEnum:eg,ZodPromise:fa,ZodEffects:lo,ZodTransformer:lo,ZodOptional:ko,ZodNullable:hs,ZodDefault:tg,ZodCatch:ig,ZodNaN:bd,BRAND:NS,ZodBranded:GB,ZodPipeline:Pg,ZodReadonly:og,custom:Z1,Schema:_A,ZodSchema:_A,late:HS,get ZodFirstPartyTypeKind(){return HA},coerce:mR,any:qS,array:$S,bigint:VS,boolean:Av,date:JS,discriminatedUnion:iR,effect:M2,enum:dR,function:lR,instanceof:zS,intersection:oR,lazy:gR,literal:cR,map:nR,nan:OS,nativeEnum:hR,never:ZS,null:KS,nullable:CR,number:$1,object:AR,oboolean:IR,onumber:wR,optional:pR,ostring:ER,pipeline:fR,preprocess:BR,promise:uR,record:sR,set:aR,strictObject:eR,string:_1,symbol:jS,transformer:M2,tuple:rR,undefined:WS,union:tR,unknown:XS,void:_S,NEVER:QR,ZodIssueCode:iA,quotelessJson:mS,ZodError:Ei});gA.object({from:gA.number(),to:gA.number()});function Yg(A){throw new Error("Unexpected object: "+A)}const ev="upload://upload/",tv="index://index/";function vR(A){return A.startsWith(ev)}function DR(A){return A.startsWith(tv)}function iv(A){if(DR(A)){const e=A.slice(tv.length);return JSON.parse(decodeURIComponent(e)).path}else if(vR(A)){const e=A.slice(ev.length);return JSON.parse(decodeURIComponent(e)).localPath}Yg(A)}function bR(A){return A.replace(/^.*[\\/]/,"")}function ov(A){return bR(iv(A))}function LB(A){if(!A||typeof A!="object")return!1;const e=A;if(!("type"in e))return!1;switch(e.type){case"Json":return typeof e.keyLength=="number"&&e.data!==void 0&&typeof e.data=="object";case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof e.partitionKeyLength=="number"&&e.parts!==void 0&&typeof e.parts=="object";default:return!1}}function MR(A,e){if(A!==void 0)switch(A.type){case"Json":return A;case"JsonPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]=e(o);return{...A,parts:t}}case"BinaryPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]={index:e(o.index),values:e(o.values)};return{...A,parts:t}}case"ParquetPartitioned":{const t={};for(const[i,o]of Object.entries(A.parts))t[i]=e(o);return{...A,parts:t}}}}function TB(A){if(!A||typeof A!="object")return!1;const e=A;if(!("type"in e))return!1;switch(e.type){case"Json":return typeof e.keyLength=="number"&&Array.isArray(e.data);case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return typeof e.partitionKeyLength=="number"&&Array.isArray(e.parts);default:return!1}}function xR(A){if(!TB(A))return!1;switch(A.type){case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":return!0;default:return!1}}function FR(A){switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength,data:Object.entries(A.data).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.entries(A.parts).map(([e,t])=>({key:JSON.parse(e),value:t}))};default:Yg(A)}}function yR(A){switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength,data:Object.fromEntries(A.data.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength,parts:Object.fromEntries(A.parts.map(({key:e,value:t})=>[JSON.stringify(e),t]))};default:Yg(A)}}function UB(A){return A instanceof Error?A.name==="AbortError"||UB(A.cause):!1}function SR(A){if(typeof A=="string")return`String value was thrown: ${A}`;if(A&&typeof A=="object")try{return`Plain object was thrown: ${JSON.stringify(A)}`}catch(e){return`Non-serializable object was thrown (JSON.stringify failed: ${e instanceof Error?e.message:String(e)}): ${String(A)}`}return`Non-Error value (${typeof A}) was thrown: ${A}`}function rv(A){return A instanceof Error?A:new Error(SR(A))}function sv(A){const e=A.cause?sv(A.cause):void 0,t=new Error(A.message,e!==void 0?{cause:e}:void 0);return t.name=A.name||"Error",t.stack=A.stack,t}function ir(A){if(A.error)throw A.error instanceof Error?A.error:sv(A.error);return A.value}function RR(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var Nu,x2;function kR(){return x2||(x2=1,Nu=function A(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?A(e.toJSON()):Array.isArray(e)?`[${e.reduce((o,r,s)=>`${o}${s===0?"":","}${A(r===void 0||typeof r=="symbol"?null:r)}`,"")}]`:`{${Object.keys(e).sort().reduce((i,o)=>{if(e[o]===void 0||typeof e[o]=="symbol")return i;const r=i.length===0?"":",";return`${i}${r}${A(o)}:${A(e[o])}`},"")}}`}),Nu}var PR=kR();const mn=RR(PR);function YR(A){return JSON.stringify(A)}function Nn(A){return mn(A)}function Il(A){return JSON.parse(A)}const hi={Int:"Int",Long:"Long",Float:"Float",Double:"Double",String:"String",Bytes:"Bytes"};function nv(A,e){return A==null?void 0:A[e]}function GR(A,e,t,i="readMetadataJsonOrThrow"){const o=nv(A,t);if(o===void 0)return;const r=e[t];try{const s=JSON.parse(o);return r.parse(s)}catch(s){throw new Error(`${i} failed, key: ${String(t)}, value: ${o}, error: ${rv(s)}`)}}function LR(A,e,t){try{return GR(A,e,t)}catch{return}}const be={DiscreteValues:"pl7.app/discreteValues",Graph:{IsVirtual:"pl7.app/graph/isVirtual"},HideDataFromUi:"pl7.app/hideDataFromUi",IsLinkerColumn:"pl7.app/isLinkerColumn",Label:"pl7.app/label",Max:"pl7.app/max",Min:"pl7.app/min",Parents:"pl7.app/parents",Sequence:{Annotation:{Mapping:"pl7.app/sequence/annotation/mapping"},IsAnnotation:"pl7.app/sequence/isAnnotation"},Table:{OrderPriority:"pl7.app/table/orderPriority"},Trace:"pl7.app/trace"},TR={[be.DiscreteValues]:gA.array(gA.string()).or(gA.array(gA.number())),[be.Graph.IsVirtual]:gA.boolean(),[be.HideDataFromUi]:gA.boolean(),[be.IsLinkerColumn]:gA.boolean(),[be.Max]:gA.number(),[be.Min]:gA.number(),[be.Parents]:gA.array(gA.string()),[be.Sequence.Annotation.Mapping]:gA.record(gA.string(),gA.string()),[be.Sequence.IsAnnotation]:gA.boolean(),[be.Table.OrderPriority]:gA.number(),[be.Trace]:gA.record(gA.string(),gA.unknown())};function Br(A,e){return nv(A==null?void 0:A.annotations,e)}function NB(A,e){return LR(A==null?void 0:A.annotations,TR,e)}const HB={Label:"pl7.app/label",Table:{RowSelection:"pl7.app/table/row-selection"}};function go(A){const{type:e,name:t,domain:i}=A,o={type:e,name:t};return i&&Object.entries(i).length>0&&Object.assign(o,{domain:i}),o}function UR(A){return A.map(go)}function NR(A){return Nn(go(A))}function HR(A,e){if(A===void 0)return e===void 0;if(e===void 0)return!0;for(const t in e)if(A[t]!==e[t])return!1;return!0}function av(A,e){return A.name===e.name&&HR(A.domain,e.domain)}function lv(A,e){const t=Math.floor(e/8),i=1<<7-e%8;return(A[t]&i)>0}function zR(A,e){return lv(A.absent,e)}function OR(A,e){if(A.isNA)return lv(A.isNA,e);const t=A.type,i=A.data[e];switch(t){case hi.Int:return i===-2147483648;case hi.Long:return i===-9007199254740991n;case hi.Float:return Number.isNaN(i);case hi.Double:return Number.isNaN(i);case hi.String:return i===null;case hi.Bytes:return i===null;default:throw Error(`unsupported data type: ${t}`)}}const VR={type:"absent"};function JR(A){return typeof A=="object"&&A!==null&&"type"in A&&A.type==="absent"}const jR=null;function WR(A,e,t){const i=A.type;if(i===hi.Bytes)throw Error("Bytes not yet supported");if(t&&"dataType"in t&&t.dataType!==void 0&&t.dataType!==i)throw Error(`expected column of type ${t.dataType}, got ${i}`);if(zR(A,e))return(t==null?void 0:t.absent)!==void 0?t.absent:VR;if(OR(A,e))return(t==null?void 0:t.na)!==void 0?t.na:jR;const o=A.data[e];switch(i){case hi.Int:return o;case hi.Long:return Number(o);case hi.Float:return o;case hi.Double:return o;case hi.String:return o}}function Hu(A,e,t){return WR(A,e,t)}function KR(A,e){return{...A,src:Oc(A.src,e)}}function Oc(A,e){switch(A.type){case"column":return{type:"column",column:e(A.column)};case"slicedColumn":return{type:"slicedColumn",column:e(A.column),newId:A.newId,axisFilters:A.axisFilters};case"inlineColumn":return A;case"inner":case"full":return{type:A.type,entries:A.entries.map(t=>Oc(t,e))};case"outer":return{type:"outer",primary:Oc(A.primary,e),secondary:A.secondary.map(t=>Oc(t,e))};default:Yg(A)}}function qR(A){return mn(A)}function F2(A){return mn(go(A))}function y2(A,e){return JSON.stringify([A,e])}class S2{constructor(e){RA(this,"anchors");RA(this,"domains",new Map);RA(this,"axes",new Map);RA(this,"domainPacks",[]);RA(this,"domainPackToAnchor",new Map);this.anchors=e;const t=Object.entries(e);t.sort((i,o)=>i[0].localeCompare(o[0]));for(const[i,o]of t){for(let r=0;r<o.axesSpec.length;r++){const s=o.axesSpec[r],n=F2(s);this.axes.set(n,{anchor:i,idx:r})}if(o.domain!==void 0){const r=Object.entries(o.domain);r.sort((s,n)=>s[0].localeCompare(n[0])),this.domainPackToAnchor.set(JSON.stringify(r),i),this.domainPacks.push(r.map(([s])=>s));for(const[s,n]of r){const a=y2(s,n);this.domains.set(a,i)}}}}derive(e,t){const i={name:e.name,axes:[]};let o;if(e.domain!==void 0)A:for(const s of this.domainPacks){const n=[];for(const l of s){const g=e.domain[l];if(g!==void 0)n.push([l,g]);else break A}const a=this.domainPackToAnchor.get(JSON.stringify(n));if(a!==void 0){i.domainAnchor=a,o=new Set(s);break}}for(const[s,n]of Object.entries(e.domain??{})){if(o!==void 0&&o.has(s))continue;const a=y2(s,n),l=this.domains.get(a);i.domain??(i.domain={}),i.domain[s]=l?{anchor:l}:n}if(i.axes=e.axesSpec.map(s=>{const n=F2(s),a=this.axes.get(n);return a===void 0?go(s):a}),!t||t.length===0)return i;const r=[];for(const s of t){const[n,a]=s;if(typeof n=="number"){if(n<0||n>=e.axesSpec.length)throw new Error(`Axis index ${n} is out of bounds (0-${e.axesSpec.length-1})`);r.push([n,a])}else{const l=e.axesSpec.findIndex(g=>g.name===n);if(l===-1)throw new Error(`Axis with name "${n}" not found in the column specification`);r.push([l,a])}}return r.sort((s,n)=>s[0]-n[0]),{source:i,axisFilters:r}}deriveS(e,t){return qR(this.derive(e,t))}}function R2(A,e,t){const i={...e},o=(t==null?void 0:t.ignoreMissingDomains)??!1;if(i.domainAnchor!==void 0){const r=A[i.domainAnchor];if(!r)throw new Error(`Anchor "${i.domainAnchor}" not found`);const s=r.domain||{};i.domain={...s,...i.domain},delete i.domainAnchor}if(i.domain){const r={};for(const[s,n]of Object.entries(i.domain))if(typeof n=="string")r[s]=n;else{const a=A[n.anchor];if(!a)throw new Error(`Anchor "${n.anchor}" not found for domain key "${s}"`);if(!a.domain||a.domain[s]===void 0){if(!o)throw new Error(`Domain key "${s}" not found in anchor "${n.anchor}"`);continue}r[s]=a.domain[s]}i.domain=r}return i.axes&&(i.axes=i.axes.map(r=>XR(A,r))),i}function XR(A,e){if(!ZR(e))return e;const t=e.anchor,i=A[t];if(!i)throw new Error(`Anchor "${t}" not found for axis reference`);if("idx"in e){if(e.idx<0||e.idx>=i.axesSpec.length)throw new Error(`Axis index ${e.idx} out of bounds for anchor "${t}"`);return i.axesSpec[e.idx]}else if("name"in e){const o=i.axesSpec.filter(r=>r.name===e.name);if(o.length>1)throw new Error(`Multiple axes with name "${e.name}" found in anchor "${t}"`);if(o.length===0)throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);return o[0]}else if("id"in e){const o=i.axesSpec.filter(r=>av(e.id,go(r)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${t}"`);return o[0]}throw new Error("Unsupported axis reference type")}function ZR(A){return typeof A=="object"&&"anchor"in A}function As(A){return A.kind==="PColumn"}function zB(A){return As(A.spec)}function _R(A){if(!zB(A))throw new Error(`not a PColumn (kind = ${A.spec.kind})`);return A}function OB(A,e){return A===void 0?void 0:{...A,data:e(A.data)}}function $R(A){const e=new Map,t=i=>{switch(i.type){case"column":e.set(i.column.id,i.column);return;case"slicedColumn":e.set(i.column.id,i.column);return;case"inlineColumn":return;case"full":case"inner":for(const o of i.entries)t(o);return;case"outer":t(i.primary);for(const o of i.secondary)t(o);return;default:Yg(i)}};return t(A),[...e.values()]}function k2(A,e){if(A.name!==void 0&&A.name!==e.name)return!1;if(A.type!==void 0){if(Array.isArray(A.type)){if(!A.type.includes(e.type))return!1}else if(A.type!==e.type)return!1}if(A.domain!==void 0){const t=e.domain||{};for(const[i,o]of Object.entries(A.domain))if(t[i]!==o)return!1}return!0}function P2(A,e){if(e.name!==void 0&&A.name!==e.name||e.namePattern!==void 0&&!new RegExp(e.namePattern).test(A.name))return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(A.valueType))return!1}else if(e.type!==A.valueType)return!1}if(e.domain!==void 0){const t=A.domain||{};for(const[i,o]of Object.entries(e.domain))if(t[i]!==o)return!1}if(e.axes!==void 0){const t=A.axesSpec.map(go);if(e.partialAxesMatch){for(const i of e.axes)if(!t.some(o=>k2(i,o)))return!1}else{if(t.length!==e.axes.length)return!1;for(let i=0;i<e.axes.length;i++)if(!k2(e.axes[i],t[i]))return!1}}if(e.annotations!==void 0){const t=A.annotations||{};for(const[i,o]of Object.entries(e.annotations))if(t[i]!==o)return!1}if(e.annotationPatterns!==void 0){const t=A.annotations||{};for(const[i,o]of Object.entries(e.annotationPatterns)){const r=t[i];if(r===void 0||!new RegExp(o).test(r))return!1}}return!0}function rg(A){return Array.isArray(A)?e=>A.some(t=>As(e)&&P2(e,t)):e=>As(e)&&P2(e,A)}function A5(A){const e={kind:A.kind,name:A.name};return A.domain!==void 0&&(e.domain=A.domain),As(A)&&(e.axesSpec=UR(A.axesSpec)),mn(e)}function e5(A){if(A instanceof Int8Array||A instanceof Uint8Array||A instanceof Uint8ClampedArray)return new DataView(A.buffer,A.byteOffset,A.byteLength);if(A instanceof ArrayBuffer)return new DataView(A);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const t5="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i5="0123456789ABCDEFGHIJKLMNOPQRSTUV",o5="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function r5(A,e,t){t=t||{};let i,o;switch(e){case"RFC3548":case"RFC4648":i=t5,o=!0;break;case"RFC4648-HEX":i=i5,o=!0;break;case"Crockford":i=o5,o=!1;break;default:throw new Error("Unknown base32 variant: "+String(e))}const r=t.padding!==void 0?t.padding:o,s=e5(A);let n=0,a=0,l="";for(let g=0;g<s.byteLength;g++)for(a=a<<8|s.getUint8(g),n+=8;n>=5;)l+=i[a>>>n-5&31],n-=5;if(n>0&&(l+=i[a<<5-n&31]),r)for(;l.length%8!==0;)l+="=";return l}const s5=15,n5=24,a5=gA.string().length(n5).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function l5(){const A=new Uint8Array(s5);return crypto.getRandomValues(A),a5.parse(r5(A,"RFC4648"))}gA.object({__isRef:gA.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:gA.string().describe("Upstream block id"),name:gA.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:gA.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly();function g5(A){return typeof A=="object"&&A!==null&&"__isRef"in A&&A.__isRef===!0&&"blockId"in A&&"name"in A}function Y2(A,e=!0){if(e)return{...A,requireEnrichments:!0};{const{requireEnrichments:t,...i}=A;return i}}function c5(A,e){return A.ok?{ok:!0,value:e(A.value)}:A}class Zt{constructor(e,t=i=>i){RA(this,"handle");RA(this,"postProcess");RA(this,"isResolved",!1);RA(this,"resolvedValue");this.handle=e,this.postProcess=t,IS(e,i=>{this.resolvedValue=t(i),this.isResolved=!0})}map(e){return new Zt(this.handle,t=>e(this.postProcess(t)))}mapDefined(e){return new Zt(this.handle,t=>{const i=this.postProcess(t);return i?e(i):void 0})}toJSON(){return this.isResolved?this.resolvedValue:{__awaited_futures__:[this.handle]}}}function e0(A,e){return A===void 0?void 0:e(A)}class to{constructor(e,t){RA(this,"handle");RA(this,"resolvePath");this.handle=e,this.resolvePath=t}resolve(...e){const t=e.map(i=>({assertFieldType:"Input",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveOutput(...e){const t=e.map(i=>({assertFieldType:"Output",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveInput(...e){const t=e.map(i=>({assertFieldType:"Input",...typeof i=="string"?{field:i}:i}));return this.resolveWithCommon({},...t)}resolveAny(...e){return this.resolveWithCommon({},...e)}resolveWithCommon(e,...t){const i=[...this.resolvePath,...t.map(o=>typeof o=="string"?o:o.field)];return e0(ge().resolveWithCommon(this.handle,e,...t),o=>new to(o,i))}get resourceType(){return ge().getResourceType(this.handle)}getInputsLocked(){return ge().getInputsLocked(this.handle)}getOutputsLocked(){return ge().getOutputsLocked(this.handle)}getIsReadyOrError(){return ge().getIsReadyOrError(this.handle)}getIsFinal(){return ge().getIsFinal(this.handle)}getError(){const e=[...this.resolvePath,"error"];return e0(ge().getError(this.handle),t=>new to(t,e))}listInputFields(){return ge().listInputFields(this.handle)}listOutputFields(){return ge().listOutputFields(this.handle)}listDynamicFields(){return ge().listDynamicFields(this.handle)}getKeyValueBase64(e){return ge().getKeyValueBase64(this.handle,e)}getKeyValueAsString(e){return ge().getKeyValueAsString(this.handle,e)}getKeyValueAsJson(e){const t=this.getKeyValueAsString(e);if(t==null)throw new Error("Resource has no content.");return JSON.parse(t)}getDataBase64(){return ge().getDataBase64(this.handle)}getDataAsString(){return ge().getDataAsString(this.handle)}getDataAsJson(){const e=this.getDataAsString();if(e==null)throw new Error("Resource has no content.");return JSON.parse(e)}getPColumns(e=!1,t=""){const i=this.parsePObjectCollection(e,t);return i===void 0?void 0:Object.entries(i).map(([,r])=>{if(!zB(r))throw new Error(`not a PColumn (kind = ${r.spec.kind})`);return r})}parsePObjectCollection(e=!1,t=""){const i=ge().parsePObjectCollection(this.handle,e,t,...this.resolvePath);if(i===void 0)return;const o={};for(const[r,s]of Object.entries(i)){const n=[...this.resolvePath,r];o[r]=OB(s,a=>new to(a,n))}return o}getFileContentAsBase64(e){return new Zt(ge().getBlobContentAsBase64(this.handle,e))}getFileContentAsString(e){return new Zt(ge().getBlobContentAsString(this.handle,e))}getFileContentAsJson(e){return new Zt(ge().getBlobContentAsString(this.handle,e)).mapDefined(t=>JSON.parse(t))}getBlobContentAsBase64(){return this.getFileContentAsBase64()}getBlobContentAsString(){return this.getFileContentAsString()}getFileHandle(){return new Zt(ge().getDownloadedBlobContentHandle(this.handle))}getDownloadedBlobHandle(){return this.getFileHandle()}getRemoteFileHandle(){return new Zt(ge().getOnDemandBlobContentHandle(this.handle))}getOnDemandBlobHandle(){return this.getRemoteFileHandle()}extractArchiveAndGetURL(e){return new Zt(ge().extractArchiveAndGetURL(this.handle,e))}getImportProgress(){return new Zt(ge().getImportProgress(this.handle))}getLastLogs(e){return new Zt(ge().getLastLogs(this.handle,e))}getProgressLog(e){return new Zt(ge().getProgressLog(this.handle,e))}getProgressLogWithInfo(e){return new Zt(ge().getProgressLogWithInfo(this.handle,e))}getLogHandle(){return new Zt(ge().getLogHandle(this.handle))}allFieldsResolved(e="Input"){switch(e){case"Input":return this.getInputsLocked()&&this.listInputFields().every(t=>this.resolve({field:t,assertFieldType:"Input"})!==void 0);case"Output":return this.getOutputsLocked()&&this.listOutputFields().every(t=>this.resolve({field:t,assertFieldType:"Output"})!==void 0)}}mapFields(e,t){const{fieldType:i,requireLocked:o,skipUnresolved:r}={fieldType:"Input",requireLocked:!0,skipUnresolved:!1,...t},s=e;if(o&&(i==="Input"&&!this.getInputsLocked()||i==="Output"&&!this.getOutputsLocked()))return;let a=(i==="Input"?this.listInputFields():i==="Output"?this.listOutputFields():this.listDynamicFields()).map(l=>[l,this.resolve({field:l,assertFieldType:i})]);return r&&(a=a.filter(l=>l[1]!==void 0)),a.map(([l,g])=>s(l,g))}}const d5="staging",h5="main",u5=gA.object({type:gA.string(),importance:gA.number().optional(),id:gA.string().optional(),label:gA.string()}),p5=gA.array(u5),C5=.001,B5="__LABEL__",G2="__LABEL__@1";function gv(A,e,t={}){const i=new Map,o=t.forceTraceElements!==void 0&&t.forceTraceElements.length>0?new Set(t.forceTraceElements):void 0,r=new Map,s=A.map(h=>{const u=e(h);let p,C,B;"spec"in u&&typeof u.spec=="object"?(p=u.spec,C=u.prefixTrace,B=u.suffixTrace):p=u;const f=Br(p,be.Label),E=Br(p,be.Trace),w=(E?p5.safeParse(Il(E)).data:void 0)??[],I=[...C??[],...w,...B??[]];if(f!==void 0){const D={label:f,type:B5,importance:-2};t.addLabelAsSuffix?I.push(D):I.splice(0,0,D)}const m=[],x=new Map;for(let D=I.length-1;D>=0;--D){const{type:v}=I[D],U=I[D].importance??0,S=(x.get(v)??0)+1;x.set(v,S);const M=`${v}@${S}`;r.set(M,(r.get(M)??0)+1),i.set(M,Math.max(i.get(M)??Number.NEGATIVE_INFINITY,U-(I.length-D)*C5)),m.push({...I[D],fullType:M,occurrenceIndex:S})}return m.reverse(),{value:h,spec:p,label:f,fullTrace:m}}),n=[],a=[],l=[...i];l.sort(([,h],[,u])=>u-h);for(const[h]of l)h.endsWith("@1")||r.get(h)===A.length?n.push(h):a.push(h);const g=(h,u=!1)=>{const p=[];for(let C=0;C<s.length;C++){const B=s[C],f=B.fullTrace.filter(I=>h.has(I.fullType)||o&&o.has(I.type));if(f.length===0)if(u)p.push({label:"Unlabeled",value:B.value});else return;const E=f.map(I=>I.label),w=t.separator??" / ";p.push({label:E.join(w),value:B.value})}return p};if(n.length===0){if(a.length!==0)throw new Error("Non-empty secondary types list while main types list is empty.");return g(new Set(G2),!0)}let c=0,d=-1;for(;c<n.length;){const h=new Set;t.includeNativeLabel&&h.add(G2);for(let p=0;p<c;++p)h.add(n[p]);d>=0&&h.add(n[d]);const u=g(h);if(u!==void 0&&new Set(u.map(p=>p.label)).size===A.length)return u;d++,d>=n.length&&(c++,d=c)}return g(new Set([...n,...a]),!0)}const Gg="PColumnData/",t0=Gg+"ResourceMap",i0=Gg+"Partitioned/ResourceMap",ml=Gg+"JsonPartitioned",Zn=Gg+"BinaryPartitioned",cv=Gg+"Partitioned/",Md=cv+"JsonPartitioned",Ql=cv+"BinaryPartitioned",o0=A=>{if(A.endsWith(".index"))return{baseKey:A.substring(0,A.length-6),type:"index"};if(A.endsWith(".values"))return{baseKey:A.substring(0,A.length-7),type:"values"};throw new Error(`key must ends on .index/.values for binary p-column, got: ${A}`)};function f5(A){if(!A)return;const e=A.resourceType.name,t=A.getDataAsJson(),i=[];let o=0;switch(e){case t0:o=t.keyLength;break;case i0:o=t.partitionKeyLength+t.keyLength;break;case ml:case Zn:o=t.partitionKeyLength;break;case Ql:case Md:o=t.superPartitionKeyLength+t.partitionKeyLength;break}switch(e){case t0:case ml:case Zn:for(let r of A.listInputFields()){e===Zn&&(r=o0(r).baseKey);const s=[...JSON.parse(r)];i.push(s)}break;case i0:case Ql:case Md:for(const r of A.listInputFields()){const s=[...JSON.parse(r)],n=A.resolve({field:r,assertFieldType:"Input"});if(n!==void 0)for(let a of n.listInputFields()){e===Ql&&(a=o0(a).baseKey);const l=[...s,...JSON.parse(a)];i.push(l)}}break}return{data:i,keyLength:o}}function E5(A){if(A.type!=="JsonPartitioned"&&A.type!=="BinaryPartitioned")throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${A.type}`);const{parts:e,partitionKeyLength:t}=A,i=[];for(let o=0;o<t;++o)i.push(new Set);for(const o of e){const r=o.key;if(r.length!==t)throw new Error(`Key length (${r.length}) does not match partition length (${t}) for key: ${JSON.stringify(r)}`);for(let s=0;s<t;++s)i[s].add(r[s])}return i.map(o=>Array.from(o.values()))}function w5(A){if(A===void 0)return;if(TB(A))return E5(A);const e=f5(A);if(!e)return;const{data:t,keyLength:i}=e,o=[];for(let r=0;r<i;++r)o.push(new Set);for(const r of t){if(r.length!==i)throw new Error("key length does not match partition length");for(let s=0;s<i;++s)o[s].add(r[s])}return o.map(r=>Array.from(r.values()))}function r0(A,e=[]){if(A===void 0||!A.getIsReadyOrError())return;const t=A.resourceType.name,i=A.getDataAsJson();if(e.length>0&&(t===Md||t===Ql))throw new Error(`Unexpected nested super-partitioned resource: ${t}`);switch(t){case t0:case i0:throw new Error(`Only data columns are supported, got: ${t}`);case ml:{if(typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing partitionKeyLength in metadata for ${t}`);const o=[];for(const r of A.listInputFields()){const s=A.resolve({field:r,assertFieldType:"Input"});if(s===void 0)return;const n=[...e,...JSON.parse(r)];o.push({key:n,value:s})}return{type:"JsonPartitioned",partitionKeyLength:i.partitionKeyLength,parts:o}}case Zn:{if(typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing partitionKeyLength in metadata for ${t}`);const o=[],r=new Map;for(const s of A.listInputFields()){const n=o0(s),a=A.resolve({field:s,assertFieldType:"Input"});if(a===void 0)return;let l=r.get(n.baseKey);l||(l={},r.set(n.baseKey,l)),n.type==="index"?l.index=a:l.values=a}for(const[s,n]of r.entries()){if(!n.index||!n.values)return;const a=[...e,...JSON.parse(s)];o.push({key:a,value:{index:n.index,values:n.values}})}return{type:"BinaryPartitioned",partitionKeyLength:i.partitionKeyLength,parts:o}}case Md:{if(typeof(i==null?void 0:i.superPartitionKeyLength)!="number"||typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);const o=i.superPartitionKeyLength+i.partitionKeyLength,r=[];for(const s of A.listInputFields()){const n=A.resolve({field:s,assertFieldType:"Input"});if(n===void 0)return;if(n.resourceType.name!==ml)throw new Error(`Expected ${ml} inside ${t}, but got ${n.resourceType.name}`);const a=r0(n,JSON.parse(s));if(a===void 0)return;if(a.type!=="JsonPartitioned")throw new Error(`Unexpected inner result type for ${t}: ${a.type}`);r.push(...a.parts)}return{type:"JsonPartitioned",partitionKeyLength:o,parts:r}}case Ql:{if(typeof(i==null?void 0:i.superPartitionKeyLength)!="number"||typeof(i==null?void 0:i.partitionKeyLength)!="number")throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);const o=i.superPartitionKeyLength+i.partitionKeyLength,r=[];for(const s of A.listInputFields()){const n=A.resolve({field:s,assertFieldType:"Input"});if(n===void 0)return;if(n.resourceType.name!==Zn)throw new Error(`Expected ${Zn} inside ${t}, but got ${n.resourceType.name}`);const a=r0(n,JSON.parse(s));if(a===void 0)return;if(a.type!=="BinaryPartitioned")throw new Error(`Unexpected inner result type for ${t}: ${a.type}`);r.push(...a.parts)}return{type:"BinaryPartitioned",partitionKeyLength:o,parts:r}}default:throw new Error(`Unknown resource type: ${t}`)}}function I5(A){if(A!==void 0){if(TB(A))return A;if(LB(A))return FR(A);if(A instanceof to)return r0(A);throw new Error(`Unexpected input type: ${typeof A}`)}}function m5(A,e){const t=[...e].sort((s,n)=>n[0]-s[0]),{type:i}=A;switch(i){case"Json":{const{keyLength:s}=A;for(const[n]of e)if(n>=s)throw new Error(`Can't filter on non-data axis ${n}. Must be >= ${s}`);break}case"JsonPartitioned":case"BinaryPartitioned":case"ParquetPartitioned":{const{partitionKeyLength:s}=A;for(const[n]of e)if(n>=s)throw new Error(`Can't filter on non-partitioned axis ${n}. Must be >= ${s}`);break}default:throw new Error(`Unsupported data info type: ${i}`)}const o=s=>{for(const[n,a]of t)if(s[n]!==a)return!1;return!0},r=s=>{const n=[...s];for(const[a]of t)n.splice(a,1);return n};switch(A.type){case"Json":return{type:"Json",keyLength:A.keyLength-e.length,data:A.data.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"JsonPartitioned":return{type:"JsonPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"BinaryPartitioned":return{type:"BinaryPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))};case"ParquetPartitioned":return{type:"ParquetPartitioned",partitionKeyLength:A.partitionKeyLength-e.length,parts:A.parts.filter(s=>o(s.key)).map(s=>({key:r(s.key),value:s.value}))}}}function Q5(A){if(!Array.isArray(A))return!1;if(A.length===0)return!0;const e=A[0];return typeof e=="object"&&e!==null&&"key"in e&&"val"in e}class v5{constructor(e){RA(this,"columns");this.columns=e}selectColumns(e){const t=typeof e=="function"?e:rg(e);return this.columns.filter(i=>t(i.spec))}}function D5(A){if(A)return A.map(e=>({type:`split:${NR(e.axisId)}`,label:e.label,importance:1e6}))}function b5(A){if(A)return A.map(e=>[e.axisIdx,e.value])}function M5(A,e){if(!e||e.length===0)return A;const t=[...e].sort((i,o)=>i[0]-o[0]);return mn({id:A,axisFilters:t})}function L2(A){if(!A||typeof A!="object")return!1;const e=A,t=e.domain&&typeof e.domain=="object"&&Object.values(e.domain).some(o=>typeof o=="object"&&o!==null&&"anchor"in o),i=e.axes&&Array.isArray(e.axes)&&e.axes.some(o=>typeof o=="object"&&o!==null&&"anchor"in o);return!!e.domainAnchor||t||i}function x5(A){if(typeof A!="object"||!("axes"in A)||A.axes===void 0)return[];const e=A.axes.map((t,i)=>typeof t=="object"&&"split"in t&&t.split===!0?i:-1).filter(t=>t!==-1);if(e.length>0&&A.partialAxesMatch!==void 0)throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");return e.sort((t,i)=>t-i),e}class T2{constructor(){RA(this,"defaultProviderStore",[]);RA(this,"providers",[new v5(this.defaultProviderStore)]);RA(this,"axisLabelProviders",[])}addColumnProvider(e){return this.providers.push(e),this}addAxisLabelProvider(e){return this.axisLabelProviders.push(e),this}addColumns(e){return this.defaultProviderStore.push(...e),this}addColumn(e){return this.defaultProviderStore.push(e),this}findLabels(e){for(const t of this.axisLabelProviders){const i=t.findLabels(e);if(i)return i}}getUniversalEntries(e,t){const{anchorCtx:i,labelOps:o,dontWaitAllData:r=!1,overrideLabelAnnotation:s=!1,exclude:n}=t??{},a={...s&&(o==null?void 0:o.includeNativeLabel)!==!1?{includeNativeLabel:!0}:{},...o??{}};let l=()=>!1;if(n){const p=(Array.isArray(n)?n:[n]).map(C=>{if(L2(C)){if(!i)throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");return rg(R2(i.anchors,C,t))}else return rg(C)});l=C=>p.some(B=>B(C))}const g=typeof e=="function"?[e]:Array.isArray(e)?e:[e],c=[],d=new Set;for(const p of g){const C=L2(p);let B;if(C){if(!i)throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");B=R2(i.anchors,p,t)}else B=p;const f=new Set,E=[];for(const m of this.providers){const x=m.selectColumns(B);for(const D of x){if(l(D.spec))continue;if(f.has(D.id))throw new Error(`Duplicate column id ${D.id} in provider ${m.constructor.name}`);const v=A5(D.spec);d.has(v)||(f.add(D.id),d.add(v),E.push(D))}}if(E.length===0)continue;const w=x5(p),I=w.length>0;for(const m of E){if(!As(m.spec))continue;const x=m.spec;if(I){if(Q5(m.data))throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${m.id}`);const D=I5(m.data);if(!D){if(r)continue;return}if(!xR(D))throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${D.type} for column ${m.id}`);const v=w5(D),U=w[w.length-1];if(U>=D.partitionKeyLength)throw new Error(`Not enough partition keys (${D.partitionKeyLength}) for requested split axes (max index ${U}) in column ${x.name}`);const S=w.map(O=>this.findLabels(go(x.axesSpec[O]))),M=[],z=(O,X)=>{if(X>=w.length){if(M.push([...O]),M.length>1e4)throw new Error("Too many key combinations, aborting.");return}const AA=w[X];if(AA>=v.length)throw new Error(`Axis index ${AA} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${m.id}`);const aA=v[AA];if(!aA||aA.length===0){M.length=0;return}for(const bA of aA)O.push(bA),z(O,X+1),O.pop()};if(z([],0),M.length===0)continue;const T=[...x.axesSpec],y=w.map(O=>O);for(let O=w.length-1;O>=0;O--)T.splice(w[O],1);const H={...x,axesSpec:T};for(const O of M){const X=O.map((AA,aA)=>{const bA=y[aA],mA=go(x.axesSpec[bA]),PA=S[aA],uA=(PA==null?void 0:PA[AA])??String(AA);return{axisIdx:bA,axisId:mA,value:AA,label:uA}});c.push({type:"split",originalColumn:m,spec:x,adjustedSpec:H,dataEntries:D,axisFilters:X})}}else c.push({type:"direct",originalColumn:m,spec:x,adjustedSpec:x})}}if(c.length===0)return[];const h=gv(c,p=>({spec:p.spec,suffixTrace:p.type==="split"?D5(p.axisFilters):void 0}),a),u=[];for(const{value:p,label:C}of h){const{originalColumn:B,spec:f}=p,E=p.type==="split"?p.axisFilters:void 0,w=b5(E);let I;i?I=i.deriveS(f,w):I=M5(B.id,w);let m={...p.adjustedSpec};s&&(m={...m,annotations:{...m.annotations??{},[be.Label]:C}}),u.push({id:I,spec:m,data:()=>p.type==="split"?yR(m5(p.dataEntries,w)):p.originalColumn.data,label:C})}return u}getColumns(e,t){const i=this.getUniversalEntries(e,{overrideLabelAnnotation:!0,...t??{}});if(!i)return;const o=[];for(const r of i){const s=r.data();if(!s){if(t!=null&&t.dontWaitAllData)continue;return}o.push({id:r.id,spec:r.spec,data:s})}return o}}function U2(A){const e=o=>o.operator!=="InSet"?o:{operator:"Or",operands:o.references.map(r=>({operator:"Equal",reference:r}))},t=(o,r)=>{switch(o.operator){case"And":return{...o,operands:o.operands.map(n=>t(n,r))};case"Or":return{...o,operands:o.operands.map(n=>t(n,r))};case"Not":return{...o,operand:t(o.operand,r)};default:return r(o)}},i=(o,r)=>({...o,predicate:t(o.predicate,r)});return A.map(o=>i(o,e))}function zu(A,e){if(A===void 0)return e===void 0;if(e===void 0)return!0;for(const t in e)if(A[t]!==e[t])return!1;return!0}function N2(A){return OB(A,e=>e instanceof to?e.handle:LB(e)?MR(e,t=>t.handle):e)}class F5{constructor(){RA(this,"ctx",ge())}calculateOptions(e){return this.ctx.calculateOptions(e)}getOptions(e,t){const i=typeof e=="function"?e:rg(e),o=this.getSpecs().entries.filter(n=>i(n.obj));let r={},s=!1;return typeof t<"u"&&(typeof t=="function"?r=t:typeof t=="object"&&("includeNativeLabel"in t||"separator"in t||"addLabelAsSuffix"in t?r=t:(t=t,r=t.label??{},s=t.refsWithEnrichments??!1))),typeof r=="object"?gv(o,n=>n.obj,r??{}).map(({value:{ref:n},label:a})=>({ref:Y2(n,s),label:a})):o.map(({ref:n,obj:a})=>({ref:Y2(n,s),label:r(a,n)}))}resolveAnchorCtx(e){if(e instanceof S2)return e;const t={};for(const[i,o]of Object.entries(e))if(g5(o)){const r=this.getPColumnSpecByRef(o);if(!r)return;t[i]=r}else t[i]=o;return new S2(t)}getAnchoredPColumns(e,t,i){const o=this.resolveAnchorCtx(e);if(o)return new T2().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t,{...i,anchorCtx:o})}getCanonicalOptions(e,t,i){const o=this.resolveAnchorCtx(e);if(!o)return;const r=new T2().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t,{...i,anchorCtx:o});if(r)return r.map(s=>({value:s.id,label:s.label}))}getDataFromResultPool(){return this.getData()}getData(){const e=this.ctx.getDataFromResultPool();return{isComplete:e.isComplete,entries:e.entries.map(t=>({ref:t.ref,obj:{...t.obj,data:new to(t.obj.data,[t.ref.blockId,t.ref.name])}}))}}getDataWithErrorsFromResultPool(){return this.getDataWithErrors()}getDataWithErrors(){const e=this.ctx.getDataWithErrorsFromResultPool();return{isComplete:e.isComplete,entries:e.entries.map(t=>({ref:t.ref,obj:{...t.obj,data:c5(t.obj.data,i=>new to(i,[t.ref.blockId,t.ref.name]))}}))}}getSpecsFromResultPool(){return this.getSpecs()}getSpecs(){return this.ctx.getSpecsFromResultPool()}getDataByRef(e){var i;if(typeof this.ctx.getDataFromResultPoolByRef>"u")return(i=this.getData().entries.find(o=>o.ref.blockId===e.blockId&&o.ref.name===e.name))==null?void 0:i.obj;const t=this.ctx.getDataFromResultPoolByRef(e.blockId,e.name);if(t)return OB(t,o=>new to(o,[e.blockId,e.name]))}getPColumnByRef(e){const t=this.getDataByRef(e);if(t)return _R(t)}getPColumnSpecByRef(e){const t=this.getSpecByRef(e);if(t){if(!As(t))throw new Error(`not a PColumn spec (kind = ${t.kind})`);return t}}getSpecByRef(e){return this.ctx.getSpecFromResultPoolByRef(e.blockId,e.name)}findDataWithCompatibleSpec(e){const t=[];A:for(const i of this.getData().entries){if(!As(i.obj.spec))continue;const o=i.obj.spec;if(e.name===o.name&&e.valueType===o.valueType&&e.axesSpec.length===o.axesSpec.length&&zu(e.domain,o.domain)){for(let r=0;r<e.axesSpec.length;++r){const s=e.axesSpec[r],n=o.axesSpec[r];if(s.name!==n.name||s.type!==n.type||!zu(s.domain,n.domain))continue A}t.push(i.obj)}}return t}findLabels(e){const t=this.getData();for(const i of t.entries){if(!zB(i.obj))continue;const o=i.obj.spec;if(o.name===HB.Label&&o.axesSpec.length===1&&o.axesSpec[0].name===e.name&&o.axesSpec[0].type===e.type&&zu(e.domain,o.axesSpec[0].domain)){if(i.obj.data.resourceType.name!=="PColumnData/Json")throw Error(`Expected JSON column for labels, got: ${i.obj.data.resourceType.name}`);return Object.fromEntries(Object.entries(i.obj.data.getDataAsJson().data).map(s=>[JSON.parse(s[0])[0],s[1]]))}}}selectColumns(e){const t=typeof e=="function"?e:rg(e);return this.getSpecs().entries.filter(({obj:o})=>As(o)?t(o):!1).map(({ref:o,obj:r})=>{const s=r;let n=null;const a=this;return{id:mn(o),spec:s,get data(){var l;return n!==null||(n=(l=a.getPColumnByRef(o))==null?void 0:l.data),n}}})}findLabelsForColumnAxis(e,t){const i=this.findLabels(e.axesSpec[t]);if(!i)return;const o=Br(e,`pl7.app/axisKeys/${t}`);if(o!==void 0){const r=JSON.parse(o);return Object.fromEntries(r.map(s=>[s,i[s]??"Unlabelled"]))}else return i}}class lc{constructor(){RA(this,"ctx");RA(this,"_argsCache");RA(this,"_uiStateCache");RA(this,"_activeArgsCache");RA(this,"resultPool",new F5);this.ctx=ge()}get args(){if(this._argsCache===void 0){const e=this.ctx.args,t=typeof e=="function"?e():e;this._argsCache={v:JSON.parse(t)}}return this._argsCache.v}get uiState(){if(this._uiStateCache===void 0){const e=this.ctx.uiState,t=typeof e=="function"?e():e;this._uiStateCache={v:t?JSON.parse(t):{}}}return this._uiStateCache.v}get activeArgs(){if(this._activeArgsCache===void 0){const e=this.ctx.activeArgs,t=typeof e=="function"?e():e;this._activeArgsCache={v:t?JSON.parse(t):void 0}}return this._activeArgsCache.v}getNamedAccessor(e){return e0(this.ctx.getAccessorHandleByName(e),t=>new to(t,[e]))}get prerun(){return this.getNamedAccessor(d5)}get outputs(){return this.getNamedAccessor(h5)}findLabels(e){return this.resultPool.findLabels(e)}verifyInlineAndExplicitColumnsSupport(e){var o;const t=e.some(r=>!(r.data instanceof to)||LB(r.data)),i=((o=this.ctx.featureFlags)==null?void 0:o.inlineColumnsSupport)===!0;if(t&&!i)throw Error("Inline or explicit columns not supported")}patchPTableDef(e){var t,i;return(t=this.ctx.featureFlags)!=null&&t.pTablePartitionFiltersSupport||(e={...e,partitionFilters:[],filters:[...e.partitionFilters,...e.filters]}),(i=this.ctx.featureFlags)!=null&&i.pFrameInSetFilterSupport||(e={...e,partitionFilters:U2(e.partitionFilters),filters:U2(e.filters)}),e}createPFrame(e){return this.verifyInlineAndExplicitColumnsSupport(e),this.ctx.createPFrame(e.map(t=>N2(t)))}createPTable(e){let t;return"columns"in e?t=this.patchPTableDef({src:{type:"full",entries:e.columns.map(i=>({type:"column",column:i}))},partitionFilters:e.filters??[],filters:[],sorting:e.sorting??[]}):t=this.patchPTableDef(e),this.verifyInlineAndExplicitColumnsSupport($R(t.src)),this.ctx.createPTable(KR(t,i=>N2(i)))}getBlockLabel(e){return this.ctx.getBlockLabel(e)}getCurrentUnstableMarker(){return this.ctx.getCurrentUnstableMarker()}logInfo(e){this.ctx.logInfo(e)}logWarn(e){this.ctx.logWarn(e)}logError(e){this.ctx.logError(e)}}var y5="1.42.46";const Vc=y5;function S5(A){return A.__renderLambda===!0}function Ou(A){if(A!==void 0)return S5(A)?A.handle:A}const rt=class rt{constructor(e,t,i,o,r,s,n,a,l){RA(this,"_renderingMode");RA(this,"_initialArgs");RA(this,"_initialUiState");RA(this,"_outputs");RA(this,"_inputsValid");RA(this,"_sections");RA(this,"_title");RA(this,"_enrichmentTargets");RA(this,"_featureFlags");this._renderingMode=e,this._initialArgs=t,this._initialUiState=i,this._outputs=o,this._inputsValid=r,this._sections=s,this._title=n,this._enrichmentTargets=a,this._featureFlags=l}static create(e="Heavy"){return new rt(e,void 0,{},{},Lu(!0),Lu([]),void 0,void 0,{...rt.INITIAL_BLOCK_FEATURE_FLAGS})}output(e,t,i={}){if(typeof t=="function"){const o=`output#${e}`;return Ha(o,()=>t(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,{...this._outputs,[e]:{__renderLambda:!0,handle:o,...i}},this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}else return new rt(this._renderingMode,this._initialArgs,this._initialUiState,{...this._outputs,[e]:t},this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}retentiveOutput(e,t){return this.output(e,t,{retentive:!0})}argsValid(e){return typeof e=="function"?(Ha("inputsValid",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,{__renderLambda:!0,handle:"inputsValid"},this._sections,this._title,this._enrichmentTargets,this._featureFlags)):new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,e,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}sections(e){return Array.isArray(e)?this.sections(Lu(e)):typeof e=="function"?(Ha("sections",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,{__renderLambda:!0,handle:"sections"},this._title,this._enrichmentTargets,this._featureFlags)):new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,e,this._title,this._enrichmentTargets,this._featureFlags)}title(e){return Ha("title",()=>e(new lc)),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,{__renderLambda:!0,handle:"title"},this._enrichmentTargets,this._featureFlags)}initialArgs(e){return new rt(this._renderingMode,e,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withArgs(e){return new rt(this._renderingMode,e,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withUiState(e){return new rt(this._renderingMode,this._initialArgs,e,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,this._featureFlags)}withFeatureFlags(e){return new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,this._enrichmentTargets,{...this._featureFlags,...e})}enriches(e){return Ha("enrichmentTargets",e),new rt(this._renderingMode,this._initialArgs,this._initialUiState,this._outputs,this._inputsValid,this._sections,this._title,{__renderLambda:!0,handle:"enrichmentTargets"},this._featureFlags)}done(e){const t=e??1;return this.withFeatureFlags({...this._featureFlags,requiresUIAPIVersion:t})._done(t)}_done(e){if(this._initialArgs===void 0)throw new Error("Initial arguments not set.");const t={v3:{sdkVersion:Vc,renderingMode:this._renderingMode,initialArgs:this._initialArgs,initialUiState:this._initialUiState,inputsValid:this._inputsValid,sections:this._sections,title:this._title,outputs:this._outputs,enrichmentTargets:this._enrichmentTargets,featureFlags:this._featureFlags},sdkVersion:Vc,renderingMode:this._renderingMode,initialArgs:this._initialArgs,inputsValid:Ou(this._inputsValid),sections:Ou(this._sections),outputs:Object.fromEntries(Object.entries(this._outputs).map(([i,o])=>[i,Ou(o)]))};return globalThis.platformaApiVersion=e,ES()?V1({sdkVersion:Vc,apiVersion:platformaApiVersion}):{config:t}}};RA(rt,"INITIAL_BLOCK_FEATURE_FLAGS",{supportsLazyState:!0,requiresUIAPIVersion:1,requiresModelAPIVersion:1});let s0=rt;function H2(A){return A.axesSpec.length===1&&A.name===HB.Label}function R5(A){return!!NB(A,be.IsLinkerColumn)}function k5({selection:A,columnId:e=l5(),label:t="Selection marker",domain:i}){if(!(A!=null&&A.axesSpec.length))return;const o=A.selectedKeys.filter(r=>r.every(s=>!JR(s))).map(r=>({key:r,val:1}));if(o.length)return{id:e,spec:{kind:"PColumn",valueType:hi.Int,name:HB.Table.RowSelection,axesSpec:A.axesSpec,...i&&Object.keys(i).length&&{domain:i},annotations:{[be.Label]:t,[be.DiscreteValues]:YR([1])}},data:o}}function P5(){return platformaApiVersion??1}function Fo(){return V1({sdkVersion:Vc,apiVersion:platformaApiVersion})}var gc={exports:{}},z2;function Y5(){return z2||(z2=1,function(A,e){e=A.exports=t,e.getSerialize=i;function t(o,r,s,n){return JSON.stringify(o,i(r,n),s)}function i(o,r){var s=[],n=[];return r==null&&(r=function(a,l){return s[0]===l?"[Circular ~]":"[Circular ~."+n.slice(0,s.indexOf(l)).join(".")+"]"}),function(a,l){if(s.length>0){var g=s.indexOf(this);~g?s.splice(g+1):s.push(this),~g?n.splice(g,1/0,a):n.push(a),~s.indexOf(l)&&(l=r.call(this,a,l))}else s.push(l);return o==null?l:o.call(this,a,l)}}}(gc,gc.exports)),gc.exports}Y5();const G5=gA.object({type:gA.literal("PlError"),name:gA.string(),message:gA.string(),fullMessage:gA.string().optional(),stack:gA.string().optional()}),L5=G5.extend({cause:gA.lazy(()=>xd).optional(),errors:gA.lazy(()=>xd.array()).optional()}),T5=gA.object({type:gA.literal("StandardError"),name:gA.string(),message:gA.string(),stack:gA.string().optional()}),U5=T5.extend({cause:gA.lazy(()=>xd).optional(),errors:gA.lazy(()=>xd.array()).optional()}),xd=gA.union([U5,L5]),N5=gA.object({name:gA.string(),message:gA.string(),fullMessage:gA.string().optional(),stack:gA.string().optional()}),O2=N5.extend({cause:gA.lazy(()=>O2).optional(),errors:gA.lazy(()=>O2.array()).optional()});function H5(A){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(A)}const V2=Array.isArray;function J2(A){return A!==null&&typeof A=="object"}function z5(A){return typeof A=="object"&&A!==null}function n0(A){if(!z5(A))return!1;const e=Object.getPrototypeOf(A);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function j2(A){return Object.values(A).reduce((e,t)=>t!==void 0?e+1:e,0)}function Pt(A,e){if(!(J2(A)&&J2(e)))return A===e;if(V2(A)&&V2(e))return A.length!==e.length?!1:[...A.keys()].every(t=>Pt(A[t],e[t]));if(n0(A)&&n0(e))return j2(A)!==j2(e)?!1:Object.keys(A).every(t=>Pt(A[t],e[t]));throw Error(`Cannot compare a ${String(A)} and b ${String(e)}`)}function st(A){if(Array.isArray(A)){const e=[];for(let t=0;t<A.length;t++)e[t]=st(A[t]);return e}else if(n0(A)){const e={};return Object.keys(A).forEach(t=>{e[t]=st(A[t])}),e}else return A}var O5=Object.defineProperty,V5=(A,e,t)=>e in A?O5(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t,a0=(A,e,t)=>V5(A,typeof e!="symbol"?e+"":e,t);let J5=class extends Error{constructor(){super(...arguments),a0(this,"name","UnresolvedError")}},VB=class extends Error{constructor(e){super(e.map(t=>typeof t=="string"?t:t.message).join(`
|
|
18
18
|
`)),a0(this,"name","MultiError"),a0(this,"fullMessage"),this.errors=e,this.fullMessage=e.map(t=>typeof t=="string"?t:t.type=="PlError"&&"fullMessage"in t?t.fullMessage:t.message).join(`
|
|
19
19
|
`)}};function dv(A){if(!A)throw new J5;if(!A.ok)throw new VB(A.errors);return A.value}const hv=A=>A,uv=A=>A instanceof Error?A:Error(String(A)),pv=A=>A.name==="ZodError",Cv=A=>{const{formErrors:e,fieldErrors:t}=A.flatten(),i=Object.entries(t).map(([o,r])=>o+":"+(r==null?void 0:r.join(",")));return e.concat(i).join("; ")};function Fd(A){const e=A.validate??hv,{autoSave:t}=A,i=kA(),o=kA(),r=u=>{o.value={model:st(u)}};ne(()=>A.get(),u=>r(u),{immediate:!0});const s=()=>{var u;A.onSave(e(st((u=o.value)==null?void 0:u.model)))},n=()=>{r(A.get()),i.value=void 0},a=u=>{const p=uv(u);pv(p)?i.value=Error(Cv(p)):i.value=p},l=u=>{i.value=void 0;try{e(u),t&&s()}catch(p){a(p)}},g=W({get:()=>{var u;return(u=o.value)==null?void 0:u.model},set(u){r(u),l(u)}});ne(o,(u,p)=>{u&&u===p&&l(u.model)},{deep:!0});const c=W(()=>!i.value),d=W(()=>!Pt(A.get(),N(o))),h=W(()=>i.value?i.value.message:"");return Ye({model:g,valid:c,isChanged:d,error:i,errorString:h,save:s,revert:n,setError:a})}function j5(A,e,t){const i=A.validate??hv,{autoSave:o}=A,r=kA(),s=kA(),n=C=>{s.value={model:Object.assign(st(C),e??{}),stage:Symbol()}};ne(()=>A.get(),C=>n(C),{immediate:!0});const a=()=>{var C;return A.onSave(i(st((C=s.value)==null?void 0:C.model)))},l=()=>{n(A.get()),r.value=void 0},g=C=>{const B=uv(C);pv(B)?r.value=Error(Cv(B)):r.value=B},c=C=>{r.value=void 0;try{i(C),o&&a()}catch(B){g(B)}},d=W({get:()=>{var C;return(C=s.value)==null?void 0:C.model},set(){throw Error("Cannot replace base model")}});ne([()=>({args:d.value.args,ui:d.value.ui}),()=>{var C;return(C=s.value)==null?void 0:C.stage}],([C,B],[f,E])=>{B===E&&c(C)},{deep:!0});const h=W(()=>!r.value),u=W(()=>{var C;const{args:B,ui:f}=((C=N(s))==null?void 0:C.model)??{};return!Pt(A.get(),{args:B,ui:f})}),p=W(()=>r.value?r.value.message:"");return Ye({model:d,valid:h,isChanged:u,error:r,errorString:p,save:a,revert:l,setError:g})}const Bv=A=>Object.fromEntries(new URL(A,"http://dummy").searchParams);function yd(A){return mQ()?(K4(A),!0):!1}const Sd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const l0=()=>{};function fv(A,e){function t(...i){return new Promise((o,r)=>{Promise.resolve(A(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(o).catch(r)})}return t}const W5=A=>A();function K5(A,e={}){let t,i,o=l0;const r=a=>{clearTimeout(a),o(),o=l0};let s;return a=>{const l=dd(A),g=dd(e.maxWait);return t&&r(t),l<=0||g!==void 0&&g<=0?(i&&(r(i),i=null),Promise.resolve(a())):new Promise((c,d)=>{o=e.rejectOnCancel?d:c,s=a,g&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,c(s())},g)),t=setTimeout(()=>{i&&r(i),i=null,c(a())},l)})}}function Vu(A,e=200,t={}){return fv(K5(e,t),A)}function q5(A,e=1e3,t={}){const{immediate:i=!0,immediateCallback:o=!1}=t;let r=null;const s=Ro(!1);function n(){r&&(clearInterval(r),r=null)}function a(){s.value=!1,n()}function l(){const g=dd(e);g<=0||(s.value=!0,o&&A(),n(),s.value&&(r=setInterval(A,g)))}if(i&&Sd&&l(),Ve(e)||typeof e=="function"){const g=ne(e,()=>{s.value&&Sd&&l()});yd(g)}return yd(a),{isActive:NQ(s),pause:a,resume:l}}function X5(A,e,t={}){const{immediate:i=!0,immediateCallback:o=!1}=t,r=Ro(!1);let s=null;function n(){s&&(clearTimeout(s),s=null)}function a(){r.value=!1,n()}function l(...g){o&&A(),n(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,A(...g)},dd(e))}return i&&(r.value=!0,Sd&&l()),yd(a),{isPending:NQ(r),start:l,stop:a}}function Z5(A,e,t={}){const{eventFilter:i=W5,...o}=t,r=fv(i,e);let s,n,a;if(o.flush==="sync"){const l=Ro(!1);n=()=>{},s=g=>{l.value=!0,g(),l.value=!1},a=ne(A,(...g)=>{l.value||r(...g)},o)}else{const l=[],g=Ro(0),c=Ro(0);n=()=>{g.value=c.value},l.push(ne(A,()=>{c.value++},{...o,flush:"sync"})),s=d=>{const h=c.value;d(),g.value+=c.value-h},l.push(ne(A,(...d)=>{const h=g.value>0&&g.value===c.value;g.value=0,c.value=0,!h&&r(...d)},o)),a=()=>{l.forEach(d=>d())}}return{stop:a,ignoreUpdates:s,ignorePrevAsyncUpdates:n}}function _5(A,e,t){return ne(A,(o,r,s)=>{o&&e(o,r,s)},{...t,once:!1})}function $5(A,e,t){let i;Ve(t)?i={evaluating:t}:i={};const{lazy:o=!1,flush:r="pre",evaluating:s=void 0,shallow:n=!0,onError:a=l0}=i,l=Ro(!o),g=n?Ro(e):kA(e);let c=0;return ly(async d=>{if(!l.value)return;c++;const h=c;let u=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const p=await A(C=>{d(()=>{s&&(s.value=!1),u||C()})});h===c&&(g.value=p)}catch(p){a(p)}finally{s&&h===c&&(s.value=!1),u=!0}},{flush:r}),o?W(()=>(l.value=!0,g.value)):g}function Ak(A,e,t={}){const{immediate:i=!0,immediateCallback:o=!1}=t,{start:r}=X5(n,e,{immediate:i}),s=Ro(!1);async function n(){s.value&&(await A(),r())}function a(){s.value||(s.value=!0,o&&A(),r())}function l(){s.value=!1}return i&&Sd&&a(),yd(l),{isActive:s,pause:l,resume:a}}function ek(A,e,t){const i=(f,...E)=>{t.debug&&console.log(`%c>>> %c${f}`,"color: orange; font-weight: bold","color: orange",...E)},o=Ye({args:Object.freeze(A.args),outputs:Object.freeze(A.outputs),ui:Object.freeze(A.ui),navigationState:Object.freeze(A.navigationState)}),r=t.debounceSpan??200,s=pS(t.debounceMaxWait??0,f=>f<2e4?2e4:f<r?r*100:f),n=Vu(f=>{Pt(f,o.args)||e.setBlockArgs(f)},r,{maxWait:s}),a=Vu(f=>{Pt(f,o.ui)||e.setBlockUiState(f)},r,{maxWait:s}),l=Vu((f,E)=>{(!Pt(f,o.args)||!Pt(E,o.ui))&&e.setBlockArgsAndUiState(f,E)},r,{maxWait:s});e.onStateUpdates(async f=>{f.forEach(E=>{E.key==="args"&&!Pt(o.args,E.value)&&(o.args=Object.freeze(E.value),i("args patch",o.args)),E.key==="ui"&&!Pt(o.ui,E.value)&&(o.ui=Object.freeze(E.value),i("ui patch",o.ui)),E.key==="outputs"&&!Pt(o.outputs,E.value)&&(o.outputs=Object.freeze(E.value),i("outputs patch",o.outputs)),E.key==="navigationState"&&!Pt(o.navigationState,E.value)&&(o.navigationState=Object.freeze(E.value),i("navigationState patch",o.navigationState))}),await vh()});const g=()=>st(o.args),c=()=>st(o.ui),d=()=>st(o.navigationState),h={createArgsModel(f={}){return Fd({get(){return f.transform?f.transform(o.args):o.args},validate:f.validate,autoSave:!0,onSave(E){n(E)}})},createUiModel(f={},E){return Fd({get(){return f.transform?f.transform(o.ui):o.ui??E()},validate:f.validate,autoSave:!0,onSave(w){a(w)}})},useOutputs(...f){const E=Ye({errors:void 0,value:void 0});return ne(()=>o.outputs,()=>{try{Object.assign(E,{value:this.unwrapOutputs(...f),errors:void 0})}catch(w){Object.assign(E,{value:void 0,errors:[String(w)]})}},{immediate:!0,deep:!0}),E},unwrapOutputs(...f){const E=o.outputs,w=f.map(I=>[I,dv(E[I])]);return Object.fromEntries(w)},updateArgs(f){const E=g();return f(E),e.setBlockArgs(E)},updateUiState(f){const E=c();return e.setBlockUiState(f(E))},updateNavigationState(f){const E=d();return f(E),e.setNavigationState(E)},navigateTo(f){const E=d();return E.href=f,e.setNavigationState(E)}},u=W(()=>{const f=Object.entries(o.outputs).map(([E,w])=>[E,w.ok&&w.value!==void 0?w.value:void 0]);return Object.fromEntries(f)}),p=W(()=>{const f=Object.entries(o.outputs).map(([E,w])=>[E,w&&!w.ok?new VB(w.errors):void 0]);return Object.fromEntries(f)}),C={snapshot:o,queryParams:W(()=>Bv(o.navigationState.href)),href:W(()=>o.navigationState.href),hasErrors:W(()=>Object.values(o.outputs).some(f=>!(f!=null&&f.ok)))},B=j5({get(){return{args:o.args,ui:o.ui}},autoSave:!0,onSave(f){l(f.args,f.ui)}},{outputs:u,outputErrors:p});return Ye(Object.assign(B,h,C))}function tk(A,e){return A=Math.ceil(A),e=Math.floor(e),Math.floor(Math.random()*(e-A))+A}function ik(A){let e="";for(let t=0;t<A;t++)e+=String.fromCharCode(tk(65,91));return e}function Ev(A=42){return ik(A)}/*!
|
|
20
20
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
@@ -480,4 +480,4 @@ ${JSON.stringify(UhA(h.value),null,2)}
|
|
|
480
480
|
|
|
481
481
|
`}))??[])).join(`
|
|
482
482
|
`)??""});const c=[{label:"Rabbit (no limits)",value:"PRODUCT:YAGRKKGRBYLCGDLCDVYINUSHYWGYWXWHGIINXYBQBZKMSIRC"},{label:"Crow (limit 10GB monthly)",value:"PRODUCT:JLVOZAOIOBZMLCIWQKUYZWLBAEPDHUJPHRHYAOBPDGWPVTJC"},{label:"Behemoth (1000 runs, 100GB monthly)",value:"PRODUCT:ZHJBTZESZONNVEFPGWWPDYESVYGXQOOSHYVUBWDXUHSILLDH"},{label:"Kolibri (100 runs)",value:"PRODUCT:EBVGZXPBYZLGKQHLFDVCCVFRLKTZZTJSWMNJGXNHVTMKNSPA"}];return(d,h)=>(L(),q(oe,null,[pA(N(HnA),null,{title:QA(()=>h[9]||(h[9]=[ie(" Monetization test ")])),default:QA(()=>[pA(N(Yc),null,{default:QA(()=>[pA(N(OnA),{width:"400px"},{default:QA(()=>[pA(N(xE),{modelValue:N(e).model.args.productKey,"onUpdate:modelValue":h[0]||(h[0]=u=>N(e).model.args.productKey=u),label:"Select product",options:c},null,8,["modelValue"]),pA(N(Op),{modelValue:N(e).model.args.productKey,"onUpdate:modelValue":h[1]||(h[1]=u=>N(e).model.args.productKey=u),label:"or enter product key",clearable:"",parse:t},null,8,["modelValue"])]),_:1})]),_:1}),pA(N(NaA),{modelValue:N(e).model.args.shouldAddRunPerFile,"onUpdate:modelValue":h[2]||(h[2]=u=>N(e).model.args.shouldAddRunPerFile=u)},{default:QA(()=>h[10]||(h[10]=[ie(" Add run per file ")])),_:1},8,["modelValue"]),pA(N(Yc),{width:"400px"},{default:QA(()=>[pA(N(Pl),{onClick:h[3]||(h[3]=u=>o.isMultiDialogFileOpen=!0)},{default:QA(()=>h[11]||(h[11]=[ie(" Open multiple files to monetize ")])),_:1}),pA(N(Pl),{disabled:!N(e).model.outputs.__mnzInfo,onClick:h[4]||(h[4]=u=>a.value=!0)},{default:QA(()=>h[12]||(h[12]=[ie(" Show mnz info ")])),_:1},8,["disabled"])]),_:1}),(L(!0),q(oe,null,Ri(N(e).model.args.inputHandles,({handle:u},p)=>(L(),fA(N(Yc),{key:p},{default:QA(()=>[pA(N(Op),{modelValue:N(e).model.args.inputHandles[p].fileName,"onUpdate:modelValue":C=>N(e).model.args.inputHandles[p].fileName=C,label:"Type file name"},null,8,["modelValue","onUpdate:modelValue"]),pA(N(Op),{modelValue:N(e).model.args.inputHandles[p].argName,"onUpdate:modelValue":C=>N(e).model.args.inputHandles[p].argName=C,label:"Type argument name"},null,8,["modelValue","onUpdate:modelValue"]),pA(N(ZgA),{"model-value":u,"onUpdate:modelValue":C=>r(C,p)},null,8,["model-value","onUpdate:modelValue"]),pA(N(FlA),{modelValue:N(e).model.args.inputHandles[p].options,"onUpdate:modelValue":C=>N(e).model.args.inputHandles[p].options=C,label:"Metrics to monetize",options:i},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024))),128)),pA(N(Yc),null,{default:QA(()=>[pA(N(Pl),{onClick:h[5]||(h[5]=u=>l.value=!0)},{default:QA(()=>h[13]||(h[13]=[ie(" Show tokens ")])),_:1})]),_:1}),n.value?(L(),fA(N(o4),{key:0,label:"token verification"},{default:QA(()=>[ie(FA(n.value),1)]),_:1})):nA("",!0)]),_:1}),pA(N(c4),{modelValue:o.isMultiDialogFileOpen,"onUpdate:modelValue":h[6]||(h[6]=u=>o.isMultiDialogFileOpen=u),multi:"","onImport:files":s},null,8,["modelValue"]),pA(N(gh),{modelValue:a.value,"onUpdate:modelValue":h[7]||(h[7]=u=>a.value=u),size:"medium"},{title:QA(()=>h[14]||(h[14]=[ie(" Monetization info ")])),default:QA(()=>[pA(N(gB),{value:JSON.stringify(N(e).model.outputs.__mnzInfo,null,2)},null,8,["value"])]),_:1},8,["modelValue"]),pA(N(gh),{modelValue:l.value,"onUpdate:modelValue":h[8]||(h[8]=u=>l.value=u),size:"medium"},{title:QA(()=>h[15]||(h[15]=[ie(" Tokens ")])),default:QA(()=>[pA(N(gB),{value:g.value},null,8,["value"])]),_:1},8,["modelValue"])],64))}}),y4=QsA(LhA,()=>({routes:{"/":()=>zhA}})),OhA=y4.useApp;cS(DdA).use(y4).mount("#app");
|
|
483
|
-
//# sourceMappingURL=index-
|
|
483
|
+
//# sourceMappingURL=index-BffgXBr-.js.map
|