@getmicdrop/venue-calendar 4.2.33 → 4.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +809 -809
  2. package/dist/{ArrowLeftIcon-B92-MN6-.js → ArrowLeftIcon-D2dcPIYB.js} +1 -1
  3. package/dist/{Badge-Bv_MT-Vt.js → Badge-Bk1dnG89.js} +1 -1
  4. package/dist/{BlockPlaceholder-DuE4xLS_.js → BlockPlaceholder-DJLtnBDw.js} +1 -1
  5. package/dist/{Calendar-CX3S7j_2.js → Calendar-CzvJjOKf.js} +19 -19
  6. package/dist/{CalendarFoundryView-CE5VMPRl.js → CalendarFoundryView-DWjYFSEw.js} +947 -947
  7. package/dist/{CalendarIcon-pJ01x71c.js → CalendarIcon-CkJFNFxp.js} +1 -1
  8. package/dist/{CartView-BZALykSb.js → CartView-DidUQzO-.js} +532 -532
  9. package/dist/{Checkout-B6BHEAwF.js → Checkout-1NyqTUI8.js} +129 -129
  10. package/dist/{Checkout-c6ExwNzk.js → Checkout-eIj6xGgL.js} +173 -173
  11. package/dist/{CheckoutTimer-Bz-HJhV2.js → CheckoutTimer-DFIHUIZl.js} +5 -5
  12. package/dist/{ChevronDownIcon-k93EaHQh.js → ChevronDownIcon-rsVUoX0r.js} +1 -1
  13. package/dist/{ClockIcon-hnrV9bwg.js → ClockIcon-CIwbKXZX.js} +1 -1
  14. package/dist/{CloseIcon-CdZ5mNTK.js → CloseIcon-B7HoEcON.js} +1 -1
  15. package/dist/{CollectionView-BMDKM-lg.js → CollectionView-Dt3NmdBh.js} +9 -10
  16. package/dist/{Event-DvRnmTdU.js → Event-B0hDsxnc.js} +85 -85
  17. package/dist/{EventPage-CTo8ynx6.js → EventPage-De-7chl3.js} +124 -125
  18. package/dist/{Heading-Dfo3bjyn.js → Heading-CQlZrwry.js} +1 -1
  19. package/dist/{Image-B3cEndLZ.js → Image-T6dKIfNx.js} +1 -1
  20. package/dist/{Input-BntIoPeV.js → Input-8KhoOdg-.js} +1 -1
  21. package/dist/{MailIcon-CMyjGJ4_.js → MailIcon-CSR5vhKU.js} +1 -1
  22. package/dist/{Modal-CpMs0l2W.js → Modal-D3Otve45.js} +2 -2
  23. package/dist/{ModalFooter-Kdyt5XyP.js → ModalFooter-fv8mC75I.js} +2 -2
  24. package/dist/{PasswordInput-C91gXtFY.js → PasswordInput-B_6cNrlw.js} +1 -1
  25. package/dist/{ScarcityBadge-C0YeWGkd.js → ScarcityBadge-CtHuWSRt.js} +23 -22
  26. package/dist/{SeriesPage-DNyhMA_k.js → SeriesPage-BFYmtgoi.js} +4 -4
  27. package/dist/{Spinner-BwiDys7C.js → Spinner-fFAXvj_B.js} +1 -1
  28. package/dist/{Success-BxvH6W_x.js → Success-BIVQOUqu.js} +52 -52
  29. package/dist/{TagIcon-BkPcpKdu.js → TagIcon-Do5sN8xR.js} +1 -1
  30. package/dist/ViewTicketsEmbed-CbbE-8EX.js +727 -0
  31. package/dist/{WarningCircleIcon-D78IFaPY.js → WarningCircleIcon-DuqytsVW.js} +1 -1
  32. package/dist/{WarningTriIcon-6WbGCso4.js → WarningTriIcon-CW-j3Vwq.js} +1 -1
  33. package/dist/{__SKIP_PATHS__-tAxwP7_6.js → __SKIP_PATHS__-Chv7DW7h.js} +1 -1
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.mjs +299 -209
  36. package/dist/api/gift-cards.d.ts +1 -1
  37. package/dist/api/orders.d.ts +2 -2
  38. package/dist/api/types.d.ts +554 -554
  39. package/dist/{colors-DbQNhbC_.js → colors-BND7shPA.js} +119 -117
  40. package/dist/constants-BYtFptYp.js +356 -0
  41. package/dist/{copyToClipboard-DAGJHhtn.js → copyToClipboard-CcwaUGGt.js} +1 -1
  42. package/dist/{de-BG-86m10.js → de-8N03rEoe.js} +4 -1
  43. package/dist/{de-BZpzzwT9.js → de-CgHrjezX.js} +57 -1
  44. package/dist/{timezones-C5l0SSHK.js → defaultLabels-CGMGBy-u.js} +501 -1
  45. package/dist/{es-9jwSoUSD.js → es-D6ThNLUc.js} +45 -1
  46. package/dist/{es-B1RPM3H_.js → es-tRMGbtbB.js} +4 -1
  47. package/dist/{event-v8d4wRpB.js → event-CbAGNxgd.js} +1 -1
  48. package/dist/{event-transform-lC22EDSL.js → event-transform-DnvOiDVn.js} +4 -4
  49. package/dist/{eventStatusStream-CopqZ2oa.js → eventStatusStream-BIn6Dzkw.js} +5 -5
  50. package/dist/{fr-B6FgrH9s.js → fr-DDnljtQz.js} +4 -1
  51. package/dist/{fr-fYY2O8Ab.js → fr-W0OOohju.js} +57 -1
  52. package/dist/{href-BH6l_kZx.js → href-D2-tmkMF.js} +2 -2
  53. package/dist/{i18n-CIVh_urJ.js → i18n-4k6uF1EX.js} +126 -126
  54. package/dist/i18n-FnFHQ5QU.js +28 -0
  55. package/dist/{id-CK7hal8E.js → id-BZshacSm.js} +4 -1
  56. package/dist/{id-But8qcA2.js → id-xgAFN1EH.js} +57 -1
  57. package/dist/{it-BdV8d4GZ.js → it-B6Rbpjec.js} +4 -1
  58. package/dist/{it-Cr9Quauw.js → it-BhuT9BcE.js} +57 -1
  59. package/dist/{ja-DKVQltc4.js → ja-Bmj-bPuM.js} +4 -1
  60. package/dist/{ja-CNXwg0_H.js → ja-yca07ASz.js} +57 -1
  61. package/dist/{ko-DtoIJliT.js → ko-Pfftd2u0.js} +57 -1
  62. package/dist/{ko-DpIk-4pN.js → ko-r-ecuHZ5.js} +4 -1
  63. package/dist/{labels-BUH8ouCu.js → labels-Cs7xp4ug.js} +1 -1
  64. package/dist/locales/{4.2.32 → 4.2.34}/flow/de.js +1 -1
  65. package/dist/locales/{4.2.32 → 4.2.34}/flow/es.js +1 -1
  66. package/dist/locales/{4.2.32 → 4.2.34}/flow/fr.js +1 -1
  67. package/dist/locales/{4.2.32 → 4.2.34}/flow/id.js +1 -1
  68. package/dist/locales/{4.2.32 → 4.2.34}/flow/it.js +1 -1
  69. package/dist/locales/{4.2.32 → 4.2.34}/flow/ja.js +1 -1
  70. package/dist/locales/{4.2.32 → 4.2.34}/flow/ko.js +1 -1
  71. package/dist/locales/{4.2.32 → 4.2.34}/flow/nl.js +1 -1
  72. package/dist/locales/{4.2.32 → 4.2.34}/flow/pl.js +1 -1
  73. package/dist/locales/{4.2.32 → 4.2.34}/flow/pt-br.js +1 -1
  74. package/dist/locales/{4.2.32 → 4.2.34}/flow/tr.js +1 -1
  75. package/dist/locales/{4.2.32 → 4.2.34}/flow/zh.js +1 -1
  76. package/dist/locales/{4.2.32 → 4.2.34}/main/de.js +1 -1
  77. package/dist/locales/{4.2.32 → 4.2.34}/main/es.js +1 -1
  78. package/dist/locales/{4.2.32 → 4.2.34}/main/fr.js +1 -1
  79. package/dist/locales/{4.2.32 → 4.2.34}/main/id.js +1 -1
  80. package/dist/locales/{4.2.32 → 4.2.34}/main/it.js +1 -1
  81. package/dist/locales/{4.2.32 → 4.2.34}/main/ja.js +1 -1
  82. package/dist/locales/{4.2.32 → 4.2.34}/main/ko.js +1 -1
  83. package/dist/locales/{4.2.32 → 4.2.34}/main/nl.js +1 -1
  84. package/dist/locales/{4.2.32 → 4.2.34}/main/pl.js +1 -1
  85. package/dist/locales/{4.2.32 → 4.2.34}/main/pt-br.js +1 -1
  86. package/dist/locales/{4.2.32 → 4.2.34}/main/tr.js +1 -1
  87. package/dist/locales/{4.2.32 → 4.2.34}/main/zh.js +1 -1
  88. package/dist/{modalManager.svelte-C4dWVCst.js → modalManager.svelte-vILq6Thx.js} +2 -2
  89. package/dist/{nl-Dbs4YQMw.js → nl-CQEhSA2l.js} +57 -1
  90. package/dist/{nl-C-dVfidI.js → nl-CS1da1Bc.js} +4 -1
  91. package/dist/{order-totals-CeeD6GjZ.js → order-totals-CSDXY65z.js} +31 -31
  92. package/dist/{orders-BuGy4vpJ.js → orders-CH2nnS3m.js} +365 -209
  93. package/dist/{phoneUtils-BDV9Eggn.js → phoneUtils-BtJ3FhMK.js} +1 -1
  94. package/dist/{pixels-D6vqcuy2.js → pixels-BK7PGnme.js} +11 -11
  95. package/dist/{pl-CnFcI33y.js → pl-C2bkE2WA.js} +4 -1
  96. package/dist/{pl-Da6lsZXQ.js → pl-CyWqKYE8.js} +57 -1
  97. package/dist/{promo-DtLZRskK.js → promo-Cy4LPBAC.js} +3 -3
  98. package/dist/{pt-br-6QYijxa0.js → pt-br--DIxBDjz.js} +4 -1
  99. package/dist/{pt-br-D1wHabRR.js → pt-br-BC2I7f8-.js} +57 -1
  100. package/dist/seo/types.d.ts +156 -156
  101. package/dist/{serverTotals-t2UmKkhC.js → serverTotals-C3VhWitQ.js} +1 -1
  102. package/dist/{shareCopyFeedback.svelte-B-M53Wj2.js → shareCopyFeedback.svelte-DTl5jJ2n.js} +55 -55
  103. package/dist/{showcase-state-options-VZcqIjpF.js → showcase-state-options-CeCdn8_C.js} +1 -1
  104. package/dist/{to-event-card-props-CpXtfoKx.js → to-event-card-props-BmsDr8T3.js} +31 -31
  105. package/dist/{tr-Pv_m8usO.js → tr-Bk7x5MW7.js} +4 -1
  106. package/dist/{tr-CpN50zWw.js → tr-CNjaJc_1.js} +57 -1
  107. package/dist/types/index.d.ts +509 -509
  108. package/dist/{utils-CtqaTDLB.js → utils-pF15CnBe.js} +49 -49
  109. package/dist/venue-calendar.es.js +710 -734
  110. package/dist/venue-calendar.iife.js +56 -57
  111. package/dist/venue-calendar.umd.js +54 -55
  112. package/dist/{zh-CAAnH4T4.js → zh-C8kyVh24.js} +4 -1
  113. package/dist/{zh-CwlRq_aG.js → zh-DOeb3_A1.js} +57 -1
  114. package/package.json +1 -1
  115. package/src/lib/theme.js +222 -222
  116. package/dist/ViewTicketsEmbed-DVurn8FG.js +0 -690
  117. package/dist/constants-ENlpIS8i.js +0 -822
  118. package/dist/createI18n-DBUVdZra.js +0 -75
