@getmicdrop/venue-calendar 4.3.56 → 4.3.57

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 (85) hide show
  1. package/dist/{CalendarFoundryView-BLHPU4ry.js → CalendarFoundryView-DKZpskoX.js} +1535 -1466
  2. package/dist/{CartView-DTXoQTOC.js → CartView-Dz3Pet0D.js} +14 -14
  3. package/dist/Checkout-Bqe1P7Jr.js +1849 -0
  4. package/dist/{Checkout-B8ZkBxF_.js → Checkout-CFv2AX68.js} +363 -346
  5. package/dist/{CheckoutTimer-CyN-mQCP.js → CheckoutTimer-Ch4McYLj.js} +1 -1
  6. package/dist/{CollectionView-CkKwCXQj.js → CollectionView-BBRXKR7L.js} +3 -3
  7. package/dist/{Event-BfWRG4dm.js → Event-lTxMeEFL.js} +6 -6
  8. package/dist/{EventPage-dCTHvk7P.js → EventPage-Cqkelq-1.js} +10 -10
  9. package/dist/{RecommendationsRail-DPxl9JCm.js → RecommendationsRail-BAdqxvuS.js} +5 -5
  10. package/dist/{SeriesPage-B7z1yoAK.js → SeriesPage-iAbX0ZTM.js} +2 -2
  11. package/dist/Spinner-6QTo7mi8.js +19 -0
  12. package/dist/{Success-BzuOliUV.js → Success-B2T0Pbuw.js} +22 -22
  13. package/dist/{ViewTicketsEmbed-BE8iTUF9.js → ViewTicketsEmbed-D8SEO2Zw.js} +4 -4
  14. package/dist/api/api.cjs +1 -1
  15. package/dist/api/api.mjs +194 -178
  16. package/dist/api/index.d.ts +2 -2
  17. package/dist/api/orders.d.ts +48 -0
  18. package/dist/api/transformers/venue.d.ts +14 -1
  19. package/dist/{api-BsBSvoNj.js → api-DMjowaFJ.js} +26 -26
  20. package/dist/{constants-CJyMUKEX.js → constants-DC0xZ-Ja.js} +1 -0
  21. package/dist/{de-CFh1o4IO.js → de-DWVo-yVF.js} +1 -0
  22. package/dist/{defaults-BHXY6s4i.js → defaults-C6to4-1V.js} +1 -1
  23. package/dist/{es-By1tBWcL.js → es-D2JTgwLx.js} +1 -0
  24. package/dist/{event-transform-oLpmof1H.js → event-transform-BF1WYBSP.js} +1 -1
  25. package/dist/{eventStatusStream-BIxriEut.js → eventStatusStream-8vyVag0u.js} +5 -5
  26. package/dist/{fr-BF6a7cw7.js → fr-kMyKMhNC.js} +1 -0
  27. package/dist/{i18n-8EWq-WHv.js → i18n-jISDKw5F.js} +1 -1
  28. package/dist/{i18n-JpkI3lvS.js → i18n-toTFR5-t.js} +16 -16
  29. package/dist/{id-Lo_q281j.js → id-ePSZ9pc6.js} +1 -0
  30. package/dist/{it-CQcRIzL4.js → it-CBG5vN1f.js} +1 -0
  31. package/dist/{ja-DOzvvYpK.js → ja-BEOrhLFG.js} +1 -0
  32. package/dist/{ko-b-vWxFpt.js → ko-D8x_4jV4.js} +1 -0
  33. package/dist/locales/4.3.57/flow/de.js +1 -0
  34. package/dist/locales/4.3.57/flow/es.js +1 -0
  35. package/dist/locales/4.3.57/flow/fr.js +1 -0
  36. package/dist/locales/4.3.57/flow/id.js +1 -0
  37. package/dist/locales/4.3.57/flow/it.js +1 -0
  38. package/dist/locales/4.3.57/flow/ja.js +1 -0
  39. package/dist/locales/4.3.57/flow/ko.js +1 -0
  40. package/dist/locales/4.3.57/flow/nl.js +1 -0
  41. package/dist/locales/4.3.57/flow/pl.js +1 -0
  42. package/dist/locales/4.3.57/flow/pt-br.js +1 -0
  43. package/dist/locales/4.3.57/flow/tr.js +1 -0
  44. package/dist/locales/4.3.57/flow/zh.js +1 -0
  45. package/dist/{nl-Dazc9kaV.js → nl-Vc5Wd3re.js} +1 -0
  46. package/dist/{orders--luy9Lyn.js → orders-FcXWw6b-.js} +56 -40
  47. package/dist/{pixels-FefBmhJt.js → pixels-B85kohqd.js} +9 -9
  48. package/dist/{pl-tSyy-lx_.js → pl-Dnjh6Wpy.js} +1 -0
  49. package/dist/{pt-br-BxzrK97M.js → pt-br-BJa34BZo.js} +1 -0
  50. package/dist/{tr-DhAMB3UQ.js → tr-Do7HmDL7.js} +1 -0
  51. package/dist/types/index.d.ts +14 -0
  52. package/dist/{utils-BFaSYuNA.js → utils-DpC4fy4Z.js} +69 -69
  53. package/dist/{venue-CBos8YTa.js → venue-BBoZBuhu.js} +1 -0
  54. package/dist/venue-calendar.css +1 -1
  55. package/dist/venue-calendar.es.js +54 -54
  56. package/dist/venue-calendar.iife.js +31 -31
  57. package/dist/venue-calendar.umd.js +53 -53
  58. package/dist/{zh-C2-VLP_R.js → zh-Dn20V0BT.js} +1 -0
  59. package/package.json +2 -2
  60. package/dist/Checkout-QIxYrkeK.js +0 -1832
  61. package/dist/Spinner-6UtYyNcF.js +0 -16
  62. package/dist/locales/4.3.56/flow/de.js +0 -1
  63. package/dist/locales/4.3.56/flow/es.js +0 -1
  64. package/dist/locales/4.3.56/flow/fr.js +0 -1
  65. package/dist/locales/4.3.56/flow/id.js +0 -1
  66. package/dist/locales/4.3.56/flow/it.js +0 -1
  67. package/dist/locales/4.3.56/flow/ja.js +0 -1
  68. package/dist/locales/4.3.56/flow/ko.js +0 -1
  69. package/dist/locales/4.3.56/flow/nl.js +0 -1
  70. package/dist/locales/4.3.56/flow/pl.js +0 -1
  71. package/dist/locales/4.3.56/flow/pt-br.js +0 -1
  72. package/dist/locales/4.3.56/flow/tr.js +0 -1
  73. package/dist/locales/4.3.56/flow/zh.js +0 -1
  74. /package/dist/locales/{4.3.56 → 4.3.57}/main/de.js +0 -0
  75. /package/dist/locales/{4.3.56 → 4.3.57}/main/es.js +0 -0
  76. /package/dist/locales/{4.3.56 → 4.3.57}/main/fr.js +0 -0
  77. /package/dist/locales/{4.3.56 → 4.3.57}/main/id.js +0 -0
  78. /package/dist/locales/{4.3.56 → 4.3.57}/main/it.js +0 -0
  79. /package/dist/locales/{4.3.56 → 4.3.57}/main/ja.js +0 -0
  80. /package/dist/locales/{4.3.56 → 4.3.57}/main/ko.js +0 -0
  81. /package/dist/locales/{4.3.56 → 4.3.57}/main/nl.js +0 -0
  82. /package/dist/locales/{4.3.56 → 4.3.57}/main/pl.js +0 -0
  83. /package/dist/locales/{4.3.56 → 4.3.57}/main/pt-br.js +0 -0
  84. /package/dist/locales/{4.3.56 → 4.3.57}/main/tr.js +0 -0
  85. /package/dist/locales/{4.3.56 → 4.3.57}/main/zh.js +0 -0
@@ -7,46 +7,46 @@ import { t as d } from "./WarningTriIcon-OqM9Rfwq.js";
7
7
  import { d as f, n as p } from "./z-index-Bo0dqmiq.js";
8
8
  import { I as m, k as h, n as g, t as _, y as v } from "./defaultLabels-BaVkGLw4.js";
9
9
  import { t as y } from "./Button-AZ8OLQqj.js";
10
- import { U as b, f as x, i as S, n as C, r as ee, s as w, t as T } from "./orders--luy9Lyn.js";
11
- import { n as E, t as te } from "./serverTotals-DeOPPRj6.js";
10
+ import { W as b, c as x, i as S, n as C, o as w, p as T, r as ee, t as E } from "./orders-FcXWw6b-.js";
11
+ import { n as te, t as ne } from "./serverTotals-DeOPPRj6.js";
12
12
  import { a as D, i as O, n as k, r as A, t as j } from "./ModalFooter-ngqovl_z.js";
