@lssm/example.versioned-knowledge-base 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229

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 (172) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +279 -226
  2. package/.turbo/turbo-build.log +280 -37
  3. package/CHANGELOG.md +3 -3
  4. package/LICENSE +21 -0
  5. package/dist/contracts/kb.d.ts +72 -71
  6. package/dist/contracts/kb.d.ts.map +1 -0
  7. package/dist/contracts/kb.js +27 -28
  8. package/dist/contracts/kb.js.map +1 -0
  9. package/dist/docs/versioned-knowledge-base.docblock.js +2 -1
  10. package/dist/docs/versioned-knowledge-base.docblock.js.map +1 -0
  11. package/dist/entities/models.d.ts +38 -37
  12. package/dist/entities/models.d.ts.map +1 -0
  13. package/dist/entities/models.js +35 -36
  14. package/dist/entities/models.js.map +1 -0
  15. package/dist/events.d.ts +2 -1
  16. package/dist/events.d.ts.map +1 -0
  17. package/dist/events.js +20 -20
  18. package/dist/events.js.map +1 -0
  19. package/dist/example.d.ts +2 -1
  20. package/dist/example.d.ts.map +1 -0
  21. package/dist/example.js +2 -1
  22. package/dist/example.js.map +1 -0
  23. package/dist/handlers/memory.handlers.d.ts +2 -1
  24. package/dist/handlers/memory.handlers.d.ts.map +1 -0
  25. package/dist/handlers/memory.handlers.js +2 -1
  26. package/dist/handlers/memory.handlers.js.map +1 -0
  27. package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
  28. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
  29. package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
  30. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
  31. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  32. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  33. package/dist/libs/contracts/dist/docs/index.js +2 -6
  34. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  35. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  36. package/dist/libs/contracts/dist/docs/presentations.js +2 -1
  37. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  38. package/dist/libs/contracts/dist/docs/registry.js +2 -1
  39. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  40. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  41. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  42. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  43. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  44. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  45. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  46. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  47. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  48. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  49. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  50. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  51. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  52. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  53. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  54. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  55. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  56. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  57. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  58. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  59. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  60. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  61. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  62. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  63. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  64. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  65. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  66. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  67. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  68. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  69. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  70. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  71. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  72. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  73. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  74. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  75. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  76. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  77. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  78. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  79. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  80. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  81. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  82. package/dist/libs/contracts/dist/events.js +2 -1
  83. package/dist/libs/contracts/dist/events.js.map +1 -0
  84. package/dist/libs/contracts/dist/index.js +3 -2
  85. package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
  86. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
  87. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  88. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  89. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  90. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  91. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  92. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  93. package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
  94. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
  95. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  96. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  97. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  98. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  99. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  100. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  101. package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
  102. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
  103. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
  104. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  105. package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
  106. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
  107. package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
  108. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
  109. package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
  110. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
  111. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
  112. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  113. package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
  114. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
  115. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  116. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  117. package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
  118. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
  119. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  120. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  121. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  122. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  123. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  124. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  125. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  126. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  127. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  128. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  129. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  130. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  131. package/dist/libs/contracts/dist/llm/exporters.js +2 -1
  132. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
  133. package/dist/libs/contracts/dist/onboarding-base.js +22 -23
  134. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
  135. package/dist/libs/contracts/dist/ownership.js +4 -2
  136. package/dist/libs/contracts/dist/ownership.js.map +1 -0
  137. package/dist/libs/contracts/dist/presentations.v2.js +2 -1
  138. package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
  139. package/dist/libs/contracts/dist/regenerator/service.js +2 -1
  140. package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
  141. package/dist/libs/contracts/dist/schema/dist/index.js +3874 -6
  142. package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
  143. package/dist/libs/contracts/dist/spec.js +2 -1
  144. package/dist/libs/contracts/dist/spec.js.map +1 -0
  145. package/dist/libs/schema/dist/index.js +4684 -6
  146. package/dist/libs/schema/dist/index.js.map +1 -0
  147. package/dist/versioned-knowledge-base.feature.d.ts +2 -1
  148. package/dist/versioned-knowledge-base.feature.d.ts.map +1 -0
  149. package/dist/versioned-knowledge-base.feature.js +2 -1
  150. package/dist/versioned-knowledge-base.feature.js.map +1 -0
  151. package/package.json +8 -7
  152. package/tsconfig.tsbuildinfo +1 -1
  153. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  154. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  155. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  156. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  157. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  158. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  159. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  160. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  161. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  162. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -39
  163. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  164. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  165. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  166. package/dist/libs/schema/dist/EnumType.js +0 -2
  167. package/dist/libs/schema/dist/FieldType.js +0 -49
  168. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  169. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  170. package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
  171. package/dist/libs/schema/dist/entity/index.js +0 -2
  172. package/dist/libs/schema/dist/entity/types.js +0 -1