@@ -1,7 +1,7 @@
1
1
  import { x as e } from "./Button-C4uFgl7L.js";
2
- import { E as t, F as n, O as r, c as i, g as a, h as o, m as s, s as c, w as l, y as u } from "./timezones-C5l0SSHK.js";
3
- import { T as d } from "./constants-ENlpIS8i.js";
4
- import { D as f, F as p, M as m, N as h, O as g, g as ee, k as _ } from "./orders-BuGy4vpJ.js";
2
+ import { D as t, I as n, T as r, _ as i, b as a, c as o, g as s, h as c, k as l, l as u } from "./defaultLabels-CGMGBy-u.js";
3
+ import { w as d } from "./constants-BYtFptYp.js";
4
+ import { A as f, F as p, I as m, M as h, R as g, c as ee, j as _, y as te } from "./orders-CH2nnS3m.js";
5
5
  //#region node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
6
6
  var v = {
7
7
  EVERYWHERE: 0,
@@ -18,12 +18,12 @@ function b(e) {
18
18
  function x(e, t) {
19
19
  return e.totalCapacity ?? e.quantity ?? t;
20
20
  }
21
- function te(e) {
22
- let n = t(), r = o(e.effectiveSalesBegin, e.salesBegin, e.saleStartDate) ?? null, i = o(e.effectiveSalesEnd, e.salesEnd, e.saleEndDate) ?? null, c = u(r), l = u(i);
23
- if (!a(r) && !c) return "scheduled";
24
- if (!a(i) && !l) return "sales_ended";
25
- if (c && s(n, c) < 0) return "scheduled";
26
- if (l && s(n, l) > 0) return "sales_ended";
21
+ function ne(e) {
22
+ let n = t(), r = s(e.effectiveSalesBegin, e.salesBegin, e.saleStartDate) ?? null, o = s(e.effectiveSalesEnd, e.salesEnd, e.saleEndDate) ?? null, l = a(r), u = a(o);
23
+ if (!i(r) && !l) return "scheduled";
24
+ if (!i(o) && !u) return "sales_ended";
25
+ if (l && c(n, l) < 0) return "scheduled";
26
+ if (u && c(n, u) > 0) return "sales_ended";
27
27
  if (e.soldOut === !0) return "sold_out";
28
28
  let d = b(e), f = x(e, d);
29
29
  return d === 0 ? "sold_out" : f > 0 && d / f < .1 ? "low" : "on_sale";
@@ -50,29 +50,29 @@ function C(e) {
50
50
  isSoldOut: t === 0
51
51
  };
52
52
  }
53
- function w(e) {
53
+ function re(e) {
54
54
  if (!Array.isArray(e) || e.length === 0) return 0;
55
55
  let t = e.map((e) => Number(e.price ?? e.ticketPrice)).filter((e) => Number.isFinite(e) && e > 0);
56
56
  return t.length > 0 ? Math.min(...t) : 0;
57
57
  }
58
58
  //#endregion
59
59
  //#region node_modules/@getmicdrop/svelte-components/dist/transforms/event.js
60
- function ne(e) {
60
+ function ie(e) {
61
61
  return e.availableTickets || e.available_tickets || e.tickets || [];
62
62
  }
63
- function T(e) {
63
+ function w(e) {
64
64
  if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= y.PROMO_ONLY) || e.salesChannel === v.BOX_OFFICE_ONLY) return !1;
65
- let n = t(), r = o(e.effectiveSalesBegin, e.salesBegin, e.salesStart, e.saleBegin, e.onSaleStart, e.saleStartDate), i = o(e.effectiveSalesEnd, e.salesEnd, e.saleEnd, e.onSaleEnd, e.saleEndDate), c = u(r), l = u(i);
66
- if (!a(r) && !c || !a(i) && !l || c && s(c, n) > 0 || l && s(l, n) < 0) return !1;
65
+ let n = t(), r = s(e.effectiveSalesBegin, e.salesBegin, e.salesStart, e.saleBegin, e.onSaleStart, e.saleStartDate), o = s(e.effectiveSalesEnd, e.salesEnd, e.saleEnd, e.onSaleEnd, e.saleEndDate), l = a(r), u = a(o);
66
+ if (!i(r) && !l || !i(o) && !u || l && c(l, n) > 0 || u && c(u, n) < 0) return !1;
67
67
  let d = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity;
68
68
  return !(e.soldOut || d != null && d <= 0);
69
69
  }
70
- function E(e) {
71
- return e ? e.hasHiddenTickets === !0 || ne(e).some(T) : !1;
70
+ function ae(e) {
71
+ return e ? e.hasHiddenTickets === !0 || ie(e).some(w) : !1;
72
72
  }
73
73
  //#endregion
74
74
  //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/NotFoundError.js
75
- var D = class extends l {
75
+ var T = class extends r {
76
76
  constructor(e, t) {
77
77
  let n = t ? `${e} with ID ${t} not found` : `${e} not found`;
78
78
  super(n, "NOT_FOUND", {
@@ -85,16 +85,16 @@ var D = class extends l {
85
85
  }), this.name = "NotFoundError", this.resourceType = e, this.resourceId = t;
86
86
  }
87
87
  getUserMessage(e) {
88
- return i(e)?.fromCode?.(this.code) || c(this.resourceType.toLowerCase());
88
+ return u(e)?.fromCode?.(this.code) || o(this.resourceType.toLowerCase());
89
89
  }
90
- }, O = e("VC");
91
- async function re(e, t) {
90
+ }, E = e("VC");
91
+ async function oe(e, t) {
92
92
  try {
93
93
  if (!t || !t.trim()) return {
94
94
  valid: !1,
95
95
  error: "Promo code is required"
96
96
  };
97
- let n = encodeURIComponent(t.trim()), r = await g(`/promo-codes/validate/${e}/${n}`);
97
+ let n = encodeURIComponent(t.trim()), r = await _(`/promo-codes/validate/${e}/${n}`);
98
98
  if (!r.success) return r.statusCode === 404 ? {
99
99
  valid: !1,
100
100
  error: "Invalid promo code"
@@ -115,31 +115,31 @@ async function re(e, t) {
115
115
  applyToTicketIds: i.applyToTicketIds
116
116
  };
117
117
  } catch (e) {
118
- return O.error("Error validating promo code:", e), {
118
+ return E.error("Error validating promo code:", e), {
119
119
  valid: !1,
120
120
  error: "Network error validating code"
121
121
  };
122
122
  }
123
123
  }
124
- async function ie(e) {
124
+ async function D(e) {
125
125
  try {
126
- let t = await g(`/promo-codes/check/${e}`);
126
+ let t = await _(`/promo-codes/check/${e}`);
127
127
  return !t.success || t.data.hasPromoCodes === !0;
128
128
  } catch (e) {
129
- return O.error("Error checking promo codes availability:", e), !0;
129
+ return E.error("Error checking promo codes availability:", e), !0;
130
130
  }
131
131
  }
132
- async function ae(e, t, n) {
132
+ async function O(e, t, n) {
133
133
  try {
134
134
  let r = { promoCode: t };
135
135
  n && Object.keys(n).length > 0 && (r.productQuantities = n);
136
- let i = await _(`${m()}/cart/${e}/apply-promo`, r);
136
+ let i = await h(`${p()}/cart/${e}/apply-promo`, r);
137
137
  return i.success ? { success: !0 } : {
138
138
  success: !1,
139
139
  error: i.error || "Failed to apply promo code"
140
140
  };
141
141
  } catch (e) {
142
- return O.error("Error applying promo code:", e), {
142
+ return E.error("Error applying promo code:", e), {
143
143
  success: !1,
144
144
  error: "Network error applying code"
145
145
  };
@@ -166,7 +166,7 @@ function j(e) {
166
166
  notFound: !0
167
167
  };
168
168
  }
169
- function oe(e, t) {
169
+ function se(e, t) {
170
170
  return e.ok ? e.data : t;
171
171
  }
172
172
  //#endregion
@@ -176,7 +176,7 @@ var M = "/api/v2/public", N = "/api/orders/v2/public", P = "/api/orders/v2", F =
176
176
  //#endregion
177
177
  //#region src/lib/api/events.ts
178
178
  var I = e("VC"), L = /* @__PURE__ */ new Map();
179
- async function se(e, t = fetch, n) {
179
+ async function ce(e, t = fetch, n) {
180
180
  let r = n ? `${e}:pw` : String(e);
181
181
  if (t === fetch) {
182
182
  let e = L.get(r);
@@ -184,7 +184,7 @@ async function se(e, t = fetch, n) {
184
184
  }
185
185
  let i = (async () => {
186
186
  try {
187
- let r = await t(n ? `${h()}/events/${e}?password=${encodeURIComponent(n)}` : `${h()}/events/${e}`);
187
+ let r = await t(n ? `${m()}/events/${e}?password=${encodeURIComponent(n)}` : `${m()}/events/${e}`);
188
188
  if (!r.ok) return r.status === 404 ? j("event_not_found") : (I.error(`Failed to fetch event details: ${r.status}`), A("event_fetch_failed"));
189
189
  let i = await r.json();
190
190
  return i ? k(i) : j("event_not_found");
@@ -196,76 +196,76 @@ async function se(e, t = fetch, n) {
196
196
  L.get(r) === i && L.delete(r);
197
197
  })), i;
198
198
  }
199
- async function ce(e, t = fetch, n) {
200
- let r = await se(e, t, n);
199
+ async function R(e, t = fetch, n) {
200
+ let r = await ce(e, t, n);
201
201
  return r.ok ? r.data : null;
202
202
  }
203
- async function R(e, t, n = (e) => e) {
203
+ async function z(e, t, n = (e) => e) {
204
204
  try {
205
- let r = await p(e);
205
+ let r = await g(e);
206
206
  return r ? k(n(r)) : (I.error(`Failed to load (${t}): network or server error`), A(t));
207
207
  } catch (e) {
208
208
  return I.error(`Error loading (${t}):`, e), A(t);
209
209
  }
210
210
  }
211
- function z(e) {
211
+ function B(e) {
212
212
  return Array.isArray(e) ? e : [];
213
213
  }
214
- async function B(e, t) {
214
+ async function V(e, t) {
215
215
  let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
216
- return R(`${h()}/tickets/event/${e}${r}`, "tickets_fetch_failed", z);
216
+ return z(`${m()}/tickets/event/${e}${r}`, "tickets_fetch_failed", B);
217
217
  }
218
- async function V(e, t) {
219
- return oe(await B(e, t), []);
218
+ async function H(e, t) {
219
+ return se(await V(e, t), []);
220
220
  }
221
- function H(e) {
221
+ function U(e) {
222
222
  return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
223
223
  }
224
- var U = /* @__PURE__ */ new Map();
225
- function W(e, t, n) {
224
+ var W = /* @__PURE__ */ new Map();
225
+ function G(e, t, n) {
226
226
  if (!n?.fresh) {
227
- let t = U.get(e);
227
+ let t = W.get(e);
228
228
  if (t) return t;
229
229
  }
230
- let r = R(e, t, (e) => H(e));
231
- return U.set(e, r), r.finally(() => {
232
- U.get(e) === r && U.delete(e);
230
+ let r = z(e, t, (e) => U(e));
231
+ return W.set(e, r), r.finally(() => {
232
+ W.get(e) === r && W.delete(e);
233
233
  }), r;
234
234
  }
235
- async function G(e, t, n, r) {
236
- return W(`${h()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
237
- }
238
235
  async function le(e, t, n, r) {
239
- return W(`${h()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
236
+ return G(`${m()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
240
237
  }
241
- async function ue(e, t) {
242
- return R(`${h()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
238
+ async function ue(e, t, n, r) {
239
+ return G(`${m()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
243
240
  }
244
241
  async function de(e, t) {
245
- let n = await ue(e, t);
246
- return n.ok ? n.data : null;
242
+ return z(`${m()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
247
243
  }
248
244
  async function fe(e, t) {
245
+ let n = await de(e, t);
246
+ return n.ok ? n.data : null;
247
+ }
248
+ async function pe(e, t) {
249
249
  try {
250
- let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await p(`${h()}/resolve/${encodeURIComponent(String(e))}${n}`);
251
- if (!r || !r.type) throw new D("entity", String(e));
250
+ let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await g(`${m()}/resolve/${encodeURIComponent(String(e))}${n}`);
251
+ if (!r || !r.type) throw new T("entity", String(e));
252
252
  return r;
253
253
  } catch (e) {
254
254
  return I.error("Error resolving public entity:", e), null;
255
255
  }
256
256
  }
257
- async function pe(e, t) {
257
+ async function me(e, t) {
258
258
  try {
259
- let n = t ? `${h()}/collections/${e}?password=${encodeURIComponent(t)}` : `${h()}/collections/${e}`, r = await p(n);
260
- if (!r) throw new D("collection", String(e));
259
+ let n = t ? `${m()}/collections/${e}?password=${encodeURIComponent(t)}` : `${m()}/collections/${e}`, r = await g(n);
260
+ if (!r) throw new T("collection", String(e));
261
261
  return r;
262
262
  } catch (e) {
263
263
  return I.error("Error fetching collection:", e), null;
264
264
  }
265
265
  }
266
- async function me(e, t) {
266
+ async function he(e, t) {
267
267
  try {
268
- let n = await p(`${h()}/events/${e}/check-password`, {
268
+ let n = await g(`${m()}/events/${e}/check-password`, {
269
269
  method: "POST",
270
270
  headers: { "Content-Type": "application/json" },
271
271
  body: JSON.stringify({ password: t })
@@ -278,10 +278,10 @@ async function me(e, t) {
278
278
  //#endregion
279
279
  //#region src/lib/api/venues.ts
280
280
  var K = e("VC");
281
- async function he(e) {
281
+ async function ge(e) {
282
282
  try {
283
283
  if (!e) return K.warn("getVenue called without venueId"), null;
284
- let t = await g(`/venues/${e}`);
284
+ let t = await _(`/venues/${e}`);
285
285
  return t.success ? t.data ?? null : (K.error(`Failed to fetch venue: ${t.statusCode}`), null);
286
286
  } catch (e) {
287
287
  return K.error("Error fetching venue:", e), null;
@@ -292,35 +292,35 @@ async function he(e) {
292
292
  function q(e, t) {
293
293
  return e == null || t(e);
294
294
  }
295
- function ge(e) {
295
+ function _e(e) {
296
296
  if (typeof e != "object" || !e) return !1;
297
297
  let t = e;
298
298
  return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && q(t.giftCardCode, (e) => typeof e == "string") && q(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && q(t.fullyCoveredByCard, (e) => typeof e == "boolean");
299
299
  }
300
- var _e = "We couldn't apply that gift card. Please try again.";
301
- function ve(e) {
302
- if (!ge(e)) return {
300
+ var ve = "We couldn't apply that gift card. Please try again.";
301
+ function ye(e) {
302
+ if (!_e(e)) return {
303
303
  valid: !1,
304
- error: _e
304
+ error: ve
305
305
  };
306
- let t = e, i = r(n(t.appliedAmount)), a = t.remainingTotal, o = t.fullyCoveredByCard ?? a <= 0, s = !o;
306
+ let t = e, r = l(n(t.appliedAmount)), i = t.remainingTotal, a = t.fullyCoveredByCard ?? i <= 0, o = !a;
307
307
  return {
308
308
  valid: !0,
309
309
  giftCardCode: t.giftCardCode ?? void 0,
310
- giftCardAmount: i,
310
+ giftCardAmount: r,
311
311
  giftCardBalance: t.giftCardBalance ?? void 0,
312
- paymentType: o ? "gift_card_only" : "split",
313
- stripeAmount: a,
314
- orderTotal: i + a,
315
- requiresStripe: s
312
+ paymentType: a ? "gift_card_only" : "split",
313
+ stripeAmount: i,
314
+ orderTotal: r + i,
315
+ requiresStripe: o
316
316
  };
317
317
  }
318
318
  //#endregion
319
319
  //#region src/lib/api/gift-cards.ts
320
320
  var J = e("VC");
321
- async function ye(e, t) {
321
+ async function be(e, t) {
322
322
  try {
323
- let n = await _(`${m()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
323
+ let n = await h(`${p()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
324
324
  if (!n.success) return n.statusCode === 429 ? {
325
325
  valid: !1,
326
326
  error: "Too many attempts. Please wait a moment and try again."
@@ -328,7 +328,7 @@ async function ye(e, t) {
328
328
  valid: !1,
329
329
  error: n.error || "Invalid gift card code"
330
330
  });
331
- let r = ve(n.data);
331
+ let r = ye(n.data);
332
332
  return r.valid || J.error("Apply gift card returned an unusable payload:", n.data), r;
333
333
  } catch (e) {
334
334
  return J.error("applyGiftCard error:", e), {
@@ -337,9 +337,9 @@ async function ye(e, t) {
337
337
  };
338
338
  }
339
339
  }
340
- async function be(e, t) {
340
+ async function xe(e, t) {
341
341
  try {
342
- let n = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, r = await f(`${m()}/cart/${e}/gift-card`, n ? { body: JSON.stringify(n) } : void 0);
342
+ let n = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, r = await f(`${p()}/cart/${e}/gift-card`, n ? { body: JSON.stringify(n) } : void 0);
343
343
  if (!r.success) return J.error("Remove gift card failed:", r.error), {
344
344
  success: !1,
345
345
  error: r.error || "Failed to remove gift card"
@@ -356,9 +356,10 @@ async function be(e, t) {
356
356
  };
357
357
  }
358
358
  }
359
- async function xe(e, t) {
359
+ async function Se(e, t, n) {
360
+ let r = ee(n);
360
361
  try {
361
- let n = await _(`${m()}/cart/${e}/complete-gift-card-payment`, {
362
+ let n = await h(`${p()}/cart/${e}/complete-gift-card-payment`, {
362
363
  customerName: d(t.firstName, t.lastName),
363
364
  customerEmail: t.email,
364
365
  firstName: t.firstName,
@@ -367,7 +368,8 @@ async function xe(e, t) {
367
368
  phoneNumber: t.phoneNumber || null,
368
369
  questionAnswer: t.questionAnswer || "",
369
370
  mailingList: t.mailingList || !1,
370
- attribution: ee()
371
+ attribution: te(),
372
+ ...r ? { locale: r } : {}
371
373
  });
372
374
  return n.success ? {
373
375
  success: !0,
@@ -386,25 +388,25 @@ async function xe(e, t) {
386
388
  }
387
389
  //#endregion
388
390
  //#region src/lib/api/waitlist.ts
389
- var Y = e("VC"), Se = {
391
+ var Y = e("VC"), Ce = {
390
392
  waitlist_not_enabled: "Waitlist is not available for this event",
391
393
  event_not_found: "Event not found",
392
394
  invalid_phone: "Please enter a valid phone number",
393
395
  already_purchased: "You have already purchased tickets for this event",
394
396
  phone_already_registered: "This phone number is already on the waitlist"
395
397
  };
396
- async function Ce(e, t, n = null, r = !1) {
398
+ async function we(e, t, n = null, r = !1) {
397
399
  try {
398
400
  let i = { email: t };
399
401
  n && r && (i.phone = n, i.smsOptIn = !0);
400
- let a = await _(`/events/${e}/waitlist`, i);
402
+ let a = await h(`/events/${e}/waitlist`, i);
401
403
  return a.success ? {
402
404
  success: !0,
403
405
  updated: a.data?.updated,
404
406
  position: a.data?.position
405
407
  } : (Y.error("Join waitlist failed:", a.error), {
406
408
  success: !1,
407
- error: Se[a.error ?? ""] || "Failed to join waitlist. Please try again."
409
+ error: Ce[a.error ?? ""] || "Failed to join waitlist. Please try again."
408
410
  });
409
411
  } catch (e) {
410
412
  return Y.error("joinWaitlist error:", e), {
@@ -413,9 +415,9 @@ async function Ce(e, t, n = null, r = !1) {
413
415
  };
414
416
  }
415
417
  }
416
- async function we(e, t) {
418
+ async function Te(e, t) {
417
419
  try {
418
- let n = await _(`/checkout/validate-token/${e}`, { email: t });
420
+ let n = await h(`/checkout/validate-token/${e}`, { email: t });
419
421
  return n.success ? {
420
422
  valid: !0,
421
423
  eventId: n.data?.eventId ?? 0,
@@ -433,9 +435,9 @@ async function we(e, t) {
433
435
  };
434
436
  }
435
437
  }
436
- async function Te(e, t) {
438
+ async function Ee(e, t) {
437
439
  try {
438
- let n = await _(`/waitlist/requeue/${e}`, { email: t });
440
+ let n = await h(`/waitlist/requeue/${e}`, { email: t });
439
441
  return n.success ? { success: !0 } : {
440
442
  success: !1,
441
443
  errorCode: n.error
@@ -447,14 +449,14 @@ async function Te(e, t) {
447
449
  };
448
450
  }
449
451
  }
450
- async function X(e) {
452
+ async function De(e) {
451
453
  let t = {
452
454
  waitlistEnabled: !1,
453
455
  soldOut: !1,
454
456
  gated: !1
455
457
  };
456
458
  try {
457
- let n = await g(`/events/${e}/waitlist/status`);
459
+ let n = await _(`/events/${e}/waitlist/status`);
458
460
  return n.success ? {
459
461
  waitlistEnabled: !!n.data?.waitlistEnabled,
460
462
  soldOut: !!n.data?.soldOut,
@@ -466,11 +468,11 @@ async function X(e) {
466
468
  }
467
469
  //#endregion
468
470
  //#region src/lib/constants/colors.ts
469
- var Ee = {
471
+ var Oe = {
470
472
  primary: "#0284fe",
471
473
  secondary: "#1d4ed8",
472
474
  tertiary: "#2563eb"
473
- }, Z = {
475
+ }, X = {
474
476
  50: "#f9fafb",
475
477
  100: "#f3f4f6",
476
478
  200: "#e5e7eb",
@@ -481,31 +483,31 @@ var Ee = {
481
483
  700: "#374151",
482
484
  800: "#1f2937",
483
485
  900: "#111827"
484
- }, Q = {
486
+ }, Z = {
485
487
  text: {
486
- primary: Z[900],
487
- secondary: Z[500],
488
- muted: Z[400],
488
+ primary: X[900],
489
+ secondary: X[500],
490
+ muted: X[400],
489
491
  inverted: "#ffffff"
490
492
  },
491
493
  background: {
492
494
  primary: "#ffffff",
493
- secondary: Z[50],
494
- tertiary: Z[100],
495
- dark: Z[800],
496
- darker: Z[900]
495
+ secondary: X[50],
496
+ tertiary: X[100],
497
+ dark: X[800],
498
+ darker: X[900]
497
499
  },
498
500
  border: {
499
- default: Z[200],
500
- strong: Z[300],
501
- muted: Z[100],
501
+ default: X[200],
502
+ strong: X[300],
503
+ muted: X[100],
502
504
  light: "#e0e0e0"
503
505
  },
504
506
  success: "#16a34a",
505
507
  error: "#ef4444",
506
508
  warning: "#f59e0b",
507
509
  info: "#3b82f6"
508
- }, $ = {
510
+ }, Q = {
509
511
  blue: {
510
512
  200: "#bfdbfe",
511
513
  500: "#3b82f6",
@@ -556,19 +558,19 @@ var Ee = {
556
558
  300: "#ffeaa7"
557
559
  },
558
560
  coral: "#ff6b6b"
559
- }, De = { defaultThemePrimary: "#7c3aed" }, Oe = {
560
- blue: Ee.tertiary,
561
+ }, $ = { defaultThemePrimary: "#7c3aed" }, ke = {
562
+ blue: Oe.tertiary,
561
563
  black: "#000000",
562
- darkGray: Z[700],
564
+ darkGray: X[700],
563
565
  gray: "#666666",
564
- lightGray: Z[400],
565
- white: Q.background.primary,
566
+ lightGray: X[400],
567
+ white: Z.background.primary,
566
568
  offWhite: "#fafafa",
567
- lightBorder: Z[200],
569
+ lightBorder: X[200],
568
570
  border: "#cccccc",
569
- orange: Q.warning,
570
- red: Q.error,
571
- green: $.green[500]
571
+ orange: Z.warning,
572
+ red: Z.error,
573
+ green: Q.green[500]
572
574
  };
573
575
  //#endregion
574
- export { S as A, ae as C, T as D, E, C as O, fe as S, re as T, B as _, Oe as a, G as b, Te as c, xe as d, be as f, V as g, ce as h, Q as i, w as j, te as k, we as l, me as m, De as n, X as o, he as p, Z as r, Ce as s, $ as t, ye as u, pe as v, ie as w, le as x, de as y };
576
+ export { S as A, O as C, w as D, ae as E, C as O, pe as S, oe as T, V as _, ke as a, le as b, Ee as c, Se as d, xe as f, H as g, R as h, Z as i, re as j, ne as k, Te as l, he as m, $ as n, De as o, ge as p, X as r, we as s, Q as t, be as u, me as v, D as w, ue as x, fe as y };