@gomusdev/web-components 4.10.0 → 4.12.0

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.
@@ -6480,6 +6480,9 @@ createHTML: (html) => {
6480
6480
  var isObject$2 = (value) => {
6481
6481
  return !!value && value.constructor === Object;
6482
6482
  };
6483
+ var isFunction$2 = (value) => {
6484
+ return !!(value && value.constructor && value.call && value.apply);
6485
+ };
6483
6486
  var isString = (value) => {
6484
6487
  return typeof value === "string" || value instanceof String;
6485
6488
  };
@@ -6490,6 +6493,12 @@ createHTML: (html) => {
6490
6493
  return false;
6491
6494
  }
6492
6495
  };
6496
+ var isPromise = (value) => {
6497
+ if (!value) return false;
6498
+ if (!value.then) return false;
6499
+ if (!isFunction$2(value.then)) return false;
6500
+ return true;
6501
+ };
6493
6502
  //#endregion
6494
6503
  //#region ../../node_modules/.pnpm/radash@12.1.1/node_modules/radash/dist/esm/array.mjs
6495
6504
  var group = (array, getGroupId) => {
@@ -15560,9 +15569,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15560
15569
  create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
15561
15570
  //#endregion
15562
15571
  //#region src/components/cart/components/itemTitles/Ticket.svelte
15563
- var root$52 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15564
- var root_1$19 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15565
- var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
15572
+ var root$52 = /* @__PURE__ */ from_html(`<span class="go-cart-item-subtitle" data-testid="cart-item-subtitle"> </span>`);
15573
+ var root_1$19 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
15574
+ var root_2$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
15575
+ var root_3$10 = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!> <!>`, 1);
15566
15576
  function Ticket($$anchor, $$props) {
15567
15577
  push($$props, true);
15568
15578
  let cartItem = prop($$props, "cartItem", 7);
@@ -15575,35 +15585,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15575
15585
  flushSync();
15576
15586
  }
15577
15587
  };
15578
- var fragment = root_2$14();
15588
+ var fragment = root_3$10();
15579
15589
  var span = first_child(fragment);
15580
15590
  var text = child(span, true);
15581
15591
  reset(span);
15582
15592
  var node = sibling(span, 2);
15583
- var consequent_1 = ($$anchor) => {
15584
- var fragment_1 = root_1$19();
15585
- var span_1 = first_child(fragment_1);
15593
+ var consequent = ($$anchor) => {
15594
+ var span_1 = root$52();
15586
15595
  var text_1 = child(span_1, true);
15587
15596
  reset(span_1);
15588
- var node_1 = sibling(span_1, 2);
15589
- var consequent = ($$anchor) => {
15590
- var span_2 = root$52();
15591
- var text_2 = child(span_2, true);
15592
- reset(span_2);
15593
- template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
15594
- append($$anchor, span_2);
15597
+ template_effect(() => set_text(text_1, cartItem().product.sub_title));
15598
+ append($$anchor, span_1);
15599
+ };
15600
+ var d = /* @__PURE__ */ user_derived(() => isUITicket(cartItem().product) && cartItem().product.sub_title);
15601
+ if_block(node, ($$render) => {
15602
+ if (get$2(d)) $$render(consequent);
15603
+ });
15604
+ var node_1 = sibling(node, 2);
15605
+ var consequent_2 = ($$anchor) => {
15606
+ var fragment_1 = root_2$14();
15607
+ var span_2 = first_child(fragment_1);
15608
+ var text_2 = child(span_2, true);
15609
+ reset(span_2);
15610
+ var node_2 = sibling(span_2, 2);
15611
+ var consequent_1 = ($$anchor) => {
15612
+ var span_3 = root_1$19();
15613
+ var text_3 = child(span_3, true);
15614
+ reset(span_3);
15615
+ template_effect(($0) => set_text(text_3, $0), [() => formatTime(cartItem().time)]);
15616
+ append($$anchor, span_3);
15595
15617
  };
15596
- if_block(node_1, ($$render) => {
15597
- if (cartItem().product.type === "Ticket" && cartItem().product.subtype === "timeslot") $$render(consequent);
15618
+ if_block(node_2, ($$render) => {
15619
+ if (cartItem().product.type === "Ticket" && cartItem().product.subtype === "timeslot") $$render(consequent_1);
15598
15620
  });
15599
- template_effect(($0) => set_text(text_1, $0), [() => formatDate(cartItem().time, {
15621
+ template_effect(($0) => set_text(text_2, $0), [() => formatDate(cartItem().time, {
15600
15622
  month: "numeric",
15601
15623
  day: "numeric"
15602
15624
  }, shop.locale)]);
15603
15625
  append($$anchor, fragment_1);
15604
15626
  };
15605
- if_block(node, ($$render) => {
15606
- if (cartItem().time) $$render(consequent_1);
15627
+ if_block(node_1, ($$render) => {
15628
+ if (cartItem().time) $$render(consequent_2);
15607
15629
  });
15608
15630
  template_effect(() => set_text(text, cartItem().product.title));
15609
15631
  append($$anchor, fragment);
@@ -18049,7 +18071,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18049
18071
  var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18050
18072
  var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
18051
18073
  var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
18052
- var root_5$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18074
+ var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18053
18075
  var root_6$2 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
18054
18076
  var root_7$2 = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>`, 1);
