@oneclick.dev/cms-core-modules 0.0.123 → 0.0.124

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.
Files changed (98) hide show
  1. package/dist/{ContentEditor-C-Wm48ai.js → ContentEditor-BcIUumah.js} +39 -39
  2. package/dist/{ContentEditor-MDGolnIP.mjs → ContentEditor-DX1bTQKs.mjs} +4910 -4793
  3. package/dist/{Detail-Dk8E6_uF.mjs → Detail-B7pe808q.mjs} +15 -14
  4. package/dist/Detail-BESGmY7z.js +1 -0
  5. package/dist/{Detail-Cn9Bk0u0.mjs → Detail-B_Q7Qkuz.mjs} +26 -25
  6. package/dist/Detail-CNiLIEh9.js +1 -0
  7. package/dist/{Detail-B_scnidb.mjs → Detail-DNxAzeCs.mjs} +35 -34
  8. package/dist/Detail-t3tOcy3X.js +1 -0
  9. package/dist/Editor-D4evcdhv.mjs +768 -0
  10. package/dist/Editor-gLLtuJbY.js +1 -0
  11. package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-BjKpsqT9.js +1 -0
  12. package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-D5v5AhLe.mjs +76 -0
  13. package/dist/Knowledge-B66vxz--.js +1 -0
  14. package/dist/Knowledge-BnMTTuJ7.mjs +742 -0
  15. package/dist/Overview-BE4uYPx0.mjs +745 -0
  16. package/dist/Overview-CQRpFhbJ.mjs +286 -0
  17. package/dist/Overview-CTs7sX4d.js +1 -0
  18. package/dist/Overview-Cj89XXKN.js +1 -0
  19. package/dist/Overview-D_c18mbR.mjs +248 -0
  20. package/dist/Overview-g4Rcj245.js +1 -0
  21. package/dist/TableView-6mdrL3zx.js +4 -0
  22. package/dist/{TableView-C4Zyp8d7.mjs → TableView-Du5nOE6R.mjs} +2 -2
  23. package/dist/Test-CzmOmi53.mjs +447 -0
  24. package/dist/Test-USDtNFY1.js +1 -0
  25. package/dist/UserDetail-DpUL3mhk.mjs +1483 -0
  26. package/dist/UserDetail-KRIfxaYd.js +1 -0
  27. package/dist/cms-core-modules.css +1 -1
  28. package/dist/index-CQuN5rKx.js +1 -0
  29. package/dist/index-CnDGeInm.js +1 -0
  30. package/dist/index-CqDTc5Ig.mjs +20 -0
  31. package/dist/index-CyvvAdt4.js +1 -0
  32. package/dist/index-DIRD7t5_.mjs +20 -0
  33. package/dist/index-OJuBYR60.mjs +57 -0
  34. package/dist/index.cjs.js +1 -1
  35. package/dist/index.mjs +327 -84
  36. package/dist/server-handlers.cjs.js +1 -1
  37. package/dist/server-handlers.mjs +1764 -605
  38. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.d.ts +1 -1
  39. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.d.ts +7 -0
  40. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.d.ts +7 -0
  41. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/resizeHistory.d.ts +9 -0
  42. package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +3 -1
  43. package/dist/src/firebaseAuthManager/components/DeleteUserDialog.vue.d.ts +25 -0
  44. package/dist/src/firebaseAuthManager/components/ReasonActionDialog.vue.d.ts +23 -0
  45. package/dist/src/firebaseAuthManager/components/UserStatusBadge.vue.d.ts +5 -0
  46. package/dist/src/firebaseAuthManager/config.d.ts +151 -0
  47. package/dist/src/firebaseAuthManager/index.d.ts +163 -0
  48. package/dist/src/firebaseAuthManager/index.vue.d.ts +14 -0
  49. package/dist/src/firebaseAuthManager/metadata.d.ts +2 -0
  50. package/dist/src/firebaseAuthManager/pages/Overview.vue.d.ts +2 -0
  51. package/dist/src/firebaseAuthManager/pages/UserDetail.vue.d.ts +2 -0
  52. package/dist/src/firebaseAuthManager/permissions.d.ts +5 -0
  53. package/dist/src/firebaseAuthManager/routes.d.ts +5 -0
  54. package/dist/src/firebaseAuthManager/server.d.ts +162 -0
  55. package/dist/src/firebaseAuthManager/types.d.ts +84 -0
  56. package/dist/src/formBuilder/components/FormPreviewDialog.vue.d.ts +12 -0
  57. package/dist/src/formBuilder/components/FormStatusBadge.vue.d.ts +9 -0
  58. package/dist/src/formBuilder/config.d.ts +31 -0
  59. package/dist/src/formBuilder/index.d.ts +44 -0
  60. package/dist/src/formBuilder/index.vue.d.ts +14 -0
  61. package/dist/src/formBuilder/lib/forms.d.ts +11 -0
  62. package/dist/src/formBuilder/metadata.d.ts +2 -0
  63. package/dist/src/formBuilder/pages/Editor.vue.d.ts +2 -0
  64. package/dist/src/formBuilder/pages/Overview.vue.d.ts +2 -0
  65. package/dist/src/formBuilder/permissions.d.ts +5 -0
  66. package/dist/src/formBuilder/routes.d.ts +5 -0
  67. package/dist/src/formBuilder/server.d.ts +87 -0
  68. package/dist/src/formBuilder/tools.d.ts +1 -0
  69. package/dist/src/formBuilder/types.d.ts +46 -0
  70. package/dist/src/helpbot/composables/useHelpbotApi.d.ts +18 -0
  71. package/dist/src/helpbot/config.d.ts +17 -0
  72. package/dist/src/helpbot/index.d.ts +29 -0
  73. package/dist/src/helpbot/index.vue.d.ts +2 -0
  74. package/dist/src/helpbot/metadata.d.ts +2 -0
  75. package/dist/src/helpbot/pages/Knowledge.vue.d.ts +4 -0
  76. package/dist/src/helpbot/pages/Overview.vue.d.ts +2 -0
  77. package/dist/src/helpbot/pages/Test.vue.d.ts +4 -0
  78. package/dist/src/helpbot/permissions.d.ts +5 -0
  79. package/dist/src/helpbot/routes.d.ts +5 -0
  80. package/dist/src/helpbot/types.d.ts +42 -0
  81. package/dist/src/index.d.ts +3 -0
  82. package/dist/src/server-handlers.d.ts +2 -0
  83. package/dist/types-9N-DKxNj.mjs +250 -0
  84. package/dist/types-BMraG1kN.js +1 -0
  85. package/dist/types-Cem0vPo_.js +1 -0
  86. package/dist/types-ibC3-e1N.mjs +2630 -0
  87. package/dist/useHelpbotApi-BIIungOh.js +1 -0
  88. package/dist/useHelpbotApi-HC9JSiSn.mjs +229 -0
  89. package/dist/vee-validate-zod-BQElPD0m.js +1 -0
  90. package/dist/vee-validate-zod-CN16K2x9.mjs +1780 -0
  91. package/package.json +2 -2
  92. package/src/formBuilder/tools.ts +1 -0
  93. package/dist/Detail-BCUUNWvp.js +0 -1
  94. package/dist/Detail-DGg_xXZc.js +0 -1
  95. package/dist/Detail-Sc2qZdxj.js +0 -1
  96. package/dist/TableView-BkwoKREo.js +0 -4
  97. package/dist/vee-validate-zod-SjDT8X35.mjs +0 -4404
  98. package/dist/vee-validate-zod-VCmLnrtQ.js +0 -1
