@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,988 +0,0 @@
1
- import { _ as e, g as t, v as n } from "./sizing-B7ixYndz.js";
2
- import { A as r, L as i, a, o } from "./defaultLabels-BbNEEsF7.js";
3
- import { n as s } from "./Button-VUB2WJ88.js";
4
- import * as c from "svelte/internal/client";
5
- import { getContext as l } from "svelte";
6
- //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
7
- var u = class e extends s {
8
- constructor(e, t, n = {}) {
9
- super(e, `API_${t}`, {
10
- status: t,
11
- details: n.details,
12
- recoverable: t < 500,
13
- cause: n.cause
14
- }), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
15
- }
16
- getUserMessage(e) {
17
- return o(this.status, this.message, e);
18
- }
19
- isRetryable() {
20
- return this.status >= 500 || this.status === 429;
21
- }
22
- static async fromResponse(t, n, r) {
23
- let i = `Request failed with status ${t.status}`, o;
24
- try {
25
- let e = await t.json();
26
- i = a(e, i), o = e.details || e;
27
- } catch {}
28
- return new e(i, t.status, {
29
- endpoint: n,
30
- method: r,
31
- details: o,
32
- requestId: t.headers.get("x-request-id") || void 0
33
- });
34
- }
35
- };
36
- //#endregion
37
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/storage/storage.js
38
- function d(e) {
39
- if (typeof window > "u") return null;
40
- try {
41
- return e === "local" ? window.localStorage : window.sessionStorage;
42
- } catch {
43
- return null;
44
- }
45
- }
46
- function ee(e, t) {
47
- if (e == null || e === "") return t;
48
- try {
49
- return JSON.parse(e);
50
- } catch {
51
- return t;
52
- }
53
- }
54
- function te(e, t, n) {
55
- if (!e) return n;
56
- let r;
57
- try {
58
- r = e.getItem(t);
59
- } catch {
60
- return n;
61
- }
62
- return ee(r, n);
63
- }
64
- function ne(t, n, r) {
65
- if (!t) return !1;
66
- try {
67
- return t.setItem(n, JSON.stringify(r)), !0;
68
- } catch (t) {
69
- return e.warn(`storage: failed to write "${n}"`, t), !1;
70
- }
71
- }
72
- function re(e, t) {
73
- if (e) try {
74
- e.removeItem(t);
75
- } catch {}
76
- }
77
- function f(e, t, n) {
78
- return te(d(e), t, n);
79
- }
80
- function p(e, t, n) {
81
- return ne(d(e), t, n);
82
- }
83
- function ie(e, t) {
84
- re(d(e), t);
85
- }
86
- function m(e, t = null) {
87
- return f("local", e, t);
88
- }
89
- function h(e, t) {
90
- return p("local", e, t);
91
- }
92
- function ae(e) {
93
- ie("local", e);
94
- }
95
- function g(e, t = null) {
96
- return f("session", e, t);
97
- }
98
- function _(e, t) {
99
- return p("session", e, t);
100
- }
101
- function oe(e) {
102
- ie("session", e);
103
- }
104
- //#endregion
105
- //#region src/lib/config.js
106
- var se = t("VC:config", { enabled: !0 }), v = null;
107
- function ce(e) {
108
- let t = e || null;
109
- v && t && t !== v && se.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), v = t;
110
- }
111
- function le() {
112
- if (v) return v;
113
- }
114
- var ue = null;
115
- function de(e) {
116
- ue = typeof e == "string" && e.trim() ? e.trim() : null;
117
- }
118
- function fe() {
119
- return (ue || w().baseUrl || (typeof window > "u" ? "" : window.location.origin) || "").replace(/\/+$/, "");
120
- }
121
- function pe(e) {}
122
- var y = {
123
- postMessageOnSuccess: !1,
124
- postMessageTargetOrigin: null
125
- };
126
- function me(e = {}) {
127
- y = {
128
- ...y,
129
- ...e
130
- };
131
- }
132
- function he() {
133
- return { ...y };
134
- }
135
- //#endregion
136
- //#region src/lib/api/client.ts
137
- var b = t("VC"), x = /* @__PURE__ */ new Set();
138
- function ge(e) {
139
- return x.add(e), () => {
140
- x.delete(e);
141
- };
142
- }
143
- function _e(e) {
144
- if (e) for (let t of x) try {
145
- t(e);
146
- } catch {}
147
- }
148
- var ve = "ABORTED";
149
- function S(e, t) {
150
- let n = t || le();
151
- return n ? {
152
- ...e,
153
- "X-Widget-Key": n
154
- } : e;
155
- }
156
- function ye(e, t) {
157
- let n = `HTTP ${t}`;
158
- if (!e || typeof e != "object") return { message: n };
159
- let r = e, i = r.error && typeof r.error == "object" ? r.error : null, a = typeof r.code == "string" ? r.code : typeof i?.code == "string" ? i.code : void 0;
160
- return {
161
- message: typeof r.error == "string" ? r.error : typeof i?.message == "string" ? i.message : typeof r.message == "string" ? r.message : n,
162
- code: a
163
- };
164
- }
165
- var be = class extends Error {
166
- code;
167
- statusCode;
168
- constructor(e, t, n) {
169
- super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
170
- }
171
- }, C = {
172
- baseUrl: "https://get-micdrop.com",
173
- timeout: 3e4,
174
- retries: 2,
175
- retryDelay: 500,
176
- onError: (e) => b.error("API Error:", e)
177
- };
178
- function xe(e) {
179
- C = {
180
- ...C,
181
- ...e
182
- };
183
- }
184
- function w() {
185
- return { ...C };
186
- }
187
- function T() {
188
- return `${C.baseUrl}/api/v2/public`;
189
- }
190
- function E() {
191
- return `${C.baseUrl}/api/orders/v2/public`;
192
- }
193
- var Se = (e) => new Promise((t) => setTimeout(t, e));
194
- async function D(e, t, n) {
195
- let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
196
- for (let r = 1; r <= i; r++) {
197
- let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
198
- c && (c.aborted ? o.abort() : (l = () => o.abort(), c.addEventListener("abort", l, { once: !0 })));
199
- try {
200
- let n = await fetch(e, {
201
- ...t,
202
- signal: o.signal
203
- });
204
- if (n.status >= 500 && r < i) a = /* @__PURE__ */ Error(`HTTP ${n.status}`);
205
- else return n;
206
- } catch (e) {
207
- if (a = e, c?.aborted) throw e;
208
- } finally {
209
- clearTimeout(s), c && l && c.removeEventListener("abort", l);
210
- }
211
- r < i && await Se(n.retryDelay * 2 ** (r - 1));
212
- }
213
- throw a;
214
- }
215
- async function O(e, t) {
216
- return A("GET", e, void 0, t);
217
- }
218
- async function k(e, t, n) {
219
- return A("POST", e, t, n);
220
- }
221
- async function Ce(e, t) {
222
- return A("DELETE", e, void 0, t);
223
- }
224
- async function A(e, t, n, r) {
225
- let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${T()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
226
- o || C.onError(e);
227
- };
228
- try {
229
- let t = await D(i, {
230
- method: e,
231
- headers: S({
232
- "Content-Type": "application/json",
233
- ...s
234
- }, a),
235
- body: n === void 0 ? void 0 : JSON.stringify(n),
236
- ...c
237
- }, C);
238
- if (!t.ok) {
239
- let { message: e, code: n } = ye(await t.json().catch(() => ({})), t.status);
240
- return l(new be(e, n, t.status)), _e(n), {
241
- success: !1,
242
- error: e,
243
- errorCode: n,
244
- statusCode: t.status
245
- };
246
- }
247
- return {
248
- success: !0,
249
- data: await t.json(),
250
- statusCode: t.status
251
- };
252
- } catch (e) {
253
- if (r?.signal?.aborted) return {
254
- success: !1,
255
- error: "Request aborted",
256
- errorCode: ve,
257
- aborted: !0
258
- };
259
- let t = e instanceof Error ? e.name === "AbortError" ? "Request timed out" : e.message : "Unknown error";
260
- return l(e instanceof Error ? e : Error(t)), {
261
- success: !1,
262
- error: t
263
- };
264
- }
265
- }
266
- async function we(e, t) {
267
- return k(`${T()}/tax-preview`, e, {
268
- signal: t?.signal,
269
- suppressOnError: t?.suppressOnError ?? !0,
270
- widgetKey: t?.widgetKey
271
- });
272
- }
273
- async function Te(e, t) {
274
- try {
275
- let n = e.startsWith(C.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await D(e, {
276
- ...i,
277
- ...n ? { headers: S(i.headers, r) } : {}
278
- }, C);
279
- if (!a.ok) {
280
- let e = await a.json().catch(() => ({}));
281
- return b.error(`API request failed: ${a.status}`, e), null;
282
- }
283
- return a.json();
284
- } catch (e) {
285
- return b.error("API request error:", e), null;
286
- }
287
- }
288
- //#endregion
289
- //#region src/lib/tracking/normalize.ts
290
- var j = [
291
- "utmSource",
292
- "utmMedium",
293
- "utmCampaign",
294
- "utmContent",
295
- "utmTerm"
296
- ], Ee = {
297
- utmSource: "utm_source",
298
- utmMedium: "utm_medium",
299
- utmCampaign: "utm_campaign",
300
- utmContent: "utm_content",
301
- utmTerm: "utm_term"
302
- }, M = "direct";
303
- function De(e) {
304
- return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
305
- }
306
- function Oe(e) {
307
- let t = {};
308
- for (let n of j) t[n] = De(e[n]);
309
- return t.utmSource ||= M, t;
310
- }
311
- function ke(e) {
312
- let t = {};
313
- for (let n of j) t[n] = e.get(Ee[n]);
314
- return Oe(t);
315
- }
316
- function Ae(e) {
317
- return !!e.utmSource && e.utmSource !== "direct";
318
- }
319
- //#endregion
320
- //#region src/lib/tracking/context.ts
321
- var je = null, Me = null, N = {
322
- search: null,
323
- referrer: null,
324
- pageUrl: null
325
- };
326
- function Ne(e) {
327
- e.widgetId !== void 0 && (je = e.widgetId || null), e.venueId !== void 0 && (Me = e.venueId ?? null);
328
- }
329
- function Pe(e) {
330
- e.search !== void 0 && (N.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (N.referrer = e.referrer), e.pageUrl !== void 0 && (N.pageUrl = e.pageUrl);
331
- }
332
- function Fe() {
333
- return je;
334
- }
335
- function Ie() {
336
- return Me;
337
- }
338
- function Le() {
339
- if (typeof window > "u") return !0;
340
- try {
341
- return window.self === window.top;
342
- } catch {
343
- return !1;
344
- }
345
- }
346
- function P() {
347
- let e = typeof window < "u", t = Le(), n = N.search ?? (e ? window.location.search : ""), r = N.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = N.pageUrl ?? (e && t ? window.location.href : "");
348
- return {
349
- utm: ke(new URLSearchParams(n)),
350
- referrer: r || "",
351
- pageUrl: i || ""
352
- };
353
- }
354
- function Re() {
355
- if (typeof navigator > "u") return "desktop";
356
- let e = navigator.userAgent.toLowerCase();
357
- return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
358
- }
359
- //#endregion
360
- //#region src/lib/tracking/consent.ts
361
- var F = null, I = !1, L = !1, R = !1;
362
- function ze(e) {
363
- F = e;
364
- }
365
- function Be(e) {
366
- I = e;
367
- }
368
- function Ve(e) {
369
- R = e;
370
- }
371
- function z() {
372
- return R;
373
- }
374
- function B() {
375
- return typeof window < "u" && typeof window.__tcfapi == "function";
376
- }
377
- function V() {
378
- return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
379
- }
380
- function He() {
381
- return R ? !0 : F === null ? B() || V() : F;
382
- }
383
- function H() {
384
- return R ? !1 : !He() || I;
385
- }
386
- function Ue() {
387
- if (L || !B()) return;
388
- L = !0;
389
- let e = window.__tcfapi;
390
- try {
391
- e("addEventListener", 2, (e, t) => {
392
- if (!(!t || !e)) {
393
- if (e.gdprApplies === !1) {
394
- V() || (I = !0);
395
- return;
396
- }
397
- if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
398
- let t = e.purpose?.consents;
399
- I = !!t && Object.values(t).some(Boolean);
400
- }
401
- }
402
- });
403
- } catch {}
404
- }
405
- //#endregion
406
- //#region src/lib/tracking/identity.ts
407
- var U = "micdrop_session_id", W = "micdrop_visitor_id", We = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
408
- function G(e) {
409
- return typeof e == "string" && We.test(e);
410
- }
411
- function K() {
412
- let e = typeof crypto < "u" ? crypto : void 0;
413
- if (e?.randomUUID) return e.randomUUID();
414
- let t = /* @__PURE__ */ new Uint8Array(16);
415
- if (e?.getRandomValues) e.getRandomValues(t);
416
- else for (let e = 0; e < 16; e++) t[e] = Math.floor(Math.random() * 256);
417
- t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
418
- let n = [];
419
- for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
420
- return `${n[0]}${n[1]}${n[2]}${n[3]}-${n[4]}${n[5]}-${n[6]}${n[7]}-${n[8]}${n[9]}-${n[10]}${n[11]}${n[12]}${n[13]}${n[14]}${n[15]}`;
421
- }
422
- function Ge() {
423
- let e = g(U);
424
- return e || (e = K(), _(U, e)), e;
425
- }
426
- function Ke(e) {
427
- let t = m(W);
428
- if (G(t)) return {
429
- id: t,
430
- createdAt: e,
431
- migrated: !0
432
- };
433
- if (t && typeof t == "object") {
434
- let { id: n, createdAt: r } = t;
435
- if (!G(n)) return null;
436
- let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
437
- return {
438
- id: n,
439
- createdAt: a,
440
- migrated: !i || a !== r
441
- };
442
- }
443
- return null;
444
- }
445
- function q() {
446
- if (!H()) return null;
447
- let e = Date.now(), t = Ke(e);
448
- if (t && e - t.createdAt < 34128e6) return t.migrated && h(W, {
449
- id: t.id,
450
- createdAt: t.createdAt
451
- }), t.id;
452
- let n = K();
453
- return h(W, {
454
- id: n,
455
- createdAt: e
456
- }), n;
457
- }
458
- //#endregion
459
- //#region src/lib/tracking/attribution-store.ts
460
- var qe = "micdrop_attribution";
461
- function Je(e, t) {
462
- if (!e || !t) return !1;
463
- try {
464
- let n = new URL(e).host, r = new URL(t).host;
465
- return !!n && !!r && n !== r;
466
- } catch {
467
- return !1;
468
- }
469
- }
470
- function Ye(e) {
471
- return Ae(e.utm) || Je(e.referrer, e.pageUrl);
472
- }
473
- function Xe() {
474
- let e = g(qe);
475
- return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
476
- }
477
- function Ze(e = P()) {
478
- let t = Ye(e), n = Xe();
479
- !t && n || _(qe, {
480
- utm: e.utm,
481
- referrer: e.referrer,
482
- marketing: t
483
- });
484
- }
485
- function J() {
486
- let e = Xe() ?? P();
487
- return {
488
- sessionId: Ge(),
489
- visitorId: q(),
490
- utmSource: e.utm.utmSource,
491
- utmMedium: e.utm.utmMedium,
492
- utmCampaign: e.utm.utmCampaign,
493
- utmContent: e.utm.utmContent,
494
- utmTerm: e.utm.utmTerm,
495
- referrer: e.referrer || ""
496
- };
497
- }
498
- //#endregion
499
- //#region src/lib/tracking/beacon.ts
500
- var Qe = t("tracking"), $e = /* @__PURE__ */ new Set([
501
- "chunk_load_error",
502
- "type_error",
503
- "reference_error",
504
- "syntax_error",
505
- "range_error",
506
- "security_error",
507
- "network_error",
508
- "abort_error",
509
- "not_supported_error",
510
- "error"
511
- ]), et = "other";
512
- function tt(e) {
513
- try {
514
- let t = e instanceof Error || e && typeof e == "object" && "name" in e ? String(e.name ?? "") : "", n = e && typeof e == "object" && "message" in e ? String(e.message ?? "") : "";
515
- if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
516
- let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
517
- return $e.has(r) ? r : et;
518
- } catch {
519
- return et;
520
- }
521
- }
522
- var nt = /* @__PURE__ */ new Set(["add_to_cart", "purchase"]), rt = "micdrop_tracked_beacons", it = 300;
523
- function at(e, t, n, r, i, a, o, s = "") {
524
- let c = n || `url:${o}`, l = [
525
- e,
526
- t ?? "",
527
- c,
528
- r,
529
- i,
530
- a
531
- ];
532
- return s && l.push(s), l.join(":");
533
- }
534
- function ot(e) {
535
- if (e == null || e === "") return null;
536
- let t = Number(e);
537
- return Number.isFinite(t) ? t : null;
538
- }
539
- function st(e) {
540
- let t = g(rt, []) ?? [];
541
- if (t.includes(e)) return !0;
542
- let n = [...t, e];
543
- return _(rt, n.length > it ? n.slice(-300) : n), !1;
544
- }
545
- async function Y(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cartId: a } = {}) {
546
- if (typeof window > "u" || z()) return;
547
- let o = P();
548
- if (Ze(o), e === "link_click" && !Ae(o.utm)) return;
549
- let s = Ge(), c = n === void 0 ? Fe() : n;
550
- if (!(nt.has(e) || e === "checkout_started" && !a) && st(at(e, t, c, o.utm.utmSource, o.utm.utmCampaign, s, o.pageUrl, i ? `${i.stage}:${i.errName}` : a ? `cart:${a}` : ""))) return;
551
- let l = r === void 0 ? Ie() : r, u = H(), d = {
552
- eventType: e,
553
- eventId: ot(t),
554
- venueId: ot(l),
555
- widgetId: c,
556
- utmSource: o.utm.utmSource,
557
- utmMedium: o.utm.utmMedium,
558
- utmCampaign: o.utm.utmCampaign,
559
- utmContent: o.utm.utmContent,
560
- utmTerm: o.utm.utmTerm,
561
- sessionId: s,
562
- visitorId: q(),
563
- deviceType: Re(),
564
- referrer: u ? o.referrer : "",
565
- pageUrl: u ? o.pageUrl : "",
566
- ...i ? {
567
- errName: i.errName,
568
- stage: i.stage
569
- } : {}
570
- };
571
- try {
572
- await fetch(`${T()}/track/pageview`, {
573
- method: "POST",
574
- headers: { "Content-Type": "application/json" },
575
- body: JSON.stringify(d),
576
- keepalive: !0
577
- });
578
- } catch (t) {
579
- Qe.error(`Beacon '${e}' failed:`, t);
580
- }
581
- }
582
- var ct = (e, t) => Y("link_click", {
583
- widgetId: e,
584
- venueId: t
585
- }), lt = (e, t) => Y("widget_load", {
586
- widgetId: e,
587
- venueId: t
588
- }), ut = (e, t) => Y("list_view", {
589
- widgetId: e,
590
- venueId: t
591
- }), dt = (e, t, n) => Y("event_view", {
592
- eventId: e,
593
- widgetId: t,
594
- venueId: n
595
- }), ft = (e, t, n) => Y("add_to_cart", {
596
- eventId: e,
597
- widgetId: t,
598
- venueId: n
599
- }), pt = (e, t, n, r) => Y("checkout_started", {
600
- eventId: e,
601
- widgetId: t,
602
- venueId: n,
603
- cartId: r
604
- }), mt = (e, t, n) => Y("price_unavailable", {
605
- eventId: e,
606
- widgetId: t,
607
- venueId: n
608
- }), ht = (e, t, n) => Y("purchase", {
609
- eventId: e,
610
- widgetId: t,
611
- venueId: n
612
- });
613
- function gt(e, t, n, r) {
614
- try {
615
- Y("widget_error", {
616
- widgetId: n,
617
- venueId: r,
618
- error: {
619
- errName: tt(e),
620
- stage: t
621
- }
622
- }).catch(() => {});
623
- } catch {}
624
- }
625
- //#endregion
626
- //#region src/lib/api/transformers/cart.ts
627
- function _t(e) {
628
- let t = e ?? {};
629
- return {
630
- ticketID: Number(t.TicketID ?? t.ticketID ?? 0),
631
- quantity: Number(t.Quantity ?? t.quantity ?? 0),
632
- priceAtReservation: Number(t.PriceAtReservation ?? t.priceAtReservation ?? 0),
633
- status: String(t.Status ?? t.status ?? "")
634
- };
635
- }
636
- function vt(e) {
637
- let t = e ?? {}, n = t.Amount ?? t.amount, a = Number(n);
638
- return {
639
- giftCardId: Number(t.GiftCardID ?? t.giftCardId ?? 0),
640
- maskedCode: String(t.MaskedCode ?? t.maskedCode ?? ""),
641
- amount: n == null || !Number.isFinite(a) ? null : r(i(a))
642
- };
643
- }
644
- function yt(e) {
645
- let t = e ?? {};
646
- return {
647
- uuid: t.UUID ?? t.uuid ?? "",
648
- eventID: Number(t.EventID ?? t.eventID ?? 0),
649
- status: t.Status ?? t.status ?? "",
650
- expiresAt: t.ExpiresAt ?? t.expiresAt ?? "",
651
- reservations: (t.Reservations ?? t.reservations ?? []).map(_t),
652
- giftCards: (t.GiftCards ?? t.giftCards ?? []).map(vt)
653
- };
654
- }
655
- //#endregion
656
- //#region src/lib/i18n/localeLoader.svelte.js
657
- var X = c.state(0);
658
- function bt() {
659
- return c.get(X);
660
- }
661
- function xt() {
662
- c.set(X, c.get(X) + 1);
663
- }
664
- //#endregion
665
- //#region src/lib/i18n/createI18n.js
666
- function Z() {
667
- return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
668
- }
669
- function St({ defaults: e, locales: t = {}, loaders: r = {} }) {
670
- let i = t.en ?? e, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
671
- function s(e) {
672
- return t[e] ? t[e] : a.has(e) ? a.get(e) : null;
673
- }
674
- function c(e) {
675
- let t = s(e);
676
- if (t) return Promise.resolve(t);
677
- if (o.has(e)) return o.get(e);
678
- let n = r[e];
679
- if (!n) return Promise.resolve(null);
680
- let i = Promise.resolve().then(n).then((t) => (a.set(e, t), xt(), t));
681
- return i.catch(() => o.delete(e)), o.set(e, i), i;
682
- }
683
- function l(e) {
684
- if (bt(), !e || typeof e != "string") return {
685
- labels: i,
686
- locale: "en"
687
- };
688
- let t = e.toLowerCase(), n = s(t);
689
- if (n) return {
690
- labels: n,
691
- locale: t
692
- };
693
- if (r[t]) return c(t), {
694
- labels: i,
695
- locale: "en"
696
- };
697
- let a = t.split("-")[0], o = s(a);
698
- return o ? {
699
- labels: o,
700
- locale: a
701
- } : (r[a] && c(a), {
702
- labels: i,
703
- locale: "en"
704
- });
705
- }
706
- function u(t = void 0, r = {}) {
707
- let { labels: i } = l(t || Z() || "en");
708
- return n(n(e, i), r);
709
- }
710
- function d(e) {
711
- if (!e || typeof e != "string") return Promise.resolve(i);
712
- let t = e.toLowerCase();
713
- if (s(t) || r[t]) return c(t);
714
- let n = t.split("-")[0];
715
- return s(n) || r[n] ? c(n) : Promise.resolve(null);
716
- }
717
- function ee() {
718
- return Array.from(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(r)]));
719
- }
720
- return {
721
- resolveLocale: l,
722
- getLabelsForLocale: u,
723
- listLocales: ee,
724
- loadLocale: d
725
- };
726
- }
727
- //#endregion
728
- //#region src/lib/i18n/localeSpec.js
729
- var Ct = [
730
- [
731
- "es",
732
- "es",
733
- "es"
734
- ],
735
- [
736
- "fr",
737
- "fr",
738
- "fr"
739
- ],
740
- [
741
- "pt-br",
742
- "pt-br",
743
- "pt_br"
744
- ],
745
- [
746
- "pt",
747
- "pt-br",
748
- "pt_br"
749
- ],
750
- [
751
- "de",
752
- "de",
753
- "de"
754
- ],
755
- [
756
- "ja",
757
- "ja",
758
- "ja"
759
- ],
760
- [
761
- "zh",
762
- "zh",
763
- "zh"
764
- ],
765
- [
766
- "ko",
767
- "ko",
768
- "ko"
769
- ],
770
- [
771
- "it",
772
- "it",
773
- "it"
774
- ],
775
- [
776
- "nl",
777
- "nl",
778
- "nl"
779
- ],
780
- [
781
- "tr",
782
- "tr",
783
- "tr"
784
- ],
785
- [
786
- "id",
787
- "id",
788
- "id"
789
- ],
790
- [
791
- "pl",
792
- "pl",
793
- "pl"
794
- ]
795
- ];
796
- Array.from(new Set(Ct.map(([, e]) => e)));
797
- //#endregion
798
- //#region src/lib/i18n/buyerLocale.ts
799
- var wt = new Map([["en", "en"], ...Ct.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
800
- function Q(e) {
801
- let t = e || Z();
802
- if (!t || typeof t != "string") return;
803
- let n = t.toLowerCase();
804
- return wt.get(n) ?? wt.get(n.split("-")[0]);
805
- }
806
- //#endregion
807
- //#region src/lib/api/orders.ts
808
- var $ = t("VC");
809
- async function Tt(e, t, n, r, i, a) {
810
- let o = Q(i);
811
- return k(`${E()}/cart/${e}/payment-intent`, {
812
- productQuantities: t,
813
- ...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
814
- ...r ? {
815
- firstName: r.firstName,
816
- lastName: r.lastName,
817
- email: r.email,
818
- phone: r.phone ?? "",
819
- questionAnswer: r.questionAnswer ?? "",
820
- mailingList: r.mailingList ?? !1
821
- } : {},
822
- attribution: J(),
823
- ...o ? { locale: o } : {}
824
- }, { widgetKey: a?.widgetKey });
825
- }
826
- async function Et(e, t, n, r, i, a) {
827
- try {
828
- let o = await Tt(e, t, n, r, i, a);
829
- if (!o.success) throw $.error("Payment intent creation failed:", o.error), new u(o.error || "Failed to create payment intent", o.statusCode ?? 0, {
830
- endpoint: `${E()}/cart/${e}/payment-intent`,
831
- method: "POST"
832
- });
833
- return $.debug("Payment intent created:", o.data), o.data;
834
- } catch (e) {
835
- return $.error("createPaymentIntent error:", e), null;
836
- }
837
- }
838
- var Dt = "VALIDATION_FAILED";
839
- async function Ot(e, t, n, r, i, a) {
840
- let o;
841
- try {
842
- o = await Tt(e, t, n, r, i, a);
843
- } catch (e) {
844
- return $.error("submitCheckoutAnswers error:", e), { refusal: null };
845
- }
846
- return o.success ? {
847
- refusal: null,
848
- clientSecret: o.data?.client_secret
849
- } : o.errorCode === Dt && o.error ? ($.debug("Checkout answers refused:", o.error), { refusal: o.error }) : ($.error("Checkout answers call failed:", o.error), { refusal: null });
850
- }
851
- async function kt(e, t, n) {
852
- if (!e) return null;
853
- try {
854
- let r = await O(`${E()}/cart/${e}`, { widgetKey: n?.widgetKey });
855
- if (!r.success) return null;
856
- let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } = yt(r.data);
857
- return o !== "reserved" && o !== "active" || t !== void 0 && a !== Number(t) ? null : {
858
- uuid: i,
859
- eventID: a,
860
- status: o,
861
- expiresAt: s,
862
- reservations: c,
863
- giftCards: l
864
- };
865
- } catch (e) {
866
- return $.error("getCartByUUID error:", e), null;
867
- }
868
- }
869
- async function At(e, t, n) {
870
- try {
871
- let r = {};
872
- for (let [e, n] of Object.entries(t)) {
873
- let t = typeof e == "number" ? e : parseInt(e, 10);
874
- !Number.isNaN(t) && n > 0 && (r[t] = n);
875
- }
876
- let i = {};
877
- if (n) for (let [e, t] of Object.entries(n)) {
878
- let n = typeof e == "number" ? e : parseInt(e, 10);
879
- !Number.isNaN(n) && t > 0 && (i[n] = t);
880
- }
881
- let a = await fetch(`${E()}/cart/${e}`, {
882
- method: "PUT",
883
- headers: { "Content-Type": "application/json" },
884
- body: JSON.stringify({
885
- quantities: r,
886
- ...Object.keys(i).length > 0 ? { donationAmounts: i } : {}
887
- })
888
- });
889
- if (!a.ok) {
890
- let e = await a.json().catch(() => ({}));
891
- return $.error("Cart update failed:", e), !1;
892
- }
893
- return !0;
894
- } catch (e) {
895
- return $.error("updateCartQuantities error:", e), !1;
896
- }
897
- }
898
- async function jt(e, t = "", n) {
899
- try {
900
- let r = await k(`${T()}/orders/${e}/refund`, { message: t }, { widgetKey: n?.widgetKey });
901
- return r.success ? { success: !0 } : ($.error("Refund request failed:", r.error), {
902
- success: !1,
903
- error: r.error || "Failed to submit refund request"
904
- });
905
- } catch (e) {
906
- return $.error("requestOrderRefund error:", e), {
907
- success: !1,
908
- error: "Network error submitting refund request"
909
- };
910
- }
911
- }
912
- async function Mt(e, t, n, r) {
913
- let i = Q(n);
914
- try {
915
- let n = await k(`${E()}/validatePaymentIntent/${e}`, {
916
- ...t,
917
- attribution: J(),
918
- ...i ? { locale: i } : {}
919
- }, { widgetKey: r?.widgetKey });
920
- if (!n.success) return $.error("Payment validation failed:", n.error), {
921
- success: !1,
922
- status: "failed",
923
- error: n.error || "Payment validation failed"
924
- };
925
- let a = n.data;
926
- return a.eventCanceled || a.eventPostponed ? {
927
- success: !1,
928
- status: "failed",
929
- eventCanceled: a.eventCanceled,
930
- eventPostponed: a.eventPostponed
931
- } : {
932
- success: !0,
933
- status: a.status || "Payment succeeded",
934
- orderUUID: a.orderUUID || a.uuid
935
- };
936
- } catch (e) {
937
- return $.error("validatePaymentIntent error:", e), null;
938
- }
939
- }
940
- async function Nt(e, t) {
941
- try {
942
- let n = await k(`${T()}/orders/extend-session`, { orderUuid: e }, { widgetKey: t?.widgetKey });
943
- if (!n.success) return {
944
- success: !1,
945
- error: n.error || "Failed to extend session",
946
- statusCode: n.statusCode
947
- };
948
- let r = n.data;
949
- return {
950
- success: !0,
951
- newExpiryTime: r.newExpiryTime,
952
- remainingExtensions: r.remainingExtensions
953
- };
954
- } catch (e) {
955
- return $.error("Error extending checkout session:", e), {
956
- success: !1,
957
- error: "Network error extending session"
958
- };
959
- }
960
- }
961
- async function Pt(e, t) {
962
- try {
963
- let n = await O(`${T()}/orders/session/${e}`, { widgetKey: t?.widgetKey });
964
- if (!n.success) return {
965
- error: n.error || "No active session found",
966
- notFound: n.statusCode === 404
967
- };
968
- let r = n.data;
969
- return {
970
- expiresAt: r.expiresAt,
971
- extensionCount: r.extensionCount,
972
- remainingExtensions: r.remainingExtensions,
973
- canExtend: r.canExtend,
974
- reservationCount: r.reservationCount,
975
- eventStatus: r.eventStatus
976
- };
977
- } catch (e) {
978
- return $.error("Error getting session status:", e), { error: "Network error getting session status" };
979
- }
980
- }
981
- //#endregion
982
- //#region src/lib/widget-key-context.ts
983
- var Ft = Symbol("micdrop-widget-key");
984
- function It() {
985
- return l(Ft) || void 0;
986
- }
987
- //#endregion
988
- export { m as $, Ue as A, E as B, J as C, Be as D, z as E, Ce as F, S as G, ge as H, O as I, le as J, he as K, k as L, Ne as M, M as N, ze as O, De as P, ce as Q, xe as R, lt as S, H as T, Te as U, T as V, we as W, de as X, me as Y, pe as Z, ct as _, kt as a, u as at, ht as b, Ot as c, Q as d, g as et, St as f, dt as g, pt as h, Nt as i, _ as it, Pe as j, Ve as k, At as l, ft as m, It as n, oe as nt, Pt as o, Z as p, fe as q, Et as r, h as rt, jt as s, Ft as t, ae as tt, Mt as u, ut as v, q as w, gt as x, mt as y, w as z };