@magiclabs.ai/magicbook-client 0.7.29 → 0.7.31-canary

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -293,6 +293,14 @@ var styles = {
293
293
  6166: { slug: "disney-mickey-and-friends-sfly" },
294
294
  6169: { slug: "through-the-years-sfly" },
295
295
  6172: { slug: "modern-editorial-moments-sfly" },
296
+ 6173: { slug: "disneys-happily-ever-after-sfly" },
297
+ 6176: { slug: "disney-mickey-and-friends-christmas-sfly" },
298
+ 6177: { slug: "timeless-love-story-sfly" },
299
+ 6178: { slug: "tiny-moments-sfly" },
300
+ 6179: { slug: "travel-archives-sfly" },
301
+ 6180: { slug: "illustrated-with-love-sfly" },
302
+ 6183: { slug: "modern-school-yearbook-sfly" },
303
+ 6186: { slug: "professional-portfolio-sfly" },
296
304
  //snapfish styles
297
305
  be5f79d7525f4717844db77a2f1b5e50: { slug: "abstract-baby-first-year-snap" },
298
306
  "519bf5f2b6734103a9a359469be4961b": { slug: "album-snap" },
@@ -1671,10 +1679,123 @@ function getStyleIdBySlug(slug) {
1671
1679
  return slug;
1672
1680
  }
1673
1681
 
1674
- // ../../node_modules/.pnpm/zod@3.24.4/node_modules/zod/lib/index.mjs
1682
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
1683
+ var external_exports = {};
1684
+ __export(external_exports, {
1685
+ BRAND: () => BRAND,
1686
+ DIRTY: () => DIRTY,
1687
+ EMPTY_PATH: () => EMPTY_PATH,
1688
+ INVALID: () => INVALID,
1689
+ NEVER: () => NEVER,
1690
+ OK: () => OK,
1691
+ ParseStatus: () => ParseStatus,
1692
+ Schema: () => ZodType,
1693
+ ZodAny: () => ZodAny,
1694
+ ZodArray: () => ZodArray,
1695
+ ZodBigInt: () => ZodBigInt,
1696
+ ZodBoolean: () => ZodBoolean,
1697
+ ZodBranded: () => ZodBranded,
1698
+ ZodCatch: () => ZodCatch,
1699
+ ZodDate: () => ZodDate,
1700
+ ZodDefault: () => ZodDefault,
1701
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
1702
+ ZodEffects: () => ZodEffects,
1703
+ ZodEnum: () => ZodEnum,
1704
+ ZodError: () => ZodError,
1705
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
1706
+ ZodFunction: () => ZodFunction,
1707
+ ZodIntersection: () => ZodIntersection,
1708
+ ZodIssueCode: () => ZodIssueCode,
1709
+ ZodLazy: () => ZodLazy,
1710
+ ZodLiteral: () => ZodLiteral,
1711
+ ZodMap: () => ZodMap,
1712
+ ZodNaN: () => ZodNaN,
1713
+ ZodNativeEnum: () => ZodNativeEnum,
1714
+ ZodNever: () => ZodNever,
1715
+ ZodNull: () => ZodNull,
1716
+ ZodNullable: () => ZodNullable,
1717
+ ZodNumber: () => ZodNumber,
1718
+ ZodObject: () => ZodObject,
1719
+ ZodOptional: () => ZodOptional,
1720
+ ZodParsedType: () => ZodParsedType,
1721
+ ZodPipeline: () => ZodPipeline,
1722
+ ZodPromise: () => ZodPromise,
1723
+ ZodReadonly: () => ZodReadonly,
1724
+ ZodRecord: () => ZodRecord,
1725
+ ZodSchema: () => ZodType,
1726
+ ZodSet: () => ZodSet,
1727
+ ZodString: () => ZodString,
1728
+ ZodSymbol: () => ZodSymbol,
1729
+ ZodTransformer: () => ZodEffects,
1730
+ ZodTuple: () => ZodTuple,
1731
+ ZodType: () => ZodType,
1732
+ ZodUndefined: () => ZodUndefined,
1733
+ ZodUnion: () => ZodUnion,
1734
+ ZodUnknown: () => ZodUnknown,
1735
+ ZodVoid: () => ZodVoid,
1736
+ addIssueToContext: () => addIssueToContext,
1737
+ any: () => anyType,
1738
+ array: () => arrayType,
1739
+ bigint: () => bigIntType,
1740
+ boolean: () => booleanType,
1741
+ coerce: () => coerce,
1742
+ custom: () => custom,
1743
+ date: () => dateType,
1744
+ datetimeRegex: () => datetimeRegex,
1745
+ defaultErrorMap: () => en_default,
1746
+ discriminatedUnion: () => discriminatedUnionType,
1747
+ effect: () => effectsType,
1748
+ enum: () => enumType,
1749
+ function: () => functionType,
1750
+ getErrorMap: () => getErrorMap,
1751
+ getParsedType: () => getParsedType,
1752
+ instanceof: () => instanceOfType,
1753
+ intersection: () => intersectionType,
1754
+ isAborted: () => isAborted,
1755
+ isAsync: () => isAsync,
1756
+ isDirty: () => isDirty,
1757
+ isValid: () => isValid,
1758
+ late: () => late,
1759
+ lazy: () => lazyType,
1760
+ literal: () => literalType,
1761
+ makeIssue: () => makeIssue,
1762
+ map: () => mapType,
1763
+ nan: () => nanType,
1764
+ nativeEnum: () => nativeEnumType,
1765
+ never: () => neverType,
1766
+ null: () => nullType,
1767
+ nullable: () => nullableType,
1768
+ number: () => numberType,
1769
+ object: () => objectType,
1770
+ objectUtil: () => objectUtil,
1771
+ oboolean: () => oboolean,
1772
+ onumber: () => onumber,
1773
+ optional: () => optionalType,
1774
+ ostring: () => ostring,
1775
+ pipeline: () => pipelineType,
1776
+ preprocess: () => preprocessType,
1777
+ promise: () => promiseType,
1778
+ quotelessJson: () => quotelessJson,
1779
+ record: () => recordType,
1780
+ set: () => setType,
1781
+ setErrorMap: () => setErrorMap,
1782
+ strictObject: () => strictObjectType,
1783
+ string: () => stringType,
1784
+ symbol: () => symbolType,
1785
+ transformer: () => effectsType,
1786
+ tuple: () => tupleType,
1787
+ undefined: () => undefinedType,
1788
+ union: () => unionType,
1789
+ unknown: () => unknownType,
1790
+ util: () => util,
1791
+ void: () => voidType
1792
+ });
1793
+
1794
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
1675
1795
  var util;
1676
1796
  (function(util2) {
1677
- util2.assertEqual = (val) => val;
1797
+ util2.assertEqual = (_) => {
1798
+ };
1678
1799
  function assertIs(_arg) {
1679
1800
  }
1680
1801
  util2.assertIs = assertIs;
@@ -1718,7 +1839,7 @@ var util;
1718
1839
  }
1719
1840
  return void 0;
1720
1841
  };
1721
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
1842
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
1722
1843
  function joinValues(array, separator = " | ") {
1723
1844
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
1724
1845
  }
@@ -1770,7 +1891,7 @@ var getParsedType = (data) => {
1770
1891
  case "string":
1771
1892
  return ZodParsedType.string;
1772
1893
  case "number":
1773
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1894
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1774
1895
  case "boolean":
1775
1896
  return ZodParsedType.boolean;
1776
1897
  case "function":
@@ -1803,6 +1924,8 @@ var getParsedType = (data) => {
1803
1924
  return ZodParsedType.unknown;
1804
1925
  }
1805
1926
  };
1927
+
1928
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js
1806
1929
  var ZodIssueCode = util.arrayToEnum([
1807
1930
  "invalid_type",
1808
1931
  "invalid_literal",
@@ -1902,8 +2025,9 @@ var ZodError = class _ZodError extends Error {
1902
2025
  const formErrors = [];
1903
2026
  for (const sub of this.issues) {
1904
2027
  if (sub.path.length > 0) {
1905
- fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1906
- fieldErrors[sub.path[0]].push(mapper(sub));
2028
+ const firstEl = sub.path[0];
2029
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
2030
+ fieldErrors[firstEl].push(mapper(sub));
1907
2031
  } else {
1908
2032
  formErrors.push(mapper(sub));
1909
2033
  }
@@ -1918,6 +2042,8 @@ ZodError.create = (issues) => {
1918
2042
  const error = new ZodError(issues);
1919
2043
  return error;
1920
2044
  };
2045
+
2046
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
1921
2047
  var errorMap = (issue, _ctx) => {
1922
2048
  let message;
1923
2049
  switch (issue.code) {
@@ -1979,6 +2105,8 @@ var errorMap = (issue, _ctx) => {
1979
2105
  message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
1980
2106
  else if (issue.type === "number")
1981
2107
  message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
2108
+ else if (issue.type === "bigint")
2109
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
1982
2110
  else if (issue.type === "date")
1983
2111
  message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
1984
2112
  else
@@ -2016,13 +2144,18 @@ var errorMap = (issue, _ctx) => {
2016
2144
  }
2017
2145
  return { message };
2018
2146
  };
2019
- var overrideErrorMap = errorMap;
2147
+ var en_default = errorMap;
2148
+
2149
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js
2150
+ var overrideErrorMap = en_default;
2020
2151
  function setErrorMap(map) {
2021
2152
  overrideErrorMap = map;
2022
2153
  }
2023
2154
  function getErrorMap() {
2024
2155
  return overrideErrorMap;
2025
2156
  }
2157
+
2158
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
2026
2159
  var makeIssue = (params) => {
2027
2160
  const { data, path, errorMaps, issueData } = params;
2028
2161
  const fullPath = [...path, ...issueData.path || []];
@@ -2062,7 +2195,7 @@ function addIssueToContext(ctx, issueData) {
2062
2195
  // then schema-bound map if available
2063
2196
  overrideMap,
2064
2197
  // then global override map
2065
- overrideMap === errorMap ? void 0 : errorMap
2198
+ overrideMap === en_default ? void 0 : en_default
2066
2199
  // then global default map
2067
2200
  ].filter((x) => !!x)
2068
2201
  });
@@ -2131,29 +2264,15 @@ var isAborted = (x) => x.status === "aborted";
2131
2264
  var isDirty = (x) => x.status === "dirty";
2132
2265
  var isValid = (x) => x.status === "valid";
2133
2266
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
2134
- function __classPrivateFieldGet(receiver, state, kind, f) {
2135
- if (kind === "a" && !f)
2136
- throw new TypeError("Private accessor was defined without a getter");
2137
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2138
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
2139
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2140
- }
2141
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
2142
- if (kind === "m")
2143
- throw new TypeError("Private method is not writable");
2144
- if (kind === "a" && !f)
2145
- throw new TypeError("Private accessor was defined without a setter");
2146
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2147
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
2148
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
2149
- }
2267
+
2268
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
2150
2269
  var errorUtil;
2151
2270
  (function(errorUtil2) {
2152
2271
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
2153
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
2272
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
2154
2273
  })(errorUtil || (errorUtil = {}));
2155
- var _ZodEnum_cache;
2156
- var _ZodNativeEnum_cache;
2274
+
2275
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
2157
2276
  var ParseInputLazyPath = class {
2158
2277
  constructor(parent, value, path, key) {
2159
2278
  this._cachedPath = [];
@@ -2164,7 +2283,7 @@ var ParseInputLazyPath = class {
2164
2283
  }
2165
2284
  get path() {
2166
2285
  if (!this._cachedPath.length) {
2167
- if (this._key instanceof Array) {
2286
+ if (Array.isArray(this._key)) {
2168
2287
  this._cachedPath.push(...this._path, ...this._key);
2169
2288
  } else {
2170
2289
  this._cachedPath.push(...this._path, this._key);
@@ -2202,17 +2321,16 @@ function processCreateParams(params) {
2202
2321
  if (errorMap2)
2203
2322
  return { errorMap: errorMap2, description };
2204
2323
  const customMap = (iss, ctx) => {
2205
- var _a, _b;
2206
2324
  const { message } = params;
2207
2325
  if (iss.code === "invalid_enum_value") {
2208
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
2326
+ return { message: message ?? ctx.defaultError };
2209
2327
  }
2210
2328
  if (typeof ctx.data === "undefined") {
2211
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
2329
+ return { message: message ?? required_error ?? ctx.defaultError };
2212
2330
  }
2213
2331
  if (iss.code !== "invalid_type")
2214
2332
  return { message: ctx.defaultError };
2215
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
2333
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
2216
2334
  };
2217
2335
  return { errorMap: customMap, description };
2218
2336
  }
@@ -2264,14 +2382,13 @@ var ZodType = class {
2264
2382
  throw result.error;
2265
2383
  }
2266
2384
  safeParse(data, params) {
2267
- var _a;
2268
2385
  const ctx = {
2269
2386
  common: {
2270
2387
  issues: [],
2271
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
2272
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
2388
+ async: params?.async ?? false,
2389
+ contextualErrorMap: params?.errorMap
2273
2390
  },
2274
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
2391
+ path: params?.path || [],
2275
2392
  schemaErrorMap: this._def.errorMap,
2276
2393
  parent: null,
2277
2394
  data,
@@ -2281,7 +2398,6 @@ var ZodType = class {
2281
2398
  return handleResult(ctx, result);
2282
2399
  }
2283
2400
  "~validate"(data) {
2284
- var _a, _b;
2285
2401
  const ctx = {
2286
2402
  common: {
2287
2403
  issues: [],
@@ -2302,7 +2418,7 @@ var ZodType = class {
2302
2418
  issues: ctx.common.issues
2303
2419
  };
2304
2420
  } catch (err) {
2305
- if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
2421
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
2306
2422
  this["~standard"].async = true;
2307
2423
  }
2308
2424
  ctx.common = {
@@ -2327,10 +2443,10 @@ var ZodType = class {
2327
2443
  const ctx = {
2328
2444
  common: {
2329
2445
  issues: [],
2330
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
2446
+ contextualErrorMap: params?.errorMap,
2331
2447
  async: true
2332
2448
  },
2333
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
2449
+ path: params?.path || [],
2334
2450
  schemaErrorMap: this._def.errorMap,
2335
2451
  parent: null,
2336
2452
  data,
@@ -2555,16 +2671,20 @@ function isValidJWT(jwt, alg) {
2555
2671
  return false;
2556
2672
  try {
2557
2673
  const [header] = jwt.split(".");
2674
+ if (!header)
2675
+ return false;
2558
2676
  const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
2559
2677
  const decoded = JSON.parse(atob(base64));
2560
2678
  if (typeof decoded !== "object" || decoded === null)
2561
2679
  return false;
2562
- if (!decoded.typ || !decoded.alg)
2680
+ if ("typ" in decoded && decoded?.typ !== "JWT")
2681
+ return false;
2682
+ if (!decoded.alg)
2563
2683
  return false;
2564
2684
  if (alg && decoded.alg !== alg)
2565
2685
  return false;
2566
2686
  return true;
2567
- } catch (_a) {
2687
+ } catch {
2568
2688
  return false;
2569
2689
  }
2570
2690
  }
@@ -2723,7 +2843,7 @@ var ZodString = class _ZodString extends ZodType {
2723
2843
  } else if (check.kind === "url") {
2724
2844
  try {
2725
2845
  new URL(input.data);
2726
- } catch (_a) {
2846
+ } catch {
2727
2847
  ctx = this._getOrReturnCtx(input, ctx);
2728
2848
  addIssueToContext(ctx, {
2729
2849
  validation: "url",
@@ -2935,7 +3055,6 @@ var ZodString = class _ZodString extends ZodType {
2935
3055
  return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
2936
3056
  }
2937
3057
  datetime(options) {
2938
- var _a, _b;
2939
3058
  if (typeof options === "string") {
2940
3059
  return this._addCheck({
2941
3060
  kind: "datetime",
@@ -2947,10 +3066,10 @@ var ZodString = class _ZodString extends ZodType {
2947
3066
  }
2948
3067
  return this._addCheck({
2949
3068
  kind: "datetime",
2950
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2951
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
2952
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
2953
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3069
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
3070
+ offset: options?.offset ?? false,
3071
+ local: options?.local ?? false,
3072
+ ...errorUtil.errToObj(options?.message)
2954
3073
  });
2955
3074
  }
2956
3075
  date(message) {
@@ -2966,8 +3085,8 @@ var ZodString = class _ZodString extends ZodType {
2966
3085
  }
2967
3086
  return this._addCheck({
2968
3087
  kind: "time",
2969
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2970
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3088
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
3089
+ ...errorUtil.errToObj(options?.message)
2971
3090
  });
2972
3091
  }
2973
3092
  duration(message) {
@@ -2984,8 +3103,8 @@ var ZodString = class _ZodString extends ZodType {
2984
3103
  return this._addCheck({
2985
3104
  kind: "includes",
2986
3105
  value,
2987
- position: options === null || options === void 0 ? void 0 : options.position,
2988
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3106
+ position: options?.position,
3107
+ ...errorUtil.errToObj(options?.message)
2989
3108
  });
2990
3109
  }
2991
3110
  startsWith(value, message) {
@@ -3117,11 +3236,10 @@ var ZodString = class _ZodString extends ZodType {
3117
3236
  }
3118
3237
  };
3119
3238
  ZodString.create = (params) => {
3120
- var _a;
3121
3239
  return new ZodString({
3122
3240
  checks: [],
3123
3241
  typeName: ZodFirstPartyTypeKind.ZodString,
3124
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
3242
+ coerce: params?.coerce ?? false,
3125
3243
  ...processCreateParams(params)
3126
3244
  });
3127
3245
  };
@@ -3129,9 +3247,9 @@ function floatSafeRemainder(val, step) {
3129
3247
  const valDecCount = (val.toString().split(".")[1] || "").length;
3130
3248
  const stepDecCount = (step.toString().split(".")[1] || "").length;
3131
3249
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
3132
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
3133
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
3134
- return valInt % stepInt / Math.pow(10, decCount);
3250
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
3251
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
3252
+ return valInt % stepInt / 10 ** decCount;
3135
3253
  }
3136
3254
  var ZodNumber = class _ZodNumber extends ZodType {
3137
3255
  constructor() {
@@ -3341,7 +3459,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
3341
3459
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
3342
3460
  }
3343
3461
  get isFinite() {
3344
- let max = null, min = null;
3462
+ let max = null;
3463
+ let min = null;
3345
3464
  for (const ch of this._def.checks) {
3346
3465
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
3347
3466
  return true;
@@ -3360,7 +3479,7 @@ ZodNumber.create = (params) => {
3360
3479
  return new ZodNumber({
3361
3480
  checks: [],
3362
3481
  typeName: ZodFirstPartyTypeKind.ZodNumber,
3363
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3482
+ coerce: params?.coerce || false,
3364
3483
  ...processCreateParams(params)
3365
3484
  });
3366
3485
  };
@@ -3374,7 +3493,7 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3374
3493
  if (this._def.coerce) {
3375
3494
  try {
3376
3495
  input.data = BigInt(input.data);
3377
- } catch (_a) {
3496
+ } catch {
3378
3497
  return this._getInvalidInput(input);
3379
3498
  }
3380
3499
  }
@@ -3529,11 +3648,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3529
3648
  }
3530
3649
  };
3531
3650
  ZodBigInt.create = (params) => {
3532
- var _a;
3533
3651
  return new ZodBigInt({
3534
3652
  checks: [],
3535
3653
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
3536
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
3654
+ coerce: params?.coerce ?? false,
3537
3655
  ...processCreateParams(params)
3538
3656
  });
3539
3657
  };
@@ -3558,7 +3676,7 @@ var ZodBoolean = class extends ZodType {
3558
3676
  ZodBoolean.create = (params) => {
3559
3677
  return new ZodBoolean({
3560
3678
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
3561
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3679
+ coerce: params?.coerce || false,
3562
3680
  ...processCreateParams(params)
3563
3681
  });
3564
3682
  };
@@ -3577,7 +3695,7 @@ var ZodDate = class _ZodDate extends ZodType {
3577
3695
  });
3578
3696
  return INVALID;
3579
3697
  }
3580
- if (isNaN(input.data.getTime())) {
3698
+ if (Number.isNaN(input.data.getTime())) {
3581
3699
  const ctx2 = this._getOrReturnCtx(input);
3582
3700
  addIssueToContext(ctx2, {
3583
3701
  code: ZodIssueCode.invalid_date
@@ -3666,7 +3784,7 @@ var ZodDate = class _ZodDate extends ZodType {
3666
3784
  ZodDate.create = (params) => {
3667
3785
  return new ZodDate({
3668
3786
  checks: [],
3669
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3787
+ coerce: params?.coerce || false,
3670
3788
  typeName: ZodFirstPartyTypeKind.ZodDate,
3671
3789
  ...processCreateParams(params)
3672
3790
  });
@@ -3941,7 +4059,8 @@ var ZodObject = class _ZodObject extends ZodType {
3941
4059
  return this._cached;
3942
4060
  const shape = this._def.shape();
3943
4061
  const keys = util.objectKeys(shape);
3944
- return this._cached = { shape, keys };
4062
+ this._cached = { shape, keys };
4063
+ return this._cached;
3945
4064
  }
3946
4065
  _parse(input) {
3947
4066
  const parsedType = this._getType(input);
@@ -3991,9 +4110,8 @@ var ZodObject = class _ZodObject extends ZodType {
3991
4110
  });
3992
4111
  status.dirty();
3993
4112
  }
3994
- } else if (unknownKeys === "strip")
3995
- ;
3996
- else {
4113
+ } else if (unknownKeys === "strip") {
4114
+ } else {
3997
4115
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
3998
4116
  }
3999
4117
  } else {
@@ -4040,11 +4158,10 @@ var ZodObject = class _ZodObject extends ZodType {
4040
4158
  unknownKeys: "strict",
4041
4159
  ...message !== void 0 ? {
4042
4160
  errorMap: (issue, ctx) => {
4043
- var _a, _b, _c, _d;
4044
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
4161
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
4045
4162
  if (issue.code === "unrecognized_keys")
4046
4163
  return {
4047
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
4164
+ message: errorUtil.errToObj(message).message ?? defaultError
4048
4165
  };
4049
4166
  return {
4050
4167
  message: defaultError
@@ -4175,11 +4292,11 @@ var ZodObject = class _ZodObject extends ZodType {
4175
4292
  }
4176
4293
  pick(mask) {
4177
4294
  const shape = {};
4178
- util.objectKeys(mask).forEach((key) => {
4295
+ for (const key of util.objectKeys(mask)) {
4179
4296
  if (mask[key] && this.shape[key]) {
4180
4297
  shape[key] = this.shape[key];
4181
4298
  }
4182
- });
4299
+ }
4183
4300
  return new _ZodObject({
4184
4301
  ...this._def,
4185
4302
  shape: () => shape
@@ -4187,11 +4304,11 @@ var ZodObject = class _ZodObject extends ZodType {
4187
4304
  }
4188
4305
  omit(mask) {
4189
4306
  const shape = {};
4190
- util.objectKeys(this.shape).forEach((key) => {
4307
+ for (const key of util.objectKeys(this.shape)) {
4191
4308
  if (!mask[key]) {
4192
4309
  shape[key] = this.shape[key];
4193
4310
  }
4194
- });
4311
+ }
4195
4312
  return new _ZodObject({
4196
4313
  ...this._def,
4197
4314
  shape: () => shape
@@ -4205,14 +4322,14 @@ var ZodObject = class _ZodObject extends ZodType {
4205
4322
  }
4206
4323
  partial(mask) {
4207
4324
  const newShape = {};
4208
- util.objectKeys(this.shape).forEach((key) => {
4325
+ for (const key of util.objectKeys(this.shape)) {
4209
4326
  const fieldSchema = this.shape[key];
4210
4327
  if (mask && !mask[key]) {
4211
4328
  newShape[key] = fieldSchema;
4212
4329
  } else {
4213
4330
  newShape[key] = fieldSchema.optional();
4214
4331
  }
4215
- });
4332
+ }
4216
4333
  return new _ZodObject({
4217
4334
  ...this._def,
4218
4335
  shape: () => newShape
@@ -4220,7 +4337,7 @@ var ZodObject = class _ZodObject extends ZodType {
4220
4337
  }
4221
4338
  required(mask) {
4222
4339
  const newShape = {};
4223
- util.objectKeys(this.shape).forEach((key) => {
4340
+ for (const key of util.objectKeys(this.shape)) {
4224
4341
  if (mask && !mask[key]) {
4225
4342
  newShape[key] = this.shape[key];
4226
4343
  } else {
@@ -4231,7 +4348,7 @@ var ZodObject = class _ZodObject extends ZodType {
4231
4348
  }
4232
4349
  newShape[key] = newField;
4233
4350
  }
4234
- });
4351
+ }
4235
4352
  return new _ZodObject({
4236
4353
  ...this._def,
4237
4354
  shape: () => newShape
@@ -4847,12 +4964,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4847
4964
  return makeIssue({
4848
4965
  data: args,
4849
4966
  path: ctx.path,
4850
- errorMaps: [
4851
- ctx.common.contextualErrorMap,
4852
- ctx.schemaErrorMap,
4853
- getErrorMap(),
4854
- errorMap
4855
- ].filter((x) => !!x),
4967
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4856
4968
  issueData: {
4857
4969
  code: ZodIssueCode.invalid_arguments,
4858
4970
  argumentsError: error
@@ -4863,12 +4975,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4863
4975
  return makeIssue({
4864
4976
  data: returns,
4865
4977
  path: ctx.path,
4866
- errorMaps: [
4867
- ctx.common.contextualErrorMap,
4868
- ctx.schemaErrorMap,
4869
- getErrorMap(),
4870
- errorMap
4871
- ].filter((x) => !!x),
4978
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4872
4979
  issueData: {
4873
4980
  code: ZodIssueCode.invalid_return_type,
4874
4981
  returnTypeError: error
@@ -4992,10 +5099,6 @@ function createZodEnum(values, params) {
4992
5099
  });
4993
5100
  }
4994
5101
  var ZodEnum = class _ZodEnum extends ZodType {
4995
- constructor() {
4996
- super(...arguments);
4997
- _ZodEnum_cache.set(this, void 0);
4998
- }
4999
5102
  _parse(input) {
5000
5103
  if (typeof input.data !== "string") {
5001
5104
  const ctx = this._getOrReturnCtx(input);
@@ -5007,10 +5110,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
5007
5110
  });
5008
5111
  return INVALID;
5009
5112
  }
5010
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
5011
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
5113
+ if (!this._cache) {
5114
+ this._cache = new Set(this._def.values);
5012
5115
  }
5013
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
5116
+ if (!this._cache.has(input.data)) {
5014
5117
  const ctx = this._getOrReturnCtx(input);
5015
5118
  const expectedValues = this._def.values;
5016
5119
  addIssueToContext(ctx, {
@@ -5059,13 +5162,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
5059
5162
  });
5060
5163
  }
5061
5164
  };
5062
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
5063
5165
  ZodEnum.create = createZodEnum;
5064
5166
  var ZodNativeEnum = class extends ZodType {
5065
- constructor() {
5066
- super(...arguments);
5067
- _ZodNativeEnum_cache.set(this, void 0);
5068
- }
5069
5167
  _parse(input) {
5070
5168
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
5071
5169
  const ctx = this._getOrReturnCtx(input);
@@ -5078,10 +5176,10 @@ var ZodNativeEnum = class extends ZodType {
5078
5176
  });
5079
5177
  return INVALID;
5080
5178
  }
5081
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
5082
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
5179
+ if (!this._cache) {
5180
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
5083
5181
  }
5084
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
5182
+ if (!this._cache.has(input.data)) {
5085
5183
  const expectedValues = util.objectValues(nativeEnumValues);
5086
5184
  addIssueToContext(ctx, {
5087
5185
  received: ctx.data,
@@ -5096,7 +5194,6 @@ var ZodNativeEnum = class extends ZodType {
5096
5194
  return this._def.values;
5097
5195
  }
5098
5196
  };
5099
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
5100
5197
  ZodNativeEnum.create = (values, params) => {
5101
5198
  return new ZodNativeEnum({
5102
5199
  values,
@@ -5237,7 +5334,7 @@ var ZodEffects = class extends ZodType {
5237
5334
  parent: ctx
5238
5335
  });
5239
5336
  if (!isValid(base))
5240
- return base;
5337
+ return INVALID;
5241
5338
  const result = effect.transform(base.value, checkCtx);
5242
5339
  if (result instanceof Promise) {
5243
5340
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -5246,8 +5343,11 @@ var ZodEffects = class extends ZodType {
5246
5343
  } else {
5247
5344
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
5248
5345
  if (!isValid(base))
5249
- return base;
5250
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
5346
+ return INVALID;
5347
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
5348
+ status: status.value,
5349
+ value: result
5350
+ }));
5251
5351
  });
5252
5352
  }
5253
5353
  }
@@ -5507,21 +5607,19 @@ function cleanParams(params, data) {
5507
5607
  function custom(check, _params = {}, fatal) {
5508
5608
  if (check)
5509
5609
  return ZodAny.create().superRefine((data, ctx) => {
5510
- var _a, _b;
5511
5610
  const r = check(data);
5512
5611
  if (r instanceof Promise) {
5513
5612
  return r.then((r2) => {
5514
- var _a2, _b2;
5515
5613
  if (!r2) {
5516
5614
  const params = cleanParams(_params, data);
5517
- const _fatal = (_b2 = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
5615
+ const _fatal = params.fatal ?? fatal ?? true;
5518
5616
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5519
5617
  }
5520
5618
  });
5521
5619
  }
5522
5620
  if (!r) {
5523
5621
  const params = cleanParams(_params, data);
5524
- const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
5622
+ const _fatal = params.fatal ?? fatal ?? true;
5525
5623
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5526
5624
  }
5527
5625
  return;
@@ -5621,122 +5719,6 @@ var coerce = {
5621
5719
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
5622
5720
  };
5623
5721
  var NEVER = INVALID;
5624
- var z = /* @__PURE__ */ Object.freeze({
5625
- __proto__: null,
5626
- defaultErrorMap: errorMap,
5627
- setErrorMap,
5628
- getErrorMap,
5629
- makeIssue,
5630
- EMPTY_PATH,
5631
- addIssueToContext,
5632
- ParseStatus,
5633
- INVALID,
5634
- DIRTY,
5635
- OK,
5636
- isAborted,
5637
- isDirty,
5638
- isValid,
5639
- isAsync,
5640
- get util() {
5641
- return util;
5642
- },
5643
- get objectUtil() {
5644
- return objectUtil;
5645
- },
5646
- ZodParsedType,
5647
- getParsedType,
5648
- ZodType,
5649
- datetimeRegex,
5650
- ZodString,
5651
- ZodNumber,
5652
- ZodBigInt,
5653
- ZodBoolean,
5654
- ZodDate,
5655
- ZodSymbol,
5656
- ZodUndefined,
5657
- ZodNull,
5658
- ZodAny,
5659
- ZodUnknown,
5660
- ZodNever,
5661
- ZodVoid,
5662
- ZodArray,
5663
- ZodObject,
5664
- ZodUnion,
5665
- ZodDiscriminatedUnion,
5666
- ZodIntersection,
5667
- ZodTuple,
5668
- ZodRecord,
5669
- ZodMap,
5670
- ZodSet,
5671
- ZodFunction,
5672
- ZodLazy,
5673
- ZodLiteral,
5674
- ZodEnum,
5675
- ZodNativeEnum,
5676
- ZodPromise,
5677
- ZodEffects,
5678
- ZodTransformer: ZodEffects,
5679
- ZodOptional,
5680
- ZodNullable,
5681
- ZodDefault,
5682
- ZodCatch,
5683
- ZodNaN,
5684
- BRAND,
5685
- ZodBranded,
5686
- ZodPipeline,
5687
- ZodReadonly,
5688
- custom,
5689
- Schema: ZodType,
5690
- ZodSchema: ZodType,
5691
- late,
5692
- get ZodFirstPartyTypeKind() {
5693
- return ZodFirstPartyTypeKind;
5694
- },
5695
- coerce,
5696
- any: anyType,
5697
- array: arrayType,
5698
- bigint: bigIntType,
5699
- boolean: booleanType,
5700
- date: dateType,
5701
- discriminatedUnion: discriminatedUnionType,
5702
- effect: effectsType,
5703
- "enum": enumType,
5704
- "function": functionType,
5705
- "instanceof": instanceOfType,
5706
- intersection: intersectionType,
5707
- lazy: lazyType,
5708
- literal: literalType,
5709
- map: mapType,
5710
- nan: nanType,
5711
- nativeEnum: nativeEnumType,
5712
- never: neverType,
5713
- "null": nullType,
5714
- nullable: nullableType,
5715
- number: numberType,
5716
- object: objectType,
5717
- oboolean,
5718
- onumber,
5719
- optional: optionalType,
5720
- ostring,
5721
- pipeline: pipelineType,
5722
- preprocess: preprocessType,
5723
- promise: promiseType,
5724
- record: recordType,
5725
- set: setType,
5726
- strictObject: strictObjectType,
5727
- string: stringType,
5728
- symbol: symbolType,
5729
- transformer: effectsType,
5730
- tuple: tupleType,
5731
- "undefined": undefinedType,
5732
- union: unionType,
5733
- unknown: unknownType,
5734
- "void": voidType,
5735
- NEVER,
5736
- ZodIssueCode,
5737
- quotelessJson,
5738
- ZodError
5739
- });
5740
5722
 
5741
5723
  // ../../core/models/book.ts
5742
5724
  var BookDesignRequest = class {
@@ -5761,29 +5743,29 @@ var BookDesignRequest = class {
5761
5743
  this.text_sticker_level = props.text_sticker_level;
5762
5744
  }
5763
5745
  };
5764
- var bookDesignRequestSchema = z.object({
5765
- occasion: z.enum(occasions),
5766
- style: z.string(),
5767
- book_size: z.enum(bookSizes),
5768
- cover_type: z.enum(coverTypes),
5769
- page_type: z.enum(pageTypes),
5770
- image_density: z.enum(imageDensities),
5771
- image_filtering_level: z.enum(imageFilteringLevels),
5772
- embellishment_level: z.enum(embellishmentLevels),
5773
- text_sticker_level: z.enum(textStickerLevels)
5746
+ var bookDesignRequestSchema = external_exports.object({
5747
+ occasion: external_exports.enum(occasions),
5748
+ style: external_exports.string(),
5749
+ book_size: external_exports.enum(bookSizes),
5750
+ cover_type: external_exports.enum(coverTypes),
5751
+ page_type: external_exports.enum(pageTypes),
5752
+ image_density: external_exports.enum(imageDensities),
5753
+ image_filtering_level: external_exports.enum(imageFilteringLevels),
5754
+ embellishment_level: external_exports.enum(embellishmentLevels),
5755
+ text_sticker_level: external_exports.enum(textStickerLevels)
5774
5756
  });
5775
- var bookPropsSchema = z.object({
5776
- id: z.string().optional(),
5777
- title: z.string(),
5778
- subtitle: z.string().optional(),
5757
+ var bookPropsSchema = external_exports.object({
5758
+ id: external_exports.string().optional(),
5759
+ title: external_exports.string(),
5760
+ subtitle: external_exports.string().optional(),
5779
5761
  design_request: bookDesignRequestSchema,
5780
- sku: z.string().optional(),
5781
- state: z.enum(states).optional(),
5782
- guid: z.string().optional(),
5783
- cancelled_at: z.string().optional(),
5784
- mb_client_timeout: z.number().optional(),
5785
- user_id: z.string().optional(),
5786
- revision: z.number().optional()
5762
+ sku: external_exports.string().optional(),
5763
+ state: external_exports.enum(states).optional(),
5764
+ guid: external_exports.string().optional(),
5765
+ cancelled_at: external_exports.string().optional(),
5766
+ mb_client_timeout: external_exports.number().optional(),
5767
+ user_id: external_exports.string().optional(),
5768
+ revision: external_exports.number().optional()
5787
5769
  });
5788
5770
  var Book = class {
5789
5771
  id;
@@ -5864,18 +5846,18 @@ var Images = class {
5864
5846
  }
5865
5847
  }
5866
5848
  };
5867
- var imageServerSchema = z.object({
5868
- id: z.string().optional(),
5869
- handle: z.string(),
5870
- url: z.string(),
5871
- width: z.number(),
5872
- height: z.number(),
5873
- orientation: z.number(),
5874
- taken_at: z.string(),
5875
- camera_make: z.string().optional(),
5876
- camera: z.string().optional(),
5877
- filename: z.string(),
5878
- metadata: z.record(z.unknown()).optional()
5849
+ var imageServerSchema = external_exports.object({
5850
+ id: external_exports.string().optional(),
5851
+ handle: external_exports.string(),
5852
+ url: external_exports.string(),
5853
+ width: external_exports.number(),
5854
+ height: external_exports.number(),
5855
+ orientation: external_exports.number(),
5856
+ taken_at: external_exports.string(),
5857
+ camera_make: external_exports.string().optional(),
5858
+ camera: external_exports.string().optional(),
5859
+ filename: external_exports.string(),
5860
+ metadata: external_exports.record(external_exports.unknown()).optional()
5879
5861
  });
5880
5862
  var ImageServer = class {
5881
5863
  id;
@@ -5920,34 +5902,34 @@ function imageServerToImage(imageServer) {
5920
5902
  }
5921
5903
 
5922
5904
  // ../../core/models/design-request/design-options.ts
5923
- var imageDensityOptionSchema = z.object({
5924
- maxPageCount: z.number(),
5925
- minPageCount: z.number(),
5926
- maxImageCount: z.number(),
5927
- avgImageCount: z.number(),
5928
- minImageCount: z.number()
5905
+ var imageDensityOptionSchema = external_exports.object({
5906
+ maxPageCount: external_exports.number(),
5907
+ minPageCount: external_exports.number(),
5908
+ maxImageCount: external_exports.number(),
5909
+ avgImageCount: external_exports.number(),
5910
+ minImageCount: external_exports.number()
5929
5911
  });
5930
- var imageDensityOptionsSchema = z.object({
5912
+ var imageDensityOptionsSchema = external_exports.object({
5931
5913
  high: imageDensityOptionSchema,
5932
5914
  medium: imageDensityOptionSchema,
5933
5915
  low: imageDensityOptionSchema
5934
5916
  });
5935
- var designOptionsSchema = z.object({
5917
+ var designOptionsSchema = external_exports.object({
5936
5918
  densities: imageDensityOptionsSchema
5937
5919
  });
5938
- var imageDensityOptionServerSchema = z.object({
5939
- max_page_count: z.number(),
5940
- min_page_count: z.number(),
5941
- max_image_count: z.number(),
5942
- avg_image_count: z.number(),
5943
- min_image_count: z.number()
5920
+ var imageDensityOptionServerSchema = external_exports.object({
5921
+ max_page_count: external_exports.number(),
5922
+ min_page_count: external_exports.number(),
5923
+ max_image_count: external_exports.number(),
5924
+ avg_image_count: external_exports.number(),
5925
+ min_image_count: external_exports.number()
5944
5926
  });
5945
- var imageDensityOptionsServerSchema = z.object({
5927
+ var imageDensityOptionsServerSchema = external_exports.object({
5946
5928
  high: imageDensityOptionServerSchema,
5947
5929
  medium: imageDensityOptionServerSchema,
5948
5930
  low: imageDensityOptionServerSchema
5949
5931
  });
5950
- var designOptionsServerSchema = z.object({
5932
+ var designOptionsServerSchema = external_exports.object({
5951
5933
  densities: imageDensityOptionsServerSchema
5952
5934
  });
5953
5935
 
@@ -6245,9 +6227,9 @@ var DesignOptionsEndpoints = class {
6245
6227
  };
6246
6228
 
6247
6229
  // ../../core/models/event.ts
6248
- var eventContextSchema = z.record(z.string(), z.unknown()).optional();
6249
- var eventSchema = z.object({
6250
- name: z.string(),
6230
+ var eventContextSchema = external_exports.record(external_exports.string(), external_exports.unknown()).optional();
6231
+ var eventSchema = external_exports.object({
6232
+ name: external_exports.string(),
6251
6233
  context: eventContextSchema
6252
6234
  });
6253
6235
 
@@ -6337,7 +6319,7 @@ var ImagesEndpoints = class {
6337
6319
  const res = await this.engineAPI.fetcher.call({
6338
6320
  path: `/v1/images/book/${bookId}`
6339
6321
  });
6340
- return z.array(imageServerSchema).parse(res);
6322
+ return external_exports.array(imageServerSchema).parse(res);
6341
6323
  });
6342
6324
  }
6343
6325
  retrieve(imageId, bookId) {
@@ -6385,119 +6367,119 @@ var ImagesEndpoints = class {
6385
6367
  };
6386
6368
 
6387
6369
  // ../../core/models/spread.ts
6388
- var spreadServerSchema = z.object({
6389
- id: z.string(),
6390
- book_id: z.string(),
6391
- state: z.string(),
6392
- spread_type: z.string(),
6393
- width: z.number(),
6394
- height: z.number(),
6395
- sequence: z.number(),
6396
- wells: z.array(z.unknown()),
6397
- background: z.unknown(),
6398
- laid_out_at: z.string().nullable(),
6399
- embellished_at: z.string().nullable(),
6400
- polished_at: z.string().nullable(),
6401
- metadata: z.unknown(),
6402
- url: z.string().nullable().optional()
6370
+ var spreadServerSchema = external_exports.object({
6371
+ id: external_exports.string(),
6372
+ book_id: external_exports.string(),
6373
+ state: external_exports.string(),
6374
+ spread_type: external_exports.string(),
6375
+ width: external_exports.number(),
6376
+ height: external_exports.number(),
6377
+ sequence: external_exports.number(),
6378
+ wells: external_exports.array(external_exports.unknown()),
6379
+ background: external_exports.unknown(),
6380
+ laid_out_at: external_exports.string().nullable(),
6381
+ embellished_at: external_exports.string().nullable(),
6382
+ polished_at: external_exports.string().nullable(),
6383
+ metadata: external_exports.unknown(),
6384
+ url: external_exports.string().nullable().optional()
6403
6385
  });
6404
- var spreadSchema = z.object({
6405
- id: z.string(),
6406
- bookId: z.string(),
6407
- state: z.string(),
6408
- spreadType: z.string(),
6409
- width: z.number(),
6410
- height: z.number(),
6411
- sequence: z.number(),
6412
- wells: z.array(z.unknown()),
6413
- background: z.unknown(),
6414
- laidOutAt: z.string().nullable(),
6415
- embellishedAt: z.string().nullable(),
6416
- polishedAt: z.string().nullable(),
6417
- metadata: z.unknown(),
6418
- url: z.string().nullable().optional()
6386
+ var spreadSchema = external_exports.object({
6387
+ id: external_exports.string(),
6388
+ bookId: external_exports.string(),
6389
+ state: external_exports.string(),
6390
+ spreadType: external_exports.string(),
6391
+ width: external_exports.number(),
6392
+ height: external_exports.number(),
6393
+ sequence: external_exports.number(),
6394
+ wells: external_exports.array(external_exports.unknown()),
6395
+ background: external_exports.unknown(),
6396
+ laidOutAt: external_exports.string().nullable(),
6397
+ embellishedAt: external_exports.string().nullable(),
6398
+ polishedAt: external_exports.string().nullable(),
6399
+ metadata: external_exports.unknown(),
6400
+ url: external_exports.string().nullable().optional()
6419
6401
  });
6420
6402
 
6421
6403
  // ../../core/models/galleon.ts
6422
- var imageAssignmentSchema = z.object({
6423
- photoRefId: z.string(),
6424
- finalCrop: z.array(z.number())
6404
+ var imageAssignmentSchema = external_exports.object({
6405
+ photoRefId: external_exports.string(),
6406
+ finalCrop: external_exports.array(external_exports.number())
6425
6407
  });
6426
- var positionSchema = z.object({
6427
- x: z.number(),
6428
- y: z.number(),
6429
- width: z.number().optional(),
6430
- height: z.number().optional(),
6431
- rotation: z.number()
6408
+ var positionSchema = external_exports.object({
6409
+ x: external_exports.number(),
6410
+ y: external_exports.number(),
6411
+ width: external_exports.number().optional(),
6412
+ height: external_exports.number().optional(),
6413
+ rotation: external_exports.number()
6432
6414
  });
6433
- var photoMetadataSchema = z.object({
6434
- id: z.string(),
6435
- llx: z.number(),
6436
- lly: z.number(),
6437
- urx: z.number(),
6438
- ury: z.number(),
6439
- data: z.string().nullable(),
6440
- title: z.string(),
6441
- width: z.number(),
6442
- effect: z.string(),
6443
- height: z.number(),
6444
- source: z.string(),
6445
- rotation: z.number(),
6446
- uploadTime: z.string()
6415
+ var photoMetadataSchema = external_exports.object({
6416
+ id: external_exports.string(),
6417
+ llx: external_exports.number(),
6418
+ lly: external_exports.number(),
6419
+ urx: external_exports.number(),
6420
+ ury: external_exports.number(),
6421
+ data: external_exports.string().nullable(),
6422
+ title: external_exports.string(),
6423
+ width: external_exports.number(),
6424
+ effect: external_exports.string(),
6425
+ height: external_exports.number(),
6426
+ source: external_exports.string(),
6427
+ rotation: external_exports.number(),
6428
+ uploadTime: external_exports.string()
6447
6429
  });
6448
- var propertySchema = z.object({
6449
- key: z.string(),
6450
- value: z.any()
6430
+ var propertySchema = external_exports.object({
6431
+ key: external_exports.string(),
6432
+ value: external_exports.any()
6451
6433
  });
6452
- var assetSchema = z.object({
6453
- type: z.string(),
6434
+ var assetSchema = external_exports.object({
6435
+ type: external_exports.string(),
6454
6436
  imageAssignment: imageAssignmentSchema.optional(),
6455
6437
  position: positionSchema,
6456
- seqNum: z.number(),
6457
- z: z.number(),
6458
- id: z.string().optional(),
6459
- horizJustification: z.string().optional(),
6460
- vertJustification: z.string().optional().nullable(),
6461
- text: z.string().optional(),
6462
- fontId: z.string().optional(),
6463
- fontSize: z.number().optional(),
6464
- fontColor: z.string().optional(),
6465
- frame: z.string().optional()
6438
+ seqNum: external_exports.number(),
6439
+ z: external_exports.number(),
6440
+ id: external_exports.string().optional(),
6441
+ horizJustification: external_exports.string().optional(),
6442
+ vertJustification: external_exports.string().optional().nullable(),
6443
+ text: external_exports.string().optional(),
6444
+ fontId: external_exports.string().optional(),
6445
+ fontSize: external_exports.number().optional(),
6446
+ fontColor: external_exports.string().optional(),
6447
+ frame: external_exports.string().optional()
6466
6448
  });
6467
- var photoStripSchema = z.object({
6468
- url: z.string(),
6469
- encryptId: z.string(),
6470
- photoRefId: z.string(),
6471
- photoId: z.string(),
6449
+ var photoStripSchema = external_exports.object({
6450
+ url: external_exports.string(),
6451
+ encryptId: external_exports.string(),
6452
+ photoRefId: external_exports.string(),
6453
+ photoId: external_exports.string(),
6472
6454
  photoMetadata: photoMetadataSchema
6473
6455
  });
6474
- var reportingDataSchema = z.object({
6475
- properties: z.array(propertySchema)
6456
+ var reportingDataSchema = external_exports.object({
6457
+ properties: external_exports.array(propertySchema)
6476
6458
  });
6477
- var sflyCanvasSchema = z.object({
6478
- backgroundId: z.string().nullable(),
6479
- assets: z.array(assetSchema).optional()
6459
+ var sflyCanvasSchema = external_exports.object({
6460
+ backgroundId: external_exports.string().nullable(),
6461
+ assets: external_exports.array(assetSchema).optional()
6480
6462
  });
6481
- var snapCanvasSchema = z.object({
6482
- surfaceNumber: z.number(),
6483
- surfaceData: z.record(z.any()),
6484
- version: z.string()
6463
+ var snapCanvasSchema = external_exports.object({
6464
+ surfaceNumber: external_exports.number(),
6465
+ surfaceData: external_exports.record(external_exports.any()),
6466
+ version: external_exports.string()
6485
6467
  });
6486
- var pageSchema = z.object({
6487
- pageNum: z.number(),
6488
- type: z.string(),
6468
+ var pageSchema = external_exports.object({
6469
+ pageNum: external_exports.number(),
6470
+ type: external_exports.string(),
6489
6471
  canvas: sflyCanvasSchema
6490
6472
  });
6491
- var magicShopBookSchema = z.object({
6492
- pages: z.array(pageSchema),
6493
- photoStrip: z.array(photoStripSchema)
6473
+ var magicShopBookSchema = external_exports.object({
6474
+ pages: external_exports.array(pageSchema),
6475
+ photoStrip: external_exports.array(photoStripSchema)
6494
6476
  });
6495
- var bookCreationRequestSchema = z.object({
6496
- title: z.string(),
6497
- binding: z.string(),
6498
- coverSpecId: z.string(),
6499
- styleId: z.number(),
6500
- userId: z.string(),
6477
+ var bookCreationRequestSchema = external_exports.object({
6478
+ title: external_exports.string(),
6479
+ binding: external_exports.string(),
6480
+ coverSpecId: external_exports.string(),
6481
+ styleId: external_exports.number(),
6482
+ userId: external_exports.string(),
6501
6483
  magicShopBook: magicShopBookSchema,
6502
6484
  reportingData: reportingDataSchema
6503
6485
  });
@@ -6514,7 +6496,7 @@ var SpreadsEndpoints = class {
6514
6496
  const res = await this.engineAPI.fetcher.call({
6515
6497
  path: `/v1/spreads/book/${bookId}`
6516
6498
  });
6517
- return z.array(spreadServerSchema).parse(res);
6499
+ return external_exports.array(spreadServerSchema).parse(res);
6518
6500
  });
6519
6501
  }
6520
6502
  create(bookId, spread) {
@@ -6580,98 +6562,98 @@ var SpreadsEndpoints = class {
6580
6562
  })
6581
6563
  }
6582
6564
  });
6583
- return z.array(surfaceCategoryName ? snapCanvasSchema : sflyCanvasSchema).parse(res);
6565
+ return external_exports.array(surfaceCategoryName ? snapCanvasSchema : sflyCanvasSchema).parse(res);
6584
6566
  });
6585
6567
  }
6586
6568
  };
6587
6569
 
6588
6570
  // ../../core/models/storyboard-item.ts
6589
- var StoryboardItemImageFaceServerSchema = z.object({
6590
- score: z.number(),
6591
- bounding_box: z.object({
6592
- x: z.number(),
6593
- y: z.number(),
6594
- width: z.number(),
6595
- height: z.number()
6571
+ var StoryboardItemImageFaceServerSchema = external_exports.object({
6572
+ score: external_exports.number(),
6573
+ bounding_box: external_exports.object({
6574
+ x: external_exports.number(),
6575
+ y: external_exports.number(),
6576
+ width: external_exports.number(),
6577
+ height: external_exports.number()
6596
6578
  }),
6597
- size: z.number(),
6598
- eyes_open_score: z.number(),
6599
- smile_score: z.number(),
6600
- facing_camera_score: z.number()
6579
+ size: external_exports.number(),
6580
+ eyes_open_score: external_exports.number(),
6581
+ smile_score: external_exports.number(),
6582
+ facing_camera_score: external_exports.number()
6601
6583
  });
6602
- var StoryboardItemImageFaceSchema = z.object({
6603
- score: z.number(),
6604
- boundingBox: z.object({
6605
- x: z.number(),
6606
- y: z.number(),
6607
- width: z.number(),
6608
- height: z.number()
6584
+ var StoryboardItemImageFaceSchema = external_exports.object({
6585
+ score: external_exports.number(),
6586
+ boundingBox: external_exports.object({
6587
+ x: external_exports.number(),
6588
+ y: external_exports.number(),
6589
+ width: external_exports.number(),
6590
+ height: external_exports.number()
6609
6591
  }),
6610
- size: z.number(),
6611
- eyesOpenScore: z.number(),
6612
- smileScore: z.number(),
6613
- facingCameraScore: z.number()
6592
+ size: external_exports.number(),
6593
+ eyesOpenScore: external_exports.number(),
6594
+ smileScore: external_exports.number(),
6595
+ facingCameraScore: external_exports.number()
6614
6596
  });
6615
- var StoryboardItemImageServerSchema = z.object({
6616
- id: z.string(),
6617
- url: z.string(),
6618
- category: z.string(),
6619
- aesthetic_score: z.number(),
6620
- faces: z.array(StoryboardItemImageFaceServerSchema),
6621
- roi: z.object({
6622
- x: z.number(),
6623
- y: z.number(),
6624
- width: z.number(),
6625
- height: z.number()
6597
+ var StoryboardItemImageServerSchema = external_exports.object({
6598
+ id: external_exports.string(),
6599
+ url: external_exports.string(),
6600
+ category: external_exports.string(),
6601
+ aesthetic_score: external_exports.number(),
6602
+ faces: external_exports.array(StoryboardItemImageFaceServerSchema),
6603
+ roi: external_exports.object({
6604
+ x: external_exports.number(),
6605
+ y: external_exports.number(),
6606
+ width: external_exports.number(),
6607
+ height: external_exports.number()
6626
6608
  }),
6627
- taken_at: z.number(),
6628
- width: z.number(),
6629
- height: z.number()
6609
+ taken_at: external_exports.number(),
6610
+ width: external_exports.number(),
6611
+ height: external_exports.number()
6630
6612
  });
6631
- var StoryboardItemImageSchema = z.object({
6632
- id: z.string(),
6633
- url: z.string(),
6634
- category: z.string(),
6635
- aestheticScore: z.number(),
6636
- faces: z.array(StoryboardItemImageFaceSchema),
6637
- roi: z.object({
6638
- x: z.number(),
6639
- y: z.number(),
6640
- width: z.number(),
6641
- height: z.number()
6613
+ var StoryboardItemImageSchema = external_exports.object({
6614
+ id: external_exports.string(),
6615
+ url: external_exports.string(),
6616
+ category: external_exports.string(),
6617
+ aestheticScore: external_exports.number(),
6618
+ faces: external_exports.array(StoryboardItemImageFaceSchema),
6619
+ roi: external_exports.object({
6620
+ x: external_exports.number(),
6621
+ y: external_exports.number(),
6622
+ width: external_exports.number(),
6623
+ height: external_exports.number()
6642
6624
  }),
6643
- takenAt: z.number(),
6644
- width: z.number(),
6645
- height: z.number()
6625
+ takenAt: external_exports.number(),
6626
+ width: external_exports.number(),
6627
+ height: external_exports.number()
6646
6628
  });
6647
- var StoryboardItemServerSchema = z.object({
6648
- id: z.string(),
6649
- sequence: z.number(),
6650
- book_id: z.string(),
6651
- similarity: z.number(),
6652
- duplicate: z.boolean(),
6653
- selected: z.boolean(),
6654
- surface_weight: z.number(),
6655
- front_cover: z.boolean().optional(),
6656
- back_cover: z.boolean().optional(),
6657
- scene: z.number(),
6658
- subscene: z.number(),
6659
- spine_break: z.boolean().optional(),
6629
+ var StoryboardItemServerSchema = external_exports.object({
6630
+ id: external_exports.string(),
6631
+ sequence: external_exports.number(),
6632
+ book_id: external_exports.string(),
6633
+ similarity: external_exports.number(),
6634
+ duplicate: external_exports.boolean(),
6635
+ selected: external_exports.boolean(),
6636
+ surface_weight: external_exports.number(),
6637
+ front_cover: external_exports.boolean().optional(),
6638
+ back_cover: external_exports.boolean().optional(),
6639
+ scene: external_exports.number(),
6640
+ subscene: external_exports.number(),
6641
+ spine_break: external_exports.boolean().optional(),
6660
6642
  image: StoryboardItemImageServerSchema
6661
6643
  });
6662
- var StoryboardItemSchema = z.object({
6663
- id: z.string(),
6664
- sequence: z.number(),
6665
- bookId: z.string(),
6666
- similarity: z.number(),
6667
- duplicate: z.boolean(),
6668
- selected: z.boolean(),
6669
- surfaceWeight: z.number(),
6670
- frontCover: z.boolean().optional(),
6671
- backCover: z.boolean().optional(),
6672
- scene: z.number(),
6673
- subscene: z.number(),
6674
- spineBreak: z.boolean().optional(),
6644
+ var StoryboardItemSchema = external_exports.object({
6645
+ id: external_exports.string(),
6646
+ sequence: external_exports.number(),
6647
+ bookId: external_exports.string(),
6648
+ similarity: external_exports.number(),
6649
+ duplicate: external_exports.boolean(),
6650
+ selected: external_exports.boolean(),
6651
+ surfaceWeight: external_exports.number(),
6652
+ frontCover: external_exports.boolean().optional(),
6653
+ backCover: external_exports.boolean().optional(),
6654
+ scene: external_exports.number(),
6655
+ subscene: external_exports.number(),
6656
+ spineBreak: external_exports.boolean().optional(),
6675
6657
  image: StoryboardItemImageSchema
6676
6658
  });
6677
6659
 
@@ -6687,7 +6669,7 @@ var StoryboardItemsEndpoints = class {
6687
6669
  const res = await this.engineAPI.fetcher.call({
6688
6670
  path: `/v1/storyboarditems/book/${bookId}`
6689
6671
  });
6690
- return z.array(StoryboardItemServerSchema).parse(res);
6672
+ return external_exports.array(StoryboardItemServerSchema).parse(res);
6691
6673
  });
6692
6674
  }
6693
6675
  };