@@ -1,6 +1,3874 @@
1
- import "./EnumType.js";
2
- import "./FieldType.js";
3
- import "./SchemaModel.js";
4
- import "./ScalarTypeEnum.js";
5
- import "./entity/defineEntity.js";
6
- import "./entity/index.js";
1
+ //#region ../../libs/contracts/dist/schema/dist/index.js
2
+ var c8 = Object.defineProperty;
3
+ var U6 = (J, X) => {
4
+ for (var Y in X) c8(J, Y, {
5
+ get: X[Y],
6
+ enumerable: !0,
7
+ configurable: !0,
8
+ set: (W) => X[Y] = () => W
9
+ });
10
+ };
11
+ function u(J, X) {
12
+ if (!Boolean(J)) throw Error(X);
13
+ }
14
+ function _0(J) {
15
+ return typeof J == "object" && J !== null;
16
+ }
17
+ function I6(J, X) {
18
+ if (!Boolean(J)) throw Error(X != null ? X : "Unexpected invariant triggered.");
19
+ }
20
+ var y8 = /\r\n|[\n\r]/g;
21
+ function W0(J, X) {
22
+ let Y = 0, W = 1;
23
+ for (let q of J.body.matchAll(y8)) {
24
+ if (typeof q.index === "number" || I6(!1), q.index >= X) break;
25
+ Y = q.index + q[0].length, W += 1;
26
+ }
27
+ return {
28
+ line: W,
29
+ column: X + 1 - Y
30
+ };
31
+ }
32
+ function X4(J) {
33
+ return b0(J.source, W0(J.source, J.start));
34
+ }
35
+ function b0(J, X) {
36
+ let Y = J.locationOffset.column - 1, W = "".padStart(Y) + J.body, q = X.line - 1, H = J.locationOffset.line - 1, B = X.line + H, Q = X.line === 1 ? Y : 0, G = X.column + Q, z = `${J.name}:${B}:${G}
37
+ `, I = W.split(/\r\n|[\n\r]/g), w = I[q];
38
+ if (w.length > 120) {
39
+ let M = Math.floor(G / 80), P = G % 80, N = [];
40
+ for (let _ = 0; _ < w.length; _ += 80) N.push(w.slice(_, _ + 80));
41
+ return z + w6([
42
+ [`${B} |`, N[0]],
43
+ ...N.slice(1, M + 1).map((_) => ["|", _]),
44
+ ["|", "^".padStart(P)],
45
+ ["|", N[M + 1]]
46
+ ]);
47
+ }
48
+ return z + w6([
49
+ [`${B - 1} |`, I[q - 1]],
50
+ [`${B} |`, w],
51
+ ["|", "^".padStart(G)],
52
+ [`${B + 1} |`, I[q + 1]]
53
+ ]);
54
+ }
55
+ function w6(J) {
56
+ let X = J.filter(([W, q]) => q !== void 0), Y = Math.max(...X.map(([W]) => W.length));
57
+ return X.map(([W, q]) => W.padStart(Y) + (q ? " " + q : "")).join(`
58
+ `);
59
+ }
60
+ function m8(J) {
61
+ let X = J[0];
62
+ if (X == null || "kind" in X || "length" in X) return {
63
+ nodes: X,
64
+ source: J[1],
65
+ positions: J[2],
66
+ path: J[3],
67
+ originalError: J[4],
68
+ extensions: J[5]
69
+ };
70
+ return X;
71
+ }
72
+ var h = class h$1 extends Error {
73
+ constructor(J, ...X) {
74
+ var Y, W, q;
75
+ let { nodes: H, source: B, positions: Q, path: G, originalError: z, extensions: I } = m8(X);
76
+ super(J);
77
+ this.name = "GraphQLError", this.path = G !== null && G !== void 0 ? G : void 0, this.originalError = z !== null && z !== void 0 ? z : void 0, this.nodes = D6(Array.isArray(H) ? H : H ? [H] : void 0);
78
+ let w = D6((Y = this.nodes) === null || Y === void 0 ? void 0 : Y.map((P) => P.loc).filter((P) => P != null));
79
+ this.source = B !== null && B !== void 0 ? B : w === null || w === void 0 ? void 0 : (W = w[0]) === null || W === void 0 ? void 0 : W.source, this.positions = Q !== null && Q !== void 0 ? Q : w === null || w === void 0 ? void 0 : w.map((P) => P.start), this.locations = Q && B ? Q.map((P) => W0(B, P)) : w === null || w === void 0 ? void 0 : w.map((P) => W0(P.source, P.start));
80
+ let M = _0(z === null || z === void 0 ? void 0 : z.extensions) ? z === null || z === void 0 ? void 0 : z.extensions : void 0;
81
+ if (this.extensions = (q = I !== null && I !== void 0 ? I : M) !== null && q !== void 0 ? q : Object.create(null), Object.defineProperties(this, {
82
+ message: {
83
+ writable: !0,
84
+ enumerable: !0
85
+ },
86
+ name: { enumerable: !1 },
87
+ nodes: { enumerable: !1 },
88
+ source: { enumerable: !1 },
89
+ positions: { enumerable: !1 },
90
+ originalError: { enumerable: !1 }
91
+ }), z !== null && z !== void 0 && z.stack) Object.defineProperty(this, "stack", {
92
+ value: z.stack,
93
+ writable: !0,
94
+ configurable: !0
95
+ });
96
+ else if (Error.captureStackTrace) Error.captureStackTrace(this, h$1);
97
+ else Object.defineProperty(this, "stack", {
98
+ value: Error().stack,
99
+ writable: !0,
100
+ configurable: !0
101
+ });
102
+ }
103
+ get [Symbol.toStringTag]() {
104
+ return "GraphQLError";
105
+ }
106
+ toString() {
107
+ let J = this.message;
108
+ if (this.nodes) {
109
+ for (let X of this.nodes) if (X.loc) J += `
110
+
111
+ ` + X4(X.loc);
112
+ } else if (this.source && this.locations) for (let X of this.locations) J += `
113
+
114
+ ` + b0(this.source, X);
115
+ return J;
116
+ }
117
+ toJSON() {
118
+ let J = { message: this.message };
119
+ if (this.locations != null) J.locations = this.locations;
120
+ if (this.path != null) J.path = this.path;
121
+ if (this.extensions != null && Object.keys(this.extensions).length > 0) J.extensions = this.extensions;
122
+ return J;
123
+ }
124
+ };
125
+ function D6(J) {
126
+ return J === void 0 || J.length === 0 ? void 0 : J;
127
+ }
128
+ var Y4;
129
+ (function(J) {
130
+ J.QUERY = "query", J.MUTATION = "mutation", J.SUBSCRIPTION = "subscription";
131
+ })(Y4 || (Y4 = {}));
132
+ var K;
133
+ (function(J) {
134
+ J.NAME = "Name", J.DOCUMENT = "Document", J.OPERATION_DEFINITION = "OperationDefinition", J.VARIABLE_DEFINITION = "VariableDefinition", J.SELECTION_SET = "SelectionSet", J.FIELD = "Field", J.ARGUMENT = "Argument", J.FRAGMENT_SPREAD = "FragmentSpread", J.INLINE_FRAGMENT = "InlineFragment", J.FRAGMENT_DEFINITION = "FragmentDefinition", J.VARIABLE = "Variable", J.INT = "IntValue", J.FLOAT = "FloatValue", J.STRING = "StringValue", J.BOOLEAN = "BooleanValue", J.NULL = "NullValue", J.ENUM = "EnumValue", J.LIST = "ListValue", J.OBJECT = "ObjectValue", J.OBJECT_FIELD = "ObjectField", J.DIRECTIVE = "Directive", J.NAMED_TYPE = "NamedType", J.LIST_TYPE = "ListType", J.NON_NULL_TYPE = "NonNullType", J.SCHEMA_DEFINITION = "SchemaDefinition", J.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", J.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", J.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", J.FIELD_DEFINITION = "FieldDefinition", J.INPUT_VALUE_DEFINITION = "InputValueDefinition", J.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", J.UNION_TYPE_DEFINITION = "UnionTypeDefinition", J.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", J.ENUM_VALUE_DEFINITION = "EnumValueDefinition", J.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", J.DIRECTIVE_DEFINITION = "DirectiveDefinition", J.SCHEMA_EXTENSION = "SchemaExtension", J.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", J.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", J.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", J.UNION_TYPE_EXTENSION = "UnionTypeExtension", J.ENUM_TYPE_EXTENSION = "EnumTypeExtension", J.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", J.TYPE_COORDINATE = "TypeCoordinate", J.MEMBER_COORDINATE = "MemberCoordinate", J.ARGUMENT_COORDINATE = "ArgumentCoordinate", J.DIRECTIVE_COORDINATE = "DirectiveCoordinate", J.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
135
+ })(K || (K = {}));
136
+ function o8(J) {
137
+ return J >= 48 && J <= 57;
138
+ }
139
+ function P6(J) {
140
+ return J >= 97 && J <= 122 || J >= 65 && J <= 90;
141
+ }
142
+ function O6(J) {
143
+ return P6(J) || J === 95;
144
+ }
145
+ function M6(J) {
146
+ return P6(J) || o8(J) || J === 95;
147
+ }
148
+ function e(J) {
149
+ return C0(J, []);
150
+ }
151
+ function C0(J, X) {
152
+ switch (typeof J) {
153
+ case "string": return JSON.stringify(J);
154
+ case "function": return J.name ? `[function ${J.name}]` : "[function]";
155
+ case "object": return r8(J, X);
156
+ default: return String(J);
157
+ }
158
+ }
159
+ function r8(J, X) {
160
+ if (J === null) return "null";
161
+ if (X.includes(J)) return "[Circular]";
162
+ let Y = [...X, J];
163
+ if (l8(J)) {
164
+ let W = J.toJSON();
165
+ if (W !== J) return typeof W === "string" ? W : C0(W, Y);
166
+ } else if (Array.isArray(J)) return d8(J, Y);
167
+ return p8(J, Y);
168
+ }
169
+ function l8(J) {
170
+ return typeof J.toJSON === "function";
171
+ }
172
+ function p8(J, X) {
173
+ let Y = Object.entries(J);
174
+ if (Y.length === 0) return "{}";
175
+ if (X.length > 2) return "[" + n8(J) + "]";
176
+ return "{ " + Y.map(([q, H]) => q + ": " + C0(H, X)).join(", ") + " }";
177
+ }
178
+ function d8(J, X) {
179
+ if (J.length === 0) return "[]";
180
+ if (X.length > 2) return "[Array]";
181
+ let Y = Math.min(10, J.length), W = J.length - Y, q = [];
182
+ for (let H = 0; H < Y; ++H) q.push(C0(J[H], X));
183
+ if (W === 1) q.push("... 1 more item");
184
+ else if (W > 1) q.push(`... ${W} more items`);
185
+ return "[" + q.join(", ") + "]";
186
+ }
187
+ function n8(J) {
188
+ let X = Object.prototype.toString.call(J).replace(/^\[object /, "").replace(/]$/, "");
189
+ if (X === "Object" && typeof J.constructor === "function") {
190
+ let Y = J.constructor.name;
191
+ if (typeof Y === "string" && Y !== "") return Y;
192
+ }
193
+ return X;
194
+ }
195
+ function B4(J) {
196
+ return J;
197
+ }
198
+ function k0(J, X, Y) {
199
+ let W = Object.create(null);
200
+ for (let q of J) W[X(q)] = Y(q);
201
+ return W;
202
+ }
203
+ function j0(J) {
204
+ if (J == null) return Object.create(null);
205
+ if (Object.getPrototypeOf(J) === null) return J;
206
+ let X = Object.create(null);
207
+ for (let [Y, W] of Object.entries(J)) X[Y] = W;
208
+ return X;
209
+ }
210
+ Object.freeze({});
211
+ function v0(J, X) {
212
+ switch (J.kind) {
213
+ case K.NULL: return null;
214
+ case K.INT: return parseInt(J.value, 10);
215
+ case K.FLOAT: return parseFloat(J.value);
216
+ case K.STRING:
217
+ case K.ENUM:
218
+ case K.BOOLEAN: return J.value;
219
+ case K.LIST: return J.values.map((Y) => v0(Y, X));
220
+ case K.OBJECT: return k0(J.fields, (Y) => Y.name.value, (Y) => v0(Y.value, X));
221
+ case K.VARIABLE: return X === null || X === void 0 ? void 0 : X[J.name.value];
222
+ }
223
+ }
224
+ function w0(J) {
225
+ if (J ?? u(!1, "Must provide name."), typeof J === "string" || u(!1, "Expected name to be a string."), J.length === 0) throw new h("Expected name to be a non-empty string.");
226
+ for (let X = 1; X < J.length; ++X) if (!M6(J.charCodeAt(X))) throw new h(`Names must only contain [_a-zA-Z0-9] but "${J}" does not.`);
227
+ if (!O6(J.charCodeAt(0))) throw new h(`Names must start with [_a-zA-Z] but "${J}" does not.`);
228
+ return J;
229
+ }
230
+ var D0 = class {
231
+ constructor(J) {
232
+ var X, Y, W, q;
233
+ let H = (X = J.parseValue) !== null && X !== void 0 ? X : B4;
234
+ if (this.name = w0(J.name), this.description = J.description, this.specifiedByURL = J.specifiedByURL, this.serialize = (Y = J.serialize) !== null && Y !== void 0 ? Y : B4, this.parseValue = H, this.parseLiteral = (W = J.parseLiteral) !== null && W !== void 0 ? W : (B, Q) => H(v0(B, Q)), this.extensions = j0(J.extensions), this.astNode = J.astNode, this.extensionASTNodes = (q = J.extensionASTNodes) !== null && q !== void 0 ? q : [], J.specifiedByURL == null || typeof J.specifiedByURL === "string" || u(!1, `${this.name} must provide "specifiedByURL" as a string, but got: ${e(J.specifiedByURL)}.`), J.serialize == null || typeof J.serialize === "function" || u(!1, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`), J.parseLiteral) typeof J.parseValue === "function" && typeof J.parseLiteral === "function" || u(!1, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`);
235
+ }
236
+ get [Symbol.toStringTag]() {
237
+ return "GraphQLScalarType";
238
+ }
239
+ toConfig() {
240
+ return {
241
+ name: this.name,
242
+ description: this.description,
243
+ specifiedByURL: this.specifiedByURL,
244
+ serialize: this.serialize,
245
+ parseValue: this.parseValue,
246
+ parseLiteral: this.parseLiteral,
247
+ extensions: this.extensions,
248
+ astNode: this.astNode,
249
+ extensionASTNodes: this.extensionASTNodes
250
+ };
251
+ }
252
+ toString() {
253
+ return this.name;
254
+ }
255
+ toJSON() {
256
+ return this.toString();
257
+ }
258
+ };
259
+ var Z = class extends D0 {
260
+ zodSchema;
261
+ jsonSchemaDef;
262
+ constructor(J) {
263
+ super(J);
264
+ this.zodSchema = J.zod, this.jsonSchemaDef = J.jsonSchema;
265
+ }
266
+ getZod() {
267
+ return this.zodSchema;
268
+ }
269
+ getPothos() {
270
+ return this;
271
+ }
272
+ getJson() {
273
+ return typeof this.jsonSchemaDef === "function" ? this.jsonSchemaDef() : this.jsonSchemaDef;
274
+ }
275
+ getJsonSchemaDef() {
276
+ return this.jsonSchemaDef;
277
+ }
278
+ getJsonSchema() {
279
+ let J = (X) => {
280
+ let Y = typeof X === "function" ? X() : X;
281
+ if (Array.isArray(Y)) return Y.map((W) => J(W));
282
+ if (Y && typeof Y === "object") {
283
+ let W = {};
284
+ for (let [q, H] of Object.entries(Y)) W[q] = J(H);
285
+ return W;
286
+ }
287
+ return Y;
288
+ };
289
+ return J(this.getJson());
290
+ }
291
+ };
292
+ Object.freeze({ status: "aborted" });
293
+ function U(J, X, Y) {
294
+ function W(Q, G) {
295
+ if (!Q._zod) Object.defineProperty(Q, "_zod", {
296
+ value: {
297
+ def: G,
298
+ constr: B,
299
+ traits: /* @__PURE__ */ new Set()
300
+ },
301
+ enumerable: !1
302
+ });
303
+ if (Q._zod.traits.has(J)) return;
304
+ Q._zod.traits.add(J), X(Q, G);
305
+ let z = B.prototype, I = Object.keys(z);
306
+ for (let w = 0; w < I.length; w++) {
307
+ let M = I[w];
308
+ if (!(M in Q)) Q[M] = z[M].bind(Q);
309
+ }
310
+ }
311
+ let q = Y?.Parent ?? Object;
312
+ class H extends q {}
313
+ Object.defineProperty(H, "name", { value: J });
314
+ function B(Q) {
315
+ var G;
316
+ let z = Y?.Parent ? new H() : this;
317
+ W(z, Q), (G = z._zod).deferred ?? (G.deferred = []);
318
+ for (let I of z._zod.deferred) I();
319
+ return z;
320
+ }
321
+ return Object.defineProperty(B, "init", { value: W }), Object.defineProperty(B, Symbol.hasInstance, { value: (Q) => {
322
+ if (Y?.Parent && Q instanceof Y.Parent) return !0;
323
+ return Q?._zod?.traits?.has(J);
324
+ } }), Object.defineProperty(B, "name", { value: J }), B;
325
+ }
326
+ var r = class extends Error {
327
+ constructor() {
328
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
329
+ }
330
+ };
331
+ var O0 = class extends Error {
332
+ constructor(J) {
333
+ super(`Encountered unidirectional transform during encode: ${J}`);
334
+ this.name = "ZodEncodeError";
335
+ }
336
+ };
337
+ var u0 = {};
338
+ function v(J) {
339
+ if (J) Object.assign(u0, J);
340
+ return u0;
341
+ }
342
+ var F = {};
343
+ U6(F, {
344
+ unwrapMessage: () => M0,
345
+ uint8ArrayToHex: () => AX,
346
+ uint8ArrayToBase64url: () => OX,
347
+ uint8ArrayToBase64: () => x6,
348
+ stringifyPrimitive: () => f0,
349
+ slugify: () => D4,
350
+ shallowClone: () => C6,
351
+ safeExtend: () => GX,
352
+ required: () => wX,
353
+ randomString: () => YX,
354
+ propertyKeyTypes: () => O4,
355
+ promiseAllObject: () => XX,
356
+ primitiveTypes: () => k6,
357
+ prefixIssues: () => l,
358
+ pick: () => BX,
359
+ partial: () => IX,
360
+ optionalKeys: () => M4,
361
+ omit: () => QX,
362
+ objectClone: () => s9,
363
+ numKeys: () => WX,
364
+ nullish: () => E0,
365
+ normalizeParams: () => O,
366
+ mergeDefs: () => i,
367
+ merge: () => UX,
368
+ jsonStringifyReplacer: () => H0,
369
+ joinValues: () => c0,
370
+ issue: () => B0,
371
+ isPlainObject: () => t,
372
+ isObject: () => q0,
373
+ hexToUint8Array: () => MX,
374
+ getSizableOrigin: () => j6,
375
+ getParsedType: () => qX,
376
+ getLengthableOrigin: () => K0,
377
+ getEnumValues: () => A0,
378
+ getElementAtPath: () => JX,
379
+ floatSafeRemainder: () => w4,
380
+ finalizeIssue: () => m,
381
+ extend: () => zX,
382
+ escapeRegex: () => J0,
383
+ esc: () => y0,
384
+ defineLazy: () => E,
385
+ createTransparentProxy: () => HX,
386
+ cloneDef: () => e9,
387
+ clone: () => y,
388
+ cleanRegex: () => $0,
389
+ cleanEnum: () => DX,
390
+ captureStackTrace: () => m0,
391
+ cached: () => F0,
392
+ base64urlToUint8Array: () => PX,
393
+ base64ToUint8Array: () => h6,
394
+ assignProp: () => n,
395
+ assertNotEqual: () => n9,
396
+ assertNever: () => t9,
397
+ assertIs: () => i9,
398
+ assertEqual: () => d9,
399
+ assert: () => a9,
400
+ allowsEval: () => P4,
401
+ aborted: () => a,
402
+ NUMBER_FORMAT_RANGES: () => A4,
403
+ Class: () => v6,
404
+ BIGINT_FORMAT_RANGES: () => T6
405
+ });
406
+ function d9(J) {
407
+ return J;
408
+ }
409
+ function n9(J) {
410
+ return J;
411
+ }
412
+ function i9(J) {}
413
+ function t9(J) {
414
+ throw Error("Unexpected value in exhaustive check");
415
+ }
416
+ function a9(J) {}
417
+ function A0(J) {
418
+ let X = Object.values(J).filter((W) => typeof W === "number");
419
+ return Object.entries(J).filter(([W, q]) => X.indexOf(+W) === -1).map(([W, q]) => q);
420
+ }
421
+ function c0(J, X = "|") {
422
+ return J.map((Y) => f0(Y)).join(X);
423
+ }
424
+ function H0(J, X) {
425
+ if (typeof X === "bigint") return X.toString();
426
+ return X;
427
+ }
428
+ function F0(J) {
429
+ return { get value() {
430
+ {
431
+ let Y = J();
432
+ return Object.defineProperty(this, "value", { value: Y }), Y;
433
+ }
434
+ throw Error("cached value already set");
435
+ } };
436
+ }
437
+ function E0(J) {
438
+ return J === null || J === void 0;
439
+ }
440
+ function $0(J) {
441
+ let X = J.startsWith("^") ? 1 : 0, Y = J.endsWith("$") ? J.length - 1 : J.length;
442
+ return J.slice(X, Y);
443
+ }
444
+ function w4(J, X) {
445
+ let Y = (J.toString().split(".")[1] || "").length, W = X.toString(), q = (W.split(".")[1] || "").length;
446
+ if (q === 0 && /\d?e-\d?/.test(W)) {
447
+ let G = W.match(/\d?e-(\d?)/);
448
+ if (G?.[1]) q = Number.parseInt(G[1]);
449
+ }
450
+ let H = Y > q ? Y : q;
451
+ return Number.parseInt(J.toFixed(H).replace(".", "")) % Number.parseInt(X.toFixed(H).replace(".", "")) / 10 ** H;
452
+ }
453
+ var b6 = Symbol("evaluating");
454
+ function E(J, X, Y) {
455
+ let W = void 0;
456
+ Object.defineProperty(J, X, {
457
+ get() {
458
+ if (W === b6) return;
459
+ if (W === void 0) W = b6, W = Y();
460
+ return W;
461
+ },
462
+ set(q) {
463
+ Object.defineProperty(J, X, { value: q });
464
+ },
465
+ configurable: !0
466
+ });
467
+ }
468
+ function s9(J) {
469
+ return Object.create(Object.getPrototypeOf(J), Object.getOwnPropertyDescriptors(J));
470
+ }
471
+ function n(J, X, Y) {
472
+ Object.defineProperty(J, X, {
473
+ value: Y,
474
+ writable: !0,
475
+ enumerable: !0,
476
+ configurable: !0
477
+ });
478
+ }
479
+ function i(...J) {
480
+ let X = {};
481
+ for (let Y of J) {
482
+ let W = Object.getOwnPropertyDescriptors(Y);
483
+ Object.assign(X, W);
484
+ }
485
+ return Object.defineProperties({}, X);
486
+ }
487
+ function e9(J) {
488
+ return i(J._zod.def);
489
+ }
490
+ function JX(J, X) {
491
+ if (!X) return J;
492
+ return X.reduce((Y, W) => Y?.[W], J);
493
+ }
494
+ function XX(J) {
495
+ let X = Object.keys(J), Y = X.map((W) => J[W]);
496
+ return Promise.all(Y).then((W) => {
497
+ let q = {};
498
+ for (let H = 0; H < X.length; H++) q[X[H]] = W[H];
499
+ return q;
500
+ });
501
+ }
502
+ function YX(J = 10) {
503
+ let Y = "";
504
+ for (let W = 0; W < J; W++) Y += "abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random() * 26)];
505
+ return Y;
506
+ }
507
+ function y0(J) {
508
+ return JSON.stringify(J);
509
+ }
510
+ function D4(J) {
511
+ return J.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
512
+ }
513
+ var m0 = "captureStackTrace" in Error ? Error.captureStackTrace : (...J) => {};
514
+ function q0(J) {
515
+ return typeof J === "object" && J !== null && !Array.isArray(J);
516
+ }
517
+ var P4 = F0(() => {
518
+ if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
519
+ try {
520
+ return new Function(""), !0;
521
+ } catch (J) {
522
+ return !1;
523
+ }
524
+ });
525
+ function t(J) {
526
+ if (q0(J) === !1) return !1;
527
+ let X = J.constructor;
528
+ if (X === void 0) return !0;
529
+ if (typeof X !== "function") return !0;
530
+ let Y = X.prototype;
531
+ if (q0(Y) === !1) return !1;
532
+ if (Object.prototype.hasOwnProperty.call(Y, "isPrototypeOf") === !1) return !1;
533
+ return !0;
534
+ }
535
+ function C6(J) {
536
+ if (t(J)) return { ...J };
537
+ if (Array.isArray(J)) return [...J];
538
+ return J;
539
+ }
540
+ function WX(J) {
541
+ let X = 0;
542
+ for (let Y in J) if (Object.prototype.hasOwnProperty.call(J, Y)) X++;
543
+ return X;
544
+ }
545
+ var qX = (J) => {
546
+ let X = typeof J;
547
+ switch (X) {
548
+ case "undefined": return "undefined";
549
+ case "string": return "string";
550
+ case "number": return Number.isNaN(J) ? "nan" : "number";
551
+ case "boolean": return "boolean";
552
+ case "function": return "function";
553
+ case "bigint": return "bigint";
554
+ case "symbol": return "symbol";
555
+ case "object":
556
+ if (Array.isArray(J)) return "array";
557
+ if (J === null) return "null";
558
+ if (J.then && typeof J.then === "function" && J.catch && typeof J.catch === "function") return "promise";
559
+ if (typeof Map < "u" && J instanceof Map) return "map";
560
+ if (typeof Set < "u" && J instanceof Set) return "set";
561
+ if (typeof Date < "u" && J instanceof Date) return "date";
562
+ if (typeof File < "u" && J instanceof File) return "file";
563
+ return "object";
564
+ default: throw Error(`Unknown data type: ${X}`);
565
+ }
566
+ }, O4 = new Set([
567
+ "string",
568
+ "number",
569
+ "symbol"
570
+ ]), k6 = new Set([
571
+ "string",
572
+ "number",
573
+ "bigint",
574
+ "boolean",
575
+ "symbol",
576
+ "undefined"
577
+ ]);
578
+ function J0(J) {
579
+ return J.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
580
+ }
581
+ function y(J, X, Y) {
582
+ let W = new J._zod.constr(X ?? J._zod.def);
583
+ if (!X || Y?.parent) W._zod.parent = J;
584
+ return W;
585
+ }
586
+ function O(J) {
587
+ let X = J;
588
+ if (!X) return {};
589
+ if (typeof X === "string") return { error: () => X };
590
+ if (X?.message !== void 0) {
591
+ if (X?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
592
+ X.error = X.message;
593
+ }
594
+ if (delete X.message, typeof X.error === "string") return {
595
+ ...X,
596
+ error: () => X.error
597
+ };
598
+ return X;
599
+ }
600
+ function HX(J) {
601
+ let X;
602
+ return new Proxy({}, {
603
+ get(Y, W, q) {
604
+ return X ?? (X = J()), Reflect.get(X, W, q);
605
+ },
606
+ set(Y, W, q, H) {
607
+ return X ?? (X = J()), Reflect.set(X, W, q, H);
608
+ },
609
+ has(Y, W) {
610
+ return X ?? (X = J()), Reflect.has(X, W);
611
+ },
612
+ deleteProperty(Y, W) {
613
+ return X ?? (X = J()), Reflect.deleteProperty(X, W);
614
+ },
615
+ ownKeys(Y) {
616
+ return X ?? (X = J()), Reflect.ownKeys(X);
617
+ },
618
+ getOwnPropertyDescriptor(Y, W) {
619
+ return X ?? (X = J()), Reflect.getOwnPropertyDescriptor(X, W);
620
+ },
621
+ defineProperty(Y, W, q) {
622
+ return X ?? (X = J()), Reflect.defineProperty(X, W, q);
623
+ }
624
+ });
625
+ }
626
+ function f0(J) {
627
+ if (typeof J === "bigint") return J.toString() + "n";
628
+ if (typeof J === "string") return `"${J}"`;
629
+ return `${J}`;
630
+ }
631
+ function M4(J) {
632
+ return Object.keys(J).filter((X) => {
633
+ return J[X]._zod.optin === "optional" && J[X]._zod.optout === "optional";
634
+ });
635
+ }
636
+ var A4 = {
637
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
638
+ int32: [-2147483648, 2147483647],
639
+ uint32: [0, 4294967295],
640
+ float32: [-34028234663852886e22, 34028234663852886e22],
641
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
642
+ }, T6 = {
643
+ int64: [BigInt("-9223372036854775808"), BigInt("9223372036854775807")],
644
+ uint64: [BigInt(0), BigInt("18446744073709551615")]
645
+ };
646
+ function BX(J, X) {
647
+ let Y = J._zod.def;
648
+ return y(J, i(J._zod.def, {
649
+ get shape() {
650
+ let q = {};
651
+ for (let H in X) {
652
+ if (!(H in Y.shape)) throw Error(`Unrecognized key: "${H}"`);
653
+ if (!X[H]) continue;
654
+ q[H] = Y.shape[H];
655
+ }
656
+ return n(this, "shape", q), q;
657
+ },
658
+ checks: []
659
+ }));
660
+ }
661
+ function QX(J, X) {
662
+ let Y = J._zod.def;
663
+ return y(J, i(J._zod.def, {
664
+ get shape() {
665
+ let q = { ...J._zod.def.shape };
666
+ for (let H in X) {
667
+ if (!(H in Y.shape)) throw Error(`Unrecognized key: "${H}"`);
668
+ if (!X[H]) continue;
669
+ delete q[H];
670
+ }
671
+ return n(this, "shape", q), q;
672
+ },
673
+ checks: []
674
+ }));
675
+ }
676
+ function zX(J, X) {
677
+ if (!t(X)) throw Error("Invalid input to extend: expected a plain object");
678
+ let Y = J._zod.def.checks;
679
+ if (Y && Y.length > 0) throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
680
+ return y(J, i(J._zod.def, {
681
+ get shape() {
682
+ let H = {
683
+ ...J._zod.def.shape,
684
+ ...X
685
+ };
686
+ return n(this, "shape", H), H;
687
+ },
688
+ checks: []
689
+ }));
690
+ }
691
+ function GX(J, X) {
692
+ if (!t(X)) throw Error("Invalid input to safeExtend: expected a plain object");
693
+ return y(J, {
694
+ ...J._zod.def,
695
+ get shape() {
696
+ let W = {
697
+ ...J._zod.def.shape,
698
+ ...X
699
+ };
700
+ return n(this, "shape", W), W;
701
+ },
702
+ checks: J._zod.def.checks
703
+ });
704
+ }
705
+ function UX(J, X) {
706
+ return y(J, i(J._zod.def, {
707
+ get shape() {
708
+ let W = {
709
+ ...J._zod.def.shape,
710
+ ...X._zod.def.shape
711
+ };
712
+ return n(this, "shape", W), W;
713
+ },
714
+ get catchall() {
715
+ return X._zod.def.catchall;
716
+ },
717
+ checks: []
718
+ }));
719
+ }
720
+ function IX(J, X, Y) {
721
+ return y(X, i(X._zod.def, {
722
+ get shape() {
723
+ let q = X._zod.def.shape, H = { ...q };
724
+ if (Y) for (let B in Y) {
725
+ if (!(B in q)) throw Error(`Unrecognized key: "${B}"`);
726
+ if (!Y[B]) continue;
727
+ H[B] = J ? new J({
728
+ type: "optional",
729
+ innerType: q[B]
730
+ }) : q[B];
731
+ }
732
+ else for (let B in q) H[B] = J ? new J({
733
+ type: "optional",
734
+ innerType: q[B]
735
+ }) : q[B];
736
+ return n(this, "shape", H), H;
737
+ },
738
+ checks: []
739
+ }));
740
+ }
741
+ function wX(J, X, Y) {
742
+ return y(X, i(X._zod.def, {
743
+ get shape() {
744
+ let q = X._zod.def.shape, H = { ...q };
745
+ if (Y) for (let B in Y) {
746
+ if (!(B in H)) throw Error(`Unrecognized key: "${B}"`);
747
+ if (!Y[B]) continue;
748
+ H[B] = new J({
749
+ type: "nonoptional",
750
+ innerType: q[B]
751
+ });
752
+ }
753
+ else for (let B in q) H[B] = new J({
754
+ type: "nonoptional",
755
+ innerType: q[B]
756
+ });
757
+ return n(this, "shape", H), H;
758
+ },
759
+ checks: []
760
+ }));
761
+ }
762
+ function a(J, X = 0) {
763
+ if (J.aborted === !0) return !0;
764
+ for (let Y = X; Y < J.issues.length; Y++) if (J.issues[Y]?.continue !== !0) return !0;
765
+ return !1;
766
+ }
767
+ function l(J, X) {
768
+ return X.map((Y) => {
769
+ var W;
770
+ return (W = Y).path ?? (W.path = []), Y.path.unshift(J), Y;
771
+ });
772
+ }
773
+ function M0(J) {
774
+ return typeof J === "string" ? J : J?.message;
775
+ }
776
+ function m(J, X, Y) {
777
+ let W = {
778
+ ...J,
779
+ path: J.path ?? []
780
+ };
781
+ if (!J.message) W.message = M0(J.inst?._zod.def?.error?.(J)) ?? M0(X?.error?.(J)) ?? M0(Y.customError?.(J)) ?? M0(Y.localeError?.(J)) ?? "Invalid input";
782
+ if (delete W.inst, delete W.continue, !X?.reportInput) delete W.input;
783
+ return W;
784
+ }
785
+ function j6(J) {
786
+ if (J instanceof Set) return "set";
787
+ if (J instanceof Map) return "map";
788
+ if (J instanceof File) return "file";
789
+ return "unknown";
790
+ }
791
+ function K0(J) {
792
+ if (Array.isArray(J)) return "array";
793
+ if (typeof J === "string") return "string";
794
+ return "unknown";
795
+ }
796
+ function B0(...J) {
797
+ let [X, Y, W] = J;
798
+ if (typeof X === "string") return {
799
+ message: X,
800
+ code: "custom",
801
+ input: Y,
802
+ inst: W
803
+ };
804
+ return { ...X };
805
+ }
806
+ function DX(J) {
807
+ return Object.entries(J).filter(([X, Y]) => {
808
+ return Number.isNaN(Number.parseInt(X, 10));
809
+ }).map((X) => X[1]);
810
+ }
811
+ function h6(J) {
812
+ let X = atob(J), Y = new Uint8Array(X.length);
813
+ for (let W = 0; W < X.length; W++) Y[W] = X.charCodeAt(W);
814
+ return Y;
815
+ }
816
+ function x6(J) {
817
+ let X = "";
818
+ for (let Y = 0; Y < J.length; Y++) X += String.fromCharCode(J[Y]);
819
+ return btoa(X);
820
+ }
821
+ function PX(J) {
822
+ let X = J.replace(/-/g, "+").replace(/_/g, "/");
823
+ return h6(X + "=".repeat((4 - X.length % 4) % 4));
824
+ }
825
+ function OX(J) {
826
+ return x6(J).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
827
+ }
828
+ function MX(J) {
829
+ let X = J.replace(/^0x/, "");
830
+ if (X.length % 2 !== 0) throw Error("Invalid hex string length");
831
+ let Y = new Uint8Array(X.length / 2);
832
+ for (let W = 0; W < X.length; W += 2) Y[W / 2] = Number.parseInt(X.slice(W, W + 2), 16);
833
+ return Y;
834
+ }
835
+ function AX(J) {
836
+ return Array.from(J).map((X) => X.toString(16).padStart(2, "0")).join("");
837
+ }
838
+ var v6 = class {
839
+ constructor(...J) {}
840
+ };
841
+ var g6 = (J, X) => {
842
+ J.name = "$ZodError", Object.defineProperty(J, "_zod", {
843
+ value: J._zod,
844
+ enumerable: !1
845
+ }), Object.defineProperty(J, "issues", {
846
+ value: X,
847
+ enumerable: !1
848
+ }), J.message = JSON.stringify(X, H0, 2), Object.defineProperty(J, "toString", {
849
+ value: () => J.message,
850
+ enumerable: !1
851
+ });
852
+ }, o0 = U("$ZodError", g6), F4 = U("$ZodError", g6, { Parent: Error });
853
+ function u6(J, X = (Y$1) => Y$1.message) {
854
+ let Y = {}, W = [];
855
+ for (let q of J.issues) if (q.path.length > 0) Y[q.path[0]] = Y[q.path[0]] || [], Y[q.path[0]].push(X(q));
856
+ else W.push(X(q));
857
+ return {
858
+ formErrors: W,
859
+ fieldErrors: Y
860
+ };
861
+ }
862
+ function c6(J, X = (Y$1) => Y$1.message) {
863
+ let Y = { _errors: [] }, W = (q) => {
864
+ for (let H of q.issues) if (H.code === "invalid_union" && H.errors.length) H.errors.map((B) => W({ issues: B }));
865
+ else if (H.code === "invalid_key") W({ issues: H.issues });
866
+ else if (H.code === "invalid_element") W({ issues: H.issues });
867
+ else if (H.path.length === 0) Y._errors.push(X(H));
868
+ else {
869
+ let B = Y, Q = 0;
870
+ while (Q < H.path.length) {
871
+ let G = H.path[Q];
872
+ if (Q !== H.path.length - 1) B[G] = B[G] || { _errors: [] };
873
+ else B[G] = B[G] || { _errors: [] }, B[G]._errors.push(X(H));
874
+ B = B[G], Q++;
875
+ }
876
+ }
877
+ };
878
+ return W(J), Y;
879
+ }
880
+ var r0 = (J) => (X, Y, W, q) => {
881
+ let H = W ? Object.assign(W, { async: !1 }) : { async: !1 }, B = X._zod.run({
882
+ value: Y,
883
+ issues: []
884
+ }, H);
885
+ if (B instanceof Promise) throw new r();
886
+ if (B.issues.length) {
887
+ let Q = new (q?.Err ?? J)(B.issues.map((G) => m(G, H, v())));
888
+ throw m0(Q, q?.callee), Q;
889
+ }
890
+ return B.value;
891
+ };
892
+ var l0 = (J) => async (X, Y, W, q) => {
893
+ let H = W ? Object.assign(W, { async: !0 }) : { async: !0 }, B = X._zod.run({
894
+ value: Y,
895
+ issues: []
896
+ }, H);
897
+ if (B instanceof Promise) B = await B;
898
+ if (B.issues.length) {
899
+ let Q = new (q?.Err ?? J)(B.issues.map((G) => m(G, H, v())));
900
+ throw m0(Q, q?.callee), Q;
901
+ }
902
+ return B.value;
903
+ };
904
+ var V0 = (J) => (X, Y, W) => {
905
+ let q = W ? {
906
+ ...W,
907
+ async: !1
908
+ } : { async: !1 }, H = X._zod.run({
909
+ value: Y,
910
+ issues: []
911
+ }, q);
912
+ if (H instanceof Promise) throw new r();
913
+ return H.issues.length ? {
914
+ success: !1,
915
+ error: new (J ?? o0)(H.issues.map((B) => m(B, q, v())))
916
+ } : {
917
+ success: !0,
918
+ data: H.value
919
+ };
920
+ }, y6 = V0(F4), R0 = (J) => async (X, Y, W) => {
921
+ let q = W ? Object.assign(W, { async: !0 }) : { async: !0 }, H = X._zod.run({
922
+ value: Y,
923
+ issues: []
924
+ }, q);
925
+ if (H instanceof Promise) H = await H;
926
+ return H.issues.length ? {
927
+ success: !1,
928
+ error: new J(H.issues.map((B) => m(B, q, v())))
929
+ } : {
930
+ success: !0,
931
+ data: H.value
932
+ };
933
+ }, m6 = R0(F4), f6 = (J) => (X, Y, W) => {
934
+ let q = W ? Object.assign(W, { direction: "backward" }) : { direction: "backward" };
935
+ return r0(J)(X, Y, q);
936
+ };
937
+ var o6 = (J) => (X, Y, W) => {
938
+ return r0(J)(X, Y, W);
939
+ };
940
+ var r6 = (J) => async (X, Y, W) => {
941
+ let q = W ? Object.assign(W, { direction: "backward" }) : { direction: "backward" };
942
+ return l0(J)(X, Y, q);
943
+ };
944
+ var l6 = (J) => async (X, Y, W) => {
945
+ return l0(J)(X, Y, W);
946
+ };
947
+ var p6 = (J) => (X, Y, W) => {
948
+ let q = W ? Object.assign(W, { direction: "backward" }) : { direction: "backward" };
949
+ return V0(J)(X, Y, q);
950
+ };
951
+ var d6 = (J) => (X, Y, W) => {
952
+ return V0(J)(X, Y, W);
953
+ };
954
+ var n6 = (J) => async (X, Y, W) => {
955
+ let q = W ? Object.assign(W, { direction: "backward" }) : { direction: "backward" };
956
+ return R0(J)(X, Y, q);
957
+ };
958
+ var i6 = (J) => async (X, Y, W) => {
959
+ return R0(J)(X, Y, W);
960
+ };
961
+ var t6 = /^[cC][^\s-]{8,}$/, a6 = /^[0-9a-z]+$/, s6 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, e6 = /^[0-9a-vA-V]{20}$/, J1 = /^[A-Za-z0-9]{27}$/, X1 = /^[a-zA-Z0-9_-]{21}$/, Y1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
962
+ var W1 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, E4 = (J) => {
963
+ if (!J) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
964
+ return /* @__PURE__ */ new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${J}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
965
+ };
966
+ var q1 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
967
+ var EX = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
968
+ function H1() {
969
+ return new RegExp(EX, "u");
970
+ }
971
+ var B1 = /^(?:(?: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])$/, Q1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
972
+ var z1 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, G1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, U1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, $4 = /^[A-Za-z0-9_-]*$/;
973
+ var I1 = /^\+(?:[0-9]){6,14}[0-9]$/, w1 = "(?:(?:\\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])))", D1 = /* @__PURE__ */ new RegExp(`^${w1}$`);
974
+ function P1(J) {
975
+ return typeof J.precision === "number" ? J.precision === -1 ? "(?:[01]\\d|2[0-3]):[0-5]\\d" : J.precision === 0 ? "(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d" : `(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${J.precision}}` : "(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?";
976
+ }
977
+ function O1(J) {
978
+ return /* @__PURE__ */ new RegExp(`^${P1(J)}$`);
979
+ }
980
+ function M1(J) {
981
+ let X = P1({ precision: J.precision }), Y = ["Z"];
982
+ if (J.local) Y.push("");
983
+ if (J.offset) Y.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
984
+ let W = `${X}(?:${Y.join("|")})`;
985
+ return /* @__PURE__ */ new RegExp(`^${w1}T(?:${W})$`);
986
+ }
987
+ var A1 = (J) => {
988
+ let X = J ? `[\\s\\S]{${J?.minimum ?? 0},${J?.maximum ?? ""}}` : "[\\s\\S]*";
989
+ return /* @__PURE__ */ new RegExp(`^${X}$`);
990
+ }, F1 = /^-?\d+n?$/, E1 = /^-?\d+$/, $1 = /^-?\d+(?:\.\d+)?/, K1 = /^(?:true|false)$/i;
991
+ var V1 = /^[^A-Z]*$/, R1 = /^[^a-z]*$/;
992
+ var T = U("$ZodCheck", (J, X) => {
993
+ var Y;
994
+ J._zod ?? (J._zod = {}), J._zod.def = X, (Y = J._zod).onattach ?? (Y.onattach = []);
995
+ }), N1 = {
996
+ number: "number",
997
+ bigint: "bigint",
998
+ object: "date"
999
+ }, K4 = U("$ZodCheckLessThan", (J, X) => {
1000
+ T.init(J, X);
1001
+ let Y = N1[typeof X.value];
1002
+ J._zod.onattach.push((W) => {
1003
+ let q = W._zod.bag, H = (X.inclusive ? q.maximum : q.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1004
+ if (X.value < H) if (X.inclusive) q.maximum = X.value;
1005
+ else q.exclusiveMaximum = X.value;
1006
+ }), J._zod.check = (W) => {
1007
+ if (X.inclusive ? W.value <= X.value : W.value < X.value) return;
1008
+ W.issues.push({
1009
+ origin: Y,
1010
+ code: "too_big",
1011
+ maximum: X.value,
1012
+ input: W.value,
1013
+ inclusive: X.inclusive,
1014
+ inst: J,
1015
+ continue: !X.abort
1016
+ });
1017
+ };
1018
+ }), V4 = U("$ZodCheckGreaterThan", (J, X) => {
1019
+ T.init(J, X);
1020
+ let Y = N1[typeof X.value];
1021
+ J._zod.onattach.push((W) => {
1022
+ let q = W._zod.bag, H = (X.inclusive ? q.minimum : q.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1023
+ if (X.value > H) if (X.inclusive) q.minimum = X.value;
1024
+ else q.exclusiveMinimum = X.value;
1025
+ }), J._zod.check = (W) => {
1026
+ if (X.inclusive ? W.value >= X.value : W.value > X.value) return;
1027
+ W.issues.push({
1028
+ origin: Y,
1029
+ code: "too_small",
1030
+ minimum: X.value,
1031
+ input: W.value,
1032
+ inclusive: X.inclusive,
1033
+ inst: J,
1034
+ continue: !X.abort
1035
+ });
1036
+ };
1037
+ }), S1 = U("$ZodCheckMultipleOf", (J, X) => {
1038
+ T.init(J, X), J._zod.onattach.push((Y) => {
1039
+ var W;
1040
+ (W = Y._zod.bag).multipleOf ?? (W.multipleOf = X.value);
1041
+ }), J._zod.check = (Y) => {
1042
+ if (typeof Y.value !== typeof X.value) throw Error("Cannot mix number and bigint in multiple_of check.");
1043
+ if (typeof Y.value === "bigint" ? Y.value % X.value === BigInt(0) : w4(Y.value, X.value) === 0) return;
1044
+ Y.issues.push({
1045
+ origin: typeof Y.value,
1046
+ code: "not_multiple_of",
1047
+ divisor: X.value,
1048
+ input: Y.value,
1049
+ inst: J,
1050
+ continue: !X.abort
1051
+ });
1052
+ };
1053
+ }), L1 = U("$ZodCheckNumberFormat", (J, X) => {
1054
+ T.init(J, X), X.format = X.format || "float64";
1055
+ let Y = X.format?.includes("int"), W = Y ? "int" : "number", [q, H] = A4[X.format];
1056
+ J._zod.onattach.push((B) => {
1057
+ let Q = B._zod.bag;
1058
+ if (Q.format = X.format, Q.minimum = q, Q.maximum = H, Y) Q.pattern = E1;
1059
+ }), J._zod.check = (B) => {
1060
+ let Q = B.value;
1061
+ if (Y) {
1062
+ if (!Number.isInteger(Q)) {
1063
+ B.issues.push({
1064
+ expected: W,
1065
+ format: X.format,
1066
+ code: "invalid_type",
1067
+ continue: !1,
1068
+ input: Q,
1069
+ inst: J
1070
+ });
1071
+ return;
1072
+ }
1073
+ if (!Number.isSafeInteger(Q)) {
1074
+ if (Q > 0) B.issues.push({
1075
+ input: Q,
1076
+ code: "too_big",
1077
+ maximum: Number.MAX_SAFE_INTEGER,
1078
+ note: "Integers must be within the safe integer range.",
1079
+ inst: J,
1080
+ origin: W,
1081
+ continue: !X.abort
1082
+ });
1083
+ else B.issues.push({
1084
+ input: Q,
1085
+ code: "too_small",
1086
+ minimum: Number.MIN_SAFE_INTEGER,
1087
+ note: "Integers must be within the safe integer range.",
1088
+ inst: J,
1089
+ origin: W,
1090
+ continue: !X.abort
1091
+ });
1092
+ return;
1093
+ }
1094
+ }
1095
+ if (Q < q) B.issues.push({
1096
+ origin: "number",
1097
+ input: Q,
1098
+ code: "too_small",
1099
+ minimum: q,
1100
+ inclusive: !0,
1101
+ inst: J,
1102
+ continue: !X.abort
1103
+ });
1104
+ if (Q > H) B.issues.push({
1105
+ origin: "number",
1106
+ input: Q,
1107
+ code: "too_big",
1108
+ maximum: H,
1109
+ inst: J
1110
+ });
1111
+ };
1112
+ });
1113
+ var Z1 = U("$ZodCheckMaxLength", (J, X) => {
1114
+ var Y;
1115
+ T.init(J, X), (Y = J._zod.def).when ?? (Y.when = (W) => {
1116
+ let q = W.value;
1117
+ return !E0(q) && q.length !== void 0;
1118
+ }), J._zod.onattach.push((W) => {
1119
+ let q = W._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1120
+ if (X.maximum < q) W._zod.bag.maximum = X.maximum;
1121
+ }), J._zod.check = (W) => {
1122
+ let q = W.value;
1123
+ if (q.length <= X.maximum) return;
1124
+ let B = K0(q);
1125
+ W.issues.push({
1126
+ origin: B,
1127
+ code: "too_big",
1128
+ maximum: X.maximum,
1129
+ inclusive: !0,
1130
+ input: q,
1131
+ inst: J,
1132
+ continue: !X.abort
1133
+ });
1134
+ };
1135
+ }), _1 = U("$ZodCheckMinLength", (J, X) => {
1136
+ var Y;
1137
+ T.init(J, X), (Y = J._zod.def).when ?? (Y.when = (W) => {
1138
+ let q = W.value;
1139
+ return !E0(q) && q.length !== void 0;
1140
+ }), J._zod.onattach.push((W) => {
1141
+ let q = W._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1142
+ if (X.minimum > q) W._zod.bag.minimum = X.minimum;
1143
+ }), J._zod.check = (W) => {
1144
+ let q = W.value;
1145
+ if (q.length >= X.minimum) return;
1146
+ let B = K0(q);
1147
+ W.issues.push({
1148
+ origin: B,
1149
+ code: "too_small",
1150
+ minimum: X.minimum,
1151
+ inclusive: !0,
1152
+ input: q,
1153
+ inst: J,
1154
+ continue: !X.abort
1155
+ });
1156
+ };
1157
+ }), b1 = U("$ZodCheckLengthEquals", (J, X) => {
1158
+ var Y;
1159
+ T.init(J, X), (Y = J._zod.def).when ?? (Y.when = (W) => {
1160
+ let q = W.value;
1161
+ return !E0(q) && q.length !== void 0;
1162
+ }), J._zod.onattach.push((W) => {
1163
+ let q = W._zod.bag;
1164
+ q.minimum = X.length, q.maximum = X.length, q.length = X.length;
1165
+ }), J._zod.check = (W) => {
1166
+ let q = W.value, H = q.length;
1167
+ if (H === X.length) return;
1168
+ let B = K0(q), Q = H > X.length;
1169
+ W.issues.push({
1170
+ origin: B,
1171
+ ...Q ? {
1172
+ code: "too_big",
1173
+ maximum: X.length
1174
+ } : {
1175
+ code: "too_small",
1176
+ minimum: X.length
1177
+ },
1178
+ inclusive: !0,
1179
+ exact: !0,
1180
+ input: W.value,
1181
+ inst: J,
1182
+ continue: !X.abort
1183
+ });
1184
+ };
1185
+ }), N0 = U("$ZodCheckStringFormat", (J, X) => {
1186
+ var Y, W;
1187
+ if (T.init(J, X), J._zod.onattach.push((q) => {
1188
+ let H = q._zod.bag;
1189
+ if (H.format = X.format, X.pattern) H.patterns ?? (H.patterns = /* @__PURE__ */ new Set()), H.patterns.add(X.pattern);
1190
+ }), X.pattern) (Y = J._zod).check ?? (Y.check = (q) => {
1191
+ if (X.pattern.lastIndex = 0, X.pattern.test(q.value)) return;
1192
+ q.issues.push({
1193
+ origin: "string",
1194
+ code: "invalid_format",
1195
+ format: X.format,
1196
+ input: q.value,
1197
+ ...X.pattern ? { pattern: X.pattern.toString() } : {},
1198
+ inst: J,
1199
+ continue: !X.abort
1200
+ });
1201
+ });
1202
+ else (W = J._zod).check ?? (W.check = () => {});
1203
+ }), C1 = U("$ZodCheckRegex", (J, X) => {
1204
+ N0.init(J, X), J._zod.check = (Y) => {
1205
+ if (X.pattern.lastIndex = 0, X.pattern.test(Y.value)) return;
1206
+ Y.issues.push({
1207
+ origin: "string",
1208
+ code: "invalid_format",
1209
+ format: "regex",
1210
+ input: Y.value,
1211
+ pattern: X.pattern.toString(),
1212
+ inst: J,
1213
+ continue: !X.abort
1214
+ });
1215
+ };
1216
+ }), k1 = U("$ZodCheckLowerCase", (J, X) => {
1217
+ X.pattern ?? (X.pattern = V1), N0.init(J, X);
1218
+ }), T1 = U("$ZodCheckUpperCase", (J, X) => {
1219
+ X.pattern ?? (X.pattern = R1), N0.init(J, X);
1220
+ }), j1 = U("$ZodCheckIncludes", (J, X) => {
1221
+ T.init(J, X);
1222
+ let Y = J0(X.includes), W = new RegExp(typeof X.position === "number" ? `^.{${X.position}}${Y}` : Y);
1223
+ X.pattern = W, J._zod.onattach.push((q) => {
1224
+ let H = q._zod.bag;
1225
+ H.patterns ?? (H.patterns = /* @__PURE__ */ new Set()), H.patterns.add(W);
1226
+ }), J._zod.check = (q) => {
1227
+ if (q.value.includes(X.includes, X.position)) return;
1228
+ q.issues.push({
1229
+ origin: "string",
1230
+ code: "invalid_format",
1231
+ format: "includes",
1232
+ includes: X.includes,
1233
+ input: q.value,
1234
+ inst: J,
1235
+ continue: !X.abort
1236
+ });
1237
+ };
1238
+ }), h1 = U("$ZodCheckStartsWith", (J, X) => {
1239
+ T.init(J, X);
1240
+ let Y = /* @__PURE__ */ new RegExp(`^${J0(X.prefix)}.*`);
1241
+ X.pattern ?? (X.pattern = Y), J._zod.onattach.push((W) => {
1242
+ let q = W._zod.bag;
1243
+ q.patterns ?? (q.patterns = /* @__PURE__ */ new Set()), q.patterns.add(Y);
1244
+ }), J._zod.check = (W) => {
1245
+ if (W.value.startsWith(X.prefix)) return;
1246
+ W.issues.push({
1247
+ origin: "string",
1248
+ code: "invalid_format",
1249
+ format: "starts_with",
1250
+ prefix: X.prefix,
1251
+ input: W.value,
1252
+ inst: J,
1253
+ continue: !X.abort
1254
+ });
1255
+ };
1256
+ }), x1 = U("$ZodCheckEndsWith", (J, X) => {
1257
+ T.init(J, X);
1258
+ let Y = /* @__PURE__ */ new RegExp(`.*${J0(X.suffix)}$`);
1259
+ X.pattern ?? (X.pattern = Y), J._zod.onattach.push((W) => {
1260
+ let q = W._zod.bag;
1261
+ q.patterns ?? (q.patterns = /* @__PURE__ */ new Set()), q.patterns.add(Y);
1262
+ }), J._zod.check = (W) => {
1263
+ if (W.value.endsWith(X.suffix)) return;
1264
+ W.issues.push({
1265
+ origin: "string",
1266
+ code: "invalid_format",
1267
+ format: "ends_with",
1268
+ suffix: X.suffix,
1269
+ input: W.value,
1270
+ inst: J,
1271
+ continue: !X.abort
1272
+ });
1273
+ };
1274
+ });
1275
+ var v1 = U("$ZodCheckOverwrite", (J, X) => {
1276
+ T.init(J, X), J._zod.check = (Y) => {
1277
+ Y.value = X.tx(Y.value);
1278
+ };
1279
+ });
1280
+ var R4 = class {
1281
+ constructor(J = []) {
1282
+ if (this.content = [], this.indent = 0, this) this.args = J;
1283
+ }
1284
+ indented(J) {
1285
+ this.indent += 1, J(this), this.indent -= 1;
1286
+ }
1287
+ write(J) {
1288
+ if (typeof J === "function") {
1289
+ J(this, { execution: "sync" }), J(this, { execution: "async" });
1290
+ return;
1291
+ }
1292
+ let Y = J.split(`
1293
+ `).filter((H) => H), W = Math.min(...Y.map((H) => H.length - H.trimStart().length)), q = Y.map((H) => H.slice(W)).map((H) => " ".repeat(this.indent * 2) + H);
1294
+ for (let H of q) this.content.push(H);
1295
+ }
1296
+ compile() {
1297
+ let J = Function, X = this?.args, W = [...(this?.content ?? [""]).map((q) => ` ${q}`)];
1298
+ return new J(...X, W.join(`
1299
+ `));
1300
+ }
1301
+ };
1302
+ var u1 = {
1303
+ major: 4,
1304
+ minor: 2,
1305
+ patch: 1
1306
+ };
1307
+ var $ = U("$ZodType", (J, X) => {
1308
+ var Y;
1309
+ J ?? (J = {}), J._zod.def = X, J._zod.bag = J._zod.bag || {}, J._zod.version = u1;
1310
+ let W = [...J._zod.def.checks ?? []];
1311
+ if (J._zod.traits.has("$ZodCheck")) W.unshift(J);
1312
+ for (let q of W) for (let H of q._zod.onattach) H(J);
1313
+ if (W.length === 0) (Y = J._zod).deferred ?? (Y.deferred = []), J._zod.deferred?.push(() => {
1314
+ J._zod.run = J._zod.parse;
1315
+ });
1316
+ else {
1317
+ let q = (B, Q, G) => {
1318
+ let z = a(B), I;
1319
+ for (let w of Q) {
1320
+ if (w._zod.def.when) {
1321
+ if (!w._zod.def.when(B)) continue;
1322
+ } else if (z) continue;
1323
+ let M = B.issues.length, P = w._zod.check(B);
1324
+ if (P instanceof Promise && G?.async === !1) throw new r();
1325
+ if (I || P instanceof Promise) I = (I ?? Promise.resolve()).then(async () => {
1326
+ if (await P, B.issues.length === M) return;
1327
+ if (!z) z = a(B, M);
1328
+ });
1329
+ else {
1330
+ if (B.issues.length === M) continue;
1331
+ if (!z) z = a(B, M);
1332
+ }
1333
+ }
1334
+ if (I) return I.then(() => {
1335
+ return B;
1336
+ });
1337
+ return B;
1338
+ }, H = (B, Q, G) => {
1339
+ if (a(B)) return B.aborted = !0, B;
1340
+ let z = q(Q, W, G);
1341
+ if (z instanceof Promise) {
1342
+ if (G.async === !1) throw new r();
1343
+ return z.then((I) => J._zod.parse(I, G));
1344
+ }
1345
+ return J._zod.parse(z, G);
1346
+ };
1347
+ J._zod.run = (B, Q) => {
1348
+ if (Q.skipChecks) return J._zod.parse(B, Q);
1349
+ if (Q.direction === "backward") {
1350
+ let z = J._zod.parse({
1351
+ value: B.value,
1352
+ issues: []
1353
+ }, {
1354
+ ...Q,
1355
+ skipChecks: !0
1356
+ });
1357
+ if (z instanceof Promise) return z.then((I) => {
1358
+ return H(I, B, Q);
1359
+ });
1360
+ return H(z, B, Q);
1361
+ }
1362
+ let G = J._zod.parse(B, Q);
1363
+ if (G instanceof Promise) {
1364
+ if (Q.async === !1) throw new r();
1365
+ return G.then((z) => q(z, W, Q));
1366
+ }
1367
+ return q(G, W, Q);
1368
+ };
1369
+ }
1370
+ J["~standard"] = {
1371
+ validate: (q) => {
1372
+ try {
1373
+ let H = y6(J, q);
1374
+ return H.success ? { value: H.data } : { issues: H.error?.issues };
1375
+ } catch (H) {
1376
+ return m6(J, q).then((B) => B.success ? { value: B.data } : { issues: B.error?.issues });
1377
+ }
1378
+ },
1379
+ vendor: "zod",
1380
+ version: 1
1381
+ };
1382
+ }), i0 = U("$ZodString", (J, X) => {
1383
+ $.init(J, X), J._zod.pattern = [...J?._zod.bag?.patterns ?? []].pop() ?? A1(J._zod.bag), J._zod.parse = (Y, W) => {
1384
+ if (X.coerce) try {
1385
+ Y.value = String(Y.value);
1386
+ } catch (q) {}
1387
+ if (typeof Y.value === "string") return Y;
1388
+ return Y.issues.push({
1389
+ expected: "string",
1390
+ code: "invalid_type",
1391
+ input: Y.value,
1392
+ inst: J
1393
+ }), Y;
1394
+ };
1395
+ }), V = U("$ZodStringFormat", (J, X) => {
1396
+ N0.init(J, X), i0.init(J, X);
1397
+ }), d1 = U("$ZodGUID", (J, X) => {
1398
+ X.pattern ?? (X.pattern = W1), V.init(J, X);
1399
+ }), n1 = U("$ZodUUID", (J, X) => {
1400
+ if (X.version) {
1401
+ let W = {
1402
+ v1: 1,
1403
+ v2: 2,
1404
+ v3: 3,
1405
+ v4: 4,
1406
+ v5: 5,
1407
+ v6: 6,
1408
+ v7: 7,
1409
+ v8: 8
1410
+ }[X.version];
1411
+ if (W === void 0) throw Error(`Invalid UUID version: "${X.version}"`);
1412
+ X.pattern ?? (X.pattern = E4(W));
1413
+ } else X.pattern ?? (X.pattern = E4());
1414
+ V.init(J, X);
1415
+ }), i1 = U("$ZodEmail", (J, X) => {
1416
+ X.pattern ?? (X.pattern = q1), V.init(J, X);
1417
+ }), t1 = U("$ZodURL", (J, X) => {
1418
+ V.init(J, X), J._zod.check = (Y) => {
1419
+ try {
1420
+ let W = Y.value.trim(), q = new URL(W);
1421
+ if (X.hostname) {
1422
+ if (X.hostname.lastIndex = 0, !X.hostname.test(q.hostname)) Y.issues.push({
1423
+ code: "invalid_format",
1424
+ format: "url",
1425
+ note: "Invalid hostname",
1426
+ pattern: X.hostname.source,
1427
+ input: Y.value,
1428
+ inst: J,
1429
+ continue: !X.abort
1430
+ });
1431
+ }
1432
+ if (X.protocol) {
1433
+ if (X.protocol.lastIndex = 0, !X.protocol.test(q.protocol.endsWith(":") ? q.protocol.slice(0, -1) : q.protocol)) Y.issues.push({
1434
+ code: "invalid_format",
1435
+ format: "url",
1436
+ note: "Invalid protocol",
1437
+ pattern: X.protocol.source,
1438
+ input: Y.value,
1439
+ inst: J,
1440
+ continue: !X.abort
1441
+ });
1442
+ }
1443
+ if (X.normalize) Y.value = q.href;
1444
+ else Y.value = W;
1445
+ return;
1446
+ } catch (W) {
1447
+ Y.issues.push({
1448
+ code: "invalid_format",
1449
+ format: "url",
1450
+ input: Y.value,
1451
+ inst: J,
1452
+ continue: !X.abort
1453
+ });
1454
+ }
1455
+ };
1456
+ }), a1 = U("$ZodEmoji", (J, X) => {
1457
+ X.pattern ?? (X.pattern = H1()), V.init(J, X);
1458
+ }), s1 = U("$ZodNanoID", (J, X) => {
1459
+ X.pattern ?? (X.pattern = X1), V.init(J, X);
1460
+ }), e1 = U("$ZodCUID", (J, X) => {
1461
+ X.pattern ?? (X.pattern = t6), V.init(J, X);
1462
+ }), JJ = U("$ZodCUID2", (J, X) => {
1463
+ X.pattern ?? (X.pattern = a6), V.init(J, X);
1464
+ }), XJ = U("$ZodULID", (J, X) => {
1465
+ X.pattern ?? (X.pattern = s6), V.init(J, X);
1466
+ }), YJ = U("$ZodXID", (J, X) => {
1467
+ X.pattern ?? (X.pattern = e6), V.init(J, X);
1468
+ }), WJ = U("$ZodKSUID", (J, X) => {
1469
+ X.pattern ?? (X.pattern = J1), V.init(J, X);
1470
+ }), qJ = U("$ZodISODateTime", (J, X) => {
1471
+ X.pattern ?? (X.pattern = M1(X)), V.init(J, X);
1472
+ }), HJ = U("$ZodISODate", (J, X) => {
1473
+ X.pattern ?? (X.pattern = D1), V.init(J, X);
1474
+ }), BJ = U("$ZodISOTime", (J, X) => {
1475
+ X.pattern ?? (X.pattern = O1(X)), V.init(J, X);
1476
+ }), QJ = U("$ZodISODuration", (J, X) => {
1477
+ X.pattern ?? (X.pattern = Y1), V.init(J, X);
1478
+ }), zJ = U("$ZodIPv4", (J, X) => {
1479
+ X.pattern ?? (X.pattern = B1), V.init(J, X), J._zod.bag.format = "ipv4";
1480
+ }), GJ = U("$ZodIPv6", (J, X) => {
1481
+ X.pattern ?? (X.pattern = Q1), V.init(J, X), J._zod.bag.format = "ipv6", J._zod.check = (Y) => {
1482
+ try {
1483
+ new URL(`http://[${Y.value}]`);
1484
+ } catch {
1485
+ Y.issues.push({
1486
+ code: "invalid_format",
1487
+ format: "ipv6",
1488
+ input: Y.value,
1489
+ inst: J,
1490
+ continue: !X.abort
1491
+ });
1492
+ }
1493
+ };
1494
+ });
1495
+ var UJ = U("$ZodCIDRv4", (J, X) => {
1496
+ X.pattern ?? (X.pattern = z1), V.init(J, X);
1497
+ }), IJ = U("$ZodCIDRv6", (J, X) => {
1498
+ X.pattern ?? (X.pattern = G1), V.init(J, X), J._zod.check = (Y) => {
1499
+ let W = Y.value.split("/");
1500
+ try {
1501
+ if (W.length !== 2) throw Error();
1502
+ let [q, H] = W;
1503
+ if (!H) throw Error();
1504
+ let B = Number(H);
1505
+ if (`${B}` !== H) throw Error();
1506
+ if (B < 0 || B > 128) throw Error();
1507
+ new URL(`http://[${q}]`);
1508
+ } catch {
1509
+ Y.issues.push({
1510
+ code: "invalid_format",
1511
+ format: "cidrv6",
1512
+ input: Y.value,
1513
+ inst: J,
1514
+ continue: !X.abort
1515
+ });
1516
+ }
1517
+ };
1518
+ });
1519
+ function wJ(J) {
1520
+ if (J === "") return !0;
1521
+ if (J.length % 4 !== 0) return !1;
1522
+ try {
1523
+ return atob(J), !0;
1524
+ } catch {
1525
+ return !1;
1526
+ }
1527
+ }
1528
+ var DJ = U("$ZodBase64", (J, X) => {
1529
+ X.pattern ?? (X.pattern = U1), V.init(J, X), J._zod.bag.contentEncoding = "base64", J._zod.check = (Y) => {
1530
+ if (wJ(Y.value)) return;
1531
+ Y.issues.push({
1532
+ code: "invalid_format",
1533
+ format: "base64",
1534
+ input: Y.value,
1535
+ inst: J,
1536
+ continue: !X.abort
1537
+ });
1538
+ };
1539
+ });
1540
+ function $X(J) {
1541
+ if (!$4.test(J)) return !1;
1542
+ let X = J.replace(/[-_]/g, (W) => W === "-" ? "+" : "/");
1543
+ return wJ(X.padEnd(Math.ceil(X.length / 4) * 4, "="));
1544
+ }
1545
+ var PJ = U("$ZodBase64URL", (J, X) => {
1546
+ X.pattern ?? (X.pattern = $4), V.init(J, X), J._zod.bag.contentEncoding = "base64url", J._zod.check = (Y) => {
1547
+ if ($X(Y.value)) return;
1548
+ Y.issues.push({
1549
+ code: "invalid_format",
1550
+ format: "base64url",
1551
+ input: Y.value,
1552
+ inst: J,
1553
+ continue: !X.abort
1554
+ });
1555
+ };
1556
+ }), OJ = U("$ZodE164", (J, X) => {
1557
+ X.pattern ?? (X.pattern = I1), V.init(J, X);
1558
+ });
1559
+ function KX(J, X = null) {
1560
+ try {
1561
+ let Y = J.split(".");
1562
+ if (Y.length !== 3) return !1;
1563
+ let [W] = Y;
1564
+ if (!W) return !1;
1565
+ let q = JSON.parse(atob(W));
1566
+ if ("typ" in q && q?.typ !== "JWT") return !1;
1567
+ if (!q.alg) return !1;
1568
+ if (X && (!("alg" in q) || q.alg !== X)) return !1;
1569
+ return !0;
1570
+ } catch {
1571
+ return !1;
1572
+ }
1573
+ }
1574
+ var MJ = U("$ZodJWT", (J, X) => {
1575
+ V.init(J, X), J._zod.check = (Y) => {
1576
+ if (KX(Y.value, X.alg)) return;
1577
+ Y.issues.push({
1578
+ code: "invalid_format",
1579
+ format: "jwt",
1580
+ input: Y.value,
1581
+ inst: J,
1582
+ continue: !X.abort
1583
+ });
1584
+ };
1585
+ });
1586
+ var S4 = U("$ZodNumber", (J, X) => {
1587
+ $.init(J, X), J._zod.pattern = J._zod.bag.pattern ?? $1, J._zod.parse = (Y, W) => {
1588
+ if (X.coerce) try {
1589
+ Y.value = Number(Y.value);
1590
+ } catch (B) {}
1591
+ let q = Y.value;
1592
+ if (typeof q === "number" && !Number.isNaN(q) && Number.isFinite(q)) return Y;
1593
+ let H = typeof q === "number" ? Number.isNaN(q) ? "NaN" : !Number.isFinite(q) ? "Infinity" : void 0 : void 0;
1594
+ return Y.issues.push({
1595
+ expected: "number",
1596
+ code: "invalid_type",
1597
+ input: q,
1598
+ inst: J,
1599
+ ...H ? { received: H } : {}
1600
+ }), Y;
1601
+ };
1602
+ }), AJ = U("$ZodNumberFormat", (J, X) => {
1603
+ L1.init(J, X), S4.init(J, X);
1604
+ }), FJ = U("$ZodBoolean", (J, X) => {
1605
+ $.init(J, X), J._zod.pattern = K1, J._zod.parse = (Y, W) => {
1606
+ if (X.coerce) try {
1607
+ Y.value = Boolean(Y.value);
1608
+ } catch (H) {}
1609
+ let q = Y.value;
1610
+ if (typeof q === "boolean") return Y;
1611
+ return Y.issues.push({
1612
+ expected: "boolean",
1613
+ code: "invalid_type",
1614
+ input: q,
1615
+ inst: J
1616
+ }), Y;
1617
+ };
1618
+ }), EJ = U("$ZodBigInt", (J, X) => {
1619
+ $.init(J, X), J._zod.pattern = F1, J._zod.parse = (Y, W) => {
1620
+ if (X.coerce) try {
1621
+ Y.value = BigInt(Y.value);
1622
+ } catch (q) {}
1623
+ if (typeof Y.value === "bigint") return Y;
1624
+ return Y.issues.push({
1625
+ expected: "bigint",
1626
+ code: "invalid_type",
1627
+ input: Y.value,
1628
+ inst: J
1629
+ }), Y;
1630
+ };
1631
+ });
1632
+ var $J = U("$ZodAny", (J, X) => {
1633
+ $.init(J, X), J._zod.parse = (Y) => Y;
1634
+ }), KJ = U("$ZodUnknown", (J, X) => {
1635
+ $.init(J, X), J._zod.parse = (Y) => Y;
1636
+ }), VJ = U("$ZodNever", (J, X) => {
1637
+ $.init(J, X), J._zod.parse = (Y, W) => {
1638
+ return Y.issues.push({
1639
+ expected: "never",
1640
+ code: "invalid_type",
1641
+ input: Y.value,
1642
+ inst: J
1643
+ }), Y;
1644
+ };
1645
+ });
1646
+ var RJ = U("$ZodDate", (J, X) => {
1647
+ $.init(J, X), J._zod.parse = (Y, W) => {
1648
+ if (X.coerce) try {
1649
+ Y.value = new Date(Y.value);
1650
+ } catch (Q) {}
1651
+ let q = Y.value, H = q instanceof Date;
1652
+ if (H && !Number.isNaN(q.getTime())) return Y;
1653
+ return Y.issues.push({
1654
+ expected: "date",
1655
+ code: "invalid_type",
1656
+ input: q,
1657
+ ...H ? { received: "Invalid Date" } : {},
1658
+ inst: J
1659
+ }), Y;
1660
+ };
1661
+ });
1662
+ function c1(J, X, Y) {
1663
+ if (J.issues.length) X.issues.push(...l(Y, J.issues));
1664
+ X.value[Y] = J.value;
1665
+ }
1666
+ var NJ = U("$ZodArray", (J, X) => {
1667
+ $.init(J, X), J._zod.parse = (Y, W) => {
1668
+ let q = Y.value;
1669
+ if (!Array.isArray(q)) return Y.issues.push({
1670
+ expected: "array",
1671
+ code: "invalid_type",
1672
+ input: q,
1673
+ inst: J
1674
+ }), Y;
1675
+ Y.value = Array(q.length);
1676
+ let H = [];
1677
+ for (let B = 0; B < q.length; B++) {
1678
+ let Q = q[B], G = X.element._zod.run({
1679
+ value: Q,
1680
+ issues: []
1681
+ }, W);
1682
+ if (G instanceof Promise) H.push(G.then((z) => c1(z, Y, B)));
1683
+ else c1(G, Y, B);
1684
+ }
1685
+ if (H.length) return Promise.all(H).then(() => Y);
1686
+ return Y;
1687
+ };
1688
+ });
1689
+ function n0(J, X, Y, W) {
1690
+ if (J.issues.length) X.issues.push(...l(Y, J.issues));
1691
+ if (J.value === void 0) {
1692
+ if (Y in W) X.value[Y] = void 0;
1693
+ } else X.value[Y] = J.value;
1694
+ }
1695
+ function SJ(J) {
1696
+ let X = Object.keys(J.shape);
1697
+ for (let W of X) if (!J.shape?.[W]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${W}": expected a Zod schema`);
1698
+ let Y = M4(J.shape);
1699
+ return {
1700
+ ...J,
1701
+ keys: X,
1702
+ keySet: new Set(X),
1703
+ numKeys: X.length,
1704
+ optionalKeys: new Set(Y)
1705
+ };
1706
+ }
1707
+ function LJ(J, X, Y, W, q, H) {
1708
+ let B = [], Q = q.keySet, G = q.catchall._zod, z = G.def.type;
1709
+ for (let I in X) {
1710
+ if (Q.has(I)) continue;
1711
+ if (z === "never") {
1712
+ B.push(I);
1713
+ continue;
1714
+ }
1715
+ let w = G.run({
1716
+ value: X[I],
1717
+ issues: []
1718
+ }, W);
1719
+ if (w instanceof Promise) J.push(w.then((M) => n0(M, Y, I, X)));
1720
+ else n0(w, Y, I, X);
1721
+ }
1722
+ if (B.length) Y.issues.push({
1723
+ code: "unrecognized_keys",
1724
+ keys: B,
1725
+ input: X,
1726
+ inst: H
1727
+ });
1728
+ if (!J.length) return Y;
1729
+ return Promise.all(J).then(() => {
1730
+ return Y;
1731
+ });
1732
+ }
1733
+ var VX = U("$ZodObject", (J, X) => {
1734
+ if ($.init(J, X), !Object.getOwnPropertyDescriptor(X, "shape")?.get) {
1735
+ let Q = X.shape;
1736
+ Object.defineProperty(X, "shape", { get: () => {
1737
+ let G = { ...Q };
1738
+ return Object.defineProperty(X, "shape", { value: G }), G;
1739
+ } });
1740
+ }
1741
+ let W = F0(() => SJ(X));
1742
+ E(J._zod, "propValues", () => {
1743
+ let Q = X.shape, G = {};
1744
+ for (let z in Q) {
1745
+ let I = Q[z]._zod;
1746
+ if (I.values) {
1747
+ G[z] ?? (G[z] = /* @__PURE__ */ new Set());
1748
+ for (let w of I.values) G[z].add(w);
1749
+ }
1750
+ }
1751
+ return G;
1752
+ });
1753
+ let q = q0, H = X.catchall, B;
1754
+ J._zod.parse = (Q, G) => {
1755
+ B ?? (B = W.value);
1756
+ let z = Q.value;
1757
+ if (!q(z)) return Q.issues.push({
1758
+ expected: "object",
1759
+ code: "invalid_type",
1760
+ input: z,
1761
+ inst: J
1762
+ }), Q;
1763
+ Q.value = {};
1764
+ let I = [], w = B.shape;
1765
+ for (let M of B.keys) {
1766
+ let N = w[M]._zod.run({
1767
+ value: z[M],
1768
+ issues: []
1769
+ }, G);
1770
+ if (N instanceof Promise) I.push(N.then((_) => n0(_, Q, M, z)));
1771
+ else n0(N, Q, M, z);
1772
+ }
1773
+ if (!H) return I.length ? Promise.all(I).then(() => Q) : Q;
1774
+ return LJ(I, z, Q, G, W.value, J);
1775
+ };
1776
+ }), ZJ = U("$ZodObjectJIT", (J, X) => {
1777
+ VX.init(J, X);
1778
+ let Y = J._zod.parse, W = F0(() => SJ(X)), q = (M) => {
1779
+ let P = new R4([
1780
+ "shape",
1781
+ "payload",
1782
+ "ctx"
1783
+ ]), N = W.value, _ = (k) => {
1784
+ let C = y0(k);
1785
+ return `shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`;
1786
+ };
1787
+ P.write("const input = payload.value;");
1788
+ let d = Object.create(null), g = 0;
1789
+ for (let k of N.keys) d[k] = `key_${g++}`;
1790
+ P.write("const newResult = {};");
1791
+ for (let k of N.keys) {
1792
+ let C = d[k], o = y0(k);
1793
+ P.write(`const ${C} = ${_(k)};`), P.write(`
1794
+ if (${C}.issues.length) {
1795
+ payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
1796
+ ...iss,
1797
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
1798
+ })));
1799
+ }
1800
+
1801
+
1802
+ if (${C}.value === undefined) {
1803
+ if (${o} in input) {
1804
+ newResult[${o}] = undefined;
1805
+ }
1806
+ } else {
1807
+ newResult[${o}] = ${C}.value;
1808
+ }
1809
+
1810
+ `);
1811
+ }
1812
+ P.write("payload.value = newResult;"), P.write("return payload;");
1813
+ let Z0 = P.compile();
1814
+ return (k, C) => Z0(M, k, C);
1815
+ }, H, B = q0, Q = !u0.jitless, z = Q && P4.value, I = X.catchall, w;
1816
+ J._zod.parse = (M, P) => {
1817
+ w ?? (w = W.value);
1818
+ let N = M.value;
1819
+ if (!B(N)) return M.issues.push({
1820
+ expected: "object",
1821
+ code: "invalid_type",
1822
+ input: N,
1823
+ inst: J
1824
+ }), M;
1825
+ if (Q && z && P?.async === !1 && P.jitless !== !0) {
1826
+ if (!H) H = q(X.shape);
1827
+ if (M = H(M, P), !I) return M;
1828
+ return LJ([], N, M, P, w, J);
1829
+ }
1830
+ return Y(M, P);
1831
+ };
1832
+ });
1833
+ function y1(J, X, Y, W) {
1834
+ for (let H of J) if (H.issues.length === 0) return X.value = H.value, X;
1835
+ let q = J.filter((H) => !a(H));
1836
+ if (q.length === 1) return X.value = q[0].value, q[0];
1837
+ return X.issues.push({
1838
+ code: "invalid_union",
1839
+ input: X.value,
1840
+ inst: Y,
1841
+ errors: J.map((H) => H.issues.map((B) => m(B, W, v())))
1842
+ }), X;
1843
+ }
1844
+ var _J = U("$ZodUnion", (J, X) => {
1845
+ $.init(J, X), E(J._zod, "optin", () => X.options.some((q) => q._zod.optin === "optional") ? "optional" : void 0), E(J._zod, "optout", () => X.options.some((q) => q._zod.optout === "optional") ? "optional" : void 0), E(J._zod, "values", () => {
1846
+ if (X.options.every((q) => q._zod.values)) return new Set(X.options.flatMap((q) => Array.from(q._zod.values)));
1847
+ }), E(J._zod, "pattern", () => {
1848
+ if (X.options.every((q) => q._zod.pattern)) {
1849
+ let q = X.options.map((H) => H._zod.pattern);
1850
+ return /* @__PURE__ */ new RegExp(`^(${q.map((H) => $0(H.source)).join("|")})$`);
1851
+ }
1852
+ });
1853
+ let Y = X.options.length === 1, W = X.options[0]._zod.run;
1854
+ J._zod.parse = (q, H) => {
1855
+ if (Y) return W(q, H);
1856
+ let B = !1, Q = [];
1857
+ for (let G of X.options) {
1858
+ let z = G._zod.run({
1859
+ value: q.value,
1860
+ issues: []
1861
+ }, H);
1862
+ if (z instanceof Promise) Q.push(z), B = !0;
1863
+ else {
1864
+ if (z.issues.length === 0) return z;
1865
+ Q.push(z);
1866
+ }
1867
+ }
1868
+ if (!B) return y1(Q, q, J, H);
1869
+ return Promise.all(Q).then((G) => {
1870
+ return y1(G, q, J, H);
1871
+ });
1872
+ };
1873
+ });
1874
+ var bJ = U("$ZodIntersection", (J, X) => {
1875
+ $.init(J, X), J._zod.parse = (Y, W) => {
1876
+ let q = Y.value, H = X.left._zod.run({
1877
+ value: q,
1878
+ issues: []
1879
+ }, W), B = X.right._zod.run({
1880
+ value: q,
1881
+ issues: []
1882
+ }, W);
1883
+ if (H instanceof Promise || B instanceof Promise) return Promise.all([H, B]).then(([G, z]) => {
1884
+ return m1(Y, G, z);
1885
+ });
1886
+ return m1(Y, H, B);
1887
+ };
1888
+ });
1889
+ function N4(J, X) {
1890
+ if (J === X) return {
1891
+ valid: !0,
1892
+ data: J
1893
+ };
1894
+ if (J instanceof Date && X instanceof Date && +J === +X) return {
1895
+ valid: !0,
1896
+ data: J
1897
+ };
1898
+ if (t(J) && t(X)) {
1899
+ let Y = Object.keys(X), W = Object.keys(J).filter((H) => Y.indexOf(H) !== -1), q = {
1900
+ ...J,
1901
+ ...X
1902
+ };
1903
+ for (let H of W) {
1904
+ let B = N4(J[H], X[H]);
1905
+ if (!B.valid) return {
1906
+ valid: !1,
1907
+ mergeErrorPath: [H, ...B.mergeErrorPath]
1908
+ };
1909
+ q[H] = B.data;
1910
+ }
1911
+ return {
1912
+ valid: !0,
1913
+ data: q
1914
+ };
1915
+ }
1916
+ if (Array.isArray(J) && Array.isArray(X)) {
1917
+ if (J.length !== X.length) return {
1918
+ valid: !1,
1919
+ mergeErrorPath: []
1920
+ };
1921
+ let Y = [];
1922
+ for (let W = 0; W < J.length; W++) {
1923
+ let q = J[W], H = X[W], B = N4(q, H);
1924
+ if (!B.valid) return {
1925
+ valid: !1,
1926
+ mergeErrorPath: [W, ...B.mergeErrorPath]
1927
+ };
1928
+ Y.push(B.data);
1929
+ }
1930
+ return {
1931
+ valid: !0,
1932
+ data: Y
1933
+ };
1934
+ }
1935
+ return {
1936
+ valid: !1,
1937
+ mergeErrorPath: []
1938
+ };
1939
+ }
1940
+ function m1(J, X, Y) {
1941
+ if (X.issues.length) J.issues.push(...X.issues);
1942
+ if (Y.issues.length) J.issues.push(...Y.issues);
1943
+ if (a(J)) return J;
1944
+ let W = N4(X.value, Y.value);
1945
+ if (!W.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);
1946
+ return J.value = W.data, J;
1947
+ }
1948
+ var CJ = U("$ZodRecord", (J, X) => {
1949
+ $.init(J, X), J._zod.parse = (Y, W) => {
1950
+ let q = Y.value;
1951
+ if (!t(q)) return Y.issues.push({
1952
+ expected: "record",
1953
+ code: "invalid_type",
1954
+ input: q,
1955
+ inst: J
1956
+ }), Y;
1957
+ let H = [], B = X.keyType._zod.values;
1958
+ if (B) {
1959
+ Y.value = {};
1960
+ let Q = /* @__PURE__ */ new Set();
1961
+ for (let z of B) if (typeof z === "string" || typeof z === "number" || typeof z === "symbol") {
1962
+ Q.add(typeof z === "number" ? z.toString() : z);
1963
+ let I = X.valueType._zod.run({
1964
+ value: q[z],
1965
+ issues: []
1966
+ }, W);
1967
+ if (I instanceof Promise) H.push(I.then((w) => {
1968
+ if (w.issues.length) Y.issues.push(...l(z, w.issues));
1969
+ Y.value[z] = w.value;
1970
+ }));
1971
+ else {
1972
+ if (I.issues.length) Y.issues.push(...l(z, I.issues));
1973
+ Y.value[z] = I.value;
1974
+ }
1975
+ }
1976
+ let G;
1977
+ for (let z in q) if (!Q.has(z)) G = G ?? [], G.push(z);
1978
+ if (G && G.length > 0) Y.issues.push({
1979
+ code: "unrecognized_keys",
1980
+ input: q,
1981
+ inst: J,
1982
+ keys: G
1983
+ });
1984
+ } else {
1985
+ Y.value = {};
1986
+ for (let Q of Reflect.ownKeys(q)) {
1987
+ if (Q === "__proto__") continue;
1988
+ let G = X.keyType._zod.run({
1989
+ value: Q,
1990
+ issues: []
1991
+ }, W);
1992
+ if (G instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1993
+ if (G.issues.length) {
1994
+ if (X.mode === "loose") Y.value[Q] = q[Q];
1995
+ else Y.issues.push({
1996
+ code: "invalid_key",
1997
+ origin: "record",
1998
+ issues: G.issues.map((I) => m(I, W, v())),
1999
+ input: Q,
2000
+ path: [Q],
2001
+ inst: J
2002
+ });
2003
+ continue;
2004
+ }
2005
+ let z = X.valueType._zod.run({
2006
+ value: q[Q],
2007
+ issues: []
2008
+ }, W);
2009
+ if (z instanceof Promise) H.push(z.then((I) => {
2010
+ if (I.issues.length) Y.issues.push(...l(Q, I.issues));
2011
+ Y.value[G.value] = I.value;
2012
+ }));
2013
+ else {
2014
+ if (z.issues.length) Y.issues.push(...l(Q, z.issues));
2015
+ Y.value[G.value] = z.value;
2016
+ }
2017
+ }
2018
+ }
2019
+ if (H.length) return Promise.all(H).then(() => Y);
2020
+ return Y;
2021
+ };
2022
+ });
2023
+ var kJ = U("$ZodEnum", (J, X) => {
2024
+ $.init(J, X);
2025
+ let Y = A0(X.entries), W = new Set(Y);
2026
+ J._zod.values = W, J._zod.pattern = /* @__PURE__ */ new RegExp(`^(${Y.filter((q) => O4.has(typeof q)).map((q) => typeof q === "string" ? J0(q) : q.toString()).join("|")})$`), J._zod.parse = (q, H) => {
2027
+ let B = q.value;
2028
+ if (W.has(B)) return q;
2029
+ return q.issues.push({
2030
+ code: "invalid_value",
2031
+ values: Y,
2032
+ input: B,
2033
+ inst: J
2034
+ }), q;
2035
+ };
2036
+ });
2037
+ var TJ = U("$ZodTransform", (J, X) => {
2038
+ $.init(J, X), J._zod.parse = (Y, W) => {
2039
+ if (W.direction === "backward") throw new O0(J.constructor.name);
2040
+ let q = X.transform(Y.value, Y);
2041
+ if (W.async) return (q instanceof Promise ? q : Promise.resolve(q)).then((B) => {
2042
+ return Y.value = B, Y;
2043
+ });
2044
+ if (q instanceof Promise) throw new r();
2045
+ return Y.value = q, Y;
2046
+ };
2047
+ });
2048
+ function f1(J, X) {
2049
+ if (J.issues.length && X === void 0) return {
2050
+ issues: [],
2051
+ value: void 0
2052
+ };
2053
+ return J;
2054
+ }
2055
+ var jJ = U("$ZodOptional", (J, X) => {
2056
+ $.init(J, X), J._zod.optin = "optional", J._zod.optout = "optional", E(J._zod, "values", () => {
2057
+ return X.innerType._zod.values ? new Set([...X.innerType._zod.values, void 0]) : void 0;
2058
+ }), E(J._zod, "pattern", () => {
2059
+ let Y = X.innerType._zod.pattern;
2060
+ return Y ? /* @__PURE__ */ new RegExp(`^(${$0(Y.source)})?$`) : void 0;
2061
+ }), J._zod.parse = (Y, W) => {
2062
+ if (X.innerType._zod.optin === "optional") {
2063
+ let q = X.innerType._zod.run(Y, W);
2064
+ if (q instanceof Promise) return q.then((H) => f1(H, Y.value));
2065
+ return f1(q, Y.value);
2066
+ }
2067
+ if (Y.value === void 0) return Y;
2068
+ return X.innerType._zod.run(Y, W);
2069
+ };
2070
+ }), hJ = U("$ZodNullable", (J, X) => {
2071
+ $.init(J, X), E(J._zod, "optin", () => X.innerType._zod.optin), E(J._zod, "optout", () => X.innerType._zod.optout), E(J._zod, "pattern", () => {
2072
+ let Y = X.innerType._zod.pattern;
2073
+ return Y ? /* @__PURE__ */ new RegExp(`^(${$0(Y.source)}|null)$`) : void 0;
2074
+ }), E(J._zod, "values", () => {
2075
+ return X.innerType._zod.values ? new Set([...X.innerType._zod.values, null]) : void 0;
2076
+ }), J._zod.parse = (Y, W) => {
2077
+ if (Y.value === null) return Y;
2078
+ return X.innerType._zod.run(Y, W);
2079
+ };
2080
+ }), xJ = U("$ZodDefault", (J, X) => {
2081
+ $.init(J, X), J._zod.optin = "optional", E(J._zod, "values", () => X.innerType._zod.values), J._zod.parse = (Y, W) => {
2082
+ if (W.direction === "backward") return X.innerType._zod.run(Y, W);
2083
+ if (Y.value === void 0) return Y.value = X.defaultValue, Y;
2084
+ let q = X.innerType._zod.run(Y, W);
2085
+ if (q instanceof Promise) return q.then((H) => o1(H, X));
2086
+ return o1(q, X);
2087
+ };
2088
+ });
2089
+ function o1(J, X) {
2090
+ if (J.value === void 0) J.value = X.defaultValue;
2091
+ return J;
2092
+ }
2093
+ var vJ = U("$ZodPrefault", (J, X) => {
2094
+ $.init(J, X), J._zod.optin = "optional", E(J._zod, "values", () => X.innerType._zod.values), J._zod.parse = (Y, W) => {
2095
+ if (W.direction === "backward") return X.innerType._zod.run(Y, W);
2096
+ if (Y.value === void 0) Y.value = X.defaultValue;
2097
+ return X.innerType._zod.run(Y, W);
2098
+ };
2099
+ }), gJ = U("$ZodNonOptional", (J, X) => {
2100
+ $.init(J, X), E(J._zod, "values", () => {
2101
+ let Y = X.innerType._zod.values;
2102
+ return Y ? new Set([...Y].filter((W) => W !== void 0)) : void 0;
2103
+ }), J._zod.parse = (Y, W) => {
2104
+ let q = X.innerType._zod.run(Y, W);
2105
+ if (q instanceof Promise) return q.then((H) => r1(H, J));
2106
+ return r1(q, J);
2107
+ };
2108
+ });
2109
+ function r1(J, X) {
2110
+ if (!J.issues.length && J.value === void 0) J.issues.push({
2111
+ code: "invalid_type",
2112
+ expected: "nonoptional",
2113
+ input: J.value,
2114
+ inst: X
2115
+ });
2116
+ return J;
2117
+ }
2118
+ var uJ = U("$ZodCatch", (J, X) => {
2119
+ $.init(J, X), E(J._zod, "optin", () => X.innerType._zod.optin), E(J._zod, "optout", () => X.innerType._zod.optout), E(J._zod, "values", () => X.innerType._zod.values), J._zod.parse = (Y, W) => {
2120
+ if (W.direction === "backward") return X.innerType._zod.run(Y, W);
2121
+ let q = X.innerType._zod.run(Y, W);
2122
+ if (q instanceof Promise) return q.then((H) => {
2123
+ if (Y.value = H.value, H.issues.length) Y.value = X.catchValue({
2124
+ ...Y,
2125
+ error: { issues: H.issues.map((B) => m(B, W, v())) },
2126
+ input: Y.value
2127
+ }), Y.issues = [];
2128
+ return Y;
2129
+ });
2130
+ if (Y.value = q.value, q.issues.length) Y.value = X.catchValue({
2131
+ ...Y,
2132
+ error: { issues: q.issues.map((H) => m(H, W, v())) },
2133
+ input: Y.value
2134
+ }), Y.issues = [];
2135
+ return Y;
2136
+ };
2137
+ });
2138
+ var cJ = U("$ZodPipe", (J, X) => {
2139
+ $.init(J, X), E(J._zod, "values", () => X.in._zod.values), E(J._zod, "optin", () => X.in._zod.optin), E(J._zod, "optout", () => X.out._zod.optout), E(J._zod, "propValues", () => X.in._zod.propValues), J._zod.parse = (Y, W) => {
2140
+ if (W.direction === "backward") {
2141
+ let H = X.out._zod.run(Y, W);
2142
+ if (H instanceof Promise) return H.then((B) => d0(B, X.in, W));
2143
+ return d0(H, X.in, W);
2144
+ }
2145
+ let q = X.in._zod.run(Y, W);
2146
+ if (q instanceof Promise) return q.then((H) => d0(H, X.out, W));
2147
+ return d0(q, X.out, W);
2148
+ };
2149
+ });
2150
+ function d0(J, X, Y) {
2151
+ if (J.issues.length) return J.aborted = !0, J;
2152
+ return X._zod.run({
2153
+ value: J.value,
2154
+ issues: J.issues
2155
+ }, Y);
2156
+ }
2157
+ var yJ = U("$ZodReadonly", (J, X) => {
2158
+ $.init(J, X), E(J._zod, "propValues", () => X.innerType._zod.propValues), E(J._zod, "values", () => X.innerType._zod.values), E(J._zod, "optin", () => X.innerType?._zod?.optin), E(J._zod, "optout", () => X.innerType?._zod?.optout), J._zod.parse = (Y, W) => {
2159
+ if (W.direction === "backward") return X.innerType._zod.run(Y, W);
2160
+ let q = X.innerType._zod.run(Y, W);
2161
+ if (q instanceof Promise) return q.then(l1);
2162
+ return l1(q);
2163
+ };
2164
+ });
2165
+ function l1(J) {
2166
+ return J.value = Object.freeze(J.value), J;
2167
+ }
2168
+ var mJ = U("$ZodCustom", (J, X) => {
2169
+ T.init(J, X), $.init(J, X), J._zod.parse = (Y, W) => {
2170
+ return Y;
2171
+ }, J._zod.check = (Y) => {
2172
+ let W = Y.value, q = X.fn(W);
2173
+ if (q instanceof Promise) return q.then((H) => p1(H, Y, W, J));
2174
+ p1(q, Y, W, J);
2175
+ };
2176
+ });
2177
+ function p1(J, X, Y, W) {
2178
+ if (!J) {
2179
+ let q = {
2180
+ code: "custom",
2181
+ input: Y,
2182
+ inst: W,
2183
+ path: [...W._zod.def.path ?? []],
2184
+ continue: !W._zod.def.abort
2185
+ };
2186
+ if (W._zod.def.params) q.params = W._zod.def.params;
2187
+ X.issues.push(B0(q));
2188
+ }
2189
+ }
2190
+ var RX = (J) => {
2191
+ let X = typeof J;
2192
+ switch (X) {
2193
+ case "number": return Number.isNaN(J) ? "NaN" : "number";
2194
+ case "object":
2195
+ if (Array.isArray(J)) return "array";
2196
+ if (J === null) return "null";
2197
+ if (Object.getPrototypeOf(J) !== Object.prototype && J.constructor) return J.constructor.name;
2198
+ }
2199
+ return X;
2200
+ }, NX = () => {
2201
+ let J = {
2202
+ string: {
2203
+ unit: "characters",
2204
+ verb: "to have"
2205
+ },
2206
+ file: {
2207
+ unit: "bytes",
2208
+ verb: "to have"
2209
+ },
2210
+ array: {
2211
+ unit: "items",
2212
+ verb: "to have"
2213
+ },
2214
+ set: {
2215
+ unit: "items",
2216
+ verb: "to have"
2217
+ }
2218
+ };
2219
+ function X(W) {
2220
+ return J[W] ?? null;
2221
+ }
2222
+ let Y = {
2223
+ regex: "input",
2224
+ email: "email address",
2225
+ url: "URL",
2226
+ emoji: "emoji",
2227
+ uuid: "UUID",
2228
+ uuidv4: "UUIDv4",
2229
+ uuidv6: "UUIDv6",
2230
+ nanoid: "nanoid",
2231
+ guid: "GUID",
2232
+ cuid: "cuid",
2233
+ cuid2: "cuid2",
2234
+ ulid: "ULID",
2235
+ xid: "XID",
2236
+ ksuid: "KSUID",
2237
+ datetime: "ISO datetime",
2238
+ date: "ISO date",
2239
+ time: "ISO time",
2240
+ duration: "ISO duration",
2241
+ ipv4: "IPv4 address",
2242
+ ipv6: "IPv6 address",
2243
+ mac: "MAC address",
2244
+ cidrv4: "IPv4 range",
2245
+ cidrv6: "IPv6 range",
2246
+ base64: "base64-encoded string",
2247
+ base64url: "base64url-encoded string",
2248
+ json_string: "JSON string",
2249
+ e164: "E.164 number",
2250
+ jwt: "JWT",
2251
+ template_literal: "input"
2252
+ };
2253
+ return (W) => {
2254
+ switch (W.code) {
2255
+ case "invalid_type": return `Invalid input: expected ${W.expected}, received ${RX(W.input)}`;
2256
+ case "invalid_value":
2257
+ if (W.values.length === 1) return `Invalid input: expected ${f0(W.values[0])}`;
2258
+ return `Invalid option: expected one of ${c0(W.values, "|")}`;
2259
+ case "too_big": {
2260
+ let q = W.inclusive ? "<=" : "<", H = X(W.origin);
2261
+ if (H) return `Too big: expected ${W.origin ?? "value"} to have ${q}${W.maximum.toString()} ${H.unit ?? "elements"}`;
2262
+ return `Too big: expected ${W.origin ?? "value"} to be ${q}${W.maximum.toString()}`;
2263
+ }
2264
+ case "too_small": {
2265
+ let q = W.inclusive ? ">=" : ">", H = X(W.origin);
2266
+ if (H) return `Too small: expected ${W.origin} to have ${q}${W.minimum.toString()} ${H.unit}`;
2267
+ return `Too small: expected ${W.origin} to be ${q}${W.minimum.toString()}`;
2268
+ }
2269
+ case "invalid_format": {
2270
+ let q = W;
2271
+ if (q.format === "starts_with") return `Invalid string: must start with "${q.prefix}"`;
2272
+ if (q.format === "ends_with") return `Invalid string: must end with "${q.suffix}"`;
2273
+ if (q.format === "includes") return `Invalid string: must include "${q.includes}"`;
2274
+ if (q.format === "regex") return `Invalid string: must match pattern ${q.pattern}`;
2275
+ return `Invalid ${Y[q.format] ?? W.format}`;
2276
+ }
2277
+ case "not_multiple_of": return `Invalid number: must be a multiple of ${W.divisor}`;
2278
+ case "unrecognized_keys": return `Unrecognized key${W.keys.length > 1 ? "s" : ""}: ${c0(W.keys, ", ")}`;
2279
+ case "invalid_key": return `Invalid key in ${W.origin}`;
2280
+ case "invalid_union": return "Invalid input";
2281
+ case "invalid_element": return `Invalid value in ${W.origin}`;
2282
+ default: return "Invalid input";
2283
+ }
2284
+ };
2285
+ };
2286
+ function L4() {
2287
+ return { localeError: NX() };
2288
+ }
2289
+ var fJ;
2290
+ var oJ = class {
2291
+ constructor() {
2292
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2293
+ }
2294
+ add(J, ...X) {
2295
+ let Y = X[0];
2296
+ if (this._map.set(J, Y), Y && typeof Y === "object" && "id" in Y) {
2297
+ if (this._idmap.has(Y.id)) throw Error(`ID ${Y.id} already exists in the registry`);
2298
+ this._idmap.set(Y.id, J);
2299
+ }
2300
+ return this;
2301
+ }
2302
+ clear() {
2303
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
2304
+ }
2305
+ remove(J) {
2306
+ let X = this._map.get(J);
2307
+ if (X && typeof X === "object" && "id" in X) this._idmap.delete(X.id);
2308
+ return this._map.delete(J), this;
2309
+ }
2310
+ get(J) {
2311
+ let X = J._zod.parent;
2312
+ if (X) {
2313
+ let Y = { ...this.get(X) ?? {} };
2314
+ delete Y.id;
2315
+ let W = {
2316
+ ...Y,
2317
+ ...this._map.get(J)
2318
+ };
2319
+ return Object.keys(W).length ? W : void 0;
2320
+ }
2321
+ return this._map.get(J);
2322
+ }
2323
+ has(J) {
2324
+ return this._map.has(J);
2325
+ }
2326
+ };
2327
+ function SX() {
2328
+ return new oJ();
2329
+ }
2330
+ (fJ = globalThis).__zod_globalRegistry ?? (fJ.__zod_globalRegistry = SX());
2331
+ var X0 = globalThis.__zod_globalRegistry;
2332
+ function rJ(J, X) {
2333
+ return new J({
2334
+ type: "string",
2335
+ ...O(X)
2336
+ });
2337
+ }
2338
+ function lJ(J, X) {
2339
+ return new J({
2340
+ type: "string",
2341
+ coerce: !0,
2342
+ ...O(X)
2343
+ });
2344
+ }
2345
+ function Z4(J, X) {
2346
+ return new J({
2347
+ type: "string",
2348
+ format: "email",
2349
+ check: "string_format",
2350
+ abort: !1,
2351
+ ...O(X)
2352
+ });
2353
+ }
2354
+ function _4(J, X) {
2355
+ return new J({
2356
+ type: "string",
2357
+ format: "guid",
2358
+ check: "string_format",
2359
+ abort: !1,
2360
+ ...O(X)
2361
+ });
2362
+ }
2363
+ function pJ(J, X) {
2364
+ return new J({
2365
+ type: "string",
2366
+ format: "uuid",
2367
+ check: "string_format",
2368
+ abort: !1,
2369
+ ...O(X)
2370
+ });
2371
+ }
2372
+ function dJ(J, X) {
2373
+ return new J({
2374
+ type: "string",
2375
+ format: "uuid",
2376
+ check: "string_format",
2377
+ abort: !1,
2378
+ version: "v4",
2379
+ ...O(X)
2380
+ });
2381
+ }
2382
+ function nJ(J, X) {
2383
+ return new J({
2384
+ type: "string",
2385
+ format: "uuid",
2386
+ check: "string_format",
2387
+ abort: !1,
2388
+ version: "v6",
2389
+ ...O(X)
2390
+ });
2391
+ }
2392
+ function iJ(J, X) {
2393
+ return new J({
2394
+ type: "string",
2395
+ format: "uuid",
2396
+ check: "string_format",
2397
+ abort: !1,
2398
+ version: "v7",
2399
+ ...O(X)
2400
+ });
2401
+ }
2402
+ function b4(J, X) {
2403
+ return new J({
2404
+ type: "string",
2405
+ format: "url",
2406
+ check: "string_format",
2407
+ abort: !1,
2408
+ ...O(X)
2409
+ });
2410
+ }
2411
+ function tJ(J, X) {
2412
+ return new J({
2413
+ type: "string",
2414
+ format: "emoji",
2415
+ check: "string_format",
2416
+ abort: !1,
2417
+ ...O(X)
2418
+ });
2419
+ }
2420
+ function aJ(J, X) {
2421
+ return new J({
2422
+ type: "string",
2423
+ format: "nanoid",
2424
+ check: "string_format",
2425
+ abort: !1,
2426
+ ...O(X)
2427
+ });
2428
+ }
2429
+ function sJ(J, X) {
2430
+ return new J({
2431
+ type: "string",
2432
+ format: "cuid",
2433
+ check: "string_format",
2434
+ abort: !1,
2435
+ ...O(X)
2436
+ });
2437
+ }
2438
+ function eJ(J, X) {
2439
+ return new J({
2440
+ type: "string",
2441
+ format: "cuid2",
2442
+ check: "string_format",
2443
+ abort: !1,
2444
+ ...O(X)
2445
+ });
2446
+ }
2447
+ function J2(J, X) {
2448
+ return new J({
2449
+ type: "string",
2450
+ format: "ulid",
2451
+ check: "string_format",
2452
+ abort: !1,
2453
+ ...O(X)
2454
+ });
2455
+ }
2456
+ function X2(J, X) {
2457
+ return new J({
2458
+ type: "string",
2459
+ format: "xid",
2460
+ check: "string_format",
2461
+ abort: !1,
2462
+ ...O(X)
2463
+ });
2464
+ }
2465
+ function Y2(J, X) {
2466
+ return new J({
2467
+ type: "string",
2468
+ format: "ksuid",
2469
+ check: "string_format",
2470
+ abort: !1,
2471
+ ...O(X)
2472
+ });
2473
+ }
2474
+ function W2(J, X) {
2475
+ return new J({
2476
+ type: "string",
2477
+ format: "ipv4",
2478
+ check: "string_format",
2479
+ abort: !1,
2480
+ ...O(X)
2481
+ });
2482
+ }
2483
+ function q2(J, X) {
2484
+ return new J({
2485
+ type: "string",
2486
+ format: "ipv6",
2487
+ check: "string_format",
2488
+ abort: !1,
2489
+ ...O(X)
2490
+ });
2491
+ }
2492
+ function H2(J, X) {
2493
+ return new J({
2494
+ type: "string",
2495
+ format: "cidrv4",
2496
+ check: "string_format",
2497
+ abort: !1,
2498
+ ...O(X)
2499
+ });
2500
+ }
2501
+ function B2(J, X) {
2502
+ return new J({
2503
+ type: "string",
2504
+ format: "cidrv6",
2505
+ check: "string_format",
2506
+ abort: !1,
2507
+ ...O(X)
2508
+ });
2509
+ }
2510
+ function Q2(J, X) {
2511
+ return new J({
2512
+ type: "string",
2513
+ format: "base64",
2514
+ check: "string_format",
2515
+ abort: !1,
2516
+ ...O(X)
2517
+ });
2518
+ }
2519
+ function z2(J, X) {
2520
+ return new J({
2521
+ type: "string",
2522
+ format: "base64url",
2523
+ check: "string_format",
2524
+ abort: !1,
2525
+ ...O(X)
2526
+ });
2527
+ }
2528
+ function G2(J, X) {
2529
+ return new J({
2530
+ type: "string",
2531
+ format: "e164",
2532
+ check: "string_format",
2533
+ abort: !1,
2534
+ ...O(X)
2535
+ });
2536
+ }
2537
+ function U2(J, X) {
2538
+ return new J({
2539
+ type: "string",
2540
+ format: "jwt",
2541
+ check: "string_format",
2542
+ abort: !1,
2543
+ ...O(X)
2544
+ });
2545
+ }
2546
+ function I2(J, X) {
2547
+ return new J({
2548
+ type: "string",
2549
+ format: "datetime",
2550
+ check: "string_format",
2551
+ offset: !1,
2552
+ local: !1,
2553
+ precision: null,
2554
+ ...O(X)
2555
+ });
2556
+ }
2557
+ function w2(J, X) {
2558
+ return new J({
2559
+ type: "string",
2560
+ format: "date",
2561
+ check: "string_format",
2562
+ ...O(X)
2563
+ });
2564
+ }
2565
+ function D2(J, X) {
2566
+ return new J({
2567
+ type: "string",
2568
+ format: "time",
2569
+ check: "string_format",
2570
+ precision: null,
2571
+ ...O(X)
2572
+ });
2573
+ }
2574
+ function P2(J, X) {
2575
+ return new J({
2576
+ type: "string",
2577
+ format: "duration",
2578
+ check: "string_format",
2579
+ ...O(X)
2580
+ });
2581
+ }
2582
+ function O2(J, X) {
2583
+ return new J({
2584
+ type: "number",
2585
+ checks: [],
2586
+ ...O(X)
2587
+ });
2588
+ }
2589
+ function M2(J, X) {
2590
+ return new J({
2591
+ type: "number",
2592
+ coerce: !0,
2593
+ checks: [],
2594
+ ...O(X)
2595
+ });
2596
+ }
2597
+ function A2(J, X) {
2598
+ return new J({
2599
+ type: "number",
2600
+ check: "number_format",
2601
+ abort: !1,
2602
+ format: "safeint",
2603
+ ...O(X)
2604
+ });
2605
+ }
2606
+ function F2(J, X) {
2607
+ return new J({
2608
+ type: "boolean",
2609
+ ...O(X)
2610
+ });
2611
+ }
2612
+ function E2(J, X) {
2613
+ return new J({
2614
+ type: "boolean",
2615
+ coerce: !0,
2616
+ ...O(X)
2617
+ });
2618
+ }
2619
+ function $2(J, X) {
2620
+ return new J({
2621
+ type: "bigint",
2622
+ coerce: !0,
2623
+ ...O(X)
2624
+ });
2625
+ }
2626
+ function K2(J) {
2627
+ return new J({ type: "any" });
2628
+ }
2629
+ function V2(J) {
2630
+ return new J({ type: "unknown" });
2631
+ }
2632
+ function R2(J, X) {
2633
+ return new J({
2634
+ type: "never",
2635
+ ...O(X)
2636
+ });
2637
+ }
2638
+ function N2(J, X) {
2639
+ return new J({
2640
+ type: "date",
2641
+ ...O(X)
2642
+ });
2643
+ }
2644
+ function S2(J, X) {
2645
+ return new J({
2646
+ type: "date",
2647
+ coerce: !0,
2648
+ ...O(X)
2649
+ });
2650
+ }
2651
+ function Q0(J, X) {
2652
+ return new K4({
2653
+ check: "less_than",
2654
+ ...O(X),
2655
+ value: J,
2656
+ inclusive: !1
2657
+ });
2658
+ }
2659
+ function p(J, X) {
2660
+ return new K4({
2661
+ check: "less_than",
2662
+ ...O(X),
2663
+ value: J,
2664
+ inclusive: !0
2665
+ });
2666
+ }
2667
+ function z0(J, X) {
2668
+ return new V4({
2669
+ check: "greater_than",
2670
+ ...O(X),
2671
+ value: J,
2672
+ inclusive: !1
2673
+ });
2674
+ }
2675
+ function f(J, X) {
2676
+ return new V4({
2677
+ check: "greater_than",
2678
+ ...O(X),
2679
+ value: J,
2680
+ inclusive: !0
2681
+ });
2682
+ }
2683
+ function S0(J, X) {
2684
+ return new S1({
2685
+ check: "multiple_of",
2686
+ ...O(X),
2687
+ value: J
2688
+ });
2689
+ }
2690
+ function t0(J, X) {
2691
+ return new Z1({
2692
+ check: "max_length",
2693
+ ...O(X),
2694
+ maximum: J
2695
+ });
2696
+ }
2697
+ function G0(J, X) {
2698
+ return new _1({
2699
+ check: "min_length",
2700
+ ...O(X),
2701
+ minimum: J
2702
+ });
2703
+ }
2704
+ function a0(J, X) {
2705
+ return new b1({
2706
+ check: "length_equals",
2707
+ ...O(X),
2708
+ length: J
2709
+ });
2710
+ }
2711
+ function C4(J, X) {
2712
+ return new C1({
2713
+ check: "string_format",
2714
+ format: "regex",
2715
+ ...O(X),
2716
+ pattern: J
2717
+ });
2718
+ }
2719
+ function k4(J) {
2720
+ return new k1({
2721
+ check: "string_format",
2722
+ format: "lowercase",
2723
+ ...O(J)
2724
+ });
2725
+ }
2726
+ function T4(J) {
2727
+ return new T1({
2728
+ check: "string_format",
2729
+ format: "uppercase",
2730
+ ...O(J)
2731
+ });
2732
+ }
2733
+ function j4(J, X) {
2734
+ return new j1({
2735
+ check: "string_format",
2736
+ format: "includes",
2737
+ ...O(X),
2738
+ includes: J
2739
+ });
2740
+ }
2741
+ function h4(J, X) {
2742
+ return new h1({
2743
+ check: "string_format",
2744
+ format: "starts_with",
2745
+ ...O(X),
2746
+ prefix: J
2747
+ });
2748
+ }
2749
+ function x4(J, X) {
2750
+ return new x1({
2751
+ check: "string_format",
2752
+ format: "ends_with",
2753
+ ...O(X),
2754
+ suffix: J
2755
+ });
2756
+ }
2757
+ function s(J) {
2758
+ return new v1({
2759
+ check: "overwrite",
2760
+ tx: J
2761
+ });
2762
+ }
2763
+ function v4(J) {
2764
+ return s((X) => X.normalize(J));
2765
+ }
2766
+ function g4() {
2767
+ return s((J) => J.trim());
2768
+ }
2769
+ function u4() {
2770
+ return s((J) => J.toLowerCase());
2771
+ }
2772
+ function c4() {
2773
+ return s((J) => J.toUpperCase());
2774
+ }
2775
+ function y4() {
2776
+ return s((J) => D4(J));
2777
+ }
2778
+ function L2(J, X, Y) {
2779
+ return new J({
2780
+ type: "array",
2781
+ element: X,
2782
+ ...O(Y)
2783
+ });
2784
+ }
2785
+ function Z2(J, X, Y) {
2786
+ return new J({
2787
+ type: "custom",
2788
+ check: "custom",
2789
+ fn: X,
2790
+ ...O(Y)
2791
+ });
2792
+ }
2793
+ function _2(J) {
2794
+ let X = LX((Y) => {
2795
+ return Y.addIssue = (W) => {
2796
+ if (typeof W === "string") Y.issues.push(B0(W, Y.value, X._zod.def));
2797
+ else {
2798
+ let q = W;
2799
+ if (q.fatal) q.continue = !1;
2800
+ q.code ?? (q.code = "custom"), q.input ?? (q.input = Y.value), q.inst ?? (q.inst = X), q.continue ?? (q.continue = !X._zod.def.abort), Y.issues.push(B0(q));
2801
+ }
2802
+ }, J(Y.value, Y);
2803
+ });
2804
+ return X;
2805
+ }
2806
+ function LX(J, X) {
2807
+ let Y = new T({
2808
+ check: "custom",
2809
+ ...O(X)
2810
+ });
2811
+ return Y._zod.check = J, Y;
2812
+ }
2813
+ function m4(J) {
2814
+ let X = J?.target ?? "draft-2020-12";
2815
+ if (X === "draft-4") X = "draft-04";
2816
+ if (X === "draft-7") X = "draft-07";
2817
+ return {
2818
+ processors: J.processors ?? {},
2819
+ metadataRegistry: J?.metadata ?? X0,
2820
+ target: X,
2821
+ unrepresentable: J?.unrepresentable ?? "throw",
2822
+ override: J?.override ?? (() => {}),
2823
+ io: J?.io ?? "output",
2824
+ counter: 0,
2825
+ seen: /* @__PURE__ */ new Map(),
2826
+ cycles: J?.cycles ?? "ref",
2827
+ reused: J?.reused ?? "inline",
2828
+ external: J?.external ?? void 0
2829
+ };
2830
+ }
2831
+ function b(J, X, Y = {
2832
+ path: [],
2833
+ schemaPath: []
2834
+ }) {
2835
+ var W;
2836
+ let q = J._zod.def, H = X.seen.get(J);
2837
+ if (H) {
2838
+ if (H.count++, Y.schemaPath.includes(J)) H.cycle = Y.path;
2839
+ return H.schema;
2840
+ }
2841
+ let B = {
2842
+ schema: {},
2843
+ count: 1,
2844
+ cycle: void 0,
2845
+ path: Y.path
2846
+ };
2847
+ X.seen.set(J, B);
2848
+ let Q = J._zod.toJSONSchema?.();
2849
+ if (Q) B.schema = Q;
2850
+ else {
2851
+ let I = {
2852
+ ...Y,
2853
+ schemaPath: [...Y.schemaPath, J],
2854
+ path: Y.path
2855
+ }, w = J._zod.parent;
2856
+ if (w) B.ref = w, b(w, X, I), X.seen.get(w).isParent = !0;
2857
+ else if (J._zod.processJSONSchema) J._zod.processJSONSchema(X, B.schema, I);
2858
+ else {
2859
+ let M = B.schema, P = X.processors[q.type];
2860
+ if (!P) throw Error(`[toJSONSchema]: Non-representable type encountered: ${q.type}`);
2861
+ P(J, X, M, I);
2862
+ }
2863
+ }
2864
+ let G = X.metadataRegistry.get(J);
2865
+ if (G) Object.assign(B.schema, G);
2866
+ if (X.io === "input" && j(J)) delete B.schema.examples, delete B.schema.default;
2867
+ if (X.io === "input" && B.schema._prefault) (W = B.schema).default ?? (W.default = B.schema._prefault);
2868
+ return delete B.schema._prefault, X.seen.get(J).schema;
2869
+ }
2870
+ function f4(J, X) {
2871
+ let Y = J.seen.get(X);
2872
+ if (!Y) throw Error("Unprocessed schema. This is a bug in Zod.");
2873
+ let W = (H) => {
2874
+ let B = J.target === "draft-2020-12" ? "$defs" : "definitions";
2875
+ if (J.external) {
2876
+ let I = J.external.registry.get(H[0])?.id, w = J.external.uri ?? ((P) => P);
2877
+ if (I) return { ref: w(I) };
2878
+ let M = H[1].defId ?? H[1].schema.id ?? `schema${J.counter++}`;
2879
+ return H[1].defId = M, {
2880
+ defId: M,
2881
+ ref: `${w("__shared")}#/${B}/${M}`
2882
+ };
2883
+ }
2884
+ if (H[1] === Y) return { ref: "#" };
2885
+ let G = `#/${B}/`, z = H[1].schema.id ?? `__schema${J.counter++}`;
2886
+ return {
2887
+ defId: z,
2888
+ ref: G + z
2889
+ };
2890
+ }, q = (H) => {
2891
+ if (H[1].schema.$ref) return;
2892
+ let B = H[1], { ref: Q, defId: G } = W(H);
2893
+ if (B.def = { ...B.schema }, G) B.defId = G;
2894
+ let z = B.schema;
2895
+ for (let I in z) delete z[I];
2896
+ z.$ref = Q;
2897
+ };
2898
+ if (J.cycles === "throw") for (let H of J.seen.entries()) {
2899
+ let B = H[1];
2900
+ if (B.cycle) throw Error(`Cycle detected: #/${B.cycle?.join("/")}/<root>
2901
+
2902
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2903
+ }
2904
+ for (let H of J.seen.entries()) {
2905
+ let B = H[1];
2906
+ if (X === H[0]) {
2907
+ q(H);
2908
+ continue;
2909
+ }
2910
+ if (J.external) {
2911
+ let G = J.external.registry.get(H[0])?.id;
2912
+ if (X !== H[0] && G) {
2913
+ q(H);
2914
+ continue;
2915
+ }
2916
+ }
2917
+ if (J.metadataRegistry.get(H[0])?.id) {
2918
+ q(H);
2919
+ continue;
2920
+ }
2921
+ if (B.cycle) {
2922
+ q(H);
2923
+ continue;
2924
+ }
2925
+ if (B.count > 1) {
2926
+ if (J.reused === "ref") {
2927
+ q(H);
2928
+ continue;
2929
+ }
2930
+ }
2931
+ }
2932
+ }
2933
+ function o4(J, X) {
2934
+ let Y = J.seen.get(X);
2935
+ if (!Y) throw Error("Unprocessed schema. This is a bug in Zod.");
2936
+ let W = (B) => {
2937
+ let Q = J.seen.get(B), G = Q.def ?? Q.schema, z = { ...G };
2938
+ if (Q.ref === null) return;
2939
+ let I = Q.ref;
2940
+ if (Q.ref = null, I) {
2941
+ W(I);
2942
+ let w = J.seen.get(I).schema;
2943
+ if (w.$ref && (J.target === "draft-07" || J.target === "draft-04" || J.target === "openapi-3.0")) G.allOf = G.allOf ?? [], G.allOf.push(w);
2944
+ else Object.assign(G, w), Object.assign(G, z);
2945
+ }
2946
+ if (!Q.isParent) J.override({
2947
+ zodSchema: B,
2948
+ jsonSchema: G,
2949
+ path: Q.path ?? []
2950
+ });
2951
+ };
2952
+ for (let B of [...J.seen.entries()].reverse()) W(B[0]);
2953
+ let q = {};
2954
+ if (J.target === "draft-2020-12") q.$schema = "https://json-schema.org/draft/2020-12/schema";
2955
+ else if (J.target === "draft-07") q.$schema = "http://json-schema.org/draft-07/schema#";
2956
+ else if (J.target === "draft-04") q.$schema = "http://json-schema.org/draft-04/schema#";
2957
+ else if (J.target === "openapi-3.0");
2958
+ if (J.external?.uri) {
2959
+ let B = J.external.registry.get(X)?.id;
2960
+ if (!B) throw Error("Schema is missing an `id` property");
2961
+ q.$id = J.external.uri(B);
2962
+ }
2963
+ Object.assign(q, Y.def ?? Y.schema);
2964
+ let H = J.external?.defs ?? {};
2965
+ for (let B of J.seen.entries()) {
2966
+ let Q = B[1];
2967
+ if (Q.def && Q.defId) H[Q.defId] = Q.def;
2968
+ }
2969
+ if (J.external);
2970
+ else if (Object.keys(H).length > 0) if (J.target === "draft-2020-12") q.$defs = H;
2971
+ else q.definitions = H;
2972
+ try {
2973
+ let B = JSON.parse(JSON.stringify(q));
2974
+ return Object.defineProperty(B, "~standard", {
2975
+ value: {
2976
+ ...X["~standard"],
2977
+ jsonSchema: {
2978
+ input: L0(X, "input"),
2979
+ output: L0(X, "output")
2980
+ }
2981
+ },
2982
+ enumerable: !1,
2983
+ writable: !1
2984
+ }), B;
2985
+ } catch (B) {
2986
+ throw Error("Error converting schema to JSON.");
2987
+ }
2988
+ }
2989
+ function j(J, X) {
2990
+ let Y = X ?? { seen: /* @__PURE__ */ new Set() };
2991
+ if (Y.seen.has(J)) return !1;
2992
+ Y.seen.add(J);
2993
+ let W = J._zod.def;
2994
+ if (W.type === "transform") return !0;
2995
+ if (W.type === "array") return j(W.element, Y);
2996
+ if (W.type === "set") return j(W.valueType, Y);
2997
+ if (W.type === "lazy") return j(W.getter(), Y);
2998
+ if (W.type === "promise" || W.type === "optional" || W.type === "nonoptional" || W.type === "nullable" || W.type === "readonly" || W.type === "default" || W.type === "prefault") return j(W.innerType, Y);
2999
+ if (W.type === "intersection") return j(W.left, Y) || j(W.right, Y);
3000
+ if (W.type === "record" || W.type === "map") return j(W.keyType, Y) || j(W.valueType, Y);
3001
+ if (W.type === "pipe") return j(W.in, Y) || j(W.out, Y);
3002
+ if (W.type === "object") {
3003
+ for (let q in W.shape) if (j(W.shape[q], Y)) return !0;
3004
+ return !1;
3005
+ }
3006
+ if (W.type === "union") {
3007
+ for (let q of W.options) if (j(q, Y)) return !0;
3008
+ return !1;
3009
+ }
3010
+ if (W.type === "tuple") {
3011
+ for (let q of W.items) if (j(q, Y)) return !0;
3012
+ if (W.rest && j(W.rest, Y)) return !0;
3013
+ return !1;
3014
+ }
3015
+ return !1;
3016
+ }
3017
+ var b2 = (J, X = {}) => (Y) => {
3018
+ let W = m4({
3019
+ ...Y,
3020
+ processors: X
3021
+ });
3022
+ return b(J, W), f4(W, J), o4(W, J);
3023
+ }, L0 = (J, X) => (Y) => {
3024
+ let { libraryOptions: W, target: q } = Y ?? {}, H = m4({
3025
+ ...W ?? {},
3026
+ target: q,
3027
+ io: X,
3028
+ processors: {}
3029
+ });
3030
+ return b(J, H), f4(H, J), o4(H, J);
3031
+ };
3032
+ var ZX = {
3033
+ guid: "uuid",
3034
+ url: "uri",
3035
+ datetime: "date-time",
3036
+ json_string: "json-string",
3037
+ regex: ""
3038
+ }, C2 = (J, X, Y, W) => {
3039
+ let q = Y;
3040
+ q.type = "string";
3041
+ let { minimum: H, maximum: B, format: Q, patterns: G, contentEncoding: z } = J._zod.bag;
3042
+ if (typeof H === "number") q.minLength = H;
3043
+ if (typeof B === "number") q.maxLength = B;
3044
+ if (Q) {
3045
+ if (q.format = ZX[Q] ?? Q, q.format === "") delete q.format;
3046
+ }
3047
+ if (z) q.contentEncoding = z;
3048
+ if (G && G.size > 0) {
3049
+ let I = [...G];
3050
+ if (I.length === 1) q.pattern = I[0].source;
3051
+ else if (I.length > 1) q.allOf = [...I.map((w) => ({
3052
+ ...X.target === "draft-07" || X.target === "draft-04" || X.target === "openapi-3.0" ? { type: "string" } : {},
3053
+ pattern: w.source
3054
+ }))];
3055
+ }
3056
+ }, k2 = (J, X, Y, W) => {
3057
+ let q = Y, { minimum: H, maximum: B, format: Q, multipleOf: G, exclusiveMaximum: z, exclusiveMinimum: I } = J._zod.bag;
3058
+ if (typeof Q === "string" && Q.includes("int")) q.type = "integer";
3059
+ else q.type = "number";
3060
+ if (typeof I === "number") if (X.target === "draft-04" || X.target === "openapi-3.0") q.minimum = I, q.exclusiveMinimum = !0;
3061
+ else q.exclusiveMinimum = I;
3062
+ if (typeof H === "number") {
3063
+ if (q.minimum = H, typeof I === "number" && X.target !== "draft-04") if (I >= H) delete q.minimum;
3064
+ else delete q.exclusiveMinimum;
3065
+ }
3066
+ if (typeof z === "number") if (X.target === "draft-04" || X.target === "openapi-3.0") q.maximum = z, q.exclusiveMaximum = !0;
3067
+ else q.exclusiveMaximum = z;
3068
+ if (typeof B === "number") {
3069
+ if (q.maximum = B, typeof z === "number" && X.target !== "draft-04") if (z <= B) delete q.maximum;
3070
+ else delete q.exclusiveMaximum;
3071
+ }
3072
+ if (typeof G === "number") q.multipleOf = G;
3073
+ }, T2 = (J, X, Y, W) => {
3074
+ Y.type = "boolean";
3075
+ }, j2 = (J, X, Y, W) => {
3076
+ if (X.unrepresentable === "throw") throw Error("BigInt cannot be represented in JSON Schema");
3077
+ };
3078
+ var h2 = (J, X, Y, W) => {
3079
+ Y.not = {};
3080
+ }, x2 = (J, X, Y, W) => {}, v2 = (J, X, Y, W) => {}, g2 = (J, X, Y, W) => {
3081
+ if (X.unrepresentable === "throw") throw Error("Date cannot be represented in JSON Schema");
3082
+ }, u2 = (J, X, Y, W) => {
3083
+ let q = J._zod.def, H = A0(q.entries);
3084
+ if (H.every((B) => typeof B === "number")) Y.type = "number";
3085
+ if (H.every((B) => typeof B === "string")) Y.type = "string";
3086
+ Y.enum = H;
3087
+ };
3088
+ var c2 = (J, X, Y, W) => {
3089
+ if (X.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
3090
+ };
3091
+ var y2 = (J, X, Y, W) => {
3092
+ if (X.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
3093
+ };
3094
+ var m2 = (J, X, Y, W) => {
3095
+ let q = Y, H = J._zod.def, { minimum: B, maximum: Q } = J._zod.bag;
3096
+ if (typeof B === "number") q.minItems = B;
3097
+ if (typeof Q === "number") q.maxItems = Q;
3098
+ q.type = "array", q.items = b(H.element, X, {
3099
+ ...W,
3100
+ path: [...W.path, "items"]
3101
+ });
3102
+ }, f2 = (J, X, Y, W) => {
3103
+ let q = Y, H = J._zod.def;
3104
+ q.type = "object", q.properties = {};
3105
+ let B = H.shape;
3106
+ for (let z in B) q.properties[z] = b(B[z], X, {
3107
+ ...W,
3108
+ path: [
3109
+ ...W.path,
3110
+ "properties",
3111
+ z
3112
+ ]
3113
+ });
3114
+ let Q = new Set(Object.keys(B)), G = new Set([...Q].filter((z) => {
3115
+ let I = H.shape[z]._zod;
3116
+ if (X.io === "input") return I.optin === void 0;
3117
+ else return I.optout === void 0;
3118
+ }));
3119
+ if (G.size > 0) q.required = Array.from(G);
3120
+ if (H.catchall?._zod.def.type === "never") q.additionalProperties = !1;
3121
+ else if (!H.catchall) {
3122
+ if (X.io === "output") q.additionalProperties = !1;
3123
+ } else if (H.catchall) q.additionalProperties = b(H.catchall, X, {
3124
+ ...W,
3125
+ path: [...W.path, "additionalProperties"]
3126
+ });
3127
+ }, o2 = (J, X, Y, W) => {
3128
+ let q = J._zod.def, H = q.inclusive === !1, B = q.options.map((Q, G) => b(Q, X, {
3129
+ ...W,
3130
+ path: [
3131
+ ...W.path,
3132
+ H ? "oneOf" : "anyOf",
3133
+ G
3134
+ ]
3135
+ }));
3136
+ if (H) Y.oneOf = B;
3137
+ else Y.anyOf = B;
3138
+ }, r2 = (J, X, Y, W) => {
3139
+ let q = J._zod.def, H = b(q.left, X, {
3140
+ ...W,
3141
+ path: [
3142
+ ...W.path,
3143
+ "allOf",
3144
+ 0
3145
+ ]
3146
+ }), B = b(q.right, X, {
3147
+ ...W,
3148
+ path: [
3149
+ ...W.path,
3150
+ "allOf",
3151
+ 1
3152
+ ]
3153
+ }), Q = (z) => "allOf" in z && Object.keys(z).length === 1;
3154
+ Y.allOf = [...Q(H) ? H.allOf : [H], ...Q(B) ? B.allOf : [B]];
3155
+ };
3156
+ var l2 = (J, X, Y, W) => {
3157
+ let q = Y, H = J._zod.def;
3158
+ if (q.type = "object", X.target === "draft-07" || X.target === "draft-2020-12") q.propertyNames = b(H.keyType, X, {
3159
+ ...W,
3160
+ path: [...W.path, "propertyNames"]
3161
+ });
3162
+ q.additionalProperties = b(H.valueType, X, {
3163
+ ...W,
3164
+ path: [...W.path, "additionalProperties"]
3165
+ });
3166
+ }, p2 = (J, X, Y, W) => {
3167
+ let q = J._zod.def, H = b(q.innerType, X, W), B = X.seen.get(J);
3168
+ if (X.target === "openapi-3.0") B.ref = q.innerType, Y.nullable = !0;
3169
+ else Y.anyOf = [H, { type: "null" }];
3170
+ }, d2 = (J, X, Y, W) => {
3171
+ let q = J._zod.def;
3172
+ b(q.innerType, X, W);
3173
+ let H = X.seen.get(J);
3174
+ H.ref = q.innerType;
3175
+ }, n2 = (J, X, Y, W) => {
3176
+ let q = J._zod.def;
3177
+ b(q.innerType, X, W);
3178
+ let H = X.seen.get(J);
3179
+ H.ref = q.innerType, Y.default = JSON.parse(JSON.stringify(q.defaultValue));
3180
+ }, i2 = (J, X, Y, W) => {
3181
+ let q = J._zod.def;
3182
+ b(q.innerType, X, W);
3183
+ let H = X.seen.get(J);
3184
+ if (H.ref = q.innerType, X.io === "input") Y._prefault = JSON.parse(JSON.stringify(q.defaultValue));
3185
+ }, t2 = (J, X, Y, W) => {
3186
+ let q = J._zod.def;
3187
+ b(q.innerType, X, W);
3188
+ let H = X.seen.get(J);
3189
+ H.ref = q.innerType;
3190
+ let B;
3191
+ try {
3192
+ B = q.catchValue(void 0);
3193
+ } catch {
3194
+ throw Error("Dynamic catch values are not supported in JSON Schema");
3195
+ }
3196
+ Y.default = B;
3197
+ }, a2 = (J, X, Y, W) => {
3198
+ let q = J._zod.def, H = X.io === "input" ? q.in._zod.def.type === "transform" ? q.out : q.in : q.out;
3199
+ b(H, X, W);
3200
+ let B = X.seen.get(J);
3201
+ B.ref = H;
3202
+ }, s2 = (J, X, Y, W) => {
3203
+ let q = J._zod.def;
3204
+ b(q.innerType, X, W);
3205
+ let H = X.seen.get(J);
3206
+ H.ref = q.innerType, Y.readOnly = !0;
3207
+ };
3208
+ var e2 = (J, X, Y, W) => {
3209
+ let q = J._zod.def;
3210
+ b(q.innerType, X, W);
3211
+ let H = X.seen.get(J);
3212
+ H.ref = q.innerType;
3213
+ };
3214
+ var xX = U("ZodISODateTime", (J, X) => {
3215
+ qJ.init(J, X), S.init(J, X);
3216
+ });
3217
+ function J8(J) {
3218
+ return I2(xX, J);
3219
+ }
3220
+ var vX = U("ZodISODate", (J, X) => {
3221
+ HJ.init(J, X), S.init(J, X);
3222
+ });
3223
+ function X8(J) {
3224
+ return w2(vX, J);
3225
+ }
3226
+ var gX = U("ZodISOTime", (J, X) => {
3227
+ BJ.init(J, X), S.init(J, X);
3228
+ });
3229
+ function Y8(J) {
3230
+ return D2(gX, J);
3231
+ }
3232
+ var uX = U("ZodISODuration", (J, X) => {
3233
+ QJ.init(J, X), S.init(J, X);
3234
+ });
3235
+ function W8(J) {
3236
+ return P2(uX, J);
3237
+ }
3238
+ var B8 = (J, X) => {
3239
+ o0.init(J, X), J.name = "ZodError", Object.defineProperties(J, {
3240
+ format: { value: (Y) => c6(J, Y) },
3241
+ flatten: { value: (Y) => u6(J, Y) },
3242
+ addIssue: { value: (Y) => {
3243
+ J.issues.push(Y), J.message = JSON.stringify(J.issues, H0, 2);
3244
+ } },
3245
+ addIssues: { value: (Y) => {
3246
+ J.issues.push(...Y), J.message = JSON.stringify(J.issues, H0, 2);
3247
+ } },
3248
+ isEmpty: { get() {
3249
+ return J.issues.length === 0;
3250
+ } }
3251
+ });
3252
+ };
3253
+ U("ZodError", B8);
3254
+ var x = U("ZodError", B8, { Parent: Error });
3255
+ var Q8 = r0(x), z8 = l0(x), G8 = V0(x), U8 = R0(x), I8 = f6(x), w8 = o6(x), D8 = r6(x), P8 = l6(x), O8 = p6(x), M8 = d6(x), A8 = n6(x), F8 = i6(x);
3256
+ var L = U("ZodType", (J, X) => {
3257
+ return $.init(J, X), Object.assign(J["~standard"], { jsonSchema: {
3258
+ input: L0(J, "input"),
3259
+ output: L0(J, "output")
3260
+ } }), J.toJSONSchema = b2(J, {}), J.def = X, J.type = X.type, Object.defineProperty(J, "_def", { value: X }), J.check = (...Y) => {
3261
+ return J.clone(F.mergeDefs(X, { checks: [...X.checks ?? [], ...Y.map((W) => typeof W === "function" ? { _zod: {
3262
+ check: W,
3263
+ def: { check: "custom" },
3264
+ onattach: []
3265
+ } } : W)] }));
3266
+ }, J.clone = (Y, W) => y(J, Y, W), J.brand = () => J, J.register = (Y, W) => {
3267
+ return Y.add(J, W), J;
3268
+ }, J.parse = (Y, W) => Q8(J, Y, W, { callee: J.parse }), J.safeParse = (Y, W) => G8(J, Y, W), J.parseAsync = async (Y, W) => z8(J, Y, W, { callee: J.parseAsync }), J.safeParseAsync = async (Y, W) => U8(J, Y, W), J.spa = J.safeParseAsync, J.encode = (Y, W) => I8(J, Y, W), J.decode = (Y, W) => w8(J, Y, W), J.encodeAsync = async (Y, W) => D8(J, Y, W), J.decodeAsync = async (Y, W) => P8(J, Y, W), J.safeEncode = (Y, W) => O8(J, Y, W), J.safeDecode = (Y, W) => M8(J, Y, W), J.safeEncodeAsync = async (Y, W) => A8(J, Y, W), J.safeDecodeAsync = async (Y, W) => F8(J, Y, W), J.refine = (Y, W) => J.check(ZY(Y, W)), J.superRefine = (Y) => J.check(_Y(Y)), J.overwrite = (Y) => J.check(s(Y)), J.optional = () => V8(J), J.nullable = () => R8(J), J.nullish = () => V8(R8(J)), J.nonoptional = (Y) => $Y(J, Y), J.array = () => i4(J), J.or = (Y) => GY([J, Y]), J.and = (Y) => IY(J, Y), J.transform = (Y) => N8(J, PY(Y)), J.default = (Y) => AY(J, Y), J.prefault = (Y) => EY(J, Y), J.catch = (Y) => VY(J, Y), J.pipe = (Y) => N8(J, Y), J.readonly = () => SY(J), J.describe = (Y) => {
3269
+ let W = J.clone();
3270
+ return X0.add(W, { description: Y }), W;
3271
+ }, Object.defineProperty(J, "description", {
3272
+ get() {
3273
+ return X0.get(J)?.description;
3274
+ },
3275
+ configurable: !0
3276
+ }), J.meta = (...Y) => {
3277
+ if (Y.length === 0) return X0.get(J);
3278
+ let W = J.clone();
3279
+ return X0.add(W, Y[0]), W;
3280
+ }, J.isOptional = () => J.safeParse(void 0).success, J.isNullable = () => J.safeParse(null).success, J;
3281
+ }), S8 = U("_ZodString", (J, X) => {
3282
+ i0.init(J, X), L.init(J, X), J._zod.processJSONSchema = (W, q, H) => C2(J, W, q, H);
3283
+ let Y = J._zod.bag;
3284
+ J.format = Y.format ?? null, J.minLength = Y.minimum ?? null, J.maxLength = Y.maximum ?? null, J.regex = (...W) => J.check(C4(...W)), J.includes = (...W) => J.check(j4(...W)), J.startsWith = (...W) => J.check(h4(...W)), J.endsWith = (...W) => J.check(x4(...W)), J.min = (...W) => J.check(G0(...W)), J.max = (...W) => J.check(t0(...W)), J.length = (...W) => J.check(a0(...W)), J.nonempty = (...W) => J.check(G0(1, ...W)), J.lowercase = (W) => J.check(k4(W)), J.uppercase = (W) => J.check(T4(W)), J.trim = () => J.check(g4()), J.normalize = (...W) => J.check(v4(...W)), J.toLowerCase = () => J.check(u4()), J.toUpperCase = () => J.check(c4()), J.slugify = () => J.check(y4());
3285
+ }), l4 = U("ZodString", (J, X) => {
3286
+ i0.init(J, X), S8.init(J, X), J.email = (Y) => J.check(Z4(L8, Y)), J.url = (Y) => J.check(b4(_8, Y)), J.jwt = (Y) => J.check(U2(JY, Y)), J.emoji = (Y) => J.check(tJ(yX, Y)), J.guid = (Y) => J.check(_4(E8, Y)), J.uuid = (Y) => J.check(pJ(s0, Y)), J.uuidv4 = (Y) => J.check(dJ(s0, Y)), J.uuidv6 = (Y) => J.check(nJ(s0, Y)), J.uuidv7 = (Y) => J.check(iJ(s0, Y)), J.nanoid = (Y) => J.check(aJ(mX, Y)), J.guid = (Y) => J.check(_4(E8, Y)), J.cuid = (Y) => J.check(sJ(fX, Y)), J.cuid2 = (Y) => J.check(eJ(oX, Y)), J.ulid = (Y) => J.check(J2(rX, Y)), J.base64 = (Y) => J.check(Q2(aX, Y)), J.base64url = (Y) => J.check(z2(sX, Y)), J.xid = (Y) => J.check(X2(lX, Y)), J.ksuid = (Y) => J.check(Y2(pX, Y)), J.ipv4 = (Y) => J.check(W2(dX, Y)), J.ipv6 = (Y) => J.check(q2(nX, Y)), J.cidrv4 = (Y) => J.check(H2(iX, Y)), J.cidrv6 = (Y) => J.check(B2(tX, Y)), J.e164 = (Y) => J.check(G2(eX, Y)), J.datetime = (Y) => J.check(J8(Y)), J.date = (Y) => J.check(X8(Y)), J.time = (Y) => J.check(Y8(Y)), J.duration = (Y) => J.check(W8(Y));
3287
+ });
3288
+ function R(J) {
3289
+ return rJ(l4, J);
3290
+ }
3291
+ var S = U("ZodStringFormat", (J, X) => {
3292
+ V.init(J, X), S8.init(J, X);
3293
+ }), L8 = U("ZodEmail", (J, X) => {
3294
+ i1.init(J, X), S.init(J, X);
3295
+ });
3296
+ var E8 = U("ZodGUID", (J, X) => {
3297
+ d1.init(J, X), S.init(J, X);
3298
+ });
3299
+ var s0 = U("ZodUUID", (J, X) => {
3300
+ n1.init(J, X), S.init(J, X);
3301
+ });
3302
+ var _8 = U("ZodURL", (J, X) => {
3303
+ t1.init(J, X), S.init(J, X);
3304
+ });
3305
+ var yX = U("ZodEmoji", (J, X) => {
3306
+ a1.init(J, X), S.init(J, X);
3307
+ });
3308
+ var mX = U("ZodNanoID", (J, X) => {
3309
+ s1.init(J, X), S.init(J, X);
3310
+ });
3311
+ var fX = U("ZodCUID", (J, X) => {
3312
+ e1.init(J, X), S.init(J, X);
3313
+ });
3314
+ var oX = U("ZodCUID2", (J, X) => {
3315
+ JJ.init(J, X), S.init(J, X);
3316
+ });
3317
+ var rX = U("ZodULID", (J, X) => {
3318
+ XJ.init(J, X), S.init(J, X);
3319
+ });
3320
+ var lX = U("ZodXID", (J, X) => {
3321
+ YJ.init(J, X), S.init(J, X);
3322
+ });
3323
+ var pX = U("ZodKSUID", (J, X) => {
3324
+ WJ.init(J, X), S.init(J, X);
3325
+ });
3326
+ var dX = U("ZodIPv4", (J, X) => {
3327
+ zJ.init(J, X), S.init(J, X);
3328
+ });
3329
+ var nX = U("ZodIPv6", (J, X) => {
3330
+ GJ.init(J, X), S.init(J, X);
3331
+ });
3332
+ var iX = U("ZodCIDRv4", (J, X) => {
3333
+ UJ.init(J, X), S.init(J, X);
3334
+ });
3335
+ var tX = U("ZodCIDRv6", (J, X) => {
3336
+ IJ.init(J, X), S.init(J, X);
3337
+ });
3338
+ var aX = U("ZodBase64", (J, X) => {
3339
+ DJ.init(J, X), S.init(J, X);
3340
+ });
3341
+ var sX = U("ZodBase64URL", (J, X) => {
3342
+ PJ.init(J, X), S.init(J, X);
3343
+ });
3344
+ var eX = U("ZodE164", (J, X) => {
3345
+ OJ.init(J, X), S.init(J, X);
3346
+ });
3347
+ var JY = U("ZodJWT", (J, X) => {
3348
+ MJ.init(J, X), S.init(J, X);
3349
+ });
3350
+ var e0 = U("ZodNumber", (J, X) => {
3351
+ S4.init(J, X), L.init(J, X), J._zod.processJSONSchema = (W, q, H) => k2(J, W, q, H), J.gt = (W, q) => J.check(z0(W, q)), J.gte = (W, q) => J.check(f(W, q)), J.min = (W, q) => J.check(f(W, q)), J.lt = (W, q) => J.check(Q0(W, q)), J.lte = (W, q) => J.check(p(W, q)), J.max = (W, q) => J.check(p(W, q)), J.int = (W) => J.check($8(W)), J.safe = (W) => J.check($8(W)), J.positive = (W) => J.check(z0(0, W)), J.nonnegative = (W) => J.check(f(0, W)), J.negative = (W) => J.check(Q0(0, W)), J.nonpositive = (W) => J.check(p(0, W)), J.multipleOf = (W, q) => J.check(S0(W, q)), J.step = (W, q) => J.check(S0(W, q)), J.finite = () => J;
3352
+ let Y = J._zod.bag;
3353
+ J.minValue = Math.max(Y.minimum ?? Number.NEGATIVE_INFINITY, Y.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, J.maxValue = Math.min(Y.maximum ?? Number.POSITIVE_INFINITY, Y.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, J.isInt = (Y.format ?? "").includes("int") || Number.isSafeInteger(Y.multipleOf ?? .5), J.isFinite = !0, J.format = Y.format ?? null;
3354
+ });
3355
+ function Y0(J) {
3356
+ return O2(e0, J);
3357
+ }
3358
+ var XY = U("ZodNumberFormat", (J, X) => {
3359
+ AJ.init(J, X), e0.init(J, X);
3360
+ });
3361
+ function $8(J) {
3362
+ return A2(XY, J);
3363
+ }
3364
+ var p4 = U("ZodBoolean", (J, X) => {
3365
+ FJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => T2(J, Y, W, q);
3366
+ });
3367
+ function C8(J) {
3368
+ return F2(p4, J);
3369
+ }
3370
+ var k8 = U("ZodBigInt", (J, X) => {
3371
+ EJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (W, q, H) => j2(J, W, q, H), J.gte = (W, q) => J.check(f(W, q)), J.min = (W, q) => J.check(f(W, q)), J.gt = (W, q) => J.check(z0(W, q)), J.gte = (W, q) => J.check(f(W, q)), J.min = (W, q) => J.check(f(W, q)), J.lt = (W, q) => J.check(Q0(W, q)), J.lte = (W, q) => J.check(p(W, q)), J.max = (W, q) => J.check(p(W, q)), J.positive = (W) => J.check(z0(BigInt(0), W)), J.negative = (W) => J.check(Q0(BigInt(0), W)), J.nonpositive = (W) => J.check(p(BigInt(0), W)), J.nonnegative = (W) => J.check(f(BigInt(0), W)), J.multipleOf = (W, q) => J.check(S0(W, q));
3372
+ let Y = J._zod.bag;
3373
+ J.minValue = Y.minimum ?? null, J.maxValue = Y.maximum ?? null, J.format = Y.format ?? null;
3374
+ });
3375
+ var YY = U("ZodAny", (J, X) => {
3376
+ $J.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => x2(J, Y, W, q);
3377
+ });
3378
+ function J4() {
3379
+ return K2(YY);
3380
+ }
3381
+ var WY = U("ZodUnknown", (J, X) => {
3382
+ KJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => v2(J, Y, W, q);
3383
+ });
3384
+ function K8() {
3385
+ return V2(WY);
3386
+ }
3387
+ var qY = U("ZodNever", (J, X) => {
3388
+ VJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => h2(J, Y, W, q);
3389
+ });
3390
+ function HY(J) {
3391
+ return R2(qY, J);
3392
+ }
3393
+ var d4 = U("ZodDate", (J, X) => {
3394
+ RJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (W, q, H) => g2(J, W, q, H), J.min = (W, q) => J.check(f(W, q)), J.max = (W, q) => J.check(p(W, q));
3395
+ let Y = J._zod.bag;
3396
+ J.minDate = Y.minimum ? new Date(Y.minimum) : null, J.maxDate = Y.maximum ? new Date(Y.maximum) : null;
3397
+ });
3398
+ function n4(J) {
3399
+ return N2(d4, J);
3400
+ }
3401
+ var BY = U("ZodArray", (J, X) => {
3402
+ NJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => m2(J, Y, W, q), J.element = X.element, J.min = (Y, W) => J.check(G0(Y, W)), J.nonempty = (Y) => J.check(G0(1, Y)), J.max = (Y, W) => J.check(t0(Y, W)), J.length = (Y, W) => J.check(a0(Y, W)), J.unwrap = () => J.element;
3403
+ });
3404
+ function i4(J, X) {
3405
+ return L2(BY, J, X);
3406
+ }
3407
+ var QY = U("ZodObject", (J, X) => {
3408
+ ZJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => f2(J, Y, W, q), F.defineLazy(J, "shape", () => {
3409
+ return X.shape;
3410
+ }), J.keyof = () => a4(Object.keys(J._zod.def.shape)), J.catchall = (Y) => J.clone({
3411
+ ...J._zod.def,
3412
+ catchall: Y
3413
+ }), J.passthrough = () => J.clone({
3414
+ ...J._zod.def,
3415
+ catchall: K8()
3416
+ }), J.loose = () => J.clone({
3417
+ ...J._zod.def,
3418
+ catchall: K8()
3419
+ }), J.strict = () => J.clone({
3420
+ ...J._zod.def,
3421
+ catchall: HY()
3422
+ }), J.strip = () => J.clone({
3423
+ ...J._zod.def,
3424
+ catchall: void 0
3425
+ }), J.extend = (Y) => {
3426
+ return F.extend(J, Y);
3427
+ }, J.safeExtend = (Y) => {
3428
+ return F.safeExtend(J, Y);
3429
+ }, J.merge = (Y) => F.merge(J, Y), J.pick = (Y) => F.pick(J, Y), J.omit = (Y) => F.omit(J, Y), J.partial = (...Y) => F.partial(j8, J, Y[0]), J.required = (...Y) => F.required(h8, J, Y[0]);
3430
+ });
3431
+ function T8(J, X) {
3432
+ return new QY({
3433
+ type: "object",
3434
+ shape: J ?? {},
3435
+ ...F.normalizeParams(X)
3436
+ });
3437
+ }
3438
+ var zY = U("ZodUnion", (J, X) => {
3439
+ _J.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => o2(J, Y, W, q), J.options = X.options;
3440
+ });
3441
+ function GY(J, X) {
3442
+ return new zY({
3443
+ type: "union",
3444
+ options: J,
3445
+ ...F.normalizeParams(X)
3446
+ });
3447
+ }
3448
+ var UY = U("ZodIntersection", (J, X) => {
3449
+ bJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => r2(J, Y, W, q);
3450
+ });
3451
+ function IY(J, X) {
3452
+ return new UY({
3453
+ type: "intersection",
3454
+ left: J,
3455
+ right: X
3456
+ });
3457
+ }
3458
+ var wY = U("ZodRecord", (J, X) => {
3459
+ CJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => l2(J, Y, W, q), J.keyType = X.keyType, J.valueType = X.valueType;
3460
+ });
3461
+ function t4(J, X, Y) {
3462
+ return new wY({
3463
+ type: "record",
3464
+ keyType: J,
3465
+ valueType: X,
3466
+ ...F.normalizeParams(Y)
3467
+ });
3468
+ }
3469
+ var r4 = U("ZodEnum", (J, X) => {
3470
+ kJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (W, q, H) => u2(J, W, q, H), J.enum = X.entries, J.options = Object.values(X.entries);
3471
+ let Y = new Set(Object.keys(X.entries));
3472
+ J.extract = (W, q) => {
3473
+ let H = {};
3474
+ for (let B of W) if (Y.has(B)) H[B] = X.entries[B];
3475
+ else throw Error(`Key ${B} not found in enum`);
3476
+ return new r4({
3477
+ ...X,
3478
+ checks: [],
3479
+ ...F.normalizeParams(q),
3480
+ entries: H
3481
+ });
3482
+ }, J.exclude = (W, q) => {
3483
+ let H = { ...X.entries };
3484
+ for (let B of W) if (Y.has(B)) delete H[B];
3485
+ else throw Error(`Key ${B} not found in enum`);
3486
+ return new r4({
3487
+ ...X,
3488
+ checks: [],
3489
+ ...F.normalizeParams(q),
3490
+ entries: H
3491
+ });
3492
+ };
3493
+ });
3494
+ function a4(J, X) {
3495
+ return new r4({
3496
+ type: "enum",
3497
+ entries: Array.isArray(J) ? Object.fromEntries(J.map((W) => [W, W])) : J,
3498
+ ...F.normalizeParams(X)
3499
+ });
3500
+ }
3501
+ var DY = U("ZodTransform", (J, X) => {
3502
+ TJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => y2(J, Y, W, q), J._zod.parse = (Y, W) => {
3503
+ if (W.direction === "backward") throw new O0(J.constructor.name);
3504
+ Y.addIssue = (H) => {
3505
+ if (typeof H === "string") Y.issues.push(F.issue(H, Y.value, X));
3506
+ else {
3507
+ let B = H;
3508
+ if (B.fatal) B.continue = !1;
3509
+ B.code ?? (B.code = "custom"), B.input ?? (B.input = Y.value), B.inst ?? (B.inst = J), Y.issues.push(F.issue(B));
3510
+ }
3511
+ };
3512
+ let q = X.transform(Y.value, Y);
3513
+ if (q instanceof Promise) return q.then((H) => {
3514
+ return Y.value = H, Y;
3515
+ });
3516
+ return Y.value = q, Y;
3517
+ };
3518
+ });
3519
+ function PY(J) {
3520
+ return new DY({
3521
+ type: "transform",
3522
+ transform: J
3523
+ });
3524
+ }
3525
+ var j8 = U("ZodOptional", (J, X) => {
3526
+ jJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => e2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType;
3527
+ });
3528
+ function V8(J) {
3529
+ return new j8({
3530
+ type: "optional",
3531
+ innerType: J
3532
+ });
3533
+ }
3534
+ var OY = U("ZodNullable", (J, X) => {
3535
+ hJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => p2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType;
3536
+ });
3537
+ function R8(J) {
3538
+ return new OY({
3539
+ type: "nullable",
3540
+ innerType: J
3541
+ });
3542
+ }
3543
+ var MY = U("ZodDefault", (J, X) => {
3544
+ xJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => n2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType, J.removeDefault = J.unwrap;
3545
+ });
3546
+ function AY(J, X) {
3547
+ return new MY({
3548
+ type: "default",
3549
+ innerType: J,
3550
+ get defaultValue() {
3551
+ return typeof X === "function" ? X() : F.shallowClone(X);
3552
+ }
3553
+ });
3554
+ }
3555
+ var FY = U("ZodPrefault", (J, X) => {
3556
+ vJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => i2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType;
3557
+ });
3558
+ function EY(J, X) {
3559
+ return new FY({
3560
+ type: "prefault",
3561
+ innerType: J,
3562
+ get defaultValue() {
3563
+ return typeof X === "function" ? X() : F.shallowClone(X);
3564
+ }
3565
+ });
3566
+ }
3567
+ var h8 = U("ZodNonOptional", (J, X) => {
3568
+ gJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => d2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType;
3569
+ });
3570
+ function $Y(J, X) {
3571
+ return new h8({
3572
+ type: "nonoptional",
3573
+ innerType: J,
3574
+ ...F.normalizeParams(X)
3575
+ });
3576
+ }
3577
+ var KY = U("ZodCatch", (J, X) => {
3578
+ uJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => t2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType, J.removeCatch = J.unwrap;
3579
+ });
3580
+ function VY(J, X) {
3581
+ return new KY({
3582
+ type: "catch",
3583
+ innerType: J,
3584
+ catchValue: typeof X === "function" ? X : () => X
3585
+ });
3586
+ }
3587
+ var RY = U("ZodPipe", (J, X) => {
3588
+ cJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => a2(J, Y, W, q), J.in = X.in, J.out = X.out;
3589
+ });
3590
+ function N8(J, X) {
3591
+ return new RY({
3592
+ type: "pipe",
3593
+ in: J,
3594
+ out: X
3595
+ });
3596
+ }
3597
+ var NY = U("ZodReadonly", (J, X) => {
3598
+ yJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => s2(J, Y, W, q), J.unwrap = () => J._zod.def.innerType;
3599
+ });
3600
+ function SY(J) {
3601
+ return new NY({
3602
+ type: "readonly",
3603
+ innerType: J
3604
+ });
3605
+ }
3606
+ var LY = U("ZodCustom", (J, X) => {
3607
+ mJ.init(J, X), L.init(J, X), J._zod.processJSONSchema = (Y, W, q) => c2(J, Y, W, q);
3608
+ });
3609
+ function ZY(J, X = {}) {
3610
+ return Z2(LY, J, X);
3611
+ }
3612
+ function _Y(J) {
3613
+ return _2(J);
3614
+ }
3615
+ var I0 = {};
3616
+ U6(I0, {
3617
+ string: () => bY,
3618
+ number: () => CY,
3619
+ date: () => jY,
3620
+ boolean: () => kY,
3621
+ bigint: () => TY
3622
+ });
3623
+ function bY(J) {
3624
+ return lJ(l4, J);
3625
+ }
3626
+ function CY(J) {
3627
+ return M2(e0, J);
3628
+ }
3629
+ function kY(J) {
3630
+ return E2(p4, J);
3631
+ }
3632
+ function TY(J) {
3633
+ return $2(k8, J);
3634
+ }
3635
+ function jY(J) {
3636
+ return S2(d4, J);
3637
+ }
3638
+ v(L4());
3639
+ var s4 = /^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/, e4 = /^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/, J6 = /^[+]?\d[\d\s().-]{3,}$/, X6 = /^[A-Z]{3}$/, Y6 = /^[A-Z]{2}$/, W6 = -90, q6 = 90, H6 = -180, B6 = 180, E5 = {
3640
+ String_unsecure: () => new Z({
3641
+ name: "String_unsecure",
3642
+ description: "Unvalidated string scalar",
3643
+ zod: R(),
3644
+ parseValue: (J) => R().parse(J),
3645
+ serialize: (J) => String(J),
3646
+ parseLiteral: (J) => {
3647
+ if (J.kind !== K.STRING) throw TypeError("Invalid literal");
3648
+ return J.value;
3649
+ },
3650
+ jsonSchema: { type: "string" }
3651
+ }),
3652
+ Int_unsecure: () => new Z({
3653
+ name: "Int_unsecure",
3654
+ description: "Unvalidated integer scalar",
3655
+ zod: Y0().int(),
3656
+ parseValue: (J) => {
3657
+ let X = typeof J === "number" ? J : Number(J);
3658
+ return Y0().int().parse(X);
3659
+ },
3660
+ serialize: (J) => Math.trunc(typeof J === "number" ? J : Number(J)),
3661
+ parseLiteral: (J) => {
3662
+ if (J.kind !== K.INT) throw TypeError("Invalid literal");
3663
+ return Number(J.value);
3664
+ },
3665
+ jsonSchema: { type: "integer" }
3666
+ }),
3667
+ Float_unsecure: () => new Z({
3668
+ name: "Float_unsecure",
3669
+ description: "Unvalidated float scalar",
3670
+ zod: Y0(),
3671
+ parseValue: (J) => {
3672
+ let X = typeof J === "number" ? J : Number(J);
3673
+ return Y0().parse(X);
3674
+ },
3675
+ serialize: (J) => Number(J),
3676
+ parseLiteral: (J) => {
3677
+ if (J.kind !== K.FLOAT && J.kind !== K.INT) throw TypeError("Invalid literal");
3678
+ return Number(J.value);
3679
+ },
3680
+ jsonSchema: { type: "number" }
3681
+ }),
3682
+ Boolean: () => new Z({
3683
+ name: "Boolean",
3684
+ description: "Unvalidated boolean scalar",
3685
+ zod: C8(),
3686
+ parseValue: (J) => I0.boolean().parse(J),
3687
+ serialize: (J) => Boolean(J),
3688
+ parseLiteral: (J) => {
3689
+ if (J.kind !== K.BOOLEAN) throw TypeError("Invalid literal");
3690
+ return J.value;
3691
+ },
3692
+ jsonSchema: { type: "boolean" }
3693
+ }),
3694
+ ID: () => new Z({
3695
+ name: "ID",
3696
+ description: "Unvalidated id scalar",
3697
+ zod: R(),
3698
+ parseValue: (J) => R().parse(J),
3699
+ serialize: (J) => String(J),
3700
+ parseLiteral: (J) => {
3701
+ if (J.kind !== K.STRING) throw TypeError("Invalid literal");
3702
+ return J.value;
3703
+ },
3704
+ jsonSchema: { type: "string" }
3705
+ }),
3706
+ JSON: () => new Z({
3707
+ name: "JSON",
3708
+ zod: J4(),
3709
+ parseValue: (J) => J,
3710
+ serialize: (J) => J,
3711
+ jsonSchema: {}
3712
+ }),
3713
+ JSONObject: () => new Z({
3714
+ name: "JSONObject",
3715
+ zod: t4(R(), J4()),
3716
+ parseValue: (J) => t4(R(), J4()).parse(J),
3717
+ serialize: (J) => J ?? {},
3718
+ jsonSchema: { type: "object" }
3719
+ }),
3720
+ Date: () => new Z({
3721
+ name: "Date",
3722
+ zod: n4(),
3723
+ parseValue: (J) => J instanceof Date ? J : new Date(String(J)),
3724
+ serialize: (J) => J instanceof Date ? J.toISOString().split("T")[0] : String(J),
3725
+ jsonSchema: {
3726
+ type: "string",
3727
+ format: "date"
3728
+ }
3729
+ }),
3730
+ DateTime: () => new Z({
3731
+ name: "DateTime",
3732
+ zod: n4(),
3733
+ parseValue: (J) => J instanceof Date ? J : new Date(String(J)),
3734
+ serialize: (J) => {
3735
+ return J instanceof Date ? J.toISOString() : String(J);
3736
+ },
3737
+ jsonSchema: {
3738
+ type: "string",
3739
+ format: "date-time"
3740
+ }
3741
+ }),
3742
+ Time: () => new Z({
3743
+ name: "Time",
3744
+ zod: R().regex(/^\d{2}:\d{2}(:\d{2})?$/),
3745
+ parseValue: (J) => R().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(J),
3746
+ serialize: (J) => String(J),
3747
+ jsonSchema: {
3748
+ type: "string",
3749
+ pattern: "^\\d{2}:\\d{2}(:\\d{2})?$"
3750
+ }
3751
+ }),
3752
+ EmailAddress: () => new Z({
3753
+ name: "EmailAddress",
3754
+ zod: R().email(),
3755
+ parseValue: (J) => R().email().parse(J),
3756
+ serialize: (J) => String(J),
3757
+ jsonSchema: {
3758
+ type: "string",
3759
+ format: "email"
3760
+ }
3761
+ }),
3762
+ URL: () => new Z({
3763
+ name: "URL",
3764
+ zod: R().url(),
3765
+ parseValue: (J) => R().url().parse(J),
3766
+ serialize: (J) => String(J),
3767
+ jsonSchema: {
3768
+ type: "string",
3769
+ format: "uri"
3770
+ }
3771
+ }),
3772
+ PhoneNumber: () => new Z({
3773
+ name: "PhoneNumber",
3774
+ zod: R().regex(J6),
3775
+ parseValue: (J) => R().regex(J6).parse(J),
3776
+ serialize: (J) => String(J),
3777
+ jsonSchema: {
3778
+ type: "string",
3779
+ pattern: J6.source
3780
+ }
3781
+ }),
3782
+ NonEmptyString: () => new Z({
3783
+ name: "NonEmptyString",
3784
+ zod: R().min(1),
3785
+ parseValue: (J) => R().min(1).parse(J),
3786
+ serialize: (J) => String(J),
3787
+ jsonSchema: {
3788
+ type: "string",
3789
+ minLength: 1
3790
+ }
3791
+ }),
3792
+ Locale: () => new Z({
3793
+ name: "Locale",
3794
+ zod: R().regex(s4),
3795
+ parseValue: (J) => R().regex(s4).parse(J),
3796
+ serialize: (J) => String(J),
3797
+ jsonSchema: {
3798
+ type: "string",
3799
+ pattern: s4.source
3800
+ }
3801
+ }),
3802
+ TimeZone: () => new Z({
3803
+ name: "TimeZone",
3804
+ zod: R().regex(e4),
3805
+ parseValue: (J) => R().regex(e4).parse(J),
3806
+ serialize: (J) => String(J),
3807
+ jsonSchema: {
3808
+ type: "string",
3809
+ pattern: e4.source
3810
+ }
3811
+ }),
3812
+ Latitude: () => new Z({
3813
+ name: "Latitude",
3814
+ zod: Y0().min(W6).max(q6),
3815
+ parseValue: (J) => I0.number().min(W6).max(q6).parse(J),
3816
+ serialize: (J) => Number(J),
3817
+ jsonSchema: {
3818
+ type: "number",
3819
+ minimum: W6,
3820
+ maximum: q6
3821
+ }
3822
+ }),
3823
+ Longitude: () => new Z({
3824
+ name: "Longitude",
3825
+ zod: Y0().min(H6).max(B6),
3826
+ parseValue: (J) => I0.number().min(H6).max(B6).parse(J),
3827
+ serialize: (J) => Number(J),
3828
+ jsonSchema: {
3829
+ type: "number",
3830
+ minimum: H6,
3831
+ maximum: B6
3832
+ }
3833
+ }),
3834
+ Currency: () => new Z({
3835
+ name: "Currency",
3836
+ zod: R().regex(X6),
3837
+ parseValue: (J) => R().regex(X6).parse(J),
3838
+ serialize: (J) => String(J),
3839
+ jsonSchema: {
3840
+ type: "string",
3841
+ pattern: X6.source
3842
+ }
3843
+ }),
3844
+ CountryCode: () => new Z({
3845
+ name: "CountryCode",
3846
+ zod: R().regex(Y6),
3847
+ parseValue: (J) => R().regex(Y6).parse(J),
3848
+ serialize: (J) => String(J),
3849
+ jsonSchema: {
3850
+ type: "string",
3851
+ pattern: Y6.source
3852
+ }
3853
+ })
3854
+ };
3855
+ var x8 = class {
3856
+ config;
3857
+ constructor(J) {
3858
+ this.config = J;
3859
+ }
3860
+ getZod() {
3861
+ return T8(Object.entries(this.config.fields).reduce((X, [Y, W]) => {
3862
+ let q = W.type.getZod(), H = W.isArray ? i4(q) : q;
3863
+ return X[Y] = W.isOptional ? H.optional() : H, X;
3864
+ }, {}));
3865
+ }
3866
+ getPothosInput() {
3867
+ return this.config.name;
3868
+ }
3869
+ };
3870
+ var K5 = (J) => new x8(J);
3871
+
3872
+ //#endregion
3873
+ export { E5, K5, x8 };
3874
+ //# sourceMappingURL=index.js.map