zignal-stencil-library 1.1.126 → 1.1.128

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 (182) hide show
  1. package/dist/cjs/autocomplete-address_43.cjs.entry.js +11340 -40542
  2. package/dist/cjs/{dayjs-REMv_SEZ.js → dayjs-Btww0IBx.js} +20 -76
  3. package/dist/cjs/{index-l5eAnOQ1.js → index-DBliBGHU.js} +3 -2
  4. package/dist/cjs/{index-DHf9KFXq.js → index-REEdj4HR.js} +3 -5
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/quick-message-app.cjs.entry.js +4 -4
  8. package/dist/cjs/zignal-stencil-library.cjs.js +3 -3
  9. package/dist/collection/collection-manifest.json +1 -1
  10. package/dist/collection/components/autocomplete-address/autocomplete-address.css +1 -1
  11. package/dist/collection/components/autocomplete-multiple-select/autocomplete-multiple-select.css +1 -1
  12. package/dist/collection/components/autocomplete-select/autocomplete-select.css +1 -1
  13. package/dist/collection/components/channel-box/channel-box.css +1 -1
  14. package/dist/collection/components/chat-app/chat-app.css +1 -1
  15. package/dist/collection/components/chat-header/chat-header.css +1 -1
  16. package/dist/collection/components/chat-input/chat-input.css +1 -1
  17. package/dist/collection/components/checkbox-list/checkbox-list.css +1 -1
  18. package/dist/collection/components/dialog-bill-editor/dialog-bill-editor.css +1 -1
  19. package/dist/collection/components/dialog-bill-editor/dialog-bill-editor.js +5 -8
  20. package/dist/collection/components/dialog-editor/dialog-editor.css +1 -1
  21. package/dist/collection/components/dialog-editor/dialog-editor.js +11 -25
  22. package/dist/collection/components/dialog-preview-media/dialog-preview-media.css +1 -1
  23. package/dist/collection/components/dialog-search/dialog-search.css +1 -1
  24. package/dist/collection/components/internal-component/icon.js +59 -2
  25. package/dist/collection/components/menu-chat-channel/menu-chat-channel.css +1 -1
  26. package/dist/collection/components/menu-chat-type/menu-chat-type.css +1 -1
  27. package/dist/collection/components/menu-list/menu-list.css +1 -1
  28. package/dist/collection/components/menu-list/menu-list.js +1 -1
  29. package/dist/collection/components/message-box/message-box.css +1 -1
  30. package/dist/collection/components/message-content/message-content.css +1 -1
  31. package/dist/collection/components/message-item/message-item.css +1 -1
  32. package/dist/collection/components/message-media/message-media.css +1 -1
  33. package/dist/collection/components/profile-history/profile-history.css +1 -1
  34. package/dist/collection/components/profile-info/profile-info.css +1 -1
  35. package/dist/collection/components/profile-media/profile-media.css +1 -1
  36. package/dist/collection/components/profile-tabs/profile-tabs.css +1 -1
  37. package/dist/collection/components/quick-message-add-template/quick-message-add-template.css +1 -1
  38. package/dist/collection/components/quick-message-app/quick-message-app.css +1 -1
  39. package/dist/collection/components/quick-message-file/quick-message-file.css +1 -1
  40. package/dist/collection/components/quick-message-image/quick-message-image.css +1 -1
  41. package/dist/collection/components/quick-message-modal/quick-message-modal.css +1 -1
  42. package/dist/collection/components/quick-message-template/quick-message-template.css +1 -1
  43. package/dist/collection/components/search-box/search-box.css +1 -1
  44. package/dist/collection/components/status-badge/status-badge.css +1 -1
  45. package/dist/collection/components/tag-list/tag-list.css +1 -1
  46. package/dist/collection/components/tag-or-status-item/tag-or-status-item.css +1 -1
  47. package/dist/collection/components/tag-popper/tag-popper.css +1 -1
  48. package/dist/collection/components/typography-clamp/typography-clamp.css +1 -1
  49. package/dist/collection/components/z-avatar/z-avatar.css +1 -1
  50. package/dist/collection/components/z-dialog/z-dialog.css +1 -1
  51. package/dist/collection/utils/dayjs.js +5 -10
  52. package/dist/components/autocomplete-address.js +1 -1
  53. package/dist/components/autocomplete-multiple-select.js +1 -1
  54. package/dist/components/autocomplete-select.js +1 -1
  55. package/dist/components/channel-box.js +1 -1
  56. package/dist/components/chat-app.js +52 -52
  57. package/dist/components/chat-header.js +1 -1
  58. package/dist/components/chat-input.js +1 -1
  59. package/dist/components/checkbox-list.js +1 -1
  60. package/dist/components/dialog-bill-editor.js +1 -1
  61. package/dist/components/dialog-editor.js +1 -1
  62. package/dist/components/dialog-preview-media.js +1 -1
  63. package/dist/components/dialog-search.js +1 -1
  64. package/dist/components/index.js +2 -2
  65. package/dist/components/menu-chat-channel.js +1 -1
  66. package/dist/components/menu-chat-type.js +1 -1
  67. package/dist/components/menu-list.js +1 -1
  68. package/dist/components/message-box.js +1 -1
  69. package/dist/components/message-content.js +1 -1
  70. package/dist/components/message-item.js +1 -1
  71. package/dist/components/message-media.js +1 -1
  72. package/dist/components/{p-2aXqlX1p.js → p-1JTUPCPT.js} +6 -6
  73. package/dist/components/{p-Bp1F0Yci.js → p-48hkBszW.js} +4 -4
  74. package/dist/components/{p-DXyVUFD4.js → p-9CUxq93-.js} +5 -5
  75. package/dist/components/{p-CrdRTeZ0.js → p-B0xRjG5_.js} +19 -28
  76. package/dist/components/{p-C7WH5N_D.js → p-B3Vlbsjg.js} +16 -16
  77. package/dist/components/{p-DNfyIGHa.js → p-B4XLKXBm.js} +24 -24
  78. package/dist/components/p-BCLD-S_A.js +763 -0
  79. package/dist/components/{p-DAH8mYRr.js → p-BEjx-Bn8.js} +22 -22
  80. package/dist/components/{p-_Mu6gMt3.js → p-BP-y_2Ql.js} +5 -5
  81. package/dist/components/{p-fZrBBdjT.js → p-BRjNz6ke.js} +4 -4
  82. package/dist/components/{p-CiVfPqKY.js → p-BkFRrRKV.js} +3 -3
  83. package/dist/components/{p-sPj7nmEH.js → p-BlDBX6wD.js} +4 -4
  84. package/dist/components/{p-CN47pvLv.js → p-BsKeV3Pg.js} +12 -14
  85. package/dist/components/{p-DRz4sc4i.js → p-BsVBC0QF.js} +3 -5
  86. package/dist/components/{p-rEwMLqpC.js → p-Bt6e__iP.js} +2 -2
  87. package/dist/components/{p-q_oFMCup.js → p-Bu70tL3y.js} +8 -8
  88. package/dist/components/{p-C0tV1VyH.js → p-Bu7d3mrb.js} +5 -5
  89. package/dist/components/{p--mEtmMjL.js → p-C2b-vqtP.js} +4 -4
  90. package/dist/components/{p-DhuDkLvY.js → p-C64OG6Go.js} +4 -4
  91. package/dist/components/{p-DRhQII7p.js → p-C9syEm5d.js} +13 -13
  92. package/dist/components/{p-Cz_4sLHb.js → p-CCsoW0wr.js} +4 -4
  93. package/dist/components/{p-_0xAgglZ.js → p-CEHfgumC.js} +3 -3
  94. package/dist/components/{p-BdrYdnoc.js → p-CHUOJSXo.js} +4 -4
  95. package/dist/components/p-COFvAjzD.js +897 -0
  96. package/dist/components/{p-Bch_xcdb.js → p-CTJvvlwf.js} +4 -4
  97. package/dist/components/{p-Cddmvv3x.js → p-C_Ns3zAL.js} +6 -6
  98. package/dist/components/{p-CKIClHTp.js → p-C_c5sc2l.js} +5 -5
  99. package/dist/components/{p-CNXcY-mo.js → p-CitM0Bqz.js} +2 -2
  100. package/dist/components/{p-CrCMTwqH.js → p-CjkiIFLu.js} +8 -8
  101. package/dist/components/{p-CJ3K2ZQB.js → p-CmhpzXLs.js} +7 -7
  102. package/dist/components/{p-BPVt9weM.js → p-Cq-rMEH9.js} +5 -5
  103. package/dist/components/{p-GPPFvEYq.js → p-CvZQgYYK.js} +1 -1
  104. package/dist/components/{p-BxDIq9fJ.js → p-Cwih4_9K.js} +7 -7
  105. package/dist/components/{p-Lq2jeXu7.js → p-CwmztnlQ.js} +3 -3
  106. package/dist/components/{p-Ajkf4S9r.js → p-CxSeCNtV.js} +6 -6
  107. package/dist/components/{p-CDRDHODb.js → p-D12KpEN2.js} +17 -17
  108. package/dist/components/{p-DVDcMYdR.js → p-D1fWvDmE.js} +14 -14
  109. package/dist/components/{p-CQukWN74.js → p-D3nAizga.js} +2 -2
  110. package/dist/components/{p-C-yg0vtE.js → p-D6E7AT0Y.js} +1 -1
  111. package/dist/components/{p-B8mgu_dN.js → p-DAdBAzUE.js} +2 -2
  112. package/dist/components/{p-C9qKKVpm.js → p-DBoTcyOd.js} +18 -74
  113. package/dist/components/{p-D4YALkuC.js → p-DCZl3WjS.js} +4 -4
  114. package/dist/components/{p-DwbzAu8e.js → p-DECvgVuA.js} +12 -12
  115. package/dist/components/{p-CkjryS9o.js → p-DNPJrFPA.js} +8 -8
  116. package/dist/components/{p-B5Zf5P4b.js → p-DNrNaNpo.js} +10 -10
  117. package/dist/components/{p-Buqo0fzQ.js → p-DVuF4t0D.js} +6 -6
  118. package/dist/components/{p-BjytUY9X.js → p-DcCoy5TC.js} +1 -1
  119. package/dist/components/{p-BJ9SC3PQ.js → p-DhM2YXIw.js} +33 -33
  120. package/dist/components/{p-DrKmW41y.js → p-DoSaXyw1.js} +2 -2
  121. package/dist/components/{p-BQd1ohOs.js → p-DvB00xfl.js} +19 -19
  122. package/dist/components/{p-DS28c-yX.js → p-DvuE0BKi.js} +4 -4
  123. package/dist/components/{p-UCfQXuR_.js → p-DyM9O-C2.js} +14 -14
  124. package/dist/components/{p-Bjk2lL4e.js → p-Fk7yo7tL.js} +14 -14
  125. package/dist/components/{p-CXcCgSUZ.js → p-Ij2dsIQ1.js} +3 -2
  126. package/dist/components/{p--ICGr4Tz.js → p-UNG2V2EJ.js} +2 -2
  127. package/dist/components/{p-Dua078QF.js → p-X0kRbis3.js} +4 -4
  128. package/dist/components/{p-BMs8pvXc.js → p-YpDzISKJ.js} +12 -12
  129. package/dist/components/{p-FhAWwRc3.js → p-ZODz3l7q.js} +6 -6
  130. package/dist/components/{p-C-bOFOZi.js → p-dH1F6S5O.js} +8 -8
  131. package/dist/components/{p-CzZqbr_u.js → p-lPG70npx.js} +7 -7
  132. package/dist/components/{p-WA5K_3rK.js → p-rnwpU-MO.js} +6 -6
  133. package/dist/components/{p-BF6RF9qO.js → p-sdgcu7RG.js} +14 -14
  134. package/dist/components/{p-DoXy_Y4j.js → p-tkPwGh-A.js} +7 -7
  135. package/dist/components/{p-CuN9hfaY.js → p-yKfywTRY.js} +1 -1
  136. package/dist/components/profile-history.js +1 -1
  137. package/dist/components/profile-info.js +1 -1
  138. package/dist/components/profile-media.js +1 -1
  139. package/dist/components/profile-tabs.js +1 -1
  140. package/dist/components/quick-message-add-template.js +1 -1
  141. package/dist/components/quick-message-app.js +17 -17
  142. package/dist/components/quick-message-button-content.js +1 -1
  143. package/dist/components/quick-message-file.js +1 -1
  144. package/dist/components/quick-message-image-content.js +1 -1
  145. package/dist/components/quick-message-image.js +1 -1
  146. package/dist/components/quick-message-menu-list-content.js +1 -1
  147. package/dist/components/quick-message-modal.js +1 -1
  148. package/dist/components/quick-message-template.js +1 -1
  149. package/dist/components/quick-message-text-content.js +1 -1
  150. package/dist/components/quick-message-video-content.js +1 -1
  151. package/dist/components/search-box.js +1 -1
  152. package/dist/components/status-badge.js +1 -1
  153. package/dist/components/summarize-message-section.js +1 -1
  154. package/dist/components/tag-list.js +1 -1
  155. package/dist/components/tag-or-status-item.js +1 -1
  156. package/dist/components/tag-popper.js +1 -1
  157. package/dist/components/typography-clamp.js +1 -1
  158. package/dist/components/user-info-section.js +1 -1
  159. package/dist/components/z-avatar.js +1 -1
  160. package/dist/components/z-dialog.js +1 -1
  161. package/dist/esm/autocomplete-address_43.entry.js +11340 -40542
  162. package/dist/esm/{dayjs-DMqiLE9c.js → dayjs-i8XfvNUE.js} +20 -76
  163. package/dist/esm/{index-CdYiy5U2.js → index-BsYB8kV0.js} +3 -2
  164. package/dist/esm/{index-BnUowDzX.js → index-DrJU7-bz.js} +3 -5
  165. package/dist/esm/index.js +1 -1
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/quick-message-app.entry.js +4 -4
  168. package/dist/esm/zignal-stencil-library.js +4 -4
  169. package/dist/types/api/quick-message.d.ts +3 -3
  170. package/dist/types/stencil-public-runtime.d.ts +1 -1
  171. package/dist/zignal-stencil-library/index.esm.js +1 -1
  172. package/dist/zignal-stencil-library/p-401e8253.entry.js +2 -0
  173. package/dist/zignal-stencil-library/{p-6ffb1dec.entry.js → p-9ccdf192.entry.js} +1 -1
  174. package/dist/zignal-stencil-library/{p-CdYiy5U2.js → p-BsYB8kV0.js} +1 -1
  175. package/dist/zignal-stencil-library/{p-DT9T3LNK.js → p-DZsPtXDQ.js} +1 -1
  176. package/dist/zignal-stencil-library/p-DrJU7-bz.js +2 -0
  177. package/dist/zignal-stencil-library/zignal-stencil-library.esm.js +1 -1
  178. package/package.json +1 -1
  179. package/dist/components/p-BhidTUJs.js +0 -27675
  180. package/dist/components/p-UWiH2uHw.js +0 -3176
  181. package/dist/zignal-stencil-library/p-831eccfa.entry.js +0 -9
  182. package/dist/zignal-stencil-library/p-BnUowDzX.js +0 -2