@@ -0,0 +1,250 @@
1
+ import { defineComponent as M, resolveComponent as s, openBlock as u, createBlock as m, normalizeClass as I, withCtx as n, unref as f, createTextVNode as d, toDisplayString as c, ref as z, computed as L, watch as $, createVNode as a, createElementVNode as g, withKeys as R, withModifiers as _, createCommentVNode as x } from "vue";
2
+ import { ShieldX as H, ShieldCheck as K, AlertTriangle as C, Loader2 as P } from "lucide-vue-next";
3
+ const O = /* @__PURE__ */ M({
4
+ __name: "UserStatusBadge",
5
+ props: {
6
+ disabled: { type: Boolean }
7
+ },
8
+ setup(e) {
9
+ return (o, t) => {
10
+ const i = s("Badge");
11
+ return u(), m(i, {
12
+ variant: "outline",
13
+ class: I(["gap-1.5 whitespace-nowrap", e.disabled ? "border-amber-400/60 bg-amber-50 text-amber-800 dark:border-amber-700/70 dark:bg-amber-950/40 dark:text-amber-300" : "border-emerald-400/60 bg-emerald-50 text-emerald-800 dark:border-emerald-700/70 dark:bg-emerald-950/40 dark:text-emerald-300"])
14
+ }, {
15
+ default: n(() => [
16
+ e.disabled ? (u(), m(f(H), {
17
+ key: 0,
18
+ class: "size-3.5"
19
+ })) : (u(), m(f(K), {
20
+ key: 1,
21
+ class: "size-3.5"
22
+ })),
23
+ d(" " + c(e.disabled ? "Suspended" : "Enabled"), 1)
24
+ ]),
25
+ _: 1
26
+ }, 8, ["class"]);
27
+ };
28
+ }
29
+ }), W = { class: "space-y-4 py-5" }, G = { class: "space-y-2" }, Z = /* @__PURE__ */ M({
30
+ __name: "ReasonActionDialog",
31
+ props: {
32
+ open: { type: Boolean },
33
+ title: {},
34
+ description: {},
35
+ confirmLabel: {},
36
+ subject: { default: "" },
37
+ busy: { type: Boolean, default: !1 },
38
+ error: { default: "" },
39
+ destructive: { type: Boolean, default: !1 }
40
+ },
41
+ emits: ["update:open", "confirm"],
42
+ setup(e, { emit: o }) {
43
+ const t = e, i = o, l = z(""), p = L(() => l.value.trim().length >= 3 && !t.busy);
44
+ $(() => t.open, (v) => {
45
+ v && (l.value = "");
46
+ });
47
+ function S() {
48
+ t.busy || i("update:open", !1);
49
+ }
50
+ function b() {
51
+ p.value && i("confirm", l.value.trim());
52
+ }
53
+ return (v, r) => {
54
+ const T = s("ResponsiveModalTitle"), U = s("ResponsiveModalDescription"), D = s("ResponsiveModalHeader"), h = s("AlertTitle"), w = s("AlertDescription"), k = s("Alert"), N = s("Label"), F = s("Textarea"), A = s("Button"), E = s("ResponsiveModalFooter"), V = s("ResponsiveModalScrollContent"), j = s("ResponsiveModal");
55
+ return u(), m(j, {
56
+ open: e.open,
57
+ "onUpdate:open": r[1] || (r[1] = (y) => i("update:open", y))
58
+ }, {
59
+ default: n(() => [
60
+ a(V, { class: "sm:max-w-lg" }, {
61
+ default: n(() => [
62
+ a(D, null, {
63
+ default: n(() => [
64
+ a(T, null, {
65
+ default: n(() => [
66
+ d(c(e.title), 1)
67
+ ]),
68
+ _: 1
69
+ }),
70
+ a(U, { class: "break-words" }, {
71
+ default: n(() => [
72
+ d(c(e.description), 1)
73
+ ]),
74
+ _: 1
75
+ })
76
+ ]),
77
+ _: 1
78
+ }),
79
+ g("div", W, [
80
+ a(k, {
81
+ variant: e.destructive ? "destructive" : "default"
82
+ }, {
83
+ default: n(() => [
84
+ a(f(C)),
85
+ a(h, { class: "break-all" }, {
86
+ default: n(() => [
87
+ d(c(e.subject || "Confirm this account change"), 1)
88
+ ]),
89
+ _: 1
90
+ }),
91
+ a(w, null, {
92
+ default: n(() => [...r[2] || (r[2] = [
93
+ d(" Studio will attempt to add this action to its activity history. ", -1)
94
+ ])]),
95
+ _: 1
96
+ })
97
+ ]),
98
+ _: 1
99
+ }, 8, ["variant"]),
100
+ g("div", G, [
101
+ a(N, { for: "firebase-user-action-reason" }, {
102
+ default: n(() => [...r[3] || (r[3] = [
103
+ d("Reason", -1)
104
+ ])]),
105
+ _: 1
106
+ }),
107
+ a(F, {
108
+ id: "firebase-user-action-reason",
109
+ modelValue: l.value,
110
+ "onUpdate:modelValue": r[0] || (r[0] = (y) => l.value = y),
111
+ rows: "3",
112
+ maxlength: "500",
113
+ placeholder: "Why is this change needed?",
114
+ disabled: e.busy,
115
+ onKeydown: [
116
+ R(_(b, ["meta", "prevent"]), ["enter"]),
117
+ R(_(b, ["ctrl", "prevent"]), ["enter"])
118
+ ]
119
+ }, null, 8, ["modelValue", "disabled", "onKeydown"]),
120
+ r[4] || (r[4] = g("p", { class: "text-xs text-muted-foreground" }, "At least 3 characters; required for the Studio activity record.", -1))
121
+ ]),
122
+ e.error ? (u(), m(k, {
123
+ key: 0,
124
+ variant: "destructive"
125
+ }, {
126
+ default: n(() => [
127
+ a(f(C)),
128
+ a(h, null, {
129
+ default: n(() => [...r[5] || (r[5] = [
130
+ d("The action failed", -1)
131
+ ])]),
132
+ _: 1
133
+ }),
134
+ a(w, null, {
135
+ default: n(() => [
136
+ d(c(e.error), 1)
137
+ ]),
138
+ _: 1
139
+ })
140
+ ]),
141
+ _: 1
142
+ })) : x("", !0)
143
+ ]),
144
+ a(E, { class: "gap-2 sm:justify-end" }, {
145
+ default: n(() => [
146
+ a(A, {
147
+ variant: "outline",
148
+ disabled: e.busy,
149
+ onClick: S
150
+ }, {
151
+ default: n(() => [...r[6] || (r[6] = [
152
+ d("Cancel", -1)
153
+ ])]),
154
+ _: 1
155
+ }, 8, ["disabled"]),
156
+ a(A, {
157
+ variant: e.destructive ? "destructive" : "default",
158
+ disabled: !p.value,
159
+ onClick: b
160
+ }, {
161
+ default: n(() => [
162
+ e.busy ? (u(), m(f(P), {
163
+ key: 0,
164
+ class: "size-4 animate-spin"
165
+ })) : x("", !0),
166
+ d(" " + c(e.busy ? "Working…" : e.confirmLabel), 1)
167
+ ]),
168
+ _: 1
169
+ }, 8, ["variant", "disabled"])
170
+ ]),
171
+ _: 1
172
+ })
173
+ ]),
174
+ _: 1
175
+ })
176
+ ]),
177
+ _: 1
178
+ }, 8, ["open"]);
179
+ };
180
+ }
181
+ });
182
+ function J(e, o) {
183
+ if (!e || typeof e != "object") return o;
184
+ const t = e;
185
+ return t.data?.statusMessage || t.data?.message || t.statusMessage || t.message || o;
186
+ }
187
+ function Q(e) {
188
+ return "user" in e ? e.user : e;
189
+ }
190
+ function Y(e) {
191
+ return !!(e && typeof e == "object" && "auditRecorded" in e && e.auditRecorded === !1);
192
+ }
193
+ function B(e) {
194
+ const o = new TextEncoder().encode(e);
195
+ let t = "";
196
+ for (const i of o) t += String.fromCharCode(i);
197
+ return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
198
+ }
199
+ function ee(e) {
200
+ if (!/^[A-Za-z0-9_-]{1,1024}$/.test(e)) throw new Error("Invalid Firebase UID token.");
201
+ const o = e.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(e.length / 4) * 4, "="), t = atob(o), i = Uint8Array.from(t, (p) => p.charCodeAt(0)), l = new TextDecoder("utf-8", { fatal: !0 }).decode(i);
202
+ if (!l || l.length > 128 || B(l) !== e)
203
+ throw new Error("Invalid Firebase UID token.");
204
+ return l;
205
+ }
206
+ function te(e) {
207
+ return `user/${B(e)}`;
208
+ }
209
+ function oe(e) {
210
+ const o = Array.isArray(e) ? e : String(e || "").split(",");
211
+ return [...new Set(o.map((t) => t.trim()).filter(Boolean))];
212
+ }
213
+ function ae(e) {
214
+ if (!e) return "Never";
215
+ const o = new Date(e);
216
+ return Number.isNaN(o.getTime()) ? "Unknown" : new Intl.DateTimeFormat(void 0, {
217
+ dateStyle: "medium",
218
+ timeStyle: "short"
219
+ }).format(o);
220
+ }
221
+ function ne(e) {
222
+ return {
223
+ password: "Email & password",
224
+ phone: "Phone",
225
+ "google.com": "Google",
226
+ "apple.com": "Apple",
227
+ "facebook.com": "Facebook",
228
+ "github.com": "GitHub",
229
+ "microsoft.com": "Microsoft",
230
+ "twitter.com": "X / Twitter",
231
+ anonymous: "Anonymous"
232
+ }[e] || e;
233
+ }
234
+ function re(e) {
235
+ return (e.displayName || e.email || e.phoneNumber || e.uid).split(/[\s@._+-]+/).filter(Boolean).slice(0, 2).map((i) => i[0]?.toUpperCase()).join("") || "U";
236
+ }
237
+ export {
238
+ O as _,
239
+ ne as a,
240
+ ae as b,
241
+ Z as c,
242
+ J as d,
243
+ B as e,
244
+ te as f,
245
+ re as g,
246
+ ee as h,
247
+ Y as m,
248
+ oe as p,
249
+ Q as u
250
+ };
@@ -0,0 +1 @@
1
+ "use strict";var _;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(_||(_={}));var ee;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Z=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},o=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let d=r,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),r}static assert(e){if(!(e instanceof T))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const J=(s,e)=>{let t;switch(s.code){case o.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case o.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,_.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(s.keys,", ")}`;break;case o.invalid_union:t="Invalid input";break;case o.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(s.options)}`;break;case o.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(s.options)}, received '${s.received}'`;break;case o.invalid_arguments:t="Invalid function arguments";break;case o.invalid_return_type:t="Invalid function return type";break;case o.invalid_date:t="Invalid date";break;case o.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:_.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case o.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case o.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case o.custom:t="Invalid input";break;case o.invalid_intersection_types:t="Intersection results could not be merged";break;case o.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case o.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(s)}return{message:t}};let ge=J;function ve(){return ge}const xe=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function c(s,e){const t=ve(),r=xe({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===J?void 0:J].filter(a=>!!a)});s.common.issues.push(r)}class x{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return p;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return x.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return p;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const p=Object.freeze({status:"aborted"}),M=s=>({status:"dirty",value:s}),k=s=>({status:"valid",value:s}),te=s=>s.status==="aborted",se=s=>s.status==="dirty",P=s=>s.status==="valid",z=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(l||(l={}));class O{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const re=(s,e)=>{if(P(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function m(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??r??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return Z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x,ctx:{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(z(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)},a=this._parseSync({data:e,path:r.path,parent:r});return re(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return P(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>P(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(z(a)?a:Promise.resolve(a));return re(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:o.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new j({schema:this,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return C.create(this,this._def)}nullable(){return F.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return b.create(this)}promise(){return B.create(this,this._def)}or(e){return D.create([this,e],this._def)}and(e){return U.create(this,e,this._def)}transform(e){return new j({...m(this._def),schema:this,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new W({...m(this._def),innerType:this,defaultValue:t,typeName:exports.ZodFirstPartyTypeKind.ZodDefault})}brand(){return new De({typeName:exports.ZodFirstPartyTypeKind.ZodBranded,type:this,...m(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({...m(this._def),innerType:this,catchValue:t,typeName:exports.ZodFirstPartyTypeKind.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return X.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ke=/^c[^\s-]{8,}$/i,be=/^[0-9a-z]+$/,we=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Te=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ze=/^[a-z0-9_-]{21}$/i,Ce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Oe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Se=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Ae=/^(?:(?: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])$/,Re=/^(?:(?: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])$/,je=/^(([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]))$/,Ie=/^(([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])$/,Pe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ee=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pe="((\\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])))",$e=new RegExp(`^${pe}$`);function me(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Fe(s){return new RegExp(`^${me(s)}$`)}function Ve(s){let e=`${pe}T${me(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Me(s,e){return!!((e==="v4"||!e)&&Ae.test(s)||(e==="v6"||!e)&&je.test(s))}function Le(s,e){if(!Ce.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function ze(s,e){return!!((e==="v4"||!e)&&Re.test(s)||(e==="v6"||!e)&&Ie.test(s))}class w extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.string,received:n.parsedType}),p}const r=new x;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Se.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"email",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ne,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"emoji",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Te.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"uuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ze.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"nanoid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")ke.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")be.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid2",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")we.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ulid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),c(a,{validation:"url",code:o.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"regex",code:o.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Ve(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?$e.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Fe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"duration",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Me(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ip",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?Le(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"jwt",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?ze(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cidr",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Ee.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64url",code:o.invalid_string,message:n.message}),r.dirty()):_.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:o.invalid_string,...l.errToObj(r)})}_addCheck(e){return new w({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...l.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...l.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...l.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new w({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new w({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new w({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}w.create=s=>new w({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodString,coerce:s?.coerce??!1,...m(s)});function Ke(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class N extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.number,received:n.parsedType}),p}let r;const a=new x;for(const n of this._def.checks)n.kind==="int"?_.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?Ke(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_finite,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new N({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}N.create=s=>new N({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodNumber,coerce:s?.coerce||!1,...m(s)});class A extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new x;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}A.create=s=>new A({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodBigInt,coerce:s?.coerce??!1,...m(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.boolean,received:r.parsedType}),p}return k(e.data)}}K.create=s=>new K({typeName:exports.ZodFirstPartyTypeKind.ZodBoolean,coerce:s?.coerce||!1,...m(s)});class E extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.date,received:n.parsedType}),p}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_date}),p}const r=new x;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):_.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}E.create=s=>new E({checks:[],coerce:s?.coerce||!1,typeName:exports.ZodFirstPartyTypeKind.ZodDate,...m(s)});class ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.symbol,received:r.parsedType}),p}return k(e.data)}}ae.create=s=>new ae({typeName:exports.ZodFirstPartyTypeKind.ZodSymbol,...m(s)});class ne extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.undefined,received:r.parsedType}),p}return k(e.data)}}ne.create=s=>new ne({typeName:exports.ZodFirstPartyTypeKind.ZodUndefined,...m(s)});class ie extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.null,received:r.parsedType}),p}return k(e.data)}}ie.create=s=>new ie({typeName:exports.ZodFirstPartyTypeKind.ZodNull,...m(s)});class Y extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}}Y.create=s=>new Y({typeName:exports.ZodFirstPartyTypeKind.ZodAny,...m(s)});class de extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}de.create=s=>new de({typeName:exports.ZodFirstPartyTypeKind.ZodUnknown,...m(s)});class S extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.never,received:t.parsedType}),p}}S.create=s=>new S({typeName:exports.ZodFirstPartyTypeKind.ZodNever,...m(s)});class oe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.void,received:r.parsedType}),p}return k(e.data)}}oe.create=s=>new oe({typeName:exports.ZodFirstPartyTypeKind.ZodVoid,...m(s)});class b extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:o.invalid_type,expected:u.array,received:t.parsedType}),p;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(c(t,{code:i?o.too_big:o.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(c(t,{code:o.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(c(t,{code:o.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new O(t,i,t.path,d)))).then(i=>x.mergeArray(r,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new O(t,i,t.path,d)));return x.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new b({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new b({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new b({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}b.create=(s,e)=>new b({type:s,minLength:null,maxLength:null,exactLength:null,typeName:exports.ZodFirstPartyTypeKind.ZodArray,...m(e)});function I(s){if(s instanceof v){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=C.create(I(r))}return new v({...s._def,shape:()=>e})}else return s instanceof b?new b({...s._def,type:I(s.element)}):s instanceof C?C.create(I(s.unwrap())):s instanceof F?F.create(I(s.unwrap())):s instanceof R?R.create(s.items.map(e=>I(e))):s}class v extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return c(f,{code:o.invalid_type,expected:u.object,received:f.parsedType}),p}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof S&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const g=n[f],V=a.data[f];h.push({key:{status:"valid",value:f},value:g._parse(new O(a,V,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof S){const f=this._def.unknownKeys;if(f==="passthrough")for(const g of d)h.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(f==="strict")d.length>0&&(c(a,{code:o.unrecognized_keys,keys:d}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const g of d){const V=a.data[g];h.push({key:{status:"valid",value:g},value:f._parse(new O(a,V,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const g of h){const V=await g.key,_e=await g.value;f.push({key:V,value:_e,alwaysSet:g.alwaysSet})}return f}).then(f=>x.mergeObjectSync(r,f)):x.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new v({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new v({...this._def,unknownKeys:"strip"})}passthrough(){return new v({...this._def,unknownKeys:"passthrough"})}extend(e){return new v({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new v({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:exports.ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new v({...this._def,catchall:e})}pick(e){const t={};for(const r of _.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new v({...this._def,shape:()=>t})}omit(e){const t={};for(const r of _.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new v({...this._def,shape:()=>t})}deepPartial(){return I(this)}partial(e){const t={};for(const r of _.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new v({...this._def,shape:()=>t})}required(e){const t={};for(const r of _.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof C;)n=n._def.innerType;t[r]=n}return new v({...this._def,shape:()=>t})}keyof(){return ye(_.objectKeys(this.shape))}}v.create=(s,e)=>new v({shape:()=>s,unknownKeys:"strip",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});v.strictCreate=(s,e)=>new v({shape:()=>s,unknownKeys:"strict",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});v.lazycreate=(s,e)=>new v({shape:s,unknownKeys:"strip",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});class D extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new T(d.ctx.common.issues));return c(t,{code:o.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},g=h._parseSync({data:t.data,path:t.path,parent:f});if(g.status==="valid")return g;g.status==="dirty"&&!n&&(n={result:g,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new T(h));return c(t,{code:o.invalid_union,unionErrors:d}),p}}get options(){return this._def.options}}D.create=(s,e)=>new D({options:s,typeName:exports.ZodFirstPartyTypeKind.ZodUnion,...m(e)});function H(s,e){const t=Z(s),r=Z(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=_.objectKeys(e),n=_.objectKeys(s).filter(d=>a.indexOf(d)!==-1),i={...s,...e};for(const d of n){const h=H(s[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class U extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return p;const d=H(n.value,i.value);return d.valid?((se(n)||se(i))&&t.dirty(),{status:t.value,value:d.data}):(c(r,{code:o.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}U.create=(s,e,t)=>new U({left:s,right:e,typeName:exports.ZodFirstPartyTypeKind.ZodIntersection,...m(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:o.invalid_type,expected:u.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return c(r,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(c(r,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new O(r,i,r.path,d)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>x.mergeArray(t,i)):x.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:exports.ZodFirstPartyTypeKind.ZodTuple,rest:null,...m(e)})};class ce extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:o.invalid_type,expected:u.map,received:r.parsedType}),p;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([d,h],f)=>({key:a._parse(new O(r,d,r.path,[f,"key"])),value:n._parse(new O(r,h,r.path,[f,"value"]))}));if(r.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,g=await h.value;if(f.status==="aborted"||g.status==="aborted")return p;(f.status==="dirty"||g.status==="dirty")&&t.dirty(),d.set(f.value,g.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,g=h.value;if(f.status==="aborted"||g.status==="aborted")return p;(f.status==="dirty"||g.status==="dirty")&&t.dirty(),d.set(f.value,g.value)}return{status:t.value,value:d}}}}ce.create=(s,e,t)=>new ce({valueType:e,keyType:s,typeName:exports.ZodFirstPartyTypeKind.ZodMap,...m(t)});class L extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:o.invalid_type,expected:u.set,received:r.parsedType}),p;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(c(r,{code:o.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(c(r,{code:o.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const g of h){if(g.status==="aborted")return p;g.status==="dirty"&&t.dirty(),f.add(g.value)}return{status:t.value,value:f}}const d=[...r.data.values()].map((h,f)=>n._parse(new O(r,h,r.path,f)));return r.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new L({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new L({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}L.create=(s,e)=>new L({valueType:s,minSize:null,maxSize:null,typeName:exports.ZodFirstPartyTypeKind.ZodSet,...m(e)});class ue extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ue.create=(s,e)=>new ue({getter:s,typeName:exports.ZodFirstPartyTypeKind.ZodLazy,...m(e)});class le extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}le.create=(s,e)=>new le({value:s,typeName:exports.ZodFirstPartyTypeKind.ZodLiteral,...m(e)});function ye(s,e){return new $({values:s,typeName:exports.ZodFirstPartyTypeKind.ZodEnum,...m(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:_.joinValues(r),received:t.parsedType,code:o.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:o.invalid_enum_value,options:r}),p}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=ye;class he extends y{_parse(e){const t=_.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=_.objectValues(t);return c(r,{expected:_.joinValues(a),received:r.parsedType,code:o.invalid_type}),p}if(this._cache||(this._cache=new Set(_.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=_.objectValues(t);return c(r,{received:r.data,code:o.invalid_enum_value,options:a}),p}return k(e.data)}get enum(){return this._def.values}}he.create=(s,e)=>new he({values:s,typeName:exports.ZodFirstPartyTypeKind.ZodNativeEnum,...m(e)});class B extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:o.invalid_type,expected:u.promise,received:t.parsedType}),p;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return k(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}B.create=(s,e)=>new B({type:s,typeName:exports.ZodFirstPartyTypeKind.ZodPromise,...m(e)});class j extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===exports.ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return p;const h=await this._def.schema._parseAsync({data:d,path:r.path,parent:r});return h.status==="aborted"?p:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return p;const d=this._def.schema._parseSync({data:i,path:r.path,parent:r});return d.status==="aborted"?p:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(r.common.async===!1){const d=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return d.status==="aborted"?p:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(d=>d.status==="aborted"?p:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(i))return p;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>P(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):p);_.assertNever(a)}}j.create=(s,e,t)=>new j({schema:s,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:e,...m(t)});j.createWithPreprocess=(s,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:s},typeName:exports.ZodFirstPartyTypeKind.ZodEffects,...m(t)});class C extends y{_parse(e){return this._getType(e)===u.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}C.create=(s,e)=>new C({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodOptional,...m(e)});class F extends y{_parse(e){return this._getType(e)===u.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}F.create=(s,e)=>new F({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodNullable,...m(e)});class W extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}W.create=(s,e)=>new W({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...m(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return z(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}G.create=(s,e)=>new G({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...m(e)});class fe extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.nan,received:r.parsedType}),p}return{status:"valid",value:e.data}}}fe.create=s=>new fe({typeName:exports.ZodFirstPartyTypeKind.ZodNaN,...m(s)});class De extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class X extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new X({in:e,out:t,typeName:exports.ZodFirstPartyTypeKind.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(P(a)&&(a.value=Object.freeze(a.value)),a);return z(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Q.create=(s,e)=>new Q({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodReadonly,...m(e)});exports.ZodFirstPartyTypeKind=void 0;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(exports.ZodFirstPartyTypeKind||(exports.ZodFirstPartyTypeKind={}));const Ue=w.create;N.create;A.create;const Be=K.create,We=E.create,qe=Y.create;S.create;const Je=b.create,Ye=v.create;D.create;U.create;R.create;const He=$.create;B.create;C.create;F.create;const Ge=j.createWithPreprocess,Qe={string:(s=>w.create({...s,coerce:!0})),number:(s=>N.create({...s,coerce:!0})),boolean:(s=>K.create({...s,coerce:!0})),bigint:(s=>A.create({...s,coerce:!0})),date:(s=>E.create({...s,coerce:!0}))};exports.ZodDefault=W;exports.ZodObject=v;exports.anyType=qe;exports.arrayType=Je;exports.booleanType=Be;exports.coerce=Qe;exports.dateType=We;exports.enumType=He;exports.objectType=Ye;exports.preprocessType=Ge;exports.stringType=Ue;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),s=require("lucide-vue-next"),B=e.defineComponent({__name:"UserStatusBadge",props:{disabled:{type:Boolean}},setup(t){return(n,o)=>{const r=e.resolveComponent("Badge");return e.openBlock(),e.createBlock(r,{variant:"outline",class:e.normalizeClass(["gap-1.5 whitespace-nowrap",t.disabled?"border-amber-400/60 bg-amber-50 text-amber-800 dark:border-amber-700/70 dark:bg-amber-950/40 dark:text-amber-300":"border-emerald-400/60 bg-emerald-50 text-emerald-800 dark:border-emerald-700/70 dark:bg-emerald-950/40 dark:text-emerald-300"])},{default:e.withCtx(()=>[t.disabled?(e.openBlock(),e.createBlock(e.unref(s.ShieldX),{key:0,class:"size-3.5"})):(e.openBlock(),e.createBlock(e.unref(s.ShieldCheck),{key:1,class:"size-3.5"})),e.createTextVNode(" "+e.toDisplayString(t.disabled?"Suspended":"Enabled"),1)]),_:1},8,["class"])}}}),T={class:"space-y-4 py-5"},A={class:"space-y-2"},R=e.defineComponent({__name:"ReasonActionDialog",props:{open:{type:Boolean},title:{},description:{},confirmLabel:{},subject:{default:""},busy:{type:Boolean,default:!1},error:{default:""},destructive:{type:Boolean,default:!1}},emits:["update:open","confirm"],setup(t,{emit:n}){const o=t,r=n,i=e.ref(""),l=e.computed(()=>i.value.trim().length>=3&&!o.busy);e.watch(()=>o.open,m=>{m&&(i.value="")});function y(){o.busy||r("update:open",!1)}function d(){l.value&&r("confirm",i.value.trim())}return(m,a)=>{const g=e.resolveComponent("ResponsiveModalTitle"),h=e.resolveComponent("ResponsiveModalDescription"),C=e.resolveComponent("ResponsiveModalHeader"),f=e.resolveComponent("AlertTitle"),p=e.resolveComponent("AlertDescription"),b=e.resolveComponent("Alert"),w=e.resolveComponent("Label"),x=e.resolveComponent("Textarea"),v=e.resolveComponent("Button"),N=e.resolveComponent("ResponsiveModalFooter"),V=e.resolveComponent("ResponsiveModalScrollContent"),k=e.resolveComponent("ResponsiveModal");return e.openBlock(),e.createBlock(k,{open:t.open,"onUpdate:open":a[1]||(a[1]=c=>r("update:open",c))},{default:e.withCtx(()=>[e.createVNode(V,{class:"sm:max-w-lg"},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),e.createVNode(h,{class:"break-words"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})]),_:1}),e.createElementVNode("div",T,[e.createVNode(b,{variant:t.destructive?"destructive":"default"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.AlertTriangle)),e.createVNode(f,{class:"break-all"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.subject||"Confirm this account change"),1)]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode(" Studio will attempt to add this action to its activity history. ",-1)])]),_:1})]),_:1},8,["variant"]),e.createElementVNode("div",A,[e.createVNode(w,{for:"firebase-user-action-reason"},{default:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("Reason",-1)])]),_:1}),e.createVNode(x,{id:"firebase-user-action-reason",modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=c=>i.value=c),rows:"3",maxlength:"500",placeholder:"Why is this change needed?",disabled:t.busy,onKeydown:[e.withKeys(e.withModifiers(d,["meta","prevent"]),["enter"]),e.withKeys(e.withModifiers(d,["ctrl","prevent"]),["enter"])]},null,8,["modelValue","disabled","onKeydown"]),a[4]||(a[4]=e.createElementVNode("p",{class:"text-xs text-muted-foreground"},"At least 3 characters; required for the Studio activity record.",-1))]),t.error?(e.openBlock(),e.createBlock(b,{key:0,variant:"destructive"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.AlertTriangle)),e.createVNode(f,null,{default:e.withCtx(()=>[...a[5]||(a[5]=[e.createTextVNode("The action failed",-1)])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{class:"gap-2 sm:justify-end"},{default:e.withCtx(()=>[e.createVNode(v,{variant:"outline",disabled:t.busy,onClick:y},{default:e.withCtx(()=>[...a[6]||(a[6]=[e.createTextVNode("Cancel",-1)])]),_:1},8,["disabled"]),e.createVNode(v,{variant:t.destructive?"destructive":"default",disabled:!l.value,onClick:d},{default:e.withCtx(()=>[t.busy?(e.openBlock(),e.createBlock(e.unref(s.Loader2),{key:0,class:"size-4 animate-spin"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.busy?"Working…":t.confirmLabel),1)]),_:1},8,["variant","disabled"])]),_:1})]),_:1})]),_:1},8,["open"])}}});function _(t,n){if(!t||typeof t!="object")return n;const o=t;return o.data?.statusMessage||o.data?.message||o.statusMessage||o.message||n}function S(t){return"user"in t?t.user:t}function U(t){return!!(t&&typeof t=="object"&&"auditRecorded"in t&&t.auditRecorded===!1)}function u(t){const n=new TextEncoder().encode(t);let o="";for(const r of n)o+=String.fromCharCode(r);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function D(t){if(!/^[A-Za-z0-9_-]{1,1024}$/.test(t))throw new Error("Invalid Firebase UID token.");const n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(Math.ceil(t.length/4)*4,"="),o=atob(n),r=Uint8Array.from(o,l=>l.charCodeAt(0)),i=new TextDecoder("utf-8",{fatal:!0}).decode(r);if(!i||i.length>128||u(i)!==t)throw new Error("Invalid Firebase UID token.");return i}function M(t){return`user/${u(t)}`}function F(t){const n=Array.isArray(t)?t:String(t||"").split(",");return[...new Set(n.map(o=>o.trim()).filter(Boolean))]}function E(t){if(!t)return"Never";const n=new Date(t);return Number.isNaN(n.getTime())?"Unknown":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(n)}function I(t){return{password:"Email & password",phone:"Phone","google.com":"Google","apple.com":"Apple","facebook.com":"Facebook","github.com":"GitHub","microsoft.com":"Microsoft","twitter.com":"X / Twitter",anonymous:"Anonymous"}[t]||t}function j(t){return(t.displayName||t.email||t.phoneNumber||t.uid).split(/[\s@._+-]+/).filter(Boolean).slice(0,2).map(r=>r[0]?.toUpperCase()).join("")||"U"}exports._sfc_main=B;exports._sfc_main$1=R;exports.decodeFirebaseUid=D;exports.encodeFirebaseUid=u;exports.firebaseAuthUserPath=M;exports.formatFirebaseDate=E;exports.formatProvider=I;exports.getReadableError=_;exports.getUserInitials=j;exports.mutationAuditWasNotRecorded=U;exports.parseRoleOptions=F;exports.unwrapFirebaseAuthUser=S;