@magiclabs.ai/magicbook-client 0.7.29 → 0.7.30

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.js CHANGED
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // ../../core/data/design-request.ts
2
8
  var states = [
3
9
  "new",
@@ -219,6 +225,12 @@ var styles = {
219
225
  6166: { slug: "disney-mickey-and-friends-sfly" },
220
226
  6169: { slug: "through-the-years-sfly" },
221
227
  6172: { slug: "modern-editorial-moments-sfly" },
228
+ 6173: { slug: "disneys-happily-ever-after-sfly" },
229
+ 6176: { slug: "disney-mickey-and-friends-christmas-sfly" },
230
+ 6177: { slug: "timeless-love-story-sfly" },
231
+ 6178: { slug: "tiny-moments-sfly" },
232
+ 6179: { slug: "travel-archives-sfly" },
233
+ 6180: { slug: "illustrated-with-love-sfly" },
222
234
  //snapfish styles
223
235
  be5f79d7525f4717844db77a2f1b5e50: { slug: "abstract-baby-first-year-snap" },
224
236
  "519bf5f2b6734103a9a359469be4961b": { slug: "album-snap" },
@@ -1597,10 +1609,123 @@ function getStyleIdBySlug(slug) {
1597
1609
  return slug;
1598
1610
  }
1599
1611
 
1600
- // ../../node_modules/.pnpm/zod@3.24.4/node_modules/zod/lib/index.mjs
1612
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
1613
+ var external_exports = {};
1614
+ __export(external_exports, {
1615
+ BRAND: () => BRAND,
1616
+ DIRTY: () => DIRTY,
1617
+ EMPTY_PATH: () => EMPTY_PATH,
1618
+ INVALID: () => INVALID,
1619
+ NEVER: () => NEVER,
1620
+ OK: () => OK,
1621
+ ParseStatus: () => ParseStatus,
1622
+ Schema: () => ZodType,
1623
+ ZodAny: () => ZodAny,
1624
+ ZodArray: () => ZodArray,
1625
+ ZodBigInt: () => ZodBigInt,
1626
+ ZodBoolean: () => ZodBoolean,
1627
+ ZodBranded: () => ZodBranded,
1628
+ ZodCatch: () => ZodCatch,
1629
+ ZodDate: () => ZodDate,
1630
+ ZodDefault: () => ZodDefault,
1631
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
1632
+ ZodEffects: () => ZodEffects,
1633
+ ZodEnum: () => ZodEnum,
1634
+ ZodError: () => ZodError,
1635
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
1636
+ ZodFunction: () => ZodFunction,
1637
+ ZodIntersection: () => ZodIntersection,
1638
+ ZodIssueCode: () => ZodIssueCode,
1639
+ ZodLazy: () => ZodLazy,
1640
+ ZodLiteral: () => ZodLiteral,
1641
+ ZodMap: () => ZodMap,
1642
+ ZodNaN: () => ZodNaN,
1643
+ ZodNativeEnum: () => ZodNativeEnum,
1644
+ ZodNever: () => ZodNever,
1645
+ ZodNull: () => ZodNull,
1646
+ ZodNullable: () => ZodNullable,
1647
+ ZodNumber: () => ZodNumber,
1648
+ ZodObject: () => ZodObject,
1649
+ ZodOptional: () => ZodOptional,
1650
+ ZodParsedType: () => ZodParsedType,
1651
+ ZodPipeline: () => ZodPipeline,
1652
+ ZodPromise: () => ZodPromise,
1653
+ ZodReadonly: () => ZodReadonly,
1654
+ ZodRecord: () => ZodRecord,
1655
+ ZodSchema: () => ZodType,
1656
+ ZodSet: () => ZodSet,
1657
+ ZodString: () => ZodString,
1658
+ ZodSymbol: () => ZodSymbol,
1659
+ ZodTransformer: () => ZodEffects,
1660
+ ZodTuple: () => ZodTuple,
1661
+ ZodType: () => ZodType,
1662
+ ZodUndefined: () => ZodUndefined,
1663
+ ZodUnion: () => ZodUnion,
1664
+ ZodUnknown: () => ZodUnknown,
1665
+ ZodVoid: () => ZodVoid,
1666
+ addIssueToContext: () => addIssueToContext,
1667
+ any: () => anyType,
1668
+ array: () => arrayType,
1669
+ bigint: () => bigIntType,
1670
+ boolean: () => booleanType,
1671
+ coerce: () => coerce,
1672
+ custom: () => custom,
1673
+ date: () => dateType,
1674
+ datetimeRegex: () => datetimeRegex,
1675
+ defaultErrorMap: () => en_default,
1676
+ discriminatedUnion: () => discriminatedUnionType,
1677
+ effect: () => effectsType,
1678
+ enum: () => enumType,
1679
+ function: () => functionType,
1680
+ getErrorMap: () => getErrorMap,
1681
+ getParsedType: () => getParsedType,
1682
+ instanceof: () => instanceOfType,
1683
+ intersection: () => intersectionType,
1684
+ isAborted: () => isAborted,
1685
+ isAsync: () => isAsync,
1686
+ isDirty: () => isDirty,
1687
+ isValid: () => isValid,
1688
+ late: () => late,
1689
+ lazy: () => lazyType,
1690
+ literal: () => literalType,
1691
+ makeIssue: () => makeIssue,
1692
+ map: () => mapType,
1693
+ nan: () => nanType,
1694
+ nativeEnum: () => nativeEnumType,
1695
+ never: () => neverType,
1696
+ null: () => nullType,
1697
+ nullable: () => nullableType,
1698
+ number: () => numberType,
1699
+ object: () => objectType,
1700
+ objectUtil: () => objectUtil,
1701
+ oboolean: () => oboolean,
1702
+ onumber: () => onumber,
1703
+ optional: () => optionalType,
1704
+ ostring: () => ostring,
1705
+ pipeline: () => pipelineType,
1706
+ preprocess: () => preprocessType,
1707
+ promise: () => promiseType,
1708
+ quotelessJson: () => quotelessJson,
1709
+ record: () => recordType,
1710
+ set: () => setType,
1711
+ setErrorMap: () => setErrorMap,
1712
+ strictObject: () => strictObjectType,
1713
+ string: () => stringType,
1714
+ symbol: () => symbolType,
1715
+ transformer: () => effectsType,
1716
+ tuple: () => tupleType,
1717
+ undefined: () => undefinedType,
1718
+ union: () => unionType,
1719
+ unknown: () => unknownType,
1720
+ util: () => util,
1721
+ void: () => voidType
1722
+ });
1723
+
1724
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
1601
1725
  var util;
1602
1726
  (function(util2) {
1603
- util2.assertEqual = (val) => val;
1727
+ util2.assertEqual = (_) => {
1728
+ };
1604
1729
  function assertIs(_arg) {
1605
1730
  }
1606
1731
  util2.assertIs = assertIs;
@@ -1644,7 +1769,7 @@ var util;
1644
1769
  }
1645
1770
  return void 0;
1646
1771
  };
1647
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
1772
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
1648
1773
  function joinValues(array, separator = " | ") {
1649
1774
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
1650
1775
  }
@@ -1696,7 +1821,7 @@ var getParsedType = (data) => {
1696
1821
  case "string":
1697
1822
  return ZodParsedType.string;
1698
1823
  case "number":
1699
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1824
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
1700
1825
  case "boolean":
1701
1826
  return ZodParsedType.boolean;
1702
1827
  case "function":
@@ -1729,6 +1854,8 @@ var getParsedType = (data) => {
1729
1854
  return ZodParsedType.unknown;
1730
1855
  }
1731
1856
  };
1857
+
1858
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js
1732
1859
  var ZodIssueCode = util.arrayToEnum([
1733
1860
  "invalid_type",
1734
1861
  "invalid_literal",
@@ -1828,8 +1955,9 @@ var ZodError = class _ZodError extends Error {
1828
1955
  const formErrors = [];
1829
1956
  for (const sub of this.issues) {
1830
1957
  if (sub.path.length > 0) {
1831
- fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1832
- fieldErrors[sub.path[0]].push(mapper(sub));
1958
+ const firstEl = sub.path[0];
1959
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
1960
+ fieldErrors[firstEl].push(mapper(sub));
1833
1961
  } else {
1834
1962
  formErrors.push(mapper(sub));
1835
1963
  }
@@ -1844,6 +1972,8 @@ ZodError.create = (issues) => {
1844
1972
  const error = new ZodError(issues);
1845
1973
  return error;
1846
1974
  };
1975
+
1976
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
1847
1977
  var errorMap = (issue, _ctx) => {
1848
1978
  let message;
1849
1979
  switch (issue.code) {
@@ -1905,6 +2035,8 @@ var errorMap = (issue, _ctx) => {
1905
2035
  message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
1906
2036
  else if (issue.type === "number")
1907
2037
  message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
2038
+ else if (issue.type === "bigint")
2039
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
1908
2040
  else if (issue.type === "date")
1909
2041
  message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
1910
2042
  else
@@ -1942,13 +2074,18 @@ var errorMap = (issue, _ctx) => {
1942
2074
  }
1943
2075
  return { message };
1944
2076
  };
1945
- var overrideErrorMap = errorMap;
2077
+ var en_default = errorMap;
2078
+
2079
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js
2080
+ var overrideErrorMap = en_default;
1946
2081
  function setErrorMap(map) {
1947
2082
  overrideErrorMap = map;
1948
2083
  }
1949
2084
  function getErrorMap() {
1950
2085
  return overrideErrorMap;
1951
2086
  }
2087
+
2088
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
1952
2089
  var makeIssue = (params) => {
1953
2090
  const { data, path, errorMaps, issueData } = params;
1954
2091
  const fullPath = [...path, ...issueData.path || []];
@@ -1988,7 +2125,7 @@ function addIssueToContext(ctx, issueData) {
1988
2125
  // then schema-bound map if available
1989
2126
  overrideMap,
1990
2127
  // then global override map
1991
- overrideMap === errorMap ? void 0 : errorMap
2128
+ overrideMap === en_default ? void 0 : en_default
1992
2129
  // then global default map
1993
2130
  ].filter((x) => !!x)
1994
2131
  });
@@ -2057,29 +2194,15 @@ var isAborted = (x) => x.status === "aborted";
2057
2194
  var isDirty = (x) => x.status === "dirty";
2058
2195
  var isValid = (x) => x.status === "valid";
2059
2196
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
2060
- function __classPrivateFieldGet(receiver, state, kind, f) {
2061
- if (kind === "a" && !f)
2062
- throw new TypeError("Private accessor was defined without a getter");
2063
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2064
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
2065
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2066
- }
2067
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
2068
- if (kind === "m")
2069
- throw new TypeError("Private method is not writable");
2070
- if (kind === "a" && !f)
2071
- throw new TypeError("Private accessor was defined without a setter");
2072
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2073
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
2074
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
2075
- }
2197
+
2198
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
2076
2199
  var errorUtil;
2077
2200
  (function(errorUtil2) {
2078
2201
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
2079
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
2202
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
2080
2203
  })(errorUtil || (errorUtil = {}));
2081
- var _ZodEnum_cache;
2082
- var _ZodNativeEnum_cache;
2204
+
2205
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
2083
2206
  var ParseInputLazyPath = class {
2084
2207
  constructor(parent, value, path, key) {
2085
2208
  this._cachedPath = [];
@@ -2090,7 +2213,7 @@ var ParseInputLazyPath = class {
2090
2213
  }
2091
2214
  get path() {
2092
2215
  if (!this._cachedPath.length) {
2093
- if (this._key instanceof Array) {
2216
+ if (Array.isArray(this._key)) {
2094
2217
  this._cachedPath.push(...this._path, ...this._key);
2095
2218
  } else {
2096
2219
  this._cachedPath.push(...this._path, this._key);
@@ -2128,17 +2251,16 @@ function processCreateParams(params) {
2128
2251
  if (errorMap2)
2129
2252
  return { errorMap: errorMap2, description };
2130
2253
  const customMap = (iss, ctx) => {
2131
- var _a, _b;
2132
2254
  const { message } = params;
2133
2255
  if (iss.code === "invalid_enum_value") {
2134
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
2256
+ return { message: message ?? ctx.defaultError };
2135
2257
  }
2136
2258
  if (typeof ctx.data === "undefined") {
2137
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
2259
+ return { message: message ?? required_error ?? ctx.defaultError };
2138
2260
  }
2139
2261
  if (iss.code !== "invalid_type")
2140
2262
  return { message: ctx.defaultError };
2141
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
2263
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
2142
2264
  };
2143
2265
  return { errorMap: customMap, description };
2144
2266
  }
@@ -2190,14 +2312,13 @@ var ZodType = class {
2190
2312
  throw result.error;
2191
2313
  }
2192
2314
  safeParse(data, params) {
2193
- var _a;
2194
2315
  const ctx = {
2195
2316
  common: {
2196
2317
  issues: [],
2197
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
2198
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
2318
+ async: params?.async ?? false,
2319
+ contextualErrorMap: params?.errorMap
2199
2320
  },
2200
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
2321
+ path: params?.path || [],
2201
2322
  schemaErrorMap: this._def.errorMap,
2202
2323
  parent: null,
2203
2324
  data,
@@ -2207,7 +2328,6 @@ var ZodType = class {
2207
2328
  return handleResult(ctx, result);
2208
2329
  }
2209
2330
  "~validate"(data) {
2210
- var _a, _b;
2211
2331
  const ctx = {
2212
2332
  common: {
2213
2333
  issues: [],
@@ -2228,7 +2348,7 @@ var ZodType = class {
2228
2348
  issues: ctx.common.issues
2229
2349
  };
2230
2350
  } catch (err) {
2231
- 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")) {
2351
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
2232
2352
  this["~standard"].async = true;
2233
2353
  }
2234
2354
  ctx.common = {
@@ -2253,10 +2373,10 @@ var ZodType = class {
2253
2373
  const ctx = {
2254
2374
  common: {
2255
2375
  issues: [],
2256
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
2376
+ contextualErrorMap: params?.errorMap,
2257
2377
  async: true
2258
2378
  },
2259
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
2379
+ path: params?.path || [],
2260
2380
  schemaErrorMap: this._def.errorMap,
2261
2381
  parent: null,
2262
2382
  data,
@@ -2481,16 +2601,20 @@ function isValidJWT(jwt, alg) {
2481
2601
  return false;
2482
2602
  try {
2483
2603
  const [header] = jwt.split(".");
2604
+ if (!header)
2605
+ return false;
2484
2606
  const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
2485
2607
  const decoded = JSON.parse(atob(base64));
2486
2608
  if (typeof decoded !== "object" || decoded === null)
2487
2609
  return false;
2488
- if (!decoded.typ || !decoded.alg)
2610
+ if ("typ" in decoded && decoded?.typ !== "JWT")
2611
+ return false;
2612
+ if (!decoded.alg)
2489
2613
  return false;
2490
2614
  if (alg && decoded.alg !== alg)
2491
2615
  return false;
2492
2616
  return true;
2493
- } catch (_a) {
2617
+ } catch {
2494
2618
  return false;
2495
2619
  }
2496
2620
  }
@@ -2649,7 +2773,7 @@ var ZodString = class _ZodString extends ZodType {
2649
2773
  } else if (check.kind === "url") {
2650
2774
  try {
2651
2775
  new URL(input.data);
2652
- } catch (_a) {
2776
+ } catch {
2653
2777
  ctx = this._getOrReturnCtx(input, ctx);
2654
2778
  addIssueToContext(ctx, {
2655
2779
  validation: "url",
@@ -2861,7 +2985,6 @@ var ZodString = class _ZodString extends ZodType {
2861
2985
  return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
2862
2986
  }
2863
2987
  datetime(options) {
2864
- var _a, _b;
2865
2988
  if (typeof options === "string") {
2866
2989
  return this._addCheck({
2867
2990
  kind: "datetime",
@@ -2873,10 +2996,10 @@ var ZodString = class _ZodString extends ZodType {
2873
2996
  }
2874
2997
  return this._addCheck({
2875
2998
  kind: "datetime",
2876
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2877
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
2878
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
2879
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2999
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
3000
+ offset: options?.offset ?? false,
3001
+ local: options?.local ?? false,
3002
+ ...errorUtil.errToObj(options?.message)
2880
3003
  });
2881
3004
  }
2882
3005
  date(message) {
@@ -2892,8 +3015,8 @@ var ZodString = class _ZodString extends ZodType {
2892
3015
  }
2893
3016
  return this._addCheck({
2894
3017
  kind: "time",
2895
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2896
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3018
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
3019
+ ...errorUtil.errToObj(options?.message)
2897
3020
  });
2898
3021
  }
2899
3022
  duration(message) {
@@ -2910,8 +3033,8 @@ var ZodString = class _ZodString extends ZodType {
2910
3033
  return this._addCheck({
2911
3034
  kind: "includes",
2912
3035
  value,
2913
- position: options === null || options === void 0 ? void 0 : options.position,
2914
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3036
+ position: options?.position,
3037
+ ...errorUtil.errToObj(options?.message)
2915
3038
  });
2916
3039
  }
2917
3040
  startsWith(value, message) {
@@ -3043,11 +3166,10 @@ var ZodString = class _ZodString extends ZodType {
3043
3166
  }
3044
3167
  };
3045
3168
  ZodString.create = (params) => {
3046
- var _a;
3047
3169
  return new ZodString({
3048
3170
  checks: [],
3049
3171
  typeName: ZodFirstPartyTypeKind.ZodString,
3050
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
3172
+ coerce: params?.coerce ?? false,
3051
3173
  ...processCreateParams(params)
3052
3174
  });
3053
3175
  };
@@ -3055,9 +3177,9 @@ function floatSafeRemainder(val, step) {
3055
3177
  const valDecCount = (val.toString().split(".")[1] || "").length;
3056
3178
  const stepDecCount = (step.toString().split(".")[1] || "").length;
3057
3179
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
3058
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
3059
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
3060
- return valInt % stepInt / Math.pow(10, decCount);
3180
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
3181
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
3182
+ return valInt % stepInt / 10 ** decCount;
3061
3183
  }
3062
3184
  var ZodNumber = class _ZodNumber extends ZodType {
3063
3185
  constructor() {
@@ -3267,7 +3389,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
3267
3389
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
3268
3390
  }
3269
3391
  get isFinite() {
3270
- let max = null, min = null;
3392
+ let max = null;
3393
+ let min = null;
3271
3394
  for (const ch of this._def.checks) {
3272
3395
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
3273
3396
  return true;
@@ -3286,7 +3409,7 @@ ZodNumber.create = (params) => {
3286
3409
  return new ZodNumber({
3287
3410
  checks: [],
3288
3411
  typeName: ZodFirstPartyTypeKind.ZodNumber,
3289
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3412
+ coerce: params?.coerce || false,
3290
3413
  ...processCreateParams(params)
3291
3414
  });
3292
3415
  };
@@ -3300,7 +3423,7 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3300
3423
  if (this._def.coerce) {
3301
3424
  try {
3302
3425
  input.data = BigInt(input.data);
3303
- } catch (_a) {
3426
+ } catch {
3304
3427
  return this._getInvalidInput(input);
3305
3428
  }
3306
3429
  }
@@ -3455,11 +3578,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
3455
3578
  }
3456
3579
  };
3457
3580
  ZodBigInt.create = (params) => {
3458
- var _a;
3459
3581
  return new ZodBigInt({
3460
3582
  checks: [],
3461
3583
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
3462
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
3584
+ coerce: params?.coerce ?? false,
3463
3585
  ...processCreateParams(params)
3464
3586
  });
3465
3587
  };
@@ -3484,7 +3606,7 @@ var ZodBoolean = class extends ZodType {
3484
3606
  ZodBoolean.create = (params) => {
3485
3607
  return new ZodBoolean({
3486
3608
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
3487
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3609
+ coerce: params?.coerce || false,
3488
3610
  ...processCreateParams(params)
3489
3611
  });
3490
3612
  };
@@ -3503,7 +3625,7 @@ var ZodDate = class _ZodDate extends ZodType {
3503
3625
  });
3504
3626
  return INVALID;
3505
3627
  }
3506
- if (isNaN(input.data.getTime())) {
3628
+ if (Number.isNaN(input.data.getTime())) {
3507
3629
  const ctx2 = this._getOrReturnCtx(input);
3508
3630
  addIssueToContext(ctx2, {
3509
3631
  code: ZodIssueCode.invalid_date
@@ -3592,7 +3714,7 @@ var ZodDate = class _ZodDate extends ZodType {
3592
3714
  ZodDate.create = (params) => {
3593
3715
  return new ZodDate({
3594
3716
  checks: [],
3595
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
3717
+ coerce: params?.coerce || false,
3596
3718
  typeName: ZodFirstPartyTypeKind.ZodDate,
3597
3719
  ...processCreateParams(params)
3598
3720
  });
@@ -3867,7 +3989,8 @@ var ZodObject = class _ZodObject extends ZodType {
3867
3989
  return this._cached;
3868
3990
  const shape = this._def.shape();
3869
3991
  const keys = util.objectKeys(shape);
3870
- return this._cached = { shape, keys };
3992
+ this._cached = { shape, keys };
3993
+ return this._cached;
3871
3994
  }
3872
3995
  _parse(input) {
3873
3996
  const parsedType = this._getType(input);
@@ -3917,9 +4040,8 @@ var ZodObject = class _ZodObject extends ZodType {
3917
4040
  });
3918
4041
  status.dirty();
3919
4042
  }
3920
- } else if (unknownKeys === "strip")
3921
- ;
3922
- else {
4043
+ } else if (unknownKeys === "strip") {
4044
+ } else {
3923
4045
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
3924
4046
  }
3925
4047
  } else {
@@ -3966,11 +4088,10 @@ var ZodObject = class _ZodObject extends ZodType {
3966
4088
  unknownKeys: "strict",
3967
4089
  ...message !== void 0 ? {
3968
4090
  errorMap: (issue, ctx) => {
3969
- var _a, _b, _c, _d;
3970
- 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;
4091
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
3971
4092
  if (issue.code === "unrecognized_keys")
3972
4093
  return {
3973
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
4094
+ message: errorUtil.errToObj(message).message ?? defaultError
3974
4095
  };
3975
4096
  return {
3976
4097
  message: defaultError
@@ -4101,11 +4222,11 @@ var ZodObject = class _ZodObject extends ZodType {
4101
4222
  }
4102
4223
  pick(mask) {
4103
4224
  const shape = {};
4104
- util.objectKeys(mask).forEach((key) => {
4225
+ for (const key of util.objectKeys(mask)) {
4105
4226
  if (mask[key] && this.shape[key]) {
4106
4227
  shape[key] = this.shape[key];
4107
4228
  }
4108
- });
4229
+ }
4109
4230
  return new _ZodObject({
4110
4231
  ...this._def,
4111
4232
  shape: () => shape
@@ -4113,11 +4234,11 @@ var ZodObject = class _ZodObject extends ZodType {
4113
4234
  }
4114
4235
  omit(mask) {
4115
4236
  const shape = {};
4116
- util.objectKeys(this.shape).forEach((key) => {
4237
+ for (const key of util.objectKeys(this.shape)) {
4117
4238
  if (!mask[key]) {
4118
4239
  shape[key] = this.shape[key];
4119
4240
  }
4120
- });
4241
+ }
4121
4242
  return new _ZodObject({
4122
4243
  ...this._def,
4123
4244
  shape: () => shape
@@ -4131,14 +4252,14 @@ var ZodObject = class _ZodObject extends ZodType {
4131
4252
  }
4132
4253
  partial(mask) {
4133
4254
  const newShape = {};
4134
- util.objectKeys(this.shape).forEach((key) => {
4255
+ for (const key of util.objectKeys(this.shape)) {
4135
4256
  const fieldSchema = this.shape[key];
4136
4257
  if (mask && !mask[key]) {
4137
4258
  newShape[key] = fieldSchema;
4138
4259
  } else {
4139
4260
  newShape[key] = fieldSchema.optional();
4140
4261
  }
4141
- });
4262
+ }
4142
4263
  return new _ZodObject({
4143
4264
  ...this._def,
4144
4265
  shape: () => newShape
@@ -4146,7 +4267,7 @@ var ZodObject = class _ZodObject extends ZodType {
4146
4267
  }
4147
4268
  required(mask) {
4148
4269
  const newShape = {};
4149
- util.objectKeys(this.shape).forEach((key) => {
4270
+ for (const key of util.objectKeys(this.shape)) {
4150
4271
  if (mask && !mask[key]) {
4151
4272
  newShape[key] = this.shape[key];
4152
4273
  } else {
@@ -4157,7 +4278,7 @@ var ZodObject = class _ZodObject extends ZodType {
4157
4278
  }
4158
4279
  newShape[key] = newField;
4159
4280
  }
4160
- });
4281
+ }
4161
4282
  return new _ZodObject({
4162
4283
  ...this._def,
4163
4284
  shape: () => newShape
@@ -4773,12 +4894,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4773
4894
  return makeIssue({
4774
4895
  data: args,
4775
4896
  path: ctx.path,
4776
- errorMaps: [
4777
- ctx.common.contextualErrorMap,
4778
- ctx.schemaErrorMap,
4779
- getErrorMap(),
4780
- errorMap
4781
- ].filter((x) => !!x),
4897
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4782
4898
  issueData: {
4783
4899
  code: ZodIssueCode.invalid_arguments,
4784
4900
  argumentsError: error
@@ -4789,12 +4905,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
4789
4905
  return makeIssue({
4790
4906
  data: returns,
4791
4907
  path: ctx.path,
4792
- errorMaps: [
4793
- ctx.common.contextualErrorMap,
4794
- ctx.schemaErrorMap,
4795
- getErrorMap(),
4796
- errorMap
4797
- ].filter((x) => !!x),
4908
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
4798
4909
  issueData: {
4799
4910
  code: ZodIssueCode.invalid_return_type,
4800
4911
  returnTypeError: error
@@ -4918,10 +5029,6 @@ function createZodEnum(values, params) {
4918
5029
  });
4919
5030
  }
4920
5031
  var ZodEnum = class _ZodEnum extends ZodType {
4921
- constructor() {
4922
- super(...arguments);
4923
- _ZodEnum_cache.set(this, void 0);
4924
- }
4925
5032
  _parse(input) {
4926
5033
  if (typeof input.data !== "string") {
4927
5034
  const ctx = this._getOrReturnCtx(input);
@@ -4933,10 +5040,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
4933
5040
  });
4934
5041
  return INVALID;
4935
5042
  }
4936
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
4937
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
5043
+ if (!this._cache) {
5044
+ this._cache = new Set(this._def.values);
4938
5045
  }
4939
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
5046
+ if (!this._cache.has(input.data)) {
4940
5047
  const ctx = this._getOrReturnCtx(input);
4941
5048
  const expectedValues = this._def.values;
4942
5049
  addIssueToContext(ctx, {
@@ -4985,13 +5092,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
4985
5092
  });
4986
5093
  }
4987
5094
  };
4988
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
4989
5095
  ZodEnum.create = createZodEnum;
4990
5096
  var ZodNativeEnum = class extends ZodType {
4991
- constructor() {
4992
- super(...arguments);
4993
- _ZodNativeEnum_cache.set(this, void 0);
4994
- }
4995
5097
  _parse(input) {
4996
5098
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
4997
5099
  const ctx = this._getOrReturnCtx(input);
@@ -5004,10 +5106,10 @@ var ZodNativeEnum = class extends ZodType {
5004
5106
  });
5005
5107
  return INVALID;
5006
5108
  }
5007
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
5008
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
5109
+ if (!this._cache) {
5110
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
5009
5111
  }
5010
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
5112
+ if (!this._cache.has(input.data)) {
5011
5113
  const expectedValues = util.objectValues(nativeEnumValues);
5012
5114
  addIssueToContext(ctx, {
5013
5115
  received: ctx.data,
@@ -5022,7 +5124,6 @@ var ZodNativeEnum = class extends ZodType {
5022
5124
  return this._def.values;
5023
5125
  }
5024
5126
  };
5025
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
5026
5127
  ZodNativeEnum.create = (values, params) => {
5027
5128
  return new ZodNativeEnum({
5028
5129
  values,
@@ -5163,7 +5264,7 @@ var ZodEffects = class extends ZodType {
5163
5264
  parent: ctx
5164
5265
  });
5165
5266
  if (!isValid(base))
5166
- return base;
5267
+ return INVALID;
5167
5268
  const result = effect.transform(base.value, checkCtx);
5168
5269
  if (result instanceof Promise) {
5169
5270
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -5172,8 +5273,11 @@ var ZodEffects = class extends ZodType {
5172
5273
  } else {
5173
5274
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
5174
5275
  if (!isValid(base))
5175
- return base;
5176
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
5276
+ return INVALID;
5277
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
5278
+ status: status.value,
5279
+ value: result
5280
+ }));
5177
5281
  });
5178
5282
  }
5179
5283
  }
@@ -5433,21 +5537,19 @@ function cleanParams(params, data) {
5433
5537
  function custom(check, _params = {}, fatal) {
5434
5538
  if (check)
5435
5539
  return ZodAny.create().superRefine((data, ctx) => {
5436
- var _a, _b;
5437
5540
  const r = check(data);
5438
5541
  if (r instanceof Promise) {
5439
5542
  return r.then((r2) => {
5440
- var _a2, _b2;
5441
5543
  if (!r2) {
5442
5544
  const params = cleanParams(_params, data);
5443
- const _fatal = (_b2 = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
5545
+ const _fatal = params.fatal ?? fatal ?? true;
5444
5546
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5445
5547
  }
5446
5548
  });
5447
5549
  }
5448
5550
  if (!r) {
5449
5551
  const params = cleanParams(_params, data);
5450
- const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
5552
+ const _fatal = params.fatal ?? fatal ?? true;
5451
5553
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
5452
5554
  }
5453
5555
  return;
@@ -5547,122 +5649,6 @@ var coerce = {
5547
5649
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
5548
5650
  };
5549
5651
  var NEVER = INVALID;
5550
- var z = /* @__PURE__ */ Object.freeze({
5551
- __proto__: null,
5552
- defaultErrorMap: errorMap,
5553
- setErrorMap,
5554
- getErrorMap,
5555
- makeIssue,
5556
- EMPTY_PATH,
5557
- addIssueToContext,
5558
- ParseStatus,
5559
- INVALID,
5560
- DIRTY,
5561
- OK,
5562
- isAborted,
5563
- isDirty,
5564
- isValid,
5565
- isAsync,
5566
- get util() {
5567
- return util;
5568
- },
5569
- get objectUtil() {
5570
- return objectUtil;
5571
- },
5572
- ZodParsedType,
5573
- getParsedType,
5574
- ZodType,
5575
- datetimeRegex,
5576
- ZodString,
5577
- ZodNumber,
5578
- ZodBigInt,
5579
- ZodBoolean,
5580
- ZodDate,
5581
- ZodSymbol,
5582
- ZodUndefined,
5583
- ZodNull,
5584
- ZodAny,
5585
- ZodUnknown,
5586
- ZodNever,
5587
- ZodVoid,
5588
- ZodArray,
5589
- ZodObject,
5590
- ZodUnion,
5591
- ZodDiscriminatedUnion,
5592
- ZodIntersection,
5593
- ZodTuple,
5594
- ZodRecord,
5595
- ZodMap,
5596
- ZodSet,
5597
- ZodFunction,
5598
- ZodLazy,
5599
- ZodLiteral,
5600
- ZodEnum,
5601
- ZodNativeEnum,
5602
- ZodPromise,
5603
- ZodEffects,
5604
- ZodTransformer: ZodEffects,
5605
- ZodOptional,
5606
- ZodNullable,
5607
- ZodDefault,
5608
- ZodCatch,
5609
- ZodNaN,
5610
- BRAND,
5611
- ZodBranded,
5612
- ZodPipeline,
5613
- ZodReadonly,
5614
- custom,
5615
- Schema: ZodType,
5616
- ZodSchema: ZodType,
5617
- late,
5618
- get ZodFirstPartyTypeKind() {
5619
- return ZodFirstPartyTypeKind;
5620
- },
5621
- coerce,
5622
- any: anyType,
5623
- array: arrayType,
5624
- bigint: bigIntType,
5625
- boolean: booleanType,
5626
- date: dateType,
5627
- discriminatedUnion: discriminatedUnionType,
5628
- effect: effectsType,
5629
- "enum": enumType,
5630
- "function": functionType,
5631
- "instanceof": instanceOfType,
5632
- intersection: intersectionType,
5633
- lazy: lazyType,
5634
- literal: literalType,
5635
- map: mapType,
5636
- nan: nanType,
5637
- nativeEnum: nativeEnumType,
5638
- never: neverType,
5639
- "null": nullType,
5640
- nullable: nullableType,
5641
- number: numberType,
5642
- object: objectType,
5643
- oboolean,
5644
- onumber,
5645
- optional: optionalType,
5646
- ostring,
5647
- pipeline: pipelineType,
5648
- preprocess: preprocessType,
5649
- promise: promiseType,
5650
- record: recordType,
5651
- set: setType,
5652
- strictObject: strictObjectType,
5653
- string: stringType,
5654
- symbol: symbolType,
5655
- transformer: effectsType,
5656
- tuple: tupleType,
5657
- "undefined": undefinedType,
5658
- union: unionType,
5659
- unknown: unknownType,
5660
- "void": voidType,
5661
- NEVER,
5662
- ZodIssueCode,
5663
- quotelessJson,
5664
- ZodError
5665
- });
5666
5652
 
5667
5653
  // ../../core/models/book.ts
5668
5654
  var BookDesignRequest = class {
@@ -5687,29 +5673,29 @@ var BookDesignRequest = class {
5687
5673
  this.text_sticker_level = props.text_sticker_level;
5688
5674
  }
5689
5675
  };
5690
- var bookDesignRequestSchema = z.object({
5691
- occasion: z.enum(occasions),
5692
- style: z.string(),
5693
- book_size: z.enum(bookSizes),
5694
- cover_type: z.enum(coverTypes),
5695
- page_type: z.enum(pageTypes),
5696
- image_density: z.enum(imageDensities),
5697
- image_filtering_level: z.enum(imageFilteringLevels),
5698
- embellishment_level: z.enum(embellishmentLevels),
5699
- text_sticker_level: z.enum(textStickerLevels)
5676
+ var bookDesignRequestSchema = external_exports.object({
5677
+ occasion: external_exports.enum(occasions),
5678
+ style: external_exports.string(),
5679
+ book_size: external_exports.enum(bookSizes),
5680
+ cover_type: external_exports.enum(coverTypes),
5681
+ page_type: external_exports.enum(pageTypes),
5682
+ image_density: external_exports.enum(imageDensities),
5683
+ image_filtering_level: external_exports.enum(imageFilteringLevels),
5684
+ embellishment_level: external_exports.enum(embellishmentLevels),
5685
+ text_sticker_level: external_exports.enum(textStickerLevels)
5700
5686
  });
5701
- var bookPropsSchema = z.object({
5702
- id: z.string().optional(),
5703
- title: z.string(),
5704
- subtitle: z.string().optional(),
5687
+ var bookPropsSchema = external_exports.object({
5688
+ id: external_exports.string().optional(),
5689
+ title: external_exports.string(),
5690
+ subtitle: external_exports.string().optional(),
5705
5691
  design_request: bookDesignRequestSchema,
5706
- sku: z.string().optional(),
5707
- state: z.enum(states).optional(),
5708
- guid: z.string().optional(),
5709
- cancelled_at: z.string().optional(),
5710
- mb_client_timeout: z.number().optional(),
5711
- user_id: z.string().optional(),
5712
- revision: z.number().optional()
5692
+ sku: external_exports.string().optional(),
5693
+ state: external_exports.enum(states).optional(),
5694
+ guid: external_exports.string().optional(),
5695
+ cancelled_at: external_exports.string().optional(),
5696
+ mb_client_timeout: external_exports.number().optional(),
5697
+ user_id: external_exports.string().optional(),
5698
+ revision: external_exports.number().optional()
5713
5699
  });
5714
5700
  var Book = class {
5715
5701
  id;
@@ -5790,18 +5776,18 @@ var Images = class {
5790
5776
  }
5791
5777
  }
5792
5778
  };
5793
- var imageServerSchema = z.object({
5794
- id: z.string().optional(),
5795
- handle: z.string(),
5796
- url: z.string(),
5797
- width: z.number(),
5798
- height: z.number(),
5799
- orientation: z.number(),
5800
- taken_at: z.string(),
5801
- camera_make: z.string().optional(),
5802
- camera: z.string().optional(),
5803
- filename: z.string(),
5804
- metadata: z.record(z.unknown()).optional()
5779
+ var imageServerSchema = external_exports.object({
5780
+ id: external_exports.string().optional(),
5781
+ handle: external_exports.string(),
5782
+ url: external_exports.string(),
5783
+ width: external_exports.number(),
5784
+ height: external_exports.number(),
5785
+ orientation: external_exports.number(),
5786
+ taken_at: external_exports.string(),
5787
+ camera_make: external_exports.string().optional(),
5788
+ camera: external_exports.string().optional(),
5789
+ filename: external_exports.string(),
5790
+ metadata: external_exports.record(external_exports.unknown()).optional()
5805
5791
  });
5806
5792
  var ImageServer = class {
5807
5793
  id;
@@ -5846,34 +5832,34 @@ function imageServerToImage(imageServer) {
5846
5832
  }
5847
5833
 
5848
5834
  // ../../core/models/design-request/design-options.ts
5849
- var imageDensityOptionSchema = z.object({
5850
- maxPageCount: z.number(),
5851
- minPageCount: z.number(),
5852
- maxImageCount: z.number(),
5853
- avgImageCount: z.number(),
5854
- minImageCount: z.number()
5835
+ var imageDensityOptionSchema = external_exports.object({
5836
+ maxPageCount: external_exports.number(),
5837
+ minPageCount: external_exports.number(),
5838
+ maxImageCount: external_exports.number(),
5839
+ avgImageCount: external_exports.number(),
5840
+ minImageCount: external_exports.number()
5855
5841
  });
5856
- var imageDensityOptionsSchema = z.object({
5842
+ var imageDensityOptionsSchema = external_exports.object({
5857
5843
  high: imageDensityOptionSchema,
5858
5844
  medium: imageDensityOptionSchema,
5859
5845
  low: imageDensityOptionSchema
5860
5846
  });
5861
- var designOptionsSchema = z.object({
5847
+ var designOptionsSchema = external_exports.object({
5862
5848
  densities: imageDensityOptionsSchema
5863
5849
  });
5864
- var imageDensityOptionServerSchema = z.object({
5865
- max_page_count: z.number(),
5866
- min_page_count: z.number(),
5867
- max_image_count: z.number(),
5868
- avg_image_count: z.number(),
5869
- min_image_count: z.number()
5850
+ var imageDensityOptionServerSchema = external_exports.object({
5851
+ max_page_count: external_exports.number(),
5852
+ min_page_count: external_exports.number(),
5853
+ max_image_count: external_exports.number(),
5854
+ avg_image_count: external_exports.number(),
5855
+ min_image_count: external_exports.number()
5870
5856
  });
5871
- var imageDensityOptionsServerSchema = z.object({
5857
+ var imageDensityOptionsServerSchema = external_exports.object({
5872
5858
  high: imageDensityOptionServerSchema,
5873
5859
  medium: imageDensityOptionServerSchema,
5874
5860
  low: imageDensityOptionServerSchema
5875
5861
  });
5876
- var designOptionsServerSchema = z.object({
5862
+ var designOptionsServerSchema = external_exports.object({
5877
5863
  densities: imageDensityOptionsServerSchema
5878
5864
  });
5879
5865
 
@@ -6171,9 +6157,9 @@ var DesignOptionsEndpoints = class {
6171
6157
  };
6172
6158
 
6173
6159
  // ../../core/models/event.ts
6174
- var eventContextSchema = z.record(z.string(), z.unknown()).optional();
6175
- var eventSchema = z.object({
6176
- name: z.string(),
6160
+ var eventContextSchema = external_exports.record(external_exports.string(), external_exports.unknown()).optional();
6161
+ var eventSchema = external_exports.object({
6162
+ name: external_exports.string(),
6177
6163
  context: eventContextSchema
6178
6164
  });
6179
6165
 
@@ -6263,7 +6249,7 @@ var ImagesEndpoints = class {
6263
6249
  const res = await this.engineAPI.fetcher.call({
6264
6250
  path: `/v1/images/book/${bookId}`
6265
6251
  });
6266
- return z.array(imageServerSchema).parse(res);
6252
+ return external_exports.array(imageServerSchema).parse(res);
6267
6253
  });
6268
6254
  }
6269
6255
  retrieve(imageId, bookId) {
@@ -6311,119 +6297,119 @@ var ImagesEndpoints = class {
6311
6297
  };
6312
6298
 
6313
6299
  // ../../core/models/spread.ts
6314
- var spreadServerSchema = z.object({
6315
- id: z.string(),
6316
- book_id: z.string(),
6317
- state: z.string(),
6318
- spread_type: z.string(),
6319
- width: z.number(),
6320
- height: z.number(),
6321
- sequence: z.number(),
6322
- wells: z.array(z.unknown()),
6323
- background: z.unknown(),
6324
- laid_out_at: z.string().nullable(),
6325
- embellished_at: z.string().nullable(),
6326
- polished_at: z.string().nullable(),
6327
- metadata: z.unknown(),
6328
- url: z.string().nullable().optional()
6300
+ var spreadServerSchema = external_exports.object({
6301
+ id: external_exports.string(),
6302
+ book_id: external_exports.string(),
6303
+ state: external_exports.string(),
6304
+ spread_type: external_exports.string(),
6305
+ width: external_exports.number(),
6306
+ height: external_exports.number(),
6307
+ sequence: external_exports.number(),
6308
+ wells: external_exports.array(external_exports.unknown()),
6309
+ background: external_exports.unknown(),
6310
+ laid_out_at: external_exports.string().nullable(),
6311
+ embellished_at: external_exports.string().nullable(),
6312
+ polished_at: external_exports.string().nullable(),
6313
+ metadata: external_exports.unknown(),
6314
+ url: external_exports.string().nullable().optional()
6329
6315
  });
6330
- var spreadSchema = z.object({
6331
- id: z.string(),
6332
- bookId: z.string(),
6333
- state: z.string(),
6334
- spreadType: z.string(),
6335
- width: z.number(),
6336
- height: z.number(),
6337
- sequence: z.number(),
6338
- wells: z.array(z.unknown()),
6339
- background: z.unknown(),
6340
- laidOutAt: z.string().nullable(),
6341
- embellishedAt: z.string().nullable(),
6342
- polishedAt: z.string().nullable(),
6343
- metadata: z.unknown(),
6344
- url: z.string().nullable().optional()
6316
+ var spreadSchema = external_exports.object({
6317
+ id: external_exports.string(),
6318
+ bookId: external_exports.string(),
6319
+ state: external_exports.string(),
6320
+ spreadType: external_exports.string(),
6321
+ width: external_exports.number(),
6322
+ height: external_exports.number(),
6323
+ sequence: external_exports.number(),
6324
+ wells: external_exports.array(external_exports.unknown()),
6325
+ background: external_exports.unknown(),
6326
+ laidOutAt: external_exports.string().nullable(),
6327
+ embellishedAt: external_exports.string().nullable(),
6328
+ polishedAt: external_exports.string().nullable(),
6329
+ metadata: external_exports.unknown(),
6330
+ url: external_exports.string().nullable().optional()
6345
6331
  });
6346
6332
 
6347
6333
  // ../../core/models/galleon.ts
6348
- var imageAssignmentSchema = z.object({
6349
- photoRefId: z.string(),
6350
- finalCrop: z.array(z.number())
6334
+ var imageAssignmentSchema = external_exports.object({
6335
+ photoRefId: external_exports.string(),
6336
+ finalCrop: external_exports.array(external_exports.number())
6351
6337
  });
6352
- var positionSchema = z.object({
6353
- x: z.number(),
6354
- y: z.number(),
6355
- width: z.number().optional(),
6356
- height: z.number().optional(),
6357
- rotation: z.number()
6338
+ var positionSchema = external_exports.object({
6339
+ x: external_exports.number(),
6340
+ y: external_exports.number(),
6341
+ width: external_exports.number().optional(),
6342
+ height: external_exports.number().optional(),
6343
+ rotation: external_exports.number()
6358
6344
  });
6359
- var photoMetadataSchema = z.object({
6360
- id: z.string(),
6361
- llx: z.number(),
6362
- lly: z.number(),
6363
- urx: z.number(),
6364
- ury: z.number(),
6365
- data: z.string().nullable(),
6366
- title: z.string(),
6367
- width: z.number(),
6368
- effect: z.string(),
6369
- height: z.number(),
6370
- source: z.string(),
6371
- rotation: z.number(),
6372
- uploadTime: z.string()
6345
+ var photoMetadataSchema = external_exports.object({
6346
+ id: external_exports.string(),
6347
+ llx: external_exports.number(),
6348
+ lly: external_exports.number(),
6349
+ urx: external_exports.number(),
6350
+ ury: external_exports.number(),
6351
+ data: external_exports.string().nullable(),
6352
+ title: external_exports.string(),
6353
+ width: external_exports.number(),
6354
+ effect: external_exports.string(),
6355
+ height: external_exports.number(),
6356
+ source: external_exports.string(),
6357
+ rotation: external_exports.number(),
6358
+ uploadTime: external_exports.string()
6373
6359
  });
6374
- var propertySchema = z.object({
6375
- key: z.string(),
6376
- value: z.any()
6360
+ var propertySchema = external_exports.object({
6361
+ key: external_exports.string(),
6362
+ value: external_exports.any()
6377
6363
  });
6378
- var assetSchema = z.object({
6379
- type: z.string(),
6364
+ var assetSchema = external_exports.object({
6365
+ type: external_exports.string(),
6380
6366
  imageAssignment: imageAssignmentSchema.optional(),
6381
6367
  position: positionSchema,
6382
- seqNum: z.number(),
6383
- z: z.number(),
6384
- id: z.string().optional(),
6385
- horizJustification: z.string().optional(),
6386
- vertJustification: z.string().optional().nullable(),
6387
- text: z.string().optional(),
6388
- fontId: z.string().optional(),
6389
- fontSize: z.number().optional(),
6390
- fontColor: z.string().optional(),
6391
- frame: z.string().optional()
6368
+ seqNum: external_exports.number(),
6369
+ z: external_exports.number(),
6370
+ id: external_exports.string().optional(),
6371
+ horizJustification: external_exports.string().optional(),
6372
+ vertJustification: external_exports.string().optional().nullable(),
6373
+ text: external_exports.string().optional(),
6374
+ fontId: external_exports.string().optional(),
6375
+ fontSize: external_exports.number().optional(),
6376
+ fontColor: external_exports.string().optional(),
6377
+ frame: external_exports.string().optional()
6392
6378
  });
6393
- var photoStripSchema = z.object({
6394
- url: z.string(),
6395
- encryptId: z.string(),
6396
- photoRefId: z.string(),
6397
- photoId: z.string(),
6379
+ var photoStripSchema = external_exports.object({
6380
+ url: external_exports.string(),
6381
+ encryptId: external_exports.string(),
6382
+ photoRefId: external_exports.string(),
6383
+ photoId: external_exports.string(),
6398
6384
  photoMetadata: photoMetadataSchema
6399
6385
  });
6400
- var reportingDataSchema = z.object({
6401
- properties: z.array(propertySchema)
6386
+ var reportingDataSchema = external_exports.object({
6387
+ properties: external_exports.array(propertySchema)
6402
6388
  });
6403
- var sflyCanvasSchema = z.object({
6404
- backgroundId: z.string().nullable(),
6405
- assets: z.array(assetSchema).optional()
6389
+ var sflyCanvasSchema = external_exports.object({
6390
+ backgroundId: external_exports.string().nullable(),
6391
+ assets: external_exports.array(assetSchema).optional()
6406
6392
  });
6407
- var snapCanvasSchema = z.object({
6408
- surfaceNumber: z.number(),
6409
- surfaceData: z.record(z.any()),
6410
- version: z.string()
6393
+ var snapCanvasSchema = external_exports.object({
6394
+ surfaceNumber: external_exports.number(),
6395
+ surfaceData: external_exports.record(external_exports.any()),
6396
+ version: external_exports.string()
6411
6397
  });
6412
- var pageSchema = z.object({
6413
- pageNum: z.number(),
6414
- type: z.string(),
6398
+ var pageSchema = external_exports.object({
6399
+ pageNum: external_exports.number(),
6400
+ type: external_exports.string(),
6415
6401
  canvas: sflyCanvasSchema
6416
6402
  });
6417
- var magicShopBookSchema = z.object({
6418
- pages: z.array(pageSchema),
6419
- photoStrip: z.array(photoStripSchema)
6403
+ var magicShopBookSchema = external_exports.object({
6404
+ pages: external_exports.array(pageSchema),
6405
+ photoStrip: external_exports.array(photoStripSchema)
6420
6406
  });
6421
- var bookCreationRequestSchema = z.object({
6422
- title: z.string(),
6423
- binding: z.string(),
6424
- coverSpecId: z.string(),
6425
- styleId: z.number(),
6426
- userId: z.string(),
6407
+ var bookCreationRequestSchema = external_exports.object({
6408
+ title: external_exports.string(),
6409
+ binding: external_exports.string(),
6410
+ coverSpecId: external_exports.string(),
6411
+ styleId: external_exports.number(),
6412
+ userId: external_exports.string(),
6427
6413
  magicShopBook: magicShopBookSchema,
6428
6414
  reportingData: reportingDataSchema
6429
6415
  });
@@ -6440,7 +6426,7 @@ var SpreadsEndpoints = class {
6440
6426
  const res = await this.engineAPI.fetcher.call({
6441
6427
  path: `/v1/spreads/book/${bookId}`
6442
6428
  });
6443
- return z.array(spreadServerSchema).parse(res);
6429
+ return external_exports.array(spreadServerSchema).parse(res);
6444
6430
  });
6445
6431
  }
6446
6432
  create(bookId, spread) {
@@ -6506,98 +6492,98 @@ var SpreadsEndpoints = class {
6506
6492
  })
6507
6493
  }
6508
6494
  });
6509
- return z.array(surfaceCategoryName ? snapCanvasSchema : sflyCanvasSchema).parse(res);
6495
+ return external_exports.array(surfaceCategoryName ? snapCanvasSchema : sflyCanvasSchema).parse(res);
6510
6496
  });
6511
6497
  }
6512
6498
  };
6513
6499
 
6514
6500
  // ../../core/models/storyboard-item.ts
6515
- var StoryboardItemImageFaceServerSchema = z.object({
6516
- score: z.number(),
6517
- bounding_box: z.object({
6518
- x: z.number(),
6519
- y: z.number(),
6520
- width: z.number(),
6521
- height: z.number()
6501
+ var StoryboardItemImageFaceServerSchema = external_exports.object({
6502
+ score: external_exports.number(),
6503
+ bounding_box: external_exports.object({
6504
+ x: external_exports.number(),
6505
+ y: external_exports.number(),
6506
+ width: external_exports.number(),
6507
+ height: external_exports.number()
6522
6508
  }),
6523
- size: z.number(),
6524
- eyes_open_score: z.number(),
6525
- smile_score: z.number(),
6526
- facing_camera_score: z.number()
6509
+ size: external_exports.number(),
6510
+ eyes_open_score: external_exports.number(),
6511
+ smile_score: external_exports.number(),
6512
+ facing_camera_score: external_exports.number()
6527
6513
  });
6528
- var StoryboardItemImageFaceSchema = z.object({
6529
- score: z.number(),
6530
- boundingBox: z.object({
6531
- x: z.number(),
6532
- y: z.number(),
6533
- width: z.number(),
6534
- height: z.number()
6514
+ var StoryboardItemImageFaceSchema = external_exports.object({
6515
+ score: external_exports.number(),
6516
+ boundingBox: external_exports.object({
6517
+ x: external_exports.number(),
6518
+ y: external_exports.number(),
6519
+ width: external_exports.number(),
6520
+ height: external_exports.number()
6535
6521
  }),
6536
- size: z.number(),
6537
- eyesOpenScore: z.number(),
6538
- smileScore: z.number(),
6539
- facingCameraScore: z.number()
6522
+ size: external_exports.number(),
6523
+ eyesOpenScore: external_exports.number(),
6524
+ smileScore: external_exports.number(),
6525
+ facingCameraScore: external_exports.number()
6540
6526
  });
6541
- var StoryboardItemImageServerSchema = z.object({
6542
- id: z.string(),
6543
- url: z.string(),
6544
- category: z.string(),
6545
- aesthetic_score: z.number(),
6546
- faces: z.array(StoryboardItemImageFaceServerSchema),
6547
- roi: z.object({
6548
- x: z.number(),
6549
- y: z.number(),
6550
- width: z.number(),
6551
- height: z.number()
6527
+ var StoryboardItemImageServerSchema = external_exports.object({
6528
+ id: external_exports.string(),
6529
+ url: external_exports.string(),
6530
+ category: external_exports.string(),
6531
+ aesthetic_score: external_exports.number(),
6532
+ faces: external_exports.array(StoryboardItemImageFaceServerSchema),
6533
+ roi: external_exports.object({
6534
+ x: external_exports.number(),
6535
+ y: external_exports.number(),
6536
+ width: external_exports.number(),
6537
+ height: external_exports.number()
6552
6538
  }),
6553
- taken_at: z.number(),
6554
- width: z.number(),
6555
- height: z.number()
6539
+ taken_at: external_exports.number(),
6540
+ width: external_exports.number(),
6541
+ height: external_exports.number()
6556
6542
  });
6557
- var StoryboardItemImageSchema = z.object({
6558
- id: z.string(),
6559
- url: z.string(),
6560
- category: z.string(),
6561
- aestheticScore: z.number(),
6562
- faces: z.array(StoryboardItemImageFaceSchema),
6563
- roi: z.object({
6564
- x: z.number(),
6565
- y: z.number(),
6566
- width: z.number(),
6567
- height: z.number()
6543
+ var StoryboardItemImageSchema = external_exports.object({
6544
+ id: external_exports.string(),
6545
+ url: external_exports.string(),
6546
+ category: external_exports.string(),
6547
+ aestheticScore: external_exports.number(),
6548
+ faces: external_exports.array(StoryboardItemImageFaceSchema),
6549
+ roi: external_exports.object({
6550
+ x: external_exports.number(),
6551
+ y: external_exports.number(),
6552
+ width: external_exports.number(),
6553
+ height: external_exports.number()
6568
6554
  }),
6569
- takenAt: z.number(),
6570
- width: z.number(),
6571
- height: z.number()
6555
+ takenAt: external_exports.number(),
6556
+ width: external_exports.number(),
6557
+ height: external_exports.number()
6572
6558
  });
6573
- var StoryboardItemServerSchema = z.object({
6574
- id: z.string(),
6575
- sequence: z.number(),
6576
- book_id: z.string(),
6577
- similarity: z.number(),
6578
- duplicate: z.boolean(),
6579
- selected: z.boolean(),
6580
- surface_weight: z.number(),
6581
- front_cover: z.boolean().optional(),
6582
- back_cover: z.boolean().optional(),
6583
- scene: z.number(),
6584
- subscene: z.number(),
6585
- spine_break: z.boolean().optional(),
6559
+ var StoryboardItemServerSchema = external_exports.object({
6560
+ id: external_exports.string(),
6561
+ sequence: external_exports.number(),
6562
+ book_id: external_exports.string(),
6563
+ similarity: external_exports.number(),
6564
+ duplicate: external_exports.boolean(),
6565
+ selected: external_exports.boolean(),
6566
+ surface_weight: external_exports.number(),
6567
+ front_cover: external_exports.boolean().optional(),
6568
+ back_cover: external_exports.boolean().optional(),
6569
+ scene: external_exports.number(),
6570
+ subscene: external_exports.number(),
6571
+ spine_break: external_exports.boolean().optional(),
6586
6572
  image: StoryboardItemImageServerSchema
6587
6573
  });
6588
- var StoryboardItemSchema = z.object({
6589
- id: z.string(),
6590
- sequence: z.number(),
6591
- bookId: z.string(),
6592
- similarity: z.number(),
6593
- duplicate: z.boolean(),
6594
- selected: z.boolean(),
6595
- surfaceWeight: z.number(),
6596
- frontCover: z.boolean().optional(),
6597
- backCover: z.boolean().optional(),
6598
- scene: z.number(),
6599
- subscene: z.number(),
6600
- spineBreak: z.boolean().optional(),
6574
+ var StoryboardItemSchema = external_exports.object({
6575
+ id: external_exports.string(),
6576
+ sequence: external_exports.number(),
6577
+ bookId: external_exports.string(),
6578
+ similarity: external_exports.number(),
6579
+ duplicate: external_exports.boolean(),
6580
+ selected: external_exports.boolean(),
6581
+ surfaceWeight: external_exports.number(),
6582
+ frontCover: external_exports.boolean().optional(),
6583
+ backCover: external_exports.boolean().optional(),
6584
+ scene: external_exports.number(),
6585
+ subscene: external_exports.number(),
6586
+ spineBreak: external_exports.boolean().optional(),
6601
6587
  image: StoryboardItemImageSchema
6602
6588
  });
6603
6589
 
@@ -6613,7 +6599,7 @@ var StoryboardItemsEndpoints = class {
6613
6599
  const res = await this.engineAPI.fetcher.call({
6614
6600
  path: `/v1/storyboarditems/book/${bookId}`
6615
6601
  });
6616
- return z.array(StoryboardItemServerSchema).parse(res);
6602
+ return external_exports.array(StoryboardItemServerSchema).parse(res);
6617
6603
  });
6618
6604
  }
6619
6605
  };