fumapress 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cli/index.mjs +13 -17
- package/dist/lib/config/index.mjs +2 -3
- package/dist/lib/{global-dniUZbf4.mjs → global-CUpPuEBG.mjs} +1 -3
- package/dist/waku/public/assets/{Combination-C1V08UBn.js → Combination-C4kdyuYD.js} +1 -1
- package/dist/waku/public/assets/__vite-browser-external-BIHI7g3E.js +1 -0
- package/dist/waku/public/assets/{_root-BpNXSiUH.js → _root-C8cAYnQY.js} +3 -3
- package/dist/waku/{server/assets/_root-DaBeC_3S.css → public/assets/_root-sKZEpC02.css} +1 -1
- package/dist/waku/public/assets/algolia-CzBhvuBT.js +1 -0
- package/dist/waku/public/assets/{check-ChFJ7HNg.js → check-Dj3DdGGR.js} +1 -1
- package/dist/waku/public/assets/{chevron-right-BEpJ4rx9.js → chevron-right-C77AA9TY.js} +1 -1
- package/dist/waku/public/assets/{clerk-ox6IYq-a.js → clerk-CmhRX216.js} +1 -1
- package/dist/waku/public/assets/{client-Ck1i2tKx.js → client-BMxNOhA8.js} +1 -1
- package/dist/waku/public/assets/client-D6NuMW2P.js +1 -0
- package/dist/waku/public/assets/{createLucideIcon-CAVKR3s7.js → createLucideIcon-Ikl4uxUR.js} +1 -1
- package/dist/waku/public/assets/fetch-M7n4Pr6E.js +1 -0
- package/dist/waku/public/assets/flexsearch-static-BiDrO7qt.js +1 -0
- package/dist/waku/public/assets/{i18n-BhI45ncj.js → i18n-C0h9pHVo.js} +1 -1
- package/dist/waku/public/assets/{index-C9IPOQmV.js → index--7WIMqA0.js} +1 -1
- package/dist/waku/public/assets/{index-BV_DCBzM.js → index-0DvavhIV.js} +1 -1
- package/dist/waku/public/assets/index-B-ko_qlR.js +1 -0
- package/dist/waku/public/assets/{index-DMVP094G.js → index-B3vk6DwG.js} +1 -1
- package/dist/waku/public/assets/{index-CiG7hby8.js → index-BNuVMocy.js} +1 -1
- package/dist/waku/public/assets/{index-D2WcrhDn.js → index-CPFv2f1-.js} +1 -1
- package/dist/waku/public/assets/{index-3GMvY9aK.js → index-D_dSui7H.js} +1 -1
- package/dist/waku/public/assets/{index-DFgbU-D0.js → index-DjCbBXfl.js} +1 -1
- package/dist/waku/public/assets/{index-CTvySzVr.js → index-Dq_4MxWs.js} +1 -1
- package/dist/waku/public/assets/{index-DuwR7a0G.js → index-DvVAQ8Oe.js} +2 -2
- package/dist/waku/public/assets/{index-ZDJcsmb2.js → index-ELh_T-2L.js} +1 -1
- package/dist/waku/public/assets/{index-JmrfuxXc.js → index-o2xqr_BE.js} +1 -1
- package/dist/waku/public/assets/{index-BP4mcrHD.js → index-rofVhr0Z.js} +1 -1
- package/dist/waku/public/assets/{link-DO0NO_5Z.js → link-Bt3Lgt1V.js} +1 -1
- package/dist/waku/public/assets/{mixedbread-BewwCSYr-Bpo1Waii.js → mixedbread-Po2SyOmD.js} +3 -3
- package/dist/waku/public/assets/orama-cloud-CSfuVNT0.js +1 -0
- package/dist/waku/public/assets/orama-cloud-legacy-C5U82rGI.js +1 -0
- package/dist/waku/public/assets/{static-dXiDJ_Bs-Cbtbrb6F.js → orama-static-DocxBMar.js} +2 -2
- package/dist/waku/public/assets/popover-Bx38O_At.js +1 -0
- package/dist/waku/public/assets/{proxy-DIS1lJLO.js → proxy-Cb4khjJP.js} +1 -1
- package/dist/waku/public/assets/{search-CqJihmqD.js → search-D_-0Dzi8.js} +1 -1
- package/dist/waku/public/assets/{search-default-CA1I5Opk.js → search-default-BtUVJBZC.js} +21 -21
- package/dist/waku/public/assets/{theme-toggle-Dmz_y6WP.js → theme-toggle-DOXEeTq3.js} +1 -1
- package/dist/waku/public/assets/{tree-DG78LacF.js → tree-C3mGzZ0C.js} +1 -1
- package/dist/waku/public/assets/{use-footer-items-CqWsBHs6.js → use-footer-items-CXgBoNJa.js} +1 -1
- package/dist/waku/server/__vite_rsc_assets_manifest.js +264 -264
- package/dist/waku/server/assets/{_...slugs_-BMCAhIoq.js → _...slugs_-CiARJ8hd.js} +974 -1140
- package/dist/waku/server/assets/{_root-XjXd7gPB.js → _root-bkJe_QeN.js} +1 -1
- package/dist/waku/{public/assets/_root-DaBeC_3S.css → server/assets/_root-sKZEpC02.css} +1 -1
- package/dist/waku/server/assets/{clerk-RhFsl1QP.js → clerk-DLJ3dawK.js} +1 -1
- package/dist/waku/server/assets/{image.webp-BOKMGOLF.js → image.webp-B_m88ne5.js} +1 -1
- package/dist/waku/server/assets/{img-CLVmBSIa.js → img-DUrBUt7i.js} +3 -2
- package/dist/waku/server/assets/{index-CyJguO5I.js → index-4Tf0nDtn.js} +4 -4
- package/dist/waku/server/assets/{index-BO_hzoUI.js → index-BwpW8ZuP.js} +9 -13
- package/dist/waku/server/assets/{index-CW1V6qkI.js → index-C8O2CkvW.js} +1 -1
- package/dist/waku/server/assets/{index-BBSHtA_1.js → index-CRMWLVEG.js} +4 -4
- package/dist/waku/server/assets/{index-C70n8sUu.js → index-CieqafSm.js} +3 -3
- package/dist/waku/server/assets/{index-ClZOdsKF.js → index-DoJc4ASj.js} +1 -1
- package/dist/waku/server/assets/{index-DeDhlKs8.js → index-MUAccJ82.js} +1 -1
- package/dist/waku/server/assets/{search-B6kcdfb6.js → search-Bhbf6RAP.js} +287 -205
- package/dist/waku/server/assets/{server-entry-inner-M3NMkqM3.js → server-entry-inner-Q5l36_u3.js} +37 -24
- package/dist/waku/server/build.js +1 -1
- package/dist/waku/server/index.js +1 -1
- package/dist/waku/server/ssr/__vite_rsc_assets_manifest.js +264 -264
- package/dist/waku/server/ssr/assets/{_root-CzrtrnzV.js → _root-B4Ps60HF.js} +1 -1
- package/dist/waku/server/ssr/assets/{algolia-y2iOKbWu-CCHa_K6w.js → algolia-Bq2hwZW4.js} +32 -21
- package/dist/waku/server/ssr/assets/{client-CYt7QCL1.js → client-TwYZpBGp.js} +1 -1
- package/dist/waku/server/ssr/assets/{client-Bdn2scbq.js → client-bMPyBlWE.js} +3 -3
- package/dist/waku/server/ssr/assets/fetch-p-aIY2DY.js +27 -0
- package/dist/waku/server/ssr/assets/flexsearch-static-7fJ_Ameg.js +2354 -0
- package/dist/waku/server/ssr/assets/{index-CdRoxFJ9.js → index-BKwPr7bC.js} +20 -21
- package/dist/waku/server/ssr/assets/{index-CaFoDwCg.js → index-Cp8nbqKF.js} +2 -2
- package/dist/waku/server/ssr/assets/{index-DF0GQ73L.js → index-DnNKVxRj.js} +4 -5
- package/dist/waku/server/ssr/assets/{index-Bk11yd0Y.js → index-pM_qk833.js} +2 -2
- package/dist/waku/server/ssr/assets/{mixedbread-BewwCSYr-DZXWiPap.js → mixedbread-CSL4jweV.js} +48 -43
- package/dist/waku/server/ssr/assets/orama-cloud-RSSTwGgG.js +103 -0
- package/dist/waku/server/ssr/assets/orama-cloud-legacy-BZHvDdxG.js +101 -0
- package/dist/waku/server/ssr/assets/{static-dXiDJ_Bs-rzx48rof.js → orama-static-Be_EdPC0.js} +21 -16
- package/dist/waku/server/ssr/assets/{popover-C14p0g92.js → popover-DtuNqsaI.js} +64 -69
- package/dist/waku/server/ssr/assets/{search-default-DVGL6laP.js → search-default-DAkGt9kN.js} +46 -41
- package/dist/waku/server/ssr/assets/{theme-toggle-C085yDFz.js → theme-toggle-UoA2ocTJ.js} +1 -1
- package/dist/waku/server/ssr/index.js +16 -16
- package/package.json +6 -6
- package/dist/waku/public/assets/algolia-y2iOKbWu-CSzOVkm-.js +0 -1
- package/dist/waku/public/assets/client-BzdHNfpW.js +0 -1
- package/dist/waku/public/assets/fetch-CqH9lOHV-BXhSS5YA.js +0 -1
- package/dist/waku/public/assets/index-CBzM_QzH.js +0 -1
- package/dist/waku/public/assets/orama-cloud-EXSXD2UK-CNEqwtMu.js +0 -1
- package/dist/waku/public/assets/orama-cloud-legacy-BD43H--x-BFDFaUqG.js +0 -1
- package/dist/waku/public/assets/popover-CMjlgqgN.js +0 -1
- package/dist/waku/server/ssr/assets/fetch-CqH9lOHV-CII4epom.js +0 -18
- package/dist/waku/server/ssr/assets/orama-cloud-EXSXD2UK-eFMja4Wh.js +0 -94
- package/dist/waku/server/ssr/assets/orama-cloud-legacy-BD43H--x-LNTZ6gQs.js +0 -92
- /package/dist/waku/public/assets/{remove-undefined-CM-o9RdZ-oajMeTFk.js → remove-undefined-Bfj4SlGF-oajMeTFk.js} +0 -0
- /package/dist/waku/server/ssr/assets/{remove-undefined-CM-o9RdZ-7355g_Rp.js → remove-undefined-Bfj4SlGF-7355g_Rp.js} +0 -0
package/dist/lib/cli/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import "zod";
|
|
3
3
|
import { program } from "commander";
|
|
4
4
|
import net from "node:net";
|
|
5
5
|
import path from "node:path";
|
|
@@ -7,7 +7,6 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
7
7
|
import * as dotenv from "dotenv";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import { glob } from "tinyglobby";
|
|
10
|
-
|
|
11
10
|
//#region src/cli/loader.ts
|
|
12
11
|
function loadEnv() {
|
|
13
12
|
dotenv.config({
|
|
@@ -19,22 +18,20 @@ function overrideNodeEnv(nodeEnv) {
|
|
|
19
18
|
if (process.env.NODE_ENV && process.env.NODE_ENV !== nodeEnv) console.warn(`Warning: NODE_ENV is set to '${process.env.NODE_ENV}', but overriding it to '${nodeEnv}'.`);
|
|
20
19
|
process.env.NODE_ENV = nodeEnv;
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
//#endregion
|
|
24
22
|
//#region src/constants.ts
|
|
25
23
|
const baseDir = path.join(path.dirname(fileURLToPath(import.meta.url)), "../../../");
|
|
26
|
-
|
|
27
24
|
//#endregion
|
|
28
25
|
//#region src/cli/commands.ts
|
|
29
|
-
async function runStart(
|
|
26
|
+
async function runStart({ host, dirs = [""], port: defaultPort = "8080" }) {
|
|
30
27
|
loadEnv();
|
|
31
28
|
overrideNodeEnv("production");
|
|
32
|
-
const
|
|
33
|
-
const port = await getFreePort(parseInt(flags.port || "8080", 10));
|
|
29
|
+
const port = await getFreePort(parseInt(defaultPort, 10));
|
|
34
30
|
const serveFileUrl = pathToFileURL(path.resolve(baseDir, "dist", "waku", "serve-node.js")).href;
|
|
35
31
|
if (host) process.env.HOST = host;
|
|
36
32
|
process.env.PORT = String(port);
|
|
37
|
-
process.env.
|
|
33
|
+
process.env.ROOT_DIR = process.cwd();
|
|
34
|
+
process.env.DEFAULT_RPOJECT_DIR = JSON.stringify(dirs.map((v) => path.resolve(v)));
|
|
38
35
|
process.env.HOT_RELOAD = "1";
|
|
39
36
|
process.chdir(baseDir);
|
|
40
37
|
await import(serveFileUrl);
|
|
@@ -50,7 +47,6 @@ async function getFreePort(startPort) {
|
|
|
50
47
|
if (err.code !== "EADDRINUSE") throw err;
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
|
|
54
50
|
//#endregion
|
|
55
51
|
//#region src/config/load-node.ts
|
|
56
52
|
/**
|
|
@@ -59,16 +55,14 @@ async function getFreePort(startPort) {
|
|
|
59
55
|
const DefaultConfigPatterns = ["fumapress.config.{js,jsx,ts,tsx}"];
|
|
60
56
|
async function findConfigPath() {
|
|
61
57
|
const paths = await glob(DefaultConfigPatterns, {
|
|
62
|
-
cwd: process.env.
|
|
58
|
+
cwd: process.env.ROOT_DIR,
|
|
63
59
|
absolute: true
|
|
64
60
|
});
|
|
65
61
|
return paths.length > 0 ? paths[0] : null;
|
|
66
62
|
}
|
|
67
|
-
|
|
68
63
|
//#endregion
|
|
69
64
|
//#region package.json
|
|
70
|
-
var version = "0.1.
|
|
71
|
-
|
|
65
|
+
var version = "0.1.5";
|
|
72
66
|
//#endregion
|
|
73
67
|
//#region src/cli/index.ts
|
|
74
68
|
program.command("init").description("create configuration file").action(async () => {
|
|
@@ -77,10 +71,12 @@ program.command("init").description("create configuration file").action(async ()
|
|
|
77
71
|
console.log("note: make sure to install `fumapress` as a dev dependency too.");
|
|
78
72
|
}
|
|
79
73
|
});
|
|
80
|
-
program.command("start", { isDefault: true }).description("start Fumapress").option("-p, --port <PORT>").option("-h, --host <HOST>").action(async (options) => {
|
|
81
|
-
await runStart(
|
|
74
|
+
program.command("start", { isDefault: true }).description("start Fumapress").argument("[dirs...]", "a list of content directories to view").option("-p, --port <PORT>").option("-h, --host <HOST>").action(async (dirs, options) => {
|
|
75
|
+
await runStart({
|
|
76
|
+
...options,
|
|
77
|
+
dirs
|
|
78
|
+
});
|
|
82
79
|
});
|
|
83
80
|
program.version(version).parseAsync(process.argv);
|
|
84
|
-
|
|
85
81
|
//#endregion
|
|
86
|
-
export {
|
|
82
|
+
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as projectConfigSchema, i as layoutConfigSchema, n as contentConfigSchema, r as defineConfig, t as configSchema } from "../global-
|
|
2
|
-
|
|
3
|
-
export { configSchema, contentConfigSchema, defineConfig, layoutConfigSchema, projectConfigSchema };
|
|
1
|
+
import { a as projectConfigSchema, i as layoutConfigSchema, n as contentConfigSchema, r as defineConfig, t as configSchema } from "../global-CUpPuEBG.mjs";
|
|
2
|
+
export { configSchema, contentConfigSchema, defineConfig, layoutConfigSchema, projectConfigSchema };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/config/global.ts
|
|
4
3
|
const layoutConfigSchema = z.object({
|
|
5
4
|
base: z.custom().refine((v) => typeof v === "function").or(z.custom().refine((v) => typeof v === "object" && v !== null)).optional(),
|
|
@@ -20,6 +19,5 @@ const configSchema = z.object({
|
|
|
20
19
|
function defineConfig(config = {}) {
|
|
21
20
|
return config;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
|
-
export { projectConfigSchema as a, layoutConfigSchema as i, contentConfigSchema as n, defineConfig as r, configSchema as t };
|
|
23
|
+
export { projectConfigSchema as a, layoutConfigSchema as i, contentConfigSchema as n, defineConfig as r, configSchema as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as J}from"./index-DuwR7a0G.js";import{u as ee,P as te,d as H,j as Re}from"./createLucideIcon-CAVKR3s7.js";import{u as x}from"./index-DMVP094G.js";function Le(e,t=globalThis?.document){const n=x(e);c.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Te="DismissableLayer",Q="dismissableLayer.update",Ae="dismissableLayer.pointerDownOutside",ke="dismissableLayer.focusOutside",re,me=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),De=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:s,onDismiss:o,...S}=e,l=c.useContext(me),[f,h]=c.useState(null),v=f?.ownerDocument??globalThis?.document,[,y]=c.useState({}),C=ee(t,p=>h(p)),i=Array.from(l.layers),[d]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=i.indexOf(d),E=f?i.indexOf(f):-1,g=l.layersWithOutsidePointerEventsDisabled.size>0,b=E>=m,w=xe(p=>{const L=p.target,T=[...l.branches].some(F=>F.contains(L));!b||T||(a?.(p),s?.(p),p.defaultPrevented||o?.())},v),O=Me(p=>{const L=p.target;[...l.branches].some(F=>F.contains(L))||(u?.(p),s?.(p),p.defaultPrevented||o?.())},v);return Le(p=>{E===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&o&&(p.preventDefault(),o()))},v),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(re=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ae(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=re)}},[f,v,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ae())},[f,l]),c.useEffect(()=>{const p=()=>y({});return document.addEventListener(Q,p),()=>document.removeEventListener(Q,p)},[]),J.jsx(te.div,{...S,ref:C,style:{pointerEvents:g?b?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,O.onFocusCapture),onBlurCapture:H(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,w.onPointerDownCapture)})});De.displayName=Te;var Ne="DismissableLayerBranch",Fe=c.forwardRef((e,t)=>{const n=c.useContext(me),r=c.useRef(null),a=ee(t,r);return c.useEffect(()=>{const u=r.current;if(u)return n.branches.add(u),()=>{n.branches.delete(u)}},[n.branches]),J.jsx(te.div,{...e,ref:a})});Fe.displayName=Ne;function xe(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1),a=c.useRef(()=>{});return c.useEffect(()=>{const u=o=>{if(o.target&&!r.current){let S=function(){pe(Ae,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=S,t.addEventListener("click",a.current,{once:!0})):S()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Me(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1);return c.useEffect(()=>{const a=u=>{u.target&&!r.current&&pe(ke,n,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){const e=new CustomEvent(Q);document.dispatchEvent(e)}function pe(e,t,n,{discrete:r}){const a=n.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Re(a,u):a.dispatchEvent(u)}var V=0;function Ft(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oe()),document.body.insertAdjacentElement("beforeend",e[1]??oe()),V++,()=>{V===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),V--}},[])}function oe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var X="focusScope.autoFocusOnMount",Y="focusScope.autoFocusOnUnmount",ie={bubbles:!1,cancelable:!0},Ie="FocusScope",Be=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:u,...s}=e,[o,S]=c.useState(null),l=x(a),f=x(u),h=c.useRef(null),v=ee(t,i=>S(i)),y=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let i=function(g){if(y.paused||!o)return;const b=g.target;o.contains(b)?h.current=b:R(h.current,{select:!0})},d=function(g){if(y.paused||!o)return;const b=g.relatedTarget;b!==null&&(o.contains(b)||R(h.current,{select:!0}))},m=function(g){if(document.activeElement===document.body)for(const w of g)w.removedNodes.length>0&&R(o)};document.addEventListener("focusin",i),document.addEventListener("focusout",d);const E=new MutationObserver(m);return o&&E.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",i),document.removeEventListener("focusout",d),E.disconnect()}}},[r,o,y.paused]),c.useEffect(()=>{if(o){ue.add(y);const i=document.activeElement;if(!o.contains(i)){const m=new CustomEvent(X,ie);o.addEventListener(X,l),o.dispatchEvent(m),m.defaultPrevented||(We(He(ye(o)),{select:!0}),document.activeElement===i&&R(o))}return()=>{o.removeEventListener(X,l),setTimeout(()=>{const m=new CustomEvent(Y,ie);o.addEventListener(Y,f),o.dispatchEvent(m),m.defaultPrevented||R(i??document.body,{select:!0}),o.removeEventListener(Y,f),ue.remove(y)},0)}}},[o,l,f,y]);const C=c.useCallback(i=>{if(!n&&!r||y.paused)return;const d=i.key==="Tab"&&!i.altKey&&!i.ctrlKey&&!i.metaKey,m=document.activeElement;if(d&&m){const E=i.currentTarget,[g,b]=Ue(E);g&&b?!i.shiftKey&&m===b?(i.preventDefault(),n&&R(g,{select:!0})):i.shiftKey&&m===g&&(i.preventDefault(),n&&R(b,{select:!0})):m===E&&i.preventDefault()}},[n,r,y.paused]);return J.jsx(te.div,{tabIndex:-1,...s,ref:v,onKeyDown:C})});Be.displayName=Ie;function We(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(R(r,{select:t}),document.activeElement!==n)return}function Ue(e){const t=ye(e),n=ce(t,e),r=ce(t.reverse(),e);return[n,r]}function ye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ce(e,t){for(const n of e)if(!_e(n,{upTo:t}))return n}function _e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function je(e){return e instanceof HTMLInputElement&&"select"in e}function R(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&je(e)&&t&&e.select()}}var ue=Ke();function Ke(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=se(e,t),e.unshift(t)},remove(t){e=se(e,t),e[0]?.resume()}}}function se(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function He(e){return e.filter(t=>t.tagName!=="A")}var Ve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},A=new WeakMap,I=new WeakMap,B={},z=0,Ee=function(e){return e&&(e.host||Ee(e.parentNode))},Xe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ee(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ye=function(e,t,n,r){var a=Xe(t,Array.isArray(e)?e:[e]);B[n]||(B[n]=new WeakMap);var u=B[n],s=[],o=new Set,S=new Set(a),l=function(h){!h||o.has(h)||(o.add(h),l(h.parentNode))};a.forEach(l);var f=function(h){!h||S.has(h)||Array.prototype.forEach.call(h.children,function(v){if(o.has(v))f(v);else try{var y=v.getAttribute(r),C=y!==null&&y!=="false",i=(A.get(v)||0)+1,d=(u.get(v)||0)+1;A.set(v,i),u.set(v,d),s.push(v),i===1&&C&&I.set(v,!0),d===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",v,m)}})};return f(t),o.clear(),z++,function(){s.forEach(function(h){var v=A.get(h)-1,y=u.get(h)-1;A.set(h,v),u.set(h,y),v||(I.has(h)||h.removeAttribute(r),I.delete(h)),y||h.removeAttribute(n)}),z--,z||(A=new WeakMap,A=new WeakMap,I=new WeakMap,B={})}},xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Ve(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Ye(r,a,n,"aria-hidden")):function(){return null}},P=function(){return P=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(t[u]=n[u])}return t},P.apply(this,arguments)};function ge(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function ze(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,u;r<a;r++)(u||!(r in t))&&(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return e.concat(u||Array.prototype.slice.call(t))}var _="right-scroll-bar-position",j="width-before-scroll-bar",Ge="with-scroll-bars-hidden",Ze="--removed-body-scroll-bar-size";function G(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qe(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Qe=typeof window<"u"?c.useLayoutEffect:c.useEffect,le=new WeakMap;function $e(e,t){var n=qe(null,function(r){return e.forEach(function(a){return G(a,r)})});return Qe(function(){var r=le.get(n);if(r){var a=new Set(r),u=new Set(e),s=n.current;a.forEach(function(o){u.has(o)||G(o,null)}),u.forEach(function(o){a.has(o)||G(o,s)})}le.set(n,e)},[e]),n}function Je(e){return e}function et(e,t){t===void 0&&(t=Je);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(u){var s=t(u,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(u){for(r=!0;n.length;){var s=n;n=[],s.forEach(u)}n={push:function(o){return u(o)},filter:function(){return n}}},assignMedium:function(u){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(u),s=n}var S=function(){var f=s;s=[],f.forEach(u)},l=function(){return Promise.resolve().then(S)};l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return a}function tt(e){e===void 0&&(e={});var t=et(null);return t.options=P({async:!0,ssr:!1},e),t}var be=function(e){var t=e.sideCar,n=ge(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,P({},n))};be.isSideCarExport=!0;function nt(e,t){return e.useMedium(t),be}var Se=tt(),Z=function(){},K=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Z,onWheelCapture:Z,onTouchMoveCapture:Z}),a=r[0],u=r[1],s=e.forwardProps,o=e.children,S=e.className,l=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,y=e.noRelative,C=e.noIsolation,i=e.inert,d=e.allowPinchZoom,m=e.as,E=m===void 0?"div":m,g=e.gapMode,b=ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=v,O=$e([n,t]),p=P(P({},b),a);return c.createElement(c.Fragment,null,f&&c.createElement(w,{sideCar:Se,removeScrollBar:l,shards:h,noRelative:y,noIsolation:C,inert:i,setCallbacks:u,allowPinchZoom:!!d,lockRef:n,gapMode:g}),s?c.cloneElement(c.Children.only(o),P(P({},p),{ref:O})):c.createElement(E,P({},p,{className:S,ref:O}),o))});K.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};K.classNames={fullWidth:j,zeroRight:_};var rt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function at(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rt();return t&&e.setAttribute("nonce",t),e}function ot(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function it(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ct=function(){var e=0,t=null;return{add:function(n){e==0&&(t=at())&&(ot(t,n),it(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ut=function(){var e=ct();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},we=function(){var e=ut(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},st={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||"",10)||0},lt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[q(n),q(r),q(a)]},dt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return st;var t=lt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ft=we(),N="data-scroll-locked",vt=function(e,t,n,r){var a=e.left,u=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{r as c,j as J}from"./index-DvVAQ8Oe.js";import{u as ee,P as te,d as H,j as Re}from"./createLucideIcon-Ikl4uxUR.js";import{u as x}from"./index-B3vk6DwG.js";function Le(e,t=globalThis?.document){const n=x(e);c.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Te="DismissableLayer",Q="dismissableLayer.update",Ae="dismissableLayer.pointerDownOutside",ke="dismissableLayer.focusOutside",re,me=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),De=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:s,onDismiss:o,...S}=e,l=c.useContext(me),[f,h]=c.useState(null),v=f?.ownerDocument??globalThis?.document,[,y]=c.useState({}),C=ee(t,p=>h(p)),i=Array.from(l.layers),[d]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=i.indexOf(d),E=f?i.indexOf(f):-1,g=l.layersWithOutsidePointerEventsDisabled.size>0,b=E>=m,w=xe(p=>{const L=p.target,T=[...l.branches].some(F=>F.contains(L));!b||T||(a?.(p),s?.(p),p.defaultPrevented||o?.())},v),O=Me(p=>{const L=p.target;[...l.branches].some(F=>F.contains(L))||(u?.(p),s?.(p),p.defaultPrevented||o?.())},v);return Le(p=>{E===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&o&&(p.preventDefault(),o()))},v),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(re=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ae(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=re)}},[f,v,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ae())},[f,l]),c.useEffect(()=>{const p=()=>y({});return document.addEventListener(Q,p),()=>document.removeEventListener(Q,p)},[]),J.jsx(te.div,{...S,ref:C,style:{pointerEvents:g?b?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,O.onFocusCapture),onBlurCapture:H(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,w.onPointerDownCapture)})});De.displayName=Te;var Ne="DismissableLayerBranch",Fe=c.forwardRef((e,t)=>{const n=c.useContext(me),r=c.useRef(null),a=ee(t,r);return c.useEffect(()=>{const u=r.current;if(u)return n.branches.add(u),()=>{n.branches.delete(u)}},[n.branches]),J.jsx(te.div,{...e,ref:a})});Fe.displayName=Ne;function xe(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1),a=c.useRef(()=>{});return c.useEffect(()=>{const u=o=>{if(o.target&&!r.current){let S=function(){pe(Ae,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=S,t.addEventListener("click",a.current,{once:!0})):S()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Me(e,t=globalThis?.document){const n=x(e),r=c.useRef(!1);return c.useEffect(()=>{const a=u=>{u.target&&!r.current&&pe(ke,n,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){const e=new CustomEvent(Q);document.dispatchEvent(e)}function pe(e,t,n,{discrete:r}){const a=n.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Re(a,u):a.dispatchEvent(u)}var V=0;function Ft(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oe()),document.body.insertAdjacentElement("beforeend",e[1]??oe()),V++,()=>{V===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),V--}},[])}function oe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var X="focusScope.autoFocusOnMount",Y="focusScope.autoFocusOnUnmount",ie={bubbles:!1,cancelable:!0},Ie="FocusScope",Be=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:u,...s}=e,[o,S]=c.useState(null),l=x(a),f=x(u),h=c.useRef(null),v=ee(t,i=>S(i)),y=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let i=function(g){if(y.paused||!o)return;const b=g.target;o.contains(b)?h.current=b:R(h.current,{select:!0})},d=function(g){if(y.paused||!o)return;const b=g.relatedTarget;b!==null&&(o.contains(b)||R(h.current,{select:!0}))},m=function(g){if(document.activeElement===document.body)for(const w of g)w.removedNodes.length>0&&R(o)};document.addEventListener("focusin",i),document.addEventListener("focusout",d);const E=new MutationObserver(m);return o&&E.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",i),document.removeEventListener("focusout",d),E.disconnect()}}},[r,o,y.paused]),c.useEffect(()=>{if(o){ue.add(y);const i=document.activeElement;if(!o.contains(i)){const m=new CustomEvent(X,ie);o.addEventListener(X,l),o.dispatchEvent(m),m.defaultPrevented||(We(He(ye(o)),{select:!0}),document.activeElement===i&&R(o))}return()=>{o.removeEventListener(X,l),setTimeout(()=>{const m=new CustomEvent(Y,ie);o.addEventListener(Y,f),o.dispatchEvent(m),m.defaultPrevented||R(i??document.body,{select:!0}),o.removeEventListener(Y,f),ue.remove(y)},0)}}},[o,l,f,y]);const C=c.useCallback(i=>{if(!n&&!r||y.paused)return;const d=i.key==="Tab"&&!i.altKey&&!i.ctrlKey&&!i.metaKey,m=document.activeElement;if(d&&m){const E=i.currentTarget,[g,b]=Ue(E);g&&b?!i.shiftKey&&m===b?(i.preventDefault(),n&&R(g,{select:!0})):i.shiftKey&&m===g&&(i.preventDefault(),n&&R(b,{select:!0})):m===E&&i.preventDefault()}},[n,r,y.paused]);return J.jsx(te.div,{tabIndex:-1,...s,ref:v,onKeyDown:C})});Be.displayName=Ie;function We(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(R(r,{select:t}),document.activeElement!==n)return}function Ue(e){const t=ye(e),n=ce(t,e),r=ce(t.reverse(),e);return[n,r]}function ye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ce(e,t){for(const n of e)if(!_e(n,{upTo:t}))return n}function _e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function je(e){return e instanceof HTMLInputElement&&"select"in e}function R(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&je(e)&&t&&e.select()}}var ue=Ke();function Ke(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=se(e,t),e.unshift(t)},remove(t){e=se(e,t),e[0]?.resume()}}}function se(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function He(e){return e.filter(t=>t.tagName!=="A")}var Ve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},A=new WeakMap,I=new WeakMap,B={},z=0,Ee=function(e){return e&&(e.host||Ee(e.parentNode))},Xe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ee(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ye=function(e,t,n,r){var a=Xe(t,Array.isArray(e)?e:[e]);B[n]||(B[n]=new WeakMap);var u=B[n],s=[],o=new Set,S=new Set(a),l=function(h){!h||o.has(h)||(o.add(h),l(h.parentNode))};a.forEach(l);var f=function(h){!h||S.has(h)||Array.prototype.forEach.call(h.children,function(v){if(o.has(v))f(v);else try{var y=v.getAttribute(r),C=y!==null&&y!=="false",i=(A.get(v)||0)+1,d=(u.get(v)||0)+1;A.set(v,i),u.set(v,d),s.push(v),i===1&&C&&I.set(v,!0),d===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",v,m)}})};return f(t),o.clear(),z++,function(){s.forEach(function(h){var v=A.get(h)-1,y=u.get(h)-1;A.set(h,v),u.set(h,y),v||(I.has(h)||h.removeAttribute(r),I.delete(h)),y||h.removeAttribute(n)}),z--,z||(A=new WeakMap,A=new WeakMap,I=new WeakMap,B={})}},xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Ve(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Ye(r,a,n,"aria-hidden")):function(){return null}},P=function(){return P=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(t[u]=n[u])}return t},P.apply(this,arguments)};function ge(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function ze(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,u;r<a;r++)(u||!(r in t))&&(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return e.concat(u||Array.prototype.slice.call(t))}var _="right-scroll-bar-position",j="width-before-scroll-bar",Ge="with-scroll-bars-hidden",Ze="--removed-body-scroll-bar-size";function G(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qe(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Qe=typeof window<"u"?c.useLayoutEffect:c.useEffect,le=new WeakMap;function $e(e,t){var n=qe(null,function(r){return e.forEach(function(a){return G(a,r)})});return Qe(function(){var r=le.get(n);if(r){var a=new Set(r),u=new Set(e),s=n.current;a.forEach(function(o){u.has(o)||G(o,null)}),u.forEach(function(o){a.has(o)||G(o,s)})}le.set(n,e)},[e]),n}function Je(e){return e}function et(e,t){t===void 0&&(t=Je);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(u){var s=t(u,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(u){for(r=!0;n.length;){var s=n;n=[],s.forEach(u)}n={push:function(o){return u(o)},filter:function(){return n}}},assignMedium:function(u){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(u),s=n}var S=function(){var f=s;s=[],f.forEach(u)},l=function(){return Promise.resolve().then(S)};l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return a}function tt(e){e===void 0&&(e={});var t=et(null);return t.options=P({async:!0,ssr:!1},e),t}var be=function(e){var t=e.sideCar,n=ge(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,P({},n))};be.isSideCarExport=!0;function nt(e,t){return e.useMedium(t),be}var Se=tt(),Z=function(){},K=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Z,onWheelCapture:Z,onTouchMoveCapture:Z}),a=r[0],u=r[1],s=e.forwardProps,o=e.children,S=e.className,l=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,y=e.noRelative,C=e.noIsolation,i=e.inert,d=e.allowPinchZoom,m=e.as,E=m===void 0?"div":m,g=e.gapMode,b=ge(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=v,O=$e([n,t]),p=P(P({},b),a);return c.createElement(c.Fragment,null,f&&c.createElement(w,{sideCar:Se,removeScrollBar:l,shards:h,noRelative:y,noIsolation:C,inert:i,setCallbacks:u,allowPinchZoom:!!d,lockRef:n,gapMode:g}),s?c.cloneElement(c.Children.only(o),P(P({},p),{ref:O})):c.createElement(E,P({},p,{className:S,ref:O}),o))});K.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};K.classNames={fullWidth:j,zeroRight:_};var rt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function at(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rt();return t&&e.setAttribute("nonce",t),e}function ot(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function it(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ct=function(){var e=0,t=null;return{add:function(n){e==0&&(t=at())&&(ot(t,n),it(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ut=function(){var e=ct();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},we=function(){var e=ut(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},st={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||"",10)||0},lt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[q(n),q(r),q(a)]},dt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return st;var t=lt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ft=we(),N="data-scroll-locked",vt=function(e,t,n,r){var a=e.left,u=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Ge,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(o,"px ").concat(r,`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={};export{e as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/search-default-
|
|
2
|
-
import{u as q,r as G,j as P,_ as fn,L as ln}from"./index-DuwR7a0G.js";import{I as dn}from"./i18n-BhI45ncj.js";import{S as pn,J as hn}from"./index-CTvySzVr.js";import{D as mn}from"./index-ZDJcsmb2.js";import{F as _n}from"./index-JmrfuxXc.js";function u(e,n,t){function r(c,a){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:a,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),n(c,a);const f=s.prototype,l=Object.keys(f);for(let m=0;m<l.length;m++){const p=l[m];p in c||(c[p]=f[p].bind(c))}}const o=t?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(c){var a;const f=t?.Parent?new i:this;r(f,c),(a=f._zod).deferred??(a.deferred=[]);for(const l of f._zod.deferred)l();return f}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>t?.Parent&&c instanceof t.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class N extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ie extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Te={};function A(e){return Te}function Ae(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function oe(e,n){return typeof n=="bigint"?n.toString():n}function Q(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function ce(e){return e==null}function ae(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}const pe=Symbol("evaluating");function _(e,n,t){let r;Object.defineProperty(e,n,{get(){if(r!==pe)return r===void 0&&(r=pe,r=t()),r},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function R(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function I(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function he(e){return JSON.stringify(e)}function gn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function x(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const vn=Q(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function F(e){if(x(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const t=n.prototype;return!(x(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function Re(e){return F(e)?{...e}:Array.isArray(e)?[...e]:e}const yn=new Set(["string","number","symbol"]);function U(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t?.parent)&&(r._zod.parent=e),r}function d(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function zn(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function wn(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=I(e._zod.def,{get shape(){const s={};for(const c in n){if(!(c in t.shape))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(s[c]=t.shape[c])}return R(this,"shape",s),s},checks:[]});return T(e,i)}function bn(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=I(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const c in n){if(!(c in t.shape))throw new Error(`Unrecognized key: "${c}"`);n[c]&&delete s[c]}return R(this,"shape",s),s},checks:[]});return T(e,i)}function kn(e,n){if(!F(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0){const i=e._zod.def.shape;for(const s in n)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=I(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n};return R(this,"shape",i),i}});return T(e,o)}function $n(e,n){if(!F(n))throw new Error("Invalid input to safeExtend: expected a plain object");const t=I(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return R(this,"shape",r),r}});return T(e,t)}function Zn(e,n){const t=I(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return R(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return T(e,t)}function On(e,n,t){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=I(n._zod.def,{get shape(){const c=n._zod.def.shape,a={...c};if(t)for(const f in t){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(a[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)a[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return R(this,"shape",a),a},checks:[]});return T(n,s)}function Sn(e,n,t){const r=I(n._zod.def,{get shape(){const o=n._zod.def.shape,i={...o};if(t)for(const s in t){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return R(this,"shape",i),i}});return T(n,r)}function C(e,n=0){if(e.aborted===!0)return!0;for(let t=n;t<e.issues.length;t++)if(e.issues[t]?.continue!==!0)return!0;return!1}function Ce(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function W(e){return typeof e=="string"?e:e?.message}function D(e,n,t){const r={...e,path:e.path??[]};if(!e.message){const o=W(e.inst?._zod.def?.error?.(e))??W(n?.error?.(e))??W(t.customError?.(e))??W(t.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function ue(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function V(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Ne=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,oe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ue=u("$ZodError",Ne),Je=u("$ZodError",Ne,{Parent:Error});function Pn(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function En(e,n=t=>t.message){const t={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));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)t._errors.push(n(i));else{let s=t,c=0;for(;c<i.path.length;){const a=i.path[c];c===i.path.length-1?(s[a]=s[a]||{_errors:[]},s[a]._errors.push(n(i))):s[a]=s[a]||{_errors:[]},s=s[a],c++}}};return r(e),t}const fe=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new N;if(s.issues.length){const c=new(o?.Err??e)(s.issues.map(a=>D(a,i,A())));throw De(c,o?.callee),c}return s.value},le=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(o?.Err??e)(s.issues.map(a=>D(a,i,A())));throw De(c,o?.callee),c}return s.value},ee=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new N;return i.issues.length?{success:!1,error:new(e??Ue)(i.issues.map(s=>D(s,o,A())))}:{success:!0,data:i.value}},jn=ee(Je),ne=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>D(s,o,A())))}:{success:!0,data:i.value}},In=ne(Je),Tn=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fe(e)(n,t,o)},An=e=>(n,t,r)=>fe(e)(n,t,r),Dn=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return le(e)(n,t,o)},Rn=e=>async(n,t,r)=>le(e)(n,t,r),Cn=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ee(e)(n,t,o)},Nn=e=>(n,t,r)=>ee(e)(n,t,r),Un=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ne(e)(n,t,o)},Jn=e=>async(n,t,r)=>ne(e)(n,t,r),Ln=/^[cC][^\s-]{8,}$/,xn=/^[0-9a-z]+$/,Fn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vn=/^[0-9a-vA-V]{20}$/,Mn=/^[A-Za-z0-9]{27}$/,Wn=/^[a-zA-Z0-9_-]{21}$/,Kn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bn=/^([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})$/,me=e=>e?new 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)$/,qn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Gn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Hn(){return new RegExp(Gn,"u")}const Xn=/^(?:(?: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])$/,Yn=/^(([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}|:))$/,Qn=/^((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])$/,et=/^(([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])$/,nt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Le=/^[A-Za-z0-9_-]*$/,tt=/^\+[1-9]\d{6,14}$/,xe="(?:(?:\\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])))",rt=new RegExp(`^${xe}$`);function Fe(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ot(e){return new RegExp(`^${Fe(e)}$`)}function st(e){const n=Fe({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${xe}T(?:${r})$`)}const it=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ct=/^[^A-Z]*$/,at=/^[^a-z]*$/,j=u("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ut=u("$ZodCheckMaxLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const s=ue(o);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ft=u("$ZodCheckMinLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const s=ue(o);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),lt=u("$ZodCheckLengthEquals",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const s=ue(o),c=i>n.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),te=u("$ZodCheckStringFormat",(e,n)=>{var t,r;j.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),dt=u("$ZodCheckRegex",(e,n)=>{te.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),pt=u("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=ct),te.init(e,n)}),ht=u("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=at),te.init(e,n)}),mt=u("$ZodCheckIncludes",(e,n)=>{j.init(e,n);const t=U(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),_t=u("$ZodCheckStartsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`^${U(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),gt=u("$ZodCheckEndsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`.*${U(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),vt=u("$ZodCheckOverwrite",(e,n)=>{j.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class yt{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/search-default-BtUVJBZC.js","assets/i18n-C0h9pHVo.js","assets/index-DvVAQ8Oe.js","assets/index-o2xqr_BE.js","assets/bundle-mjs-CPcsbTWB.js","assets/button-Ck6BbGsZ.js","assets/index-0DvavhIV.js","assets/createLucideIcon-Ikl4uxUR.js","assets/Combination-C4kdyuYD.js","assets/index-B3vk6DwG.js","assets/search-D_-0Dzi8.js","assets/chevron-right-C77AA9TY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as q,r as G,j as P,_ as fn,L as ln}from"./index-DvVAQ8Oe.js";import{I as dn}from"./i18n-C0h9pHVo.js";import{S as pn,J as hn}from"./index-Dq_4MxWs.js";import{D as mn}from"./index-ELh_T-2L.js";import{F as _n}from"./index-o2xqr_BE.js";function u(e,n,t){function r(c,a){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:a,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),n(c,a);const f=s.prototype,l=Object.keys(f);for(let m=0;m<l.length;m++){const p=l[m];p in c||(c[p]=f[p].bind(c))}}const o=t?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(c){var a;const f=t?.Parent?new i:this;r(f,c),(a=f._zod).deferred??(a.deferred=[]);for(const l of f._zod.deferred)l();return f}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>t?.Parent&&c instanceof t.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class N extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ie extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Te={};function A(e){return Te}function Ae(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function oe(e,n){return typeof n=="bigint"?n.toString():n}function Q(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function ce(e){return e==null}function ae(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}const pe=Symbol("evaluating");function _(e,n,t){let r;Object.defineProperty(e,n,{get(){if(r!==pe)return r===void 0&&(r=pe,r=t()),r},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function R(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function I(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function he(e){return JSON.stringify(e)}function gn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function x(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const vn=Q(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function F(e){if(x(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const t=n.prototype;return!(x(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function Re(e){return F(e)?{...e}:Array.isArray(e)?[...e]:e}const yn=new Set(["string","number","symbol"]);function U(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t?.parent)&&(r._zod.parent=e),r}function d(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function zn(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function wn(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=I(e._zod.def,{get shape(){const s={};for(const c in n){if(!(c in t.shape))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(s[c]=t.shape[c])}return R(this,"shape",s),s},checks:[]});return T(e,i)}function bn(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=I(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const c in n){if(!(c in t.shape))throw new Error(`Unrecognized key: "${c}"`);n[c]&&delete s[c]}return R(this,"shape",s),s},checks:[]});return T(e,i)}function kn(e,n){if(!F(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0){const i=e._zod.def.shape;for(const s in n)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=I(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n};return R(this,"shape",i),i}});return T(e,o)}function $n(e,n){if(!F(n))throw new Error("Invalid input to safeExtend: expected a plain object");const t=I(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return R(this,"shape",r),r}});return T(e,t)}function Zn(e,n){const t=I(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return R(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return T(e,t)}function On(e,n,t){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=I(n._zod.def,{get shape(){const c=n._zod.def.shape,a={...c};if(t)for(const f in t){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(a[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)a[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return R(this,"shape",a),a},checks:[]});return T(n,s)}function Sn(e,n,t){const r=I(n._zod.def,{get shape(){const o=n._zod.def.shape,i={...o};if(t)for(const s in t){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return R(this,"shape",i),i}});return T(n,r)}function C(e,n=0){if(e.aborted===!0)return!0;for(let t=n;t<e.issues.length;t++)if(e.issues[t]?.continue!==!0)return!0;return!1}function Ce(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function W(e){return typeof e=="string"?e:e?.message}function D(e,n,t){const r={...e,path:e.path??[]};if(!e.message){const o=W(e.inst?._zod.def?.error?.(e))??W(n?.error?.(e))??W(t.customError?.(e))??W(t.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function ue(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function V(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Ne=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,oe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ue=u("$ZodError",Ne),Je=u("$ZodError",Ne,{Parent:Error});function Pn(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function En(e,n=t=>t.message){const t={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));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)t._errors.push(n(i));else{let s=t,c=0;for(;c<i.path.length;){const a=i.path[c];c===i.path.length-1?(s[a]=s[a]||{_errors:[]},s[a]._errors.push(n(i))):s[a]=s[a]||{_errors:[]},s=s[a],c++}}};return r(e),t}const fe=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new N;if(s.issues.length){const c=new(o?.Err??e)(s.issues.map(a=>D(a,i,A())));throw De(c,o?.callee),c}return s.value},le=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(o?.Err??e)(s.issues.map(a=>D(a,i,A())));throw De(c,o?.callee),c}return s.value},ee=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new N;return i.issues.length?{success:!1,error:new(e??Ue)(i.issues.map(s=>D(s,o,A())))}:{success:!0,data:i.value}},jn=ee(Je),ne=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>D(s,o,A())))}:{success:!0,data:i.value}},In=ne(Je),Tn=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return fe(e)(n,t,o)},An=e=>(n,t,r)=>fe(e)(n,t,r),Dn=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return le(e)(n,t,o)},Rn=e=>async(n,t,r)=>le(e)(n,t,r),Cn=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ee(e)(n,t,o)},Nn=e=>(n,t,r)=>ee(e)(n,t,r),Un=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ne(e)(n,t,o)},Jn=e=>async(n,t,r)=>ne(e)(n,t,r),Ln=/^[cC][^\s-]{8,}$/,xn=/^[0-9a-z]+$/,Fn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vn=/^[0-9a-vA-V]{20}$/,Mn=/^[A-Za-z0-9]{27}$/,Wn=/^[a-zA-Z0-9_-]{21}$/,Kn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bn=/^([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})$/,me=e=>e?new 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)$/,qn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Gn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Hn(){return new RegExp(Gn,"u")}const Xn=/^(?:(?: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])$/,Yn=/^(([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}|:))$/,Qn=/^((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])$/,et=/^(([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])$/,nt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Le=/^[A-Za-z0-9_-]*$/,tt=/^\+[1-9]\d{6,14}$/,xe="(?:(?:\\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])))",rt=new RegExp(`^${xe}$`);function Fe(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ot(e){return new RegExp(`^${Fe(e)}$`)}function st(e){const n=Fe({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${xe}T(?:${r})$`)}const it=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ct=/^[^A-Z]*$/,at=/^[^a-z]*$/,j=u("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ut=u("$ZodCheckMaxLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const s=ue(o);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ft=u("$ZodCheckMinLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const s=ue(o);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),lt=u("$ZodCheckLengthEquals",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ce(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const s=ue(o),c=i>n.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),te=u("$ZodCheckStringFormat",(e,n)=>{var t,r;j.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),dt=u("$ZodCheckRegex",(e,n)=>{te.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),pt=u("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=ct),te.init(e,n)}),ht=u("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=at),te.init(e,n)}),mt=u("$ZodCheckIncludes",(e,n)=>{j.init(e,n);const t=U(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),_t=u("$ZodCheckStartsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`^${U(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),gt=u("$ZodCheckEndsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`.*${U(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),vt=u("$ZodCheckOverwrite",(e,n)=>{j.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class yt{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
3
3
|
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const n=Function,t=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new n(...t,o.join(`
|
|
4
4
|
`))}}const zt={major:4,minor:3,patch:6},y=u("$ZodType",(e,n)=>{var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=zt;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,c,a)=>{let f=C(s),l;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(s))continue}else if(f)continue;const p=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&a?.async===!1)throw new N;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,s.issues.length!==p&&(f||(f=C(s,p)))});else{if(s.issues.length===p)continue;f||(f=C(s,p))}}return l?l.then(()=>s):s},i=(s,c,a)=>{if(C(s))return s.aborted=!0,s;const f=o(c,r,a);if(f instanceof Promise){if(a.async===!1)throw new N;return f.then(l=>e._zod.parse(l,a))}return e._zod.parse(f,a)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const f=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(l=>i(l,s,c)):i(f,s,c)}const a=e._zod.parse(s,c);if(a instanceof Promise){if(c.async===!1)throw new N;return a.then(f=>o(f,r,c))}return o(a,r,c)}}_(e,"~standard",()=>({validate:o=>{try{const i=jn(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return In(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),de=u("$ZodString",(e,n)=>{y.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??it(e._zod.bag),e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:e}),t}}),g=u("$ZodStringFormat",(e,n)=>{te.init(e,n),de.init(e,n)}),wt=u("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Bn),g.init(e,n)}),bt=u("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=me(r))}else n.pattern??(n.pattern=me());g.init(e,n)}),kt=u("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=qn),g.init(e,n)}),$t=u("$ZodURL",(e,n)=>{g.init(e,n),e._zod.check=t=>{try{const r=t.value.trim(),o=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:t.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort})),n.normalize?t.value=o.href:t.value=r;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),Zt=u("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Hn()),g.init(e,n)}),Ot=u("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Wn),g.init(e,n)}),St=u("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Ln),g.init(e,n)}),Pt=u("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=xn),g.init(e,n)}),Et=u("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Fn),g.init(e,n)}),jt=u("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Vn),g.init(e,n)}),It=u("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Mn),g.init(e,n)}),Tt=u("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=st(n)),g.init(e,n)}),At=u("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=rt),g.init(e,n)}),Dt=u("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=ot(n)),g.init(e,n)}),Rt=u("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Kn),g.init(e,n)}),Ct=u("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Xn),g.init(e,n),e._zod.bag.format="ipv4"}),Nt=u("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=Yn),g.init(e,n),e._zod.bag.format="ipv6",e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}}),Ut=u("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Qn),g.init(e,n)}),Jt=u("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=et),g.init(e,n),e._zod.check=t=>{const r=t.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}}});function Ve(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Lt=u("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=nt),g.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=t=>{Ve(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}});function xt(e){if(!Le.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return Ve(t)}const Ft=u("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Le),g.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=t=>{xt(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),Vt=u("$ZodE164",(e,n)=>{n.pattern??(n.pattern=tt),g.init(e,n)});function Mt(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const Wt=u("$ZodJWT",(e,n)=>{g.init(e,n),e._zod.check=t=>{Mt(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),Kt=u("$ZodUnknown",(e,n)=>{y.init(e,n),e._zod.parse=t=>t}),Bt=u("$ZodNever",(e,n)=>{y.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function _e(e,n,t){e.issues.length&&n.issues.push(...Ce(t,e.issues)),n.value[t]=e.value}const qt=u("$ZodArray",(e,n)=>{y.init(e,n),e._zod.parse=(t,r)=>{const o=t.value;if(!Array.isArray(o))return t.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),t;t.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const c=o[s],a=n.element._zod.run({value:c,issues:[]},r);a instanceof Promise?i.push(a.then(f=>_e(f,t,s))):_e(a,t,s)}return i.length?Promise.all(i).then(()=>t):t}});function H(e,n,t,r,o){if(e.issues.length){if(o&&!(t in r))return;n.issues.push(...Ce(t,e.issues))}e.value===void 0?t in r&&(n.value[t]=void 0):n.value[t]=e.value}function Me(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const t=zn(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(t)}}function We(e,n,t,r,o,i){const s=[],c=o.keySet,a=o.catchall._zod,f=a.def.type,l=a.optout==="optional";for(const m in n){if(c.has(m))continue;if(f==="never"){s.push(m);continue}const p=a.run({value:n[m],issues:[]},r);p instanceof Promise?e.push(p.then(h=>H(h,t,m,n,l))):H(p,t,m,n,l)}return s.length&&t.issues.push({code:"unrecognized_keys",keys:s,input:n,inst:i}),e.length?Promise.all(e).then(()=>t):t}const Gt=u("$ZodObject",(e,n)=>{if(y.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const c=n.shape;Object.defineProperty(n,"shape",{get:()=>{const a={...c};return Object.defineProperty(n,"shape",{value:a}),a}})}const r=Q(()=>Me(n));_(e._zod,"propValues",()=>{const c=n.shape,a={};for(const f in c){const l=c[f]._zod;if(l.values){a[f]??(a[f]=new Set);for(const m of l.values)a[f].add(m)}}return a});const o=x,i=n.catchall;let s;e._zod.parse=(c,a)=>{s??(s=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const l=[],m=s.shape;for(const p of s.keys){const h=m[p],k=h._zod.optout==="optional",w=h._zod.run({value:f[p],issues:[]},a);w instanceof Promise?l.push(w.then(M=>H(M,c,p,f,k))):H(w,c,p,f,k)}return i?We(l,f,c,a,r.value,e):l.length?Promise.all(l).then(()=>c):c}}),Ht=u("$ZodObjectJIT",(e,n)=>{Gt.init(e,n);const t=e._zod.parse,r=Q(()=>Me(n)),o=p=>{const h=new yt(["shape","payload","ctx"]),k=r.value,w=E=>{const Z=he(E);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};h.write("const input = payload.value;");const M=Object.create(null);let cn=0;for(const E of k.keys)M[E]=`key_${cn++}`;h.write("const newResult = {};");for(const E of k.keys){const Z=M[E],S=he(E),un=p[E]?._zod?.optout==="optional";h.write(`const ${Z} = ${w(E)};`),un?h.write(`
|
|
5
5
|
if (${Z}.issues.length) {
|
|
@@ -37,4 +37,4 @@ import{u as q,r as G,j as P,_ as fn,L as ln}from"./index-DuwR7a0G.js";import{I a
|
|
|
37
37
|
|
|
38
38
|
`)}h.write("payload.value = newResult;"),h.write("return payload;");const an=h.compile();return(E,Z)=>an(p,E,Z)};let i;const s=x,c=!Te.jitless,f=c&&vn.value,l=n.catchall;let m;e._zod.parse=(p,h)=>{m??(m=r.value);const k=p.value;return s(k)?c&&f&&h?.async===!1&&h.jitless!==!0?(i||(i=o(n.shape)),p=i(p,h),l?We([],k,p,h,m,e):p):t(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:k,inst:e}),p)}});function ge(e,n,t,r){for(const i of e)if(i.issues.length===0)return n.value=i.value,n;const o=e.filter(i=>!C(i));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(i=>i.issues.map(s=>D(s,r,A())))}),n)}const Ke=u("$ZodUnion",(e,n)=>{y.init(e,n),_(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),_(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>ae(i.source)).join("|")})$`)}});const t=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return r(o,i);let s=!1;const c=[];for(const a of n.options){const f=a._zod.run({value:o.value,issues:[]},i);if(f instanceof Promise)c.push(f),s=!0;else{if(f.issues.length===0)return f;c.push(f)}}return s?Promise.all(c).then(a=>ge(a,o,e,i)):ge(c,o,e,i)}}),Xt=u("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Ke.init(e,n);const t=e._zod.parse;_(e._zod,"propValues",()=>{const o={};for(const i of n.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);for(const[c,a]of Object.entries(s)){o[c]||(o[c]=new Set);for(const f of a)o[c].add(f)}}return o});const r=Q(()=>{const o=n.options,i=new Map;for(const s of o){const c=s._zod.propValues?.[n.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);for(const a of c){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,s)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!x(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const c=r.value.get(s?.[n.discriminator]);return c?c._zod.run(o,i):n.unionFallback?t(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:s,path:[n.discriminator],inst:e}),o)}}),Yt=u("$ZodIntersection",(e,n)=>{y.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,i=n.left._zod.run({value:o,issues:[]},r),s=n.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,f])=>ve(t,a,f)):ve(t,i,s)}});function se(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(F(e)&&F(n)){const t=Object.keys(n),r=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...n};for(const i of r){const s=se(e[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],i=n[r],s=se(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function ve(e,n,t){const r=new Map;let o;for(const c of n.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const a of c.keys)r.has(a)||r.set(a,{}),r.get(a).l=!0}else e.issues.push(c);for(const c of t.issues)if(c.code==="unrecognized_keys")for(const a of c.keys)r.has(a)||r.set(a,{}),r.get(a).r=!0;else e.issues.push(c);const i=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&o&&e.issues.push({...o,keys:i}),C(e))return e;const s=se(n.value,t.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const Qt=u("$ZodEnum",(e,n)=>{y.init(e,n);const t=Ae(n.entries),r=new Set(t);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.filter(o=>yn.has(typeof o)).map(o=>typeof o=="string"?U(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:t,input:s,inst:e}),o}}),er=u("$ZodLiteral",(e,n)=>{if(y.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const t=new Set(n.values);e._zod.values=t,e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?U(r):r?U(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return t.has(i)||r.issues.push({code:"invalid_value",values:n.values,input:i,inst:e}),r}}),nr=u("$ZodTransform",(e,n)=>{y.init(e,n),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Ie(e.constructor.name);const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new N;return t.value=o,t}});function ye(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Be=u("$ZodOptional",(e,n)=>{y.init(e,n),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ae(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ye(i,t.value)):ye(o,t.value)}return t.value===void 0?t:n.innerType._zod.run(t,r)}}),tr=u("$ZodExactOptional",(e,n)=>{Be.init(e,n),_(e._zod,"values",()=>n.innerType._zod.values),_(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(t,r)=>n.innerType._zod.run(t,r)}),rr=u("$ZodNullable",(e,n)=>{y.init(e,n),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ae(t.source)}|null)$`):void 0}),_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),or=u("$ZodDefault",(e,n)=>{y.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ze(i,n)):ze(o,n)}});function ze(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const sr=u("$ZodPrefault",(e,n)=>{y.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(r.direction==="backward"||t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),ir=u("$ZodNonOptional",(e,n)=>{y.init(e,n),_(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>we(i,e)):we(o,e)}});function we(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const cr=u("$ZodCatch",(e,n)=>{y.init(e,n),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=n.catchValue({...t,error:{issues:i.issues.map(s=>D(s,r,A()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(i=>D(i,r,A()))},input:t.value}),t.issues=[]),t)}}),ar=u("$ZodPipe",(e,n)=>{y.init(e,n),_(e._zod,"values",()=>n.in._zod.values),_(e._zod,"optin",()=>n.in._zod.optin),_(e._zod,"optout",()=>n.out._zod.optout),_(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(t,r)=>{if(r.direction==="backward"){const i=n.out._zod.run(t,r);return i instanceof Promise?i.then(s=>K(s,n.in,r)):K(i,n.in,r)}const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(i=>K(i,n.out,r)):K(o,n.out,r)}});function K(e,n,t){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},t)}const ur=u("$ZodReadonly",(e,n)=>{y.init(e,n),_(e._zod,"propValues",()=>n.innerType._zod.propValues),_(e._zod,"values",()=>n.innerType._zod.values),_(e._zod,"optin",()=>n.innerType?._zod?.optin),_(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(be):be(o)}});function be(e){return e.value=Object.freeze(e.value),e}const fr=u("$ZodCustom",(e,n)=>{j.init(e,n),y.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(i=>ke(i,t,r,e));ke(o,t,r,e)}});function ke(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(V(o))}}var $e;class lr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...t){const r=t[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const o={...r,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function dr(){return new lr}($e=globalThis).__zod_globalRegistry??($e.__zod_globalRegistry=dr());const L=globalThis.__zod_globalRegistry;function pr(e,n){return new e({type:"string",...d(n)})}function hr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...d(n)})}function Ze(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...d(n)})}function mr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...d(n)})}function _r(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...d(n)})}function gr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...d(n)})}function vr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...d(n)})}function yr(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...d(n)})}function zr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...d(n)})}function wr(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...d(n)})}function br(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...d(n)})}function kr(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...d(n)})}function $r(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...d(n)})}function Zr(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...d(n)})}function Or(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...d(n)})}function Sr(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...d(n)})}function Pr(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...d(n)})}function Er(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...d(n)})}function jr(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...d(n)})}function Ir(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...d(n)})}function Tr(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...d(n)})}function Ar(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...d(n)})}function Dr(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...d(n)})}function Rr(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...d(n)})}function Cr(e,n){return new e({type:"string",format:"date",check:"string_format",...d(n)})}function Nr(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...d(n)})}function Ur(e,n){return new e({type:"string",format:"duration",check:"string_format",...d(n)})}function Jr(e){return new e({type:"unknown"})}function Lr(e,n){return new e({type:"never",...d(n)})}function qe(e,n){return new ut({check:"max_length",...d(n),maximum:e})}function X(e,n){return new ft({check:"min_length",...d(n),minimum:e})}function Ge(e,n){return new lt({check:"length_equals",...d(n),length:e})}function xr(e,n){return new dt({check:"string_format",format:"regex",...d(n),pattern:e})}function Fr(e){return new pt({check:"string_format",format:"lowercase",...d(e)})}function Vr(e){return new ht({check:"string_format",format:"uppercase",...d(e)})}function Mr(e,n){return new mt({check:"string_format",format:"includes",...d(n),includes:e})}function Wr(e,n){return new _t({check:"string_format",format:"starts_with",...d(n),prefix:e})}function Kr(e,n){return new gt({check:"string_format",format:"ends_with",...d(n),suffix:e})}function J(e){return new vt({check:"overwrite",tx:e})}function Br(e){return J(n=>n.normalize(e))}function qr(){return J(e=>e.trim())}function Gr(){return J(e=>e.toLowerCase())}function Hr(){return J(e=>e.toUpperCase())}function Xr(){return J(e=>gn(e))}function Yr(e,n,t){return new e({type:"array",element:n,...d(t)})}function Qr(e,n,t){return new e({type:"custom",check:"custom",fn:n,...d(t)})}function eo(e){const n=no(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(V(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(V(o))}},e(t.value,t)));return n}function no(e,n){const t=new j({check:"custom",...d(n)});return t._zod.check=e,t}function He(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??L,target:n,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 b(e,n,t={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=n.seen.get(e);if(i)return i.count++,t.schemaPath.includes(e)&&(i.cycle=t.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:t.path};n.seen.set(e,s);const c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{const l={...t,schemaPath:[...t.schemaPath,e],path:t.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,s.schema,l);else{const p=s.schema,h=n.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,n,p,l)}const m=e._zod.parent;m&&(s.ref||(s.ref=m),b(m,n,l),n.seen.get(m).isParent=!0)}const a=n.metadataRegistry.get(e);return a&&Object.assign(s.schema,a),n.io==="input"&&$(e)&&(delete s.schema.examples,delete s.schema.default),n.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,n.seen.get(e).schema}function Xe(e,n){const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const c=e.metadataRegistry.get(s[0])?.id;if(c){const a=r.get(c);if(a&&a!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,s[0])}}const o=s=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(s[0])?.id,p=e.external.uri??(k=>k);if(m)return{ref:p(m)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${p("__shared")}#/${c}/${h}`}}if(s[1]===t)return{ref:"#"};const f=`#/${c}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:f+l}},i=s=>{if(s[1].schema.$ref)return;const c=s[1],{ref:a,defId:f}=o(s);c.def={...c.schema},f&&(c.defId=f);const l=c.schema;for(const m in l)delete l[m];l.$ref=a};if(e.cycles==="throw")for(const s of e.seen.entries()){const c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
39
39
|
|
|
40
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const c=s[1];if(n===s[0]){i(s);continue}if(e.external){const f=e.external.registry.get(s[0])?.id;if(n!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Ye(e,n){const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const c=e.seen.get(s);if(c.ref===null)return;const a=c.def??c.schema,f={...a},l=c.ref;if(c.ref=null,l){r(l);const p=e.seen.get(l),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):Object.assign(a,h),Object.assign(a,f),s._zod.parent===l)for(const w in a)w==="$ref"||w==="allOf"||w in f||delete a[w];if(h.$ref&&p.def)for(const w in a)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(a[w])===JSON.stringify(p.def[w])&&delete a[w]}const m=s._zod.parent;if(m&&m!==l){r(m);const p=e.seen.get(m);if(p?.schema.$ref&&(a.$ref=p.schema.$ref,p.def))for(const h in a)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(a[h])===JSON.stringify(p.def[h])&&delete a[h]}e.override({zodSchema:s,jsonSchema:a,path:c.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(n)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,t.def??t.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...n["~standard"],jsonSchema:{input:Y(n,"input",e.processors),output:Y(n,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function $(e,n){const t=n??{seen:new Set};if(t.seen.has(e))return!1;t.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $(r.element,t);if(r.type==="set")return $(r.valueType,t);if(r.type==="lazy")return $(r.getter(),t);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return $(r.innerType,t);if(r.type==="intersection")return $(r.left,t)||$(r.right,t);if(r.type==="record"||r.type==="map")return $(r.keyType,t)||$(r.valueType,t);if(r.type==="pipe")return $(r.in,t)||$(r.out,t);if(r.type==="object"){for(const o in r.shape)if($(r.shape[o],t))return!0;return!1}if(r.type==="union"){for(const o of r.options)if($(o,t))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if($(o,t))return!0;return!!(r.rest&&$(r.rest,t))}return!1}const to=(e,n={})=>t=>{const r=He({...t,processors:n});return b(e,r),Xe(r,e),Ye(r,e)},Y=(e,n,t={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=He({...o??{},target:i,io:n,processors:t});return b(e,s),Xe(s,e),Ye(s,e)},ro={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oo=(e,n,t,r)=>{const o=t;o.type="string";const{minimum:i,maximum:s,format:c,patterns:a,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=ro[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),a&&a.size>0){const l=[...a];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(m=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},so=(e,n,t,r)=>{t.not={}},io=(e,n,t,r)=>{},co=(e,n,t,r)=>{const o=e._zod.def,i=Ae(o.entries);i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),t.enum=i},ao=(e,n,t,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];t.type=s===null?"null":typeof s,n.target==="draft-04"||n.target==="openapi-3.0"?t.enum=[s]:t.const=s}else i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),i.every(s=>typeof s=="boolean")&&(t.type="boolean"),i.every(s=>s===null)&&(t.type="null"),t.enum=i},uo=(e,n,t,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},fo=(e,n,t,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},lo=(e,n,t,r)=>{const o=t,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=b(i.element,n,{...r,path:[...r.path,"items"]})},po=(e,n,t,r)=>{const o=t,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const f in s)o.properties[f]=b(s[f],n,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(s)),a=new Set([...c].filter(f=>{const l=i.shape[f]._zod;return n.io==="input"?l.optin===void 0:l.optout===void 0}));a.size>0&&(o.required=Array.from(a)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},ho=(e,n,t,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,a)=>b(c,n,{...r,path:[...r.path,i?"oneOf":"anyOf",a]}));i?t.oneOf=s:t.anyOf=s},mo=(e,n,t,r)=>{const o=e._zod.def,i=b(o.left,n,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,n,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,a=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];t.allOf=a},_o=(e,n,t,r)=>{const o=e._zod.def,i=b(o.innerType,n,r),s=n.seen.get(e);n.target==="openapi-3.0"?(s.ref=o.innerType,t.nullable=!0):t.anyOf=[i,{type:"null"}]},go=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType},vo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,t.default=JSON.parse(JSON.stringify(o.defaultValue))},yo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,n.io==="input"&&(t._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},zo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=s},wo=(e,n,t,r)=>{const o=e._zod.def,i=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;b(i,n,r);const s=n.seen.get(e);s.ref=i},bo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,t.readOnly=!0},Qe=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType},ko=u("ZodISODateTime",(e,n)=>{Tt.init(e,n),v.init(e,n)});function $o(e){return Rr(ko,e)}const Zo=u("ZodISODate",(e,n)=>{At.init(e,n),v.init(e,n)});function Oo(e){return Cr(Zo,e)}const So=u("ZodISOTime",(e,n)=>{Dt.init(e,n),v.init(e,n)});function Po(e){return Nr(So,e)}const Eo=u("ZodISODuration",(e,n)=>{Rt.init(e,n),v.init(e,n)});function jo(e){return Ur(Eo,e)}const Io=(e,n)=>{Ue.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>En(e,t)},flatten:{value:t=>Pn(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,oe,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,oe,2)}},isEmpty:{get(){return e.issues.length===0}}})},O=u("ZodError",Io,{Parent:Error}),To=fe(O),Ao=le(O),Do=ee(O),Ro=ne(O),Co=Tn(O),No=An(O),Uo=Dn(O),Jo=Rn(O),Lo=Cn(O),xo=Nn(O),Fo=Un(O),Vo=Jn(O),z=u("ZodType",(e,n)=>(y.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Y(e,"input"),output:Y(e,"output")}}),e.toJSONSchema=to(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone(I(n,{checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(t,r)=>T(e,t,r),e.brand=()=>e,e.register=((t,r)=>(t.add(e,r),e)),e.parse=(t,r)=>To(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>Do(e,t,r),e.parseAsync=async(t,r)=>Ao(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>Ro(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>Co(e,t,r),e.decode=(t,r)=>No(e,t,r),e.encodeAsync=async(t,r)=>Uo(e,t,r),e.decodeAsync=async(t,r)=>Jo(e,t,r),e.safeEncode=(t,r)=>Lo(e,t,r),e.safeDecode=(t,r)=>xo(e,t,r),e.safeEncodeAsync=async(t,r)=>Fo(e,t,r),e.safeDecodeAsync=async(t,r)=>Vo(e,t,r),e.refine=(t,r)=>e.check(Us(t,r)),e.superRefine=t=>e.check(Js(t)),e.overwrite=t=>e.check(J(t)),e.optional=()=>Pe(e),e.exactOptional=()=>Zs(e),e.nullable=()=>Ee(e),e.nullish=()=>Pe(Ee(e)),e.nonoptional=t=>Is(e,t),e.array=()=>ps(e),e.or=t=>ms([e,t]),e.and=t=>ys(e,t),e.transform=t=>je(e,ks(t)),e.default=t=>Ps(e,t),e.prefault=t=>js(e,t),e.catch=t=>As(e,t),e.pipe=t=>je(e,t),e.readonly=()=>Cs(e),e.describe=t=>{const r=e.clone();return L.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){return L.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return L.get(e);const r=e.clone();return L.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),en=u("_ZodString",(e,n)=>{de.init(e,n),z.init(e,n),e._zod.processJSONSchema=(r,o,i)=>oo(e,r,o);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(xr(...r)),e.includes=(...r)=>e.check(Mr(...r)),e.startsWith=(...r)=>e.check(Wr(...r)),e.endsWith=(...r)=>e.check(Kr(...r)),e.min=(...r)=>e.check(X(...r)),e.max=(...r)=>e.check(qe(...r)),e.length=(...r)=>e.check(Ge(...r)),e.nonempty=(...r)=>e.check(X(1,...r)),e.lowercase=r=>e.check(Fr(r)),e.uppercase=r=>e.check(Vr(r)),e.trim=()=>e.check(qr()),e.normalize=(...r)=>e.check(Br(...r)),e.toLowerCase=()=>e.check(Gr()),e.toUpperCase=()=>e.check(Hr()),e.slugify=()=>e.check(Xr())}),Mo=u("ZodString",(e,n)=>{de.init(e,n),en.init(e,n),e.email=t=>e.check(hr(Ko,t)),e.url=t=>e.check(yr(Bo,t)),e.jwt=t=>e.check(Dr(as,t)),e.emoji=t=>e.check(zr(qo,t)),e.guid=t=>e.check(Ze(Oe,t)),e.uuid=t=>e.check(mr(B,t)),e.uuidv4=t=>e.check(_r(B,t)),e.uuidv6=t=>e.check(gr(B,t)),e.uuidv7=t=>e.check(vr(B,t)),e.nanoid=t=>e.check(wr(Go,t)),e.guid=t=>e.check(Ze(Oe,t)),e.cuid=t=>e.check(br(Ho,t)),e.cuid2=t=>e.check(kr(Xo,t)),e.ulid=t=>e.check($r(Yo,t)),e.base64=t=>e.check(Ir(ss,t)),e.base64url=t=>e.check(Tr(is,t)),e.xid=t=>e.check(Zr(Qo,t)),e.ksuid=t=>e.check(Or(es,t)),e.ipv4=t=>e.check(Sr(ns,t)),e.ipv6=t=>e.check(Pr(ts,t)),e.cidrv4=t=>e.check(Er(rs,t)),e.cidrv6=t=>e.check(jr(os,t)),e.e164=t=>e.check(Ar(cs,t)),e.datetime=t=>e.check($o(t)),e.date=t=>e.check(Oo(t)),e.time=t=>e.check(Po(t)),e.duration=t=>e.check(jo(t))});function Wo(e){return pr(Mo,e)}const v=u("ZodStringFormat",(e,n)=>{g.init(e,n),en.init(e,n)}),Ko=u("ZodEmail",(e,n)=>{kt.init(e,n),v.init(e,n)}),Oe=u("ZodGUID",(e,n)=>{wt.init(e,n),v.init(e,n)}),B=u("ZodUUID",(e,n)=>{bt.init(e,n),v.init(e,n)}),Bo=u("ZodURL",(e,n)=>{$t.init(e,n),v.init(e,n)}),qo=u("ZodEmoji",(e,n)=>{Zt.init(e,n),v.init(e,n)}),Go=u("ZodNanoID",(e,n)=>{Ot.init(e,n),v.init(e,n)}),Ho=u("ZodCUID",(e,n)=>{St.init(e,n),v.init(e,n)}),Xo=u("ZodCUID2",(e,n)=>{Pt.init(e,n),v.init(e,n)}),Yo=u("ZodULID",(e,n)=>{Et.init(e,n),v.init(e,n)}),Qo=u("ZodXID",(e,n)=>{jt.init(e,n),v.init(e,n)}),es=u("ZodKSUID",(e,n)=>{It.init(e,n),v.init(e,n)}),ns=u("ZodIPv4",(e,n)=>{Ct.init(e,n),v.init(e,n)}),ts=u("ZodIPv6",(e,n)=>{Nt.init(e,n),v.init(e,n)}),rs=u("ZodCIDRv4",(e,n)=>{Ut.init(e,n),v.init(e,n)}),os=u("ZodCIDRv6",(e,n)=>{Jt.init(e,n),v.init(e,n)}),ss=u("ZodBase64",(e,n)=>{Lt.init(e,n),v.init(e,n)}),is=u("ZodBase64URL",(e,n)=>{Ft.init(e,n),v.init(e,n)}),cs=u("ZodE164",(e,n)=>{Vt.init(e,n),v.init(e,n)}),as=u("ZodJWT",(e,n)=>{Wt.init(e,n),v.init(e,n)}),us=u("ZodUnknown",(e,n)=>{Kt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>io()});function Se(){return Jr(us)}const fs=u("ZodNever",(e,n)=>{Bt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>so(e,t,r)});function ls(e){return Lr(fs,e)}const ds=u("ZodArray",(e,n)=>{qt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>lo(e,t,r,o),e.element=n.element,e.min=(t,r)=>e.check(X(t,r)),e.nonempty=t=>e.check(X(1,t)),e.max=(t,r)=>e.check(qe(t,r)),e.length=(t,r)=>e.check(Ge(t,r)),e.unwrap=()=>e.element});function ps(e,n){return Yr(ds,e,n)}const hs=u("ZodObject",(e,n)=>{Ht.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>po(e,t,r,o),_(e,"shape",()=>n.shape),e.keyof=()=>zs(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Se()}),e.loose=()=>e.clone({...e._zod.def,catchall:Se()}),e.strict=()=>e.clone({...e._zod.def,catchall:ls()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>kn(e,t),e.safeExtend=t=>$n(e,t),e.merge=t=>Zn(e,t),e.pick=t=>wn(e,t),e.omit=t=>bn(e,t),e.partial=(...t)=>On(on,e,t[0]),e.required=(...t)=>Sn(sn,e,t[0])});function nn(e,n){const t={type:"object",shape:e??{},...d(n)};return new hs(t)}const tn=u("ZodUnion",(e,n)=>{Ke.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ho(e,t,r,o),e.options=n.options});function ms(e,n){return new tn({type:"union",options:e,...d(n)})}const _s=u("ZodDiscriminatedUnion",(e,n)=>{tn.init(e,n),Xt.init(e,n)});function gs(e,n,t){return new _s({type:"union",options:n,discriminator:e,...d(t)})}const vs=u("ZodIntersection",(e,n)=>{Yt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>mo(e,t,r,o)});function ys(e,n){return new vs({type:"intersection",left:e,right:n})}const ie=u("ZodEnum",(e,n)=>{Qt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(r,o,i)=>co(e,r,o),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(t.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ie({...n,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ie({...n,checks:[],...d(o),entries:i})}});function zs(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ie({type:"enum",entries:t,...d(n)})}const ws=u("ZodLiteral",(e,n)=>{er.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ao(e,t,r),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function rn(e,n){return new ws({type:"literal",values:Array.isArray(e)?e:[e],...d(n)})}const bs=u("ZodTransform",(e,n)=>{nr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>fo(e,t),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Ie(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(V(i,t.value,n));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=t.value),s.inst??(s.inst=e),t.issues.push(V(s))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function ks(e){return new bs({type:"transform",transform:e})}const on=u("ZodOptional",(e,n)=>{Be.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Qe(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Pe(e){return new on({type:"optional",innerType:e})}const $s=u("ZodExactOptional",(e,n)=>{tr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Qe(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Zs(e){return new $s({type:"optional",innerType:e})}const Os=u("ZodNullable",(e,n)=>{rr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>_o(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Ee(e){return new Os({type:"nullable",innerType:e})}const Ss=u("ZodDefault",(e,n)=>{or.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>vo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ps(e,n){return new Ss({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Re(n)}})}const Es=u("ZodPrefault",(e,n)=>{sr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>yo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function js(e,n){return new Es({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Re(n)}})}const sn=u("ZodNonOptional",(e,n)=>{ir.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>go(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Is(e,n){return new sn({type:"nonoptional",innerType:e,...d(n)})}const Ts=u("ZodCatch",(e,n)=>{cr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>zo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function As(e,n){return new Ts({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Ds=u("ZodPipe",(e,n)=>{ar.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>wo(e,t,r,o),e.in=n.in,e.out=n.out});function je(e,n){return new Ds({type:"pipe",in:e,out:n})}const Rs=u("ZodReadonly",(e,n)=>{ur.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>bo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Cs(e){return new Rs({type:"readonly",innerType:e})}const Ns=u("ZodCustom",(e,n)=>{fr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>uo(e,t)});function Us(e,n={}){return Qr(Ns,e,n)}function Js(e){return eo(e)}const Ls=nn({type:rn("clear-cache"),absolutePath:Wo()}),xs=nn({type:rn("revalidate")}),Fs=gs("type",[Ls,xs]);function Vs(e){try{return Fs.safeParse(JSON.parse(e)).data}catch{return}}function Ms(){const e=q();return G.useEffect(()=>{const n=new URL("/_ws",window.location.href);n.protocol=n.protocol==="https"?"wss":"ws";const t=new WebSocket(n);return t.addEventListener("message",r=>{const o=Vs(r.data);o&&(console.log("Received:",o),o.type==="revalidate"&&e.reload())}),()=>{t.close()}},[]),P.jsx(P.Fragment,{})}const Ws=G.lazy(()=>fn(()=>import("./search-default-CA1I5Opk.js").then(e=>e.s),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])));function Ks({children:e,dir:n="ltr",theme:t={},search:r,i18n:o}){let i=e;return r?.enabled!==!1&&(i=P.jsx(pn,{SearchDialog:Ws,...r,children:i})),t?.enabled!==!1&&(i=P.jsx(hn,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,...t,children:i})),o&&(i=P.jsx(dn,{...o,children:i})),P.jsx(mn,{dir:n,children:i})}const re={usePathname(){const{path:e}=q();return e},useParams(){const{query:e}=q();return G.useMemo(()=>{const n=new URLSearchParams(e);return Object.fromEntries(Array.from(n.entries()).map(([t,r])=>[t,Array.isArray(r)?r[0]:r]))},[e])},useRouter(){const e=q();return G.useMemo(()=>({push(n){e.push(n)},refresh(){e.push(e.path)}}),[e])},Link({href:e,prefetch:n=!0,...t}){return P.jsx(ln,{to:e,unstable_prefetchOnEnter:n,...t,children:t.children})}};function Bs({children:e,Link:n,Image:t}){return P.jsx(_n,{...re,Link:n??re.Link,Image:t??re.Image,children:e})}function qs({components:e,...n}){return P.jsx(Bs,{Link:e?.Link,Image:e?.Image,children:P.jsx(Ks,{...n,children:n.children})})}function Gs({children:e}){return P.jsx(qs,{children:e})}const ti={HotReload:Ms},ri={Provider:Gs};export{ti as export_607cd537d716,ri as export_75b87872b5db};
|
|
40
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const c=s[1];if(n===s[0]){i(s);continue}if(e.external){const f=e.external.registry.get(s[0])?.id;if(n!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Ye(e,n){const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const c=e.seen.get(s);if(c.ref===null)return;const a=c.def??c.schema,f={...a},l=c.ref;if(c.ref=null,l){r(l);const p=e.seen.get(l),h=p.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):Object.assign(a,h),Object.assign(a,f),s._zod.parent===l)for(const w in a)w==="$ref"||w==="allOf"||w in f||delete a[w];if(h.$ref&&p.def)for(const w in a)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(a[w])===JSON.stringify(p.def[w])&&delete a[w]}const m=s._zod.parent;if(m&&m!==l){r(m);const p=e.seen.get(m);if(p?.schema.$ref&&(a.$ref=p.schema.$ref,p.def))for(const h in a)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(a[h])===JSON.stringify(p.def[h])&&delete a[h]}e.override({zodSchema:s,jsonSchema:a,path:c.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(n)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,t.def??t.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const c=s[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...n["~standard"],jsonSchema:{input:Y(n,"input",e.processors),output:Y(n,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function $(e,n){const t=n??{seen:new Set};if(t.seen.has(e))return!1;t.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $(r.element,t);if(r.type==="set")return $(r.valueType,t);if(r.type==="lazy")return $(r.getter(),t);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return $(r.innerType,t);if(r.type==="intersection")return $(r.left,t)||$(r.right,t);if(r.type==="record"||r.type==="map")return $(r.keyType,t)||$(r.valueType,t);if(r.type==="pipe")return $(r.in,t)||$(r.out,t);if(r.type==="object"){for(const o in r.shape)if($(r.shape[o],t))return!0;return!1}if(r.type==="union"){for(const o of r.options)if($(o,t))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if($(o,t))return!0;return!!(r.rest&&$(r.rest,t))}return!1}const to=(e,n={})=>t=>{const r=He({...t,processors:n});return b(e,r),Xe(r,e),Ye(r,e)},Y=(e,n,t={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=He({...o??{},target:i,io:n,processors:t});return b(e,s),Xe(s,e),Ye(s,e)},ro={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oo=(e,n,t,r)=>{const o=t;o.type="string";const{minimum:i,maximum:s,format:c,patterns:a,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=ro[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),a&&a.size>0){const l=[...a];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(m=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},so=(e,n,t,r)=>{t.not={}},io=(e,n,t,r)=>{},co=(e,n,t,r)=>{const o=e._zod.def,i=Ae(o.entries);i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),t.enum=i},ao=(e,n,t,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];t.type=s===null?"null":typeof s,n.target==="draft-04"||n.target==="openapi-3.0"?t.enum=[s]:t.const=s}else i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),i.every(s=>typeof s=="boolean")&&(t.type="boolean"),i.every(s=>s===null)&&(t.type="null"),t.enum=i},uo=(e,n,t,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},fo=(e,n,t,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},lo=(e,n,t,r)=>{const o=t,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=b(i.element,n,{...r,path:[...r.path,"items"]})},po=(e,n,t,r)=>{const o=t,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const f in s)o.properties[f]=b(s[f],n,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(s)),a=new Set([...c].filter(f=>{const l=i.shape[f]._zod;return n.io==="input"?l.optin===void 0:l.optout===void 0}));a.size>0&&(o.required=Array.from(a)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=b(i.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},ho=(e,n,t,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,a)=>b(c,n,{...r,path:[...r.path,i?"oneOf":"anyOf",a]}));i?t.oneOf=s:t.anyOf=s},mo=(e,n,t,r)=>{const o=e._zod.def,i=b(o.left,n,{...r,path:[...r.path,"allOf",0]}),s=b(o.right,n,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,a=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];t.allOf=a},_o=(e,n,t,r)=>{const o=e._zod.def,i=b(o.innerType,n,r),s=n.seen.get(e);n.target==="openapi-3.0"?(s.ref=o.innerType,t.nullable=!0):t.anyOf=[i,{type:"null"}]},go=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType},vo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,t.default=JSON.parse(JSON.stringify(o.defaultValue))},yo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,n.io==="input"&&(t._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},zo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=s},wo=(e,n,t,r)=>{const o=e._zod.def,i=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;b(i,n,r);const s=n.seen.get(e);s.ref=i},bo=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType,t.readOnly=!0},Qe=(e,n,t,r)=>{const o=e._zod.def;b(o.innerType,n,r);const i=n.seen.get(e);i.ref=o.innerType},ko=u("ZodISODateTime",(e,n)=>{Tt.init(e,n),v.init(e,n)});function $o(e){return Rr(ko,e)}const Zo=u("ZodISODate",(e,n)=>{At.init(e,n),v.init(e,n)});function Oo(e){return Cr(Zo,e)}const So=u("ZodISOTime",(e,n)=>{Dt.init(e,n),v.init(e,n)});function Po(e){return Nr(So,e)}const Eo=u("ZodISODuration",(e,n)=>{Rt.init(e,n),v.init(e,n)});function jo(e){return Ur(Eo,e)}const Io=(e,n)=>{Ue.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>En(e,t)},flatten:{value:t=>Pn(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,oe,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,oe,2)}},isEmpty:{get(){return e.issues.length===0}}})},O=u("ZodError",Io,{Parent:Error}),To=fe(O),Ao=le(O),Do=ee(O),Ro=ne(O),Co=Tn(O),No=An(O),Uo=Dn(O),Jo=Rn(O),Lo=Cn(O),xo=Nn(O),Fo=Un(O),Vo=Jn(O),z=u("ZodType",(e,n)=>(y.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Y(e,"input"),output:Y(e,"output")}}),e.toJSONSchema=to(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone(I(n,{checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(t,r)=>T(e,t,r),e.brand=()=>e,e.register=((t,r)=>(t.add(e,r),e)),e.parse=(t,r)=>To(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>Do(e,t,r),e.parseAsync=async(t,r)=>Ao(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>Ro(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>Co(e,t,r),e.decode=(t,r)=>No(e,t,r),e.encodeAsync=async(t,r)=>Uo(e,t,r),e.decodeAsync=async(t,r)=>Jo(e,t,r),e.safeEncode=(t,r)=>Lo(e,t,r),e.safeDecode=(t,r)=>xo(e,t,r),e.safeEncodeAsync=async(t,r)=>Fo(e,t,r),e.safeDecodeAsync=async(t,r)=>Vo(e,t,r),e.refine=(t,r)=>e.check(Us(t,r)),e.superRefine=t=>e.check(Js(t)),e.overwrite=t=>e.check(J(t)),e.optional=()=>Pe(e),e.exactOptional=()=>Zs(e),e.nullable=()=>Ee(e),e.nullish=()=>Pe(Ee(e)),e.nonoptional=t=>Is(e,t),e.array=()=>ps(e),e.or=t=>ms([e,t]),e.and=t=>ys(e,t),e.transform=t=>je(e,ks(t)),e.default=t=>Ps(e,t),e.prefault=t=>js(e,t),e.catch=t=>As(e,t),e.pipe=t=>je(e,t),e.readonly=()=>Cs(e),e.describe=t=>{const r=e.clone();return L.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){return L.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return L.get(e);const r=e.clone();return L.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),en=u("_ZodString",(e,n)=>{de.init(e,n),z.init(e,n),e._zod.processJSONSchema=(r,o,i)=>oo(e,r,o);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(xr(...r)),e.includes=(...r)=>e.check(Mr(...r)),e.startsWith=(...r)=>e.check(Wr(...r)),e.endsWith=(...r)=>e.check(Kr(...r)),e.min=(...r)=>e.check(X(...r)),e.max=(...r)=>e.check(qe(...r)),e.length=(...r)=>e.check(Ge(...r)),e.nonempty=(...r)=>e.check(X(1,...r)),e.lowercase=r=>e.check(Fr(r)),e.uppercase=r=>e.check(Vr(r)),e.trim=()=>e.check(qr()),e.normalize=(...r)=>e.check(Br(...r)),e.toLowerCase=()=>e.check(Gr()),e.toUpperCase=()=>e.check(Hr()),e.slugify=()=>e.check(Xr())}),Mo=u("ZodString",(e,n)=>{de.init(e,n),en.init(e,n),e.email=t=>e.check(hr(Ko,t)),e.url=t=>e.check(yr(Bo,t)),e.jwt=t=>e.check(Dr(as,t)),e.emoji=t=>e.check(zr(qo,t)),e.guid=t=>e.check(Ze(Oe,t)),e.uuid=t=>e.check(mr(B,t)),e.uuidv4=t=>e.check(_r(B,t)),e.uuidv6=t=>e.check(gr(B,t)),e.uuidv7=t=>e.check(vr(B,t)),e.nanoid=t=>e.check(wr(Go,t)),e.guid=t=>e.check(Ze(Oe,t)),e.cuid=t=>e.check(br(Ho,t)),e.cuid2=t=>e.check(kr(Xo,t)),e.ulid=t=>e.check($r(Yo,t)),e.base64=t=>e.check(Ir(ss,t)),e.base64url=t=>e.check(Tr(is,t)),e.xid=t=>e.check(Zr(Qo,t)),e.ksuid=t=>e.check(Or(es,t)),e.ipv4=t=>e.check(Sr(ns,t)),e.ipv6=t=>e.check(Pr(ts,t)),e.cidrv4=t=>e.check(Er(rs,t)),e.cidrv6=t=>e.check(jr(os,t)),e.e164=t=>e.check(Ar(cs,t)),e.datetime=t=>e.check($o(t)),e.date=t=>e.check(Oo(t)),e.time=t=>e.check(Po(t)),e.duration=t=>e.check(jo(t))});function Wo(e){return pr(Mo,e)}const v=u("ZodStringFormat",(e,n)=>{g.init(e,n),en.init(e,n)}),Ko=u("ZodEmail",(e,n)=>{kt.init(e,n),v.init(e,n)}),Oe=u("ZodGUID",(e,n)=>{wt.init(e,n),v.init(e,n)}),B=u("ZodUUID",(e,n)=>{bt.init(e,n),v.init(e,n)}),Bo=u("ZodURL",(e,n)=>{$t.init(e,n),v.init(e,n)}),qo=u("ZodEmoji",(e,n)=>{Zt.init(e,n),v.init(e,n)}),Go=u("ZodNanoID",(e,n)=>{Ot.init(e,n),v.init(e,n)}),Ho=u("ZodCUID",(e,n)=>{St.init(e,n),v.init(e,n)}),Xo=u("ZodCUID2",(e,n)=>{Pt.init(e,n),v.init(e,n)}),Yo=u("ZodULID",(e,n)=>{Et.init(e,n),v.init(e,n)}),Qo=u("ZodXID",(e,n)=>{jt.init(e,n),v.init(e,n)}),es=u("ZodKSUID",(e,n)=>{It.init(e,n),v.init(e,n)}),ns=u("ZodIPv4",(e,n)=>{Ct.init(e,n),v.init(e,n)}),ts=u("ZodIPv6",(e,n)=>{Nt.init(e,n),v.init(e,n)}),rs=u("ZodCIDRv4",(e,n)=>{Ut.init(e,n),v.init(e,n)}),os=u("ZodCIDRv6",(e,n)=>{Jt.init(e,n),v.init(e,n)}),ss=u("ZodBase64",(e,n)=>{Lt.init(e,n),v.init(e,n)}),is=u("ZodBase64URL",(e,n)=>{Ft.init(e,n),v.init(e,n)}),cs=u("ZodE164",(e,n)=>{Vt.init(e,n),v.init(e,n)}),as=u("ZodJWT",(e,n)=>{Wt.init(e,n),v.init(e,n)}),us=u("ZodUnknown",(e,n)=>{Kt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>io()});function Se(){return Jr(us)}const fs=u("ZodNever",(e,n)=>{Bt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>so(e,t,r)});function ls(e){return Lr(fs,e)}const ds=u("ZodArray",(e,n)=>{qt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>lo(e,t,r,o),e.element=n.element,e.min=(t,r)=>e.check(X(t,r)),e.nonempty=t=>e.check(X(1,t)),e.max=(t,r)=>e.check(qe(t,r)),e.length=(t,r)=>e.check(Ge(t,r)),e.unwrap=()=>e.element});function ps(e,n){return Yr(ds,e,n)}const hs=u("ZodObject",(e,n)=>{Ht.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>po(e,t,r,o),_(e,"shape",()=>n.shape),e.keyof=()=>zs(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Se()}),e.loose=()=>e.clone({...e._zod.def,catchall:Se()}),e.strict=()=>e.clone({...e._zod.def,catchall:ls()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>kn(e,t),e.safeExtend=t=>$n(e,t),e.merge=t=>Zn(e,t),e.pick=t=>wn(e,t),e.omit=t=>bn(e,t),e.partial=(...t)=>On(on,e,t[0]),e.required=(...t)=>Sn(sn,e,t[0])});function nn(e,n){const t={type:"object",shape:e??{},...d(n)};return new hs(t)}const tn=u("ZodUnion",(e,n)=>{Ke.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ho(e,t,r,o),e.options=n.options});function ms(e,n){return new tn({type:"union",options:e,...d(n)})}const _s=u("ZodDiscriminatedUnion",(e,n)=>{tn.init(e,n),Xt.init(e,n)});function gs(e,n,t){return new _s({type:"union",options:n,discriminator:e,...d(t)})}const vs=u("ZodIntersection",(e,n)=>{Yt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>mo(e,t,r,o)});function ys(e,n){return new vs({type:"intersection",left:e,right:n})}const ie=u("ZodEnum",(e,n)=>{Qt.init(e,n),z.init(e,n),e._zod.processJSONSchema=(r,o,i)=>co(e,r,o),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(t.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ie({...n,checks:[],...d(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ie({...n,checks:[],...d(o),entries:i})}});function zs(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ie({type:"enum",entries:t,...d(n)})}const ws=u("ZodLiteral",(e,n)=>{er.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ao(e,t,r),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function rn(e,n){return new ws({type:"literal",values:Array.isArray(e)?e:[e],...d(n)})}const bs=u("ZodTransform",(e,n)=>{nr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>fo(e,t),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Ie(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(V(i,t.value,n));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=t.value),s.inst??(s.inst=e),t.issues.push(V(s))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function ks(e){return new bs({type:"transform",transform:e})}const on=u("ZodOptional",(e,n)=>{Be.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Qe(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Pe(e){return new on({type:"optional",innerType:e})}const $s=u("ZodExactOptional",(e,n)=>{tr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Qe(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Zs(e){return new $s({type:"optional",innerType:e})}const Os=u("ZodNullable",(e,n)=>{rr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>_o(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Ee(e){return new Os({type:"nullable",innerType:e})}const Ss=u("ZodDefault",(e,n)=>{or.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>vo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ps(e,n){return new Ss({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Re(n)}})}const Es=u("ZodPrefault",(e,n)=>{sr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>yo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function js(e,n){return new Es({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Re(n)}})}const sn=u("ZodNonOptional",(e,n)=>{ir.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>go(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Is(e,n){return new sn({type:"nonoptional",innerType:e,...d(n)})}const Ts=u("ZodCatch",(e,n)=>{cr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>zo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function As(e,n){return new Ts({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Ds=u("ZodPipe",(e,n)=>{ar.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>wo(e,t,r,o),e.in=n.in,e.out=n.out});function je(e,n){return new Ds({type:"pipe",in:e,out:n})}const Rs=u("ZodReadonly",(e,n)=>{ur.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>bo(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function Cs(e){return new Rs({type:"readonly",innerType:e})}const Ns=u("ZodCustom",(e,n)=>{fr.init(e,n),z.init(e,n),e._zod.processJSONSchema=(t,r,o)=>uo(e,t)});function Us(e,n={}){return Qr(Ns,e,n)}function Js(e){return eo(e)}const Ls=nn({type:rn("clear-cache"),absolutePath:Wo()}),xs=nn({type:rn("revalidate")}),Fs=gs("type",[Ls,xs]);function Vs(e){try{return Fs.safeParse(JSON.parse(e)).data}catch{return}}function Ms(){const e=q();return G.useEffect(()=>{const n=new URL("/_ws",window.location.href);n.protocol=n.protocol==="https"?"wss":"ws";const t=new WebSocket(n);return t.addEventListener("message",r=>{const o=Vs(r.data);o&&(console.log("Received:",o),o.type==="revalidate"&&e.reload())}),()=>{t.close()}},[]),P.jsx(P.Fragment,{})}const Ws=G.lazy(()=>fn(()=>import("./search-default-BtUVJBZC.js").then(e=>e.s),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])));function Ks({children:e,dir:n="ltr",theme:t={},search:r,i18n:o}){let i=e;return r?.enabled!==!1&&(i=P.jsx(pn,{SearchDialog:Ws,...r,children:i})),t?.enabled!==!1&&(i=P.jsx(hn,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,...t,children:i})),o&&(i=P.jsx(dn,{...o,children:i})),P.jsx(mn,{dir:n,children:i})}const re={usePathname(){const{path:e}=q();return e},useParams(){const{query:e}=q();return G.useMemo(()=>{const n=new URLSearchParams(e);return Object.fromEntries(Array.from(n.entries()).map(([t,r])=>[t,Array.isArray(r)?r[0]:r]))},[e])},useRouter(){const e=q();return G.useMemo(()=>({push(n){e.push(n)},refresh(){e.push(e.path)}}),[e])},Link({href:e,prefetch:n=!0,...t}){return P.jsx(ln,{to:e,unstable_prefetchOnEnter:n,...t,children:t.children})}};function Bs({children:e,Link:n,Image:t}){return P.jsx(_n,{...re,Link:n??re.Link,Image:t??re.Image,children:e})}function qs({components:e,...n}){return P.jsx(Bs,{Link:e?.Link,Image:e?.Image,children:P.jsx(Ks,{...n,children:n.children})})}function Gs({children:e}){return P.jsx(qs,{children:e})}const ti={HotReload:Ms},ri={Provider:Gs};export{ti as export_607cd537d716,ri as export_75b87872b5db};
|