@kozou/svelte-ui 0.1.0 → 0.1.1
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/README.md +4 -5
- package/build/client/_app/immutable/assets/0.CZsFVllx.css +2 -0
- package/build/client/_app/immutable/assets/0.CZsFVllx.css.br +0 -0
- package/build/client/_app/immutable/assets/0.CZsFVllx.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{D4orYVgu.js → C4vVozd5.js} +2 -2
- package/build/client/_app/immutable/chunks/C4vVozd5.js.br +0 -0
- package/build/client/_app/immutable/chunks/C4vVozd5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dq0SIjgq.js → Cu9GwMht.js} +1 -1
- package/build/client/_app/immutable/chunks/Cu9GwMht.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cu9GwMht.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DdEzykkf.js → DQLVkJ9E.js} +1 -1
- package/build/client/_app/immutable/chunks/DQLVkJ9E.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQLVkJ9E.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.B2E2jsYG.js → app.D4C-SzYE.js} +2 -2
- package/build/client/_app/immutable/entry/app.D4C-SzYE.js.br +0 -0
- package/build/client/_app/immutable/entry/app.D4C-SzYE.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BgPykZWX.js +1 -0
- package/build/client/_app/immutable/entry/start.BgPykZWX.js.br +0 -0
- package/build/client/_app/immutable/entry/start.BgPykZWX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.9-mDK_1B.js → 1.ByzpIkVa.js} +1 -1
- package/build/client/_app/immutable/nodes/1.ByzpIkVa.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.ByzpIkVa.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.hHssvcSO.js +1 -0
- package/build/client/_app/immutable/nodes/4.hHssvcSO.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.hHssvcSO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.U1CG0AZz.js → 5.CfrPDIy5.js} +1 -1
- package/build/client/_app/immutable/nodes/5.CfrPDIy5.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CfrPDIy5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.BqfsXcpL.js → 6.nxvsG8yx.js} +1 -1
- package/build/client/_app/immutable/nodes/6.nxvsG8yx.js.br +3 -0
- package/build/client/_app/immutable/nodes/6.nxvsG8yx.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-Cpki24QE.js → 0-BFDPzvW-.js} +4 -4
- package/build/server/chunks/{0-Cpki24QE.js.map → 0-BFDPzvW-.js.map} +1 -1
- package/build/server/chunks/{1-C_Zl16E8.js → 1-Dmzzx_Xf.js} +3 -3
- package/build/server/chunks/{1-C_Zl16E8.js.map → 1-Dmzzx_Xf.js.map} +1 -1
- package/build/server/chunks/{2-Bb7ROZP0.js → 2-B1IcZygX.js} +2 -2
- package/build/server/chunks/{2-Bb7ROZP0.js.map → 2-B1IcZygX.js.map} +1 -1
- package/build/server/chunks/{3-dXQmFZGn.js → 3-BVIqnkRy.js} +3 -4
- package/build/server/chunks/3-BVIqnkRy.js.map +1 -0
- package/build/server/chunks/4-BeHrsGek.js +103 -0
- package/build/server/chunks/4-BeHrsGek.js.map +1 -0
- package/build/server/chunks/{5-CKRn1yVS.js → 5-Cw01QEjm.js} +10 -10
- package/build/server/chunks/5-Cw01QEjm.js.map +1 -0
- package/build/server/chunks/{6-C7PGuXlN.js → 6-DdCU04G4.js} +10 -10
- package/build/server/chunks/6-DdCU04G4.js.map +1 -0
- package/build/server/chunks/{7-BtKcX-UD.js → 7-BJeosbkA.js} +2 -2
- package/build/server/chunks/{7-BtKcX-UD.js.map → 7-BJeosbkA.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-DcwZs9VT.js → _layout.svelte-ClzaQTuQ.js} +2 -2
- package/build/server/chunks/{_layout.svelte-DcwZs9VT.js.map → _layout.svelte-ClzaQTuQ.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BpS5HgaB.js → _page.svelte-B8Bnkzob.js} +2 -2
- package/build/server/chunks/{_page.svelte-BpS5HgaB.js.map → _page.svelte-B8Bnkzob.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BywGr3Tk.js → _page.svelte-BN1au56r.js} +2 -2
- package/build/server/chunks/{_page.svelte-BywGr3Tk.js.map → _page.svelte-BN1au56r.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Dfaz3pC_.js → _page.svelte-Bu4SlGir.js} +2 -2
- package/build/server/chunks/{_page.svelte-Dfaz3pC_.js.map → _page.svelte-Bu4SlGir.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-69okwN_x.js → _page.svelte-DHhstcmi.js} +8 -8
- package/build/server/chunks/{_page.svelte-69okwN_x.js.map → _page.svelte-DHhstcmi.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-7DhzytBp.js → _page.svelte-DKhYDtNl.js} +11 -4
- package/build/server/chunks/_page.svelte-DKhYDtNl.js.map +1 -0
- package/build/server/chunks/{_page.svelte-ClFWSFQK.js → _page.svelte-DYlwwhHn.js} +8 -8
- package/build/server/chunks/{_page.svelte-ClFWSFQK.js.map → _page.svelte-DYlwwhHn.js.map} +1 -1
- package/build/server/chunks/{app-C1bzfcjj.js → app-DST8OmzT.js} +2 -2
- package/build/server/chunks/{app-C1bzfcjj.js.map → app-DST8OmzT.js.map} +1 -1
- package/build/server/chunks/{client-nr13Vsqj.js → client-Bcpj9QFB.js} +4 -4
- package/build/server/chunks/{client-nr13Vsqj.js.map → client-Bcpj9QFB.js.map} +1 -1
- package/build/server/chunks/{dev-yRSoS_kM.js → dev-yFiAtg5l.js} +29 -29
- package/build/server/chunks/{dev-yRSoS_kM.js.map → dev-yFiAtg5l.js.map} +1 -1
- package/build/server/chunks/{error.svelte-B8LolEv3.js → error.svelte-1lnafu4q.js} +7 -7
- package/build/server/chunks/{error.svelte-B8LolEv3.js.map → error.svelte-1lnafu4q.js.map} +1 -1
- package/build/server/chunks/{hooks.server-BgTiHdgV.js → hooks.server-BBW_dqIs.js} +13051 -10697
- package/build/server/chunks/hooks.server-BBW_dqIs.js.map +1 -0
- package/build/server/chunks/index-5kYmxIr9.js.map +1 -1
- package/build/server/chunks/index-DBqjc0Yf.js.map +1 -1
- package/build/server/chunks/{internal-Dtmf8fV4.js → internal-BrzrGF6g.js} +22 -24
- package/build/server/chunks/internal-BrzrGF6g.js.map +1 -0
- package/build/server/chunks/{widget-registry-Bfc0OPDn.js → widget-registry-CYJ6dCZP.js} +2 -2
- package/build/server/chunks/{widget-registry-Bfc0OPDn.js.map → widget-registry-CYJ6dCZP.js.map} +1 -1
- package/build/server/chunks/{zod-from-table-HRMJdgEv.js → zod-from-table-Cqu9YCfY.js} +120 -1133
- package/build/server/chunks/zod-from-table-Cqu9YCfY.js.map +1 -0
- package/build/server/index.js +32 -32
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +9 -9
- package/build/server/manifest.js.map +1 -1
- package/package.json +12 -6
- package/build/client/_app/immutable/assets/0.Cg4B63gQ.css +0 -2
- package/build/client/_app/immutable/assets/0.Cg4B63gQ.css.br +0 -0
- package/build/client/_app/immutable/assets/0.Cg4B63gQ.css.gz +0 -0
- package/build/client/_app/immutable/chunks/D4orYVgu.js.br +0 -0
- package/build/client/_app/immutable/chunks/D4orYVgu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DdEzykkf.js.br +0 -0
- package/build/client/_app/immutable/chunks/DdEzykkf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dq0SIjgq.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dq0SIjgq.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.B2E2jsYG.js.br +0 -0
- package/build/client/_app/immutable/entry/app.B2E2jsYG.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Ccv3-hR2.js +0 -1
- package/build/client/_app/immutable/entry/start.Ccv3-hR2.js.br +0 -0
- package/build/client/_app/immutable/entry/start.Ccv3-hR2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.9-mDK_1B.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.9-mDK_1B.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.D1ErMjLn.js +0 -1
- package/build/client/_app/immutable/nodes/4.D1ErMjLn.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.D1ErMjLn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.U1CG0AZz.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.U1CG0AZz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BqfsXcpL.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BqfsXcpL.js.gz +0 -0
- package/build/server/chunks/3-dXQmFZGn.js.map +0 -1
- package/build/server/chunks/4-Dn5qQ29L.js +0 -54
- package/build/server/chunks/4-Dn5qQ29L.js.map +0 -1
- package/build/server/chunks/5-CKRn1yVS.js.map +0 -1
- package/build/server/chunks/6-C7PGuXlN.js.map +0 -1
- package/build/server/chunks/_page.svelte-7DhzytBp.js.map +0 -1
- package/build/server/chunks/hooks.server-BgTiHdgV.js.map +0 -1
- package/build/server/chunks/internal-Dtmf8fV4.js.map +0 -1
- package/build/server/chunks/zod-from-table-HRMJdgEv.js.map +0 -1
- /package/build/client/_app/immutable/nodes/{0.C77vZJGR.js → 0.Ct90k1ZK.js} +0 -0
- /package/build/client/_app/immutable/nodes/{0.C77vZJGR.js.br → 0.Ct90k1ZK.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{0.C77vZJGR.js.gz → 0.Ct90k1ZK.js.gz} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as get$1, ad as writable, n as derived$1, Y as readonly, x as getContext } from './dev-
|
|
3
|
-
import { i as invalidateAll, b as applyAction, a as afterNavigate } from './client-
|
|
4
|
-
import { a as app } from './app-
|
|
1
|
+
import { y as noop, G as parse, C as onDestroy, X as tick, S as stringify$1, c as __toESM, _ as __commonJSMin, a as __exportAll } from './internal-BrzrGF6g.js';
|
|
2
|
+
import { u as get$1, ad as writable, n as derived$1, Y as readonly, x as getContext } from './dev-yFiAtg5l.js';
|
|
3
|
+
import { i as invalidateAll, b as applyAction, a as afterNavigate } from './client-Bcpj9QFB.js';
|
|
4
|
+
import { a as app } from './app-DST8OmzT.js';
|
|
5
5
|
import './index-5kYmxIr9.js';
|
|
6
|
-
import {
|
|
6
|
+
import { toJSONSchema, config, safeParseAsync } from 'zod/v4/core';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/app/forms.js
|
|
10
10
|
/**
|
|
11
11
|
* Use this function to deserialize the response from a form submission.
|
|
12
12
|
* Usage:
|
|
@@ -148,7 +148,7 @@ function enhance(form_element, submit = noop) {
|
|
|
148
148
|
} };
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.
|
|
151
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/app/stores.js
|
|
152
152
|
/**
|
|
153
153
|
* A function that returns all of the contextual stores. On the server, this must be called during component initialization.
|
|
154
154
|
* Only use this if you need to defer store subscription until after the component has mounted, for some reason.
|
|
@@ -191,7 +191,7 @@ var navigating = { subscribe(fn) {
|
|
|
191
191
|
return getStores().navigating.subscribe(fn);
|
|
192
192
|
} };
|
|
193
193
|
//#endregion
|
|
194
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
194
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/traversal.js
|
|
195
195
|
function setPath(parent, key, value) {
|
|
196
196
|
if (key === "__proto__" || key === "prototype") throw new Error("Cannot set an object's `__proto__` or `prototype` property");
|
|
197
197
|
parent[key] = value;
|
|
@@ -308,7 +308,7 @@ function setPaths(obj, paths, value) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
311
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/stringPath.js
|
|
312
312
|
function splitPath(path) {
|
|
313
313
|
return path.toString().split(/[[\].]+/).filter((p) => p);
|
|
314
314
|
}
|
|
@@ -322,7 +322,7 @@ function mergePath(path) {
|
|
|
322
322
|
}, "");
|
|
323
323
|
}
|
|
324
324
|
//#endregion
|
|
325
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
325
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/justClone.js
|
|
326
326
|
function clone$1(obj) {
|
|
327
327
|
const type = {}.toString.call(obj).slice(8, -1);
|
|
328
328
|
if (type == "Set") return new Set([...obj].map((value) => clone$1(value)));
|
|
@@ -337,7 +337,7 @@ function clone$1(obj) {
|
|
|
337
337
|
return obj;
|
|
338
338
|
}
|
|
339
339
|
//#endregion
|
|
340
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
340
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/utils.js
|
|
341
341
|
function clone(data) {
|
|
342
342
|
return data && typeof data === "object" ? clone$1(data) : data;
|
|
343
343
|
}
|
|
@@ -373,20 +373,20 @@ var merge$1 = (...objects) => objects.reduce((result, current) => {
|
|
|
373
373
|
});
|
|
374
374
|
return result;
|
|
375
375
|
}, {});
|
|
376
|
-
var defaultOptions
|
|
376
|
+
var defaultOptions = {
|
|
377
377
|
allowUndefinedOverrides: true,
|
|
378
378
|
mergeArrays: true,
|
|
379
379
|
uniqueArrayItems: true
|
|
380
380
|
};
|
|
381
|
-
merge$1.options = defaultOptions
|
|
381
|
+
merge$1.options = defaultOptions;
|
|
382
382
|
merge$1.withOptions = (options, ...objects) => {
|
|
383
|
-
merge$1.options = Object.assign(Object.assign({}, defaultOptions
|
|
383
|
+
merge$1.options = Object.assign(Object.assign({}, defaultOptions), options);
|
|
384
384
|
const result = merge$1(...objects);
|
|
385
|
-
merge$1.options = defaultOptions
|
|
385
|
+
merge$1.options = defaultOptions;
|
|
386
386
|
return result;
|
|
387
387
|
};
|
|
388
388
|
//#endregion
|
|
389
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
389
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/jsonSchema/schemaInfo.js
|
|
390
390
|
var conversionFormatTypes = [
|
|
391
391
|
"unix-time",
|
|
392
392
|
"bigint",
|
|
@@ -458,7 +458,7 @@ function unionInfo(schema) {
|
|
|
458
458
|
if (schema.anyOf && schema.anyOf.length) return schema.anyOf.filter((s) => typeof s !== "boolean");
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
461
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/jsonSchema/schemaDefaults.js
|
|
462
462
|
function defaultValues(schema, isOptional = false, path = []) {
|
|
463
463
|
return _defaultValues(schema, isOptional, path);
|
|
464
464
|
}
|
|
@@ -594,7 +594,7 @@ function _defaultTypes(schema, isOptional, path) {
|
|
|
594
594
|
return output;
|
|
595
595
|
}
|
|
596
596
|
//#endregion
|
|
597
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
597
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/errors.js
|
|
598
598
|
var SuperFormError = class SuperFormError extends Error {
|
|
599
599
|
constructor(message) {
|
|
600
600
|
super(message);
|
|
@@ -747,7 +747,7 @@ function replaceInvalidDefaults(Data, Defaults, _schema, Errors, preprocessed) {
|
|
|
747
747
|
return Data_traverse();
|
|
748
748
|
}
|
|
749
749
|
//#endregion
|
|
750
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
750
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/flash.js
|
|
751
751
|
function cancelFlash(options) {
|
|
752
752
|
if (!options.flashMessage || true) return;
|
|
753
753
|
}
|
|
@@ -755,7 +755,7 @@ function shouldSyncFlash(options) {
|
|
|
755
755
|
if (!options.flashMessage || true) return false;
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
758
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/customValidity.js
|
|
759
759
|
var noCustomValidityDataAttribute = "noCustomValidity";
|
|
760
760
|
async function updateCustomValidity(validityEl, errors) {
|
|
761
761
|
if ("setCustomValidity" in validityEl) validityEl.setCustomValidity("");
|
|
@@ -778,7 +778,7 @@ function setCustomValidity(el, errors) {
|
|
|
778
778
|
if (message) el.reportValidity();
|
|
779
779
|
}
|
|
780
780
|
//#endregion
|
|
781
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
781
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/elements.js
|
|
782
782
|
var isElementInViewport = (el, topOffset = 0) => {
|
|
783
783
|
const rect = el.getBoundingClientRect();
|
|
784
784
|
return rect.top >= topOffset && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
@@ -808,7 +808,7 @@ function inputInfo(el) {
|
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
810
|
//#endregion
|
|
811
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
811
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/form.js
|
|
812
812
|
var FetchStatus;
|
|
813
813
|
(function(FetchStatus) {
|
|
814
814
|
FetchStatus[FetchStatus["Idle"] = 0] = "Idle";
|
|
@@ -933,7 +933,7 @@ var scrollToFirstError = async (Form, options) => {
|
|
|
933
933
|
} catch {}
|
|
934
934
|
};
|
|
935
935
|
//#endregion
|
|
936
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
936
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/proxies.js
|
|
937
937
|
function updateProxyField(obj, path, updater) {
|
|
938
938
|
const output = traversePath(obj, path, ({ parent, key, value }) => {
|
|
939
939
|
if (value === void 0) parent[key] = /\D/.test(key) ? {} : [];
|
|
@@ -989,7 +989,7 @@ function fieldProxy(form, path, options) {
|
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
//#endregion
|
|
992
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
992
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/jsonSchema/schemaShape.js
|
|
993
993
|
function schemaShape(schema, path = []) {
|
|
994
994
|
const output = _schemaShape(schema, path);
|
|
995
995
|
if (!output) throw new SchemaError("No shape could be created for schema. If using Zod v4, import { zod4 } from \"sveltekit-superforms/adapters\" instead of { zod }.", path);
|
|
@@ -1034,7 +1034,7 @@ function shapeFromObject(obj) {
|
|
|
1034
1034
|
return output;
|
|
1035
1035
|
}
|
|
1036
1036
|
//#endregion
|
|
1037
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
1037
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/client/superForm.js
|
|
1038
1038
|
var formIds = /* @__PURE__ */ new WeakMap();
|
|
1039
1039
|
var initialForms = /* @__PURE__ */ new WeakMap();
|
|
1040
1040
|
var defaultOnError = (event) => {
|
|
@@ -2032,7 +2032,7 @@ function superForm(form, formOptions) {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
2034
|
//#endregion
|
|
2035
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2035
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/jsonSchema/constraints.js
|
|
2036
2036
|
function constraints(schema) {
|
|
2037
2037
|
return _constraints(schemaInfo(schema, false, []), []);
|
|
2038
2038
|
}
|
|
@@ -2093,7 +2093,7 @@ function constraint(info) {
|
|
|
2093
2093
|
return Object.keys(output).length > 0 ? output : void 0;
|
|
2094
2094
|
}
|
|
2095
2095
|
//#endregion
|
|
2096
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2096
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/jsonSchema/schemaHash.js
|
|
2097
2097
|
function schemaHash(schema) {
|
|
2098
2098
|
return hashCode(_schemaHash(schemaInfo(schema, false, []), 0, []));
|
|
2099
2099
|
}
|
|
@@ -2134,7 +2134,7 @@ function hashCode(str) {
|
|
|
2134
2134
|
return hash.toString(36);
|
|
2135
2135
|
}
|
|
2136
2136
|
//#endregion
|
|
2137
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2137
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/adapters/adapters.js
|
|
2138
2138
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2139
2139
|
function createAdapter(adapter, jsonSchema) {
|
|
2140
2140
|
if (!adapter || !("superFormValidationLibrary" in adapter)) throw new SuperFormError("Superforms v2 requires a validation adapter for the schema. Import one of your choice from \"sveltekit-superforms/adapters\" and wrap the schema with it.");
|
|
@@ -2148,7 +2148,7 @@ function createAdapter(adapter, jsonSchema) {
|
|
|
2148
2148
|
};
|
|
2149
2149
|
}
|
|
2150
2150
|
//#endregion
|
|
2151
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2151
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/formData.js
|
|
2152
2152
|
/**
|
|
2153
2153
|
* V1 compatibilty. resetForm = false and taintedMessage = true
|
|
2154
2154
|
*/
|
|
@@ -2343,7 +2343,7 @@ function parseFormDataEntry(key, value, type, info, fromURL = false) {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
2345
|
//#endregion
|
|
2346
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2346
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/superValidate.js
|
|
2347
2347
|
/**
|
|
2348
2348
|
* Validates a schema for data validation and usage in superForm.
|
|
2349
2349
|
* @param data Data corresponding to a schema, or RequestEvent/FormData/URL. If falsy, the schema's default values will be used.
|
|
@@ -6773,1107 +6773,73 @@ function Script(...args) {
|
|
|
6773
6773
|
Void: () => Void
|
|
6774
6774
|
})).Base;
|
|
6775
6775
|
//#endregion
|
|
6776
|
-
//#region ../../node_modules/.pnpm/
|
|
6777
|
-
var
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
...options
|
|
6808
|
-
};
|
|
6809
|
-
//#endregion
|
|
6810
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/Refs.js
|
|
6811
|
-
var getRefs = (options) => {
|
|
6812
|
-
const _options = getDefaultOptions(options);
|
|
6813
|
-
const currentPath = _options.name !== void 0 ? [
|
|
6814
|
-
..._options.basePath,
|
|
6815
|
-
_options.definitionPath,
|
|
6816
|
-
_options.name
|
|
6817
|
-
] : _options.basePath;
|
|
6818
|
-
return {
|
|
6819
|
-
..._options,
|
|
6820
|
-
flags: { hasReferencedOpenAiAnyType: false },
|
|
6821
|
-
currentPath,
|
|
6822
|
-
propertyPath: void 0,
|
|
6823
|
-
seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [def._def, {
|
|
6824
|
-
def: def._def,
|
|
6825
|
-
path: [
|
|
6826
|
-
..._options.basePath,
|
|
6827
|
-
_options.definitionPath,
|
|
6828
|
-
name
|
|
6829
|
-
],
|
|
6830
|
-
jsonSchema: void 0
|
|
6831
|
-
}]))
|
|
6832
|
-
};
|
|
6833
|
-
};
|
|
6834
|
-
//#endregion
|
|
6835
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/errorMessages.js
|
|
6836
|
-
function addErrorMessage(res, key, errorMessage, refs) {
|
|
6837
|
-
if (!refs?.errorMessages) return;
|
|
6838
|
-
if (errorMessage) res.errorMessage = {
|
|
6839
|
-
...res.errorMessage,
|
|
6840
|
-
[key]: errorMessage
|
|
6841
|
-
};
|
|
6842
|
-
}
|
|
6843
|
-
function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
6844
|
-
res[key] = value;
|
|
6845
|
-
addErrorMessage(res, key, errorMessage, refs);
|
|
6846
|
-
}
|
|
6847
|
-
//#endregion
|
|
6848
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/getRelativePath.js
|
|
6849
|
-
var getRelativePath = (pathA, pathB) => {
|
|
6850
|
-
let i = 0;
|
|
6851
|
-
for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
|
|
6852
|
-
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
6853
|
-
};
|
|
6854
|
-
//#endregion
|
|
6855
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/any.js
|
|
6856
|
-
function parseAnyDef(refs) {
|
|
6857
|
-
if (refs.target !== "openAi") return {};
|
|
6858
|
-
const anyDefinitionPath = [
|
|
6859
|
-
...refs.basePath,
|
|
6860
|
-
refs.definitionPath,
|
|
6861
|
-
refs.openAiAnyTypeName
|
|
6862
|
-
];
|
|
6863
|
-
refs.flags.hasReferencedOpenAiAnyType = true;
|
|
6864
|
-
return { $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/") };
|
|
6865
|
-
}
|
|
6866
|
-
//#endregion
|
|
6867
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/array.js
|
|
6868
|
-
function parseArrayDef(def, refs) {
|
|
6869
|
-
const res = { type: "array" };
|
|
6870
|
-
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
|
|
6871
|
-
...refs,
|
|
6872
|
-
currentPath: [...refs.currentPath, "items"]
|
|
6873
|
-
});
|
|
6874
|
-
if (def.minLength) setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs);
|
|
6875
|
-
if (def.maxLength) setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
|
|
6876
|
-
if (def.exactLength) {
|
|
6877
|
-
setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
|
|
6878
|
-
setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
|
|
6879
|
-
}
|
|
6880
|
-
return res;
|
|
6881
|
-
}
|
|
6882
|
-
//#endregion
|
|
6883
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/bigint.js
|
|
6884
|
-
function parseBigintDef(def, refs) {
|
|
6885
|
-
const res = {
|
|
6886
|
-
type: "integer",
|
|
6887
|
-
format: "int64"
|
|
6888
|
-
};
|
|
6889
|
-
if (!def.checks) return res;
|
|
6890
|
-
for (const check of def.checks) switch (check.kind) {
|
|
6891
|
-
case "min":
|
|
6892
|
-
if (refs.target === "jsonSchema7") if (check.inclusive) setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
6893
|
-
else setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs);
|
|
6894
|
-
else {
|
|
6895
|
-
if (!check.inclusive) res.exclusiveMinimum = true;
|
|
6896
|
-
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
6897
|
-
}
|
|
6898
|
-
break;
|
|
6899
|
-
case "max":
|
|
6900
|
-
if (refs.target === "jsonSchema7") if (check.inclusive) setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
6901
|
-
else setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs);
|
|
6902
|
-
else {
|
|
6903
|
-
if (!check.inclusive) res.exclusiveMaximum = true;
|
|
6904
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
6905
|
-
}
|
|
6906
|
-
break;
|
|
6907
|
-
case "multipleOf":
|
|
6908
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
6909
|
-
break;
|
|
6910
|
-
}
|
|
6911
|
-
return res;
|
|
6912
|
-
}
|
|
6913
|
-
//#endregion
|
|
6914
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/boolean.js
|
|
6915
|
-
function parseBooleanDef() {
|
|
6916
|
-
return { type: "boolean" };
|
|
6917
|
-
}
|
|
6918
|
-
//#endregion
|
|
6919
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/branded.js
|
|
6920
|
-
function parseBrandedDef(_def, refs) {
|
|
6921
|
-
return parseDef(_def.type._def, refs);
|
|
6922
|
-
}
|
|
6923
|
-
//#endregion
|
|
6924
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/catch.js
|
|
6925
|
-
var parseCatchDef = (def, refs) => {
|
|
6926
|
-
return parseDef(def.innerType._def, refs);
|
|
6927
|
-
};
|
|
6928
|
-
//#endregion
|
|
6929
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/date.js
|
|
6930
|
-
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
6931
|
-
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
6932
|
-
if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
|
|
6933
|
-
switch (strategy) {
|
|
6934
|
-
case "string":
|
|
6935
|
-
case "format:date-time": return {
|
|
6936
|
-
type: "string",
|
|
6937
|
-
format: "date-time"
|
|
6938
|
-
};
|
|
6939
|
-
case "format:date": return {
|
|
6940
|
-
type: "string",
|
|
6941
|
-
format: "date"
|
|
6942
|
-
};
|
|
6943
|
-
case "integer": return integerDateParser(def, refs);
|
|
6944
|
-
}
|
|
6945
|
-
}
|
|
6946
|
-
var integerDateParser = (def, refs) => {
|
|
6947
|
-
const res = {
|
|
6948
|
-
type: "integer",
|
|
6949
|
-
format: "unix-time"
|
|
6950
|
-
};
|
|
6951
|
-
if (refs.target === "openApi3") return res;
|
|
6952
|
-
for (const check of def.checks) switch (check.kind) {
|
|
6953
|
-
case "min":
|
|
6954
|
-
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
6955
|
-
break;
|
|
6956
|
-
case "max":
|
|
6957
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
6958
|
-
break;
|
|
6959
|
-
}
|
|
6960
|
-
return res;
|
|
6961
|
-
};
|
|
6962
|
-
//#endregion
|
|
6963
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/default.js
|
|
6964
|
-
function parseDefaultDef(_def, refs) {
|
|
6965
|
-
return {
|
|
6966
|
-
...parseDef(_def.innerType._def, refs),
|
|
6967
|
-
default: _def.defaultValue()
|
|
6968
|
-
};
|
|
6969
|
-
}
|
|
6970
|
-
//#endregion
|
|
6971
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/effects.js
|
|
6972
|
-
function parseEffectsDef(_def, refs) {
|
|
6973
|
-
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
6974
|
-
}
|
|
6975
|
-
//#endregion
|
|
6976
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/enum.js
|
|
6977
|
-
function parseEnumDef(def) {
|
|
6978
|
-
return {
|
|
6979
|
-
type: "string",
|
|
6980
|
-
enum: Array.from(def.values)
|
|
6981
|
-
};
|
|
6982
|
-
}
|
|
6983
|
-
//#endregion
|
|
6984
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/intersection.js
|
|
6985
|
-
var isJsonSchema7AllOfType = (type) => {
|
|
6986
|
-
if ("type" in type && type.type === "string") return false;
|
|
6987
|
-
return "allOf" in type;
|
|
6988
|
-
};
|
|
6989
|
-
function parseIntersectionDef(def, refs) {
|
|
6990
|
-
const allOf = [parseDef(def.left._def, {
|
|
6991
|
-
...refs,
|
|
6992
|
-
currentPath: [
|
|
6993
|
-
...refs.currentPath,
|
|
6994
|
-
"allOf",
|
|
6995
|
-
"0"
|
|
6996
|
-
]
|
|
6997
|
-
}), parseDef(def.right._def, {
|
|
6998
|
-
...refs,
|
|
6999
|
-
currentPath: [
|
|
7000
|
-
...refs.currentPath,
|
|
7001
|
-
"allOf",
|
|
7002
|
-
"1"
|
|
7003
|
-
]
|
|
7004
|
-
})].filter((x) => !!x);
|
|
7005
|
-
let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
|
|
7006
|
-
const mergedAllOf = [];
|
|
7007
|
-
allOf.forEach((schema) => {
|
|
7008
|
-
if (isJsonSchema7AllOfType(schema)) {
|
|
7009
|
-
mergedAllOf.push(...schema.allOf);
|
|
7010
|
-
if (schema.unevaluatedProperties === void 0) unevaluatedProperties = void 0;
|
|
7011
|
-
} else {
|
|
7012
|
-
let nestedSchema = schema;
|
|
7013
|
-
if ("additionalProperties" in schema && schema.additionalProperties === false) {
|
|
7014
|
-
const { additionalProperties, ...rest } = schema;
|
|
7015
|
-
nestedSchema = rest;
|
|
7016
|
-
} else unevaluatedProperties = void 0;
|
|
7017
|
-
mergedAllOf.push(nestedSchema);
|
|
7018
|
-
}
|
|
7019
|
-
});
|
|
7020
|
-
return mergedAllOf.length ? {
|
|
7021
|
-
allOf: mergedAllOf,
|
|
7022
|
-
...unevaluatedProperties
|
|
7023
|
-
} : void 0;
|
|
7024
|
-
}
|
|
7025
|
-
//#endregion
|
|
7026
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/literal.js
|
|
7027
|
-
function parseLiteralDef(def, refs) {
|
|
7028
|
-
const parsedType = typeof def.value;
|
|
7029
|
-
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
|
|
7030
|
-
if (refs.target === "openApi3") return {
|
|
7031
|
-
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
7032
|
-
enum: [def.value]
|
|
7033
|
-
};
|
|
7034
|
-
return {
|
|
7035
|
-
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
7036
|
-
const: def.value
|
|
7037
|
-
};
|
|
7038
|
-
}
|
|
7039
|
-
//#endregion
|
|
7040
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/string.js
|
|
7041
|
-
var emojiRegex = void 0;
|
|
7042
|
-
/**
|
|
7043
|
-
* Generated from the regular expressions found here as of 2024-05-22:
|
|
7044
|
-
* https://github.com/colinhacks/zod/blob/master/src/types.ts.
|
|
7045
|
-
*
|
|
7046
|
-
* Expressions with /i flag have been changed accordingly.
|
|
7047
|
-
*/
|
|
7048
|
-
var zodPatterns = {
|
|
7049
|
-
/**
|
|
7050
|
-
* `c` was changed to `[cC]` to replicate /i flag
|
|
7051
|
-
*/
|
|
7052
|
-
cuid: /^[cC][^\s-]{8,}$/,
|
|
7053
|
-
cuid2: /^[0-9a-z]+$/,
|
|
7054
|
-
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
7055
|
-
/**
|
|
7056
|
-
* `a-z` was added to replicate /i flag
|
|
7057
|
-
*/
|
|
7058
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
7059
|
-
/**
|
|
7060
|
-
* Constructed a valid Unicode RegExp
|
|
7061
|
-
*
|
|
7062
|
-
* Lazily instantiate since this type of regex isn't supported
|
|
7063
|
-
* in all envs (e.g. React Native).
|
|
7064
|
-
*
|
|
7065
|
-
* See:
|
|
7066
|
-
* https://github.com/colinhacks/zod/issues/2433
|
|
7067
|
-
* Fix in Zod:
|
|
7068
|
-
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
7069
|
-
*/
|
|
7070
|
-
emoji: () => {
|
|
7071
|
-
if (emojiRegex === void 0) emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
|
|
7072
|
-
return emojiRegex;
|
|
7073
|
-
},
|
|
7074
|
-
/**
|
|
7075
|
-
* Unused
|
|
7076
|
-
*/
|
|
7077
|
-
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
7078
|
-
/**
|
|
7079
|
-
* Unused
|
|
7080
|
-
*/
|
|
7081
|
-
ipv4: /^(?:(?: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])$/,
|
|
7082
|
-
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
7083
|
-
/**
|
|
7084
|
-
* Unused
|
|
7085
|
-
*/
|
|
7086
|
-
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
7087
|
-
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
7088
|
-
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
7089
|
-
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
7090
|
-
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
7091
|
-
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
7092
|
-
};
|
|
7093
|
-
function parseStringDef(def, refs) {
|
|
7094
|
-
const res = { type: "string" };
|
|
7095
|
-
if (def.checks) for (const check of def.checks) switch (check.kind) {
|
|
7096
|
-
case "min":
|
|
7097
|
-
setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
|
|
7098
|
-
break;
|
|
7099
|
-
case "max":
|
|
7100
|
-
setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
|
|
7101
|
-
break;
|
|
7102
|
-
case "email":
|
|
7103
|
-
switch (refs.emailStrategy) {
|
|
7104
|
-
case "format:email":
|
|
7105
|
-
addFormat(res, "email", check.message, refs);
|
|
7106
|
-
break;
|
|
7107
|
-
case "format:idn-email":
|
|
7108
|
-
addFormat(res, "idn-email", check.message, refs);
|
|
7109
|
-
break;
|
|
7110
|
-
case "pattern:zod":
|
|
7111
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
7112
|
-
break;
|
|
7113
|
-
}
|
|
7114
|
-
break;
|
|
7115
|
-
case "url":
|
|
7116
|
-
addFormat(res, "uri", check.message, refs);
|
|
7117
|
-
break;
|
|
7118
|
-
case "uuid":
|
|
7119
|
-
addFormat(res, "uuid", check.message, refs);
|
|
7120
|
-
break;
|
|
7121
|
-
case "regex":
|
|
7122
|
-
addPattern(res, check.regex, check.message, refs);
|
|
7123
|
-
break;
|
|
7124
|
-
case "cuid":
|
|
7125
|
-
addPattern(res, zodPatterns.cuid, check.message, refs);
|
|
7126
|
-
break;
|
|
7127
|
-
case "cuid2":
|
|
7128
|
-
addPattern(res, zodPatterns.cuid2, check.message, refs);
|
|
7129
|
-
break;
|
|
7130
|
-
case "startsWith":
|
|
7131
|
-
addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs);
|
|
7132
|
-
break;
|
|
7133
|
-
case "endsWith":
|
|
7134
|
-
addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs);
|
|
7135
|
-
break;
|
|
7136
|
-
case "datetime":
|
|
7137
|
-
addFormat(res, "date-time", check.message, refs);
|
|
7138
|
-
break;
|
|
7139
|
-
case "date":
|
|
7140
|
-
addFormat(res, "date", check.message, refs);
|
|
7141
|
-
break;
|
|
7142
|
-
case "time":
|
|
7143
|
-
addFormat(res, "time", check.message, refs);
|
|
7144
|
-
break;
|
|
7145
|
-
case "duration":
|
|
7146
|
-
addFormat(res, "duration", check.message, refs);
|
|
7147
|
-
break;
|
|
7148
|
-
case "length":
|
|
7149
|
-
setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);
|
|
7150
|
-
setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);
|
|
7151
|
-
break;
|
|
7152
|
-
case "includes":
|
|
7153
|
-
addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs);
|
|
7154
|
-
break;
|
|
7155
|
-
case "ip":
|
|
7156
|
-
if (check.version !== "v6") addFormat(res, "ipv4", check.message, refs);
|
|
7157
|
-
if (check.version !== "v4") addFormat(res, "ipv6", check.message, refs);
|
|
7158
|
-
break;
|
|
7159
|
-
case "base64url":
|
|
7160
|
-
addPattern(res, zodPatterns.base64url, check.message, refs);
|
|
7161
|
-
break;
|
|
7162
|
-
case "jwt":
|
|
7163
|
-
addPattern(res, zodPatterns.jwt, check.message, refs);
|
|
7164
|
-
break;
|
|
7165
|
-
case "cidr":
|
|
7166
|
-
if (check.version !== "v6") addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);
|
|
7167
|
-
if (check.version !== "v4") addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);
|
|
7168
|
-
break;
|
|
7169
|
-
case "emoji":
|
|
7170
|
-
addPattern(res, zodPatterns.emoji(), check.message, refs);
|
|
7171
|
-
break;
|
|
7172
|
-
case "ulid":
|
|
7173
|
-
addPattern(res, zodPatterns.ulid, check.message, refs);
|
|
7174
|
-
break;
|
|
7175
|
-
case "base64":
|
|
7176
|
-
switch (refs.base64Strategy) {
|
|
7177
|
-
case "format:binary":
|
|
7178
|
-
addFormat(res, "binary", check.message, refs);
|
|
7179
|
-
break;
|
|
7180
|
-
case "contentEncoding:base64":
|
|
7181
|
-
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
7182
|
-
break;
|
|
7183
|
-
case "pattern:zod":
|
|
7184
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
7185
|
-
break;
|
|
7186
|
-
}
|
|
7187
|
-
break;
|
|
7188
|
-
case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
7189
|
-
}
|
|
7190
|
-
return res;
|
|
7191
|
-
}
|
|
7192
|
-
function escapeLiteralCheckValue(literal, refs) {
|
|
7193
|
-
return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal) : literal;
|
|
7194
|
-
}
|
|
7195
|
-
var ALPHA_NUMERIC = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
7196
|
-
function escapeNonAlphaNumeric(source) {
|
|
7197
|
-
let result = "";
|
|
7198
|
-
for (let i = 0; i < source.length; i++) {
|
|
7199
|
-
if (!ALPHA_NUMERIC.has(source[i])) result += "\\";
|
|
7200
|
-
result += source[i];
|
|
7201
|
-
}
|
|
7202
|
-
return result;
|
|
7203
|
-
}
|
|
7204
|
-
function addFormat(schema, value, message, refs) {
|
|
7205
|
-
if (schema.format || schema.anyOf?.some((x) => x.format)) {
|
|
7206
|
-
if (!schema.anyOf) schema.anyOf = [];
|
|
7207
|
-
if (schema.format) {
|
|
7208
|
-
schema.anyOf.push({
|
|
7209
|
-
format: schema.format,
|
|
7210
|
-
...schema.errorMessage && refs.errorMessages && { errorMessage: { format: schema.errorMessage.format } }
|
|
7211
|
-
});
|
|
7212
|
-
delete schema.format;
|
|
7213
|
-
if (schema.errorMessage) {
|
|
7214
|
-
delete schema.errorMessage.format;
|
|
7215
|
-
if (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;
|
|
7216
|
-
}
|
|
7217
|
-
}
|
|
7218
|
-
schema.anyOf.push({
|
|
7219
|
-
format: value,
|
|
7220
|
-
...message && refs.errorMessages && { errorMessage: { format: message } }
|
|
7221
|
-
});
|
|
7222
|
-
} else setResponseValueAndErrors(schema, "format", value, message, refs);
|
|
7223
|
-
}
|
|
7224
|
-
function addPattern(schema, regex, message, refs) {
|
|
7225
|
-
if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
|
|
7226
|
-
if (!schema.allOf) schema.allOf = [];
|
|
7227
|
-
if (schema.pattern) {
|
|
7228
|
-
schema.allOf.push({
|
|
7229
|
-
pattern: schema.pattern,
|
|
7230
|
-
...schema.errorMessage && refs.errorMessages && { errorMessage: { pattern: schema.errorMessage.pattern } }
|
|
7231
|
-
});
|
|
7232
|
-
delete schema.pattern;
|
|
7233
|
-
if (schema.errorMessage) {
|
|
7234
|
-
delete schema.errorMessage.pattern;
|
|
7235
|
-
if (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;
|
|
7236
|
-
}
|
|
7237
|
-
}
|
|
7238
|
-
schema.allOf.push({
|
|
7239
|
-
pattern: stringifyRegExpWithFlags(regex, refs),
|
|
7240
|
-
...message && refs.errorMessages && { errorMessage: { pattern: message } }
|
|
7241
|
-
});
|
|
7242
|
-
} else setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs);
|
|
7243
|
-
}
|
|
7244
|
-
function stringifyRegExpWithFlags(regex, refs) {
|
|
7245
|
-
if (!refs.applyRegexFlags || !regex.flags) return regex.source;
|
|
7246
|
-
const flags = {
|
|
7247
|
-
i: regex.flags.includes("i"),
|
|
7248
|
-
m: regex.flags.includes("m"),
|
|
7249
|
-
s: regex.flags.includes("s")
|
|
7250
|
-
};
|
|
7251
|
-
const source = flags.i ? regex.source.toLowerCase() : regex.source;
|
|
7252
|
-
let pattern = "";
|
|
7253
|
-
let isEscaped = false;
|
|
7254
|
-
let inCharGroup = false;
|
|
7255
|
-
let inCharRange = false;
|
|
7256
|
-
for (let i = 0; i < source.length; i++) {
|
|
7257
|
-
if (isEscaped) {
|
|
7258
|
-
pattern += source[i];
|
|
7259
|
-
isEscaped = false;
|
|
7260
|
-
continue;
|
|
7261
|
-
}
|
|
7262
|
-
if (flags.i) {
|
|
7263
|
-
if (inCharGroup) {
|
|
7264
|
-
if (source[i].match(/[a-z]/)) {
|
|
7265
|
-
if (inCharRange) {
|
|
7266
|
-
pattern += source[i];
|
|
7267
|
-
pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();
|
|
7268
|
-
inCharRange = false;
|
|
7269
|
-
} else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) {
|
|
7270
|
-
pattern += source[i];
|
|
7271
|
-
inCharRange = true;
|
|
7272
|
-
} else pattern += `${source[i]}${source[i].toUpperCase()}`;
|
|
7273
|
-
continue;
|
|
6776
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_a206f93f6a2326a0f5649d8ef96074e4/node_modules/sveltekit-superforms/dist/adapters/zod4.js
|
|
6777
|
+
var defaultJSONSchemaOptions = {
|
|
6778
|
+
unrepresentable: "any",
|
|
6779
|
+
override: (ctx) => {
|
|
6780
|
+
const def = ctx.zodSchema._zod.def;
|
|
6781
|
+
if (def.type === "date") {
|
|
6782
|
+
ctx.jsonSchema.type = "integer";
|
|
6783
|
+
ctx.jsonSchema.format = "unix-time";
|
|
6784
|
+
} else if (def.type === "bigint") {
|
|
6785
|
+
ctx.jsonSchema.type = "string";
|
|
6786
|
+
ctx.jsonSchema.format = "bigint";
|
|
6787
|
+
} else if (def.type === "pipe") {
|
|
6788
|
+
const pipeDef = def;
|
|
6789
|
+
const inSchema = pipeDef.in;
|
|
6790
|
+
const outSchema = pipeDef.out;
|
|
6791
|
+
if (inSchema?._zod?.def.type === "string") {
|
|
6792
|
+
let currentSchema = outSchema;
|
|
6793
|
+
let isStringBool = false;
|
|
6794
|
+
while (currentSchema?._zod?.def) {
|
|
6795
|
+
const currentDef = currentSchema._zod.def;
|
|
6796
|
+
if (currentDef.type === "boolean") {
|
|
6797
|
+
isStringBool = true;
|
|
6798
|
+
break;
|
|
6799
|
+
} else if (currentDef.type === "transform") break;
|
|
6800
|
+
else if (currentDef.type === "pipe") currentSchema = currentDef.out;
|
|
6801
|
+
else break;
|
|
6802
|
+
}
|
|
6803
|
+
if (!isStringBool && outSchema?._zod?.def.type === "boolean") isStringBool = true;
|
|
6804
|
+
if (isStringBool) {
|
|
6805
|
+
ctx.jsonSchema.type = "string";
|
|
6806
|
+
ctx.jsonSchema.format = "stringbool";
|
|
7274
6807
|
}
|
|
7275
|
-
} else if (source[i].match(/[a-z]/)) {
|
|
7276
|
-
pattern += `[${source[i]}${source[i].toUpperCase()}]`;
|
|
7277
|
-
continue;
|
|
7278
|
-
}
|
|
7279
|
-
}
|
|
7280
|
-
if (flags.m) {
|
|
7281
|
-
if (source[i] === "^") {
|
|
7282
|
-
pattern += `(^|(?<=[\r\n]))`;
|
|
7283
|
-
continue;
|
|
7284
|
-
} else if (source[i] === "$") {
|
|
7285
|
-
pattern += `($|(?=[\r\n]))`;
|
|
7286
|
-
continue;
|
|
7287
|
-
}
|
|
7288
|
-
}
|
|
7289
|
-
if (flags.s && source[i] === ".") {
|
|
7290
|
-
pattern += inCharGroup ? `${source[i]}\r\n` : `[${source[i]}\r\n]`;
|
|
7291
|
-
continue;
|
|
7292
|
-
}
|
|
7293
|
-
pattern += source[i];
|
|
7294
|
-
if (source[i] === "\\") isEscaped = true;
|
|
7295
|
-
else if (inCharGroup && source[i] === "]") inCharGroup = false;
|
|
7296
|
-
else if (!inCharGroup && source[i] === "[") inCharGroup = true;
|
|
7297
|
-
}
|
|
7298
|
-
try {
|
|
7299
|
-
new RegExp(pattern);
|
|
7300
|
-
} catch {
|
|
7301
|
-
console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`);
|
|
7302
|
-
return regex.source;
|
|
7303
|
-
}
|
|
7304
|
-
return pattern;
|
|
7305
|
-
}
|
|
7306
|
-
//#endregion
|
|
7307
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/record.js
|
|
7308
|
-
function parseRecordDef(def, refs) {
|
|
7309
|
-
if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
7310
|
-
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
7311
|
-
type: "object",
|
|
7312
|
-
required: def.keyType._def.values,
|
|
7313
|
-
properties: def.keyType._def.values.reduce((acc, key) => ({
|
|
7314
|
-
...acc,
|
|
7315
|
-
[key]: parseDef(def.valueType._def, {
|
|
7316
|
-
...refs,
|
|
7317
|
-
currentPath: [
|
|
7318
|
-
...refs.currentPath,
|
|
7319
|
-
"properties",
|
|
7320
|
-
key
|
|
7321
|
-
]
|
|
7322
|
-
}) ?? parseAnyDef(refs)
|
|
7323
|
-
}), {}),
|
|
7324
|
-
additionalProperties: refs.rejectedAdditionalProperties
|
|
7325
|
-
};
|
|
7326
|
-
const schema = {
|
|
7327
|
-
type: "object",
|
|
7328
|
-
additionalProperties: parseDef(def.valueType._def, {
|
|
7329
|
-
...refs,
|
|
7330
|
-
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
7331
|
-
}) ?? refs.allowedAdditionalProperties
|
|
7332
|
-
};
|
|
7333
|
-
if (refs.target === "openApi3") return schema;
|
|
7334
|
-
if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
|
|
7335
|
-
const { type, ...keyType } = parseStringDef(def.keyType._def, refs);
|
|
7336
|
-
return {
|
|
7337
|
-
...schema,
|
|
7338
|
-
propertyNames: keyType
|
|
7339
|
-
};
|
|
7340
|
-
} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
7341
|
-
...schema,
|
|
7342
|
-
propertyNames: { enum: def.keyType._def.values }
|
|
7343
|
-
};
|
|
7344
|
-
else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {
|
|
7345
|
-
const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);
|
|
7346
|
-
return {
|
|
7347
|
-
...schema,
|
|
7348
|
-
propertyNames: keyType
|
|
7349
|
-
};
|
|
7350
|
-
}
|
|
7351
|
-
return schema;
|
|
7352
|
-
}
|
|
7353
|
-
//#endregion
|
|
7354
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/map.js
|
|
7355
|
-
function parseMapDef(def, refs) {
|
|
7356
|
-
if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
|
|
7357
|
-
return {
|
|
7358
|
-
type: "array",
|
|
7359
|
-
maxItems: 125,
|
|
7360
|
-
items: {
|
|
7361
|
-
type: "array",
|
|
7362
|
-
items: [parseDef(def.keyType._def, {
|
|
7363
|
-
...refs,
|
|
7364
|
-
currentPath: [
|
|
7365
|
-
...refs.currentPath,
|
|
7366
|
-
"items",
|
|
7367
|
-
"items",
|
|
7368
|
-
"0"
|
|
7369
|
-
]
|
|
7370
|
-
}) || parseAnyDef(refs), parseDef(def.valueType._def, {
|
|
7371
|
-
...refs,
|
|
7372
|
-
currentPath: [
|
|
7373
|
-
...refs.currentPath,
|
|
7374
|
-
"items",
|
|
7375
|
-
"items",
|
|
7376
|
-
"1"
|
|
7377
|
-
]
|
|
7378
|
-
}) || parseAnyDef(refs)],
|
|
7379
|
-
minItems: 2,
|
|
7380
|
-
maxItems: 2
|
|
7381
|
-
}
|
|
7382
|
-
};
|
|
7383
|
-
}
|
|
7384
|
-
//#endregion
|
|
7385
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
7386
|
-
function parseNativeEnumDef(def) {
|
|
7387
|
-
const object = def.values;
|
|
7388
|
-
const actualValues = Object.keys(def.values).filter((key) => {
|
|
7389
|
-
return typeof object[object[key]] !== "number";
|
|
7390
|
-
}).map((key) => object[key]);
|
|
7391
|
-
const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
|
|
7392
|
-
return {
|
|
7393
|
-
type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
7394
|
-
enum: actualValues
|
|
7395
|
-
};
|
|
7396
|
-
}
|
|
7397
|
-
//#endregion
|
|
7398
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/never.js
|
|
7399
|
-
function parseNeverDef(refs) {
|
|
7400
|
-
return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
|
|
7401
|
-
...refs,
|
|
7402
|
-
currentPath: [...refs.currentPath, "not"]
|
|
7403
|
-
}) };
|
|
7404
|
-
}
|
|
7405
|
-
//#endregion
|
|
7406
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/null.js
|
|
7407
|
-
function parseNullDef(refs) {
|
|
7408
|
-
return refs.target === "openApi3" ? {
|
|
7409
|
-
enum: ["null"],
|
|
7410
|
-
nullable: true
|
|
7411
|
-
} : { type: "null" };
|
|
7412
|
-
}
|
|
7413
|
-
//#endregion
|
|
7414
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/union.js
|
|
7415
|
-
var primitiveMappings = {
|
|
7416
|
-
ZodString: "string",
|
|
7417
|
-
ZodNumber: "number",
|
|
7418
|
-
ZodBigInt: "integer",
|
|
7419
|
-
ZodBoolean: "boolean",
|
|
7420
|
-
ZodNull: "null"
|
|
7421
|
-
};
|
|
7422
|
-
function parseUnionDef(def, refs) {
|
|
7423
|
-
if (refs.target === "openApi3") return asAnyOf(def, refs);
|
|
7424
|
-
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
|
|
7425
|
-
if (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {
|
|
7426
|
-
const types = options.reduce((types, x) => {
|
|
7427
|
-
const type = primitiveMappings[x._def.typeName];
|
|
7428
|
-
return type && !types.includes(type) ? [...types, type] : types;
|
|
7429
|
-
}, []);
|
|
7430
|
-
return { type: types.length > 1 ? types : types[0] };
|
|
7431
|
-
} else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
|
|
7432
|
-
const types = options.reduce((acc, x) => {
|
|
7433
|
-
const type = typeof x._def.value;
|
|
7434
|
-
switch (type) {
|
|
7435
|
-
case "string":
|
|
7436
|
-
case "number":
|
|
7437
|
-
case "boolean": return [...acc, type];
|
|
7438
|
-
case "bigint": return [...acc, "integer"];
|
|
7439
|
-
case "object": if (x._def.value === null) return [...acc, "null"];
|
|
7440
|
-
default: return acc;
|
|
7441
|
-
}
|
|
7442
|
-
}, []);
|
|
7443
|
-
if (types.length === options.length) {
|
|
7444
|
-
const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);
|
|
7445
|
-
return {
|
|
7446
|
-
type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
|
|
7447
|
-
enum: options.reduce((acc, x) => {
|
|
7448
|
-
return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
|
|
7449
|
-
}, [])
|
|
7450
|
-
};
|
|
7451
|
-
}
|
|
7452
|
-
} else if (options.every((x) => x._def.typeName === "ZodEnum")) return {
|
|
7453
|
-
type: "string",
|
|
7454
|
-
enum: options.reduce((acc, x) => [...acc, ...x._def.values.filter((x) => !acc.includes(x))], [])
|
|
7455
|
-
};
|
|
7456
|
-
return asAnyOf(def, refs);
|
|
7457
|
-
}
|
|
7458
|
-
var asAnyOf = (def, refs) => {
|
|
7459
|
-
const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {
|
|
7460
|
-
...refs,
|
|
7461
|
-
currentPath: [
|
|
7462
|
-
...refs.currentPath,
|
|
7463
|
-
"anyOf",
|
|
7464
|
-
`${i}`
|
|
7465
|
-
]
|
|
7466
|
-
})).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
|
|
7467
|
-
return anyOf.length ? { anyOf } : void 0;
|
|
7468
|
-
};
|
|
7469
|
-
//#endregion
|
|
7470
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/nullable.js
|
|
7471
|
-
function parseNullableDef(def, refs) {
|
|
7472
|
-
if ([
|
|
7473
|
-
"ZodString",
|
|
7474
|
-
"ZodNumber",
|
|
7475
|
-
"ZodBigInt",
|
|
7476
|
-
"ZodBoolean",
|
|
7477
|
-
"ZodNull"
|
|
7478
|
-
].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
7479
|
-
if (refs.target === "openApi3") return {
|
|
7480
|
-
type: primitiveMappings[def.innerType._def.typeName],
|
|
7481
|
-
nullable: true
|
|
7482
|
-
};
|
|
7483
|
-
return { type: [primitiveMappings[def.innerType._def.typeName], "null"] };
|
|
7484
|
-
}
|
|
7485
|
-
if (refs.target === "openApi3") {
|
|
7486
|
-
const base = parseDef(def.innerType._def, {
|
|
7487
|
-
...refs,
|
|
7488
|
-
currentPath: [...refs.currentPath]
|
|
7489
|
-
});
|
|
7490
|
-
if (base && "$ref" in base) return {
|
|
7491
|
-
allOf: [base],
|
|
7492
|
-
nullable: true
|
|
7493
|
-
};
|
|
7494
|
-
return base && {
|
|
7495
|
-
...base,
|
|
7496
|
-
nullable: true
|
|
7497
|
-
};
|
|
7498
|
-
}
|
|
7499
|
-
const base = parseDef(def.innerType._def, {
|
|
7500
|
-
...refs,
|
|
7501
|
-
currentPath: [
|
|
7502
|
-
...refs.currentPath,
|
|
7503
|
-
"anyOf",
|
|
7504
|
-
"0"
|
|
7505
|
-
]
|
|
7506
|
-
});
|
|
7507
|
-
return base && { anyOf: [base, { type: "null" }] };
|
|
7508
|
-
}
|
|
7509
|
-
//#endregion
|
|
7510
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/number.js
|
|
7511
|
-
function parseNumberDef(def, refs) {
|
|
7512
|
-
const res = { type: "number" };
|
|
7513
|
-
if (!def.checks) return res;
|
|
7514
|
-
for (const check of def.checks) switch (check.kind) {
|
|
7515
|
-
case "int":
|
|
7516
|
-
res.type = "integer";
|
|
7517
|
-
addErrorMessage(res, "type", check.message, refs);
|
|
7518
|
-
break;
|
|
7519
|
-
case "min":
|
|
7520
|
-
if (refs.target === "jsonSchema7") if (check.inclusive) setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
7521
|
-
else setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs);
|
|
7522
|
-
else {
|
|
7523
|
-
if (!check.inclusive) res.exclusiveMinimum = true;
|
|
7524
|
-
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
7525
6808
|
}
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
6809
|
+
} else if (def.type === "set") {
|
|
6810
|
+
ctx.jsonSchema.type = "array";
|
|
6811
|
+
ctx.jsonSchema.uniqueItems = true;
|
|
6812
|
+
if ("default" in ctx.jsonSchema && ctx.jsonSchema.default instanceof Set) ctx.jsonSchema.default = Array.from(ctx.jsonSchema.default);
|
|
6813
|
+
} else if (def.type === "map") {
|
|
6814
|
+
ctx.jsonSchema.type = "array";
|
|
6815
|
+
ctx.jsonSchema.format = "map";
|
|
6816
|
+
if ("default" in ctx.jsonSchema && ctx.jsonSchema.default instanceof Map) ctx.jsonSchema.default = Array.from(ctx.jsonSchema.default);
|
|
6817
|
+
} else if (def.type === "default") {
|
|
6818
|
+
const innerDef = def.innerType._zod.def;
|
|
6819
|
+
if (innerDef.type === "set" && def.defaultValue instanceof Set) {
|
|
6820
|
+
ctx.jsonSchema.type = "array";
|
|
6821
|
+
ctx.jsonSchema.uniqueItems = true;
|
|
6822
|
+
ctx.jsonSchema.default = Array.from(def.defaultValue);
|
|
6823
|
+
} else if (innerDef.type === "map" && def.defaultValue instanceof Map) {
|
|
6824
|
+
ctx.jsonSchema.type = "array";
|
|
6825
|
+
ctx.jsonSchema.format = "map";
|
|
6826
|
+
ctx.jsonSchema.default = Array.from(def.defaultValue);
|
|
7533
6827
|
}
|
|
7534
|
-
break;
|
|
7535
|
-
case "multipleOf":
|
|
7536
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
7537
|
-
break;
|
|
7538
|
-
}
|
|
7539
|
-
return res;
|
|
7540
|
-
}
|
|
7541
|
-
//#endregion
|
|
7542
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/object.js
|
|
7543
|
-
function parseObjectDef(def, refs) {
|
|
7544
|
-
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
7545
|
-
const result = {
|
|
7546
|
-
type: "object",
|
|
7547
|
-
properties: {}
|
|
7548
|
-
};
|
|
7549
|
-
const required = [];
|
|
7550
|
-
const shape = def.shape();
|
|
7551
|
-
for (const propName in shape) {
|
|
7552
|
-
let propDef = shape[propName];
|
|
7553
|
-
if (propDef === void 0 || propDef._def === void 0) continue;
|
|
7554
|
-
let propOptional = safeIsOptional(propDef);
|
|
7555
|
-
if (propOptional && forceOptionalIntoNullable) {
|
|
7556
|
-
if (propDef._def.typeName === "ZodOptional") propDef = propDef._def.innerType;
|
|
7557
|
-
if (!propDef.isNullable()) propDef = propDef.nullable();
|
|
7558
|
-
propOptional = false;
|
|
7559
6828
|
}
|
|
7560
|
-
const parsedDef = parseDef(propDef._def, {
|
|
7561
|
-
...refs,
|
|
7562
|
-
currentPath: [
|
|
7563
|
-
...refs.currentPath,
|
|
7564
|
-
"properties",
|
|
7565
|
-
propName
|
|
7566
|
-
],
|
|
7567
|
-
propertyPath: [
|
|
7568
|
-
...refs.currentPath,
|
|
7569
|
-
"properties",
|
|
7570
|
-
propName
|
|
7571
|
-
]
|
|
7572
|
-
});
|
|
7573
|
-
if (parsedDef === void 0) continue;
|
|
7574
|
-
result.properties[propName] = parsedDef;
|
|
7575
|
-
if (!propOptional) required.push(propName);
|
|
7576
|
-
}
|
|
7577
|
-
if (required.length) result.required = required;
|
|
7578
|
-
const additionalProperties = decideAdditionalProperties(def, refs);
|
|
7579
|
-
if (additionalProperties !== void 0) result.additionalProperties = additionalProperties;
|
|
7580
|
-
return result;
|
|
7581
|
-
}
|
|
7582
|
-
function decideAdditionalProperties(def, refs) {
|
|
7583
|
-
if (def.catchall._def.typeName !== "ZodNever") return parseDef(def.catchall._def, {
|
|
7584
|
-
...refs,
|
|
7585
|
-
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
7586
|
-
});
|
|
7587
|
-
switch (def.unknownKeys) {
|
|
7588
|
-
case "passthrough": return refs.allowedAdditionalProperties;
|
|
7589
|
-
case "strict": return refs.rejectedAdditionalProperties;
|
|
7590
|
-
case "strip": return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
|
|
7591
6829
|
}
|
|
7592
|
-
}
|
|
7593
|
-
function safeIsOptional(schema) {
|
|
7594
|
-
try {
|
|
7595
|
-
return schema.isOptional();
|
|
7596
|
-
} catch {
|
|
7597
|
-
return true;
|
|
7598
|
-
}
|
|
7599
|
-
}
|
|
7600
|
-
//#endregion
|
|
7601
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/optional.js
|
|
7602
|
-
var parseOptionalDef = (def, refs) => {
|
|
7603
|
-
if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
|
|
7604
|
-
const innerSchema = parseDef(def.innerType._def, {
|
|
7605
|
-
...refs,
|
|
7606
|
-
currentPath: [
|
|
7607
|
-
...refs.currentPath,
|
|
7608
|
-
"anyOf",
|
|
7609
|
-
"1"
|
|
7610
|
-
]
|
|
7611
|
-
});
|
|
7612
|
-
return innerSchema ? { anyOf: [{ not: parseAnyDef(refs) }, innerSchema] } : parseAnyDef(refs);
|
|
7613
6830
|
};
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
|
|
7619
|
-
const a = parseDef(def.in._def, {
|
|
7620
|
-
...refs,
|
|
7621
|
-
currentPath: [
|
|
7622
|
-
...refs.currentPath,
|
|
7623
|
-
"allOf",
|
|
7624
|
-
"0"
|
|
7625
|
-
]
|
|
6831
|
+
var zodToJSONSchema = /* @__NO_SIDE_EFFECTS__ */ (schema, options) => {
|
|
6832
|
+
return toJSONSchema(schema, {
|
|
6833
|
+
...defaultJSONSchemaOptions,
|
|
6834
|
+
...options
|
|
7626
6835
|
});
|
|
7627
|
-
return { allOf: [a, parseDef(def.out._def, {
|
|
7628
|
-
...refs,
|
|
7629
|
-
currentPath: [
|
|
7630
|
-
...refs.currentPath,
|
|
7631
|
-
"allOf",
|
|
7632
|
-
a ? "1" : "0"
|
|
7633
|
-
]
|
|
7634
|
-
})].filter((x) => x !== void 0) };
|
|
7635
6836
|
};
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
}
|
|
7641
|
-
//#endregion
|
|
7642
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/set.js
|
|
7643
|
-
function parseSetDef(def, refs) {
|
|
7644
|
-
const schema = {
|
|
7645
|
-
type: "array",
|
|
7646
|
-
uniqueItems: true,
|
|
7647
|
-
items: parseDef(def.valueType._def, {
|
|
7648
|
-
...refs,
|
|
7649
|
-
currentPath: [...refs.currentPath, "items"]
|
|
7650
|
-
})
|
|
7651
|
-
};
|
|
7652
|
-
if (def.minSize) setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs);
|
|
7653
|
-
if (def.maxSize) setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
|
|
7654
|
-
return schema;
|
|
7655
|
-
}
|
|
7656
|
-
//#endregion
|
|
7657
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/tuple.js
|
|
7658
|
-
function parseTupleDef(def, refs) {
|
|
7659
|
-
if (def.rest) return {
|
|
7660
|
-
type: "array",
|
|
7661
|
-
minItems: def.items.length,
|
|
7662
|
-
items: def.items.map((x, i) => parseDef(x._def, {
|
|
7663
|
-
...refs,
|
|
7664
|
-
currentPath: [
|
|
7665
|
-
...refs.currentPath,
|
|
7666
|
-
"items",
|
|
7667
|
-
`${i}`
|
|
7668
|
-
]
|
|
7669
|
-
})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
|
|
7670
|
-
additionalItems: parseDef(def.rest._def, {
|
|
7671
|
-
...refs,
|
|
7672
|
-
currentPath: [...refs.currentPath, "additionalItems"]
|
|
7673
|
-
})
|
|
7674
|
-
};
|
|
7675
|
-
else return {
|
|
7676
|
-
type: "array",
|
|
7677
|
-
minItems: def.items.length,
|
|
7678
|
-
maxItems: def.items.length,
|
|
7679
|
-
items: def.items.map((x, i) => parseDef(x._def, {
|
|
7680
|
-
...refs,
|
|
7681
|
-
currentPath: [
|
|
7682
|
-
...refs.currentPath,
|
|
7683
|
-
"items",
|
|
7684
|
-
`${i}`
|
|
7685
|
-
]
|
|
7686
|
-
})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
|
|
7687
|
-
};
|
|
7688
|
-
}
|
|
7689
|
-
//#endregion
|
|
7690
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/undefined.js
|
|
7691
|
-
function parseUndefinedDef(refs) {
|
|
7692
|
-
return { not: parseAnyDef(refs) };
|
|
7693
|
-
}
|
|
7694
|
-
//#endregion
|
|
7695
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/unknown.js
|
|
7696
|
-
function parseUnknownDef(refs) {
|
|
7697
|
-
return parseAnyDef(refs);
|
|
7698
|
-
}
|
|
7699
|
-
//#endregion
|
|
7700
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parsers/readonly.js
|
|
7701
|
-
var parseReadonlyDef = (def, refs) => {
|
|
7702
|
-
return parseDef(def.innerType._def, refs);
|
|
7703
|
-
};
|
|
7704
|
-
//#endregion
|
|
7705
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/selectParser.js
|
|
7706
|
-
var selectParser = (def, typeName, refs) => {
|
|
7707
|
-
switch (typeName) {
|
|
7708
|
-
case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
|
|
7709
|
-
case ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);
|
|
7710
|
-
case ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);
|
|
7711
|
-
case ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);
|
|
7712
|
-
case ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();
|
|
7713
|
-
case ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);
|
|
7714
|
-
case ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);
|
|
7715
|
-
case ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);
|
|
7716
|
-
case ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);
|
|
7717
|
-
case ZodFirstPartyTypeKind.ZodUnion:
|
|
7718
|
-
case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);
|
|
7719
|
-
case ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);
|
|
7720
|
-
case ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);
|
|
7721
|
-
case ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);
|
|
7722
|
-
case ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);
|
|
7723
|
-
case ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);
|
|
7724
|
-
case ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);
|
|
7725
|
-
case ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);
|
|
7726
|
-
case ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);
|
|
7727
|
-
case ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);
|
|
7728
|
-
case ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);
|
|
7729
|
-
case ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;
|
|
7730
|
-
case ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);
|
|
7731
|
-
case ZodFirstPartyTypeKind.ZodNaN:
|
|
7732
|
-
case ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);
|
|
7733
|
-
case ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);
|
|
7734
|
-
case ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);
|
|
7735
|
-
case ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);
|
|
7736
|
-
case ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);
|
|
7737
|
-
case ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);
|
|
7738
|
-
case ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);
|
|
7739
|
-
case ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);
|
|
7740
|
-
case ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);
|
|
7741
|
-
case ZodFirstPartyTypeKind.ZodFunction:
|
|
7742
|
-
case ZodFirstPartyTypeKind.ZodVoid:
|
|
7743
|
-
case ZodFirstPartyTypeKind.ZodSymbol: return;
|
|
7744
|
-
default:
|
|
7745
|
-
/* c8 ignore next */
|
|
7746
|
-
return ((_) => void 0)();
|
|
7747
|
-
}
|
|
7748
|
-
};
|
|
7749
|
-
//#endregion
|
|
7750
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/parseDef.js
|
|
7751
|
-
function parseDef(def, refs, forceResolution = false) {
|
|
7752
|
-
const seenItem = refs.seen.get(def);
|
|
7753
|
-
if (refs.override) {
|
|
7754
|
-
const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);
|
|
7755
|
-
if (overrideResult !== ignoreOverride) return overrideResult;
|
|
7756
|
-
}
|
|
7757
|
-
if (seenItem && !forceResolution) {
|
|
7758
|
-
const seenSchema = get$ref(seenItem, refs);
|
|
7759
|
-
if (seenSchema !== void 0) return seenSchema;
|
|
6837
|
+
async function validate(schema, data, error) {
|
|
6838
|
+
if (error === void 0) {
|
|
6839
|
+
const zConfig = config();
|
|
6840
|
+
error = zConfig.customError ?? zConfig.localeError;
|
|
7760
6841
|
}
|
|
7761
|
-
const
|
|
7762
|
-
def,
|
|
7763
|
-
path: refs.currentPath,
|
|
7764
|
-
jsonSchema: void 0
|
|
7765
|
-
};
|
|
7766
|
-
refs.seen.set(def, newItem);
|
|
7767
|
-
const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);
|
|
7768
|
-
const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
|
|
7769
|
-
if (jsonSchema) addMeta(def, refs, jsonSchema);
|
|
7770
|
-
if (refs.postProcess) {
|
|
7771
|
-
const postProcessResult = refs.postProcess(jsonSchema, def, refs);
|
|
7772
|
-
newItem.jsonSchema = jsonSchema;
|
|
7773
|
-
return postProcessResult;
|
|
7774
|
-
}
|
|
7775
|
-
newItem.jsonSchema = jsonSchema;
|
|
7776
|
-
return jsonSchema;
|
|
7777
|
-
}
|
|
7778
|
-
var get$ref = (item, refs) => {
|
|
7779
|
-
switch (refs.$refStrategy) {
|
|
7780
|
-
case "root": return { $ref: item.path.join("/") };
|
|
7781
|
-
case "relative": return { $ref: getRelativePath(refs.currentPath, item.path) };
|
|
7782
|
-
case "none":
|
|
7783
|
-
case "seen":
|
|
7784
|
-
if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
|
|
7785
|
-
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
|
|
7786
|
-
return parseAnyDef(refs);
|
|
7787
|
-
}
|
|
7788
|
-
return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0;
|
|
7789
|
-
}
|
|
7790
|
-
};
|
|
7791
|
-
var addMeta = (def, refs, jsonSchema) => {
|
|
7792
|
-
if (def.description) {
|
|
7793
|
-
jsonSchema.description = def.description;
|
|
7794
|
-
if (refs.markdownDescription) jsonSchema.markdownDescription = def.description;
|
|
7795
|
-
}
|
|
7796
|
-
return jsonSchema;
|
|
7797
|
-
};
|
|
7798
|
-
//#endregion
|
|
7799
|
-
//#region ../../node_modules/.pnpm/zod-v3-to-json-schema@4.0.0_zod@4.4.3/node_modules/zod-v3-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
7800
|
-
var zodToJsonSchema = (schema, options) => {
|
|
7801
|
-
const refs = getRefs(options);
|
|
7802
|
-
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({
|
|
7803
|
-
...acc,
|
|
7804
|
-
[name]: parseDef(schema._def, {
|
|
7805
|
-
...refs,
|
|
7806
|
-
currentPath: [
|
|
7807
|
-
...refs.basePath,
|
|
7808
|
-
refs.definitionPath,
|
|
7809
|
-
name
|
|
7810
|
-
]
|
|
7811
|
-
}, true) ?? parseAnyDef(refs)
|
|
7812
|
-
}), {}) : void 0;
|
|
7813
|
-
const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name;
|
|
7814
|
-
const main = parseDef(schema._def, name === void 0 ? refs : {
|
|
7815
|
-
...refs,
|
|
7816
|
-
currentPath: [
|
|
7817
|
-
...refs.basePath,
|
|
7818
|
-
refs.definitionPath,
|
|
7819
|
-
name
|
|
7820
|
-
]
|
|
7821
|
-
}, false) ?? parseAnyDef(refs);
|
|
7822
|
-
const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0;
|
|
7823
|
-
if (title !== void 0) main.title = title;
|
|
7824
|
-
if (refs.flags.hasReferencedOpenAiAnyType) {
|
|
7825
|
-
if (!definitions) definitions = {};
|
|
7826
|
-
if (!definitions[refs.openAiAnyTypeName]) definitions[refs.openAiAnyTypeName] = {
|
|
7827
|
-
type: [
|
|
7828
|
-
"string",
|
|
7829
|
-
"number",
|
|
7830
|
-
"integer",
|
|
7831
|
-
"boolean",
|
|
7832
|
-
"array",
|
|
7833
|
-
"null"
|
|
7834
|
-
],
|
|
7835
|
-
items: { $ref: refs.$refStrategy === "relative" ? "1" : [
|
|
7836
|
-
...refs.basePath,
|
|
7837
|
-
refs.definitionPath,
|
|
7838
|
-
refs.openAiAnyTypeName
|
|
7839
|
-
].join("/") }
|
|
7840
|
-
};
|
|
7841
|
-
}
|
|
7842
|
-
const combined = name === void 0 ? definitions ? {
|
|
7843
|
-
...main,
|
|
7844
|
-
[refs.definitionPath]: definitions
|
|
7845
|
-
} : main : {
|
|
7846
|
-
$ref: [
|
|
7847
|
-
...refs.$refStrategy === "relative" ? [] : refs.basePath,
|
|
7848
|
-
refs.definitionPath,
|
|
7849
|
-
name
|
|
7850
|
-
].join("/"),
|
|
7851
|
-
[refs.definitionPath]: {
|
|
7852
|
-
...definitions,
|
|
7853
|
-
[name]: main
|
|
7854
|
-
}
|
|
7855
|
-
};
|
|
7856
|
-
if (refs.target === "jsonSchema7") combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
7857
|
-
else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
|
|
7858
|
-
if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
|
|
7859
|
-
return combined;
|
|
7860
|
-
};
|
|
7861
|
-
//#endregion
|
|
7862
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_ef83fd3a6ee9a76672bb934bc7f1e3e7/node_modules/sveltekit-superforms/dist/adapters/zod.js
|
|
7863
|
-
var defaultOptions = {
|
|
7864
|
-
dateStrategy: "integer",
|
|
7865
|
-
pipeStrategy: "output",
|
|
7866
|
-
$refStrategy: "none"
|
|
7867
|
-
};
|
|
7868
|
-
var zodToJSONSchema = /* @__NO_SIDE_EFFECTS__ */ (...params) => {
|
|
7869
|
-
params[1] = typeof params[1] == "object" ? {
|
|
7870
|
-
...defaultOptions,
|
|
7871
|
-
...params[1]
|
|
7872
|
-
} : defaultOptions;
|
|
7873
|
-
return zodToJsonSchema(...params);
|
|
7874
|
-
};
|
|
7875
|
-
async function validate(schema, data, errorMap) {
|
|
7876
|
-
const result = await schema.safeParseAsync(data, { errorMap });
|
|
6842
|
+
const result = await safeParseAsync(schema, data, { error });
|
|
7877
6843
|
if (result.success) return {
|
|
7878
6844
|
data: result.data,
|
|
7879
6845
|
success: true
|
|
@@ -7886,24 +6852,30 @@ async function validate(schema, data, errorMap) {
|
|
|
7886
6852
|
success: false
|
|
7887
6853
|
};
|
|
7888
6854
|
}
|
|
7889
|
-
function
|
|
7890
|
-
if ("_zod" in schema && typeof schema._zod === "object") console.warn("[superforms] Zod v4 schema detected but using Zod v3 adapter. Import { zod4 } from \"sveltekit-superforms/adapters\" instead of { zod } for Zod v4 support.");
|
|
6855
|
+
function _zod4(schema, options) {
|
|
7891
6856
|
return /* @__PURE__ */ createAdapter({
|
|
7892
|
-
superFormValidationLibrary: "
|
|
6857
|
+
superFormValidationLibrary: "zod4",
|
|
7893
6858
|
validate: async (data) => {
|
|
7894
|
-
return validate(schema, data, options?.
|
|
6859
|
+
return validate(schema, data, options?.error);
|
|
7895
6860
|
},
|
|
7896
6861
|
jsonSchema: options?.jsonSchema ?? /* @__PURE__ */ zodToJSONSchema(schema, options?.config),
|
|
7897
6862
|
defaults: options?.defaults
|
|
7898
6863
|
});
|
|
7899
6864
|
}
|
|
7900
|
-
var zod = /* @__PURE__ */ memoize(
|
|
6865
|
+
var zod = /* @__PURE__ */ memoize(_zod4);
|
|
7901
6866
|
//#endregion
|
|
7902
6867
|
//#region src/lib/form/zod-from-column.ts
|
|
6868
|
+
function dbCanSupplyColumn(column) {
|
|
6869
|
+
return column.defaultExpr !== null || column.readonly;
|
|
6870
|
+
}
|
|
7903
6871
|
function zodFromColumn(column) {
|
|
7904
|
-
|
|
7905
|
-
if (column
|
|
7906
|
-
|
|
6872
|
+
const base = pickBase(column);
|
|
6873
|
+
if (dbCanSupplyColumn(column)) {
|
|
6874
|
+
const inner = column.nullable ? base.nullable() : base;
|
|
6875
|
+
return z.union([z.literal(""), inner]);
|
|
6876
|
+
}
|
|
6877
|
+
if (column.nullable) return base.nullable();
|
|
6878
|
+
return base;
|
|
7907
6879
|
}
|
|
7908
6880
|
function pickBase(column) {
|
|
7909
6881
|
switch (column.widget) {
|
|
@@ -7916,7 +6888,7 @@ function pickBase(column) {
|
|
|
7916
6888
|
if (column.enumValues && column.enumValues.length > 0) return z.enum(column.enumValues);
|
|
7917
6889
|
return z.string();
|
|
7918
6890
|
case "relation-select": return z.union([z.string(), z.number()]);
|
|
7919
|
-
case "uuid": return z.
|
|
6891
|
+
case "uuid": return z.guid();
|
|
7920
6892
|
case "json": return z.unknown();
|
|
7921
6893
|
case "image-url":
|
|
7922
6894
|
case "text":
|
|
@@ -7925,6 +6897,21 @@ function pickBase(column) {
|
|
|
7925
6897
|
}
|
|
7926
6898
|
}
|
|
7927
6899
|
//#endregion
|
|
6900
|
+
//#region src/lib/form/mutation-payload.ts
|
|
6901
|
+
function isEmpty(value) {
|
|
6902
|
+
return value === "" || value === void 0;
|
|
6903
|
+
}
|
|
6904
|
+
function buildMutationPayload(table, data) {
|
|
6905
|
+
const byName = new Map(table.columns.map((c) => [c.name, c]));
|
|
6906
|
+
const payload = {};
|
|
6907
|
+
for (const [key, value] of Object.entries(data)) {
|
|
6908
|
+
const column = byName.get(key);
|
|
6909
|
+
if (column && dbCanSupplyColumn(column) && isEmpty(value)) continue;
|
|
6910
|
+
payload[key] = value;
|
|
6911
|
+
}
|
|
6912
|
+
return payload;
|
|
6913
|
+
}
|
|
6914
|
+
//#endregion
|
|
7928
6915
|
//#region src/lib/form/zod-from-table.ts
|
|
7929
6916
|
function zodFromTable(table) {
|
|
7930
6917
|
const shape = {};
|
|
@@ -7932,5 +6919,5 @@ function zodFromTable(table) {
|
|
|
7932
6919
|
return z.object(shape);
|
|
7933
6920
|
}
|
|
7934
6921
|
|
|
7935
|
-
export { superValidate as a,
|
|
7936
|
-
//# sourceMappingURL=zod-from-table-
|
|
6922
|
+
export { superValidate as a, buildMutationPayload as b, zodFromTable as c, superForm as s, zod as z };
|
|
6923
|
+
//# sourceMappingURL=zod-from-table-Cqu9YCfY.js.map
|