@yummacss/nitro 3.20.8 → 3.21.0
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/browser.d.mts +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/generator-CaZwr7tW.mjs +116 -0
- package/dist/{generator-BB5ZNwn7.d.mts → generator-CrA9thCF.d.mts} +83 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
- package/dist/generator-BY3y3-E5.mjs +0 -116
package/dist/browser.d.mts
CHANGED
package/dist/browser.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./generator-
|
|
1
|
+
import{n as e,r as t,t as n}from"./generator-CaZwr7tW.mjs";export{t as baseStyles,n as generator,e as tokenizer};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import{coreUtils as e,createColors as t,defaultMediaQueries as n}from"@yummacss/core";const r=`*, :before, :after {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
border: 0 solid;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
html {
|
|
12
|
+
font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
-webkit-font-smoothing: antialiased;
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
canvas, img, picture, svg, video {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
button, input, optgroup, select, textarea {
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
padding: .5rem;
|
|
29
|
+
font-family: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
button:not([class]), input:not([class]), optgroup:not([class]), select:not([class]), textarea:not([class]) {
|
|
33
|
+
border: 1px solid #bfc2c7;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:is(a, button, input, select, summary, textarea):focus {
|
|
37
|
+
outline: 2px solid transparent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
textarea:not([rows]) {
|
|
41
|
+
min-height: 10em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
button {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
button:disabled, input:disabled, select:disabled, textarea:disabled {
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
opacity: .5;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1, h2, h3, h4, h5, h6, p {
|
|
54
|
+
overflow-wrap: break-word;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h1, h2, h3, h4, h5, h6 {
|
|
58
|
+
text-wrap: balance;
|
|
59
|
+
font-size: 1rem;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
p {
|
|
64
|
+
text-wrap: pretty;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
b, strong {
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
small {
|
|
72
|
+
font-size: 80%;
|
|
73
|
+
line-height: 1.4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
pre, code, kbd, samp {
|
|
77
|
+
font-family: monospace;
|
|
78
|
+
font-size: 1em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
a {
|
|
82
|
+
color: inherit;
|
|
83
|
+
text-decoration: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
ol, ul {
|
|
87
|
+
padding: 0;
|
|
88
|
+
list-style: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
th {
|
|
92
|
+
font-size: 1rem;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
hr {
|
|
97
|
+
border-top: 1px solid #bfc2c7;
|
|
98
|
+
height: 0;
|
|
99
|
+
margin: 1em 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
details {
|
|
103
|
+
display: block;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
summary {
|
|
107
|
+
display: list-item;
|
|
108
|
+
}
|
|
109
|
+
`;function i(e){let t=new Set,n=[/class(?:Name)?=["']([^"']+)["']/g,/class(?:Name)?=\{["']([^"']+)["']\}/g,/class(?:Name)?=\{`([^`]+)`\}/g],r=[/`([^`]+)`/g,/"([^"]+)"/g,/'([^']+)'/g],i=[/cva\s*\(\s*["'`]([^"'`]+)["'`]/g,/:\s*["'`]([^"'`]+)["'`]/g],a=[/\bcn\s*\(\s*["'`]([^"'`]+)["'`]/g,/\bcn\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],o=[/clsx\s*\(\s*["'`]([^"'`]+)["'`]/g,/classnames\s*\(\s*["'`]([^"'`]+)["'`]/g,/clsx\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g,/classnames\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],s=[...n,...r,...i,...a,...o];for(let n of s){let r;for(r=n.exec(e);r!==null;){let i=r[1];i&&i.split(/\s+/).filter(e=>e&&/^[a-z]/.test(e)&&e.includes(`-`)).forEach(e=>{t.add(e)}),r=n.exec(e)}}return Array.from(t)}function a(e,t){let n=[];if(t.safelist)for(let n of t.safelist){let r=t.prefix&&!n.startsWith(t.prefix)?t.prefix+n:n;e.add(r)}(t.normalize??!0)&&n.push(r);let i=o(e,t);return i&&n.push(i),n.join(`
|
|
110
|
+
|
|
111
|
+
`)}function o(r,i){let a={...e()},o=null;if(i.theme?.colors){let{percentage:e,...n}=i.theme.colors;o=t(n,e?.light,e?.dark)}let s=[...n];if(i.theme?.screens){let e=Object.entries(i.theme.screens).map(([e,t])=>({prefix:e,value:`@media (min-width: ${t})`}));for(let t of e){let e=s.findIndex(e=>e.prefix===t.prefix);e===-1?s.push(t):s[e]=t}}for(let[e,t]of Object.entries(a)){let n=!1,r={...t};o&&`black`in r.values&&`white`in r.values&&(r.values={...r.values,...o},n=!0),i.theme?.screens&&r.variants&&(r.variants={...r.variants,mediaQueries:s},n=!0),n&&(a[e]=r)}let c=[],u=new Map,d=new Set,f=Array.from(r).sort();for(let e of f){let t=e;if(i.prefix&&t.startsWith(i.prefix))t=t.slice(i.prefix.length);else if(i.prefix)continue;if(d.has(e))continue;let n=l(t,a,e);if(n){if(n.mediaQuery){let e=u.get(n.mediaQuery)||[];e.push(n.rule),u.set(n.mediaQuery,e)}else c.push(n.rule);d.add(e)}}let p=Array.from(u.entries()).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of p){let n=t.map(e=>e.replace(/^/gm,` `)).join(`
|
|
112
|
+
|
|
113
|
+
`);c.push(`${e} {\n${n}\n}`)}return c.join(`
|
|
114
|
+
|
|
115
|
+
`)}function s(e,t,n){let{properties:r,variants:i,prefix:a,values:o}=t,s=e,l,u=``,d=``,f=``,p=!0;for(;p;){if(p=!1,i?.containerQueries){for(let e of i.containerQueries)if(s.startsWith(`${e.prefix}:`)){l=e.value,s=s.slice(e.prefix.length+1),p=!0;break}}if(!p){if(i?.mediaQueries){for(let e of i.mediaQueries)if(s.startsWith(`${e.prefix}:`)){l=e.value,s=s.slice(e.prefix.length+1),p=!0;break}}if(!p){if(i?.pseudoElements){for(let e of i.pseudoElements)if(s.startsWith(`${e.prefix}::`)){d+=e.value,s=s.slice(e.prefix.length+2),p=!0;break}}if(!p&&i?.pseudoClasses){for(let e of i.pseudoClasses)if(s.startsWith(`${e.prefix}:`)&&!s.startsWith(`${e.prefix}::`)){u+=e.value,s=s.slice(e.prefix.length+1),p=!0;break}}}}}if(i?.opacity){for(let e of i.opacity)if(s.endsWith(`/${e.prefix}`)){f=e.value,s=s.slice(0,-(e.prefix.length+1));break}}if(!s.startsWith(`${a}-`)&&s!==a)return null;let m=s===a?``:s.slice(a.length+1),h=!1,g=m;m.startsWith(`-`)&&(h=!0,g=m.slice(1));let _=o[g===``?`base`:g]||o[g];if(!_)return null;let v=_;h&&/^-?[\d.]/.test(_)&&(v=_.startsWith(`-`)?_.slice(1):`-${_}`);let y=f&&v.startsWith(`#`)&&v.length===7?`${v}${f}`:v,b=r.map(e=>`${e}: ${y};`).join(`
|
|
116
|
+
`);return{rule:`.${c(n)}${u}${d} {\n ${b}\n}`,mediaQuery:l}}function c(e){return e.replace(/:/g,`\\:`).replace(/\//g,`\\/`).replace(/@/g,`\\@`)}function l(e,t,n){for(let[r,i]of Object.entries(t)){let t=s(e,i,n);if(t)return t}return null}export{i as n,r,a as t};
|
|
@@ -5,14 +5,94 @@ declare const baseStyles = "*, :before, :after {\n box-sizing: border-box;\n b
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/config/schema.d.ts
|
|
7
7
|
declare const configName = "yumma.config.mjs";
|
|
8
|
+
/**
|
|
9
|
+
* Configure Yumma CSS.
|
|
10
|
+
*/
|
|
11
|
+
interface Config {
|
|
12
|
+
/**
|
|
13
|
+
* Files to scan for Yumma CSS classes.
|
|
14
|
+
*
|
|
15
|
+
* @example ["./src/**\/*.{ts,tsx}"]
|
|
16
|
+
* @default [""]
|
|
17
|
+
*/
|
|
18
|
+
source?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Path to output the generated CSS file.
|
|
21
|
+
*
|
|
22
|
+
* @example "./dist/output.css"
|
|
23
|
+
* @default ""
|
|
24
|
+
*/
|
|
25
|
+
output?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Prefix to namespace all generated classes.
|
|
28
|
+
*
|
|
29
|
+
* @example "ui-"
|
|
30
|
+
*/
|
|
31
|
+
prefix?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Reset default browser styles. Provide false to skip generating base resets.
|
|
34
|
+
*
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
normalize?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Classes that are always generated, regardless of whether they exist in source files.
|
|
40
|
+
*
|
|
41
|
+
* @example ["bg-red-5", "c-white"]
|
|
42
|
+
*/
|
|
43
|
+
safelist?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Customize the default design system.
|
|
46
|
+
*/
|
|
47
|
+
theme?: {
|
|
48
|
+
/**
|
|
49
|
+
* Add custom colors to the palette.
|
|
50
|
+
* Provide base colors and Yumma CSS generates the full shade scale automatically.
|
|
51
|
+
*
|
|
52
|
+
* @example { purple: "#9333EA" }
|
|
53
|
+
*/
|
|
54
|
+
colors?: Record<string, string> & {
|
|
55
|
+
/**
|
|
56
|
+
* Control shade generation aggressiveness.
|
|
57
|
+
*/
|
|
58
|
+
percentage?: {
|
|
59
|
+
/**
|
|
60
|
+
* Adjust the percentage of white mixed into lighter shades per step.
|
|
61
|
+
* @default 14
|
|
62
|
+
*/
|
|
63
|
+
light?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Adjust the percentage of black mixed into darker shades per step.
|
|
66
|
+
* @default 14
|
|
67
|
+
*/
|
|
68
|
+
dark?: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Override or extend the default breakpoints.
|
|
73
|
+
*
|
|
74
|
+
* @example { sm: "40rem", md: "48rem", lg: "64rem", xl: "80rem", xxl: "96rem" }
|
|
75
|
+
*/
|
|
76
|
+
screens?: Record<string, string>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
8
79
|
declare const ConfigSchema: z.ZodObject<{
|
|
9
80
|
source: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
10
81
|
output: z.ZodDefault<z.ZodString>;
|
|
11
|
-
|
|
12
|
-
|
|
82
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
83
|
+
normalize: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
+
safelist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
theme: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
colors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
87
|
+
screens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
88
|
}, z.core.$strip>>;
|
|
14
89
|
}, z.core.$strip>;
|
|
15
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Define your Yumma CSS configuration.
|
|
92
|
+
*
|
|
93
|
+
* @param config - The configuration options to customize Yumma CSS.
|
|
94
|
+
* @returns The resolved configuration object.
|
|
95
|
+
*/
|
|
16
96
|
declare function defineConfig(config: Config): Config;
|
|
17
97
|
//#endregion
|
|
18
98
|
//#region src/generator.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineConfig, i as configName, n as Config, o as baseStyles, r as ConfigSchema, t as generator } from "./generator-
|
|
1
|
+
import { a as defineConfig, i as configName, n as Config, o as baseStyles, r as ConfigSchema, t as generator } from "./generator-CrA9thCF.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/extractor.d.ts
|
|
4
4
|
declare function extractor(patterns: string[]): Promise<Set<string>>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./generator-BY3y3-E5.mjs";import{readFileSync as r}from"node:fs";import*as i from"fs";import a from"fs";import o,{basename as s,dirname as c,normalize as l,posix as u,relative as d,resolve as f,sep as p}from"path";import{fileURLToPath as m}from"url";import{createRequire as h}from"module";var g=Object.create,ee=Object.defineProperty,_=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,v=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&ee(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=_(t,s))||r.enumerable});return e},x=(e,t,n)=>(n=e==null?{}:g(v(e)),b(t||!e||!e.__esModule?ee(n,`default`,{value:e,enumerable:!0}):n,e));Object.freeze({status:`aborted`});function S(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var C=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},w=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const T={};function E(e){return e&&Object.assign(T,e),T}function re(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ie(e,t){return typeof t==`bigint`?t.toString():t}function D(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function O(e){return e==null}function ae(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}const k=Symbol(`evaluating`);function A(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==k)return r===void 0&&(r=k,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function j(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function M(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function N(e){return JSON.stringify(e)}function P(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const F=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const L=D(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function R(e){if(I(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(I(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function z(e){return R(e)?{...e}:Array.isArray(e)?[...e]:e}const B=new Set([`string`,`number`,`symbol`]);function V(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function H(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function U(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function W(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function G(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return H(e,M(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return j(this,`shape`,e),e},checks:[]}))}function oe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return H(e,M(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return j(this,`shape`,r),r},checks:[]}))}function se(e,t){if(!R(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return j(this,`shape`,n),n}}))}function ce(e,t){if(!R(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return j(this,`shape`,n),n}}))}function le(e,t){return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return j(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ue(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return H(t,M(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return j(this,`shape`,i),i},checks:[]}))}function de(e,t,n){return H(t,M(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return j(this,`shape`,i),i}}))}function fe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function pe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function me(e){return typeof e==`string`?e:e?.message}function he(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=me(e.inst?._zod.def?.error?.(e))??me(t?.error?.(e))??me(n.customError?.(e))??me(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ge(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function _e(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const ve=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ie,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ye=S(`$ZodError`,ve),be=S(`$ZodError`,ve,{Parent:Error});function xe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Se(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Ce=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new C;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>he(e,a,E())));throw F(t,i?.callee),t}return o.value},we=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>he(e,a,E())));throw F(t,i?.callee),t}return o.value},Te=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new C;return a.issues.length?{success:!1,error:new(e??ye)(a.issues.map(e=>he(e,i,E())))}:{success:!0,data:a.value}},Ee=Te(be),De=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>he(e,i,E())))}:{success:!0,data:a.value}},Oe=De(be),ke=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ce(e)(t,n,i)},Ae=e=>(t,n,r)=>Ce(e)(t,n,r),je=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return we(e)(t,n,i)},Me=e=>async(t,n,r)=>we(e)(t,n,r),Ne=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Te(e)(t,n,i)},Pe=e=>(t,n,r)=>Te(e)(t,n,r),Fe=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return De(e)(t,n,i)},Ie=e=>async(t,n,r)=>De(e)(t,n,r),Le=/^[cC][^\s-]{8,}$/,Re=/^[0-9a-z]+$/,ze=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Be=/^[0-9a-vA-V]{20}$/,Ve=/^[A-Za-z0-9]{27}$/,He=/^[a-zA-Z0-9_-]{21}$/,Ue=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,We=/^([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})$/,Ge=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ke=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function qe(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Je=/^(?:(?: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])$/,Ye=/^(([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}|:))$/,Xe=/^((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])$/,Ze=/^(([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])$/,Qe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$e=/^[A-Za-z0-9_-]*$/,et=/^\+[1-9]\d{6,14}$/,tt=`(?:(?:\\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])))`,nt=RegExp(`^${tt}$`);function rt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function it(e){return RegExp(`^${rt(e)}$`)}function at(e){let t=rt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${tt}T(?:${r})$`)}const ot=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},st=/^(?:true|false)$/i,ct=/^[^A-Z]*$/,lt=/^[^a-z]*$/,K=S(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ut=S(`$ZodCheckMaxLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ge(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dt=S(`$ZodCheckMinLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ge(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ft=S(`$ZodCheckLengthEquals`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ge(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),pt=S(`$ZodCheckStringFormat`,(e,t)=>{var n,r;K.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),mt=S(`$ZodCheckRegex`,(e,t)=>{pt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ht=S(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ct,pt.init(e,t)}),gt=S(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=lt,pt.init(e,t)}),_t=S(`$ZodCheckIncludes`,(e,t)=>{K.init(e,t);let n=V(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),vt=S(`$ZodCheckStartsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`^${V(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),yt=S(`$ZodCheckEndsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`.*${V(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),bt=S(`$ZodCheckOverwrite`,(e,t)=>{K.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var xt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
1
|
+
import{n as e,r as t,t as n}from"./generator-CaZwr7tW.mjs";import{readFileSync as r}from"node:fs";import*as i from"fs";import a from"fs";import o,{basename as s,dirname as c,normalize as l,posix as u,relative as d,resolve as f,sep as p}from"path";import{fileURLToPath as m}from"url";import{createRequire as h}from"module";var g=Object.create,ee=Object.defineProperty,_=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,v=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&ee(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=_(t,s))||r.enumerable});return e},x=(e,t,n)=>(n=e==null?{}:g(v(e)),b(t||!e||!e.__esModule?ee(n,`default`,{value:e,enumerable:!0}):n,e));Object.freeze({status:`aborted`});function S(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var C=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},w=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const T={};function E(e){return e&&Object.assign(T,e),T}function re(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ie(e,t){return typeof t==`bigint`?t.toString():t}function D(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function O(e){return e==null}function ae(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}const k=Symbol(`evaluating`);function A(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==k)return r===void 0&&(r=k,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function j(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function M(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function N(e){return JSON.stringify(e)}function P(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const F=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const L=D(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function R(e){if(I(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(I(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function z(e){return R(e)?{...e}:Array.isArray(e)?[...e]:e}const B=new Set([`string`,`number`,`symbol`]);function V(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function H(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function U(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function W(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function G(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return H(e,M(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return j(this,`shape`,e),e},checks:[]}))}function oe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return H(e,M(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return j(this,`shape`,r),r},checks:[]}))}function se(e,t){if(!R(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return j(this,`shape`,n),n}}))}function ce(e,t){if(!R(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return j(this,`shape`,n),n}}))}function le(e,t){return H(e,M(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return j(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ue(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return H(t,M(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return j(this,`shape`,i),i},checks:[]}))}function de(e,t,n){return H(t,M(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return j(this,`shape`,i),i}}))}function fe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function pe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function me(e){return typeof e==`string`?e:e?.message}function he(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=me(e.inst?._zod.def?.error?.(e))??me(t?.error?.(e))??me(n.customError?.(e))??me(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ge(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function _e(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const ve=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ie,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ye=S(`$ZodError`,ve),be=S(`$ZodError`,ve,{Parent:Error});function xe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Se(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const Ce=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new C;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>he(e,a,E())));throw F(t,i?.callee),t}return o.value},we=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>he(e,a,E())));throw F(t,i?.callee),t}return o.value},Te=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new C;return a.issues.length?{success:!1,error:new(e??ye)(a.issues.map(e=>he(e,i,E())))}:{success:!0,data:a.value}},Ee=Te(be),De=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>he(e,i,E())))}:{success:!0,data:a.value}},Oe=De(be),ke=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ce(e)(t,n,i)},Ae=e=>(t,n,r)=>Ce(e)(t,n,r),je=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return we(e)(t,n,i)},Me=e=>async(t,n,r)=>we(e)(t,n,r),Ne=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Te(e)(t,n,i)},Pe=e=>(t,n,r)=>Te(e)(t,n,r),Fe=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return De(e)(t,n,i)},Ie=e=>async(t,n,r)=>De(e)(t,n,r),Le=/^[cC][^\s-]{8,}$/,Re=/^[0-9a-z]+$/,ze=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Be=/^[0-9a-vA-V]{20}$/,Ve=/^[A-Za-z0-9]{27}$/,He=/^[a-zA-Z0-9_-]{21}$/,Ue=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,We=/^([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})$/,Ge=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ke=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function qe(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Je=/^(?:(?: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])$/,Ye=/^(([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}|:))$/,Xe=/^((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])$/,Ze=/^(([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])$/,Qe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$e=/^[A-Za-z0-9_-]*$/,et=/^\+[1-9]\d{6,14}$/,tt=`(?:(?:\\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])))`,nt=RegExp(`^${tt}$`);function rt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function it(e){return RegExp(`^${rt(e)}$`)}function at(e){let t=rt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${tt}T(?:${r})$`)}const ot=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},st=/^-?\d+(?:\.\d+)?$/,ct=/^(?:true|false)$/i,lt=/^[^A-Z]*$/,ut=/^[^a-z]*$/,K=S(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dt=S(`$ZodCheckMaxLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ge(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ft=S(`$ZodCheckMinLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ge(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pt=S(`$ZodCheckLengthEquals`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!O(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ge(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),mt=S(`$ZodCheckStringFormat`,(e,t)=>{var n,r;K.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ht=S(`$ZodCheckRegex`,(e,t)=>{mt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gt=S(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lt,mt.init(e,t)}),_t=S(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ut,mt.init(e,t)}),vt=S(`$ZodCheckIncludes`,(e,t)=>{K.init(e,t);let n=V(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),yt=S(`$ZodCheckStartsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`^${V(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),bt=S(`$ZodCheckEndsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`.*${V(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),xt=S(`$ZodCheckOverwrite`,(e,t)=>{K.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var St=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
2
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}};const
|
|
3
|
+
`))}};const Ct={major:4,minor:3,patch:6},q=S(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ct;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=fe(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new C;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=fe(e,t))});else{if(e.issues.length===t)continue;r||=fe(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(fe(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new C;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new C;return o.then(e=>t(e,r,a))}return t(o,r,a)}}A(e,`~standard`,()=>({validate:t=>{try{let n=Ee(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Oe(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),wt=S(`$ZodString`,(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ot(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),J=S(`$ZodStringFormat`,(e,t)=>{mt.init(e,t),wt.init(e,t)}),Tt=S(`$ZodGUID`,(e,t)=>{t.pattern??=We,J.init(e,t)}),Et=S(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ge(e)}else t.pattern??=Ge();J.init(e,t)}),Dt=S(`$ZodEmail`,(e,t)=>{t.pattern??=Ke,J.init(e,t)}),Ot=S(`$ZodURL`,(e,t)=>{J.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),kt=S(`$ZodEmoji`,(e,t)=>{t.pattern??=qe(),J.init(e,t)}),At=S(`$ZodNanoID`,(e,t)=>{t.pattern??=He,J.init(e,t)}),jt=S(`$ZodCUID`,(e,t)=>{t.pattern??=Le,J.init(e,t)}),Mt=S(`$ZodCUID2`,(e,t)=>{t.pattern??=Re,J.init(e,t)}),Nt=S(`$ZodULID`,(e,t)=>{t.pattern??=ze,J.init(e,t)}),Pt=S(`$ZodXID`,(e,t)=>{t.pattern??=Be,J.init(e,t)}),Ft=S(`$ZodKSUID`,(e,t)=>{t.pattern??=Ve,J.init(e,t)}),It=S(`$ZodISODateTime`,(e,t)=>{t.pattern??=at(t),J.init(e,t)}),Lt=S(`$ZodISODate`,(e,t)=>{t.pattern??=nt,J.init(e,t)}),Rt=S(`$ZodISOTime`,(e,t)=>{t.pattern??=it(t),J.init(e,t)}),zt=S(`$ZodISODuration`,(e,t)=>{t.pattern??=Ue,J.init(e,t)}),Bt=S(`$ZodIPv4`,(e,t)=>{t.pattern??=Je,J.init(e,t),e._zod.bag.format=`ipv4`}),Vt=S(`$ZodIPv6`,(e,t)=>{t.pattern??=Ye,J.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Ht=S(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Xe,J.init(e,t)}),Ut=S(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ze,J.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Wt(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Gt=S(`$ZodBase64`,(e,t)=>{t.pattern??=Qe,J.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Wt(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Kt(e){if(!$e.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wt(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const qt=S(`$ZodBase64URL`,(e,t)=>{t.pattern??=$e,J.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Kt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Jt=S(`$ZodE164`,(e,t)=>{t.pattern??=et,J.init(e,t)});function Yt(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const Xt=S(`$ZodJWT`,(e,t)=>{J.init(e,t),e._zod.check=n=>{Yt(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Zt=S(`$ZodBoolean`,(e,t)=>{q.init(e,t),e._zod.pattern=ct,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Qt=S(`$ZodAny`,(e,t)=>{q.init(e,t),e._zod.parse=e=>e}),$t=S(`$ZodUnknown`,(e,t)=>{q.init(e,t),e._zod.parse=e=>e}),en=S(`$ZodNever`,(e,t)=>{q.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function tn(e,t,n){e.issues.length&&t.issues.push(...pe(n,e.issues)),t.value[n]=e.value}const nn=S(`$ZodArray`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>tn(t,n,e))):tn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function rn(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...pe(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function an(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=W(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function on(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>rn(e,n,i,t,u))):rn(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const sn=S(`$ZodObject`,(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=D(()=>an(t));A(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=I,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>rn(n,t,e,s,r))):rn(i,t,e,s,r)}return i?on(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),cn=S(`$ZodObjectJIT`,(e,t)=>{sn.init(e,t);let n=e._zod.parse,r=D(()=>an(t)),i=e=>{let t=new St([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=N(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=N(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
4
4
|
if (${n}.issues.length) {
|
|
5
5
|
if (${o} in input) {
|
|
6
6
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -34,6 +34,6 @@ import{n as e,r as t,t as n}from"./generator-BY3y3-E5.mjs";import{readFileSync a
|
|
|
34
34
|
newResult[${o}] = ${n}.value;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=I,s=!T.jitless,c=s&&L.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?rn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function sn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!fe(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>he(e,r,E())))}),t)}const cn=S(`$ZodUnion`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),A(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),A(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),A(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ae(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>sn(t,i,e,a)):sn(s,i,e,a)}}),ln=S(`$ZodIntersection`,(e,t)=>{q.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>dn(e,t,n)):dn(e,i,a)}});function un(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(R(e)&&R(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=un(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=un(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function dn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),fe(e))return e;let o=un(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const fn=S(`$ZodEnum`,(e,t)=>{q.init(e,t);let n=re(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>B.has(typeof e)).map(e=>typeof e==`string`?V(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),pn=S(`$ZodTransform`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new C;return n.value=i,n}});function mn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const hn=S(`$ZodOptional`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ae(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>mn(t,e.value)):mn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),gn=S(`$ZodExactOptional`,(e,t)=>{hn.init(e,t),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),_n=S(`$ZodNullable`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ae(e.source)}|null)$`):void 0}),A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),vn=S(`$ZodDefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>yn(e,t)):yn(r,t)}});function yn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const bn=S(`$ZodPrefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),xn=S(`$ZodNonOptional`,(e,t)=>{q.init(e,t),A(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Sn(t,e)):Sn(i,e)}});function Sn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const Cn=S(`$ZodCatch`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>he(e,n,E()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>he(e,n,E()))},input:e.value}),e.issues=[]),e)}}),wn=S(`$ZodPipe`,(e,t)=>{q.init(e,t),A(e._zod,`values`,()=>t.in._zod.values),A(e._zod,`optin`,()=>t.in._zod.optin),A(e._zod,`optout`,()=>t.out._zod.optout),A(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Tn(e,t.in,n)):Tn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Tn(e,t.out,n)):Tn(r,t.out,n)}});function Tn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const En=S(`$ZodReadonly`,(e,t)=>{q.init(e,t),A(e._zod,`propValues`,()=>t.innerType._zod.propValues),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`optin`,()=>t.innerType?._zod?.optin),A(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Dn):Dn(r)}});function Dn(e){return e.value=Object.freeze(e.value),e}const On=S(`$ZodCustom`,(e,t)=>{K.init(e,t),q.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>kn(t,n,r,e));kn(i,n,r,e)}});function kn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(_e(e))}}var An,jn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Mn(){return new jn}(An=globalThis).__zod_globalRegistry??(An.__zod_globalRegistry=Mn());const Nn=globalThis.__zod_globalRegistry;function Pn(e,t){return new e({type:`string`,...U(t)})}function Fn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...U(t)})}function In(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...U(t)})}function Ln(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...U(t)})}function Rn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...U(t)})}function zn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...U(t)})}function Bn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...U(t)})}function Vn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...U(t)})}function Hn(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...U(t)})}function Un(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...U(t)})}function Wn(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...U(t)})}function Gn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...U(t)})}function Kn(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...U(t)})}function qn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...U(t)})}function Jn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...U(t)})}function Yn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...U(t)})}function Xn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...U(t)})}function Zn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...U(t)})}function Qn(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...U(t)})}function $n(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...U(t)})}function er(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...U(t)})}function tr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...U(t)})}function nr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...U(t)})}function rr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...U(t)})}function ir(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...U(t)})}function ar(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...U(t)})}function or(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...U(t)})}function sr(e,t){return new e({type:`boolean`,...U(t)})}function cr(e){return new e({type:`unknown`})}function lr(e,t){return new e({type:`never`,...U(t)})}function ur(e,t){return new ut({check:`max_length`,...U(t),maximum:e})}function dr(e,t){return new dt({check:`min_length`,...U(t),minimum:e})}function fr(e,t){return new ft({check:`length_equals`,...U(t),length:e})}function pr(e,t){return new mt({check:`string_format`,format:`regex`,...U(t),pattern:e})}function mr(e){return new ht({check:`string_format`,format:`lowercase`,...U(e)})}function hr(e){return new gt({check:`string_format`,format:`uppercase`,...U(e)})}function gr(e,t){return new _t({check:`string_format`,format:`includes`,...U(t),includes:e})}function _r(e,t){return new vt({check:`string_format`,format:`starts_with`,...U(t),prefix:e})}function vr(e,t){return new yt({check:`string_format`,format:`ends_with`,...U(t),suffix:e})}function yr(e){return new bt({check:`overwrite`,tx:e})}function br(e){return yr(t=>t.normalize(e))}function xr(){return yr(e=>e.trim())}function Sr(){return yr(e=>e.toLowerCase())}function Cr(){return yr(e=>e.toUpperCase())}function wr(){return yr(e=>P(e))}function Tr(e,t,n){return new e({type:`array`,element:t,...U(n)})}function Er(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...U(n)})}function Dr(e){let t=Or(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(_e(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(_e(r))}},e(n.value,n)));return t}function Or(e,t){let n=new K({check:`custom`,...U(t)});return n._zod.check=e,n}function kr(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Nn,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Y(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Y(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&X(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ar(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
37
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=I,s=!T.jitless,c=s&&L.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?on([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function ln(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!fe(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>he(e,r,E())))}),t)}const un=S(`$ZodUnion`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),A(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),A(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),A(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ae(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>ln(t,i,e,a)):ln(s,i,e,a)}}),dn=S(`$ZodIntersection`,(e,t)=>{q.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>pn(e,t,n)):pn(e,i,a)}});function fn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(R(e)&&R(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=fn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=fn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),fe(e))return e;let o=fn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const mn=S(`$ZodRecord`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!R(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...pe(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...pe(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&st.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>he(e,r,E())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...pe(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...pe(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),hn=S(`$ZodEnum`,(e,t)=>{q.init(e,t);let n=re(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>B.has(typeof e)).map(e=>typeof e==`string`?V(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),gn=S(`$ZodTransform`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new C;return n.value=i,n}});function _n(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const vn=S(`$ZodOptional`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ae(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>_n(t,e.value)):_n(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),yn=S(`$ZodExactOptional`,(e,t)=>{vn.init(e,t),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),bn=S(`$ZodNullable`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ae(e.source)}|null)$`):void 0}),A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),xn=S(`$ZodDefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Sn(e,t)):Sn(r,t)}});function Sn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Cn=S(`$ZodPrefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),wn=S(`$ZodNonOptional`,(e,t)=>{q.init(e,t),A(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Tn(t,e)):Tn(i,e)}});function Tn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const En=S(`$ZodCatch`,(e,t)=>{q.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>he(e,n,E()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>he(e,n,E()))},input:e.value}),e.issues=[]),e)}}),Dn=S(`$ZodPipe`,(e,t)=>{q.init(e,t),A(e._zod,`values`,()=>t.in._zod.values),A(e._zod,`optin`,()=>t.in._zod.optin),A(e._zod,`optout`,()=>t.out._zod.optout),A(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>On(e,t.in,n)):On(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>On(e,t.out,n)):On(r,t.out,n)}});function On(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const kn=S(`$ZodReadonly`,(e,t)=>{q.init(e,t),A(e._zod,`propValues`,()=>t.innerType._zod.propValues),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`optin`,()=>t.innerType?._zod?.optin),A(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(An):An(r)}});function An(e){return e.value=Object.freeze(e.value),e}const jn=S(`$ZodCustom`,(e,t)=>{K.init(e,t),q.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Mn(t,n,r,e));Mn(i,n,r,e)}});function Mn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(_e(e))}}var Nn,Pn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Fn(){return new Pn}(Nn=globalThis).__zod_globalRegistry??(Nn.__zod_globalRegistry=Fn());const In=globalThis.__zod_globalRegistry;function Ln(e,t){return new e({type:`string`,...U(t)})}function Rn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...U(t)})}function zn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...U(t)})}function Bn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...U(t)})}function Vn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...U(t)})}function Hn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...U(t)})}function Un(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...U(t)})}function Wn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...U(t)})}function Gn(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...U(t)})}function Kn(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...U(t)})}function qn(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...U(t)})}function Jn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...U(t)})}function Yn(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...U(t)})}function Xn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...U(t)})}function Zn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...U(t)})}function Qn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...U(t)})}function $n(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...U(t)})}function er(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...U(t)})}function tr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...U(t)})}function nr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...U(t)})}function rr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...U(t)})}function ir(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...U(t)})}function ar(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...U(t)})}function or(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...U(t)})}function sr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...U(t)})}function cr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...U(t)})}function lr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...U(t)})}function ur(e,t){return new e({type:`boolean`,...U(t)})}function dr(e){return new e({type:`any`})}function fr(e){return new e({type:`unknown`})}function pr(e,t){return new e({type:`never`,...U(t)})}function mr(e,t){return new dt({check:`max_length`,...U(t),maximum:e})}function hr(e,t){return new ft({check:`min_length`,...U(t),minimum:e})}function gr(e,t){return new pt({check:`length_equals`,...U(t),length:e})}function _r(e,t){return new ht({check:`string_format`,format:`regex`,...U(t),pattern:e})}function vr(e){return new gt({check:`string_format`,format:`lowercase`,...U(e)})}function yr(e){return new _t({check:`string_format`,format:`uppercase`,...U(e)})}function br(e,t){return new vt({check:`string_format`,format:`includes`,...U(t),includes:e})}function xr(e,t){return new yt({check:`string_format`,format:`starts_with`,...U(t),prefix:e})}function Sr(e,t){return new bt({check:`string_format`,format:`ends_with`,...U(t),suffix:e})}function Cr(e){return new xt({check:`overwrite`,tx:e})}function wr(e){return Cr(t=>t.normalize(e))}function Tr(){return Cr(e=>e.trim())}function Er(){return Cr(e=>e.toLowerCase())}function Dr(){return Cr(e=>e.toUpperCase())}function Or(){return Cr(e=>P(e))}function kr(e,t,n){return new e({type:`array`,element:t,...U(n)})}function Ar(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...U(n)})}function jr(e){let t=Mr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(_e(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(_e(r))}},e(n.value,n)));return t}function Mr(e,t){let n=new K({check:`custom`,...U(t)});return n._zod.check=e,n}function Nr(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??In,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Y(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Y(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&X(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Pr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
38
38
|
|
|
39
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function jr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Nr(t,`input`,e.processors),output:Nr(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function X(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return X(r.element,n);if(r.type===`set`)return X(r.valueType,n);if(r.type===`lazy`)return X(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return X(r.innerType,n);if(r.type===`intersection`)return X(r.left,n)||X(r.right,n);if(r.type===`record`||r.type===`map`)return X(r.keyType,n)||X(r.valueType,n);if(r.type===`pipe`)return X(r.in,n)||X(r.out,n);if(r.type===`object`){for(let e in r.shape)if(X(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(X(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(X(e,n))return!0;return!!(r.rest&&X(r.rest,n))}return!1}const Mr=(e,t={})=>n=>{let r=kr({...n,processors:t});return Y(e,r),Ar(r,e),jr(r,e)},Nr=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=kr({...i??{},target:a,io:t,processors:n});return Y(e,o),Ar(o,e),jr(o,e)},Pr={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fr=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Pr[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ir=(e,t,n,r)=>{n.type=`boolean`},Lr=(e,t,n,r)=>{n.not={}},Rr=(e,t,n,r)=>{let i=e._zod.def,a=re(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},zr=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Br=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Vr=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Y(a.element,t,{...r,path:[...r.path,`items`]})},Hr=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Y(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Y(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ur=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Y(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Wr=(e,t,n,r)=>{let i=e._zod.def,a=Y(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Y(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Gr=(e,t,n,r)=>{let i=e._zod.def,a=Y(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Kr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Jr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Yr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Xr=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Y(a,t,r);let o=t.seen.get(e);o.ref=a},Zr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Qr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$r=S(`ZodISODateTime`,(e,t)=>{Ft.init(e,t),$.init(e,t)});function ei(e){return rr($r,e)}const ti=S(`ZodISODate`,(e,t)=>{It.init(e,t),$.init(e,t)});function ni(e){return ir(ti,e)}const ri=S(`ZodISOTime`,(e,t)=>{Lt.init(e,t),$.init(e,t)});function ii(e){return ar(ri,e)}const ai=S(`ZodISODuration`,(e,t)=>{Rt.init(e,t),$.init(e,t)});function oi(e){return or(ai,e)}const si=(e,t)=>{ye.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Se(e,t)},flatten:{value:t=>xe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ie,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ie,2)}},isEmpty:{get(){return e.issues.length===0}}})};S(`ZodError`,si);const Z=S(`ZodError`,si,{Parent:Error}),ci=Ce(Z),li=we(Z),ui=Te(Z),di=De(Z),fi=ke(Z),pi=Ae(Z),mi=je(Z),hi=Me(Z),gi=Ne(Z),_i=Pe(Z),vi=Fe(Z),yi=Ie(Z),Q=S(`ZodType`,(e,t)=>(q.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Nr(e,`input`),output:Nr(e,`output`)}}),e.toJSONSchema=Mr(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(M(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>H(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ci(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ui(e,t,n),e.parseAsync=async(t,n)=>li(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>di(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>fi(e,t,n),e.decode=(t,n)=>pi(e,t,n),e.encodeAsync=async(t,n)=>mi(e,t,n),e.decodeAsync=async(t,n)=>hi(e,t,n),e.safeEncode=(t,n)=>gi(e,t,n),e.safeDecode=(t,n)=>_i(e,t,n),e.safeEncodeAsync=async(t,n)=>vi(e,t,n),e.safeDecodeAsync=async(t,n)=>yi(e,t,n),e.refine=(t,n)=>e.check(Ta(t,n)),e.superRefine=t=>e.check(Ea(t)),e.overwrite=t=>e.check(yr(t)),e.optional=()=>sa(e),e.exactOptional=()=>la(e),e.nullable=()=>da(e),e.nullish=()=>sa(da(e)),e.nonoptional=t=>_a(e,t),e.array=()=>Yi(e),e.or=t=>$i([e,t]),e.and=t=>ta(e,t),e.transform=t=>xa(e,aa(t)),e.default=t=>pa(e,t),e.prefault=t=>ha(e,t),e.catch=t=>ya(e,t),e.pipe=t=>xa(e,t),e.readonly=()=>Ca(e),e.describe=t=>{let n=e.clone();return Nn.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Nn.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Nn.get(e);let n=e.clone();return Nn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),bi=S(`_ZodString`,(e,t)=>{Ct.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fr(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(pr(...t)),e.includes=(...t)=>e.check(gr(...t)),e.startsWith=(...t)=>e.check(_r(...t)),e.endsWith=(...t)=>e.check(vr(...t)),e.min=(...t)=>e.check(dr(...t)),e.max=(...t)=>e.check(ur(...t)),e.length=(...t)=>e.check(fr(...t)),e.nonempty=(...t)=>e.check(dr(1,...t)),e.lowercase=t=>e.check(mr(t)),e.uppercase=t=>e.check(hr(t)),e.trim=()=>e.check(xr()),e.normalize=(...t)=>e.check(br(...t)),e.toLowerCase=()=>e.check(Sr()),e.toUpperCase=()=>e.check(Cr()),e.slugify=()=>e.check(wr())}),xi=S(`ZodString`,(e,t)=>{Ct.init(e,t),bi.init(e,t),e.email=t=>e.check(Fn(Ci,t)),e.url=t=>e.check(Vn(Ei,t)),e.jwt=t=>e.check(nr(Vi,t)),e.emoji=t=>e.check(Hn(Di,t)),e.guid=t=>e.check(In(wi,t)),e.uuid=t=>e.check(Ln(Ti,t)),e.uuidv4=t=>e.check(Rn(Ti,t)),e.uuidv6=t=>e.check(zn(Ti,t)),e.uuidv7=t=>e.check(Bn(Ti,t)),e.nanoid=t=>e.check(Un(Oi,t)),e.guid=t=>e.check(In(wi,t)),e.cuid=t=>e.check(Wn(ki,t)),e.cuid2=t=>e.check(Gn(Ai,t)),e.ulid=t=>e.check(Kn(ji,t)),e.base64=t=>e.check($n(Ri,t)),e.base64url=t=>e.check(er(zi,t)),e.xid=t=>e.check(qn(Mi,t)),e.ksuid=t=>e.check(Jn(Ni,t)),e.ipv4=t=>e.check(Yn(Pi,t)),e.ipv6=t=>e.check(Xn(Fi,t)),e.cidrv4=t=>e.check(Zn(Ii,t)),e.cidrv6=t=>e.check(Qn(Li,t)),e.e164=t=>e.check(tr(Bi,t)),e.datetime=t=>e.check(ei(t)),e.date=t=>e.check(ni(t)),e.time=t=>e.check(ii(t)),e.duration=t=>e.check(oi(t))});function Si(e){return Pn(xi,e)}const $=S(`ZodStringFormat`,(e,t)=>{J.init(e,t),bi.init(e,t)}),Ci=S(`ZodEmail`,(e,t)=>{Et.init(e,t),$.init(e,t)}),wi=S(`ZodGUID`,(e,t)=>{wt.init(e,t),$.init(e,t)}),Ti=S(`ZodUUID`,(e,t)=>{Tt.init(e,t),$.init(e,t)}),Ei=S(`ZodURL`,(e,t)=>{Dt.init(e,t),$.init(e,t)}),Di=S(`ZodEmoji`,(e,t)=>{Ot.init(e,t),$.init(e,t)}),Oi=S(`ZodNanoID`,(e,t)=>{kt.init(e,t),$.init(e,t)}),ki=S(`ZodCUID`,(e,t)=>{At.init(e,t),$.init(e,t)}),Ai=S(`ZodCUID2`,(e,t)=>{jt.init(e,t),$.init(e,t)}),ji=S(`ZodULID`,(e,t)=>{Mt.init(e,t),$.init(e,t)}),Mi=S(`ZodXID`,(e,t)=>{Nt.init(e,t),$.init(e,t)}),Ni=S(`ZodKSUID`,(e,t)=>{Pt.init(e,t),$.init(e,t)}),Pi=S(`ZodIPv4`,(e,t)=>{zt.init(e,t),$.init(e,t)}),Fi=S(`ZodIPv6`,(e,t)=>{Bt.init(e,t),$.init(e,t)}),Ii=S(`ZodCIDRv4`,(e,t)=>{Vt.init(e,t),$.init(e,t)}),Li=S(`ZodCIDRv6`,(e,t)=>{Ht.init(e,t),$.init(e,t)}),Ri=S(`ZodBase64`,(e,t)=>{Wt.init(e,t),$.init(e,t)}),zi=S(`ZodBase64URL`,(e,t)=>{Kt.init(e,t),$.init(e,t)}),Bi=S(`ZodE164`,(e,t)=>{qt.init(e,t),$.init(e,t)}),Vi=S(`ZodJWT`,(e,t)=>{Yt.init(e,t),$.init(e,t)}),Hi=S(`ZodBoolean`,(e,t)=>{Xt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ir(e,t,n,r)});function Ui(e){return sr(Hi,e)}const Wi=S(`ZodUnknown`,(e,t)=>{Zt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Gi(){return cr(Wi)}const Ki=S(`ZodNever`,(e,t)=>{Qt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lr(e,t,n,r)});function qi(e){return lr(Ki,e)}const Ji=S(`ZodArray`,(e,t)=>{en.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(dr(t,n)),e.nonempty=t=>e.check(dr(1,t)),e.max=(t,n)=>e.check(ur(t,n)),e.length=(t,n)=>e.check(fr(t,n)),e.unwrap=()=>e.element});function Yi(e,t){return Tr(Ji,e,t)}const Xi=S(`ZodObject`,(e,t)=>{on.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hr(e,t,n,r),A(e,`shape`,()=>t.shape),e.keyof=()=>ra(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gi()}),e.strict=()=>e.clone({...e._zod.def,catchall:qi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>se(e,t),e.safeExtend=t=>ce(e,t),e.merge=t=>le(e,t),e.pick=t=>G(e,t),e.omit=t=>oe(e,t),e.partial=(...t)=>ue(oa,e,t[0]),e.required=(...t)=>de(ga,e,t[0])});function Zi(e,t){return new Xi({type:`object`,shape:e??{},...U(t)})}const Qi=S(`ZodUnion`,(e,t)=>{cn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ur(e,t,n,r),e.options=t.options});function $i(e,t){return new Qi({type:`union`,options:e,...U(t)})}const ea=S(`ZodIntersection`,(e,t)=>{ln.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wr(e,t,n,r)});function ta(e,t){return new ea({type:`intersection`,left:e,right:t})}const na=S(`ZodEnum`,(e,t)=>{fn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rr(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new na({...t,checks:[],...U(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new na({...t,checks:[],...U(r),entries:i})}});function ra(e,t){return new na({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...U(t)})}const ia=S(`ZodTransform`,(e,t)=>{pn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Br(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(_e(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(_e(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function aa(e){return new ia({type:`transform`,transform:e})}const oa=S(`ZodOptional`,(e,t)=>{hn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sa(e){return new oa({type:`optional`,innerType:e})}const ca=S(`ZodExactOptional`,(e,t)=>{gn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function la(e){return new ca({type:`optional`,innerType:e})}const ua=S(`ZodNullable`,(e,t)=>{_n.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function da(e){return new ua({type:`nullable`,innerType:e})}const fa=S(`ZodDefault`,(e,t)=>{vn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pa(e,t){return new fa({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():z(t)}})}const ma=S(`ZodPrefault`,(e,t)=>{bn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ha(e,t){return new ma({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():z(t)}})}const ga=S(`ZodNonOptional`,(e,t)=>{xn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _a(e,t){return new ga({type:`nonoptional`,innerType:e,...U(t)})}const va=S(`ZodCatch`,(e,t)=>{Cn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ya(e,t){return new va({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const ba=S(`ZodPipe`,(e,t)=>{wn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xr(e,t,n,r),e.in=t.in,e.out=t.out});function xa(e,t){return new ba({type:`pipe`,in:e,out:t})}const Sa=S(`ZodReadonly`,(e,t)=>{En.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ca(e){return new Sa({type:`readonly`,innerType:e})}const wa=S(`ZodCustom`,(e,t)=>{On.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zr(e,t,n,r)});function Ta(e,t={}){return Er(wa,e,t)}function Ea(e){return Dr(e)}const Da=`yumma.config.mjs`,Oa=Zi({source:Yi(Si()).default([``]),output:Si().default(``),buildOptions:Zi({reset:Ui().default(!0)}).default({reset:!0})});function ka(e){return e}var Aa=h(import.meta.url);function ja(e){let t=l(e);return t.length>1&&t[t.length-1]===p&&(t=t.substring(0,t.length-1)),t}const Ma=/[\\/]/g;function Na(e,t){return e.replace(Ma,t)}const Pa=/^[a-z]:[\\/]$/i;function Fa(e){return e===`/`||Pa.test(e)}function Ia(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=f(e)),(r||a)&&(e=ja(e)),e===`.`?``:Na(e[e.length-1]===i?e:e+i,i)}function La(e,t){return t+e}function Ra(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:Na(d(e,r),t.pathSeparator)+t.pathSeparator+n}}function za(e){return e}function Ba(e,t,n){return t+e+n}function Va(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?Ra(e,t):r?La:za}function Ha(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function Ua(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const Wa=(e,t)=>{t.push(e||`.`)},Ga=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},Ka=()=>{};function qa(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?Ua(e):Ha(e):r&&r.length?Ga:Wa:Ka}const Ja=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},Ya=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},Xa=(e,t,n,r)=>{n.files++},Za=(e,t)=>{t.push(e)},Qa=()=>{};function $a(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?Qa:n&&n.length?r?Ja:Ya:r?Xa:Za}const eo=e=>e,to=()=>[``].slice(0,0);function no(e){return e.group?to:eo}const ro=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},io=()=>{};function ao(e){return e.group?ro:io}const oo=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&lo(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},so=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&lo(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function co(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?so:oo}function lo(e,t,n){if(n.options.useRealPaths)return uo(t,n);let r=c(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=c(r)}return n.symlinks.set(e,t),i>1}function uo(e,t){return t.visited.includes(e+t.options.pathSeparator)}const fo=e=>e.counts,po=e=>e.groups,mo=e=>e.paths,ho=e=>e.paths.slice(0,e.options.maxFiles),go=(e,t,n)=>(bo(t,n,e.counts,e.options.suppressErrors),null),_o=(e,t,n)=>(bo(t,n,e.paths,e.options.suppressErrors),null),vo=(e,t,n)=>(bo(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),yo=(e,t,n)=>(bo(t,n,e.groups,e.options.suppressErrors),null);function bo(e,t,n,r){t(e&&!r?e:null,n)}function xo(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?fo:go:r?t?po:yo:i?t?ho:vo:t?mo:_o}const So={withFileTypes:!0},Co=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,So,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},wo=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,So)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function To(e){return e?wo:Co}var Eo=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Do=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},Oo=class{aborted=!1;abort(){this.aborted=!0}},ko=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=xo(t,this.isSynchronous),this.root=Ia(e,t),this.state={root:Fa(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Do,options:t,queue:new Eo((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Oo,fs:t.fs||i},this.joinPath=Va(this.root,t),this.pushDirectory=qa(this.root,t),this.pushFile=$a(t),this.getArray=no(t),this.groupFiles=ao(t),this.resolveSymlink=co(t,this.isSynchronous),this.walkDirectory=To(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:l,maxFiles:u,signal:d,useRealPaths:f,pathSeparator:p},controller:m}=this.state;if(m.aborted||d&&d.aborted||u&&r.length>u)return;let h=this.getArray(this.state.paths);for(let u=0;u<e.length;++u){let d=e[u];if(d.isFile()||d.isSymbolicLink()&&!a&&!o){let e=this.joinPath(d.name,t);this.pushFile(e,h,this.state.counts,i)}else if(d.isDirectory()){let e=Ba(d.name,t,this.state.options.pathSeparator);if(l&&l(d.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&d.isSymbolicLink()){let e=La(d.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=Ia(r,this.state.options),l&&l(d.name,f?r:e+p))return;this.walkDirectory(this.state,r,f?r:e+p,n-1,this.walk)}else{r=f?r:e;let t=s(r),n=Ia(c(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,h,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,h)}};function Ao(e,t){return new Promise((n,r)=>{jo(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function jo(e,t,n){new ko(e,t,n).start()}function Mo(e,t){return new ko(e,t).start()}var No=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Ao(this.root,this.options)}withCallback(e){jo(this.root,this.options,e)}sync(){return Mo(this.root,this.options)}};let Po=null;try{Aa.resolve(`picomatch`),Po=Aa(`picomatch`)}catch{}var Fo=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:p,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new No(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new No(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||Po;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},Io=y(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),Lo=y((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Io();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),Ro=y(((e,t)=>{let n=Lo(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:ee}=Io(),_=e=>e===l||e===a,te=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let v=t||{},ne=e.length-1,y=v.parts===!0||v.scanToEnd===!0,b=[],x=[],S=[],C=e,w=-1,T=0,E=0,re=!1,ie=!1,D=!1,O=!1,ae=!1,k=!1,A=!1,j=!1,M=!1,N=!1,P=0,F,I,L={value:``,depth:0,isGlob:!1},R=()=>w>=ne,z=()=>C.charCodeAt(w+1),B=()=>(F=I,C.charCodeAt(++w));for(;w<ne;){I=B();let e;if(I===a){A=L.backslashes=!0,I=B(),I===u&&(k=!0);continue}if(k===!0||I===u){for(P++;R()!==!0&&(I=B());){if(I===a){A=L.backslashes=!0,B();continue}if(I===u){P++;continue}if(k!==!0&&I===s&&(I=B())===s){if(re=L.isBrace=!0,D=L.isGlob=!0,N=!0,y===!0)continue;break}if(k!==!0&&I===o){if(re=L.isBrace=!0,D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===h&&(P--,P===0)){k=!1,re=L.isBrace=!0,N=!0;break}}if(y===!0)continue;break}if(I===l){if(b.push(w),x.push(L),L={value:``,depth:0,isGlob:!1},N===!0)continue;if(F===s&&w===T+1){T+=2;continue}E=w+1;continue}if(v.noext!==!0&&(I===p||I===i||I===r||I===m||I===c)&&z()===d){if(D=L.isGlob=!0,O=L.isExtglob=!0,N=!0,I===c&&w===T&&(M=!0),y===!0){for(;R()!==!0&&(I=B());){if(I===a){A=L.backslashes=!0,I=B();continue}if(I===g){D=L.isGlob=!0,N=!0;break}}continue}break}if(I===r){if(F===r&&(ae=L.isGlobstar=!0),D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===m){if(D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===f){for(;R()!==!0&&(e=B());){if(e===a){A=L.backslashes=!0,B();continue}if(e===ee){ie=L.isBracket=!0,D=L.isGlob=!0,N=!0;break}}if(y===!0)continue;break}if(v.nonegate!==!0&&I===c&&w===T){j=L.negated=!0,T++;continue}if(v.noparen!==!0&&I===d){if(D=L.isGlob=!0,y===!0){for(;R()!==!0&&(I=B());){if(I===d){A=L.backslashes=!0,I=B();continue}if(I===g){N=!0;break}}continue}break}if(D===!0){if(N=!0,y===!0)continue;break}}v.noext===!0&&(O=!1,D=!1);let V=C,H=``,U=``;T>0&&(H=C.slice(0,T),C=C.slice(T),E-=T),V&&D===!0&&E>0?(V=C.slice(0,E),U=C.slice(E)):D===!0?(V=``,U=C):V=C,V&&V!==``&&V!==`/`&&V!==C&&_(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),v.unescape===!0&&(U&&=n.removeBackslashes(U),V&&A===!0&&(V=n.removeBackslashes(V)));let W={prefix:H,input:e,start:T,base:V,glob:U,isBrace:re,isBracket:ie,isGlob:D,isExtglob:O,isGlobstar:ae,negated:j,negatedExtglob:M};if(v.tokens===!0&&(W.maxDepth=0,_(I)||x.push(L),W.tokens=x),v.parts===!0||v.tokens===!0){let t;for(let n=0;n<b.length;n++){let r=t?t+1:T,i=b[n],a=e.slice(r,i);v.tokens&&(n===0&&T!==0?(x[n].isPrefix=!0,x[n].value=H):x[n].value=a,te(x[n]),W.maxDepth+=x[n].depth),(n!==0||a!==``)&&S.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);S.push(n),v.tokens&&(x[x.length-1].value=n,te(x[x.length-1]),W.maxDepth+=x[x.length-1].depth)}W.slashes=b,W.parts=S}return W}})),zo=y(((e,t)=>{let n=Io(),r=Lo(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],ee=f.capture?``:`?:`,_=n.globChars(f.windows),te=n.extglobChars(_),{DOT_LITERAL:v,PLUS_LITERAL:ne,SLASH_LITERAL:y,ONE_CHAR:b,DOTS_SLASH:x,NO_DOT:S,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:T,QMARK_NO_DOT:E,STAR:re,START_ANCHOR:ie}=_,D=e=>`(${ee}(?:(?!${ie}${e.dot?x:v}).)*?)`,O=f.dot?``:S,ae=f.dot?T:E,k=f.bash===!0?D(f):re;f.capture&&(k=`(${k})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let A={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,A),m=e.length;let j=[],M=[],N=[],P=h,F,I=()=>A.index===m-1,L=A.peek=(t=1)=>e[A.index+t],R=A.advance=()=>e[++A.index]||``,z=()=>e.slice(A.index+1),B=(e=``,t=0)=>{A.consumed+=e,A.index+=t},V=e=>{A.output+=e.output==null?e.value:e.output,B(e.value)},H=()=>{let e=1;for(;L()===`!`&&(L(2)!==`(`||L(3)===`?`);)R(),A.start++,e++;return e%2==0?!1:(A.negated=!0,A.start++,!0)},U=e=>{A[e]++,N.push(e)},W=e=>{A[e]--,N.pop()},G=e=>{if(P.type===`globstar`){let t=A.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||j.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(A.output=A.output.slice(0,-P.output.length),P.type=`star`,P.value=`*`,P.output=k,A.output+=P.output)}if(j.length&&e.type!==`paren`&&(j[j.length-1].inner+=e.value),(e.value||e.output)&&V(e),P&&P.type===`text`&&e.type===`text`){P.output=(P.output||P.value)+e.value,P.value+=e.value;return}e.prev=P,g.push(e),P=e},oe=(e,t)=>{let n={...te[t],conditions:1,inner:``};n.prev=P,n.parens=A.parens,n.output=A.output;let r=(f.capture?`(`:``)+n.open;U(`parens`),G({type:e,value:t,output:A.output?``:b}),G({type:`paren`,extglob:!0,value:R(),output:r}),j.push(n)},se=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=k;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=D(f)),(i!==k||I()||/^\)+$/.test(z()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=z())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(A.negatedExtglob=!0)}G({type:`paren`,extglob:!0,value:F,output:n}),W(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?T.repeat(a.length):``):o===0?ae+(a?T.repeat(a.length):``):T.repeat(r.length):i===`.`?v.repeat(r.length):i===`*`?t?t+i+(a?k:``):k:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(A.output=e,A):(A.output=r.wrapOutput(i,A,t),A)}for(;!I();){if(F=R(),F===`\0`)continue;if(F===`\\`){let e=L();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){F+=`\\`,G({type:`text`,value:F});continue}let t=/^\\+/.exec(z()),n=0;if(t&&t[0].length>2&&(n=t[0].length,A.index+=n,n%2!=0&&(F+=`\\`)),f.unescape===!0?F=R():F+=R(),A.brackets===0){G({type:`text`,value:F});continue}}if(A.brackets>0&&(F!==`]`||P.value===`[`||P.value===`[^`)){if(f.posix!==!1&&F===`:`){let e=P.value.slice(1);if(e.includes(`[`)&&(P.posix=!0,e.includes(`:`))){let e=P.value.lastIndexOf(`[`),t=P.value.slice(0,e),n=a[P.value.slice(e+2)];if(n){P.value=t+n,A.backtrack=!0,R(),!h.output&&g.indexOf(P)===1&&(h.output=b);continue}}}(F===`[`&&L()!==`:`||F===`-`&&L()===`]`)&&(F=`\\${F}`),F===`]`&&(P.value===`[`||P.value===`[^`)&&(F=`\\${F}`),f.posix===!0&&F===`!`&&P.value===`[`&&(F=`^`),P.value+=F,V({value:F});continue}if(A.quotes===1&&F!==`"`){F=r.escapeRegex(F),P.value+=F,V({value:F});continue}if(F===`"`){A.quotes=A.quotes===1?0:1,f.keepQuotes===!0&&G({type:`text`,value:F});continue}if(F===`(`){U(`parens`),G({type:`paren`,value:F});continue}if(F===`)`){if(A.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=j[j.length-1];if(e&&A.parens===e.parens+1){se(j.pop());continue}G({type:`paren`,value:F,output:A.parens?`)`:`\\)`}),W(`parens`);continue}if(F===`[`){if(f.nobracket===!0||!z().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));F=`\\${F}`}else U(`brackets`);G({type:`bracket`,value:F});continue}if(F===`]`){if(f.nobracket===!0||P&&P.type===`bracket`&&P.value.length===1){G({type:`text`,value:F,output:`\\${F}`});continue}if(A.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));G({type:`text`,value:F,output:`\\${F}`});continue}W(`brackets`);let e=P.value.slice(1);if(P.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(F=`/${F}`),P.value+=F,V({value:F}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(P.value);if(A.output=A.output.slice(0,-P.value.length),f.literalBrackets===!0){A.output+=t,P.value=t;continue}P.value=`(${ee}${t}|${P.value})`,A.output+=P.value;continue}if(F===`{`&&f.nobrace!==!0){U(`braces`);let e={type:`brace`,value:F,output:`(`,outputIndex:A.output.length,tokensIndex:A.tokens.length};M.push(e),G(e);continue}if(F===`}`){let e=M[M.length-1];if(f.nobrace===!0||!e){G({type:`text`,value:F,output:F});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),A.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=A.output.slice(0,e.outputIndex),r=A.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,F=t=`\\}`,A.output=n;for(let e of r)A.output+=e.output||e.value}G({type:`brace`,value:F,output:t}),W(`braces`),M.pop();continue}if(F===`|`){j.length>0&&j[j.length-1].conditions++,G({type:`text`,value:F});continue}if(F===`,`){let e=F,t=M[M.length-1];t&&N[N.length-1]===`braces`&&(t.comma=!0,e=`|`),G({type:`comma`,value:F,output:e});continue}if(F===`/`){if(P.type===`dot`&&A.index===A.start+1){A.start=A.index+1,A.consumed=``,A.output=``,g.pop(),P=h;continue}G({type:`slash`,value:F,output:y});continue}if(F===`.`){if(A.braces>0&&P.type===`dot`){P.value===`.`&&(P.output=v);let e=M[M.length-1];P.type=`dots`,P.output+=F,P.value+=F,e.dots=!0;continue}if(A.braces+A.parens===0&&P.type!==`bos`&&P.type!==`slash`){G({type:`text`,value:F,output:v});continue}G({type:`dot`,value:F,output:v});continue}if(F===`?`){if(!(P&&P.value===`(`)&&f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){oe(`qmark`,F);continue}if(P&&P.type===`paren`){let e=L(),t=F;(P.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(z()))&&(t=`\\${F}`),G({type:`text`,value:F,output:t});continue}if(f.dot!==!0&&(P.type===`slash`||P.type===`bos`)){G({type:`qmark`,value:F,output:E});continue}G({type:`qmark`,value:F,output:T});continue}if(F===`!`){if(f.noextglob!==!0&&L()===`(`&&(L(2)!==`?`||!/[!=<:]/.test(L(3)))){oe(`negate`,F);continue}if(f.nonegate!==!0&&A.index===0){H();continue}}if(F===`+`){if(f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){oe(`plus`,F);continue}if(P&&P.value===`(`||f.regex===!1){G({type:`plus`,value:F,output:ne});continue}if(P&&(P.type===`bracket`||P.type===`paren`||P.type===`brace`)||A.parens>0){G({type:`plus`,value:F});continue}G({type:`plus`,value:ne});continue}if(F===`@`){if(f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){G({type:`at`,extglob:!0,value:F,output:``});continue}G({type:`text`,value:F});continue}if(F!==`*`){(F===`$`||F===`^`)&&(F=`\\${F}`);let e=o.exec(z());e&&(F+=e[0],A.index+=e[0].length),G({type:`text`,value:F});continue}if(P&&(P.type===`globstar`||P.star===!0)){P.type=`star`,P.star=!0,P.value+=F,P.output=k,A.backtrack=!0,A.globstar=!0,B(F);continue}let t=z();if(f.noextglob!==!0&&/^\([^?]/.test(t)){oe(`star`,F);continue}if(P.type===`star`){if(f.noglobstar===!0){B(F);continue}let n=P.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){G({type:`star`,value:F,output:``});continue}let o=A.braces>0&&(n.type===`comma`||n.type===`brace`),s=j.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){G({type:`star`,value:F,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[A.index+4];if(n&&n!==`/`)break;t=t.slice(3),B(`/**`,3)}if(n.type===`bos`&&I()){P.type=`globstar`,P.value+=F,P.output=D(f),A.output=P.output,A.globstar=!0,B(F);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&I()){A.output=A.output.slice(0,-(n.output+P.output).length),n.output=`(?:${n.output}`,P.type=`globstar`,P.output=D(f)+(f.strictSlashes?`)`:`|$)`),P.value+=F,A.globstar=!0,A.output+=n.output+P.output,B(F);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;A.output=A.output.slice(0,-(n.output+P.output).length),n.output=`(?:${n.output}`,P.type=`globstar`,P.output=`${D(f)}${y}|${y}${e})`,P.value+=F,A.output+=n.output+P.output,A.globstar=!0,B(F+R()),G({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){P.type=`globstar`,P.value+=F,P.output=`(?:^|${y}|${D(f)}${y})`,A.output=P.output,A.globstar=!0,B(F+R()),G({type:`slash`,value:`/`,output:``});continue}A.output=A.output.slice(0,-P.output.length),P.type=`globstar`,P.output=D(f),P.value+=F,A.output+=P.output,A.globstar=!0,B(F);continue}let n={type:`star`,value:F,output:k};if(f.bash===!0){n.output=`.*?`,(P.type===`bos`||P.type===`slash`)&&(n.output=O+n.output),G(n);continue}if(P&&(P.type===`bracket`||P.type===`paren`)&&f.regex===!0){n.output=F,G(n);continue}(A.index===A.start||P.type===`slash`||P.type===`dot`)&&(P.type===`dot`?(A.output+=C,P.output+=C):f.dot===!0?(A.output+=w,P.output+=w):(A.output+=O,P.output+=O),L()!==`*`&&(A.output+=b,P.output+=b)),G(n)}for(;A.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));A.output=r.escapeLast(A.output,`[`),W(`brackets`)}for(;A.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));A.output=r.escapeLast(A.output,`(`),W(`parens`)}for(;A.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));A.output=r.escapeLast(A.output,`{`),W(`braces`)}if(f.strictSlashes!==!0&&(P.type===`star`||P.type===`bracket`)&&G({type:`maybe_slash`,value:``,output:`${y}?`}),A.backtrack===!0){A.output=``;for(let e of A.tokens)A.output+=e.output==null?e.value:e.output,e.suffix&&(A.output+=e.suffix)}return A};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:ee}=n.globChars(a.windows),_=a.dot?m:p,te=a.dot?h:p,v=a.capture?``:`?:`,ne={negated:!1,prefix:``},y=a.bash===!0?`.*?`:g;a.capture&&(y=`(${y})`);let b=e=>e.noglobstar===!0?y:`(${v}(?:(?!${ee}${e.dot?f:l}).)*?)`,x=e=>{switch(e){case`*`:return`${_}${d}${y}`;case`.*`:return`${l}${d}${y}`;case`*.*`:return`${_}${y}${l}${d}${y}`;case`*/*`:return`${_}${y}${u}${d}${te}${y}`;case`**`:return _+b(a);case`**/*`:return`(?:${_}${b(a)}${u})?${te}${d}${y}`;case`**/*.*`:return`(?:${_}${b(a)}${u})?${te}${y}${l}${d}${y}`;case`**/.*`:return`(?:${_}${b(a)}${u})?${l}${d}${y}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=x(t[1]);return n?n+l+t[2]:void 0}}},S=x(r.removePrefix(e,ne));return S&&a.strictSlashes!==!0&&(S+=`${u}?`),S},t.exports=d})),Bo=y(((e,t)=>{let n=Ro(),r=zo(),i=Lo(),a=Io(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),Vo=x(y(((e,t)=>{let n=Bo(),r=Lo();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const Ho=Array.isArray,Uo=process.platform===`win32`,Wo=/^(\/?\.\.)+$/;function Go(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=Zo(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,Vo.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&Wo.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const Ko=/^[A-Z]:\/$/i,qo=Uo?e=>Ko.test(e):e=>e===`/`;function Jo(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=qo(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>u.relative(e,t)||`.`:n=>u.relative(e,`${t}/${n}`)||`.`}function Yo(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=u.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const Xo={parts:!0};function Zo(e){let t=Vo.default.scan(e,Xo);return t.parts?.length?t.parts:[e]}const Qo=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,$o=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,es=Uo?e=>e.replace($o,`\\$&`):e=>e.replace(Qo,`\\$&`);function ts(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=Vo.default.scan(e);return n.isGlob||n.negated}function ns(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const rs=/^(\/?\.\.)+/,is=/\\(?=[()[\]{}!*+?@|])/g,as=/\\/g;function os(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let s=es(n);a=o.isAbsolute(a.replace(is,``))?u.relative(s,a):u.normalize(a);let c=rs.exec(a),l=Zo(a);if(c?.[0]){let e=(c[0].length+1)/3,t=0,i=s.split(`/`);for(;t<e&&l[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+l[t+e].length+1)||`.`,t++;let o=u.join(n,c[0].slice(t*3));!o.startsWith(`.`)&&r.root.length>o.length&&(r.root=o,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=l;let e=[],t=Math.min(r.commonPath.length,l.length);for(let n=0;n<t;n++){let t=l[n];if(t===`**`&&!l[n+1]){e.pop();break}if(t!==r.commonPath[n]||ts(t)||n===l.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?u.join(n,...e):n}return a}function ss({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(os(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(os(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(os(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function cs(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function ls(e){return e?e instanceof URL?m(e).replace(as,`/`):o.resolve(e).replace(as,`/`):process.cwd().replace(as,`/`)}function us(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=ls(n.cwd);if(n.debug&&ns(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},o=ss({...n,patterns:e},r,i);n.debug&&ns(`internal processing patterns:`,o);let s={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},c=(0,Vo.default)(o.match,{...s,ignore:o.ignore}),l=(0,Vo.default)(o.ignore,s),u=Go(o.match,s),d=Jo(r,i.root,n.absolute),f=n.absolute?d:Jo(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=d(e,t),r=c(n);return r&&ns(`matched ${n}`),r}:(e,t)=>c(d(e,t))],exclude:n.debug?(e,t)=>{let n=f(t,!0),r=n!==`.`&&!u(n)||l(n);return ns(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=f(t,!0);return n!==`.`&&!u(n)||l(n)},fs:n.fs?{readdir:n.fs.readdir||a.readdir,readdirSync:n.fs.readdirSync||a.readdirSync,realpath:n.fs.realpath||a.realpath,realpathSync:n.fs.realpathSync||a.realpathSync,stat:n.fs.stat||a.stat,statSync:n.fs.statSync||a.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(as,``);let m=i.root;n.debug&&ns(`internal properties:`,i);let h=r!==m&&!n.absolute&&Yo(r,i.root);return[new Fo(p).crawl(m),h]}async function ds(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=Ho(e)||typeof e==`string`,r=n?t:e,[i,a]=us(n?e:e.patterns,r);return a?cs(await i.withPromise(),a):i.withPromise()}async function fs(t){let n=await ds(t),i=new Set;for(let t of n)try{e(r(t,`utf-8`)).forEach(e=>{i.add(e)})}catch{}return i}export{Oa as ConfigSchema,t as baseStyles,Da as configName,ka as defineConfig,fs as extractor,n as generator};
|
|
39
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Fr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Lr(t,`input`,e.processors),output:Lr(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function X(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return X(r.element,n);if(r.type===`set`)return X(r.valueType,n);if(r.type===`lazy`)return X(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return X(r.innerType,n);if(r.type===`intersection`)return X(r.left,n)||X(r.right,n);if(r.type===`record`||r.type===`map`)return X(r.keyType,n)||X(r.valueType,n);if(r.type===`pipe`)return X(r.in,n)||X(r.out,n);if(r.type===`object`){for(let e in r.shape)if(X(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(X(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(X(e,n))return!0;return!!(r.rest&&X(r.rest,n))}return!1}const Ir=(e,t={})=>n=>{let r=Nr({...n,processors:t});return Y(e,r),Pr(r,e),Fr(r,e)},Lr=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Nr({...i??{},target:a,io:t,processors:n});return Y(e,o),Pr(o,e),Fr(o,e)},Rr={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},zr=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Rr[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Br=(e,t,n,r)=>{n.type=`boolean`},Vr=(e,t,n,r)=>{n.not={}},Hr=(e,t,n,r)=>{let i=e._zod.def,a=re(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ur=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Wr=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Gr=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Y(a.element,t,{...r,path:[...r.path,`items`]})},Kr=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Y(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Y(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},qr=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Y(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Jr=(e,t,n,r)=>{let i=e._zod.def,a=Y(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Y(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Yr=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Y(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Y(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Y(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Xr=(e,t,n,r)=>{let i=e._zod.def,a=Y(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Zr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qr=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},$r=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ei=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ti=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Y(a,t,r);let o=t.seen.get(e);o.ref=a},ni=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ri=(e,t,n,r)=>{let i=e._zod.def;Y(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ii=S(`ZodISODateTime`,(e,t)=>{It.init(e,t),$.init(e,t)});function ai(e){return or(ii,e)}const oi=S(`ZodISODate`,(e,t)=>{Lt.init(e,t),$.init(e,t)});function si(e){return sr(oi,e)}const ci=S(`ZodISOTime`,(e,t)=>{Rt.init(e,t),$.init(e,t)});function li(e){return cr(ci,e)}const ui=S(`ZodISODuration`,(e,t)=>{zt.init(e,t),$.init(e,t)});function di(e){return lr(ui,e)}const fi=(e,t)=>{ye.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Se(e,t)},flatten:{value:t=>xe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ie,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ie,2)}},isEmpty:{get(){return e.issues.length===0}}})};S(`ZodError`,fi);const Z=S(`ZodError`,fi,{Parent:Error}),pi=Ce(Z),mi=we(Z),hi=Te(Z),gi=De(Z),_i=ke(Z),vi=Ae(Z),yi=je(Z),bi=Me(Z),xi=Ne(Z),Si=Pe(Z),Ci=Fe(Z),wi=Ie(Z),Q=S(`ZodType`,(e,t)=>(q.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Lr(e,`input`),output:Lr(e,`output`)}}),e.toJSONSchema=Ir(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(M(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>H(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>pi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>hi(e,t,n),e.parseAsync=async(t,n)=>mi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>gi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>_i(e,t,n),e.decode=(t,n)=>vi(e,t,n),e.encodeAsync=async(t,n)=>yi(e,t,n),e.decodeAsync=async(t,n)=>bi(e,t,n),e.safeEncode=(t,n)=>xi(e,t,n),e.safeDecode=(t,n)=>Si(e,t,n),e.safeEncodeAsync=async(t,n)=>Ci(e,t,n),e.safeDecodeAsync=async(t,n)=>wi(e,t,n),e.refine=(t,n)=>e.check(Pa(t,n)),e.superRefine=t=>e.check(Fa(t)),e.overwrite=t=>e.check(Cr(t)),e.optional=()=>ga(e),e.exactOptional=()=>va(e),e.nullable=()=>ba(e),e.nullish=()=>ga(ba(e)),e.nonoptional=t=>Ea(e,t),e.array=()=>na(e),e.or=t=>oa([e,t]),e.and=t=>ca(e,t),e.transform=t=>Aa(e,ma(t)),e.default=t=>Sa(e,t),e.prefault=t=>wa(e,t),e.catch=t=>Oa(e,t),e.pipe=t=>Aa(e,t),e.readonly=()=>Ma(e),e.describe=t=>{let n=e.clone();return In.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return In.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return In.get(e);let n=e.clone();return In.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ti=S(`_ZodString`,(e,t)=>{wt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zr(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(_r(...t)),e.includes=(...t)=>e.check(br(...t)),e.startsWith=(...t)=>e.check(xr(...t)),e.endsWith=(...t)=>e.check(Sr(...t)),e.min=(...t)=>e.check(hr(...t)),e.max=(...t)=>e.check(mr(...t)),e.length=(...t)=>e.check(gr(...t)),e.nonempty=(...t)=>e.check(hr(1,...t)),e.lowercase=t=>e.check(vr(t)),e.uppercase=t=>e.check(yr(t)),e.trim=()=>e.check(Tr()),e.normalize=(...t)=>e.check(wr(...t)),e.toLowerCase=()=>e.check(Er()),e.toUpperCase=()=>e.check(Dr()),e.slugify=()=>e.check(Or())}),Ei=S(`ZodString`,(e,t)=>{wt.init(e,t),Ti.init(e,t),e.email=t=>e.check(Rn(Oi,t)),e.url=t=>e.check(Wn(ji,t)),e.jwt=t=>e.check(ar(Ki,t)),e.emoji=t=>e.check(Gn(Mi,t)),e.guid=t=>e.check(zn(ki,t)),e.uuid=t=>e.check(Bn(Ai,t)),e.uuidv4=t=>e.check(Vn(Ai,t)),e.uuidv6=t=>e.check(Hn(Ai,t)),e.uuidv7=t=>e.check(Un(Ai,t)),e.nanoid=t=>e.check(Kn(Ni,t)),e.guid=t=>e.check(zn(ki,t)),e.cuid=t=>e.check(qn(Pi,t)),e.cuid2=t=>e.check(Jn(Fi,t)),e.ulid=t=>e.check(Yn(Ii,t)),e.base64=t=>e.check(nr(Ui,t)),e.base64url=t=>e.check(rr(Wi,t)),e.xid=t=>e.check(Xn(Li,t)),e.ksuid=t=>e.check(Zn(Ri,t)),e.ipv4=t=>e.check(Qn(zi,t)),e.ipv6=t=>e.check($n(Bi,t)),e.cidrv4=t=>e.check(er(Vi,t)),e.cidrv6=t=>e.check(tr(Hi,t)),e.e164=t=>e.check(ir(Gi,t)),e.datetime=t=>e.check(ai(t)),e.date=t=>e.check(si(t)),e.time=t=>e.check(li(t)),e.duration=t=>e.check(di(t))});function Di(e){return Ln(Ei,e)}const $=S(`ZodStringFormat`,(e,t)=>{J.init(e,t),Ti.init(e,t)}),Oi=S(`ZodEmail`,(e,t)=>{Dt.init(e,t),$.init(e,t)}),ki=S(`ZodGUID`,(e,t)=>{Tt.init(e,t),$.init(e,t)}),Ai=S(`ZodUUID`,(e,t)=>{Et.init(e,t),$.init(e,t)}),ji=S(`ZodURL`,(e,t)=>{Ot.init(e,t),$.init(e,t)}),Mi=S(`ZodEmoji`,(e,t)=>{kt.init(e,t),$.init(e,t)}),Ni=S(`ZodNanoID`,(e,t)=>{At.init(e,t),$.init(e,t)}),Pi=S(`ZodCUID`,(e,t)=>{jt.init(e,t),$.init(e,t)}),Fi=S(`ZodCUID2`,(e,t)=>{Mt.init(e,t),$.init(e,t)}),Ii=S(`ZodULID`,(e,t)=>{Nt.init(e,t),$.init(e,t)}),Li=S(`ZodXID`,(e,t)=>{Pt.init(e,t),$.init(e,t)}),Ri=S(`ZodKSUID`,(e,t)=>{Ft.init(e,t),$.init(e,t)}),zi=S(`ZodIPv4`,(e,t)=>{Bt.init(e,t),$.init(e,t)}),Bi=S(`ZodIPv6`,(e,t)=>{Vt.init(e,t),$.init(e,t)}),Vi=S(`ZodCIDRv4`,(e,t)=>{Ht.init(e,t),$.init(e,t)}),Hi=S(`ZodCIDRv6`,(e,t)=>{Ut.init(e,t),$.init(e,t)}),Ui=S(`ZodBase64`,(e,t)=>{Gt.init(e,t),$.init(e,t)}),Wi=S(`ZodBase64URL`,(e,t)=>{qt.init(e,t),$.init(e,t)}),Gi=S(`ZodE164`,(e,t)=>{Jt.init(e,t),$.init(e,t)}),Ki=S(`ZodJWT`,(e,t)=>{Xt.init(e,t),$.init(e,t)}),qi=S(`ZodBoolean`,(e,t)=>{Zt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Br(e,t,n,r)});function Ji(e){return ur(qi,e)}const Yi=S(`ZodAny`,(e,t)=>{Qt.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Xi(){return dr(Yi)}const Zi=S(`ZodUnknown`,(e,t)=>{$t.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Qi(){return fr(Zi)}const $i=S(`ZodNever`,(e,t)=>{en.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,n,r)});function ea(e){return pr($i,e)}const ta=S(`ZodArray`,(e,t)=>{nn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gr(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(hr(t,n)),e.nonempty=t=>e.check(hr(1,t)),e.max=(t,n)=>e.check(mr(t,n)),e.length=(t,n)=>e.check(gr(t,n)),e.unwrap=()=>e.element});function na(e,t){return kr(ta,e,t)}const ra=S(`ZodObject`,(e,t)=>{cn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kr(e,t,n,r),A(e,`shape`,()=>t.shape),e.keyof=()=>fa(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Qi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Qi()}),e.strict=()=>e.clone({...e._zod.def,catchall:ea()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>se(e,t),e.safeExtend=t=>ce(e,t),e.merge=t=>le(e,t),e.pick=t=>G(e,t),e.omit=t=>oe(e,t),e.partial=(...t)=>ue(ha,e,t[0]),e.required=(...t)=>de(Ta,e,t[0])});function ia(e,t){return new ra({type:`object`,shape:e??{},...U(t)})}const aa=S(`ZodUnion`,(e,t)=>{un.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qr(e,t,n,r),e.options=t.options});function oa(e,t){return new aa({type:`union`,options:e,...U(t)})}const sa=S(`ZodIntersection`,(e,t)=>{dn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jr(e,t,n,r)});function ca(e,t){return new sa({type:`intersection`,left:e,right:t})}const la=S(`ZodRecord`,(e,t)=>{mn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yr(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ua(e,t,n){return new la({type:`record`,keyType:e,valueType:t,...U(n)})}const da=S(`ZodEnum`,(e,t)=>{hn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hr(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new da({...t,checks:[],...U(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new da({...t,checks:[],...U(r),entries:i})}});function fa(e,t){return new da({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...U(t)})}const pa=S(`ZodTransform`,(e,t)=>{gn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wr(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(_e(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(_e(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function ma(e){return new pa({type:`transform`,transform:e})}const ha=S(`ZodOptional`,(e,t)=>{vn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ga(e){return new ha({type:`optional`,innerType:e})}const _a=S(`ZodExactOptional`,(e,t)=>{yn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function va(e){return new _a({type:`optional`,innerType:e})}const ya=S(`ZodNullable`,(e,t)=>{bn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ba(e){return new ya({type:`nullable`,innerType:e})}const xa=S(`ZodDefault`,(e,t)=>{xn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Sa(e,t){return new xa({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():z(t)}})}const Ca=S(`ZodPrefault`,(e,t)=>{Cn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$r(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wa(e,t){return new Ca({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():z(t)}})}const Ta=S(`ZodNonOptional`,(e,t)=>{wn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ea(e,t){return new Ta({type:`nonoptional`,innerType:e,...U(t)})}const Da=S(`ZodCatch`,(e,t)=>{En.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Oa(e,t){return new Da({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const ka=S(`ZodPipe`,(e,t)=>{Dn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ti(e,t,n,r),e.in=t.in,e.out=t.out});function Aa(e,t){return new ka({type:`pipe`,in:e,out:t})}const ja=S(`ZodReadonly`,(e,t)=>{kn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ma(e){return new ja({type:`readonly`,innerType:e})}const Na=S(`ZodCustom`,(e,t)=>{jn.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ur(e,t,n,r)});function Pa(e,t={}){return Ar(Na,e,t)}function Fa(e){return jr(e)}const Ia=`yumma.config.mjs`,La=ia({source:na(Di()).default([``]),output:Di().default(``),prefix:Di().optional(),normalize:Ji().default(!0),safelist:na(Di()).optional(),theme:ia({colors:ua(Di(),Xi()).optional(),screens:ua(Di(),Di()).optional()}).optional()});function Ra(e){return e}var za=h(import.meta.url);function Ba(e){let t=l(e);return t.length>1&&t[t.length-1]===p&&(t=t.substring(0,t.length-1)),t}const Va=/[\\/]/g;function Ha(e,t){return e.replace(Va,t)}const Ua=/^[a-z]:[\\/]$/i;function Wa(e){return e===`/`||Ua.test(e)}function Ga(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=f(e)),(r||a)&&(e=Ba(e)),e===`.`?``:Ha(e[e.length-1]===i?e:e+i,i)}function Ka(e,t){return t+e}function qa(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:Ha(d(e,r),t.pathSeparator)+t.pathSeparator+n}}function Ja(e){return e}function Ya(e,t,n){return t+e+n}function Xa(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?qa(e,t):r?Ka:Ja}function Za(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function Qa(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const $a=(e,t)=>{t.push(e||`.`)},eo=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},to=()=>{};function no(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?Qa(e):Za(e):r&&r.length?eo:$a:to}const ro=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},io=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},ao=(e,t,n,r)=>{n.files++},oo=(e,t)=>{t.push(e)},so=()=>{};function co(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?so:n&&n.length?r?ro:io:r?ao:oo}const lo=e=>e,uo=()=>[``].slice(0,0);function fo(e){return e.group?uo:lo}const po=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},mo=()=>{};function ho(e){return e.group?po:mo}const go=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&yo(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},_o=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&yo(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function vo(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?_o:go}function yo(e,t,n){if(n.options.useRealPaths)return bo(t,n);let r=c(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=c(r)}return n.symlinks.set(e,t),i>1}function bo(e,t){return t.visited.includes(e+t.options.pathSeparator)}const xo=e=>e.counts,So=e=>e.groups,Co=e=>e.paths,wo=e=>e.paths.slice(0,e.options.maxFiles),To=(e,t,n)=>(ko(t,n,e.counts,e.options.suppressErrors),null),Eo=(e,t,n)=>(ko(t,n,e.paths,e.options.suppressErrors),null),Do=(e,t,n)=>(ko(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Oo=(e,t,n)=>(ko(t,n,e.groups,e.options.suppressErrors),null);function ko(e,t,n,r){t(e&&!r?e:null,n)}function Ao(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?xo:To:r?t?So:Oo:i?t?wo:Do:t?Co:Eo}const jo={withFileTypes:!0},Mo=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,jo,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},No=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,jo)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function Po(e){return e?No:Mo}var Fo=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Io=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},Lo=class{aborted=!1;abort(){this.aborted=!0}},Ro=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Ao(t,this.isSynchronous),this.root=Ga(e,t),this.state={root:Wa(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new Io,options:t,queue:new Fo((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new Lo,fs:t.fs||i},this.joinPath=Xa(this.root,t),this.pushDirectory=no(this.root,t),this.pushFile=co(t),this.getArray=fo(t),this.groupFiles=ho(t),this.resolveSymlink=vo(t,this.isSynchronous),this.walkDirectory=Po(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:l,maxFiles:u,signal:d,useRealPaths:f,pathSeparator:p},controller:m}=this.state;if(m.aborted||d&&d.aborted||u&&r.length>u)return;let h=this.getArray(this.state.paths);for(let u=0;u<e.length;++u){let d=e[u];if(d.isFile()||d.isSymbolicLink()&&!a&&!o){let e=this.joinPath(d.name,t);this.pushFile(e,h,this.state.counts,i)}else if(d.isDirectory()){let e=Ya(d.name,t,this.state.options.pathSeparator);if(l&&l(d.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&d.isSymbolicLink()){let e=Ka(d.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=Ga(r,this.state.options),l&&l(d.name,f?r:e+p))return;this.walkDirectory(this.state,r,f?r:e+p,n-1,this.walk)}else{r=f?r:e;let t=s(r),n=Ga(c(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,h,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,h)}};function zo(e,t){return new Promise((n,r)=>{Bo(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function Bo(e,t,n){new Ro(e,t,n).start()}function Vo(e,t){return new Ro(e,t).start()}var Ho=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return zo(this.root,this.options)}withCallback(e){Bo(this.root,this.options,e)}sync(){return Vo(this.root,this.options)}};let Uo=null;try{za.resolve(`picomatch`),Uo=za(`picomatch`)}catch{}var Wo=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:p,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new Ho(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new Ho(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||Uo;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},Go=y(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),Ko=y((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Go();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),qo=y(((e,t)=>{let n=Ko(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:ee}=Go(),_=e=>e===l||e===a,te=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let v=t||{},ne=e.length-1,y=v.parts===!0||v.scanToEnd===!0,b=[],x=[],S=[],C=e,w=-1,T=0,E=0,re=!1,ie=!1,D=!1,O=!1,ae=!1,k=!1,A=!1,j=!1,M=!1,N=!1,P=0,F,I,L={value:``,depth:0,isGlob:!1},R=()=>w>=ne,z=()=>C.charCodeAt(w+1),B=()=>(F=I,C.charCodeAt(++w));for(;w<ne;){I=B();let e;if(I===a){A=L.backslashes=!0,I=B(),I===u&&(k=!0);continue}if(k===!0||I===u){for(P++;R()!==!0&&(I=B());){if(I===a){A=L.backslashes=!0,B();continue}if(I===u){P++;continue}if(k!==!0&&I===s&&(I=B())===s){if(re=L.isBrace=!0,D=L.isGlob=!0,N=!0,y===!0)continue;break}if(k!==!0&&I===o){if(re=L.isBrace=!0,D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===h&&(P--,P===0)){k=!1,re=L.isBrace=!0,N=!0;break}}if(y===!0)continue;break}if(I===l){if(b.push(w),x.push(L),L={value:``,depth:0,isGlob:!1},N===!0)continue;if(F===s&&w===T+1){T+=2;continue}E=w+1;continue}if(v.noext!==!0&&(I===p||I===i||I===r||I===m||I===c)&&z()===d){if(D=L.isGlob=!0,O=L.isExtglob=!0,N=!0,I===c&&w===T&&(M=!0),y===!0){for(;R()!==!0&&(I=B());){if(I===a){A=L.backslashes=!0,I=B();continue}if(I===g){D=L.isGlob=!0,N=!0;break}}continue}break}if(I===r){if(F===r&&(ae=L.isGlobstar=!0),D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===m){if(D=L.isGlob=!0,N=!0,y===!0)continue;break}if(I===f){for(;R()!==!0&&(e=B());){if(e===a){A=L.backslashes=!0,B();continue}if(e===ee){ie=L.isBracket=!0,D=L.isGlob=!0,N=!0;break}}if(y===!0)continue;break}if(v.nonegate!==!0&&I===c&&w===T){j=L.negated=!0,T++;continue}if(v.noparen!==!0&&I===d){if(D=L.isGlob=!0,y===!0){for(;R()!==!0&&(I=B());){if(I===d){A=L.backslashes=!0,I=B();continue}if(I===g){N=!0;break}}continue}break}if(D===!0){if(N=!0,y===!0)continue;break}}v.noext===!0&&(O=!1,D=!1);let V=C,H=``,U=``;T>0&&(H=C.slice(0,T),C=C.slice(T),E-=T),V&&D===!0&&E>0?(V=C.slice(0,E),U=C.slice(E)):D===!0?(V=``,U=C):V=C,V&&V!==``&&V!==`/`&&V!==C&&_(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),v.unescape===!0&&(U&&=n.removeBackslashes(U),V&&A===!0&&(V=n.removeBackslashes(V)));let W={prefix:H,input:e,start:T,base:V,glob:U,isBrace:re,isBracket:ie,isGlob:D,isExtglob:O,isGlobstar:ae,negated:j,negatedExtglob:M};if(v.tokens===!0&&(W.maxDepth=0,_(I)||x.push(L),W.tokens=x),v.parts===!0||v.tokens===!0){let t;for(let n=0;n<b.length;n++){let r=t?t+1:T,i=b[n],a=e.slice(r,i);v.tokens&&(n===0&&T!==0?(x[n].isPrefix=!0,x[n].value=H):x[n].value=a,te(x[n]),W.maxDepth+=x[n].depth),(n!==0||a!==``)&&S.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);S.push(n),v.tokens&&(x[x.length-1].value=n,te(x[x.length-1]),W.maxDepth+=x[x.length-1].depth)}W.slashes=b,W.parts=S}return W}})),Jo=y(((e,t)=>{let n=Go(),r=Ko(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],ee=f.capture?``:`?:`,_=n.globChars(f.windows),te=n.extglobChars(_),{DOT_LITERAL:v,PLUS_LITERAL:ne,SLASH_LITERAL:y,ONE_CHAR:b,DOTS_SLASH:x,NO_DOT:S,NO_DOT_SLASH:C,NO_DOTS_SLASH:w,QMARK:T,QMARK_NO_DOT:E,STAR:re,START_ANCHOR:ie}=_,D=e=>`(${ee}(?:(?!${ie}${e.dot?x:v}).)*?)`,O=f.dot?``:S,ae=f.dot?T:E,k=f.bash===!0?D(f):re;f.capture&&(k=`(${k})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let A={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,A),m=e.length;let j=[],M=[],N=[],P=h,F,I=()=>A.index===m-1,L=A.peek=(t=1)=>e[A.index+t],R=A.advance=()=>e[++A.index]||``,z=()=>e.slice(A.index+1),B=(e=``,t=0)=>{A.consumed+=e,A.index+=t},V=e=>{A.output+=e.output==null?e.value:e.output,B(e.value)},H=()=>{let e=1;for(;L()===`!`&&(L(2)!==`(`||L(3)===`?`);)R(),A.start++,e++;return e%2==0?!1:(A.negated=!0,A.start++,!0)},U=e=>{A[e]++,N.push(e)},W=e=>{A[e]--,N.pop()},G=e=>{if(P.type===`globstar`){let t=A.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||j.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(A.output=A.output.slice(0,-P.output.length),P.type=`star`,P.value=`*`,P.output=k,A.output+=P.output)}if(j.length&&e.type!==`paren`&&(j[j.length-1].inner+=e.value),(e.value||e.output)&&V(e),P&&P.type===`text`&&e.type===`text`){P.output=(P.output||P.value)+e.value,P.value+=e.value;return}e.prev=P,g.push(e),P=e},oe=(e,t)=>{let n={...te[t],conditions:1,inner:``};n.prev=P,n.parens=A.parens,n.output=A.output;let r=(f.capture?`(`:``)+n.open;U(`parens`),G({type:e,value:t,output:A.output?``:b}),G({type:`paren`,extglob:!0,value:R(),output:r}),j.push(n)},se=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=k;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=D(f)),(i!==k||I()||/^\)+$/.test(z()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=z())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(A.negatedExtglob=!0)}G({type:`paren`,extglob:!0,value:F,output:n}),W(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?T.repeat(a.length):``):o===0?ae+(a?T.repeat(a.length):``):T.repeat(r.length):i===`.`?v.repeat(r.length):i===`*`?t?t+i+(a?k:``):k:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(A.output=e,A):(A.output=r.wrapOutput(i,A,t),A)}for(;!I();){if(F=R(),F===`\0`)continue;if(F===`\\`){let e=L();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){F+=`\\`,G({type:`text`,value:F});continue}let t=/^\\+/.exec(z()),n=0;if(t&&t[0].length>2&&(n=t[0].length,A.index+=n,n%2!=0&&(F+=`\\`)),f.unescape===!0?F=R():F+=R(),A.brackets===0){G({type:`text`,value:F});continue}}if(A.brackets>0&&(F!==`]`||P.value===`[`||P.value===`[^`)){if(f.posix!==!1&&F===`:`){let e=P.value.slice(1);if(e.includes(`[`)&&(P.posix=!0,e.includes(`:`))){let e=P.value.lastIndexOf(`[`),t=P.value.slice(0,e),n=a[P.value.slice(e+2)];if(n){P.value=t+n,A.backtrack=!0,R(),!h.output&&g.indexOf(P)===1&&(h.output=b);continue}}}(F===`[`&&L()!==`:`||F===`-`&&L()===`]`)&&(F=`\\${F}`),F===`]`&&(P.value===`[`||P.value===`[^`)&&(F=`\\${F}`),f.posix===!0&&F===`!`&&P.value===`[`&&(F=`^`),P.value+=F,V({value:F});continue}if(A.quotes===1&&F!==`"`){F=r.escapeRegex(F),P.value+=F,V({value:F});continue}if(F===`"`){A.quotes=A.quotes===1?0:1,f.keepQuotes===!0&&G({type:`text`,value:F});continue}if(F===`(`){U(`parens`),G({type:`paren`,value:F});continue}if(F===`)`){if(A.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=j[j.length-1];if(e&&A.parens===e.parens+1){se(j.pop());continue}G({type:`paren`,value:F,output:A.parens?`)`:`\\)`}),W(`parens`);continue}if(F===`[`){if(f.nobracket===!0||!z().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));F=`\\${F}`}else U(`brackets`);G({type:`bracket`,value:F});continue}if(F===`]`){if(f.nobracket===!0||P&&P.type===`bracket`&&P.value.length===1){G({type:`text`,value:F,output:`\\${F}`});continue}if(A.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));G({type:`text`,value:F,output:`\\${F}`});continue}W(`brackets`);let e=P.value.slice(1);if(P.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(F=`/${F}`),P.value+=F,V({value:F}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(P.value);if(A.output=A.output.slice(0,-P.value.length),f.literalBrackets===!0){A.output+=t,P.value=t;continue}P.value=`(${ee}${t}|${P.value})`,A.output+=P.value;continue}if(F===`{`&&f.nobrace!==!0){U(`braces`);let e={type:`brace`,value:F,output:`(`,outputIndex:A.output.length,tokensIndex:A.tokens.length};M.push(e),G(e);continue}if(F===`}`){let e=M[M.length-1];if(f.nobrace===!0||!e){G({type:`text`,value:F,output:F});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),A.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=A.output.slice(0,e.outputIndex),r=A.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,F=t=`\\}`,A.output=n;for(let e of r)A.output+=e.output||e.value}G({type:`brace`,value:F,output:t}),W(`braces`),M.pop();continue}if(F===`|`){j.length>0&&j[j.length-1].conditions++,G({type:`text`,value:F});continue}if(F===`,`){let e=F,t=M[M.length-1];t&&N[N.length-1]===`braces`&&(t.comma=!0,e=`|`),G({type:`comma`,value:F,output:e});continue}if(F===`/`){if(P.type===`dot`&&A.index===A.start+1){A.start=A.index+1,A.consumed=``,A.output=``,g.pop(),P=h;continue}G({type:`slash`,value:F,output:y});continue}if(F===`.`){if(A.braces>0&&P.type===`dot`){P.value===`.`&&(P.output=v);let e=M[M.length-1];P.type=`dots`,P.output+=F,P.value+=F,e.dots=!0;continue}if(A.braces+A.parens===0&&P.type!==`bos`&&P.type!==`slash`){G({type:`text`,value:F,output:v});continue}G({type:`dot`,value:F,output:v});continue}if(F===`?`){if(!(P&&P.value===`(`)&&f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){oe(`qmark`,F);continue}if(P&&P.type===`paren`){let e=L(),t=F;(P.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(z()))&&(t=`\\${F}`),G({type:`text`,value:F,output:t});continue}if(f.dot!==!0&&(P.type===`slash`||P.type===`bos`)){G({type:`qmark`,value:F,output:E});continue}G({type:`qmark`,value:F,output:T});continue}if(F===`!`){if(f.noextglob!==!0&&L()===`(`&&(L(2)!==`?`||!/[!=<:]/.test(L(3)))){oe(`negate`,F);continue}if(f.nonegate!==!0&&A.index===0){H();continue}}if(F===`+`){if(f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){oe(`plus`,F);continue}if(P&&P.value===`(`||f.regex===!1){G({type:`plus`,value:F,output:ne});continue}if(P&&(P.type===`bracket`||P.type===`paren`||P.type===`brace`)||A.parens>0){G({type:`plus`,value:F});continue}G({type:`plus`,value:ne});continue}if(F===`@`){if(f.noextglob!==!0&&L()===`(`&&L(2)!==`?`){G({type:`at`,extglob:!0,value:F,output:``});continue}G({type:`text`,value:F});continue}if(F!==`*`){(F===`$`||F===`^`)&&(F=`\\${F}`);let e=o.exec(z());e&&(F+=e[0],A.index+=e[0].length),G({type:`text`,value:F});continue}if(P&&(P.type===`globstar`||P.star===!0)){P.type=`star`,P.star=!0,P.value+=F,P.output=k,A.backtrack=!0,A.globstar=!0,B(F);continue}let t=z();if(f.noextglob!==!0&&/^\([^?]/.test(t)){oe(`star`,F);continue}if(P.type===`star`){if(f.noglobstar===!0){B(F);continue}let n=P.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){G({type:`star`,value:F,output:``});continue}let o=A.braces>0&&(n.type===`comma`||n.type===`brace`),s=j.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){G({type:`star`,value:F,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[A.index+4];if(n&&n!==`/`)break;t=t.slice(3),B(`/**`,3)}if(n.type===`bos`&&I()){P.type=`globstar`,P.value+=F,P.output=D(f),A.output=P.output,A.globstar=!0,B(F);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&I()){A.output=A.output.slice(0,-(n.output+P.output).length),n.output=`(?:${n.output}`,P.type=`globstar`,P.output=D(f)+(f.strictSlashes?`)`:`|$)`),P.value+=F,A.globstar=!0,A.output+=n.output+P.output,B(F);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;A.output=A.output.slice(0,-(n.output+P.output).length),n.output=`(?:${n.output}`,P.type=`globstar`,P.output=`${D(f)}${y}|${y}${e})`,P.value+=F,A.output+=n.output+P.output,A.globstar=!0,B(F+R()),G({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){P.type=`globstar`,P.value+=F,P.output=`(?:^|${y}|${D(f)}${y})`,A.output=P.output,A.globstar=!0,B(F+R()),G({type:`slash`,value:`/`,output:``});continue}A.output=A.output.slice(0,-P.output.length),P.type=`globstar`,P.output=D(f),P.value+=F,A.output+=P.output,A.globstar=!0,B(F);continue}let n={type:`star`,value:F,output:k};if(f.bash===!0){n.output=`.*?`,(P.type===`bos`||P.type===`slash`)&&(n.output=O+n.output),G(n);continue}if(P&&(P.type===`bracket`||P.type===`paren`)&&f.regex===!0){n.output=F,G(n);continue}(A.index===A.start||P.type===`slash`||P.type===`dot`)&&(P.type===`dot`?(A.output+=C,P.output+=C):f.dot===!0?(A.output+=w,P.output+=w):(A.output+=O,P.output+=O),L()!==`*`&&(A.output+=b,P.output+=b)),G(n)}for(;A.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));A.output=r.escapeLast(A.output,`[`),W(`brackets`)}for(;A.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));A.output=r.escapeLast(A.output,`(`),W(`parens`)}for(;A.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));A.output=r.escapeLast(A.output,`{`),W(`braces`)}if(f.strictSlashes!==!0&&(P.type===`star`||P.type===`bracket`)&&G({type:`maybe_slash`,value:``,output:`${y}?`}),A.backtrack===!0){A.output=``;for(let e of A.tokens)A.output+=e.output==null?e.value:e.output,e.suffix&&(A.output+=e.suffix)}return A};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:ee}=n.globChars(a.windows),_=a.dot?m:p,te=a.dot?h:p,v=a.capture?``:`?:`,ne={negated:!1,prefix:``},y=a.bash===!0?`.*?`:g;a.capture&&(y=`(${y})`);let b=e=>e.noglobstar===!0?y:`(${v}(?:(?!${ee}${e.dot?f:l}).)*?)`,x=e=>{switch(e){case`*`:return`${_}${d}${y}`;case`.*`:return`${l}${d}${y}`;case`*.*`:return`${_}${y}${l}${d}${y}`;case`*/*`:return`${_}${y}${u}${d}${te}${y}`;case`**`:return _+b(a);case`**/*`:return`(?:${_}${b(a)}${u})?${te}${d}${y}`;case`**/*.*`:return`(?:${_}${b(a)}${u})?${te}${y}${l}${d}${y}`;case`**/.*`:return`(?:${_}${b(a)}${u})?${l}${d}${y}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=x(t[1]);return n?n+l+t[2]:void 0}}},S=x(r.removePrefix(e,ne));return S&&a.strictSlashes!==!0&&(S+=`${u}?`),S},t.exports=d})),Yo=y(((e,t)=>{let n=qo(),r=Jo(),i=Ko(),a=Go(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),Xo=x(y(((e,t)=>{let n=Yo(),r=Ko();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const Zo=Array.isArray,Qo=process.platform===`win32`,$o=/^(\/?\.\.)+$/;function es(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=os(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,Xo.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&$o.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const ts=/^[A-Z]:\/$/i,ns=Qo?e=>ts.test(e):e=>e===`/`;function rs(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=ns(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>u.relative(e,t)||`.`:n=>u.relative(e,`${t}/${n}`)||`.`}function is(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=u.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const as={parts:!0};function os(e){let t=Xo.default.scan(e,as);return t.parts?.length?t.parts:[e]}const ss=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,cs=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,ls=Qo?e=>e.replace(cs,`\\$&`):e=>e.replace(ss,`\\$&`);function us(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=Xo.default.scan(e);return n.isGlob||n.negated}function ds(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const fs=/^(\/?\.\.)+/,ps=/\\(?=[()[\]{}!*+?@|])/g,ms=/\\/g;function hs(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let s=ls(n);a=o.isAbsolute(a.replace(ps,``))?u.relative(s,a):u.normalize(a);let c=fs.exec(a),l=os(a);if(c?.[0]){let e=(c[0].length+1)/3,t=0,i=s.split(`/`);for(;t<e&&l[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+l[t+e].length+1)||`.`,t++;let o=u.join(n,c[0].slice(t*3));!o.startsWith(`.`)&&r.root.length>o.length&&(r.root=o,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=l;let e=[],t=Math.min(r.commonPath.length,l.length);for(let n=0;n<t;n++){let t=l[n];if(t===`**`&&!l[n+1]){e.pop();break}if(t!==r.commonPath[n]||us(t)||n===l.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?u.join(n,...e):n}return a}function gs({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(hs(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(hs(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(hs(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function _s(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function vs(e){return e?e instanceof URL?m(e).replace(ms,`/`):o.resolve(e).replace(ms,`/`):process.cwd().replace(ms,`/`)}function ys(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=vs(n.cwd);if(n.debug&&ds(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},o=gs({...n,patterns:e},r,i);n.debug&&ds(`internal processing patterns:`,o);let s={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},c=(0,Xo.default)(o.match,{...s,ignore:o.ignore}),l=(0,Xo.default)(o.ignore,s),u=es(o.match,s),d=rs(r,i.root,n.absolute),f=n.absolute?d:rs(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=d(e,t),r=c(n);return r&&ds(`matched ${n}`),r}:(e,t)=>c(d(e,t))],exclude:n.debug?(e,t)=>{let n=f(t,!0),r=n!==`.`&&!u(n)||l(n);return ds(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=f(t,!0);return n!==`.`&&!u(n)||l(n)},fs:n.fs?{readdir:n.fs.readdir||a.readdir,readdirSync:n.fs.readdirSync||a.readdirSync,realpath:n.fs.realpath||a.realpath,realpathSync:n.fs.realpathSync||a.realpathSync,stat:n.fs.stat||a.stat,statSync:n.fs.statSync||a.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(ms,``);let m=i.root;n.debug&&ds(`internal properties:`,i);let h=r!==m&&!n.absolute&&is(r,i.root);return[new Wo(p).crawl(m),h]}async function bs(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=Zo(e)||typeof e==`string`,r=n?t:e,[i,a]=ys(n?e:e.patterns,r);return a?_s(await i.withPromise(),a):i.withPromise()}async function xs(t){let n=await bs(t),i=new Set;for(let t of n)try{e(r(t,`utf-8`)).forEach(e=>{i.add(e)})}catch{}return i}export{La as ConfigSchema,t as baseStyles,Ia as configName,Ra as defineConfig,xs as extractor,n as generator};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yummacss/nitro",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "Fast CSS generation for Yumma CSS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@yummacss/core": "3.
|
|
35
|
+
"@yummacss/core": "3.21.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"tinyglobby": "^0.2.15",
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import{coreUtils as e}from"@yummacss/core";const t=`*, :before, :after {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
border: 0 solid;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
* {
|
|
7
|
-
margin: 0;
|
|
8
|
-
padding: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
html {
|
|
12
|
-
font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
body {
|
|
16
|
-
-webkit-font-smoothing: antialiased;
|
|
17
|
-
font-family: inherit;
|
|
18
|
-
line-height: 1.5;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
canvas, img, picture, svg, video {
|
|
22
|
-
max-width: 100%;
|
|
23
|
-
display: block;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
button, input, optgroup, select, textarea {
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
padding: .5rem;
|
|
29
|
-
font-family: inherit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
button:not([class]), input:not([class]), optgroup:not([class]), select:not([class]), textarea:not([class]) {
|
|
33
|
-
border: 1px solid #bfc2c7;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:is(a, button, input, select, summary, textarea):focus {
|
|
37
|
-
outline: 2px solid transparent;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
textarea:not([rows]) {
|
|
41
|
-
min-height: 10em;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
button {
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
button:disabled, input:disabled, select:disabled, textarea:disabled {
|
|
49
|
-
cursor: not-allowed;
|
|
50
|
-
opacity: .5;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
h1, h2, h3, h4, h5, h6, p {
|
|
54
|
-
overflow-wrap: break-word;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
h1, h2, h3, h4, h5, h6 {
|
|
58
|
-
text-wrap: balance;
|
|
59
|
-
font-size: 1rem;
|
|
60
|
-
font-weight: 600;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
p {
|
|
64
|
-
text-wrap: pretty;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
b, strong {
|
|
68
|
-
font-weight: 700;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
small {
|
|
72
|
-
font-size: 80%;
|
|
73
|
-
line-height: 1.4;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
pre, code, kbd, samp {
|
|
77
|
-
font-family: monospace;
|
|
78
|
-
font-size: 1em;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
a {
|
|
82
|
-
color: inherit;
|
|
83
|
-
text-decoration: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
ol, ul {
|
|
87
|
-
padding: 0;
|
|
88
|
-
list-style: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
th {
|
|
92
|
-
font-size: 1rem;
|
|
93
|
-
font-weight: 600;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
hr {
|
|
97
|
-
border-top: 1px solid #bfc2c7;
|
|
98
|
-
height: 0;
|
|
99
|
-
margin: 1em 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
details {
|
|
103
|
-
display: block;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
summary {
|
|
107
|
-
display: list-item;
|
|
108
|
-
}
|
|
109
|
-
`;function n(e){let t=new Set,n=[/class(?:Name)?=["']([^"']+)["']/g,/class(?:Name)?=\{["']([^"']+)["']\}/g,/class(?:Name)?=\{`([^`]+)`\}/g],r=[/`([^`]+)`/g,/"([^"]+)"/g,/'([^']+)'/g],i=[/cva\s*\(\s*["'`]([^"'`]+)["'`]/g,/:\s*["'`]([^"'`]+)["'`]/g],a=[/\bcn\s*\(\s*["'`]([^"'`]+)["'`]/g,/\bcn\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],o=[/clsx\s*\(\s*["'`]([^"'`]+)["'`]/g,/classnames\s*\(\s*["'`]([^"'`]+)["'`]/g,/clsx\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g,/classnames\s*\(\s*\{\s*["'`]([^"'`]+)["'`]\s*:/g],s=[...n,...r,...i,...a,...o];for(let n of s){let r;for(r=n.exec(e);r!==null;){let i=r[1];i&&i.split(/\s+/).filter(e=>e&&/^[a-z]/.test(e)&&e.includes(`-`)).forEach(e=>{t.add(e)}),r=n.exec(e)}}return Array.from(t)}function r(e,n){let r=[];n.buildOptions.reset&&r.push(t);let a=i(e);return a&&r.push(a),r.join(`
|
|
110
|
-
|
|
111
|
-
`)}function i(t){let n=e(),r=[],i=new Map,a=new Set,o=Array.from(t).sort();for(let e of o){if(a.has(e))continue;let t=s(e,n);if(t){if(t.mediaQuery){let e=i.get(t.mediaQuery)||[];e.push(t.rule),i.set(t.mediaQuery,e)}else r.push(t.rule);a.add(e)}}let c=Array.from(i.entries()).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of c){let n=t.map(e=>e.replace(/^/gm,` `)).join(`
|
|
112
|
-
|
|
113
|
-
`);r.push(`${e} {\n${n}\n}`)}return r.join(`
|
|
114
|
-
|
|
115
|
-
`)}function a(e,t){let{properties:n,variants:r,prefix:i,values:a}=t,s=e,c,l=``,u=``,d=``,f=!0;for(;f;){if(f=!1,r?.containerQueries){for(let e of r.containerQueries)if(s.startsWith(`${e.prefix}:`)){c=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}if(!f){if(r?.mediaQueries){for(let e of r.mediaQueries)if(s.startsWith(`${e.prefix}:`)){c=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}if(!f){if(r?.pseudoElements){for(let e of r.pseudoElements)if(s.startsWith(`${e.prefix}::`)){u+=e.value,s=s.slice(e.prefix.length+2),f=!0;break}}if(!f&&r?.pseudoClasses){for(let e of r.pseudoClasses)if(s.startsWith(`${e.prefix}:`)&&!s.startsWith(`${e.prefix}::`)){l+=e.value,s=s.slice(e.prefix.length+1),f=!0;break}}}}}if(r?.opacity){for(let e of r.opacity)if(s.endsWith(`/${e.prefix}`)){d=e.value,s=s.slice(0,-(e.prefix.length+1));break}}if(!s.startsWith(`${i}-`)&&s!==i)return null;let p=s===i?``:s.slice(i.length+1),m=!1,h=p;p.startsWith(`-`)&&(m=!0,h=p.slice(1));let g=a[h===``?`base`:h]||a[h];if(!g)return null;let _=g;m&&/^-?[\d.]/.test(g)&&(_=g.startsWith(`-`)?g.slice(1):`-${g}`);let v=d&&_.startsWith(`#`)&&_.length===7?`${_}${d}`:_,y=n.map(e=>`${e}: ${v};`).join(`
|
|
116
|
-
`);return{rule:`.${o(e)}${l}${u} {\n ${y}\n}`,mediaQuery:c}}function o(e){return e.replace(/:/g,`\\:`).replace(/\//g,`\\/`).replace(/@/g,`\\@`)}function s(e,t){for(let[n,r]of Object.entries(t)){let t=a(e,r);if(t)return t}return null}export{n,t as r,r as t};
|