@getmicdrop/venue-calendar 4.0.68 → 4.0.70

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 (69) hide show
  1. package/dist/{CarouselView.legacy-DtlaKenI.js → CarouselView.legacy-CAtJAiSb.js} +3 -3
  2. package/dist/{CarouselView.legacy-DtlaKenI.js.map → CarouselView.legacy-CAtJAiSb.js.map} +1 -1
  3. package/dist/{CartView-xAVJT3Wf.js → CartView-CpA__vH7.js} +53 -53
  4. package/dist/{CartView-xAVJT3Wf.js.map → CartView-CpA__vH7.js.map} +1 -1
  5. package/dist/{Checkout-C8E5Q9nl.js → Checkout-Bm3yGYYr.js} +278 -273
  6. package/dist/Checkout-Bm3yGYYr.js.map +1 -0
  7. package/dist/{Checkout-WYIEsOZ0.js → Checkout-CRBwRTOc.js} +114 -114
  8. package/dist/{Checkout-WYIEsOZ0.js.map → Checkout-CRBwRTOc.js.map} +1 -1
  9. package/dist/{Checkout.legacy-Bjj390J_.js → Checkout.legacy-CpgxTxZl.js} +5 -5
  10. package/dist/{Checkout.legacy-Bjj390J_.js.map → Checkout.legacy-CpgxTxZl.js.map} +1 -1
  11. package/dist/{CheckoutTimer-DlnXHs-c.js → CheckoutTimer-SMZRnL_T.js} +2 -2
  12. package/dist/{CheckoutTimer-DlnXHs-c.js.map → CheckoutTimer-SMZRnL_T.js.map} +1 -1
  13. package/dist/{CollectionView-89AFwGuE.js → CollectionView-DgVzimMX.js} +5 -5
  14. package/dist/{CollectionView-89AFwGuE.js.map → CollectionView-DgVzimMX.js.map} +1 -1
  15. package/dist/{CollectionView.legacy-Czq6UrTZ.js → CollectionView.legacy-BTAS-mTd.js} +31 -31
  16. package/dist/{CollectionView.legacy-Czq6UrTZ.js.map → CollectionView.legacy-BTAS-mTd.js.map} +1 -1
  17. package/dist/{Event-DhvEjKVz.js → Event-BNVO_E6j.js} +145 -145
  18. package/dist/{Event-DhvEjKVz.js.map → Event-BNVO_E6j.js.map} +1 -1
  19. package/dist/{EventDetailsView-4f1xNl1a.js → EventDetailsView-CXvl9xwe.js} +140 -140
  20. package/dist/EventDetailsView-CXvl9xwe.js.map +1 -0
  21. package/dist/{EventPage-D75bt8XZ.js → EventPage-Dc4CtBeS.js} +5 -5
  22. package/dist/{EventPage-D75bt8XZ.js.map → EventPage-Dc4CtBeS.js.map} +1 -1
  23. package/dist/{EventPage.legacy-DU0ZcZg9.js → EventPage.legacy-D-9svuzb.js} +49 -49
  24. package/dist/{EventPage.legacy-DU0ZcZg9.js.map → EventPage.legacy-D-9svuzb.js.map} +1 -1
  25. package/dist/{FeaturedView.legacy-BgZu-R0y.js → FeaturedView.legacy-BKF3u2sH.js} +19 -19
  26. package/dist/{FeaturedView.legacy-BgZu-R0y.js.map → FeaturedView.legacy-BKF3u2sH.js.map} +1 -1
  27. package/dist/{GalleryCard-DdHqVAXD.js → GalleryCard-lNx3CEtB.js} +9 -9
  28. package/dist/{GalleryCard-DdHqVAXD.js.map → GalleryCard-lNx3CEtB.js.map} +1 -1
  29. package/dist/{GalleryView.legacy-F46Bwi9x.js → GalleryView.legacy-CMjIfp2b.js} +3 -3
  30. package/dist/{GalleryView.legacy-F46Bwi9x.js.map → GalleryView.legacy-CMjIfp2b.js.map} +1 -1
  31. package/dist/{GroupedListView.legacy-CLnOs7Ls.js → GroupedListView.legacy-BybmHzIV.js} +23 -23
  32. package/dist/{GroupedListView.legacy-CLnOs7Ls.js.map → GroupedListView.legacy-BybmHzIV.js.map} +1 -1
  33. package/dist/{OrderSummary-BYSCmf9h.js → OrderSummary-B1GhsUnc.js} +7 -7
  34. package/dist/{OrderSummary-BYSCmf9h.js.map → OrderSummary-B1GhsUnc.js.map} +1 -1
  35. package/dist/{PromoCodeInput-B8agz1bc.js → PromoCodeInput-CrXBD0oq.js} +30 -30
  36. package/dist/{PromoCodeInput-B8agz1bc.js.map → PromoCodeInput-CrXBD0oq.js.map} +1 -1
  37. package/dist/{SeriesPage-CH8STWTA.js → SeriesPage-DEDSbKuu.js} +5 -5
  38. package/dist/{SeriesPage-CH8STWTA.js.map → SeriesPage-DEDSbKuu.js.map} +1 -1
  39. package/dist/{SeriesPage.legacy-Cg5j7_1m.js → SeriesPage.legacy-BlqTBr4n.js} +38 -38
  40. package/dist/{SeriesPage.legacy-Cg5j7_1m.js.map → SeriesPage.legacy-BlqTBr4n.js.map} +1 -1
  41. package/dist/{Success-DMGAgbh-.js → Success-CD4K7aRv.js} +24 -24
  42. package/dist/{Success-DMGAgbh-.js.map → Success-CD4K7aRv.js.map} +1 -1
  43. package/dist/{Success.legacy-CY33Nix8.js → Success.legacy-B1Jvy8N0.js} +2 -2
  44. package/dist/{Success.legacy-CY33Nix8.js.map → Success.legacy-B1Jvy8N0.js.map} +1 -1
  45. package/dist/{VenueCalendar-H0gMPiFX.js → VenueCalendar-BoSdP7xI.js} +1472 -1457
  46. package/dist/{VenueCalendar-H0gMPiFX.js.map → VenueCalendar-BoSdP7xI.js.map} +1 -1
  47. package/dist/{ViewTicketsEmbed-DiGhZiyP.js → ViewTicketsEmbed-D1nD9zJY.js} +42 -42
  48. package/dist/{ViewTicketsEmbed-DiGhZiyP.js.map → ViewTicketsEmbed-D1nD9zJY.js.map} +1 -1
  49. package/dist/{WaitlistModal-CA8-Rcff.js → WaitlistModal-DWcbQmfW.js} +35 -35
  50. package/dist/{WaitlistModal-CA8-Rcff.js.map → WaitlistModal-DWcbQmfW.js.map} +1 -1
  51. package/dist/api/api.cjs +1 -1
  52. package/dist/api/api.cjs.map +1 -1
  53. package/dist/api/api.mjs +160 -157
  54. package/dist/api/api.mjs.map +1 -1
  55. package/dist/{api-IWcZsS94.js → api-CCKXC9Qs.js} +2 -2
  56. package/dist/{api-IWcZsS94.js.map → api-CCKXC9Qs.js.map} +1 -1
  57. package/dist/{data-toggle-store.svelte-D6pqR0Zt.js → data-toggle-store.svelte-CB6WLZEE.js} +2 -2
  58. package/dist/{data-toggle-store.svelte-D6pqR0Zt.js.map → data-toggle-store.svelte-CB6WLZEE.js.map} +1 -1
  59. package/dist/{transform-BPCR9pPY.js → transform-BrlBxayh.js} +6 -3
  60. package/dist/transform-BrlBxayh.js.map +1 -0
  61. package/dist/venue-calendar.es.js +1 -1
  62. package/dist/venue-calendar.iife.js +32 -32
  63. package/dist/venue-calendar.iife.js.map +1 -1
  64. package/dist/venue-calendar.umd.js +30 -30
  65. package/dist/venue-calendar.umd.js.map +1 -1
  66. package/package.json +1 -1
  67. package/dist/Checkout-C8E5Q9nl.js.map +0 -1
  68. package/dist/EventDetailsView-4f1xNl1a.js.map +0 -1
  69. package/dist/transform-BPCR9pPY.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import "svelte/internal/disclose-version";