18055
18077
  function Item$1($$anchor, $$props) {
@@ -18231,7 +18253,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18231
18253
  reset(li_2);
18232
18254
  var node_4 = sibling(li_2, 2);
18233
18255
  var consequent_8 = ($$anchor) => {
18234
- var li_3 = root_5$2();
18256
+ var li_3 = root_5$3();
18235
18257
  var button = child(li_3);
18236
18258
  reset(li_3);
18237
18259
  template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.item.remove")]);
@@ -33278,14 +33300,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33278
33300
  var root_2$7 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
33279
33301
  var root_3$7 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
33280
33302
  var root_4$3 = /* @__PURE__ */ from_html(`<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>`);
33281
- var root_5$1 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
33303
+ var root_5$2 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
33282
33304
  var root_6$1 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
33283
33305
  var root_7$1 = /* @__PURE__ */ from_html(`<img src="" alt=""/> <option> </option>`, 1);
33284
33306
  var root_8$1 = /* @__PURE__ */ from_html(`<option disabled="" hidden="" selected=""> </option> <!>`, 1);
33285
33307
  var select_content = /* @__PURE__ */ from_html(`<!>`, 1);
33286
33308
  var root_9$1 = /* @__PURE__ */ from_html(`<label><!></label> <select><!></select>`, 1);
33287
33309
  var root_10$1 = /* @__PURE__ */ from_html(`<img style="width: 60px" aria-hidden="true"/>`);
33288
- var root_11 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-icons"></span>`);
33310
+ var root_11$1 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-icons"></span>`);
33289
33311
  var root_12 = /* @__PURE__ */ from_html(`<span class="go-payment-mode-name"> </span>`);
33290
33312
  var root_13 = /* @__PURE__ */ from_html(`<label><input type="radio"/> <!></label>`);
33291
33313
  var root_14 = /* @__PURE__ */ from_html(`<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>`);
@@ -33350,7 +33372,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33350
33372
  append($$anchor, fragment_2);
33351
33373
  };
33352
33374
  const file = ($$anchor) => {
33353
- var fragment_3 = root_5$1();
33375
+ var fragment_3 = root_5$2();
33354
33376
  var label_3 = first_child(fragment_3);
33355
33377
  labelText(child(label_3));
33356
33378
  reset(label_3);
@@ -33500,7 +33522,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33500
33522
  remove_input_defaults(input_4);
33501
33523
  var node_11 = sibling(input_4, 2);
33502
33524
  var consequent_3 = ($$anchor) => {
33503
- var span_2 = root_11();
33525
+ var span_2 = root_11$1();
33504
33526
  each(span_2, 20, () => get$2(mode).icons, (icon) => icon, ($$anchor, icon) => {
33505
33527
  const url = /* @__PURE__ */ user_derived(() => CDN_PATH + icon + ".svg");
33506
33528
  var img_1 = root_10$1();
@@ -36455,17 +36477,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36455
36477
  }, [], [], { mode: "open" });
36456
36478
  //#endregion
36457
36479
  //#region src/components/order/components/subcomponents/breakdown/items/TicketSale.svelte
36458
- var root$9 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>`, 1);
36459
- var root_1$4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
36460
- var root_2$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
36461
- var root_3$3 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
36462
- var root_4$2 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
36463
- var root_5 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
36464
- var root_6 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
36465
- var root_7 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
36466
- var root_8 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
36467
- var root_9 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
36468
- var root_10 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36480
+ var root$9 = /* @__PURE__ */ from_html(`<span class="go-order-item-subtitle" data-testid="order-item-subtitle"> </span>`);
36481
+ var root_1$4 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>`, 1);
36482
+ var root_2$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
36483
+ var root_3$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
36484
+ var root_4$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
36485
+ var root_5$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
36486
+ var root_6 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
36487
+ var root_7 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
36488
+ var root_8 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
36489
+ var root_9 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
36490
+ var root_10 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization"> </a>`);
36491
+ var root_11 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>`);
36469
36492
  function TicketSale($$anchor, $$props) {
36470
36493
  push($$props, true);
36471
36494
  const APPLE_WALLET_CDN_PATH = `https://cdn.shop.platform.gomus.de/apple_wallet_${shop.locale}.svg`;
@@ -36489,10 +36512,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36489
36512
  };
36490
36513
  var fragment = comment();
36491
36514
  var node = first_child(fragment);
36492
- var consequent_5 = ($$anchor) => {
36515
+ var consequent_6 = ($$anchor) => {
36493
36516
  var fragment_1 = comment();
36494
36517
  each(first_child(fragment_1), 17, () => ({ length: item().attributes.quantity }), index$1, ($$anchor, $$item, index) => {
36495
- var li = root_7();
36518
+ var li = root_8();
36496
36519
  var article = child(li);
36497
36520
  var ul = child(article);
36498
36521
  var li_1 = child(ul);
@@ -36502,82 +36525,93 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36502
36525
  var text = child(span, true);
36503
36526
  reset(span);
36504
36527
  var node_2 = sibling(span, 2);
36505
- each(node_2, 17, () => get$2(subTicketSales), (sub) => sub.id, ($$anchor, sub) => {
36506
- var fragment_2 = root$9();
36507
- var span_1 = sibling(first_child(fragment_2), 2);
36508
- var text_1 = child(span_1);
36528
+ var consequent = ($$anchor) => {
36529
+ var span_1 = root$9();
36530
+ var text_1 = child(span_1, true);
36509
36531
  reset(span_1);
36510
- template_effect(() => set_text(text_1, `${get$2(sub).quantity ?? ""} x ${get$2(sub).title ?? ""}`));
36511
- append($$anchor, fragment_2);
36532
+ template_effect(() => set_text(text_1, item().attributes.sub_title));
36533
+ append($$anchor, span_1);
36534
+ };
36535
+ if_block(node_2, ($$render) => {
36536
+ if (item().attributes.sub_title) $$render(consequent);
36512
36537
  });
36513
36538
  var node_3 = sibling(node_2, 2);
36514
- var consequent_2 = ($$anchor) => {
36539
+ each(node_3, 17, () => get$2(subTicketSales), (sub) => sub.id, ($$anchor, sub) => {
36540
+ var fragment_2 = root_1$4();
36541
+ var span_2 = sibling(first_child(fragment_2), 2);
36542
+ var text_2 = child(span_2);
36543
+ reset(span_2);
36544
+ template_effect(() => set_text(text_2, `${get$2(sub).quantity ?? ""} x ${get$2(sub).title ?? ""}`));
36545
+ append($$anchor, fragment_2);
36546
+ });
36547
+ var node_4 = sibling(node_3, 2);
36548
+ var consequent_3 = ($$anchor) => {
36515
36549
  const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index]?.id);
36516
- var fragment_3 = root_3$3();
36517
- var node_4 = first_child(fragment_3);
36518
- var consequent = ($$anchor) => {
36519
- var fragment_4 = root_1$4();
36520
- var span_2 = first_child(fragment_4);
36521
- var text_2 = child(span_2, true);
36522
- reset(span_2);
36523
- var span_3 = sibling(span_2, 2);
36550
+ var fragment_3 = root_4$2();
36551
+ var node_5 = first_child(fragment_3);
36552
+ var consequent_1 = ($$anchor) => {
36553
+ var fragment_4 = root_2$3();
36554
+ var span_3 = first_child(fragment_4);
36524
36555
  var text_3 = child(span_3, true);
36525
36556
  reset(span_3);
36557
+ var span_4 = sibling(span_3, 2);
36558
+ var text_4 = child(span_4, true);
36559
+ reset(span_4);
36526
36560
  template_effect(($0, $1) => {
36527
- set_text(text_2, $0);
36528
- set_text(text_3, $1);
36561
+ set_text(text_3, $0);
36562
+ set_text(text_4, $1);
36529
36563
  }, [() => formatDate(item().attributes.start_time, {
36530
36564
  month: "numeric",
36531
36565
  day: "numeric"
36532
36566
  }, shop.locale), () => formatTime(item().attributes.start_time)]);
36533
36567
  append($$anchor, fragment_4);
36534
36568
  };
36535
- var consequent_1 = ($$anchor) => {
36536
- var span_4 = root_2$3();
36537
- var text_4 = child(span_4, true);
36538
- reset(span_4);
36539
- template_effect(($0) => set_text(text_4, $0), [() => formatDate(item().attributes.start_time, {
36569
+ var consequent_2 = ($$anchor) => {
36570
+ var span_5 = root_3$3();
36571
+ var text_5 = child(span_5, true);
36572
+ reset(span_5);
36573
+ template_effect(($0) => set_text(text_5, $0), [() => formatDate(item().attributes.start_time, {
36540
36574
  month: "numeric",
36541
36575
  day: "numeric"
36542
36576
  }, shop.locale)]);
36543
- append($$anchor, span_4);
36577
+ append($$anchor, span_5);
36544
36578
  };
36545
- if_block(node_4, ($$render) => {
36546
- if (item().attributes.ticket_type === "time_slot") $$render(consequent);
36547
- else if (item().attributes.ticket_type === "normal") $$render(consequent_1, 1);
36579
+ if_block(node_5, ($$render) => {
36580
+ if (item().attributes.ticket_type === "time_slot") $$render(consequent_1);
36581
+ else if (item().attributes.ticket_type === "normal") $$render(consequent_2, 1);
36548
36582
  });
36549
- var a = sibling(node_4, 4);
36550
- var text_5 = child(a, true);
36583
+ var a = sibling(node_5, 4);
36584
+ var text_6 = child(a, true);
36551
36585
  reset(a);
36552
36586
  template_effect(($0, $1) => {
36553
36587
  set_attribute(a, "href", $0);
36554
- set_text(text_5, $1);
36588
+ set_text(text_6, $1);
36555
36589
  }, [() => orderDetails().downloadLink(item(), get$2(barcodeId)), () => shop.t("common.download")]);
36556
36590
  append($$anchor, fragment_3);
36557
36591
  };
36558
36592
  var alternate = ($$anchor) => {
36559
- var fragment_5 = root_4$2();
36593
+ var fragment_5 = root_5$1();
36560
36594
  var a_1 = sibling(first_child(fragment_5), 2);
36561
- var text_6 = child(a_1, true);
36595
+ var text_7 = child(a_1, true);
36562
36596
  reset(a_1);
36563
36597
  template_effect(($0, $1) => {
36564
36598
  set_attribute(a_1, "href", $0);
36565
- set_text(text_6, $1);
36599
+ set_text(text_7, $1);
36566
36600
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.personalize")]);
36567
36601
  append($$anchor, fragment_5);
36568
36602
  };
36569
- if_block(node_3, ($$render) => {
36570
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_2);
36603
+ if_block(node_4, ($$render) => {
36604
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_3);
36571
36605
  else $$render(alternate, -1);
36572
36606
  });
36573
36607
  reset(li_2);
36574
36608
  var li_3 = sibling(li_2, 2);
36575
- var text_7 = child(li_3, true);
36609
+ var text_8 = child(li_3, true);
36576
36610
  reset(li_3);
36577
36611
  var li_4 = sibling(li_3, 2);
36578
- var node_5 = child(li_4);
36579
- var consequent_3 = ($$anchor) => {
36580
- var a_2 = root_5();
36612
+ var node_6 = child(li_4);
36613
+ var consequent_4 = ($$anchor) => {
36614
+ var a_2 = root_6();
36581
36615
  var img = child(a_2);
36582
36616
  reset(a_2);
36583
36617
  template_effect(() => {
@@ -36586,24 +36620,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36586
36620
  });
36587
36621
  append($$anchor, a_2);
36588
36622
  };
36589
- if_block(node_5, ($$render) => {
36590
- if (item().attributes.barcodes[index] && item().attributes.barcodes[index]?.passbook_url) $$render(consequent_3);
36623
+ if_block(node_6, ($$render) => {
36624
+ if (item().attributes.barcodes[index] && item().attributes.barcodes[index]?.passbook_url) $$render(consequent_4);
36591
36625
  });
36592
36626
  reset(li_4);
36593
36627
  var li_5 = sibling(li_4, 2);
36594
- var node_6 = child(li_5);
36595
- var consequent_4 = ($$anchor) => {
36596
- var a_3 = root_6();
36597
- var text_8 = child(a_3, true);
36628
+ var node_7 = child(li_5);
36629
+ var consequent_5 = ($$anchor) => {
36630
+ var a_3 = root_7();
36631
+ var text_9 = child(a_3, true);
36598
36632
  reset(a_3);
36599
36633
  template_effect(($0) => {
36600
36634
  set_attribute(a_3, "href", shop.apiUrl + item().attributes.ical_url);
36601
- set_text(text_8, $0);
36635
+ set_text(text_9, $0);
36602
36636
  }, [() => shop.t("common.calendar")]);
36603
36637
  append($$anchor, a_3);
36604
36638
  };
36605
- if_block(node_6, ($$render) => {
36606
- if (item().attributes.ical_url) $$render(consequent_4);
36639
+ if_block(node_7, ($$render) => {
36640
+ if (item().attributes.ical_url) $$render(consequent_5);
36607
36641
  });
36608
36642
  reset(li_5);
36609
36643
  reset(ul);
@@ -36611,65 +36645,76 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
36611
36645
  reset(li);
36612
36646
  template_effect(($0) => {
36613
36647
  set_text(text, item().attributes.title);
36614
- set_text(text_7, $0);
36648
+ set_text(text_8, $0);
36615
36649
  }, [() => formatCurrency(item().price_cents)]);
36616
36650
  append($$anchor, li);
36617
36651
  });
36618
36652
  append($$anchor, fragment_1);
36619
36653
  };
36620
36654
  var alternate_2 = ($$anchor) => {
36621
- var li_6 = root_10();
36655
+ var li_6 = root_11();
36622
36656
  var article_1 = child(li_6);
36623
36657
  var ul_1 = child(article_1);
36624
36658
  var li_7 = child(ul_1);
36625
- var text_9 = child(li_7, true);
36659
+ var text_10 = child(li_7, true);
36626
36660
  reset(li_7);
36627
36661
  var li_8 = sibling(li_7, 2);
36628
- var span_5 = child(li_8);
36629
- var text_10 = child(span_5, true);
36630
- reset(span_5);
36631
- var node_7 = sibling(span_5, 2);
36632
- var consequent_6 = ($$anchor) => {
36633
- var a_4 = root_8();
36634
- var text_11 = child(a_4, true);
36662
+ var span_6 = child(li_8);
36663
+ var text_11 = child(span_6, true);
36664
+ reset(span_6);
36665
+ var node_8 = sibling(span_6, 2);
36666
+ var consequent_7 = ($$anchor) => {
36667
+ var span_7 = root$9();
36668
+ var text_12 = child(span_7, true);
36669
+ reset(span_7);
36670
+ template_effect(() => set_text(text_12, item().attributes.sub_title));
36671
+ append($$anchor, span_7);
36672
+ };
36673
+ if_block(node_8, ($$render) => {
36674
+ if (item().attributes.sub_title) $$render(consequent_7);
36675
+ });
36676
+ var node_9 = sibling(node_8, 2);
36677
+ var consequent_8 = ($$anchor) => {
36678
+ var a_4 = root_9();
36679
+ var text_13 = child(a_4, true);
36635
36680
  reset(a_4);
36636
36681
  template_effect(($0, $1) => {
36637
36682
  set_attribute(a_4, "href", $0);
36638
- set_text(text_11, $1);
36683
+ set_text(text_13, $1);
36639
36684
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.download")]);
36640
36685
  append($$anchor, a_4);
36641
36686
  };
36642
36687
  var alternate_1 = ($$anchor) => {
36643
- var a_5 = root_9();
36644
- var text_12 = child(a_5, true);
36688
+ var a_5 = root_10();
36689
+ var text_14 = child(a_5, true);
36645
36690
  reset(a_5);
36646
36691
  template_effect(($0, $1) => {
36647
36692
  set_attribute(a_5, "href", $0);
36648
- set_text(text_12, $1);
36693
+ set_text(text_14, $1);
36649
36694
  }, [() => orderDetails().downloadLink(item()), () => shop.t("common.personalize")]);
36650
36695
  append($$anchor, a_5);
36651
36696
  };
36652
- if_block(node_7, ($$render) => {
36653
- if (item().attributes.is_voucher) $$render(consequent_6);
36697
+ if_block(node_9, ($$render) => {
36698
+ if (item().attributes.is_voucher) $$render(consequent_8);
36654
36699
  else $$render(alternate_1, -1);
36655
36700
  });
36656
36701
  reset(li_8);
36657
36702
  var li_9 = sibling(li_8, 2);
36658
- var text_13 = child(li_9, true);
36703
+ var text_15 = child(li_9, true);
36659
36704
  reset(li_9);
36660
36705
  next(2);
36661
36706
  reset(ul_1);
36662
36707
  reset(article_1);
36663
36708
  reset(li_6);
36664
36709
  template_effect(($0) => {
36665
- set_text(text_9, item().attributes.quantity);
36666
- set_text(text_10, item().attributes.title);
36667
- set_text(text_13, $0);
36710
+ set_text(text_10, item().attributes.quantity);
36711
+ set_text(text_11, item().attributes.title);
36712
+ set_text(text_15, $0);
36668
36713
  }, [() => formatCurrency(item().price_cents)]);
36669
36714
  append($$anchor, li_6);
36670
36715
  };
36671
36716
  if_block(node, ($$render) => {
36672
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_5);
36717
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_6);
36673
36718
  else $$render(alternate_2, -1);
36674
36719
  });
36675
36720
  append($$anchor, fragment);
@@ -37478,10 +37523,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37478
37523
  //#endregion
37479
37524
  //#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/Item.svelte
37480
37525
  var root$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
37481
- var root_1$2 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
37482
- var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
37483
- var root_3$1 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
37484
- var root_4$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>`);
37526
+ var root_1$2 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-subtitle" data-testid="ticket-subtitle"> </span>`);
37527
+ var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
37528
+ var root_3$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
37529
+ var root_4$1 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
37530
+ var root_5 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!> <!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>`);
37485
37531
  function Item($$anchor, $$props) {
37486
37532
  const uid = props_id();
37487
37533
  push($$props, true);
@@ -37545,17 +37591,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37545
37591
  };
37546
37592
  var fragment_2 = comment();
37547
37593
  var node = first_child(fragment_2);
37548
- var consequent_3 = ($$anchor) => {
37549
- var li = root_4$1();
37594
+ var consequent_4 = ($$anchor) => {
37595
+ var li = root_5();
37550
37596
  var article = child(li);
37551
37597
  var ul = child(article);
37552
37598
  var li_1 = child(ul);
37553
37599
  var node_1 = child(li_1);
37554
37600
  titleSnippet(node_1);
37555
- reset(li_1);
37556
- var node_2 = sibling(li_1, 2);
37601
+ var node_2 = sibling(node_1, 2);
37557
37602
  var consequent = ($$anchor) => {
37558
- var li_2 = root_1$2();
37603
+ var span_2 = root_1$2();
37604
+ var text_3 = child(span_2, true);
37605
+ reset(span_2);
37606
+ template_effect(() => set_text(text_3, item().product.sub_title));
37607
+ append($$anchor, span_2);
37608
+ };
37609
+ if_block(node_2, ($$render) => {
37610
+ if (item().product.sub_title) $$render(consequent);
37611
+ });
37612
+ reset(li_1);
37613
+ var node_3 = sibling(li_1, 2);
37614
+ var consequent_1 = ($$anchor) => {
37615
+ var li_2 = root_2$1();
37559
37616
  var button = child(li_2);
37560
37617
  reset(li_2);
37561
37618
  template_effect(($0) => {
@@ -37567,35 +37624,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37567
37624
  delegated("click", button, () => set(infoExpanded, !get$2(infoExpanded)));
37568
37625
  append($$anchor, li_2);
37569
37626
  };
37570
- if_block(node_2, ($$render) => {
37571
- if (get$2(reductionReason)) $$render(consequent);
37627
+ if_block(node_3, ($$render) => {
37628
+ if (get$2(reductionReason)) $$render(consequent_1);
37572
37629
  });
37573
- var li_3 = sibling(node_2, 2);
37630
+ var li_3 = sibling(node_3, 2);
37574
37631
  html$2(li_3, () => purify.sanitize(item().product.description), true);
37575
37632
  reset(li_3);
37576
- var node_3 = sibling(li_3, 2);
37577
- var consequent_1 = ($$anchor) => {
37578
- var li_4 = root_2$1();
37579
- var text_3 = child(li_4, true);
37633
+ var node_4 = sibling(li_3, 2);
37634
+ var consequent_2 = ($$anchor) => {
37635
+ var li_4 = root_3$1();
37636
+ var text_4 = child(li_4, true);
37580
37637
  reset(li_4);
37581
37638
  template_effect(($0) => {
37582
37639
  set_attribute(li_4, "id", infoPanelId);
37583
37640
  set_attribute(li_4, "hidden", !get$2(infoExpanded));
37584
- set_text(text_3, $0);
37641
+ set_text(text_4, $0);
37585
37642
  }, [() => shop.t(get$2(reductionReason))]);
37586
37643
  append($$anchor, li_4);
37587
37644
  };
37588
- if_block(node_3, ($$render) => {
37589
- if (get$2(reductionReason)) $$render(consequent_1);
37645
+ if_block(node_4, ($$render) => {
37646
+ if (get$2(reductionReason)) $$render(consequent_2);
37590
37647
  });
37591
- var li_5 = sibling(node_3, 2);
37592
- var text_4 = child(li_5, true);
37648
+ var li_5 = sibling(node_4, 2);
37649
+ var text_5 = child(li_5, true);
37593
37650
  reset(li_5);
37594
37651
  var li_6 = sibling(li_5, 2);
37595
- var node_4 = child(li_6);
37652
+ var node_5 = child(li_6);
37596
37653
  {
37597
37654
  let $0 = /* @__PURE__ */ user_derived(() => quantityLabel(item()));
37598
- QuantityControl(node_4, {
37655
+ QuantityControl(node_5, {
37599
37656
  get value() {
37600
37657
  return item().quantity;
37601
37658
  },
@@ -37614,9 +37671,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37614
37671
  reset(li_6);
37615
37672
  reset(ul);
37616
37673
  reset(article);
37617
- var node_5 = sibling(article, 2);
37618
- var consequent_2 = ($$anchor) => {
37619
- var ul_1 = root_3$1();
37674
+ var node_6 = sibling(article, 2);
37675
+ var consequent_3 = ($$anchor) => {
37676
+ var ul_1 = root_4$1();
37620
37677
  each(ul_1, 21, () => subTicketDefs(get$2(mantleProduct)), (sub) => sub.id, ($$anchor, sub) => {
37621
37678
  {
37622
37679
  let $0 = /* @__PURE__ */ user_derived(() => item().mantle?.composition?.[get$2(sub).id] ?? 0);
@@ -37638,19 +37695,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37638
37695
  template_effect(() => set_attribute(ul_1, "aria-label", get$2(mantleProduct).title));
37639
37696
  append($$anchor, ul_1);
37640
37697
  };
37641
- if_block(node_5, ($$render) => {
37642
- if (get$2(mantleProduct) && item().quantity > 0) $$render(consequent_2);
37698
+ if_block(node_6, ($$render) => {
37699
+ if (get$2(mantleProduct) && item().quantity > 0) $$render(consequent_3);
37643
37700
  });
37644
37701
  reset(li);
37645
37702
  template_effect(() => {
37646
37703
  set_class(article, 1, clsx(["go-tickets-item", get$2(capacity).bookedOut && "is-booked-out"]));
37647
37704
  set_attribute(article, "data-testid", item().uuid);
37648
- set_text(text_4, item().price_formatted);
37705
+ set_text(text_5, item().price_formatted);
37649
37706
  });
37650
37707
  append($$anchor, li);
37651
37708
  };
37652
37709
  if_block(node, ($$render) => {
37653
- if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_3);
37710
+ if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_4);
37654
37711
  });
37655
37712
  append($$anchor, fragment_2);
37656
37713
  return pop($$exports);
@@ -37873,6 +37930,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37873
37930
  customElements.define("go-timeslots", create_custom_element(Timeslots, {}, [], ["details"]));
37874
37931
  //#endregion
37875
37932
  //#region src/components/ticketSelection/subcomponents/calendar/lib/calendar.svelte.ts
37933
+ function describeAvailability(value) {
37934
+ if (typeof value === "string") return `'${value}'`;
37935
+ if (value === null || value === void 0) return String(value);
37936
+ if (isPromise(value)) return "a Promise — the callback must be synchronous";
37937
+ return `a ${typeof value}`;
37938
+ }
37876
37939
  var Calendar = class {
37877
37940
  #details = /* @__PURE__ */ state();
37878
37941
  get details() {
@@ -37895,6 +37958,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37895
37958
  set selected(value) {
37896
37959
  set(this.#selected, value, true);
37897
37960
  }
37961
+ #availabilityOverride = /* @__PURE__ */ state();
37962
+ get availabilityOverride() {
37963
+ return get$2(this.#availabilityOverride);
37964
+ }
37965
+ set availabilityOverride(value) {
37966
+ set(this.#availabilityOverride, value, true);
37967
+ }
37968
+ #logged = [];
37898
37969
  get endpoint() {
37899
37970
  return (this.details?.filters?.map((f) => getFilter(f).calendarEndpoint).filter(Boolean) ?? [])[0] ?? null;
37900
37971
  }
@@ -37906,12 +37977,49 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37906
37977
  default: return;
37907
37978
  }
37908
37979
  }
37980
+ /** What gomus makes of a date on its own, ignoring any integrator override. */
37981
+ defaultAvailability(date) {
37982
+ switch (this.dates?.[date.toString()]) {
37983
+ case "unavailable": return "unavailable";
37984
+ case "fully_booked": return "sold_out";
37985
+ default: return "available";
37986
+ }
37987
+ }
37988
+ /** The gomus default, with the integrator's override given the last word. */
37989
+ availability(date) {
37990
+ const defaultAvailability = this.defaultAvailability(date);
37991
+ const override = this.#overrideCallback();
37992
+ if (!override) return defaultAvailability;
37993
+ let returned;
37994
+ try {
37995
+ returned = override(date.toString(), defaultAvailability);
37996
+ } catch (error) {
37997
+ this.#reportOnce("threw", `[go-calendar] the availability-override callback threw (${String(error)}) — using the gomus default instead.`);
37998
+ return defaultAvailability;
37999
+ }
38000
+ if (returned === "pass_through") return defaultAvailability;
38001
+ if (returned === "available" || returned === "sold_out" || returned === "unavailable") return returned;
38002
+ this.#reportOnce("returned", `[go-calendar] the availability-override callback must return 'available', 'sold_out', 'unavailable' or 'pass_through', got ${describeAvailability(returned)} — using the gomus default instead.`);
38003
+ return defaultAvailability;
38004
+ }
38005
+ #overrideCallback() {
38006
+ const source = this.availabilityOverride;
38007
+ if (typeof source === "function") return source;
38008
+ if (!source) return void 0;
38009
+ const candidate = globalThis[source];
38010
+ if (typeof candidate === "function") return candidate;
38011
+ this.#reportOnce(`unresolved:${source}`, `[go-calendar] availability-override="${source}" does not resolve to a function on window — using the gomus defaults.`, console.warn);
38012
+ }
38013
+ #reportOnce(key, message, log = console.error) {
38014
+ if (this.#logged.includes(key)) return;
38015
+ this.#logged.push(key);
38016
+ log(message);
38017
+ }
37909
38018
  isDateDisabled(date) {
37910
- if (this.dates) return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0 || this.dates[date.toString()] == "unavailable";
37911
- return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0;
38019
+ return date.compare($ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) < 0 || this.availability(date) === "unavailable";
37912
38020
  }
37913
38021
  isDateUnavailable(date) {
37914
- return this.dates?.[date.toString()] == "fully_booked";
38022
+ return this.availability(date) === "sold_out";
37915
38023
  }
37916
38024
  get apiFilters() {
37917
38025
  return this.details?.filters?.map((f) => getFilter(f).apiToken).filter(Boolean);
@@ -37940,13 +38048,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37940
38048
  thisMonth.add({ months: 2 })
37941
38049
  ];
37942
38050
  }
38051
+ #mergedDates(fetchMonth) {
38052
+ return this.fetchPeriod().reduce((all, startAt) => Object.assign(all, fetchMonth(this.params(startAt))), {});
38053
+ }
37943
38054
  eventsDates() {
37944
- const method = shop.calendar.bind(shop);
37945
- return this.fetchPeriod().reduce((prev, startAt) => assign(prev, method(this.params(startAt))), {});
38055
+ return this.#mergedDates((params) => shop.calendar(params));
37946
38056
  }
37947
38057
  ticketsDates() {
37948
- const method = shop.ticketsCalendar.bind(shop);
37949
- return this.fetchPeriod().reduce((prev, startAt) => assign(prev, method(this.params(startAt))), {});
38058
+ return this.#mergedDates((params) => shop.ticketsCalendar(params));
37950
38059
  }
37951
38060
  };
37952
38061
  //#endregion
@@ -38178,12 +38287,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38178
38287
  //#region src/components/ticketSelection/subcomponents/calendar/components/Calendar.svelte
38179
38288
  function Calendar_1($$anchor, $$props) {
38180
38289
  push($$props, true);
38290
+ /**
38291
+ * Per-date availability override. As an attribute it names a global function
38292
+ * (`<go-calendar availability-override="shopRule">`); as a property it is the function
38293
+ * itself (`element.availabilityOverride = fn`).
38294
+ */
38295
+ let availabilityOverride = prop($$props, "availabilityOverride", 7);
38181
38296
  const ticketsCalendar = new Calendar();
38182
38297
  const details = ticketsCalendar;
38183
38298
  const _ticketSelectionDetails = getTicketSelectionDetails($$props.$$host);
38184
38299
  const ticketSelectionDetails = /* @__PURE__ */ user_derived(() => _ticketSelectionDetails.value);
38185
38300
  user_effect(() => {
38186
38301
  ticketsCalendar.details = get$2(ticketSelectionDetails);
38302
+ ticketsCalendar.availabilityOverride = availabilityOverride();
38187
38303
  });
38188
38304
  $$props.$$host.addEventListener("go-date-select", (e) => {
38189
38305
  if (get$2(ticketSelectionDetails)) {
@@ -38191,7 +38307,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38191
38307
  get$2(ticketSelectionDetails).selectedTimeslot = void 0;
38192
38308
  }
38193
38309
  });
38194
- var $$exports = { details };
38310
+ var $$exports = {
38311
+ details,
38312
+ get availabilityOverride() {
38313
+ return availabilityOverride();
38314
+ },
38315
+ set availabilityOverride($$value) {
38316
+ availabilityOverride($$value);
38317
+ flushSync();
38318
+ }
38319
+ };
38195
38320
  var fragment = comment();
38196
38321
  var node = first_child(fragment);
38197
38322
  var consequent = ($$anchor) => {
@@ -38205,7 +38330,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38205
38330
  append($$anchor, fragment);
38206
38331
  return pop($$exports);
38207
38332
  }
38208
- customElements.define("go-calendar", create_custom_element(Calendar_1, {}, [], ["details"]));
38333
+ customElements.define("go-calendar", create_custom_element(Calendar_1, { availabilityOverride: {
38334
+ attribute: "availability-override",
38335
+ type: "String"
38336
+ } }, [], ["details"]));
38209
38337
  //#endregion
38210
38338
  //#region src/components/ticketSelection/subcomponents/addToCartButton/AddToCartButton.svelte.ts
38211
38339
  var Details = class {