@marimo-team/frontend 0.13.16-dev9 → 0.13.16-dev90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ConnectedDataExplorerComponent-C3CKxT6t.js +19 -0
- package/dist/assets/ImageComparisonComponent-BZlAF50H.js +1 -0
- package/dist/assets/VegaLite-DfkQWvBG.js +189 -0
- package/dist/assets/_baseEach-DzHotN8J.js +1 -0
- package/dist/assets/_baseMap-Cbk2tiUN.js +1 -0
- package/dist/assets/_baseUniq-D75DS3Ds.js +1 -0
- package/dist/assets/_createAggregator-v0xXyec9.js +1 -0
- package/dist/assets/{any-language-editor-C_9bwXGO.js → any-language-editor-BpIA5mlk.js} +2 -2
- package/dist/assets/architectureDiagram-IEHRJDOE-CNg-9_Pb.js +36 -0
- package/dist/assets/{blockDiagram-JOT3LUYC-CL9_24UR.js → blockDiagram-JOT3LUYC-DppnEFHq.js} +2 -2
- package/dist/assets/{c4Diagram-VJAJSXHY-lspTvRhA.js → c4Diagram-VJAJSXHY-n75lmDjc.js} +2 -2
- package/dist/assets/channel-DHCLBugm.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-B9Et-cJ2.js → chunk-4BMEZGHF-lb7YXXe0.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-CFniWUgi.js → chunk-A2AXSNBT-DDxoTDWD.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-BXNGa_dn.js → chunk-AEK57VVT-Bh8F5ayU.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-BcbiUWbM.js → chunk-D6G4REZN-BfQeYkhO.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-CH9NHZ_g.js → chunk-RZ5BOZE2-BZwI6C6y.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-CbdIuTbz.js → chunk-XZIHB7SX-DdG_eQO0.js} +1 -1
- package/dist/assets/{circle-play-D2OGeEbA.js → circle-play-IIOxbHbs.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-EsvkHLSn.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-EsvkHLSn.js +1 -0
- package/dist/assets/clone-Dg5NZ4FD.js +1 -0
- package/dist/assets/compile-SVhOiGI-.js +10 -0
- package/dist/assets/{cytoscape.esm-C5gjFiAL.js → cytoscape.esm-C11VZyMT.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-4OEgTEw0.js → dagre-OKDRZEBW--IMSrJA_.js} +1 -1
- package/dist/assets/{data-editor-B8IDeUNv.js → data-editor-kwjiY7X7.js} +3 -3
- package/dist/assets/{diagram-SSKATNLV-CtBNepMv.js → diagram-SSKATNLV-Cnr8C1O5.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-xU3JGfGi.js → diagram-VNBRO52H-DCeYYGVg.js} +1 -1
- package/dist/assets/edit-page-279SafwO.js +144 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-DjaKJi8R.js → erDiagram-Q7BY3M3F-E0yZU_Zz.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-DODo0DW_.js → flowDiagram-4HSFHLVR-kOITMwbA.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-DJKd6TA8.js → ganttDiagram-APWFNJXF-ChJ35wfz.js} +4 -4
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-wPJTq0nQ.js → gitGraphDiagram-7IBYFJ6S-CORbDxsH.js} +1 -1
- package/dist/assets/{graph-D7JGbee1.js → graph-BzMFdAXl.js} +1 -1
- package/dist/assets/home-page-QE8fJ1ea.js +9 -0
- package/dist/assets/index-BH3Eb9nz.css +1 -0
- package/dist/assets/{index-CnsjP_zo.js → index-BLMsi-qh.js} +1 -1
- package/dist/assets/{index-B4sdWv-q.js → index-BOdyUYuq.js} +1 -1
- package/dist/assets/{index-DWvXlgD4.js → index-BclPIgZK.js} +1 -1
- package/dist/assets/{index-BevR4AJL.js → index-BdOMCMaH.js} +1 -1
- package/dist/assets/{index-BWou89L4.js → index-BgzSBz7I.js} +1 -1
- package/dist/assets/index-Bi9V20Bf.js +499 -0
- package/dist/assets/{index-Cz08J5Kw.js → index-BpG-a9yZ.js} +1 -1
- package/dist/assets/{index-t8_uCLev.js → index-Bv3LYsZz.js} +1 -1
- package/dist/assets/{index-PDtLILTf.js → index-Bymg9Ew9.js} +1 -1
- package/dist/assets/{index-CyZ-lddI.js → index-C18Duh0G.js} +1 -1
- package/dist/assets/{index-FSgg8y_o.js → index-CXBBjseR.js} +1 -1
- package/dist/assets/{index-rS-6z_uh.js → index-CdwZ_wam.js} +1 -1
- package/dist/assets/{index-BZOnbvo6.js → index-Cth-8_OG.js} +1 -1
- package/dist/assets/index-DF1UPHmY.js +1 -0
- package/dist/assets/{index-7mdZEI6m.js → index-DUO33Ccf.js} +1 -1
- package/dist/assets/{index-CQaySdAo.js → index-Ik1fQ4cm.js} +1 -1
- package/dist/assets/{index-CwtUKDh_.js → index-fJM4QWMb.js} +1 -1
- package/dist/assets/index-nnrjBvvA.js +1 -0
- package/dist/assets/{index-C7-ahTqM.js → index-yyt2wDx3.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-Dn9owXzQ.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-PElwvod7.js → journeyDiagram-U35MCT3I-BXVMls38.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-DsqkaJnQ.js → kanban-definition-NDS4AKOZ-BUmC6f8r.js} +1 -1
- package/dist/assets/layout-DrTqbUYQ.js +1 -0
- package/dist/assets/{linear-D1U0b4NY.js → linear-mzwEN9hD.js} +1 -1
- package/dist/assets/{mermaid-DbkPEKV3.js → mermaid-CKfOVvWF.js} +25 -25
- package/dist/assets/min-DBW9KW1Z.js +1 -0
- package/dist/assets/mindmap-definition-ALO5MXBD-BoPbBW1v.js +95 -0
- package/dist/assets/panels-DhdIOflk.js +27 -0
- package/dist/assets/{pieDiagram-IB7DONF6-CJfqnzsn.js → pieDiagram-IB7DONF6-D6GuyEBk.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-UZY6XpHr.js → quadrantDiagram-7GDLP6J5-DaiUOwY1.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-CuZ1ruTv.js → radar-MK3ICKWK-D8BeBA1g.js} +1 -1
- package/dist/assets/{react-plotly-Cfaau_4S.js → react-plotly-BjkR0iXC.js} +20 -20
- package/dist/assets/{requirementDiagram-KVF5MWMF-D4BRdspM.js → requirementDiagram-KVF5MWMF-Bwm7iwTo.js} +1 -1
- package/dist/assets/run-page-CVEDU39O.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DG4ZSfQE.js → sankeyDiagram-QLVOVGJD-BJoJL8lj.js} +1 -1
- package/dist/assets/{save-worker-CULn6QYm.js → save-worker-DtAsG4LO.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-BrlF-mUd.js → sequenceDiagram-X6HHIX6F-s-9u-nqn.js} +1 -1
- package/dist/assets/slides-component-DxAToToM.js +1 -0
- package/dist/assets/sortBy-BNIMnJFM.js +1 -0
- package/dist/assets/{stateDiagram-DGXRK772-C3lsMUKj.js → stateDiagram-DGXRK772-cWgIiegQ.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-DqIFIeDL.js +1 -0
- package/dist/assets/{terminal-BndrgHug.js → terminal-DlWVobFm.js} +5 -5
- package/dist/assets/{time-KDvJykag.js → time-CiNi82XJ.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-BVlS5McA.js → timeline-definition-BDJGKUSR-BYTrwjsh.js} +1 -1
- package/dist/assets/tracing-_5kKZm2z.js +2 -0
- package/dist/assets/{transform-Cyp0GDF-.js → transform-C4Tsj3kK.js} +1 -1
- package/dist/assets/tree-CLKx-N1b.js +17 -0
- package/dist/assets/vega-component-igFAz5Km.js +1 -0
- package/dist/assets/worker-DIeMFpcF.js +1 -0
- package/dist/assets/{worker-DsmMBHp1.js → worker-s2VOegFx.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-CFzyjXtl.js → xychartDiagram-VJFVF3MP-CslidRSs.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +25 -25
- package/dist/assets/ConnectedDataExplorerComponent-8OD1FdwV.js +0 -19
- package/dist/assets/VegaLite-CJ8ZZtWw.js +0 -189
- package/dist/assets/_baseEach-CJ7W4uUC.js +0 -1
- package/dist/assets/_baseMap-BV79rs_r.js +0 -1
- package/dist/assets/_baseUniq-Dzv6EahL.js +0 -1
- package/dist/assets/_createAggregator-CeUblBAd.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-DOGGGbMB.js +0 -36
- package/dist/assets/channel-D_odheAy.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-By-StMx6.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-By-StMx6.js +0 -1
- package/dist/assets/clone-fasN-xjz.js +0 -1
- package/dist/assets/compile-CRFg54ds.js +0 -10
- package/dist/assets/edit-page-BWupK_nr.js +0 -135
- package/dist/assets/home-page-Bf7NziFk.js +0 -9
- package/dist/assets/index-BqXWXM9d.css +0 -1
- package/dist/assets/index-D49WHb9g.js +0 -1
- package/dist/assets/index-WoeVJRsJ.js +0 -1
- package/dist/assets/index-eQwJLzCo.js +0 -498
- package/dist/assets/infoDiagram-PH2N3AL5-B0_iy_sQ.js +0 -2
- package/dist/assets/layout-Cj0BMe86.js +0 -1
- package/dist/assets/min-Ba8RlknH.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-mpSrn2Pq.js +0 -95
- package/dist/assets/panels-CDGX6_Mp.js +0 -27
- package/dist/assets/run-page-5JsxsuAg.js +0 -1
- package/dist/assets/slides-component-DBLXmbc-.js +0 -1
- package/dist/assets/sortBy-Bn6QyK6h.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-DjututGt.js +0 -1
- package/dist/assets/tracing-BJ-bXyI2.js +0 -2
- package/dist/assets/tree-C9afVSOF.js +0 -17
- package/dist/assets/vega-component-BH5oj_3J.js +0 -1
- package/dist/assets/worker-C9vrNVln.js +0 -1
- /package/dist/assets/{timer-DFzT7np-.js → timer-BI-lUAZ7.js} +0 -0
@@ -1 +1 @@
|
|
1
|
-
function e(e){return e.FS}const t=()=>{},n=(e,t)=>{const r=`[${e}]`;return{debug:(...e)=>t.debug(r,...e),log:(...e)=>t.log(r,...e),warn:(...e)=>t.warn(r,...e),error:(...e)=>t.error(r,...e),trace:(...e)=>t.trace(r,...e),get:r=>n(`${e}.${r}`,t),disabled:(e=!0)=>e?a:t}},r={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>n(e,r),disabled:(e=!0)=>e?a:r},a={debug:()=>t,log:()=>t,warn:()=>t,error:()=>t,trace:()=>t,get:()=>a,disabled:()=>a};const s="undefined"!=typeof window&&window.Logger||r,i=e=>(new TextDecoder).decode(e),o="notebook.py",d="/marimo",c=o,u=t=>{const n=e(t);try{n.mkdirTree(d)}catch{}n.chdir(d)},l=t=>{e(t).mount(t.FS.filesystems.IDBFS,{root:"."},d)},p=async e=>{await f(e,!0)},h=async e=>{await f(e,!1)},m=t=>{const{pyodide:n,filename:r,code:a}=t,s=e(n);if(r&&r!==o){const e=(e=>{try{return i(s.readFile(e))}catch{return null}})(r);if(e)return{code:e,filename:r}}return s.writeFile(o,a),{code:a,filename:o}};function f(t,n){return new Promise(((r,a)=>{e(t).syncfs(n,(e=>{e instanceof Error?a(e):r()}))}))}var y,g;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(y||(y={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(g||(g={}));const v=y.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_=e=>{switch(typeof e){case"undefined":return v.undefined;case"string":return v.string;case"number":return isNaN(e)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":return Array.isArray(e)?v.array:null===e?v.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?v.promise:"undefined"!=typeof Map&&e instanceof Map?v.map:"undefined"!=typeof Set&&e instanceof Set?v.set:"undefined"!=typeof Date&&e instanceof Date?v.date:v.object;default:return v.unknown}},w=y.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"]);class b extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof b))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,y.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}b.create=e=>new b(e);const k=(e,t)=>{let n;switch(e.code){case w.invalid_type:n=e.received===v.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,y.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:n=`Unrecognized key(s) in object: ${y.joinValues(e.keys,", ")}`;break;case w.invalid_union:n="Invalid input";break;case w.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${y.joinValues(e.options)}`;break;case w.invalid_enum_value:n=`Invalid enum value. Expected ${y.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:n="Invalid function arguments";break;case w.invalid_return_type:n="Invalid function return type";break;case w.invalid_date:n="Invalid date";break;case w.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:y.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case w.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case w.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case w.custom:n="Invalid input";break;case w.invalid_intersection_types:n="Intersection results could not be merged";break;case w.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:n="Number must be finite";break;default:n=t.defaultError,y.assertNever(e)}return{message:n}};let x=k;function S(){return x}const T=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function E(e,t){const n=S(),r=T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===k?void 0:k].filter((e=>!!e))});e.common.issues.push(r)}class O{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return Z;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return O.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return Z;if("aborted"===a.status)return Z;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const Z=Object.freeze({status:"aborted"}),N=e=>({status:"dirty",value:e}),j=e=>({status:"valid",value:e}),P=e=>"aborted"===e.status,A=e=>"dirty"===e.status,C=e=>"valid"===e.status,I=e=>"undefined"!=typeof Promise&&e instanceof Promise;function R(e,t,n,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function F(e,t,n,r,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $,M,L;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}($||($={}));class D{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}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 z=(e,t)=>{if(C(t))return{success:!0,data:t.value};if(!e.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 b(e.common.issues);return this._error=t,this._error}}};function U(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class q{get description(){return this._def.description}_getType(e){return _(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(I(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 n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},a=this._parseSync({data:e,path:r.path,parent:r});return z(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return C(t)?{value:t.value}:{issues:r.common.issues}}catch(a){(null===(n=null===(t=null==a?void 0:a.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>C(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(I(r)?r:Promise.resolve(r));return z(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:w.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new qe({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}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),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ve.create(this,this._def)}nullable(){return He.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Ue.create(this,this._def)}or(e){return Oe.create([this,e],this._def)}and(e){return Pe.create(this,e,this._def)}transform(e){return new qe({...U(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Be({...U(this._def),innerType:this,defaultValue:t,typeName:nt.ZodDefault})}brand(){return new Ye({typeName:nt.ZodBranded,type:this,...U(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new We({...U(this._def),innerType:this,catchValue:t,typeName:nt.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return Xe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const V=/^c[^\s-]{8,}$/i,H=/^[0-9a-z]+$/,B=/^[0-9A-HJKMNP-TV-Z]{26}$/i,W=/^[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,K=/^[a-z0-9_-]{21}$/i,J=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Y=/^[-+]?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)?)??$/,G=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let X;const Q=/^(?:(?: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])$/,ee=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,te=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,re=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,se="((\\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])))",ie=new RegExp(`^${se}$`);function oe(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function de(e){let t=`${se}T${oe(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ce(e,t){if(!J.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(n){return!1}}function ue(e,t){return!("v4"!==t&&t||!ee.test(e))||!("v6"!==t&&t||!ne.test(e))}class le extends q{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==v.string){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.string,received:t.parsedType}),Z}const t=new O;let n;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?E(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(n,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)G.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"email",code:w.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)X||(X=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),X.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"emoji",code:w.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)W.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"uuid",code:w.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)K.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"nanoid",code:w.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)V.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cuid",code:w.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)H.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cuid2",code:w.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)B.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"ulid",code:w.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(s){n=this._getOrReturnCtx(e,n),E(n,{validation:"url",code:w.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"regex",code:w.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){de(i).test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else if("date"===i.kind){ie.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"date",message:i.message}),t.dirty())}else if("time"===i.kind){new RegExp(`^${oe(i)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"time",message:i.message}),t.dirty())}else"duration"===i.kind?Y.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"duration",code:w.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(r=e.data,("v4"!==(a=i.version)&&a||!Q.test(r))&&("v6"!==a&&a||!te.test(r))&&(n=this._getOrReturnCtx(e,n),E(n,{validation:"ip",code:w.invalid_string,message:i.message}),t.dirty())):"jwt"===i.kind?ce(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"jwt",code:w.invalid_string,message:i.message}),t.dirty()):"cidr"===i.kind?ue(e.data,i.version)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cidr",code:w.invalid_string,message:i.message}),t.dirty()):"base64"===i.kind?re.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"base64",code:w.invalid_string,message:i.message}),t.dirty()):"base64url"===i.kind?ae.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"base64url",code:w.invalid_string,message:i.message}),t.dirty()):y.assertNever(i);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:w.invalid_string,...$.errToObj(n)})}_addCheck(e){return new le({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...$.errToObj(e)})}url(e){return this._addCheck({kind:"url",...$.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...$.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...$.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...$.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...$.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...$.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...$.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...$.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...$.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...$.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...$.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...$.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...$.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...$.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...$.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new le({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new le({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new le({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function pe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}le.create=e=>{var t;return new le({checks:[],typeName:nt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...U(e)})};class he extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==v.number){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.number,received:t.parsedType}),Z}let t;const n=new O;for(const r of this._def.checks)if("int"===r.kind)y.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==pe(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_finite,message:r.message}),n.dirty()):y.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new he({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new he({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:$.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:$.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&y.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}he.create=e=>new he({checks:[],typeName:nt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...U(e)});class me extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(r){return this._getInvalidInput(e)}if(this._getType(e)!==v.bigint)return this._getInvalidInput(e);let t;const n=new O;for(const a of this._def.checks)if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):y.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.bigint,received:t.parsedType}),Z}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new me({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new me({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}me.create=e=>{var t;return new me({checks:[],typeName:nt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...U(e)})};class fe extends q{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==v.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.boolean,received:t.parsedType}),Z}return j(e.data)}}fe.create=e=>new fe({typeName:nt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...U(e)});class ye extends q{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==v.date){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.date,received:t.parsedType}),Z}if(isNaN(e.data.getTime())){return E(this._getOrReturnCtx(e),{code:w.invalid_date}),Z}const t=new O;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):y.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ye({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ye.create=e=>new ye({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:nt.ZodDate,...U(e)});class ge extends q{_parse(e){if(this._getType(e)!==v.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.symbol,received:t.parsedType}),Z}return j(e.data)}}ge.create=e=>new ge({typeName:nt.ZodSymbol,...U(e)});class ve extends q{_parse(e){if(this._getType(e)!==v.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.undefined,received:t.parsedType}),Z}return j(e.data)}}ve.create=e=>new ve({typeName:nt.ZodUndefined,...U(e)});class _e extends q{_parse(e){if(this._getType(e)!==v.null){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.null,received:t.parsedType}),Z}return j(e.data)}}_e.create=e=>new _e({typeName:nt.ZodNull,...U(e)});class we extends q{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}we.create=e=>new we({typeName:nt.ZodAny,...U(e)});class be extends q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}be.create=e=>new be({typeName:nt.ZodUnknown,...U(e)});class ke extends q{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.never,received:t.parsedType}),Z}}ke.create=e=>new ke({typeName:nt.ZodNever,...U(e)});class xe extends q{_parse(e){if(this._getType(e)!==v.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.void,received:t.parsedType}),Z}return j(e.data)}}xe.create=e=>new xe({typeName:nt.ZodVoid,...U(e)});class Se extends q{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==v.array)return E(t,{code:w.invalid_type,expected:v.array,received:t.parsedType}),Z;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(E(t,{code:e?w.too_big:w.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(E(t,{code:w.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(E(t,{code:w.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new D(t,e,t.path,n))))).then((e=>O.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new D(t,e,t.path,n))));return O.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new Se({...this._def,minLength:{value:e,message:$.toString(t)}})}max(e,t){return new Se({...this._def,maxLength:{value:e,message:$.toString(t)}})}length(e,t){return new Se({...this._def,exactLength:{value:e,message:$.toString(t)}})}nonempty(e){return this.min(1,e)}}function Te(e){if(e instanceof Ee){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ve.create(Te(r))}return new Ee({...e._def,shape:()=>t})}return e instanceof Se?new Se({...e._def,type:Te(e.element)}):e instanceof Ve?Ve.create(Te(e.unwrap())):e instanceof He?He.create(Te(e.unwrap())):e instanceof Ae?Ae.create(e.items.map((e=>Te(e)))):e}Se.create=(e,t)=>new Se({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...U(t)});class Ee extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=y.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==v.object){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.object,received:t.parsedType}),Z}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ke&&"strip"===this._def.unknownKeys))for(const o in n.data)a.includes(o)||s.push(o);const i=[];for(const o of a){const e=r[o],t=n.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new D(n,t,n.path,o)),alwaysSet:o in n.data})}if(this._def.catchall instanceof ke){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of s)i.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)s.length>0&&(E(n,{code:w.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new D(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>O.mergeObjectSync(t,e))):O.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return $.errToObj,new Ee({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=$.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new Ee({...this._def,unknownKeys:"strip"})}passthrough(){return new Ee({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ee({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ee({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:nt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ee({...this._def,catchall:e})}pick(e){const t={};return y.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new Ee({...this._def,shape:()=>t})}omit(e){const t={};return y.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new Ee({...this._def,shape:()=>t})}deepPartial(){return Te(this)}partial(e){const t={};return y.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new Ee({...this._def,shape:()=>t})}required(e){const t={};return y.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ve;)e=e._def.innerType;t[n]=e}})),new Ee({...this._def,shape:()=>t})}keyof(){return Le(y.objectKeys(this.shape))}}Ee.create=(e,t)=>new Ee({shape:()=>e,unknownKeys:"strip",catchall:ke.create(),typeName:nt.ZodObject,...U(t)}),Ee.strictCreate=(e,t)=>new Ee({shape:()=>e,unknownKeys:"strict",catchall:ke.create(),typeName:nt.ZodObject,...U(t)}),Ee.lazycreate=(e,t)=>new Ee({shape:e,unknownKeys:"strip",catchall:ke.create(),typeName:nt.ZodObject,...U(t)});class Oe extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new b(e.ctx.common.issues)));return E(t,{code:w.invalid_union,unionErrors:n}),Z}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new b(e)));return E(t,{code:w.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}}Oe.create=(e,t)=>new Oe({options:e,typeName:nt.ZodUnion,...U(t)});const Ze=e=>e instanceof $e?Ze(e.schema):e instanceof qe?Ze(e.innerType()):e instanceof Me?[e.value]:e instanceof De?e.options:e instanceof ze?y.objectValues(e.enum):e instanceof Be?Ze(e._def.innerType):e instanceof ve?[void 0]:e instanceof _e?[null]:e instanceof Ve?[void 0,...Ze(e.unwrap())]:e instanceof He?[null,...Ze(e.unwrap())]:e instanceof Ye||e instanceof Xe?Ze(e.unwrap()):e instanceof We?Ze(e._def.innerType):[];class Ne extends q{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.object)return E(t,{code:w.invalid_type,expected:v.object,received:t.parsedType}),Z;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(E(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const t=Ze(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,a)}}return new Ne({typeName:nt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...U(n)})}}function je(e,t){const n=_(e),r=_(t);if(e===t)return{valid:!0,data:e};if(n===v.object&&r===v.object){const n=y.objectKeys(t),r=y.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const s of r){const n=je(e[s],t[s]);if(!n.valid)return{valid:!1};a[s]=n.data}return{valid:!0,data:a}}if(n===v.array&&r===v.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=je(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===v.date&&r===v.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Pe extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(P(e)||P(r))return Z;const a=je(e.value,r.value);return a.valid?((A(e)||A(r))&&t.dirty(),{status:t.value,value:a.data}):(E(n,{code:w.invalid_intersection_types}),Z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Pe.create=(e,t,n)=>new Pe({left:e,right:t,typeName:nt.ZodIntersection,...U(n)});class Ae extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.array)return E(n,{code:w.invalid_type,expected:v.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new D(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>O.mergeArray(t,e))):O.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Ae({...this._def,rest:e})}}Ae.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ae({items:e,typeName:nt.ZodTuple,rest:null,...U(t)})};class Ce extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.object)return E(n,{code:w.invalid_type,expected:v.object,received:n.parsedType}),Z;const r=[],a=this._def.keyType,s=this._def.valueType;for(const i in n.data)r.push({key:a._parse(new D(n,i,n.path,i)),value:s._parse(new D(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?O.mergeObjectAsync(t,r):O.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Ce(t instanceof q?{keyType:e,valueType:t,typeName:nt.ZodRecord,...U(n)}:{keyType:le.create(),valueType:e,typeName:nt.ZodRecord,...U(t)})}}class Ie extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.map)return E(n,{code:w.invalid_type,expected:v.map,received:n.parsedType}),Z;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new D(n,e,n.path,[s,"key"])),value:a._parse(new D(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return Z;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return Z;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}Ie.create=(e,t,n)=>new Ie({valueType:t,keyType:e,typeName:nt.ZodMap,...U(n)});class Re extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.set)return E(n,{code:w.invalid_type,expected:v.set,received:n.parsedType}),Z;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(E(n,{code:w.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(E(n,{code:w.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return Z;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new D(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new Re({...this._def,minSize:{value:e,message:$.toString(t)}})}max(e,t){return new Re({...this._def,maxSize:{value:e,message:$.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Re.create=(e,t)=>new Re({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...U(t)});class Fe extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.function)return E(t,{code:w.invalid_type,expected:v.function,received:t.parsedType}),Z;function n(e,n){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter((e=>!!e)),issueData:{code:w.invalid_arguments,argumentsError:n}})}function r(e,n){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter((e=>!!e)),issueData:{code:w.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ue){const e=this;return j((async function(...t){const i=new b([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch((e=>{throw i.addIssue(r(d,e)),i}))}))}{const e=this;return j((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new b([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new b([r(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Fe({...this._def,args:Ae.create(e).rest(be.create())})}returns(e){return new Fe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Fe({args:e||Ae.create([]).rest(be.create()),returns:t||be.create(),typeName:nt.ZodFunction,...U(n)})}}class $e extends q{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})}}$e.create=(e,t)=>new $e({getter:e,typeName:nt.ZodLazy,...U(t)});class Me extends q{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Le(e,t){return new De({values:e,typeName:nt.ZodEnum,...U(t)})}Me.create=(e,t)=>new Me({value:e,typeName:nt.ZodLiteral,...U(t)});class De extends q{constructor(){super(...arguments),M.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return E(t,{expected:y.joinValues(n),received:t.parsedType,code:w.invalid_type}),Z}if(R(this,M)||F(this,M,new Set(this._def.values)),!R(this,M).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return E(t,{received:t.data,code:w.invalid_enum_value,options:n}),Z}return j(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 De.create(e,{...this._def,...t})}exclude(e,t=this._def){return De.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}M=new WeakMap,De.create=Le;class ze extends q{constructor(){super(...arguments),L.set(this,void 0)}_parse(e){const t=y.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==v.string&&n.parsedType!==v.number){const e=y.objectValues(t);return E(n,{expected:y.joinValues(e),received:n.parsedType,code:w.invalid_type}),Z}if(R(this,L)||F(this,L,new Set(y.getValidEnumValues(this._def.values))),!R(this,L).has(e.data)){const e=y.objectValues(t);return E(n,{received:n.data,code:w.invalid_enum_value,options:e}),Z}return j(e.data)}get enum(){return this._def.values}}L=new WeakMap,ze.create=(e,t)=>new ze({values:e,typeName:nt.ZodNativeEnum,...U(t)});class Ue extends q{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.promise&&!1===t.common.async)return E(t,{code:w.invalid_type,expected:v.promise,received:t.parsedType}),Z;const n=t.parsedType===v.promise?t.data:Promise.resolve(t.data);return j(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ue.create=(e,t)=>new Ue({type:e,typeName:nt.ZodPromise,...U(t)});class qe extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{E(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return Z;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?Z:"dirty"===r.status||"dirty"===t.value?N(r.value):r}));{if("aborted"===t.value)return Z;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?Z:"dirty"===r.status||"dirty"===t.value?N(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?Z:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Z:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!C(e))return e;const s=r.transform(e.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>C(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}y.assertNever(r)}}qe.create=(e,t,n)=>new qe({schema:e,typeName:nt.ZodEffects,effect:t,...U(n)}),qe.createWithPreprocess=(e,t,n)=>new qe({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...U(n)});class Ve extends q{_parse(e){return this._getType(e)===v.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ve.create=(e,t)=>new Ve({innerType:e,typeName:nt.ZodOptional,...U(t)});class He extends q{_parse(e){return this._getType(e)===v.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}He.create=(e,t)=>new He({innerType:e,typeName:nt.ZodNullable,...U(t)});class Be extends q{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===v.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Be.create=(e,t)=>new Be({innerType:e,typeName:nt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...U(t)});class We extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return I(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new b(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new b(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}We.create=(e,t)=>new We({innerType:e,typeName:nt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...U(t)});class Ke extends q{_parse(e){if(this._getType(e)!==v.nan){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.nan,received:t.parsedType}),Z}return{status:"valid",value:e.data}}}Ke.create=e=>new Ke({typeName:nt.ZodNaN,...U(e)});const Je=Symbol("zod_brand");class Ye extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ge extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Z:"dirty"===e.status?(t.dirty(),N(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Z:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Ge({in:e,out:t,typeName:nt.ZodPipeline})}}class Xe extends q{_parse(e){const t=this._def.innerType._parse(e),n=e=>(C(e)&&(e.value=Object.freeze(e.value)),e);return I(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Qe(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function et(e,t={},n){return e?we.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Qe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Qe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):we.create()}Xe.create=(e,t)=>new Xe({innerType:e,typeName:nt.ZodReadonly,...U(t)});const tt={object:Ee.lazycreate};var nt;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(nt||(nt={}));const rt=le.create,at=he.create,st=Ke.create,it=me.create,ot=fe.create,dt=ye.create,ct=ge.create,ut=ve.create,lt=_e.create,pt=we.create,ht=be.create,mt=ke.create,ft=xe.create,yt=Se.create,gt=Ee.create,vt=Ee.strictCreate,_t=Oe.create,wt=Ne.create,bt=Pe.create,kt=Ae.create,xt=Ce.create,St=Ie.create,Tt=Re.create,Et=Fe.create,Ot=$e.create,Zt=Me.create,Nt=De.create,jt=ze.create,Pt=Ue.create,At=qe.create,Ct=Ve.create,It=He.create,Rt=qe.createWithPreprocess,Ft=Ge.create,$t={string:e=>le.create({...e,coerce:!0}),number:e=>he.create({...e,coerce:!0}),boolean:e=>fe.create({...e,coerce:!0}),bigint:e=>me.create({...e,coerce:!0}),date:e=>ye.create({...e,coerce:!0})},Mt=Z;var Lt=Object.freeze({__proto__:null,defaultErrorMap:k,setErrorMap:function(e){x=e},getErrorMap:S,makeIssue:T,EMPTY_PATH:[],addIssueToContext:E,ParseStatus:O,INVALID:Z,DIRTY:N,OK:j,isAborted:P,isDirty:A,isValid:C,isAsync:I,get util(){return y},get objectUtil(){return g},ZodParsedType:v,getParsedType:_,ZodType:q,datetimeRegex:de,ZodString:le,ZodNumber:he,ZodBigInt:me,ZodBoolean:fe,ZodDate:ye,ZodSymbol:ge,ZodUndefined:ve,ZodNull:_e,ZodAny:we,ZodUnknown:be,ZodNever:ke,ZodVoid:xe,ZodArray:Se,ZodObject:Ee,ZodUnion:Oe,ZodDiscriminatedUnion:Ne,ZodIntersection:Pe,ZodTuple:Ae,ZodRecord:Ce,ZodMap:Ie,ZodSet:Re,ZodFunction:Fe,ZodLazy:$e,ZodLiteral:Me,ZodEnum:De,ZodNativeEnum:ze,ZodPromise:Ue,ZodEffects:qe,ZodTransformer:qe,ZodOptional:Ve,ZodNullable:He,ZodDefault:Be,ZodCatch:We,ZodNaN:Ke,BRAND:Je,ZodBranded:Ye,ZodPipeline:Ge,ZodReadonly:Xe,custom:et,Schema:q,ZodSchema:q,late:tt,get ZodFirstPartyTypeKind(){return nt},coerce:$t,any:pt,array:yt,bigint:it,boolean:ot,date:dt,discriminatedUnion:wt,effect:At,enum:Nt,function:Et,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>et((t=>t instanceof e),t),intersection:bt,lazy:Ot,literal:Zt,map:St,nan:st,nativeEnum:jt,never:mt,null:lt,nullable:It,number:at,object:gt,oboolean:()=>ot().optional(),onumber:()=>at().optional(),optional:Ct,ostring:()=>rt().optional(),pipeline:Ft,preprocess:Rt,promise:Pt,record:xt,set:Tt,strictObject:vt,string:rt,symbol:ct,transformer:At,tuple:kt,undefined:ut,union:_t,unknown:ht,void:ft,NEVER:Mt,ZodIssueCode:w,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:b});const Dt=Lt.object({detail:Lt.string()}),zt=Lt.object({error:Lt.string()});function Ut(e){if(!e)return"Unknown error";if(e instanceof Error){const t=Dt.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=Dt.safeParse(t);if(n.success)return n.data.detail;const r=zt.safeParse(t);if(r.success)return r.data.error;return e}(e.message)}if("object"==typeof e){const t=Dt.safeParse(e);if(t.success)return t.data.detail;const n=zt.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}const qt=1e3;function Vt(e,t){const n=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function Ht(e={}){let t={};function n(e){t=e}let r,a={};function s(e){a.unregisterHandler&&a.unregisterHandler(),a=e,a.registerHandler?.(_)}function i(e){r="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,n)}:e}const{maxRequestTime:o=qt}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&n(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...n){const r=n[0];return new Promise(((n,s)=>{if(!a.send)throw Vt(["send"],"make requests");const i=d<=1e10?++d:d=0,l={type:"request",id:i,method:e,params:r};c.set(i,{resolve:n,reject:s}),o!==1/0&&u.set(i,setTimeout((()=>{u.delete(i),s(new Error("RPC request timed out."))}),o)),t.onSend?.(l),a.send(l)}))}const p=new Proxy(l,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>l(t,e)}),h=p;function m(e,...n){const r=n[0];if(!a.send)throw Vt(["send"],"send messages");const s={type:"message",id:e,payload:r};t.onSend?.(s),a.send(s)}const f=new Proxy(m,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>m(t,e)}),y=f,g=new Map,v=new Set;async function _(e){if(t.onReceive?.(e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!r)throw Vt(["send","requestHandler"],"handle requests");const{id:s,method:i,params:o}=e;let d;try{d={type:"response",id:s,success:!0,payload:await r(i,o)}}catch(n){if(!(n instanceof Error))throw n;d={type:"response",id:s,success:!1,error:n.message}}return t.onSend?.(d),void a.send(d)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const n of v)n(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const n of t)n(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=c.get(e.id)??{};e.success?n?.(e.payload):r?.(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:f,sendProxy:y,addMessageListener:function(e,t){if(!a.registerHandler)throw Vt(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),g.get(e)?.add(t)):v.add(t)},removeMessageListener:function(e,t){"*"!==e?(g.get(e)?.delete(t),0===g.get(e)?.size&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:n}}const Bt="[transport-id]";function Wt(e,t={}){const{transportId:n,filter:r,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[Bt]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:n,filter:r}=t,a=r?.();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(n){if(e[Bt]!==n)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:n,filter:()=>r?.(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}function Kt(e,t){if(!e)throw new Error(t)}var Jt,Yt=Object.defineProperty,Gt=(e,t)=>Yt(e,"name",{value:t,configurable:!0}),Xt=(Jt=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Jt,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):Jt);function Qt(e){return!isNaN(parseFloat(e))&&isFinite(e)}function en(e){return e.charAt(0).toUpperCase()+e.substring(1)}function tn(e){return function(){return this[e]}}Gt(Qt,"_isNumber"),Gt(en,"_capitalize"),Gt(tn,"_getter");var nn,rn,an=["isConstructor","isEval","isNative","isToplevel"],sn=["columnNumber","lineNumber"],on=["fileName","functionName","source"],dn=an.concat(sn,on,["args"],["evalOrigin"]);function cn(e){if(e)for(var t=0;t<dn.length;t++)void 0!==e[dn[t]]&&this["set"+en(dn[t])](e[dn[t]])}for(Gt(cn,"StackFrame"),cn.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof cn)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new cn(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},cn.fromString=Gt((function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),a=e.substring(t+1,n).split(","),s=e.substring(n+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new cn({functionName:r,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),nn=0;nn<an.length;nn++)cn.prototype["get"+en(an[nn])]=tn(an[nn]),cn.prototype["set"+en(an[nn])]=function(e){return function(t){this[e]=!!t}}(an[nn]);for(rn=0;rn<sn.length;rn++)cn.prototype["get"+en(sn[rn])]=tn(sn[rn]),cn.prototype["set"+en(sn[rn])]=function(e){return function(t){if(!Qt(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(sn[rn]);for(un=0;un<on.length;un++)cn.prototype["get"+en(on[un])]=tn(on[un]),cn.prototype["set"+en(on[un])]=function(e){return function(t){this[e]=String(t)}}(on[un]);var un,ln=cn;function pn(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Gt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Gt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Gt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),a=n&&t||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new ln({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Gt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new ln({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,a=this.extractLocation(e.replace(t,""));return new ln({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Gt(pn,"ErrorStackParser");var hn,mn,fn,yn,gn,vn,_n,wn,bn,kn=new pn,xn="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,Sn=xn&&typeof module<"u"&&typeof module.exports<"u"&&typeof Xt<"u"&&typeof __dirname<"u",Tn=xn&&!Sn,En=typeof Deno<"u",On=!xn&&!En,Zn=On&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,Nn=On&&"function"==typeof importScripts&&"object"==typeof self;async function jn(){if(!xn||(hn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,yn=await import("./__vite-browser-external-CIEyP2s7.js"),gn=await import("./__vite-browser-external-CIEyP2s7.js"),fn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,mn=await import("./__vite-browser-external-CIEyP2s7.js"),_n=mn.sep,typeof Xt<"u"))return;let e={fs:yn,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function Pn(e,t){return mn.resolve(t||".",e)}function An(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function Cn(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:gn.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function In(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function Rn(e,t){let{response:n,binary:r}=wn(e,t);if(r)return r;let a=await n;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Gt(jn,"initNodeModules"),Gt(Pn,"node_resolvePath"),Gt(An,"browser_resolvePath"),vn=xn?Pn:An,xn||(_n="/"),Gt(Cn,"node_getBinaryResponse"),Gt(In,"browser_getBinaryResponse"),wn=xn?Cn:In,Gt(Rn,"loadBinaryFile"),Zn)bn=Gt((async e=>await import(e)),"loadScript");else if(Nn)bn=Gt((async e=>{try{globalThis.importScripts(e)}catch(Yn){if(!(Yn instanceof TypeError))throw Yn;await import(e)}}),"loadScript");else{if(!xn)throw new Error("Cannot determine runtime environment");bn=Fn}async function Fn(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?fn.runInThisContext(await(await fetch(e)).text()):await import(hn.pathToFileURL(e).href)}async function $n(e){if(xn){await jn();let t=await gn.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function Mn(){if(Sn)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=kn.parse(e)[0].fileName;if(xn&&!t.startsWith("file://")&&(t=`file://${t}`),Tn){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(_n);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Ln(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:r,o=t?r:s;await a.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>r.join2(e,t)}Gt(a,"isRealDir"),Gt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Dn(e.opts.fileSystemHandle);for(let[s,i]of n)"."!==s&&(t[r.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:a.mtime,mode:a.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,a)=>{let s=e.get(r.dirname(n)),i=t.isFile(a.mode)?await s.getFileHandle(r.basename(n),{create:!0}):await s.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,s)=>{let i=0,o=[];Object.keys(n.entries).forEach((function(e){let r=n.entries[e],a=s.entries[e];(!a||t.isFile(r.mode)&&r.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){n.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:s.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(n),r=await a.loadRemoteEntry(e);a.storeLocalEntry(t,r)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Gt(Fn,"nodeLoadScript"),Gt($n,"loadLockFile"),Gt(Mn,"calculateDirname"),Gt(Ln,"initializeNativeFS");var Dn=Gt((async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}Gt(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");r.set(t,a)}return r}),"getFsHandles");function zn(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Bn(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Wn(e.indexURL)};return t}function Un(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function qn(e){return function(t){Object.assign(t.ENV,e)}}function Vn(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function Hn(e){let t=Rn(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let a=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,a)}catch(a){console.error("Error occurred while installing the standard library:"),console.error(a)}finally{e.removeRunDependency("install-stdlib")}}}function Bn(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Vn(e.fsInit),Hn(t),Un(e.env.HOME),qn(e.env),Ln]}function Wn(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=wn(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let a;a=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;r(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Gt(zn,"createSettings"),Gt(Un,"createHomeDirectory"),Gt(qn,"setEnvironment"),Gt(Vn,"callFsInitHook"),Gt(Hn,"installStdlib"),Gt(Bn,"getFileSystemInitializationFuncs"),Gt(Wn,"getInstantiateWasmFunc");var Kn="0.27.5";async function Jn(e={}){var t,n;await jn();let r=e.indexURL||await Mn();r=vn(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(n=s.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=zn(s),d=o.API;if(d.lockFilePromise=$n(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await bn(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==Kn&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${Kn}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}Gt(Jn,"loadPyodide");const Yn=new class{constructor(){this.spans=[]}startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(a){throw this.endSpan(r,"error"),a}}wrapAsync(e,t,n={}){return async(...r)=>{const a=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Yn;class Gn{constructor(){this.pyodide=null}get requirePyodide(){return Kt(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Jn)throw new Error("loadPyodide is not defined");const t=Yn.startSpan("loadPyodide");try{const n=await Jn({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:false,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(n){throw s.error("Failed to load Pyodide",n),n}}async mountFilesystem(e){const t=Yn.startSpan("mountFilesystem");return u(this.requirePyodide),l(this.requirePyodide),await p(this.requirePyodide),t.end("ok"),m({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:a,userConfig:s}=e;self.messenger={callback:r},self.query_params=a,self.user_config=s;const i=Yn.startSpan("startSession.runPython"),o=n||c,[d,u,l]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const p=new Set(l.toJs());return this.loadNotebookDeps(t,p).then((()=>u(s.runtime.auto_instantiate))),d}async loadNotebookDeps(e,t){const n=this.requirePyodide;e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),e=`import pyodide_http\n${e=`import jedi\n${e=`import pygments\n${e=`import docutils\n${e}`}`}`}`;const r=[...t];let a=Yn.startSpan("pyodide.loadPackage");await n.loadPackagesFromImports(e,{errorCallback:s.error,messageCallback:s.log}),a.end(),a=Yn.startSpan("micropip.install");const i=r.filter((e=>!n.loadedPackages[e]));i.length>0&&await n.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(i)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{s.error("Failed to load packages from micropip",e)})),a.end()}}async function Xn(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Gn}}const Qn=Yn.startSpan("worker:init");const er=new class{constructor(e){this.onMessage=e,this.started=!1,this.push=e=>{this.started?this.onMessage(e):this.buffer.push(e)},this.start=()=>{this.started=!0,this.buffer.forEach((e=>this.onMessage(e))),this.buffer=[]},this.buffer=[]}}((e=>{ar.send.kernelMessage({message:e})})),tr=new class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.reject=e=>{this.status="rejected",t(e)},this.resolve=t=>{this.status="resolved",e(t)}}))}};let nr=!1;const rr={startSession:async e=>{if(await or,nr)s.warn("Session already started");else{nr=!0;try{Kt(self.controller,"Controller not loaded"),await(self.controller.mountFilesystem?.({code:e.code,filename:e.filename}));const t=Yn.wrapAsync(self.controller.startSession.bind(self.controller)),n=function(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}((()=>{ar.send.initializingMessage({message:"Initializing notebook..."}),ar.send.initialized({})}));ar.send.initializingMessage({message:"Loading notebook and dependencies..."});const r=await t({code:e.code,filename:e.filename,queryParameters:e.queryParameters,userConfig:e.userConfig,onMessage:e=>{n(),er.push(e)}});tr.resolve(r),Qn.end("ok")}catch(t){ar.send.initializedError({error:Ut(t)}),Qn.end("error")}}},loadPackages:async e=>{const t=Yn.startSpan("loadPackages");await or,e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),await self.pyodide.loadPackagesFromImports(e,{messageCallback:s.log,errorCallback:s.error}),t.end()},readFile:async e=>{const t=Yn.startSpan("readFile");await or;const n=i(self.pyodide.FS.readFile(e));return t.end(),n},setInterruptBuffer:async e=>{await or,self.pyodide.setInterruptBuffer(e)},addPackage:async e=>{await or;const{package:t}=e,n=t.split(" ").map((e=>e.trim())),r=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n await micropip.install(${JSON.stringify(n)})\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(r)},removePackage:async e=>{await or;const{package:t}=e,n=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n micropip.uninstall("${t}")\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(n)},listPackages:async()=>{const e=Yn.startSpan("listPackages");await or;const t=await self.pyodide.runPythonAsync('\n import json\n import micropip\n\n packages = micropip.list()\n packages = [\n {"name": p.name, "version": p.version}\n for p in packages.values()\n ]\n json.dumps(sorted(packages, key=lambda pkg: pkg["name"]))\n ');return e.end(),{packages:JSON.parse(t)}},saveNotebook:async e=>{await or;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n save_file\n ");await t(JSON.stringify(e),c)},bridge:async e=>{const t=Yn.startSpan("bridge",{functionName:e.functionName});await or;const{functionName:n,payload:r}=e;"format"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import black\n except ModuleNotFoundError:\n await micropip.install("black")\n '),"export_markdown"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import yaml\n except ModuleNotFoundError:\n await micropip.install("pyyaml")\n ');const a=await tr.promise,s=null==r?null:"string"==typeof r?r:JSON.stringify(r),i=null==s?await a[n]():await a[n](s);return ir.has(n)&&h(self.pyodide),t.end(),"string"==typeof i?JSON.parse(i):i}},ar=function(e){return Ht(e)}({transport:(sr={transportId:"marimo-transport"},Wt(self,sr)),requestHandler:rr});var sr;ar.send("ready",{}),ar.addMessageListener("consumerReady",(async()=>{await or,er.start()}));const ir=new Set(["save","save_app_config","rename_file","create_file_or_directory","delete_file_or_directory","move_file_or_directory","update_file"]);const or=Yn.wrapAsync((async function(){try{const e=self.name,t=function(e){return e.includes("dev"),`v${Kn}`}(e),n=await Yn.wrapAsync(Xn)(e);self.controller=n,ar.send.initializingMessage({message:"Loading marimo..."}),self.pyodide=await Yn.wrapAsync(n.bootstrap.bind(n))({version:e,pyodideVersion:t})}catch(e){s.error("Error bootstrapping",e),ar.send.initializedError({error:Ut(e)})}}))();
|
1
|
+
function e(e){return e.FS}const t=()=>{},n=(e,t)=>{const r=`[${e}]`;return{debug:(...e)=>t.debug(r,...e),log:(...e)=>t.log(r,...e),warn:(...e)=>t.warn(r,...e),error:(...e)=>t.error(r,...e),trace:(...e)=>t.trace(r,...e),get:r=>n(`${e}.${r}`,t),disabled:(e=!0)=>e?a:t}},r={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>n(e,r),disabled:(e=!0)=>e?a:r},a={debug:()=>t,log:()=>t,warn:()=>t,error:()=>t,trace:()=>t,get:()=>a,disabled:()=>a};const s="undefined"!=typeof window&&window.Logger||r,i=e=>(new TextDecoder).decode(e),o="notebook.py",d="/marimo",c=o,u=t=>{const n=e(t);try{n.mkdirTree(d)}catch{}n.chdir(d)},l=t=>{e(t).mount(t.FS.filesystems.IDBFS,{root:"."},d)},p=async e=>{await f(e,!0)},h=async e=>{await f(e,!1)},m=t=>{const{pyodide:n,filename:r,code:a}=t,s=e(n);if(r&&r!==o){const e=(e=>{try{return i(s.readFile(e))}catch{return null}})(r);if(e)return{code:e,filename:r}}return s.writeFile(o,a),{code:a,filename:o}};function f(t,n){return new Promise(((r,a)=>{e(t).syncfs(n,(e=>{e instanceof Error?a(e):r()}))}))}var y,g;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(y||(y={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(g||(g={}));const v=y.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_=e=>{switch(typeof e){case"undefined":return v.undefined;case"string":return v.string;case"number":return isNaN(e)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":return Array.isArray(e)?v.array:null===e?v.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?v.promise:"undefined"!=typeof Map&&e instanceof Map?v.map:"undefined"!=typeof Set&&e instanceof Set?v.set:"undefined"!=typeof Date&&e instanceof Date?v.date:v.object;default:return v.unknown}},w=y.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"]);class b extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof b))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,y.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}b.create=e=>new b(e);const k=(e,t)=>{let n;switch(e.code){case w.invalid_type:n=e.received===v.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,y.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:n=`Unrecognized key(s) in object: ${y.joinValues(e.keys,", ")}`;break;case w.invalid_union:n="Invalid input";break;case w.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${y.joinValues(e.options)}`;break;case w.invalid_enum_value:n=`Invalid enum value. Expected ${y.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:n="Invalid function arguments";break;case w.invalid_return_type:n="Invalid function return type";break;case w.invalid_date:n="Invalid date";break;case w.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:y.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case w.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case w.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case w.custom:n="Invalid input";break;case w.invalid_intersection_types:n="Intersection results could not be merged";break;case w.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:n="Number must be finite";break;default:n=t.defaultError,y.assertNever(e)}return{message:n}};let x=k;function S(){return x}const T=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function E(e,t){const n=S(),r=T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===k?void 0:k].filter((e=>!!e))});e.common.issues.push(r)}class O{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return Z;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return O.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return Z;if("aborted"===a.status)return Z;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const Z=Object.freeze({status:"aborted"}),N=e=>({status:"dirty",value:e}),j=e=>({status:"valid",value:e}),P=e=>"aborted"===e.status,A=e=>"dirty"===e.status,C=e=>"valid"===e.status,I=e=>"undefined"!=typeof Promise&&e instanceof Promise;function R(e,t,n,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function F(e,t,n,r,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $,M,L;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}($||($={}));class D{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}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 z=(e,t)=>{if(C(t))return{success:!0,data:t.value};if(!e.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 b(e.common.issues);return this._error=t,this._error}}};function U(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class q{get description(){return this._def.description}_getType(e){return _(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(I(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 n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},a=this._parseSync({data:e,path:r.path,parent:r});return z(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return C(t)?{value:t.value}:{issues:r.common.issues}}catch(a){(null===(n=null===(t=null==a?void 0:a.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>C(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(I(r)?r:Promise.resolve(r));return z(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:w.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new qe({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}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),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ve.create(this,this._def)}nullable(){return He.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Se.create(this)}promise(){return Ue.create(this,this._def)}or(e){return Oe.create([this,e],this._def)}and(e){return Pe.create(this,e,this._def)}transform(e){return new qe({...U(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Be({...U(this._def),innerType:this,defaultValue:t,typeName:nt.ZodDefault})}brand(){return new Ye({typeName:nt.ZodBranded,type:this,...U(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new We({...U(this._def),innerType:this,catchValue:t,typeName:nt.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return Xe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const V=/^c[^\s-]{8,}$/i,H=/^[0-9a-z]+$/,B=/^[0-9A-HJKMNP-TV-Z]{26}$/i,W=/^[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,K=/^[a-z0-9_-]{21}$/i,J=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Y=/^[-+]?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)?)??$/,G=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let X;const Q=/^(?:(?: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])$/,ee=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,te=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,re=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,se="((\\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])))",ie=new RegExp(`^${se}$`);function oe(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function de(e){let t=`${se}T${oe(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ce(e,t){if(!J.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(n){return!1}}function ue(e,t){return!("v4"!==t&&t||!ee.test(e))||!("v6"!==t&&t||!ne.test(e))}class le extends q{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==v.string){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.string,received:t.parsedType}),Z}const t=new O;let n;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?E(n,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(n,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)G.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"email",code:w.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)X||(X=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),X.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"emoji",code:w.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)W.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"uuid",code:w.invalid_string,message:i.message}),t.dirty());else if("nanoid"===i.kind)K.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"nanoid",code:w.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)V.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cuid",code:w.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)H.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cuid2",code:w.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)B.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"ulid",code:w.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(s){n=this._getOrReturnCtx(e,n),E(n,{validation:"url",code:w.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"regex",code:w.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){de(i).test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else if("date"===i.kind){ie.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"date",message:i.message}),t.dirty())}else if("time"===i.kind){new RegExp(`^${oe(i)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{code:w.invalid_string,validation:"time",message:i.message}),t.dirty())}else"duration"===i.kind?Y.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"duration",code:w.invalid_string,message:i.message}),t.dirty()):"ip"===i.kind?(r=e.data,("v4"!==(a=i.version)&&a||!Q.test(r))&&("v6"!==a&&a||!te.test(r))&&(n=this._getOrReturnCtx(e,n),E(n,{validation:"ip",code:w.invalid_string,message:i.message}),t.dirty())):"jwt"===i.kind?ce(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"jwt",code:w.invalid_string,message:i.message}),t.dirty()):"cidr"===i.kind?ue(e.data,i.version)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"cidr",code:w.invalid_string,message:i.message}),t.dirty()):"base64"===i.kind?re.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"base64",code:w.invalid_string,message:i.message}),t.dirty()):"base64url"===i.kind?ae.test(e.data)||(n=this._getOrReturnCtx(e,n),E(n,{validation:"base64url",code:w.invalid_string,message:i.message}),t.dirty()):y.assertNever(i);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:w.invalid_string,...$.errToObj(n)})}_addCheck(e){return new le({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...$.errToObj(e)})}url(e){return this._addCheck({kind:"url",...$.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...$.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...$.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...$.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...$.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...$.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...$.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...$.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...$.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...$.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...$.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...$.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...$.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...$.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...$.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...$.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...$.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...$.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...$.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...$.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...$.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...$.errToObj(t)})}nonempty(e){return this.min(1,$.errToObj(e))}trim(){return new le({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new le({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new le({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function pe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}le.create=e=>{var t;return new le({checks:[],typeName:nt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...U(e)})};class he extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==v.number){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.number,received:t.parsedType}),Z}let t;const n=new O;for(const r of this._def.checks)if("int"===r.kind)y.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==pe(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_finite,message:r.message}),n.dirty()):y.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new he({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new he({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:$.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:$.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&y.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}he.create=e=>new he({checks:[],typeName:nt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...U(e)});class me extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(r){return this._getInvalidInput(e)}if(this._getType(e)!==v.bigint)return this._getInvalidInput(e);let t;const n=new O;for(const a of this._def.checks)if("min"===a.kind){(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else if("max"===a.kind){(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty())}else"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):y.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.bigint,received:t.parsedType}),Z}gte(e,t){return this.setLimit("min",e,!0,$.toString(t))}gt(e,t){return this.setLimit("min",e,!1,$.toString(t))}lte(e,t){return this.setLimit("max",e,!0,$.toString(t))}lt(e,t){return this.setLimit("max",e,!1,$.toString(t))}setLimit(e,t,n,r){return new me({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:$.toString(r)}]})}_addCheck(e){return new me({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:$.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}me.create=e=>{var t;return new me({checks:[],typeName:nt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...U(e)})};class fe extends q{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==v.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.boolean,received:t.parsedType}),Z}return j(e.data)}}fe.create=e=>new fe({typeName:nt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...U(e)});class ye extends q{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==v.date){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.date,received:t.parsedType}),Z}if(isNaN(e.data.getTime())){return E(this._getOrReturnCtx(e),{code:w.invalid_date}),Z}const t=new O;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),E(n,{code:w.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):y.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ye({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:$.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:$.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ye.create=e=>new ye({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:nt.ZodDate,...U(e)});class ge extends q{_parse(e){if(this._getType(e)!==v.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.symbol,received:t.parsedType}),Z}return j(e.data)}}ge.create=e=>new ge({typeName:nt.ZodSymbol,...U(e)});class ve extends q{_parse(e){if(this._getType(e)!==v.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.undefined,received:t.parsedType}),Z}return j(e.data)}}ve.create=e=>new ve({typeName:nt.ZodUndefined,...U(e)});class _e extends q{_parse(e){if(this._getType(e)!==v.null){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.null,received:t.parsedType}),Z}return j(e.data)}}_e.create=e=>new _e({typeName:nt.ZodNull,...U(e)});class we extends q{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}we.create=e=>new we({typeName:nt.ZodAny,...U(e)});class be extends q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}be.create=e=>new be({typeName:nt.ZodUnknown,...U(e)});class ke extends q{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.never,received:t.parsedType}),Z}}ke.create=e=>new ke({typeName:nt.ZodNever,...U(e)});class xe extends q{_parse(e){if(this._getType(e)!==v.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.void,received:t.parsedType}),Z}return j(e.data)}}xe.create=e=>new xe({typeName:nt.ZodVoid,...U(e)});class Se extends q{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==v.array)return E(t,{code:w.invalid_type,expected:v.array,received:t.parsedType}),Z;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(E(t,{code:e?w.too_big:w.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(E(t,{code:w.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(E(t,{code:w.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new D(t,e,t.path,n))))).then((e=>O.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new D(t,e,t.path,n))));return O.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new Se({...this._def,minLength:{value:e,message:$.toString(t)}})}max(e,t){return new Se({...this._def,maxLength:{value:e,message:$.toString(t)}})}length(e,t){return new Se({...this._def,exactLength:{value:e,message:$.toString(t)}})}nonempty(e){return this.min(1,e)}}function Te(e){if(e instanceof Ee){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ve.create(Te(r))}return new Ee({...e._def,shape:()=>t})}return e instanceof Se?new Se({...e._def,type:Te(e.element)}):e instanceof Ve?Ve.create(Te(e.unwrap())):e instanceof He?He.create(Te(e.unwrap())):e instanceof Ae?Ae.create(e.items.map((e=>Te(e)))):e}Se.create=(e,t)=>new Se({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...U(t)});class Ee extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=y.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==v.object){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.object,received:t.parsedType}),Z}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ke&&"strip"===this._def.unknownKeys))for(const o in n.data)a.includes(o)||s.push(o);const i=[];for(const o of a){const e=r[o],t=n.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new D(n,t,n.path,o)),alwaysSet:o in n.data})}if(this._def.catchall instanceof ke){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of s)i.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)s.length>0&&(E(n,{code:w.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new D(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>O.mergeObjectSync(t,e))):O.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return $.errToObj,new Ee({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=$.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new Ee({...this._def,unknownKeys:"strip"})}passthrough(){return new Ee({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ee({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ee({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:nt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ee({...this._def,catchall:e})}pick(e){const t={};return y.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new Ee({...this._def,shape:()=>t})}omit(e){const t={};return y.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new Ee({...this._def,shape:()=>t})}deepPartial(){return Te(this)}partial(e){const t={};return y.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new Ee({...this._def,shape:()=>t})}required(e){const t={};return y.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ve;)e=e._def.innerType;t[n]=e}})),new Ee({...this._def,shape:()=>t})}keyof(){return Le(y.objectKeys(this.shape))}}Ee.create=(e,t)=>new Ee({shape:()=>e,unknownKeys:"strip",catchall:ke.create(),typeName:nt.ZodObject,...U(t)}),Ee.strictCreate=(e,t)=>new Ee({shape:()=>e,unknownKeys:"strict",catchall:ke.create(),typeName:nt.ZodObject,...U(t)}),Ee.lazycreate=(e,t)=>new Ee({shape:e,unknownKeys:"strip",catchall:ke.create(),typeName:nt.ZodObject,...U(t)});class Oe extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new b(e.ctx.common.issues)));return E(t,{code:w.invalid_union,unionErrors:n}),Z}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new b(e)));return E(t,{code:w.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}}Oe.create=(e,t)=>new Oe({options:e,typeName:nt.ZodUnion,...U(t)});const Ze=e=>e instanceof $e?Ze(e.schema):e instanceof qe?Ze(e.innerType()):e instanceof Me?[e.value]:e instanceof De?e.options:e instanceof ze?y.objectValues(e.enum):e instanceof Be?Ze(e._def.innerType):e instanceof ve?[void 0]:e instanceof _e?[null]:e instanceof Ve?[void 0,...Ze(e.unwrap())]:e instanceof He?[null,...Ze(e.unwrap())]:e instanceof Ye||e instanceof Xe?Ze(e.unwrap()):e instanceof We?Ze(e._def.innerType):[];class Ne extends q{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.object)return E(t,{code:w.invalid_type,expected:v.object,received:t.parsedType}),Z;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(E(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const t=Ze(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,a)}}return new Ne({typeName:nt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...U(n)})}}function je(e,t){const n=_(e),r=_(t);if(e===t)return{valid:!0,data:e};if(n===v.object&&r===v.object){const n=y.objectKeys(t),r=y.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const s of r){const n=je(e[s],t[s]);if(!n.valid)return{valid:!1};a[s]=n.data}return{valid:!0,data:a}}if(n===v.array&&r===v.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=je(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===v.date&&r===v.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Pe extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(P(e)||P(r))return Z;const a=je(e.value,r.value);return a.valid?((A(e)||A(r))&&t.dirty(),{status:t.value,value:a.data}):(E(n,{code:w.invalid_intersection_types}),Z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Pe.create=(e,t,n)=>new Pe({left:e,right:t,typeName:nt.ZodIntersection,...U(n)});class Ae extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.array)return E(n,{code:w.invalid_type,expected:v.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new D(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>O.mergeArray(t,e))):O.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Ae({...this._def,rest:e})}}Ae.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ae({items:e,typeName:nt.ZodTuple,rest:null,...U(t)})};class Ce extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.object)return E(n,{code:w.invalid_type,expected:v.object,received:n.parsedType}),Z;const r=[],a=this._def.keyType,s=this._def.valueType;for(const i in n.data)r.push({key:a._parse(new D(n,i,n.path,i)),value:s._parse(new D(n,n.data[i],n.path,i)),alwaysSet:i in n.data});return n.common.async?O.mergeObjectAsync(t,r):O.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Ce(t instanceof q?{keyType:e,valueType:t,typeName:nt.ZodRecord,...U(n)}:{keyType:le.create(),valueType:e,typeName:nt.ZodRecord,...U(t)})}}class Ie extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.map)return E(n,{code:w.invalid_type,expected:v.map,received:n.parsedType}),Z;const r=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new D(n,e,n.path,[s,"key"])),value:a._parse(new D(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of s){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return Z;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of s){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return Z;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}Ie.create=(e,t,n)=>new Ie({valueType:t,keyType:e,typeName:nt.ZodMap,...U(n)});class Re extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==v.set)return E(n,{code:w.invalid_type,expected:v.set,received:n.parsedType}),Z;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(E(n,{code:w.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(E(n,{code:w.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function s(e){const n=new Set;for(const r of e){if("aborted"===r.status)return Z;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new D(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>s(e))):s(i)}min(e,t){return new Re({...this._def,minSize:{value:e,message:$.toString(t)}})}max(e,t){return new Re({...this._def,maxSize:{value:e,message:$.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Re.create=(e,t)=>new Re({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...U(t)});class Fe extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.function)return E(t,{code:w.invalid_type,expected:v.function,received:t.parsedType}),Z;function n(e,n){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter((e=>!!e)),issueData:{code:w.invalid_arguments,argumentsError:n}})}function r(e,n){return T({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S(),k].filter((e=>!!e)),issueData:{code:w.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ue){const e=this;return j((async function(...t){const i=new b([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),d=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch((e=>{throw i.addIssue(r(d,e)),i}))}))}{const e=this;return j((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new b([n(t,i.error)]);const o=Reflect.apply(s,this,i.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new b([r(o,d.error)]);return d.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Fe({...this._def,args:Ae.create(e).rest(be.create())})}returns(e){return new Fe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Fe({args:e||Ae.create([]).rest(be.create()),returns:t||be.create(),typeName:nt.ZodFunction,...U(n)})}}class $e extends q{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})}}$e.create=(e,t)=>new $e({getter:e,typeName:nt.ZodLazy,...U(t)});class Me extends q{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Le(e,t){return new De({values:e,typeName:nt.ZodEnum,...U(t)})}Me.create=(e,t)=>new Me({value:e,typeName:nt.ZodLiteral,...U(t)});class De extends q{constructor(){super(...arguments),M.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return E(t,{expected:y.joinValues(n),received:t.parsedType,code:w.invalid_type}),Z}if(R(this,M)||F(this,M,new Set(this._def.values)),!R(this,M).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return E(t,{received:t.data,code:w.invalid_enum_value,options:n}),Z}return j(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 De.create(e,{...this._def,...t})}exclude(e,t=this._def){return De.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}M=new WeakMap,De.create=Le;class ze extends q{constructor(){super(...arguments),L.set(this,void 0)}_parse(e){const t=y.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==v.string&&n.parsedType!==v.number){const e=y.objectValues(t);return E(n,{expected:y.joinValues(e),received:n.parsedType,code:w.invalid_type}),Z}if(R(this,L)||F(this,L,new Set(y.getValidEnumValues(this._def.values))),!R(this,L).has(e.data)){const e=y.objectValues(t);return E(n,{received:n.data,code:w.invalid_enum_value,options:e}),Z}return j(e.data)}get enum(){return this._def.values}}L=new WeakMap,ze.create=(e,t)=>new ze({values:e,typeName:nt.ZodNativeEnum,...U(t)});class Ue extends q{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==v.promise&&!1===t.common.async)return E(t,{code:w.invalid_type,expected:v.promise,received:t.parsedType}),Z;const n=t.parsedType===v.promise?t.data:Promise.resolve(t.data);return j(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ue.create=(e,t)=>new Ue({type:e,typeName:nt.ZodPromise,...U(t)});class qe extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{E(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return Z;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?Z:"dirty"===r.status||"dirty"===t.value?N(r.value):r}));{if("aborted"===t.value)return Z;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?Z:"dirty"===r.status||"dirty"===t.value?N(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?Z:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Z:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!C(e))return e;const s=r.transform(e.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>C(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}y.assertNever(r)}}qe.create=(e,t,n)=>new qe({schema:e,typeName:nt.ZodEffects,effect:t,...U(n)}),qe.createWithPreprocess=(e,t,n)=>new qe({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...U(n)});class Ve extends q{_parse(e){return this._getType(e)===v.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ve.create=(e,t)=>new Ve({innerType:e,typeName:nt.ZodOptional,...U(t)});class He extends q{_parse(e){return this._getType(e)===v.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}He.create=(e,t)=>new He({innerType:e,typeName:nt.ZodNullable,...U(t)});class Be extends q{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===v.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Be.create=(e,t)=>new Be({innerType:e,typeName:nt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...U(t)});class We extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return I(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new b(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new b(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}We.create=(e,t)=>new We({innerType:e,typeName:nt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...U(t)});class Ke extends q{_parse(e){if(this._getType(e)!==v.nan){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:v.nan,received:t.parsedType}),Z}return{status:"valid",value:e.data}}}Ke.create=e=>new Ke({typeName:nt.ZodNaN,...U(e)});const Je=Symbol("zod_brand");class Ye extends q{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ge extends q{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Z:"dirty"===e.status?(t.dirty(),N(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Z:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Ge({in:e,out:t,typeName:nt.ZodPipeline})}}class Xe extends q{_parse(e){const t=this._def.innerType._parse(e),n=e=>(C(e)&&(e.value=Object.freeze(e.value)),e);return I(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Qe(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function et(e,t={},n){return e?we.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Qe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Qe(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):we.create()}Xe.create=(e,t)=>new Xe({innerType:e,typeName:nt.ZodReadonly,...U(t)});const tt={object:Ee.lazycreate};var nt;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(nt||(nt={}));const rt=le.create,at=he.create,st=Ke.create,it=me.create,ot=fe.create,dt=ye.create,ct=ge.create,ut=ve.create,lt=_e.create,pt=we.create,ht=be.create,mt=ke.create,ft=xe.create,yt=Se.create,gt=Ee.create,vt=Ee.strictCreate,_t=Oe.create,wt=Ne.create,bt=Pe.create,kt=Ae.create,xt=Ce.create,St=Ie.create,Tt=Re.create,Et=Fe.create,Ot=$e.create,Zt=Me.create,Nt=De.create,jt=ze.create,Pt=Ue.create,At=qe.create,Ct=Ve.create,It=He.create,Rt=qe.createWithPreprocess,Ft=Ge.create,$t={string:e=>le.create({...e,coerce:!0}),number:e=>he.create({...e,coerce:!0}),boolean:e=>fe.create({...e,coerce:!0}),bigint:e=>me.create({...e,coerce:!0}),date:e=>ye.create({...e,coerce:!0})},Mt=Z;var Lt=Object.freeze({__proto__:null,defaultErrorMap:k,setErrorMap:function(e){x=e},getErrorMap:S,makeIssue:T,EMPTY_PATH:[],addIssueToContext:E,ParseStatus:O,INVALID:Z,DIRTY:N,OK:j,isAborted:P,isDirty:A,isValid:C,isAsync:I,get util(){return y},get objectUtil(){return g},ZodParsedType:v,getParsedType:_,ZodType:q,datetimeRegex:de,ZodString:le,ZodNumber:he,ZodBigInt:me,ZodBoolean:fe,ZodDate:ye,ZodSymbol:ge,ZodUndefined:ve,ZodNull:_e,ZodAny:we,ZodUnknown:be,ZodNever:ke,ZodVoid:xe,ZodArray:Se,ZodObject:Ee,ZodUnion:Oe,ZodDiscriminatedUnion:Ne,ZodIntersection:Pe,ZodTuple:Ae,ZodRecord:Ce,ZodMap:Ie,ZodSet:Re,ZodFunction:Fe,ZodLazy:$e,ZodLiteral:Me,ZodEnum:De,ZodNativeEnum:ze,ZodPromise:Ue,ZodEffects:qe,ZodTransformer:qe,ZodOptional:Ve,ZodNullable:He,ZodDefault:Be,ZodCatch:We,ZodNaN:Ke,BRAND:Je,ZodBranded:Ye,ZodPipeline:Ge,ZodReadonly:Xe,custom:et,Schema:q,ZodSchema:q,late:tt,get ZodFirstPartyTypeKind(){return nt},coerce:$t,any:pt,array:yt,bigint:it,boolean:ot,date:dt,discriminatedUnion:wt,effect:At,enum:Nt,function:Et,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>et((t=>t instanceof e),t),intersection:bt,lazy:Ot,literal:Zt,map:St,nan:st,nativeEnum:jt,never:mt,null:lt,nullable:It,number:at,object:gt,oboolean:()=>ot().optional(),onumber:()=>at().optional(),optional:Ct,ostring:()=>rt().optional(),pipeline:Ft,preprocess:Rt,promise:Pt,record:xt,set:Tt,strictObject:vt,string:rt,symbol:ct,transformer:At,tuple:kt,undefined:ut,union:_t,unknown:ht,void:ft,NEVER:Mt,ZodIssueCode:w,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:b});const Dt=Lt.object({detail:Lt.string()}),zt=Lt.object({error:Lt.string()});function Ut(e){if(!e)return"Unknown error";if(e instanceof Error){const t=Dt.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=Dt.safeParse(t);if(n.success)return n.data.detail;const r=zt.safeParse(t);if(r.success)return r.data.error;return e}(e.message)}if("object"==typeof e){const t=Dt.safeParse(e);if(t.success)return t.data.detail;const n=zt.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}const qt=1e3;function Vt(e,t){const n=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function Ht(e={}){let t={};function n(e){t=e}let r,a={};function s(e){a.unregisterHandler&&a.unregisterHandler(),a=e,a.registerHandler?.(_)}function i(e){r="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,n)}:e}const{maxRequestTime:o=qt}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&n(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...n){const r=n[0];return new Promise(((n,s)=>{if(!a.send)throw Vt(["send"],"make requests");const i=d<=1e10?++d:d=0,l={type:"request",id:i,method:e,params:r};c.set(i,{resolve:n,reject:s}),o!==1/0&&u.set(i,setTimeout((()=>{u.delete(i),s(new Error("RPC request timed out."))}),o)),t.onSend?.(l),a.send(l)}))}const p=new Proxy(l,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>l(t,e)}),h=p;function m(e,...n){const r=n[0];if(!a.send)throw Vt(["send"],"send messages");const s={type:"message",id:e,payload:r};t.onSend?.(s),a.send(s)}const f=new Proxy(m,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>m(t,e)}),y=f,g=new Map,v=new Set;async function _(e){if(t.onReceive?.(e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!r)throw Vt(["send","requestHandler"],"handle requests");const{id:s,method:i,params:o}=e;let d;try{d={type:"response",id:s,success:!0,payload:await r(i,o)}}catch(n){if(!(n instanceof Error))throw n;d={type:"response",id:s,success:!1,error:n.message}}return t.onSend?.(d),void a.send(d)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const n of v)n(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const n of t)n(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=c.get(e.id)??{};e.success?n?.(e.payload):r?.(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:f,sendProxy:y,addMessageListener:function(e,t){if(!a.registerHandler)throw Vt(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),g.get(e)?.add(t)):v.add(t)},removeMessageListener:function(e,t){"*"!==e?(g.get(e)?.delete(t),0===g.get(e)?.size&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:n}}const Bt="[transport-id]";function Wt(e,t={}){const{transportId:n,filter:r,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[Bt]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:n,filter:r}=t,a=r?.();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(n){if(e[Bt]!==n)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:n,filter:()=>r?.(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}function Kt(e,t){if(!e)throw new Error(t)}var Jt,Yt=Object.defineProperty,Gt=(e,t)=>Yt(e,"name",{value:t,configurable:!0}),Xt=(Jt=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Jt,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):Jt);function Qt(e){return!isNaN(parseFloat(e))&&isFinite(e)}function en(e){return e.charAt(0).toUpperCase()+e.substring(1)}function tn(e){return function(){return this[e]}}Gt(Qt,"_isNumber"),Gt(en,"_capitalize"),Gt(tn,"_getter");var nn,rn,an=["isConstructor","isEval","isNative","isToplevel"],sn=["columnNumber","lineNumber"],on=["fileName","functionName","source"],dn=an.concat(sn,on,["args"],["evalOrigin"]);function cn(e){if(e)for(var t=0;t<dn.length;t++)void 0!==e[dn[t]]&&this["set"+en(dn[t])](e[dn[t]])}for(Gt(cn,"StackFrame"),cn.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof cn)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new cn(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},cn.fromString=Gt((function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),a=e.substring(t+1,n).split(","),s=e.substring(n+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new cn({functionName:r,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),nn=0;nn<an.length;nn++)cn.prototype["get"+en(an[nn])]=tn(an[nn]),cn.prototype["set"+en(an[nn])]=function(e){return function(t){this[e]=!!t}}(an[nn]);for(rn=0;rn<sn.length;rn++)cn.prototype["get"+en(sn[rn])]=tn(sn[rn]),cn.prototype["set"+en(sn[rn])]=function(e){return function(t){if(!Qt(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(sn[rn]);for(un=0;un<on.length;un++)cn.prototype["get"+en(on[un])]=tn(on[un]),cn.prototype["set"+en(on[un])]=function(e){return function(t){this[e]=String(t)}}(on[un]);var un,ln=cn;function pn(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Gt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Gt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Gt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),a=n&&t||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new ln({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Gt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new ln({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,a=this.extractLocation(e.replace(t,""));return new ln({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Gt(pn,"ErrorStackParser");var hn,mn,fn,yn,gn,vn,_n,wn,bn,kn=new pn,xn="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,Sn=xn&&typeof module<"u"&&typeof module.exports<"u"&&typeof Xt<"u"&&typeof __dirname<"u",Tn=xn&&!Sn,En=typeof Deno<"u",On=!xn&&!En,Zn=On&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,Nn=On&&"function"==typeof importScripts&&"object"==typeof self;async function jn(){if(!xn||(hn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,yn=await import("./__vite-browser-external-CIEyP2s7.js"),gn=await import("./__vite-browser-external-CIEyP2s7.js"),fn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,mn=await import("./__vite-browser-external-CIEyP2s7.js"),_n=mn.sep,typeof Xt<"u"))return;let e={fs:yn,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function Pn(e,t){return mn.resolve(t||".",e)}function An(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function Cn(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:gn.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function In(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function Rn(e,t){let{response:n,binary:r}=wn(e,t);if(r)return r;let a=await n;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Gt(jn,"initNodeModules"),Gt(Pn,"node_resolvePath"),Gt(An,"browser_resolvePath"),vn=xn?Pn:An,xn||(_n="/"),Gt(Cn,"node_getBinaryResponse"),Gt(In,"browser_getBinaryResponse"),wn=xn?Cn:In,Gt(Rn,"loadBinaryFile"),Zn)bn=Gt((async e=>await import(e)),"loadScript");else if(Nn)bn=Gt((async e=>{try{globalThis.importScripts(e)}catch(Yn){if(!(Yn instanceof TypeError))throw Yn;await import(e)}}),"loadScript");else{if(!xn)throw new Error("Cannot determine runtime environment");bn=Fn}async function Fn(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?fn.runInThisContext(await(await fetch(e)).text()):await import(hn.pathToFileURL(e).href)}async function $n(e){if(xn){await jn();let t=await gn.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function Mn(){if(Sn)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=kn.parse(e)[0].fileName;if(xn&&!t.startsWith("file://")&&(t=`file://${t}`),Tn){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(_n);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Ln(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:r,o=t?r:s;await a.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>r.join2(e,t)}Gt(a,"isRealDir"),Gt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Dn(e.opts.fileSystemHandle);for(let[s,i]of n)"."!==s&&(t[r.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:a.mtime,mode:a.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,a)=>{let s=e.get(r.dirname(n)),i=t.isFile(a.mode)?await s.getFileHandle(r.basename(n),{create:!0}):await s.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,s)=>{let i=0,o=[];Object.keys(n.entries).forEach((function(e){let r=n.entries[e],a=s.entries[e];(!a||t.isFile(r.mode)&&r.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){n.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:s.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(n),r=await a.loadRemoteEntry(e);a.storeLocalEntry(t,r)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Gt(Fn,"nodeLoadScript"),Gt($n,"loadLockFile"),Gt(Mn,"calculateDirname"),Gt(Ln,"initializeNativeFS");var Dn=Gt((async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}Gt(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");r.set(t,a)}return r}),"getFsHandles");function zn(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Bn(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Wn(e.indexURL)};return t}function Un(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function qn(e){return function(t){Object.assign(t.ENV,e)}}function Vn(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function Hn(e){let t=Rn(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let a=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,a)}catch(a){console.error("Error occurred while installing the standard library:"),console.error(a)}finally{e.removeRunDependency("install-stdlib")}}}function Bn(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Vn(e.fsInit),Hn(t),Un(e.env.HOME),qn(e.env),Ln]}function Wn(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=wn(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let a;a=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;r(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Gt(zn,"createSettings"),Gt(Un,"createHomeDirectory"),Gt(qn,"setEnvironment"),Gt(Vn,"callFsInitHook"),Gt(Hn,"installStdlib"),Gt(Bn,"getFileSystemInitializationFuncs"),Gt(Wn,"getInstantiateWasmFunc");var Kn="0.27.5";async function Jn(e={}){var t,n;await jn();let r=e.indexURL||await Mn();r=vn(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(n=s.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=zn(s),d=o.API;if(d.lockFilePromise=$n(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await bn(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==Kn&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${Kn}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}Gt(Jn,"loadPyodide");const Yn=new class{constructor(){this.spans=[]}startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(a){throw this.endSpan(r,"error"),a}}wrapAsync(e,t,n={}){return async(...r)=>{const a=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Yn;class Gn{constructor(){this.pyodide=null}get requirePyodide(){return Kt(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Jn)throw new Error("loadPyodide is not defined");const t=Yn.startSpan("loadPyodide");try{const n=await Jn({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:false,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(n){throw s.error("Failed to load Pyodide",n),n}}async mountFilesystem(e){const t=Yn.startSpan("mountFilesystem");return u(this.requirePyodide),l(this.requirePyodide),await p(this.requirePyodide),t.end("ok"),m({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:a,userConfig:s}=e;self.messenger={callback:r},self.query_params=a,self.user_config=s;const i=Yn.startSpan("startSession.runPython"),o=n||c,[d,u,l]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const p=new Set(l.toJs());return this.loadNotebookDeps(t,p).then((()=>u(s.runtime.auto_instantiate))),d}async loadNotebookDeps(e,t){const n=this.requirePyodide;e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),e=`import pyodide_http\n${e=`import jedi\n${e=`import pygments\n${e=`import docutils\n${e}`}`}`}`;const r=[...t];let a=Yn.startSpan("pyodide.loadPackage");await n.loadPackagesFromImports(e,{errorCallback:s.error,messageCallback:s.log}),a.end(),a=Yn.startSpan("micropip.install");const i=r.filter((e=>!n.loadedPackages[e]));i.length>0&&await n.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(i)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{s.error("Failed to load packages from micropip",e)})),a.end()}}async function Xn(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Gn}}const Qn=Yn.startSpan("worker:init");const er=new class{constructor(e){this.onMessage=e,this.started=!1,this.push=e=>{this.started?this.onMessage(e):this.buffer.push(e)},this.start=()=>{this.started=!0,this.buffer.forEach((e=>this.onMessage(e))),this.buffer=[]},this.buffer=[]}}((e=>{ar.send.kernelMessage({message:e})})),tr=new class{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.reject=e=>{this.status="rejected",t(e)},this.resolve=t=>{this.status="resolved",e(t)}}))}};let nr=!1;const rr={startSession:async e=>{if(await or,nr)s.warn("Session already started");else{nr=!0;try{Kt(self.controller,"Controller not loaded"),await(self.controller.mountFilesystem?.({code:e.code,filename:e.filename}));const t=Yn.wrapAsync(self.controller.startSession.bind(self.controller)),n=function(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}((()=>{ar.send.initializingMessage({message:"Initializing notebook..."}),ar.send.initialized({})}));ar.send.initializingMessage({message:"Loading notebook and dependencies..."});const r=await t({code:e.code,filename:e.filename,queryParameters:e.queryParameters,userConfig:e.userConfig,onMessage:e=>{n(),er.push(e)}});tr.resolve(r),Qn.end("ok")}catch(t){ar.send.initializedError({error:Ut(t)}),Qn.end("error")}}},loadPackages:async e=>{const t=Yn.startSpan("loadPackages");await or,e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),await self.pyodide.loadPackagesFromImports(e,{messageCallback:s.log,errorCallback:s.error}),t.end()},readFile:async e=>{const t=Yn.startSpan("readFile");await or;const n=i(self.pyodide.FS.readFile(e));return t.end(),n},setInterruptBuffer:async e=>{await or,self.pyodide.setInterruptBuffer(e)},addPackage:async e=>{await or;const{package:t}=e,n=t.split(" ").map((e=>e.trim())),r=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n await micropip.install(${JSON.stringify(n)})\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(r)},removePackage:async e=>{await or;const{package:t}=e,n=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n micropip.uninstall("${t}")\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(n)},listPackages:async()=>{const e=Yn.startSpan("listPackages");await or;const t=await self.pyodide.runPythonAsync('\n import json\n import micropip\n\n packages = micropip.list()\n packages = [\n {"name": p.name, "version": p.version}\n for p in packages.values()\n ]\n json.dumps(sorted(packages, key=lambda pkg: pkg["name"]))\n ');return e.end(),{packages:JSON.parse(t)}},saveNotebook:async e=>{await or;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n save_file\n ");await t(JSON.stringify(e),c)},bridge:async e=>{const t=Yn.startSpan("bridge",{functionName:e.functionName});await or;const{functionName:n,payload:r}=e;"format"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import black\n except ModuleNotFoundError:\n await micropip.install("black")\n '),"export_markdown"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import yaml\n except ModuleNotFoundError:\n await micropip.install("pyyaml")\n ');const a=await tr.promise,s=null==r?null:"string"==typeof r?r:JSON.stringify(r),i=null==s?await a[n]():await a[n](s);return ir.has(n)&&h(self.pyodide),t.end(),"string"==typeof i?JSON.parse(i):i}},ar=function(e){return Ht(e)}({transport:(sr={transportId:"marimo-transport"},Wt(self,sr)),requestHandler:rr});var sr;ar.send("ready",{}),ar.addMessageListener("consumerReady",(async()=>{await or,er.start()}));const ir=new Set(["save","save_app_config","rename_file","create_file_or_directory","delete_file_or_directory","move_file_or_directory","update_file"]);const or=Yn.wrapAsync((async function(){try{const e=self.name,t=function(e){return e.includes("dev"),`v${Kn}`}(e),n=await Yn.wrapAsync(Xn)(e);self.controller=n,ar.send.initializingMessage({message:"Loading marimo..."}),self.pyodide=await Yn.wrapAsync(n.bootstrap.bind(n))({version:e,pyodideVersion:t})}catch(e){s.error("Error bootstrapping",e),ar.send.initializedError({error:Ut(e)})}}))();
|
package/dist/assets/{xychartDiagram-VJFVF3MP-CFzyjXtl.js → xychartDiagram-VJFVF3MP-CslidRSs.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
var F,N,V,X,Y,U,H,G,j,Q;import{_ as a,s as ai,g as hi,q as Mt,p as oi,a as ri,b as li,l as It,I as ci,d as gi,y as ui,F as ut,E as $t,G as xi,L as di,h as pi,a8 as fi}from"./mermaid-
|
1
|
+
var F,N,V,X,Y,U,H,G,j,Q;import{_ as a,s as ai,g as hi,q as Mt,p as oi,a as ri,b as li,l as It,I as ci,d as gi,y as ui,F as ut,E as $t,G as xi,L as di,h as pi,a8 as fi}from"./mermaid-CKfOVvWF.js";import"./transform-C4Tsj3kK.js";import{i as mi}from"./init-DLRA0X12.js";import{o as yi}from"./ordinal-DDUp3AbE.js";import{r as bi}from"./range-CtcPcB_L.js";import{l as Bt}from"./linear-mzwEN9hD.js";import{l as zt}from"./step-BwsUM5iJ.js";import"./index-Bi9V20Bf.js";import"./timer-BI-lUAZ7.js";function xt(){var e,t,i=yi().unknown(void 0),s=i.domain,n=i.range,r=0,l=1,d=!1,x=0,_=0,T=.5;function S(){var m=s().length,D=l<r,C=D?l:r,L=D?r:l;e=(L-C)/Math.max(1,m-x+2*_),d&&(e=Math.floor(e)),C+=(L-C-e*(m-x))*T,t=e*(1-x),d&&(C=Math.round(C),t=Math.round(t));var f=bi(m).map(function(k){return C+e*k});return n(D?f.reverse():f)}return delete i.unknown,i.domain=function(m){return arguments.length?(s(m),S()):s()},i.range=function(m){return arguments.length?([r,l]=m,r=+r,l=+l,S()):[r,l]},i.rangeRound=function(m){return[r,l]=m,r=+r,l=+l,d=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(m){return arguments.length?(d=!!m,S()):d},i.padding=function(m){return arguments.length?(x=Math.min(1,_=+m),S()):x},i.paddingInner=function(m){return arguments.length?(x=Math.min(1,m),S()):x},i.paddingOuter=function(m){return arguments.length?(_=+m,S()):_},i.align=function(m){return arguments.length?(T=Math.max(0,Math.min(1,m)),S()):T},i.copy=function(){return xt(s(),[r,l]).round(d).paddingInner(x).paddingOuter(_).align(T)},mi.apply(S(),arguments)}var dt=function(){var e=a(function(o,b,g,u){for(g=g||{},u=o.length;u--;g[o[u]]=b);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],r=[1,6],l=[1,7],d=[1,5,10,12,14,16,18,19,21,23,34,35,36],x=[1,25],_=[1,26],T=[1,28],S=[1,29],m=[1,30],D=[1,31],C=[1,32],L=[1,33],f=[1,34],k=[1,35],c=[1,36],v=[1,37],K=[1,43],_t=[1,42],Tt=[1,47],tt=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],rt=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],Rt=[1,64],lt={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(o,b,g,u,A,h,q){var p=h.length-1;switch(A){case 5:u.setOrientation(h[p]);break;case 9:u.setDiagramTitle(h[p].text.trim());break;case 12:u.setLineData({text:"",type:"text"},h[p]);break;case 13:u.setLineData(h[p-1],h[p]);break;case 14:u.setBarData({text:"",type:"text"},h[p]);break;case 15:u.setBarData(h[p-1],h[p]);break;case 16:this.$=h[p].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=h[p].trim(),u.setAccDescription(this.$);break;case 19:case 27:this.$=h[p-1];break;case 20:this.$=[Number(h[p-2]),...h[p]];break;case 21:this.$=[Number(h[p])];break;case 22:u.setXAxisTitle(h[p]);break;case 23:u.setXAxisTitle(h[p-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(h[p]);break;case 26:u.setXAxisRangeData(Number(h[p-2]),Number(h[p]));break;case 28:this.$=[h[p-2],...h[p]];break;case 29:this.$=[h[p]];break;case 30:u.setYAxisTitle(h[p]);break;case 31:u.setYAxisTitle(h[p-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(h[p-2]),Number(h[p]));break;case 37:case 38:this.$={text:h[p],type:"text"};break;case 39:this.$={text:h[p],type:"markdown"};break;case 40:this.$=h[p];break;case 41:this.$=h[p-1]+""+h[p]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:r,36:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:r,36:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:r,36:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(d,[2,34]),e(d,[2,35]),e(d,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:r,36:l}),{1:[2,3]},e(d,[2,5]),e(t,[2,7],{4:22,34:n,35:r,36:l}),{11:23,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:39,13:38,24:K,27:_t,29:40,30:41,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:45,15:44,27:Tt,33:46,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:49,17:48,24:tt,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{11:52,17:51,24:tt,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(rt,[2,37],{40:55,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v}),e(rt,[2,38]),e(rt,[2,39]),e(E,[2,40]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),e(E,[2,47]),e(E,[2,48]),e(E,[2,49]),e(E,[2,50]),e(E,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:K,27:_t}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},e(w,[2,11]),e(w,[2,30],{33:60,27:Tt}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:tt},{25:63,27:Rt},e(w,[2,14]),{17:65,24:tt},e(w,[2,16]),e(w,[2,17]),e(E,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:x,39:_,40:27,41:T,42:S,43:m,44:D,45:C,46:L,47:f,48:k,49:c,50:v},e(w,[2,33]),e(w,[2,19]),{25:73,27:Rt},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(o,b){if(!b.recoverable){var g=new Error(o);throw g.hash=b,g}this.trace(o)},"parseError"),parse:a(function(o){var b=this,g=[0],u=[],A=[null],h=[],q=this.table,p="",et=0,Dt=0,si=h.slice.call(arguments,1),R=Object.create(this.lexer),B={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(B.yy[ct]=this.yy[ct]);R.setInput(o,B.yy),B.yy.lexer=R,B.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var gt=R.yylloc;h.push(gt);var ni=R.options&&R.options.ranges;function Lt(){var I;return typeof(I=u.pop()||R.lex()||1)!="number"&&(I instanceof Array&&(I=(u=I).pop()),I=b.symbols_[I]||I),I}typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(I){g.length=g.length-2*I,A.length=A.length-I,h.length=h.length-I},"popStack"),a(Lt,"lex");for(var P,z,M,Pt,st,$,vt,nt,O={};;){if(z=g[g.length-1],this.defaultActions[z]?M=this.defaultActions[z]:(P==null&&(P=Lt()),M=q[z]&&q[z][P]),M===void 0||!M.length||!M[0]){var Et="";for(st in nt=[],q[z])this.terminals_[st]&&st>2&&nt.push("'"+this.terminals_[st]+"'");Et=R.showPosition?"Parse error on line "+(et+1)+`:
|
2
2
|
`+R.showPosition()+`
|
3
3
|
Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":"Parse error on line "+(et+1)+": Unexpected "+(P==1?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(Et,{text:R.match,token:this.terminals_[P]||P,line:R.yylineno,loc:gt,expected:nt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(R.yytext),h.push(R.yylloc),g.push(M[1]),P=null,Dt=R.yyleng,p=R.yytext,et=R.yylineno,gt=R.yylloc;break;case 2:if($=this.productions_[M[1]][1],O.$=A[A.length-$],O._$={first_line:h[h.length-($||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-($||1)].first_column,last_column:h[h.length-1].last_column},ni&&(O._$.range=[h[h.length-($||1)].range[0],h[h.length-1].range[1]]),(Pt=this.performAction.apply(O,[p,Dt,et,B.yy,M[1],A,h].concat(si)))!==void 0)return Pt;$&&(g=g.slice(0,-1*$*2),A=A.slice(0,-1*$),h=h.slice(0,-1*$)),g.push(this.productions_[M[1]][0]),A.push(O.$),h.push(O._$),vt=q[g[g.length-2]][g[g.length-1]],g.push(vt);break;case 3:return!0}}return!0},"parse")},ei=function(){return{EOF:1,parseError:a(function(o,b){if(!this.yy.parser)throw new Error(o);this.yy.parser.parseError(o,b)},"parseError"),setInput:a(function(o,b){return this.yy=b||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:a(function(o){var b=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===u.length?this.yylloc.first_column:0)+u[u.length-g.length].length-g[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(o){this.unput(this.match.slice(o))},"less"),pastInput:a(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var o=this.pastInput(),b=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
@@ -54,12 +54,12 @@
|
|
54
54
|
</script>
|
55
55
|
<marimo-filename hidden>{{ filename }}</marimo-filename>
|
56
56
|
<title>{{ title }}</title>
|
57
|
-
<script type="module" crossorigin src="./assets/index-
|
58
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
57
|
+
<script type="module" crossorigin src="./assets/index-Bi9V20Bf.js"></script>
|
58
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BH3Eb9nz.css">
|
59
59
|
</head>
|
60
60
|
<body>
|
61
61
|
<div id="root"></div>
|
62
|
-
<script>
|
62
|
+
<script data-marimo="true">
|
63
63
|
window.__MARIMO_MOUNT_CONFIG__ = '{{ mount_config }}';
|
64
64
|
</script>
|
65
65
|
</body>
|