@getmicdrop/venue-calendar 4.3.138 → 4.3.139

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 (211) hide show
  1. package/README.md +895 -840
  2. package/dist/AddOnCard-Dlt_4lut.js +475 -0
  3. package/dist/{Button-B_gbGd63.js → Button-Ch5dRGa2.js} +1 -1
  4. package/dist/{Button-B1cBhdtC.js → Button-DpeQSoQ7.js} +58 -45
  5. package/dist/Calendar-CNWS2xiR.js +396 -0
  6. package/dist/CalendarFoundryView-B5puOxH5.js +16431 -0
  7. package/dist/{ChartBlock-DcsCXfX8.js → ChartBlock-vihMKVdW.js} +2 -2
  8. package/dist/Checkout-B2FvX6Af.js +1070 -0
  9. package/dist/Checkout-y0x-v-XH.js +1995 -0
  10. package/dist/{ChevronDownOutline-kFgRY2cg.js → CloseOutline-Bh9UO94v.js} +2 -2
  11. package/dist/{CollectionView-C0vDg5oJ.js → CollectionView-CcLlV-1f.js} +22 -24
  12. package/dist/{CropImage-BWYeQXXA.js → CropImage-DqLAGy5s.js} +6 -6
  13. package/dist/{DatePicker-v-4ijT8N.js → DatePicker-D20Te0JY.js} +222 -215
  14. package/dist/{Event-vlu8IAxh.js → Event-DoIU0o6C.js} +799 -796
  15. package/dist/{EventCard-puoh3xag.js → EventCard-B8MYLyIW.js} +1 -1
  16. package/dist/EventPage-DM4tjCcL.js +1298 -0
  17. package/dist/{FilterChipGroup-DUGvOaRI.js → FilterChipGroup-BCjc7-pE.js} +1 -1
  18. package/dist/{ImageUploader-CKrf5amy.js → ImageUploader-BzxKIyLN.js} +324 -375
  19. package/dist/{Input-BQk4itex.js → Input-Bp5EgI1F.js} +5 -3
  20. package/dist/Modal-C6EXgkuF.js +159 -0
  21. package/dist/{ModalFooter-gFaDKsfj.js → ModalFooter-C4TD3-zP.js} +1 -1
  22. package/dist/{ModalTitle-CS5AGwrU.js → ModalTitle-BP4Bm3sA.js} +1 -1
  23. package/dist/{PasswordInput-C65GqxdF.js → PasswordInput-BlzSrkPs.js} +1 -1
  24. package/dist/{PhoneInput-Dj1I3bEn.js → PhoneInput-_ByjRGQ0.js} +2 -2
  25. package/dist/{RecommendationsRail-DC5qX1ei.js → RecommendationsRail-BDNnbL-p.js} +53 -50
  26. package/dist/{Search-BE64QcmK.js → Search-vhGEpog6.js} +1 -1
  27. package/dist/SeriesPage-YE8czX1M.js +32 -0
  28. package/dist/{SkeletonLoader-DfW0N9R3.js → SkeletonLoader-Beh2izdy.js} +1 -1
  29. package/dist/Spinner-DgubkWKo.js +88 -0
  30. package/dist/{Success-D3CrUeka.js → Success-CN5HB8gN.js} +164 -166
  31. package/dist/{TimePicker-HYzPI_Dc.js → TimePicker-BDuy9Ap8.js} +1 -1
  32. package/dist/{ViewTicketsEmbed-DzUCgtA3.js → ViewTicketsEmbed-DvoMIiKJ.js} +9 -10
  33. package/dist/{address-field-BwGHcMKY.js → address-field-DOalICpt.js} +2 -2
  34. package/dist/{allowlist-Bt1BHhNd.js → allowlist-DinkGF2L.js} +77 -68
  35. package/dist/api/api.cjs +1 -1
  36. package/dist/api/api.mjs +320 -297
  37. package/dist/api/client.d.ts +14 -53
  38. package/dist/api/events.d.ts +15 -1
  39. package/dist/api/result.d.ts +9 -0
  40. package/dist/{api-CRHFSJDI.js → api-CsAx0rmV.js} +150 -145
  41. package/dist/{avatar-picker-field-CSF5okeM.js → avatar-picker-field-CV4vRxTB.js} +14 -14
  42. package/dist/{checkoutState-BDNjJRMG.js → checkoutState-DSx7g3Vy.js} +12 -21
  43. package/dist/{client-BIN_q-of.js → client-SaDt6559.js} +18 -12
  44. package/dist/{constants-DrFV2oht.js → constants-sRRJh0u-.js} +1 -1
  45. package/dist/{date-field-3tgOYbzF.js → date-field-DylJx0y7.js} +9 -9
  46. package/dist/{date-range-field-D0Aq9me9.js → date-range-field-BOV1V2ab.js} +7 -7
  47. package/dist/{de-CUrE_4a4.js → de-CzkX3H3B.js} +1 -0
  48. package/dist/{defaultLabels-CybwJCNn.js → defaultLabels-DLK6rq4q.js} +1 -0
  49. package/dist/{defaults-B5wyre5O.js → defaults-Cbuin1WS.js} +2 -3
  50. package/dist/{es-B2-z2Kft.js → es-BOLzv8eD.js} +1 -0
  51. package/dist/{event-CEg17hts.js → event-ClsLWtR0.js} +1 -1
  52. package/dist/{event-transform-DqFigNQg.js → event-transform-Cs63X0hI.js} +42 -42
  53. package/dist/{eventStatusStream-DK5fWCTB.js → eventStatusStream-BAh5nJP2.js} +1 -1
  54. package/dist/{field-rules-CKFFB16Q.js → field-rules-Yb2JY1qT.js} +1 -1
  55. package/dist/{file-field-2mPz4Da-.js → file-field-Dwo80kDg.js} +4 -4
  56. package/dist/format-CehusdDg.js +1718 -0
  57. package/dist/{formatters-CzKNRUwz.js → formatters-DUWbI_Eg.js} +25 -35
  58. package/dist/{fr-CiePVIlj.js → fr-DYTIBBXo.js} +1 -0
  59. package/dist/{href-DpbLXQ4c.js → href-BXhNawil.js} +1 -1
  60. package/dist/i18n-BNF6a-QA.js +720 -0
  61. package/dist/i18n-F_QOaHVh.js +26 -0
  62. package/dist/{id-Ttw95_7t.js → id-CIyIkGhH.js} +1 -0
  63. package/dist/{image-field-B8x0WQ2j.js → image-field-DeLzsJlz.js} +2 -2
  64. package/dist/{it-CBbXcFY1.js → it-CF4Db_nK.js} +1 -0
  65. package/dist/{ja-B2Tag7J3.js → ja-5-7WNHD1.js} +1 -0
  66. package/dist/{ko-CcTn4lAi.js → ko-huIzHR3W.js} +1 -0
  67. package/dist/locales/4.3.139/main/de.js +1 -0
  68. package/dist/locales/4.3.139/main/es.js +1 -0
  69. package/dist/locales/4.3.139/main/fr.js +1 -0
  70. package/dist/locales/4.3.139/main/id.js +1 -0
  71. package/dist/locales/4.3.139/main/it.js +1 -0
  72. package/dist/locales/4.3.139/main/ja.js +1 -0
  73. package/dist/locales/4.3.139/main/ko.js +1 -0
  74. package/dist/locales/4.3.139/main/nl.js +1 -0
  75. package/dist/locales/4.3.139/main/pl.js +1 -0
  76. package/dist/locales/4.3.139/main/pt-br.js +1 -0
  77. package/dist/locales/4.3.139/main/tr.js +1 -0
  78. package/dist/locales/4.3.139/main/zh.js +1 -0
  79. package/dist/look-island.svelte-D87MvHNy.js +1296 -0
  80. package/dist/{look-names-JI6GE-Zj.js → look-names-B9MywEzX.js} +68 -58
  81. package/dist/looks/4.3.139/AddOnCard-CKdkGcHH.js +1 -0
  82. package/dist/looks/4.3.139/Checkout-D7CaFYTE.js +1 -0
  83. package/dist/looks/4.3.139/Checkout-DuP46PMi.js +3 -0
  84. package/dist/looks/4.3.139/CollectionView-CWm57JCx.js +1 -0
  85. package/dist/looks/4.3.139/Event-ePupb4qY.js +8 -0
  86. package/dist/looks/4.3.139/EventPage-CgexXhEU.js +1 -0
  87. package/dist/looks/4.3.139/RecommendationsRail-Bz-Mj_r4.js +2 -0
  88. package/dist/looks/4.3.139/SeriesPage-DI2uFF0Y.js +1 -0
  89. package/dist/looks/4.3.139/Success-BkMzmgmc.js +3 -0
  90. package/dist/looks/4.3.139/ViewTicketsEmbed-CbEJwRry.js +1 -0
  91. package/dist/looks/4.3.139/_vc-foundry-calendar-stub-BVbAFEK2.js +1 -0
  92. package/dist/looks/4.3.139/buyerEmail-CqCYa9UL.js +1 -0
  93. package/dist/looks/4.3.139/constants-CU_ZgyQu.js +3 -0
  94. package/dist/looks/4.3.139/defaults-B46SFFK4.js +2 -0
  95. package/dist/looks/4.3.139/dist-BWGSqtWN.js +1 -0
  96. package/dist/looks/4.3.139/eventStatusStream-CW5lJwsa.js +10 -0
  97. package/dist/looks/4.3.139/first-core-DrYq9wBy.js +151 -0
  98. package/dist/looks/4.3.139/first-mount.svelte-DFSLaJWm.js +1 -0
  99. package/dist/looks/4.3.139/first-seo-DvHuCXT6.js +1 -0
  100. package/dist/looks/4.3.139/first.js +1 -0
  101. package/dist/looks/4.3.139/full-widget-DDBk3i4U.js +2 -0
  102. package/dist/looks/4.3.139/gate-password-cache-D4Zls6QM.js +1 -0
  103. package/dist/looks/4.3.139/i18n-DRaFNYsQ.js +1 -0
  104. package/dist/looks/4.3.139/listing-BSaRTkxW.js +1 -0
  105. package/dist/looks/4.3.139/loaders.runtime-BNG8O6-A.js +1 -0
  106. package/dist/looks/4.3.139/looks.js +1 -0
  107. package/dist/looks/4.3.139/modalManager.svelte-CqQWYz9Y.js +1 -0
  108. package/dist/looks/4.3.139/rolldown-runtime-4tVxZq34.js +1 -0
  109. package/dist/looks/4.3.139/serverTotals-Bu1fAPLB.js +1 -0
  110. package/dist/looks/4.3.139/showcase-state-options-CpCMAKVD.js +1 -0
  111. package/dist/looks/4.3.139/utils-pGRhH4A-.js +1 -0
  112. package/dist/{media-field-HieD0ye0.js → media-field-PW8ye6EL.js} +2 -2
  113. package/dist/modalManager.svelte-BHE0t9q3.js +79 -0
  114. package/dist/{multiselect-field-CJ4lUJyS.js → multiselect-field-CmocFs5f.js} +2 -2
  115. package/dist/navigation-B8rkS2On.js +348 -0
  116. package/dist/{nl-DeIqgjIs.js → nl-B1dv1lqk.js} +1 -0
  117. package/dist/{number-field-D5GkkGLB.js → number-field-CUD936Ai.js} +3 -3
  118. package/dist/{numeric-filter-field-CRWZFu_P.js → numeric-filter-field-BmgSYhOt.js} +3 -3
  119. package/dist/{password-field-DdOHXEOo.js → password-field-BfvcZUi_.js} +1 -1
  120. package/dist/{phone-field-BaYmp56f.js → phone-field-DO0U_YZ6.js} +17 -18
  121. package/dist/{pixels-BXXzmoCb.js → pixels-ipedGW6i.js} +7 -7
  122. package/dist/{pl-Bm2FcD5y.js → pl-DLlM_IPo.js} +1 -0
  123. package/dist/{pt-br-XS1Lsa6z.js → pt-br-8V3mf7pu.js} +1 -0
  124. package/dist/repeating-field-BwtJ6VS1.js +488 -0
  125. package/dist/{richtext-field-KmUytgBW.js → richtext-field-DvLCxPvq.js} +2 -2
  126. package/dist/{datetime-BlEsN_-8.js → scarcity-DfQvyhJP.js} +74 -85
  127. package/dist/{searchable-select-field-DettZRav.js → searchable-select-field-zuIqfoQM.js} +17 -17
  128. package/dist/{select-field-Wc4gAtou.js → select-field-DNNN-a9q.js} +6 -6
  129. package/dist/seo/HostSeoController.d.ts +13 -0
  130. package/dist/seo/seo.cjs +1 -1
  131. package/dist/seo/seo.mjs +18 -11
  132. package/dist/{serverTotals-COsx7Mc5.js → serverTotals-BprgDwOw.js} +1 -1
  133. package/dist/{showcase-state-options-CHGUaZtl.js → showcase-state-options-bKRf48yz.js} +2 -2
  134. package/dist/{time-field-CnxZcziR.js → time-field-DmPCoppV.js} +2 -2
  135. package/dist/{to-event-card-props-C9v9dspT.js → to-event-card-props-KVcCJ2JF.js} +34 -34
  136. package/dist/{tr-zKAbMfgi.js → tr-DiUEV65j.js} +1 -0
  137. package/dist/{tree-picker-field-aqux58EQ.js → tree-picker-field-BJwSFAqm.js} +8 -8
  138. package/dist/types/index.d.ts +3 -0
  139. package/dist/{utils-AIszIHUb.js → utils-x8YXRKvr.js} +12 -12
  140. package/dist/venue-BjLCg-PW.js +38 -0
  141. package/dist/venue-calendar.css +1 -1
  142. package/dist/venue-calendar.es.js +1655 -1539
  143. package/dist/venue-calendar.iife.js +1 -54
  144. package/dist/venue-calendar.umd.js +69 -63
  145. package/dist/{widget-key-context-BrWW0fyM.js → widget-key-context-dHM9FiuJ.js} +8 -37
  146. package/dist/{zh-DHfgJplH.js → zh-Cej2EPQt.js} +1 -0
  147. package/package.json +2 -2
  148. package/src/lib/constants/scarcity.ts +1 -2
  149. package/dist/AddOnCard-DEAC26HA.js +0 -348
  150. package/dist/BlockPlaceholder-BKfoE795.js +0 -59
  151. package/dist/Calendar-9xskvKUf.js +0 -395
  152. package/dist/CalendarFoundryView-DbxZNmY7.js +0 -16356
  153. package/dist/CartView-DMINN6bY.js +0 -2200
  154. package/dist/Checkbox-sObkYRdj.js +0 -60
  155. package/dist/Checkout-H9RGBU9D.js +0 -1071
  156. package/dist/Checkout-VnochAZE.js +0 -1967
  157. package/dist/CheckoutTimer-mjcYR3XU.js +0 -42
  158. package/dist/EventPage-DycxjX5Z.js +0 -1301
  159. package/dist/Modal-DOpDiAwN.js +0 -102
  160. package/dist/ScarcityBadge-BAaV2CIY.js +0 -141
  161. package/dist/SeriesPage-Cx89s2B6.js +0 -34
  162. package/dist/Skeleton-B6qB_udJ.js +0 -31
  163. package/dist/Spinner-Bj4dr9kO.js +0 -19
  164. package/dist/Textarea-BDcuBI13.js +0 -72
  165. package/dist/__SKIP_NAVIGATION__-Znm_vYcG.js +0 -5
  166. package/dist/__SKIP_PATHS__-Bzzrca_a.js +0 -5
  167. package/dist/calendar-Cdu8fCIt.js +0 -111
  168. package/dist/cta-qbcIt5Gh.js +0 -116
  169. package/dist/format-CypC4vWs.js +0 -1587
  170. package/dist/heic-to-BoLfsr3l.js +0 -70
  171. package/dist/i18n-B_TWnExv.js +0 -495
  172. package/dist/i18n-CSaUFnlD.js +0 -26
  173. package/dist/instant-BkZCSGDm.js +0 -162
  174. package/dist/labels-D8LN8lY7.js +0 -227
  175. package/dist/locales/4.3.138/main/de.js +0 -1
  176. package/dist/locales/4.3.138/main/es.js +0 -1
  177. package/dist/locales/4.3.138/main/fr.js +0 -1
  178. package/dist/locales/4.3.138/main/id.js +0 -1
  179. package/dist/locales/4.3.138/main/it.js +0 -1
  180. package/dist/locales/4.3.138/main/ja.js +0 -1
  181. package/dist/locales/4.3.138/main/ko.js +0 -1
  182. package/dist/locales/4.3.138/main/nl.js +0 -1
  183. package/dist/locales/4.3.138/main/pl.js +0 -1
  184. package/dist/locales/4.3.138/main/pt-br.js +0 -1
  185. package/dist/locales/4.3.138/main/tr.js +0 -1
  186. package/dist/locales/4.3.138/main/zh.js +0 -1
  187. package/dist/look-island.svelte-B7UH_QVv.js +0 -1270
  188. package/dist/looks/4.3.138/looks.js +0 -248
  189. package/dist/modalManager.svelte-BvyrTI6p.js +0 -51
  190. package/dist/navigation-DpqP-ahJ.js +0 -241
  191. package/dist/repeating-field-B4OhsaGB.js +0 -488
  192. package/dist/venue-DLkL7xdj.js +0 -12
  193. /package/dist/checkout-libs/{4.3.138 → 4.3.139}/phone.js +0 -0
  194. /package/dist/checkout-libs/{4.3.138 → 4.3.139}/qrcode.js +0 -0
  195. /package/dist/locales/{4.3.138 → 4.3.139}/flow/de.js +0 -0
  196. /package/dist/locales/{4.3.138 → 4.3.139}/flow/es.js +0 -0
  197. /package/dist/locales/{4.3.138 → 4.3.139}/flow/fr.js +0 -0
  198. /package/dist/locales/{4.3.138 → 4.3.139}/flow/id.js +0 -0
  199. /package/dist/locales/{4.3.138 → 4.3.139}/flow/it.js +0 -0
  200. /package/dist/locales/{4.3.138 → 4.3.139}/flow/ja.js +0 -0
  201. /package/dist/locales/{4.3.138 → 4.3.139}/flow/ko.js +0 -0
  202. /package/dist/locales/{4.3.138 → 4.3.139}/flow/nl.js +0 -0
  203. /package/dist/locales/{4.3.138 → 4.3.139}/flow/pl.js +0 -0
  204. /package/dist/locales/{4.3.138 → 4.3.139}/flow/pt-br.js +0 -0
  205. /package/dist/locales/{4.3.138 → 4.3.139}/flow/tr.js +0 -0
  206. /package/dist/locales/{4.3.138 → 4.3.139}/flow/zh.js +0 -0
  207. /package/dist/looks/{4.3.138 → 4.3.139}/micdrop-wordmark-BYMG6vLR.svg +0 -0
  208. /package/dist/looks/{4.3.138 → 4.3.139}/microphone-Ccv4r-kd.webp +0 -0
  209. /package/dist/looks/{4.3.138 → 4.3.139}/superuser-CZF6a5gO.webp +0 -0
  210. /package/dist/looks/{4.3.138 → 4.3.139}/treasury-DUE7lZzT.webp +0 -0
  211. /package/dist/looks/{4.3.138 → 4.3.139}/user-image-yuS4errP.svg +0 -0