@@ -0,0 +1,897 @@
1
+ /** A special constant with type `never` */
2
+ function $constructor(name, initializer, params) {
3
+ function init(inst, def) {
4
+ var _a;
5
+ Object.defineProperty(inst, "_zod", {
6
+ value: inst._zod ?? {},
7
+ enumerable: false,
8
+ });
9
+ (_a = inst._zod).traits ?? (_a.traits = new Set());
10
+ inst._zod.traits.add(name);
11
+ initializer(inst, def);
12
+ // support prototype modifications
13
+ for (const k in _.prototype) {
14
+ if (!(k in inst))
15
+ Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
16
+ }
17
+ inst._zod.constr = _;
18
+ inst._zod.def = def;
19
+ }
20
+ // doesn't work if Parent has a constructor with arguments
21
+ const Parent = params?.Parent ?? Object;
22
+ class Definition extends Parent {
23
+ }
24
+ Object.defineProperty(Definition, "name", { value: name });
25
+ function _(def) {
26
+ var _a;
27
+ const inst = params?.Parent ? new Definition() : this;
28
+ init(inst, def);
29
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
30
+ for (const fn of inst._zod.deferred) {
31
+ fn();
32
+ }
33
+ return inst;
34
+ }
35
+ Object.defineProperty(_, "init", { value: init });
36
+ Object.defineProperty(_, Symbol.hasInstance, {
37
+ value: (inst) => {
38
+ if (params?.Parent && inst instanceof params.Parent)
39
+ return true;
40
+ return inst?._zod?.traits?.has(name);
41
+ },
42
+ });
43
+ Object.defineProperty(_, "name", { value: name });
44
+ return _;
45
+ }
46
+ class $ZodAsyncError extends Error {
47
+ constructor() {
48
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
49
+ }
50
+ }
51
+ const globalConfig = {};
52
+ function config(newConfig) {
53
+ return globalConfig;
54
+ }
55
+
56
+ // functions
57
+ function jsonStringifyReplacer(_, value) {
58
+ if (typeof value === "bigint")
59
+ return value.toString();
60
+ return value;
61
+ }
62
+ function cached(getter) {
63
+ return {
64
+ get value() {
65
+ {
66
+ const value = getter();
67
+ Object.defineProperty(this, "value", { value });
68
+ return value;
69
+ }
70
+ },
71
+ };
72
+ }
73
+ function nullish(input) {
74
+ return input === null || input === undefined;
75
+ }
76
+ function cleanRegex(source) {
77
+ const start = source.startsWith("^") ? 1 : 0;
78
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
79
+ return source.slice(start, end);
80
+ }
81
+ const EVALUATING = Symbol("evaluating");
82
+ function defineLazy(object, key, getter) {
83
+ let value = undefined;
84
+ Object.defineProperty(object, key, {
85
+ get() {
86
+ if (value === EVALUATING) {
87
+ // Circular reference detected, return undefined to break the cycle
88
+ return undefined;
89
+ }
90
+ if (value === undefined) {
91
+ value = EVALUATING;
92
+ value = getter();
93
+ }
94
+ return value;
95
+ },
96
+ set(v) {
97
+ Object.defineProperty(object, key, {
98
+ value: v,
99
+ // configurable: true,
100
+ });
101
+ // object[key] = v;
102
+ },
103
+ configurable: true,
104
+ });
105
+ }
106
+ const captureStackTrace = ("captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { });
107
+ function isObject(data) {
108
+ return typeof data === "object" && data !== null && !Array.isArray(data);
109
+ }
110
+ function escapeRegex(str) {
111
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
112
+ }
113
+ // zod-specific utils
114
+ function clone(inst, def, params) {
115
+ const cl = new inst._zod.constr(def ?? inst._zod.def);
116
+ if (!def || params?.parent)
117
+ cl._zod.parent = inst;
118
+ return cl;
119
+ }
120
+ function normalizeParams(_params) {
121
+ const params = _params;
122
+ if (!params)
123
+ return {};
124
+ if (typeof params === "string")
125
+ return { error: () => params };
126
+ if (params?.message !== undefined) {
127
+ if (params?.error !== undefined)
128
+ throw new Error("Cannot specify both `message` and `error` params");
129
+ params.error = params.message;
130
+ }
131
+ delete params.message;
132
+ if (typeof params.error === "string")
133
+ return { ...params, error: () => params.error };
134
+ return params;
135
+ }
136
+ function optionalKeys(shape) {
137
+ return Object.keys(shape).filter((k) => {
138
+ return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
139
+ });
140
+ }
141
+ // invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom
142
+ function aborted(x, startIndex = 0) {
143
+ if (x.aborted === true)
144
+ return true;
145
+ for (let i = startIndex; i < x.issues.length; i++) {
146
+ if (x.issues[i]?.continue !== true) {
147
+ return true;
148
+ }
149
+ }
150
+ return false;
151
+ }
152
+ function prefixIssues(path, issues) {
153
+ return issues.map((iss) => {
154
+ var _a;
155
+ (_a = iss).path ?? (_a.path = []);
156
+ iss.path.unshift(path);
157
+ return iss;
158
+ });
159
+ }
160
+ function unwrapMessage(message) {
161
+ return typeof message === "string" ? message : message?.message;
162
+ }
163
+ function finalizeIssue(iss, ctx, config) {
164
+ const full = { ...iss, path: iss.path ?? [] };
165
+ // for backwards compatibility
166
+ if (!iss.message) {
167
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??
168
+ unwrapMessage(ctx?.error?.(iss)) ??
169
+ unwrapMessage(config.customError?.(iss)) ??
170
+ unwrapMessage(config.localeError?.(iss)) ??
171
+ "Invalid input";
172
+ full.message = message;
173
+ }
174
+ // delete (full as any).def;
175
+ delete full.inst;
176
+ delete full.continue;
177
+ if (!ctx?.reportInput) {
178
+ delete full.input;
179
+ }
180
+ return full;
181
+ }
182
+ function getLengthableOrigin(input) {
183
+ if (Array.isArray(input))
184
+ return "array";
185
+ if (typeof input === "string")
186
+ return "string";
187
+ return "unknown";
188
+ }
189
+
190
+ const initializer = (inst, def) => {
191
+ inst.name = "$ZodError";
192
+ Object.defineProperty(inst, "_zod", {
193
+ value: inst._zod,
194
+ enumerable: false,
195
+ });
196
+ Object.defineProperty(inst, "issues", {
197
+ value: def,
198
+ enumerable: false,
199
+ });
200
+ inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
201
+ Object.defineProperty(inst, "toString", {
202
+ value: () => inst.message,
203
+ enumerable: false,
204
+ });
205
+ };
206
+ const $ZodError = $constructor("$ZodError", initializer);
207
+ const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
208
+
209
+ const _parse = (_Err) => (schema, value, _ctx, _params) => {
210
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
211
+ const result = schema._zod.run({ value, issues: [] }, ctx);
212
+ if (result instanceof Promise) {
213
+ throw new $ZodAsyncError();
214
+ }
215
+ if (result.issues.length) {
216
+ const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
217
+ captureStackTrace(e, _params?.callee);
218
+ throw e;
219
+ }
220
+ return result.value;
221
+ };
222
+ const parse = /* @__PURE__*/ _parse($ZodRealError);
223
+ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
224
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
225
+ let result = schema._zod.run({ value, issues: [] }, ctx);
226
+ if (result instanceof Promise)
227
+ result = await result;
228
+ if (result.issues.length) {
229
+ const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
230
+ captureStackTrace(e, params?.callee);
231
+ throw e;
232
+ }
233
+ return result.value;
234
+ };
235
+ const parseAsync = /* @__PURE__*/ _parseAsync($ZodRealError);
236
+ const _safeParse = (_Err) => (schema, value, _ctx) => {
237
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
238
+ const result = schema._zod.run({ value, issues: [] }, ctx);
239
+ if (result instanceof Promise) {
240
+ throw new $ZodAsyncError();
241
+ }
242
+ return result.issues.length
243
+ ? {
244
+ success: false,
245
+ error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))),
246
+ }
247
+ : { success: true, data: result.value };
248
+ };
249
+ const safeParse = /* @__PURE__*/ _safeParse($ZodRealError);
250
+ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
251
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
252
+ let result = schema._zod.run({ value, issues: [] }, ctx);
253
+ if (result instanceof Promise)
254
+ result = await result;
255
+ return result.issues.length
256
+ ? {
257
+ success: false,
258
+ error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))),
259
+ }
260
+ : { success: true, data: result.value };
261
+ };
262
+ const safeParseAsync = /* @__PURE__*/ _safeParseAsync($ZodRealError);
263
+
264
+ /** Practical email validation */
265
+ const email$1 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
266
+ const string$1 = (params) => {
267
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
268
+ return new RegExp(`^${regex}$`);
269
+ };
270
+
271
+ // import { $ZodType } from "./schemas.js";
272
+ const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
273
+ var _a;
274
+ inst._zod ?? (inst._zod = {});
275
+ inst._zod.def = def;
276
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
277
+ });
278
+ const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
279
+ var _a;
280
+ $ZodCheck.init(inst, def);
281
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
282
+ const val = payload.value;
283
+ return !nullish(val) && val.length !== undefined;
284
+ });
285
+ inst._zod.onattach.push((inst) => {
286
+ const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);
287
+ if (def.minimum > curr)
288
+ inst._zod.bag.minimum = def.minimum;
289
+ });
290
+ inst._zod.check = (payload) => {
291
+ const input = payload.value;
292
+ const length = input.length;
293
+ if (length >= def.minimum)
294
+ return;
295
+ const origin = getLengthableOrigin(input);
296
+ payload.issues.push({
297
+ origin,
298
+ code: "too_small",
299
+ minimum: def.minimum,
300
+ inclusive: true,
301
+ input,
302
+ inst,
303
+ continue: !def.abort,
304
+ });
305
+ };
306
+ });
307
+ const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
308
+ var _a, _b;
309
+ $ZodCheck.init(inst, def);
310
+ inst._zod.onattach.push((inst) => {
311
+ const bag = inst._zod.bag;
312
+ bag.format = def.format;
313
+ if (def.pattern) {
314
+ bag.patterns ?? (bag.patterns = new Set());
315
+ bag.patterns.add(def.pattern);
316
+ }
317
+ });
318
+ if (def.pattern)
319
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
320
+ def.pattern.lastIndex = 0;
321
+ if (def.pattern.test(payload.value))
322
+ return;
323
+ payload.issues.push({
324
+ origin: "string",
325
+ code: "invalid_format",
326
+ format: def.format,
327
+ input: payload.value,
328
+ ...(def.pattern ? { pattern: def.pattern.toString() } : {}),
329
+ inst,
330
+ continue: !def.abort,
331
+ });
332
+ });
333
+ else
334
+ (_b = inst._zod).check ?? (_b.check = () => { });
335
+ });
336
+ const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
337
+ $ZodCheckStringFormat.init(inst, def);
338
+ inst._zod.check = (payload) => {
339
+ def.pattern.lastIndex = 0;
340
+ if (def.pattern.test(payload.value))
341
+ return;
342
+ payload.issues.push({
343
+ origin: "string",
344
+ code: "invalid_format",
345
+ format: "regex",
346
+ input: payload.value,
347
+ pattern: def.pattern.toString(),
348
+ inst,
349
+ continue: !def.abort,
350
+ });
351
+ };
352
+ });
353
+ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
354
+ $ZodCheck.init(inst, def);
355
+ inst._zod.check = (payload) => {
356
+ payload.value = def.tx(payload.value);
357
+ };
358
+ });
359
+
360
+ const version = {
361
+ major: 4,
362
+ minor: 1,
363
+ patch: 12,
364
+ };
365
+
366
+ const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
367
+ var _a;
368
+ inst ?? (inst = {});
369
+ inst._zod.def = def; // set _def property
370
+ inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
371
+ inst._zod.version = version;
372
+ const checks = [...(inst._zod.def.checks ?? [])];
373
+ // if inst is itself a checks.$ZodCheck, run it as a check
374
+ if (inst._zod.traits.has("$ZodCheck")) {
375
+ checks.unshift(inst);
376
+ }
377
+ for (const ch of checks) {
378
+ for (const fn of ch._zod.onattach) {
379
+ fn(inst);
380
+ }
381
+ }
382
+ if (checks.length === 0) {
383
+ // deferred initializer
384
+ // inst._zod.parse is not yet defined
385
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
386
+ inst._zod.deferred?.push(() => {
387
+ inst._zod.run = inst._zod.parse;
388
+ });
389
+ }
390
+ else {
391
+ const runChecks = (payload, checks, ctx) => {
392
+ let isAborted = aborted(payload);
393
+ let asyncResult;
394
+ for (const ch of checks) {
395
+ if (ch._zod.def.when) {
396
+ const shouldRun = ch._zod.def.when(payload);
397
+ if (!shouldRun)
398
+ continue;
399
+ }
400
+ else if (isAborted) {
401
+ continue;
402
+ }
403
+ const currLen = payload.issues.length;
404
+ const _ = ch._zod.check(payload);
405
+ if (_ instanceof Promise && ctx?.async === false) {
406
+ throw new $ZodAsyncError();
407
+ }
408
+ if (asyncResult || _ instanceof Promise) {
409
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
410
+ await _;
411
+ const nextLen = payload.issues.length;
412
+ if (nextLen === currLen)
413
+ return;
414
+ if (!isAborted)
415
+ isAborted = aborted(payload, currLen);
416
+ });
417
+ }
418
+ else {
419
+ const nextLen = payload.issues.length;
420
+ if (nextLen === currLen)
421
+ continue;
422
+ if (!isAborted)
423
+ isAborted = aborted(payload, currLen);
424
+ }
425
+ }
426
+ if (asyncResult) {
427
+ return asyncResult.then(() => {
428
+ return payload;
429
+ });
430
+ }
431
+ return payload;
432
+ };
433
+ // const handleChecksResult = (
434
+ // checkResult: ParsePayload,
435
+ // originalResult: ParsePayload,
436
+ // ctx: ParseContextInternal
437
+ // ): util.MaybeAsync<ParsePayload> => {
438
+ // // if the checks mutated the value && there are no issues, re-parse the result
439
+ // if (checkResult.value !== originalResult.value && !checkResult.issues.length)
440
+ // return inst._zod.parse(checkResult, ctx);
441
+ // return originalResult;
442
+ // };
443
+ const handleCanaryResult = (canary, payload, ctx) => {
444
+ // abort if the canary is aborted
445
+ if (aborted(canary)) {
446
+ canary.aborted = true;
447
+ return canary;
448
+ }
449
+ // run checks first, then
450
+ const checkResult = runChecks(payload, checks, ctx);
451
+ if (checkResult instanceof Promise) {
452
+ if (ctx.async === false)
453
+ throw new $ZodAsyncError();
454
+ return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
455
+ }
456
+ return inst._zod.parse(checkResult, ctx);
457
+ };
458
+ inst._zod.run = (payload, ctx) => {
459
+ if (ctx.skipChecks) {
460
+ return inst._zod.parse(payload, ctx);
461
+ }
462
+ if (ctx.direction === "backward") {
463
+ // run canary
464
+ // initial pass (no checks)
465
+ const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
466
+ if (canary instanceof Promise) {
467
+ return canary.then((canary) => {
468
+ return handleCanaryResult(canary, payload, ctx);
469
+ });
470
+ }
471
+ return handleCanaryResult(canary, payload, ctx);
472
+ }
473
+ // forward
474
+ const result = inst._zod.parse(payload, ctx);
475
+ if (result instanceof Promise) {
476
+ if (ctx.async === false)
477
+ throw new $ZodAsyncError();
478
+ return result.then((result) => runChecks(result, checks, ctx));
479
+ }
480
+ return runChecks(result, checks, ctx);
481
+ };
482
+ }
483
+ inst["~standard"] = {
484
+ validate: (value) => {
485
+ try {
486
+ const r = safeParse(inst, value);
487
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
488
+ }
489
+ catch (_) {
490
+ return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));
491
+ }
492
+ },
493
+ vendor: "zod",
494
+ version: 1,
495
+ };
496
+ });
497
+ const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
498
+ $ZodType.init(inst, def);
499
+ inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? string$1(inst._zod.bag);
500
+ inst._zod.parse = (payload, _) => {
501
+ if (def.coerce)
502
+ try {
503
+ payload.value = String(payload.value);
504
+ }
505
+ catch (_) { }
506
+ if (typeof payload.value === "string")
507
+ return payload;
508
+ payload.issues.push({
509
+ expected: "string",
510
+ code: "invalid_type",
511
+ input: payload.value,
512
+ inst,
513
+ });
514
+ return payload;
515
+ };
516
+ });
517
+ const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
518
+ // check initialization must come first
519
+ $ZodCheckStringFormat.init(inst, def);
520
+ $ZodString.init(inst, def);
521
+ });
522
+ const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
523
+ def.pattern ?? (def.pattern = email$1);
524
+ $ZodStringFormat.init(inst, def);
525
+ });
526
+ function handlePropertyResult(result, final, key, input) {
527
+ if (result.issues.length) {
528
+ final.issues.push(...prefixIssues(key, result.issues));
529
+ }
530
+ if (result.value === undefined) {
531
+ if (key in input) {
532
+ final.value[key] = undefined;
533
+ }
534
+ }
535
+ else {
536
+ final.value[key] = result.value;
537
+ }
538
+ }
539
+ function normalizeDef(def) {
540
+ const keys = Object.keys(def.shape);
541
+ for (const k of keys) {
542
+ if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
543
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
544
+ }
545
+ }
546
+ const okeys = optionalKeys(def.shape);
547
+ return {
548
+ ...def,
549
+ keys,
550
+ keySet: new Set(keys),
551
+ numKeys: keys.length,
552
+ optionalKeys: new Set(okeys),
553
+ };
554
+ }
555
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
556
+ const unrecognized = [];
557
+ // iterate over input keys
558
+ const keySet = def.keySet;
559
+ const _catchall = def.catchall._zod;
560
+ const t = _catchall.def.type;
561
+ for (const key of Object.keys(input)) {
562
+ if (keySet.has(key))
563
+ continue;
564
+ if (t === "never") {
565
+ unrecognized.push(key);
566
+ continue;
567
+ }
568
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
569
+ if (r instanceof Promise) {
570
+ proms.push(r.then((r) => handlePropertyResult(r, payload, key, input)));
571
+ }
572
+ else {
573
+ handlePropertyResult(r, payload, key, input);
574
+ }
575
+ }
576
+ if (unrecognized.length) {
577
+ payload.issues.push({
578
+ code: "unrecognized_keys",
579
+ keys: unrecognized,
580
+ input,
581
+ inst,
582
+ });
583
+ }
584
+ if (!proms.length)
585
+ return payload;
586
+ return Promise.all(proms).then(() => {
587
+ return payload;
588
+ });
589
+ }
590
+ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
591
+ // requires cast because technically $ZodObject doesn't extend
592
+ $ZodType.init(inst, def);
593
+ // const sh = def.shape;
594
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
595
+ if (!desc?.get) {
596
+ const sh = def.shape;
597
+ Object.defineProperty(def, "shape", {
598
+ get: () => {
599
+ const newSh = { ...sh };
600
+ Object.defineProperty(def, "shape", {
601
+ value: newSh,
602
+ });
603
+ return newSh;
604
+ },
605
+ });
606
+ }
607
+ const _normalized = cached(() => normalizeDef(def));
608
+ defineLazy(inst._zod, "propValues", () => {
609
+ const shape = def.shape;
610
+ const propValues = {};
611
+ for (const key in shape) {
612
+ const field = shape[key]._zod;
613
+ if (field.values) {
614
+ propValues[key] ?? (propValues[key] = new Set());
615
+ for (const v of field.values)
616
+ propValues[key].add(v);
617
+ }
618
+ }
619
+ return propValues;
620
+ });
621
+ const isObject$1 = isObject;
622
+ const catchall = def.catchall;
623
+ let value;
624
+ inst._zod.parse = (payload, ctx) => {
625
+ value ?? (value = _normalized.value);
626
+ const input = payload.value;
627
+ if (!isObject$1(input)) {
628
+ payload.issues.push({
629
+ expected: "object",
630
+ code: "invalid_type",
631
+ input,
632
+ inst,
633
+ });
634
+ return payload;
635
+ }
636
+ payload.value = {};
637
+ const proms = [];
638
+ const shape = value.shape;
639
+ for (const key of value.keys) {
640
+ const el = shape[key];
641
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
642
+ if (r instanceof Promise) {
643
+ proms.push(r.then((r) => handlePropertyResult(r, payload, key, input)));
644
+ }
645
+ else {
646
+ handlePropertyResult(r, payload, key, input);
647
+ }
648
+ }
649
+ if (!catchall) {
650
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
651
+ }
652
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
653
+ };
654
+ });
655
+ function handleUnionResults(results, final, inst, ctx) {
656
+ for (const result of results) {
657
+ if (result.issues.length === 0) {
658
+ final.value = result.value;
659
+ return final;
660
+ }
661
+ }
662
+ const nonaborted = results.filter((r) => !aborted(r));
663
+ if (nonaborted.length === 1) {
664
+ final.value = nonaborted[0].value;
665
+ return nonaborted[0];
666
+ }
667
+ final.issues.push({
668
+ code: "invalid_union",
669
+ input: final.value,
670
+ inst,
671
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))),
672
+ });
673
+ return final;
674
+ }
675
+ const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
676
+ $ZodType.init(inst, def);
677
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
678
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
679
+ defineLazy(inst._zod, "values", () => {
680
+ if (def.options.every((o) => o._zod.values)) {
681
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
682
+ }
683
+ return undefined;
684
+ });
685
+ defineLazy(inst._zod, "pattern", () => {
686
+ if (def.options.every((o) => o._zod.pattern)) {
687
+ const patterns = def.options.map((o) => o._zod.pattern);
688
+ return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
689
+ }
690
+ return undefined;
691
+ });
692
+ const single = def.options.length === 1;
693
+ const first = def.options[0]._zod.run;
694
+ inst._zod.parse = (payload, ctx) => {
695
+ if (single) {
696
+ return first(payload, ctx);
697
+ }
698
+ let async = false;
699
+ const results = [];
700
+ for (const option of def.options) {
701
+ const result = option._zod.run({
702
+ value: payload.value,
703
+ issues: [],
704
+ }, ctx);
705
+ if (result instanceof Promise) {
706
+ results.push(result);
707
+ async = true;
708
+ }
709
+ else {
710
+ if (result.issues.length === 0)
711
+ return result;
712
+ results.push(result);
713
+ }
714
+ }
715
+ if (!async)
716
+ return handleUnionResults(results, payload, inst, ctx);
717
+ return Promise.all(results).then((results) => {
718
+ return handleUnionResults(results, payload, inst, ctx);
719
+ });
720
+ };
721
+ });
722
+ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
723
+ $ZodType.init(inst, def);
724
+ if (def.values.length === 0) {
725
+ throw new Error("Cannot create literal schema with no valid values");
726
+ }
727
+ inst._zod.values = new Set(def.values);
728
+ inst._zod.pattern = new RegExp(`^(${def.values
729
+ .map((o) => (typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)))
730
+ .join("|")})$`);
731
+ inst._zod.parse = (payload, _ctx) => {
732
+ const input = payload.value;
733
+ if (inst._zod.values.has(input)) {
734
+ return payload;
735
+ }
736
+ payload.issues.push({
737
+ code: "invalid_value",
738
+ values: def.values,
739
+ input,
740
+ inst,
741
+ });
742
+ return payload;
743
+ };
744
+ });
745
+ const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
746
+ $ZodType.init(inst, def);
747
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
748
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
749
+ defineLazy(inst._zod, "pattern", () => {
750
+ const pattern = def.innerType._zod.pattern;
751
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : undefined;
752
+ });
753
+ defineLazy(inst._zod, "values", () => {
754
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
755
+ });
756
+ inst._zod.parse = (payload, ctx) => {
757
+ // Forward direction (decode): allow null to pass through
758
+ if (payload.value === null)
759
+ return payload;
760
+ return def.innerType._zod.run(payload, ctx);
761
+ };
762
+ });
763
+
764
+ function _string(Class, params) {
765
+ return new Class({
766
+ type: "string",
767
+ ...normalizeParams(params),
768
+ });
769
+ }
770
+ function _email(Class, params) {
771
+ return new Class({
772
+ type: "string",
773
+ format: "email",
774
+ check: "string_format",
775
+ abort: false,
776
+ ...normalizeParams(params),
777
+ });
778
+ }
779
+ function _minLength(minimum, params) {
780
+ return new $ZodCheckMinLength({
781
+ check: "min_length",
782
+ ...normalizeParams(params),
783
+ minimum,
784
+ });
785
+ }
786
+ function _regex(pattern, params) {
787
+ return new $ZodCheckRegex({
788
+ check: "string_format",
789
+ format: "regex",
790
+ ...normalizeParams(params),
791
+ pattern,
792
+ });
793
+ }
794
+ function _overwrite(tx) {
795
+ return new $ZodCheckOverwrite({
796
+ check: "overwrite",
797
+ tx,
798
+ });
799
+ }
800
+ // trim
801
+ function _trim() {
802
+ return _overwrite((input) => input.trim());
803
+ }
804
+
805
+ const ZodMiniType = /*@__PURE__*/ $constructor("ZodMiniType", (inst, def) => {
806
+ if (!inst._zod)
807
+ throw new Error("Uninitialized schema in ZodMiniType.");
808
+ $ZodType.init(inst, def);
809
+ inst.def = def;
810
+ inst.type = def.type;
811
+ inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
812
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
813
+ inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
814
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
815
+ inst.check = (...checks) => {
816
+ return inst.clone({
817
+ ...def,
818
+ checks: [
819
+ ...(def.checks ?? []),
820
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
821
+ ],
822
+ }
823
+ // { parent: true }
824
+ );
825
+ };
826
+ inst.clone = (_def, params) => clone(inst, _def, params);
827
+ inst.brand = () => inst;
828
+ inst.register = ((reg, meta) => {
829
+ reg.add(inst, meta);
830
+ return inst;
831
+ });
832
+ });
833
+ const ZodMiniString = /*@__PURE__*/ $constructor("ZodMiniString", (inst, def) => {
834
+ $ZodString.init(inst, def);
835
+ ZodMiniType.init(inst, def);
836
+ });
837
+ function string(params) {
838
+ return _string(ZodMiniString, params);
839
+ }
840
+ const ZodMiniStringFormat = /*@__PURE__*/ $constructor("ZodMiniStringFormat", (inst, def) => {
841
+ $ZodStringFormat.init(inst, def);
842
+ ZodMiniString.init(inst, def);
843
+ });
844
+ const ZodMiniEmail = /*@__PURE__*/ $constructor("ZodMiniEmail", (inst, def) => {
845
+ $ZodEmail.init(inst, def);
846
+ ZodMiniStringFormat.init(inst, def);
847
+ });
848
+ function email(params) {
849
+ return _email(ZodMiniEmail, params);
850
+ }
851
+ const ZodMiniObject = /*@__PURE__*/ $constructor("ZodMiniObject", (inst, def) => {
852
+ $ZodObject.init(inst, def);
853
+ ZodMiniType.init(inst, def);
854
+ defineLazy(inst, "shape", () => def.shape);
855
+ });
856
+ function object(shape, params) {
857
+ const def = {
858
+ type: "object",
859
+ shape: shape ?? {},
860
+ ...normalizeParams(params),
861
+ };
862
+ return new ZodMiniObject(def);
863
+ }
864
+ const ZodMiniUnion = /*@__PURE__*/ $constructor("ZodMiniUnion", (inst, def) => {
865
+ $ZodUnion.init(inst, def);
866
+ ZodMiniType.init(inst, def);
867
+ });
868
+ function union(options, params) {
869
+ return new ZodMiniUnion({
870
+ type: "union",
871
+ options: options,
872
+ ...normalizeParams(params),
873
+ });
874
+ }
875
+ const ZodMiniLiteral = /*@__PURE__*/ $constructor("ZodMiniLiteral", (inst, def) => {
876
+ $ZodLiteral.init(inst, def);
877
+ ZodMiniType.init(inst, def);
878
+ });
879
+ function literal(value, params) {
880
+ return new ZodMiniLiteral({
881
+ type: "literal",
882
+ values: Array.isArray(value) ? value : [value],
883
+ ...normalizeParams(params),
884
+ });
885
+ }
886
+ const ZodMiniNullable = /*@__PURE__*/ $constructor("ZodMiniNullable", (inst, def) => {
887
+ $ZodNullable.init(inst, def);
888
+ ZodMiniType.init(inst, def);
889
+ });
890
+ function nullable(innerType) {
891
+ return new ZodMiniNullable({
892
+ type: "nullable",
893
+ innerType: innerType,
894
+ });
895
+ }
896
+
897
+ export { _regex as _, _minLength as a, _trim as b, email as e, literal as l, nullable as n, object as o, string as s, union as u };