@marimo-team/islands 0.23.17-dev35 → 0.23.17-dev36
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/{ConnectedDataExplorerComponent-emE_tsrt.js → ConnectedDataExplorerComponent-Gq4Q2Y4r.js} +4 -4
- package/dist/{ErrorBoundary-o6wEnSCc.js → ErrorBoundary-CptUP1_t.js} +1 -1
- package/dist/assets/__vite-browser-external-DUz7vvG0.js +1 -0
- package/dist/assets/{worker-CDEKsBgX.js → worker-Cl1KJG2_.js} +2 -2
- package/dist/{chat-ui-1-XgwfDv.js → chat-ui-BUC1liWi.js} +6 -6
- package/dist/{common-mBzwyg_G.js → common-C-o2Zi3k.js} +9 -9
- package/dist/{formats-DcO6TofP.js → formats-DO4oLDDL.js} +1 -1
- package/dist/{glide-data-editor-C99Bp4Hk.js → glide-data-editor-CyTNN635.js} +3 -3
- package/dist/{html-to-image-CgznkzKG.js → html-to-image-A5PBjxuX.js} +5 -5
- package/dist/{input-CwPuFkJt.js → input-B4ddy8Jy.js} +1 -1
- package/dist/main.js +19 -19
- package/dist/{mermaid-Sy0p3RJY.js → mermaid-ZQqMfFT3.js} +2 -2
- package/dist/{process-output-DUNqOGZS.js → process-output-CVc-yx0-.js} +1 -1
- package/dist/{reveal-component-BKPirLwd.js → reveal-component-C99QMksZ.js} +5 -5
- package/dist/{spec-Be9MhFWh.js → spec-uMKNvMRZ.js} +1 -1
- package/dist/{toDate-eW__SzBR.js → toDate-BiyuFdnT.js} +1 -1
- package/dist/{useAsyncData-B8UxSH4O.js → useAsyncData-DqJLysjC.js} +1 -1
- package/dist/{useDeepCompareMemoize-BnhKck7C.js → useDeepCompareMemoize-CvlmHAmy.js} +1 -1
- package/dist/{useLifecycle-B7J7yvFt.js → useLifecycle-D4N02q82.js} +1 -1
- package/dist/{useTheme-BUY7pfI9.js → useTheme-Dur2p3iC.js} +2 -1
- package/dist/{vega-component-BOeMnvAb.js → vega-component-DMp_WplI.js} +5 -5
- package/package.json +1 -1
- package/src/components/app-config/user-config-form.tsx +26 -0
- package/src/components/editor/actions/useConfigActions.tsx +24 -0
- package/src/core/codemirror/__tests__/setup.test.ts +1 -1
- package/src/core/codemirror/cm.ts +2 -2
- package/src/core/codemirror/code-lens/__tests__/extension.test.ts +4 -0
- package/src/core/codemirror/code-lens/extension.ts +5 -1
- package/src/core/config/__tests__/config-schema.test.ts +2 -0
- package/src/core/config/config-schema.ts +1 -0
- package/dist/assets/__vite-browser-external-DltVXDv7.js +0 -1
|
@@ -3,8 +3,8 @@ import { g as Logger, h as cn, t as Button } from "./button-8aS1QcHr.js";
|
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
5
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
6
|
-
import { A as SquareFunction, t as augmentSpecWithData } from "./spec-
|
|
7
|
-
import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-
|
|
6
|
+
import { A as SquareFunction, t as augmentSpecWithData } from "./spec-uMKNvMRZ.js";
|
|
7
|
+
import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-D4N02q82.js";
|
|
8
8
|
import { a as ListFilter, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-BeN3fHMH.js";
|
|
9
9
|
import { a as SelectGroup, c as SelectSeparator, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-BUDhKc0s.js";
|
|
10
10
|
import "./react-dom-BTJzcVJ9.js";
|
|
@@ -13,7 +13,7 @@ import "./zod-yTHHzJiv.js";
|
|
|
13
13
|
import { n as ErrorBanner } from "./error-banner-dmkbm21G.js";
|
|
14
14
|
import { t as Label } from "./label-CzHncDvS.js";
|
|
15
15
|
import { t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
16
|
-
import { E as createStore, S as useAtomValue, T as atom, b as Provider, n as useTheme } from "./useTheme-
|
|
16
|
+
import { E as createStore, S as useAtomValue, T as atom, b as Provider, n as useTheme } from "./useTheme-Dur2p3iC.js";
|
|
17
17
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
18
18
|
import { t as Objects } from "./objects-De59twF-.js";
|
|
19
19
|
import { V as getContainerWidth } from "./vega-loader.browser-DmpxCJqx.js";
|
|
@@ -21,7 +21,7 @@ import { a as tooltipHandler, n as vegaLoadData } from "./loader-DP2JkPth.js";
|
|
|
21
21
|
import { n as q, r as contains } from "./react-vega-BazDALhI.js";
|
|
22
22
|
import "./defaultLocale-BpsHxBd7.js";
|
|
23
23
|
import "./defaultLocale-DoeErsX2.js";
|
|
24
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
24
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
25
25
|
var ChartColumnBig = createLucideIcon("chart-column-big", [
|
|
26
26
|
["path", {
|
|
27
27
|
d: "M3 3v16a2 2 0 0 0 2 2h16",
|
|
@@ -4,7 +4,7 @@ import { t as require_react } from "./react-DA-nE2FX.js";
|
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
5
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
7
|
-
import { i as Constants } from "./useTheme-
|
|
7
|
+
import { i as Constants } from "./useTheme-Dur2p3iC.js";
|
|
8
8
|
var Plus = createLucideIcon("plus", [["path", {
|
|
9
9
|
d: "M5 12h14",
|
|
10
10
|
key: "1ays0h"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./worker-Cl1KJG2_.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=e=>t=>c(t.default,e),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});function d(e){return e}function f(e,t){let n=e.map(e=>`"${e}"`).join(`, `);return Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function p(e={}){let t={};function n(e){t=e}let r={};function i(e){r.unregisterHandler&&r.unregisterHandler(),r=e,r.registerHandler?.(g)}let a;function o(e){if(typeof e==`function`){a=e;return}a=(t,n)=>{let r=e[t];if(r)return r(n);let i=e._;if(!i)throw Error(`The requested method has no handler: ${t}`);return i(t,n)}}let{maxRequestTime:s=1e3}=e;e.transport&&i(e.transport),e.requestHandler&&o(e.requestHandler),e._debugHooks&&n(e._debugHooks);let c=0;function l(){return c<=1e10?++c:c=0}let u=new Map,d=new Map;function p(e,...n){let i=n[0];return new Promise((n,a)=>{if(!r.send)throw f([`send`],`make requests`);let o=l(),c={type:`request`,id:o,method:e,params:i};u.set(o,{resolve:n,reject:a}),s!==1/0&&d.set(o,setTimeout(()=>{d.delete(o),a(Error(`RPC request timed out.`))},s)),t.onSend?.(c),r.send(c)})}let ee=new Proxy(p,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>p(t,e)}),m=ee;function te(e,...n){let i=n[0];if(!r.send)throw f([`send`],`send messages`);let a={type:`message`,id:e,payload:i};t.onSend?.(a),r.send(a)}let ne=new Proxy(te,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>te(t,e)}),re=ne,h=new Map,ie=new Set;function ae(e,t){if(!r.registerHandler)throw f([`registerHandler`],`register message listeners`);if(e===`*`){ie.add(t);return}h.has(e)||h.set(e,new Set),h.get(e)?.add(t)}function oe(e,t){if(e===`*`){ie.delete(t);return}h.get(e)?.delete(t),h.get(e)?.size===0&&h.delete(e)}async function g(e){if(t.onReceive?.(e),!(`type`in e))throw Error(`Message does not contain a type.`);if(e.type===`request`){if(!r.send||!a)throw f([`send`,`requestHandler`],`handle requests`);let{id:n,method:i,params:o}=e,s;try{s={type:`response`,id:n,success:!0,payload:await a(i,o)}}catch(e){if(!(e instanceof Error))throw e;s={type:`response`,id:n,success:!1,error:e.message}}t.onSend?.(s),r.send(s);return}if(e.type===`response`){let t=d.get(e.id);t!=null&&clearTimeout(t);let{resolve:n,reject:r}=u.get(e.id)??{};e.success?n?.(e.payload):r?.(Error(e.error));return}if(e.type===`message`){for(let t of ie)t(e.id,e.payload);let t=h.get(e.id);if(!t)return;for(let n of t)n(e.payload);return}throw Error(`Unexpected RPC message type: ${e.type}`)}return{setTransport:i,setRequestHandler:o,request:ee,requestProxy:m,send:ne,sendProxy:re,addMessageListener:ae,removeMessageListener:oe,proxy:{send:re,request:m},_setDebugHooks:n}}function ee(e){return p(e)}const m=`[transport-id]`;function te(e,t){let{transportId:n}=t;return n==null?e:{[m]:n,data:e}}function ne(e,t){let{transportId:n,filter:r}=t,i=r?.();if(n!=null&&i!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let a=e;if(n){if(e[m]!==n)return[!0];a=e.data}return i===!1?[!0]:[!1,a]}function re(e,t={}){let{transportId:n,filter:r,remotePort:i}=t,a=e,o=i??e,s;return{send(e){o.postMessage(te(e,{transportId:n}))},registerHandler(e){s=t=>{let i=t.data,[a,o]=ne(i,{transportId:n,filter:()=>r?.(t)});a||e(o)},a.addEventListener(`message`,s)},unregisterHandler(){s&&a.removeEventListener(`message`,s)}}}function h(e){return re(self,e)}const ie=/(^|\n)\s*(?:import\s+[^\n#]*\bduckdb\b|from\s+duckdb\b|[^\n#]*\bduckdb\s*\.)/;function ae(e,t){return e.includes(`mo.sql`)||ie.test(e)||t?.has(`duckdb`)===!0}var oe=Object.defineProperty,g=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),se=(e=>typeof u<`u`?u:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof u<`u`?u:e)[t]}):e)(function(e){if(typeof u<`u`)return u.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),ce=(()=>{for(var e=new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;return t=>{for(var n=t.length,r=new Uint8Array((n-(t[n-1]==`=`)-(t[n-2]==`=`))*3/4|0),i=0,a=0;i<n;){var o=e[t.charCodeAt(i++)],s=e[t.charCodeAt(i++)],c=e[t.charCodeAt(i++)],l=e[t.charCodeAt(i++)];r[a++]=o<<2|s>>4,r[a++]=s<<4|c>>2,r[a++]=c<<6|l}return r}})();function le(e){return!isNaN(parseFloat(e))&&isFinite(e)}g(le,`_isNumber`);function _(e){return e.charAt(0).toUpperCase()+e.substring(1)}g(_,`_capitalize`);function ue(e){return function(){return this[e]}}g(ue,`_getter`);var de=[`isConstructor`,`isEval`,`isNative`,`isToplevel`],v=[`columnNumber`,`lineNumber`],y=[`fileName`,`functionName`,`source`],fe=de.concat(v,y,[`args`],[`evalOrigin`]);function b(e){if(e)for(var t=0;t<fe.length;t++)e[fe[t]]!==void 0&&this[`set`+_(fe[t])](e[fe[t]])}for(g(b,`StackFrame`),b.prototype={getArgs:g(function(){return this.args},`getArgs`),setArgs:g(function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)throw TypeError(`Args must be an Array`);this.args=e},`setArgs`),getEvalOrigin:g(function(){return this.evalOrigin},`getEvalOrigin`),setEvalOrigin:g(function(e){if(e instanceof b)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new b(e);else throw TypeError(`Eval Origin must be an Object or StackFrame`)},`setEvalOrigin`),toString:g(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},`toString`)},b.fromString=g(function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),s=o[1],c=o[2],l=o[3];return new b({functionName:r,args:i||void 0,fileName:s,lineNumber:c||void 0,columnNumber:l||void 0})},`StackFrame$$fromString`),x=0;x<de.length;x++)b.prototype[`get`+_(de[x])]=ue(de[x]),b.prototype[`set`+_(de[x])]=function(e){return function(t){this[e]=!!t}}(de[x]);var x;for(S=0;S<v.length;S++)b.prototype[`get`+_(v[S])]=ue(v[S]),b.prototype[`set`+_(v[S])]=function(e){return function(t){if(!le(t))throw TypeError(e+` must be a Number`);this[e]=Number(t)}}(v[S]);var S;for(C=0;C<y.length;C++)b.prototype[`get`+_(y[C])]=ue(y[C]),b.prototype[`set`+_(y[C])]=function(e){return function(t){this[e]=String(t)}}(y[C]);var C,pe=b;function me(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:g(function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw Error(`Cannot parse given Error object`)},`ErrorStackParser$$parse`),extractLocation:g(function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));return[t[1],t[2]||void 0,t[3]||void 0]},`ErrorStackParser$$extractLocation`),parseV8OrIE:g(function(t){return t.stack.split(`
|
|
2
2
|
`).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);return new pe({functionName:n&&t||void 0,fileName:[`eval`,`<anonymous>`].indexOf(r[0])>-1?void 0:r[0],lineNumber:r[1],columnNumber:r[2],source:e})},this)},`ErrorStackParser$$parseV8OrIE`),parseFFOrSafari:g(function(e){return e.stack.split(`
|
|
3
|
-
`).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`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new pe({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new pe({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},`ErrorStackParser$$parseFFOrSafari`)}}g(me,`ErrorStackParser`);var he=new me;function ge(){return typeof API<`u`&&API!==globalThis.API?API.runtimeEnv:_e({IN_BUN:typeof Bun<`u`,IN_DENO:typeof Deno<`u`,IN_NODE:typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`&&!process.browser,IN_SAFARI:typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Chrome`)===-1&&navigator.userAgent.indexOf(`Safari`)>-1,IN_SHELL:typeof read==`function`&&typeof load==`function`,IN_WORKERD:typeof navigator==`object`&&navigator.userAgent?.includes(`Cloudflare-Workers`)})}g(ge,`getGlobalRuntimeEnv`);var w=ge();function _e(e){let t=e.IN_NODE&&typeof module<`u`&&module.exports&&typeof se==`function`&&typeof __dirname==`string`,n=e.IN_NODE&&!t,r=!e.IN_NODE&&!e.IN_DENO&&!e.IN_BUN,i=r&&typeof window<`u`&&typeof window.document<`u`&&typeof document.createElement==`function`&&`sessionStorage`in window&&typeof globalThis.importScripts!=`function`,a=r&&typeof globalThis.WorkerGlobalScope<`u`&&typeof globalThis.self<`u`&&globalThis.self instanceof globalThis.WorkerGlobalScope;if(a&&ve())throw Error(`Classic web workers are not supported`);let o={...e,IN_BROWSER:r,IN_BROWSER_MAIN_THREAD:i,IN_BROWSER_WEB_WORKER:a,IN_NODE_COMMONJS:t,IN_NODE_ESM:n};if(!(o.IN_BROWSER_MAIN_THREAD||o.IN_BROWSER_WEB_WORKER||o.IN_NODE||o.IN_SHELL||o.IN_WORKERD))throw Error(`Cannot determine runtime environment: ${JSON.stringify(o)}`);return o}g(_e,`calculateDerivedFlags`);function ve(){try{return globalThis.importScripts(`data:text/javascript,`),!0}catch{return!1}}g(ve,`isClassicWorker`);var ye,be,xe,Se;async function Ce(){if(!w.IN_NODE||(ye=(await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1))).default,xe=await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1)),Se=await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1)),(await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1))).default,be=await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1)),De=be.sep,typeof se<`u`))return;let e={fs:xe,crypto:await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1)),ws:await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1)),child_process:await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1))};globalThis.require=function(t){return e[t]}}g(Ce,`initNodeModules`);function we(e,t){return be.resolve(t||`.`,e)}g(we,`node_resolvePath`);function Te(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}g(Te,`browser_resolvePath`);var Ee=w.IN_NODE?we:w.IN_SHELL?g(e=>e,`resolvePath`):Te,De;w.IN_NODE||(De=`/`);function Oe(e,t){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?{response:fetch(e)}:{binary:Se.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}g(Oe,`node_getBinaryResponse`);function ke(e,t){if(e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`))throw Error(`Shell cannot fetch urls`);return{binary:Promise.resolve(new Uint8Array(readbuffer(e)))}}g(ke,`shell_getBinaryResponse`);function Ae(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}g(Ae,`browser_getBinaryResponse`);var je=w.IN_NODE?Oe:w.IN_SHELL?ke:Ae;async function Me(e,t){let{response:n,binary:r}=je(e,t);if(r)return r;let i=await n;if(!i.ok)throw Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await i.arrayBuffer())}g(Me,`loadBinaryFile`);var Ne=w.IN_NODE?Pe:g(async e=>await import(e),`loadScript`);async function Pe(e){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?await import(e):await import(ye.pathToFileURL(e).href)}g(Pe,`nodeLoadScript`);async function Fe(e){if(w.IN_NODE){await Ce();let t=await Se.readFile(e,{encoding:`utf8`});return JSON.parse(t)}else if(w.IN_SHELL){let t=read(e);return JSON.parse(t)}else return await(await fetch(e)).json()}g(Fe,`loadLockFile`);async function Ie(){if(w.IN_NODE_COMMONJS)return __dirname;let e;try{throw Error()}catch(t){e=t}let t=he.parse(e)[0].fileName;if(w.IN_NODE&&!t.startsWith(`file://`)&&(t=`file://${t}`),w.IN_NODE_ESM){let e=await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1));return(await import(`./__vite-browser-external-DltVXDv7.js`).then(l(1))).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(De);if(n===-1)throw Error(`Could not extract indexURL path from pyodide module location. Please pass the indexURL explicitly to loadPyodide.`);return t.slice(0,n)}g(Ie,`calculateDirname`);function Le(e){return e.substring(0,e.lastIndexOf(`/`)+1)||globalThis.location?.toString()||`.`}g(Le,`calculateInstallBaseUrl`);function Re(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,i={DIR_MODE:16895,FILE_MODE:33279,mount:g(function(e){if(!e.opts.fileSystemHandle)throw Error(`opts.fileSystemHandle is required`);return n.mount.apply(null,arguments)},`mount`),syncfs:g(async(e,t,n)=>{try{let r=i.getLocalSet(e),a=await i.getRemoteSet(e),o=t?a:r,s=t?r:a;await i.reconcile(e,o,s),n(null)}catch(e){n(e)}},`syncfs`),getLocalSet:g(e=>{let n=Object.create(null);function i(e){return e!==`.`&&e!==`..`}g(i,`isRealDir`);function a(e){return t=>r.join2(e,t)}g(a,`toAbsolute`);let o=t.readdir(e.mountpoint).filter(i).map(a(e.mountpoint));for(;o.length;){let e=o.pop(),r=t.stat(e);t.isDir(r.mode)&&o.push.apply(o,t.readdir(e).filter(i).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:`local`,entries:n}},`getLocalSet`),getRemoteSet:g(async e=>{let t=Object.create(null),n=await ze(e.opts.fileSystemHandle);for(let[a,o]of n)a!==`.`&&(t[r.join2(e.mountpoint,a)]={timestamp:o.kind===`file`?new Date((await o.getFile()).lastModified):new Date,mode:o.kind===`file`?i.FILE_MODE:i.DIR_MODE});return{type:`remote`,entries:t,handles:n}},`getRemoteSet`),loadLocalEntry:g(e=>{let r=t.lookupPath(e,{}).node,i=t.stat(e);if(t.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(t.isFile(i.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:i.mtime,mode:i.mode,contents:r.contents};throw Error(`node type not supported`)},`loadLocalEntry`),storeLocalEntry:g((e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else if(t.isFile(n.mode))t.writeFile(e,n.contents,{canOwn:!0});else throw Error(`node type not supported`);t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},`storeLocalEntry`),removeLocalEntry:g(e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},`removeLocalEntry`),loadRemoteEntry:g(async e=>{if(e.kind===`file`){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:i.FILE_MODE,timestamp:new Date(t.lastModified)}}else{if(e.kind===`directory`)return{mode:i.DIR_MODE,timestamp:new Date};throw Error(`unknown kind: `+e.kind)}},`loadRemoteEntry`),storeRemoteEntry:g(async(e,n,i)=>{let a=e.get(r.dirname(n)),o=t.isFile(i.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if(o.kind===`file`){let e=await o.createWritable();await e.write(i.contents),await e.close()}e.set(n,o)},`storeRemoteEntry`),removeRemoteEntry:g(async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},`removeRemoteEntry`),reconcile:g(async(e,n,a)=>{let o=0,s=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],i=a.entries[e];(!i||t.isFile(r.mode)&&r.timestamp.getTime()>i.timestamp.getTime())&&(s.push(e),o++)}),s.sort();let c=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(c.push(e),o++)}),c.sort().reverse(),!o)return;let l=n.type===`remote`?n.handles:a.handles;for(let t of s){let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);if(a.type===`local`){let e=l.get(n),r=await i.loadRemoteEntry(e);i.storeLocalEntry(t,r)}else{let e=i.loadLocalEntry(t);await i.storeRemoteEntry(l,n,e)}}for(let t of c)if(a.type===`local`)i.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);await i.removeRemoteEntry(l,n)}},`reconcile`)};e.FS.filesystems.NATIVEFS_ASYNC=i}g(Re,`initializeNativeFS`);var ze=g(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),r.kind===`directory`&&await n(r)}g(n,`collect`),await n(e);let r=new Map;r.set(`.`,e);for(let n of t){let t=(await e.resolve(n)).join(`/`);r.set(t,n)}return r},`getFsHandles`),Be=ce(`AGFzbQEAAAABDANfAGAAAW9gAW8BfwMDAgECBygCE0pzdl9HZXRFcnJvcl9pbXBvcnQAAA5Kc3ZFcnJvcl9DaGVjawABChMCBwD7AQD7GwsJACAA+xr7FAAL`),Ve=async function(){if(!(globalThis.navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&typeof navigator.maxTouchPoints<`u`&&navigator.maxTouchPoints>1)))try{let e=await WebAssembly.compile(Be);return await WebAssembly.instantiate(e)}catch(e){if(e instanceof WebAssembly.CompileError)return;throw e}}();async function He(){let e=await Ve;if(e)return e.exports;let t=Symbol(`error marker`);return{Jsv_GetError_import:g(()=>t,`Jsv_GetError_import`),JsvError_Check:g(e=>e===t,`JsvError_Check`)}}g(He,`getJsvErrorImport`);function Ue(e){let t={config:e,runtimeEnv:w},n={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Ye(e),print:e.stdout,printErr:e.stderr,onExit(e){n.exitCode=e},thisProgram:e._sysExecutable,arguments:e.args,API:t,locateFile:g(t=>e.indexURL+t,`locateFile`),instantiateWasm:Xe(e.indexURL)};return n}g(Ue,`createSettings`);function We(e){return function(t){try{t.FS.mkdirTree(e)}catch(t){console.error(`Error occurred while making a home directory '${e}':`),console.error(t),console.error(`Using '/' for a home directory instead`),e=`/`}t.FS.chdir(e)}}g(We,`createHomeDirectory`);function Ge(e){return function(t){Object.assign(t.ENV,e)}}g(Ge,`setEnvironment`);function Ke(e){return e?[async t=>{t.addRunDependency(`fsInitHook`);try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency(`fsInitHook`)}}]:[]}g(Ke,`callFsInitHook`);function qe(e){let t=e.HEAPU32[e._Py_Version>>>2];return[t>>>24&255,t>>>16&255,t>>>8&255]}g(qe,`computeVersionTuple`);function Je(e){let t=Me(e);return async e=>{e.API.pyVersionTuple=qe(e);let[n,r]=e.API.pyVersionTuple;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 i=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,i)}catch(e){console.error(`Error occurred while installing the standard library:`),console.error(e)}finally{e.removeRunDependency(`install-stdlib`)}}}g(Je,`installStdlib`);function Ye(e){let t;return t=e.stdLibURL==null?e.indexURL+`python_stdlib.zip`:e.stdLibURL,[Je(t),We(e.env.HOME),Ge(e.env),Re,...Ke(e.fsInit)]}g(Ye,`getFileSystemInitializationFuncs`);function Xe(e){if(typeof WasmOffsetConverter<`u`)return;let{binary:t,response:n}=je(e+`pyodide.asm.wasm`),r=He();return function(e,i){return async function(){let{Jsv_GetError_import:a,JsvError_Check:o}=await r;e.env.Jsv_GetError_import=a,e.env.JsvError_Check=o;try{let r;r=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:o}=r;i(a,o)}catch(e){console.warn(`wasm instantiation failed!`),console.warn(e)}}(),{}}}g(Xe,`getInstantiateWasmFunc`);var Ze=`314.0.0`;function Qe(e){return e===void 0||e.endsWith(`/`)?e:e+`/`}g(Qe,`withTrailingSlash`);var $e=Ze;async function et(e={}){if(await Ce(),e.lockFileContents&&e.lockFileURL)throw Error(`Can't pass both lockFileContents and lockFileURL`);let t=e.indexURL||await Ie();if(t=Qe(Ee(t)),e.packageBaseUrl=Qe(e.packageBaseUrl),e.cdnUrl=Qe(e.packageBaseUrl??`https://cdn.jsdelivr.net/pyodide/v${$e}/full/`),!e.lockFileContents){let n=e.lockFileURL??t+`pyodide-lock.json`;e.lockFileContents=Fe(n),e.packageBaseUrl??=Le(n)}e.indexURL=t,e.packageCacheDir&&=Qe(Ee(e.packageCacheDir));let n={jsglobals:globalThis,stdin:globalThis.prompt?()=>globalThis.prompt():void 0,args:[],env:{},packages:[],packageCacheDir:e.packageBaseUrl,enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:`2ff9f3fe6c88624a7e283d5651688da7f6169834ab51663b07be67c0bd43e53e`},r=Object.assign(n,e);return r.env.HOME??=`/home/pyodide`,r.env.PYTHONINSPECT??=`1`,r}g(et,`initializeConfiguration`);function tt(e){let t=Ue(e),n=t.API;return n.lockFilePromise=Promise.resolve(e.lockFileContents),t}g(tt,`createEmscriptenSettings`);async function nt(e){return e.createPyodideModule?e.createPyodideModule:(await Ne(`${e.indexURL}pyodide.asm.mjs`)).default}g(nt,`loadWasmScript`);async function rt(e,t){if(!e._loadSnapshot)return;let n=await e._loadSnapshot,r=ArrayBuffer.isView(n)?n:new Uint8Array(n);return t.noInitialRun=!0,t.INITIAL_MEMORY=r.length,r}g(rt,`prepareSnapshot`);async function it(e,t){let n=await e(t);if(t.exitCode!==void 0)throw new n.ExitStatus(t.exitCode);return n}g(it,`instantiatePyodideModule`);function at(e,t){let n=e.API;if(t.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),t.convertNullToNone&&n.setCompatNullToNone(!0),t.toJsLiteralMap&&n.setCompatToJsLiteralMap(!0),n.version!==$e&&t.checkAPIVersion)throw Error(`Pyodide version does not match: '${$e}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);e.locateFile=e=>{throw e.endsWith(`.so`)?Error(`Failed to find dynamic library "${e}"`):Error(`Unexpected call to locateFile("${e}")`)}}g(at,`configureAPI`);function ot(e,t,n){let r=e.API,i;return t&&(i=r.restoreSnapshot(t)),r.finalizeBootstrap(i,n._snapshotDeserializer)}g(ot,`bootstrapPyodide`);async function st(e,t){let n=e._api;return n.sys.path.insert(0,``),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(t.stdin,t.stdout,t.stderr),e}g(st,`finalizeSetup`);async function ct(e={}){let t=await et(e),n=tt(t),r=await nt(t),i=await rt(t,n),a=await it(r,n);return at(a,t),await st(ot(a,i,t),t)}g(ct,`loadPyodide`);function lt(e){return e.includes(`dev`),`v${$e}`}var ut=class{buffer;started=!1;onMessage;constructor(e){this.onMessage=e,this.buffer=[]}push=e=>{this.started?this.onMessage(e):this.buffer.push(e)};start=()=>{this.started=!0,this.buffer.forEach(e=>this.onMessage(e)),this.buffer=[]}};const dt={NOOP:()=>{},ASYNC_NOOP:async()=>{},THROW:()=>{throw Error(`Should not be called`)},asUpdater:e=>typeof e==`function`?e:()=>e,identity:e=>e},ft=(e,t)=>{let n=`[${e}]`;return{debug:(...e)=>console.debug(n,...e),log:(...e)=>t.log(n,...e),warn:(...e)=>t.warn(n,...e),error:(...e)=>t.error(n,...e),trace:(...e)=>t.trace(n,...e),get:n=>ft(`${e}:${n}`,t),disabled:(e=!0)=>e?mt:t}},pt={debug:(...e)=>{console.debug(...e)},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>ft(`marimo:${e}`,pt),disabled:(e=!0)=>e?mt:pt},mt={debug:()=>dt.NOOP,log:()=>dt.NOOP,warn:()=>dt.NOOP,error:()=>dt.NOOP,trace:()=>dt.NOOP,get:()=>mt,disabled:()=>mt};function ht(){return typeof window<`u`&&window.Logger||pt}const T=ht();Object.freeze({status:`aborted`});function E(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var D=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},gt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const _t={};function O(e){return e&&Object.assign(_t,e),_t}function vt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function yt(e,t){return typeof t==`bigint`?t.toString():t}function bt(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function xt(e){return e==null}function St(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ct(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}const wt=Symbol(`evaluating`);function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==wt)return r===void 0&&(r=wt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function A(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Tt(e){return JSON.stringify(e)}function Et(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const Dt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ot(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const kt=bt(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function At(e){if(Ot(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ot(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function jt(e){return At(e)?{...e}:Array.isArray(e)?[...e]:e}const Mt=new Set([`string`,`number`,`symbol`]);function Nt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function M(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function N(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Pt(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const Ft={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function It(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return M(e,j(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return A(this,`shape`,e),e},checks:[]}))}function Lt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return M(e,j(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return A(this,`shape`,r),r},checks:[]}))}function Rt(e,t){if(!At(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function zt(e,t){if(!At(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function Bt(e,t){return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return A(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Vt(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return M(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return A(this,`shape`,i),i},checks:[]}))}function Ht(e,t,n){return M(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return A(this,`shape`,i),i}}))}function P(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function F(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ut(e){return typeof e==`string`?e:e?.message}function I(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ut(e.inst?._zod.def?.error?.(e))??Ut(t?.error?.(e))??Ut(n.customError?.(e))??Ut(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Wt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Gt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const Kt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,yt,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},qt=E(`$ZodError`,Kt),Jt=E(`$ZodError`,Kt,{Parent:Error});function Yt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xt(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Zt=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new D;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>I(e,a,O())));throw Dt(t,i?.callee),t}return o.value},Qt=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>I(e,a,O())));throw Dt(t,i?.callee),t}return o.value},$t=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new D;return a.issues.length?{success:!1,error:new(e??qt)(a.issues.map(e=>I(e,i,O())))}:{success:!0,data:a.value}},en=$t(Jt),tn=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>I(e,i,O())))}:{success:!0,data:a.value}},nn=tn(Jt),rn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zt(e)(t,n,i)},an=e=>(t,n,r)=>Zt(e)(t,n,r),on=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Qt(e)(t,n,i)},sn=e=>async(t,n,r)=>Qt(e)(t,n,r),cn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $t(e)(t,n,i)},ln=e=>(t,n,r)=>$t(e)(t,n,r),un=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return tn(e)(t,n,i)},dn=e=>async(t,n,r)=>tn(e)(t,n,r),fn=/^[cC][^\s-]{8,}$/,pn=/^[0-9a-z]+$/,mn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hn=/^[0-9a-vA-V]{20}$/,gn=/^[A-Za-z0-9]{27}$/,_n=/^[a-zA-Z0-9_-]{21}$/,vn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,xn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Sn(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Cn=/^(?:(?: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])$/,wn=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Tn=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,En=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,On=/^[A-Za-z0-9_-]*$/,kn=/^\+[1-9]\d{6,14}$/,An=`(?:(?:\\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])))`,jn=RegExp(`^${An}$`);function Mn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Nn(e){return RegExp(`^${Mn(e)}$`)}function Pn(e){let t=Mn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${An}T(?:${r})$`)}const Fn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},In=/^-?\d+$/,Ln=/^-?\d+(?:\.\d+)?$/,Rn=/^(?:true|false)$/i,zn=/^[^A-Z]*$/,Bn=/^[^a-z]*$/,L=E(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vn={number:`number`,bigint:`bigint`,object:`date`},Hn=E(`$ZodCheckLessThan`,(e,t)=>{L.init(e,t);let n=Vn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Un=E(`$ZodCheckGreaterThan`,(e,t)=>{L.init(e,t);let n=Vn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wn=E(`$ZodCheckMultipleOf`,(e,t)=>{L.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Ct(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gn=E(`$ZodCheckNumberFormat`,(e,t)=>{L.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ft[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=In)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Kn=E(`$ZodCheckMaxLength`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Wt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qn=E(`$ZodCheckMinLength`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Wt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jn=E(`$ZodCheckLengthEquals`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Wt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yn=E(`$ZodCheckStringFormat`,(e,t)=>{var n,r;L.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Xn=E(`$ZodCheckRegex`,(e,t)=>{Yn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zn=E(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=zn,Yn.init(e,t)}),Qn=E(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Bn,Yn.init(e,t)}),$n=E(`$ZodCheckIncludes`,(e,t)=>{L.init(e,t);let n=Nt(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),er=E(`$ZodCheckStartsWith`,(e,t)=>{L.init(e,t);let n=RegExp(`^${Nt(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tr=E(`$ZodCheckEndsWith`,(e,t)=>{L.init(e,t);let n=RegExp(`.*${Nt(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nr=E(`$ZodCheckOverwrite`,(e,t)=>{L.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var rr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
|
+
`).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`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new pe({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new pe({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},`ErrorStackParser$$parseFFOrSafari`)}}g(me,`ErrorStackParser`);var he=new me;function ge(){return typeof API<`u`&&API!==globalThis.API?API.runtimeEnv:_e({IN_BUN:typeof Bun<`u`,IN_DENO:typeof Deno<`u`,IN_NODE:typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`&&!process.browser,IN_SAFARI:typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Chrome`)===-1&&navigator.userAgent.indexOf(`Safari`)>-1,IN_SHELL:typeof read==`function`&&typeof load==`function`,IN_WORKERD:typeof navigator==`object`&&navigator.userAgent?.includes(`Cloudflare-Workers`)})}g(ge,`getGlobalRuntimeEnv`);var w=ge();function _e(e){let t=e.IN_NODE&&typeof module<`u`&&module.exports&&typeof se==`function`&&typeof __dirname==`string`,n=e.IN_NODE&&!t,r=!e.IN_NODE&&!e.IN_DENO&&!e.IN_BUN,i=r&&typeof window<`u`&&typeof window.document<`u`&&typeof document.createElement==`function`&&`sessionStorage`in window&&typeof globalThis.importScripts!=`function`,a=r&&typeof globalThis.WorkerGlobalScope<`u`&&typeof globalThis.self<`u`&&globalThis.self instanceof globalThis.WorkerGlobalScope;if(a&&ve())throw Error(`Classic web workers are not supported`);let o={...e,IN_BROWSER:r,IN_BROWSER_MAIN_THREAD:i,IN_BROWSER_WEB_WORKER:a,IN_NODE_COMMONJS:t,IN_NODE_ESM:n};if(!(o.IN_BROWSER_MAIN_THREAD||o.IN_BROWSER_WEB_WORKER||o.IN_NODE||o.IN_SHELL||o.IN_WORKERD))throw Error(`Cannot determine runtime environment: ${JSON.stringify(o)}`);return o}g(_e,`calculateDerivedFlags`);function ve(){try{return globalThis.importScripts(`data:text/javascript,`),!0}catch{return!1}}g(ve,`isClassicWorker`);var ye,be,xe,Se;async function Ce(){if(!w.IN_NODE||(ye=(await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1))).default,xe=await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1)),Se=await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1)),(await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1))).default,be=await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1)),De=be.sep,typeof se<`u`))return;let e={fs:xe,crypto:await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1)),ws:await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1)),child_process:await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1))};globalThis.require=function(t){return e[t]}}g(Ce,`initNodeModules`);function we(e,t){return be.resolve(t||`.`,e)}g(we,`node_resolvePath`);function Te(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}g(Te,`browser_resolvePath`);var Ee=w.IN_NODE?we:w.IN_SHELL?g(e=>e,`resolvePath`):Te,De;w.IN_NODE||(De=`/`);function Oe(e,t){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?{response:fetch(e)}:{binary:Se.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}g(Oe,`node_getBinaryResponse`);function ke(e,t){if(e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`))throw Error(`Shell cannot fetch urls`);return{binary:Promise.resolve(new Uint8Array(readbuffer(e)))}}g(ke,`shell_getBinaryResponse`);function Ae(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}g(Ae,`browser_getBinaryResponse`);var je=w.IN_NODE?Oe:w.IN_SHELL?ke:Ae;async function Me(e,t){let{response:n,binary:r}=je(e,t);if(r)return r;let i=await n;if(!i.ok)throw Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await i.arrayBuffer())}g(Me,`loadBinaryFile`);var Ne=w.IN_NODE?Pe:g(async e=>await import(e),`loadScript`);async function Pe(e){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?await import(e):await import(ye.pathToFileURL(e).href)}g(Pe,`nodeLoadScript`);async function Fe(e){if(w.IN_NODE){await Ce();let t=await Se.readFile(e,{encoding:`utf8`});return JSON.parse(t)}else if(w.IN_SHELL){let t=read(e);return JSON.parse(t)}else return await(await fetch(e)).json()}g(Fe,`loadLockFile`);async function Ie(){if(w.IN_NODE_COMMONJS)return __dirname;let e;try{throw Error()}catch(t){e=t}let t=he.parse(e)[0].fileName;if(w.IN_NODE&&!t.startsWith(`file://`)&&(t=`file://${t}`),w.IN_NODE_ESM){let e=await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1));return(await import(`./__vite-browser-external-DUz7vvG0.js`).then(l(1))).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(De);if(n===-1)throw Error(`Could not extract indexURL path from pyodide module location. Please pass the indexURL explicitly to loadPyodide.`);return t.slice(0,n)}g(Ie,`calculateDirname`);function Le(e){return e.substring(0,e.lastIndexOf(`/`)+1)||globalThis.location?.toString()||`.`}g(Le,`calculateInstallBaseUrl`);function Re(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,i={DIR_MODE:16895,FILE_MODE:33279,mount:g(function(e){if(!e.opts.fileSystemHandle)throw Error(`opts.fileSystemHandle is required`);return n.mount.apply(null,arguments)},`mount`),syncfs:g(async(e,t,n)=>{try{let r=i.getLocalSet(e),a=await i.getRemoteSet(e),o=t?a:r,s=t?r:a;await i.reconcile(e,o,s),n(null)}catch(e){n(e)}},`syncfs`),getLocalSet:g(e=>{let n=Object.create(null);function i(e){return e!==`.`&&e!==`..`}g(i,`isRealDir`);function a(e){return t=>r.join2(e,t)}g(a,`toAbsolute`);let o=t.readdir(e.mountpoint).filter(i).map(a(e.mountpoint));for(;o.length;){let e=o.pop(),r=t.stat(e);t.isDir(r.mode)&&o.push.apply(o,t.readdir(e).filter(i).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:`local`,entries:n}},`getLocalSet`),getRemoteSet:g(async e=>{let t=Object.create(null),n=await ze(e.opts.fileSystemHandle);for(let[a,o]of n)a!==`.`&&(t[r.join2(e.mountpoint,a)]={timestamp:o.kind===`file`?new Date((await o.getFile()).lastModified):new Date,mode:o.kind===`file`?i.FILE_MODE:i.DIR_MODE});return{type:`remote`,entries:t,handles:n}},`getRemoteSet`),loadLocalEntry:g(e=>{let r=t.lookupPath(e,{}).node,i=t.stat(e);if(t.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(t.isFile(i.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:i.mtime,mode:i.mode,contents:r.contents};throw Error(`node type not supported`)},`loadLocalEntry`),storeLocalEntry:g((e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else if(t.isFile(n.mode))t.writeFile(e,n.contents,{canOwn:!0});else throw Error(`node type not supported`);t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},`storeLocalEntry`),removeLocalEntry:g(e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},`removeLocalEntry`),loadRemoteEntry:g(async e=>{if(e.kind===`file`){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:i.FILE_MODE,timestamp:new Date(t.lastModified)}}else{if(e.kind===`directory`)return{mode:i.DIR_MODE,timestamp:new Date};throw Error(`unknown kind: `+e.kind)}},`loadRemoteEntry`),storeRemoteEntry:g(async(e,n,i)=>{let a=e.get(r.dirname(n)),o=t.isFile(i.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if(o.kind===`file`){let e=await o.createWritable();await e.write(i.contents),await e.close()}e.set(n,o)},`storeRemoteEntry`),removeRemoteEntry:g(async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},`removeRemoteEntry`),reconcile:g(async(e,n,a)=>{let o=0,s=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],i=a.entries[e];(!i||t.isFile(r.mode)&&r.timestamp.getTime()>i.timestamp.getTime())&&(s.push(e),o++)}),s.sort();let c=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(c.push(e),o++)}),c.sort().reverse(),!o)return;let l=n.type===`remote`?n.handles:a.handles;for(let t of s){let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);if(a.type===`local`){let e=l.get(n),r=await i.loadRemoteEntry(e);i.storeLocalEntry(t,r)}else{let e=i.loadLocalEntry(t);await i.storeRemoteEntry(l,n,e)}}for(let t of c)if(a.type===`local`)i.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);await i.removeRemoteEntry(l,n)}},`reconcile`)};e.FS.filesystems.NATIVEFS_ASYNC=i}g(Re,`initializeNativeFS`);var ze=g(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),r.kind===`directory`&&await n(r)}g(n,`collect`),await n(e);let r=new Map;r.set(`.`,e);for(let n of t){let t=(await e.resolve(n)).join(`/`);r.set(t,n)}return r},`getFsHandles`),Be=ce(`AGFzbQEAAAABDANfAGAAAW9gAW8BfwMDAgECBygCE0pzdl9HZXRFcnJvcl9pbXBvcnQAAA5Kc3ZFcnJvcl9DaGVjawABChMCBwD7AQD7GwsJACAA+xr7FAAL`),Ve=async function(){if(!(globalThis.navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&typeof navigator.maxTouchPoints<`u`&&navigator.maxTouchPoints>1)))try{let e=await WebAssembly.compile(Be);return await WebAssembly.instantiate(e)}catch(e){if(e instanceof WebAssembly.CompileError)return;throw e}}();async function He(){let e=await Ve;if(e)return e.exports;let t=Symbol(`error marker`);return{Jsv_GetError_import:g(()=>t,`Jsv_GetError_import`),JsvError_Check:g(e=>e===t,`JsvError_Check`)}}g(He,`getJsvErrorImport`);function Ue(e){let t={config:e,runtimeEnv:w},n={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Ye(e),print:e.stdout,printErr:e.stderr,onExit(e){n.exitCode=e},thisProgram:e._sysExecutable,arguments:e.args,API:t,locateFile:g(t=>e.indexURL+t,`locateFile`),instantiateWasm:Xe(e.indexURL)};return n}g(Ue,`createSettings`);function We(e){return function(t){try{t.FS.mkdirTree(e)}catch(t){console.error(`Error occurred while making a home directory '${e}':`),console.error(t),console.error(`Using '/' for a home directory instead`),e=`/`}t.FS.chdir(e)}}g(We,`createHomeDirectory`);function Ge(e){return function(t){Object.assign(t.ENV,e)}}g(Ge,`setEnvironment`);function Ke(e){return e?[async t=>{t.addRunDependency(`fsInitHook`);try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency(`fsInitHook`)}}]:[]}g(Ke,`callFsInitHook`);function qe(e){let t=e.HEAPU32[e._Py_Version>>>2];return[t>>>24&255,t>>>16&255,t>>>8&255]}g(qe,`computeVersionTuple`);function Je(e){let t=Me(e);return async e=>{e.API.pyVersionTuple=qe(e);let[n,r]=e.API.pyVersionTuple;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 i=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,i)}catch(e){console.error(`Error occurred while installing the standard library:`),console.error(e)}finally{e.removeRunDependency(`install-stdlib`)}}}g(Je,`installStdlib`);function Ye(e){let t;return t=e.stdLibURL==null?e.indexURL+`python_stdlib.zip`:e.stdLibURL,[Je(t),We(e.env.HOME),Ge(e.env),Re,...Ke(e.fsInit)]}g(Ye,`getFileSystemInitializationFuncs`);function Xe(e){if(typeof WasmOffsetConverter<`u`)return;let{binary:t,response:n}=je(e+`pyodide.asm.wasm`),r=He();return function(e,i){return async function(){let{Jsv_GetError_import:a,JsvError_Check:o}=await r;e.env.Jsv_GetError_import=a,e.env.JsvError_Check=o;try{let r;r=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:o}=r;i(a,o)}catch(e){console.warn(`wasm instantiation failed!`),console.warn(e)}}(),{}}}g(Xe,`getInstantiateWasmFunc`);var Ze=`314.0.0`;function Qe(e){return e===void 0||e.endsWith(`/`)?e:e+`/`}g(Qe,`withTrailingSlash`);var $e=Ze;async function et(e={}){if(await Ce(),e.lockFileContents&&e.lockFileURL)throw Error(`Can't pass both lockFileContents and lockFileURL`);let t=e.indexURL||await Ie();if(t=Qe(Ee(t)),e.packageBaseUrl=Qe(e.packageBaseUrl),e.cdnUrl=Qe(e.packageBaseUrl??`https://cdn.jsdelivr.net/pyodide/v${$e}/full/`),!e.lockFileContents){let n=e.lockFileURL??t+`pyodide-lock.json`;e.lockFileContents=Fe(n),e.packageBaseUrl??=Le(n)}e.indexURL=t,e.packageCacheDir&&=Qe(Ee(e.packageCacheDir));let n={jsglobals:globalThis,stdin:globalThis.prompt?()=>globalThis.prompt():void 0,args:[],env:{},packages:[],packageCacheDir:e.packageBaseUrl,enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:`2ff9f3fe6c88624a7e283d5651688da7f6169834ab51663b07be67c0bd43e53e`},r=Object.assign(n,e);return r.env.HOME??=`/home/pyodide`,r.env.PYTHONINSPECT??=`1`,r}g(et,`initializeConfiguration`);function tt(e){let t=Ue(e),n=t.API;return n.lockFilePromise=Promise.resolve(e.lockFileContents),t}g(tt,`createEmscriptenSettings`);async function nt(e){return e.createPyodideModule?e.createPyodideModule:(await Ne(`${e.indexURL}pyodide.asm.mjs`)).default}g(nt,`loadWasmScript`);async function rt(e,t){if(!e._loadSnapshot)return;let n=await e._loadSnapshot,r=ArrayBuffer.isView(n)?n:new Uint8Array(n);return t.noInitialRun=!0,t.INITIAL_MEMORY=r.length,r}g(rt,`prepareSnapshot`);async function it(e,t){let n=await e(t);if(t.exitCode!==void 0)throw new n.ExitStatus(t.exitCode);return n}g(it,`instantiatePyodideModule`);function at(e,t){let n=e.API;if(t.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),t.convertNullToNone&&n.setCompatNullToNone(!0),t.toJsLiteralMap&&n.setCompatToJsLiteralMap(!0),n.version!==$e&&t.checkAPIVersion)throw Error(`Pyodide version does not match: '${$e}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);e.locateFile=e=>{throw e.endsWith(`.so`)?Error(`Failed to find dynamic library "${e}"`):Error(`Unexpected call to locateFile("${e}")`)}}g(at,`configureAPI`);function ot(e,t,n){let r=e.API,i;return t&&(i=r.restoreSnapshot(t)),r.finalizeBootstrap(i,n._snapshotDeserializer)}g(ot,`bootstrapPyodide`);async function st(e,t){let n=e._api;return n.sys.path.insert(0,``),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(t.stdin,t.stdout,t.stderr),e}g(st,`finalizeSetup`);async function ct(e={}){let t=await et(e),n=tt(t),r=await nt(t),i=await rt(t,n),a=await it(r,n);return at(a,t),await st(ot(a,i,t),t)}g(ct,`loadPyodide`);function lt(e){return e.includes(`dev`),`v${$e}`}var ut=class{buffer;started=!1;onMessage;constructor(e){this.onMessage=e,this.buffer=[]}push=e=>{this.started?this.onMessage(e):this.buffer.push(e)};start=()=>{this.started=!0,this.buffer.forEach(e=>this.onMessage(e)),this.buffer=[]}};const dt={NOOP:()=>{},ASYNC_NOOP:async()=>{},THROW:()=>{throw Error(`Should not be called`)},asUpdater:e=>typeof e==`function`?e:()=>e,identity:e=>e},ft=(e,t)=>{let n=`[${e}]`;return{debug:(...e)=>console.debug(n,...e),log:(...e)=>t.log(n,...e),warn:(...e)=>t.warn(n,...e),error:(...e)=>t.error(n,...e),trace:(...e)=>t.trace(n,...e),get:n=>ft(`${e}:${n}`,t),disabled:(e=!0)=>e?mt:t}},pt={debug:(...e)=>{console.debug(...e)},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>ft(`marimo:${e}`,pt),disabled:(e=!0)=>e?mt:pt},mt={debug:()=>dt.NOOP,log:()=>dt.NOOP,warn:()=>dt.NOOP,error:()=>dt.NOOP,trace:()=>dt.NOOP,get:()=>mt,disabled:()=>mt};function ht(){return typeof window<`u`&&window.Logger||pt}const T=ht();Object.freeze({status:`aborted`});function E(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var D=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},gt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const _t={};function O(e){return e&&Object.assign(_t,e),_t}function vt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function yt(e,t){return typeof t==`bigint`?t.toString():t}function bt(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function xt(e){return e==null}function St(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ct(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}const wt=Symbol(`evaluating`);function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==wt)return r===void 0&&(r=wt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function A(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Tt(e){return JSON.stringify(e)}function Et(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const Dt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ot(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const kt=bt(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function At(e){if(Ot(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ot(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function jt(e){return At(e)?{...e}:Array.isArray(e)?[...e]:e}const Mt=new Set([`string`,`number`,`symbol`]);function Nt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function M(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function N(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Pt(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const Ft={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function It(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return M(e,j(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return A(this,`shape`,e),e},checks:[]}))}function Lt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return M(e,j(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return A(this,`shape`,r),r},checks:[]}))}function Rt(e,t){if(!At(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function zt(e,t){if(!At(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function Bt(e,t){return M(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return A(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Vt(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return M(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return A(this,`shape`,i),i},checks:[]}))}function Ht(e,t,n){return M(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return A(this,`shape`,i),i}}))}function P(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function F(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ut(e){return typeof e==`string`?e:e?.message}function I(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ut(e.inst?._zod.def?.error?.(e))??Ut(t?.error?.(e))??Ut(n.customError?.(e))??Ut(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Wt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Gt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const Kt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,yt,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},qt=E(`$ZodError`,Kt),Jt=E(`$ZodError`,Kt,{Parent:Error});function Yt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Xt(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Zt=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new D;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>I(e,a,O())));throw Dt(t,i?.callee),t}return o.value},Qt=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>I(e,a,O())));throw Dt(t,i?.callee),t}return o.value},$t=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new D;return a.issues.length?{success:!1,error:new(e??qt)(a.issues.map(e=>I(e,i,O())))}:{success:!0,data:a.value}},en=$t(Jt),tn=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>I(e,i,O())))}:{success:!0,data:a.value}},nn=tn(Jt),rn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Zt(e)(t,n,i)},an=e=>(t,n,r)=>Zt(e)(t,n,r),on=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Qt(e)(t,n,i)},sn=e=>async(t,n,r)=>Qt(e)(t,n,r),cn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return $t(e)(t,n,i)},ln=e=>(t,n,r)=>$t(e)(t,n,r),un=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return tn(e)(t,n,i)},dn=e=>async(t,n,r)=>tn(e)(t,n,r),fn=/^[cC][^\s-]{8,}$/,pn=/^[0-9a-z]+$/,mn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hn=/^[0-9a-vA-V]{20}$/,gn=/^[A-Za-z0-9]{27}$/,_n=/^[a-zA-Z0-9_-]{21}$/,vn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,xn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Sn(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Cn=/^(?:(?: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])$/,wn=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Tn=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,En=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,On=/^[A-Za-z0-9_-]*$/,kn=/^\+[1-9]\d{6,14}$/,An=`(?:(?:\\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])))`,jn=RegExp(`^${An}$`);function Mn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Nn(e){return RegExp(`^${Mn(e)}$`)}function Pn(e){let t=Mn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${An}T(?:${r})$`)}const Fn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},In=/^-?\d+$/,Ln=/^-?\d+(?:\.\d+)?$/,Rn=/^(?:true|false)$/i,zn=/^[^A-Z]*$/,Bn=/^[^a-z]*$/,L=E(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vn={number:`number`,bigint:`bigint`,object:`date`},Hn=E(`$ZodCheckLessThan`,(e,t)=>{L.init(e,t);let n=Vn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Un=E(`$ZodCheckGreaterThan`,(e,t)=>{L.init(e,t);let n=Vn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wn=E(`$ZodCheckMultipleOf`,(e,t)=>{L.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Ct(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gn=E(`$ZodCheckNumberFormat`,(e,t)=>{L.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ft[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=In)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Kn=E(`$ZodCheckMaxLength`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Wt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qn=E(`$ZodCheckMinLength`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Wt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jn=E(`$ZodCheckLengthEquals`,(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!xt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Wt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yn=E(`$ZodCheckStringFormat`,(e,t)=>{var n,r;L.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Xn=E(`$ZodCheckRegex`,(e,t)=>{Yn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zn=E(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=zn,Yn.init(e,t)}),Qn=E(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Bn,Yn.init(e,t)}),$n=E(`$ZodCheckIncludes`,(e,t)=>{L.init(e,t);let n=Nt(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),er=E(`$ZodCheckStartsWith`,(e,t)=>{L.init(e,t);let n=RegExp(`^${Nt(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tr=E(`$ZodCheckEndsWith`,(e,t)=>{L.init(e,t);let n=RegExp(`.*${Nt(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nr=E(`$ZodCheckOverwrite`,(e,t)=>{L.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var rr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
4
4
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
5
5
|
`))}};const ir={major:4,minor:3,patch:6},R=E(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ir;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=P(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new D;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=P(e,t))});else{if(e.issues.length===t)continue;r||=P(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(P(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new D;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new D;return o.then(e=>t(e,r,a))}return t(o,r,a)}}k(e,`~standard`,()=>({validate:t=>{try{let n=en(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return nn(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ar=E(`$ZodString`,(e,t)=>{R.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Fn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),z=E(`$ZodStringFormat`,(e,t)=>{Yn.init(e,t),ar.init(e,t)}),or=E(`$ZodGUID`,(e,t)=>{t.pattern??=yn,z.init(e,t)}),sr=E(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=bn(e)}else t.pattern??=bn();z.init(e,t)}),cr=E(`$ZodEmail`,(e,t)=>{t.pattern??=xn,z.init(e,t)}),lr=E(`$ZodURL`,(e,t)=>{z.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ur=E(`$ZodEmoji`,(e,t)=>{t.pattern??=Sn(),z.init(e,t)}),dr=E(`$ZodNanoID`,(e,t)=>{t.pattern??=_n,z.init(e,t)}),fr=E(`$ZodCUID`,(e,t)=>{t.pattern??=fn,z.init(e,t)}),pr=E(`$ZodCUID2`,(e,t)=>{t.pattern??=pn,z.init(e,t)}),mr=E(`$ZodULID`,(e,t)=>{t.pattern??=mn,z.init(e,t)}),hr=E(`$ZodXID`,(e,t)=>{t.pattern??=hn,z.init(e,t)}),gr=E(`$ZodKSUID`,(e,t)=>{t.pattern??=gn,z.init(e,t)}),_r=E(`$ZodISODateTime`,(e,t)=>{t.pattern??=Pn(t),z.init(e,t)}),vr=E(`$ZodISODate`,(e,t)=>{t.pattern??=jn,z.init(e,t)}),yr=E(`$ZodISOTime`,(e,t)=>{t.pattern??=Nn(t),z.init(e,t)}),br=E(`$ZodISODuration`,(e,t)=>{t.pattern??=vn,z.init(e,t)}),xr=E(`$ZodIPv4`,(e,t)=>{t.pattern??=Cn,z.init(e,t),e._zod.bag.format=`ipv4`}),Sr=E(`$ZodIPv6`,(e,t)=>{t.pattern??=wn,z.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Cr=E(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Tn,z.init(e,t)}),wr=E(`$ZodCIDRv6`,(e,t)=>{t.pattern??=En,z.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Tr(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Er=E(`$ZodBase64`,(e,t)=>{t.pattern??=Dn,z.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Dr(e){if(!On.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Tr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const Or=E(`$ZodBase64URL`,(e,t)=>{t.pattern??=On,z.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),kr=E(`$ZodE164`,(e,t)=>{t.pattern??=kn,z.init(e,t)});function Ar(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const jr=E(`$ZodJWT`,(e,t)=>{z.init(e,t),e._zod.check=n=>{Ar(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Mr=E(`$ZodNumber`,(e,t)=>{R.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Nr=E(`$ZodNumberFormat`,(e,t)=>{Gn.init(e,t),Mr.init(e,t)}),Pr=E(`$ZodBoolean`,(e,t)=>{R.init(e,t),e._zod.pattern=Rn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Fr=E(`$ZodUnknown`,(e,t)=>{R.init(e,t),e._zod.parse=e=>e}),Ir=E(`$ZodNever`,(e,t)=>{R.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Lr(e,t,n){e.issues.length&&t.issues.push(...F(n,e.issues)),t.value[n]=e.value}const Rr=E(`$ZodArray`,(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Lr(t,n,e))):Lr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function zr(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...F(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Br(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Pt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Vr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>zr(e,n,i,t,u))):zr(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Hr=E(`$ZodObject`,(e,t)=>{if(R.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=bt(()=>Br(t));k(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Ot,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>zr(n,t,e,s,r))):zr(i,t,e,s,r)}return i?Vr(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Ur=E(`$ZodObjectJIT`,(e,t)=>{Hr.init(e,t);let n=e._zod.parse,r=bt(()=>Br(t)),i=e=>{let t=new rr([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Tt(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Tt(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
6
6
|
if (${n}.issues.length) {
|
|
@@ -38,7 +38,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
38
38
|
|
|
39
39
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ot,s=!_t.jitless,c=s&&kt.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Vr([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Wr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!P(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>I(e,r,O())))}),t)}const Gr=E(`$ZodUnion`,(e,t)=>{R.init(e,t),k(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),k(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),k(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),k(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>St(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Wr(t,i,e,a)):Wr(s,i,e,a)}}),Kr=E(`$ZodIntersection`,(e,t)=>{R.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Jr(e,t,n)):Jr(e,i,a)}});function qr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(At(e)&&At(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=qr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=qr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Jr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),P(e))return e;let o=qr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Yr=E(`$ZodRecord`,(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!At(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...F(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...F(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Ln.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>I(e,r,O())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...F(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...F(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Xr=E(`$ZodEnum`,(e,t)=>{R.init(e,t);let n=vt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Mt.has(typeof e)).map(e=>typeof e==`string`?Nt(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Zr=E(`$ZodTransform`,(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new gt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new D;return n.value=i,n}});function Qr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $r=E(`$ZodOptional`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${St(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Qr(t,e.value)):Qr(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ei=E(`$ZodExactOptional`,(e,t)=>{$r.init(e,t),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ti=E(`$ZodNullable`,(e,t)=>{R.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${St(e.source)}|null)$`):void 0}),k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ni=E(`$ZodDefault`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ri(e,t)):ri(r,t)}});function ri(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ii=E(`$ZodPrefault`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ai=E(`$ZodNonOptional`,(e,t)=>{R.init(e,t),k(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>oi(t,e)):oi(i,e)}});function oi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const si=E(`$ZodCatch`,(e,t)=>{R.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>I(e,n,O()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>I(e,n,O()))},input:e.value}),e.issues=[]),e)}}),ci=E(`$ZodPipe`,(e,t)=>{R.init(e,t),k(e._zod,`values`,()=>t.in._zod.values),k(e._zod,`optin`,()=>t.in._zod.optin),k(e._zod,`optout`,()=>t.out._zod.optout),k(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>li(e,t.in,n)):li(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>li(e,t.out,n)):li(r,t.out,n)}});function li(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ui=E(`$ZodReadonly`,(e,t)=>{R.init(e,t),k(e._zod,`propValues`,()=>t.innerType._zod.propValues),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`optin`,()=>t.innerType?._zod?.optin),k(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(di):di(r)}});function di(e){return e.value=Object.freeze(e.value),e}const fi=E(`$ZodCustom`,(e,t)=>{L.init(e,t),R.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>pi(t,n,r,e));pi(i,n,r,e)}});function pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Gt(e))}}var mi,hi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function gi(){return new hi}(mi=globalThis).__zod_globalRegistry??(mi.__zod_globalRegistry=gi());const _i=globalThis.__zod_globalRegistry;function vi(e,t){return new e({type:`string`,...N(t)})}function yi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...N(t)})}function bi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...N(t)})}function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...N(t)})}function Si(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...N(t)})}function Ci(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...N(t)})}function wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...N(t)})}function Ti(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...N(t)})}function Ei(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...N(t)})}function Di(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...N(t)})}function Oi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...N(t)})}function ki(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...N(t)})}function Ai(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...N(t)})}function ji(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...N(t)})}function Mi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...N(t)})}function Ni(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...N(t)})}function Pi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...N(t)})}function Fi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...N(t)})}function Ii(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...N(t)})}function Li(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...N(t)})}function Ri(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...N(t)})}function zi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...N(t)})}function Bi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...N(t)})}function Vi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...N(t)})}function Hi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...N(t)})}function Ui(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...N(t)})}function Wi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...N(t)})}function Gi(e,t){return new e({type:`number`,checks:[],...N(t)})}function Ki(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...N(t)})}function qi(e,t){return new e({type:`boolean`,...N(t)})}function Ji(e){return new e({type:`unknown`})}function Yi(e,t){return new e({type:`never`,...N(t)})}function Xi(e,t){return new Hn({check:`less_than`,...N(t),value:e,inclusive:!1})}function Zi(e,t){return new Hn({check:`less_than`,...N(t),value:e,inclusive:!0})}function Qi(e,t){return new Un({check:`greater_than`,...N(t),value:e,inclusive:!1})}function $i(e,t){return new Un({check:`greater_than`,...N(t),value:e,inclusive:!0})}function ea(e,t){return new Wn({check:`multiple_of`,...N(t),value:e})}function ta(e,t){return new Kn({check:`max_length`,...N(t),maximum:e})}function na(e,t){return new qn({check:`min_length`,...N(t),minimum:e})}function ra(e,t){return new Jn({check:`length_equals`,...N(t),length:e})}function ia(e,t){return new Xn({check:`string_format`,format:`regex`,...N(t),pattern:e})}function aa(e){return new Zn({check:`string_format`,format:`lowercase`,...N(e)})}function oa(e){return new Qn({check:`string_format`,format:`uppercase`,...N(e)})}function sa(e,t){return new $n({check:`string_format`,format:`includes`,...N(t),includes:e})}function ca(e,t){return new er({check:`string_format`,format:`starts_with`,...N(t),prefix:e})}function la(e,t){return new tr({check:`string_format`,format:`ends_with`,...N(t),suffix:e})}function B(e){return new nr({check:`overwrite`,tx:e})}function ua(e){return B(t=>t.normalize(e))}function da(){return B(e=>e.trim())}function fa(){return B(e=>e.toLowerCase())}function pa(){return B(e=>e.toUpperCase())}function ma(){return B(e=>Et(e))}function ha(e,t,n){return new e({type:`array`,element:t,...N(n)})}function ga(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...N(n)})}function _a(e){let t=va(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Gt(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Gt(r))}},e(n.value,n)));return t}function va(e,t){let n=new L({check:`custom`,...N(t)});return n._zod.check=e,n}function ya(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??_i,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function V(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,V(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&H(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ba(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
40
40
|
|
|
41
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function xa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Ca(t,`input`,e.processors),output:Ca(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function H(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return H(r.element,n);if(r.type===`set`)return H(r.valueType,n);if(r.type===`lazy`)return H(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return H(r.innerType,n);if(r.type===`intersection`)return H(r.left,n)||H(r.right,n);if(r.type===`record`||r.type===`map`)return H(r.keyType,n)||H(r.valueType,n);if(r.type===`pipe`)return H(r.in,n)||H(r.out,n);if(r.type===`object`){for(let e in r.shape)if(H(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(H(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(H(e,n))return!0;return!!(r.rest&&H(r.rest,n))}return!1}const Sa=(e,t={})=>n=>{let r=ya({...n,processors:t});return V(e,r),ba(r,e),xa(r,e)},Ca=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ya({...i??{},target:a,io:t,processors:n});return V(e,o),ba(o,e),xa(o,e)},wa={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ta=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=wa[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ea=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Da=(e,t,n,r)=>{n.type=`boolean`},Oa=(e,t,n,r)=>{n.not={}},ka=(e,t,n,r)=>{let i=e._zod.def,a=vt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Aa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ja=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ma=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=V(a.element,t,{...r,path:[...r.path,`items`]})},Na=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=V(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=V(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Pa=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>V(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Fa=(e,t,n,r)=>{let i=e._zod.def,a=V(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=V(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ia=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=V(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=V(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=V(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},La=(e,t,n,r)=>{let i=e._zod.def,a=V(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ra=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},za=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ba=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Va=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ha=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;V(a,t,r);let o=t.seen.get(e);o.ref=a},Ua=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Wa=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ga=E(`ZodISODateTime`,(e,t)=>{_r.init(e,t),K.init(e,t)});function Ka(e){return Vi(Ga,e)}const qa=E(`ZodISODate`,(e,t)=>{vr.init(e,t),K.init(e,t)});function Ja(e){return Hi(qa,e)}const Ya=E(`ZodISOTime`,(e,t)=>{yr.init(e,t),K.init(e,t)});function Xa(e){return Ui(Ya,e)}const Za=E(`ZodISODuration`,(e,t)=>{br.init(e,t),K.init(e,t)});function Qa(e){return Wi(Za,e)}const $a=(e,t)=>{qt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Xt(e,t)},flatten:{value:t=>Yt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,yt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,yt,2)}},isEmpty:{get(){return e.issues.length===0}}})};E(`ZodError`,$a);const U=E(`ZodError`,$a,{Parent:Error}),eo=Zt(U),to=Qt(U),no=$t(U),ro=tn(U),io=rn(U),ao=an(U),oo=on(U),so=sn(U),co=cn(U),lo=ln(U),uo=un(U),fo=dn(U),W=E(`ZodType`,(e,t)=>(R.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Ca(e,`input`),output:Ca(e,`output`)}}),e.toJSONSchema=Sa(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(j(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>M(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>eo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>no(e,t,n),e.parseAsync=async(t,n)=>to(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ro(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>io(e,t,n),e.decode=(t,n)=>ao(e,t,n),e.encodeAsync=async(t,n)=>oo(e,t,n),e.decodeAsync=async(t,n)=>so(e,t,n),e.safeEncode=(t,n)=>co(e,t,n),e.safeDecode=(t,n)=>lo(e,t,n),e.safeEncodeAsync=async(t,n)=>uo(e,t,n),e.safeDecodeAsync=async(t,n)=>fo(e,t,n),e.refine=(t,n)=>e.check(bs(t,n)),e.superRefine=t=>e.check(xs(t)),e.overwrite=t=>e.check(B(t)),e.optional=()=>ns(e),e.exactOptional=()=>is(e),e.nullable=()=>os(e),e.nullish=()=>ns(os(e)),e.nonoptional=t=>fs(e,t),e.array=()=>Uo(e),e.or=t=>qo([e,t]),e.and=t=>Yo(e,t),e.transform=t=>gs(e,es(t)),e.default=t=>cs(e,t),e.prefault=t=>us(e,t),e.catch=t=>ms(e,t),e.pipe=t=>gs(e,t),e.readonly=()=>vs(e),e.describe=t=>{let n=e.clone();return _i.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return _i.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return _i.get(e);let n=e.clone();return _i.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),po=E(`_ZodString`,(e,t)=>{ar.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ia(...t)),e.includes=(...t)=>e.check(sa(...t)),e.startsWith=(...t)=>e.check(ca(...t)),e.endsWith=(...t)=>e.check(la(...t)),e.min=(...t)=>e.check(na(...t)),e.max=(...t)=>e.check(ta(...t)),e.length=(...t)=>e.check(ra(...t)),e.nonempty=(...t)=>e.check(na(1,...t)),e.lowercase=t=>e.check(aa(t)),e.uppercase=t=>e.check(oa(t)),e.trim=()=>e.check(da()),e.normalize=(...t)=>e.check(ua(...t)),e.toLowerCase=()=>e.check(fa()),e.toUpperCase=()=>e.check(pa()),e.slugify=()=>e.check(ma())}),mo=E(`ZodString`,(e,t)=>{ar.init(e,t),po.init(e,t),e.email=t=>e.check(yi(ho,t)),e.url=t=>e.check(Ti(vo,t)),e.jwt=t=>e.check(Bi(No,t)),e.emoji=t=>e.check(Ei(yo,t)),e.guid=t=>e.check(bi(go,t)),e.uuid=t=>e.check(xi(_o,t)),e.uuidv4=t=>e.check(Si(_o,t)),e.uuidv6=t=>e.check(Ci(_o,t)),e.uuidv7=t=>e.check(wi(_o,t)),e.nanoid=t=>e.check(Di(bo,t)),e.guid=t=>e.check(bi(go,t)),e.cuid=t=>e.check(Oi(xo,t)),e.cuid2=t=>e.check(ki(So,t)),e.ulid=t=>e.check(Ai(Co,t)),e.base64=t=>e.check(Li(Ao,t)),e.base64url=t=>e.check(Ri(jo,t)),e.xid=t=>e.check(ji(wo,t)),e.ksuid=t=>e.check(Mi(To,t)),e.ipv4=t=>e.check(Ni(Eo,t)),e.ipv6=t=>e.check(Pi(Do,t)),e.cidrv4=t=>e.check(Fi(Oo,t)),e.cidrv6=t=>e.check(Ii(ko,t)),e.e164=t=>e.check(zi(Mo,t)),e.datetime=t=>e.check(Ka(t)),e.date=t=>e.check(Ja(t)),e.time=t=>e.check(Xa(t)),e.duration=t=>e.check(Qa(t))});function G(e){return vi(mo,e)}const K=E(`ZodStringFormat`,(e,t)=>{z.init(e,t),po.init(e,t)}),ho=E(`ZodEmail`,(e,t)=>{cr.init(e,t),K.init(e,t)}),go=E(`ZodGUID`,(e,t)=>{or.init(e,t),K.init(e,t)}),_o=E(`ZodUUID`,(e,t)=>{sr.init(e,t),K.init(e,t)}),vo=E(`ZodURL`,(e,t)=>{lr.init(e,t),K.init(e,t)}),yo=E(`ZodEmoji`,(e,t)=>{ur.init(e,t),K.init(e,t)}),bo=E(`ZodNanoID`,(e,t)=>{dr.init(e,t),K.init(e,t)}),xo=E(`ZodCUID`,(e,t)=>{fr.init(e,t),K.init(e,t)}),So=E(`ZodCUID2`,(e,t)=>{pr.init(e,t),K.init(e,t)}),Co=E(`ZodULID`,(e,t)=>{mr.init(e,t),K.init(e,t)}),wo=E(`ZodXID`,(e,t)=>{hr.init(e,t),K.init(e,t)}),To=E(`ZodKSUID`,(e,t)=>{gr.init(e,t),K.init(e,t)}),Eo=E(`ZodIPv4`,(e,t)=>{xr.init(e,t),K.init(e,t)}),Do=E(`ZodIPv6`,(e,t)=>{Sr.init(e,t),K.init(e,t)}),Oo=E(`ZodCIDRv4`,(e,t)=>{Cr.init(e,t),K.init(e,t)}),ko=E(`ZodCIDRv6`,(e,t)=>{wr.init(e,t),K.init(e,t)}),Ao=E(`ZodBase64`,(e,t)=>{Er.init(e,t),K.init(e,t)}),jo=E(`ZodBase64URL`,(e,t)=>{Or.init(e,t),K.init(e,t)}),Mo=E(`ZodE164`,(e,t)=>{kr.init(e,t),K.init(e,t)}),No=E(`ZodJWT`,(e,t)=>{jr.init(e,t),K.init(e,t)}),Po=E(`ZodNumber`,(e,t)=>{Mr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ea(e,t,n,r),e.gt=(t,n)=>e.check(Qi(t,n)),e.gte=(t,n)=>e.check($i(t,n)),e.min=(t,n)=>e.check($i(t,n)),e.lt=(t,n)=>e.check(Xi(t,n)),e.lte=(t,n)=>e.check(Zi(t,n)),e.max=(t,n)=>e.check(Zi(t,n)),e.int=t=>e.check(Io(t)),e.safe=t=>e.check(Io(t)),e.positive=t=>e.check(Qi(0,t)),e.nonnegative=t=>e.check($i(0,t)),e.negative=t=>e.check(Xi(0,t)),e.nonpositive=t=>e.check(Zi(0,t)),e.multipleOf=(t,n)=>e.check(ea(t,n)),e.step=(t,n)=>e.check(ea(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function q(e){return Gi(Po,e)}const Fo=E(`ZodNumberFormat`,(e,t)=>{Nr.init(e,t),Po.init(e,t)});function Io(e){return Ki(Fo,e)}const Lo=E(`ZodBoolean`,(e,t)=>{Pr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Da(e,t,n,r)});function J(e){return qi(Lo,e)}const Ro=E(`ZodUnknown`,(e,t)=>{Fr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function zo(){return Ji(Ro)}const Bo=E(`ZodNever`,(e,t)=>{Ir.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oa(e,t,n,r)});function Vo(e){return Yi(Bo,e)}const Ho=E(`ZodArray`,(e,t)=>{Rr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(na(t,n)),e.nonempty=t=>e.check(na(1,t)),e.max=(t,n)=>e.check(ta(t,n)),e.length=(t,n)=>e.check(ra(t,n)),e.unwrap=()=>e.element});function Uo(e,t){return ha(Ho,e,t)}const Wo=E(`ZodObject`,(e,t)=>{Ur.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),k(e,`shape`,()=>t.shape),e.keyof=()=>X(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:zo()}),e.loose=()=>e.clone({...e._zod.def,catchall:zo()}),e.strict=()=>e.clone({...e._zod.def,catchall:Vo()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Rt(e,t),e.safeExtend=t=>zt(e,t),e.merge=t=>Bt(e,t),e.pick=t=>It(e,t),e.omit=t=>Lt(e,t),e.partial=(...t)=>Vt(ts,e,t[0]),e.required=(...t)=>Ht(ds,e,t[0])});function Go(e,t){return new Wo({type:`object`,shape:e??{},...N(t)})}function Y(e,t){return new Wo({type:`object`,shape:e,catchall:zo(),...N(t)})}const Ko=E(`ZodUnion`,(e,t)=>{Gr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r),e.options=t.options});function qo(e,t){return new Ko({type:`union`,options:e,...N(t)})}const Jo=E(`ZodIntersection`,(e,t)=>{Kr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fa(e,t,n,r)});function Yo(e,t){return new Jo({type:`intersection`,left:e,right:t})}const Xo=E(`ZodRecord`,(e,t)=>{Yr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ia(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Zo(e,t,n){return new Xo({type:`record`,keyType:e,valueType:t,...N(n)})}const Qo=E(`ZodEnum`,(e,t)=>{Xr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ka(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Qo({...t,checks:[],...N(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Qo({...t,checks:[],...N(r),entries:i})}});function X(e,t){return new Qo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...N(t)})}const $o=E(`ZodTransform`,(e,t)=>{Zr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ja(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new gt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Gt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Gt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function es(e){return new $o({type:`transform`,transform:e})}const ts=E(`ZodOptional`,(e,t)=>{$r.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ns(e){return new ts({type:`optional`,innerType:e})}const rs=E(`ZodExactOptional`,(e,t)=>{ei.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function is(e){return new rs({type:`optional`,innerType:e})}const as=E(`ZodNullable`,(e,t)=>{ti.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function os(e){return new as({type:`nullable`,innerType:e})}const ss=E(`ZodDefault`,(e,t)=>{ni.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cs(e,t){return new ss({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}const ls=E(`ZodPrefault`,(e,t)=>{ii.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function us(e,t){return new ls({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}const ds=E(`ZodNonOptional`,(e,t)=>{ai.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fs(e,t){return new ds({type:`nonoptional`,innerType:e,...N(t)})}const ps=E(`ZodCatch`,(e,t)=>{si.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ms(e,t){return new ps({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const hs=E(`ZodPipe`,(e,t)=>{ci.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r),e.in=t.in,e.out=t.out});function gs(e,t){return new hs({type:`pipe`,in:e,out:t})}const _s=E(`ZodReadonly`,(e,t)=>{ui.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vs(e){return new _s({type:`readonly`,innerType:e})}const ys=E(`ZodCustom`,(e,t)=>{fi.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aa(e,t,n,r)});function bs(e,t={}){return ga(ys,e,t)}function xs(e){return _a(e)}const Ss=Go({detail:G()}),Cs=Go({error:G()});function ws(e){if(!e)return`Unknown error`;if(e instanceof Error){let t=Ss.safeParse(e.cause);return t.success?t.data.detail:Ts(e.message)}if(typeof e==`object`){let t=Ss.safeParse(e);if(t.success)return t.data.detail;let n=Cs.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function Ts(e){let t=Es(e);if(!t)return e;let n=Ss.safeParse(t);if(n.success)return n.data.detail;let r=Cs.safeParse(t);return r.success?r.data.error:e}function Es(e){try{return JSON.parse(e)}catch{return e}}function Ds(e,t){if(!e)throw Error(t)}const Os=[`pip`,`uv`,`rye`,`poetry`,`pixi`],ks=[`normal`,`compact`,`medium`,`full`,`columns`],As=[`auto`,`native`,`polars`,`lazy-polars`,`pandas`],js=[`html`,`markdown`,`ipynb`],Ms=[`manual`,`ask`,`agent`,`code_mode`],Z=Go({api_key:G().optional(),base_url:G().optional(),project:G().optional()}).loose(),Ns=Go({chat_model:G().nullish(),edit_model:G().nullish(),autocomplete_model:G().nullish(),displayed_models:Uo(G()).default([]),custom_models:Uo(G()).default([])}),Ps=Y({completion:Go({activate_on_typing:J().prefault(!0),signature_hint_on_typing:J().prefault(!1),auto_close_pairs:J().prefault(!0),copilot:qo([J(),X([`github`,`codeium`,`custom`])]).prefault(!1).transform(e=>e===!0?`github`:e),codeium_api_key:G().nullish()}).prefault({}),save:Y({autosave:X([`off`,`after_delay`]).prefault(`after_delay`),autosave_delay:q().nonnegative().transform(e=>Math.max(e,1e3)).prefault(1e3),format_on_save:J().prefault(!1)}).prefault({}),formatting:Y({line_length:q().nonnegative().prefault(79).transform(e=>Math.min(e,1e3))}).prefault({}),keymap:Y({preset:X([`default`,`vim`]).prefault(`default`),overrides:Zo(G(),G()).prefault({}),destructive_delete:J().prefault(!0)}).prefault({}),runtime:Y({auto_instantiate:J().prefault(!0),on_cell_change:X([`lazy`,`autorun`]).prefault(`autorun`),auto_reload:X([`off`,`lazy`,`autorun`]).prefault(`off`),reactive_tests:J().prefault(!0),watcher_on_save:X([`lazy`,`autorun`]).prefault(`lazy`),default_sql_output:X(As).prefault(`auto`),default_auto_download:Uo(X(js)).prefault([]),show_tracebacks:J().prefault(!1)}).prefault({}),display:Y({theme:X([`light`,`dark`,`system`]).prefault(`light`),code_editor_font_size:q().nonnegative().prefault(14),cell_output:X([`above`,`below`]).prefault(`below`),dataframes:X([`rich`,`plain`]).prefault(`rich`),default_table_page_size:q().prefault(10),default_table_max_columns:q().prefault(50),default_width:X(ks).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),locale:G().nullable().optional(),reference_highlighting:J().prefault(!0)}).prefault({}),package_management:Y({manager:X(Os).prefault(`pip`)}).prefault({}),ai:Y({enabled:J().prefault(!0),rules:G().prefault(``),max_tokens:q().int().positive().nullable().optional(),mode:X(Ms).prefault(`manual`),inline_tooltip:J().prefault(!1),open_ai:Z.optional(),anthropic:Z.optional(),google:Z.optional(),ollama:Z.optional(),openrouter:Z.optional(),wandb:Z.optional(),opencode_go:Z.optional(),open_ai_compatible:Z.optional(),azure:Z.optional(),bedrock:Y({region_name:G().optional(),profile_name:G().optional(),aws_access_key_id:G().optional(),aws_secret_access_key:G().optional()}).optional(),custom_providers:Zo(G(),Z).prefault({}),models:Ns.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:Y({markdown:J().optional(),rtc:J().optional()}).prefault(()=>({})),server:Y({disable_file_downloads:J().optional(),transport:X([`websocket`,`sse`]).optional()}).prefault(()=>({})),diagnostics:Y({enabled:J().optional(),sql_linter:J().optional()}).prefault(()=>({})),sharing:Y({html:J().optional(),wasm:J().optional(),molab:J().optional()}).optional(),mcp:Y({presets:Uo(X([`marimo`,`context7`])).optional()}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})),Fs=G(),Is=X(As).prefault(`auto`);Go({width:X(ks).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),app_title:Fs.nullish(),css_file:G().nullish(),html_head_file:G().nullish(),auto_download:Uo(X(js)).prefault([]),sql_output:Is}).prefault(()=>({width:`medium`,auto_download:[],sql_output:`auto`}));function Ls(){return Ps.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})}const Rs=e=>new TextDecoder().decode(e);function zs(e){return e.FS}const Bs=`notebook.py`,Vs=`/marimo`,Q={NOTEBOOK_FILENAME:Bs,HOME_DIR:Vs,createHomeDir:e=>{let t=zs(e);try{t.mkdirTree(Vs)}catch{}t.chdir(Vs)},mountFS:e=>{zs(e).mount(e.FS.filesystems.IDBFS,{root:`.`},Vs)},populateFilesToMemory:async e=>{await Hs(e,!0)},persistFilesToRemote:async e=>{await Hs(e,!1)},readNotebook:e=>{let t=zs(e),n=`${Vs}/${Bs}`;return Rs(t.readFile(n))},initNotebookCode:e=>{let{pyodide:t,filename:n,code:r}=e,i=zs(t),a=e=>{try{return Rs(i.readFile(e))}catch{return null}};if(n&&n!==Bs){let e=a(n);if(e)return{code:e,filename:n}}return i.writeFile(Bs,r),{code:r,filename:Bs}}};function Hs(e,t){return new Promise((n,r)=>{zs(e).syncfs(t,e=>{if(e instanceof Error){r(e);return}n()})})}function Us(e){return`marimo-base`}const Ws=new class{spans=[];startSpan(e,t={}){let 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={}){let r=this.startSpan(t||e.name,n);try{let t=e();return this.endSpan(r),t}catch(e){throw this.endSpan(r,`error`),e}}wrapAsync(e,t,n={}){return(async(...r)=>{let i=this.startSpan(t||e.name,n);try{let t=await e(...r);return this.endSpan(i),t}catch(e){throw this.endSpan(i,`error`),e}})}logSpans(){}};globalThis.t=Ws;var Gs=class{pyodide=null;packageLoadQueue=Promise.resolve();sessionGeneration=0;activeSessionStops=new Set;get requirePyodide(){return Ds(this.pyodide,`Pyodide not loaded`),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!ct)throw Error(`loadPyodide is not defined`);let t=Ws.startSpan(`loadPyodide`);try{let n=`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`,r=await ct({packages:[`micropip`,`msgspec`,Us(e.version),`Markdown`,`pymdown-extensions`,`narwhals`,`packaging`],_makeSnapshot:!1,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:n,packageBaseUrl:n,convertNullToNone:!0});return this.pyodide=r,t.end(`ok`),r}catch(e){throw T.error(`Failed to load Pyodide`,e),e}}async mountFilesystem(e){let t=Ws.startSpan(`mountFilesystem`);return Q.createHomeDir(this.requirePyodide),Q.mountFS(this.requirePyodide),await Q.populateFilesToMemory(this.requirePyodide),t.end(`ok`),Q.initNotebookCode({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){let t=this.sessionGeneration,{code:n,filename:r,onMessage:i,queryParameters:a,userConfig:o}=e;self.messenger={callback:i},self.query_params=a,self.user_config=o;let s=Ws.startSpan(`startSession.runPython`),c=r||Q.NOTEBOOK_FILENAME,l=this.requirePyodide.runPython(`
|
|
41
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function xa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Ca(t,`input`,e.processors),output:Ca(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function H(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return H(r.element,n);if(r.type===`set`)return H(r.valueType,n);if(r.type===`lazy`)return H(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return H(r.innerType,n);if(r.type===`intersection`)return H(r.left,n)||H(r.right,n);if(r.type===`record`||r.type===`map`)return H(r.keyType,n)||H(r.valueType,n);if(r.type===`pipe`)return H(r.in,n)||H(r.out,n);if(r.type===`object`){for(let e in r.shape)if(H(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(H(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(H(e,n))return!0;return!!(r.rest&&H(r.rest,n))}return!1}const Sa=(e,t={})=>n=>{let r=ya({...n,processors:t});return V(e,r),ba(r,e),xa(r,e)},Ca=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ya({...i??{},target:a,io:t,processors:n});return V(e,o),ba(o,e),xa(o,e)},wa={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ta=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=wa[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ea=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Da=(e,t,n,r)=>{n.type=`boolean`},Oa=(e,t,n,r)=>{n.not={}},ka=(e,t,n,r)=>{let i=e._zod.def,a=vt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Aa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ja=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ma=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=V(a.element,t,{...r,path:[...r.path,`items`]})},Na=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=V(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=V(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Pa=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>V(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Fa=(e,t,n,r)=>{let i=e._zod.def,a=V(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=V(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ia=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=V(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=V(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=V(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},La=(e,t,n,r)=>{let i=e._zod.def,a=V(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ra=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},za=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ba=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Va=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ha=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;V(a,t,r);let o=t.seen.get(e);o.ref=a},Ua=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Wa=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ga=E(`ZodISODateTime`,(e,t)=>{_r.init(e,t),K.init(e,t)});function Ka(e){return Vi(Ga,e)}const qa=E(`ZodISODate`,(e,t)=>{vr.init(e,t),K.init(e,t)});function Ja(e){return Hi(qa,e)}const Ya=E(`ZodISOTime`,(e,t)=>{yr.init(e,t),K.init(e,t)});function Xa(e){return Ui(Ya,e)}const Za=E(`ZodISODuration`,(e,t)=>{br.init(e,t),K.init(e,t)});function Qa(e){return Wi(Za,e)}const $a=(e,t)=>{qt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Xt(e,t)},flatten:{value:t=>Yt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,yt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,yt,2)}},isEmpty:{get(){return e.issues.length===0}}})};E(`ZodError`,$a);const U=E(`ZodError`,$a,{Parent:Error}),eo=Zt(U),to=Qt(U),no=$t(U),ro=tn(U),io=rn(U),ao=an(U),oo=on(U),so=sn(U),co=cn(U),lo=ln(U),uo=un(U),fo=dn(U),W=E(`ZodType`,(e,t)=>(R.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Ca(e,`input`),output:Ca(e,`output`)}}),e.toJSONSchema=Sa(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(j(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>M(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>eo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>no(e,t,n),e.parseAsync=async(t,n)=>to(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ro(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>io(e,t,n),e.decode=(t,n)=>ao(e,t,n),e.encodeAsync=async(t,n)=>oo(e,t,n),e.decodeAsync=async(t,n)=>so(e,t,n),e.safeEncode=(t,n)=>co(e,t,n),e.safeDecode=(t,n)=>lo(e,t,n),e.safeEncodeAsync=async(t,n)=>uo(e,t,n),e.safeDecodeAsync=async(t,n)=>fo(e,t,n),e.refine=(t,n)=>e.check(bs(t,n)),e.superRefine=t=>e.check(xs(t)),e.overwrite=t=>e.check(B(t)),e.optional=()=>ns(e),e.exactOptional=()=>is(e),e.nullable=()=>os(e),e.nullish=()=>ns(os(e)),e.nonoptional=t=>fs(e,t),e.array=()=>Uo(e),e.or=t=>qo([e,t]),e.and=t=>Yo(e,t),e.transform=t=>gs(e,es(t)),e.default=t=>cs(e,t),e.prefault=t=>us(e,t),e.catch=t=>ms(e,t),e.pipe=t=>gs(e,t),e.readonly=()=>vs(e),e.describe=t=>{let n=e.clone();return _i.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return _i.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return _i.get(e);let n=e.clone();return _i.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),po=E(`_ZodString`,(e,t)=>{ar.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ia(...t)),e.includes=(...t)=>e.check(sa(...t)),e.startsWith=(...t)=>e.check(ca(...t)),e.endsWith=(...t)=>e.check(la(...t)),e.min=(...t)=>e.check(na(...t)),e.max=(...t)=>e.check(ta(...t)),e.length=(...t)=>e.check(ra(...t)),e.nonempty=(...t)=>e.check(na(1,...t)),e.lowercase=t=>e.check(aa(t)),e.uppercase=t=>e.check(oa(t)),e.trim=()=>e.check(da()),e.normalize=(...t)=>e.check(ua(...t)),e.toLowerCase=()=>e.check(fa()),e.toUpperCase=()=>e.check(pa()),e.slugify=()=>e.check(ma())}),mo=E(`ZodString`,(e,t)=>{ar.init(e,t),po.init(e,t),e.email=t=>e.check(yi(ho,t)),e.url=t=>e.check(Ti(vo,t)),e.jwt=t=>e.check(Bi(No,t)),e.emoji=t=>e.check(Ei(yo,t)),e.guid=t=>e.check(bi(go,t)),e.uuid=t=>e.check(xi(_o,t)),e.uuidv4=t=>e.check(Si(_o,t)),e.uuidv6=t=>e.check(Ci(_o,t)),e.uuidv7=t=>e.check(wi(_o,t)),e.nanoid=t=>e.check(Di(bo,t)),e.guid=t=>e.check(bi(go,t)),e.cuid=t=>e.check(Oi(xo,t)),e.cuid2=t=>e.check(ki(So,t)),e.ulid=t=>e.check(Ai(Co,t)),e.base64=t=>e.check(Li(Ao,t)),e.base64url=t=>e.check(Ri(jo,t)),e.xid=t=>e.check(ji(wo,t)),e.ksuid=t=>e.check(Mi(To,t)),e.ipv4=t=>e.check(Ni(Eo,t)),e.ipv6=t=>e.check(Pi(Do,t)),e.cidrv4=t=>e.check(Fi(Oo,t)),e.cidrv6=t=>e.check(Ii(ko,t)),e.e164=t=>e.check(zi(Mo,t)),e.datetime=t=>e.check(Ka(t)),e.date=t=>e.check(Ja(t)),e.time=t=>e.check(Xa(t)),e.duration=t=>e.check(Qa(t))});function G(e){return vi(mo,e)}const K=E(`ZodStringFormat`,(e,t)=>{z.init(e,t),po.init(e,t)}),ho=E(`ZodEmail`,(e,t)=>{cr.init(e,t),K.init(e,t)}),go=E(`ZodGUID`,(e,t)=>{or.init(e,t),K.init(e,t)}),_o=E(`ZodUUID`,(e,t)=>{sr.init(e,t),K.init(e,t)}),vo=E(`ZodURL`,(e,t)=>{lr.init(e,t),K.init(e,t)}),yo=E(`ZodEmoji`,(e,t)=>{ur.init(e,t),K.init(e,t)}),bo=E(`ZodNanoID`,(e,t)=>{dr.init(e,t),K.init(e,t)}),xo=E(`ZodCUID`,(e,t)=>{fr.init(e,t),K.init(e,t)}),So=E(`ZodCUID2`,(e,t)=>{pr.init(e,t),K.init(e,t)}),Co=E(`ZodULID`,(e,t)=>{mr.init(e,t),K.init(e,t)}),wo=E(`ZodXID`,(e,t)=>{hr.init(e,t),K.init(e,t)}),To=E(`ZodKSUID`,(e,t)=>{gr.init(e,t),K.init(e,t)}),Eo=E(`ZodIPv4`,(e,t)=>{xr.init(e,t),K.init(e,t)}),Do=E(`ZodIPv6`,(e,t)=>{Sr.init(e,t),K.init(e,t)}),Oo=E(`ZodCIDRv4`,(e,t)=>{Cr.init(e,t),K.init(e,t)}),ko=E(`ZodCIDRv6`,(e,t)=>{wr.init(e,t),K.init(e,t)}),Ao=E(`ZodBase64`,(e,t)=>{Er.init(e,t),K.init(e,t)}),jo=E(`ZodBase64URL`,(e,t)=>{Or.init(e,t),K.init(e,t)}),Mo=E(`ZodE164`,(e,t)=>{kr.init(e,t),K.init(e,t)}),No=E(`ZodJWT`,(e,t)=>{jr.init(e,t),K.init(e,t)}),Po=E(`ZodNumber`,(e,t)=>{Mr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ea(e,t,n,r),e.gt=(t,n)=>e.check(Qi(t,n)),e.gte=(t,n)=>e.check($i(t,n)),e.min=(t,n)=>e.check($i(t,n)),e.lt=(t,n)=>e.check(Xi(t,n)),e.lte=(t,n)=>e.check(Zi(t,n)),e.max=(t,n)=>e.check(Zi(t,n)),e.int=t=>e.check(Io(t)),e.safe=t=>e.check(Io(t)),e.positive=t=>e.check(Qi(0,t)),e.nonnegative=t=>e.check($i(0,t)),e.negative=t=>e.check(Xi(0,t)),e.nonpositive=t=>e.check(Zi(0,t)),e.multipleOf=(t,n)=>e.check(ea(t,n)),e.step=(t,n)=>e.check(ea(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function q(e){return Gi(Po,e)}const Fo=E(`ZodNumberFormat`,(e,t)=>{Nr.init(e,t),Po.init(e,t)});function Io(e){return Ki(Fo,e)}const Lo=E(`ZodBoolean`,(e,t)=>{Pr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Da(e,t,n,r)});function J(e){return qi(Lo,e)}const Ro=E(`ZodUnknown`,(e,t)=>{Fr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function zo(){return Ji(Ro)}const Bo=E(`ZodNever`,(e,t)=>{Ir.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oa(e,t,n,r)});function Vo(e){return Yi(Bo,e)}const Ho=E(`ZodArray`,(e,t)=>{Rr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(na(t,n)),e.nonempty=t=>e.check(na(1,t)),e.max=(t,n)=>e.check(ta(t,n)),e.length=(t,n)=>e.check(ra(t,n)),e.unwrap=()=>e.element});function Uo(e,t){return ha(Ho,e,t)}const Wo=E(`ZodObject`,(e,t)=>{Ur.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),k(e,`shape`,()=>t.shape),e.keyof=()=>X(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:zo()}),e.loose=()=>e.clone({...e._zod.def,catchall:zo()}),e.strict=()=>e.clone({...e._zod.def,catchall:Vo()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Rt(e,t),e.safeExtend=t=>zt(e,t),e.merge=t=>Bt(e,t),e.pick=t=>It(e,t),e.omit=t=>Lt(e,t),e.partial=(...t)=>Vt(ts,e,t[0]),e.required=(...t)=>Ht(ds,e,t[0])});function Go(e,t){return new Wo({type:`object`,shape:e??{},...N(t)})}function Y(e,t){return new Wo({type:`object`,shape:e,catchall:zo(),...N(t)})}const Ko=E(`ZodUnion`,(e,t)=>{Gr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r),e.options=t.options});function qo(e,t){return new Ko({type:`union`,options:e,...N(t)})}const Jo=E(`ZodIntersection`,(e,t)=>{Kr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fa(e,t,n,r)});function Yo(e,t){return new Jo({type:`intersection`,left:e,right:t})}const Xo=E(`ZodRecord`,(e,t)=>{Yr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ia(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Zo(e,t,n){return new Xo({type:`record`,keyType:e,valueType:t,...N(n)})}const Qo=E(`ZodEnum`,(e,t)=>{Xr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ka(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Qo({...t,checks:[],...N(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Qo({...t,checks:[],...N(r),entries:i})}});function X(e,t){return new Qo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...N(t)})}const $o=E(`ZodTransform`,(e,t)=>{Zr.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ja(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new gt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Gt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Gt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function es(e){return new $o({type:`transform`,transform:e})}const ts=E(`ZodOptional`,(e,t)=>{$r.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ns(e){return new ts({type:`optional`,innerType:e})}const rs=E(`ZodExactOptional`,(e,t)=>{ei.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function is(e){return new rs({type:`optional`,innerType:e})}const as=E(`ZodNullable`,(e,t)=>{ti.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function os(e){return new as({type:`nullable`,innerType:e})}const ss=E(`ZodDefault`,(e,t)=>{ni.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cs(e,t){return new ss({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}const ls=E(`ZodPrefault`,(e,t)=>{ii.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function us(e,t){return new ls({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}const ds=E(`ZodNonOptional`,(e,t)=>{ai.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fs(e,t){return new ds({type:`nonoptional`,innerType:e,...N(t)})}const ps=E(`ZodCatch`,(e,t)=>{si.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ms(e,t){return new ps({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const hs=E(`ZodPipe`,(e,t)=>{ci.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r),e.in=t.in,e.out=t.out});function gs(e,t){return new hs({type:`pipe`,in:e,out:t})}const _s=E(`ZodReadonly`,(e,t)=>{ui.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vs(e){return new _s({type:`readonly`,innerType:e})}const ys=E(`ZodCustom`,(e,t)=>{fi.init(e,t),W.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aa(e,t,n,r)});function bs(e,t={}){return ga(ys,e,t)}function xs(e){return _a(e)}const Ss=Go({detail:G()}),Cs=Go({error:G()});function ws(e){if(!e)return`Unknown error`;if(e instanceof Error){let t=Ss.safeParse(e.cause);return t.success?t.data.detail:Ts(e.message)}if(typeof e==`object`){let t=Ss.safeParse(e);if(t.success)return t.data.detail;let n=Cs.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function Ts(e){let t=Es(e);if(!t)return e;let n=Ss.safeParse(t);if(n.success)return n.data.detail;let r=Cs.safeParse(t);return r.success?r.data.error:e}function Es(e){try{return JSON.parse(e)}catch{return e}}function Ds(e,t){if(!e)throw Error(t)}const Os=[`pip`,`uv`,`rye`,`poetry`,`pixi`],ks=[`normal`,`compact`,`medium`,`full`,`columns`],As=[`auto`,`native`,`polars`,`lazy-polars`,`pandas`],js=[`html`,`markdown`,`ipynb`],Ms=[`manual`,`ask`,`agent`,`code_mode`],Z=Go({api_key:G().optional(),base_url:G().optional(),project:G().optional()}).loose(),Ns=Go({chat_model:G().nullish(),edit_model:G().nullish(),autocomplete_model:G().nullish(),displayed_models:Uo(G()).default([]),custom_models:Uo(G()).default([])}),Ps=Y({completion:Go({activate_on_typing:J().prefault(!0),signature_hint_on_typing:J().prefault(!1),auto_close_pairs:J().prefault(!0),copilot:qo([J(),X([`github`,`codeium`,`custom`])]).prefault(!1).transform(e=>e===!0?`github`:e),codeium_api_key:G().nullish()}).prefault({}),save:Y({autosave:X([`off`,`after_delay`]).prefault(`after_delay`),autosave_delay:q().nonnegative().transform(e=>Math.max(e,1e3)).prefault(1e3),format_on_save:J().prefault(!1)}).prefault({}),formatting:Y({line_length:q().nonnegative().prefault(79).transform(e=>Math.min(e,1e3))}).prefault({}),keymap:Y({preset:X([`default`,`vim`]).prefault(`default`),overrides:Zo(G(),G()).prefault({}),destructive_delete:J().prefault(!0)}).prefault({}),runtime:Y({auto_instantiate:J().prefault(!0),on_cell_change:X([`lazy`,`autorun`]).prefault(`autorun`),auto_reload:X([`off`,`lazy`,`autorun`]).prefault(`off`),reactive_tests:J().prefault(!0),watcher_on_save:X([`lazy`,`autorun`]).prefault(`lazy`),default_sql_output:X(As).prefault(`auto`),default_auto_download:Uo(X(js)).prefault([]),show_tracebacks:J().prefault(!1)}).prefault({}),display:Y({theme:X([`light`,`dark`,`system`]).prefault(`light`),code_editor_font_size:q().nonnegative().prefault(14),cell_output:X([`above`,`below`]).prefault(`below`),dataframes:X([`rich`,`plain`]).prefault(`rich`),default_table_page_size:q().prefault(10),default_table_max_columns:q().prefault(50),default_width:X(ks).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),locale:G().nullable().optional(),reference_highlighting:J().prefault(!0),code_lens:J().prefault(!0)}).prefault({}),package_management:Y({manager:X(Os).prefault(`pip`)}).prefault({}),ai:Y({enabled:J().prefault(!0),rules:G().prefault(``),max_tokens:q().int().positive().nullable().optional(),mode:X(Ms).prefault(`manual`),inline_tooltip:J().prefault(!1),open_ai:Z.optional(),anthropic:Z.optional(),google:Z.optional(),ollama:Z.optional(),openrouter:Z.optional(),wandb:Z.optional(),opencode_go:Z.optional(),open_ai_compatible:Z.optional(),azure:Z.optional(),bedrock:Y({region_name:G().optional(),profile_name:G().optional(),aws_access_key_id:G().optional(),aws_secret_access_key:G().optional()}).optional(),custom_providers:Zo(G(),Z).prefault({}),models:Ns.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:Y({markdown:J().optional(),rtc:J().optional()}).prefault(()=>({})),server:Y({disable_file_downloads:J().optional(),transport:X([`websocket`,`sse`]).optional()}).prefault(()=>({})),diagnostics:Y({enabled:J().optional(),sql_linter:J().optional()}).prefault(()=>({})),sharing:Y({html:J().optional(),wasm:J().optional(),molab:J().optional()}).optional(),mcp:Y({presets:Uo(X([`marimo`,`context7`])).optional()}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})),Fs=G(),Is=X(As).prefault(`auto`);Go({width:X(ks).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),app_title:Fs.nullish(),css_file:G().nullish(),html_head_file:G().nullish(),auto_download:Uo(X(js)).prefault([]),sql_output:Is}).prefault(()=>({width:`medium`,auto_download:[],sql_output:`auto`}));function Ls(){return Ps.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},experimental:{},server:{},ai:{},package_management:{},mcp:{}})}const Rs=e=>new TextDecoder().decode(e);function zs(e){return e.FS}const Bs=`notebook.py`,Vs=`/marimo`,Q={NOTEBOOK_FILENAME:Bs,HOME_DIR:Vs,createHomeDir:e=>{let t=zs(e);try{t.mkdirTree(Vs)}catch{}t.chdir(Vs)},mountFS:e=>{zs(e).mount(e.FS.filesystems.IDBFS,{root:`.`},Vs)},populateFilesToMemory:async e=>{await Hs(e,!0)},persistFilesToRemote:async e=>{await Hs(e,!1)},readNotebook:e=>{let t=zs(e),n=`${Vs}/${Bs}`;return Rs(t.readFile(n))},initNotebookCode:e=>{let{pyodide:t,filename:n,code:r}=e,i=zs(t),a=e=>{try{return Rs(i.readFile(e))}catch{return null}};if(n&&n!==Bs){let e=a(n);if(e)return{code:e,filename:n}}return i.writeFile(Bs,r),{code:r,filename:Bs}}};function Hs(e,t){return new Promise((n,r)=>{zs(e).syncfs(t,e=>{if(e instanceof Error){r(e);return}n()})})}function Us(e){return`marimo-base`}const Ws=new class{spans=[];startSpan(e,t={}){let 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={}){let r=this.startSpan(t||e.name,n);try{let t=e();return this.endSpan(r),t}catch(e){throw this.endSpan(r,`error`),e}}wrapAsync(e,t,n={}){return(async(...r)=>{let i=this.startSpan(t||e.name,n);try{let t=await e(...r);return this.endSpan(i),t}catch(e){throw this.endSpan(i,`error`),e}})}logSpans(){}};globalThis.t=Ws;var Gs=class{pyodide=null;packageLoadQueue=Promise.resolve();sessionGeneration=0;activeSessionStops=new Set;get requirePyodide(){return Ds(this.pyodide,`Pyodide not loaded`),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!ct)throw Error(`loadPyodide is not defined`);let t=Ws.startSpan(`loadPyodide`);try{let n=`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`,r=await ct({packages:[`micropip`,`msgspec`,Us(e.version),`Markdown`,`pymdown-extensions`,`narwhals`,`packaging`],_makeSnapshot:!1,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:n,packageBaseUrl:n,convertNullToNone:!0});return this.pyodide=r,t.end(`ok`),r}catch(e){throw T.error(`Failed to load Pyodide`,e),e}}async mountFilesystem(e){let t=Ws.startSpan(`mountFilesystem`);return Q.createHomeDir(this.requirePyodide),Q.mountFS(this.requirePyodide),await Q.populateFilesToMemory(this.requirePyodide),t.end(`ok`),Q.initNotebookCode({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){let t=this.sessionGeneration,{code:n,filename:r,onMessage:i,queryParameters:a,userConfig:o}=e;self.messenger={callback:i},self.query_params=a,self.user_config=o;let s=Ws.startSpan(`startSession.runPython`),c=r||Q.NOTEBOOK_FILENAME,l=this.requirePyodide.runPython(`
|
|
42
42
|
print("[py] Starting marimo...")
|
|
43
43
|
import asyncio
|
|
44
44
|
import gc
|
|
@@ -6,13 +6,13 @@ import { c as useEventListener, g as Logger, h as cn, t as Button } from "./butt
|
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { r as toast } from "./copy-BkA3t7rJ.js";
|
|
9
|
-
import { Bt as PluralWord, C as Accordion, Dn as Anchor2, E as AccordionTrigger, Ft as variablesAtom, H as renderHTML, Hn as FileText, Jt as getTableType, Kt as allTablesAtom, Nn as Wrench, O as ChatBubbleIcon, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, S as AIContextRegistry, T as AccordionItem, Tn as atomWithStorage, Vn as Info, Wn as ExternalLink, Xt as getRequestClient, an as singleFacet, b as contextToXml, c as Popover, d as PopoverTrigger, f as isOutputEmpty, g as formatDatasourceContextForCell, h as DatasourceContextProvider, hn as CellOutputId, ht as displayCellName, in as isTracebackMime, jt as generateUUID, kt as moveToEndOfEditor, n as Spinner, nn as isErrorMime, qn as CircleX, qt as dataSourceConnectionsAtom, r as MarkdownRenderer, rn as isMarimoErrorsMime, st as parseHtmlContent, t as toPng, u as PopoverContent, un as ZodLocalStorage, v as Boosts, w as AccordionContent, wt as createVariableInfoElement, x as AIContextProvider, y as Sections, zn as LoaderCircle } from "./html-to-image-
|
|
9
|
+
import { Bt as PluralWord, C as Accordion, Dn as Anchor2, E as AccordionTrigger, Ft as variablesAtom, H as renderHTML, Hn as FileText, Jt as getTableType, Kt as allTablesAtom, Nn as Wrench, O as ChatBubbleIcon, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, S as AIContextRegistry, T as AccordionItem, Tn as atomWithStorage, Vn as Info, Wn as ExternalLink, Xt as getRequestClient, an as singleFacet, b as contextToXml, c as Popover, d as PopoverTrigger, f as isOutputEmpty, g as formatDatasourceContextForCell, h as DatasourceContextProvider, hn as CellOutputId, ht as displayCellName, in as isTracebackMime, jt as generateUUID, kt as moveToEndOfEditor, n as Spinner, nn as isErrorMime, qn as CircleX, qt as dataSourceConnectionsAtom, r as MarkdownRenderer, rn as isMarimoErrorsMime, st as parseHtmlContent, t as toPng, u as PopoverContent, un as ZodLocalStorage, v as Boosts, w as AccordionContent, wt as createVariableInfoElement, x as AIContextProvider, y as Sections, zn as LoaderCircle } from "./html-to-image-A5PBjxuX.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-B9WoXK1R.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
12
12
|
import { C as logNever, I as X, R as ChevronDown, t as Strings } from "./strings-BUDhKc0s.js";
|
|
13
|
-
import { C as DropdownMenuTrigger, a as NumberField, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, r as Input } from "./input-
|
|
14
|
-
import { p as isUrl, w as CircleQuestionMark } from "./toDate-
|
|
15
|
-
import { a as MarimoIncomingMessageEvent, d as fileDetailsToBlob, f as Square, n as blobToString, p as File$1, t as processOutput } from "./process-output-
|
|
13
|
+
import { C as DropdownMenuTrigger, a as NumberField, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, r as Input } from "./input-B4ddy8Jy.js";
|
|
14
|
+
import { p as isUrl, w as CircleQuestionMark } from "./toDate-BiyuFdnT.js";
|
|
15
|
+
import { a as MarimoIncomingMessageEvent, d as fileDetailsToBlob, f as Square, n as blobToString, p as File$1, t as processOutput } from "./process-output-CVc-yx0-.js";
|
|
16
16
|
import "./react-dom-BTJzcVJ9.js";
|
|
17
17
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
18
18
|
import { A as looseObject, B as unknown, C as any, D as discriminatedUnion, E as custom, I as record, L as string, M as never, N as number, O as lazy, P as object$1, S as _null, T as boolean, U as toJSONSchema, V as safeParseAsync, b as _enum, k as literal, w as array$1, x as _instanceof, z as union } from "./zod-yTHHzJiv.js";
|
|
@@ -21,7 +21,7 @@ import { t as Label } from "./label-CzHncDvS.js";
|
|
|
21
21
|
import { t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
22
22
|
import { f as CopyClipboardIcon } from "./extends-DzpiytFg.js";
|
|
23
23
|
import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
|
|
24
|
-
import { A as useEvent_default, n as useTheme, w as useStore } from "./useTheme-
|
|
24
|
+
import { A as useEvent_default, n as useTheme, w as useStore } from "./useTheme-Dur2p3iC.js";
|
|
25
25
|
import { $ as EditorView, At as EditorState, Bt as Transaction, Lt as StateEffect, Nt as Prec, Rt as StateField, Z as Decoration, jt as Facet, mt as keymap, nt as WidgetType, pt as hoverTooltip, tt as ViewPlugin } from "./dist-De-GlSAs.js";
|
|
26
26
|
import { t as Objects } from "./objects-De59twF-.js";
|
|
27
27
|
import { n as acceptCompletion, o as closeCompletion, r as autocompletion } from "./dist-CSlJrrAw.js";
|
|
@@ -33,7 +33,7 @@ import "./dist-DgjbnqTg.js";
|
|
|
33
33
|
import "./dist-CRmSjkLP.js";
|
|
34
34
|
import { n as minimalSetup, t as esm_default } from "./esm-CfyRntAe.js";
|
|
35
35
|
import "./purify.es-EnR5yhgI.js";
|
|
36
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
36
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
37
37
|
var Ban = createLucideIcon("ban", [["path", {
|
|
38
38
|
d: "M4.929 4.929 19.07 19.071",
|
|
39
39
|
key: "196cmz"
|
|
@@ -6,15 +6,15 @@ import { _ as Functions, f as composeRefs, g as Logger, h as cn, m as Events, n
|
|
|
6
6
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BkA3t7rJ.js";
|
|
9
|
-
import { B as isDataURLString, Bt as PluralWord, C as Accordion, Cn as jsonToMarkdown, Dt as toggleBreakpoint, E as AccordionTrigger, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, It as getFeatureFlag, J as getCellEditorView, L as base64ToUint8Array, Ln as NotebookPen, M as DotFilledIcon, Mt as useChromeActions, N as PinLeftIcon, Nn as Wrench, Nt as adaptForLocalStorage, On as Close$1, Ot as goToCellLine, P as PinRightIcon, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, Rn as Minus, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Un as Eye, Ut as getDataTypeColor, Vn as Info, Wn as ExternalLink, Wt as resolveDataType, Xn as esm_default, Xt as getRequestClient, Yn as Braces, Zn as import_lib, _ as getDatasourceContext, _n as SCRATCH_CELL_ID, c as Popover, cn as getTracebackInfo, ct as AnsiUp, d as PopoverTrigger, dn as filenameAtom, ft as sanitizeHtml, gn as HTMLCellId, hn as CellOutputId, ht as displayCellName, it as useCellNames, j as ChevronRightIcon, k as CheckIcon, l as PopoverClose, lt as outputIsLoading, m as useExpandedOutput, mt as getCellDomProps, n as Spinner, nt as useCellActions, on as elementContainsMarimoCellFile, pt as DATA_CELL_ID, qn as CircleX, r as MarkdownRenderer, rt as useCellIds, sn as extractAllTracebackInfo, t as toPng, u as PopoverContent, w as AccordionContent, yt as Checkbox, z as extractBase64FromDataURL, zn as LoaderCircle, __tla as __tla_0 } from "./html-to-image-
|
|
9
|
+
import { B as isDataURLString, Bt as PluralWord, C as Accordion, Cn as jsonToMarkdown, Dt as toggleBreakpoint, E as AccordionTrigger, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, It as getFeatureFlag, J as getCellEditorView, L as base64ToUint8Array, Ln as NotebookPen, M as DotFilledIcon, Mt as useChromeActions, N as PinLeftIcon, Nn as Wrench, Nt as adaptForLocalStorage, On as Close$1, Ot as goToCellLine, P as PinRightIcon, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, Rn as Minus, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Un as Eye, Ut as getDataTypeColor, Vn as Info, Wn as ExternalLink, Wt as resolveDataType, Xn as esm_default, Xt as getRequestClient, Yn as Braces, Zn as import_lib, _ as getDatasourceContext, _n as SCRATCH_CELL_ID, c as Popover, cn as getTracebackInfo, ct as AnsiUp, d as PopoverTrigger, dn as filenameAtom, ft as sanitizeHtml, gn as HTMLCellId, hn as CellOutputId, ht as displayCellName, it as useCellNames, j as ChevronRightIcon, k as CheckIcon, l as PopoverClose, lt as outputIsLoading, m as useExpandedOutput, mt as getCellDomProps, n as Spinner, nt as useCellActions, on as elementContainsMarimoCellFile, pt as DATA_CELL_ID, qn as CircleX, r as MarkdownRenderer, rt as useCellIds, sn as extractAllTracebackInfo, t as toPng, u as PopoverContent, w as AccordionContent, yt as Checkbox, z as extractBase64FromDataURL, zn as LoaderCircle, __tla as __tla_0 } from "./html-to-image-A5PBjxuX.js";
|
|
10
10
|
import { o as useSize, u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
11
|
-
import { c as Calendar, i as createReducerAndAtoms, r as Badge } from "./useLifecycle-
|
|
11
|
+
import { c as Calendar, i as createReducerAndAtoms, r as Badge } from "./useLifecycle-D4N02q82.js";
|
|
12
12
|
import { a as ListFilter, i as Table$1, n as $fb18d541ea1ad717$export$ad991b66133851cf, o as ChartPie, r as $5a387cc49350e6db$export$722debc0e56fea39, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-BeN3fHMH.js";
|
|
13
13
|
import { t as Check } from "./check-D-BaEjEh.js";
|
|
14
14
|
import { C as logNever, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, I as X, N as usePrevious$1, O as $b5e257d569688ac6$export$535bd6ca7f90a273, P as useDirection, R as ChevronDown, S as assertNever, T as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, _ as menuControlVariants, b as menuSeparatorVariants, f as selectStyles, g as menuControlCheckVariants, h as menuContentCommon, i as SelectContent, l as SelectTrigger, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, t as Strings, u as SelectValue, v as menuItemVariants, w as $a916eb452884faea$export$b7a616150fdb9f44, x as menuSubTriggerVariants, y as menuLabelVariants } from "./strings-BUDhKc0s.js";
|
|
15
|
-
import { $ as $e93e671b31057976$export$b8473d3665f3a75a, $t as Item2$2, A as $ee014567cb39d3f0$export$ff05c3ac10437e03, At as $c87311424ea30a05$export$78551043582a6a98, B as $64fa3d84918910a7$export$4d86445c2cf5e3, Bt as $d4ee10de306f2510$export$e58f029f0fbfdb29, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $a049562f99e7db0e$export$f9c6924e160136d1, Dt as $df56164dff5785e2$export$4338b53315abf666, E as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Et as $8ae05eaa5c114e9c$export$7f54fc3180508a52, F as $01b77f81d0f07f68$export$75b6ee27786ba447, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, G as $64fa3d84918910a7$export$ef03459518577ad4, Gt as $bdb11010cef70236$export$b4cc09c592e8fdb8, H as $64fa3d84918910a7$export$c245e6201fed2f75, Ht as $431fbd86ca7dc216$export$b204af158042fbac, I as $01b77f81d0f07f68$export$b04be29aa201d4f5, It as $3ef42575df84b30b$export$9d1611c77c2fe928, J as marked, Jt as Anchor2, K as $64fa3d84918910a7$export$fabf2dc03a41866e, Kt as $bdb11010cef70236$export$f680877a34711e37, L as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Lt as $d4ee10de306f2510$export$4282f70798064fe0, M as $514c0188e459b4c0$export$9afb8bc826b033ea, Mt as $c87311424ea30a05$export$a11b0059900ceec8, N as $d2b4bc8c273e7be6$export$24d547caef80ccd1, Nt as $c87311424ea30a05$export$fedb369cb70207f1, O as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Ot as $313b98861ee5dd6c$export$d6875122194c7b44, P as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Pt as $7215afc6de606d6b$export$de79e2c695e052f3, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as Group, R as $64fa3d84918910a7$export$2881499e37b75b9a, Rt as $d4ee10de306f2510$export$b4f377a2b6254582, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as $3985021b0ad6602f$export$f5b8910cec6cf069, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$c62b8e45d58ddad9, Ut as $431fbd86ca7dc216$export$f21a1ffae260145a, V as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Vt as $f4e2df6bd15f8569$export$98658e8c59125e6a, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, Xt as CheckboxItem, Yt as Arrow2, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Content2$1, _ as DropdownMenuPortal, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as NumberField, an as Root3, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, cn as SubContent, ct as $6c7bd7858deea686$export$cd11ab140839f11d, dn as Item, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, en as ItemIndicator, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as DropdownMenu, fn as Root$3, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuLabel, gn as ChevronRight, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuItem, hn as Circle, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, in as RadioItem, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $514c0188e459b4c0$export$5f1af8db9871e1d6, jt as $c87311424ea30a05$export$9ac100e40613ea10, k as $ee014567cb39d3f0$export$f551688fc98f2e09, kt as $c87311424ea30a05$export$6446a186d09e379e, l as prettyNumber, ln as SubTrigger, lt as $fca6afa0e843324b$export$87b761675e8eaa10, mn as Search, mt as $9ab94262bd0047c7$export$420e68273165f4ec, nn as Portal, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, on as Separator$1, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pn as createRovingFocusGroupScope, pt as $6179b936705e76d3$export$ae780daf29e6d456, qt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, r as Input, rn as RadioGroup$2, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as maxFractionalDigits, sn as Sub, tn as Label$1, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, un as createMenuScope, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuSeparator, vt as _class_private_field_init, w as $3985021b0ad6602f$export$37fb8590cf2c088c, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $64fa3d84918910a7$export$29f1550f4b0d4415, zt as $d4ee10de306f2510$export$cd4e5573fbe2b576 } from "./input-
|
|
16
|
-
import { S as isWasm, a as millisecondsInMinute, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, i as millisecondsInHour, n as constructFrom, o as millisecondsInSecond, p as isUrl, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, v as kioskModeAtom, y as useInstallAllowed } from "./toDate-
|
|
17
|
-
import { r as Plus, t as ErrorBoundary } from "./ErrorBoundary-
|
|
15
|
+
import { $ as $e93e671b31057976$export$b8473d3665f3a75a, $t as Item2$2, A as $ee014567cb39d3f0$export$ff05c3ac10437e03, At as $c87311424ea30a05$export$78551043582a6a98, B as $64fa3d84918910a7$export$4d86445c2cf5e3, Bt as $d4ee10de306f2510$export$e58f029f0fbfdb29, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $a049562f99e7db0e$export$f9c6924e160136d1, Dt as $df56164dff5785e2$export$4338b53315abf666, E as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Et as $8ae05eaa5c114e9c$export$7f54fc3180508a52, F as $01b77f81d0f07f68$export$75b6ee27786ba447, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, G as $64fa3d84918910a7$export$ef03459518577ad4, Gt as $bdb11010cef70236$export$b4cc09c592e8fdb8, H as $64fa3d84918910a7$export$c245e6201fed2f75, Ht as $431fbd86ca7dc216$export$b204af158042fbac, I as $01b77f81d0f07f68$export$b04be29aa201d4f5, It as $3ef42575df84b30b$export$9d1611c77c2fe928, J as marked, Jt as Anchor2, K as $64fa3d84918910a7$export$fabf2dc03a41866e, Kt as $bdb11010cef70236$export$f680877a34711e37, L as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Lt as $d4ee10de306f2510$export$4282f70798064fe0, M as $514c0188e459b4c0$export$9afb8bc826b033ea, Mt as $c87311424ea30a05$export$a11b0059900ceec8, N as $d2b4bc8c273e7be6$export$24d547caef80ccd1, Nt as $c87311424ea30a05$export$fedb369cb70207f1, O as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Ot as $313b98861ee5dd6c$export$d6875122194c7b44, P as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Pt as $7215afc6de606d6b$export$de79e2c695e052f3, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as Group, R as $64fa3d84918910a7$export$2881499e37b75b9a, Rt as $d4ee10de306f2510$export$b4f377a2b6254582, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as $3985021b0ad6602f$export$f5b8910cec6cf069, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$c62b8e45d58ddad9, Ut as $431fbd86ca7dc216$export$f21a1ffae260145a, V as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Vt as $f4e2df6bd15f8569$export$98658e8c59125e6a, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, Xt as CheckboxItem, Yt as Arrow2, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Content2$1, _ as DropdownMenuPortal, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as NumberField, an as Root3, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, cn as SubContent, ct as $6c7bd7858deea686$export$cd11ab140839f11d, dn as Item, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, en as ItemIndicator, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as DropdownMenu, fn as Root$3, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuLabel, gn as ChevronRight, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuItem, hn as Circle, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, in as RadioItem, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $514c0188e459b4c0$export$5f1af8db9871e1d6, jt as $c87311424ea30a05$export$9ac100e40613ea10, k as $ee014567cb39d3f0$export$f551688fc98f2e09, kt as $c87311424ea30a05$export$6446a186d09e379e, l as prettyNumber, ln as SubTrigger, lt as $fca6afa0e843324b$export$87b761675e8eaa10, mn as Search, mt as $9ab94262bd0047c7$export$420e68273165f4ec, nn as Portal, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, on as Separator$1, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pn as createRovingFocusGroupScope, pt as $6179b936705e76d3$export$ae780daf29e6d456, qt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, r as Input, rn as RadioGroup$2, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as maxFractionalDigits, sn as Sub, tn as Label$1, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, un as createMenuScope, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuSeparator, vt as _class_private_field_init, w as $3985021b0ad6602f$export$37fb8590cf2c088c, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $64fa3d84918910a7$export$29f1550f4b0d4415, zt as $d4ee10de306f2510$export$cd4e5573fbe2b576 } from "./input-B4ddy8Jy.js";
|
|
16
|
+
import { S as isWasm, a as millisecondsInMinute, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, i as millisecondsInHour, n as constructFrom, o as millisecondsInSecond, p as isUrl, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, v as kioskModeAtom, y as useInstallAllowed } from "./toDate-BiyuFdnT.js";
|
|
17
|
+
import { r as Plus, t as ErrorBoundary } from "./ErrorBoundary-CptUP1_t.js";
|
|
18
18
|
import { n as clsx_default } from "./clsx-CIWA5tNO.js";
|
|
19
19
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
20
20
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
@@ -22,19 +22,19 @@ import { $ as StyleNamespace, J as MAX_HEIGHT_OFFSET, X as withFullScreenAsRoot,
|
|
|
22
22
|
import { a as prettyError, c as Portal$1, l as Root$4, n as ErrorBanner, o as Content$1, s as Overlay, t as Banner } from "./error-banner-dmkbm21G.js";
|
|
23
23
|
import { a as TooltipRoot, n as TooltipContent, o as TooltipTrigger, r as TooltipPortal, t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
24
24
|
import { f as CopyClipboardIcon, t as _extends } from "./extends-DzpiytFg.js";
|
|
25
|
-
import { A as useEvent_default, C as useSetAtom, D as buildStore, O as getBuildingBlocks, S as useAtomValue, T as atom, _ as useJotaiEffect, a as KnownQueryParams, b as Provider, d as resolvedMarimoConfigAtom, g as store, k as dequal, n as useTheme, o as aiFeaturesEnabledAtom, p as userConfigAtom, s as aiModelConfiguredAtom, w as useStore, x as useAtom } from "./useTheme-
|
|
25
|
+
import { A as useEvent_default, C as useSetAtom, D as buildStore, O as getBuildingBlocks, S as useAtomValue, T as atom, _ as useJotaiEffect, a as KnownQueryParams, b as Provider, d as resolvedMarimoConfigAtom, g as store, k as dequal, n as useTheme, o as aiFeaturesEnabledAtom, p as userConfigAtom, s as aiModelConfiguredAtom, w as useStore, x as useAtom } from "./useTheme-Dur2p3iC.js";
|
|
26
26
|
import { $ as EditorView } from "./dist-De-GlSAs.js";
|
|
27
27
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
28
28
|
import { c as uniqueBy, t as Arrays } from "./arrays-sEtDRoG4.js";
|
|
29
29
|
import { t as Objects } from "./objects-De59twF-.js";
|
|
30
30
|
import { n as once, t as memoizeLastValue } from "./once-B60G2fuJ.js";
|
|
31
31
|
import { a as parser } from "./dist-CRmSjkLP.js";
|
|
32
|
-
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-
|
|
32
|
+
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-DO4oLDDL.js";
|
|
33
33
|
import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-DdVSF4FD.js";
|
|
34
34
|
import { V as getContainerWidth, n as formats } from "./vega-loader.browser-DmpxCJqx.js";
|
|
35
35
|
import { a as tooltipHandler, n as vegaLoadData, r as createBatchedLoader, t as parseCsvData } from "./loader-DP2JkPth.js";
|
|
36
36
|
import { t as useIframeCapabilities } from "./useIframeCapabilities-pLC-ceDP.js";
|
|
37
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
37
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
38
38
|
let CommandSeparator, Kbd, ErrorState, getPageIndexForRow, ContextMenuTrigger, dateToLocalISODate, downloadHTMLAsImage, inferFieldTypes, ColumnName, DelayMount, downloadSizeLimitAtom, ColumnChartSpecModel, getUserColumnVisibilityCounts, TOO_MANY_ROWS, DateRangePicker, TabsList, useSelectList, dateToLocalISOTime, ContextMenu, toFieldTypes, Command, ChartInfoState, Combobox, TabsTrigger, ContextMenuContent, getMimeValues, prettifyRowColumnCount, loadTableData, prettifyRowCount, INDEX_COLUMN_NAME, ColumnPreviewContainer, useIntersectionObserver, getColumnCountForDisplay, SELECT_COLUMN_ID, CommandList, RenderTextWithLinks, ContextMenuItem, isNullishFilter, downloadExportedFile, generateColumns, Filenames, ColumnChartContext, CompactChipRow, Tabs, useInternalStateWithSync, dateToLocalISODateTime, DatePicker, TabsContent, CommandInput, LazyVegaEmbed, CommandEmpty, ChartLoadingState, CommandItem, useOverflowDetection, DataTable, ChevronLeft, TableCell, DEFAULT_DECK_TRANSITION, TextWrap, contextAwarePanelType, downloadBlob, TableRow, SLIDE_TYPE_OPTIONS_BY_VALUE, EyeOff, slotsController, Switch, Download, PanelGroup, HtmlOutput, smartMatch, RadioGroup, Code, PanelResizeHandle, OutputRenderer, ChevronsDownUp, TableBody, OutputArea, ChevronsLeft, Table, showCodeInRunModeAtom, $fae977aafc393c5c$export$6b862160d295c8e, contextAwarePanelOwner, LoadingState, loadTableAndRawData, EmptyState, usePrevious, SlideSidebar, Expand, Toggle, JsonOutput, ChevronsRight, Provider$1, useNotebookCodeAvailable, safeLocale, PANEL_TYPES, DEFAULT_DECK_VERTICAL_ALIGN, GripHorizontal, isCellAwareAtom, RadioGroupItem, ChevronsUpDown, Fill, ComboboxItem, ChartErrorState, marimoVersionAtom, $fae977aafc393c5c$export$588937bcd60ade55, contextAwarePanelOpen, DEFAULT_SLIDE_TYPE, Funnel, SlotNames, cellDomProps, EmotionCacheProvider, ContextAwarePanelItem, Slide, Ellipsis, Panel, InstallPackageButton, ArrowDownWideNarrow, TableHead, Progress, renderCellValue, downloadByURL, NAMELESS_COLUMN_PREFIX, ADD_PRINTING_CLASS, TableHeader, ContextMenuSeparator, Maps;
|
|
39
39
|
let __tla = Promise.all([
|
|
40
40
|
(() => {
|
|
@@ -36338,7 +36338,7 @@ ${d}`,
|
|
|
36338
36338
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
36339
36339
|
}
|
|
36340
36340
|
}
|
|
36341
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.17-
|
|
36341
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.17-dev36");
|
|
36342
36342
|
showCodeInRunModeAtom = atom(true);
|
|
36343
36343
|
atom(null);
|
|
36344
36344
|
var import_compiler_runtime = require_compiler_runtime();
|
|
@@ -2,7 +2,7 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
2
2
|
import { h as cn, r as cva } from "./button-8aS1QcHr.js";
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
-
import { t as toDate } from "./toDate-
|
|
5
|
+
import { t as toDate } from "./toDate-BiyuFdnT.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
7
7
|
import { i as tableFromIPC } from "./loader-DP2JkPth.js";
|
|
8
8
|
function isDate(e) {
|
|
@@ -7,14 +7,14 @@ import { t as require_react } from "./react-DA-nE2FX.js";
|
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
8
8
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BkA3t7rJ.js";
|
|
9
9
|
import { C as logNever, i as SelectContent, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, u as SelectValue } from "./strings-BUDhKc0s.js";
|
|
10
|
-
import { J as marked, S as DropdownMenuSubTrigger, _ as DropdownMenuPortal, b as DropdownMenuSub, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, q as useNonce, r as Input, v as DropdownMenuSeparator, x as DropdownMenuSubContent } from "./input-
|
|
10
|
+
import { J as marked, S as DropdownMenuSubTrigger, _ as DropdownMenuPortal, b as DropdownMenuSub, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, q as useNonce, r as Input, v as DropdownMenuSeparator, x as DropdownMenuSubContent } from "./input-B4ddy8Jy.js";
|
|
11
11
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-uENjXsiC.js";
|
|
12
|
-
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-
|
|
12
|
+
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-CptUP1_t.js";
|
|
13
13
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
14
14
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
15
15
|
import "./zod-yTHHzJiv.js";
|
|
16
16
|
import { t as Label } from "./label-CzHncDvS.js";
|
|
17
|
-
import { A as useEvent_default, n as useTheme } from "./useTheme-
|
|
17
|
+
import { A as useEvent_default, n as useTheme } from "./useTheme-Dur2p3iC.js";
|
|
18
18
|
import { A as require_isLength, B as require_isFunction, C as resolveCellsThunk, D as maybe, E as deepEqual, F as require__Map, G as require__baseGetTag, H as require__isKey, I as require__ListCache, J as require__freeGlobal, K as require__Symbol, L as require_eq, M as require_isArguments, N as require__castPath, O as require__hasPath, P as require__MapCache, R as require__getNative, S as isSizedGridColumn, T as assertNever, U as require_isSymbol, V as require_isObject, W as require_isObjectLike, Y as require_isArray, _ as booleanCellIsEditable, a as mergeAndRealizeTheme, b as isObjectEditorCallbackResult, c as withAlpha, d as CompactSelection, f as DEFAULT_FILL_HANDLE, g as InnerGridCellKind, h as GridColumnMenuIcon, i as makeCSSStyle, j as require__isIndex, k as require__toKey, l as BooleanEmpty, m as GridColumnIcon, n as ThemeContext, o as blend, p as GridCellKind, q as require__root, r as getDataEditorTheme, s as blendCache, t as ClickOutsideContainer, u as BooleanIndeterminate, v as isEditableGridCell, w as assert, x as isReadWriteCell, y as isInnerOnlyCell, z as require__toSource } from "./click-outside-container-BSIeYt4y.js";
|
|
19
19
|
import { t as styled_default } from "./dist-SXNmlE8A.js";
|
|
20
20
|
let GlideDataEditor, glide_data_editor_default;
|
|
@@ -8,18 +8,18 @@ import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
|
8
8
|
import { r as toast, t as copyToClipboard } from "./copy-BkA3t7rJ.js";
|
|
9
9
|
import { a as gn, c as rehypeSanitize, l as defaultSchema, s as xn, u as require_cjs, __tla as __tla_0 } from "./chunk-5FQGJX7Z-B9WoXK1R.js";
|
|
10
10
|
import { a as createPopperScope, i as Root2$3, l as VisuallyHidden, n as Arrow, o as useSize, r as Content$1, t as Anchor, u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
11
|
-
import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-
|
|
11
|
+
import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-D4N02q82.js";
|
|
12
12
|
import { t as Check } from "./check-D-BaEjEh.js";
|
|
13
13
|
import { C as logNever, F as createCollection, I as X, N as usePrevious, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue } from "./strings-BUDhKc0s.js";
|
|
14
|
-
import { J as marked, X as useDebouncedCallback, _t as $f6c31cce2adf654f$export$45712eceda6fad21, q as useNonce } from "./input-
|
|
15
|
-
import { C as assertExists, S as isWasm, _ as initialModeAtom, g as getInitialAppMode, h as waitForConnectionOpen, l as getRuntimeManager, t as toDate, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-
|
|
14
|
+
import { J as marked, X as useDebouncedCallback, _t as $f6c31cce2adf654f$export$45712eceda6fad21, q as useNonce } from "./input-B4ddy8Jy.js";
|
|
15
|
+
import { C as assertExists, S as isWasm, _ as initialModeAtom, g as getInitialAppMode, h as waitForConnectionOpen, l as getRuntimeManager, t as toDate, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-BiyuFdnT.js";
|
|
16
16
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
17
17
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
18
18
|
import { $ as StyleNamespace, J as MAX_HEIGHT_OFFSET, L as string, N as number, P as object, T as boolean, X as withFullScreenAsRoot, Z as withSmartCollisionBoundary, _t as Primitive, at as FocusScope, ct as Root$1, dt as Presence, et as hideOthers, ft as useControllableState, gt as createContextScope, it as Portal, k as literal, lt as useCallbackRef, mt as composeEventHandlers, ot as Branch, pt as useLayoutEffect2, rt as useFocusGuards, st as DismissableLayer, tt as Combination_default, ut as useId, vt as dispatchDiscreteCustomEvent, w as array, z as union } from "./zod-yTHHzJiv.js";
|
|
19
19
|
import { i as TooltipProvider, t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
20
20
|
import { a as setDiagnostics, c as historyField, d as insertTab, f as CopyClipboardIcon, i as linter, n as forEachDiagnostic, s as history } from "./extends-DzpiytFg.js";
|
|
21
21
|
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
22
|
-
import { S as useAtomValue, T as atom, b as Provider, c as autoInstantiateAtom, g as store, h as createDeepEqualAtom, k as dequal, l as getResolvedMarimoConfig, n as useTheme, t as resolvedThemeAtom, x as useAtom, y as isIslands } from "./useTheme-
|
|
22
|
+
import { S as useAtomValue, T as atom, b as Provider, c as autoInstantiateAtom, g as store, h as createDeepEqualAtom, k as dequal, l as getResolvedMarimoConfig, n as useTheme, t as resolvedThemeAtom, x as useAtom, y as isIslands } from "./useTheme-Dur2p3iC.js";
|
|
23
23
|
import { $ as EditorView, At as EditorState, B as highlightCode, Bt as Transaction, E as getIndentUnit, H as tags, I as syntaxTree, L as unfoldAll, Lt as StateEffect, Nt as Prec, Ot as Compartment, Pt as RangeSet, Rt as StateField, S as foldInside, St as showTooltip, X as parseMixed, Z as Decoration, _t as placeholder, b as foldAll, et as GutterMarker, f as StreamLanguage, jt as Facet, kt as EditorSelection, l as LanguageDescription, lt as gutter, mt as keymap, pt as hoverTooltip, tt as ViewPlugin, u as LanguageSupport, w as foldNodeProp, wt as Annotation, xt as showPanel, z as classHighlighter, zt as Text } from "./dist-De-GlSAs.js";
|
|
24
24
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
25
25
|
import { a as arrayMove, i as arrayInsertMany, l as clamp, n as arrayDelete, r as arrayInsert } from "./arrays-sEtDRoG4.js";
|
|
@@ -33,7 +33,7 @@ import { a as markdown, s as markdownLanguage } from "./dist-BOMbzyb3.js";
|
|
|
33
33
|
import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-CRmSjkLP.js";
|
|
34
34
|
import { n as stexMath } from "./stex-DtMAhV4-.js";
|
|
35
35
|
import { t as purify } from "./purify.es-EnR5yhgI.js";
|
|
36
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
36
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
37
37
|
let notebookOutline, isUninstantiated, ChevronDownIcon, Item, DeferredRequestRegistry, isDataURLString, Layers, PluralWord, Accordion, jsonToMarkdown, MarkdownLanguageAdapter, BorderAllIcon, Anchor2, toggleBreakpoint, AccordionTrigger, selectAtom, Paths, base64ToDataURL, Table2, variablesAtom, hasRunAnyCellAtom, Database, require_client, renderHTML, FileText, DATA_TYPE_ICON, base64ToDataView, PaintRoller, getFeatureFlag, getCellEditorView, CircleAlert, getTableType, cellIdsAtom, Columns2, allTablesAtom, base64ToUint8Array, NotebookPen, repl, DotFilledIcon, Trigger2, useChromeActions, PinLeftIcon, Wrench, adaptForLocalStorage, ChatBubbleIcon, Close$1, goToCellLine, PinRightIcon, Trash2, jotaiJsonStorage, notebookAtom, useRequestClient, dataViewToBase64, Minus, SQLParser, AIContextRegistry, jsonParseWithSpecialChar, isRecord$1, AccordionItem, atomWithStorage, PathBuilder, getMarimoExportContext, Eye, getDataTypeColor, safeExtractSetUIElementMessageBuffers, Info, PluralWords, hasTrustedExportContext, ExternalLink, resolveDataType, hasOnlyOneCellAtom, esm_default, getRequestClient, getCellNames, Braces, convertStatsName, initialNotebookState, import_lib$1, requestClientAtom, getDatasourceContext, SCRATCH_CELL_ID, isInternalCellName, useCellFocusActions, singleFacet, createCell, contextToXml, OBJECT_ID_ATTR, customPythonLanguageSupport, Popover, getTracebackInfo, AnsiUp, PopoverTrigger, filenameAtom, headingToIdentifier, publishedCellClasses, numColumnsAtom, isOutputEmpty, parseAttrValue, sanitizeHtml, formatDatasourceContextForCell, HTMLCellId, getValidName, DatasourceContextProvider, CellOutputId, displayCellName, LazyAnyLanguageCodeMirror, isTracebackMime, useCellNames, ChevronRightIcon, Root2$2, generateUUID, CheckIcon, Content2$1, moveToEndOfEditor, PopoverClose, NotebookScopedLocalStorage, outputIsLoading, useExpandedOutput, parseInitialValue, getCellDomProps, Spinner, isErrorMime, useCellActions, useLastFocusedCellId, elementContainsMarimoCellFile, ansiToPlainText, useExpandedConsoleOutput, parseDataset, DATA_CELL_ID, createActions$1, CircleX, dataSourceConnectionsAtom, MarkdownRenderer, isMarimoErrorsMime, useCellIds, maybeAddAltairImport, extractAllTracebackInfo, parseHtmlContent, toPng$1, shouldHidePublishedCell, reducer$1, PopoverContent, ZodLocalStorage, outputIsStale, Boosts, UIElementId, normalizeName, AccordionContent, atomWithReducer, createVariableInfoElement, AIContextProvider, RANDOM_ID_ATTR, hasFunctionProperty, Sections, findCellId, Checkbox, extractBase64FromDataURL, LoaderCircle, MarkdownParser;
|
|
38
38
|
let __tla = Promise.all([
|
|
39
39
|
(() => {
|
|
@@ -14,7 +14,7 @@ import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
|
14
14
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
15
15
|
import { $ as StyleNamespace, J as MAX_HEIGHT_OFFSET, X as withFullScreenAsRoot, Z as withSmartCollisionBoundary, _t as Primitive, at as FocusScope, dt as Presence, et as hideOthers, ft as useControllableState, gt as createContextScope, it as Portal, lt as useCallbackRef, mt as composeEventHandlers, rt as useFocusGuards, st as DismissableLayer, tt as Combination_default, ut as useId, vt as dispatchDiscreteCustomEvent } from "./zod-yTHHzJiv.js";
|
|
16
16
|
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
17
|
-
import { A as useEvent_default } from "./useTheme-
|
|
17
|
+
import { A as useEvent_default } from "./useTheme-Dur2p3iC.js";
|
|
18
18
|
import { t as memoizeLastValue } from "./once-B60G2fuJ.js";
|
|
19
19
|
var ChevronRight = createLucideIcon("chevron-right", [["path", {
|
|
20
20
|
d: "m9 18 6-6-6-6",
|
package/dist/main.js
CHANGED
|
@@ -22,19 +22,19 @@ import { _ as Functions, c as useEventListener, f as composeRefs, g as Logger, h
|
|
|
22
22
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
23
23
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
24
24
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BkA3t7rJ.js";
|
|
25
|
-
import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, At as DeferredRequestRegistry, Bn as Layers, C as Accordion, Ct as MarkdownLanguageAdapter, D as BorderAllIcon, E as AccordionTrigger, En as selectAtom, Et as Paths, Fn as Table2, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, I as base64ToDataView, In as PaintRoller, Jn as CircleAlert, K as cellIdsAtom, Kn as Columns2, Lt as repl, Mn as Trigger2, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as SQLParser, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Tt as PathBuilder, U as getMarimoExportContext, Un as Eye, V as safeExtractSetUIElementMessageBuffers, Vn as Info, Vt as PluralWords, W as hasTrustedExportContext, X as hasOnlyOneCellAtom, Xt as getRequestClient, Y as getCellNames, Yn as Braces, Yt as convertStatsName, Z as initialNotebookState, Zt as requestClientAtom, _t as isInternalCellName, a as useCellFocusActions, at as createCell, bn as OBJECT_ID_ATTR, bt as customPythonLanguageSupport, dt as headingToIdentifier, en as publishedCellClasses, et as numColumnsAtom, f as isOutputEmpty, fn as parseAttrValue, gn as HTMLCellId, gt as getValidName, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as generateUUID, kn as Content2, ln as NotebookScopedLocalStorage, lt as outputIsLoading, mn as parseInitialValue, n as Spinner, nt as useCellActions, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, q as createActions, rt as useCellIds, s as maybeAddAltairImport, tn as shouldHidePublishedCell, tt as reducer, ut as outputIsStale, vn as UIElementId, vt as normalizeName, w as AccordionContent, wn as atomWithReducer, xn as RANDOM_ID_ATTR, xt as hasFunctionProperty, yn as findCellId, yt as Checkbox, zn as LoaderCircle, zt as MarkdownParser, __tla as __tla_0 } from "./html-to-image-
|
|
25
|
+
import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, At as DeferredRequestRegistry, Bn as Layers, C as Accordion, Ct as MarkdownLanguageAdapter, D as BorderAllIcon, E as AccordionTrigger, En as selectAtom, Et as Paths, Fn as Table2, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, I as base64ToDataView, In as PaintRoller, Jn as CircleAlert, K as cellIdsAtom, Kn as Columns2, Lt as repl, Mn as Trigger2, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as SQLParser, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Tt as PathBuilder, U as getMarimoExportContext, Un as Eye, V as safeExtractSetUIElementMessageBuffers, Vn as Info, Vt as PluralWords, W as hasTrustedExportContext, X as hasOnlyOneCellAtom, Xt as getRequestClient, Y as getCellNames, Yn as Braces, Yt as convertStatsName, Z as initialNotebookState, Zt as requestClientAtom, _t as isInternalCellName, a as useCellFocusActions, at as createCell, bn as OBJECT_ID_ATTR, bt as customPythonLanguageSupport, dt as headingToIdentifier, en as publishedCellClasses, et as numColumnsAtom, f as isOutputEmpty, fn as parseAttrValue, gn as HTMLCellId, gt as getValidName, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as generateUUID, kn as Content2, ln as NotebookScopedLocalStorage, lt as outputIsLoading, mn as parseInitialValue, n as Spinner, nt as useCellActions, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, q as createActions, rt as useCellIds, s as maybeAddAltairImport, tn as shouldHidePublishedCell, tt as reducer, ut as outputIsStale, vn as UIElementId, vt as normalizeName, w as AccordionContent, wn as atomWithReducer, xn as RANDOM_ID_ATTR, xt as hasFunctionProperty, yn as findCellId, yt as Checkbox, zn as LoaderCircle, zt as MarkdownParser, __tla as __tla_0 } from "./html-to-image-A5PBjxuX.js";
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-B9WoXK1R.js";
|
|
27
27
|
import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
28
|
-
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-
|
|
29
|
-
import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-
|
|
30
|
-
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-
|
|
28
|
+
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-uMKNvMRZ.js";
|
|
29
|
+
import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-C-o2Zi3k.js";
|
|
30
|
+
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-D4N02q82.js";
|
|
31
31
|
import { t as Check } from "./check-D-BaEjEh.js";
|
|
32
32
|
import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$2, N as usePrevious$2, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as Trigger$1, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-BUDhKc0s.js";
|
|
33
|
-
import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-
|
|
34
|
-
import { S as isWasm, _ as initialModeAtom, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as getInitialAppMode, m as require_cuid2, u as getStaticVirtualFiles, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-
|
|
35
|
-
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
33
|
+
import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-B4ddy8Jy.js";
|
|
34
|
+
import { S as isWasm, _ as initialModeAtom, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as getInitialAppMode, m as require_cuid2, u as getStaticVirtualFiles, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-BiyuFdnT.js";
|
|
35
|
+
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-CVc-yx0-.js";
|
|
36
36
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-uENjXsiC.js";
|
|
37
|
-
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-
|
|
37
|
+
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-CptUP1_t.js";
|
|
38
38
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
39
39
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
40
40
|
import { $ as StyleNamespace, A as looseObject, B as unknown, C as any, E as custom, F as optional, G as parseAsync, H as ZodError, I as record, K as $ZodError, L as string, N as number, O as lazy$2, P as object, Q as isInVscodeExtension, R as tuple, S as _null, T as boolean, W as parse$1, X as withFullScreenAsRoot, _ as ZodString, _t as Primitive, a as ZodIssueCode, b as _enum, c as ZodBoolean, d as ZodDiscriminatedUnion, dt as Presence, f as ZodEnum, ft as useControllableState, g as ZodOptional, gt as createContextScope, h as ZodObject, i as string$1, j as nan, k as literal, l as ZodDate, lt as useCallbackRef, m as ZodNumber, mt as composeEventHandlers$1, n as date, nt as __awaiter, o as ZodAny, p as ZodLiteral, pt as useLayoutEffect2, q as prettifyError, r as number$1, s as ZodArray, st as DismissableLayer, t as zod_default, u as ZodDefault, ut as useId$11, v as ZodType, vt as dispatchDiscreteCustomEvent, w as array, x as _instanceof, y as ZodUnion, z as union } from "./zod-yTHHzJiv.js";
|
|
@@ -45,7 +45,7 @@ import { f as CopyClipboardIcon } from "./extends-DzpiytFg.js";
|
|
|
45
45
|
import { a as get_default } from "./hasIn-Deg7jl_j.js";
|
|
46
46
|
import { n as _baseSet_default, t as pick_default } from "./pick-D1Qo8s2C.js";
|
|
47
47
|
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
48
|
-
import { A as useEvent_default, S as useAtomValue, T as atom, a as KnownQueryParams, b as Provider, c as autoInstantiateAtom, f as useResolvedMarimoConfig, g as store, k as dequal, m as AppConfigSchema, n as useTheme, r as CSSClasses, u as localeAtom, x as useAtom, y as isIslands } from "./useTheme-
|
|
48
|
+
import { A as useEvent_default, S as useAtomValue, T as atom, a as KnownQueryParams, b as Provider, c as autoInstantiateAtom, f as useResolvedMarimoConfig, g as store, k as dequal, m as AppConfigSchema, n as useTheme, r as CSSClasses, u as localeAtom, x as useAtom, y as isIslands } from "./useTheme-Dur2p3iC.js";
|
|
49
49
|
import { $ as EditorView, F as syntaxHighlighting, H as tags, a as HighlightStyle, g as defaultHighlightStyle } from "./dist-De-GlSAs.js";
|
|
50
50
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
51
51
|
import { c as uniqueBy, l as clamp, o as arrayShallowEquals, t as Arrays } from "./arrays-sEtDRoG4.js";
|
|
@@ -60,13 +60,13 @@ import "./dist-DgjbnqTg.js";
|
|
|
60
60
|
import { r as python } from "./dist-CRmSjkLP.js";
|
|
61
61
|
import { n as minimalSetup, t as esm_default } from "./esm-CfyRntAe.js";
|
|
62
62
|
import "./purify.es-EnR5yhgI.js";
|
|
63
|
-
import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-
|
|
63
|
+
import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-DO4oLDDL.js";
|
|
64
64
|
import { H as getVegaFieldTypes, V as getContainerWidth } from "./vega-loader.browser-DmpxCJqx.js";
|
|
65
65
|
import { a as tooltipHandler, n as vegaLoadData } from "./loader-DP2JkPth.js";
|
|
66
66
|
import "./defaultLocale-BpsHxBd7.js";
|
|
67
67
|
import "./defaultLocale-DoeErsX2.js";
|
|
68
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
69
|
-
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
68
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
69
|
+
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-CvlmHAmy.js";
|
|
70
70
|
import "./dist-BP39XM8u.js";
|
|
71
71
|
import "./dist-C18MUWTj.js";
|
|
72
72
|
import "./dist-BwhXBwMd.js";
|
|
@@ -9017,7 +9017,7 @@ let __tla = Promise.all([
|
|
|
9017
9017
|
};
|
|
9018
9018
|
}
|
|
9019
9019
|
};
|
|
9020
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
9020
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-BUC1liWi.js").then((e) => ({
|
|
9021
9021
|
default: e.Chatbot
|
|
9022
9022
|
}))), messageSchema = array(object({
|
|
9023
9023
|
id: string(),
|
|
@@ -9568,7 +9568,7 @@ let __tla = Promise.all([
|
|
|
9568
9568
|
]), TransformationsSchema = object({
|
|
9569
9569
|
transforms: array(TransformTypeSchema)
|
|
9570
9570
|
});
|
|
9571
|
-
var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-
|
|
9571
|
+
var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-CyTNN635.js").then(async (m) => {
|
|
9572
9572
|
await m.__tla;
|
|
9573
9573
|
return m;
|
|
9574
9574
|
}));
|
|
@@ -17030,7 +17030,7 @@ ${c}
|
|
|
17030
17030
|
fullWidth: p,
|
|
17031
17031
|
children: T
|
|
17032
17032
|
}), r[20] = p, r[21] = g, r[22] = c, r[23] = T, r[24] = E) : E = r[24], E;
|
|
17033
|
-
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-
|
|
17033
|
+
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-Gq4Q2Y4r.js"));
|
|
17034
17034
|
const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object({
|
|
17035
17035
|
label: string().nullish(),
|
|
17036
17036
|
data: string()
|
|
@@ -28442,7 +28442,7 @@ ${c}
|
|
|
28442
28442
|
return true;
|
|
28443
28443
|
}
|
|
28444
28444
|
}
|
|
28445
|
-
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-
|
|
28445
|
+
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-DMp_WplI.js")), VegaPlugin = class {
|
|
28446
28446
|
constructor() {
|
|
28447
28447
|
__publicField(this, "tagName", "marimo-vega");
|
|
28448
28448
|
__publicField(this, "validator", object({
|
|
@@ -28771,7 +28771,7 @@ ${c}
|
|
|
28771
28771
|
themeVariables: e.data.theme_variables
|
|
28772
28772
|
});
|
|
28773
28773
|
}
|
|
28774
|
-
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-
|
|
28774
|
+
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-ZQqMfFT3.js").then(async (m) => {
|
|
28775
28775
|
await m.__tla;
|
|
28776
28776
|
return m;
|
|
28777
28777
|
})), import_compiler_runtime$22 = require_compiler_runtime();
|
|
@@ -38214,7 +38214,7 @@ ${c}
|
|
|
38214
38214
|
function _temp2$2(e) {
|
|
38215
38215
|
e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
|
|
38216
38216
|
}
|
|
38217
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
38217
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-C99QMksZ.js"));
|
|
38218
38218
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
38219
38219
|
var _a5;
|
|
38220
38220
|
let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { slideCells: h, skippedIds: g, noOutputIds: _, slideTypes: v, startCellIndex: y } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
|
|
@@ -40260,7 +40260,7 @@ ${c}
|
|
|
40260
40260
|
});
|
|
40261
40261
|
}
|
|
40262
40262
|
const getMarimoVersion = () => store.get(marimoVersionAtom);
|
|
40263
|
-
var worker_default = "/assets/worker-
|
|
40263
|
+
var worker_default = "/assets/worker-Cl1KJG2_.js", DefaultWorkerFactory = class {
|
|
40264
40264
|
constructor(e = {}) {
|
|
40265
40265
|
this.url = e.workerUrl || this.getDefaultWorkerUrl(), this.name = e.workerName || getMarimoVersion();
|
|
40266
40266
|
}
|
|
@@ -7,9 +7,9 @@ import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
|
7
7
|
import "./zod-yTHHzJiv.js";
|
|
8
8
|
import { n as ErrorBanner } from "./error-banner-dmkbm21G.js";
|
|
9
9
|
import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
|
|
10
|
-
import { n as useTheme } from "./useTheme-
|
|
10
|
+
import { n as useTheme } from "./useTheme-Dur2p3iC.js";
|
|
11
11
|
import { t as purify } from "./purify.es-EnR5yhgI.js";
|
|
12
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
12
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
13
13
|
import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-BdgLc8AM.js";
|
|
14
14
|
import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-DV3ha_nA.js";
|
|
15
15
|
import { t as package_default } from "./chunk-DR5Q36YT-5Yp2GWwR.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
3
|
-
import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-
|
|
3
|
+
import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-A5PBjxuX.js";
|
|
4
4
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
5
5
|
import { t as Strings } from "./strings-BUDhKc0s.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
@@ -6,18 +6,18 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
6
6
|
import { c as useEventListener, g as Logger, h as cn, m as Events, t as Button } from "./button-8aS1QcHr.js";
|
|
7
7
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
8
8
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
9
|
-
import { ut as outputIsStale } from "./html-to-image-
|
|
9
|
+
import { ut as outputIsStale } from "./html-to-image-A5PBjxuX.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-B9WoXK1R.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
12
|
-
import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-
|
|
12
|
+
import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-C-o2Zi3k.js";
|
|
13
13
|
import { R as ChevronDown } from "./strings-BUDhKc0s.js";
|
|
14
|
-
import { X as useDebouncedCallback } from "./input-
|
|
15
|
-
import { v as kioskModeAtom } from "./toDate-
|
|
14
|
+
import { X as useDebouncedCallback } from "./input-B4ddy8Jy.js";
|
|
15
|
+
import { v as kioskModeAtom } from "./toDate-BiyuFdnT.js";
|
|
16
16
|
import "./react-dom-BTJzcVJ9.js";
|
|
17
17
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
18
18
|
import { Y as useFullScreenElement } from "./zod-yTHHzJiv.js";
|
|
19
19
|
import { t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
20
|
-
import { A as useEvent_default, S as useAtomValue, y as isIslands } from "./useTheme-
|
|
20
|
+
import { A as useEvent_default, S as useAtomValue, y as isIslands } from "./useTheme-Dur2p3iC.js";
|
|
21
21
|
import "./dist-De-GlSAs.js";
|
|
22
22
|
import "./main-B1Jo_8pC.js";
|
|
23
23
|
import "./dist-BOMbzyb3.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
2
|
-
import { s as Hash } from "./useLifecycle-
|
|
2
|
+
import { s as Hash } from "./useLifecycle-D4N02q82.js";
|
|
3
3
|
import { i as Table, o as ChartPie } from "./useDateFormatter-BeN3fHMH.js";
|
|
4
4
|
import { C as logNever } from "./strings-BUDhKc0s.js";
|
|
5
5
|
var AlignCenterVertical = createLucideIcon("align-center-vertical", [
|
|
@@ -5,7 +5,7 @@ import { t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
|
5
5
|
import { g as Logger } from "./button-8aS1QcHr.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
7
7
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
8
|
-
import { S as useAtomValue, T as atom, a as KnownQueryParams, g as store, v as waitFor, y as isIslands } from "./useTheme-
|
|
8
|
+
import { S as useAtomValue, T as atom, a as KnownQueryParams, g as store, v as waitFor, y as isIslands } from "./useTheme-Dur2p3iC.js";
|
|
9
9
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
10
10
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
11
11
|
["circle", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
4
|
-
import { A as useEvent_default } from "./useTheme-
|
|
4
|
+
import { A as useEvent_default } from "./useTheme-Dur2p3iC.js";
|
|
5
5
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
|
-
import { k as dequal } from "./useTheme-
|
|
3
|
+
import { k as dequal } from "./useTheme-Dur2p3iC.js";
|
|
4
4
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
5
5
|
function useDeepCompareMemoize(e) {
|
|
6
6
|
let i = import_react.useRef(e);
|
|
@@ -4,7 +4,7 @@ import { t as require_react } from "./react-DA-nE2FX.js";
|
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
5
|
import { u as createLucideIcon } from "./dist-DarwE0ZO.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
7
|
-
import { C as useSetAtom, T as atom } from "./useTheme-
|
|
7
|
+
import { C as useSetAtom, T as atom } from "./useTheme-Dur2p3iC.js";
|
|
8
8
|
var Calendar = createLucideIcon("calendar", [
|
|
9
9
|
["path", {
|
|
10
10
|
d: "M8 2v4",
|
|
@@ -603,7 +603,8 @@ const UserConfigSchema = looseObject({
|
|
|
603
603
|
default_table_max_columns: number().prefault(50),
|
|
604
604
|
default_width: _enum(VALID_APP_WIDTHS).prefault("medium").transform((e) => e === "normal" ? "compact" : e),
|
|
605
605
|
locale: string().nullable().optional(),
|
|
606
|
-
reference_highlighting: boolean().prefault(true)
|
|
606
|
+
reference_highlighting: boolean().prefault(true),
|
|
607
|
+
code_lens: boolean().prefault(true)
|
|
607
608
|
}).prefault({}),
|
|
608
609
|
package_management: looseObject({ manager: _enum(PackageManagerNames).prefault("pip") }).prefault({}),
|
|
609
610
|
ai: looseObject({
|
|
@@ -2,24 +2,24 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
2
2
|
import { g as Logger, h as cn, m as Events } from "./button-8aS1QcHr.js";
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
-
import { c as asRemoteURL, w as CircleQuestionMark } from "./toDate-
|
|
5
|
+
import { c as asRemoteURL, w as CircleQuestionMark } from "./toDate-BiyuFdnT.js";
|
|
6
6
|
import "./react-dom-BTJzcVJ9.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
8
8
|
import "./zod-yTHHzJiv.js";
|
|
9
9
|
import { n as ErrorBanner } from "./error-banner-dmkbm21G.js";
|
|
10
10
|
import { t as Tooltip } from "./tooltip-CkCWlUOf.js";
|
|
11
11
|
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
12
|
-
import { A as useEvent_default, n as useTheme } from "./useTheme-
|
|
12
|
+
import { A as useEvent_default, n as useTheme } from "./useTheme-Dur2p3iC.js";
|
|
13
13
|
import { s as uniq } from "./arrays-sEtDRoG4.js";
|
|
14
14
|
import { t as Objects } from "./objects-De59twF-.js";
|
|
15
|
-
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-
|
|
15
|
+
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-DO4oLDDL.js";
|
|
16
16
|
import { V as getContainerWidth, n as formats } from "./vega-loader.browser-DmpxCJqx.js";
|
|
17
17
|
import { a as tooltipHandler, n as vegaLoadData } from "./loader-DP2JkPth.js";
|
|
18
18
|
import { t as j } from "./react-vega-BazDALhI.js";
|
|
19
19
|
import "./defaultLocale-BpsHxBd7.js";
|
|
20
20
|
import "./defaultLocale-DoeErsX2.js";
|
|
21
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
22
|
-
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
21
|
+
import { t as useAsyncData } from "./useAsyncData-DqJLysjC.js";
|
|
22
|
+
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-CvlmHAmy.js";
|
|
23
23
|
import { t as Semaphore } from "./semaphore-C8rmHdhj.js";
|
|
24
24
|
import { t as useVegaContainerRemeasure } from "./use-vega-container-remeasure-DGNrIQSk.js";
|
|
25
25
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
package/package.json
CHANGED
|
@@ -985,6 +985,32 @@ export const UserConfigForm: React.FC = () => {
|
|
|
985
985
|
</div>
|
|
986
986
|
)}
|
|
987
987
|
/>
|
|
988
|
+
<OverriddenFormField
|
|
989
|
+
control={form.control}
|
|
990
|
+
name="display.code_lens"
|
|
991
|
+
render={({ field, override }) => (
|
|
992
|
+
<div className="flex flex-col space-y-1">
|
|
993
|
+
<FormItem className={formItemClasses}>
|
|
994
|
+
<FormLabel>Code lens</FormLabel>
|
|
995
|
+
<FormControl>
|
|
996
|
+
<Checkbox
|
|
997
|
+
data-testid="code-lens-checkbox"
|
|
998
|
+
checked={override.value}
|
|
999
|
+
disabled={override.isOverridden}
|
|
1000
|
+
onCheckedChange={field.onChange}
|
|
1001
|
+
/>
|
|
1002
|
+
</FormControl>
|
|
1003
|
+
<FormMessage />
|
|
1004
|
+
<IsOverridden override={override} />
|
|
1005
|
+
</FormItem>
|
|
1006
|
+
|
|
1007
|
+
<FormDescription>
|
|
1008
|
+
Shows inline icons in cell editors for datasources and
|
|
1009
|
+
storage buckets.
|
|
1010
|
+
</FormDescription>
|
|
1011
|
+
</div>
|
|
1012
|
+
)}
|
|
1013
|
+
/>
|
|
988
1014
|
</SettingGroup>
|
|
989
1015
|
<SettingGroup title="Outputs">
|
|
990
1016
|
<OverriddenFormField
|
|
@@ -141,6 +141,30 @@ export function useConfigActions() {
|
|
|
141
141
|
});
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
|
+
{
|
|
145
|
+
label: "Config > Disable code lens",
|
|
146
|
+
hidden: !(config.display.code_lens ?? true),
|
|
147
|
+
handle: () => {
|
|
148
|
+
handleUserConfig({
|
|
149
|
+
display: {
|
|
150
|
+
...config.display,
|
|
151
|
+
code_lens: false,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: "Config > Enable code lens",
|
|
158
|
+
hidden: config.display.code_lens ?? true,
|
|
159
|
+
handle: () => {
|
|
160
|
+
handleUserConfig({
|
|
161
|
+
display: {
|
|
162
|
+
...config.display,
|
|
163
|
+
code_lens: true,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
},
|
|
144
168
|
{
|
|
145
169
|
label: "Config > Set cell output area: above",
|
|
146
170
|
hidden: config.display.cell_output === "above",
|
|
@@ -68,7 +68,7 @@ function getOpts() {
|
|
|
68
68
|
diagnosticsConfig: {},
|
|
69
69
|
hotkeys: new OverridingHotkeyProvider({}),
|
|
70
70
|
theme: "light",
|
|
71
|
-
displayConfig: { reference_highlighting: false },
|
|
71
|
+
displayConfig: { reference_highlighting: false, code_lens: true },
|
|
72
72
|
inlineAiTooltip: false,
|
|
73
73
|
} as const;
|
|
74
74
|
}
|
|
@@ -82,7 +82,7 @@ export interface CodeMirrorSetupOpts {
|
|
|
82
82
|
hotkeys: HotkeyProvider;
|
|
83
83
|
lspConfig: LSPConfig;
|
|
84
84
|
diagnosticsConfig: DiagnosticsConfig;
|
|
85
|
-
displayConfig: Pick<DisplayConfig, "reference_highlighting">;
|
|
85
|
+
displayConfig: Pick<DisplayConfig, "reference_highlighting" | "code_lens">;
|
|
86
86
|
inlineAiTooltip: boolean;
|
|
87
87
|
/**
|
|
88
88
|
* CSS selector for the element that CodeMirror tooltips (completions, hover,
|
|
@@ -200,7 +200,7 @@ export const setupCodeMirror = (opts: CodeMirrorSetupOpts): Extension[] => {
|
|
|
200
200
|
displayConfig.reference_highlighting ?? true,
|
|
201
201
|
),
|
|
202
202
|
// Inline icons linking datasources/buckets/caches to their panels
|
|
203
|
-
codeLensBundle(cellId),
|
|
203
|
+
codeLensBundle(cellId, displayConfig.code_lens ?? true),
|
|
204
204
|
];
|
|
205
205
|
};
|
|
206
206
|
|
|
@@ -141,6 +141,10 @@ describe("codeLensBundle", () => {
|
|
|
141
141
|
return [...v.dom.querySelectorAll<HTMLElement>(".mo-code-lens")];
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
it("returns an empty extension when disabled via `display.code_lens`", () => {
|
|
145
|
+
expect(codeLensBundle(cellId("cell1"), false)).toEqual([]);
|
|
146
|
+
});
|
|
147
|
+
|
|
144
148
|
it("renders a lens at a dataframe declaration", async () => {
|
|
145
149
|
seedStore({ tables: [DF_TABLE] });
|
|
146
150
|
const v = await mount("df = load()\nx = 1");
|
|
@@ -281,8 +281,12 @@ const codeLensTheme = EditorView.baseTheme({
|
|
|
281
281
|
/**
|
|
282
282
|
* Inline icons linking datasource/bucket variables and `mo.cache` /
|
|
283
283
|
* `mo.persistent_cache` calls to their panels.
|
|
284
|
+
* Configurable via the `display.code_lens` user config (on by default).
|
|
284
285
|
*/
|
|
285
|
-
export function codeLensBundle(cellId: CellId): Extension {
|
|
286
|
+
export function codeLensBundle(cellId: CellId, enabled = true): Extension {
|
|
287
|
+
if (!enabled) {
|
|
288
|
+
return [];
|
|
289
|
+
}
|
|
286
290
|
return [
|
|
287
291
|
codeLensField,
|
|
288
292
|
codeLensHoverField,
|
|
@@ -66,6 +66,7 @@ test("default UserConfig - empty", () => {
|
|
|
66
66
|
"display": {
|
|
67
67
|
"cell_output": "below",
|
|
68
68
|
"code_editor_font_size": 14,
|
|
69
|
+
"code_lens": true,
|
|
69
70
|
"dataframes": "rich",
|
|
70
71
|
"default_table_max_columns": 50,
|
|
71
72
|
"default_table_page_size": 10,
|
|
@@ -139,6 +140,7 @@ test("default UserConfig - one level", () => {
|
|
|
139
140
|
"display": {
|
|
140
141
|
"cell_output": "below",
|
|
141
142
|
"code_editor_font_size": 14,
|
|
143
|
+
"code_lens": true,
|
|
142
144
|
"dataframes": "rich",
|
|
143
145
|
"default_table_max_columns": 50,
|
|
144
146
|
"default_table_page_size": 10,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./worker-CDEKsBgX.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|