2
- import { C as ge, g as pe, w as ue, D as me, G as Pe, x as ke, c as be, y as Ee, z as Ae, E as Fe, q as De, H as Ne, J as Oe, r as Re, K as je, N as ze, O as ve, P as ye, Q as Ge, R as Le, U as qe, V as Me } from "./VenueCalendar-H0gMPiFX.js";
2
+ import { C as ge, g as pe, w as ue, D as me, G as Ie, x as ke, c as be, y as Ee, z as Ae, E as Fe, q as De, H as Ne, J as Re, r as Oe, K as je, N as ze, O as Ge, P as ve, Q as ye, R as Le, U as qe, V as Me, X as Ue } from "./VenueCalendar-BoSdP7xI.js";
3
3
  import * as e from "svelte/internal/client";
4
4
  import "svelte/transition";
5
5
  import "svelte/easing";
6
- import { onMount as Ue } from "svelte";
7
- import { C as Ve } from "./Checkout-WYIEsOZ0.js";
6
+ import { onMount as Ve } from "svelte";
7
+ import { C as Be } from "./Checkout-CRBwRTOc.js";
8
8
  function oe(m) {
9
9
  "@babel/helpers - typeof";
10
10
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
@@ -13,43 +13,43 @@ function oe(m) {
13
13
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
14
14
  }, oe(m);
15
15
  }
