@gomusdev/web-components 1.46.0 → 1.47.1
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.
- package/dist-js/axe-a11y/test-runner.d.ts +7 -0
- package/dist-js/components/donations/components/DonationCampaign.svelte.d.ts +1 -0
- package/dist-js/components/donations/components/DonationSelector.svelte.d.ts +1 -0
- package/dist-js/components/donations/components/Donations.svelte.d.ts +1 -0
- package/dist-js/components/donations/entry.d.ts +0 -0
- package/dist-js/components/order/lib/OrderDetails.svelte.d.ts +1 -0
- package/dist-js/gomus-webcomponents.css +65 -0
- package/dist-js/gomus-webcomponents.iife.js +419 -155
- package/dist-js/gomus-webcomponents.js +419 -155
- package/dist-js/lib/stores/shop.svelte.d.ts +1 -0
- package/package.json +8 -2
|
@@ -4359,6 +4359,16 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4359
4359
|
queue_micro_task(remove_defaults);
|
|
4360
4360
|
add_form_reset_listener();
|
|
4361
4361
|
}
|
|
4362
|
+
function set_value(element, value) {
|
|
4363
|
+
var attributes = get_attributes(element);
|
|
4364
|
+
if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value
|
|
4365
|
+
value ?? void 0) || // @ts-expect-error
|
|
4366
|
+
// `progress` elements always need their value set when it's `0`
|
|
4367
|
+
element.value === value && (value !== 0 || element.nodeName !== "PROGRESS")) {
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
4370
|
+
element.value = value ?? "";
|
|
4371
|
+
}
|
|
4362
4372
|
function set_selected(element, selected) {
|
|
4363
4373
|
if (selected) {
|
|
4364
4374
|
if (!element.hasAttribute("selected")) {
|
|
@@ -12884,7 +12894,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12884
12894
|
const setPersonalizationDetails = createSetDetails(KEY$4);
|
|
12885
12895
|
const getPersonalizationDetails = createGetDetails(KEY$4);
|
|
12886
12896
|
var root_3$9 = /* @__PURE__ */ from_html(`<li><a> </a></li>`);
|
|
12887
|
-
var root_2$
|
|
12897
|
+
var root_2$r = /* @__PURE__ */ from_html(`<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>`);
|
|
12888
12898
|
function AnnualTicketPersonalization($$anchor, $$props) {
|
|
12889
12899
|
push($$props, true);
|
|
12890
12900
|
let token = prop($$props, "token", 7);
|
|
@@ -12911,7 +12921,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12911
12921
|
var fragment_1 = comment();
|
|
12912
12922
|
var node_1 = first_child(fragment_1);
|
|
12913
12923
|
each(node_1, 17, () => get$2(order).ticket_sales, (ticketSale) => ticketSale.id, ($$anchor3, ticketSale) => {
|
|
12914
|
-
var ul = root_2$
|
|
12924
|
+
var ul = root_2$r();
|
|
12915
12925
|
var li = child(ul);
|
|
12916
12926
|
var text2 = child(li, true);
|
|
12917
12927
|
reset(li);
|
|
@@ -16531,7 +16541,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16531
16541
|
host.replaceChildren(element);
|
|
16532
16542
|
return element;
|
|
16533
16543
|
}
|
|
16534
|
-
var root_1$
|
|
16544
|
+
var root_1$m = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>`, 3);
|
|
16535
16545
|
function Form($$anchor, $$props) {
|
|
16536
16546
|
push($$props, true);
|
|
16537
16547
|
let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
|
|
@@ -16574,7 +16584,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16574
16584
|
var node = first_child(fragment);
|
|
16575
16585
|
{
|
|
16576
16586
|
var consequent = ($$anchor2) => {
|
|
16577
|
-
var fragment_1 = root_1$
|
|
16587
|
+
var fragment_1 = root_1$m();
|
|
16578
16588
|
var go_all_fields = first_child(fragment_1);
|
|
16579
16589
|
var go_form_feedback = sibling(go_all_fields, 2);
|
|
16580
16590
|
var go_submit = sibling(go_form_feedback, 2);
|
|
@@ -16601,7 +16611,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16601
16611
|
[],
|
|
16602
16612
|
["details"]
|
|
16603
16613
|
));
|
|
16604
|
-
var root$
|
|
16614
|
+
var root$c = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
16605
16615
|
function PasswordReset($$anchor, $$props) {
|
|
16606
16616
|
push($$props, true);
|
|
16607
16617
|
let custom2 = prop($$props, "custom", 7, false);
|
|
@@ -16631,7 +16641,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16631
16641
|
flushSync();
|
|
16632
16642
|
}
|
|
16633
16643
|
};
|
|
16634
|
-
var go_form = root$
|
|
16644
|
+
var go_form = root$c();
|
|
16635
16645
|
set_custom_element_data(go_form, "formId", "passwordReset");
|
|
16636
16646
|
template_effect(() => set_custom_element_data(go_form, "custom", custom2()));
|
|
16637
16647
|
event("submit", go_form, passwordReset);
|
|
@@ -16735,8 +16745,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16735
16745
|
[],
|
|
16736
16746
|
[]
|
|
16737
16747
|
));
|
|
16738
|
-
var root_1$
|
|
16739
|
-
var root$
|
|
16748
|
+
var root_1$l = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
|
|
16749
|
+
var root$b = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>`, 1);
|
|
16740
16750
|
function Event$2($$anchor, $$props) {
|
|
16741
16751
|
push($$props, true);
|
|
16742
16752
|
let cartItem = prop($$props, "cartItem", 7);
|
|
@@ -16751,7 +16761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16751
16761
|
flushSync();
|
|
16752
16762
|
}
|
|
16753
16763
|
};
|
|
16754
|
-
var fragment = root$
|
|
16764
|
+
var fragment = root$b();
|
|
16755
16765
|
var span = first_child(fragment);
|
|
16756
16766
|
var span_1 = child(span);
|
|
16757
16767
|
var text2 = child(span_1, true);
|
|
@@ -16763,7 +16773,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16763
16773
|
var node = sibling(span);
|
|
16764
16774
|
{
|
|
16765
16775
|
var consequent = ($$anchor2) => {
|
|
16766
|
-
var fragment_1 = root_1$
|
|
16776
|
+
var fragment_1 = root_1$l();
|
|
16767
16777
|
var span_3 = first_child(fragment_1);
|
|
16768
16778
|
var text_2 = child(span_3, true);
|
|
16769
16779
|
reset(span_3);
|
|
@@ -16794,9 +16804,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16794
16804
|
return pop($$exports);
|
|
16795
16805
|
}
|
|
16796
16806
|
create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
|
|
16797
|
-
var root_2$
|
|
16798
|
-
var root_1$
|
|
16799
|
-
var root$
|
|
16807
|
+
var root_2$q = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
16808
|
+
var root_1$k = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
16809
|
+
var root$a = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
|
|
16800
16810
|
function Ticket($$anchor, $$props) {
|
|
16801
16811
|
push($$props, true);
|
|
16802
16812
|
let cartItem = prop($$props, "cartItem", 7);
|
|
@@ -16809,21 +16819,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16809
16819
|
flushSync();
|
|
16810
16820
|
}
|
|
16811
16821
|
};
|
|
16812
|
-
var fragment = root$
|
|
16822
|
+
var fragment = root$a();
|
|
16813
16823
|
var span = first_child(fragment);
|
|
16814
16824
|
var text2 = child(span, true);
|
|
16815
16825
|
reset(span);
|
|
16816
16826
|
var node = sibling(span, 2);
|
|
16817
16827
|
{
|
|
16818
16828
|
var consequent_1 = ($$anchor2) => {
|
|
16819
|
-
var fragment_1 = root_1$
|
|
16829
|
+
var fragment_1 = root_1$k();
|
|
16820
16830
|
var span_1 = first_child(fragment_1);
|
|
16821
16831
|
var text_1 = child(span_1, true);
|
|
16822
16832
|
reset(span_1);
|
|
16823
16833
|
var node_1 = sibling(span_1, 2);
|
|
16824
16834
|
{
|
|
16825
16835
|
var consequent = ($$anchor3) => {
|
|
16826
|
-
var span_2 = root_2$
|
|
16836
|
+
var span_2 = root_2$q();
|
|
16827
16837
|
var text_2 = child(span_2, true);
|
|
16828
16838
|
reset(span_2);
|
|
16829
16839
|
template_effect(($0) => set_text(text_2, $0), [() => formatTime(cartItem().time)]);
|
|
@@ -16869,7 +16879,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16869
16879
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
16870
16880
|
var root_6$2 = /* @__PURE__ */ from_html(`<select></select>`);
|
|
16871
16881
|
var root_8$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove" data-go-cart-item-remove=""><button>⨉</button></li>`);
|
|
16872
|
-
var root_1$
|
|
16882
|
+
var root_1$j = /* @__PURE__ */ from_html(`<article><ul><li data-go-cart-item-title=""><!></li> <li class="go-cart-item-price" data-go-cart-item-price=""> </li> <li class="go-cart-item-count" data-go-cart-item-count=""><!></li> <!> <li class="go-cart-item-sum" data-go-cart-item-sum=""> </li></ul></article>`);
|
|
16873
16883
|
function Item$1($$anchor, $$props) {
|
|
16874
16884
|
push($$props, true);
|
|
16875
16885
|
let cartItem = prop($$props, "cartItem", 7), cart = prop($$props, "cart", 7), preview = prop($$props, "preview", 7);
|
|
@@ -16912,7 +16922,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16912
16922
|
var node = first_child(fragment);
|
|
16913
16923
|
{
|
|
16914
16924
|
var consequent_4 = ($$anchor2) => {
|
|
16915
|
-
var article = root_1$
|
|
16925
|
+
var article = root_1$j();
|
|
16916
16926
|
var ul = child(article);
|
|
16917
16927
|
var li = child(ul);
|
|
16918
16928
|
var node_1 = child(li);
|
|
@@ -17024,10 +17034,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17024
17034
|
}
|
|
17025
17035
|
delegate(["change", "click"]);
|
|
17026
17036
|
create_custom_element(Item$1, { cartItem: {}, cart: {}, preview: {} }, [], [], { mode: "open" });
|
|
17027
|
-
var root_2$
|
|
17037
|
+
var root_2$p = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove" data-go-cart-header-remove=""></li>`);
|
|
17028
17038
|
var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-item" data-go-cart-item=""><!></li>`);
|
|
17029
17039
|
var root_4$6 = /* @__PURE__ */ from_html(`<li class="go-cart-footer-remove" data-go-cart-footer-remove=""></li>`);
|
|
17030
|
-
var root_1$
|
|
17040
|
+
var root_1$i = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li class="go-cart-header" data-go-cart-header="" data-testid="cart-header"><ul><li class="go-cart-header-title" data-go-cart-header-title=""> </li> <li class="go-cart-header-price" data-go-cart-header-price=""> </li> <li class="go-cart-header-count" data-go-cart-header-count=""> </li> <!> <li class="go-cart-header-sum" data-go-cart-header-sum=""> </li></ul></li> <!> <li class="go-cart-footer" data-go-cart-footer="" data-testid="cart-footer"><ul><li class="go-cart-footer-title" data-go-cart-footer-title=""></li> <li class="go-cart-footer-price" data-go-cart-footer-price=""></li> <li class="go-cart-footer-count" data-go-cart-footer-count=""></li> <!> <li class="go-cart-footer-sum" data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol>`);
|
|
17031
17041
|
function Cart($$anchor, $$props) {
|
|
17032
17042
|
push($$props, true);
|
|
17033
17043
|
const preview = prop($$props, "preview", 7, false);
|
|
@@ -17045,7 +17055,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17045
17055
|
var node = first_child(fragment);
|
|
17046
17056
|
{
|
|
17047
17057
|
var consequent_2 = ($$anchor2) => {
|
|
17048
|
-
var ol = root_1$
|
|
17058
|
+
var ol = root_1$i();
|
|
17049
17059
|
var li = child(ol);
|
|
17050
17060
|
var ul = child(li);
|
|
17051
17061
|
var li_1 = child(ul);
|
|
@@ -17060,7 +17070,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17060
17070
|
var node_1 = sibling(li_3, 2);
|
|
17061
17071
|
{
|
|
17062
17072
|
var consequent = ($$anchor3) => {
|
|
17063
|
-
var li_4 = root_2$
|
|
17073
|
+
var li_4 = root_2$p();
|
|
17064
17074
|
append($$anchor3, li_4);
|
|
17065
17075
|
};
|
|
17066
17076
|
if_block(node_1, ($$render) => {
|
|
@@ -17232,7 +17242,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17232
17242
|
form.details.apiErrors = [shop.t("cart.coupon.form.errors.notValid")];
|
|
17233
17243
|
}
|
|
17234
17244
|
}
|
|
17235
|
-
var root$
|
|
17245
|
+
var root$9 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
17236
17246
|
function CouponRedemption($$anchor, $$props) {
|
|
17237
17247
|
push($$props, false);
|
|
17238
17248
|
Forms.defineForm({
|
|
@@ -17244,13 +17254,286 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17244
17254
|
await redeem(e.target);
|
|
17245
17255
|
}
|
|
17246
17256
|
init();
|
|
17247
|
-
var go_form = root$
|
|
17257
|
+
var go_form = root$9();
|
|
17248
17258
|
set_custom_element_data(go_form, "formId", "couponRedemption");
|
|
17249
17259
|
event("submit", go_form, redeem$1);
|
|
17250
17260
|
append($$anchor, go_form);
|
|
17251
17261
|
pop();
|
|
17252
17262
|
}
|
|
17253
17263
|
customElements.define("go-coupon-redemption", create_custom_element(CouponRedemption, {}, [], []));
|
|
17264
|
+
class GoDonation {
|
|
17265
|
+
#campaign = /* @__PURE__ */ state();
|
|
17266
|
+
get campaign() {
|
|
17267
|
+
return get$2(this.#campaign);
|
|
17268
|
+
}
|
|
17269
|
+
set campaign(value) {
|
|
17270
|
+
set(this.#campaign, value, true);
|
|
17271
|
+
}
|
|
17272
|
+
#amount = /* @__PURE__ */ state();
|
|
17273
|
+
get amount() {
|
|
17274
|
+
return get$2(this.#amount);
|
|
17275
|
+
}
|
|
17276
|
+
set amount(value) {
|
|
17277
|
+
set(this.#amount, value, true);
|
|
17278
|
+
}
|
|
17279
|
+
selectCampaign = (selectedCampaign) => {
|
|
17280
|
+
this.campaign = selectedCampaign;
|
|
17281
|
+
document.getElementsByClassName("donation-actions")[0]?.scrollIntoView();
|
|
17282
|
+
};
|
|
17283
|
+
addDonationToCart = () => {
|
|
17284
|
+
if (this.amount === void 0 || this.campaign === void 0) {
|
|
17285
|
+
return;
|
|
17286
|
+
}
|
|
17287
|
+
const donationObject = { value: this.amount, campaign_id: this.campaign.id };
|
|
17288
|
+
let currentDonationsLocalStorage = JSON.parse(localStorage.getItem("201600627v4donations") || "[]");
|
|
17289
|
+
let donationTotal = sum(currentDonationsLocalStorage.filter((d) => d.campaign_id = donationObject.campaign_id), (d) => d.value) + donationObject.value;
|
|
17290
|
+
if (donationTotal > this.campaign.guest_limit && this.campaign.guest_limit > 0 && (!shop.currentUser?.isAuthenticated || shop.currentUser.isGuest)) {
|
|
17291
|
+
this.skipDonation();
|
|
17292
|
+
} else {
|
|
17293
|
+
currentDonationsLocalStorage.push(donationObject);
|
|
17294
|
+
localStorage.setItem("201600627v4donations", JSON.stringify(currentDonationsLocalStorage));
|
|
17295
|
+
localStorage.setItem("skipDonation", "true");
|
|
17296
|
+
window.history.pushState(null, "", shop.urls.cart());
|
|
17297
|
+
window.location.replace(shop.urls.cart());
|
|
17298
|
+
}
|
|
17299
|
+
};
|
|
17300
|
+
skipDonation = () => {
|
|
17301
|
+
localStorage.setItem("skipDonation", "true");
|
|
17302
|
+
window.history.pushState(null, "", shop.urls.cart());
|
|
17303
|
+
window.location.replace(shop.urls.cart());
|
|
17304
|
+
};
|
|
17305
|
+
}
|
|
17306
|
+
const goDonation = new GoDonation();
|
|
17307
|
+
var root_1$h = /* @__PURE__ */ from_html(`<img alt="logo"/>`);
|
|
17308
|
+
var root$8 = /* @__PURE__ */ from_html(`<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>`);
|
|
17309
|
+
function DonationCampaign($$anchor, $$props) {
|
|
17310
|
+
push($$props, true);
|
|
17311
|
+
let campaign = prop($$props, "campaign", 7);
|
|
17312
|
+
const translations = /* @__PURE__ */ user_derived(() => campaign().translations);
|
|
17313
|
+
var $$exports = {
|
|
17314
|
+
get campaign() {
|
|
17315
|
+
return campaign();
|
|
17316
|
+
},
|
|
17317
|
+
set campaign($$value) {
|
|
17318
|
+
campaign($$value);
|
|
17319
|
+
flushSync();
|
|
17320
|
+
}
|
|
17321
|
+
};
|
|
17322
|
+
var div = root$8();
|
|
17323
|
+
let classes;
|
|
17324
|
+
div.__click = () => goDonation.selectCampaign(campaign());
|
|
17325
|
+
div.__keydown = (e) => {
|
|
17326
|
+
if (e.key === "Enter") {
|
|
17327
|
+
goDonation.selectCampaign(campaign());
|
|
17328
|
+
}
|
|
17329
|
+
};
|
|
17330
|
+
var div_1 = child(div);
|
|
17331
|
+
var node = child(div_1);
|
|
17332
|
+
{
|
|
17333
|
+
var consequent = ($$anchor2) => {
|
|
17334
|
+
var img = root_1$h();
|
|
17335
|
+
template_effect(($0) => set_attribute(img, "src", $0), [
|
|
17336
|
+
() => campaign().picture.thumbnail.replace("thumbnail", "article_3x2")
|
|
17337
|
+
]);
|
|
17338
|
+
append($$anchor2, img);
|
|
17339
|
+
};
|
|
17340
|
+
if_block(node, ($$render) => {
|
|
17341
|
+
if (campaign().picture.thumbnail) $$render(consequent);
|
|
17342
|
+
});
|
|
17343
|
+
}
|
|
17344
|
+
reset(div_1);
|
|
17345
|
+
var div_2 = sibling(div_1, 2);
|
|
17346
|
+
var p2 = child(div_2);
|
|
17347
|
+
var text2 = child(p2, true);
|
|
17348
|
+
reset(p2);
|
|
17349
|
+
var p_1 = sibling(p2, 2);
|
|
17350
|
+
var text_1 = child(p_1, true);
|
|
17351
|
+
reset(p_1);
|
|
17352
|
+
reset(div_2);
|
|
17353
|
+
reset(div);
|
|
17354
|
+
template_effect(() => {
|
|
17355
|
+
classes = set_class(div, 1, "go-donation-campaign", null, classes, { selected: goDonation.campaign?.id === campaign()?.id });
|
|
17356
|
+
set_text(text2, get$2(translations)["donations.headline"]);
|
|
17357
|
+
set_text(text_1, get$2(translations)["donations.shop.info"]);
|
|
17358
|
+
});
|
|
17359
|
+
append($$anchor, div);
|
|
17360
|
+
return pop($$exports);
|
|
17361
|
+
}
|
|
17362
|
+
delegate(["click", "keydown"]);
|
|
17363
|
+
create_custom_element(DonationCampaign, { campaign: {} }, [], [], { mode: "open" });
|
|
17364
|
+
function currency(value, currency2) {
|
|
17365
|
+
if (currency2 == "CHF") {
|
|
17366
|
+
return new Intl.NumberFormat("de-CH", { style: "currency", currency: currency2 }).format(value);
|
|
17367
|
+
} else {
|
|
17368
|
+
return new Intl.NumberFormat("de-DE", { style: "currency", currency: currency2 }).format(value);
|
|
17369
|
+
}
|
|
17370
|
+
}
|
|
17371
|
+
function parseIds(ids) {
|
|
17372
|
+
if (!ids) {
|
|
17373
|
+
return void 0;
|
|
17374
|
+
}
|
|
17375
|
+
const parsed = ids.split(",").map((id) => id.trim()).map(Number).filter((num) => !isNaN(num) && num > 0);
|
|
17376
|
+
return parsed.length > 0 ? parsed : void 0;
|
|
17377
|
+
}
|
|
17378
|
+
function parseTokens(tokens, possibleTokens) {
|
|
17379
|
+
if (!tokens) {
|
|
17380
|
+
return void 0;
|
|
17381
|
+
}
|
|
17382
|
+
const parsed = tokens.split(",").map((token) => token.trim()).map(String).filter((token) => token.length > 0);
|
|
17383
|
+
parsed.forEach((token) => {
|
|
17384
|
+
if (!possibleTokens.includes(token)) {
|
|
17385
|
+
throw new Error("(parseTokens) Invalid token: " + token);
|
|
17386
|
+
}
|
|
17387
|
+
});
|
|
17388
|
+
return parsed.length > 0 ? parsed : void 0;
|
|
17389
|
+
}
|
|
17390
|
+
var root_1$g = /* @__PURE__ */ from_html(`<button> </button>`);
|
|
17391
|
+
var root_2$o = /* @__PURE__ */ from_html(`<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>`);
|
|
17392
|
+
var root$7 = /* @__PURE__ */ from_html(`<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>`);
|
|
17393
|
+
function DonationSelector($$anchor, $$props) {
|
|
17394
|
+
push($$props, true);
|
|
17395
|
+
const guestMaxLimit = goDonation.campaign?.guest_limit / 100;
|
|
17396
|
+
let customAmount = /* @__PURE__ */ state(void 0);
|
|
17397
|
+
function selectAmount(amount) {
|
|
17398
|
+
goDonation.amount = amount;
|
|
17399
|
+
set(customAmount, null);
|
|
17400
|
+
}
|
|
17401
|
+
function handleCustomInput(e) {
|
|
17402
|
+
const form = document.getElementById("donationForm");
|
|
17403
|
+
if (form.checkValidity()) {
|
|
17404
|
+
goDonation.amount = e.target.valueAsNumber * 100;
|
|
17405
|
+
} else {
|
|
17406
|
+
goDonation.amount = void 0;
|
|
17407
|
+
form.reportValidity();
|
|
17408
|
+
}
|
|
17409
|
+
}
|
|
17410
|
+
var div = root$7();
|
|
17411
|
+
var h3 = child(div);
|
|
17412
|
+
var text2 = child(h3, true);
|
|
17413
|
+
reset(h3);
|
|
17414
|
+
var div_1 = sibling(h3, 2);
|
|
17415
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option) => option, ($$anchor2, option) => {
|
|
17416
|
+
var button = root_1$g();
|
|
17417
|
+
let classes;
|
|
17418
|
+
button.__click = () => selectAmount(option);
|
|
17419
|
+
var text_1 = child(button, true);
|
|
17420
|
+
reset(button);
|
|
17421
|
+
template_effect(
|
|
17422
|
+
($0) => {
|
|
17423
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option });
|
|
17424
|
+
set_text(text_1, $0);
|
|
17425
|
+
},
|
|
17426
|
+
[() => currency(option / 100, shop.currency)]
|
|
17427
|
+
);
|
|
17428
|
+
append($$anchor2, button);
|
|
17429
|
+
});
|
|
17430
|
+
reset(div_1);
|
|
17431
|
+
var node = sibling(div_1, 2);
|
|
17432
|
+
{
|
|
17433
|
+
var consequent = ($$anchor2) => {
|
|
17434
|
+
var form_1 = root_2$o();
|
|
17435
|
+
var div_2 = child(form_1);
|
|
17436
|
+
var label = child(div_2);
|
|
17437
|
+
var text_2 = child(label, true);
|
|
17438
|
+
reset(label);
|
|
17439
|
+
var input = sibling(label, 2);
|
|
17440
|
+
remove_input_defaults(input);
|
|
17441
|
+
input.__input = handleCustomInput;
|
|
17442
|
+
reset(div_2);
|
|
17443
|
+
reset(form_1);
|
|
17444
|
+
template_effect(
|
|
17445
|
+
($0, $1) => {
|
|
17446
|
+
set_text(text_2, $0);
|
|
17447
|
+
set_attribute(input, "max", guestMaxLimit);
|
|
17448
|
+
set_attribute(input, "placeholder", $1);
|
|
17449
|
+
set_value(input, get$2(customAmount));
|
|
17450
|
+
},
|
|
17451
|
+
[
|
|
17452
|
+
() => shop.t("donations.selection.custom.label"),
|
|
17453
|
+
() => shop.t("donations.selection.custom.input.placeholder")
|
|
17454
|
+
]
|
|
17455
|
+
);
|
|
17456
|
+
append($$anchor2, form_1);
|
|
17457
|
+
};
|
|
17458
|
+
if_block(node, ($$render) => {
|
|
17459
|
+
if (goDonation.campaign?.free_donations) $$render(consequent);
|
|
17460
|
+
});
|
|
17461
|
+
}
|
|
17462
|
+
reset(div);
|
|
17463
|
+
template_effect(($0) => set_text(text2, $0), [() => shop.t("donations.selection.title")]);
|
|
17464
|
+
append($$anchor, div);
|
|
17465
|
+
pop();
|
|
17466
|
+
}
|
|
17467
|
+
delegate(["click", "input"]);
|
|
17468
|
+
create_custom_element(DonationSelector, {}, [], [], { mode: "open" });
|
|
17469
|
+
var root_1$f = /* @__PURE__ */ from_html(`<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>`);
|
|
17470
|
+
function Donations($$anchor, $$props) {
|
|
17471
|
+
push($$props, false);
|
|
17472
|
+
onMount(() => {
|
|
17473
|
+
if (shop.donations?.campaigns?.length == 1) {
|
|
17474
|
+
goDonation.selectCampaign(shop.donations?.campaigns[0]);
|
|
17475
|
+
}
|
|
17476
|
+
});
|
|
17477
|
+
init();
|
|
17478
|
+
var fragment = comment();
|
|
17479
|
+
var node = first_child(fragment);
|
|
17480
|
+
{
|
|
17481
|
+
var consequent_1 = ($$anchor2) => {
|
|
17482
|
+
var div = root_1$f();
|
|
17483
|
+
var node_1 = child(div);
|
|
17484
|
+
each(node_1, 1, () => shop?.donations?.campaigns, (campaign) => campaign.id, ($$anchor3, campaign) => {
|
|
17485
|
+
DonationCampaign($$anchor3, {
|
|
17486
|
+
get campaign() {
|
|
17487
|
+
return get$2(campaign);
|
|
17488
|
+
}
|
|
17489
|
+
});
|
|
17490
|
+
});
|
|
17491
|
+
var node_2 = sibling(node_1, 2);
|
|
17492
|
+
{
|
|
17493
|
+
var consequent = ($$anchor3) => {
|
|
17494
|
+
DonationSelector($$anchor3, {});
|
|
17495
|
+
};
|
|
17496
|
+
if_block(node_2, ($$render) => {
|
|
17497
|
+
if (goDonation.campaign) $$render(consequent);
|
|
17498
|
+
});
|
|
17499
|
+
}
|
|
17500
|
+
var div_1 = sibling(node_2, 2);
|
|
17501
|
+
var button = child(div_1);
|
|
17502
|
+
button.__click = function(...$$args) {
|
|
17503
|
+
goDonation.skipDonation?.apply(this, $$args);
|
|
17504
|
+
};
|
|
17505
|
+
var text2 = child(button, true);
|
|
17506
|
+
reset(button);
|
|
17507
|
+
var button_1 = sibling(button, 2);
|
|
17508
|
+
button_1.__click = function(...$$args) {
|
|
17509
|
+
goDonation.addDonationToCart?.apply(this, $$args);
|
|
17510
|
+
};
|
|
17511
|
+
var text_1 = child(button_1, true);
|
|
17512
|
+
reset(button_1);
|
|
17513
|
+
reset(div_1);
|
|
17514
|
+
reset(div);
|
|
17515
|
+
template_effect(
|
|
17516
|
+
($0, $1) => {
|
|
17517
|
+
set_text(text2, $0);
|
|
17518
|
+
button_1.disabled = !goDonation.amount;
|
|
17519
|
+
set_text(text_1, $1);
|
|
17520
|
+
},
|
|
17521
|
+
[
|
|
17522
|
+
() => shop.t("donations.actions.continueWithoutDonation"),
|
|
17523
|
+
() => shop.t("donations.actions.addToCart")
|
|
17524
|
+
]
|
|
17525
|
+
);
|
|
17526
|
+
append($$anchor2, div);
|
|
17527
|
+
};
|
|
17528
|
+
if_block(node, ($$render) => {
|
|
17529
|
+
if (shop.donations && shop.donations.campaigns) $$render(consequent_1);
|
|
17530
|
+
});
|
|
17531
|
+
}
|
|
17532
|
+
append($$anchor, fragment);
|
|
17533
|
+
pop();
|
|
17534
|
+
}
|
|
17535
|
+
delegate(["click"]);
|
|
17536
|
+
customElements.define("go-donations", create_custom_element(Donations, {}, [], []));
|
|
17254
17537
|
function isFunction$1(value) {
|
|
17255
17538
|
return typeof value === "function";
|
|
17256
17539
|
}
|
|
@@ -32406,25 +32689,107 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32406
32689
|
pop();
|
|
32407
32690
|
}
|
|
32408
32691
|
customElements.define("go-order-invoice-id", create_custom_element(InvoiceId, {}, [], []));
|
|
32409
|
-
|
|
32410
|
-
|
|
32411
|
-
|
|
32692
|
+
var root$2 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
32693
|
+
function Password($$anchor, $$props) {
|
|
32694
|
+
push($$props, false);
|
|
32695
|
+
Forms.defineForm({
|
|
32696
|
+
id: "passwordResetForm",
|
|
32697
|
+
fields: [
|
|
32698
|
+
{ key: "currentPassword", required: true },
|
|
32699
|
+
{ key: "password", required: true },
|
|
32700
|
+
{ key: "confirmPassword", required: true }
|
|
32701
|
+
]
|
|
32702
|
+
});
|
|
32703
|
+
async function submit(event2) {
|
|
32704
|
+
const form = event2.target;
|
|
32705
|
+
const details = form.details;
|
|
32706
|
+
const result = await shop.updatePassword(details.formData);
|
|
32707
|
+
if (result.data) {
|
|
32708
|
+
details.successMessage = shop.t("user.passwordSuccess.desc.title");
|
|
32709
|
+
details.apiErrors = [];
|
|
32710
|
+
} else {
|
|
32711
|
+
details.apiErrors = result.error?.errors || result.error || result.errors;
|
|
32712
|
+
}
|
|
32412
32713
|
}
|
|
32413
|
-
|
|
32414
|
-
|
|
32714
|
+
init();
|
|
32715
|
+
var go_form = root$2();
|
|
32716
|
+
set_custom_element_data(go_form, "formId", "passwordResetForm");
|
|
32717
|
+
event("submit", go_form, submit);
|
|
32718
|
+
append($$anchor, go_form);
|
|
32719
|
+
pop();
|
|
32415
32720
|
}
|
|
32416
|
-
|
|
32417
|
-
|
|
32418
|
-
|
|
32419
|
-
|
|
32420
|
-
|
|
32421
|
-
|
|
32422
|
-
|
|
32423
|
-
|
|
32424
|
-
|
|
32721
|
+
customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
|
|
32722
|
+
var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
32723
|
+
function Details$2($$anchor, $$props) {
|
|
32724
|
+
push($$props, true);
|
|
32725
|
+
Forms.defineForm({
|
|
32726
|
+
id: "accountDetailsForm",
|
|
32727
|
+
fields: [
|
|
32728
|
+
{ key: "salutation", required: false },
|
|
32729
|
+
{ key: "firstName", required: true },
|
|
32730
|
+
{ key: "lastName", required: true },
|
|
32731
|
+
{ key: "email", required: true },
|
|
32732
|
+
{ key: "confirmEmail", required: true },
|
|
32733
|
+
// { key: 'addressee', required: true },
|
|
32734
|
+
// { key: 'street', required: true },
|
|
32735
|
+
// { key: 'postcode', required: true },
|
|
32736
|
+
// { key: 'city', required: true },
|
|
32737
|
+
// { key: 'country', required: true },
|
|
32738
|
+
{ key: "language", required: true }
|
|
32739
|
+
]
|
|
32425
32740
|
});
|
|
32426
|
-
|
|
32741
|
+
let form = /* @__PURE__ */ state(void 0);
|
|
32742
|
+
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
32743
|
+
onMount(async () => {
|
|
32744
|
+
await shop.waitForAllFetches();
|
|
32745
|
+
await pollUntilTruthy(() => get$2(form).details);
|
|
32746
|
+
await pollUntilTruthy(() => get$2(user).data);
|
|
32747
|
+
get$2(form).details.fill(get$2(user).data);
|
|
32748
|
+
});
|
|
32749
|
+
var go_form = root$1();
|
|
32750
|
+
set_custom_element_data(go_form, "formId", "accountDetailsForm");
|
|
32751
|
+
bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
|
|
32752
|
+
append($$anchor, go_form);
|
|
32753
|
+
pop();
|
|
32427
32754
|
}
|
|
32755
|
+
customElements.define("go-profile-details", create_custom_element(Details$2, {}, [], []));
|
|
32756
|
+
var root_1$4 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
|
|
32757
|
+
function Overview($$anchor, $$props) {
|
|
32758
|
+
push($$props, true);
|
|
32759
|
+
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
32760
|
+
const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
|
|
32761
|
+
var fragment = comment();
|
|
32762
|
+
var node = first_child(fragment);
|
|
32763
|
+
{
|
|
32764
|
+
var consequent = ($$anchor2) => {
|
|
32765
|
+
var fragment_1 = root_1$4();
|
|
32766
|
+
var div = first_child(fragment_1);
|
|
32767
|
+
var text2 = child(div);
|
|
32768
|
+
reset(div);
|
|
32769
|
+
var div_1 = sibling(div, 2);
|
|
32770
|
+
var text_1 = child(div_1, true);
|
|
32771
|
+
reset(div_1);
|
|
32772
|
+
template_effect(() => {
|
|
32773
|
+
set_text(text2, `${get$2(data).name ?? ""}
|
|
32774
|
+
${get$2(data).surname ?? ""}`);
|
|
32775
|
+
set_text(text_1, get$2(data).email);
|
|
32776
|
+
});
|
|
32777
|
+
append($$anchor2, fragment_1);
|
|
32778
|
+
};
|
|
32779
|
+
var alternate = ($$anchor2) => {
|
|
32780
|
+
var text_2 = text();
|
|
32781
|
+
template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
|
|
32782
|
+
append($$anchor2, text_2);
|
|
32783
|
+
};
|
|
32784
|
+
if_block(node, ($$render) => {
|
|
32785
|
+
if (get$2(data)) $$render(consequent);
|
|
32786
|
+
else $$render(alternate, false);
|
|
32787
|
+
});
|
|
32788
|
+
}
|
|
32789
|
+
append($$anchor, fragment);
|
|
32790
|
+
pop();
|
|
32791
|
+
}
|
|
32792
|
+
customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
|
|
32428
32793
|
function TicketSelection($$anchor, $$props) {
|
|
32429
32794
|
push($$props, true);
|
|
32430
32795
|
let mode = prop($$props, "mode", 7), filters = prop($$props, "filters", 7), eventIds = prop($$props, "eventIds", 7), museumIds = prop($$props, "museumIds", 7), exhibitionIds = prop($$props, "exhibitionIds", 7), selectedDate = prop($$props, "selectedDate", 7), selectedTimeslot = prop($$props, "selectedTimeslot", 7), ticketIds = prop($$props, "ticketIds", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7);
|
|
@@ -33061,13 +33426,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33061
33426
|
const d = /* @__PURE__ */ new Date();
|
|
33062
33427
|
return d.toISOString();
|
|
33063
33428
|
}
|
|
33064
|
-
var root_1$
|
|
33429
|
+
var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
|
|
33065
33430
|
var root_4 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
33066
33431
|
var root_3$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=""><select></select></li></ul></article></li>`);
|
|
33067
33432
|
function Item($$anchor, $$props) {
|
|
33068
33433
|
push($$props, true);
|
|
33069
33434
|
const scaled_title = ($$anchor2) => {
|
|
33070
|
-
var fragment = root_1$
|
|
33435
|
+
var fragment = root_1$3();
|
|
33071
33436
|
var span = first_child(fragment);
|
|
33072
33437
|
var text2 = child(span);
|
|
33073
33438
|
reset(span);
|
|
@@ -33179,7 +33544,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33179
33544
|
}
|
|
33180
33545
|
delegate(["change"]);
|
|
33181
33546
|
create_custom_element(Item, { item: {}, details: {} }, [], [], { mode: "open" });
|
|
33182
|
-
var root_1$
|
|
33547
|
+
var root_1$2 = /* @__PURE__ */ from_html(`<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>`);
|
|
33183
33548
|
function Body($$anchor, $$props) {
|
|
33184
33549
|
push($$props, true);
|
|
33185
33550
|
const _details = getSegmentDetails($$props.$$host);
|
|
@@ -33189,7 +33554,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33189
33554
|
var node = first_child(fragment);
|
|
33190
33555
|
{
|
|
33191
33556
|
var consequent = ($$anchor2) => {
|
|
33192
|
-
var ol = root_1$
|
|
33557
|
+
var ol = root_1$2();
|
|
33193
33558
|
var li = child(ol);
|
|
33194
33559
|
var ul = child(li);
|
|
33195
33560
|
var li_1 = child(ul);
|
|
@@ -33253,7 +33618,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33253
33618
|
pop();
|
|
33254
33619
|
}
|
|
33255
33620
|
customElements.define("go-ticket-segment-sum", create_custom_element(Sum, {}, [], []));
|
|
33256
|
-
let Details$
|
|
33621
|
+
let Details$1 = class Details {
|
|
33257
33622
|
#tsd;
|
|
33258
33623
|
get tsd() {
|
|
33259
33624
|
return get$2(this.#tsd);
|
|
@@ -33299,12 +33664,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33299
33664
|
}
|
|
33300
33665
|
};
|
|
33301
33666
|
var root_2$1 = /* @__PURE__ */ from_html(`<li><label> <input type="radio" name="timeslot"/></label></li>`);
|
|
33302
|
-
var root_1$
|
|
33667
|
+
var root_1$1 = /* @__PURE__ */ from_html(`<ul data-testid="timeslots"></ul>`);
|
|
33303
33668
|
function Timeslots($$anchor, $$props) {
|
|
33304
33669
|
push($$props, true);
|
|
33305
33670
|
const binding_group = [];
|
|
33306
33671
|
const _tsd = getTicketSelectionDetails($$props.$$host);
|
|
33307
|
-
const details = new Details$
|
|
33672
|
+
const details = new Details$1(_tsd);
|
|
33308
33673
|
const change = (e) => {
|
|
33309
33674
|
e.target.dispatchEvent(new CustomEvent("go-timeslot-select", {
|
|
33310
33675
|
detail: { selected: details.tsd.selectedTimeslot },
|
|
@@ -33317,7 +33682,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33317
33682
|
var node = first_child(fragment);
|
|
33318
33683
|
{
|
|
33319
33684
|
var consequent = ($$anchor2) => {
|
|
33320
|
-
var ul = root_1$
|
|
33685
|
+
var ul = root_1$1();
|
|
33321
33686
|
each(ul, 20, () => details.timeslots, (timeslot) => timeslot, ($$anchor3, timeslot) => {
|
|
33322
33687
|
const selected = /* @__PURE__ */ user_derived(() => details.tsd?.selectedTimeslot === timeslot.startAt);
|
|
33323
33688
|
var li = root_2$1();
|
|
@@ -33476,7 +33841,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33476
33841
|
var root_11 = /* @__PURE__ */ from_html(`<div> </div>`);
|
|
33477
33842
|
var root_7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
33478
33843
|
var root_2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
33479
|
-
var root_1
|
|
33844
|
+
var root_1 = /* @__PURE__ */ from_html(`<div data-calendar-wrapper=""><!></div>`);
|
|
33480
33845
|
function CalendarUI($$anchor, $$props) {
|
|
33481
33846
|
push($$props, true);
|
|
33482
33847
|
let calendarClass = prop($$props, "calendarClass", 7);
|
|
@@ -33498,7 +33863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33498
33863
|
flushSync();
|
|
33499
33864
|
}
|
|
33500
33865
|
};
|
|
33501
|
-
var div = root_1
|
|
33866
|
+
var div = root_1();
|
|
33502
33867
|
var node = child(div);
|
|
33503
33868
|
{
|
|
33504
33869
|
const children = ($$anchor2, $$arg0) => {
|
|
@@ -33748,7 +34113,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33748
34113
|
return pop($$exports);
|
|
33749
34114
|
}
|
|
33750
34115
|
customElements.define("go-calendar", create_custom_element(Calendar_1, {}, [], ["details"]));
|
|
33751
|
-
|
|
34116
|
+
class Details {
|
|
33752
34117
|
#ticketSelectionDetails;
|
|
33753
34118
|
get ticketSelectionDetails() {
|
|
33754
34119
|
return get$2(this.#ticketSelectionDetails);
|
|
@@ -33784,14 +34149,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33784
34149
|
const ret = this.ticketSelectionDetails.preCarts.some((cart) => cart.items.some((item) => item.quantity > 0));
|
|
33785
34150
|
return ret;
|
|
33786
34151
|
}
|
|
33787
|
-
}
|
|
33788
|
-
var root
|
|
34152
|
+
}
|
|
34153
|
+
var root = /* @__PURE__ */ from_html(`<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>`);
|
|
33789
34154
|
function AddToCartButton($$anchor, $$props) {
|
|
33790
34155
|
push($$props, true);
|
|
33791
34156
|
const _tsd = getTicketSelectionDetails($$props.$$host);
|
|
33792
|
-
const details = new Details
|
|
34157
|
+
const details = new Details(_tsd);
|
|
33793
34158
|
var $$exports = { details };
|
|
33794
|
-
var button = root
|
|
34159
|
+
var button = root();
|
|
33795
34160
|
button.__click = () => details.addToCart();
|
|
33796
34161
|
var text2 = child(button, true);
|
|
33797
34162
|
reset(button);
|
|
@@ -33812,107 +34177,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33812
34177
|
}
|
|
33813
34178
|
delegate(["click"]);
|
|
33814
34179
|
customElements.define("go-add-to-cart-button", create_custom_element(AddToCartButton, {}, [], ["details"]));
|
|
33815
|
-
var root$1 = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
33816
|
-
function Password($$anchor, $$props) {
|
|
33817
|
-
push($$props, false);
|
|
33818
|
-
Forms.defineForm({
|
|
33819
|
-
id: "passwordResetForm",
|
|
33820
|
-
fields: [
|
|
33821
|
-
{ key: "currentPassword", required: true },
|
|
33822
|
-
{ key: "password", required: true },
|
|
33823
|
-
{ key: "confirmPassword", required: true }
|
|
33824
|
-
]
|
|
33825
|
-
});
|
|
33826
|
-
async function submit(event2) {
|
|
33827
|
-
const form = event2.target;
|
|
33828
|
-
const details = form.details;
|
|
33829
|
-
const result = await shop.updatePassword(details.formData);
|
|
33830
|
-
if (result.data) {
|
|
33831
|
-
details.successMessage = shop.t("user.passwordSuccess.desc.title");
|
|
33832
|
-
details.apiErrors = [];
|
|
33833
|
-
} else {
|
|
33834
|
-
details.apiErrors = result.error?.errors || result.error || result.errors;
|
|
33835
|
-
}
|
|
33836
|
-
}
|
|
33837
|
-
init();
|
|
33838
|
-
var go_form = root$1();
|
|
33839
|
-
set_custom_element_data(go_form, "formId", "passwordResetForm");
|
|
33840
|
-
event("submit", go_form, submit);
|
|
33841
|
-
append($$anchor, go_form);
|
|
33842
|
-
pop();
|
|
33843
|
-
}
|
|
33844
|
-
customElements.define("go-profile-password", create_custom_element(Password, {}, [], []));
|
|
33845
|
-
var root = /* @__PURE__ */ from_html(`<go-form></go-form>`, 2);
|
|
33846
|
-
function Details($$anchor, $$props) {
|
|
33847
|
-
push($$props, true);
|
|
33848
|
-
Forms.defineForm({
|
|
33849
|
-
id: "accountDetailsForm",
|
|
33850
|
-
fields: [
|
|
33851
|
-
{ key: "salutation", required: false },
|
|
33852
|
-
{ key: "firstName", required: true },
|
|
33853
|
-
{ key: "lastName", required: true },
|
|
33854
|
-
{ key: "email", required: true },
|
|
33855
|
-
{ key: "confirmEmail", required: true },
|
|
33856
|
-
// { key: 'addressee', required: true },
|
|
33857
|
-
// { key: 'street', required: true },
|
|
33858
|
-
// { key: 'postcode', required: true },
|
|
33859
|
-
// { key: 'city', required: true },
|
|
33860
|
-
// { key: 'country', required: true },
|
|
33861
|
-
{ key: "language", required: true }
|
|
33862
|
-
]
|
|
33863
|
-
});
|
|
33864
|
-
let form = /* @__PURE__ */ state(void 0);
|
|
33865
|
-
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
33866
|
-
onMount(async () => {
|
|
33867
|
-
await shop.waitForAllFetches();
|
|
33868
|
-
await pollUntilTruthy(() => get$2(form).details);
|
|
33869
|
-
await pollUntilTruthy(() => get$2(user).data);
|
|
33870
|
-
get$2(form).details.fill(get$2(user).data);
|
|
33871
|
-
});
|
|
33872
|
-
var go_form = root();
|
|
33873
|
-
set_custom_element_data(go_form, "formId", "accountDetailsForm");
|
|
33874
|
-
bind_this(go_form, ($$value) => set(form, $$value), () => get$2(form));
|
|
33875
|
-
append($$anchor, go_form);
|
|
33876
|
-
pop();
|
|
33877
|
-
}
|
|
33878
|
-
customElements.define("go-profile-details", create_custom_element(Details, {}, [], []));
|
|
33879
|
-
var root_1 = /* @__PURE__ */ from_html(`<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>`, 1);
|
|
33880
|
-
function Overview($$anchor, $$props) {
|
|
33881
|
-
push($$props, true);
|
|
33882
|
-
const user = /* @__PURE__ */ user_derived(() => shop.validateToken());
|
|
33883
|
-
const data = /* @__PURE__ */ user_derived(() => get$2(user)?.data);
|
|
33884
|
-
var fragment = comment();
|
|
33885
|
-
var node = first_child(fragment);
|
|
33886
|
-
{
|
|
33887
|
-
var consequent = ($$anchor2) => {
|
|
33888
|
-
var fragment_1 = root_1();
|
|
33889
|
-
var div = first_child(fragment_1);
|
|
33890
|
-
var text2 = child(div);
|
|
33891
|
-
reset(div);
|
|
33892
|
-
var div_1 = sibling(div, 2);
|
|
33893
|
-
var text_1 = child(div_1, true);
|
|
33894
|
-
reset(div_1);
|
|
33895
|
-
template_effect(() => {
|
|
33896
|
-
set_text(text2, `${get$2(data).name ?? ""}
|
|
33897
|
-
${get$2(data).surname ?? ""}`);
|
|
33898
|
-
set_text(text_1, get$2(data).email);
|
|
33899
|
-
});
|
|
33900
|
-
append($$anchor2, fragment_1);
|
|
33901
|
-
};
|
|
33902
|
-
var alternate = ($$anchor2) => {
|
|
33903
|
-
var text_2 = text();
|
|
33904
|
-
template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
|
|
33905
|
-
append($$anchor2, text_2);
|
|
33906
|
-
};
|
|
33907
|
-
if_block(node, ($$render) => {
|
|
33908
|
-
if (get$2(data)) $$render(consequent);
|
|
33909
|
-
else $$render(alternate, false);
|
|
33910
|
-
});
|
|
33911
|
-
}
|
|
33912
|
-
append($$anchor, fragment);
|
|
33913
|
-
pop();
|
|
33914
|
-
}
|
|
33915
|
-
customElements.define("go-profile-overview", create_custom_element(Overview, {}, [], []));
|
|
33916
34180
|
async function initGo(window2) {
|
|
33917
34181
|
const stub = window2.go;
|
|
33918
34182
|
let q = stub && stub._queue || [];
|