@getmicdrop/venue-calendar 4.3.121 → 4.3.123

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 (176) hide show
  1. package/README.md +22 -0
  2. package/dist/{AddOnCard-jj59e855.js → AddOnCard-nTlOLRHQ.js} +21 -21
  3. package/dist/{ArrowLeftIcon-t-CY0sbi.js → ArrowLeftIcon-D5-uNI0U.js} +2 -2
  4. package/dist/{BlockPlaceholder-BmEZ68_q.js → BlockPlaceholder-CuoGXCMh.js} +4 -4
  5. package/dist/{Button-VUB2WJ88.js → Button-BLmw_oMF.js} +11 -11
  6. package/dist/{Button-B58iYo_t.js → Button-DoHESV6k.js} +5 -5
  7. package/dist/{Calendar-hxcQBkTF.js → Calendar-C9hahXIM.js} +142 -161
  8. package/dist/{CalendarFoundryView-CSAKDe-F.js → CalendarFoundryView-Cv-ICYi9.js} +1475 -1473
  9. package/dist/{CalendarIcon-B5JWs0gm.js → CalendarIcon-5pe0K5ma.js} +2 -2
  10. package/dist/{CartView-CF2y1JDa.js → CartView-CXp67TQT.js} +287 -284
  11. package/dist/{ChartBlock-SYOAO1s_.js → ChartBlock-VVDwIPue.js} +36 -36
  12. package/dist/{CheckIcon-BSwoGox7.js → CheckIcon-FxQwEejD.js} +2 -2
  13. package/dist/{Checkbox-BtJwg_CF.js → Checkbox-Cn1nEBOm.js} +1 -1
  14. package/dist/{Checkout-2h2K3-bE.js → Checkout-BOftqs3v.js} +383 -381
  15. package/dist/Checkout-DQrcjCeh.js +1934 -0
  16. package/dist/{CheckoutTimer-Bpt5gPyA.js → CheckoutTimer-DPuy8TpI.js} +7 -7
  17. package/dist/{ChevronDownIcon-CVZ0usBx.js → ChevronDownIcon-ADsji-Ia.js} +2 -2
  18. package/dist/{ChevronDownOutline-D7YDiKBF.js → ChevronDownOutline-CAboOQwi.js} +1 -1
  19. package/dist/ChevronRightOutline-BWIIgG7O.js +23 -0
  20. package/dist/{CloseIcon-DUnvWXUY.js → CloseIcon-BgvYIos-.js} +3 -3
  21. package/dist/{CloseOutline-qpVa62mu.js → CloseOutline-BJtQbSqD.js} +1 -1
  22. package/dist/{CollectionView-XdNMvMtn.js → CollectionView-Ds3iGZYx.js} +8 -8
  23. package/dist/{CropImage-C8W_Xb_V.js → CropImage-Cvl-yxAB.js} +15 -15
  24. package/dist/{EmptyState-CMFePII9.js → EmptyState-BXE5HfzR.js} +2 -2
  25. package/dist/{Event-B_9T21du.js → Event-C8Y3zpPM.js} +620 -534
  26. package/dist/EventCard-DGnCiMw9.js +175 -0
  27. package/dist/{EventPage-BMnKpciU.js → EventPage-DjP9llB-.js} +294 -270
  28. package/dist/{ExclamationCircleOutline-D3XbhOwM.js → ExclamationCircleOutline-CmH69h0L.js} +1 -1
  29. package/dist/{action-test-id-7RXdHucW.js → FallbackBlock-C_-N8OKB.js} +72 -72
  30. package/dist/{Grid-kuP6V0GW.js → Grid-BKWXQEkM.js} +2 -2
  31. package/dist/{Heading-vOVPxhJF.js → Heading-CrJEsrFE.js} +4 -4
  32. package/dist/{Input-BXZmvQ0p.js → Input-komF5aTV.js} +10 -10
  33. package/dist/{LiveRegion-D9Me4kBs.js → LiveRegion-B_OI5McX.js} +2 -2
  34. package/dist/{LocationIcon-E-7CQh4E.js → LocationIcon-D7SbJ6q_.js} +3 -3
  35. package/dist/{Modal-kG0LKgMZ.js → Modal-_a_bJbko.js} +3 -3
  36. package/dist/{ModalFooter-CM5RDuvB.js → ModalFooter-CJPDF8Zl.js} +15 -15
  37. package/dist/{ModalHeader-DBVXezSL.js → ModalHeader-B3K9xN0J.js} +3 -3
  38. package/dist/{PasswordInput-DzXNIwRc.js → PasswordInput-C-SJ5Oix.js} +7 -7
  39. package/dist/{PhoneInput-DnmN_L03.js → PhoneInput-CYg7S7S7.js} +13 -13
  40. package/dist/{RecommendationsRail-DrzM8h2r.js → RecommendationsRail-QP0CJ7-3.js} +71 -68
  41. package/dist/{ScarcityBadge-DjzrzvId.js → ScarcityBadge-Cawy-u79.js} +7 -7
  42. package/dist/{SeriesPage-Ds_FEEZW.js → SeriesPage-BXLOd-gT.js} +3 -3
  43. package/dist/{Spinner-B2rdbspc.js → Spinner-DMSIvUd3.js} +3 -3
  44. package/dist/{Success-Dkak0iM9.js → Success-DCJLQx8J.js} +178 -175
  45. package/dist/{TagIcon-BY8tK_qA.js → TagIcon-CwCUhnam.js} +2 -2
  46. package/dist/{Text-CqjLjIF8.js → Text-uKiMcqy6.js} +1 -1
  47. package/dist/{Textarea-Cymhixzd.js → Textarea-DHm4GHH9.js} +3 -3
  48. package/dist/{ViewTicketsEmbed-B_fqalQh.js → ViewTicketsEmbed-Cblb2S6M.js} +24 -23
  49. package/dist/{WarningCircleIcon-C5Lc7qkF.js → WarningCircleIcon-ClRHaffl.js} +4 -4
  50. package/dist/{WarningTriIcon-BM8qc9xx.js → WarningTriIcon-zhqOKjq8.js} +2 -2
  51. package/dist/adapter-DwqQNwIc.js +164 -0
  52. package/dist/api--R8K0DjS.js +489 -0
  53. package/dist/{browser-DxdP6IWt.js → browser-o9TsPy0d.js} +1 -1
  54. package/dist/checkoutState-BtNPT28I.js +198 -0
  55. package/dist/client-CS0e2JHE.js +262 -0
  56. package/dist/{constants-C6MZgb2S.js → constants-lKAMwRvZ.js} +5 -1
  57. package/dist/{controlAria-CGb-KeRn.js → controlAria-DSrMfxwY.js} +2 -2
  58. package/dist/{copyToClipboard-F-akSgaF.js → copyToClipboard-198pSFq9.js} +3 -3
  59. package/dist/{createErrorGate.svelte-CEGaIQeI.js → createErrorGate.svelte-D96YnnB4.js} +5 -5
  60. package/dist/cta-bYAHgtET.js +116 -0
  61. package/dist/{datetime-BnKG6Hjm.js → datetime-B0mHwpmb.js} +53 -53
  62. package/dist/{de-BHcAXwnM.js → de-C3szl-Vf.js} +10 -4
  63. package/dist/{de-BPmqZ6ao.js → de-CX7o2WAr.js} +5 -1
  64. package/dist/{defaultLabels-BbNEEsF7.js → defaultLabels-C8IfDtR9.js} +210 -240
  65. package/dist/{defaults-CgsFJvJ2.js → defaults-vPJmFph1.js} +7 -7
  66. package/dist/{dist-bwbfGPKR.js → dist-xFB1K0Ua.js} +2 -2
  67. package/dist/{es-BV3Sgeg-.js → es-DS1-fjU8.js} +5 -1
  68. package/dist/{es-DZ3yceh-.js → es-QnJXFKEx.js} +10 -4
  69. package/dist/{event-DfqUhl5j.js → event-Cn1I6eqc.js} +2 -2
  70. package/dist/{event-transform-Bk1IoYh5.js → event-transform-DqzYVPvy.js} +18 -18
  71. package/dist/{eventStatusStream-CE0PwO0c.js → eventStatusStream-D27L0zB8.js} +2 -2
  72. package/dist/{filepond-plugin-file-validate-size-DNnItZ84.js → filepond-plugin-file-validate-size-DSfmFeGz.js} +1 -1
  73. package/dist/{filepond-plugin-file-validate-type-CUMTkI8X.js → filepond-plugin-file-validate-type-C44EKcE7.js} +1 -1
  74. package/dist/{filepond-plugin-image-exif-orientation-GEwHZTBU.js → filepond-plugin-image-exif-orientation-DNdFnriO.js} +1 -1
  75. package/dist/{filepond-plugin-image-preview-DKfgAnVa.js → filepond-plugin-image-preview-BVewVSQZ.js} +1 -1
  76. package/dist/{floatingPosition-XIv5DYuP.js → floatingPosition-TQ0h6TbT.js} +6 -6
  77. package/dist/{fr-Dyi163Vk.js → fr-BVgQDC6c.js} +10 -4
  78. package/dist/{fr-BJ0VQGEj.js → fr-CN3PiNzU.js} +5 -1
  79. package/dist/{href-CfWGAmkP.js → href-Cl_PNVlB.js} +24 -24
  80. package/dist/i18n-BsgEaeHp.js +497 -0
  81. package/dist/i18n-SDe3ZEhB.js +28 -0
  82. package/dist/{id-CVXaHHqU.js → id-CPG4tPVY.js} +5 -1
  83. package/dist/{id-DvFRZVAm.js → id-DCcXxLEY.js} +10 -4
  84. package/dist/{imageOptimizer-B3fj8_30.js → imageOptimizer-C8racBby.js} +11 -11
  85. package/dist/{imageUrl-xyMedKrE.js → imageUrl-ClaMf08i.js} +1 -1
  86. package/dist/{it-C0lzsHje.js → it-CjwnCYFF.js} +5 -1
  87. package/dist/{it-Bh05tcLv.js → it-CufAwhe3.js} +10 -4
  88. package/dist/{ja-Dl2r6tQ6.js → ja-C2uiNCJX.js} +5 -1
  89. package/dist/{ja-CU4PQS4j.js → ja-CMa_nsLY.js} +10 -4
  90. package/dist/{keyboard-DhCcdIyh.js → keyboard-enDXh6xy.js} +4 -4
  91. package/dist/{ko-DINqFSE1.js → ko-Bh97byDf.js} +5 -1
  92. package/dist/{ko-DDk6EdWm.js → ko-BwJHUjqS.js} +10 -4
  93. package/dist/{lazyOnce-CCfEO1xG.js → lazyOnce-BL5svIPP.js} +1 -1
  94. package/dist/locales/{4.3.121 → 4.3.123}/flow/de.js +1 -1
  95. package/dist/locales/{4.3.121 → 4.3.123}/flow/es.js +1 -1
  96. package/dist/locales/{4.3.121 → 4.3.123}/flow/fr.js +1 -1
  97. package/dist/locales/{4.3.121 → 4.3.123}/flow/id.js +1 -1
  98. package/dist/locales/{4.3.121 → 4.3.123}/flow/it.js +1 -1
  99. package/dist/locales/{4.3.121 → 4.3.123}/flow/ja.js +1 -1
  100. package/dist/locales/{4.3.121 → 4.3.123}/flow/ko.js +1 -1
  101. package/dist/locales/{4.3.121 → 4.3.123}/flow/nl.js +1 -1
  102. package/dist/locales/{4.3.121 → 4.3.123}/flow/pl.js +1 -1
  103. package/dist/locales/{4.3.121 → 4.3.123}/flow/pt-br.js +1 -1
  104. package/dist/locales/{4.3.121 → 4.3.123}/flow/tr.js +1 -1
  105. package/dist/locales/{4.3.121 → 4.3.123}/flow/zh.js +1 -1
  106. package/dist/locales/4.3.123/main/de.js +1 -0
  107. package/dist/locales/4.3.123/main/es.js +1 -0
  108. package/dist/locales/4.3.123/main/fr.js +1 -0
  109. package/dist/locales/4.3.123/main/id.js +1 -0
  110. package/dist/locales/4.3.123/main/it.js +1 -0
  111. package/dist/locales/4.3.123/main/ja.js +1 -0
  112. package/dist/locales/4.3.123/main/ko.js +1 -0
  113. package/dist/locales/4.3.123/main/nl.js +1 -0
  114. package/dist/locales/4.3.123/main/pl.js +1 -0
  115. package/dist/locales/4.3.123/main/pt-br.js +1 -0
  116. package/dist/locales/4.3.123/main/tr.js +1 -0
  117. package/dist/locales/4.3.123/main/zh.js +1 -0
  118. package/dist/look-island.svelte-Dr-Vl_J1.js +1279 -0
  119. package/dist/looks/4.3.123/looks.js +226 -0
  120. package/dist/looks/4.3.123/micdrop-wordmark-BYMG6vLR.svg +1 -0
  121. package/dist/looks/4.3.123/microphone-Ccv4r-kd.webp +0 -0
  122. package/dist/looks/4.3.123/superuser-CZF6a5gO.webp +0 -0
  123. package/dist/looks/4.3.123/treasury-DUE7lZzT.webp +0 -0
  124. package/dist/looks/4.3.123/user-image-yuS4errP.svg +9 -0
  125. package/dist/{modalManager.svelte-Cz_6x1Qd.js → modalManager.svelte-BUU99uSO.js} +1 -1
  126. package/dist/navigation-DlpJzq1c.js +176 -0
  127. package/dist/{nl-DOSKYHSx.js → nl-BQALrtyB.js} +10 -4
  128. package/dist/{nl-D92n5tHa.js → nl-ve_OaXOQ.js} +5 -1
  129. package/dist/normalizers-B8Ruvrlh.js +44 -0
  130. package/dist/{phoneUtils-CS66SHie.js → phoneUtils-CQvpvMDO.js} +50 -50
  131. package/dist/{pixels-Bu5-BISs.js → pixels-BZQYpQU0.js} +3 -3
  132. package/dist/{pl-BlZHcnlS.js → pl-BHBBOz2I.js} +5 -1
  133. package/dist/{pl-CkLEymA2.js → pl-DaPcPjBE.js} +10 -4
  134. package/dist/{portal-D-oaEWsY.js → portal-CLBp645_.js} +2 -2
  135. package/dist/{portalContainment-CeAVqIb-.js → portalContainment-Dz0y6lW6.js} +2 -2
  136. package/dist/{pt-br-BHuCQSM-.js → pt-br-BxdP86Vr.js} +10 -4
  137. package/dist/{pt-br-BrxthY0b.js → pt-br-D30dkLzU.js} +5 -1
  138. package/dist/seo/seo.mjs +9 -9
  139. package/dist/{serverTotals-B8SJCzxE.js → serverTotals-F3SRKn1I.js} +6 -6
  140. package/dist/{showcase-state-options-KO_TYk3I.js → showcase-state-options-DRCOUibv.js} +3 -3
  141. package/dist/{sizing-B7ixYndz.js → sizing-DFjg7-wy.js} +3 -3
  142. package/dist/{sortable.esm--ZtTTTPp.js → sortable.esm-RsK3eRs6.js} +1 -1
  143. package/dist/{src-DZgagYE3.js → src-DJtQCBFq.js} +1 -1
  144. package/dist/to-event-card-props-CBtlDgMr.js +205 -0
  145. package/dist/{tr-BnAdi4HO.js → tr-CFVBCuqV.js} +5 -1
  146. package/dist/{tr-Bvc34ODh.js → tr-CSfagpI3.js} +10 -4
  147. package/dist/types/index.d.ts +21 -4
  148. package/dist/utils-BXiwc_cU.js +219 -0
  149. package/dist/venue-calendar.css +1 -1
  150. package/dist/venue-calendar.es.js +1591 -1895
  151. package/dist/venue-calendar.iife.js +35 -35
  152. package/dist/venue-calendar.umd.js +175 -54
  153. package/dist/widget-key-context-litAkRgC.js +744 -0
  154. package/dist/{zh-K0hOzZ3G.js → zh-DWMcKVLH.js} +10 -4
  155. package/dist/{zh-Tg1OTvWs.js → zh-DeEOoOFR.js} +5 -1
  156. package/package.json +3 -3
  157. package/src/lib/theme.js +222 -222
  158. package/dist/Checkout-BFu5dTw_.js +0 -1933
  159. package/dist/api-BEYkGabB.js +0 -654
  160. package/dist/i18n-B705OXZp.js +0 -28
  161. package/dist/i18n-BoMUWcCq.js +0 -608
  162. package/dist/locales/4.3.121/main/de.js +0 -1
  163. package/dist/locales/4.3.121/main/es.js +0 -1
  164. package/dist/locales/4.3.121/main/fr.js +0 -1
  165. package/dist/locales/4.3.121/main/id.js +0 -1
  166. package/dist/locales/4.3.121/main/it.js +0 -1
  167. package/dist/locales/4.3.121/main/ja.js +0 -1
  168. package/dist/locales/4.3.121/main/ko.js +0 -1
  169. package/dist/locales/4.3.121/main/nl.js +0 -1
  170. package/dist/locales/4.3.121/main/pl.js +0 -1
  171. package/dist/locales/4.3.121/main/pt-br.js +0 -1
  172. package/dist/locales/4.3.121/main/tr.js +0 -1
  173. package/dist/locales/4.3.121/main/zh.js +0 -1
  174. package/dist/to-event-card-props-DYIfPN8e.js +0 -379
  175. package/dist/utils-NMx3aPDk.js +0 -412
  176. package/dist/widget-key-context-D2zj4sp5.js +0 -988