16
- var xe = "clover", Be = function(t) {
16
+ var xe = "clover", We = function(t) {
17
17
  return t === 3 ? "v3" : t;
18
- }, Ce = "https://js.stripe.com", We = "".concat(Ce, "/").concat(xe, "/stripe.js"), Ke = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Je = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
19
- var Ye = function(t) {
20
- return Ke.test(t) || Je.test(t);
21
- }, He = function() {
18
+ }, Ce = "https://js.stripe.com", Ke = "".concat(Ce, "/").concat(xe, "/stripe.js"), Je = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Ye = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
19
+ var He = function(t) {
20
+ return Je.test(t) || Ye.test(t);
21
+ }, Xe = function() {
22
22
  for (var t = document.querySelectorAll('script[src^="'.concat(Ce, '"]')), s = 0; s < t.length; s++) {
23
- var l = t[s];
24
- if (Ye(l.src))
25
- return l;
23
+ var d = t[s];
24
+ if (He(d.src))
25
+ return d;
26
26
  }
27
27
  return null;
28
28
  }, he = function(t) {
29
- var s = "", l = document.createElement("script");
30
- l.src = "".concat(We).concat(s);
29
+ var s = "", d = document.createElement("script");
30
+ d.src = "".concat(Ke).concat(s);
31
31
  var o = document.head || document.body;
32
32
  if (!o)
33
33
  throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
34
- return o.appendChild(l), l;
35
- }, Xe = function(t, s) {
34
+ return o.appendChild(d), d;
35
+ }, Qe = function(t, s) {
36
36
  !t || !t._registerWrapper || t._registerWrapper({
37
37
  name: "stripe-js",
38
38
  version: "8.8.0",
39
39
  startTime: s
40
40
  });
41
- }, te = null, ie = null, se = null, Qe = function(t) {
41
+ }, te = null, ie = null, se = null, Ze = function(t) {
42
42
  return function(s) {
43
43
  t(new Error("Failed to load Stripe.js", {
44
44
  cause: s
45
45
  }));
46
46
  };
47
- }, Ze = function(t, s) {
47
+ }, $e = function(t, s) {
48
48
  return function() {
49
49
  window.Stripe ? t(window.Stripe) : s(new Error("Stripe.js not available"));
50
50
  };
51
- }, $e = function(t) {
52
- return te !== null ? te : (te = new Promise(function(s, l) {
51
+ }, et = function(t) {
52
+ return te !== null ? te : (te = new Promise(function(s, d) {
53
53
  if (typeof window > "u" || typeof document > "u") {
54
54
  s(null);
55
55
  return;
@@ -59,54 +59,54 @@ var Ye = function(t) {
59
59
  return;
60
60
  }
61
61
  try {
62
- var o = He();
62
+ var o = Xe();
63
63
  if (!(o && t)) {
64
64
  if (!o)
65
65
  o = he(t);
66
66
  else if (o && se !== null && ie !== null) {
67
- var v;
68
- o.removeEventListener("load", se), o.removeEventListener("error", ie), (v = o.parentNode) === null || v === void 0 || v.removeChild(o), o = he(t);
67
+ var y;
68
+ o.removeEventListener("load", se), o.removeEventListener("error", ie), (y = o.parentNode) === null || y === void 0 || y.removeChild(o), o = he(t);
69
69
  }
70
70
  }
71
- se = Ze(s, l), ie = Qe(l), o.addEventListener("load", se), o.addEventListener("error", ie);
71
+ se = $e(s, d), ie = Ze(d), o.addEventListener("load", se), o.addEventListener("error", ie);
72
72
  } catch (S) {
73
- l(S);
73
+ d(S);
74
74
  return;
75
75
  }
76
76
  }), te.catch(function(s) {
77
77
  return te = null, Promise.reject(s);
78
78
  }));
79
- }, et = function(t, s, l) {
79
+ }, tt = function(t, s, d) {
80
80
  if (t === null)
81
81
  return null;
82
82
  var o = s[0];
83
83
  if (typeof o != "string")
84
84
  throw new Error("Expected publishable key to be of type string, got type ".concat(oe(o), " instead."));
85
- var v = o.match(/^pk_test/), S = Be(t.version), x = xe;
86
- v && S !== x && console.warn("Stripe.js@".concat(S, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(x, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
87
- var T = t.apply(void 0, s);
88
- return Xe(T, l), T;
89
- }, re, Se = !1, Te = function() {
90
- return re || (re = $e(null).catch(function(t) {
85
+ var y = o.match(/^pk_test/), S = We(t.version), x = xe;
86
+ y && S !== x && console.warn("Stripe.js@".concat(S, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(x, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
87
+ var w = t.apply(void 0, s);
88
+ return Qe(w, d), w;
89
+ }, re, Se = !1, we = function() {
90
+ return re || (re = et(null).catch(function(t) {
91
91
  return re = null, Promise.reject(t);
92
92
  }), re);
93
93
  };
94
94
  Promise.resolve().then(function() {
95
- return Te();
95
+ return we();
96
96
  }).catch(function(m) {
97
97
  Se || console.warn(m);
98
98
  });
99
- var tt = function() {
100
- for (var t = arguments.length, s = new Array(t), l = 0; l < t; l++)
101
- s[l] = arguments[l];
99
+ var rt = function() {
100
+ for (var t = arguments.length, s = new Array(t), d = 0; d < t; d++)
101
+ s[d] = arguments[d];
102
102
  Se = !0;
103
103
  var o = Date.now();
104
- return Te().then(function(v) {
105
- return et(v, s, o);
104
+ return we().then(function(y) {
105
+ return tt(y, s, o);
106
106
  });
107
107
  };
108
108
  function ae(m) {
109
- const t = m?.code || m?.decline_code || "", s = m?.type || "", l = m?.message || "";
109
+ const t = m?.code || m?.decline_code || "", s = m?.type || "", d = m?.message || "";
110
110
  if (t === "card_declined" || s === "card_error") {
111
111
  const o = m?.decline_code || "";
112
112
  return o === "insufficient_funds" ? {
@@ -135,7 +135,7 @@ function ae(m) {
135
135
  retryable: !0
136
136
  };
137
137
  }
138
- return s === "api_connection_error" || l.includes("network") || l.includes("connection") ? {
138
+ return s === "api_connection_error" || d.includes("network") || d.includes("connection") ? {
139
139
  type: "network",
140
140
  title: "Connection error",
141
141
  message: "We couldn't connect to the payment server.",
@@ -168,193 +168,193 @@ function ae(m) {
168
168
  } : {
169
169
  type: "general",
170
170
  title: "Payment failed",
171
- message: l || "Something went wrong with your payment.",
171
+ message: d || "Something went wrong with your payment.",
172
172
  suggestion: "Please try again or use a different payment method.",
173
173
  retryable: !0
174
174
  };
175
175
  }
176
176
  const _e = be("GiftCardInput");
177
- var rt = e.from_html('<span class="gc-spinner gc-spinner-sm svelte-emw0hd"></span>'), at = e.from_html('<div class="full-coverage-badge svelte-emw0hd"><!> <span> </span></div>'), nt = e.from_html('<div class="flex justify-between items-center text-sm mt-1.5"><span class="text-text-secondary"> </span> <span class="font-medium text-text-primary"> </span></div>'), it = e.from_html('<div class="applied-card svelte-emw0hd"><div class="flex items-center gap-3"><div class="applied-icon svelte-emw0hd"><!></div> <div class="flex flex-col flex-1"><span class="text-xs text-status-success-text font-medium"> </span> <span class="text-sm font-mono text-text-primary"> </span></div> <button class="remove-btn svelte-emw0hd"><!></button></div> <div class="applied-details svelte-emw0hd"><div class="flex justify-between items-center text-sm"><span class="text-text-secondary"> </span> <span class="font-medium text-accent-success"> </span></div> <!></div></div>'), st = e.from_html('<span class="gc-spinner svelte-emw0hd"></span>'), ot = e.from_html('<div class="flex items-center gap-1.5 mt-2 text-sm text-accent-danger"><!> <span> </span></div>'), lt = e.from_html('<div class="input-section svelte-emw0hd"><div class="flex gap-2"><input type="text" name="giftCardCode" autocomplete="off" autocapitalize="characters"/> <button class="apply-btn svelte-emw0hd"><!></button></div> <!></div>'), dt = e.from_html('<button class="gift-card-toggle svelte-emw0hd"><!> <span> </span> <span class="toggle-indicator svelte-emw0hd"> </span></button> <!>', 1), ct = e.from_html('<div class="mb-4"><!></div>');
178
- function ut(m, t) {
177
+ var at = e.from_html('<span class="gc-spinner gc-spinner-sm svelte-emw0hd"></span>'), nt = e.from_html('<div class="full-coverage-badge svelte-emw0hd"><!> <span> </span></div>'), it = e.from_html('<div class="flex justify-between items-center text-sm mt-1.5"><span class="text-text-secondary"> </span> <span class="font-medium text-text-primary"> </span></div>'), st = e.from_html('<div class="applied-card svelte-emw0hd"><div class="flex items-center gap-3"><div class="applied-icon svelte-emw0hd"><!></div> <div class="flex flex-col flex-1"><span class="text-xs text-status-success-text font-medium"> </span> <span class="text-sm font-mono text-text-primary"> </span></div> <button class="remove-btn svelte-emw0hd"><!></button></div> <div class="applied-details svelte-emw0hd"><div class="flex justify-between items-center text-sm"><span class="text-text-secondary"> </span> <span class="font-medium text-accent-success"> </span></div> <!></div></div>'), ot = e.from_html('<span class="gc-spinner svelte-emw0hd"></span>'), lt = e.from_html('<div class="flex items-center gap-1.5 mt-2 text-sm text-accent-danger"><!> <span> </span></div>'), dt = e.from_html('<div class="input-section svelte-emw0hd"><div class="flex gap-2"><input type="text" name="giftCardCode" autocomplete="off" autocapitalize="characters"/> <button class="apply-btn svelte-emw0hd"><!></button></div> <!></div>'), ct = e.from_html('<button class="gift-card-toggle svelte-emw0hd"><!> <span> </span> <span class="toggle-indicator svelte-emw0hd"> </span></button> <!>', 1), ut = e.from_html('<div class="mb-4"><!></div>');
178
+ function mt(m, t) {
179
179
  e.push(t, !0);
180
180
  let s = e.prop(t, "onApplied", 3, () => {
181
- }), l = e.prop(t, "onRemoved", 3, () => {
182
- }), o = e.prop(t, "disabled", 3, !1), v = e.prop(t, "labels", 19, () => ({})), S = e.state(""), x = e.state(!1), T = e.state(""), I = e.state(null), h = e.state(!1);
181
+ }), d = e.prop(t, "onRemoved", 3, () => {
182
+ }), o = e.prop(t, "disabled", 3, !1), y = e.prop(t, "labels", 19, () => ({})), S = e.state(""), x = e.state(!1), w = e.state(""), P = e.state(null), h = e.state(!1);
183
183
  async function U() {
184
184
  if (!(!e.get(S).trim() || e.get(x) || !t.cartId)) {
185
- e.set(x, !0), e.set(T, "");
185
+ e.set(x, !0), e.set(w, "");
186
186
  try {
187
- const d = await Ae(t.cartId, e.get(S).trim().toUpperCase());
188
- d.valid ? (e.set(
189
- I,
187
+ const l = await Ae(t.cartId, e.get(S).trim().toUpperCase());
188
+ l.valid ? (e.set(
189
+ P,
190
190
  {
191
- code: d.giftCardCode || e.get(S).trim().toUpperCase(),
192
- giftCardAmount: d.giftCardAmount,
193
- giftCardBalance: d.giftCardBalance,
194
- paymentType: d.paymentType,
195
- stripeAmount: d.stripeAmount,
196
- orderTotal: d.orderTotal,
197
- requiresStripe: d.requiresStripe
191
+ code: l.giftCardCode || e.get(S).trim().toUpperCase(),
192
+ giftCardAmount: l.giftCardAmount,
193
+ giftCardBalance: l.giftCardBalance,
194
+ paymentType: l.paymentType,
195
+ stripeAmount: l.stripeAmount,
196
+ orderTotal: l.orderTotal,
197
+ requiresStripe: l.requiresStripe
198
198
  },
199
199
  !0
200
- ), e.set(S, ""), e.set(h, !1), s()(e.get(I))) : e.set(T, d.error || v().invalidGiftCardCode || "Invalid gift card code", !0);
201
- } catch (d) {
202
- _e.error("Error applying gift card:", d), e.set(T, v().failedToApplyGiftCard || "Failed to apply gift card. Please try again.", !0);
200
+ ), e.set(S, ""), e.set(h, !1), s()(e.get(P))) : e.set(w, l.error || y().invalidGiftCardCode || "Invalid gift card code", !0);
201
+ } catch (l) {
202
+ _e.error("Error applying gift card:", l), e.set(w, y().failedToApplyGiftCard || "Failed to apply gift card. Please try again.", !0);
203
203
  }
204
204
  e.set(x, !1);
205
205
  }
206
206
  }
207
207
  async function le() {
208
208
  if (!(e.get(x) || !t.cartId)) {
209
- e.set(x, !0), e.set(T, "");
209
+ e.set(x, !0), e.set(w, "");
210
210
  try {
211
- const d = await ke(t.cartId);
212
- if (d.error)
213
- e.set(T, d.error, !0);
211
+ const l = await ke(t.cartId);
212
+ if (l.error)
213
+ e.set(w, l.error, !0);
214
214
  else {
215
- const A = e.get(I);
216
- e.set(I, null), e.set(h, !1), l()(A);
215
+ const A = e.get(P);
216
+ e.set(P, null), e.set(h, !1), d()(A);
217
217
  }
218
- } catch (d) {
219
- _e.error("Error removing gift card:", d), e.set(T, v().failedToRemoveGiftCard || "Failed to remove gift card. Please try again.", !0);
218
+ } catch (l) {
219
+ _e.error("Error removing gift card:", l), e.set(w, y().failedToRemoveGiftCard || "Failed to remove gift card. Please try again.", !0);
220
220
  }
221
221
  e.set(x, !1);
222
222
  }
223
223
  }
224
- function ne(d) {
225
- d.key === "Enter" && !e.get(x) && U();
224
+ function ne(l) {
225
+ l.key === "Enter" && !e.get(x) && U();
226
226
  }
227
227
  function C() {
228
- e.get(I) || (e.set(h, !e.get(h)), e.get(h) || (e.set(S, ""), e.set(T, "")));
228
+ e.get(P) || (e.set(h, !e.get(h)), e.get(h) || (e.set(S, ""), e.set(w, "")));
229
229
  }
230
- var y = ct(), R = e.child(y);
230
+ var p = ut(), j = e.child(p);
231
231
  {
232
- var K = (d) => {
233
- var A = it(), _ = e.child(A), F = e.child(_), j = e.child(F);
234
- ge(j, { size: 16 }), e.reset(F);
235
- var D = e.sibling(F, 2), p = e.child(D), J = e.child(p, !0);
236
- e.reset(p);
237
- var V = e.sibling(p, 2), M = e.child(V, !0);
232
+ var K = (l) => {
233
+ var A = st(), _ = e.child(A), F = e.child(_), z = e.child(F);
234
+ ge(z, { size: 16 }), e.reset(F);
235
+ var D = e.sibling(F, 2), v = e.child(D), J = e.child(v, !0);
236
+ e.reset(v);
237
+ var V = e.sibling(v, 2), M = e.child(V, !0);
238
238
  e.reset(V), e.reset(D);
239
- var f = e.sibling(D, 2), P = e.child(f);
239
+ var f = e.sibling(D, 2), I = e.child(f);
240
240
  {
241
241
  var L = (b) => {
242
- var k = rt();
242
+ var k = at();
243
243
  e.append(b, k);
244
244
  }, N = (b) => {
245
245
  Ee(b, { size: 16 });
246
246
  };
247
- e.if(P, (b) => {
247
+ e.if(I, (b) => {
248
248
  e.get(x) ? b(L) : b(N, !1);
249
249
  });
250
250
  }
251
251
  e.reset(f), e.reset(_);
252
- var B = e.sibling(_, 2), z = e.child(B), W = e.child(z), Z = e.child(W, !0);
252
+ var B = e.sibling(_, 2), G = e.child(B), W = e.child(G), Z = e.child(W, !0);
253
253
  e.reset(W);
254
254
  var Y = e.sibling(W, 2), $ = e.child(Y);
255
- e.reset(Y), e.reset(z);
256
- var ee = e.sibling(z, 2);
255
+ e.reset(Y), e.reset(G);
256
+ var ee = e.sibling(G, 2);
257
257
  {
258
- var w = (b) => {
259
- var k = at(), O = e.child(k);
260
- ge(O, { size: 16 });
261
- var H = e.sibling(O, 2), X = e.child(H, !0);
262
- e.reset(H), e.reset(k), e.template_effect(() => e.set_text(X, v().fullyCoveredByGiftCard || "Fully covered by gift card")), e.append(b, k);
258
+ var T = (b) => {
259
+ var k = nt(), R = e.child(k);
260
+ ge(R, { size: 16 });
261
+ var H = e.sibling(R, 2), X = e.child(H, !0);
262
+ e.reset(H), e.reset(k), e.template_effect(() => e.set_text(X, y().fullyCoveredByGiftCard || "Fully covered by gift card")), e.append(b, k);
263
263
  }, E = (b) => {
264
- var k = nt(), O = e.child(k), H = e.child(O, !0);
265
- e.reset(O);
266
- var X = e.sibling(O, 2), de = e.child(X, !0);
264
+ var k = it(), R = e.child(k), H = e.child(R, !0);
265
+ e.reset(R);
266
+ var X = e.sibling(R, 2), de = e.child(X, !0);
267
267
  e.reset(X), e.reset(k), e.template_effect(
268
268
  (ce) => {
269
- e.set_text(H, v().remainingToPay || "Remaining to pay"), e.set_text(de, ce);
269
+ e.set_text(H, y().remainingToPay || "Remaining to pay"), e.set_text(de, ce);
270
270
  },
271
- [() => pe(e.get(I).stripeAmount)]
271
+ [() => pe(e.get(P).stripeAmount)]
272
272
  ), e.append(b, k);
273
273
  };
274
274
  e.if(ee, (b) => {
275
- e.get(I).paymentType === "gift_card_only" ? b(w) : e.get(I).paymentType === "split" && b(E, 1);
275
+ e.get(P).paymentType === "gift_card_only" ? b(T) : e.get(P).paymentType === "split" && b(E, 1);
276
276
  });
277
277
  }
278
278
  e.reset(B), e.reset(A), e.template_effect(
279
279
  (b) => {
280
- e.set_text(J, v().giftCardApplied || "Gift card applied"), e.set_text(M, e.get(I).code), f.disabled = e.get(x) || o(), e.set_attribute(f, "aria-label", v().removeGiftCard || "Remove gift card"), e.set_text(Z, v().appliedToOrder || "Applied to order"), e.set_text($, `-${b ?? ""}`);
280
+ e.set_text(J, y().giftCardApplied || "Gift card applied"), e.set_text(M, e.get(P).code), f.disabled = e.get(x) || o(), e.set_attribute(f, "aria-label", y().removeGiftCard || "Remove gift card"), e.set_text(Z, y().appliedToOrder || "Applied to order"), e.set_text($, `-${b ?? ""}`);
281
281
  },
282
- [() => pe(e.get(I).giftCardAmount)]
283
- ), e.delegated("click", f, le), e.transition(3, A, () => ue, () => ({ duration: me.fast })), e.append(d, A);
284
- }, q = (d) => {
285
- var A = dt(), _ = e.first_child(A), F = e.child(_);
286
- Pe(F, { size: 20, class: "gift-icon" });
287
- var j = e.sibling(F, 2), D = e.child(j, !0);
288
- e.reset(j);
289
- var p = e.sibling(j, 2), J = e.child(p, !0);
290
- e.reset(p), e.reset(_);
282
+ [() => pe(e.get(P).giftCardAmount)]
283
+ ), e.delegated("click", f, le), e.transition(3, A, () => ue, () => ({ duration: me.fast })), e.append(l, A);
284
+ }, q = (l) => {
285
+ var A = ct(), _ = e.first_child(A), F = e.child(_);
286
+ Ie(F, { size: 20, class: "gift-icon" });
287
+ var z = e.sibling(F, 2), D = e.child(z, !0);
288
+ e.reset(z);
289
+ var v = e.sibling(z, 2), J = e.child(v, !0);
290
+ e.reset(v), e.reset(_);
291
291
  var V = e.sibling(_, 2);
292
292
  {
293
293
  var M = (f) => {
294
- var P = lt(), L = e.child(P), N = e.child(L);
294
+ var I = dt(), L = e.child(I), N = e.child(L);
295
295
  e.remove_input_defaults(N);
296
296
  let B;
297
- var z = e.sibling(N, 2), W = e.child(z);
297
+ var G = e.sibling(N, 2), W = e.child(G);
298
298
  {
299
- var Z = (w) => {
300
- var E = st();
301
- e.append(w, E);
302
- }, Y = (w) => {
299
+ var Z = (T) => {
300
+ var E = ot();
301
+ e.append(T, E);
302
+ }, Y = (T) => {
303
303
  var E = e.text();
304
- e.template_effect(() => e.set_text(E, v().apply || "Apply")), e.append(w, E);
304
+ e.template_effect(() => e.set_text(E, y().apply || "Apply")), e.append(T, E);
305
305
  };
306
- e.if(W, (w) => {
307
- e.get(x) ? w(Z) : w(Y, !1);
306
+ e.if(W, (T) => {
307
+ e.get(x) ? T(Z) : T(Y, !1);
308
308
  });
309
309
  }
310
- e.reset(z), e.reset(L);
310
+ e.reset(G), e.reset(L);
311
311
  var $ = e.sibling(L, 2);
312
312
  {
313
- var ee = (w) => {
314
- var E = ot(), b = e.child(E);
313
+ var ee = (T) => {
314
+ var E = lt(), b = e.child(E);
315
315
  Fe(b, { size: 16 });
316
- var k = e.sibling(b, 2), O = e.child(k, !0);
317
- e.reset(k), e.reset(E), e.template_effect(() => e.set_text(O, e.get(T))), e.transition(3, E, () => ue, () => ({ duration: me.micro })), e.append(w, E);
316
+ var k = e.sibling(b, 2), R = e.child(k, !0);
317
+ e.reset(k), e.reset(E), e.template_effect(() => e.set_text(R, e.get(w))), e.transition(3, E, () => ue, () => ({ duration: me.micro })), e.append(T, E);
318
318
  };
319
- e.if($, (w) => {
320
- e.get(T) && w(ee);
319
+ e.if($, (T) => {
320
+ e.get(w) && T(ee);
321
321
  });
322
322
  }
323
- e.reset(P), e.template_effect(
324
- (w) => {
325
- e.set_attribute(N, "aria-label", v().enterGiftCardCode || "Enter gift card code"), e.set_attribute(N, "placeholder", v().enterGiftCardCode || "Enter gift card code"), N.disabled = e.get(x) || o(), B = e.set_class(N, 1, "gift-input svelte-emw0hd", null, B, { "has-error": !!e.get(T) }), z.disabled = w;
323
+ e.reset(I), e.template_effect(
324
+ (T) => {
325
+ e.set_attribute(N, "aria-label", y().enterGiftCardCode || "Enter gift card code"), e.set_attribute(N, "placeholder", y().enterGiftCardCode || "Enter gift card code"), N.disabled = e.get(x) || o(), B = e.set_class(N, 1, "gift-input svelte-emw0hd", null, B, { "has-error": !!e.get(w) }), G.disabled = T;
326
326
  },
327
327
  [() => !e.get(S).trim() || e.get(x) || o()]
328
- ), e.delegated("keydown", N, ne), e.bind_value(N, () => e.get(S), (w) => e.set(S, w)), e.delegated("click", z, U), e.transition(3, P, () => ue, () => ({ duration: me.fast })), e.append(f, P);
328
+ ), e.delegated("keydown", N, ne), e.bind_value(N, () => e.get(S), (T) => e.set(S, T)), e.delegated("click", G, U), e.transition(3, I, () => ue, () => ({ duration: me.fast })), e.append(f, I);
329
329
  };
330
330
  e.if(V, (f) => {
331
331
  e.get(h) && f(M);
332
332
  });
333
333
  }
334
334
  e.template_effect(() => {
335
- _.disabled = o(), e.set_attribute(_, "aria-expanded", e.get(h)), e.set_text(D, v().haveAGiftCard || "Have a gift card?"), e.set_text(J, e.get(h) ? "-" : "+");
336
- }), e.delegated("click", _, C), e.append(d, A);
335
+ _.disabled = o(), e.set_attribute(_, "aria-expanded", e.get(h)), e.set_text(D, y().haveAGiftCard || "Have a gift card?"), e.set_text(J, e.get(h) ? "-" : "+");
336
+ }), e.delegated("click", _, C), e.append(l, A);
337
337
  };
338
- e.if(R, (d) => {
339
- e.get(I) ? d(K) : d(q, !1);
338
+ e.if(j, (l) => {
339
+ e.get(P) ? l(K) : l(q, !1);
340
340
  });
341
341
  }
342
- e.reset(y), e.append(m, y), e.pop();
342
+ e.reset(p), e.append(m, p), e.pop();
343
343
  }
344
344
  e.delegate(["click", "keydown"]);
345
- const G = be("Checkout");
346
- var mt = e.from_html('<div class="max-w-6xl mx-auto px-4 md:px-6 -mt-4 mb-8"><!></div>'), ft = e.from_html("<!> <!>", 1), gt = e.from_html('<div class="p-8 text-center"><p class="text-accent-danger"> </p></div>'), pt = e.from_html('<div class="p-8 text-center"><p class="text-muted-foreground"> </p></div>');
347
- function vt(m, t) {
345
+ const O = be("Checkout");
346
+ var ft = e.from_html('<div class="max-w-6xl mx-auto px-4 md:px-6 -mt-4 mb-8"><!></div>'), gt = e.from_html("<!> <!>", 1), pt = e.from_html('<div class="p-8 text-center"><p class="text-accent-danger"> </p></div>'), vt = e.from_html('<div class="p-8 text-center"><p class="text-muted-foreground"> </p></div>');
347
+ function yt(m, t) {
348
348
  e.push(t, !0);
349
- let s = e.state(!1), l = e.state(null);
349
+ let s = e.state(!1), d = e.state(null);
350
350
  typeof window < "u" && new URLSearchParams(window.location.search).get("legacy") === "1" && e.set(s, !0), e.user_effect(() => {
351
- e.get(s) && !e.get(l) && (G.warn("[VC] DEPRECATED: ?legacy=1 fallback for Checkout retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md."), import("./Checkout.legacy-Bjj390J_.js").then((r) => {
352
- e.set(l, r.default, !0);
351
+ e.get(s) && !e.get(d) && (O.warn("[VC] DEPRECATED: ?legacy=1 fallback for Checkout retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md."), import("./Checkout.legacy-CpgxTxZl.js").then((r) => {
352
+ e.set(d, r.default, !0);
353
353
  }).catch(() => {
354
354
  e.set(s, !1);
355
355
  }));
356
356
  });
357
- let o = e.prop(t, "availableTickets", 23, () => []), v = e.prop(t, "value", 3, ""), S = e.prop(t, "venueId", 3, ""), x = e.prop(t, "organizationId", 3, ""), T = e.prop(t, "onNavigateBack", 3, void 0), I = e.prop(t, "initialError", 3, void 0), h = e.prop(t, "labels", 19, () => ({})), U = e.derived(() => (t.data || {}).id);
357
+ let o = e.prop(t, "availableTickets", 23, () => []), y = e.prop(t, "value", 3, ""), S = e.prop(t, "venueId", 3, ""), x = e.prop(t, "organizationId", 3, ""), w = e.prop(t, "onNavigateBack", 3, void 0), P = e.prop(t, "initialError", 3, void 0), h = e.prop(t, "labels", 19, () => ({})), U = e.derived(() => (t.data || {}).id);
358
358
  e.derived(() => (t.data || {}).orgSlug);
359
359
  let le = e.derived(() => (t.data || {}).slug), ne = e.derived(() => (t.data || {}).event), C = e.derived(() => e.get(ne) ? De(e.get(ne)) : t.data && (t.data.id || e.get(U)) ? {
360
360
  id: t.data.id || e.get(U),
@@ -364,17 +364,17 @@ function vt(m, t) {
364
364
  eventTicketingType: 0,
365
365
  ticketType: 0,
366
366
  availableTickets: []
367
- } : null), y = e.state(""), R = e.state(e.proxy({})), K = e.state(e.proxy({})), q = e.state(e.proxy([])), d = e.state(""), A = e.state(0), _ = e.state(!1), F = e.state(null), j = e.state(""), D = e.state(void 0), p = e.state(""), J = e.state(!1), V = e.state(""), M = e.state(null), f = e.state(null), P = null;
368
- Ue(async () => {
369
- if (e.set(y, Ne(Me.CHECKOUT_CARTID), !0), !e.get(y)) {
367
+ } : null), p = e.state(""), j = e.state(e.proxy({})), K = e.state(e.proxy({})), q = e.state(e.proxy([])), l = e.state(""), A = e.state(0), _ = e.state(!1), F = e.state(null), z = e.state(""), D = e.state(void 0), v = e.state(""), J = e.state(!1), V = e.state(""), M = e.state(null), f = e.state(null), I = null;
368
+ Ve(async () => {
369
+ if (e.set(p, Ne(Ue.CHECKOUT_CARTID), !0), !e.get(p)) {
370
370
  e.set(J, !0), e.set(V, h().noCheckoutSession || "No checkout session found. Please select tickets first.", !0);
371
371
  return;
372
372
  }
373
373
  try {
374
- const n = Oe(e.get(C)?.eventID || e.get(C)?.id || e.get(U));
375
- e.set(R, n.quantities || {}, !0), e.set(K, n.donationAmounts || {}, !0), e.set(d, n.promocode || "", !0), e.set(A, n.promoDiscountAmount || 0, !0), e.set(q, n.tickets || [], !0);
376
- } catch (n) {
377
- G.error("Error loading checkout state:", n), e.set(R, {}, !0), e.set(q, [], !0);
374
+ const a = Re(e.get(C)?.eventID || e.get(C)?.id || e.get(U));
375
+ e.set(j, a.quantities || {}, !0), e.set(K, a.donationAmounts || {}, !0), e.set(l, a.promocode || "", !0), e.set(A, a.promoDiscountAmount || 0, !0), e.set(q, a.tickets || [], !0);
376
+ } catch (a) {
377
+ O.error("Error loading checkout state:", a), e.set(j, {}, !0), e.set(q, [], !0);
378
378
  }
379
379
  e.get(q).length > 0 && e.get(C) && (e.get(C).availableTickets = e.get(q), o(e.get(q)));
380
380
  let r = {
@@ -385,37 +385,37 @@ function vt(m, t) {
385
385
  taxPercentage: 0
386
386
  };
387
387
  try {
388
- const n = (
388
+ const a = (
389
389
  /** @type {any} */
390
- await Re(e.get(C)?.venueID || e.get(C)?.venueId || S())
390
+ await Oe(e.get(C)?.venueID || e.get(C)?.venueId || S())
391
391
  );
392
392
  r = {
393
- serviceFeeCents: Number(n?.serviceFeeCents ?? 0),
394
- serviceFeePercentage: Number(n?.serviceFeePercentage ?? 0),
395
- serviceFeeChargeType: String(n?.serviceFeeChargeType ?? "both"),
396
- maxServiceFeeCents: Number(n?.maxServiceFeeCents ?? 0),
397
- taxPercentage: Number(n?.taxPercentage ?? 0)
393
+ serviceFeeCents: Number(a?.serviceFeeCents ?? 0),
394
+ serviceFeePercentage: Number(a?.serviceFeePercentage ?? 0),
395
+ serviceFeeChargeType: String(a?.serviceFeeChargeType ?? "both"),
396
+ maxServiceFeeCents: Number(a?.maxServiceFeeCents ?? 0),
397
+ taxPercentage: Number(a?.taxPercentage ?? 0)
398
398
  };
399
- } catch (n) {
400
- G.error("Error fetching venue data:", n);
399
+ } catch (a) {
400
+ O.error("Error fetching venue data:", a);
401
401
  }
402
- const a = B(e.get(R), e.get(q), r), i = a.reduce((n, c) => n + Math.round((c.unitPrice ?? 0) * 100) * (c.quantity ?? 0), 0), u = Object.values(e.get(K)).reduce((n, c) => n + Math.round((Number(c) || 0) * 100), 0);
403
- Object.keys(e.get(R)).length > 0 && i + u > 0 && await L();
402
+ const n = B(e.get(j), e.get(q), r), i = n.reduce((a, c) => a + Math.round((c.unitPrice ?? 0) * 100) * (c.quantity ?? 0), 0), u = Object.values(e.get(K)).reduce((a, c) => a + Math.round((Number(c) || 0) * 100), 0);
403
+ Object.keys(e.get(j)).length > 0 && i + u > 0 && await L();
404
404
  let g = 900;
405
- if (e.get(y)) {
406
- const n = typeof localStorage < "u" ? localStorage.getItem(`checkout-expiry-${e.get(
407
- y
405
+ if (e.get(p)) {
406
+ const a = typeof localStorage < "u" ? localStorage.getItem(`checkout-expiry-${e.get(
407
+ p
408
408
  // @storage-escape: checkout-timer state (intentional raw localStorage)
409
409
  )}`) : null;
410
- if (n) {
411
- const c = Math.max(0, Math.floor((parseInt(n, 10) - Date.now()) / 1e3));
410
+ if (a) {
411
+ const c = Math.max(0, Math.floor((parseInt(a, 10) - Date.now()) / 1e3));
412
412
  c > 0 && (g = c);
413
413
  }
414
414
  try {
415
- const c = await je(e.get(y));
415
+ const c = await je(e.get(p));
416
416
  !c.error && c.expiresAt && (g = Math.max(0, Math.floor((new Date(c.expiresAt).getTime() - Date.now()) / 1e3)), localStorage.setItem(
417
417
  // @storage-escape: checkout-timer state (intentional raw localStorage)
418
- `checkout-expiry-${e.get(y)}`,
418
+ `checkout-expiry-${e.get(p)}`,
419
419
  String(new Date(c.expiresAt).getTime())
420
420
  ));
421
421
  } catch {
@@ -425,39 +425,44 @@ function vt(m, t) {
425
425
  f,
426
426
  {
427
427
  event: N(e.get(C), r),
428
- lines: a,
428
+ lines: n,
429
429
  timerStart: g,
430
- promoApplied: !!e.get(d),
430
+ promoApplied: !!e.get(l),
431
431
  promoDiscount: e.get(A),
432
432
  forceExpired: !1,
433
- ...P ? { serverTotals: P } : {}
433
+ ...I ? { serverTotals: I } : {}
434
434
  },
435
435
  !0
436
- ), I()) {
437
- const n = ae(typeof I() == "object" ? I() : {
436
+ ), P()) {
437
+ const a = ae(typeof P() == "object" ? P() : {
438
438
  code: "card_declined",
439
439
  message: "Your card was declined. Please try a different payment method."
440
440
  });
441
- e.set(p, n.message, !0);
441
+ e.set(v, a.message, !0);
442
442
  }
443
443
  });
444
444
  async function L() {
445
- if (!e.get(y)) {
446
- G.error("Missing cartId!");
445
+ if (!e.get(p)) {
446
+ O.error("Missing cartId!");
447
447
  return;
448
448
  }
449
- const r = Object.fromEntries(Object.entries(e.get(R)).filter(([a, i]) => i > 0));
449
+ const r = Object.fromEntries(Object.entries(e.get(j)).filter(([n, i]) => i > 0));
450
450
  try {
451
- const a = Object.fromEntries(Object.entries(e.get(K)).filter(([, n]) => parseFloat(String(n)) > 0).map(([n, c]) => [parseInt(n, 10), parseFloat(String(c))])), i = await ze(e.get(y), r, Object.keys(a).length > 0 ? a : void 0);
451
+ const n = Object.fromEntries(Object.entries(e.get(K)).filter(([, a]) => parseFloat(String(a)) > 0).map(([a, c]) => [parseInt(a, 10), parseFloat(String(c))]));
452
+ if (e.get(l)) {
453
+ const a = await ze(e.get(p), e.get(l));
454
+ a.success || O.error("Failed to apply promo code to cart:", a.error);
455
+ }
456
+ const i = await Ge(e.get(p), r, Object.keys(n).length > 0 ? n : void 0);
452
457
  if (!i) {
453
- e.set(p, h().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again.", !0);
458
+ e.set(v, h().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again.", !0);
454
459
  return;
455
460
  }
456
461
  const u = (
457
462
  /** @type {any} */
458
463
  i
459
464
  );
460
- if (P = {
465
+ if (I = {
461
466
  subtotal: (u.subtotal ?? 0) / 100,
462
467
  fees: (u.service_fee ?? 0) / 100,
463
468
  taxes: (u.tax_amount_exclusive ?? 0) / 100,
@@ -469,24 +474,24 @@ function vt(m, t) {
469
474
  f,
470
475
  {
471
476
  ...e.get(f),
472
- serverTotals: P
477
+ serverTotals: I
473
478
  },
474
479
  !0
475
480
  ), u.requires_stripe === !1 || u.payment_type === "free") {
476
- e.set(j, "free");
481
+ e.set(z, "free");
477
482
  return;
478
483
  }
479
484
  const g = i.stripe_publishable_key;
480
485
  if (!g) {
481
- G.error("No Stripe publishable key in payment intent response"), e.set(p, h().paymentConfigError || "Payment configuration error. Please try again.", !0);
486
+ O.error("No Stripe publishable key in payment intent response"), e.set(v, h().paymentConfigError || "Payment configuration error. Please try again.", !0);
482
487
  return;
483
488
  }
484
- e.set(F, await tt(g), !0), i.client_secret ? e.set(j, i.client_secret, !0) : e.set(p, h().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
485
- } catch (a) {
486
- G.error("Failed to initialize Stripe payment:", a), e.set(p, a.message || h().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
489
+ e.set(F, await rt(g), !0), i.client_secret ? e.set(z, i.client_secret, !0) : e.set(v, h().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
490
+ } catch (n) {
491
+ O.error("Failed to initialize Stripe payment:", n), e.set(v, n.message || h().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
487
492
  }
488
493
  }
489
- function N(r, a) {
494
+ function N(r, n) {
490
495
  return r ? {
491
496
  id: r.id || r.eventID,
492
497
  title: r.name || r.title || "",
@@ -503,11 +508,11 @@ function vt(m, t) {
503
508
  name: r.venueName || "",
504
509
  address: r.venueAddress || "",
505
510
  timezone: r.timeZone || r.timezone || ve(),
506
- serviceFeePercentage: a.serviceFeePercentage,
507
- serviceFeeCents: a.serviceFeeCents,
508
- taxPercentage: a.taxPercentage,
509
- serviceFeeChargeType: a.serviceFeeChargeType,
510
- maxServiceFeeCents: a.maxServiceFeeCents
511
+ serviceFeePercentage: n.serviceFeePercentage,
512
+ serviceFeeCents: n.serviceFeeCents,
513
+ taxPercentage: n.taxPercentage,
514
+ serviceFeeChargeType: n.serviceFeeChargeType,
515
+ maxServiceFeeCents: n.maxServiceFeeCents
511
516
  },
512
517
  performers: r.performers || [],
513
518
  tickets: (r.availableTickets || []).map((i) => ({
@@ -532,89 +537,89 @@ function vt(m, t) {
532
537
  totalTicketsCapacity: 100
533
538
  } : null;
534
539
  }
535
- function B(r, a, i) {
540
+ function B(r, n, i) {
536
541
  const u = [];
537
- for (const [g, n] of Object.entries(r)) {
538
- if (n <= 0) continue;
539
- const c = a.find((fe) => String(fe.ID) === g || String(fe.id) === g);
542
+ for (const [g, a] of Object.entries(r)) {
543
+ if (a <= 0) continue;
544
+ const c = n.find((fe) => String(fe.ID) === g || String(fe.id) === g);
540
545
  if (!c) continue;
541
- const Q = c.price || 0, Ie = z(Q, i);
546
+ const Q = c.price || 0, Pe = G(Q, i);
542
547
  u.push({
543
548
  ticketId: parseInt(g),
544
549
  ticketName: c.name || "",
545
- quantity: n,
550
+ quantity: a,
546
551
  unitPrice: Q,
547
- fee: Ie,
548
- subtotal: ye(Q * n)
552
+ fee: Pe,
553
+ subtotal: ye(Q * a)
549
554
  });
550
555
  }
551
556
  return u;
552
557
  }
553
- function z(r, a) {
558
+ function G(r, n) {
554
559
  if (r === 0) return 0;
555
560
  const {
556
561
  serviceFeePercentage: i = 0,
557
562
  serviceFeeCents: u = 0,
558
563
  serviceFeeChargeType: g = "both",
559
- maxServiceFeeCents: n = 0
560
- } = a;
564
+ maxServiceFeeCents: a = 0
565
+ } = n;
561
566
  let c = 0;
562
- return (g === "percentage" || g === "both") && (c += r * (i / 100)), (g === "fixed" || g === "flat" || g === "cents" || g === "both") && (c += u / 100), n > 0 && (c = Math.min(c, n / 100)), ye(c);
567
+ return (g === "percentage" || g === "both") && (c += r * (i / 100)), (g === "fixed" || g === "flat" || g === "cents" || g === "both") && (c += u / 100), a > 0 && (c = Math.min(c, a / 100)), ye(c);
563
568
  }
564
569
  let W = e.derived(() => Object.values(e.get(K)).some((r) => (Number(r) || 0) > 0)), Z = e.derived(() => !e.get(W) && (e.get(f) ? e.get(f).lines.every((r) => r.unitPrice === 0) : !0));
565
570
  async function Y(r) {
566
571
  if (!e.get(_)) {
567
- e.set(_, !0), e.set(p, "");
572
+ e.set(_, !0), e.set(v, "");
568
573
  try {
569
574
  if (e.get(M) && !e.get(M).requiresStripe) {
570
575
  await $(r);
571
576
  return;
572
577
  }
573
578
  if (!e.get(D)) {
574
- e.set(p, h().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again.", !0), e.set(_, !1);
579
+ e.set(v, h().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again.", !0), e.set(_, !1);
575
580
  return;
576
581
  }
577
582
  if (!e.get(F)) {
578
- e.set(p, h().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page.", !0), e.set(_, !1);
583
+ e.set(v, h().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page.", !0), e.set(_, !1);
579
584
  return;
580
585
  }
581
- const { error: a } = await e.get(D).submit();
582
- if (a) {
583
- const n = ae(a);
584
- e.set(p, n.message, !0), e.set(_, !1);
586
+ const { error: n } = await e.get(D).submit();
587
+ if (n) {
588
+ const a = ae(n);
589
+ e.set(v, a.message, !0), e.set(_, !1);
585
590
  return;
586
591
  }
587
592
  const i = await e.get(F).confirmPayment({ elements: e.get(D), redirect: "if_required" });
588
593
  if (i.error) {
589
- const n = ae(i.error);
590
- e.set(p, n.message, !0), e.set(_, !1);
594
+ const a = ae(i.error);
595
+ e.set(v, a.message, !0), e.set(_, !1);
591
596
  return;
592
597
  }
593
598
  const u = {
594
- id: e.get(y),
599
+ id: e.get(p),
595
600
  paymentIntentId: i.paymentIntent.id,
596
- tickets: e.get(R),
601
+ tickets: e.get(j),
597
602
  firstName: r.firstName,
598
603
  lastName: r.lastName,
599
604
  email: r.email,
600
605
  paymentMethod: "credit-card",
601
606
  mailingList: r.keepMeUpdated,
602
607
  saleType: "online"
603
- }, g = await Le(e.get(y), u);
608
+ }, g = await qe(e.get(p), u);
604
609
  if (g?.status === "Payment succeeded") {
605
- const n = {
606
- orderId: e.get(y),
610
+ const a = {
611
+ orderId: e.get(p),
607
612
  eventId: e.get(C)?.id || e.get(C)?.eventID || null,
608
613
  event: e.get(C) || null,
609
614
  venueId: S() || e.get(C)?.venueId || null,
610
615
  organizationId: x() || e.get(C)?.organizationId || null
611
616
  };
612
- t.onNavigateToSuccess && t.onNavigateToSuccess(n);
613
- } else g?.status === "Payment amount does not match the total price" ? e.set(p, h().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again.", !0) : e.set(p, h().paymentValidationFailed || "Payment validation failed. Please try again.", !0);
614
- } catch (a) {
615
- G.error("Payment execution error:", a);
616
- const i = ae(a);
617
- e.set(p, i.message, !0);
617
+ t.onNavigateToSuccess && t.onNavigateToSuccess(a);
618
+ } else g?.status === "Payment amount does not match the total price" ? e.set(v, h().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again.", !0) : e.set(v, h().paymentValidationFailed || "Payment validation failed. Please try again.", !0);
619
+ } catch (n) {
620
+ O.error("Payment execution error:", n);
621
+ const i = ae(n);
622
+ e.set(v, i.message, !0);
618
623
  } finally {
619
624
  e.set(_, !1);
620
625
  }
@@ -622,16 +627,16 @@ function vt(m, t) {
622
627
  }
623
628
  async function $(r) {
624
629
  try {
625
- const a = await qe(e.get(y), {
630
+ const n = await Me(e.get(p), {
626
631
  firstName: r.firstName,
627
632
  lastName: r.lastName,
628
633
  email: r.email,
629
634
  phoneNumber: null,
630
635
  mailingList: r.keepMeUpdated
631
636
  });
632
- if (a?.success) {
637
+ if (n?.success) {
633
638
  const i = {
634
- orderId: a.orderId || e.get(y),
639
+ orderId: n.orderId || e.get(p),
635
640
  eventId: e.get(C)?.id || e.get(C)?.eventID || null,
636
641
  event: e.get(C) || null,
637
642
  venueId: S() || e.get(C)?.venueId || null,
@@ -640,66 +645,66 @@ function vt(m, t) {
640
645
  };
641
646
  t.onNavigateToSuccess && t.onNavigateToSuccess(i);
642
647
  } else
643
- e.set(p, a?.error || h().failedToCompleteOrder || "Failed to complete order. Please try again.", !0);
644
- } catch (a) {
645
- G.error("Gift card payment error:", a);
646
- const i = ae(a);
647
- e.set(p, i.message, !0);
648
+ e.set(v, n?.error || h().failedToCompleteOrder || "Failed to complete order. Please try again.", !0);
649
+ } catch (n) {
650
+ O.error("Gift card payment error:", n);
651
+ const i = ae(n);
652
+ e.set(v, i.message, !0);
648
653
  } finally {
649
654
  e.set(_, !1);
650
655
  }
651
656
  }
652
657
  function ee(r) {
653
- if (e.set(M, r, !0), e.get(f) && P) {
654
- const a = r.requiresStripe ? r.stripeAmount ?? 0 : 0;
658
+ if (e.set(M, r, !0), e.get(f) && I) {
659
+ const n = r.requiresStripe ? r.stripeAmount ?? 0 : 0;
655
660
  e.set(
656
661
  f,
657
662
  {
658
663
  ...e.get(f),
659
664
  serverTotals: {
660
- ...P,
665
+ ...I,
661
666
  giftCardAmount: r.giftCardAmount ?? 0,
662
- total: a
667
+ total: n
663
668
  }
664
669
  },
665
670
  !0
666
671
  );
667
672
  }
668
- r.requiresStripe ? e.get(y) && Object.keys(e.get(R)).length > 0 && L() : (e.set(D, void 0), e.set(F, null), e.set(j, ""));
673
+ r.requiresStripe ? e.get(p) && Object.keys(e.get(j)).length > 0 && L() : (e.set(D, void 0), e.set(F, null), e.set(z, ""));
669
674
  }
670
- function w() {
671
- e.set(M, null), e.get(f) && P && e.set(
675
+ function T() {
676
+ e.set(M, null), e.get(f) && I && e.set(
672
677
  f,
673
678
  {
674
679
  ...e.get(f),
675
- serverTotals: P
680
+ serverTotals: I
676
681
  },
677
682
  !0
678
- ), e.get(y) && Object.keys(e.get(R)).length > 0 && L();
683
+ ), e.get(p) && Object.keys(e.get(j)).length > 0 && L();
679
684
  }
680
685
  function E() {
681
- T() ? T()() : window.history.back();
686
+ w() ? w()() : window.history.back();
682
687
  }
683
688
  function b() {
684
- T() ? T()() : window.history.back();
689
+ w() ? w()() : window.history.back();
685
690
  }
686
691
  async function k() {
687
- if (!e.get(y)) return null;
692
+ if (!e.get(p)) return null;
688
693
  try {
689
- const r = await Ge(e.get(y));
694
+ const r = await Le(e.get(p));
690
695
  return r.success ? {
691
696
  newExpiryTime: r.newExpiryTime,
692
697
  remainingExtensions: r.remainingExtensions
693
- } : (G.error("Failed to extend session:", r.error), null);
698
+ } : (O.error("Failed to extend session:", r.error), null);
694
699
  } catch (r) {
695
- return G.error("Error extending checkout session:", r), null;
700
+ return O.error("Error extending checkout session:", r), null;
696
701
  }
697
702
  }
698
- var O = e.comment(), H = e.first_child(O);
703
+ var R = e.comment(), H = e.first_child(R);
699
704
  {
700
705
  var X = (r) => {
701
- var a = e.comment(), i = e.first_child(a);
702
- e.component(i, () => e.get(l), (u, g) => {
706
+ var n = e.comment(), i = e.first_child(n);
707
+ e.component(i, () => e.get(d), (u, g) => {
703
708
  g(u, {
704
709
  get data() {
705
710
  return t.data;
@@ -708,7 +713,7 @@ function vt(m, t) {
708
713
  return o();
709
714
  },
710
715
  get value() {
711
- return v();
716
+ return y();
712
717
  },
713
718
  get venueId() {
714
719
  return S();
@@ -720,16 +725,16 @@ function vt(m, t) {
720
725
  return t.onNavigateToSuccess;
721
726
  },
722
727
  get initialError() {
723
- return I();
728
+ return P();
724
729
  },
725
730
  get labels() {
726
731
  return h();
727
732
  }
728
733
  });
729
- }), e.append(r, a);
734
+ }), e.append(r, n);
730
735
  }, de = (r) => {
731
- var a = ft(), i = e.first_child(a);
732
- Ve(i, {
736
+ var n = gt(), i = e.first_child(n);
737
+ Be(i, {
733
738
  get config() {
734
739
  return e.get(f);
735
740
  },
@@ -741,58 +746,58 @@ function vt(m, t) {
741
746
  return e.get(F);
742
747
  },
743
748
  get paymentIntent() {
744
- return e.get(j);
749
+ return e.get(z);
745
750
  },
746
751
  get paymentError() {
747
- return e.get(p);
752
+ return e.get(v);
748
753
  },
749
754
  get elements() {
750
755
  return e.get(D);
751
756
  },
752
- set elements(n) {
753
- e.set(D, n, !0);
757
+ set elements(a) {
758
+ e.set(D, a, !0);
754
759
  }
755
760
  });
756
761
  var u = e.sibling(i, 2);
757
762
  {
758
- var g = (n) => {
759
- var c = mt(), Q = e.child(c);
760
- ut(Q, {
763
+ var g = (a) => {
764
+ var c = ft(), Q = e.child(c);
765
+ mt(Q, {
761
766
  get cartId() {
762
- return e.get(y);
767
+ return e.get(p);
763
768
  },
764
769
  onApplied: ee,
765
- onRemoved: w,
770
+ onRemoved: T,
766
771
  get disabled() {
767
772
  return e.get(_);
768
773
  }
769
- }), e.reset(c), e.append(n, c);
774
+ }), e.reset(c), e.append(a, c);
770
775
  };
771
- e.if(u, (n) => {
772
- e.get(Z) || n(g);
776
+ e.if(u, (a) => {
777
+ e.get(Z) || a(g);
773
778
  });
774
779
  }
775
- e.append(r, a);
780
+ e.append(r, n);
776
781
  }, ce = (r) => {
777
- var a = gt(), i = e.child(a), u = e.child(i, !0);
778
- e.reset(i), e.reset(a), e.template_effect(() => e.set_text(u, e.get(V))), e.append(r, a);
779
- }, we = (r) => {
780
- var a = pt(), i = e.child(a), u = e.child(i, !0);
781
- e.reset(i), e.reset(a), e.template_effect(() => e.set_text(u, h().loadingSecurePaymentForm || "Loading secure payment form...")), e.append(r, a);
782
+ var n = pt(), i = e.child(n), u = e.child(i, !0);
783
+ e.reset(i), e.reset(n), e.template_effect(() => e.set_text(u, e.get(V))), e.append(r, n);
784
+ }, Te = (r) => {
785
+ var n = vt(), i = e.child(n), u = e.child(i, !0);
786
+ e.reset(i), e.reset(n), e.template_effect(() => e.set_text(u, h().loadingSecurePaymentForm || "Loading secure payment form...")), e.append(r, n);
782
787
  };
783
788
  e.if(H, (r) => {
784
- e.get(s) && e.get(l) ? r(X) : e.get(f) ? r(de, 1) : e.get(J) ? r(ce, 2) : r(we, !1);
789
+ e.get(s) && e.get(d) ? r(X) : e.get(f) ? r(de, 1) : e.get(J) ? r(ce, 2) : r(Te, !1);
785
790
  });
786
791
  }
787
- e.append(m, O), e.pop();
792
+ e.append(m, R), e.pop();
788
793
  }
789
- const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
794
+ const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
790
795
  __proto__: null,
791
- default: vt
796
+ default: yt
792
797
  }, Symbol.toStringTag, { value: "Module" }));
793
798
  export {
794
- St as C,
795
- ut as G,
796
- tt as l
799
+ wt as C,
800
+ mt as G,
801
+ rt as l
797
802
  };
798
- //# sourceMappingURL=Checkout-C8E5Q9nl.js.map
803
+ //# sourceMappingURL=Checkout-Bm3yGYYr.js.map