@eventlook/sdk 1.5.0-beta.6 → 1.5.0-beta.7

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 (80) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/.env.example +1 -0
  3. package/README.md +18 -16
  4. package/dist/cjs/{index-DvUR1fp8.js → index-BAfaeq84.js} +3230 -554
  5. package/dist/cjs/index-BAfaeq84.js.map +1 -0
  6. package/dist/cjs/index.js +2 -2
  7. package/dist/cjs/{index.umd-6SU6nkkJ.js → index.umd-Bpwd9vUs.js} +9 -19
  8. package/dist/cjs/index.umd-Bpwd9vUs.js.map +1 -0
  9. package/dist/esm/{index-BlTqx0jm.js → index-CJ_gPli9.js} +3217 -540
  10. package/dist/esm/index-CJ_gPli9.js.map +1 -0
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/{index.umd-Dn0hjh7E.js → index.umd-ewNTELOK.js} +9 -19
  13. package/dist/esm/index.umd-ewNTELOK.js.map +1 -0
  14. package/dist/types/components/hook-form/FormProvider.d.ts +2 -1
  15. package/dist/types/form/PaymentOverviewBox.d.ts +2 -0
  16. package/dist/types/form/PaymentOverviewDrawer.d.ts +10 -0
  17. package/dist/types/form/TicketForm.d.ts +1 -0
  18. package/dist/types/form/index.d.ts +2 -1
  19. package/dist/types/form/merchandise/MerchandiseSelection.d.ts +9 -0
  20. package/dist/types/form/merchandise/MerchandiseSlider.d.ts +10 -0
  21. package/dist/types/form/payment/PaymentOverviewCheckbox.d.ts +0 -4
  22. package/dist/types/form/product/ProductVariantsDialog.d.ts +2 -1
  23. package/dist/types/form/services/index.d.ts +7 -0
  24. package/dist/types/form/style.d.ts +1 -0
  25. package/dist/types/form/tickets/ReleaseDescription.d.ts +10 -0
  26. package/dist/types/form/tickets/ReleaseWithMerchandise.d.ts +12 -0
  27. package/dist/types/form/tickets/TicketQuantityControl.d.ts +13 -0
  28. package/dist/types/form/tickets/TicketSelectionMobile.d.ts +17 -0
  29. package/dist/types/hooks/useScrollToFirstError.d.ts +4 -0
  30. package/dist/types/locales/cs.d.ts +22 -0
  31. package/dist/types/locales/en.d.ts +22 -0
  32. package/dist/types/locales/es.d.ts +22 -0
  33. package/dist/types/locales/pl.d.ts +22 -0
  34. package/dist/types/locales/sk.d.ts +22 -0
  35. package/dist/types/locales/uk.d.ts +22 -0
  36. package/dist/types/utils/data/global.d.ts +1 -0
  37. package/package.json +10 -4
  38. package/rollup.config.mjs +7 -12
  39. package/src/components/hook-form/FormProvider.tsx +5 -2
  40. package/src/form/ChildEventDialog.tsx +3 -3
  41. package/src/form/ContactPerson.tsx +1 -1
  42. package/src/form/PaymentOverviewBox.tsx +96 -123
  43. package/src/form/PaymentOverviewDrawer.tsx +446 -0
  44. package/src/form/PaymentPending.tsx +19 -4
  45. package/src/form/ReleaseWithMerchandise.tsx +4 -4
  46. package/src/form/Shipping.tsx +91 -74
  47. package/src/form/TicketForm.tsx +144 -41
  48. package/src/form/index.tsx +3 -1
  49. package/src/form/merchandise/MerchandiseSelection.tsx +24 -0
  50. package/src/form/merchandise/MerchandiseSlider.tsx +62 -0
  51. package/src/form/payment/FeeBox.tsx +4 -31
  52. package/src/form/payment/PaymentOverviewCheckbox.tsx +57 -56
  53. package/src/form/product/ProductCard.tsx +255 -59
  54. package/src/form/product/ProductVariantsDialog.tsx +271 -141
  55. package/src/form/services/index.tsx +263 -0
  56. package/src/form/style.ts +16 -4
  57. package/src/form/tickets/ReleaseDescription.tsx +46 -0
  58. package/src/form/tickets/ReleaseWithMerchandise.tsx +231 -0
  59. package/src/form/tickets/TicketQuantityControl.tsx +100 -0
  60. package/src/form/{TicketSelection.tsx → tickets/TicketSelection.tsx} +24 -128
  61. package/src/form/{TicketSelectionMap.tsx → tickets/TicketSelectionMap.tsx} +9 -1
  62. package/src/form/tickets/TicketSelectionMobile.tsx +177 -0
  63. package/src/form/{TicketWithMerchandiseSelection.tsx → tickets/TicketWithMerchandiseSelection.tsx} +3 -7
  64. package/src/hooks/useScrollToFirstError.ts +99 -0
  65. package/src/locales/cs.tsx +25 -3
  66. package/src/locales/en.tsx +23 -1
  67. package/src/locales/es.tsx +23 -1
  68. package/src/locales/pl.tsx +23 -1
  69. package/src/locales/sk.tsx +24 -2
  70. package/src/locales/uk.tsx +23 -1
  71. package/src/utils/data/global.ts +1 -0
  72. package/tsconfig.json +1 -1
  73. package/README +0 -1
  74. package/dist/cjs/index-DvUR1fp8.js.map +0 -1
  75. package/dist/cjs/index.umd-6SU6nkkJ.js.map +0 -1
  76. package/dist/esm/index-BlTqx0jm.js.map +0 -1
  77. package/dist/esm/index.umd-Dn0hjh7E.js.map +0 -1
  78. /package/dist/types/form/{TicketSelection.d.ts → tickets/TicketSelection.d.ts} +0 -0
  79. /package/dist/types/form/{TicketSelectionMap.d.ts → tickets/TicketSelectionMap.d.ts} +0 -0
  80. /package/dist/types/form/{TicketWithMerchandiseSelection.d.ts → tickets/TicketWithMerchandiseSelection.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- import React, { forwardRef, useState, useEffect, createElement, createContext, useMemo, useContext, useLayoutEffect, useRef, useCallback, useDebugValue, memo, lazy, Suspense } from 'react';
2
- import { Box, IconButton, Stack, Typography, Button, Grid, Card, Link, LinearProgress, TextField, FormControlLabel, Checkbox, FormHelperText, FormControl, FormLabel, RadioGroup, Radio, Tooltip, MenuItem, Divider, Skeleton, Dialog, DialogTitle, DialogContent, DialogActions, Badge, Stepper, Step, StepLabel, StepContent } from '@mui/material';
3
- import { m } from 'framer-motion';
1
+ import React, { forwardRef, useState, useEffect, createElement, createContext, useMemo, useContext, useLayoutEffect, useRef, useCallback, useDebugValue, memo, lazy } from 'react';
2
+ import { m } from 'motion/react';
3
+ import { Box, IconButton, Stack, Typography, Button, Grid, Card, Link, LinearProgress, TextField, FormControlLabel, Checkbox, FormHelperText, FormControl, FormLabel, RadioGroup, Radio, MenuItem, Collapse, useTheme as useTheme$1, Skeleton, Divider, Dialog, DialogTitle, DialogContent, DialogActions, Stepper, Step, StepLabel, StepContent, SwipeableDrawer } from '@mui/material';
4
4
  import { useTheme, styled, alpha } from '@mui/material/styles';
5
5
  import useMediaQuery from '@mui/material/useMediaQuery';
6
6
  import { DatePicker, DateCalendar, PickersDay, LocalizationProvider } from '@mui/x-date-pickers';
@@ -14,35 +14,6 @@ function getDefaultExportFromCjs (x) {
14
14
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
15
15
  }
16
16
 
17
- function getAugmentedNamespace(n) {
18
- if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
19
- var f = n.default;
20
- if (typeof f == "function") {
21
- var a = function a () {
22
- var isInstance = false;
23
- try {
24
- isInstance = this instanceof a;
25
- } catch {}
26
- if (isInstance) {
27
- return Reflect.construct(f, arguments, this.constructor);
28
- }
29
- return f.apply(this, arguments);
30
- };
31
- a.prototype = f.prototype;
32
- } else a = {};
33
- Object.defineProperty(a, '__esModule', {value: true});
34
- Object.keys(n).forEach(function (k) {
35
- var d = Object.getOwnPropertyDescriptor(n, k);
36
- Object.defineProperty(a, k, d.get ? d : {
37
- enumerable: true,
38
- get: function () {
39
- return n[k];
40
- }
41
- });
42
- });
43
- return a;
44
- }
45
-
46
17
  var cs$2 = {exports: {}};
47
18
 
48
19
  var dayjs_min$1 = {exports: {}};
@@ -2188,6 +2159,8 @@ const cs = {
2188
2159
  add: 'Přidat',
2189
2160
  confirm: 'Potvrdit',
2190
2161
  cancel: 'Zrušit',
2162
+ close: 'Zavřít',
2163
+ remove: 'Odstranit',
2191
2164
  pay: 'Zaplatit',
2192
2165
  change: 'Změnit',
2193
2166
  free: 'Zdarma',
@@ -2220,7 +2193,7 @@ const cs = {
2220
2193
  promo_code: 'Slevový kód',
2221
2194
  start_date: 'Datum konání',
2222
2195
  organizer: 'Pořadatel',
2223
- total: 'Celkem ',
2196
+ total: 'Celkem',
2224
2197
  with_fee: 'vč. servisního poplatku',
2225
2198
  service_fee: 'Servisní poplatek',
2226
2199
  shipping_fee: 'Doprava',
@@ -2233,6 +2206,10 @@ const cs = {
2233
2206
  category: 'Kategorie',
2234
2207
  sms_notification: 'SMS notifikace',
2235
2208
  open_map: 'Otevřít mapu',
2209
+ payment_overview_open: 'Otevřít přehled platby',
2210
+ payment_overview_close: 'Zavřít přehled platby',
2211
+ ticket_quantity_decrease: 'Snížit počet vstupenek',
2212
+ ticket_quantity_increase: 'Zvýšit počet vstupenek',
2236
2213
  },
2237
2214
  validation: {
2238
2215
  required: 'Toto pole je povinné.',
@@ -2283,8 +2260,12 @@ const cs = {
2283
2260
  7: {
2284
2261
  title: 'Přidružené eventy',
2285
2262
  },
2263
+ 8: {
2264
+ title: 'EventLook služby',
2265
+ additional_info: 'Více informací ke službám',
2266
+ },
2286
2267
  },
2287
- terms_and_conditions: 'Odesláním objednávky souhlasím s <0>Obchodními podmínkami</0> {{termsAndConditionsCompanies}} a beru na vědomí <1>Zásady soukromí</1>.',
2268
+ terms_and_conditions: 'Souhlasím s <0>Obchodními podmínkami</0> {{termsAndConditionsCompanies}} a <1>Zásady soukromí</1>.',
2288
2269
  insurance: {
2289
2270
  label: 'Pojištění vstupenek',
2290
2271
  per_ticket: 'ks',
@@ -2295,12 +2276,22 @@ const cs = {
2295
2276
  },
2296
2277
  },
2297
2278
  sms_notification: {
2298
- label: 'SMS připomenutí termínu akce',
2279
+ label: 'SMS připomenutí termínu',
2299
2280
  modal: {
2300
2281
  description: 'Připomínka akce den předem: SMS vás upozorní na blížící se událost, abyste na ni nezapomněli a stihli se včas připravit.',
2301
2282
  price: 'Cena SMS připomenutí termínu akce',
2302
2283
  },
2303
2284
  },
2285
+ merchandise: {
2286
+ show_sizes: 'Zobrazit velikosti',
2287
+ show_added: 'Zobrazit přidané',
2288
+ },
2289
+ services: {
2290
+ add_tickets_first: 'Nejdříve prosím přidejte vstupenky',
2291
+ },
2292
+ shipping: {
2293
+ choose_address: 'Vybrat adresu',
2294
+ },
2304
2295
  order_success: {
2305
2296
  title: 'Vstupenky byly úspěšně zarezervovány. Teď už zbývá jenom zaplatit.',
2306
2297
  description: 'Odpočet běží {{countdown}}. Pokud k přesměrování nedojde automaticky, klikněte na tlačítko Zaplatit níže.',
@@ -2332,6 +2323,8 @@ const cs = {
2332
2323
  components: {
2333
2324
  product_variant_dialog: {
2334
2325
  select_variant: 'Musíte vybrat variantu produktu.',
2326
+ decrease_quantity: 'Snížit množství varianty produktu',
2327
+ increase_quantity: 'Zvýšit množství varianty produktu',
2335
2328
  },
2336
2329
  },
2337
2330
  };
@@ -2345,6 +2338,8 @@ const en = {
2345
2338
  add: 'Add',
2346
2339
  confirm: 'Confirm',
2347
2340
  cancel: 'Cancel',
2341
+ close: 'Close',
2342
+ remove: 'Remove',
2348
2343
  pay: 'Pay',
2349
2344
  change: 'Change',
2350
2345
  free: 'Free',
@@ -2390,6 +2385,10 @@ const en = {
2390
2385
  category: 'Category',
2391
2386
  sms_notification: 'SMS notification',
2392
2387
  open_map: 'Open map',
2388
+ payment_overview_open: 'Open payment overview',
2389
+ payment_overview_close: 'Close payment overview',
2390
+ ticket_quantity_decrease: 'Decrease ticket quantity',
2391
+ ticket_quantity_increase: 'Increase ticket quantity',
2393
2392
  },
2394
2393
  validation: {
2395
2394
  required: 'This field is required.',
@@ -2440,8 +2439,12 @@ const en = {
2440
2439
  7: {
2441
2440
  title: 'Associated events',
2442
2441
  },
2442
+ 8: {
2443
+ title: 'EventLook services',
2444
+ additional_info: 'More information about services',
2445
+ },
2443
2446
  },
2444
- terms_and_conditions: 'By submitting the order, I agree to the <0>Terms and Conditions</0> of {{termsAndConditionsCompanies}} and acknowledge the <1>Privacy Policy</1>.',
2447
+ terms_and_conditions: 'I agree with the <0>Terms and Conditions</0> {{termsAndConditionsCompanies}} and the <1>Privacy Policy</1>.',
2445
2448
  insurance: {
2446
2449
  label: 'Ticket insurance',
2447
2450
  per_ticket: 'pc',
@@ -2459,6 +2462,16 @@ const en = {
2459
2462
  price: 'SMS event reminder price',
2460
2463
  },
2461
2464
  },
2465
+ merchandise: {
2466
+ show_sizes: 'Show sizes',
2467
+ show_added: 'Show added',
2468
+ },
2469
+ services: {
2470
+ add_tickets_first: 'Please add tickets first',
2471
+ },
2472
+ shipping: {
2473
+ choose_address: 'Choose address',
2474
+ },
2462
2475
  order_success: {
2463
2476
  title: 'Tickets have been successfully reserved. Now you just need to pay.',
2464
2477
  description: 'The countdown is running {{countdown}}. If you are not redirected automatically, please click the Pay button below.',
@@ -2490,6 +2503,8 @@ const en = {
2490
2503
  components: {
2491
2504
  product_variant_dialog: {
2492
2505
  select_variant: 'You must select a product variant',
2506
+ decrease_quantity: 'Decrease product variant quantity',
2507
+ increase_quantity: 'Increase product variant quantity',
2493
2508
  },
2494
2509
  },
2495
2510
  };
@@ -2503,6 +2518,8 @@ const sk = {
2503
2518
  add: 'Pridať',
2504
2519
  confirm: 'Potvrdiť',
2505
2520
  cancel: 'Zrušiť',
2521
+ close: 'Zavrieť',
2522
+ remove: 'Odstrániť',
2506
2523
  pay: 'Zaplaťte',
2507
2524
  change: 'Zmeniť',
2508
2525
  free: 'Zadarmo',
@@ -2548,6 +2565,10 @@ const sk = {
2548
2565
  category: 'Kategória',
2549
2566
  sms_notification: 'SMS notifikácia',
2550
2567
  open_map: 'Otvoriť mapu',
2568
+ payment_overview_open: 'Otvoriť prehľad platby',
2569
+ payment_overview_close: 'Zavrieť prehľad platby',
2570
+ ticket_quantity_decrease: 'Znížiť počet vstupeniek',
2571
+ ticket_quantity_increase: 'Zvýšiť počet vstupeniek',
2551
2572
  },
2552
2573
  validation: {
2553
2574
  required: 'Toto pole je povinné.',
@@ -2598,8 +2619,12 @@ const sk = {
2598
2619
  7: {
2599
2620
  title: 'Pridružené eventy',
2600
2621
  },
2622
+ 8: {
2623
+ title: 'EventLook služby',
2624
+ additional_info: 'Viac informácií o službách',
2625
+ },
2601
2626
  },
2602
- terms_and_conditions: 'Odoslaním objednávky súhlasím s <0>Obchodnými podmienkami</0> {{termsAndConditionsCompanies}} a beriem na vedomie <1>Zásady ochrany osobných údajov</1>.',
2627
+ terms_and_conditions: 'Súhlasím s <0>Obchodnými podmienkami</0> {{termsAndConditionsCompanies}} a <1>Zásadami ochrany osobných údajov</1>.',
2603
2628
  insurance: {
2604
2629
  label: 'Poistenie vstupenky',
2605
2630
  per_ticket: 'pc',
@@ -2611,12 +2636,22 @@ const sk = {
2611
2636
  },
2612
2637
  },
2613
2638
  sms_notification: {
2614
- label: 'SMS pripomenutie termínu akcie',
2639
+ label: 'SMS pripomenutie termínu',
2615
2640
  modal: {
2616
2641
  description: 'Pripomienka akcie deň vopred: SMS vás upozorní na blížiacu sa udalosť, aby ste na ňu nezabudli a stihli sa včas pripraviť.',
2617
2642
  price: 'Cena SMS pripomenutia termínu akcie',
2618
2643
  },
2619
2644
  },
2645
+ merchandise: {
2646
+ show_sizes: 'Zobraziť veľkosti',
2647
+ show_added: 'Zobraziť pridané',
2648
+ },
2649
+ services: {
2650
+ add_tickets_first: 'Najskôr prosím pridajte lístky',
2651
+ },
2652
+ shipping: {
2653
+ choose_address: 'Vybrať adresu',
2654
+ },
2620
2655
  order_success: {
2621
2656
  title: 'Vstupenky boli úspešne rezervované. Teraz už len zaplatiť.',
2622
2657
  description: 'Odpočet beží {{countdown}}. Ak nedôjde k automatickému presmerovaniu, kliknite na tlačidlo Zaplatiť nižšie.',
@@ -2648,6 +2683,8 @@ const sk = {
2648
2683
  components: {
2649
2684
  product_variant_dialog: {
2650
2685
  select_variant: 'Musíte vybrať variant produktu',
2686
+ decrease_quantity: 'Znížiť množstvo variantu produktu',
2687
+ increase_quantity: 'Zvýšiť množstvo variantu produktu',
2651
2688
  },
2652
2689
  },
2653
2690
  };
@@ -2661,6 +2698,8 @@ const pl = {
2661
2698
  add: 'Dodaj',
2662
2699
  confirm: 'Potwierdź',
2663
2700
  cancel: 'Anuluj',
2701
+ close: 'Zamknij',
2702
+ remove: 'Usuń',
2664
2703
  pay: 'Zapłać',
2665
2704
  change: 'Zmień',
2666
2705
  free: 'Darmowe',
@@ -2706,6 +2745,10 @@ const pl = {
2706
2745
  category: 'Kategoria',
2707
2746
  sms_notification: 'Powiadomienie SMS',
2708
2747
  open_map: 'Otwórz mapę',
2748
+ payment_overview_open: 'Otwórz podsumowanie płatności',
2749
+ payment_overview_close: 'Zamknij podsumowanie płatności',
2750
+ ticket_quantity_decrease: 'Zmniejsz liczbę biletów',
2751
+ ticket_quantity_increase: 'Zwiększ liczbę biletów',
2709
2752
  },
2710
2753
  validation: {
2711
2754
  required: 'To pole jest wymagane.',
@@ -2756,8 +2799,12 @@ const pl = {
2756
2799
  7: {
2757
2800
  title: 'Powiązane wydarzenia',
2758
2801
  },
2802
+ 8: {
2803
+ title: 'EventLook usługi',
2804
+ additional_info: 'Więcej informacji o usługach',
2805
+ },
2759
2806
  },
2760
- terms_and_conditions: 'Składając zamówienie, akceptuję <0>Regulamin</0> {{termsAndConditionsCompanies}} oraz potwierdzam <1>Politykę prywatności</1>.',
2807
+ terms_and_conditions: 'Zgadzam się z <0>Regulaminem</0> {{termsAndConditionsCompanies}} i <1>Polityką prywatności</1>.',
2761
2808
  insurance: {
2762
2809
  label: 'Ubezpieczenie biletu',
2763
2810
  per_ticket: 'pc',
@@ -2775,6 +2822,16 @@ const pl = {
2775
2822
  price: 'Cena przypomnienia SMS o wydarzeniu',
2776
2823
  },
2777
2824
  },
2825
+ merchandise: {
2826
+ show_sizes: 'Pokaż rozmiary',
2827
+ show_added: 'Pokaż dodane',
2828
+ },
2829
+ services: {
2830
+ add_tickets_first: 'Najpierw dodaj bilety',
2831
+ },
2832
+ shipping: {
2833
+ choose_address: 'Wybierz adres',
2834
+ },
2778
2835
  order_success: {
2779
2836
  title: 'Bilety zostały pomyślnie zarezerwowane. Teraz wystarczy zapłacić.',
2780
2837
  description: 'Odliczanie trwa {{countdown}}. Jeśli przekierowanie nie nastąpi automatycznie, kliknij przycisk Zapłać poniżej.',
@@ -2806,6 +2863,8 @@ const pl = {
2806
2863
  components: {
2807
2864
  product_variant_dialog: {
2808
2865
  select_variant: 'Musisz wybrać wariant produktu',
2866
+ decrease_quantity: 'Zmniejsz ilość wariantu produktu',
2867
+ increase_quantity: 'Zwiększ ilość wariantu produktu',
2809
2868
  },
2810
2869
  },
2811
2870
  };
@@ -2819,6 +2878,8 @@ const uk = {
2819
2878
  add: 'Додати',
2820
2879
  confirm: 'Підтвердити',
2821
2880
  cancel: 'Скасувати',
2881
+ close: 'Закрити',
2882
+ remove: 'Видалити',
2822
2883
  pay: 'Оплатити',
2823
2884
  change: 'Змінити',
2824
2885
  free: 'Безкоштовно',
@@ -2864,6 +2925,10 @@ const uk = {
2864
2925
  category: 'Категорія',
2865
2926
  sms_notification: 'SMS-сповіщення',
2866
2927
  open_map: 'Відкрити карту',
2928
+ payment_overview_open: 'Відкрити огляд платежу',
2929
+ payment_overview_close: 'Закрити огляд платежу',
2930
+ ticket_quantity_decrease: 'Зменшити кількість квитків',
2931
+ ticket_quantity_increase: 'Збільшити кількість квитків',
2867
2932
  },
2868
2933
  validation: {
2869
2934
  required: "Це поле обов'язкове.",
@@ -2914,8 +2979,12 @@ const uk = {
2914
2979
  7: {
2915
2980
  title: 'Пов’язані події',
2916
2981
  },
2982
+ 8: {
2983
+ title: 'EventLook послуги',
2984
+ additional_info: 'Додаткова інформація про послуги',
2985
+ },
2917
2986
  },
2918
- terms_and_conditions: 'Надсилаючи замовлення, я погоджуюсь з <0>Правилами та умовами</0> {{termsAndConditionsCompanies}} та підтверджую <1>Політику конфіденційності</1>.',
2987
+ terms_and_conditions: 'Я погоджуюся з <0>Правилами та умовами</0> {{termsAndConditionsCompanies}} та <1>Політикою конфіденційності</1>.',
2919
2988
  insurance: {
2920
2989
  label: 'Страхування квитка',
2921
2990
  per_ticket: 'pc',
@@ -2933,6 +3002,16 @@ const uk = {
2933
3002
  price: 'Ціна SMS-нагадування про подію',
2934
3003
  },
2935
3004
  },
3005
+ merchandise: {
3006
+ show_sizes: 'Показати розміри',
3007
+ show_added: 'Показати додані',
3008
+ },
3009
+ services: {
3010
+ add_tickets_first: 'Будь ласка, спочатку додайте квитки',
3011
+ },
3012
+ shipping: {
3013
+ choose_address: 'Вибрати адресу',
3014
+ },
2936
3015
  order_success: {
2937
3016
  title: 'Квитки успішно зарезервовані. Тепер залишилося оплатити.',
2938
3017
  description: 'Відлік триває {{countdown}}. Якщо перенаправлення не відбудеться автоматично, натисніть кнопку Оплатити нижче.',
@@ -2964,6 +3043,8 @@ const uk = {
2964
3043
  components: {
2965
3044
  product_variant_dialog: {
2966
3045
  select_variant: 'Ви повинні вибрати варіант продукту',
3046
+ decrease_quantity: 'Зменшити кількість варіанту продукту',
3047
+ increase_quantity: 'Збільшити кількість варіанту продукту',
2967
3048
  },
2968
3049
  },
2969
3050
  };
@@ -2977,6 +3058,8 @@ const es = {
2977
3058
  add: 'Añadir',
2978
3059
  confirm: 'Confirmar',
2979
3060
  cancel: 'Cancelar',
3061
+ close: 'Cerrar',
3062
+ remove: 'Eliminar',
2980
3063
  pay: 'Pagar',
2981
3064
  change: 'Cambiar',
2982
3065
  free: 'Gratis',
@@ -3022,6 +3105,10 @@ const es = {
3022
3105
  category: 'Categoría',
3023
3106
  sms_notification: 'Notificación SMS',
3024
3107
  open_map: 'Abrir mapa',
3108
+ payment_overview_open: 'Abrir resumen de pago',
3109
+ payment_overview_close: 'Cerrar resumen de pago',
3110
+ ticket_quantity_decrease: 'Disminuir cantidad de entradas',
3111
+ ticket_quantity_increase: 'Aumentar cantidad de entradas',
3025
3112
  },
3026
3113
  validation: {
3027
3114
  required: 'Este campo es obligatorio.',
@@ -3072,8 +3159,12 @@ const es = {
3072
3159
  7: {
3073
3160
  title: 'Eventos asociados',
3074
3161
  },
3162
+ 8: {
3163
+ title: 'EventLook servicios',
3164
+ additional_info: 'Más información sobre los servicios',
3165
+ },
3075
3166
  },
3076
- terms_and_conditions: 'Al enviar el pedido, acepto los <0>Términos y Condiciones</0> de {{termsAndConditionsCompanies}} y reconozco la <1>Política de Privacidad</1>.',
3167
+ terms_and_conditions: 'Estoy de acuerdo con los <0>Términos y Condiciones</0> de {{termsAndConditionsCompanies}} y la <1>Política de Privacidad</1>.',
3077
3168
  insurance: {
3078
3169
  label: 'Seguro de entrada',
3079
3170
  per_ticket: 'pc',
@@ -3091,6 +3182,16 @@ const es = {
3091
3182
  price: 'Precio del recordatorio por SMS del evento',
3092
3183
  },
3093
3184
  },
3185
+ merchandise: {
3186
+ show_sizes: 'Mostrar tallas',
3187
+ show_added: 'Mostrar añadidos',
3188
+ },
3189
+ services: {
3190
+ add_tickets_first: 'Por favor, agregue entradas primero',
3191
+ },
3192
+ shipping: {
3193
+ choose_address: 'Elegir dirección',
3194
+ },
3094
3195
  order_success: {
3095
3196
  title: 'Las entradas han sido reservadas con éxito. Ahora solo tienes que pagar.',
3096
3197
  description: 'La cuenta atrás está en marcha {{countdown}}. Si no se le redirige automáticamente, haga clic en el botón Pagar abajo.',
@@ -3122,6 +3223,8 @@ const es = {
3122
3223
  components: {
3123
3224
  product_variant_dialog: {
3124
3225
  select_variant: 'Debes seleccionar una variante de producto',
3226
+ decrease_quantity: 'Disminuir cantidad de variante de producto',
3227
+ increase_quantity: 'Aumentar cantidad de variante de producto',
3125
3228
  },
3126
3229
  },
3127
3230
  };
@@ -3437,7 +3540,7 @@ function isArrayBufferView(val) {
3437
3540
  *
3438
3541
  * @returns {boolean} True if value is a String, otherwise false
3439
3542
  */
3440
- const isString$1 = typeOfTest('string');
3543
+ const isString$2 = typeOfTest('string');
3441
3544
 
3442
3545
  /**
3443
3546
  * Determine if a value is a Function
@@ -3454,7 +3557,7 @@ const isFunction$3 = typeOfTest('function');
3454
3557
  *
3455
3558
  * @returns {boolean} True if value is a Number, otherwise false
3456
3559
  */
3457
- const isNumber = typeOfTest('number');
3560
+ const isNumber$1 = typeOfTest('number');
3458
3561
 
3459
3562
  /**
3460
3563
  * Determine if a value is an Object
@@ -3463,7 +3566,7 @@ const isNumber = typeOfTest('number');
3463
3566
  *
3464
3567
  * @returns {boolean} True if value is an Object, otherwise false
3465
3568
  */
3466
- const isObject$2 = (thing) => thing !== null && typeof thing === 'object';
3569
+ const isObject$4 = (thing) => thing !== null && typeof thing === 'object';
3467
3570
 
3468
3571
  /**
3469
3572
  * Determine if a value is a Boolean
@@ -3471,7 +3574,7 @@ const isObject$2 = (thing) => thing !== null && typeof thing === 'object';
3471
3574
  * @param {*} thing The value to test
3472
3575
  * @returns {boolean} True if value is a Boolean, otherwise false
3473
3576
  */
3474
- const isBoolean$1 = (thing) => thing === true || thing === false;
3577
+ const isBoolean$2 = (thing) => thing === true || thing === false;
3475
3578
 
3476
3579
  /**
3477
3580
  * Determine if a value is a plain Object
@@ -3504,7 +3607,7 @@ const isPlainObject$1 = (val) => {
3504
3607
  */
3505
3608
  const isEmptyObject$1 = (val) => {
3506
3609
  // Early return for non-objects or Buffers to prevent RangeError
3507
- if (!isObject$2(val) || isBuffer(val)) {
3610
+ if (!isObject$4(val) || isBuffer(val)) {
3508
3611
  return false;
3509
3612
  }
3510
3613
 
@@ -3584,7 +3687,7 @@ const isFileList = kindOfTest('FileList');
3584
3687
  *
3585
3688
  * @returns {boolean} True if value is a Stream, otherwise false
3586
3689
  */
3587
- const isStream = (val) => isObject$2(val) && isFunction$3(val.pipe);
3690
+ const isStream = (val) => isObject$4(val) && isFunction$3(val.pipe);
3588
3691
 
3589
3692
  /**
3590
3693
  * Determine if a value is a FormData
@@ -3914,7 +4017,7 @@ const toArray$1 = (thing) => {
3914
4017
  if (!thing) return null;
3915
4018
  if (isArray(thing)) return thing;
3916
4019
  let i = thing.length;
3917
- if (!isNumber(i)) return null;
4020
+ if (!isNumber$1(i)) return null;
3918
4021
  const arr = new Array(i);
3919
4022
  while (i-- > 0) {
3920
4023
  arr[i] = thing[i];
@@ -4102,7 +4205,7 @@ const toJSONObject = (obj) => {
4102
4205
  const stack = new Array(10);
4103
4206
 
4104
4207
  const visit = (source, i) => {
4105
- if (isObject$2(source)) {
4208
+ if (isObject$4(source)) {
4106
4209
  if (stack.indexOf(source) >= 0) {
4107
4210
  return;
4108
4211
  }
@@ -4149,7 +4252,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
4149
4252
  */
4150
4253
  const isThenable = (thing) =>
4151
4254
  thing &&
4152
- (isObject$2(thing) || isFunction$3(thing)) &&
4255
+ (isObject$4(thing) || isFunction$3(thing)) &&
4153
4256
  isFunction$3(thing.then) &&
4154
4257
  isFunction$3(thing.catch);
4155
4258
 
@@ -4210,10 +4313,10 @@ var utils$1 = {
4210
4313
  isBuffer,
4211
4314
  isFormData,
4212
4315
  isArrayBufferView,
4213
- isString: isString$1,
4214
- isNumber,
4215
- isBoolean: isBoolean$1,
4216
- isObject: isObject$2,
4316
+ isString: isString$2,
4317
+ isNumber: isNumber$1,
4318
+ isBoolean: isBoolean$2,
4319
+ isObject: isObject$4,
4217
4320
  isPlainObject: isPlainObject$1,
4218
4321
  isEmptyObject: isEmptyObject$1,
4219
4322
  isReadableStream,
@@ -9157,12 +9260,12 @@ var isDateObject = (value) => value instanceof Date;
9157
9260
  var isNullOrUndefined = (value) => value == null;
9158
9261
 
9159
9262
  const isObjectType = (value) => typeof value === 'object';
9160
- var isObject$1 = (value) => !isNullOrUndefined(value) &&
9263
+ var isObject$3 = (value) => !isNullOrUndefined(value) &&
9161
9264
  !Array.isArray(value) &&
9162
9265
  isObjectType(value) &&
9163
9266
  !isDateObject(value);
9164
9267
 
9165
- var getEventValue = (event) => isObject$1(event) && event.target
9268
+ var getEventValue = (event) => isObject$3(event) && event.target
9166
9269
  ? isCheckBoxInput(event.target)
9167
9270
  ? event.target.checked
9168
9271
  : event.target.value
@@ -9174,7 +9277,7 @@ var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
9174
9277
 
9175
9278
  var isPlainObject = (tempObject) => {
9176
9279
  const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
9177
- return (isObject$1(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));
9280
+ return (isObject$3(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));
9178
9281
  };
9179
9282
 
9180
9283
  var isWeb = typeof window !== 'undefined' &&
@@ -9190,7 +9293,7 @@ function cloneObject(data) {
9190
9293
  return data;
9191
9294
  }
9192
9295
  const isArray = Array.isArray(data);
9193
- if (!isArray && !(isObject$1(data) && isPlainObject(data))) {
9296
+ if (!isArray && !(isObject$3(data) && isPlainObject(data))) {
9194
9297
  return data;
9195
9298
  }
9196
9299
  const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
@@ -9211,7 +9314,7 @@ var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
9211
9314
  var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
9212
9315
 
9213
9316
  var get = (object, path, defaultValue) => {
9214
- if (!path || !isObject$1(object)) {
9317
+ if (!path || !isObject$3(object)) {
9215
9318
  return defaultValue;
9216
9319
  }
9217
9320
  const result = (isKey(path) ? [path] : stringToPath(path)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);
@@ -9222,7 +9325,7 @@ var get = (object, path, defaultValue) => {
9222
9325
  : result;
9223
9326
  };
9224
9327
 
9225
- var isBoolean = (value) => typeof value === 'boolean';
9328
+ var isBoolean$1 = (value) => typeof value === 'boolean';
9226
9329
 
9227
9330
  var isFunction$1 = (value) => typeof value === 'function';
9228
9331
 
@@ -9237,7 +9340,7 @@ var set = (object, path, value) => {
9237
9340
  if (index !== lastIndex) {
9238
9341
  const objValue = object[key];
9239
9342
  newValue =
9240
- isObject$1(objValue) || Array.isArray(objValue)
9343
+ isObject$3(objValue) || Array.isArray(objValue)
9241
9344
  ? objValue
9242
9345
  : !isNaN(+tempPath[index + 1])
9243
9346
  ? []
@@ -9367,10 +9470,10 @@ function useFormState(props) {
9367
9470
  return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
9368
9471
  }
9369
9472
 
9370
- var isString = (value) => typeof value === 'string';
9473
+ var isString$1 = (value) => typeof value === 'string';
9371
9474
 
9372
9475
  var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
9373
- if (isString(names)) {
9476
+ if (isString$1(names)) {
9374
9477
  isGlobal && _names.watch.add(names);
9375
9478
  return get(formValues, names, defaultValue);
9376
9479
  }
@@ -9409,7 +9512,7 @@ function deepEqual(object1, object2, _internal_visited = new WeakSet()) {
9409
9512
  if (key !== 'ref') {
9410
9513
  const val2 = object2[key];
9411
9514
  if ((isDateObject(val1) && isDateObject(val2)) ||
9412
- (isObject$1(val1) && isObject$1(val2)) ||
9515
+ (isObject$3(val1) && isObject$3(val2)) ||
9413
9516
  (Array.isArray(val1) && Array.isArray(val2))
9414
9517
  ? !deepEqual(val1, val2, _internal_visited)
9415
9518
  : !Object.is(val1, val2)) {
@@ -9551,7 +9654,7 @@ function useController(props) {
9551
9654
  const _registerProps = React.useRef(control.register(name, {
9552
9655
  ...props.rules,
9553
9656
  value,
9554
- ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),
9657
+ ...(isBoolean$1(props.disabled) ? { disabled: props.disabled } : {}),
9555
9658
  }));
9556
9659
  _props.current = props;
9557
9660
  const fieldState = React.useMemo(() => Object.defineProperties({}, {
@@ -9604,7 +9707,7 @@ function useController(props) {
9604
9707
  const field = React.useMemo(() => ({
9605
9708
  name,
9606
9709
  value,
9607
- ...(isBoolean(disabled) || formState.disabled
9710
+ ...(isBoolean$1(disabled) || formState.disabled
9608
9711
  ? { disabled: formState.disabled || disabled }
9609
9712
  : {}),
9610
9713
  onChange,
@@ -9619,7 +9722,7 @@ function useController(props) {
9619
9722
  }
9620
9723
  control.register(name, {
9621
9724
  ..._props.current.rules,
9622
- ...(isBoolean(_props.current.disabled)
9725
+ ...(isBoolean$1(_props.current.disabled)
9623
9726
  ? { disabled: _props.current.disabled }
9624
9727
  : {}),
9625
9728
  });
@@ -9853,9 +9956,9 @@ function extractFormValues(fieldsState, formValues) {
9853
9956
  if (fieldsState.hasOwnProperty(key)) {
9854
9957
  const fieldState = fieldsState[key];
9855
9958
  const fieldValue = formValues[key];
9856
- if (fieldState && isObject$1(fieldState) && fieldValue) {
9959
+ if (fieldState && isObject$3(fieldState) && fieldValue) {
9857
9960
  const nestedFieldsState = extractFormValues(fieldState, fieldValue);
9858
- if (isObject$1(nestedFieldsState)) {
9961
+ if (isObject$3(nestedFieldsState)) {
9859
9962
  values[key] = nestedFieldsState;
9860
9963
  }
9861
9964
  }
@@ -9867,7 +9970,7 @@ function extractFormValues(fieldsState, formValues) {
9867
9970
  return values;
9868
9971
  }
9869
9972
 
9870
- var isEmptyObject = (value) => isObject$1(value) && !Object.keys(value).length;
9973
+ var isEmptyObject = (value) => isObject$3(value) && !Object.keys(value).length;
9871
9974
 
9872
9975
  var isFileInput = (element) => element.type === 'file';
9873
9976
 
@@ -9917,7 +10020,7 @@ function unset(object, path) {
9917
10020
  delete childObject[key];
9918
10021
  }
9919
10022
  if (index !== 0 &&
9920
- ((isObject$1(childObject) && isEmptyObject(childObject)) ||
10023
+ ((isObject$3(childObject) && isEmptyObject(childObject)) ||
9921
10024
  (Array.isArray(childObject) && isEmptyArray(childObject)))) {
9922
10025
  unset(object, paths.slice(0, -1));
9923
10026
  }
@@ -9934,7 +10037,7 @@ var objectHasFunction = (data) => {
9934
10037
  };
9935
10038
 
9936
10039
  function isTraversable(value) {
9937
- return Array.isArray(value) || (isObject$1(value) && !objectHasFunction(value));
10040
+ return Array.isArray(value) || (isObject$3(value) && !objectHasFunction(value));
9938
10041
  }
9939
10042
  function markFieldsDirty(data, fields = {}) {
9940
10043
  for (const key in data) {
@@ -10004,7 +10107,7 @@ var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isU
10004
10107
  : value
10005
10108
  ? +value
10006
10109
  : value
10007
- : valueAsDate && isString(value)
10110
+ : valueAsDate && isString$1(value)
10008
10111
  ? new Date(value)
10009
10112
  : setValueAs
10010
10113
  ? setValueAs(value)
@@ -10060,7 +10163,7 @@ var getRuleValue = (rule) => isUndefined$1(rule)
10060
10163
  ? rule
10061
10164
  : isRegex(rule)
10062
10165
  ? rule.source
10063
- : isObject$1(rule)
10166
+ : isObject$3(rule)
10064
10167
  ? isRegex(rule.value)
10065
10168
  ? rule.value.source
10066
10169
  : rule.value
@@ -10079,7 +10182,7 @@ var hasPromiseValidation = (fieldReference) => !!fieldReference &&
10079
10182
  !!fieldReference.validate &&
10080
10183
  !!((isFunction$1(fieldReference.validate) &&
10081
10184
  fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||
10082
- (isObject$1(fieldReference.validate) &&
10185
+ (isObject$3(fieldReference.validate) &&
10083
10186
  Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));
10084
10187
 
10085
10188
  var hasValidation = (options) => options.mount &&
@@ -10115,7 +10218,7 @@ const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
10115
10218
  }
10116
10219
  }
10117
10220
  }
10118
- else if (isObject$1(currentField)) {
10221
+ else if (isObject$3(currentField)) {
10119
10222
  if (iterateFieldsByAction(currentField, action)) {
10120
10223
  break;
10121
10224
  }
@@ -10204,18 +10307,18 @@ var updateFieldArrayRootError = (errors, error, name) => {
10204
10307
  };
10205
10308
 
10206
10309
  function getValidateError(result, ref, type = 'validate') {
10207
- if (isString(result) ||
10208
- (Array.isArray(result) && result.every(isString)) ||
10209
- (isBoolean(result) && !result)) {
10310
+ if (isString$1(result) ||
10311
+ (Array.isArray(result) && result.every(isString$1)) ||
10312
+ (isBoolean$1(result) && !result)) {
10210
10313
  return {
10211
10314
  type,
10212
- message: isString(result) ? result : '',
10315
+ message: isString$1(result) ? result : '',
10213
10316
  ref,
10214
10317
  };
10215
10318
  }
10216
10319
  }
10217
10320
 
10218
- var getValueAndMessage = (validationData) => isObject$1(validationData) && !isRegex(validationData)
10321
+ var getValueAndMessage = (validationData) => isObject$3(validationData) && !isRegex(validationData)
10219
10322
  ? validationData
10220
10323
  : {
10221
10324
  value: validationData,
@@ -10231,7 +10334,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10231
10334
  const inputRef = refs ? refs[0] : ref;
10232
10335
  const setCustomValidity = (message) => {
10233
10336
  if (shouldUseNativeValidation && inputRef.reportValidity) {
10234
- inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');
10337
+ inputRef.setCustomValidity(isBoolean$1(message) ? '' : message || '');
10235
10338
  inputRef.reportValidity();
10236
10339
  }
10237
10340
  };
@@ -10259,10 +10362,10 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10259
10362
  ? !Array.isArray(inputValue) || !inputValue.length
10260
10363
  : required &&
10261
10364
  ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||
10262
- (isBoolean(inputValue) && !inputValue) ||
10365
+ (isBoolean$1(inputValue) && !inputValue) ||
10263
10366
  (isCheckBox && !getCheckboxValue(refs).isValid) ||
10264
10367
  (isRadio && !getRadioValue(refs).isValid))) {
10265
- const { value, message } = isString(required)
10368
+ const { value, message } = isString$1(required)
10266
10369
  ? { value: !!required, message: required }
10267
10370
  : getValueAndMessage(required);
10268
10371
  if (value) {
@@ -10298,14 +10401,14 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10298
10401
  const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);
10299
10402
  const isTime = ref.type == 'time';
10300
10403
  const isWeek = ref.type == 'week';
10301
- if (isString(maxOutput.value) && inputValue) {
10404
+ if (isString$1(maxOutput.value) && inputValue) {
10302
10405
  exceedMax = isTime
10303
10406
  ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)
10304
10407
  : isWeek
10305
10408
  ? inputValue > maxOutput.value
10306
10409
  : valueDate > new Date(maxOutput.value);
10307
10410
  }
10308
- if (isString(minOutput.value) && inputValue) {
10411
+ if (isString$1(minOutput.value) && inputValue) {
10309
10412
  exceedMin = isTime
10310
10413
  ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)
10311
10414
  : isWeek
@@ -10323,7 +10426,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10323
10426
  }
10324
10427
  if ((maxLength || minLength) &&
10325
10428
  !isEmpty &&
10326
- (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {
10429
+ (isString$1(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {
10327
10430
  const maxLengthOutput = getValueAndMessage(maxLength);
10328
10431
  const minLengthOutput = getValueAndMessage(minLength);
10329
10432
  const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&
@@ -10338,7 +10441,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10338
10441
  }
10339
10442
  }
10340
10443
  }
10341
- if (pattern && !isEmpty && isString(inputValue)) {
10444
+ if (pattern && !isEmpty && isString$1(inputValue)) {
10342
10445
  const { value: patternValue, message } = getValueAndMessage(pattern);
10343
10446
  if (isRegex(patternValue) && !inputValue.match(patternValue)) {
10344
10447
  error[name] = {
@@ -10368,7 +10471,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10368
10471
  }
10369
10472
  }
10370
10473
  }
10371
- else if (isObject$1(validate)) {
10474
+ else if (isObject$3(validate)) {
10372
10475
  let validationResult = {};
10373
10476
  for (const key in validate) {
10374
10477
  if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {
@@ -10401,14 +10504,14 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
10401
10504
  return error;
10402
10505
  };
10403
10506
 
10404
- const defaultOptions = {
10507
+ const defaultOptions$1 = {
10405
10508
  mode: VALIDATION_MODE.onSubmit,
10406
10509
  reValidateMode: VALIDATION_MODE.onChange,
10407
10510
  shouldFocusError: true,
10408
10511
  };
10409
10512
  function createFormControl(props = {}) {
10410
10513
  let _options = {
10411
- ...defaultOptions,
10514
+ ...defaultOptions$1,
10412
10515
  ...props,
10413
10516
  };
10414
10517
  let _formState = {
@@ -10428,7 +10531,7 @@ function createFormControl(props = {}) {
10428
10531
  disabled: _options.disabled || false,
10429
10532
  };
10430
10533
  let _fields = {};
10431
- let _defaultValues = isObject$1(_options.defaultValues) || isObject$1(_options.values)
10534
+ let _defaultValues = isObject$3(_options.defaultValues) || isObject$3(_options.values)
10432
10535
  ? cloneObject(_options.defaultValues || _options.values) || {}
10433
10536
  : {};
10434
10537
  let _formValues = _options.shouldUnregister
@@ -10619,7 +10722,7 @@ function createFormControl(props = {}) {
10619
10722
  const shouldRenderByError = (name, isValid, error, fieldState) => {
10620
10723
  const previousFieldError = get(_formState.errors, name);
10621
10724
  const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&
10622
- isBoolean(isValid) &&
10725
+ isBoolean$1(isValid) &&
10623
10726
  _formState.isValid !== isValid;
10624
10727
  if (_options.delayError && error) {
10625
10728
  delayErrorCallback = debounce(() => updateErrors(name, error));
@@ -10637,7 +10740,7 @@ function createFormControl(props = {}) {
10637
10740
  shouldUpdateValid) {
10638
10741
  const updatedFormState = {
10639
10742
  ...fieldState,
10640
- ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),
10743
+ ...(shouldUpdateValid && isBoolean$1(isValid) ? { isValid } : {}),
10641
10744
  errors: _formState.errors,
10642
10745
  name,
10643
10746
  };
@@ -10724,7 +10827,7 @@ function createFormControl(props = {}) {
10724
10827
  ? _formValues
10725
10828
  : isUndefined$1(defaultValue)
10726
10829
  ? _defaultValues
10727
- : isString(names)
10830
+ : isString$1(names)
10728
10831
  ? { [names]: defaultValue }
10729
10832
  : defaultValue),
10730
10833
  }, isGlobal, defaultValue);
@@ -10789,7 +10892,7 @@ function createFormControl(props = {}) {
10789
10892
  const fieldName = name + '.' + fieldKey;
10790
10893
  const field = get(_fields, fieldName);
10791
10894
  (_names.array.has(name) ||
10792
- isObject$1(fieldValue) ||
10895
+ isObject$3(fieldValue) ||
10793
10896
  (field && !field._f)) &&
10794
10897
  !isDateObject(fieldValue)
10795
10898
  ? setValues(fieldName, fieldValue, options)
@@ -10961,7 +11064,7 @@ function createFormControl(props = {}) {
10961
11064
  validationResult = isValid = await executeBuiltInValidation(_fields);
10962
11065
  }
10963
11066
  _subjects.state.next({
10964
- ...(!isString(name) ||
11067
+ ...(!isString$1(name) ||
10965
11068
  ((_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&
10966
11069
  isValid !== _formState.isValid)
10967
11070
  ? {}
@@ -10983,7 +11086,7 @@ function createFormControl(props = {}) {
10983
11086
  }
10984
11087
  return isUndefined$1(fieldNames)
10985
11088
  ? values
10986
- : isString(fieldNames)
11089
+ : isString$1(fieldNames)
10987
11090
  ? get(values, fieldNames)
10988
11091
  : fieldNames.map((name) => get(values, name));
10989
11092
  };
@@ -11091,7 +11194,7 @@ function createFormControl(props = {}) {
11091
11194
  !options.keepIsValid && _setValid();
11092
11195
  };
11093
11196
  const _setDisabledField = ({ disabled, name, }) => {
11094
- if ((isBoolean(disabled) && _state.mount) ||
11197
+ if ((isBoolean$1(disabled) && _state.mount) ||
11095
11198
  !!disabled ||
11096
11199
  _names.disabled.has(name)) {
11097
11200
  const wasDisabled = _names.disabled.has(name);
@@ -11103,7 +11206,7 @@ function createFormControl(props = {}) {
11103
11206
  };
11104
11207
  const register = (name, options = {}) => {
11105
11208
  let field = get(_fields, name);
11106
- const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
11209
+ const disabledIsDefined = isBoolean$1(options.disabled) || isBoolean$1(_options.disabled);
11107
11210
  set(_fields, name, {
11108
11211
  ...(field || {}),
11109
11212
  _f: {
@@ -11116,7 +11219,7 @@ function createFormControl(props = {}) {
11116
11219
  _names.mount.add(name);
11117
11220
  if (field) {
11118
11221
  _setDisabledField({
11119
- disabled: isBoolean(options.disabled)
11222
+ disabled: isBoolean$1(options.disabled)
11120
11223
  ? options.disabled
11121
11224
  : _options.disabled,
11122
11225
  name,
@@ -11190,7 +11293,7 @@ function createFormControl(props = {}) {
11190
11293
  const _focusError = () => _options.shouldFocusError &&
11191
11294
  iterateFieldsByAction(_fields, _focusInput, _names.mount);
11192
11295
  const _disableForm = (disabled) => {
11193
- if (isBoolean(disabled)) {
11296
+ if (isBoolean$1(disabled)) {
11194
11297
  _subjects.state.next({ disabled });
11195
11298
  iterateFieldsByAction(_fields, (ref, name) => {
11196
11299
  const currentField = get(_fields, name);
@@ -11702,9 +11805,9 @@ function RHFCheckbox({ name, helperText, ...other }) {
11702
11805
  (!!error || helperText) && (React.createElement(FormHelperText, { error: !!error, sx: { mt: 0 } }, error ? error?.message : helperText)))) }));
11703
11806
  }
11704
11807
 
11705
- function FormProvider({ children, onSubmit, methods }) {
11808
+ function FormProvider({ children, onSubmit, methods, formId }) {
11706
11809
  return (React.createElement(FormProvider$1, { ...methods },
11707
- React.createElement("form", { onSubmit: onSubmit }, children)));
11810
+ React.createElement("form", { id: formId, onSubmit: onSubmit }, children)));
11708
11811
  }
11709
11812
 
11710
11813
  function RHFTextField({ name, helperText, ...other }) {
@@ -13209,34 +13312,6 @@ function useEventActiveReleases(id, includeChildren, timeslotId) {
13209
13312
  };
13210
13313
  }
13211
13314
 
13212
- const FeeBox = ({ event, align = 'left' }) => {
13213
- const { t, lang } = useGlobal();
13214
- const xs = useResponsive('only', 'xs');
13215
- const { watch } = useFormContext();
13216
- const values = watch();
13217
- const isRight = align === 'right';
13218
- return (React.createElement(Box, { mb: 1, textAlign: isRight ? 'right' : undefined },
13219
- values.promoCodes.length > 0 && (React.createElement(Stack, { direction: "row", justifyContent: isRight ? 'flex-end' : 'space-between', alignItems: "center", spacing: 1, sx: { color: (theme) => theme.palette.grey.A700 } },
13220
- React.createElement(Typography, { variant: "caption", sx: { textAlign: 'right' } },
13221
- t('form.labels.original_price'),
13222
- ":"),
13223
- React.createElement(Typography, { variant: "caption", sx: { textDecoration: 'line-through' } }, fCurrency(values.originalPrice, lang, event.currency)))),
13224
- React.createElement(Stack, { direction: "row", justifyContent: isRight ? 'flex-end' : 'space-between', alignItems: "center", spacing: 1 },
13225
- React.createElement(Stack, { direction: "row", alignItems: "center", spacing: 1 },
13226
- React.createElement(Tooltip, { title: t('form.labels.price_including_service_fee', {
13227
- fee: fCurrency(values.totalFee ?? 0, lang, event.currency),
13228
- }), placement: xs ? 'top' : 'left', arrow: true, sx: { cursor: 'help' } },
13229
- React.createElement(Stack, { alignItems: "center" },
13230
- React.createElement(Iconify, { icon: "carbon:information-filled" }))),
13231
- React.createElement(Typography, { variant: "subtitle1", sx: { textAlign: 'right' } },
13232
- t('form.labels.total'),
13233
- ":")),
13234
- React.createElement(Typography, { variant: "subtitle1" }, fCurrency(values.total, lang, event.currency))),
13235
- !!values.totalFee && (React.createElement(Typography, { variant: "caption", sx: {
13236
- color: (theme) => theme.palette.grey.A700,
13237
- } }, t('form.labels.with_fee')))));
13238
- };
13239
-
13240
13315
  var ExtraFieldTypes;
13241
13316
  (function (ExtraFieldTypes) {
13242
13317
  ExtraFieldTypes["ORDER"] = "ORDER";
@@ -13312,8 +13387,141 @@ var EventType;
13312
13387
  EventType["RECURRING"] = "RECURRING";
13313
13388
  })(EventType || (EventType = {}));
13314
13389
 
13315
- const TicketSelection = ({ event }) => {
13390
+ const ReleaseDescription = ({ description, isExpanded, onToggle, moreInfoLabel, showCollapse = false, }) => {
13391
+ if (!description)
13392
+ return null;
13393
+ if (showCollapse) {
13394
+ return (React.createElement(Collapse, { in: isExpanded },
13395
+ React.createElement(Typography, { variant: "body2", color: "text.secondary" }, description)));
13396
+ }
13397
+ return (React.createElement(Link, { onClick: onToggle, color: "inherit", underline: "always", fontSize: 12 },
13398
+ React.createElement(Stack, { direction: "row", alignItems: "center", spacing: 0 },
13399
+ React.createElement(Box, null, moreInfoLabel),
13400
+ React.createElement(Iconify, { sx: { width: 24, height: 24 }, icon: isExpanded ? 'eva:chevron-up-fill' : 'eva:chevron-down-fill' }))));
13401
+ };
13402
+
13403
+ const TicketQuantityControl = ({ quantity, isDisabled, canAddFirst, canAddMore, addLabel, onDecrement, onIncrement, onAddFirst, }) => {
13404
+ const { t } = useGlobal();
13405
+ if (quantity > 0) {
13406
+ return (React.createElement(Stack, { direction: "row", spacing: { xs: 0.5, md: 1 }, alignItems: "center" },
13407
+ React.createElement(IconButton, { onClick: onDecrement, "aria-label": t('form.labels.ticket_quantity_decrease'), disabled: isDisabled || quantity <= 0, sx: {
13408
+ width: { xs: 36, md: 40 },
13409
+ height: { xs: 36, md: 40 },
13410
+ borderRadius: 1,
13411
+ border: '1px solid',
13412
+ borderColor: 'grey.300',
13413
+ } },
13414
+ React.createElement(Iconify, { icon: "eva:minus-fill" })),
13415
+ React.createElement(Box, { sx: {
13416
+ width: { xs: 36, md: 40 },
13417
+ height: { xs: 36, md: 40 },
13418
+ borderRadius: 1,
13419
+ border: '1px solid',
13420
+ borderColor: 'grey.300',
13421
+ display: 'flex',
13422
+ alignItems: 'center',
13423
+ justifyContent: 'center',
13424
+ fontWeight: 600,
13425
+ } }, quantity),
13426
+ React.createElement(IconButton, { onClick: onIncrement, "aria-label": t('form.labels.ticket_quantity_increase'), disabled: isDisabled || !canAddMore, sx: {
13427
+ width: { xs: 36, md: 40 },
13428
+ height: { xs: 36, md: 40 },
13429
+ borderRadius: 1,
13430
+ bgcolor: 'primary.main',
13431
+ color: 'primary.contrastText',
13432
+ '&:hover': { bgcolor: 'primary.dark' },
13433
+ } },
13434
+ React.createElement(Iconify, { icon: "eva:plus-fill" }))));
13435
+ }
13436
+ return (React.createElement(Button, { variant: "contained", onClick: onAddFirst, "aria-label": addLabel, disabled: isDisabled || !canAddFirst, sx: {
13437
+ height: { xs: 36, md: 40 },
13438
+ width: { xs: 116, md: 136 },
13439
+ borderRadius: 1,
13440
+ px: 3,
13441
+ textTransform: 'none',
13442
+ fontWeight: 600,
13443
+ } }, addLabel));
13444
+ };
13445
+
13446
+ const TicketSelectionMobile = ({ event, activeReleases, showLoading, soldOutReleaseCategoryNames, tickets, isQuantityDisabled, setValue, removeTicket, getExtraFields, }) => {
13316
13447
  const { t, lang } = useGlobal();
13448
+ const [expandedReleaseIds, setExpandedReleaseIds] = useState({});
13449
+ const theme = useTheme$1();
13450
+ const isLight = theme.palette.mode === 'light';
13451
+ const getReleaseTitle = (release) => release.releaseCategoryName || release.name || '';
13452
+ const getTicketIndexByRelease = (releaseId) => tickets.findIndex((ticket) => ticket.releaseId === releaseId);
13453
+ const getReleaseQuantity = (releaseId) => {
13454
+ const ticket = tickets.find((t) => t.releaseId === releaseId);
13455
+ return Number(ticket?.quantity || 0);
13456
+ };
13457
+ const updateReleaseQuantity = (release, nextQuantity) => {
13458
+ const maxAvailable = Math.min(release.availableTickets || 0, 10);
13459
+ const clampedQuantity = Math.max(0, Math.min(nextQuantity, maxAvailable));
13460
+ const ticketIndex = getTicketIndexByRelease(release.id);
13461
+ if (clampedQuantity <= 0) {
13462
+ if (ticketIndex >= 0)
13463
+ removeTicket(ticketIndex);
13464
+ return;
13465
+ }
13466
+ if (ticketIndex >= 0) {
13467
+ setValue(`tickets.${event.id}.${ticketIndex}.quantity`, clampedQuantity);
13468
+ return;
13469
+ }
13470
+ setValue(`tickets.${event.id}`, [
13471
+ ...tickets,
13472
+ {
13473
+ releaseId: release.id,
13474
+ quantity: clampedQuantity,
13475
+ itemName: getReleaseTitle(release),
13476
+ price: release.price || 0,
13477
+ products: [],
13478
+ extraFields: [],
13479
+ },
13480
+ ]);
13481
+ };
13482
+ const toggleReleaseDescription = (releaseId) => setExpandedReleaseIds((prev) => ({
13483
+ ...prev,
13484
+ [releaseId]: !prev[releaseId],
13485
+ }));
13486
+ if (showLoading) {
13487
+ return (React.createElement(Stack, { spacing: 2 }, [...Array(2)].map((_, index) => (React.createElement(Skeleton, { key: index, variant: "rounded", sx: {
13488
+ width: '100%',
13489
+ height: (theme) => theme.spacing(12),
13490
+ } })))));
13491
+ }
13492
+ return (React.createElement(Stack, { spacing: 2 }, activeReleases?.map((release) => {
13493
+ const quantity = getReleaseQuantity(release.id);
13494
+ const ticketIndex = getTicketIndexByRelease(release.id);
13495
+ const maxAvailable = Math.min(release.availableTickets || 0, 10);
13496
+ const isLocked = release.locked && !soldOutReleaseCategoryNames.includes(release.releaseCategoryName);
13497
+ const isDisabled = isLocked && quantity === 0;
13498
+ const canAddFirst = maxAvailable > 0 && !isQuantityDisabled(1, release.id);
13499
+ const canAddMore = quantity < maxAvailable && !isQuantityDisabled(quantity + 1, release.id);
13500
+ return (React.createElement(Box, { key: release.id, sx: {
13501
+ pt: 1,
13502
+ pr: 0.5,
13503
+ pb: 0.5,
13504
+ pl: 2,
13505
+ borderRadius: 1,
13506
+ bgcolor: (theme) => (isLight ? theme.palette.grey[100] : theme.palette.grey[800]),
13507
+ } },
13508
+ React.createElement(Stack, { spacing: 0 },
13509
+ React.createElement(Box, null,
13510
+ React.createElement(Typography, { variant: "subtitle2", fontWeight: 700 }, getReleaseTitle(release))),
13511
+ React.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between" },
13512
+ React.createElement(Stack, null,
13513
+ React.createElement(Typography, { variant: "body2" }, release.price === 0
13514
+ ? t('free')
13515
+ : fCurrency(release.price, lang, event.currency)),
13516
+ React.createElement(ReleaseDescription, { description: release.description, isExpanded: Boolean(expandedReleaseIds[release.id]), onToggle: () => toggleReleaseDescription(release.id), moreInfoLabel: t('more_info') })),
13517
+ React.createElement(TicketQuantityControl, { quantity: quantity, isDisabled: isDisabled, canAddFirst: canAddFirst, canAddMore: canAddMore, addLabel: t('add'), onDecrement: () => updateReleaseQuantity(release, quantity - 1), onIncrement: () => updateReleaseQuantity(release, quantity + 1), onAddFirst: () => updateReleaseQuantity(release, 1) })),
13518
+ React.createElement(ReleaseDescription, { description: release.description, isExpanded: Boolean(expandedReleaseIds[release.id]), onToggle: () => toggleReleaseDescription(release.id), moreInfoLabel: t('more_info'), showCollapse: true }),
13519
+ ticketIndex >= 0 && getExtraFields(release.id, ticketIndex))));
13520
+ })));
13521
+ };
13522
+
13523
+ const TicketSelection = ({ event }) => {
13524
+ const { t } = useGlobal();
13317
13525
  const isMobile = useResponsive('down', 'md');
13318
13526
  const { setValue, watch } = useFormContext();
13319
13527
  const tickets = useWatch({
@@ -13344,11 +13552,11 @@ const TicketSelection = ({ event }) => {
13344
13552
  const countTickets = addedRelease?.quantity || 0;
13345
13553
  return (React.createElement(ReleaseExtraFields, { release: release, eventId: event.id, releaseIndex: index, quantity: countTickets }));
13346
13554
  };
13347
- const getAvailableTicketsForRelease = (release) => {
13348
- const selectedRelease = activeReleases?.find((item) => item.id === release.releaseId);
13349
- const availableQuantity = selectedRelease ? selectedRelease.availableTickets : 0;
13350
- return availableQuantity > 10 ? 10 : availableQuantity;
13351
- };
13555
+ // const getAvailableTicketsForRelease = (release: ITicketFormTicket): number => {
13556
+ // const selectedRelease = activeReleases?.find((item) => item.id === release.releaseId);
13557
+ // const availableQuantity = selectedRelease ? selectedRelease.availableTickets : 0;
13558
+ // return availableQuantity > 10 ? 10 : availableQuantity;
13559
+ // };
13352
13560
  const countReleaseCategories = () => {
13353
13561
  const grouped = groupBy(activeReleases || [], 'releaseCategoryName');
13354
13562
  return Object.keys(grouped).length;
@@ -13426,47 +13634,12 @@ const TicketSelection = ({ event }) => {
13426
13634
  }
13427
13635
  }
13428
13636
  };
13429
- return (React.createElement(Stack, { spacing: 3, direction: "column", divider: React.createElement(Divider, { sx: { borderStyle: 'dashed' } }) },
13430
- tickets.map((item, index) => (React.createElement(Box, { key: index },
13431
- React.createElement(Grid, { container: true, spacing: 3 },
13432
- React.createElement(Grid, { size: { xs: 12, md: 6 } }, showLoading ? (React.createElement(Skeleton, { variant: "rounded", sx: {
13433
- width: '100%',
13434
- height: (theme) => theme.spacing(7.5),
13435
- } })) : (React.createElement(RHFSelect, { name: `tickets.${event.id}.${index}.releaseId`, value: item.releaseId, label: index > 0
13436
- ? t('form.labels.add_another_release')
13437
- : t('form.labels.release_category_price'), maxHeight: "calc(100vh - 2rem)", onChange: (e) => {
13438
- setValue(`tickets.${event.id}.${index}.releaseId`, Number(e.target.value));
13439
- setValue(`tickets.${event.id}.${index}.extraFields`, []);
13440
- } },
13441
- React.createElement(MenuItem, { key: 0, value: "" }, t('choose')),
13442
- activeReleases?.map((activeRelease) => (React.createElement(MenuItem, { key: activeRelease.id, value: activeRelease.id, disabled: isReleaseSelected(activeRelease.id) ||
13443
- (activeRelease.locked &&
13444
- !soldOutReleaseCategoryNames.includes(activeRelease.releaseCategoryName)) },
13445
- activeRelease.releaseCategoryName,
13446
- " - ",
13447
- activeRelease.name,
13448
- ":",
13449
- ' ',
13450
- activeRelease.price === 0
13451
- ? t('free')
13452
- : fCurrency(activeRelease.price, lang, event.currency))))))),
13453
- React.createElement(Grid, { key: index, size: { xs: 12, md: 6 } }, showLoading ? (React.createElement(Skeleton, { variant: "rounded", sx: {
13454
- width: '100%',
13455
- height: (theme) => theme.spacing(7.5),
13456
- } })) : (React.createElement(Stack, { direction: "row", alignItems: "center", spacing: 1 },
13457
- React.createElement(RHFSelect, { name: `tickets.${event.id}.${index}.quantity`, value: item.quantity, label: t('form.labels.quantity') },
13458
- [...Array(getAvailableTicketsForRelease(item))].map((_, index2) => (React.createElement(MenuItem, { key: index2, value: index2 + 1, disabled: isQuantityDisabled(index2 + 1, item.releaseId) }, index2 + 1))),
13459
- !item.releaseId && (React.createElement(MenuItem, { disabled: true, sx: { textTransform: 'unset!important' } }, t('event.tickets.stepper.1.quantity_select')))),
13460
- item.releaseId && item.quantity && (React.createElement(Box, null,
13461
- React.createElement(IconButton, { color: "primary", onClick: () => removeTicket(index) },
13462
- React.createElement(Iconify, { icon: "carbon:trash-can" })))))))),
13463
- activeReleases && item.releaseId && (React.createElement(Typography, { variant: "caption", content: "div", mt: 2, mb: getRelease(item.releaseId)?.extraFields?.length ? 2 : 0, display: "block" }, getRelease(item.releaseId)?.description ?? '')),
13464
- getExtraFields(item.releaseId, index)))),
13637
+ return (React.createElement(Stack, { spacing: 3, direction: "column", divider: !isMobile ? React.createElement(Divider, { sx: { borderStyle: 'dashed' } }) : undefined },
13638
+ React.createElement(TicketSelectionMobile, { event: event, activeReleases: activeReleases, showLoading: showLoading, soldOutReleaseCategoryNames: soldOutReleaseCategoryNames, tickets: tickets, isQuantityDisabled: isQuantityDisabled, setValue: setValue, removeTicket: removeTicket, getExtraFields: getExtraFields }),
13465
13639
  React.createElement(Box, null,
13466
13640
  React.createElement(Typography, { variant: "caption", component: "div", fontStyle: "italic", mb: 2 },
13467
13641
  "*",
13468
- t('event.tickets.stepper.1.max_ticket_quantity')),
13469
- isMobile && React.createElement(FeeBox, { event: event, align: "right" }))));
13642
+ t('event.tickets.stepper.1.max_ticket_quantity')))));
13470
13643
  };
13471
13644
 
13472
13645
  function RHFDatePicker({ name, label, ...others }) {
@@ -13504,7 +13677,7 @@ function RHFPhone({ name, defaultCountry, helperText, ...other }) {
13504
13677
 
13505
13678
  const ContactPerson = ({ event }) => {
13506
13679
  const { t, content } = useGlobal();
13507
- return (React.createElement(Grid, { container: true, spacing: 3 },
13680
+ return (React.createElement(Grid, { container: true, spacing: { xs: 1, md: 2 } },
13508
13681
  React.createElement(Grid, { size: { xs: 12, md: 6 } },
13509
13682
  React.createElement(RHFTextField, { name: "firstName", label: t('form.labels.first_name') })),
13510
13683
  React.createElement(Grid, { size: { xs: 12, md: 6 } },
@@ -13540,15 +13713,24 @@ function useAllowedPaymentMethods(currency, eventId) {
13540
13713
  const OverviewCard = styled(Card)(({ theme, stickyHeaderTop }) => ({
13541
13714
  position: 'sticky',
13542
13715
  top: stickyHeaderTop,
13716
+ borderRadius: theme.spacing(2),
13717
+ [theme.breakpoints.down('sm')]: {
13718
+ borderRadius: theme.spacing(1),
13719
+ boxShadow: 'none',
13720
+ },
13543
13721
  }));
13544
13722
  const ShippingMethodItem = styled(Box, {
13545
- shouldForwardProp: (prop) => prop !== 'active',
13546
- })(({ theme, active }) => ({
13723
+ shouldForwardProp: (prop) => prop !== 'active' && prop !== 'hasError',
13724
+ })(({ theme, active, hasError }) => ({
13547
13725
  borderRadius: theme.spacing(1),
13548
- border: `1px solid ${active ? theme.palette.primary.main : theme.palette.grey.A200}`,
13726
+ border: `1px solid ${hasError
13727
+ ? theme.palette.error.main
13728
+ : active
13729
+ ? theme.palette.primary.main
13730
+ : theme.palette.grey.A200}`,
13549
13731
  marginTop: theme.spacing(1),
13550
13732
  width: '100%',
13551
- padding: `0 ${theme.spacing(2)}`,
13733
+ padding: `0 0 0 ${theme.spacing(2)}`,
13552
13734
  transitionDuration: '.3s',
13553
13735
  '& > .MuiFormControlLabel-root': {
13554
13736
  width: '100%',
@@ -33280,7 +33462,7 @@ const deepHas = (obj, p) => {
33280
33462
  let parent = propertyExprExports.getter(propertyExprExports.join(path), true)(obj);
33281
33463
  return !!(parent && last in parent);
33282
33464
  };
33283
- let isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';
33465
+ let isObject$2 = obj => Object.prototype.toString.call(obj) === '[object Object]';
33284
33466
  function unknown(ctx, value) {
33285
33467
  let known = Object.keys(ctx.fields);
33286
33468
  return Object.keys(value).filter(key => known.indexOf(key) === -1);
@@ -33294,7 +33476,7 @@ class ObjectSchema extends Schema {
33294
33476
  super({
33295
33477
  type: 'object',
33296
33478
  check(value) {
33297
- return isObject(value) || typeof value === 'function';
33479
+ return isObject$2(value) || typeof value === 'function';
33298
33480
  }
33299
33481
  });
33300
33482
  this.fields = Object.create(null);
@@ -33371,7 +33553,7 @@ class ObjectSchema extends Schema {
33371
33553
  options.__validating = true;
33372
33554
  options.originalValue = originalValue;
33373
33555
  super._validate(_value, options, panic, (objectErrors, value) => {
33374
- if (!recursive || !isObject(value)) {
33556
+ if (!recursive || !isObject$2(value)) {
33375
33557
  next(objectErrors, value);
33376
33558
  return;
33377
33559
  }
@@ -33786,34 +33968,40 @@ const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidi
33786
33968
 
33787
33969
  function o(o,n,s$1){return void 0===s$1&&(s$1={}),function(a,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===s$1.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&o$1({},c),{values:s$1.raw?Object.assign({},a):t,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:s((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,s=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,s?[].concat(s,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}}
33788
33970
 
33789
- const PaymentOverviewCheckbox = ({ checkboxName, label, value, modal }) => {
33971
+ const PaymentOverviewCheckbox = ({ checkboxName, label, value }) => {
33790
33972
  const { t } = useGlobal();
33791
- const [open, setOpen] = useState(false);
33792
- const handleOpen = (e) => {
33793
- e.preventDefault();
33794
- e.stopPropagation();
33795
- setOpen(true);
33796
- };
33797
- const handleClose = () => setOpen(false);
33973
+ const { control } = useFormContext();
33798
33974
  return (React.createElement(React.Fragment, null,
33799
- React.createElement(RHFCheckbox, { name: checkboxName, label: React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 1, sx: { width: '100%' } },
33800
- React.createElement(Typography, { variant: "caption", sx: { flex: 1 } }, label),
33801
- React.createElement(Stack, { alignItems: "flex-end" },
33802
- React.createElement(Typography, { variant: "caption", fontWeight: "600" }, value),
33803
- React.createElement(Link, { variant: "caption", onClick: handleOpen }, t('more_info')))), sx: {
33804
- width: 'calc(100% + 11px)',
33805
- mb: 0.5,
33806
- '& > .MuiTypography-root': {
33807
- width: '100%',
33808
- },
33809
- } }),
33810
- React.createElement(Dialog, { open: open, onClose: handleClose, maxWidth: "sm", fullWidth: true },
33811
- React.createElement(DialogTitle, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
33812
- modal.title,
33813
- React.createElement(IconButton, { onClick: handleClose, size: "small" },
33814
- React.createElement(Iconify, { icon: "carbon:close" }))),
33815
- React.createElement(DialogContent, null,
33816
- React.createElement(Typography, { variant: "body2" }, modal.description)))));
33975
+ React.createElement(Controller, { name: checkboxName, control: control, render: ({ field }) => (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", useFlexGap: true, spacing: 1, sx: { width: '100%', mb: 0.5 } },
33976
+ React.createElement(Typography, { variant: "body2", sx: { flex: 1 } }, label),
33977
+ React.createElement(Box, { sx: {
33978
+ position: 'relative',
33979
+ display: 'flex',
33980
+ alignItems: 'center',
33981
+ } },
33982
+ React.createElement(Typography, { variant: "body2", sx: {
33983
+ mr: field.value ? 0 : 1,
33984
+ ...(field.value
33985
+ ? {
33986
+ position: 'absolute',
33987
+ right: 0,
33988
+ }
33989
+ : {}),
33990
+ } }, value),
33991
+ React.createElement(Button, { variant: "outlined", color: "primary", size: "small", startIcon: React.createElement(Iconify, { icon: "carbon:add" }), onClick: (event) => {
33992
+ event.preventDefault();
33993
+ event.stopPropagation();
33994
+ field.onChange(true);
33995
+ }, sx: {
33996
+ borderRadius: 1,
33997
+ textTransform: 'none',
33998
+ px: 1,
33999
+ width: 96,
34000
+ minWidth: 96,
34001
+ color: 'text.primary',
34002
+ visibility: field.value ? 'hidden' : 'visible',
34003
+ pointerEvents: field.value ? 'none' : 'auto',
34004
+ }, tabIndex: field.value ? -1 : 0, "aria-hidden": field.value }, t('add'))))) })));
33817
34005
  };
33818
34006
 
33819
34007
  var location$1 = {};
@@ -33843,6 +34031,24 @@ const calculatePriceWithDiscount = (price, discountPercent = 0, fixedDiscount =
33843
34031
  return Math.ceil(finalPrice * 100) / 100;
33844
34032
  };
33845
34033
 
34034
+ const FeeBox = ({ event, align = 'left' }) => {
34035
+ const { t, lang } = useGlobal();
34036
+ const { watch } = useFormContext();
34037
+ const values = watch();
34038
+ const isRight = align === 'right';
34039
+ return (React.createElement(Box, { mb: 1, textAlign: isRight ? 'right' : undefined },
34040
+ values.promoCodes.length > 0 && (React.createElement(Stack, { direction: "row", justifyContent: isRight ? 'flex-end' : 'space-between', alignItems: "center", spacing: 1, sx: { color: (theme) => theme.palette.grey.A700 } },
34041
+ React.createElement(Typography, { variant: "caption", sx: { textAlign: 'right' } },
34042
+ t('form.labels.original_price'),
34043
+ ":"),
34044
+ React.createElement(Typography, { variant: "caption", sx: { textDecoration: 'line-through' } }, fCurrency(values.originalPrice, lang, event.currency)))),
34045
+ React.createElement(Stack, { direction: "row", justifyContent: isRight ? 'flex-end' : 'space-between', alignItems: "center", spacing: 1 },
34046
+ React.createElement(Typography, { variant: "subtitle1", sx: { textAlign: 'right' } },
34047
+ t('form.labels.total'),
34048
+ ":"),
34049
+ React.createElement(Typography, { variant: "subtitle1" }, fCurrency(values.total, lang, event.currency)))));
34050
+ };
34051
+
33846
34052
  var calendar = {};
33847
34053
 
33848
34054
  var hasRequiredCalendar;
@@ -33914,7 +34120,10 @@ function useDebounce(value, delay) {
33914
34120
  return debouncedValue;
33915
34121
  }
33916
34122
 
33917
- const PaymentOverviewBox = ({ event }) => {
34123
+ const EVENTLOOK_ORDER_FORM_CONTAINER_ID = 'eventlook-order-form-container';
34124
+ const EVENTLOOK_ORDER_FORM_ID = 'eventlook-order-form';
34125
+
34126
+ const PaymentOverviewBox = ({ event, withoutPadding, hideBuyButton }) => {
33918
34127
  const { t, lang, options } = useGlobal();
33919
34128
  const xs = useResponsive('only', 'xs');
33920
34129
  const md = useResponsive('only', 'md');
@@ -33923,7 +34132,7 @@ const PaymentOverviewBox = ({ event }) => {
33923
34132
  const [shippingFee, setShippingFee] = useState(0);
33924
34133
  const { setValue, watch } = useFormContext();
33925
34134
  const values = watch();
33926
- const { total, uuid, firstName, lastName, email, gender, birthdate, phone, promoCodes, shipping, totalFee, isPaymentVerify, ticketInsurance, ticketInsurancePricePerUnit, smsNotification, smsNotificationPrice, } = values;
34135
+ const { total, uuid, firstName, lastName, email, gender, birthdate, phone, promoCodes, shipping, totalFee, isPaymentVerify, ticketInsurance, smsNotification, smsNotificationPrice, ticketInsurancePricePerUnit, } = values;
33927
34136
  const tickets = useWatch({
33928
34137
  name: 'tickets',
33929
34138
  defaultValue: {},
@@ -34188,28 +34397,25 @@ const PaymentOverviewBox = ({ event }) => {
34188
34397
  console.error('Error calculating cart:', err);
34189
34398
  }
34190
34399
  }, []);
34191
- const removeProduct = (variant) => {
34192
- const { eventId, variantId } = variant;
34193
- const list = Array.isArray(products[eventId]) ? [...products[eventId]] : [];
34194
- const idx = list.findIndex((p) => Number(p.eventProductVariantId) === Number(variantId));
34195
- if (idx === -1)
34196
- return;
34197
- const item = list[idx];
34198
- if ((item.quantity ?? 0) <= 1) {
34199
- list.splice(idx, 1);
34200
- }
34201
- else {
34202
- list[idx] = { ...item, quantity: (item.quantity ?? 1) - 1 };
34203
- }
34204
- const next = { ...products, [eventId]: list };
34205
- if (list.length === 0) {
34206
- const { [eventId]: _removed, ...rest } = next;
34207
- setValue('products', rest);
34208
- }
34209
- else {
34210
- setValue('products', next);
34211
- }
34212
- };
34400
+ // const removeProduct = (variant: ISelectedProductVariant) => {
34401
+ // const { eventId, variantId } = variant;
34402
+ // const list = Array.isArray(products[eventId]) ? [...products[eventId]] : [];
34403
+ // const idx = list.findIndex((p) => Number(p.eventProductVariantId) === Number(variantId));
34404
+ // if (idx === -1) return;
34405
+ // const item = list[idx];
34406
+ // if ((item.quantity ?? 0) <= 1) {
34407
+ // list.splice(idx, 1);
34408
+ // } else {
34409
+ // list[idx] = { ...item, quantity: (item.quantity ?? 1) - 1 };
34410
+ // }
34411
+ // const next = { ...products, [eventId]: list };
34412
+ // if (list.length === 0) {
34413
+ // const { [eventId]: _removed, ...rest } = next;
34414
+ // setValue('products', rest);
34415
+ // } else {
34416
+ // setValue('products', next);
34417
+ // }
34418
+ // };
34213
34419
  return (React.createElement(OverviewCard, { id: "overview-card", stickyHeaderTop: options?.stickyHeaderTop || 0 },
34214
34420
  !isMobile && (React.createElement(Stack, { className: "overview-card__event-info", p: 2, spacing: 2 },
34215
34421
  React.createElement(Typography, { variant: "h6" }, event.name),
@@ -34221,7 +34427,7 @@ const PaymentOverviewBox = ({ event }) => {
34221
34427
  React.createElement(TextIconLabel, { icon: React.createElement(Iconify, { icon: locationIcon, sx: { mr: 0.5, mt: 0.5, width: 18, height: 18, minWidth: 18 } }), value: React.createElement(Box, null, getPlaceAsString(event.place)), sx: { typography: 'body3', color: 'text.secondary', alignItems: 'flex-start' } })))),
34222
34428
  React.createElement(Divider, { sx: { borderStyle: 'dashed' } }),
34223
34429
  React.createElement(Stack, { direction: { xs: 'column', sm: 'row', md: 'column', lg: 'row' }, spacing: 2, p: 2, divider: React.createElement(Divider, { orientation: xs || md ? 'horizontal' : 'vertical', flexItem: true, sx: { borderStyle: 'dashed' } }), sx: {
34224
- backgroundColor: (theme) => theme.palette.grey.A100,
34430
+ backgroundColor: (theme) => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900],
34225
34431
  borderRadius: 1,
34226
34432
  } },
34227
34433
  React.createElement(Box, { width: { sm: '50%', md: '100%', lg: '50%' } },
@@ -34230,67 +34436,50 @@ const PaymentOverviewBox = ({ event }) => {
34230
34436
  React.createElement(Box, { width: { sm: '50%', md: '100%', lg: '50%' } },
34231
34437
  React.createElement(TextIconLabel, { icon: React.createElement(Iconify, { icon: userIcon, sx: { minWidth: 20, height: 20, mr: 1 } }), value: t('form.labels.organizer'), sx: { color: 'text.secondary' } }),
34232
34438
  React.createElement(Typography, { variant: "body2", fontWeight: 700 }, event.company.displayName))))),
34233
- React.createElement(Stack, { className: "overview-card__order-info", p: 2, spacing: 1 },
34439
+ React.createElement(Stack, { className: "overview-card__order-info", sx: { p: { xs: withoutPadding ? 0 : 2, md: 2 } }, pt: { xs: 0, sm: 2 }, spacing: 0.75, useFlexGap: true },
34234
34440
  !!selectedTickets.length && !isMobile && React.createElement(Divider, { sx: { borderStyle: 'dashed' } }),
34441
+ !!selectedTickets.length && (React.createElement(Stack, { spacing: 0.5 },
34442
+ React.createElement(PaymentOverviewCheckbox, { checkboxName: "smsNotification", label: t('event.tickets.sms_notification.label'), value: React.createElement(React.Fragment, null,
34443
+ smsNotification && totalItemCount.totalTickets > 0 ? '' : '+ ',
34444
+ fCurrency(smsNotificationPrice, lang, event.currency)) }),
34445
+ React.createElement(Divider, { sx: { borderStyle: 'dashed' } }))),
34235
34446
  selectedTickets.map((ticket, index) => (React.createElement(Box, { key: index },
34236
34447
  React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34237
- React.createElement(Typography, { variant: "caption" },
34448
+ React.createElement(Typography, { variant: "body2" },
34238
34449
  ticket.quantity,
34239
34450
  "x ",
34240
34451
  ticket.itemName),
34241
- React.createElement(Typography, { variant: "caption" }, fCurrency(calculatePriceWithDiscount(ticket.price, promoCodesValues.percent, promoCodesValues.fixedDevidedTickets) * Number(ticket.quantity), lang, event.currency))),
34452
+ React.createElement(Typography, { variant: "body2" }, fCurrency(calculatePriceWithDiscount(ticket.price, promoCodesValues.percent, promoCodesValues.fixedDevidedTickets) * Number(ticket.quantity), lang, event.currency))),
34242
34453
  ticket.products.map((product, index2) => (React.createElement(Stack, { key: index2, direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34243
- React.createElement(Typography, { variant: "caption" },
34454
+ React.createElement(Typography, { variant: "body2" },
34244
34455
  "- ",
34245
34456
  product.quantity,
34246
34457
  "x ",
34247
34458
  product.name),
34248
- React.createElement(Typography, { variant: "caption" }, product.price > 0
34459
+ React.createElement(Typography, { variant: "body2" }, product.price > 0
34249
34460
  ? fCurrency(calculatePriceWithDiscount(product.price, promoCodesValues.productDiscountPercent, promoCodesValues.fixedDevidedProducts
34250
34461
  ? promoCodesValues.fixedDevidedProducts * product.quantity
34251
34462
  : 0), lang, event.currency)
34252
34463
  : t('free')))))))),
34253
34464
  selectedVariants.map((variant, index) => (React.createElement(Box, { key: index },
34254
34465
  React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34255
- React.createElement(Typography, { variant: "caption" },
34466
+ React.createElement(Typography, { variant: "body2" },
34256
34467
  variant.quantity,
34257
34468
  "x ",
34258
34469
  variant.name),
34259
- React.createElement(Stack, { direction: "row", spacing: 1, alignItems: "center" },
34260
- React.createElement(Typography, { variant: "caption" }, fCurrency(calculatePriceWithDiscount(variant.price, promoCodesValues.productDiscountPercent, promoCodesValues.fixedDevidedProducts
34261
- ? promoCodesValues.fixedDevidedProducts * variant.quantity
34262
- : 0), lang, event.currency)),
34263
- React.createElement(IconButton, { onClick: () => removeProduct(variant), color: "primary", size: "small" },
34264
- React.createElement(Iconify, { icon: "carbon:trash-can" }))))))),
34470
+ React.createElement(Typography, { variant: "body2" }, fCurrency(calculatePriceWithDiscount(variant.price, promoCodesValues.productDiscountPercent, promoCodesValues.fixedDevidedProducts
34471
+ ? promoCodesValues.fixedDevidedProducts * variant.quantity
34472
+ : 0), lang, event.currency)))))),
34265
34473
  !!shippingFee && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34266
- React.createElement(Typography, { variant: "caption" }, t('form.labels.shipping_fee')),
34267
- React.createElement(Typography, { variant: "caption" }, fCurrency(shippingFee, lang, event.currency)))),
34268
- ticketInsurance && totalItemCount.totalTickets > 0 && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34269
- React.createElement(Typography, { variant: "caption" }, t('form.labels.ticket_insurance')),
34270
- React.createElement(Typography, { variant: "caption" }, fCurrency(values.ticketInsurancePrice, lang, event.currency)))),
34271
- smsNotification && totalItemCount.totalTickets > 0 && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34272
- React.createElement(Typography, { variant: "caption" }, t('form.labels.sms_notification')),
34273
- React.createElement(Typography, { variant: "caption" }, fCurrency(values.smsNotificationPrice, lang, event.currency)))),
34474
+ React.createElement(Typography, { variant: "body2" }, t('form.labels.shipping_fee')),
34475
+ React.createElement(Typography, { variant: "body2" }, fCurrency(shippingFee, lang, event.currency)))),
34274
34476
  !!total && !!totalFee && (React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
34275
- React.createElement(Typography, { variant: "caption" }, t('form.labels.service_fee')),
34276
- React.createElement(Typography, { variant: "caption" }, getFee))),
34477
+ React.createElement(Typography, { variant: "body2" }, t('form.labels.service_fee')),
34478
+ React.createElement(Typography, { variant: "body2" }, getFee))),
34277
34479
  ((!!selectedTickets.length && isMobile) || !isMobile) && (React.createElement(Divider, { sx: { borderStyle: 'dashed' } })),
34278
- !!selectedTickets.length && (React.createElement(React.Fragment, null,
34279
- React.createElement(PaymentOverviewCheckbox, { checkboxName: "smsNotification", label: t('event.tickets.sms_notification.label'), value: React.createElement(React.Fragment, null,
34280
- "+ ",
34281
- fCurrency(smsNotificationPrice, lang, event.currency)), modal: {
34282
- title: t('event.tickets.sms_notification.label'),
34283
- description: (React.createElement(React.Fragment, null,
34284
- React.createElement(Typography, { variant: "body2", paragraph: true }, t('event.tickets.sms_notification.modal.description')),
34285
- React.createElement(Typography, { variant: "body2", sx: { fontWeight: 600 } },
34286
- t('event.tickets.sms_notification.modal.price'),
34287
- ":",
34288
- ' ',
34289
- fCurrency(smsNotificationPrice, lang, event.currency)))),
34290
- } }),
34291
- React.createElement(Divider, { sx: { borderStyle: 'dashed' } }))),
34292
- React.createElement(FeeBox, { event: event }),
34293
- React.createElement(Button, { type: "submit", variant: "contained", size: "large", fullWidth: true }, t(isPaymentVerify ? 'verify' : 'buy')))));
34480
+ !hideBuyButton && (React.createElement(React.Fragment, null,
34481
+ React.createElement(FeeBox, { event: event }),
34482
+ React.createElement(Button, { type: "submit", form: EVENTLOOK_ORDER_FORM_ID, variant: "contained", size: "large", fullWidth: true, sx: { height: { xs: 36, md: 40 } } }, t(isPaymentVerify ? 'verify' : 'buy')))))));
34294
34483
  };
34295
34484
 
34296
34485
  // ----------------------------------------------------------------------
@@ -34348,24 +34537,1776 @@ const ReleaseCountdown = ({ event, setShowReleaseDate }) => {
34348
34537
 
34349
34538
  const v="5.6.5";const fr=24;const ip=0;const op=74;const w=738;const h=100;const nm="bank transfer";const ddd=0;const assets=[];const layers=[{ddd:0,ind:1,ty:4,nm:"r bank Outlines",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[655.22,48.585,0],ix:2},a:{a:0,k:[40.949,41.396,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[38.126,30.072],[40.499,31.134],[40.499,38.773],[39.437,41.146],[-38.124,41.146],[-40.498,40.084],[-40.498,32.445],[-39.435,30.072]],o:[[39.437,30.072],[40.499,32.445],[40.499,40.084],[38.126,41.146],[-39.435,41.146],[-40.498,38.773],[-40.498,31.134],[-38.124,30.072]],v:[[38.126,30.072],[40.499,32.445],[40.499,38.773],[38.126,41.146],[-38.124,41.146],[-40.498,38.773],[-40.498,32.445],[-38.124,30.072]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[31.729,27.372],[22.238,27.372],[22.238,-2.628],[31.729,-2.628]],o:[[31.729,27.372],[22.238,27.372],[22.238,-2.628],[31.729,-2.628]],v:[[31.729,27.372],[22.238,27.372],[22.238,-2.628],[31.729,-2.628]],c:true},ix:2},nm:"Path 2",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[31.729,-2.628]],o:[[31.729,-2.628]],v:[[31.729,-2.628]],c:false},ix:2},nm:"Path 3",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:3,ty:"sh",ix:4,ks:{a:0,k:{i:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],o:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],v:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],c:true},ix:2},nm:"Path 4",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:4,ty:"sh",ix:5,ks:{a:0,k:{i:[[13.749,-2.628]],o:[[13.749,-2.628]],v:[[13.749,-2.628]],c:false},ix:2},nm:"Path 5",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:5,ty:"sh",ix:6,ks:{a:0,k:{i:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],o:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],v:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],c:true},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:6,ty:"sh",ix:7,ks:{a:0,k:{i:[[-4.233,-2.628]],o:[[-4.233,-2.628]],v:[[-4.233,-2.628]],c:false},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:7,ty:"sh",ix:8,ks:{a:0,k:{i:[[-22.215,27.372],[-31.707,27.372],[-31.707,-2.628],[-22.215,-2.628]],o:[[-22.215,27.372],[-31.707,27.372],[-31.707,-2.628],[-22.215,-2.628]],v:[[-22.215,27.372],[-31.707,27.372],[-31.707,-2.628],[-22.215,-2.628]],c:true},ix:2},nm:"Path 8",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:8,ty:"sh",ix:9,ks:{a:0,k:{i:[[-22.215,-2.628]],o:[[-22.215,-2.628]],v:[[-22.215,-2.628]],c:false},ix:2},nm:"Path 9",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:9,ty:"sh",ix:10,ks:{a:0,k:{i:[[34.872,-10.168],[34.872,-7.795],[33.81,-5.422],[-32.499,-5.422],[-34.871,-6.484],[-34.871,-10.168]],o:[[34.872,-10.168],[34.872,-6.484],[32.499,-5.422],[-33.81,-5.422],[-34.871,-7.795],[-34.871,-10.168]],v:[[34.872,-10.168],[34.872,-7.795],[32.499,-5.422],[-32.499,-5.422],[-34.871,-7.795],[-34.871,-10.168]],c:true},ix:2},nm:"Path 10",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:10,ty:"sh",ix:11,ks:{a:0,k:{i:[[-1.243,-40.676],[0.4810000000000001,-41.146],[39.371,-17.208],[40.69799999999999,-15.562],[39.188,-12.814],[-38.126,-12.814],[-40.120999999999995,-13.518999999999998],[-40.275000000000006,-16.651]],o:[[-0.4800000000000001,-41.146],[1.243,-40.676],[40.275000000000006,-16.651999999999997],[40.120999999999995,-13.518999999999998],[38.127,-12.814],[-39.187,-12.814],[-40.699,-15.562],[-39.371,-17.208]],v:[[-1.243,-40.676],[1.243,-40.676],[39.371,-17.208],[40.41,-14.54],[38.127,-12.814],[-38.126,-12.814],[-40.41,-14.54],[-39.371,-17.208]],c:true},ix:2},nm:"Path 11",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"mm",mm:1,nm:"Merge Paths 1",mn:"ADBE Vector Filter - Merge",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9804,0.3294,0.1098,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[40.948,41.396],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 1",np:13,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false,_render:true}],ip:0,op:108,st:0,bm:0,completed:true},{ddd:0,ind:2,ty:4,nm:"l bank Outlines",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[79.22,48.585,0],ix:2},a:{a:0,k:[40.949,41.396,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[38.126,30.072],[40.499,31.134],[40.499,38.773],[39.437,41.146],[-38.124,41.146],[-40.498,40.084],[-40.498,32.445],[-39.435,30.072]],o:[[39.437,30.072],[40.499,32.445],[40.499,40.084],[38.126,41.146],[-39.435,41.146],[-40.498,38.773],[-40.498,31.134],[-38.124,30.072]],v:[[38.126,30.072],[40.499,32.445],[40.499,38.773],[38.126,41.146],[-38.124,41.146],[-40.498,38.773],[-40.498,32.445],[-38.124,30.072]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[31.73,27.372],[22.239,27.372],[22.239,-2.628],[31.73,-2.628]],o:[[31.73,27.372],[22.239,27.372],[22.239,-2.628],[31.73,-2.628]],v:[[31.73,27.372],[22.239,27.372],[22.239,-2.628],[31.73,-2.628]],c:true},ix:2},nm:"Path 2",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[31.73,-2.628]],o:[[31.73,-2.628]],v:[[31.73,-2.628]],c:false},ix:2},nm:"Path 3",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:3,ty:"sh",ix:4,ks:{a:0,k:{i:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],o:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],v:[[13.749,27.372],[4.257,27.372],[4.257,-2.628],[13.749,-2.628]],c:true},ix:2},nm:"Path 4",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:4,ty:"sh",ix:5,ks:{a:0,k:{i:[[13.749,-2.628]],o:[[13.749,-2.628]],v:[[13.749,-2.628]],c:false},ix:2},nm:"Path 5",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:5,ty:"sh",ix:6,ks:{a:0,k:{i:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],o:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],v:[[-4.233,27.372],[-13.725,27.372],[-13.725,-2.628],[-4.233,-2.628]],c:true},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:6,ty:"sh",ix:7,ks:{a:0,k:{i:[[-4.233,-2.628]],o:[[-4.233,-2.628]],v:[[-4.233,-2.628]],c:false},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:7,ty:"sh",ix:8,ks:{a:0,k:{i:[[-22.216,27.372],[-31.708,27.372],[-31.708,-2.628],[-22.216,-2.628]],o:[[-22.216,27.372],[-31.708,27.372],[-31.708,-2.628],[-22.216,-2.628]],v:[[-22.216,27.372],[-31.708,27.372],[-31.708,-2.628],[-22.216,-2.628]],c:true},ix:2},nm:"Path 8",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:8,ty:"sh",ix:9,ks:{a:0,k:{i:[[-22.216,-2.628]],o:[[-22.216,-2.628]],v:[[-22.216,-2.628]],c:false},ix:2},nm:"Path 9",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:9,ty:"sh",ix:10,ks:{a:0,k:{i:[[34.872,-10.168],[34.872,-7.795],[33.809000000000005,-5.422],[-32.499,-5.422],[-34.871,-6.484],[-34.871,-10.168]],o:[[34.872,-10.168],[34.872,-6.484],[32.499,-5.422],[-33.809000000000005,-5.422],[-34.871,-7.795],[-34.871,-10.168]],v:[[34.872,-10.168],[34.872,-7.795],[32.499,-5.422],[-32.499,-5.422],[-34.871,-7.795],[-34.871,-10.168]],c:true},ix:2},nm:"Path 10",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ind:10,ty:"sh",ix:11,ks:{a:0,k:{i:[[-1.244,-40.676],[0.481,-41.146],[39.371,-17.208],[40.699,-15.562],[39.188,-12.814],[-38.127,-12.814],[-40.120999999999995,-13.518999999999998],[-40.275000000000006,-16.651]],o:[[-0.481,-41.146],[1.244,-40.676],[40.275000000000006,-16.651999999999997],[40.120999999999995,-13.518999999999998],[38.127,-12.814],[-39.188,-12.814],[-40.699,-15.562],[-39.371,-17.208]],v:[[-1.244,-40.676],[1.244,-40.676],[39.371,-17.208],[40.41,-14.54],[38.127,-12.814],[-38.127,-12.814],[-40.41,-14.54],[-39.371,-17.208]],c:true},ix:2},nm:"Path 11",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"mm",mm:1,nm:"Merge Paths 1",mn:"ADBE Vector Filter - Merge",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9804,0.3294,0.1098,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[40.949,41.396],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 1",np:13,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false,_render:true}],ip:0,op:108,st:0,bm:0,completed:true},{ddd:0,ind:3,ty:4,nm:"lines Outlines 2",td:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[367.221,50.457,0],ix:2},a:{a:0,k:[205.75,3.25,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[400.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[370.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 2",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[340.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 3",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[310.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 4",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[280.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 5",np:2,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[250.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 6",np:2,cix:2,bm:0,ix:6,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[220.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 7",np:2,cix:2,bm:0,ix:7,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[190.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 8",np:2,cix:2,bm:0,ix:8,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[160.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 9",np:2,cix:2,bm:0,ix:9,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[130.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 10",np:2,cix:2,bm:0,ix:10,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[100.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 11",np:2,cix:2,bm:0,ix:11,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[70.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 12",np:2,cix:2,bm:0,ix:12,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[40.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 13",np:2,cix:2,bm:0,ix:13,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[10.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 14",np:2,cix:2,bm:0,ix:14,mn:"ADBE Vector Group",hd:false,_render:true}],ip:0,op:108,st:0,bm:0,completed:true},{ddd:0,ind:4,ty:4,nm:"Shape Layer 1",tt:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{s:true,x:{a:1,k:[{i:{x:[0.34],y:[1]},o:{x:[0.26],y:[0]},t:0,s:[141.465]},{i:{x:[0.34],y:[1]},o:{x:[0.26],y:[0]},t:36,s:[683.465]},{i:{x:[0.34],y:[1]},o:{x:[0.26],y:[0]},t:37,s:[141.465]},{t:73,s:[683.465]}],ix:3},y:{a:0,k:48.4,ix:4}},a:{a:0,k:[-125.535,-3.6,0],ix:1},s:{a:0,k:[14.105,39.614,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[190.93,82.801],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:0,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9753,0.7274,0.6447,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[-765.035,-3.6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[110.538,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Rectangle 4",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[190.93,82.801],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:0,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:false,_render:true},{ty:"fl",c:{a:0,k:[1,0.265,0.02,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[-550.035,-3.6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[114.837,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Rectangle 3",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[190.93,82.801],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:0,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:false,_render:true},{ty:"fl",c:{a:0,k:[1,0.25,0,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[-335.535,-3.6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[110.435,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Rectangle 2",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[190.93,82.801],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:0,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9804,0.3294,0.1098,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[-125.535,-3.6],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[113.221,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Rectangle 1",np:3,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:false,_render:true}],ip:0,op:108,st:0,bm:0,completed:true},{ddd:0,ind:5,ty:4,nm:"lines Outlines",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[367.221,50.457,0],ix:2},a:{a:0,k:[205.75,3.25,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[400.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[370.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 2",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[340.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 3",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[310.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 4",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[280.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 5",np:2,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.156,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.156,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[250.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 6",np:2,cix:2,bm:0,ix:6,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[220.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 7",np:2,cix:2,bm:0,ix:7,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[190.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 8",np:2,cix:2,bm:0,ix:8,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[160.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 9",np:2,cix:2,bm:0,ix:9,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[130.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 10",np:2,cix:2,bm:0,ix:10,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[100.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 11",np:2,cix:2,bm:0,ix:11,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[70.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 12",np:2,cix:2,bm:0,ix:12,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[40.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 13",np:2,cix:2,bm:0,ix:13,mn:"ADBE Vector Group",hd:false,_render:true},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-9.157,-3],[7.5,-3],[10.5,-1.657],[9.157,3],[-7.5,3],[-10.5,1.656]],o:[[-7.5,-3],[9.157,-3],[10.5,1.656],[7.5,3],[-9.157,3],[-10.5,-1.657]],v:[[-7.5,-3],[7.5,-3],[10.5,0],[7.5,3],[-7.5,3],[-10.5,0]],c:true},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:false,_render:true},{ty:"fl",c:{a:0,k:[0.9961,0.807,0.7439,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:false,_render:true},{ty:"tr",p:{a:0,k:[10.75,3.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform",_render:true}],nm:"Group 14",np:2,cix:2,bm:0,ix:14,mn:"ADBE Vector Group",hd:false,_render:true}],ip:0,op:108,st:0,bm:0,completed:true}];const markers=[];const __complete=true;var bankTransferAnimation = {v:v,fr:fr,ip:ip,op:op,w:w,h:h,nm:nm,ddd:ddd,assets:assets,layers:layers,markers:markers,__complete:__complete};
34350
34539
 
34351
- const Lottie = lazy(() => import('./index.umd-Dn0hjh7E.js').then(function (n) { return n.i; }));
34540
+ lazy(() => import('./index.umd-ewNTELOK.js').then(function (n) { return n.i; }));
34352
34541
  const PaymentPending = () => {
34353
34542
  const { t } = useGlobal();
34543
+ const [LottieComponent, setLottieComponent] = useState(null);
34544
+ useEffect(() => {
34545
+ if (typeof window === 'undefined')
34546
+ return;
34547
+ let isMounted = true;
34548
+ import('./index.umd-ewNTELOK.js').then(function (n) { return n.i; }).then((module) => {
34549
+ if (isMounted) {
34550
+ setLottieComponent(() => module.default);
34551
+ }
34552
+ });
34553
+ return () => {
34554
+ isMounted = false;
34555
+ };
34556
+ }, []);
34354
34557
  return (React.createElement(Box, { textAlign: "center" },
34355
34558
  React.createElement(m.div, { variants: varBounce().in },
34356
34559
  React.createElement(Typography, { variant: "h4", sx: { mb: 2, maxWidth: 600, mx: 'auto' } }, t('event.tickets.payment_pending'))),
34357
- React.createElement(Box, { maxWidth: 600, mx: "auto" },
34358
- React.createElement(Suspense, { fallback: null },
34359
- React.createElement(Lottie, { animationData: bankTransferAnimation })))));
34560
+ React.createElement(Box, { maxWidth: 600, mx: "auto" }, LottieComponent ? React.createElement(LottieComponent, { animationData: bankTransferAnimation }) : null)));
34561
+ };
34562
+
34563
+ const CustomSkeleton = ({ sx, ...other }) => (React.createElement(Skeleton, { ...other, sx: {
34564
+ transform: 'none',
34565
+ borderRadius: 1,
34566
+ ...sx,
34567
+ } }));
34568
+
34569
+ function isObject$1(subject) {
34570
+ return Object.prototype.toString.call(subject) === '[object Object]';
34571
+ }
34572
+ function isRecord(subject) {
34573
+ return isObject$1(subject) || Array.isArray(subject);
34574
+ }
34575
+ function canUseDOM() {
34576
+ return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
34577
+ }
34578
+ function areOptionsEqual(optionsA, optionsB) {
34579
+ const optionsAKeys = Object.keys(optionsA);
34580
+ const optionsBKeys = Object.keys(optionsB);
34581
+ if (optionsAKeys.length !== optionsBKeys.length) return false;
34582
+ const breakpointsA = JSON.stringify(Object.keys(optionsA.breakpoints || {}));
34583
+ const breakpointsB = JSON.stringify(Object.keys(optionsB.breakpoints || {}));
34584
+ if (breakpointsA !== breakpointsB) return false;
34585
+ return optionsAKeys.every(key => {
34586
+ const valueA = optionsA[key];
34587
+ const valueB = optionsB[key];
34588
+ if (typeof valueA === 'function') return `${valueA}` === `${valueB}`;
34589
+ if (!isRecord(valueA) || !isRecord(valueB)) return valueA === valueB;
34590
+ return areOptionsEqual(valueA, valueB);
34591
+ });
34592
+ }
34593
+ function sortAndMapPluginToOptions(plugins) {
34594
+ return plugins.concat().sort((a, b) => a.name > b.name ? 1 : -1).map(plugin => plugin.options);
34595
+ }
34596
+ function arePluginsEqual(pluginsA, pluginsB) {
34597
+ if (pluginsA.length !== pluginsB.length) return false;
34598
+ const optionsA = sortAndMapPluginToOptions(pluginsA);
34599
+ const optionsB = sortAndMapPluginToOptions(pluginsB);
34600
+ return optionsA.every((optionA, index) => {
34601
+ const optionB = optionsB[index];
34602
+ return areOptionsEqual(optionA, optionB);
34603
+ });
34604
+ }
34605
+
34606
+ function isNumber(subject) {
34607
+ return typeof subject === 'number';
34608
+ }
34609
+ function isString(subject) {
34610
+ return typeof subject === 'string';
34611
+ }
34612
+ function isBoolean(subject) {
34613
+ return typeof subject === 'boolean';
34614
+ }
34615
+ function isObject(subject) {
34616
+ return Object.prototype.toString.call(subject) === '[object Object]';
34617
+ }
34618
+ function mathAbs(n) {
34619
+ return Math.abs(n);
34620
+ }
34621
+ function mathSign(n) {
34622
+ return Math.sign(n);
34623
+ }
34624
+ function deltaAbs(valueB, valueA) {
34625
+ return mathAbs(valueB - valueA);
34626
+ }
34627
+ function factorAbs(valueB, valueA) {
34628
+ if (valueB === 0 || valueA === 0) return 0;
34629
+ if (mathAbs(valueB) <= mathAbs(valueA)) return 0;
34630
+ const diff = deltaAbs(mathAbs(valueB), mathAbs(valueA));
34631
+ return mathAbs(diff / valueB);
34632
+ }
34633
+ function roundToTwoDecimals(num) {
34634
+ return Math.round(num * 100) / 100;
34635
+ }
34636
+ function arrayKeys(array) {
34637
+ return objectKeys(array).map(Number);
34638
+ }
34639
+ function arrayLast(array) {
34640
+ return array[arrayLastIndex(array)];
34641
+ }
34642
+ function arrayLastIndex(array) {
34643
+ return Math.max(0, array.length - 1);
34644
+ }
34645
+ function arrayIsLastIndex(array, index) {
34646
+ return index === arrayLastIndex(array);
34647
+ }
34648
+ function arrayFromNumber(n, startAt = 0) {
34649
+ return Array.from(Array(n), (_, i) => startAt + i);
34650
+ }
34651
+ function objectKeys(object) {
34652
+ return Object.keys(object);
34653
+ }
34654
+ function objectsMergeDeep(objectA, objectB) {
34655
+ return [objectA, objectB].reduce((mergedObjects, currentObject) => {
34656
+ objectKeys(currentObject).forEach(key => {
34657
+ const valueA = mergedObjects[key];
34658
+ const valueB = currentObject[key];
34659
+ const areObjects = isObject(valueA) && isObject(valueB);
34660
+ mergedObjects[key] = areObjects ? objectsMergeDeep(valueA, valueB) : valueB;
34661
+ });
34662
+ return mergedObjects;
34663
+ }, {});
34664
+ }
34665
+ function isMouseEvent(evt, ownerWindow) {
34666
+ return typeof ownerWindow.MouseEvent !== 'undefined' && evt instanceof ownerWindow.MouseEvent;
34667
+ }
34668
+
34669
+ function Alignment(align, viewSize) {
34670
+ const predefined = {
34671
+ start,
34672
+ center,
34673
+ end
34674
+ };
34675
+ function start() {
34676
+ return 0;
34677
+ }
34678
+ function center(n) {
34679
+ return end(n) / 2;
34680
+ }
34681
+ function end(n) {
34682
+ return viewSize - n;
34683
+ }
34684
+ function measure(n, index) {
34685
+ if (isString(align)) return predefined[align](n);
34686
+ return align(viewSize, n, index);
34687
+ }
34688
+ const self = {
34689
+ measure
34690
+ };
34691
+ return self;
34692
+ }
34693
+
34694
+ function EventStore() {
34695
+ let listeners = [];
34696
+ function add(node, type, handler, options = {
34697
+ passive: true
34698
+ }) {
34699
+ let removeListener;
34700
+ if ('addEventListener' in node) {
34701
+ node.addEventListener(type, handler, options);
34702
+ removeListener = () => node.removeEventListener(type, handler, options);
34703
+ } else {
34704
+ const legacyMediaQueryList = node;
34705
+ legacyMediaQueryList.addListener(handler);
34706
+ removeListener = () => legacyMediaQueryList.removeListener(handler);
34707
+ }
34708
+ listeners.push(removeListener);
34709
+ return self;
34710
+ }
34711
+ function clear() {
34712
+ listeners = listeners.filter(remove => remove());
34713
+ }
34714
+ const self = {
34715
+ add,
34716
+ clear
34717
+ };
34718
+ return self;
34719
+ }
34720
+
34721
+ function Animations(ownerDocument, ownerWindow, update, render) {
34722
+ const documentVisibleHandler = EventStore();
34723
+ const fixedTimeStep = 1000 / 60;
34724
+ let lastTimeStamp = null;
34725
+ let accumulatedTime = 0;
34726
+ let animationId = 0;
34727
+ function init() {
34728
+ documentVisibleHandler.add(ownerDocument, 'visibilitychange', () => {
34729
+ if (ownerDocument.hidden) reset();
34730
+ });
34731
+ }
34732
+ function destroy() {
34733
+ stop();
34734
+ documentVisibleHandler.clear();
34735
+ }
34736
+ function animate(timeStamp) {
34737
+ if (!animationId) return;
34738
+ if (!lastTimeStamp) {
34739
+ lastTimeStamp = timeStamp;
34740
+ update();
34741
+ update();
34742
+ }
34743
+ const timeElapsed = timeStamp - lastTimeStamp;
34744
+ lastTimeStamp = timeStamp;
34745
+ accumulatedTime += timeElapsed;
34746
+ while (accumulatedTime >= fixedTimeStep) {
34747
+ update();
34748
+ accumulatedTime -= fixedTimeStep;
34749
+ }
34750
+ const alpha = accumulatedTime / fixedTimeStep;
34751
+ render(alpha);
34752
+ if (animationId) {
34753
+ animationId = ownerWindow.requestAnimationFrame(animate);
34754
+ }
34755
+ }
34756
+ function start() {
34757
+ if (animationId) return;
34758
+ animationId = ownerWindow.requestAnimationFrame(animate);
34759
+ }
34760
+ function stop() {
34761
+ ownerWindow.cancelAnimationFrame(animationId);
34762
+ lastTimeStamp = null;
34763
+ accumulatedTime = 0;
34764
+ animationId = 0;
34765
+ }
34766
+ function reset() {
34767
+ lastTimeStamp = null;
34768
+ accumulatedTime = 0;
34769
+ }
34770
+ const self = {
34771
+ init,
34772
+ destroy,
34773
+ start,
34774
+ stop,
34775
+ update,
34776
+ render
34777
+ };
34778
+ return self;
34779
+ }
34780
+
34781
+ function Axis(axis, contentDirection) {
34782
+ const isRightToLeft = contentDirection === 'rtl';
34783
+ const isVertical = axis === 'y';
34784
+ const scroll = isVertical ? 'y' : 'x';
34785
+ const cross = isVertical ? 'x' : 'y';
34786
+ const sign = !isVertical && isRightToLeft ? -1 : 1;
34787
+ const startEdge = getStartEdge();
34788
+ const endEdge = getEndEdge();
34789
+ function measureSize(nodeRect) {
34790
+ const {
34791
+ height,
34792
+ width
34793
+ } = nodeRect;
34794
+ return isVertical ? height : width;
34795
+ }
34796
+ function getStartEdge() {
34797
+ if (isVertical) return 'top';
34798
+ return isRightToLeft ? 'right' : 'left';
34799
+ }
34800
+ function getEndEdge() {
34801
+ if (isVertical) return 'bottom';
34802
+ return isRightToLeft ? 'left' : 'right';
34803
+ }
34804
+ function direction(n) {
34805
+ return n * sign;
34806
+ }
34807
+ const self = {
34808
+ scroll,
34809
+ cross,
34810
+ startEdge,
34811
+ endEdge,
34812
+ measureSize,
34813
+ direction
34814
+ };
34815
+ return self;
34816
+ }
34817
+
34818
+ function Limit(min = 0, max = 0) {
34819
+ const length = mathAbs(min - max);
34820
+ function reachedMin(n) {
34821
+ return n < min;
34822
+ }
34823
+ function reachedMax(n) {
34824
+ return n > max;
34825
+ }
34826
+ function reachedAny(n) {
34827
+ return reachedMin(n) || reachedMax(n);
34828
+ }
34829
+ function constrain(n) {
34830
+ if (!reachedAny(n)) return n;
34831
+ return reachedMin(n) ? min : max;
34832
+ }
34833
+ function removeOffset(n) {
34834
+ if (!length) return n;
34835
+ return n - length * Math.ceil((n - max) / length);
34836
+ }
34837
+ const self = {
34838
+ length,
34839
+ max,
34840
+ min,
34841
+ constrain,
34842
+ reachedAny,
34843
+ reachedMax,
34844
+ reachedMin,
34845
+ removeOffset
34846
+ };
34847
+ return self;
34848
+ }
34849
+
34850
+ function Counter(max, start, loop) {
34851
+ const {
34852
+ constrain
34853
+ } = Limit(0, max);
34854
+ const loopEnd = max + 1;
34855
+ let counter = withinLimit(start);
34856
+ function withinLimit(n) {
34857
+ return !loop ? constrain(n) : mathAbs((loopEnd + n) % loopEnd);
34858
+ }
34859
+ function get() {
34860
+ return counter;
34861
+ }
34862
+ function set(n) {
34863
+ counter = withinLimit(n);
34864
+ return self;
34865
+ }
34866
+ function add(n) {
34867
+ return clone().set(get() + n);
34868
+ }
34869
+ function clone() {
34870
+ return Counter(max, get(), loop);
34871
+ }
34872
+ const self = {
34873
+ get,
34874
+ set,
34875
+ add,
34876
+ clone
34877
+ };
34878
+ return self;
34879
+ }
34880
+
34881
+ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
34882
+ const {
34883
+ cross: crossAxis,
34884
+ direction
34885
+ } = axis;
34886
+ const focusNodes = ['INPUT', 'SELECT', 'TEXTAREA'];
34887
+ const nonPassiveEvent = {
34888
+ passive: false
34889
+ };
34890
+ const initEvents = EventStore();
34891
+ const dragEvents = EventStore();
34892
+ const goToNextThreshold = Limit(50, 225).constrain(percentOfView.measure(20));
34893
+ const snapForceBoost = {
34894
+ mouse: 300,
34895
+ touch: 400
34896
+ };
34897
+ const freeForceBoost = {
34898
+ mouse: 500,
34899
+ touch: 600
34900
+ };
34901
+ const baseSpeed = dragFree ? 43 : 25;
34902
+ let isMoving = false;
34903
+ let startScroll = 0;
34904
+ let startCross = 0;
34905
+ let pointerIsDown = false;
34906
+ let preventScroll = false;
34907
+ let preventClick = false;
34908
+ let isMouse = false;
34909
+ function init(emblaApi) {
34910
+ if (!watchDrag) return;
34911
+ function downIfAllowed(evt) {
34912
+ if (isBoolean(watchDrag) || watchDrag(emblaApi, evt)) down(evt);
34913
+ }
34914
+ const node = rootNode;
34915
+ initEvents.add(node, 'dragstart', evt => evt.preventDefault(), nonPassiveEvent).add(node, 'touchmove', () => undefined, nonPassiveEvent).add(node, 'touchend', () => undefined).add(node, 'touchstart', downIfAllowed).add(node, 'mousedown', downIfAllowed).add(node, 'touchcancel', up).add(node, 'contextmenu', up).add(node, 'click', click, true);
34916
+ }
34917
+ function destroy() {
34918
+ initEvents.clear();
34919
+ dragEvents.clear();
34920
+ }
34921
+ function addDragEvents() {
34922
+ const node = isMouse ? ownerDocument : rootNode;
34923
+ dragEvents.add(node, 'touchmove', move, nonPassiveEvent).add(node, 'touchend', up).add(node, 'mousemove', move, nonPassiveEvent).add(node, 'mouseup', up);
34924
+ }
34925
+ function isFocusNode(node) {
34926
+ const nodeName = node.nodeName || '';
34927
+ return focusNodes.includes(nodeName);
34928
+ }
34929
+ function forceBoost() {
34930
+ const boost = dragFree ? freeForceBoost : snapForceBoost;
34931
+ const type = isMouse ? 'mouse' : 'touch';
34932
+ return boost[type];
34933
+ }
34934
+ function allowedForce(force, targetChanged) {
34935
+ const next = index.add(mathSign(force) * -1);
34936
+ const baseForce = scrollTarget.byDistance(force, !dragFree).distance;
34937
+ if (dragFree || mathAbs(force) < goToNextThreshold) return baseForce;
34938
+ if (skipSnaps && targetChanged) return baseForce * 0.5;
34939
+ return scrollTarget.byIndex(next.get(), 0).distance;
34940
+ }
34941
+ function down(evt) {
34942
+ const isMouseEvt = isMouseEvent(evt, ownerWindow);
34943
+ isMouse = isMouseEvt;
34944
+ preventClick = dragFree && isMouseEvt && !evt.buttons && isMoving;
34945
+ isMoving = deltaAbs(target.get(), location.get()) >= 2;
34946
+ if (isMouseEvt && evt.button !== 0) return;
34947
+ if (isFocusNode(evt.target)) return;
34948
+ pointerIsDown = true;
34949
+ dragTracker.pointerDown(evt);
34950
+ scrollBody.useFriction(0).useDuration(0);
34951
+ target.set(location);
34952
+ addDragEvents();
34953
+ startScroll = dragTracker.readPoint(evt);
34954
+ startCross = dragTracker.readPoint(evt, crossAxis);
34955
+ eventHandler.emit('pointerDown');
34956
+ }
34957
+ function move(evt) {
34958
+ const isTouchEvt = !isMouseEvent(evt, ownerWindow);
34959
+ if (isTouchEvt && evt.touches.length >= 2) return up(evt);
34960
+ const lastScroll = dragTracker.readPoint(evt);
34961
+ const lastCross = dragTracker.readPoint(evt, crossAxis);
34962
+ const diffScroll = deltaAbs(lastScroll, startScroll);
34963
+ const diffCross = deltaAbs(lastCross, startCross);
34964
+ if (!preventScroll && !isMouse) {
34965
+ if (!evt.cancelable) return up(evt);
34966
+ preventScroll = diffScroll > diffCross;
34967
+ if (!preventScroll) return up(evt);
34968
+ }
34969
+ const diff = dragTracker.pointerMove(evt);
34970
+ if (diffScroll > dragThreshold) preventClick = true;
34971
+ scrollBody.useFriction(0.3).useDuration(0.75);
34972
+ animation.start();
34973
+ target.add(direction(diff));
34974
+ evt.preventDefault();
34975
+ }
34976
+ function up(evt) {
34977
+ const currentLocation = scrollTarget.byDistance(0, false);
34978
+ const targetChanged = currentLocation.index !== index.get();
34979
+ const rawForce = dragTracker.pointerUp(evt) * forceBoost();
34980
+ const force = allowedForce(direction(rawForce), targetChanged);
34981
+ const forceFactor = factorAbs(rawForce, force);
34982
+ const speed = baseSpeed - 10 * forceFactor;
34983
+ const friction = baseFriction + forceFactor / 50;
34984
+ preventScroll = false;
34985
+ pointerIsDown = false;
34986
+ dragEvents.clear();
34987
+ scrollBody.useDuration(speed).useFriction(friction);
34988
+ scrollTo.distance(force, !dragFree);
34989
+ isMouse = false;
34990
+ eventHandler.emit('pointerUp');
34991
+ }
34992
+ function click(evt) {
34993
+ if (preventClick) {
34994
+ evt.stopPropagation();
34995
+ evt.preventDefault();
34996
+ preventClick = false;
34997
+ }
34998
+ }
34999
+ function pointerDown() {
35000
+ return pointerIsDown;
35001
+ }
35002
+ const self = {
35003
+ init,
35004
+ destroy,
35005
+ pointerDown
35006
+ };
35007
+ return self;
35008
+ }
35009
+
35010
+ function DragTracker(axis, ownerWindow) {
35011
+ const logInterval = 170;
35012
+ let startEvent;
35013
+ let lastEvent;
35014
+ function readTime(evt) {
35015
+ return evt.timeStamp;
35016
+ }
35017
+ function readPoint(evt, evtAxis) {
35018
+ const property = evtAxis || axis.scroll;
35019
+ const coord = `client${property === 'x' ? 'X' : 'Y'}`;
35020
+ return (isMouseEvent(evt, ownerWindow) ? evt : evt.touches[0])[coord];
35021
+ }
35022
+ function pointerDown(evt) {
35023
+ startEvent = evt;
35024
+ lastEvent = evt;
35025
+ return readPoint(evt);
35026
+ }
35027
+ function pointerMove(evt) {
35028
+ const diff = readPoint(evt) - readPoint(lastEvent);
35029
+ const expired = readTime(evt) - readTime(startEvent) > logInterval;
35030
+ lastEvent = evt;
35031
+ if (expired) startEvent = evt;
35032
+ return diff;
35033
+ }
35034
+ function pointerUp(evt) {
35035
+ if (!startEvent || !lastEvent) return 0;
35036
+ const diffDrag = readPoint(lastEvent) - readPoint(startEvent);
35037
+ const diffTime = readTime(evt) - readTime(startEvent);
35038
+ const expired = readTime(evt) - readTime(lastEvent) > logInterval;
35039
+ const force = diffDrag / diffTime;
35040
+ const isFlick = diffTime && !expired && mathAbs(force) > 0.1;
35041
+ return isFlick ? force : 0;
35042
+ }
35043
+ const self = {
35044
+ pointerDown,
35045
+ pointerMove,
35046
+ pointerUp,
35047
+ readPoint
35048
+ };
35049
+ return self;
35050
+ }
35051
+
35052
+ function NodeRects() {
35053
+ function measure(node) {
35054
+ const {
35055
+ offsetTop,
35056
+ offsetLeft,
35057
+ offsetWidth,
35058
+ offsetHeight
35059
+ } = node;
35060
+ const offset = {
35061
+ top: offsetTop,
35062
+ right: offsetLeft + offsetWidth,
35063
+ bottom: offsetTop + offsetHeight,
35064
+ left: offsetLeft,
35065
+ width: offsetWidth,
35066
+ height: offsetHeight
35067
+ };
35068
+ return offset;
35069
+ }
35070
+ const self = {
35071
+ measure
35072
+ };
35073
+ return self;
35074
+ }
35075
+
35076
+ function PercentOfView(viewSize) {
35077
+ function measure(n) {
35078
+ return viewSize * (n / 100);
35079
+ }
35080
+ const self = {
35081
+ measure
35082
+ };
35083
+ return self;
35084
+ }
35085
+
35086
+ function ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects) {
35087
+ const observeNodes = [container].concat(slides);
35088
+ let resizeObserver;
35089
+ let containerSize;
35090
+ let slideSizes = [];
35091
+ let destroyed = false;
35092
+ function readSize(node) {
35093
+ return axis.measureSize(nodeRects.measure(node));
35094
+ }
35095
+ function init(emblaApi) {
35096
+ if (!watchResize) return;
35097
+ containerSize = readSize(container);
35098
+ slideSizes = slides.map(readSize);
35099
+ function defaultCallback(entries) {
35100
+ for (const entry of entries) {
35101
+ if (destroyed) return;
35102
+ const isContainer = entry.target === container;
35103
+ const slideIndex = slides.indexOf(entry.target);
35104
+ const lastSize = isContainer ? containerSize : slideSizes[slideIndex];
35105
+ const newSize = readSize(isContainer ? container : slides[slideIndex]);
35106
+ const diffSize = mathAbs(newSize - lastSize);
35107
+ if (diffSize >= 0.5) {
35108
+ emblaApi.reInit();
35109
+ eventHandler.emit('resize');
35110
+ break;
35111
+ }
35112
+ }
35113
+ }
35114
+ resizeObserver = new ResizeObserver(entries => {
35115
+ if (isBoolean(watchResize) || watchResize(emblaApi, entries)) {
35116
+ defaultCallback(entries);
35117
+ }
35118
+ });
35119
+ ownerWindow.requestAnimationFrame(() => {
35120
+ observeNodes.forEach(node => resizeObserver.observe(node));
35121
+ });
35122
+ }
35123
+ function destroy() {
35124
+ destroyed = true;
35125
+ if (resizeObserver) resizeObserver.disconnect();
35126
+ }
35127
+ const self = {
35128
+ init,
35129
+ destroy
35130
+ };
35131
+ return self;
35132
+ }
35133
+
35134
+ function ScrollBody(location, offsetLocation, previousLocation, target, baseDuration, baseFriction) {
35135
+ let scrollVelocity = 0;
35136
+ let scrollDirection = 0;
35137
+ let scrollDuration = baseDuration;
35138
+ let scrollFriction = baseFriction;
35139
+ let rawLocation = location.get();
35140
+ let rawLocationPrevious = 0;
35141
+ function seek() {
35142
+ const displacement = target.get() - location.get();
35143
+ const isInstant = !scrollDuration;
35144
+ let scrollDistance = 0;
35145
+ if (isInstant) {
35146
+ scrollVelocity = 0;
35147
+ previousLocation.set(target);
35148
+ location.set(target);
35149
+ scrollDistance = displacement;
35150
+ } else {
35151
+ previousLocation.set(location);
35152
+ scrollVelocity += displacement / scrollDuration;
35153
+ scrollVelocity *= scrollFriction;
35154
+ rawLocation += scrollVelocity;
35155
+ location.add(scrollVelocity);
35156
+ scrollDistance = rawLocation - rawLocationPrevious;
35157
+ }
35158
+ scrollDirection = mathSign(scrollDistance);
35159
+ rawLocationPrevious = rawLocation;
35160
+ return self;
35161
+ }
35162
+ function settled() {
35163
+ const diff = target.get() - offsetLocation.get();
35164
+ return mathAbs(diff) < 0.001;
35165
+ }
35166
+ function duration() {
35167
+ return scrollDuration;
35168
+ }
35169
+ function direction() {
35170
+ return scrollDirection;
35171
+ }
35172
+ function velocity() {
35173
+ return scrollVelocity;
35174
+ }
35175
+ function useBaseDuration() {
35176
+ return useDuration(baseDuration);
35177
+ }
35178
+ function useBaseFriction() {
35179
+ return useFriction(baseFriction);
35180
+ }
35181
+ function useDuration(n) {
35182
+ scrollDuration = n;
35183
+ return self;
35184
+ }
35185
+ function useFriction(n) {
35186
+ scrollFriction = n;
35187
+ return self;
35188
+ }
35189
+ const self = {
35190
+ direction,
35191
+ duration,
35192
+ velocity,
35193
+ seek,
35194
+ settled,
35195
+ useBaseFriction,
35196
+ useBaseDuration,
35197
+ useFriction,
35198
+ useDuration
35199
+ };
35200
+ return self;
35201
+ }
35202
+
35203
+ function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
35204
+ const pullBackThreshold = percentOfView.measure(10);
35205
+ const edgeOffsetTolerance = percentOfView.measure(50);
35206
+ const frictionLimit = Limit(0.1, 0.99);
35207
+ let disabled = false;
35208
+ function shouldConstrain() {
35209
+ if (disabled) return false;
35210
+ if (!limit.reachedAny(target.get())) return false;
35211
+ if (!limit.reachedAny(location.get())) return false;
35212
+ return true;
35213
+ }
35214
+ function constrain(pointerDown) {
35215
+ if (!shouldConstrain()) return;
35216
+ const edge = limit.reachedMin(location.get()) ? 'min' : 'max';
35217
+ const diffToEdge = mathAbs(limit[edge] - location.get());
35218
+ const diffToTarget = target.get() - location.get();
35219
+ const friction = frictionLimit.constrain(diffToEdge / edgeOffsetTolerance);
35220
+ target.subtract(diffToTarget * friction);
35221
+ if (!pointerDown && mathAbs(diffToTarget) < pullBackThreshold) {
35222
+ target.set(limit.constrain(target.get()));
35223
+ scrollBody.useDuration(25).useBaseFriction();
35224
+ }
35225
+ }
35226
+ function toggleActive(active) {
35227
+ disabled = !active;
35228
+ }
35229
+ const self = {
35230
+ shouldConstrain,
35231
+ constrain,
35232
+ toggleActive
35233
+ };
35234
+ return self;
35235
+ }
35236
+
35237
+ function ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance) {
35238
+ const scrollBounds = Limit(-contentSize + viewSize, 0);
35239
+ const snapsBounded = measureBounded();
35240
+ const scrollContainLimit = findScrollContainLimit();
35241
+ const snapsContained = measureContained();
35242
+ function usePixelTolerance(bound, snap) {
35243
+ return deltaAbs(bound, snap) <= 1;
35244
+ }
35245
+ function findScrollContainLimit() {
35246
+ const startSnap = snapsBounded[0];
35247
+ const endSnap = arrayLast(snapsBounded);
35248
+ const min = snapsBounded.lastIndexOf(startSnap);
35249
+ const max = snapsBounded.indexOf(endSnap) + 1;
35250
+ return Limit(min, max);
35251
+ }
35252
+ function measureBounded() {
35253
+ return snapsAligned.map((snapAligned, index) => {
35254
+ const {
35255
+ min,
35256
+ max
35257
+ } = scrollBounds;
35258
+ const snap = scrollBounds.constrain(snapAligned);
35259
+ const isFirst = !index;
35260
+ const isLast = arrayIsLastIndex(snapsAligned, index);
35261
+ if (isFirst) return max;
35262
+ if (isLast) return min;
35263
+ if (usePixelTolerance(min, snap)) return min;
35264
+ if (usePixelTolerance(max, snap)) return max;
35265
+ return snap;
35266
+ }).map(scrollBound => parseFloat(scrollBound.toFixed(3)));
35267
+ }
35268
+ function measureContained() {
35269
+ if (contentSize <= viewSize + pixelTolerance) return [scrollBounds.max];
35270
+ if (containScroll === 'keepSnaps') return snapsBounded;
35271
+ const {
35272
+ min,
35273
+ max
35274
+ } = scrollContainLimit;
35275
+ return snapsBounded.slice(min, max);
35276
+ }
35277
+ const self = {
35278
+ snapsContained,
35279
+ scrollContainLimit
35280
+ };
35281
+ return self;
35282
+ }
35283
+
35284
+ function ScrollLimit(contentSize, scrollSnaps, loop) {
35285
+ const max = scrollSnaps[0];
35286
+ const min = loop ? max - contentSize : arrayLast(scrollSnaps);
35287
+ const limit = Limit(min, max);
35288
+ const self = {
35289
+ limit
35290
+ };
35291
+ return self;
35292
+ }
35293
+
35294
+ function ScrollLooper(contentSize, limit, location, vectors) {
35295
+ const jointSafety = 0.1;
35296
+ const min = limit.min + jointSafety;
35297
+ const max = limit.max + jointSafety;
35298
+ const {
35299
+ reachedMin,
35300
+ reachedMax
35301
+ } = Limit(min, max);
35302
+ function shouldLoop(direction) {
35303
+ if (direction === 1) return reachedMax(location.get());
35304
+ if (direction === -1) return reachedMin(location.get());
35305
+ return false;
35306
+ }
35307
+ function loop(direction) {
35308
+ if (!shouldLoop(direction)) return;
35309
+ const loopDistance = contentSize * (direction * -1);
35310
+ vectors.forEach(v => v.add(loopDistance));
35311
+ }
35312
+ const self = {
35313
+ loop
35314
+ };
35315
+ return self;
35316
+ }
35317
+
35318
+ function ScrollProgress(limit) {
35319
+ const {
35320
+ max,
35321
+ length
35322
+ } = limit;
35323
+ function get(n) {
35324
+ const currentLocation = n - max;
35325
+ return length ? currentLocation / -length : 0;
35326
+ }
35327
+ const self = {
35328
+ get
35329
+ };
35330
+ return self;
35331
+ }
35332
+
35333
+ function ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll) {
35334
+ const {
35335
+ startEdge,
35336
+ endEdge
35337
+ } = axis;
35338
+ const {
35339
+ groupSlides
35340
+ } = slidesToScroll;
35341
+ const alignments = measureSizes().map(alignment.measure);
35342
+ const snaps = measureUnaligned();
35343
+ const snapsAligned = measureAligned();
35344
+ function measureSizes() {
35345
+ return groupSlides(slideRects).map(rects => arrayLast(rects)[endEdge] - rects[0][startEdge]).map(mathAbs);
35346
+ }
35347
+ function measureUnaligned() {
35348
+ return slideRects.map(rect => containerRect[startEdge] - rect[startEdge]).map(snap => -mathAbs(snap));
35349
+ }
35350
+ function measureAligned() {
35351
+ return groupSlides(snaps).map(g => g[0]).map((snap, index) => snap + alignments[index]);
35352
+ }
35353
+ const self = {
35354
+ snaps,
35355
+ snapsAligned
35356
+ };
35357
+ return self;
35358
+ }
35359
+
35360
+ function SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes) {
35361
+ const {
35362
+ groupSlides
35363
+ } = slidesToScroll;
35364
+ const {
35365
+ min,
35366
+ max
35367
+ } = scrollContainLimit;
35368
+ const slideRegistry = createSlideRegistry();
35369
+ function createSlideRegistry() {
35370
+ const groupedSlideIndexes = groupSlides(slideIndexes);
35371
+ const doNotContain = !containSnaps || containScroll === 'keepSnaps';
35372
+ if (scrollSnaps.length === 1) return [slideIndexes];
35373
+ if (doNotContain) return groupedSlideIndexes;
35374
+ return groupedSlideIndexes.slice(min, max).map((group, index, groups) => {
35375
+ const isFirst = !index;
35376
+ const isLast = arrayIsLastIndex(groups, index);
35377
+ if (isFirst) {
35378
+ const range = arrayLast(groups[0]) + 1;
35379
+ return arrayFromNumber(range);
35380
+ }
35381
+ if (isLast) {
35382
+ const range = arrayLastIndex(slideIndexes) - arrayLast(groups)[0] + 1;
35383
+ return arrayFromNumber(range, arrayLast(groups)[0]);
35384
+ }
35385
+ return group;
35386
+ });
35387
+ }
35388
+ const self = {
35389
+ slideRegistry
35390
+ };
35391
+ return self;
35392
+ }
35393
+
35394
+ function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
35395
+ const {
35396
+ reachedAny,
35397
+ removeOffset,
35398
+ constrain
35399
+ } = limit;
35400
+ function minDistance(distances) {
35401
+ return distances.concat().sort((a, b) => mathAbs(a) - mathAbs(b))[0];
35402
+ }
35403
+ function findTargetSnap(target) {
35404
+ const distance = loop ? removeOffset(target) : constrain(target);
35405
+ const ascDiffsToSnaps = scrollSnaps.map((snap, index) => ({
35406
+ diff: shortcut(snap - distance, 0),
35407
+ index
35408
+ })).sort((d1, d2) => mathAbs(d1.diff) - mathAbs(d2.diff));
35409
+ const {
35410
+ index
35411
+ } = ascDiffsToSnaps[0];
35412
+ return {
35413
+ index,
35414
+ distance
35415
+ };
35416
+ }
35417
+ function shortcut(target, direction) {
35418
+ const targets = [target, target + contentSize, target - contentSize];
35419
+ if (!loop) return target;
35420
+ if (!direction) return minDistance(targets);
35421
+ const matchingTargets = targets.filter(t => mathSign(t) === direction);
35422
+ if (matchingTargets.length) return minDistance(matchingTargets);
35423
+ return arrayLast(targets) - contentSize;
35424
+ }
35425
+ function byIndex(index, direction) {
35426
+ const diffToSnap = scrollSnaps[index] - targetVector.get();
35427
+ const distance = shortcut(diffToSnap, direction);
35428
+ return {
35429
+ index,
35430
+ distance
35431
+ };
35432
+ }
35433
+ function byDistance(distance, snap) {
35434
+ const target = targetVector.get() + distance;
35435
+ const {
35436
+ index,
35437
+ distance: targetSnapDistance
35438
+ } = findTargetSnap(target);
35439
+ const reachedBound = !loop && reachedAny(target);
35440
+ if (!snap || reachedBound) return {
35441
+ index,
35442
+ distance
35443
+ };
35444
+ const diffToSnap = scrollSnaps[index] - targetSnapDistance;
35445
+ const snapDistance = distance + shortcut(diffToSnap, 0);
35446
+ return {
35447
+ index,
35448
+ distance: snapDistance
35449
+ };
35450
+ }
35451
+ const self = {
35452
+ byDistance,
35453
+ byIndex,
35454
+ shortcut
35455
+ };
35456
+ return self;
35457
+ }
35458
+
35459
+ function ScrollTo(animation, indexCurrent, indexPrevious, scrollBody, scrollTarget, targetVector, eventHandler) {
35460
+ function scrollTo(target) {
35461
+ const distanceDiff = target.distance;
35462
+ const indexDiff = target.index !== indexCurrent.get();
35463
+ targetVector.add(distanceDiff);
35464
+ if (distanceDiff) {
35465
+ if (scrollBody.duration()) {
35466
+ animation.start();
35467
+ } else {
35468
+ animation.update();
35469
+ animation.render(1);
35470
+ animation.update();
35471
+ }
35472
+ }
35473
+ if (indexDiff) {
35474
+ indexPrevious.set(indexCurrent.get());
35475
+ indexCurrent.set(target.index);
35476
+ eventHandler.emit('select');
35477
+ }
35478
+ }
35479
+ function distance(n, snap) {
35480
+ const target = scrollTarget.byDistance(n, snap);
35481
+ scrollTo(target);
35482
+ }
35483
+ function index(n, direction) {
35484
+ const targetIndex = indexCurrent.clone().set(n);
35485
+ const target = scrollTarget.byIndex(targetIndex.get(), direction);
35486
+ scrollTo(target);
35487
+ }
35488
+ const self = {
35489
+ distance,
35490
+ index
35491
+ };
35492
+ return self;
35493
+ }
35494
+
35495
+ function SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus) {
35496
+ const focusListenerOptions = {
35497
+ passive: true,
35498
+ capture: true
35499
+ };
35500
+ let lastTabPressTime = 0;
35501
+ function init(emblaApi) {
35502
+ if (!watchFocus) return;
35503
+ function defaultCallback(index) {
35504
+ const nowTime = new Date().getTime();
35505
+ const diffTime = nowTime - lastTabPressTime;
35506
+ if (diffTime > 10) return;
35507
+ eventHandler.emit('slideFocusStart');
35508
+ root.scrollLeft = 0;
35509
+ const group = slideRegistry.findIndex(group => group.includes(index));
35510
+ if (!isNumber(group)) return;
35511
+ scrollBody.useDuration(0);
35512
+ scrollTo.index(group, 0);
35513
+ eventHandler.emit('slideFocus');
35514
+ }
35515
+ eventStore.add(document, 'keydown', registerTabPress, false);
35516
+ slides.forEach((slide, slideIndex) => {
35517
+ eventStore.add(slide, 'focus', evt => {
35518
+ if (isBoolean(watchFocus) || watchFocus(emblaApi, evt)) {
35519
+ defaultCallback(slideIndex);
35520
+ }
35521
+ }, focusListenerOptions);
35522
+ });
35523
+ }
35524
+ function registerTabPress(event) {
35525
+ if (event.code === 'Tab') lastTabPressTime = new Date().getTime();
35526
+ }
35527
+ const self = {
35528
+ init
35529
+ };
35530
+ return self;
35531
+ }
35532
+
35533
+ function Vector1D(initialValue) {
35534
+ let value = initialValue;
35535
+ function get() {
35536
+ return value;
35537
+ }
35538
+ function set(n) {
35539
+ value = normalizeInput(n);
35540
+ }
35541
+ function add(n) {
35542
+ value += normalizeInput(n);
35543
+ }
35544
+ function subtract(n) {
35545
+ value -= normalizeInput(n);
35546
+ }
35547
+ function normalizeInput(n) {
35548
+ return isNumber(n) ? n : n.get();
35549
+ }
35550
+ const self = {
35551
+ get,
35552
+ set,
35553
+ add,
35554
+ subtract
35555
+ };
35556
+ return self;
35557
+ }
35558
+
35559
+ function Translate(axis, container) {
35560
+ const translate = axis.scroll === 'x' ? x : y;
35561
+ const containerStyle = container.style;
35562
+ let previousTarget = null;
35563
+ let disabled = false;
35564
+ function x(n) {
35565
+ return `translate3d(${n}px,0px,0px)`;
35566
+ }
35567
+ function y(n) {
35568
+ return `translate3d(0px,${n}px,0px)`;
35569
+ }
35570
+ function to(target) {
35571
+ if (disabled) return;
35572
+ const newTarget = roundToTwoDecimals(axis.direction(target));
35573
+ if (newTarget === previousTarget) return;
35574
+ containerStyle.transform = translate(newTarget);
35575
+ previousTarget = newTarget;
35576
+ }
35577
+ function toggleActive(active) {
35578
+ disabled = !active;
35579
+ }
35580
+ function clear() {
35581
+ if (disabled) return;
35582
+ containerStyle.transform = '';
35583
+ if (!container.getAttribute('style')) container.removeAttribute('style');
35584
+ }
35585
+ const self = {
35586
+ clear,
35587
+ to,
35588
+ toggleActive
35589
+ };
35590
+ return self;
35591
+ }
35592
+
35593
+ function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, location, slides) {
35594
+ const roundingSafety = 0.5;
35595
+ const ascItems = arrayKeys(slideSizesWithGaps);
35596
+ const descItems = arrayKeys(slideSizesWithGaps).reverse();
35597
+ const loopPoints = startPoints().concat(endPoints());
35598
+ function removeSlideSizes(indexes, from) {
35599
+ return indexes.reduce((a, i) => {
35600
+ return a - slideSizesWithGaps[i];
35601
+ }, from);
35602
+ }
35603
+ function slidesInGap(indexes, gap) {
35604
+ return indexes.reduce((a, i) => {
35605
+ const remainingGap = removeSlideSizes(a, gap);
35606
+ return remainingGap > 0 ? a.concat([i]) : a;
35607
+ }, []);
35608
+ }
35609
+ function findSlideBounds(offset) {
35610
+ return snaps.map((snap, index) => ({
35611
+ start: snap - slideSizes[index] + roundingSafety + offset,
35612
+ end: snap + viewSize - roundingSafety + offset
35613
+ }));
35614
+ }
35615
+ function findLoopPoints(indexes, offset, isEndEdge) {
35616
+ const slideBounds = findSlideBounds(offset);
35617
+ return indexes.map(index => {
35618
+ const initial = isEndEdge ? 0 : -contentSize;
35619
+ const altered = isEndEdge ? contentSize : 0;
35620
+ const boundEdge = isEndEdge ? 'end' : 'start';
35621
+ const loopPoint = slideBounds[index][boundEdge];
35622
+ return {
35623
+ index,
35624
+ loopPoint,
35625
+ slideLocation: Vector1D(-1),
35626
+ translate: Translate(axis, slides[index]),
35627
+ target: () => location.get() > loopPoint ? initial : altered
35628
+ };
35629
+ });
35630
+ }
35631
+ function startPoints() {
35632
+ const gap = scrollSnaps[0];
35633
+ const indexes = slidesInGap(descItems, gap);
35634
+ return findLoopPoints(indexes, contentSize, false);
35635
+ }
35636
+ function endPoints() {
35637
+ const gap = viewSize - scrollSnaps[0] - 1;
35638
+ const indexes = slidesInGap(ascItems, gap);
35639
+ return findLoopPoints(indexes, -contentSize, true);
35640
+ }
35641
+ function canLoop() {
35642
+ return loopPoints.every(({
35643
+ index
35644
+ }) => {
35645
+ const otherIndexes = ascItems.filter(i => i !== index);
35646
+ return removeSlideSizes(otherIndexes, viewSize) <= 0.1;
35647
+ });
35648
+ }
35649
+ function loop() {
35650
+ loopPoints.forEach(loopPoint => {
35651
+ const {
35652
+ target,
35653
+ translate,
35654
+ slideLocation
35655
+ } = loopPoint;
35656
+ const shiftLocation = target();
35657
+ if (shiftLocation === slideLocation.get()) return;
35658
+ translate.to(shiftLocation);
35659
+ slideLocation.set(shiftLocation);
35660
+ });
35661
+ }
35662
+ function clear() {
35663
+ loopPoints.forEach(loopPoint => loopPoint.translate.clear());
35664
+ }
35665
+ const self = {
35666
+ canLoop,
35667
+ clear,
35668
+ loop,
35669
+ loopPoints
35670
+ };
35671
+ return self;
35672
+ }
35673
+
35674
+ function SlidesHandler(container, eventHandler, watchSlides) {
35675
+ let mutationObserver;
35676
+ let destroyed = false;
35677
+ function init(emblaApi) {
35678
+ if (!watchSlides) return;
35679
+ function defaultCallback(mutations) {
35680
+ for (const mutation of mutations) {
35681
+ if (mutation.type === 'childList') {
35682
+ emblaApi.reInit();
35683
+ eventHandler.emit('slidesChanged');
35684
+ break;
35685
+ }
35686
+ }
35687
+ }
35688
+ mutationObserver = new MutationObserver(mutations => {
35689
+ if (destroyed) return;
35690
+ if (isBoolean(watchSlides) || watchSlides(emblaApi, mutations)) {
35691
+ defaultCallback(mutations);
35692
+ }
35693
+ });
35694
+ mutationObserver.observe(container, {
35695
+ childList: true
35696
+ });
35697
+ }
35698
+ function destroy() {
35699
+ if (mutationObserver) mutationObserver.disconnect();
35700
+ destroyed = true;
35701
+ }
35702
+ const self = {
35703
+ init,
35704
+ destroy
35705
+ };
35706
+ return self;
35707
+ }
35708
+
35709
+ function SlidesInView(container, slides, eventHandler, threshold) {
35710
+ const intersectionEntryMap = {};
35711
+ let inViewCache = null;
35712
+ let notInViewCache = null;
35713
+ let intersectionObserver;
35714
+ let destroyed = false;
35715
+ function init() {
35716
+ intersectionObserver = new IntersectionObserver(entries => {
35717
+ if (destroyed) return;
35718
+ entries.forEach(entry => {
35719
+ const index = slides.indexOf(entry.target);
35720
+ intersectionEntryMap[index] = entry;
35721
+ });
35722
+ inViewCache = null;
35723
+ notInViewCache = null;
35724
+ eventHandler.emit('slidesInView');
35725
+ }, {
35726
+ root: container.parentElement,
35727
+ threshold
35728
+ });
35729
+ slides.forEach(slide => intersectionObserver.observe(slide));
35730
+ }
35731
+ function destroy() {
35732
+ if (intersectionObserver) intersectionObserver.disconnect();
35733
+ destroyed = true;
35734
+ }
35735
+ function createInViewList(inView) {
35736
+ return objectKeys(intersectionEntryMap).reduce((list, slideIndex) => {
35737
+ const index = parseInt(slideIndex);
35738
+ const {
35739
+ isIntersecting
35740
+ } = intersectionEntryMap[index];
35741
+ const inViewMatch = inView && isIntersecting;
35742
+ const notInViewMatch = !inView && !isIntersecting;
35743
+ if (inViewMatch || notInViewMatch) list.push(index);
35744
+ return list;
35745
+ }, []);
35746
+ }
35747
+ function get(inView = true) {
35748
+ if (inView && inViewCache) return inViewCache;
35749
+ if (!inView && notInViewCache) return notInViewCache;
35750
+ const slideIndexes = createInViewList(inView);
35751
+ if (inView) inViewCache = slideIndexes;
35752
+ if (!inView) notInViewCache = slideIndexes;
35753
+ return slideIndexes;
35754
+ }
35755
+ const self = {
35756
+ init,
35757
+ destroy,
35758
+ get
35759
+ };
35760
+ return self;
35761
+ }
35762
+
35763
+ function SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow) {
35764
+ const {
35765
+ measureSize,
35766
+ startEdge,
35767
+ endEdge
35768
+ } = axis;
35769
+ const withEdgeGap = slideRects[0] && readEdgeGap;
35770
+ const startGap = measureStartGap();
35771
+ const endGap = measureEndGap();
35772
+ const slideSizes = slideRects.map(measureSize);
35773
+ const slideSizesWithGaps = measureWithGaps();
35774
+ function measureStartGap() {
35775
+ if (!withEdgeGap) return 0;
35776
+ const slideRect = slideRects[0];
35777
+ return mathAbs(containerRect[startEdge] - slideRect[startEdge]);
35778
+ }
35779
+ function measureEndGap() {
35780
+ if (!withEdgeGap) return 0;
35781
+ const style = ownerWindow.getComputedStyle(arrayLast(slides));
35782
+ return parseFloat(style.getPropertyValue(`margin-${endEdge}`));
35783
+ }
35784
+ function measureWithGaps() {
35785
+ return slideRects.map((rect, index, rects) => {
35786
+ const isFirst = !index;
35787
+ const isLast = arrayIsLastIndex(rects, index);
35788
+ if (isFirst) return slideSizes[index] + startGap;
35789
+ if (isLast) return slideSizes[index] + endGap;
35790
+ return rects[index + 1][startEdge] - rect[startEdge];
35791
+ }).map(mathAbs);
35792
+ }
35793
+ const self = {
35794
+ slideSizes,
35795
+ slideSizesWithGaps,
35796
+ startGap,
35797
+ endGap
35798
+ };
35799
+ return self;
35800
+ }
35801
+
35802
+ function SlidesToScroll(axis, viewSize, slidesToScroll, loop, containerRect, slideRects, startGap, endGap, pixelTolerance) {
35803
+ const {
35804
+ startEdge,
35805
+ endEdge,
35806
+ direction
35807
+ } = axis;
35808
+ const groupByNumber = isNumber(slidesToScroll);
35809
+ function byNumber(array, groupSize) {
35810
+ return arrayKeys(array).filter(i => i % groupSize === 0).map(i => array.slice(i, i + groupSize));
35811
+ }
35812
+ function bySize(array) {
35813
+ if (!array.length) return [];
35814
+ return arrayKeys(array).reduce((groups, rectB, index) => {
35815
+ const rectA = arrayLast(groups) || 0;
35816
+ const isFirst = rectA === 0;
35817
+ const isLast = rectB === arrayLastIndex(array);
35818
+ const edgeA = containerRect[startEdge] - slideRects[rectA][startEdge];
35819
+ const edgeB = containerRect[startEdge] - slideRects[rectB][endEdge];
35820
+ const gapA = !loop && isFirst ? direction(startGap) : 0;
35821
+ const gapB = !loop && isLast ? direction(endGap) : 0;
35822
+ const chunkSize = mathAbs(edgeB - gapB - (edgeA + gapA));
35823
+ if (index && chunkSize > viewSize + pixelTolerance) groups.push(rectB);
35824
+ if (isLast) groups.push(array.length);
35825
+ return groups;
35826
+ }, []).map((currentSize, index, groups) => {
35827
+ const previousSize = Math.max(groups[index - 1] || 0);
35828
+ return array.slice(previousSize, currentSize);
35829
+ });
35830
+ }
35831
+ function groupSlides(array) {
35832
+ return groupByNumber ? byNumber(array, slidesToScroll) : bySize(array);
35833
+ }
35834
+ const self = {
35835
+ groupSlides
35836
+ };
35837
+ return self;
35838
+ }
35839
+
35840
+ function Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler) {
35841
+ // Options
35842
+ const {
35843
+ align,
35844
+ axis: scrollAxis,
35845
+ direction,
35846
+ startIndex,
35847
+ loop,
35848
+ duration,
35849
+ dragFree,
35850
+ dragThreshold,
35851
+ inViewThreshold,
35852
+ slidesToScroll: groupSlides,
35853
+ skipSnaps,
35854
+ containScroll,
35855
+ watchResize,
35856
+ watchSlides,
35857
+ watchDrag,
35858
+ watchFocus
35859
+ } = options;
35860
+ // Measurements
35861
+ const pixelTolerance = 2;
35862
+ const nodeRects = NodeRects();
35863
+ const containerRect = nodeRects.measure(container);
35864
+ const slideRects = slides.map(nodeRects.measure);
35865
+ const axis = Axis(scrollAxis, direction);
35866
+ const viewSize = axis.measureSize(containerRect);
35867
+ const percentOfView = PercentOfView(viewSize);
35868
+ const alignment = Alignment(align, viewSize);
35869
+ const containSnaps = !loop && !!containScroll;
35870
+ const readEdgeGap = loop || !!containScroll;
35871
+ const {
35872
+ slideSizes,
35873
+ slideSizesWithGaps,
35874
+ startGap,
35875
+ endGap
35876
+ } = SlideSizes(axis, containerRect, slideRects, slides, readEdgeGap, ownerWindow);
35877
+ const slidesToScroll = SlidesToScroll(axis, viewSize, groupSlides, loop, containerRect, slideRects, startGap, endGap, pixelTolerance);
35878
+ const {
35879
+ snaps,
35880
+ snapsAligned
35881
+ } = ScrollSnaps(axis, alignment, containerRect, slideRects, slidesToScroll);
35882
+ const contentSize = -arrayLast(snaps) + arrayLast(slideSizesWithGaps);
35883
+ const {
35884
+ snapsContained,
35885
+ scrollContainLimit
35886
+ } = ScrollContain(viewSize, contentSize, snapsAligned, containScroll, pixelTolerance);
35887
+ const scrollSnaps = containSnaps ? snapsContained : snapsAligned;
35888
+ const {
35889
+ limit
35890
+ } = ScrollLimit(contentSize, scrollSnaps, loop);
35891
+ // Indexes
35892
+ const index = Counter(arrayLastIndex(scrollSnaps), startIndex, loop);
35893
+ const indexPrevious = index.clone();
35894
+ const slideIndexes = arrayKeys(slides);
35895
+ // Animation
35896
+ const update = ({
35897
+ dragHandler,
35898
+ scrollBody,
35899
+ scrollBounds,
35900
+ options: {
35901
+ loop
35902
+ }
35903
+ }) => {
35904
+ if (!loop) scrollBounds.constrain(dragHandler.pointerDown());
35905
+ scrollBody.seek();
35906
+ };
35907
+ const render = ({
35908
+ scrollBody,
35909
+ translate,
35910
+ location,
35911
+ offsetLocation,
35912
+ previousLocation,
35913
+ scrollLooper,
35914
+ slideLooper,
35915
+ dragHandler,
35916
+ animation,
35917
+ eventHandler,
35918
+ scrollBounds,
35919
+ options: {
35920
+ loop
35921
+ }
35922
+ }, alpha) => {
35923
+ const shouldSettle = scrollBody.settled();
35924
+ const withinBounds = !scrollBounds.shouldConstrain();
35925
+ const hasSettled = loop ? shouldSettle : shouldSettle && withinBounds;
35926
+ const hasSettledAndIdle = hasSettled && !dragHandler.pointerDown();
35927
+ if (hasSettledAndIdle) animation.stop();
35928
+ const interpolatedLocation = location.get() * alpha + previousLocation.get() * (1 - alpha);
35929
+ offsetLocation.set(interpolatedLocation);
35930
+ if (loop) {
35931
+ scrollLooper.loop(scrollBody.direction());
35932
+ slideLooper.loop();
35933
+ }
35934
+ translate.to(offsetLocation.get());
35935
+ if (hasSettledAndIdle) eventHandler.emit('settle');
35936
+ if (!hasSettled) eventHandler.emit('scroll');
35937
+ };
35938
+ const animation = Animations(ownerDocument, ownerWindow, () => update(engine), alpha => render(engine, alpha));
35939
+ // Shared
35940
+ const friction = 0.68;
35941
+ const startLocation = scrollSnaps[index.get()];
35942
+ const location = Vector1D(startLocation);
35943
+ const previousLocation = Vector1D(startLocation);
35944
+ const offsetLocation = Vector1D(startLocation);
35945
+ const target = Vector1D(startLocation);
35946
+ const scrollBody = ScrollBody(location, offsetLocation, previousLocation, target, duration, friction);
35947
+ const scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
35948
+ const scrollTo = ScrollTo(animation, index, indexPrevious, scrollBody, scrollTarget, target, eventHandler);
35949
+ const scrollProgress = ScrollProgress(limit);
35950
+ const eventStore = EventStore();
35951
+ const slidesInView = SlidesInView(container, slides, eventHandler, inViewThreshold);
35952
+ const {
35953
+ slideRegistry
35954
+ } = SlideRegistry(containSnaps, containScroll, scrollSnaps, scrollContainLimit, slidesToScroll, slideIndexes);
35955
+ const slideFocus = SlideFocus(root, slides, slideRegistry, scrollTo, scrollBody, eventStore, eventHandler, watchFocus);
35956
+ // Engine
35957
+ const engine = {
35958
+ ownerDocument,
35959
+ ownerWindow,
35960
+ eventHandler,
35961
+ containerRect,
35962
+ slideRects,
35963
+ animation,
35964
+ axis,
35965
+ dragHandler: DragHandler(axis, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location, animation, scrollTo, scrollBody, scrollTarget, index, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
35966
+ eventStore,
35967
+ percentOfView,
35968
+ index,
35969
+ indexPrevious,
35970
+ limit,
35971
+ location,
35972
+ offsetLocation,
35973
+ previousLocation,
35974
+ options,
35975
+ resizeHandler: ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects),
35976
+ scrollBody,
35977
+ scrollBounds: ScrollBounds(limit, offsetLocation, target, scrollBody, percentOfView),
35978
+ scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [location, offsetLocation, previousLocation, target]),
35979
+ scrollProgress,
35980
+ scrollSnapList: scrollSnaps.map(scrollProgress.get),
35981
+ scrollSnaps,
35982
+ scrollTarget,
35983
+ scrollTo,
35984
+ slideLooper: SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, offsetLocation, slides),
35985
+ slideFocus,
35986
+ slidesHandler: SlidesHandler(container, eventHandler, watchSlides),
35987
+ slidesInView,
35988
+ slideIndexes,
35989
+ slideRegistry,
35990
+ slidesToScroll,
35991
+ target,
35992
+ translate: Translate(axis, container)
35993
+ };
35994
+ return engine;
35995
+ }
35996
+
35997
+ function EventHandler() {
35998
+ let listeners = {};
35999
+ let api;
36000
+ function init(emblaApi) {
36001
+ api = emblaApi;
36002
+ }
36003
+ function getListeners(evt) {
36004
+ return listeners[evt] || [];
36005
+ }
36006
+ function emit(evt) {
36007
+ getListeners(evt).forEach(e => e(api, evt));
36008
+ return self;
36009
+ }
36010
+ function on(evt, cb) {
36011
+ listeners[evt] = getListeners(evt).concat([cb]);
36012
+ return self;
36013
+ }
36014
+ function off(evt, cb) {
36015
+ listeners[evt] = getListeners(evt).filter(e => e !== cb);
36016
+ return self;
36017
+ }
36018
+ function clear() {
36019
+ listeners = {};
36020
+ }
36021
+ const self = {
36022
+ init,
36023
+ emit,
36024
+ off,
36025
+ on,
36026
+ clear
36027
+ };
36028
+ return self;
36029
+ }
36030
+
36031
+ const defaultOptions = {
36032
+ align: 'center',
36033
+ axis: 'x',
36034
+ container: null,
36035
+ slides: null,
36036
+ containScroll: 'trimSnaps',
36037
+ direction: 'ltr',
36038
+ slidesToScroll: 1,
36039
+ inViewThreshold: 0,
36040
+ breakpoints: {},
36041
+ dragFree: false,
36042
+ dragThreshold: 10,
36043
+ loop: false,
36044
+ skipSnaps: false,
36045
+ duration: 25,
36046
+ startIndex: 0,
36047
+ active: true,
36048
+ watchDrag: true,
36049
+ watchResize: true,
36050
+ watchSlides: true,
36051
+ watchFocus: true
34360
36052
  };
34361
36053
 
34362
- const ProductVariantsDialog = ({ eventProduct, openDialog, onClose, callback, selectedQuantityByVariant, isOnlyMerchandise, eventId, }) => {
36054
+ function OptionsHandler(ownerWindow) {
36055
+ function mergeOptions(optionsA, optionsB) {
36056
+ return objectsMergeDeep(optionsA, optionsB || {});
36057
+ }
36058
+ function optionsAtMedia(options) {
36059
+ const optionsAtMedia = options.breakpoints || {};
36060
+ const matchedMediaOptions = objectKeys(optionsAtMedia).filter(media => ownerWindow.matchMedia(media).matches).map(media => optionsAtMedia[media]).reduce((a, mediaOption) => mergeOptions(a, mediaOption), {});
36061
+ return mergeOptions(options, matchedMediaOptions);
36062
+ }
36063
+ function optionsMediaQueries(optionsList) {
36064
+ return optionsList.map(options => objectKeys(options.breakpoints || {})).reduce((acc, mediaQueries) => acc.concat(mediaQueries), []).map(ownerWindow.matchMedia);
36065
+ }
36066
+ const self = {
36067
+ mergeOptions,
36068
+ optionsAtMedia,
36069
+ optionsMediaQueries
36070
+ };
36071
+ return self;
36072
+ }
36073
+
36074
+ function PluginsHandler(optionsHandler) {
36075
+ let activePlugins = [];
36076
+ function init(emblaApi, plugins) {
36077
+ activePlugins = plugins.filter(({
36078
+ options
36079
+ }) => optionsHandler.optionsAtMedia(options).active !== false);
36080
+ activePlugins.forEach(plugin => plugin.init(emblaApi, optionsHandler));
36081
+ return plugins.reduce((map, plugin) => Object.assign(map, {
36082
+ [plugin.name]: plugin
36083
+ }), {});
36084
+ }
36085
+ function destroy() {
36086
+ activePlugins = activePlugins.filter(plugin => plugin.destroy());
36087
+ }
36088
+ const self = {
36089
+ init,
36090
+ destroy
36091
+ };
36092
+ return self;
36093
+ }
36094
+
36095
+ function EmblaCarousel(root, userOptions, userPlugins) {
36096
+ const ownerDocument = root.ownerDocument;
36097
+ const ownerWindow = ownerDocument.defaultView;
36098
+ const optionsHandler = OptionsHandler(ownerWindow);
36099
+ const pluginsHandler = PluginsHandler(optionsHandler);
36100
+ const mediaHandlers = EventStore();
36101
+ const eventHandler = EventHandler();
36102
+ const {
36103
+ mergeOptions,
36104
+ optionsAtMedia,
36105
+ optionsMediaQueries
36106
+ } = optionsHandler;
36107
+ const {
36108
+ on,
36109
+ off,
36110
+ emit
36111
+ } = eventHandler;
36112
+ const reInit = reActivate;
36113
+ let destroyed = false;
36114
+ let engine;
36115
+ let optionsBase = mergeOptions(defaultOptions, EmblaCarousel.globalOptions);
36116
+ let options = mergeOptions(optionsBase);
36117
+ let pluginList = [];
36118
+ let pluginApis;
36119
+ let container;
36120
+ let slides;
36121
+ function storeElements() {
36122
+ const {
36123
+ container: userContainer,
36124
+ slides: userSlides
36125
+ } = options;
36126
+ const customContainer = isString(userContainer) ? root.querySelector(userContainer) : userContainer;
36127
+ container = customContainer || root.children[0];
36128
+ const customSlides = isString(userSlides) ? container.querySelectorAll(userSlides) : userSlides;
36129
+ slides = [].slice.call(customSlides || container.children);
36130
+ }
36131
+ function createEngine(options) {
36132
+ const engine = Engine(root, container, slides, ownerDocument, ownerWindow, options, eventHandler);
36133
+ if (options.loop && !engine.slideLooper.canLoop()) {
36134
+ const optionsWithoutLoop = Object.assign({}, options, {
36135
+ loop: false
36136
+ });
36137
+ return createEngine(optionsWithoutLoop);
36138
+ }
36139
+ return engine;
36140
+ }
36141
+ function activate(withOptions, withPlugins) {
36142
+ if (destroyed) return;
36143
+ optionsBase = mergeOptions(optionsBase, withOptions);
36144
+ options = optionsAtMedia(optionsBase);
36145
+ pluginList = withPlugins || pluginList;
36146
+ storeElements();
36147
+ engine = createEngine(options);
36148
+ optionsMediaQueries([optionsBase, ...pluginList.map(({
36149
+ options
36150
+ }) => options)]).forEach(query => mediaHandlers.add(query, 'change', reActivate));
36151
+ if (!options.active) return;
36152
+ engine.translate.to(engine.location.get());
36153
+ engine.animation.init();
36154
+ engine.slidesInView.init();
36155
+ engine.slideFocus.init(self);
36156
+ engine.eventHandler.init(self);
36157
+ engine.resizeHandler.init(self);
36158
+ engine.slidesHandler.init(self);
36159
+ if (engine.options.loop) engine.slideLooper.loop();
36160
+ if (container.offsetParent && slides.length) engine.dragHandler.init(self);
36161
+ pluginApis = pluginsHandler.init(self, pluginList);
36162
+ }
36163
+ function reActivate(withOptions, withPlugins) {
36164
+ const startIndex = selectedScrollSnap();
36165
+ deActivate();
36166
+ activate(mergeOptions({
36167
+ startIndex
36168
+ }, withOptions), withPlugins);
36169
+ eventHandler.emit('reInit');
36170
+ }
36171
+ function deActivate() {
36172
+ engine.dragHandler.destroy();
36173
+ engine.eventStore.clear();
36174
+ engine.translate.clear();
36175
+ engine.slideLooper.clear();
36176
+ engine.resizeHandler.destroy();
36177
+ engine.slidesHandler.destroy();
36178
+ engine.slidesInView.destroy();
36179
+ engine.animation.destroy();
36180
+ pluginsHandler.destroy();
36181
+ mediaHandlers.clear();
36182
+ }
36183
+ function destroy() {
36184
+ if (destroyed) return;
36185
+ destroyed = true;
36186
+ mediaHandlers.clear();
36187
+ deActivate();
36188
+ eventHandler.emit('destroy');
36189
+ eventHandler.clear();
36190
+ }
36191
+ function scrollTo(index, jump, direction) {
36192
+ if (!options.active || destroyed) return;
36193
+ engine.scrollBody.useBaseFriction().useDuration(jump === true ? 0 : options.duration);
36194
+ engine.scrollTo.index(index, direction || 0);
36195
+ }
36196
+ function scrollNext(jump) {
36197
+ const next = engine.index.add(1).get();
36198
+ scrollTo(next, jump, -1);
36199
+ }
36200
+ function scrollPrev(jump) {
36201
+ const prev = engine.index.add(-1).get();
36202
+ scrollTo(prev, jump, 1);
36203
+ }
36204
+ function canScrollNext() {
36205
+ const next = engine.index.add(1).get();
36206
+ return next !== selectedScrollSnap();
36207
+ }
36208
+ function canScrollPrev() {
36209
+ const prev = engine.index.add(-1).get();
36210
+ return prev !== selectedScrollSnap();
36211
+ }
36212
+ function scrollSnapList() {
36213
+ return engine.scrollSnapList;
36214
+ }
36215
+ function scrollProgress() {
36216
+ return engine.scrollProgress.get(engine.offsetLocation.get());
36217
+ }
36218
+ function selectedScrollSnap() {
36219
+ return engine.index.get();
36220
+ }
36221
+ function previousScrollSnap() {
36222
+ return engine.indexPrevious.get();
36223
+ }
36224
+ function slidesInView() {
36225
+ return engine.slidesInView.get();
36226
+ }
36227
+ function slidesNotInView() {
36228
+ return engine.slidesInView.get(false);
36229
+ }
36230
+ function plugins() {
36231
+ return pluginApis;
36232
+ }
36233
+ function internalEngine() {
36234
+ return engine;
36235
+ }
36236
+ function rootNode() {
36237
+ return root;
36238
+ }
36239
+ function containerNode() {
36240
+ return container;
36241
+ }
36242
+ function slideNodes() {
36243
+ return slides;
36244
+ }
36245
+ const self = {
36246
+ canScrollNext,
36247
+ canScrollPrev,
36248
+ containerNode,
36249
+ internalEngine,
36250
+ destroy,
36251
+ off,
36252
+ on,
36253
+ emit,
36254
+ plugins,
36255
+ previousScrollSnap,
36256
+ reInit,
36257
+ rootNode,
36258
+ scrollNext,
36259
+ scrollPrev,
36260
+ scrollProgress,
36261
+ scrollSnapList,
36262
+ scrollTo,
36263
+ selectedScrollSnap,
36264
+ slideNodes,
36265
+ slidesInView,
36266
+ slidesNotInView
36267
+ };
36268
+ activate(userOptions, userPlugins);
36269
+ setTimeout(() => eventHandler.emit('init'), 0);
36270
+ return self;
36271
+ }
36272
+ EmblaCarousel.globalOptions = undefined;
36273
+
36274
+ function useEmblaCarousel(options = {}, plugins = []) {
36275
+ const storedOptions = useRef(options);
36276
+ const storedPlugins = useRef(plugins);
36277
+ const [emblaApi, setEmblaApi] = useState();
36278
+ const [viewport, setViewport] = useState();
36279
+ const reInit = useCallback(() => {
36280
+ if (emblaApi) emblaApi.reInit(storedOptions.current, storedPlugins.current);
36281
+ }, [emblaApi]);
36282
+ useEffect(() => {
36283
+ if (areOptionsEqual(storedOptions.current, options)) return;
36284
+ storedOptions.current = options;
36285
+ reInit();
36286
+ }, [options, reInit]);
36287
+ useEffect(() => {
36288
+ if (arePluginsEqual(storedPlugins.current, plugins)) return;
36289
+ storedPlugins.current = plugins;
36290
+ reInit();
36291
+ }, [plugins, reInit]);
36292
+ useEffect(() => {
36293
+ if (canUseDOM() && viewport) {
36294
+ EmblaCarousel.globalOptions = useEmblaCarousel.globalOptions;
36295
+ const newEmblaApi = EmblaCarousel(viewport, storedOptions.current, storedPlugins.current);
36296
+ setEmblaApi(newEmblaApi);
36297
+ return () => newEmblaApi.destroy();
36298
+ } else {
36299
+ setEmblaApi(undefined);
36300
+ }
36301
+ }, [viewport, setEmblaApi]);
36302
+ return [setViewport, emblaApi];
36303
+ }
36304
+ useEmblaCarousel.globalOptions = undefined;
36305
+
36306
+ const ProductVariantsDialog = ({ eventProduct, openDialog, onClose, callback, selectedQuantityByVariant, isOnlyMerchandise, eventId, canAddOnlyOneAtATime, }) => {
34363
36307
  const { t, lang, options } = useGlobal();
34364
36308
  const { showSnackbar } = useGlobal();
34365
- const [selectedVariant, setSelectedVariant] = useState(null);
34366
- const [variantPrice, setVariantPrice] = useState(null);
34367
- const [variantQuantity, setVariantQuantity] = useState(1);
34368
- const [isVariantClicked, setIsVariantClicked] = useState(false);
36309
+ const [draftQuantities, setDraftQuantities] = useState({});
34369
36310
  const tickets = useWatch({ name: `tickets.${eventId}`, defaultValue: [] });
34370
36311
  const products = useWatch({ name: `products.${eventId}`, defaultValue: [] });
34371
36312
  useEffect(() => {
@@ -34376,38 +36317,41 @@ const ProductVariantsDialog = ({ eventProduct, openDialog, onClose, callback, se
34376
36317
  }
34377
36318
  }, [openDialog]);
34378
36319
  useEffect(() => {
34379
- if (isVariantClicked) {
34380
- setVariantQuantity(selectedQuantityByVariant &&
34381
- selectedVariant &&
34382
- selectedQuantityByVariant[selectedVariant.eventProductVariantId] !== undefined
34383
- ? selectedQuantityByVariant[selectedVariant.eventProductVariantId]
34384
- : 1);
34385
- setIsVariantClicked(false);
34386
- }
34387
- }, [selectedVariant, isVariantClicked]);
34388
- const handleOnClick = (variant) => {
34389
- setVariantPrice(variant.priceWithVat);
34390
- setSelectedVariant({
34391
- eventProductVariantId: variant.id,
34392
- productVariantId: variant.productVariant.id,
34393
- quantity: 1,
34394
- price: variant.priceWithVat,
34395
- excludedShippingMethodIds: eventProduct.excludedShippingMethods.map((method) => method.id),
34396
- });
34397
- setIsVariantClicked(true);
34398
- };
36320
+ if (openDialog) {
36321
+ setDraftQuantities(canAddOnlyOneAtATime ? {} : (selectedQuantityByVariant ?? {}));
36322
+ }
36323
+ }, [openDialog, selectedQuantityByVariant, canAddOnlyOneAtATime]);
34399
36324
  const handleOnAdd = () => {
34400
- if (!selectedVariant) {
36325
+ const selectedVariants = eventProduct.eventProductVariants
36326
+ .map((variant) => {
36327
+ const quantity = draftQuantities[variant.id] ?? 0;
36328
+ const selectedQty = selectedQuantityByVariant?.[variant.id] ?? 0;
36329
+ if (canAddOnlyOneAtATime) {
36330
+ if (quantity <= 0)
36331
+ return null;
36332
+ }
36333
+ else if (quantity <= 0 && selectedQty <= 0) {
36334
+ return null;
36335
+ }
36336
+ return {
36337
+ eventProductVariantId: variant.id,
36338
+ productVariantId: variant.productVariant.id,
36339
+ quantity,
36340
+ price: variant.priceWithVat,
36341
+ excludedShippingMethodIds: eventProduct.excludedShippingMethods.map((method) => method.id),
36342
+ };
36343
+ })
36344
+ .filter((variant) => Boolean(variant));
36345
+ if (selectedVariants.length === 0) {
34401
36346
  showSnackbar(t('components.product_variant_dialog.select_variant'), { variant: 'error' });
34402
36347
  return;
34403
36348
  }
34404
- callback(selectedVariant);
34405
- setSelectedVariant(null);
36349
+ callback(selectedVariants);
36350
+ setDraftQuantities({});
34406
36351
  onClose?.();
34407
36352
  };
34408
- const isVariantDisabled = (variant) => {
36353
+ const getUsedCount = (variant) => {
34409
36354
  let countUsed = 0;
34410
- let selectedVariantQuantity = 0;
34411
36355
  for (const product of products) {
34412
36356
  if (product.productVariantId === variant.productVariant.id) {
34413
36357
  countUsed += product.quantity;
@@ -34418,59 +36362,78 @@ const ProductVariantsDialog = ({ eventProduct, openDialog, onClose, callback, se
34418
36362
  for (const product of ticket.products) {
34419
36363
  if (product.productVariantId === variant.productVariant.id) {
34420
36364
  countUsed += product.quantity;
34421
- selectedVariantQuantity = product.quantity;
34422
36365
  }
34423
36366
  }
34424
36367
  }
34425
36368
  }
34426
- return ((variant.productVariant.quantity &&
34427
- countUsed + variant.productVariant.sold >= variant.productVariant.quantity) ||
34428
- selectedVariantQuantity >= 10);
36369
+ return countUsed;
34429
36370
  };
34430
- const isVariantSoldOut = () => {
34431
- const variant = eventProduct.eventProductVariants.find((product) => product.id === selectedVariant?.eventProductVariantId);
34432
- let countUsed = variantQuantity;
34433
- for (const ticket of tickets) {
34434
- if (ticket.products) {
34435
- for (const product of ticket.products) {
34436
- if (product.productVariantId === variant?.productVariant.id) {
34437
- countUsed += product.quantity;
34438
- }
34439
- }
34440
- }
34441
- }
34442
- if (variant && variant.productVariant.quantity) {
34443
- if (variant.productVariant.sold + countUsed >= variant.productVariant.quantity ||
34444
- variantQuantity >= 10) {
34445
- return true;
36371
+ const getMaxAvailable = (variant) => {
36372
+ if (!variant.productVariant.quantity)
36373
+ return Number.POSITIVE_INFINITY;
36374
+ return variant.productVariant.quantity - variant.productVariant.sold - getUsedCount(variant);
36375
+ };
36376
+ const isVariantDisabled = (variant) => {
36377
+ if (!variant.productVariant.quantity)
36378
+ return false;
36379
+ return getMaxAvailable(variant) <= 0;
36380
+ };
36381
+ const handleAddQuantity = (variant) => {
36382
+ setDraftQuantities((prev) => {
36383
+ const current = prev[variant.id] ?? 0;
36384
+ const next = current + 1;
36385
+ const maxAvailable = getMaxAvailable(variant);
36386
+ if (next > 10 || next > maxAvailable)
36387
+ return prev;
36388
+ if (canAddOnlyOneAtATime) {
36389
+ // Only allow one variant to be selected
36390
+ return { [variant.id]: 1 };
34446
36391
  }
34447
- }
34448
- return false;
36392
+ return { ...prev, [variant.id]: next };
36393
+ });
34449
36394
  };
34450
- const handleAddQuantity = () => {
34451
- setVariantQuantity(variantQuantity + 1);
34452
- setSelectedVariant((prevState) => {
34453
- if (!prevState)
34454
- return null;
34455
- return {
34456
- ...prevState,
34457
- quantity: variantQuantity + 1,
34458
- };
36395
+ const handleRemoveQuantity = (variant) => {
36396
+ setDraftQuantities((prev) => {
36397
+ const current = prev[variant.id] ?? 0;
36398
+ const next = current - 1;
36399
+ if (next <= 0) {
36400
+ const rest = { ...prev };
36401
+ delete rest[variant.id];
36402
+ return rest;
36403
+ }
36404
+ if (canAddOnlyOneAtATime) {
36405
+ // Remove the only variant
36406
+ return {};
36407
+ }
36408
+ return { ...prev, [variant.id]: next };
34459
36409
  });
34460
36410
  };
34461
- const handleRemoveQuantity = () => {
34462
- if (variantQuantity > 0) {
34463
- setVariantQuantity(variantQuantity - 1);
36411
+ const handleRemoveProduct = () => {
36412
+ const variantsToRemove = eventProduct.eventProductVariants
36413
+ .filter((variant) => (selectedQuantityByVariant?.[variant.id] ?? 0) > 0)
36414
+ .map((variant) => ({
36415
+ eventProductVariantId: variant.id,
36416
+ productVariantId: variant.productVariant.id,
36417
+ quantity: 0,
36418
+ price: variant.priceWithVat,
36419
+ excludedShippingMethodIds: eventProduct.excludedShippingMethods.map((method) => method.id),
36420
+ }));
36421
+ if (variantsToRemove.length === 0) {
36422
+ return;
34464
36423
  }
34465
- setSelectedVariant((prevState) => {
34466
- if (!prevState)
34467
- return null;
34468
- return {
34469
- ...prevState,
34470
- quantity: variantQuantity - 1,
34471
- };
34472
- });
36424
+ callback(variantsToRemove);
36425
+ setDraftQuantities({});
36426
+ onClose?.();
34473
36427
  };
36428
+ const hasSelectedVariants = eventProduct.eventProductVariants.some((variant) => (selectedQuantityByVariant?.[variant.id] ?? 0) > 0);
36429
+ const variantsById = useMemo(() => new Map(eventProduct.eventProductVariants.map((variant) => [variant.id, variant])), [eventProduct.eventProductVariants]);
36430
+ const totalDraftPrice = useMemo(() => Object.entries(draftQuantities).reduce((total, [variantId, qty]) => {
36431
+ const variant = variantsById.get(Number(variantId));
36432
+ if (!variant)
36433
+ return total;
36434
+ return total + variant.priceWithVat * qty;
36435
+ }, 0), [draftQuantities, variantsById]);
36436
+ const hasDraftSelection = useMemo(() => eventProduct.eventProductVariants.some((variant) => (draftQuantities[variant.id] ?? 0) > 0), [eventProduct.eventProductVariants, draftQuantities]);
34474
36437
  return (React.createElement(Dialog, { open: openDialog, onClose: () => onClose && onClose(), fullWidth: true, sx: {
34475
36438
  mx: 'auto',
34476
36439
  width: {
@@ -34483,35 +36446,91 @@ const ProductVariantsDialog = ({ eventProduct, openDialog, onClose, callback, se
34483
36446
  height: options?.isIframe ? 'auto' : '100%',
34484
36447
  },
34485
36448
  } },
34486
- React.createElement(DialogTitle, null),
34487
- React.createElement(DialogContent, null,
36449
+ React.createElement(DialogTitle, { sx: { textAlign: 'center', fontWeight: 700, fontSize: { xs: '1.5rem', sm: '1.5rem' } } }, eventProduct.product.name),
36450
+ React.createElement(DialogContent, { sx: { pb: 0 } },
34488
36451
  React.createElement(Stack, { spacing: 1 },
34489
- React.createElement(Image, { src: eventProduct.product.previewImage.url, alt: eventProduct.product.name, ratio: "1/1", sx: { borderRadius: 2 } }),
34490
- React.createElement(Typography, { variant: "h5" }, eventProduct.product.name),
36452
+ React.createElement(Image, { src: eventProduct.product.previewImage.url, alt: eventProduct.product.name, ratio: "16/9", sx: { borderRadius: 1 } }),
34491
36453
  React.createElement(Typography, { variant: "body2", color: "primary" },
34492
36454
  t('form.labels.category'),
34493
36455
  ": ",
34494
36456
  eventProduct.product.category.value.text),
34495
36457
  React.createElement(Typography, { variant: "caption", dangerouslySetInnerHTML: { __html: eventProduct.product.description } }))),
34496
36458
  React.createElement(DialogActions, { sx: { justifyContent: 'flex-start' } },
34497
- React.createElement(Stack, { spacing: 2, width: "100%" },
34498
- React.createElement(Stack, { direction: "row", spacing: 1, flexWrap: "wrap", useFlexGap: true, textAlign: "left" }, eventProduct.eventProductVariants.map((variant) => (React.createElement(Button, { key: variant.id, onClick: () => handleOnClick(variant), variant: variant.id === selectedVariant?.eventProductVariantId ? 'contained' : 'outlined', size: "large", disabled: isOnlyMerchandise ? false : isVariantDisabled(variant) },
34499
- React.createElement(Badge, { color: "primary", badgeContent: selectedQuantityByVariant ? selectedQuantityByVariant[variant.id] : 0, sx: { position: 'unset' } }, variant.productVariant.value))))),
34500
- React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", pt: 1 },
34501
- selectedVariant && isOnlyMerchandise && (React.createElement(Stack, { direction: "row", alignItems: "center", spacing: 1 },
34502
- React.createElement(IconButton, { size: "small", color: "primary", onClick: handleRemoveQuantity, disabled: variantQuantity < 1 },
34503
- React.createElement(Iconify, { icon: "eva:minus-fill" })),
34504
- React.createElement(Typography, { color: "grey.500" }, variantQuantity),
34505
- React.createElement(IconButton, { size: "small", color: "primary", onClick: handleAddQuantity, disabled: isVariantSoldOut() },
34506
- React.createElement(Iconify, { icon: "eva:plus-fill" })))),
34507
- React.createElement(Typography, { variant: "h4", textAlign: "right", mt: 0 }, variantPrice !== null
34508
- ? variantPrice > 0
34509
- ? fCurrency(variantPrice, lang, eventProduct.product.currency)
34510
- : t('free')
34511
- : t('unselected'))),
36459
+ React.createElement(Stack, { spacing: 1, width: "100%" },
36460
+ React.createElement(Stack, { spacing: 1 }, eventProduct.eventProductVariants.map((variant) => {
36461
+ const draftQty = draftQuantities[variant.id] ?? 0;
36462
+ const maxAvailable = getMaxAvailable(variant);
36463
+ const isAddDisabled = isVariantDisabled(variant) || maxAvailable <= 0;
36464
+ const isAnotherSelected = canAddOnlyOneAtATime &&
36465
+ Object.keys(draftQuantities).length > 0 &&
36466
+ !draftQuantities[variant.id];
36467
+ return (React.createElement(Stack, { key: variant.id, direction: "row", spacing: 1, alignItems: "center", width: "100%" },
36468
+ React.createElement(Box, { sx: {
36469
+ minWidth: 64,
36470
+ maxWidth: 64,
36471
+ height: 36,
36472
+ borderRadius: 1,
36473
+ border: 1,
36474
+ borderColor: 'divider',
36475
+ bgcolor: 'background.paper',
36476
+ display: 'flex',
36477
+ alignItems: 'center',
36478
+ justifyContent: 'center',
36479
+ } },
36480
+ React.createElement(Typography, { variant: "body2", fontWeight: 600 }, variant.productVariant.value)),
36481
+ draftQty > 0 ? (React.createElement(Box, { sx: {
36482
+ flex: 1,
36483
+ display: 'grid',
36484
+ gridTemplateColumns: canAddOnlyOneAtATime
36485
+ ? 'repeat(2, minmax(0, 1fr))'
36486
+ : 'repeat(3, minmax(0, 1fr))',
36487
+ gap: 1,
36488
+ alignItems: 'center',
36489
+ } },
36490
+ React.createElement(Button, { variant: "outlined", onClick: () => handleRemoveQuantity(variant), "aria-label": t('components.product_variant_dialog.decrease_quantity'), disabled: draftQty < 1, sx: {
36491
+ minWidth: 0,
36492
+ height: 36,
36493
+ borderRadius: 1,
36494
+ fontWeight: 700,
36495
+ borderColor: 'grey.300',
36496
+ color: 'text.primary',
36497
+ } }, "-"),
36498
+ React.createElement(Typography, { sx: {
36499
+ minWidth: 0,
36500
+ height: 36,
36501
+ borderRadius: 1,
36502
+ border: 1,
36503
+ borderColor: 'divider',
36504
+ boxSizing: 'border-box',
36505
+ display: 'flex',
36506
+ alignItems: 'center',
36507
+ justifyContent: 'center',
36508
+ textAlign: 'center',
36509
+ fontWeight: 700,
36510
+ color: 'text.primary',
36511
+ } }, draftQty),
36512
+ !canAddOnlyOneAtATime && (React.createElement(Button, { variant: "contained", onClick: () => handleAddQuantity(variant), "aria-label": t('components.product_variant_dialog.increase_quantity'), disabled: draftQty >= 10 || draftQty >= maxAvailable, sx: { minWidth: 0, height: 36, borderRadius: 1, fontWeight: 700 } }, "+")))) : (React.createElement(Button, { variant: "contained", onClick: () => handleAddQuantity(variant), disabled: isOnlyMerchandise ? false : isAddDisabled || isAnotherSelected, sx: {
36513
+ flex: 1,
36514
+ height: 36,
36515
+ borderRadius: 1,
36516
+ fontWeight: 700,
36517
+ textTransform: 'none',
36518
+ } }, t('add'))),
36519
+ React.createElement(Typography, { variant: "body2" }, variant.priceWithVat > 0
36520
+ ? fCurrency(variant.priceWithVat, lang, eventProduct.product.currency)
36521
+ : t('free'))));
36522
+ })),
36523
+ React.createElement(Stack, { direction: "row", spacing: 1, justifyContent: "space-between", alignItems: "center", width: "100%" },
36524
+ React.createElement(Typography, { variant: "body2" }, t('form.labels.total')),
36525
+ React.createElement(Typography, { variant: "body2", fontWeight: 600 }, fCurrency(totalDraftPrice, lang, eventProduct.product.currency))),
34512
36526
  React.createElement(Stack, { direction: "row", spacing: 1, justifyContent: "flex-end", width: "100%" },
34513
- onClose && React.createElement(Button, { onClick: onClose }, t('cancel')),
34514
- React.createElement(Button, { variant: "contained", onClick: handleOnAdd, disabled: !selectedVariant }, t('add')))))));
36527
+ hasSelectedVariants && !canAddOnlyOneAtATime && (React.createElement(Button, { variant: "outlined", color: "error", onClick: handleRemoveProduct }, t('remove'))),
36528
+ onClose && (React.createElement(Button, { onClick: onClose, sx: {
36529
+ border: 1,
36530
+ color: 'inherit',
36531
+ borderColor: (theme) => theme.palette.grey[300],
36532
+ } }, t('cancel'))),
36533
+ React.createElement(Button, { variant: "contained", onClick: handleOnAdd, disabled: !hasDraftSelection }, t('confirm')))))));
34515
36534
  };
34516
36535
 
34517
36536
  const getSelectedQuantityByVariant = (products, tickets) => {
@@ -34540,72 +36559,201 @@ const getSelectedQuantityByVariant = (products, tickets) => {
34540
36559
  };
34541
36560
 
34542
36561
  const ProductCard = ({ eventProduct, eventId, isOnlyMerchandise }) => {
34543
- const { t } = useGlobal();
36562
+ const { t, lang } = useGlobal();
34544
36563
  const [openVariantDialog, setOpenVariantDialog] = useState(false);
34545
- const { setValue } = useFormContext();
36564
+ const [openSimpleProductDialog, setOpenSimpleProductDialog] = useState(false);
36565
+ const { setValue, getValues } = useFormContext();
34546
36566
  const tickets = useWatch({ name: `tickets.${eventId}`, defaultValue: [] });
34547
36567
  const products = useWatch({ name: `products.${eventId}`, defaultValue: [] });
34548
- const onSelectVariant = (selectedVariant) => {
34549
- const variant = products.find((product) => product.eventProductVariantId === selectedVariant.eventProductVariantId);
34550
- if (variant) {
34551
- if (selectedVariant.quantity === 0) {
34552
- setValue(`products.${eventId}`, products.filter((product) => product.eventProductVariantId !== variant.eventProductVariantId));
36568
+ const isSimpleProduct = eventProduct.eventProductVariants.length === 1;
36569
+ const simpleVariant = isSimpleProduct ? eventProduct.eventProductVariants[0] : undefined;
36570
+ const onSelectVariant = (selectedVariants) => {
36571
+ const normalized = Array.isArray(selectedVariants) ? selectedVariants : [selectedVariants];
36572
+ const currentProducts = getValues(`products.${eventId}`) ?? [];
36573
+ const nextProducts = [...currentProducts];
36574
+ normalized.forEach((selectedVariant) => {
36575
+ const index = nextProducts.findIndex((product) => product.eventProductVariantId === selectedVariant.eventProductVariantId);
36576
+ if (index >= 0) {
36577
+ if (selectedVariant.quantity <= 0) {
36578
+ nextProducts.splice(index, 1);
36579
+ }
36580
+ else {
36581
+ nextProducts[index] = {
36582
+ ...nextProducts[index],
36583
+ quantity: selectedVariant.quantity,
36584
+ };
36585
+ }
34553
36586
  }
34554
36587
  else {
34555
- setValue(`products.${eventId}`, products.map((product) => {
34556
- if (product.eventProductVariantId === selectedVariant.eventProductVariantId) {
34557
- return {
34558
- ...product,
34559
- quantity: selectedVariant.quantity,
34560
- };
34561
- }
34562
- return product;
34563
- }));
36588
+ if (selectedVariant.quantity > 0) {
36589
+ nextProducts.push(selectedVariant);
36590
+ }
34564
36591
  }
34565
- }
34566
- else if (selectedVariant.quantity !== 0) {
34567
- setValue(`products.${eventId}`, [...products, selectedVariant]);
34568
- }
36592
+ });
36593
+ setValue(`products.${eventId}`, nextProducts, {
36594
+ shouldDirty: true,
36595
+ shouldValidate: true,
36596
+ });
34569
36597
  };
34570
- const eventNotEmpty = useMemo(() => products.some((product) => product?.quantity), [products]);
36598
+ const eventNotEmpty = useMemo(() => {
36599
+ const variantIds = new Set(eventProduct.eventProductVariants.map((variant) => variant.id));
36600
+ return products.some((product) => product?.quantity && variantIds.has(product.eventProductVariantId));
36601
+ }, [products, eventProduct.eventProductVariants]);
36602
+ const selectedQuantityByVariant = useMemo(() => getSelectedQuantityByVariant(products, tickets), [products, tickets]);
36603
+ const simpleProductQuantity = useMemo(() => {
36604
+ if (!simpleVariant)
36605
+ return 0;
36606
+ const matched = products.find((product) => product.eventProductVariantId === simpleVariant.id);
36607
+ return matched?.quantity ?? 0;
36608
+ }, [products, simpleVariant]);
36609
+ const simpleProductMaxAvailable = useMemo(() => {
36610
+ if (!simpleVariant)
36611
+ return 0;
36612
+ const { quantity, sold } = simpleVariant.productVariant;
36613
+ if (!quantity)
36614
+ return Number.POSITIVE_INFINITY;
36615
+ const used = selectedQuantityByVariant[simpleVariant.id] ?? 0;
36616
+ return quantity - sold - used;
36617
+ }, [simpleVariant, selectedQuantityByVariant]);
36618
+ const onChangeSimpleProductQuantity = (nextQuantity) => {
36619
+ if (!simpleVariant)
36620
+ return;
36621
+ if (nextQuantity < 0 || nextQuantity > 10)
36622
+ return;
36623
+ if (nextQuantity > simpleProductQuantity &&
36624
+ nextQuantity - simpleProductQuantity > simpleProductMaxAvailable)
36625
+ return;
36626
+ onSelectVariant({
36627
+ eventProductVariantId: simpleVariant.id,
36628
+ productVariantId: simpleVariant.productVariant.id,
36629
+ quantity: nextQuantity,
36630
+ price: simpleVariant.priceWithVat,
36631
+ excludedShippingMethodIds: eventProduct.excludedShippingMethods.map((method) => method.id),
36632
+ });
36633
+ };
36634
+ const simpleProductQuantityControl = simpleProductQuantity > 0 ? (React.createElement(Stack, { direction: "row", spacing: 1, alignItems: "center", width: "100%" },
36635
+ React.createElement(IconButton, { onClick: () => onChangeSimpleProductQuantity(simpleProductQuantity - 1), disabled: simpleProductQuantity <= 0, sx: {
36636
+ flex: '1 1 0',
36637
+ height: 36,
36638
+ p: 0,
36639
+ borderRadius: 1,
36640
+ border: '1px solid',
36641
+ borderColor: 'grey.300',
36642
+ display: 'flex',
36643
+ alignItems: 'center',
36644
+ justifyContent: 'center',
36645
+ } },
36646
+ React.createElement(Iconify, { icon: "eva:minus-fill", width: 18, height: 18 })),
36647
+ React.createElement(Box, { sx: {
36648
+ flex: '1 1 0',
36649
+ height: 36,
36650
+ borderRadius: 1,
36651
+ border: '1px solid',
36652
+ borderColor: 'grey.300',
36653
+ display: 'flex',
36654
+ alignItems: 'center',
36655
+ justifyContent: 'center',
36656
+ fontWeight: 700,
36657
+ } }, simpleProductQuantity),
36658
+ React.createElement(IconButton, { onClick: () => onChangeSimpleProductQuantity(simpleProductQuantity + 1), disabled: simpleProductQuantity >= 10 || simpleProductMaxAvailable <= 0, sx: {
36659
+ flex: '1 1 0',
36660
+ height: 36,
36661
+ p: 0,
36662
+ borderRadius: 1,
36663
+ bgcolor: 'primary.main',
36664
+ color: 'primary.contrastText',
36665
+ '&:hover': { bgcolor: 'primary.dark' },
36666
+ '&.Mui-disabled': {
36667
+ bgcolor: 'action.disabledBackground',
36668
+ color: 'action.disabled',
36669
+ },
36670
+ } },
36671
+ React.createElement(Iconify, { icon: "eva:plus-fill", width: 18, height: 18 })))) : (React.createElement(Button, { variant: "contained", onClick: () => onChangeSimpleProductQuantity(1), disabled: simpleProductMaxAvailable <= 0, fullWidth: true }, t('add')));
34571
36672
  return (React.createElement(React.Fragment, null,
34572
- React.createElement(Card, { sx: { p: 2 } },
34573
- React.createElement(Stack, { spacing: 1 },
34574
- React.createElement(Image, { src: eventProduct.product.previewImage.url, ratio: "1/1", sx: { borderRadius: 2 } }),
34575
- React.createElement(Typography, { variant: "h5" }, eventProduct.product.name),
34576
- React.createElement(Typography, { variant: "caption", dangerouslySetInnerHTML: { __html: eventProduct.product.description }, sx: {
34577
- height: 44,
34578
- textOverflow: 'ellipsis',
34579
- overflow: 'hidden',
34580
- display: '-webkit-box',
34581
- WebkitLineClamp: 2,
34582
- WebkitBoxOrient: 'vertical',
34583
- } }),
34584
- React.createElement(Button, { variant: "contained", onClick: () => setOpenVariantDialog(true), fullWidth: true, startIcon: eventNotEmpty ? React.createElement(Iconify, { icon: "eva:edit-fill" }) : React.createElement(Iconify, { icon: "eva:plus-fill" }) }, eventNotEmpty ? t('change') : t('add')))),
34585
- React.createElement(ProductVariantsDialog, { eventProduct: eventProduct, eventId: eventId, openDialog: openVariantDialog, onClose: () => setOpenVariantDialog(false), callback: onSelectVariant, selectedQuantityByVariant: getSelectedQuantityByVariant(products, tickets), isOnlyMerchandise: isOnlyMerchandise })));
36673
+ React.createElement(Card, { sx: {
36674
+ p: 0,
36675
+ borderRadius: 0,
36676
+ boxShadow: 'none',
36677
+ background: 'none',
36678
+ } },
36679
+ React.createElement(Stack, { spacing: 0 },
36680
+ React.createElement(Image, { src: eventProduct.product.previewImage.url, ratio: "21/9", sx: { borderRadius: 1, maxHeight: 96 } }),
36681
+ React.createElement(Typography, { variant: "h5", sx: { fontSize: '14px', fontWeight: 700 } }, eventProduct.product.name),
36682
+ React.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", spacing: 1 },
36683
+ React.createElement(Typography, { variant: "body2", color: "text.primary" }, eventProduct.product.priceWithVat > 0
36684
+ ? fCurrency(eventProduct.product.priceWithVat, lang, eventProduct.product.currency)
36685
+ : t('free')),
36686
+ isSimpleProduct && (React.createElement(Link, { onClick: () => setOpenSimpleProductDialog(true), color: "inherit", underline: "always", fontSize: 12 }, t('more_info')))),
36687
+ isSimpleProduct ? (simpleProductQuantityControl) : (React.createElement(Button, { variant: eventNotEmpty ? 'contained' : 'outlined', onClick: () => setOpenVariantDialog(true), fullWidth: true, sx: {
36688
+ color: eventNotEmpty ? (theme) => theme.palette.common.white : 'inherit',
36689
+ borderColor: (theme) => theme.palette.grey[300],
36690
+ } }, eventNotEmpty
36691
+ ? t('event.tickets.merchandise.show_added')
36692
+ : t('event.tickets.merchandise.show_sizes'))))),
36693
+ React.createElement(ProductVariantsDialog, { eventProduct: eventProduct, eventId: eventId, openDialog: openVariantDialog && !isSimpleProduct, onClose: () => setOpenVariantDialog(false), callback: onSelectVariant, selectedQuantityByVariant: selectedQuantityByVariant, isOnlyMerchandise: isOnlyMerchandise }),
36694
+ React.createElement(Dialog, { open: openSimpleProductDialog && isSimpleProduct, onClose: () => setOpenSimpleProductDialog(false), fullWidth: true, maxWidth: "sm" },
36695
+ React.createElement(DialogTitle, { sx: {
36696
+ textAlign: 'center',
36697
+ fontWeight: 700,
36698
+ fontSize: { xs: '1.5rem', sm: '2rem' },
36699
+ mb: 2,
36700
+ } }, eventProduct.product.name),
36701
+ React.createElement(DialogContent, { sx: { pb: 0 } },
36702
+ React.createElement(Stack, { spacing: 2 },
36703
+ React.createElement(Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: eventProduct.product.description } }),
36704
+ React.createElement(Typography, { variant: "body1", color: "text.primary" }, eventProduct.product.priceWithVat > 0
36705
+ ? fCurrency(eventProduct.product.priceWithVat, lang, eventProduct.product.currency)
36706
+ : t('free')))),
36707
+ React.createElement(DialogActions, { sx: { px: 3, pb: 3 } },
36708
+ React.createElement(Stack, { spacing: 1, width: "100%" },
36709
+ simpleProductQuantityControl,
36710
+ React.createElement(Button, { variant: "outlined", onClick: () => setOpenSimpleProductDialog(false), fullWidth: true, sx: {
36711
+ color: 'inherit',
36712
+ borderColor: (theme) => theme.palette.grey[300],
36713
+ } }, t('close')))))));
34586
36714
  };
34587
36715
 
34588
- const CustomSkeleton = ({ sx, ...other }) => (React.createElement(Skeleton, { ...other, sx: {
34589
- transform: 'none',
34590
- borderRadius: 1,
34591
- ...sx,
34592
- } }));
36716
+ const MerchandiseSlider = ({ eventProducts, eventId, sx }) => {
36717
+ const [emblaRef] = useEmblaCarousel();
36718
+ const theme = useTheme();
36719
+ return (React.createElement(Box, { sx: sx },
36720
+ React.createElement(Box, { sx: {
36721
+ overflow: 'hidden',
36722
+ padding: theme.spacing(8, 3),
36723
+ margin: theme.spacing(-8, -2.5),
36724
+ } },
36725
+ React.createElement(Box, { ref: emblaRef, className: "embla", sx: { overflow: 'visible' } },
36726
+ React.createElement(Box, { className: "embla__container", sx: {
36727
+ display: 'flex',
36728
+ } }, eventProducts.map((eventProduct, index) => (React.createElement(Box, { key: `event-slide-${index}`, className: "embla__slide", sx: {
36729
+ flex: `0 0 ${eventProducts.length > 1 ? '78%' : '100%'}`,
36730
+ minWidth: 0,
36731
+ maxWidth: 220,
36732
+ margin: `0 ${theme.spacing(0.5)}`,
36733
+ transition: 'opacity 0.2s ease',
36734
+ [theme.breakpoints.up('sm')]: {
36735
+ flex: '0 0 43%',
36736
+ },
36737
+ [theme.breakpoints.up('md')]: {
36738
+ flex: '0 0 33.3333%',
36739
+ },
36740
+ } },
36741
+ React.createElement(ProductCard, { eventProduct: eventProduct, eventId: eventId, isOnlyMerchandise: true })))))))));
36742
+ };
34593
36743
 
34594
- const MerchandiseSelection = ({ eventProducts, eventId, isLoading }) => (React.createElement(Grid, { container: true, spacing: 3 }, isLoading
34595
- ? [...Array(3)].map((item) => (React.createElement(Grid, { key: item, size: { xs: 12, md: 4 } },
34596
- React.createElement(CustomSkeleton, { height: 334 }))))
34597
- : eventProducts.map((eventProduct) => (React.createElement(Grid, { key: eventProduct.id, size: { xs: 12, md: 4 } },
34598
- React.createElement(ProductCard, { eventProduct: eventProduct, eventId: eventId, isOnlyMerchandise: true }))))));
36744
+ const MerchandiseSelection = ({ eventProducts, eventId, isLoading }) => isLoading ? ([...Array(3)].map((item) => (React.createElement(Grid, { key: item, size: { xs: 12, md: 4 } },
36745
+ React.createElement(CustomSkeleton, { height: 334 }))))) : (React.createElement(MerchandiseSlider, { eventProducts: eventProducts, eventId: eventId }));
34599
36746
 
34600
36747
  const ReleaseWithMerchandise = ({ eventId, release, activeReleases, currency, index, }) => {
34601
36748
  const { t, lang } = useGlobal();
34602
36749
  const [openVariantDialog, setOpenVariantDialog] = useState(null);
36750
+ const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);
34603
36751
  const { setValue } = useFormContext();
34604
36752
  const tickets = useWatch({ name: `tickets.${eventId}`, defaultValue: [] });
34605
36753
  const products = useWatch({ name: `products.${eventId}`, defaultValue: [] });
34606
36754
  const addedRelease = tickets.find((ticket) => ticket.releaseId === release.id);
34607
36755
  const countTickets = addedRelease?.quantity || 0;
34608
- const isReleaseSelected = (id) => !!tickets.find((ticket) => ticket.releaseId === id);
36756
+ const getReleaseTitle = (release) => release.releaseCategoryName || release.name || '';
34609
36757
  const getSelectedQuantity = (id) => tickets.find((ticket) => ticket.releaseId === id)?.quantity || 0;
34610
36758
  const getAvailableTicketsForRelease = (release) => {
34611
36759
  const selectedRelease = activeReleases?.find((item) => item.id === release.releaseId);
@@ -34618,45 +36766,52 @@ const ReleaseWithMerchandise = ({ eventId, release, activeReleases, currency, in
34618
36766
  return false;
34619
36767
  return getSelectedQuantity(releaseId) >= getAvailableTicketsForRelease(release);
34620
36768
  };
34621
- const addRelease = (product) => {
36769
+ const addRelease = (productsToAdd) => {
36770
+ const normalizedProducts = productsToAdd ?? [];
36771
+ const quantity = normalizedProducts.length ? normalizedProducts.length : 1;
36772
+ const extraFields = release.extraFields?.length
36773
+ ? Array.from({ length: quantity }, () => release.extraFields.map((field) => ({
36774
+ eventExtraFieldId: field.id,
36775
+ value: '',
36776
+ })))
36777
+ : [];
34622
36778
  setValue(`tickets.${eventId}`, [
34623
36779
  ...tickets,
34624
36780
  {
34625
36781
  releaseId: release.id,
34626
- quantity: 1,
36782
+ quantity,
34627
36783
  itemName: '',
34628
36784
  price: 0,
34629
- products: product ? [product] : [],
34630
- extraFields: release.extraFields?.length
34631
- ? [
34632
- release.extraFields.map((field) => ({
34633
- eventExtraFieldId: field.id,
34634
- value: '',
34635
- })),
34636
- ]
34637
- : [],
36785
+ products: normalizedProducts,
36786
+ extraFields,
34638
36787
  },
34639
36788
  ]);
34640
36789
  setOpenVariantDialog(null);
34641
36790
  };
34642
- const increaseQuantity = (product) => {
36791
+ const increaseQuantity = (productsToAdd) => {
36792
+ const normalizedProducts = productsToAdd ?? [];
34643
36793
  const addedRelease = tickets.find((ticket) => ticket.releaseId === release.id);
34644
36794
  if (addedRelease) {
34645
- const newQuantity = Number(addedRelease.quantity) + 1;
36795
+ const increment = normalizedProducts.length ? normalizedProducts.length : 1;
34646
36796
  const maxQuantity = getAvailableTicketsForRelease(addedRelease);
36797
+ const availableIncrement = Math.max(0, Math.min(increment, maxQuantity - Number(addedRelease.quantity)));
36798
+ if (availableIncrement === 0)
36799
+ return;
36800
+ const newQuantity = Number(addedRelease.quantity) + availableIncrement;
36801
+ const productsSlice = normalizedProducts.slice(0, availableIncrement);
36802
+ const extraFieldsToAdd = release.extraFields?.length
36803
+ ? Array.from({ length: availableIncrement }, () => release.extraFields.map((field) => ({
36804
+ eventExtraFieldId: field.id,
36805
+ value: '',
36806
+ })))
36807
+ : [];
34647
36808
  setValue(`tickets.${eventId}`, tickets.map((ticket) => ticket.releaseId === release.id
34648
36809
  ? {
34649
36810
  ...ticket,
34650
36811
  quantity: newQuantity > maxQuantity ? maxQuantity : newQuantity,
34651
- products: product ? [...ticket.products, product] : ticket.products,
36812
+ products: [...ticket.products, ...productsSlice],
34652
36813
  extraFields: release.extraFields?.length
34653
- ? [
34654
- ...ticket.extraFields,
34655
- release.extraFields.map((field) => ({
34656
- eventExtraFieldId: field.id,
34657
- value: '',
34658
- })),
34659
- ]
36814
+ ? [...ticket.extraFields, ...extraFieldsToAdd]
34660
36815
  : [],
34661
36816
  }
34662
36817
  : ticket));
@@ -34684,36 +36839,29 @@ const ReleaseWithMerchandise = ({ eventId, release, activeReleases, currency, in
34684
36839
  }
34685
36840
  }
34686
36841
  }, [tickets, release.id, setValue]);
34687
- return (React.createElement(Box, null,
34688
- React.createElement(Stack, { direction: "row", spacing: 1 },
34689
- React.createElement(Stack, { direction: "row", spacing: 1, justifyContent: "space-between", alignItems: "center", sx: { width: '100%', backgroundColor: 'grey.200', p: 1, pl: 1.5, borderRadius: 1 } },
34690
- React.createElement(Stack, { direction: "row", spacing: 2, alignItems: "center" },
34691
- React.createElement(Stack, { direction: "row", spacing: 0.5, alignItems: "center" },
34692
- React.createElement(Iconify, { icon: "ion:ticket-outline", color: "primary.main", sx: { width: 24, height: 24 } }),
34693
- release.product && (React.createElement(React.Fragment, null,
34694
- React.createElement(Typography, { fontSize: 20, lineHeight: 1 }, "+"),
34695
- React.createElement(Iconify, { icon: "lucide-lab:shirt-t", color: "primary.main", sx: { width: 24, height: 24 } })))),
34696
- React.createElement(Typography, { color: "grey.500" },
34697
- release.releaseCategoryName,
34698
- " - ",
34699
- release.name,
34700
- " -",
34701
- ' ',
34702
- fCurrency(release.price, lang, currency))),
34703
- isReleaseSelected(release.id) ? (React.createElement(Stack, { direction: "row", spacing: 1, py: 0.5 },
34704
- React.createElement(IconButton, { onClick: () => decreaseQuantity(), size: "small", color: "primary" },
34705
- React.createElement(Iconify, { icon: "eva:minus-fill" })),
34706
- React.createElement(Typography, { color: "grey.500" }, getSelectedQuantity(release.id)),
34707
- React.createElement(IconButton, { onClick: () => release.product ? setOpenVariantDialog('increase') : increaseQuantity(), size: "small", color: "primary", disabled: isMaxQuantity(release.id) },
34708
- React.createElement(Iconify, { icon: "eva:plus-fill" })))) : (React.createElement(Button, { onClick: () => !release.locked && (release.product ? setOpenVariantDialog('add') : addRelease()), variant: "contained", disabled: release.locked }, t('add'))))),
34709
- React.createElement(Typography, { variant: "caption", content: "div", mt: 2, mb: release.extraFields?.length ? 2 : 0, display: "block" }, release.description),
34710
- release.extraFields && release.extraFields.length > 0 && (React.createElement(ReleaseExtraFields, { release: release, eventId: eventId, releaseIndex: index, quantity: countTickets })),
34711
- release.product && (React.createElement(ProductVariantsDialog, { eventProduct: release.product, openDialog: !!openVariantDialog, callback: openVariantDialog === 'increase' ? increaseQuantity : addRelease, onClose: () => setOpenVariantDialog(null), selectedQuantityByVariant: getSelectedQuantityByVariant(products, tickets), eventId: eventId }))));
36842
+ return (React.createElement(Box, { sx: {
36843
+ pt: 1,
36844
+ pr: 0.5,
36845
+ pb: 0.5,
36846
+ pl: 2,
36847
+ borderRadius: 1,
36848
+ bgcolor: (theme) => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[800],
36849
+ } },
36850
+ React.createElement(Stack, { spacing: 0 },
36851
+ React.createElement(Box, null,
36852
+ React.createElement(Typography, { variant: "subtitle2", fontWeight: 700 }, getReleaseTitle(release))),
36853
+ React.createElement(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between" },
36854
+ React.createElement(Stack, null,
36855
+ React.createElement(Typography, { variant: "body2" }, release.price === 0 ? t('free') : fCurrency(release.price, lang, currency)),
36856
+ React.createElement(ReleaseDescription, { description: release.description, isExpanded: isDescriptionExpanded, onToggle: () => setIsDescriptionExpanded((prev) => !prev), moreInfoLabel: t('more_info') })),
36857
+ React.createElement(TicketQuantityControl, { quantity: getSelectedQuantity(release.id), isDisabled: release.locked, canAddFirst: !release.locked, canAddMore: !isMaxQuantity(release.id), addLabel: t('add'), onDecrement: () => decreaseQuantity(), onIncrement: () => release.product ? setOpenVariantDialog('increase') : increaseQuantity(), onAddFirst: () => (release.product ? setOpenVariantDialog('add') : addRelease()) })),
36858
+ React.createElement(ReleaseDescription, { description: release.description, isExpanded: isDescriptionExpanded, onToggle: () => setIsDescriptionExpanded((prev) => !prev), moreInfoLabel: t('more_info'), showCollapse: true }),
36859
+ release.extraFields && release.extraFields.length > 0 && (React.createElement(ReleaseExtraFields, { release: release, eventId: eventId, releaseIndex: index, quantity: countTickets })),
36860
+ release.product && (React.createElement(ProductVariantsDialog, { eventProduct: release.product, openDialog: !!openVariantDialog, callback: openVariantDialog === 'increase' ? increaseQuantity : addRelease, onClose: () => setOpenVariantDialog(null), selectedQuantityByVariant: getSelectedQuantityByVariant(products, tickets), eventId: eventId, canAddOnlyOneAtATime: true })))));
34712
36861
  };
34713
36862
 
34714
36863
  const TicketWithMerchandiseSelection = ({ event }) => {
34715
36864
  const { t } = useGlobal();
34716
- const isMobile = useResponsive('down', 'md');
34717
36865
  const { setValue, watch } = useFormContext();
34718
36866
  const tickets = useWatch({ name: `tickets.${event.id}`, defaultValue: [] });
34719
36867
  const eventTimeslotId = watch('eventTimeslotId');
@@ -34801,7 +36949,7 @@ const TicketWithMerchandiseSelection = ({ event }) => {
34801
36949
  }
34802
36950
  }
34803
36951
  };
34804
- return (React.createElement(Stack, { spacing: 3, direction: "column", divider: React.createElement(Divider, { sx: { borderStyle: 'dashed' } }) },
36952
+ return (React.createElement(Stack, { spacing: 1, direction: "column" },
34805
36953
  !activeReleases && event.type !== EventType.RECURRING ? (React.createElement(Skeleton, { variant: "rounded", sx: {
34806
36954
  width: '100%',
34807
36955
  height: (theme) => theme.spacing(7.5),
@@ -34811,8 +36959,7 @@ const TicketWithMerchandiseSelection = ({ event }) => {
34811
36959
  React.createElement(Box, null,
34812
36960
  React.createElement(Typography, { variant: "caption", component: "div", fontStyle: "italic", mb: 2 },
34813
36961
  "*",
34814
- t('event.tickets.stepper.1.max_ticket_quantity')),
34815
- isMobile && React.createElement(FeeBox, { event: event, align: "right" }))));
36962
+ t('event.tickets.stepper.1.max_ticket_quantity')))));
34816
36963
  };
34817
36964
 
34818
36965
  function useEventShippingMethods(id, filters) {
@@ -34869,7 +37016,6 @@ const Shipping = ({ event }) => {
34869
37016
  });
34870
37017
  const flatProducts = useMemo(() => Object.values(products).flat(), [products]);
34871
37018
  const shippingMethodId = watch('shipping.shippingMethodId');
34872
- const branchId = watch('shipping.branchId');
34873
37019
  const [displayBranchName, setDisplayBranchName] = useState(null);
34874
37020
  const [firstRender, setFirstRender] = useState(true);
34875
37021
  const filteredShippingMethods = useMemo(() => shippingMethods?.filter((shippingMethod) => !flatProducts?.find((product) => product.excludedShippingMethodIds?.includes(shippingMethod?.id)) &&
@@ -34889,9 +37035,20 @@ const Shipping = ({ event }) => {
34889
37035
  setDisplayBranchName(null);
34890
37036
  }
34891
37037
  };
37038
+ const openPacketaWidget = () => {
37039
+ const interval = setInterval(() => {
37040
+ if (window.Packeta && window.Packeta.Widget) {
37041
+ clearInterval(interval);
37042
+ window.Packeta.Widget.pick(options?.packetaApiKey, onSelectBranch, {
37043
+ language: lang,
37044
+ });
37045
+ }
37046
+ }, 100);
37047
+ };
34892
37048
  const handleChangeBranch = () => {
34893
37049
  setValue('shipping.branchId', null);
34894
37050
  setDisplayBranchName(null);
37051
+ openPacketaWidget();
34895
37052
  };
34896
37053
  useEffect(() => {
34897
37054
  if (firstRender && filteredShippingMethods.length === 1) {
@@ -34903,19 +37060,7 @@ const Shipping = ({ event }) => {
34903
37060
  const selectedShippingMethod = shippingMethods.find((method) => method.id === Number(shippingMethodId));
34904
37061
  if (selectedShippingMethod) {
34905
37062
  setValue('shipping.price', selectedShippingMethod.price);
34906
- if (selectedShippingMethod.type === ShippingTypes.PACKETA) {
34907
- if (!branchId) {
34908
- const interval = setInterval(() => {
34909
- if (window.Packeta && window.Packeta.Widget) {
34910
- clearInterval(interval);
34911
- window.Packeta.Widget.pick(options?.packetaApiKey, onSelectBranch, {
34912
- language: lang,
34913
- });
34914
- }
34915
- }, 100);
34916
- }
34917
- }
34918
- else {
37063
+ if (selectedShippingMethod.type !== ShippingTypes.PACKETA) {
34919
37064
  setValue('shipping.branchId', null);
34920
37065
  setDisplayBranchName(null);
34921
37066
  }
@@ -34923,34 +37068,43 @@ const Shipping = ({ event }) => {
34923
37068
  else {
34924
37069
  setValue('shipping.price', 0);
34925
37070
  }
34926
- }, [shippingMethodId, shippingMethods, branchId]);
37071
+ }, [shippingMethodId, shippingMethods]);
34927
37072
  return (React.createElement(React.Fragment, null,
34928
37073
  React.createElement(ScriptLoader, null),
34929
- React.createElement("div", null, isLoading ? (React.createElement(ShippingSkeleton, null)) : (React.createElement(React.Fragment, null, filteredShippingMethods.length === 0 ? (React.createElement(Typography, { variant: "h4", color: "error" }, t('event.tickets.stepper.5.error'))) : (React.createElement(Controller, { name: "shipping.shippingMethodId", control: control, render: ({ field, fieldState: { error } }) => (React.createElement(FormControl, { component: "fieldset", sx: { width: '100%' } },
34930
- React.createElement(RadioGroup, { ...field }, filteredShippingMethods.map((shippingMethod) => (React.createElement(ShippingMethodItem, { key: shippingMethod.id, active: Number(shippingMethodId) === shippingMethod.id },
34931
- React.createElement(FormControlLabel, { value: shippingMethod.id, control: React.createElement(Radio, null), label: React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", width: "100%" },
34932
- React.createElement(Stack, { direction: "row", alignItems: "center" },
34933
- React.createElement(Box, { sx: {
34934
- marginRight: 2,
34935
- } },
34936
- React.createElement(Typography, { sx: { lineHeight: 1.2 } }, t(`shipping_method.types.${shippingMethod.type}`)),
37074
+ React.createElement("div", null, isLoading ? (React.createElement(ShippingSkeleton, null)) : (React.createElement(React.Fragment, null, filteredShippingMethods.length === 0 ? (React.createElement(Typography, { variant: "h4", color: "error" }, t('event.tickets.stepper.5.error'))) : (React.createElement(React.Fragment, null,
37075
+ React.createElement(Controller, { name: "shipping.shippingMethodId", control: control, render: ({ field, fieldState: { error } }) => (React.createElement(FormControl, { component: "fieldset", sx: { width: '100%' } },
37076
+ React.createElement(RadioGroup, { ...field, onChange: (event, value) => {
37077
+ field.onChange(event);
37078
+ const selectedShippingMethod = filteredShippingMethods.find((method) => method.id === Number(value));
37079
+ if (selectedShippingMethod?.type === ShippingTypes.PACKETA) {
37080
+ openPacketaWidget();
37081
+ }
37082
+ } }, filteredShippingMethods.map((shippingMethod) => (React.createElement(ShippingMethodItem, { key: shippingMethod.id, active: Number(shippingMethodId) === shippingMethod.id, hasError: !!error, sx: {
37083
+ '& .MuiFormControlLabel-labelPlacementEnd': {
37084
+ mr: 0,
37085
+ width: '100%',
37086
+ },
37087
+ } },
37088
+ React.createElement(FormControlLabel, { value: shippingMethod.id, control: React.createElement(Radio, null), label: React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", width: "100%" },
37089
+ React.createElement(Stack, { direction: "column" },
37090
+ React.createElement(Stack, { direction: "row", alignItems: "center", spacing: 1 },
37091
+ React.createElement(Typography, { sx: { lineHeight: 1.2 } }, t(`shipping_method.types.${shippingMethod.type}`)),
37092
+ paymentImages[shippingMethod.type]),
34937
37093
  displayBranchName &&
34938
37094
  shippingMethod.type === ShippingTypes.PACKETA &&
34939
37095
  shippingMethod.id === Number(shippingMethodId) && (React.createElement(Typography, { variant: "caption", sx: { lineHeight: 1 } }, displayBranchName))),
34940
- paymentImages[shippingMethod.type]),
34941
- shippingMethod.type === ShippingTypes.PACKETA &&
34942
- shippingMethod.id === Number(shippingMethodId) &&
34943
- branchId && (React.createElement(Box, null,
34944
- React.createElement(Button, { onClick: handleChangeBranch, variant: "outlined", size: "small" }, t('change'))))), sx: {
34945
- '&:not(:last-of-type)': {
34946
- mb: 0,
34947
- },
34948
- '& .MuiFormControlLabel-label': {
34949
- width: '100%',
34950
- mr: 0,
34951
- },
34952
- } }))))),
34953
- !!error && (React.createElement(FormHelperText, { error: !!error, sx: { mx: 0 } }, error?.message)))) })))))));
37096
+ shippingMethod.type === ShippingTypes.PACKETA &&
37097
+ shippingMethod.id === Number(shippingMethodId) && (React.createElement(Box, null,
37098
+ React.createElement(Button, { onClick: handleChangeBranch, variant: "outlined", size: "small", sx: { px: 1, whiteSpace: 'nowrap' } }, t('event.tickets.shipping.choose_address'))))), sx: {
37099
+ '&:not(:last-of-type)': {
37100
+ mb: 0,
37101
+ },
37102
+ '& .MuiFormControlLabel-label': {
37103
+ width: '100%',
37104
+ mr: 0,
37105
+ },
37106
+ } }))))),
37107
+ !!error && (React.createElement(FormHelperText, { error: !!error, sx: { mx: 0 } }, error?.message)))) }))))))));
34954
37108
  };
34955
37109
 
34956
37110
  const useErrors = (defaultMessage) => {
@@ -35092,7 +37246,70 @@ const TimeslotSelection = ({ event }) => {
35092
37246
  ?.timeslots.map((timeslot) => (React.createElement(Button, { key: timeslot.id, variant: eventTimeslotId === timeslot.id ? 'contained' : 'outlined', onClick: () => setValue('eventTimeslotId', timeslot.id), disabled: timeslot.isSoldOut }, dayjs(timeslot.startDate).format('HH:mm')))))))));
35093
37247
  };
35094
37248
 
35095
- const EVENTLOOK_ORDER_FORM_ID = 'eventlook-order-form';
37249
+ const isFieldError = (value) => !!value && typeof value === 'object' && ('type' in value || 'message' in value);
37250
+ const getFirstError = (errors, parentPath = '') => {
37251
+ for (const [key, value] of Object.entries(errors)) {
37252
+ if (!value) {
37253
+ continue;
37254
+ }
37255
+ const fieldPath = parentPath ? `${parentPath}.${key}` : key;
37256
+ if (isFieldError(value)) {
37257
+ return {
37258
+ name: fieldPath,
37259
+ ref: value.ref instanceof HTMLElement ? value.ref : null,
37260
+ };
37261
+ }
37262
+ if (Array.isArray(value)) {
37263
+ for (let index = 0; index < value.length; index++) {
37264
+ const nestedError = value[index];
37265
+ if (!nestedError) {
37266
+ continue;
37267
+ }
37268
+ const firstNestedError = getFirstError(nestedError, parentPath ? `${parentPath}.${key}.${index}` : `${key}.${index}`);
37269
+ if (firstNestedError) {
37270
+ return firstNestedError;
37271
+ }
37272
+ }
37273
+ }
37274
+ else if (typeof value === 'object') {
37275
+ const firstNestedError = getFirstError(value, fieldPath);
37276
+ if (firstNestedError) {
37277
+ return firstNestedError;
37278
+ }
37279
+ }
37280
+ }
37281
+ return null;
37282
+ };
37283
+ const escapeSelectorValue = (value) => {
37284
+ if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {
37285
+ return CSS.escape(value);
37286
+ }
37287
+ // Fallback: escape all CSS special characters manually
37288
+ return value.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, '\\$1');
37289
+ };
37290
+ function useScrollToFirstError({ setFocus, }) {
37291
+ return useCallback((errors) => {
37292
+ const firstError = getFirstError(errors);
37293
+ if (!firstError) {
37294
+ return;
37295
+ }
37296
+ // Re-query the DOM instead of relying on potentially stale refs
37297
+ const fieldName = String(firstError.name);
37298
+ const scrollTarget = document.querySelector(`[name="${escapeSelectorValue(fieldName)}"]`) ||
37299
+ document.getElementById(fieldName);
37300
+ if (scrollTarget) {
37301
+ scrollTarget.scrollIntoView({
37302
+ behavior: 'smooth',
37303
+ block: 'center',
37304
+ });
37305
+ scrollTarget.focus({ preventScroll: true });
37306
+ }
37307
+ else {
37308
+ // Fallback to RHF's setFocus if no DOM element found
37309
+ setFocus(firstError.name);
37310
+ }
37311
+ }, [setFocus]);
37312
+ }
35096
37313
 
35097
37314
  const ChildEventDialog = ({ event, openDialog, onClose }) => {
35098
37315
  const { t } = useGlobal();
@@ -35200,15 +37417,432 @@ const TicketSelectionMap = ({ event }) => {
35200
37417
  };
35201
37418
  if (!seatingIframeUrl)
35202
37419
  return null;
35203
- return (React.createElement(Button, { variant: "contained", onClick: () => iframe.openPicker({
37420
+ return (React.createElement(Button, { variant: "outlined", onClick: () => iframe.openPicker({
35204
37421
  eventId: String(event.id),
35205
37422
  onSelect,
35206
37423
  baseUrl: seatingIframeUrl,
35207
37424
  clientId: uuid,
35208
- }) }, t('form.labels.open_map')));
37425
+ }), sx: {
37426
+ width: { xs: '100%' },
37427
+ color: 'text.primary',
37428
+ borderColor: (theme) => theme.palette.grey['300'],
37429
+ '& .MuiButton-endIcon': { ml: 0, fontSize: '1.5em' },
37430
+ }, endIcon: React.createElement(Iconify, { icon: "eva:chevron-right-outline" }) }, t('form.labels.open_map')));
37431
+ };
37432
+
37433
+ const swipeAreaWidth = 120;
37434
+ const clearResetPulledPastTimeout = (timeoutRef) => {
37435
+ if (timeoutRef.current !== null) {
37436
+ window.clearTimeout(timeoutRef.current);
37437
+ timeoutRef.current = null;
37438
+ }
37439
+ };
37440
+ const PaymentOverviewDrawer = ({ event, totalPrice, termsAndConditionsRef, onOpenChange, }) => {
37441
+ const { t, lang } = useGlobal();
37442
+ const [isDrawerOpened, setIsDrawerOpened] = useState(false);
37443
+ const [isOpeningGesture, setIsOpeningGesture] = useState(false);
37444
+ const [hasPulledPastClosedTabHeight, setHasPulledPastClosedTabHeight] = useState(false);
37445
+ const [isDrawerHidden, setIsDrawerHidden] = useState(false);
37446
+ const [closedTabHeight, setClosedTabHeight] = useState(0);
37447
+ const openingTouchStartYRef = useRef(null);
37448
+ const openDrawerRef = useRef(false);
37449
+ const isOpeningGestureRef = useRef(false);
37450
+ const shouldReopenOnScrollUpRef = useRef(false);
37451
+ const lastScrollYRef = useRef(0);
37452
+ const isScrollingDownRef = useRef(false);
37453
+ const wasAtPageBottomRef = useRef(false);
37454
+ const resetPulledPastTimeoutRef = useRef(null);
37455
+ const closedTabRef = useRef(null);
37456
+ useEffect(() => {
37457
+ openDrawerRef.current = isDrawerOpened;
37458
+ }, [isDrawerOpened]);
37459
+ useEffect(() => {
37460
+ isOpeningGestureRef.current = isOpeningGesture;
37461
+ }, [isOpeningGesture]);
37462
+ // reopens the drawer when user scrolls up and the drawer was closed by scrolling down to the bottom of the page
37463
+ useEffect(() => {
37464
+ if (typeof window === 'undefined') {
37465
+ return;
37466
+ }
37467
+ const atBottomThreshold = 8;
37468
+ lastScrollYRef.current = window.scrollY;
37469
+ isScrollingDownRef.current = false;
37470
+ wasAtPageBottomRef.current =
37471
+ window.innerHeight + window.scrollY >=
37472
+ document.documentElement.scrollHeight - atBottomThreshold;
37473
+ const handleScroll = () => {
37474
+ const currentY = window.scrollY;
37475
+ const isScrollingUp = currentY < lastScrollYRef.current;
37476
+ const isScrollingDown = currentY > lastScrollYRef.current;
37477
+ const isAtPageBottom = window.innerHeight + currentY >= document.documentElement.scrollHeight - atBottomThreshold;
37478
+ isScrollingDownRef.current = isScrollingDown;
37479
+ if (isScrollingUp &&
37480
+ wasAtPageBottomRef.current &&
37481
+ shouldReopenOnScrollUpRef.current &&
37482
+ !openDrawerRef.current) {
37483
+ shouldReopenOnScrollUpRef.current = false;
37484
+ setIsDrawerHidden(false);
37485
+ openDrawerHandler();
37486
+ }
37487
+ wasAtPageBottomRef.current = isAtPageBottom;
37488
+ lastScrollYRef.current = currentY;
37489
+ };
37490
+ window.addEventListener('scroll', handleScroll, { passive: true });
37491
+ return () => {
37492
+ window.removeEventListener('scroll', handleScroll);
37493
+ };
37494
+ }, []);
37495
+ useEffect(() => {
37496
+ const closedTab = closedTabRef.current;
37497
+ if (!closedTab)
37498
+ return;
37499
+ const updateClosedTabHeight = () => {
37500
+ setClosedTabHeight(closedTab.offsetHeight);
37501
+ };
37502
+ updateClosedTabHeight();
37503
+ const resizeObserver = new ResizeObserver(() => {
37504
+ updateClosedTabHeight();
37505
+ });
37506
+ resizeObserver.observe(closedTab);
37507
+ return () => {
37508
+ resizeObserver.disconnect();
37509
+ };
37510
+ }, []);
37511
+ useEffect(() => () => {
37512
+ clearResetPulledPastTimeout(resetPulledPastTimeoutRef);
37513
+ }, []);
37514
+ useEffect(() => {
37515
+ const termsAndConditionsElement = termsAndConditionsRef?.current;
37516
+ if (!termsAndConditionsElement) {
37517
+ return;
37518
+ }
37519
+ if (!('IntersectionObserver' in window)) {
37520
+ return;
37521
+ }
37522
+ const observer = new IntersectionObserver((entries) => {
37523
+ const entry = entries[0];
37524
+ const hasReachedTermsSection = entry?.isIntersecting ?? false;
37525
+ const shouldAutoCloseDrawer = hasReachedTermsSection;
37526
+ const shouldHideDrawerTab = hasReachedTermsSection && !openDrawerRef.current && !isOpeningGestureRef.current;
37527
+ setIsDrawerHidden(shouldHideDrawerTab);
37528
+ if (shouldAutoCloseDrawer && openDrawerRef.current && isScrollingDownRef.current) {
37529
+ closeDrawerHandler({ shouldReopenOnScrollUp: true });
37530
+ setIsDrawerHidden(true);
37531
+ }
37532
+ }, {
37533
+ root: null,
37534
+ threshold: 0,
37535
+ rootMargin: '0px 0px -40% 0px',
37536
+ });
37537
+ observer.observe(termsAndConditionsElement);
37538
+ return () => {
37539
+ observer.disconnect();
37540
+ };
37541
+ }, [termsAndConditionsRef]);
37542
+ const toggleDrawer = () => {
37543
+ if (openDrawerRef.current) {
37544
+ closeDrawerHandler();
37545
+ return;
37546
+ }
37547
+ openDrawerHandler();
37548
+ };
37549
+ const openDrawerHandler = () => {
37550
+ clearResetPulledPastTimeout(resetPulledPastTimeoutRef);
37551
+ setIsOpeningGesture(false);
37552
+ setHasPulledPastClosedTabHeight(false);
37553
+ openingTouchStartYRef.current = null;
37554
+ shouldReopenOnScrollUpRef.current = false;
37555
+ setIsDrawerOpened(true);
37556
+ onOpenChange?.(true);
37557
+ };
37558
+ const closeDrawerHandler = ({ shouldReopenOnScrollUp = false, } = {}) => {
37559
+ clearResetPulledPastTimeout(resetPulledPastTimeoutRef);
37560
+ setIsOpeningGesture(false);
37561
+ setHasPulledPastClosedTabHeight(false);
37562
+ openingTouchStartYRef.current = null;
37563
+ shouldReopenOnScrollUpRef.current = shouldReopenOnScrollUp;
37564
+ setIsDrawerOpened(false);
37565
+ onOpenChange?.(false);
37566
+ };
37567
+ const scheduleResetPulledPastTimeout = () => {
37568
+ clearResetPulledPastTimeout(resetPulledPastTimeoutRef);
37569
+ resetPulledPastTimeoutRef.current = window.setTimeout(() => {
37570
+ if (!openDrawerRef.current) {
37571
+ setHasPulledPastClosedTabHeight(false);
37572
+ }
37573
+ }, 180);
37574
+ };
37575
+ const handleGestureStart = (startY) => {
37576
+ openingTouchStartYRef.current = startY;
37577
+ setIsOpeningGesture(true);
37578
+ setHasPulledPastClosedTabHeight(false);
37579
+ };
37580
+ const handleGestureMove = (currentY) => {
37581
+ if (!isOpeningGestureRef.current)
37582
+ return;
37583
+ const startY = openingTouchStartYRef.current;
37584
+ if (startY === null || typeof currentY !== 'number')
37585
+ return;
37586
+ const pullDistance = startY - currentY;
37587
+ const currentClosedTabHeight = closedTabRef.current?.offsetHeight ?? 0;
37588
+ setHasPulledPastClosedTabHeight(currentClosedTabHeight > 0 && pullDistance >= currentClosedTabHeight);
37589
+ };
37590
+ const handleGestureCancel = () => {
37591
+ openingTouchStartYRef.current = null;
37592
+ setIsOpeningGesture(false);
37593
+ setHasPulledPastClosedTabHeight(false);
37594
+ };
37595
+ const handleGestureEnd = ({ shouldResetTouchStart = false, } = {}) => {
37596
+ if (shouldResetTouchStart) {
37597
+ openingTouchStartYRef.current = null;
37598
+ }
37599
+ if (!isDrawerOpened) {
37600
+ setIsOpeningGesture(false);
37601
+ scheduleResetPulledPastTimeout();
37602
+ }
37603
+ };
37604
+ return (React.createElement(Box, { sx: { display: { md: 'none' } } },
37605
+ React.createElement(Box, { ref: closedTabRef, sx: {
37606
+ position: 'fixed',
37607
+ bottom: 0,
37608
+ left: 0,
37609
+ right: 0,
37610
+ backgroundColor: (theme) => theme.palette.background.paper,
37611
+ borderTopLeftRadius: isOpeningGesture || isDrawerOpened ? 0 : 16,
37612
+ borderTopRightRadius: isOpeningGesture || isDrawerOpened ? 0 : 16,
37613
+ boxShadow: isOpeningGesture || isDrawerOpened ? 'none' : '0 -8px 10px 2px rgba(0,0,0,0.2)',
37614
+ zIndex: (theme) => theme.zIndex.drawer + 1,
37615
+ opacity: isDrawerHidden ? 0 : 1,
37616
+ transform: isDrawerHidden ? 'translateY(calc(100% + 12px))' : 'translateY(0)',
37617
+ transition: 'opacity 180ms ease, transform 180ms ease, border-radius 120ms ease, box-shadow 120ms ease',
37618
+ pointerEvents: 'none',
37619
+ } },
37620
+ !isDrawerOpened && (React.createElement(Box, { sx: {
37621
+ display: 'flex',
37622
+ justifyContent: 'center',
37623
+ alignItems: 'center',
37624
+ width: '100%',
37625
+ py: 1,
37626
+ } },
37627
+ React.createElement(Box, { sx: {
37628
+ width: 80,
37629
+ height: 6,
37630
+ backgroundColor: (theme) => theme.palette.grey[300],
37631
+ borderRadius: 3,
37632
+ opacity: isOpeningGesture ? 0 : 1,
37633
+ transition: 'opacity 120ms ease',
37634
+ } }))),
37635
+ React.createElement(Box, { role: "button", "aria-label": t('form.labels.payment_overview_open'), onClick: toggleDrawer, onTouchStart: (event) => {
37636
+ handleGestureStart(event.touches[0]?.clientY ?? null);
37637
+ }, onMouseDown: () => {
37638
+ handleGestureStart(null);
37639
+ }, onTouchMove: (event) => {
37640
+ handleGestureMove(event.touches[0]?.clientY);
37641
+ }, onTouchCancel: handleGestureCancel, onTouchEnd: () => {
37642
+ handleGestureEnd({ shouldResetTouchStart: true });
37643
+ }, onMouseUp: () => {
37644
+ handleGestureEnd();
37645
+ }, sx: {
37646
+ width: '100%',
37647
+ px: 2,
37648
+ pb: 2,
37649
+ pointerEvents: isDrawerOpened || isDrawerHidden ? 'none' : 'auto',
37650
+ cursor: 'pointer',
37651
+ } },
37652
+ React.createElement(Typography, { sx: {
37653
+ fontWeight: 'bold',
37654
+ display: 'flex',
37655
+ justifyContent: 'space-between',
37656
+ alignItems: 'center',
37657
+ } },
37658
+ React.createElement("span", null,
37659
+ t('form.labels.total'),
37660
+ ":"),
37661
+ React.createElement("span", null, fCurrency(totalPrice, lang, event.currency))),
37662
+ React.createElement(Button, { type: "submit", form: EVENTLOOK_ORDER_FORM_ID, onClick: (event) => {
37663
+ event.stopPropagation();
37664
+ }, variant: "contained", size: "large", fullWidth: true, sx: { mt: 1, height: { xs: 36, md: 40 } } }, t('buy')))),
37665
+ React.createElement(SwipeableDrawer, { anchor: "bottom", open: isDrawerOpened, onClose: () => closeDrawerHandler(), onOpen: () => openDrawerHandler(), swipeAreaWidth: swipeAreaWidth, allowSwipeInChildren: true, disableSwipeToOpen: isDrawerHidden, keepMounted: true, SwipeAreaProps: {
37666
+ onTouchStart: (event) => {
37667
+ handleGestureStart(event.touches[0]?.clientY ?? null);
37668
+ },
37669
+ onMouseDown: () => {
37670
+ handleGestureStart(null);
37671
+ },
37672
+ onTouchMove: (event) => {
37673
+ handleGestureMove(event.touches[0]?.clientY);
37674
+ },
37675
+ onTouchCancel: handleGestureCancel,
37676
+ onTouchEnd: () => {
37677
+ handleGestureEnd({ shouldResetTouchStart: true });
37678
+ },
37679
+ onMouseUp: () => {
37680
+ handleGestureEnd();
37681
+ },
37682
+ }, sx: {
37683
+ display: { md: 'none' },
37684
+ pointerEvents: isDrawerOpened ? 'none' : 'auto',
37685
+ '& .MuiDrawer-paper': {
37686
+ pointerEvents: 'auto',
37687
+ },
37688
+ '& .MuiSwipeArea-root': {
37689
+ pointerEvents: 'auto',
37690
+ },
37691
+ }, ModalProps: {
37692
+ disableScrollLock: true,
37693
+ keepMounted: false,
37694
+ disableAutoFocus: true,
37695
+ disableRestoreFocus: true,
37696
+ disableEnforceFocus: true,
37697
+ BackdropProps: {
37698
+ sx: {
37699
+ background: 'none',
37700
+ pointerEvents: 'none',
37701
+ },
37702
+ },
37703
+ }, PaperProps: {
37704
+ sx: {
37705
+ borderTopLeftRadius: 16,
37706
+ borderTopRightRadius: 16,
37707
+ boxShadow: '0 -8px 10px 2px rgba(0,0,0,0.2)',
37708
+ overflow: 'hidden',
37709
+ mb: isDrawerOpened ||
37710
+ (!isDrawerOpened && (isOpeningGesture || hasPulledPastClosedTabHeight))
37711
+ ? `${closedTabHeight}px`
37712
+ : 0,
37713
+ transition: 'none',
37714
+ },
37715
+ } },
37716
+ React.createElement(Box, { role: "button", "aria-label": t('form.labels.payment_overview_close'), onClick: toggleDrawer, sx: {
37717
+ display: 'flex',
37718
+ justifyContent: 'center',
37719
+ alignItems: 'center',
37720
+ backgroundColor: (theme) => theme.palette.background.paper,
37721
+ cursor: 'pointer',
37722
+ py: 1,
37723
+ } },
37724
+ React.createElement(Box, { sx: {
37725
+ width: 80,
37726
+ height: 6,
37727
+ backgroundColor: (theme) => theme.palette.grey[300],
37728
+ borderRadius: 3,
37729
+ } })),
37730
+ React.createElement(Box, { sx: {
37731
+ height: '100%',
37732
+ overflow: 'auto',
37733
+ } },
37734
+ React.createElement(PaymentOverviewBox, { event: event, hideBuyButton: true })))));
37735
+ };
37736
+
37737
+ const BorderedCheckbox = ({ name, disabled, title, price, onChange, }) => {
37738
+ const { control } = useFormContext();
37739
+ return (React.createElement(Controller, { name: name, control: control, render: ({ field }) => (React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { ...field, checked: field.value || false, onChange: (e) => {
37740
+ onChange?.(e);
37741
+ if (!e.defaultPrevented) {
37742
+ field.onChange(e);
37743
+ }
37744
+ }, disabled: disabled }), label: React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%', pr: 1 } },
37745
+ React.createElement(Typography, { variant: "body2", fontWeight: 400 }, title),
37746
+ React.createElement(Typography, { variant: "body2", fontWeight: 700, sx: { whiteSpace: 'nowrap' } }, price)), sx: {
37747
+ m: 0,
37748
+ px: 1,
37749
+ pr: 0.5,
37750
+ pl: 0,
37751
+ borderRadius: 1,
37752
+ width: '100%',
37753
+ border: '1px solid',
37754
+ borderColor: 'primary.main',
37755
+ '& .MuiFormControlLabel-label': {
37756
+ width: '100%',
37757
+ },
37758
+ } })) }));
37759
+ };
37760
+ const Services = ({ event }) => {
37761
+ const { t, lang, showSnackbar } = useGlobal();
37762
+ const [open, setOpen] = useState(false);
37763
+ Number(useWatch({
37764
+ name: 'ticketInsurancePricePerUnit',
37765
+ defaultValue: 0,
37766
+ }) || 0);
37767
+ const smsNotificationPrice = Number(useWatch({
37768
+ name: 'smsNotificationPrice',
37769
+ defaultValue: 0,
37770
+ }) || 0);
37771
+ const tickets = useWatch({
37772
+ name: 'tickets',
37773
+ defaultValue: {},
37774
+ });
37775
+ const totalTickets = useMemo(() => {
37776
+ const items = Object.values(tickets || {}).flat();
37777
+ return items.reduce((sum, ticket) => sum + (Number(ticket.quantity) || 0), 0);
37778
+ }, [tickets]);
37779
+ const handleOpen = (e) => {
37780
+ e.preventDefault();
37781
+ setOpen(true);
37782
+ };
37783
+ const handleClose = () => setOpen(false);
37784
+ const handleServiceChange = (e) => {
37785
+ if (totalTickets <= 0) {
37786
+ e.preventDefault();
37787
+ showSnackbar(t('event.tickets.services.add_tickets_first'), {
37788
+ variant: 'error',
37789
+ });
37790
+ }
37791
+ };
37792
+ return (React.createElement(Stack, { spacing: 1 },
37793
+ React.createElement(BorderedCheckbox, { name: "smsNotification", disabled: false, title: t('event.tickets.sms_notification.label'), price: React.createElement(React.Fragment, null,
37794
+ "+ ",
37795
+ fCurrency(smsNotificationPrice, lang, event.currency)), onChange: handleServiceChange }),
37796
+ React.createElement(Box, { sx: { display: 'flex', justifyContent: 'flex-end' } },
37797
+ React.createElement(Link, { variant: "body2", underline: "always", onClick: handleOpen, color: 'text.primary' }, t('event.tickets.stepper.8.additional_info'))),
37798
+ React.createElement(Dialog, { open: open, onClose: handleClose, maxWidth: "sm", fullWidth: true, PaperProps: {
37799
+ sx: {
37800
+ borderRadius: 4,
37801
+ overflow: 'hidden',
37802
+ },
37803
+ } },
37804
+ React.createElement(DialogTitle, { sx: {
37805
+ position: 'relative',
37806
+ textAlign: 'center',
37807
+ fontWeight: 700,
37808
+ fontSize: { xs: '1.5rem', sm: '1.75rem' },
37809
+ pt: { xs: 3.5, sm: 4 },
37810
+ pb: { xs: 2, sm: 2.5 },
37811
+ px: { xs: 3, sm: 4 },
37812
+ } },
37813
+ t('event.tickets.stepper.8.title'),
37814
+ ":",
37815
+ React.createElement(IconButton, { onClick: handleClose, size: "small", sx: { position: 'absolute', right: 16, top: 16 } },
37816
+ React.createElement(Iconify, { icon: "carbon:close" }))),
37817
+ React.createElement(DialogContent, { sx: { px: { xs: 3, sm: 4 }, pb: { xs: 4, sm: 5 } } },
37818
+ React.createElement(Stack, { spacing: 3 },
37819
+ React.createElement(Box, null,
37820
+ React.createElement(Typography, { variant: "subtitle2", fontWeight: 700, gutterBottom: true }, t('event.tickets.sms_notification.label')),
37821
+ React.createElement(Typography, { variant: "body2", paragraph: true }, t('event.tickets.sms_notification.modal.description')),
37822
+ React.createElement(BorderedCheckbox, { name: "smsNotification", disabled: false, title: t('event.tickets.sms_notification.label'), price: React.createElement(React.Fragment, null,
37823
+ "+ ",
37824
+ fCurrency(smsNotificationPrice, lang, event.currency)), onChange: handleServiceChange })),
37825
+ React.createElement(Button, { variant: "outlined", onClick: handleClose, sx: {
37826
+ mt: 1,
37827
+ py: 1.25,
37828
+ borderRadius: 1,
37829
+ height: 36,
37830
+ fontWeight: 700,
37831
+ borderColor: 'grey.300',
37832
+ color: 'text.primary',
37833
+ } }, t('close')))))));
35209
37834
  };
35210
37835
 
35211
- const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInline, }) => {
37836
+ const getCartUniqueItemCount = (formValues) => {
37837
+ const flatTickets = Object.values(formValues.tickets ?? {}).flat();
37838
+ const ticketsCount = flatTickets.reduce((sum, ticket) => sum + (Number(ticket.quantity) > 0 ? 1 : 0), 0);
37839
+ const ticketsWithProductsCount = flatTickets.reduce((sum, ticket) => sum + ((ticket.products?.length ?? 0) > 0 ? 1 : 0), 0);
37840
+ const productsCount = Object.values(formValues.products ?? {})
37841
+ .flat()
37842
+ .reduce((sum, product) => sum + (Number(product.quantity) || 0), 0);
37843
+ return ticketsCount + ticketsWithProductsCount + productsCount;
37844
+ };
37845
+ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInline, headerSlot, }) => {
35212
37846
  const { t, setGlobal, callbacks, links, user, options, showSnackbar, content, seatingIframeUrl } = useGlobal();
35213
37847
  const { transformErrors } = useErrors(t('event.tickets.error.order'));
35214
37848
  const { data: eventProducts, isLoading } = useActiveEventProducts(event.id);
@@ -35216,12 +37850,14 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35216
37850
  const [hasGopayId, setHasGopayId] = useState(hasGopayIdSsr);
35217
37851
  const [isPaying, setIsPaying] = useState(false);
35218
37852
  const [formStep, setFormStep] = useState(1);
37853
+ const [isPaymentOverviewDrawerOpen, setIsPaymentOverviewDrawerOpen] = useState(false);
35219
37854
  const [showReleaseDate, setShowReleaseDate] = useState(dayjs(event.releaseDate).diff(dayjs()) > 0);
35220
37855
  const [matchIsValidTel, setMatchIsValidTel] = useState(() => false);
35221
37856
  const isNotReleased = dayjs(event.releaseDate).diff(dayjs()) > 0;
35222
37857
  const hasFiredViewCart = useRef(false);
35223
37858
  const hasFiredBeginCheckout = useRef(false);
35224
37859
  const hasFiredPaymentMethod = useRef(false);
37860
+ const termsAndConditionsRef = useRef(null);
35225
37861
  const item = {
35226
37862
  currency: event.currency,
35227
37863
  items: [
@@ -35387,10 +38023,31 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35387
38023
  // }
35388
38024
  // return true;
35389
38025
  // }),
35390
- shipping: create$3().shape({
38026
+ shipping: create$3()
38027
+ .shape({
35391
38028
  shippingMethodId: create$5().nullable(),
35392
38029
  branchId: create$6().nullable(),
35393
38030
  price: create$5(),
38031
+ })
38032
+ .test('shipping-method-required', t('form.validation.required'), function (value) {
38033
+ if (!event.hasMerchandise) {
38034
+ return true;
38035
+ }
38036
+ const formValues = this.parent;
38037
+ const hasProducts = Object.values(formValues.products ?? {}).some((arr) => arr.length > 0);
38038
+ const allTickets = Object.values(formValues.tickets ?? {}).flat();
38039
+ const hasTicketProducts = allTickets.some((ticket) => (ticket.products?.length ?? 0) > 0);
38040
+ const requiresShipping = hasProducts || hasTicketProducts;
38041
+ if (!requiresShipping) {
38042
+ return true;
38043
+ }
38044
+ if (value?.shippingMethodId !== null && value?.shippingMethodId !== undefined) {
38045
+ return true;
38046
+ }
38047
+ return this.createError({
38048
+ path: 'shipping.shippingMethodId',
38049
+ message: t('form.validation.required'),
38050
+ });
35394
38051
  }),
35395
38052
  paymentMethodId: create$5().nullable().required(t('form.validation.required')),
35396
38053
  paymentMethodOptionId: create$5().nullable(),
@@ -35415,12 +38072,10 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35415
38072
  defaultValues,
35416
38073
  });
35417
38074
  const values = methods.watch();
38075
+ const cartItemCount = getCartUniqueItemCount(values);
38076
+ const onInvalid = useScrollToFirstError(methods);
35418
38077
  const onSubmit = async (values) => {
35419
- const allTickets = Object.values(values.tickets).flat();
35420
- if (allTickets.length === 1 &&
35421
- !allTickets[0].releaseId &&
35422
- !allTickets[0].quantity &&
35423
- !values.products.length) {
38078
+ if (cartItemCount <= 0) {
35424
38079
  showSnackbar(t('form.validation.count_tickets_or_products'), {
35425
38080
  variant: 'error',
35426
38081
  });
@@ -35532,7 +38187,7 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35532
38187
  }
35533
38188
  }, [window.location.search]);
35534
38189
  useEffect(() => {
35535
- const subscription = methods.watch((value, { name }) => {
38190
+ const subscription = methods.watch((value) => {
35536
38191
  if (JSON.stringify(defaultValues) !== JSON.stringify(value) &&
35537
38192
  !hasFiredBeginCheckout.current) {
35538
38193
  if (isIframe) {
@@ -35554,7 +38209,7 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35554
38209
  useEffect(() => {
35555
38210
  if (hasGopayId || isPaying || paymentRedirect) {
35556
38211
  if (options?.autoscrollAfterViewChange) {
35557
- const orderForm = document.getElementById(EVENTLOOK_ORDER_FORM_ID);
38212
+ const orderForm = document.getElementById(EVENTLOOK_ORDER_FORM_CONTAINER_ID);
35558
38213
  if (orderForm) {
35559
38214
  orderForm.scrollIntoView({ behavior: 'smooth' });
35560
38215
  }
@@ -35563,46 +38218,65 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35563
38218
  }, [hasGopayId, isPaying, paymentRedirect]);
35564
38219
  if (isIframe && isNotReleased && showReleaseDate)
35565
38220
  return React.createElement(ReleaseCountdown, { event: event, setShowReleaseDate: setShowReleaseDate });
35566
- return (React.createElement(Box, { id: EVENTLOOK_ORDER_FORM_ID }, hasGopayId ? (React.createElement(PaymentSuccess, { setIsPaying: setIsPaying, isIframe: isIframe, pixels: pixels })) : isPaying ? (React.createElement(PaymentPending, null)) : paymentRedirect ? (React.createElement(OrderSuccess, { gwUrl: paymentRedirect, isIframe: isIframe, setIsPaying: setIsPaying, isInline: isInline })) : (
35567
- // @ts-ignore -- FormProvider expects stricter form types
35568
- React.createElement(FormProvider, { methods: methods, onSubmit: methods.handleSubmit(onSubmit) },
35569
- React.createElement(Typography, { className: "overview-card__event-info", display: { md: 'none' }, variant: "h4", sx: {
38221
+ return (React.createElement(Box, { id: EVENTLOOK_ORDER_FORM_CONTAINER_ID }, hasGopayId ? (React.createElement(PaymentSuccess, { setIsPaying: setIsPaying, isIframe: isIframe, pixels: pixels })) : isPaying ? (React.createElement(PaymentPending, null)) : paymentRedirect ? (React.createElement(OrderSuccess, { gwUrl: paymentRedirect, isIframe: isIframe, setIsPaying: setIsPaying, isInline: isInline })) : (React.createElement(FormProvider, { methods: methods,
38222
+ // @ts-ignore
38223
+ onSubmit: methods.handleSubmit(onSubmit, onInvalid), formId: EVENTLOOK_ORDER_FORM_ID },
38224
+ React.createElement(Stack, { className: "overview-card__event-info", display: { md: 'none' }, sx: {
35570
38225
  mb: 2,
35571
38226
  } },
35572
- event.name,
35573
- " - ",
35574
- dayjs(event.startDate).format('DD.MM.YYYY HH:mm')),
35575
- React.createElement(Grid, { container: true, spacing: 2 },
38227
+ React.createElement(Typography, { variant: "h3", component: "h1" }, event.name),
38228
+ React.createElement(Typography, { variant: "h5", component: "h2" }, dayjs(event.startDate).format('DD.MM.YYYY HH:mm')),
38229
+ React.createElement(Typography, { variant: "body2", mt: 1 }, getPlaceAsString(event.place)),
38230
+ headerSlot ? React.createElement(React.Fragment, null, headerSlot) : null),
38231
+ React.createElement(Grid, { container: true, spacing: 2, sx: {
38232
+ pb: {
38233
+ xs: isPaymentOverviewDrawerOpen ? cartItemCount * 4 + 18 : 0,
38234
+ md: 0,
38235
+ },
38236
+ } },
35576
38237
  React.createElement(Grid, { size: { xs: 12, md: 8 } },
35577
- React.createElement(Stepper, { orientation: "vertical" },
38238
+ React.createElement(Stepper, { orientation: "vertical", sx: (theme) => ({
38239
+ [theme.breakpoints.down('sm')]: {
38240
+ '& .MuiStepContent-root': {
38241
+ borderLeftWidth: 0,
38242
+ paddingLeft: 0,
38243
+ marginLeft: 0,
38244
+ },
38245
+ '& .MuiStepConnector-line': { borderLeftWidth: 0 },
38246
+ },
38247
+ }) },
35578
38248
  event.type === EventType.RECURRING && (React.createElement(Step, { active: true },
35579
38249
  React.createElement(StepLabel, null, t('event.tickets.stepper.6.title')),
35580
- React.createElement(StepContent, null,
38250
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35581
38251
  React.createElement(TimeslotSelection, { event: event })))),
35582
38252
  React.createElement(Step, { active: true },
35583
38253
  React.createElement(StepLabel, null, t('event.tickets.stepper.1.title')),
35584
- React.createElement(StepContent, null, event.mapId && seatingIframeUrl ? (React.createElement(TicketSelectionMap, { event: event })) : event.hasMerchandise ? (React.createElement(TicketWithMerchandiseSelection, { event: event })) : (React.createElement(TicketSelection, { event: event })))),
38254
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } }, event.mapId && seatingIframeUrl ? (React.createElement(TicketSelectionMap, { event: event })) : event.hasMerchandise ? (React.createElement(TicketWithMerchandiseSelection, { event: event })) : (React.createElement(TicketSelection, { event: event })))),
35585
38255
  event.hasMerchandise && eventProducts.length && (React.createElement(Step, { active: true },
35586
38256
  React.createElement(StepLabel, null, t('event.tickets.stepper.4.title')),
35587
- React.createElement(StepContent, null,
38257
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35588
38258
  React.createElement(MerchandiseSelection, { eventProducts: eventProducts, eventId: event.id, isLoading: isLoading })))),
38259
+ React.createElement(Step, { active: true },
38260
+ React.createElement(StepLabel, null, t('event.tickets.stepper.8.title')),
38261
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
38262
+ React.createElement(Services, { event: event }))),
35589
38263
  event.children.length && (React.createElement(Step, { active: true },
35590
38264
  React.createElement(StepLabel, null, t('event.tickets.stepper.7.title')),
35591
- React.createElement(StepContent, null,
38265
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35592
38266
  React.createElement(ChildEventSection, { events: event.children })))),
35593
38267
  React.createElement(Step, { active: true },
35594
38268
  React.createElement(StepLabel, null, t('event.tickets.stepper.2.title')),
35595
- React.createElement(StepContent, null,
38269
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35596
38270
  React.createElement(ContactPerson, { event: event }))),
35597
38271
  event.hasMerchandise && showShippingMethods() && (React.createElement(Step, { active: true },
35598
38272
  React.createElement(StepLabel, null, t('event.tickets.stepper.5.title')),
35599
- React.createElement(StepContent, null,
38273
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35600
38274
  React.createElement(Shipping, { event: event })))),
35601
38275
  React.createElement(Step, { active: true },
35602
38276
  React.createElement(StepLabel, null, t(`event.tickets.stepper.3.${values.isPaymentVerify ? 'title_verify' : 'title'}`)),
35603
- React.createElement(StepContent, null,
38277
+ React.createElement(StepContent, { sx: { pr: { xs: 0 } } },
35604
38278
  React.createElement(Payment, { event: event })))),
35605
- React.createElement(Stack, { mt: 2, ml: 4 },
38279
+ React.createElement(Stack, { ref: termsAndConditionsRef, mt: 2, ml: { xs: 1, md: 4 }, sx: { scrollMarginBottom: { xs: 220, md: 0 } } },
35606
38280
  React.createElement(RHFCheckbox, { name: "termsAndConditions", label: React.createElement(Trans, { text: "event.tickets.terms_and_conditions", values: {
35607
38281
  termsAndConditionsCompanies: options?.termsAndConditionsCompanies
35608
38282
  ? options.termsAndConditionsCompanies.join(t('and'))
@@ -35611,13 +38285,16 @@ const TicketForm = ({ event, hasGopayIdSsr, selectedReleaseId, isIframe, isInlin
35611
38285
  0: React.createElement(CustomLink, { key: 2, href: links.termsAndConditions, target: "_blank" }),
35612
38286
  1: React.createElement(CustomLink, { key: 1, href: links.gdpr, target: "_blank" }),
35613
38287
  } }) }))),
35614
- React.createElement(Grid, { size: { xs: 12, md: 4 } },
35615
- React.createElement(PaymentOverviewBox, { event: event }))),
38288
+ React.createElement(Grid, { size: 12, sx: { display: { xs: 'block', md: 'none' } } },
38289
+ React.createElement(Divider, { sx: { borderStyle: 'dashed' } })),
38290
+ React.createElement(Grid, { size: { xs: 12, md: 4 }, sx: { mt: { xs: 0, md: 0 } } },
38291
+ React.createElement(PaymentOverviewBox, { event: event, withoutPadding: true }))),
38292
+ React.createElement(PaymentOverviewDrawer, { event: event, totalPrice: values.total, termsAndConditionsRef: termsAndConditionsRef, onOpenChange: setIsPaymentOverviewDrawerOpen }),
35616
38293
  React.createElement(EmailConfirmation, { open: formStep === 2 && !isIframe, onClose: () => setFormStep(1),
35617
- // @ts-ignore -- handleSubmit return type mismatch with onConfirm prop
35618
- onConfirm: methods.handleSubmit(onSubmit) })))));
38294
+ // @ts-ignore
38295
+ onConfirm: methods.handleSubmit(onSubmit, onInvalid) })))));
35619
38296
  };
35620
- const CustomLink = ({ href = '', children, ...other }) => (React.createElement(Link, { href: href, ...other }, children));
38297
+ const CustomLink = ({ href = '', children, ...other }) => (React.createElement(Link, { href: href, ...other, sx: { color: 'inherit', textDecoration: 'underline' } }, children));
35621
38298
 
35622
38299
  var utc$2 = {exports: {}};
35623
38300
 
@@ -35792,7 +38469,7 @@ const ClientRender = ({ eventSlug, apiUrl, seatingIframeUrl, lang, slots, option
35792
38469
  }
35793
38470
  };
35794
38471
  return (React.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: lang || Languages.CS, localeText: getLocalizationProviderLocaleText() },
35795
- React.createElement(GlobalProvider, { lang: lang || Languages.CS, showSnackbar: slots?.showSnackbar, callbacks: callbacks, links: links, options: options, content: content, seatingIframeUrl: seatingIframeUrl }, !data || !!error ? (React.createElement(TicketFormSkeleton, null)) : (React.createElement(TicketForm, { event: data, hasGopayIdSsr: options?.hasGopayId || false, isIframe: options?.isIframe, selectedReleaseId: selectedReleaseId })))));
38472
+ React.createElement(GlobalProvider, { lang: lang || Languages.CS, showSnackbar: slots?.showSnackbar, callbacks: callbacks, links: links, options: options, content: content, seatingIframeUrl: seatingIframeUrl }, !data || !!error ? (React.createElement(TicketFormSkeleton, null)) : (React.createElement(TicketForm, { event: data, hasGopayIdSsr: options?.hasGopayId || false, isIframe: options?.isIframe, selectedReleaseId: selectedReleaseId, headerSlot: slots?.headerSlot })))));
35796
38473
  };
35797
38474
  function Index(props) {
35798
38475
  return (React.createElement(ClientOnly, null,
@@ -35801,5 +38478,5 @@ function Index(props) {
35801
38478
 
35802
38479
  const OrderFormSdk = Index;
35803
38480
 
35804
- export { OrderFormSdk as O, getAugmentedNamespace as a, getDefaultExportFromCjs as g };
35805
- //# sourceMappingURL=index-BlTqx0jm.js.map
38481
+ export { OrderFormSdk as O, getDefaultExportFromCjs as g };
38482
+ //# sourceMappingURL=index-CJ_gPli9.js.map