@@ -1,412 +0,0 @@
1
- import { g as e } from "./sizing-B7ixYndz.js";
2
- import { $ as t, I as n, L as r, P as i, V as a, at as o, rt as s, tt as c } from "./widget-key-context-D2zj4sp5.js";
3
- import "./event-transform-Bk1IoYh5.js";
4
- //#region node_modules/js-cookie/dist/js.cookie.mjs
5
- function l(e) {
6
- for (var t = 1; t < arguments.length; t++) {
7
- var n = arguments[t];
8
- for (var r in n) r !== "__proto__" && (e[r] = n[r]);
9
- }
10
- return e;
11
- }
12
- var u = {
13
- read: function(e) {
14
- return e[0] === "\"" && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
15
- },
16
- write: function(e) {
17
- return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
18
- }
19
- };
20
- function d(e, t) {
21
- function n(n, r, i) {
22
- if (!(typeof document > "u")) {
23
- i = l({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
24
- var a = "";
25
- for (var o in i) i[o] && (a += "; " + o, i[o] !== !0 && (a += "=" + i[o].split(";")[0]));
26
- return document.cookie = n + "=" + e.write(r, n) + a;
27
- }
28
- }
29
- function r(t) {
30
- if (!(typeof document > "u" || arguments.length && !t)) {
31
- for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, i = 0; i < n.length; i++) {
32
- var a = n[i].split("="), o = a.slice(1).join("=");
33
- try {
34
- var s = decodeURIComponent(a[0]);
35
- if (s in r || (r[s] = e.read(o, s)), t === s) break;
36
- } catch {}
37
- }
38
- return t ? r[t] : r;
39
- }
40
- }
41
- return Object.create({
42
- set: n,
43
- get: r,
44
- remove: function(e, t) {
45
- n(e, "", l({}, t, { expires: -1 }));
46
- },
47
- withAttributes: function(e) {
48
- return d(this.converter, l({}, this.attributes, e));
49
- },
50
- withConverter: function(e) {
51
- return d(l({}, this.converter, e), this.attributes);
52
- }
53
- }, {
54
- attributes: { value: Object.freeze(t) },
55
- converter: { value: Object.freeze(e) }
56
- });
57
- }
58
- var f = d(u, { path: "/" });
59
- //#endregion
60
- //#region src/lib/utils/cookies.ts
61
- function p(e, t, n = {}) {
62
- f.set(e, t, n);
63
- }
64
- function m(e) {
65
- return f.get(e);
66
- }
67
- function h(e) {
68
- f.remove(e);
69
- }
70
- //#endregion
71
- //#region src/lib/utils/checkoutState.ts
72
- var g = e("checkoutState"), _ = (e) => `micdrop:vc:${e}`, v = (e) => `micdrop-${e}`, y = (e) => _(`checkout-state-${e}`), b = (e) => `checkout-state-${e}`, x = (e) => _(`checkout-expiry-${e}`), S = (e) => `checkout-expiry-${e}`, C = v("cartid"), w = "checkout-cartid";
73
- function T(e) {
74
- return Number(e.type) === 2;
75
- }
76
- function E() {
77
- let e = typeof window < "u" && window.location.protocol === "https:";
78
- return {
79
- secure: e,
80
- sameSite: e ? "none" : "lax",
81
- path: "/"
82
- };
83
- }
84
- function D(e) {
85
- let n = {}, r = {}, i = [], a = "", o = 0, l = {};
86
- if (typeof window > "u") return {
87
- quantities: n,
88
- donationAmounts: r,
89
- addOnQuantities: l,
90
- promocode: a,
91
- promoDiscountAmount: o,
92
- tickets: i
93
- };
94
- let u = t(y(e), null);
95
- if (!u) {
96
- let n = t(b(e), null);
97
- n && (u = n, s(y(e), n), c(b(e)));
98
- }
99
- if (u) return {
100
- quantities: u.quantities || {},
101
- donationAmounts: u.donationAmounts || {},
102
- addOnQuantities: u.addOnQuantities || {},
103
- promocode: u.promocode || "",
104
- promoDiscountAmount: parseFloat(String(u.promoDiscountAmount)) || 0,
105
- tickets: u.tickets || []
106
- };
107
- try {
108
- n = JSON.parse(m(`checkout-quantities-${e}`) || "{}");
109
- } catch (e) {
110
- g.warn("Failed to parse checkout quantities cookie:", e), n = {};
111
- }
112
- try {
113
- i = JSON.parse(m(`checkout-tickets-${e}`) || "[]");
114
- } catch (e) {
115
- g.warn("Failed to parse checkout tickets cookie:", e), i = [];
116
- }
117
- return a = m(`checkout-promocode-${e}`) || "", o = parseFloat(m(`checkout-promo-discount-${e}`) || "0"), (Object.keys(n).length > 0 || i.length > 0 || a) && (A({
118
- eventID: e,
119
- quantities: n,
120
- donationAmounts: r,
121
- promocode: a,
122
- promoDiscountAmount: o,
123
- tickets: i
124
- }), O(e)), {
125
- quantities: n,
126
- donationAmounts: r,
127
- addOnQuantities: l,
128
- promocode: a,
129
- promoDiscountAmount: o,
130
- tickets: i
131
- };
132
- }
133
- function O(e) {
134
- h(`checkout-quantities-${e}`), h(`checkout-tickets-${e}`), h(`checkout-promocode-${e}`), h(`checkout-promo-discount-${e}`);
135
- }
136
- function k(e) {
137
- c(y(e)), c(b(e)), O(e), h(`checkout-promo-discount-type-${e}`), h(`checkout-promo-reveal-${e}`), h(`checkout-promo-reveal-ids-${e}`), h(`checkout-promo-ticket-ids-${e}`);
138
- }
139
- function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r, promocode: i, promoDiscountAmount: a, tickets: o }) {
140
- if (typeof window > "u") return;
141
- let c = (o || []).map((e) => ({
142
- ID: e.ID,
143
- name: e.name,
144
- price: e.price,
145
- type: e.type,
146
- visibility: e.visibility,
147
- salesChannel: e.salesChannel
148
- })), l = {
149
- quantities: t || {},
150
- donationAmounts: n || {},
151
- addOnQuantities: r || {},
152
- promocode: i || "",
153
- promoDiscountAmount: a || 0,
154
- tickets: c,
155
- updatedAt: Date.now()
156
- };
157
- s(y(e), l);
158
- }
159
- function j(e) {
160
- if (!e) return null;
161
- let n = t(x(e), null);
162
- if (n != null) return P(n);
163
- let r = t(S(e), null);
164
- if (r == null) return null;
165
- let i = P(r);
166
- return i != null && (s(x(e), i), c(S(e))), i;
167
- }
168
- function M(e, t) {
169
- !e || !Number.isFinite(t) || s(x(e), t);
170
- }
171
- function N(e) {
172
- e && (c(x(e)), c(S(e)));
173
- }
174
- function P(e) {
175
- let t = typeof e == "number" ? e : parseInt(e, 10);
176
- return Number.isFinite(t) && t > 0 ? t : null;
177
- }
178
- function ee(e) {
179
- let t = E();
180
- p(C, e, t), p(w, e, t);
181
- }
182
- async function te(e) {
183
- let t = v(`order-id-${e}`), n = `order-id-${e}`, r = m(t) || m(n);
184
- if (r) return r;
185
- let i = `order-${e}-${Date.now()}`, a = E();
186
- return p(t, i, a), p(n, i, a), i;
187
- }
188
- var F = (e) => _(`queue-token-${e}`);
189
- function I(e) {
190
- return t(F(e), null);
191
- }
192
- function L(e, t) {
193
- t && s(F(e), t);
194
- }
195
- function R(e) {
196
- c(F(e));
197
- }
198
- //#endregion
199
- //#region src/lib/api/surge-queue.ts
200
- var z = e("VC"), B = "queue_unavailable", V = {
201
- armed: !1,
202
- mode: "off",
203
- waiting: 0,
204
- etaSeconds: 0
205
- }, H = 5e3, U = 1e3;
206
- function W(e) {
207
- return typeof e == "number" && Number.isFinite(e) && e > 0 ? Math.floor(e) : 0;
208
- }
209
- function G(e) {
210
- return e === "off" || e === "auto" || e === "on" ? e : "off";
211
- }
212
- function K(e) {
213
- return e === "open" || e === "waiting" || e === "admitted" ? e : "expired";
214
- }
215
- function q(e) {
216
- return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? H : Math.max(e, U);
217
- }
218
- function J(e) {
219
- let t = K(e?.state), n = typeof e?.token == "string" ? e.token : "";
220
- return !n && t !== "open" ? null : {
221
- token: n,
222
- state: t,
223
- position: W(e?.position),
224
- ahead: W(e?.ahead),
225
- etaSeconds: W(e?.etaSeconds),
226
- pollAfterMs: q(e?.pollAfterMs),
227
- expiresAt: typeof e?.expiresAt == "string" ? e.expiresAt : ""
228
- };
229
- }
230
- async function Y(e, t) {
231
- try {
232
- let r = await n(`/events/${e}/queue`, { widgetKey: t?.widgetKey });
233
- return r.success ? {
234
- armed: r.data?.armed === !0,
235
- mode: G(r.data?.mode),
236
- waiting: W(r.data?.waiting),
237
- etaSeconds: W(r.data?.etaSeconds)
238
- } : V;
239
- } catch (e) {
240
- return z.error("getQueueState error:", e), V;
241
- }
242
- }
243
- async function X(e, t) {
244
- try {
245
- let n = await r(`/events/${e}/queue/join`, {}, { widgetKey: t?.widgetKey });
246
- if (!n.success) return {
247
- success: !1,
248
- errorCode: n.errorCode || "queue_unavailable",
249
- statusCode: n.statusCode
250
- };
251
- let i = J(n.data);
252
- return i ? {
253
- success: !0,
254
- entry: i,
255
- statusCode: n.statusCode
256
- } : {
257
- success: !1,
258
- errorCode: B,
259
- statusCode: n.statusCode
260
- };
261
- } catch (e) {
262
- return z.error("joinQueue error:", e), {
263
- success: !1,
264
- errorCode: B
265
- };
266
- }
267
- }
268
- async function Z(e, t, r) {
269
- if (!t) return {
270
- success: !1,
271
- errorCode: B
272
- };
273
- try {
274
- let i = await n(`/events/${e}/queue/status?token=${encodeURIComponent(t)}`, { widgetKey: r?.widgetKey });
275
- if (!i.success) return {
276
- success: !1,
277
- errorCode: i.errorCode || "queue_unavailable",
278
- statusCode: i.statusCode
279
- };
280
- let a = J(i.data);
281
- return a ? {
282
- success: !0,
283
- entry: a,
284
- statusCode: i.statusCode
285
- } : {
286
- success: !1,
287
- errorCode: B,
288
- statusCode: i.statusCode
289
- };
290
- } catch (e) {
291
- return z.error("getQueueStatus error:", e), {
292
- success: !1,
293
- errorCode: B
294
- };
295
- }
296
- }
297
- async function ne(e, t, n) {
298
- if (!t) return { released: !1 };
299
- try {
300
- return { released: (await r(`/events/${e}/queue/leave`, { token: t }, {
301
- keepalive: !0,
302
- suppressOnError: !0,
303
- widgetKey: n?.widgetKey
304
- })).data?.released === !0 };
305
- } catch (e) {
306
- return z.error("leaveQueue error:", e), { released: !1 };
307
- }
308
- }
309
- //#endregion
310
- //#region src/lib/utils/orderApi.ts
311
- var Q = e("orderApi");
312
- function re(e) {
313
- if (typeof e == "string") return e;
314
- if (e && typeof e == "object") {
315
- let t = e.message;
316
- if (typeof t == "string" && t) return t;
317
- let n = e.code;
318
- if (typeof n == "string" && n) return n;
319
- }
320
- return "";
321
- }
322
- function ie(e) {
323
- if (e && typeof e == "object") {
324
- let t = e.code;
325
- if (typeof t == "string") return t;
326
- }
327
- return "";
328
- }
329
- async function ae() {
330
- return null;
331
- }
332
- async function oe(e, t) {
333
- try {
334
- let r = await n(`/venues/${e}`, { widgetKey: t?.widgetKey });
335
- if (!r.success) throw new o(r.error ?? `API error: ${r.statusCode}`, r.statusCode ?? 0, {
336
- endpoint: `/venues/${e}`,
337
- method: "GET"
338
- });
339
- return r.data;
340
- } catch (e) {
341
- throw Q.error("getVenueDetails error:", e), e;
342
- }
343
- }
344
- async function $(e = {}, t, n) {
345
- try {
346
- let i = await ae(), { eventID: a, quantities: o, donationAmounts: s, ...c } = e, l = o ? Object.fromEntries(Object.entries(o).map(([e, t]) => [parseInt(e, 10), t])) : {}, u = s ? Object.fromEntries(Object.entries(s).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, d = {
347
- purchaserIP: i,
348
- eventID: a ? parseInt(String(a), 10) : void 0,
349
- quantities: l,
350
- ...u && Object.keys(u).length > 0 ? { donationAmounts: u } : {},
351
- ...c
352
- }, f = await r("/orders/create", d, t ? {
353
- headers: { "X-Queue-Token": t },
354
- widgetKey: n?.widgetKey
355
- } : { widgetKey: n?.widgetKey }), p = f.data ?? {};
356
- if (!f.success || p.error) {
357
- let e = re(p.error) || (typeof p.message == "string" ? p.message : "") || f.error || "Order creation failed";
358
- if ((f.errorCode || ie(p.error)) === "QUEUE_REQUIRED") return {
359
- success: !1,
360
- error: e,
361
- errorType: "queue"
362
- };
363
- let t = e.toLowerCase();
364
- return {
365
- success: !1,
366
- error: e,
367
- errorType: t.includes("inventory") || t.includes("sold out") || t.includes("not available") || t.includes("insufficient") || f.statusCode === 409 ? "inventory" : "server"
368
- };
369
- }
370
- return ee(p.uuid || p.cartUUID), {
371
- success: !0,
372
- uuid: p.uuid || p.cartUUID,
373
- serviceFee: p.serviceFee ?? 0,
374
- subtotal: p.subtotal ?? 0
375
- };
376
- } catch (e) {
377
- let t = e instanceof Error ? e.message : "Network error";
378
- return Q.error("Order initiation failed:", e), {
379
- success: !1,
380
- error: t,
381
- errorType: "network"
382
- };
383
- }
384
- }
385
- async function se(e, t) {
386
- try {
387
- let r = await n(`/orders/${e}`, { widgetKey: t?.widgetKey });
388
- if (!r.success) {
389
- let t = r.error ?? `Failed to fetch order (${r.statusCode})`;
390
- throw Q.error("getOrder error response:", t), new o(t, r.statusCode ?? 0, {
391
- endpoint: `/orders/${e}`,
392
- method: "GET"
393
- });
394
- }
395
- return r.data;
396
- } catch (e) {
397
- throw Q.error("getOrder error:", e), e;
398
- }
399
- }
400
- //#endregion
401
- //#region src/lib/utils/utm.ts
402
- var ce = e("utm");
403
- async function le(e) {
404
- let t = new URLSearchParams(window.location.search), n = i(t.get("utm_source")) || "direct";
405
- try {
406
- await fetch(`${a()}/utm/${e}/${encodeURIComponent(n)}`);
407
- } catch (e) {
408
- ce.error("UTM tracking failed:", e);
409
- }
410
- }
411
- //#endregion
412
- export { h as C, m as S, A as _, Y as a, M as b, ne as c, k as d, N as f, D as g, T as h, $ as i, C as l, te as m, se as n, Z as o, R as p, oe as r, X as s, le as t, w as u, j as v, p as w, L as x, I as y };