13
- import { c as ne, d as re, k as ie, o as M, s as ae } from "./api-BsBSvoNj.js";
14
- import { t as oe } from "./event-transform-oLpmof1H.js";
15
- import { t as N } from "./venue-CBos8YTa.js";
16
- import { b as se, g as ce, h as le, l as ue, r as de, v as fe } from "./utils-BFaSYuNA.js";
17
- import { a as pe, n as me } from "./promo-BNwWtZjP.js";
18
- import { r as he } from "./order-totals-5X0jD77w.js";
19
- import ge, { n as _e, t as ve } from "./Checkout-QIxYrkeK.js";
13
+ import { c as re, d as ie, k as ae, o as M, s as oe } from "./api-DMjowaFJ.js";
14
+ import { t as N } from "./event-transform-BF1WYBSP.js";
15
+ import { t as se } from "./venue-BBoZBuhu.js";
16
+ import { b as ce, g as le, h as ue, l as de, r as fe, v as pe } from "./utils-DpC4fy4Z.js";
17
+ import { a as me, n as he } from "./promo-BNwWtZjP.js";
18
+ import { r as ge } from "./order-totals-5X0jD77w.js";
19
+ import _e, { n as P, t as ve } from "./Checkout-Bqe1P7Jr.js";
20
20
  import { n as ye } from "./buyerEmail-BfCq-gDt.js";
21
21
  import "svelte/internal/disclose-version";
22
- import * as P from "svelte/internal/client";
22
+ import * as F from "svelte/internal/client";
23
23
  import { onMount as be } from "svelte";
24
24
  //#region node_modules/@stripe/stripe-js/dist/index.mjs
25
- function F(e) {
25
+ function I(e) {
26
26
  "@babel/helpers - typeof";
27
- return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
27
+ return I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
28
28
  return typeof e;
29
29
  } : function(e) {
30
30
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
31
- }, F(e);
31
+ }, I(e);
32
32
  }
33
- var xe = "dahlia", I = function(e) {
33
+ var xe = "dahlia", L = function(e) {
34
34
  return e === 3 ? "v3" : e;
35
- }, L = "https://js.stripe.com", R = `${L}/${xe}/stripe.js`, z = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, B = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, V = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", H = function(e) {
35
+ }, Se = "https://js.stripe.com", R = `${Se}/${xe}/stripe.js`, z = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, B = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, V = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", H = function(e) {
36
36
  return z.test(e) || B.test(e);