@@ -1,51 +0,0 @@
1
- import { n as e } from "./classNames-CPSQ9uy4.js";
2
- import { o as t } from "./ModalFooter-gFaDKsfj.js";
3
- import "svelte/internal/disclose-version";
4
- import * as n from "svelte/internal/client";
5
- // node_modules/@getmicdrop/svelte-components/dist/primitives/Modal/ModalHeader.svelte
6
- var r = n.from_html("<div><!></div>");
7
- function i(i, a) {
8
- n.push(a, !0), t();
9
- var o = r(), s = n.child(o), c = (e) => {
10
- var t = n.comment(), r = n.first_child(t);
11
- n.snippet(r, () => a.children), n.append(e, t);
12
- };
13
- n.if(s, (e) => {
14
- a.children && e(c);
15
- }), n.reset(o), n.template_effect((e) => n.set_class(o, 1, e), [() => n.clsx(e("shrink-0 px-6 pt-6 pb-3", a.class))]), n.append(i, o), n.pop();
16
- }
17
- // node_modules/@getmicdrop/svelte-components/dist/utils/modalManager.svelte.js
18
- function a() {
19
- let e = n.state(!1), t = n.state(null);
20
- return {
21
- get isOpen() {
22
- return n.get(e);
23
- },
24
- get data() {
25
- return n.get(t);
26
- },
27
- open(r) {
28
- n.set(t, r ?? null, !0), n.set(e, !0);
29
- },
30
- close() {
31
- n.set(e, !1), n.set(t, null);
32
- },
33
- toggle(r) {
34
- n.get(e) ? (n.set(e, !1), n.set(t, null)) : (n.set(t, r ?? null, !0), n.set(e, !0));
35
- },
36
- bind() {
37
- return {
38
- get open() {
39
- return n.get(e);
40
- },
41
- set open(r) {
42
- r ? n.set(e, !0) : (n.set(e, !1), n.set(t, null));
43
- },
44
- oncancel() {
45
- n.set(e, !1), n.set(t, null);
46
- }
47
- };
48
- }
49
- };
50
- }
51
- export { i as n, a as t };
@@ -1,241 +0,0 @@
1
- import { i as e, n as t, r as n, s as r } from "./instant-BkZCSGDm.js";
2
- import { n as i } from "./AppError-t1LnBwj_.js";
3
- import { h as a, m as o } from "./client-BIN_q-of.js";
4
- import { y as s } from "./datetime-BlEsN_-8.js";
5
- // node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
6
- var c = {
7
- EVERYWHERE: 0,
8
- ONLINE_ONLY: 1,
9
- BOX_OFFICE_ONLY: 2
10
- }, l = {
11
- VISIBLE: 0,
12
- HIDDEN: 1,
13
- PROMO_ONLY: 2
14
- };
15
- function u(e) {
16
- return e.soldOut === !0 ? 0 : e.remainingCapacity == null ? e.quantityRemaining == null ? e.quantity == null ? e.sold != null && e.totalCapacity != null ? Math.max(0, e.totalCapacity - e.sold) : 0 : e.quantity : e.quantityRemaining : e.remainingCapacity;
17
- }
18
- function d(e, t) {
19
- return e.totalCapacity ?? e.quantity ?? t;
20
- }
21
- function f(a) {
22
- let o = i(), s = n(a.effectiveSalesBegin, a.salesBegin, a.saleStartDate) ?? null, c = n(a.effectiveSalesEnd, a.salesEnd, a.saleEndDate) ?? null, l = r(s), f = r(c);
23
- if (!e(s) && !l) return "scheduled";
24
- if (!e(c) && !f) return "sales_ended";
25
- if (l && t(o, l) < 0) return "scheduled";
26
- if (f && t(o, f) > 0) return "sales_ended";
27
- if (a.soldOut === !0) return "sold_out";
28
- let p = u(a), m = d(a, p);
29
- return p === 0 ? "sold_out" : m > 0 && p / m < .1 ? "low" : "on_sale";
30
- }
31
- function p(e, t = {}) {
32
- if (!Array.isArray(e)) return [];
33
- let n = e;
34
- return t.excludeDoorOnly && (n = n.filter((e) => e.salesChannel !== c.BOX_OFFICE_ONLY)), t.publicOnly && (n = n.filter((e) => e.visibility === l.VISIBLE)), n;
35
- }
36
- function m(e) {
37
- if (!Array.isArray(e) || e.length === 0) return {
38
- totalRemaining: 0,
39
- totalCapacity: 0,
40
- isSoldOut: !1
41
- };
42
- let t = 0, n = 0;
43
- for (let r of e) {
44
- let e = u(r);
45
- t += e, n += d(r, e);
46
- }
47
- return {
48
- totalRemaining: t,
49
- totalCapacity: n,
50
- isSoldOut: t === 0
51
- };
52
- }
53
- function h(e) {
54
- if (!Array.isArray(e) || e.length === 0) return 0;
55
- let t = e.map((e) => Number(e.price ?? e.ticketPrice)).filter((e) => Number.isFinite(e) && e > 0);
56
- return t.length > 0 ? Math.min(...t) : 0;
57
- }
58
- // node_modules/@getmicdrop/svelte-components/dist/transforms/event.js
59
- function g(e) {
60
- return e.availableTickets || e.available_tickets || e.tickets || [];
61
- }
62
- function _(a) {
63
- if (!a || !(a.isHidden === !0 || typeof a.visibility == "number" && a.visibility >= l.HIDDEN) || a.salesChannel === c.BOX_OFFICE_ONLY) return !1;
64
- let o = i(), s = n(a.effectiveSalesBegin, a.salesBegin, a.salesStart, a.saleBegin, a.onSaleStart, a.saleStartDate), u = n(a.effectiveSalesEnd, a.salesEnd, a.saleEnd, a.onSaleEnd, a.saleEndDate), d = r(s), f = r(u);
65
- if (!e(s) && !d || !e(u) && !f || d && t(d, o) > 0 || f && t(f, o) < 0) return !1;
66
- let p = a.remainingCapacity ?? a.quantityRemaining ?? a.quantity;
67
- return !(a.soldOut || p != null && p <= 0);
68
- }
69
- function v(e) {
70
- return e ? e.hasHiddenTickets === !0 || g(e).some(_) : !1;
71
- }
72
- // src/lib/url-manager/index.ts
73
- var y = "__MICDROP_VC_HASH_ROUTING__";
74
- function b() {
75
- if (typeof window > "u") return 0;
76
- let e = window[y];
77
- return typeof e == "number" ? e : 0;
78
- }
79
- function x(e) {
80
- window[y] = Math.max(0, b() + e);
81
- }
82
- function S() {
83
- return b() > 0;
84
- }
85
- var C = null;
86
- function w(e) {
87
- return C && C !== e ? !1 : (C = e, !0);
88
- }
89
- function T(e) {
90
- C === e && (C = null);
91
- }
92
- var E = class {
93
- onNavigate;
94
- handleHashChange;
95
- prevEntityKey;
96
- counted;
97
- stepLength = 0;
98
- constructor(e) {
99
- this.onNavigate = e.onNavigate, this.counted = !1, this.prevEntityKey = this.getEntityKey(), this.handleHashChange = (e) => {
100
- e instanceof PopStateEvent && e.state?.micdrop && e.state.step !== window.history.state?.step && window.history.replaceState(e.state, "", window.location.href);
101
- let t = this.getEntityKey();
102
- t !== this.prevEntityKey && (this.prevEntityKey = t, this.onNavigate(this.readState()));
103
- }, typeof window < "u" && (window.addEventListener("hashchange", this.handleHashChange), window.addEventListener("popstate", this.handleHashChange), x(1), this.counted = !0);
104
- }
105
- readState() {
106
- if (typeof window > "u") return {
107
- entity: null,
108
- month: null,
109
- step: null
110
- };
111
- let e = this.readEntityFromHash();
112
- return {
113
- entity: e,
114
- month: new URLSearchParams(window.location.search).get("m") || null,
115
- step: e ? O() : null
116
- };
117
- }
118
- pushEntity(e, t) {
119
- if (typeof window > "u") return;
120
- let n = `#${e}${t ? "-" + t : ""}`;
121
- this.replaceHash(n, O() ? "show" : null), this.prevEntityKey = this.getEntityKey();
122
- }
123
- openEntity(e, t) {
124
- if (typeof window > "u") return;
125
- let n = new URL(window.location.href);
126
- n.hash = `#${e}${t ? "-" + t : ""}`, window.history.pushState(D("show"), "", n.toString()), this.prevEntityKey = this.getEntityKey();
127
- }
128
- pushStep(e) {
129
- if (typeof window > "u") return;
130
- let t = O() === e ? "replaceState" : "pushState";
131
- window.history[t](D(e), "", window.location.href), this.prevEntityKey = this.getEntityKey(), this.stepLength = window.history.length;
132
- }
133
- replaceStep(e) {
134
- if (typeof window > "u") return;
135
- let t = window.history.state?.showPanel === !0;
136
- window.history.replaceState(D(e), "", window.location.href), this.prevEntityKey = this.getEntityKey();
137
- let n = t && this.stepLength ? window.history.length - this.stepLength : 0;
138
- this.stepLength = 0, n > 0 && window.history.go(-n);
139
- }
140
- stackEntityOverListing() {
141
- if (typeof window > "u") return;
142
- let e = O();
143
- if (e && e !== "show") {
144
- let e = this.readEntityFromHash()?.id;
145
- this.prevEntityKey = e ? `${e}|show` : "", window.history.back();
146
- return;
147
- }
148
- if (e) return;
149
- let t = window.location.href;
150
- this.replaceHash(""), window.history.pushState(D("show"), "", t), this.prevEntityKey = this.getEntityKey();
151
- }
152
- onPushedEntry() {
153
- return typeof window > "u" ? !1 : window.history.state?.showPanel === !0;
154
- }
155
- pushListing() {
156
- typeof window < "u" && (this.prevEntityKey = "", this.replaceHash(""));
157
- }
158
- setMonth(e) {
159
- if (typeof window > "u") return;
160
- let t = new URL(window.location.href);
161
- t.searchParams.set("m", e), window.history.replaceState({
162
- ...window.history.state,
163
- micdrop: !0
164
- }, "", t.toString());
165
- }
166
- destroy() {
167
- typeof window < "u" && (window.removeEventListener("hashchange", this.handleHashChange), window.removeEventListener("popstate", this.handleHashChange)), this.counted && (this.counted = !1, x(-1));
168
- }
169
- readEntityFromHash() {
170
- return s((window.location.hash || "").replace(/^#/, ""));
171
- }
172
- replaceHash(e, t = null) {
173
- let n = new URL(window.location.href);
174
- n.hash = e, window.history.replaceState(t ? D(t) : { micdrop: !0 }, "", n.toString());
175
- }
176
- getEntityKey() {
177
- if (typeof window > "u") return "";
178
- let e = this.readEntityFromHash()?.id ?? "", t = O();
179
- return e && t ? `${e}|${t}` : e;
180
- }
181
- };
182
- function D(e) {
183
- return {
184
- micdrop: !0,
185
- showPanel: !0,
186
- step: e
187
- };
188
- }
189
- function O() {
190
- let e = window.history.state;
191
- return e?.showPanel ? e.step === "checkout" || e.step === "success" ? e.step : "show" : null;
192
- }
193
- // src/lib/navigation.ts
194
- function k(e, t) {
195
- let n = t ? `${e}-${t}` : `${e}`;
196
- if (typeof window < "u" && S()) {
197
- let { origin: e, pathname: t, search: r } = window.location;
198
- return `${e}${t}${r}#${n}`;
199
- }
200
- return `${a()}/e/${n}`;
201
- }
202
- function A(e, t, n) {
203
- let r = n?.toString(), i = t ? `/e/${e}-${t}` : `/e/${e}`;
204
- return `${o()}${i}${r ? `?${r}` : ""}`;
205
- }
206
- var j = "get-micdrop.com";
207
- function M(e) {
208
- let t = typeof e == "string" ? e.trim() : "";
209
- return t ? `https://${encodeURIComponent(t)}.${j}` : "";
210
- }
211
- function N(e) {
212
- let t = M(e);
213
- return t ? `${t}/gift-cards/buy` : "";
214
- }
215
- function P(e, t, n) {
216
- let r = n?.toString();
217
- return `/${e}/${t}${r ? `?${r}` : ""}`;
218
- }
219
- function F(e) {
220
- return `/${e}`;
221
- }
222
- function I(e) {
223
- return `${o()}/${e}`;
224
- }
225
- function L(e, t) {
226
- return `/${e}/${t}/checkout`;
227
- }
228
- function R(e) {
229
- return `/?${e.toString()}`;
230
- }
231
- function z(e) {
232
- let t = new URLSearchParams();
233
- e.orderId && t.set("orderId", e.orderId), e.ticketCount && e.ticketCount > 0 && t.set("tickets", String(e.ticketCount));
234
- let n = t.toString();
235
- return n ? `?${n}` : "";
236
- }
237
- function B(e, t, n = {}) {
238
- let r = t ? `/e/${e}-${t}` : `/e/${e}`;
239
- return `${a()}${r}/tickets/checkout/success${z(n)}`;
240
- }
241
- export { l as _, k as a, p as b, B as c, E as d, w as f, _ as g, v as h, A as i, M as l, T as m, I as n, P as o, S as p, F as r, N as s, L as t, R as u, m as v, h as x, f as y };