37
37
  }, U = function() {
38
- for (var e = document.querySelectorAll(`script[src^="${L}"]`), t = 0; t < e.length; t++) {
38
+ for (var e = document.querySelectorAll(`script[src^="${Se}"]`), t = 0; t < e.length; t++) {
39
39
  var n = e[t];
40
40
  if (H(n.src)) return n;
41
41
  }
42
42
  return null;
43
- }, Se = function(e) {
43
+ }, Ce = function(e) {
44
44
  var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
45
45
  n.src = `${R}${t}`;
46
46
  var r = document.head || document.body;
47
47
  if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
48
48
  return r.appendChild(n), n;
49
- }, Ce = function(e, t) {
49
+ }, we = function(e, t) {
50
50
  !e || !e._registerWrapper || e._registerWrapper({
51
51
  name: "stripe-js",
52
52
  version: "9.13.0",
@@ -60,7 +60,7 @@ var xe = "dahlia", I = function(e) {
60
60
  return function() {
61
61
  window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
62
62
  };
63
- }, we = function(e) {
63
+ }, Te = function(e) {
64
64
  return W === null ? (W = new Promise(function(t, n) {
65
65
  if (typeof window > "u" || typeof document > "u") {
66
66
  t(null);
@@ -73,10 +73,10 @@ var xe = "dahlia", I = function(e) {
73
73
  try {
74
74
  var r = U();
75
75
  if (r && e) console.warn(V);
76
- else if (!r) r = Se(e);
76
+ else if (!r) r = Ce(e);
77
77
  else if (r && K !== null && G !== null) {
78
78
  var i;
79
- r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r = Se(e);
79
+ r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r = Ce(e);
80
80
  }
81
81
  K = J(t, n), G = q(n), r.addEventListener("load", K), r.addEventListener("error", G);
82
82
  } catch (e) {
@@ -86,30 +86,30 @@ var xe = "dahlia", I = function(e) {
86
86
  }), W.catch(function(e) {
87
87
  return W = null, Promise.reject(e);
88
88
  })) : W;
89
- }, Te = function(e, t, n) {
89
+ }, Ee = function(e, t, n) {
90
90
  if (e === null) return null;
91
91
  var r = t[0];
92
- if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${F(r)} instead.`);
93
- var i = r.match(/^pk_test/), a = I(e.version), o = xe;
92
+ if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${I(r)} instead.`);
93
+ var i = r.match(/^pk_test/), a = L(e.version), o = xe;
94
94
  i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.13.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
95
95
  var s = e.apply(void 0, t);
96
- return Ce(s, n), s;
97
- }, Y, X = !1, Ee = function() {
98
- return Y || (Y = we(null).catch(function(e) {
96
+ return we(s, n), s;
97
+ }, Y, X = !1, De = function() {
98
+ return Y || (Y = Te(null).catch(function(e) {
99
99
  return Y = null, Promise.reject(e);
100
100
  }), Y);
101
101
  };
102
102
  Promise.resolve().then(function() {
103
- return Ee();
103
+ return De();
104
104
  }).catch(function(e) {
105
105
  X || console.warn(e);
106
106
  });
107
- var De = function() {
107
+ var Oe = function() {
108
108
  var e = [...arguments];
109
109
  X = !0;
110
110
  var t = Date.now();
111
- return Ee().then(function(n) {
112
- return Te(n, e, t);
111
+ return De().then(function(n) {
112
+ return Ee(n, e, t);
113
113
  });
114
114
  };
115
115
  //#endregion
@@ -190,106 +190,106 @@ function Z(e, t = _) {
190
190
  }
191
191
  //#endregion
192
192
  //#region src/components/Events/Checkout/GiftCardInput.svelte
193
- var Q = e("GiftCardInput"), Oe = P.from_html("<div class=\"applied-card mb-2 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=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), ke = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), Ae = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), je = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), Me = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
194
- function Ne(e, i) {
195
- P.push(i, !0);
196
- let o = P.prop(i, "onApplied", 3, () => {}), s = P.prop(i, "onRemoved", 3, () => {}), c = P.prop(i, "disabled", 3, !1), m = P.prop(i, "labels", 3, _), h = P.prop(i, "owedTotal", 3, 0), g = P.prop(i, "serverGiftCardAmount", 3, null), v = P.state(""), b = P.state(!1), x = P.state(""), S = P.state(P.proxy([])), C = P.state(!1), w = P.state(0);
197
- P.user_effect(() => {
198
- if (!i.cartId || P.get(S).length > 0 || g() === 0) return;
193
+ var Q = e("GiftCardInput"), ke = F.from_html("<div class=\"applied-card mb-2 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=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), Ae = F.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), je = F.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Me = F.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), Ne = F.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
194
+ function Pe(e, i) {
195
+ F.push(i, !0);
196
+ let o = F.prop(i, "onApplied", 3, () => {}), s = F.prop(i, "onRemoved", 3, () => {}), c = F.prop(i, "disabled", 3, !1), m = F.prop(i, "labels", 3, _), h = F.prop(i, "owedTotal", 3, 0), g = F.prop(i, "serverGiftCardAmount", 3, null), v = F.state(""), b = F.state(!1), x = F.state(""), S = F.state(F.proxy([])), C = F.state(!1), w = F.state(0);
197
+ F.user_effect(() => {
198
+ if (!i.cartId || F.get(S).length > 0 || g() === 0) return;
199
199
  let e = !1;
200
200
  return ee(i.cartId).then((t) => {
201
201
  if (e || !t?.giftCards?.length) return;
202
202
  let n = t.giftCards.filter((e) => typeof e.amount == "number");
203
- n.length !== t.giftCards.length && Q.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (P.set(S, n.map((e) => ({
203
+ n.length !== t.giftCards.length && Q.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (F.set(S, n.map((e) => ({
204
204
  giftCardId: e.giftCardId,
205
205
  code: e.maskedCode,
206
206
  giftCardAmount: e.amount
207
- })), !0), P.set(w, P.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (h() || 0)));
207
+ })), !0), F.set(w, F.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (h() || 0)));
208
208
  }).catch((e) => Q.error("Could not restore applied gift cards:", e)), () => {
209
209
  e = !0;
210
210
  };
211
211
  });
212
- let T = P.derived(() => P.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), E = P.derived(() => Math.max(0, P.get(w) - P.get(T))), te = P.derived(() => P.get(S).length > 0 && P.get(E) <= 0);
213
- function D() {
214
- if (P.get(S).length === 0) {
212
+ let T = F.derived(() => F.get(S).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), E = F.derived(() => Math.max(0, F.get(w) - F.get(T))), te = F.derived(() => F.get(S).length > 0 && F.get(E) <= 0);
213
+ function ne() {
214
+ if (F.get(S).length === 0) {
215
215
  s()();
216
216
  return;
217
217
  }
218
218
  o()({
219
- code: P.get(S).map((e) => e.code).join(", "),
220
- giftCardAmount: P.get(T),
221
- stripeAmount: P.get(E),
222
- requiresStripe: P.get(E) > 0,
223
- paymentType: P.get(E) > 0 ? "split" : "gift_card_only",
224
- orderTotal: P.get(w)
219
+ code: F.get(S).map((e) => e.code).join(", "),
220
+ giftCardAmount: F.get(T),
221
+ stripeAmount: F.get(E),
222
+ requiresStripe: F.get(E) > 0,
223
+ paymentType: F.get(E) > 0 ? "split" : "gift_card_only",
224
+ orderTotal: F.get(w)
225
225
  });
226
226
  }
227
- async function O() {
228
- let e = P.get(v).trim().toUpperCase();
229
- if (!(!e || P.get(b) || !i.cartId)) {
230
- if (P.get(S).some((t) => t.code === e)) {
231
- P.set(x, m().giftCardAlreadyApplied || "That gift card is already applied", !0);
227
+ async function D() {
228
+ let e = F.get(v).trim().toUpperCase();
229
+ if (!(!e || F.get(b) || !i.cartId)) {
230
+ if (F.get(S).some((t) => t.code === e)) {
231
+ F.set(x, m().giftCardAlreadyApplied || "That gift card is already applied", !0);
232
232
  return;
233
233
  }
234
- P.set(b, !0), P.set(x, "");
234
+ F.set(b, !0), F.set(x, "");
235
235
  try {
236
236
  let t = await M(i.cartId, e);
237
- t.valid ? (P.set(S, [...P.get(S), {
237
+ t.valid ? (F.set(S, [...F.get(S), {
238
238
  code: t.giftCardCode || e,
239
239
  giftCardAmount: t.giftCardAmount || 0
240
- }], !0), P.set(w, P.get(T) + (t.stripeAmount || 0)), P.set(v, ""), P.set(C, !1), D()) : P.set(x, t.error || m().invalidGiftCardCode || "Invalid gift card code", !0);
240
+ }], !0), F.set(w, F.get(T) + (t.stripeAmount || 0)), F.set(v, ""), F.set(C, !1), ne()) : F.set(x, t.error || m().invalidGiftCardCode || "Invalid gift card code", !0);
241
241
  } catch (e) {
242
242
  Q.error("Error applying gift card:", e);
243
243
  let t = e && typeof e == "object" && typeof e.message == "string" ? e.message : "";
244
- P.set(x, t || m().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
244
+ F.set(x, t || m().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
245
245
  }
246
- P.set(b, !1);
246
+ F.set(b, !1);
247
247
  }
248
248
  }
249
- async function k(e) {
250
- if (!(P.get(b) || !i.cartId)) {
251
- P.set(b, !0), P.set(x, "");
249
+ async function O(e) {
250
+ if (!(F.get(b) || !i.cartId)) {
251
+ F.set(b, !0), F.set(x, "");
252
252
  try {
253
- let t = P.get(S).find((t) => t.code === e), n = await ne(i.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e });
254
- n.success !== !1 && !n.error ? (P.set(S, P.get(S).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(w, P.get(T) + n.remainingTotal), D()) : P.set(x, n.error || m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
253
+ let t = F.get(S).find((t) => t.code === e), n = await re(i.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e });
254
+ n.success !== !1 && !n.error ? (F.set(S, F.get(S).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && F.set(w, F.get(T) + n.remainingTotal), ne()) : F.set(x, n.error || m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
255
255
  } catch (e) {
256
- Q.error("Error removing gift card:", e), P.set(x, m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
256
+ Q.error("Error removing gift card:", e), F.set(x, m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
257
257
  }
258
- P.set(b, !1);
258
+ F.set(b, !1);
259
259
  }
260
260
  }
261
- function A(e) {
262
- e.key === "Enter" && !P.get(b) && O();
261
+ function k(e) {
262
+ e.key === "Enter" && !F.get(b) && D();
263
263
  }
264
- function j() {
265
- P.set(C, !P.get(C)), P.get(C) || (P.set(v, ""), P.set(x, ""));
264
+ function A() {
265
+ F.set(C, !F.get(C)), F.get(C) || (F.set(v, ""), F.set(x, ""));
266
266
  }
267
- var re = Me(), ie = P.child(re);
268
- P.each(ie, 17, () => P.get(S), (e) => e.code, (e, t) => {
269
- var n = Oe(), i = P.child(n), o = P.child(i), s = P.child(o);
270
- r(s, { size: "16" }), P.reset(o);
271
- var u = P.sibling(o, 2), d = P.child(u), h = P.child(d, !0);
272
- P.reset(d);
273
- var g = P.sibling(d, 2), _ = P.child(g, !0);
274
- P.reset(g), P.reset(u);
275
- var v = P.sibling(u, 2), x = P.child(v);
276
- P.reset(v);
277
- var S = P.sibling(v, 2);
267
+ var j = Ne(), ie = F.child(j);
268
+ F.each(ie, 17, () => F.get(S), (e) => e.code, (e, t) => {
269
+ var n = ke(), i = F.child(n), o = F.child(i), s = F.child(o);
270
+ r(s, { size: "16" }), F.reset(o);
271
+ var u = F.sibling(o, 2), d = F.child(u), h = F.child(d, !0);
272
+ F.reset(d);
273
+ var g = F.sibling(d, 2), _ = F.child(g, !0);
274
+ F.reset(g), F.reset(u);
275
+ var v = F.sibling(u, 2), x = F.child(v);
276
+ F.reset(v);
277
+ var S = F.sibling(v, 2);
278
278
  {
279
- let e = P.derived(() => m().removeGiftCard || "Remove gift card");
279
+ let e = F.derived(() => m().removeGiftCard || "Remove gift card");
280
280
  y(S, {
281
281
  variant: "icon",
282
282
  size: "icon-sm",
283
283
  class: "rounded-full hover:bg-status-error-bg hover:text-accent-danger",
284
- onclick: () => k(P.get(t).code),
284
+ onclick: () => O(F.get(t).code),
285
285
  get loading() {
286
- return P.get(b);
286
+ return F.get(b);
287
287
  },
288
288
  get disabled() {
289
289
  return c();
290
290
  },
291
291
  get "aria-label"() {
292
- return P.get(e);
292
+ return F.get(e);
293
293
  },
294
294
  children: (e, t) => {
295
295
  a(e, { size: "16" });
@@ -297,82 +297,82 @@ function Ne(e, i) {
297
297
  $$slots: { default: !0 }
298
298
  });
299
299
  }
300
- P.reset(i), P.reset(n), P.template_effect((e) => {
301
- P.set_text(h, m().giftCardApplied || "Gift card applied"), P.set_text(_, P.get(t).code), P.set_text(x, `-${e ?? ""}`);
302
- }, [() => l(P.get(t).giftCardAmount)]), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
300
+ F.reset(i), F.reset(n), F.template_effect((e) => {
301
+ F.set_text(h, m().giftCardApplied || "Gift card applied"), F.set_text(_, F.get(t).code), F.set_text(x, `-${e ?? ""}`);
302
+ }, [() => l(F.get(t).giftCardAmount)]), F.transition(3, n, () => f, () => ({ duration: p.fast })), F.append(e, n);
303
303
  });
304
- var ae = P.sibling(ie, 2), oe = (e) => {
305
- var i = ke(), a = P.child(i), o = P.child(a);
304
+ var ae = F.sibling(ie, 2), oe = (e) => {
305
+ var i = Ae(), a = F.child(i), o = F.child(a);
306
306
  r(o, { size: "16" });
307
- var s = P.sibling(o, 2), c = P.child(s, !0);
308
- P.reset(s), P.reset(a), P.reset(i), P.template_effect(() => {
309
- P.set_class(a, 1, `full-coverage-badge ${t.caption ?? ""} ${n.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(c, m().fullyCoveredByGiftCard || "Fully covered by gift card");
310
- }), P.append(e, i);
307
+ var s = F.sibling(o, 2), c = F.child(s, !0);
308
+ F.reset(s), F.reset(a), F.reset(i), F.template_effect(() => {
309
+ F.set_class(a, 1, `full-coverage-badge ${t.caption ?? ""} ${n.emphasis ?? ""}`, "svelte-emw0hd"), F.set_text(c, m().fullyCoveredByGiftCard || "Fully covered by gift card");
310
+ }), F.append(e, i);
311
311
  };
312
- P.if(ae, (e) => {
313
- P.get(te) && e(oe);
312
+ F.if(ae, (e) => {
313
+ F.get(te) && e(oe);
314
314
  });
315
- var N = P.sibling(ae, 2), se = P.child(N);
315
+ var N = F.sibling(ae, 2), se = F.child(N);
316
316
  u(se, {
317
317
  size: "20",
318
318
  class: "gift-icon"
319
319
  });
320
- var ce = P.sibling(se, 2), le = P.child(ce, !0);
321
- P.reset(ce);
322
- var ue = P.sibling(ce, 2), de = P.child(ue, !0);
323
- P.reset(ue), P.reset(N);
324
- var fe = P.sibling(N, 2), pe = (e) => {
325
- var n = je(), r = P.child(n), i = P.child(r);
326
- P.remove_input_defaults(i);
320
+ var ce = F.sibling(se, 2), le = F.child(ce, !0);
321
+ F.reset(ce);
322
+ var ue = F.sibling(ce, 2), de = F.child(ue, !0);
323
+ F.reset(ue), F.reset(N);
324
+ var fe = F.sibling(N, 2), pe = (e) => {
325
+ var n = Me(), r = F.child(n), i = F.child(r);
326
+ F.remove_input_defaults(i);
327
327
  let a;
328
- var o = P.sibling(i, 2);
328
+ var o = F.sibling(i, 2);
329
329
  {
330
- let e = P.derived(() => !P.get(v).trim() || c());
330
+ let e = F.derived(() => !F.get(v).trim() || c());
331
331
  y(o, {
332
332
  variant: "default",
333
333
  size: "sm",
334
334
  class: "min-w-16 shrink-0",
335
- onclick: O,
335
+ onclick: D,
336
336
  get loading() {
337
- return P.get(b);
337
+ return F.get(b);
338
338
  },
339
339
  get disabled() {
340
- return P.get(e);
340
+ return F.get(e);
341
341
  },
342
342
  children: (e, t) => {
343
- P.next();
344
- var n = P.text();
345
- P.template_effect(() => P.set_text(n, m().apply || "Apply")), P.append(e, n);
343
+ F.next();
344
+ var n = F.text();
345
+ F.template_effect(() => F.set_text(n, m().apply || "Apply")), F.append(e, n);
346
346
  },
347
347
  $$slots: { default: !0 }
348
348
  });
349
349
  }
350
- P.reset(r);
351
- var s = P.sibling(r, 2), l = (e) => {
352
- var t = Ae(), n = P.child(t);
350
+ F.reset(r);
351
+ var s = F.sibling(r, 2), l = (e) => {
352
+ var t = je(), n = F.child(t);
353
353
  d(n, { size: "16" });
354
- var r = P.sibling(n, 2), i = P.child(r, !0);
355
- P.reset(r), P.reset(t), P.template_effect(() => P.set_text(i, P.get(x))), P.transition(3, t, () => f, () => ({ duration: p.micro })), P.append(e, t);
354
+ var r = F.sibling(n, 2), i = F.child(r, !0);
355
+ F.reset(r), F.reset(t), F.template_effect(() => F.set_text(i, F.get(x))), F.transition(3, t, () => f, () => ({ duration: p.micro })), F.append(e, t);
356
356
  };
357
- P.if(s, (e) => {
358
- P.get(x) && e(l);
359
- }), P.reset(n), P.template_effect(() => {
360
- P.set_attribute(i, "aria-label", m().enterGiftCardCode || "Enter gift card code"), P.set_attribute(i, "placeholder", m().enterGiftCardCode || "Enter gift card code"), i.disabled = P.get(b) || c(), a = P.set_class(i, 1, `gift-input ${t.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!P.get(x) });
361
- }), P.delegated("keydown", i, A), P.bind_value(i, () => P.get(v), (e) => P.set(v, e)), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
357
+ F.if(s, (e) => {
358
+ F.get(x) && e(l);
359
+ }), F.reset(n), F.template_effect(() => {
360
+ F.set_attribute(i, "aria-label", m().enterGiftCardCode || "Enter gift card code"), F.set_attribute(i, "placeholder", m().enterGiftCardCode || "Enter gift card code"), i.disabled = F.get(b) || c(), a = F.set_class(i, 1, `gift-input ${t.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!F.get(x) });
361
+ }), F.delegated("keydown", i, k), F.bind_value(i, () => F.get(v), (e) => F.set(v, e)), F.transition(3, n, () => f, () => ({ duration: p.fast })), F.append(e, n);
362
362
  };
363
- P.if(fe, (e) => {
364
- P.get(C) && e(pe);
365
- }), P.reset(re), P.template_effect(() => {
366
- P.set_class(N, 1, `gift-card-toggle ${t.label ?? ""}`, "svelte-emw0hd"), N.disabled = c(), P.set_attribute(N, "aria-expanded", P.get(C)), P.set_text(le, P.get(S).length > 0 ? m().addAnotherGiftCard || "Add another gift card" : m().haveAGiftCard || "Have a gift card?"), P.set_text(de, P.get(C) ? "-" : "+");
367
- }), P.delegated("click", N, j), P.append(e, re), P.pop();
363
+ F.if(fe, (e) => {
364
+ F.get(C) && e(pe);
365
+ }), F.reset(j), F.template_effect(() => {
366
+ F.set_class(N, 1, `gift-card-toggle ${t.label ?? ""}`, "svelte-emw0hd"), N.disabled = c(), F.set_attribute(N, "aria-expanded", F.get(C)), F.set_text(le, F.get(S).length > 0 ? m().addAnotherGiftCard || "Add another gift card" : m().haveAGiftCard || "Have a gift card?"), F.set_text(de, F.get(C) ? "-" : "+");
367
+ }), F.delegated("click", N, A), F.append(e, j), F.pop();
368
368
  }
369
- P.delegate(["click", "keydown"]);
369
+ F.delegate(["click", "keydown"]);
370
370
  //#endregion
371
371
  //#region src/components/Modals/EventUnavailableModal.svelte
372
- var Pe = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Fe = P.from_html("<!> <!>", 1);
373
- function Ie(e, n) {
374
- P.push(n, !0);
375
- let r = P.prop(n, "open", 15, !1), a = P.prop(n, "onBackToEvents", 3, () => {}), s = P.prop(n, "labels", 3, _), c = P.derived(() => n.reason === "canceled"), l = P.derived(() => P.get(c) ? s().eventCanceledTitle || "Event canceled" : s().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(c) ? s().eventCanceledBody || "This event was canceled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => s().backToEvents || "Back to events");
372
+ var Fe = F.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Ie = F.from_html("<!> <!>", 1);
373
+ function Le(e, n) {
374
+ F.push(n, !0);
375
+ let r = F.prop(n, "open", 15, !1), a = F.prop(n, "onBackToEvents", 3, () => {}), s = F.prop(n, "labels", 3, _), c = F.derived(() => n.reason === "canceled"), l = F.derived(() => F.get(c) ? s().eventCanceledTitle || "Event canceled" : s().eventPostponedTitle || "Event postponed"), u = F.derived(() => F.get(c) ? s().eventCanceledBody || "This event was canceled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = F.derived(() => s().backToEvents || "Back to events");
376
376
  D(e, {
377
377
  size: "sm",
378
378
  role: "alertdialog",
@@ -384,32 +384,32 @@ function Ie(e, n) {
384
384
  r(e);
385
385
  },
386
386
  children: (e, n) => {
387
- var r = Fe(), s = P.first_child(r);
387
+ var r = Ie(), s = F.first_child(r);
388
388
  O(s, {});
389
- var f = P.sibling(s, 2);
389
+ var f = F.sibling(s, 2);
390
390
  A(f, {
391
391
  children: (e, n) => {
392
- var r = Fe(), s = P.first_child(r);
392
+ var r = Ie(), s = F.first_child(r);
393
393
  k(s, {
394
394
  children: (e, n) => {
395
- var r = Pe(), a = P.child(r), s = P.child(a), d = (e) => {
395
+ var r = Fe(), a = F.child(r), s = F.child(a), d = (e) => {
396
396
  o(e, { size: "32" });
397
397
  }, f = (e) => {
398
398
  i(e, { size: "32" });
399
399
  };
400
- P.if(s, (e) => {
401
- P.get(c) ? e(d) : e(f, -1);
402
- }), P.reset(a);
403
- var p = P.sibling(a, 2), m = P.child(p, !0);
404
- P.reset(p);
405
- var h = P.sibling(p, 2), g = P.child(h, !0);
406
- P.reset(h), P.reset(r), P.template_effect(() => {
407
- P.set_class(a, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${P.get(c) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), P.set_class(p, 1, `mb-2 ${t.heading ?? ""}`), P.set_text(m, P.get(l)), P.set_text(g, P.get(u));
408
- }), P.append(e, r);
400
+ F.if(s, (e) => {
401
+ F.get(c) ? e(d) : e(f, -1);
402
+ }), F.reset(a);
403
+ var p = F.sibling(a, 2), m = F.child(p, !0);
404
+ F.reset(p);
405
+ var h = F.sibling(p, 2), g = F.child(h, !0);
406
+ F.reset(h), F.reset(r), F.template_effect(() => {
407
+ F.set_class(a, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${F.get(c) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), F.set_class(p, 1, `mb-2 ${t.heading ?? ""}`), F.set_text(m, F.get(l)), F.set_text(g, F.get(u));
408
+ }), F.append(e, r);
409
409
  },
410
410
  $$slots: { default: !0 }
411
411
  });
412
- var f = P.sibling(s, 2);
412
+ var f = F.sibling(s, 2);
413
413
  j(f, {
414
414
  children: (e, t) => {
415
415
  y(e, {
@@ -419,33 +419,33 @@ function Ie(e, n) {
419
419
  return a();
420
420
  },
421
421
  get "aria-label"() {
422
- return P.get(d);
422
+ return F.get(d);
423
423
  },
424
424
  children: (e, t) => {
425
- P.next();
426
- var n = P.text();
427
- P.template_effect(() => P.set_text(n, P.get(d))), P.append(e, n);
425
+ F.next();
426
+ var n = F.text();
427
+ F.template_effect(() => F.set_text(n, F.get(d))), F.append(e, n);
428
428
  },
429
429
  $$slots: { default: !0 }
430
430
  });
431
431
  },
432
432
  $$slots: { default: !0 }
433
- }), P.append(e, r);
433
+ }), F.append(e, r);
434
434
  },
435
435
  $$slots: { default: !0 }
436
- }), P.append(e, r);
436
+ }), F.append(e, r);
437
437
  },
438
438
  $$slots: { default: !0 }
439
- }), P.pop();
439
+ }), F.pop();
440
440
  }
441
441
  //#endregion
442
442
  //#region src/components/Views/Checkout.svelte
443
- var $ = e("Checkout"), Le = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), Re = P.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), ze = P.from_html("<!> <!>", 1);
444
- function Be(e, t) {
445
- P.push(t, !0);
446
- let n = P.prop(t, "availableTickets", 23, () => []);
447
- P.prop(t, "value", 3, "");
448
- let r = P.prop(t, "venueId", 3, ""), i = P.prop(t, "organizationId", 3, ""), a = P.prop(t, "onNavigateBack", 3, void 0), o = P.prop(t, "initialError", 3, void 0), l = P.prop(t, "widgetId", 3, null), u = P.prop(t, "labels", 3, _), d = P.prop(t, "locale", 3, void 0);
443
+ var $ = e("Checkout"), Re = F.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), ze = F.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), Be = F.from_html("<!> <!>", 1);
444
+ function Ve(e, t) {
445
+ F.push(t, !0);
446
+ let n = F.prop(t, "availableTickets", 23, () => []);
447
+ F.prop(t, "value", 3, "");
448
+ let r = F.prop(t, "venueId", 3, ""), i = F.prop(t, "organizationId", 3, ""), a = F.prop(t, "onNavigateBack", 3, void 0), o = F.prop(t, "initialError", 3, void 0), l = F.prop(t, "widgetId", 3, null), u = F.prop(t, "labels", 3, _), d = F.prop(t, "locale", 3, void 0);
449
449
  function f(e) {
450
450
  if (!e) return {};
451
451
  let t = { ...e.venue ?? {} };
@@ -453,46 +453,47 @@ function Be(e, t) {
453
453
  "askForPhoneAtCheckout",
454
454
  "requiredPhoneAtCheckout",
455
455
  "hasCustomCheckout",
456
+ "requiredCustomCheckout",
456
457
  "questionPrompt"
457
458
  ]) e[n] !== void 0 && (t[n] = e[n]);
458
459
  return t;
459
460
  }
460
- let p = P.derived(() => (t.data || {}).id);
461
- P.derived(() => (t.data || {}).orgSlug);
462
- let y = P.derived(() => (t.data || {}).slug), ee = P.derived(() => (t.data || {}).event), D = P.derived(() => N(f(P.get(ee)))), O = P.derived(() => P.get(ee) ? {
463
- ...oe(P.get(ee)),
464
- ...P.get(D)
465
- } : t.data && (t.data.id || P.get(p)) ? {
466
- id: t.data.id || P.get(p),
467
- eventID: t.data.id || P.get(p),
461
+ let p = F.derived(() => (t.data || {}).id);
462
+ F.derived(() => (t.data || {}).orgSlug);
463
+ let y = F.derived(() => (t.data || {}).slug), ee = F.derived(() => (t.data || {}).event), D = F.derived(() => se(f(F.get(ee)))), O = F.derived(() => F.get(ee) ? {
464
+ ...N(F.get(ee)),
465
+ ...F.get(D)
466
+ } : t.data && (t.data.id || F.get(p)) ? {
467
+ id: t.data.id || F.get(p),
468
+ eventID: t.data.id || F.get(p),
468
469
  venueID: t.data.venueID ?? t.data.venueId ?? null,
469
470
  venueId: t.data.venueId ?? t.data.venueID ?? null,
470
471
  eventTicketingType: 0,
471
472
  ticketType: 0,
472
473
  availableTickets: []
473
- } : null), k = P.state(""), A = P.state(P.proxy({})), j = P.state(P.proxy({})), ne = P.state(P.proxy({})), M = P.state(P.proxy([])), F = P.state(""), xe = P.state(0), I = P.state(!1), L = P.state(!1), R = P.state(!1), z = P.state(null), B = P.state(""), V = P.state(void 0), H = P.state(null), U = P.state(""), Se = P.state(!1), Ce = P.state(""), W = P.state(null), G = P.derived(() => P.get(W) !== null), K = P.state(null), q = P.state(null), J = null, we = P.state(!1);
474
- function Te() {
474
+ } : null), k = F.state(""), A = F.state(F.proxy({})), j = F.state(F.proxy({})), re = F.state(F.proxy({})), M = F.state(F.proxy([])), I = F.state(""), xe = F.state(0), L = F.state(!1), Se = F.state(!1), R = F.state(!1), z = F.state(null), B = F.state(""), V = F.state(void 0), H = F.state(null), U = F.state(""), Ce = F.state(!1), we = F.state(""), W = F.state(null), G = F.derived(() => F.get(W) !== null), K = F.state(null), q = F.state(null), J = null, Te = F.state(!1);
475
+ function Ee() {
475
476
  return {
476
477
  value: J?.total ?? null,
477
478
  currency: J?.currency || "USD"
478
479
  };
479
480
  }
480
481
  be(async () => {
481
- if (P.set(k, _e(ue) || _e(ve.CHECKOUT_CARTID), !0), !P.get(k)) {
482
- P.set(Se, !0), P.set(Ce, u().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
482
+ if (F.set(k, P(de) || P(ve.CHECKOUT_CARTID), !0), !F.get(k)) {
483
+ F.set(Ce, !0), F.set(we, u().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
483
484
  return;
484
485
  }
485
- x(P.get(O)?.eventID || P.get(O)?.id || P.get(p), l(), r() || P.get(O)?.venueID || P.get(O)?.venueId || null, P.get(k));
486
- let e = P.get(O)?.eventID || P.get(O)?.id || P.get(p);
486
+ T(F.get(O)?.eventID || F.get(O)?.id || F.get(p), l(), r() || F.get(O)?.venueID || F.get(O)?.venueId || null, F.get(k));
487
+ let e = F.get(O)?.eventID || F.get(O)?.id || F.get(p);
487
488
  try {
488
- let t = ce(e);
489
- P.set(A, t.quantities || {}, !0), P.set(j, t.donationAmounts || {}, !0), P.set(ne, t.addOnQuantities || {}, !0), P.set(F, t.promocode || "", !0), P.set(xe, t.promoDiscountAmount || 0, !0), P.set(M, t.tickets || [], !0);
489
+ let t = le(e);
490
+ F.set(A, t.quantities || {}, !0), F.set(j, t.donationAmounts || {}, !0), F.set(re, t.addOnQuantities || {}, !0), F.set(I, t.promocode || "", !0), F.set(xe, t.promoDiscountAmount || 0, !0), F.set(M, t.tickets || [], !0);
490
491
  } catch (e) {
491
- $.error("Error loading checkout state:", e), P.set(A, {}, !0), P.set(ne, {}, !0), P.set(M, [], !0);
492
+ $.error("Error loading checkout state:", e), F.set(A, {}, !0), F.set(re, {}, !0), F.set(M, [], !0);
492
493
  }
493
- P.get(M).length > 0 && P.get(O) && (P.get(O).availableTickets = P.get(M), n(P.get(M)));
494
- let t = de(P.get(O)?.venueID || P.get(O)?.venueId || r()).then((e) => ({ data: e }), (e) => ({ error: e }));
495
- await (Object.keys(P.get(A)).length > 0 ? X() : null);
494
+ F.get(M).length > 0 && F.get(O) && (F.get(O).availableTickets = F.get(M), n(F.get(M)));
495
+ let t = fe(F.get(O)?.venueID || F.get(O)?.venueId || r()).then((e) => ({ data: e }), (e) => ({ error: e }));
496
+ await (Object.keys(F.get(A)).length > 0 ? X() : null);
496
497
  let i = {
497
498
  serviceFeeCents: 0,
498
499
  serviceFeePercentage: 0,
@@ -516,37 +517,37 @@ function Be(e, t) {
516
517
  } catch (e) {
517
518
  $.error("Error fetching venue data:", e);
518
519
  }
519
- let a = [...Q(P.get(A), P.get(M), i), ...Oe(P.get(ne), P.get(O)?.addOns)], c = 900, d = "", f, m;
520
- if (P.get(k)) {
521
- let e = fe(P.get(k));
520
+ let a = [...Q(F.get(A), F.get(M), i), ...ke(F.get(re), F.get(O)?.addOns)], c = 900, d = "", f, m;
521
+ if (F.get(k)) {
522
+ let e = pe(F.get(k));
522
523
  if (e) {
523
524
  let t = Math.max(0, Math.floor((e - Date.now()) / 1e3));
524
525
  t > 0 && (c = t);
525
526
  }
526
527
  try {
527
- let e = await S(P.get(k));
528
+ let e = await S(F.get(k));
528
529
  if (e.error || (e.remainingExtensions !== void 0 && (f = e.remainingExtensions), e.canExtend !== void 0 && (m = e.canExtend)), !e.error && e.expiresAt) {
529
530
  let t = v(e.expiresAt).getTime();
530
- c = Math.max(0, Math.floor((t - Date.now()) / 1e3)), d = e.expiresAt, se(P.get(k), t);
531
+ c = Math.max(0, Math.floor((t - Date.now()) / 1e3)), d = e.expiresAt, ce(F.get(k), t);
531
532
  }
532
533
  } catch {}
533
534
  }
534
- let h = _e(`checkout-promo-discount-type-${e}`), g = [];
535
+ let h = P(`checkout-promo-discount-type-${e}`), g = [];
535
536
  try {
536
- let t = _e(`checkout-promo-ticket-ids-${e}`), n = t ? JSON.parse(t) : [];
537
+ let t = P(`checkout-promo-ticket-ids-${e}`), n = t ? JSON.parse(t) : [];
537
538
  Array.isArray(n) && (g = n);
538
539
  } catch {
539
540
  g = [];
540
541
  }
541
- let _ = s(a.filter((e) => me(g, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), y = pe(_, P.get(xe), h);
542
- if (P.set(q, {
543
- event: Ee(P.get(O), i),
542
+ let _ = s(a.filter((e) => he(g, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), y = me(_, F.get(xe), h);
543
+ if (F.set(q, {
544
+ event: De(F.get(O), i),
544
545
  lines: a,
545
546
  timerStart: c,
546
547
  ...d ? { deadlineAt: d } : {},
547
548
  ...f === void 0 ? {} : { remainingExtensions: f },
548
549
  ...m === void 0 ? {} : { canExtend: m },
549
- promoApplied: !!P.get(F),
550
+ promoApplied: !!F.get(I),
550
551
  promoDiscount: y,
551
552
  forceExpired: !1,
552
553
  ...J ? { serverTotals: J } : {}
@@ -555,7 +556,7 @@ function Be(e, t) {
555
556
  code: "card_declined",
556
557
  message: "Your card was declined. Please try a different payment method."
557
558
  }, u());
558
- P.set(H, {
559
+ F.set(H, {
559
560
  message: e.message,
560
561
  suggestion: e.suggestion
561
562
  }, !0);
@@ -564,52 +565,52 @@ function Be(e, t) {
564
565
  let Y = 0;
565
566
  async function X() {
566
567
  let e = ++Y;
567
- if (!P.get(k)) {
568
+ if (!F.get(k)) {
568
569
  $.error("Missing cartId!");
569
570
  return;
570
571
  }
571
- let t = Object.fromEntries(Object.entries(P.get(A)).filter(([e, t]) => t > 0));
572
+ let t = Object.fromEntries(Object.entries(F.get(A)).filter(([e, t]) => t > 0));
572
573
  try {
573
- let n = Object.fromEntries(Object.entries(P.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
574
- if (P.get(F)) {
575
- let t = await ie(P.get(k), P.get(F));
574
+ let n = Object.fromEntries(Object.entries(F.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
575
+ if (F.get(I)) {
576
+ let t = await ae(F.get(k), F.get(I));
576
577
  if (e !== Y) return;
577
- t.success ? P.set(U, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(U, (u().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(F)), !0));
578
+ t.success ? F.set(U, "") : ($.error("Failed to apply promo code to cart:", t.error), F.set(U, (u().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", F.get(I)), !0));
578
579
  }
579
- let r = await T(P.get(k), t, Object.keys(n).length > 0 ? n : void 0, void 0, d());
580
+ let r = await E(F.get(k), t, Object.keys(n).length > 0 ? n : void 0, void 0, d());
580
581
  if (e !== Y) return;
581
582
  if (!r) {
582
- P.set(H, { message: u().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
583
+ F.set(H, { message: u().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
583
584
  return;
584
585
  }
585
- P.set(we, !1), J = te(r), P.get(q) && P.set(q, {
586
- ...P.get(q),
586
+ F.set(Te, !1), J = ne(r), F.get(q) && F.set(q, {
587
+ ...F.get(q),
587
588
  serverTotals: J
588
589
  }, !0);
589
590
  let i = r;
590
591
  if (i.requires_stripe === !1 || i.payment_type === "free") {
591
- P.set(B, "free");
592
+ F.set(B, "free");
592
593
  return;
593
594
  }
594
- P.set(we, J === null);
595
+ F.set(Te, J === null);
595
596
  let a = r.stripe_publishable_key;
596
597
  if (!a) {
597
- $.error("No Stripe publishable key in payment intent response"), P.set(H, { message: u().paymentConfigError || "Payment configuration error. Please try again" }, !0);
598
+ $.error("No Stripe publishable key in payment intent response"), F.set(H, { message: u().paymentConfigError || "Payment configuration error. Please try again" }, !0);
598
599
  return;
599
600
  }
600
- let o = await De(a);
601
+ let o = await Oe(a);
601
602
  if (e !== Y) return;
602
- P.set(z, o, !0), r.client_secret ? P.set(B, r.client_secret, !0) : P.set(H, { message: u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
603
+ F.set(z, o, !0), r.client_secret ? F.set(B, r.client_secret, !0) : F.set(H, { message: u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
603
604
  } catch (t) {
604
605
  if ($.error("Failed to initialize Stripe payment:", t), e !== Y) return;
605
- P.set(H, { message: t.message || u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
606
+ F.set(H, { message: t.message || u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
606
607
  }
607
608
  }
608
- function Ee(e, t) {
609
+ function De(e, t) {
609
610
  return e ? {
610
611
  id: e.id || e.eventID,
611
612
  title: e.name || e.title || "",
612
- slug: e.slug || P.get(y) || "",
613
+ slug: e.slug || F.get(y) || "",
613
614
  description: e.description || "",
614
615
  date: e.date || "",
615
616
  startDateTime: e.startDateTime || "",
@@ -617,7 +618,7 @@ function Be(e, t) {
617
618
  doorsOpenTime: e.doorsOpenTime || "",
618
619
  timezone: e.timeZone || e.timezone || g(),
619
620
  imageUrl: e.imageUrl || e.image || "",
620
- ...P.get(D),
621
+ ...F.get(D),
621
622
  venue: {
622
623
  id: e.venueID || e.venueId || 0,
623
624
  name: e.venueName || e.venue?.name || "",
@@ -643,7 +644,7 @@ function Be(e, t) {
643
644
  minPerOrder: e.minPerOrder || 1,
644
645
  maxPerOrder: e.maxPerOrder || 10,
645
646
  status: "on_sale",
646
- isDonation: le(e),
647
+ isDonation: ue(e),
647
648
  isHidden: !1
648
649
  })),
649
650
  faqs: e.faqs || [],
@@ -660,7 +661,7 @@ function Be(e, t) {
660
661
  if (a <= 0) continue;
661
662
  let e = t.find((e) => String(e.ID) === i || String(e.id) === i);
662
663
  if (!e) continue;
663
- let o = le(e), c = e.price;
664
+ let o = ue(e), c = e.price;
664
665
  if (!o && (c == null || !Number.isFinite(c))) {
665
666
  r.push({
666
667
  ticketId: parseInt(i),
@@ -673,7 +674,7 @@ function Be(e, t) {
673
674
  });
674
675
  continue;
675
676
  }
676
- let l = c ?? 0, u = he(l, n, o);
677
+ let l = c ?? 0, u = ge(l, n, o);
677
678
  r.push({
678
679
  ticketId: parseInt(i),
679
680
  ticketName: e.name || "",
@@ -686,7 +687,7 @@ function Be(e, t) {
686
687
  }
687
688
  return r;
688
689
  }
689
- function Oe(e, t) {
690
+ function ke(e, t) {
690
691
  let n = t || [], r = [];
691
692
  for (let [t, i] of Object.entries(e || {})) {
692
693
  if (!(i > 0)) continue;
@@ -707,66 +708,82 @@ function Be(e, t) {
707
708
  }
708
709
  return r;
709
710
  }
710
- let ke = P.derived(() => Object.values(P.get(j)).some((e) => (Number(e) || 0) > 0)), Ae = P.derived(() => !P.get(ke) && (!P.get(q) || P.get(q).lines.every((e) => e.unitPrice === 0)));
711
- async function je(e) {
712
- if (!P.get(I)) {
713
- P.set(I, !0), P.set(H, null);
711
+ let Ae = F.derived(() => Object.values(F.get(j)).some((e) => (Number(e) || 0) > 0)), je = F.derived(() => !F.get(Ae) && (!F.get(q) || F.get(q).lines.every((e) => e.unitPrice === 0)));
712
+ async function Me(e) {
713
+ if (!F.get(L)) {
714
+ F.set(L, !0), F.set(H, null);
714
715
  try {
715
- if (P.get(R)) {
716
- P.set(H, { message: u().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
716
+ if (F.get(R)) {
717
+ F.set(H, { message: u().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
717
718
  return;
718
719
  }
719
- if (P.get(K) && !P.get(K).requiresStripe) {
720
- await Me(e);
720
+ if (F.get(K) && !F.get(K).requiresStripe) {
721
+ await Ne(e);
721
722
  return;
722
723
  }
723
- if (P.get(Ae) || P.get(B) === "free" || J?.total === 0) {
724
- await Pe(e);
724
+ if (F.get(je) || F.get(B) === "free" || J?.total === 0) {
725
+ await Fe(e);
725
726
  return;
726
727
  }
727
- if (!P.get(V)) {
728
- P.set(H, {
728
+ if (!F.get(V)) {
729
+ F.set(H, {
729
730
  message: u().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again",
730
731
  blocking: !0
731
- }, !0), P.set(I, !1);
732
+ }, !0), F.set(L, !1);
732
733
  return;
733
734
  }
734
- if (!P.get(z)) {
735
- P.set(H, {
735
+ if (!F.get(z)) {
736
+ F.set(H, {
736
737
  message: u().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page",
737
738
  blocking: !0
738
- }, !0), P.set(I, !1);
739
+ }, !0), F.set(L, !1);
739
740
  return;
740
741
  }
741
- let { error: n } = await P.get(V).submit();
742
- if (n) {
743
- let e = Z(n, u());
744
- P.set(H, {
742
+ let n = await w(F.get(k), Object.fromEntries(Object.entries(F.get(A)).filter(([e, t]) => t > 0)), Object.keys(F.get(j)).length > 0 ? Object.fromEntries(Object.entries(F.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, {
743
+ firstName: e.firstName,
744
+ lastName: e.lastName,
745
+ email: e.email,
746
+ phone: e.phone,
747
+ questionAnswer: e.questionAnswer,
748
+ mailingList: e.keepMeUpdated
749
+ }, d());
750
+ if (n.refusal) {
751
+ F.set(H, { message: n.refusal }, !0), F.set(L, !1);
752
+ return;
753
+ }
754
+ if (n.clientSecret && n.clientSecret !== F.get(B)) {
755
+ F.set(B, n.clientSecret, !0), F.set(H, { message: u().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0), F.set(L, !1);
756
+ return;
757
+ }
758
+ let { error: a } = await F.get(V).submit();
759
+ if (a) {
760
+ let e = Z(a, u());
761
+ F.set(H, {
745
762
  message: e.message,
746
763
  suggestion: e.suggestion
747
- }, !0), P.set(I, !1);
764
+ }, !0), F.set(L, !1);
748
765
  return;
749
766
  }
750
- let a = await P.get(z).confirmPayment({
751
- elements: P.get(V),
767
+ let o = await F.get(z).confirmPayment({
768
+ elements: F.get(V),
752
769
  redirect: "if_required",
753
- confirmParams: { return_url: `${b()}${re(P.get(O)?.id || P.get(O)?.eventID || P.get(p), P.get(O)?.slug || P.get(y) || "", {
754
- orderId: P.get(k),
755
- ticketCount: Object.values(P.get(A)).reduce((e, t) => e + (Number(t) || 0), 0)
770
+ confirmParams: { return_url: `${b()}${ie(F.get(O)?.id || F.get(O)?.eventID || F.get(p), F.get(O)?.slug || F.get(y) || "", {
771
+ orderId: F.get(k),
772
+ ticketCount: Object.values(F.get(A)).reduce((e, t) => e + (Number(t) || 0), 0)
756
773
  })}` }
757
774
  });
758
- if (a.error) {
759
- let e = Z(a.error, u());
760
- P.set(H, {
775
+ if (o.error) {
776
+ let e = Z(o.error, u());
777
+ F.set(H, {
761
778
  message: e.message,
762
779
  suggestion: e.suggestion
763
- }, !0), P.set(I, !1);
780
+ }, !0), F.set(L, !1);
764
781
  return;
765
782
  }
766
- let o = {
767
- id: P.get(k),
768
- paymentIntentId: a.paymentIntent.id,
769
- tickets: P.get(A),
783
+ let s = {
784
+ id: F.get(k),
785
+ paymentIntentId: o.paymentIntent.id,
786
+ tickets: F.get(A),
770
787
  firstName: e.firstName,
771
788
  lastName: e.lastName,
772
789
  email: e.email,
@@ -775,38 +792,38 @@ function Be(e, t) {
775
792
  paymentMethod: "credit-card",
776
793
  mailingList: e.keepMeUpdated,
777
794
  saleType: "online"
778
- }, s = await w(P.get(k), o, d());
779
- if (s?.eventCanceled || s?.eventPostponed) {
780
- P.set(W, s.eventCanceled ? "canceled" : "postponed", !0), P.set(H, null);
795
+ }, c = await x(F.get(k), s, d());
796
+ if (c?.eventCanceled || c?.eventPostponed) {
797
+ F.set(W, c.eventCanceled ? "canceled" : "postponed", !0), F.set(H, null);
781
798
  return;
782
799
  }
783
- if (s?.status === "Payment succeeded") {
784
- ye(P.get(k), e.email);
800
+ if (c?.status === "Payment succeeded") {
801
+ ye(F.get(k), e.email);
785
802
  let n = {
786
- orderId: P.get(k),
787
- eventId: P.get(O)?.id || P.get(O)?.eventID || null,
788
- event: P.get(O) || null,
789
- venueId: r() || P.get(O)?.venueId || null,
790
- organizationId: i() || P.get(O)?.organizationId || null,
791
- ...Te()
803
+ orderId: F.get(k),
804
+ eventId: F.get(O)?.id || F.get(O)?.eventID || null,
805
+ event: F.get(O) || null,
806
+ venueId: r() || F.get(O)?.venueId || null,
807
+ organizationId: i() || F.get(O)?.organizationId || null,
808
+ ...Ee()
792
809
  };
793
810
  t.onNavigateToSuccess && t.onNavigateToSuccess(n);
794
- } else s?.status === "Payment amount does not match the total price" ? P.set(H, { message: u().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(H, { message: u().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
811
+ } else c?.status === "Payment amount does not match the total price" ? F.set(H, { message: u().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : F.set(H, { message: u().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
795
812
  } catch (e) {
796
813
  $.error("Payment execution error:", e);
797
814
  let t = Z(e, u());
798
- P.set(H, {
815
+ F.set(H, {
799
816
  message: t.message,
800
817
  suggestion: t.suggestion
801
818
  }, !0);
802
819
  } finally {
803
- P.set(I, !1);
820
+ F.set(L, !1);
804
821
  }
805
822
  }
806
823
  }
807
- async function Me(e) {
824
+ async function Ne(e) {
808
825
  try {
809
- let n = await ae(P.get(k), {
826
+ let n = await oe(F.get(k), {
810
827
  firstName: e.firstName,
811
828
  lastName: e.lastName,
812
829
  email: e.email,
@@ -815,32 +832,32 @@ function Be(e, t) {
815
832
  mailingList: e.keepMeUpdated
816
833
  }, d());
817
834
  if (n?.success) {
818
- ye(n.orderId || P.get(k), e.email);
835
+ ye(n.orderId || F.get(k), e.email);
819
836
  let a = {
820
- orderId: n.orderId || P.get(k),
821
- eventId: P.get(O)?.id || P.get(O)?.eventID || null,
822
- event: P.get(O) || null,
823
- venueId: r() || P.get(O)?.venueId || null,
824
- organizationId: i() || P.get(O)?.organizationId || null,
837
+ orderId: n.orderId || F.get(k),
838
+ eventId: F.get(O)?.id || F.get(O)?.eventID || null,
839
+ event: F.get(O) || null,
840
+ venueId: r() || F.get(O)?.venueId || null,
841
+ organizationId: i() || F.get(O)?.organizationId || null,
825
842
  paymentType: "gift_card_only",
826
- ...Te()
843
+ ...Ee()
827
844
  };
828
845
  t.onNavigateToSuccess && t.onNavigateToSuccess(a);
829
- } else P.set(H, { message: n?.error || u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
846
+ } else F.set(H, { message: n?.error || u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
830
847
  } catch (e) {
831
848
  $.error("Gift card payment error:", e);
832
849
  let t = Z(e, u());
833
- P.set(H, {
850
+ F.set(H, {
834
851
  message: t.message,
835
852
  suggestion: t.suggestion
836
853
  }, !0);
837
854
  } finally {
838
- P.set(I, !1);
855
+ F.set(L, !1);
839
856
  }
840
857
  }
841
- async function Pe(e) {
858
+ async function Fe(e) {
842
859
  try {
843
- let n = Object.fromEntries(Object.entries(P.get(A)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(P.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await T(P.get(k), n, Object.keys(a).length > 0 ? a : void 0, {
860
+ let n = Object.fromEntries(Object.entries(F.get(A)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(F.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await E(F.get(k), n, Object.keys(a).length > 0 ? a : void 0, {
844
861
  firstName: e.firstName,
845
862
  lastName: e.lastName,
846
863
  email: e.email,
@@ -849,71 +866,71 @@ function Be(e, t) {
849
866
  mailingList: e.keepMeUpdated
850
867
  }, d());
851
868
  if (o?.requires_stripe !== !1 && o?.payment_type !== "free" || o?.order_finalized === !1) {
852
- P.set(H, { message: u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
869
+ F.set(H, { message: u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
853
870
  return;
854
871
  }
855
- P.set(B, "free"), ye(P.get(k), e.email);
872
+ F.set(B, "free"), ye(F.get(k), e.email);
856
873
  let s = {
857
- orderId: P.get(k),
858
- eventId: P.get(O)?.id || P.get(O)?.eventID || null,
859
- event: P.get(O) || null,
860
- venueId: r() || P.get(O)?.venueId || null,
861
- organizationId: i() || P.get(O)?.organizationId || null,
874
+ orderId: F.get(k),
875
+ eventId: F.get(O)?.id || F.get(O)?.eventID || null,
876
+ event: F.get(O) || null,
877
+ venueId: r() || F.get(O)?.venueId || null,
878
+ organizationId: i() || F.get(O)?.organizationId || null,
862
879
  paymentType: "free",
863
- ...Te()
880
+ ...Ee()
864
881
  };
865
882
  t.onNavigateToSuccess && t.onNavigateToSuccess(s);
866
883
  } catch (e) {
867
884
  $.error("Free order completion error:", e);
868
885
  let t = Z(e, u());
869
- P.set(H, {
886
+ F.set(H, {
870
887
  message: t.message,
871
888
  suggestion: t.suggestion
872
889
  }, !0);
873
890
  } finally {
874
- P.set(I, !1);
891
+ F.set(L, !1);
875
892
  }
876
893
  }
877
- async function Fe(e) {
878
- if (P.set(K, e, !0), P.get(q) && J && P.set(q, {
879
- ...P.get(q),
880
- serverTotals: E(J, e)
881
- }, !0), !e.requiresStripe) Y++, P.set(V, void 0), P.set(z, null), P.set(B, "");
882
- else if (P.get(k) && Object.keys(P.get(A)).length > 0) {
883
- P.set(R, !0);
894
+ async function Ie(e) {
895
+ if (F.set(K, e, !0), F.get(q) && J && F.set(q, {
896
+ ...F.get(q),
897
+ serverTotals: te(J, e)
898
+ }, !0), !e.requiresStripe) Y++, F.set(V, void 0), F.set(z, null), F.set(B, "");
899
+ else if (F.get(k) && Object.keys(F.get(A)).length > 0) {
900
+ F.set(R, !0);
884
901
  try {
885
902
  await X();
886
903
  } finally {
887
- P.set(R, !1);
904
+ F.set(R, !1);
888
905
  }
889
906
  }
890
907
  }
891
- async function Be() {
892
- if (P.set(K, null), P.get(q) && J && P.set(q, {
893
- ...P.get(q),
908
+ async function Ve() {
909
+ if (F.set(K, null), F.get(q) && J && F.set(q, {
910
+ ...F.get(q),
894
911
  serverTotals: J
895
- }, !0), P.get(k) && Object.keys(P.get(A)).length > 0) {
896
- P.set(R, !0);
912
+ }, !0), F.get(k) && Object.keys(F.get(A)).length > 0) {
913
+ F.set(R, !0);
897
914
  try {
898
915
  await X();
899
916
  } finally {
900
- P.set(R, !1);
917
+ F.set(R, !1);
901
918
  }
902
919
  }
903
920
  }
904
- function Ve() {
905
- a() ? a()() : window.history.back();
906
- }
907
921
  function He() {
908
922
  a() ? a()() : window.history.back();
909
923
  }
910
924
  function Ue() {
911
- P.set(W, null), Ve();
925
+ a() ? a()() : window.history.back();
926
+ }
927
+ function We() {
928
+ F.set(W, null), He();
912
929
  }
913
- async function We() {
914
- if (!P.get(k)) return null;
930
+ async function Ge() {
931
+ if (!F.get(k)) return null;
915
932
  try {
916
- let e = await C(P.get(k));
933
+ let e = await C(F.get(k));
917
934
  return e.success ? {
918
935
  newExpiryTime: e.newExpiryTime,
919
936
  remainingExtensions: e.remainingExtensions
@@ -922,54 +939,54 @@ function Be(e, t) {
922
939
  return $.error("Error extending checkout session:", e), null;
923
940
  }
924
941
  }
925
- var Ge = ze(), Ke = P.first_child(Ge), qe = (e) => {
942
+ var Ke = Be(), qe = F.first_child(Ke), Je = (e) => {
926
943
  {
927
944
  let t = (e) => {
928
945
  {
929
- let t = P.derived(() => P.get(I) || P.get(R)), n = P.derived(() => P.get(q)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(q)?.serverTotals?.giftCardAmount ?? null);
930
- Ne(e, {
946
+ let t = F.derived(() => F.get(L) || F.get(R)), n = F.derived(() => F.get(q)?.serverTotals?.total ?? 0), r = F.derived(() => F.get(q)?.serverTotals?.giftCardAmount ?? null);
947
+ Pe(e, {
931
948
  get cartId() {
932
- return P.get(k);
949
+ return F.get(k);
933
950
  },
934
- onApplied: Fe,
935
- onRemoved: Be,
951
+ onApplied: Ie,
952
+ onRemoved: Ve,
936
953
  get disabled() {
937
- return P.get(t);
954
+ return F.get(t);
938
955
  },
939
956
  get owedTotal() {
940
- return P.get(n);
957
+ return F.get(n);
941
958
  },
942
959
  get serverGiftCardAmount() {
943
- return P.get(r);
960
+ return F.get(r);
944
961
  },
945
962
  get labels() {
946
963
  return u();
947
964
  }
948
965
  });
949
966
  }
950
- }, n = P.derived(() => P.get(H) ?? (P.get(U) ? { message: P.get(U) } : null));
951
- ge(e, {
967
+ }, n = F.derived(() => F.get(H) ?? (F.get(U) ? { message: F.get(U) } : null));
968
+ _e(e, {
952
969
  get config() {
953
- return P.get(q);
970
+ return F.get(q);
954
971
  },
955
- onPlaceOrder: je,
956
- onBack: Ve,
957
- onRetryExpired: He,
958
- onExtendSession: We,
972
+ onPlaceOrder: Me,
973
+ onBack: He,
974
+ onRetryExpired: Ue,
975
+ onExtendSession: Ge,
959
976
  get stripe() {
960
- return P.get(z);
977
+ return F.get(z);
961
978
  },
962
979
  get paymentIntent() {
963
- return P.get(B);
980
+ return F.get(B);
964
981
  },
965
982
  get serverTotalsUnavailable() {
966
- return P.get(we);
983
+ return F.get(Te);
967
984
  },
968
985
  get repricing() {
969
- return P.get(R);
986
+ return F.get(R);
970
987
  },
971
988
  get paymentError() {
972
- return P.get(n);
989
+ return F.get(n);
973
990
  },
974
991
  get labels() {
975
992
  return u();
@@ -978,46 +995,46 @@ function Be(e, t) {
978
995
  return d();
979
996
  },
980
997
  get elements() {
981
- return P.get(V);
998
+ return F.get(V);
982
999
  },
983
1000
  set elements(e) {
984
- P.set(V, e, !0);
1001
+ F.set(V, e, !0);
985
1002
  },
986
1003
  get eventEnded() {
987
- return P.get(L);
1004
+ return F.get(Se);
988
1005
  },
989
1006
  set eventEnded(e) {
990
- P.set(L, e, !0);
1007
+ F.set(Se, e, !0);
991
1008
  },
992
1009
  giftCard: t,
993
1010
  $$slots: { giftCard: !0 }
994
1011
  });
995
1012
  }
996
- }, Je = (e) => {
997
- var t = Le(), n = P.child(t), r = P.child(n, !0);
998
- P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(Ce))), P.append(e, t);
999
1013
  }, Ye = (e) => {
1000
- var t = Re(), n = P.child(t), r = P.child(n, !0);
1001
- P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, u().loadingSecurePaymentForm || "Loading secure payment form...")), P.append(e, t);
1014
+ var t = Re(), n = F.child(t), r = F.child(n, !0);
1015
+ F.reset(n), F.reset(t), F.template_effect(() => F.set_text(r, F.get(we))), F.append(e, t);
1016
+ }, Xe = (e) => {
1017
+ var t = ze(), n = F.child(t), r = F.child(n, !0);
1018
+ F.reset(n), F.reset(t), F.template_effect(() => F.set_text(r, u().loadingSecurePaymentForm || "Loading secure payment form...")), F.append(e, t);
1002
1019
  };
1003
- P.if(Ke, (e) => {
1004
- P.get(q) ? e(qe) : P.get(Se) ? e(Je, 1) : e(Ye, -1);
1020
+ F.if(qe, (e) => {
1021
+ F.get(q) ? e(Je) : F.get(Ce) ? e(Ye, 1) : e(Xe, -1);
1005
1022
  });
1006
- var Xe = P.sibling(Ke, 2), Ze = (e) => {
1007
- Ie(e, {
1023
+ var Ze = F.sibling(qe, 2), Qe = (e) => {
1024
+ Le(e, {
1008
1025
  open: !0,
1009
1026
  get reason() {
1010
- return P.get(W);
1027
+ return F.get(W);
1011
1028
  },
1012
- onBackToEvents: Ue,
1029
+ onBackToEvents: We,
1013
1030
  get labels() {
1014
1031
  return u();
1015
1032
  }
1016
1033
  });
1017
1034
  };
1018
- P.if(Xe, (e) => {
1019
- P.get(G) && e(Ze);
1020
- }), P.append(e, Ge), P.pop();
1035
+ F.if(Ze, (e) => {
1036
+ F.get(G) && e(Qe);
1037
+ }), F.append(e, Ke), F.pop();
1021
1038
  }
1022
1039
  //#endregion
1023
- export { Be as default };
1040
+ export { Ve as default };