tf-checkout-react-native 2.0.0-beta.6 → 2.0.0-beta.8
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/index.d.mts +90 -4
- package/dist/index.d.ts +90 -4
- package/dist/index.js +1390 -731
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1337 -669
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/scripts/verify-discussion-support.cjs +131 -0
- package/src/sections/AccountDeletion.tsx +329 -0
- package/src/sections/EventDiscussionView.tsx +1 -1
- package/src/sections/index.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -81,6 +81,8 @@ import {
|
|
|
81
81
|
useState as useState22,
|
|
82
82
|
useSyncExternalStore as useSyncExternalStore15
|
|
83
83
|
} from "react";
|
|
84
|
+
import { useEffect as useEffect18, useRef as useRef21, useState as useState23 } from "react";
|
|
85
|
+
import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
84
86
|
var __defProp = Object.defineProperty;
|
|
85
87
|
var __export = (target, all) => {
|
|
86
88
|
for (var name in all)
|
|
@@ -135,12 +137,13 @@ var getConfig = () => {
|
|
|
135
137
|
var getOriginUrl = () => getConfig().host;
|
|
136
138
|
var isConfigured = () => current !== null;
|
|
137
139
|
var TtfError = class extends Error {
|
|
138
|
-
constructor(message, status, code, data) {
|
|
140
|
+
constructor(message, status, code, data, retryAfter) {
|
|
139
141
|
super(message);
|
|
140
142
|
this.name = "TtfError";
|
|
141
143
|
this.status = status;
|
|
142
144
|
this.code = code;
|
|
143
145
|
this.data = data;
|
|
146
|
+
this.retryAfter = retryAfter;
|
|
144
147
|
}
|
|
145
148
|
};
|
|
146
149
|
var flattenMessages = (value6) => {
|
|
@@ -169,8 +172,14 @@ var codeFrom = (payload) => {
|
|
|
169
172
|
}
|
|
170
173
|
return void 0;
|
|
171
174
|
};
|
|
175
|
+
var retryAfterFrom = (value6) => {
|
|
176
|
+
if (typeof value6 !== "string" && typeof value6 !== "number") return void 0;
|
|
177
|
+
const text3 = String(value6).trim();
|
|
178
|
+
const seconds = /^\d+$/.test(text3) ? Number(text3) : (Date.parse(text3) - Date.now()) / 1e3;
|
|
179
|
+
return Number.isFinite(seconds) && seconds > 0 ? Math.ceil(seconds) : void 0;
|
|
180
|
+
};
|
|
172
181
|
var toTtfError = (error, fallback = "Something went wrong") => {
|
|
173
|
-
var _a, _b, _c;
|
|
182
|
+
var _a, _b, _c, _d, _e;
|
|
174
183
|
if (error instanceof TtfError) return error;
|
|
175
184
|
if (error instanceof AxiosError) {
|
|
176
185
|
const status = (_b = (_a = error.response) == null ? void 0 : _a.status) != null ? _b : 0;
|
|
@@ -179,7 +188,8 @@ var toTtfError = (error, fallback = "Something went wrong") => {
|
|
|
179
188
|
messageFrom(payload, error.message || fallback),
|
|
180
189
|
status,
|
|
181
190
|
codeFrom(payload),
|
|
182
|
-
payload
|
|
191
|
+
payload,
|
|
192
|
+
retryAfterFrom((_e = (_d = error.response) == null ? void 0 : _d.headers) == null ? void 0 : _e["retry-after"])
|
|
183
193
|
);
|
|
184
194
|
}
|
|
185
195
|
if (error instanceof Error) return new TtfError(error.message || fallback, 0);
|
|
@@ -458,11 +468,11 @@ var active = null;
|
|
|
458
468
|
var eventSuffix = /^(?:tickets|add-to-cart|add-ons(?:\/reserve)?|custom_fields|conditions|promo|currency|password|track|referrer|add_to_waiting_list|send-rsvp-info|extras\/(?:accommodation|reserve)|festival\/(?:accommodation|reserve)|waiver(?:\/signature-image)?|seat-token|seat-chart|seats\/(?:selection-(?:cart|status|reserve|release)|reserve(?:\/block)?|status|delete-reserved))\/?$/;
|
|
459
469
|
var checkoutGrantEvent = (url2, currentEvent) => {
|
|
460
470
|
if (/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(url2)) return null;
|
|
461
|
-
const
|
|
462
|
-
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(
|
|
471
|
+
const path4 = url2.split(/[?#]/, 1)[0].replace(/^\/+/, "").replace(/^api\//, "");
|
|
472
|
+
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(path4);
|
|
463
473
|
if (event)
|
|
464
474
|
return event[1] === currentEvent && (!event[2] || eventSuffix.test(event[2])) ? event[1] : null;
|
|
465
|
-
if (/^v1\/(?:cart|checkout-configs|checkout|on-checkout)\/?$/.test(
|
|
475
|
+
if (/^v1\/(?:cart|checkout-configs|checkout|on-checkout)\/?$/.test(path4) || /^v1\/checkout\/(?:request-phone-code|verify-phone-code)\/?$/.test(path4) || /^v1\/order\/[^/]+\/verify-customer-order\/?$/.test(path4))
|
|
466
476
|
return currentEvent;
|
|
467
477
|
return null;
|
|
468
478
|
};
|
|
@@ -1192,23 +1202,23 @@ var missingCheckoutDetails = (state, options = {}) => {
|
|
|
1192
1202
|
return missing;
|
|
1193
1203
|
};
|
|
1194
1204
|
var buildOnCheckoutBody = (input, base = {}) => {
|
|
1195
|
-
const
|
|
1205
|
+
const attributes6 = { ...base };
|
|
1196
1206
|
const buyer2 = input.buyerFields || {};
|
|
1197
1207
|
if (buyer2.phoneVerificationToken)
|
|
1198
|
-
|
|
1208
|
+
attributes6.phone_verification_token = buyer2.phoneVerificationToken;
|
|
1199
1209
|
if (buyer2.phoneVerificationToken && buyer2.phoneFirstUseKnownEmail === true)
|
|
1200
|
-
|
|
1210
|
+
attributes6.phone_first_use_known_email = true;
|
|
1201
1211
|
if (buyer2.nationality !== void 0 && buyer2.nationality !== "") {
|
|
1202
|
-
|
|
1212
|
+
attributes6.nationality = buyer2.nationality;
|
|
1203
1213
|
}
|
|
1204
1214
|
if (buyer2.gender) {
|
|
1205
|
-
|
|
1215
|
+
attributes6.gender = buyer2.gender;
|
|
1206
1216
|
}
|
|
1207
1217
|
if (buyer2.instagramHandle) {
|
|
1208
|
-
|
|
1218
|
+
attributes6.instagram_handle = buyer2.instagramHandle;
|
|
1209
1219
|
}
|
|
1210
1220
|
if (hasKeys(input.dataCapture)) {
|
|
1211
|
-
|
|
1221
|
+
attributes6.data_capture = { ...input.dataCapture };
|
|
1212
1222
|
}
|
|
1213
1223
|
if (input.ticketHolders && input.ticketHolders.length) {
|
|
1214
1224
|
const holders = [];
|
|
@@ -1232,21 +1242,21 @@ var buildOnCheckoutBody = (input, base = {}) => {
|
|
|
1232
1242
|
holders.push(row);
|
|
1233
1243
|
ticketDataCapture.push(hasKeys(capture) ? { ...capture } : {});
|
|
1234
1244
|
});
|
|
1235
|
-
|
|
1245
|
+
attributes6.ticket_holders = holders;
|
|
1236
1246
|
if (hasTicketCapture) {
|
|
1237
|
-
|
|
1247
|
+
attributes6.ticket_data_capture = ticketDataCapture;
|
|
1238
1248
|
}
|
|
1239
1249
|
}
|
|
1240
1250
|
if (hasKeys(input.addOns)) {
|
|
1241
|
-
|
|
1251
|
+
attributes6.add_ons = { ...input.addOns };
|
|
1242
1252
|
}
|
|
1243
1253
|
if (hasKeys(input.addOnDataCapture)) {
|
|
1244
|
-
|
|
1254
|
+
attributes6.add_on_data_capture = { ...input.addOnDataCapture };
|
|
1245
1255
|
}
|
|
1246
1256
|
if (input.waiverSignatures && input.waiverSignatures.length) {
|
|
1247
|
-
|
|
1257
|
+
attributes6.waiver_signatures = input.waiverSignatures.map((entry) => ({ ...entry }));
|
|
1248
1258
|
}
|
|
1249
|
-
return
|
|
1259
|
+
return attributes6;
|
|
1250
1260
|
};
|
|
1251
1261
|
var evaluateFieldGates = (gates) => {
|
|
1252
1262
|
const g = gates || {};
|
|
@@ -1343,9 +1353,9 @@ var buildChangePaymentMethodAttributes = (input) => ({
|
|
|
1343
1353
|
order_hash: input.orderHash,
|
|
1344
1354
|
redirect: false
|
|
1345
1355
|
});
|
|
1346
|
-
var resolvePayPalForm = (
|
|
1347
|
-
const actionUrl =
|
|
1348
|
-
const fields =
|
|
1356
|
+
var resolvePayPalForm = (attributes6) => {
|
|
1357
|
+
const actionUrl = attributes6 && attributes6.action_url;
|
|
1358
|
+
const fields = attributes6 && attributes6.fields;
|
|
1349
1359
|
if (typeof actionUrl !== "string" || !actionUrl) return null;
|
|
1350
1360
|
if (!fields || typeof fields !== "object") return null;
|
|
1351
1361
|
return { action_url: actionUrl, fields };
|
|
@@ -1671,8 +1681,8 @@ var rewardsFromResponse = (response) => {
|
|
|
1671
1681
|
if (!isObject(response)) return null;
|
|
1672
1682
|
if (looksLikeRewards(response)) return response;
|
|
1673
1683
|
const data = isObject(response.data) ? response.data : {};
|
|
1674
|
-
const
|
|
1675
|
-
for (const candidate of [
|
|
1684
|
+
const attributes6 = isObject(data.attributes) ? data.attributes : {};
|
|
1685
|
+
for (const candidate of [attributes6.rewards, data.rewards, response.rewards]) {
|
|
1676
1686
|
if (looksLikeRewards(candidate)) return candidate;
|
|
1677
1687
|
}
|
|
1678
1688
|
return null;
|
|
@@ -2707,8 +2717,8 @@ var mapBundle = (b) => {
|
|
|
2707
2717
|
maxQuantity: max
|
|
2708
2718
|
};
|
|
2709
2719
|
};
|
|
2710
|
-
var bundlesFromCatalog = (
|
|
2711
|
-
const attrs =
|
|
2720
|
+
var bundlesFromCatalog = (attributes6) => {
|
|
2721
|
+
const attrs = attributes6 != null ? attributes6 : {};
|
|
2712
2722
|
return asList(attrs.bundles).map(mapBundle).filter((bundle) => bundle.id !== "");
|
|
2713
2723
|
};
|
|
2714
2724
|
var bundleQuantityRange = (bundle) => {
|
|
@@ -3715,18 +3725,18 @@ var ticketChangeDoneCopy = (result2) => {
|
|
|
3715
3725
|
var slotAlternativesFromError = (error) => {
|
|
3716
3726
|
const e = error != null ? error : {};
|
|
3717
3727
|
const payload = e.data && typeof e.data === "object" ? e.data : e;
|
|
3718
|
-
return list(payload.alternatives).map((
|
|
3728
|
+
return list(payload.alternatives).map((s6) => {
|
|
3719
3729
|
var _a, _b, _c, _d, _e;
|
|
3720
3730
|
return {
|
|
3721
|
-
ticketTypeId: String((_a =
|
|
3722
|
-
label: String((_c = (_b =
|
|
3723
|
-
startsAt: String((_d =
|
|
3724
|
-
slotValue: String((_e =
|
|
3731
|
+
ticketTypeId: String((_a = s6.ticketTypeId) != null ? _a : ""),
|
|
3732
|
+
label: String((_c = (_b = s6.label) != null ? _b : s6.startsAt) != null ? _c : ""),
|
|
3733
|
+
startsAt: String((_d = s6.startsAt) != null ? _d : ""),
|
|
3734
|
+
slotValue: String((_e = s6.slotValue) != null ? _e : "")
|
|
3725
3735
|
};
|
|
3726
|
-
}).filter((
|
|
3736
|
+
}).filter((s6) => s6.ticketTypeId !== "" && s6.label !== "").slice(0, 3);
|
|
3727
3737
|
};
|
|
3728
3738
|
var ticketChangeView = (options) => options.canChange ? "choose" : "closed";
|
|
3729
|
-
var resolveSiteUrl = (
|
|
3739
|
+
var resolveSiteUrl = (path4, origin) => /^https?:\/\//i.test(path4) ? path4 : `${origin.replace(/\/+$/, "")}/${path4.replace(/^\/+/, "")}`;
|
|
3730
3740
|
var ticketChangeAccessKey = (access) => {
|
|
3731
3741
|
var _a;
|
|
3732
3742
|
return JSON.stringify([access.ticketHash, (_a = access.orderHash) != null ? _a : ""]);
|
|
@@ -3924,8 +3934,8 @@ var signaturePngDataUrl = (strokes, { padWidth, padHeight, width = 600, lineWidt
|
|
|
3924
3934
|
const a = points[i - 1];
|
|
3925
3935
|
const b = points[i];
|
|
3926
3936
|
const steps = Math.max(1, Math.ceil(Math.hypot(b.x - a.x, b.y - a.y) * 2));
|
|
3927
|
-
for (let
|
|
3928
|
-
ink(a.x + (b.x - a.x) *
|
|
3937
|
+
for (let s6 = 0; s6 <= steps; s6++) {
|
|
3938
|
+
ink(a.x + (b.x - a.x) * s6 / steps, a.y + (b.y - a.y) * s6 / steps);
|
|
3929
3939
|
}
|
|
3930
3940
|
}
|
|
3931
3941
|
}
|
|
@@ -4188,23 +4198,23 @@ var waiverSignaturesAttribute = (waiver, signatures, holders, billing, backfille
|
|
|
4188
4198
|
backfilledHolderIndexes
|
|
4189
4199
|
);
|
|
4190
4200
|
if (!waiver || !counted) return [];
|
|
4191
|
-
return Object.entries(counted).map(([index,
|
|
4201
|
+
return Object.entries(counted).map(([index, s6]) => [Number(index), s6]).filter(([index]) => Number.isInteger(index) && index >= 0 && index < holders.length).sort(([a], [b]) => a - b).map(([index, s6]) => {
|
|
4192
4202
|
var _a, _b, _c, _d;
|
|
4193
4203
|
return {
|
|
4194
4204
|
holder_index: index,
|
|
4195
4205
|
version_id: waiver.versionId,
|
|
4196
4206
|
body_sha256: waiver.bodySha256,
|
|
4197
|
-
signer_role:
|
|
4198
|
-
first_name:
|
|
4199
|
-
last_name:
|
|
4200
|
-
...
|
|
4201
|
-
minor_name: (_a =
|
|
4202
|
-
guardian_relationship: (_b =
|
|
4203
|
-
...
|
|
4207
|
+
signer_role: s6.signerRole,
|
|
4208
|
+
first_name: s6.firstName,
|
|
4209
|
+
last_name: s6.lastName,
|
|
4210
|
+
...s6.signerRole === "guardian" ? {
|
|
4211
|
+
minor_name: (_a = s6.minorName) != null ? _a : "",
|
|
4212
|
+
guardian_relationship: (_b = s6.guardianRelationship) != null ? _b : "",
|
|
4213
|
+
...s6.minorDob ? { minor_dob: s6.minorDob } : {}
|
|
4204
4214
|
} : {},
|
|
4205
|
-
method:
|
|
4206
|
-
...
|
|
4207
|
-
agree_electronic:
|
|
4215
|
+
method: s6.method,
|
|
4216
|
+
...s6.method === "typed" ? { typed_name: (_c = s6.typedName) != null ? _c : "" } : { image_reference: (_d = s6.imageReference) != null ? _d : "" },
|
|
4217
|
+
agree_electronic: s6.agreeElectronic
|
|
4208
4218
|
};
|
|
4209
4219
|
});
|
|
4210
4220
|
};
|
|
@@ -4282,7 +4292,7 @@ var checkoutIsBusy = (snapshot) => {
|
|
|
4282
4292
|
};
|
|
4283
4293
|
var cartTicketCount = (cart) => {
|
|
4284
4294
|
var _a, _b;
|
|
4285
|
-
return cart.selections.reduce((n,
|
|
4295
|
+
return cart.selections.reduce((n, s6) => n + s6.quantity, 0) || ((_b = (_a = cart.breakdown) == null ? void 0 : _a.tickets) != null ? _b : []).reduce((n, line) => n + line.quantity, 0) || 1;
|
|
4286
4296
|
};
|
|
4287
4297
|
var cartTicketSlots = (cart) => {
|
|
4288
4298
|
var _a, _b;
|
|
@@ -5382,6 +5392,7 @@ __export(api_exports, {
|
|
|
5382
5392
|
createPaymentPlan: () => createPaymentPlan,
|
|
5383
5393
|
declineResale: () => declineResale,
|
|
5384
5394
|
decodeShareActionToken: () => decodeShareActionToken,
|
|
5395
|
+
deleteAccount: () => deleteAccount,
|
|
5385
5396
|
disconnectAccount: () => disconnectAccount,
|
|
5386
5397
|
disconnectAppleMusic: () => disconnectAppleMusic,
|
|
5387
5398
|
disconnectSpotify: () => disconnectSpotify,
|
|
@@ -5389,6 +5400,7 @@ __export(api_exports, {
|
|
|
5389
5400
|
exchangeCheckoutBrowserCode: () => exchangeCheckoutBrowserCode,
|
|
5390
5401
|
filterAddonsForTickets: () => filterAddonsForTickets,
|
|
5391
5402
|
getAccommodation: () => getAccommodation,
|
|
5403
|
+
getAccountDeletionStatus: () => getAccountDeletionStatus,
|
|
5392
5404
|
getAccountRewards: () => getAccountRewards,
|
|
5393
5405
|
getCart: () => getCart,
|
|
5394
5406
|
getCheckoutBuyerProfile: () => getCheckoutBuyerProfile,
|
|
@@ -5494,6 +5506,7 @@ __export(api_exports, {
|
|
|
5494
5506
|
sdkSeatSessionHeaders: () => sdkSeatSessionHeaders,
|
|
5495
5507
|
seatSelectionSecurity: () => seatSelectionSecurity,
|
|
5496
5508
|
sellTicket: () => sellTicket,
|
|
5509
|
+
sendAccountDeletionCode: () => sendAccountDeletionCode,
|
|
5497
5510
|
sendCheckoutTwoFactorSms: () => sendCheckoutTwoFactorSms,
|
|
5498
5511
|
sendPhoneCode: () => sendPhoneCode,
|
|
5499
5512
|
sendRsvp: () => sendRsvp,
|
|
@@ -5583,15 +5596,15 @@ var assertSuccess = (response) => {
|
|
|
5583
5596
|
}
|
|
5584
5597
|
return response.data;
|
|
5585
5598
|
};
|
|
5586
|
-
var updateAccount = async (
|
|
5599
|
+
var updateAccount = async (attributes6) => {
|
|
5587
5600
|
const response = await patch(ENDPOINTS.profile.account, {
|
|
5588
|
-
data: { attributes:
|
|
5601
|
+
data: { attributes: attributes6 }
|
|
5589
5602
|
});
|
|
5590
5603
|
return assertSuccess(response);
|
|
5591
5604
|
};
|
|
5592
|
-
var updateProfile = async (
|
|
5605
|
+
var updateProfile = async (attributes6) => {
|
|
5593
5606
|
const epoch = getSessionEpoch();
|
|
5594
|
-
const normalized = buildProfileUpdate(
|
|
5607
|
+
const normalized = buildProfileUpdate(attributes6);
|
|
5595
5608
|
const response = await patch(ENDPOINTS.profile.update, {
|
|
5596
5609
|
data: { attributes: normalized }
|
|
5597
5610
|
});
|
|
@@ -5743,13 +5756,13 @@ var register = async (fields) => {
|
|
|
5743
5756
|
return profile;
|
|
5744
5757
|
}
|
|
5745
5758
|
const data = res.data;
|
|
5746
|
-
const
|
|
5747
|
-
if (
|
|
5759
|
+
const attributes6 = data && typeof data === "object" && "attributes" in data ? data.attributes : void 0;
|
|
5760
|
+
if (attributes6 == null ? void 0 : attributes6.access_token) {
|
|
5748
5761
|
assertAuthEpoch(epoch);
|
|
5749
5762
|
setTokens(
|
|
5750
5763
|
{
|
|
5751
|
-
access:
|
|
5752
|
-
refresh:
|
|
5764
|
+
access: attributes6.access_token,
|
|
5765
|
+
refresh: attributes6.refresh_token
|
|
5753
5766
|
},
|
|
5754
5767
|
epoch
|
|
5755
5768
|
);
|
|
@@ -5763,7 +5776,7 @@ var register = async (fields) => {
|
|
|
5763
5776
|
if (error instanceof TtfError && error.code === "two_factor_auth") throw error;
|
|
5764
5777
|
}
|
|
5765
5778
|
}
|
|
5766
|
-
const candidate = (_c =
|
|
5779
|
+
const candidate = (_c = attributes6 == null ? void 0 : attributes6.user_profile) != null ? _c : data;
|
|
5767
5780
|
assertAuthEpoch(epoch);
|
|
5768
5781
|
const firstName = String((_e = (_d = candidate == null ? void 0 : candidate.firstName) != null ? _d : candidate == null ? void 0 : candidate.first_name) != null ? _e : "");
|
|
5769
5782
|
const lastName = String((_g = (_f = candidate == null ? void 0 : candidate.lastName) != null ? _f : candidate == null ? void 0 : candidate.last_name) != null ? _g : "");
|
|
@@ -6191,7 +6204,7 @@ var decodeShareActionToken = (value6, method) => {
|
|
|
6191
6204
|
}
|
|
6192
6205
|
return value6;
|
|
6193
6206
|
};
|
|
6194
|
-
var confirmPreRegistration = async (eventId,
|
|
6207
|
+
var confirmPreRegistration = async (eventId, attributes6) => post(ENDPOINTS.preRegistration.confirm(eventId), { data: { attributes: attributes6 } });
|
|
6195
6208
|
var getInfluencers = async (eventId) => get(ENDPOINTS.preRegistration.influencers(eventId));
|
|
6196
6209
|
var getConfirmationPage = async (hash) => get(ENDPOINTS.preRegistration.confirmationPage(hash));
|
|
6197
6210
|
var submitShareAction = async (hash, input) => {
|
|
@@ -6359,14 +6372,14 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6359
6372
|
const body = await get(ENDPOINTS.events.info(eventId), {
|
|
6360
6373
|
params: pk ? { pk } : void 0
|
|
6361
6374
|
});
|
|
6362
|
-
const
|
|
6363
|
-
const a =
|
|
6375
|
+
const attributes6 = (_b = (_a = body == null ? void 0 : body.data) == null ? void 0 : _a.attributes) != null ? _b : {};
|
|
6376
|
+
const a = attributes6;
|
|
6364
6377
|
const slotSettings = (_d = (_c = a.timeslotSettings) != null ? _c : a.timeslot_settings) != null ? _d : {};
|
|
6365
6378
|
const dates = (_g = (_f = (_e = slotSettings.availableDates) != null ? _e : slotSettings.available_dates) != null ? _f : a.available_dates) != null ? _g : [];
|
|
6366
6379
|
const rawCountry = a.country;
|
|
6367
6380
|
const countryCode = (_j = (_i = (_h = typeof rawCountry === "string" ? rawCountry : rawCountry == null ? void 0 : rawCountry.code) != null ? _h : a.countryCode) != null ? _i : a.country_code) != null ? _j : null;
|
|
6368
6381
|
return {
|
|
6369
|
-
isSeatedEvent: isSeatedEvent(
|
|
6382
|
+
isSeatedEvent: isSeatedEvent(attributes6),
|
|
6370
6383
|
tableMapEnabled: Boolean((_k = a.tableMapEnabled) != null ? _k : a.table_map_enabled),
|
|
6371
6384
|
isTimeSlotEvent: Boolean(
|
|
6372
6385
|
(_n = (_m = (_l = a.isTimeSlotEvent) != null ? _l : a.is_time_slot_event) != null ? _m : a.time_slot_event) != null ? _n : a.is_timeslot
|
|
@@ -6375,8 +6388,8 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6375
6388
|
allowMultipleTicketTypePurchases: Boolean(
|
|
6376
6389
|
(_o = a.allowMultipleTicketTypePurchases) != null ? _o : a.allow_multiple_ticket_type_purchases
|
|
6377
6390
|
),
|
|
6378
|
-
slug: (_p =
|
|
6379
|
-
name: (_q =
|
|
6391
|
+
slug: (_p = attributes6.slug) != null ? _p : null,
|
|
6392
|
+
name: (_q = attributes6.name) != null ? _q : null,
|
|
6380
6393
|
countryCode: countryCode ? String(countryCode).toUpperCase() : null
|
|
6381
6394
|
};
|
|
6382
6395
|
};
|
|
@@ -6414,30 +6427,30 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
|
6414
6427
|
for (const hourKey of Object.keys(hours != null ? hours : {}).sort()) {
|
|
6415
6428
|
const times = (_e = hours[hourKey]) != null ? _e : {};
|
|
6416
6429
|
for (const timeKey of Object.keys(times).sort()) {
|
|
6417
|
-
for (const
|
|
6418
|
-
if (!(
|
|
6419
|
-
const stock = Number((_h = (_g =
|
|
6430
|
+
for (const s6 of Object.values((_f = times[timeKey]) != null ? _f : {})) {
|
|
6431
|
+
if (!(s6 == null ? void 0 : s6.matrix_record_id)) continue;
|
|
6432
|
+
const stock = Number((_h = (_g = s6.in_stock) != null ? _g : s6.real_stock) != null ? _h : 0);
|
|
6420
6433
|
out.push({
|
|
6421
|
-
id: String(
|
|
6422
|
-
name:
|
|
6423
|
-
groupName: (_j = (_i =
|
|
6424
|
-
optionName: String((_k =
|
|
6425
|
-
price: Number((_l =
|
|
6426
|
-
priceWithFees: Number((_n = (_m =
|
|
6427
|
-
priceSymbol: (_p = (_o =
|
|
6434
|
+
id: String(s6.matrix_record_id),
|
|
6435
|
+
name: s6.display_name || s6.option_value || "Ticket",
|
|
6436
|
+
groupName: (_j = (_i = s6.group_name) != null ? _i : s6.groupName) != null ? _j : null,
|
|
6437
|
+
optionName: String((_k = s6.option_key) != null ? _k : ""),
|
|
6438
|
+
price: Number((_l = s6.base_price) != null ? _l : 0),
|
|
6439
|
+
priceWithFees: Number((_n = (_m = s6.price_with_fees) != null ? _m : s6.base_price) != null ? _n : 0),
|
|
6440
|
+
priceSymbol: (_p = (_o = s6.price_symbol) != null ? _o : s6.priceSymbol) != null ? _p : "",
|
|
6428
6441
|
currency: "",
|
|
6429
6442
|
feeIncluded: false,
|
|
6430
|
-
depositPercent:
|
|
6431
|
-
soldOut: Boolean(
|
|
6432
|
-
salesStarted:
|
|
6433
|
-
salesEnded: Boolean(
|
|
6434
|
-
minQuantity: Number((_q =
|
|
6435
|
-
maxQuantity: Number((_r =
|
|
6436
|
-
multiplier: Number((_s =
|
|
6437
|
-
isTable: Boolean(
|
|
6443
|
+
depositPercent: s6.deposit_percent != null ? Number(s6.deposit_percent) : null,
|
|
6444
|
+
soldOut: Boolean(s6.sold_out) || stock <= 0,
|
|
6445
|
+
salesStarted: s6.sales_started != null ? Boolean(s6.sales_started) : true,
|
|
6446
|
+
salesEnded: Boolean(s6.sales_ended),
|
|
6447
|
+
minQuantity: Number((_q = s6.min_quantity) != null ? _q : 1) || 1,
|
|
6448
|
+
maxQuantity: Number((_r = s6.max_quantity) != null ? _r : 10) || 10,
|
|
6449
|
+
multiplier: Number((_s = s6.multiplier) != null ? _s : 1) || 1,
|
|
6450
|
+
isTable: Boolean(s6.is_table),
|
|
6438
6451
|
allowDirectPurchase: true,
|
|
6439
|
-
descriptionRich: (_t =
|
|
6440
|
-
badgeText: badgeOf((_u =
|
|
6452
|
+
descriptionRich: (_t = s6.description) != null ? _t : null,
|
|
6453
|
+
badgeText: badgeOf((_u = s6.badge_text) != null ? _u : s6.badgeText),
|
|
6441
6454
|
timeSlot: { date: slotDate, time: timeKey }
|
|
6442
6455
|
});
|
|
6443
6456
|
}
|
|
@@ -6863,7 +6876,7 @@ var createOrder = async (input) => {
|
|
|
6863
6876
|
billing,
|
|
6864
6877
|
input.backfilledHolderIndexes
|
|
6865
6878
|
);
|
|
6866
|
-
const
|
|
6879
|
+
const attributes6 = buildOnCheckoutBody(
|
|
6867
6880
|
{
|
|
6868
6881
|
buyerFields: {
|
|
6869
6882
|
phoneVerificationToken: billing.phoneVerificationToken,
|
|
@@ -6916,7 +6929,7 @@ var createOrder = async (input) => {
|
|
|
6916
6929
|
} : {}
|
|
6917
6930
|
}
|
|
6918
6931
|
);
|
|
6919
|
-
const body = await post(ENDPOINTS.order.create, { data: { attributes:
|
|
6932
|
+
const body = await post(ENDPOINTS.order.create, { data: { attributes: attributes6 } });
|
|
6920
6933
|
const a = (_b = body == null ? void 0 : body.data) == null ? void 0 : _b.attributes;
|
|
6921
6934
|
if (!(a == null ? void 0 : a.hash)) throw new TtfError("Order was not created (no hash in response).", 0);
|
|
6922
6935
|
return {
|
|
@@ -6956,8 +6969,8 @@ var mapProfileToBilling = (profile) => {
|
|
|
6956
6969
|
var _a, _b, _c, _d;
|
|
6957
6970
|
const str = (v) => v == null || v === "" ? void 0 : String(v);
|
|
6958
6971
|
const idStr = (v) => {
|
|
6959
|
-
const
|
|
6960
|
-
return
|
|
6972
|
+
const s6 = str(v);
|
|
6973
|
+
return s6 === void 0 || s6 === "0" || s6 === "-1" ? void 0 : s6;
|
|
6961
6974
|
};
|
|
6962
6975
|
const dobParts = /^(\d{4})-(\d{2})-(\d{2})/.exec((_a = profile.dateOfBirth) != null ? _a : "");
|
|
6963
6976
|
const dob = dobParts && Number(dobParts[1]) > 1900 ? {
|
|
@@ -7074,9 +7087,9 @@ var chargeSavedCardPlan = async (orderHash, paymentMethodId) => {
|
|
|
7074
7087
|
clientSecret: typeof inner.client_secret === "string" ? inner.client_secret : void 0
|
|
7075
7088
|
};
|
|
7076
7089
|
};
|
|
7077
|
-
var changePaymentMethod = async (
|
|
7090
|
+
var changePaymentMethod = async (attributes6) => {
|
|
7078
7091
|
await post(ENDPOINTS.payment.changeMethod, {
|
|
7079
|
-
data: { attributes:
|
|
7092
|
+
data: { attributes: attributes6 }
|
|
7080
7093
|
});
|
|
7081
7094
|
};
|
|
7082
7095
|
var getPayPalForm = async (orderHash) => {
|
|
@@ -8015,14 +8028,14 @@ var unwrap3 = (response) => {
|
|
|
8015
8028
|
return response.data;
|
|
8016
8029
|
};
|
|
8017
8030
|
var getWordPostReaction = async (postId) => {
|
|
8018
|
-
const
|
|
8031
|
+
const path4 = endpoint(postId);
|
|
8019
8032
|
const epoch = getSessionEpoch();
|
|
8020
|
-
const result2 = unwrap3(await get(
|
|
8033
|
+
const result2 = unwrap3(await get(path4));
|
|
8021
8034
|
assertSessionEpoch(epoch);
|
|
8022
8035
|
return result2;
|
|
8023
8036
|
};
|
|
8024
8037
|
var setWordPostReaction = async (postId, reaction, revision) => {
|
|
8025
|
-
const
|
|
8038
|
+
const path4 = endpoint(postId);
|
|
8026
8039
|
if (![null, "up", "down"].includes(reaction) || !Number.isSafeInteger(revision) || revision < 0)
|
|
8027
8040
|
throw new TtfError(
|
|
8028
8041
|
"Choose an article reaction and try again.",
|
|
@@ -8033,7 +8046,7 @@ var setWordPostReaction = async (postId, reaction, revision) => {
|
|
|
8033
8046
|
const security2 = await sessionWriteSecurity(epoch);
|
|
8034
8047
|
assertSessionEpoch(epoch);
|
|
8035
8048
|
const result2 = unwrap3(
|
|
8036
|
-
await put(
|
|
8049
|
+
await put(path4, { reaction, revision }, security2)
|
|
8037
8050
|
);
|
|
8038
8051
|
assertSessionEpoch(epoch);
|
|
8039
8052
|
return result2;
|
|
@@ -8203,6 +8216,98 @@ var cancelTicketGift = async (hash, tokenId) => {
|
|
|
8203
8216
|
)
|
|
8204
8217
|
);
|
|
8205
8218
|
};
|
|
8219
|
+
var path3 = "/customer/account-deletion";
|
|
8220
|
+
var requireAccount2 = () => {
|
|
8221
|
+
if (!getConfig().accountAuth || !getConfig().cookieAuth || !isAuthenticated() || !getConfirmedBuyerId())
|
|
8222
|
+
throw new TtfError("Sign in to your Ticket Fairy account to delete it.", 401);
|
|
8223
|
+
};
|
|
8224
|
+
var invalid = () => {
|
|
8225
|
+
throw new TtfError("Account deletion could not be confirmed. Try again.", 502);
|
|
8226
|
+
};
|
|
8227
|
+
var attributes5 = (raw) => {
|
|
8228
|
+
var _a, _b, _c, _d;
|
|
8229
|
+
if ((raw == null ? void 0 : raw.success) === false || (raw == null ? void 0 : raw.error) === true)
|
|
8230
|
+
throw new TtfError(
|
|
8231
|
+
typeof raw.message === "string" ? raw.message : "Unable to update your account.",
|
|
8232
|
+
typeof raw.status === "number" ? raw.status : 422,
|
|
8233
|
+
typeof raw.code === "string" ? raw.code : void 0,
|
|
8234
|
+
raw
|
|
8235
|
+
);
|
|
8236
|
+
return (_d = (_c = (_b = (_a = raw == null ? void 0 : raw.data) == null ? void 0 : _a.attributes) != null ? _b : raw == null ? void 0 : raw.data) != null ? _c : raw) != null ? _d : {};
|
|
8237
|
+
};
|
|
8238
|
+
var brand = (value6) => {
|
|
8239
|
+
if (!Number.isSafeInteger(value6 == null ? void 0 : value6.id) || value6.id <= 0 || typeof value6.name !== "string")
|
|
8240
|
+
invalid();
|
|
8241
|
+
let teamUrl;
|
|
8242
|
+
if (typeof value6.teamUrl === "string") {
|
|
8243
|
+
try {
|
|
8244
|
+
const url2 = new URL(value6.teamUrl);
|
|
8245
|
+
if (url2.protocol === "https:" && !url2.port && !url2.username && !url2.password && !url2.search && !url2.hash && [
|
|
8246
|
+
"manage.ticketfairy.com",
|
|
8247
|
+
"manage.theticketfairy.com",
|
|
8248
|
+
"test-manage.ticketfairy.com",
|
|
8249
|
+
"preproduction-manage.ticketfairy.com"
|
|
8250
|
+
].includes(url2.hostname) && url2.pathname === `/brand/${value6.id}/team`)
|
|
8251
|
+
teamUrl = url2.toString();
|
|
8252
|
+
} catch (e) {
|
|
8253
|
+
}
|
|
8254
|
+
}
|
|
8255
|
+
return { id: value6.id, name: value6.name, ...teamUrl ? { teamUrl } : {} };
|
|
8256
|
+
};
|
|
8257
|
+
var getAccountDeletionStatus = async () => {
|
|
8258
|
+
requireAccount2();
|
|
8259
|
+
const assertOwner = captureSessionAction();
|
|
8260
|
+
const value6 = attributes5(await get(path3));
|
|
8261
|
+
assertOwner();
|
|
8262
|
+
if (typeof value6.canDelete !== "boolean" || typeof value6.email !== "string" || !["password", "email_code"].includes(value6.verification) || typeof value6.appleLinked !== "boolean" || !Array.isArray(value6.blockers))
|
|
8263
|
+
invalid();
|
|
8264
|
+
const blockers = value6.blockers.map((row) => {
|
|
8265
|
+
if (typeof (row == null ? void 0 : row.code) !== "string" || typeof row.message !== "string" || row.brands !== void 0 && !Array.isArray(row.brands) || row.moreBrands !== void 0 && typeof row.moreBrands !== "boolean")
|
|
8266
|
+
invalid();
|
|
8267
|
+
return {
|
|
8268
|
+
code: row.code,
|
|
8269
|
+
message: row.message,
|
|
8270
|
+
...row.brands ? { brands: row.brands.map(brand) } : {},
|
|
8271
|
+
...row.moreBrands !== void 0 ? { moreBrands: row.moreBrands } : {}
|
|
8272
|
+
};
|
|
8273
|
+
});
|
|
8274
|
+
if (value6.canDelete !== (blockers.length === 0)) invalid();
|
|
8275
|
+
return {
|
|
8276
|
+
canDelete: value6.canDelete,
|
|
8277
|
+
verification: value6.verification,
|
|
8278
|
+
email: value6.email,
|
|
8279
|
+
appleLinked: value6.appleLinked,
|
|
8280
|
+
blockers
|
|
8281
|
+
};
|
|
8282
|
+
};
|
|
8283
|
+
var sendAccountDeletionCode = async (language = "en") => {
|
|
8284
|
+
requireAccount2();
|
|
8285
|
+
const assertOwner = captureSessionAction();
|
|
8286
|
+
const security2 = await sessionWriteSecurity();
|
|
8287
|
+
assertOwner();
|
|
8288
|
+
const value6 = attributes5(
|
|
8289
|
+
await post(`${path3}/code`, { data: { attributes: { language } } }, security2)
|
|
8290
|
+
);
|
|
8291
|
+
assertOwner();
|
|
8292
|
+
if (typeof value6.email !== "string" || !Number.isFinite(value6.expiresInMinutes) || value6.expiresInMinutes <= 0)
|
|
8293
|
+
invalid();
|
|
8294
|
+
return { email: value6.email, expiresInMinutes: value6.expiresInMinutes };
|
|
8295
|
+
};
|
|
8296
|
+
var deleteAccount = async (proof) => {
|
|
8297
|
+
requireAccount2();
|
|
8298
|
+
const keys = proof && typeof proof === "object" ? Object.keys(proof) : [];
|
|
8299
|
+
if (keys.length !== 1 || !["password", "code"].includes(keys[0]) || typeof proof[keys[0]] !== "string" || !proof[keys[0]])
|
|
8300
|
+
throw new TtfError("Enter your password or the code sent to your email.", 422);
|
|
8301
|
+
const assertOwner = captureSessionAction();
|
|
8302
|
+
const security2 = await sessionWriteSecurity();
|
|
8303
|
+
assertOwner();
|
|
8304
|
+
const value6 = attributes5(await post(path3, { data: { attributes: proof } }, security2));
|
|
8305
|
+
assertOwner();
|
|
8306
|
+
if (value6.deleted !== true || !Number.isSafeInteger(value6.teamsLeft) || value6.teamsLeft < 0)
|
|
8307
|
+
invalid();
|
|
8308
|
+
clearSession();
|
|
8309
|
+
return { deleted: true, teamsLeft: value6.teamsLeft };
|
|
8310
|
+
};
|
|
8206
8311
|
var retiredStores = /* @__PURE__ */ new WeakSet();
|
|
8207
8312
|
var retireCheckoutStore = (store) => {
|
|
8208
8313
|
retiredStores.add(store);
|
|
@@ -9851,7 +9956,7 @@ var bundleFlowAvailable = (draft, catalog, catalogState) => {
|
|
|
9851
9956
|
];
|
|
9852
9957
|
const slots = bundleHolderSlots(catalog, bundleSelectionAttribute(qty));
|
|
9853
9958
|
const holders = draft.holders.filter(
|
|
9854
|
-
(h) => !changed.includes(h.bundleId) || slots.some((
|
|
9959
|
+
(h) => !changed.includes(h.bundleId) || slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex)
|
|
9855
9960
|
);
|
|
9856
9961
|
return { draft: { ...draft, qty, holders }, removed, reduced, belowMinimum };
|
|
9857
9962
|
};
|
|
@@ -9896,7 +10001,7 @@ var bundleDraftWithHolder = (draft, slot, next) => {
|
|
|
9896
10001
|
var bundleFlowInput = (eventId, draft, slots) => {
|
|
9897
10002
|
const selection = bundleSelectionAttribute(draft.qty);
|
|
9898
10003
|
const holders = draft.holders.filter(
|
|
9899
|
-
(h) => slots.some((
|
|
10004
|
+
(h) => slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex) && (h.firstName.trim() || h.lastName.trim())
|
|
9900
10005
|
);
|
|
9901
10006
|
const buyer2 = holders.length ? { ...draft.buyer, holders } : { ...draft.buyer };
|
|
9902
10007
|
return {
|
|
@@ -10504,6 +10609,9 @@ var ttf = {
|
|
|
10504
10609
|
sendCheckoutTwoFactorSms,
|
|
10505
10610
|
cancelCheckoutTwoFactor,
|
|
10506
10611
|
logoutFromCheckout,
|
|
10612
|
+
getAccountDeletionStatus,
|
|
10613
|
+
sendAccountDeletionCode,
|
|
10614
|
+
deleteAccount,
|
|
10507
10615
|
getLinkedAccounts,
|
|
10508
10616
|
linkAccount,
|
|
10509
10617
|
disconnectAccount,
|
|
@@ -10713,6 +10821,7 @@ __export(hooks_exports, {
|
|
|
10713
10821
|
ticketHolderFor: () => ticketHolderFor,
|
|
10714
10822
|
ttfKeys: () => ttfKeys,
|
|
10715
10823
|
useAccommodationSelection: () => useAccommodationSelection,
|
|
10824
|
+
useAccountDeletion: () => useAccountDeletion,
|
|
10716
10825
|
useAccountPreferences: () => useAccountPreferences,
|
|
10717
10826
|
useAccountRewards: () => useAccountRewards,
|
|
10718
10827
|
useAccountRewardsSummary: () => useAccountRewardsSummary,
|
|
@@ -11845,23 +11954,23 @@ var useSeatSelection = (eventId, checkout, onContinue) => {
|
|
|
11845
11954
|
ttf.seatmap.data(eventId).then((response) => {
|
|
11846
11955
|
var _a, _b, _c;
|
|
11847
11956
|
if (!current4 || !active2()) return;
|
|
11848
|
-
const
|
|
11849
|
-
if ((
|
|
11850
|
-
setChart({ state: "provider", data:
|
|
11957
|
+
const attributes6 = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.attributes;
|
|
11958
|
+
if ((attributes6 == null ? void 0 : attributes6.provider) === "seats_io") {
|
|
11959
|
+
setChart({ state: "provider", data: attributes6 });
|
|
11851
11960
|
return;
|
|
11852
11961
|
}
|
|
11853
|
-
if (!
|
|
11962
|
+
if (!attributes6 || attributes6.seatData == null) {
|
|
11854
11963
|
setChart({ state: "empty" });
|
|
11855
11964
|
return;
|
|
11856
11965
|
}
|
|
11857
11966
|
const data = {
|
|
11858
|
-
seatData: typeof
|
|
11859
|
-
ticketTypeTierRelations: (_b =
|
|
11860
|
-
eventSeats: (_c =
|
|
11861
|
-
seatReservationTime: Number(
|
|
11862
|
-
seatMapType: typeof
|
|
11863
|
-
tierPrices:
|
|
11864
|
-
predefinedSeats:
|
|
11967
|
+
seatData: typeof attributes6.seatData === "string" ? JSON.parse(attributes6.seatData) : attributes6.seatData,
|
|
11968
|
+
ticketTypeTierRelations: (_b = attributes6.ticketTypeTierRelations) != null ? _b : {},
|
|
11969
|
+
eventSeats: (_c = attributes6.eventSeats) != null ? _c : [],
|
|
11970
|
+
seatReservationTime: Number(attributes6.seatReservationTime) || 0,
|
|
11971
|
+
seatMapType: typeof attributes6.seatMapType === "string" ? attributes6.seatMapType : null,
|
|
11972
|
+
tierPrices: attributes6.tierPrices,
|
|
11973
|
+
predefinedSeats: attributes6.predefinedSeats
|
|
11865
11974
|
};
|
|
11866
11975
|
chartRef.current = data;
|
|
11867
11976
|
setChart({ state: "ready", data });
|
|
@@ -15383,6 +15492,221 @@ var useReceiptRewards = ({ orderHash, data }) => {
|
|
|
15383
15492
|
submitDetails: (award, details) => run("details", () => ttf.rewards.submitPrizeDetails(hash, award, details))
|
|
15384
15493
|
};
|
|
15385
15494
|
};
|
|
15495
|
+
var useAccountDeletion = () => {
|
|
15496
|
+
var _a;
|
|
15497
|
+
const session = useAuthSession();
|
|
15498
|
+
const configuration2 = getConfig();
|
|
15499
|
+
const scope = session.sessionScope;
|
|
15500
|
+
const epoch = getSessionEpoch();
|
|
15501
|
+
const assertOwner = captureSessionAction();
|
|
15502
|
+
const accountSession = Boolean(
|
|
15503
|
+
configuration2.accountAuth && configuration2.cookieAuth && session.isAuthenticated
|
|
15504
|
+
);
|
|
15505
|
+
const profile = useProfile({
|
|
15506
|
+
enabled: accountSession && !session.buyerId,
|
|
15507
|
+
retry: false
|
|
15508
|
+
});
|
|
15509
|
+
const confirmingAccount = Boolean(accountSession && !session.buyerId && !profile.error);
|
|
15510
|
+
const signedIn = Boolean(accountSession && session.buyerId);
|
|
15511
|
+
const empty = () => ({
|
|
15512
|
+
scope,
|
|
15513
|
+
configuration: configuration2,
|
|
15514
|
+
isOpen: false,
|
|
15515
|
+
proof: "",
|
|
15516
|
+
busy: false,
|
|
15517
|
+
error: "",
|
|
15518
|
+
codeSent: null,
|
|
15519
|
+
retryAfter: 0,
|
|
15520
|
+
deleted: false
|
|
15521
|
+
});
|
|
15522
|
+
const [stored, setStored] = useState23(empty);
|
|
15523
|
+
const current4 = stored.scope === scope && stored.configuration === configuration2;
|
|
15524
|
+
const state = current4 ? stored : empty();
|
|
15525
|
+
const active2 = useRef21(true);
|
|
15526
|
+
const pending2 = useRef21(null);
|
|
15527
|
+
const cooldowns = useRef21({ scope, configuration: configuration2, code: 0, confirm: 0 });
|
|
15528
|
+
const editor = useRef21({ scope, configuration: configuration2, generation: 0, isOpen: false, proof: "" });
|
|
15529
|
+
const generation = editor.current.generation;
|
|
15530
|
+
const client = useQueryClient13();
|
|
15531
|
+
const query = useSessionQuery({
|
|
15532
|
+
queryKey: ["ttf", "account-deletion"],
|
|
15533
|
+
queryFn: getAccountDeletionStatus,
|
|
15534
|
+
enabled: signedIn,
|
|
15535
|
+
retry: false
|
|
15536
|
+
});
|
|
15537
|
+
const owns = () => {
|
|
15538
|
+
try {
|
|
15539
|
+
assertOwner();
|
|
15540
|
+
return active2.current;
|
|
15541
|
+
} catch (e) {
|
|
15542
|
+
return false;
|
|
15543
|
+
}
|
|
15544
|
+
};
|
|
15545
|
+
useEffect18(() => {
|
|
15546
|
+
active2.current = true;
|
|
15547
|
+
return () => {
|
|
15548
|
+
active2.current = false;
|
|
15549
|
+
};
|
|
15550
|
+
}, []);
|
|
15551
|
+
useEffect18(() => {
|
|
15552
|
+
setStored(
|
|
15553
|
+
(value6) => value6.scope === scope && value6.configuration === configuration2 ? value6 : empty()
|
|
15554
|
+
);
|
|
15555
|
+
if (editor.current.scope !== scope || editor.current.configuration !== configuration2)
|
|
15556
|
+
editor.current = {
|
|
15557
|
+
scope,
|
|
15558
|
+
configuration: configuration2,
|
|
15559
|
+
generation: editor.current.generation + 1,
|
|
15560
|
+
isOpen: false,
|
|
15561
|
+
proof: ""
|
|
15562
|
+
};
|
|
15563
|
+
pending2.current = null;
|
|
15564
|
+
if (cooldowns.current.scope !== scope || cooldowns.current.configuration !== configuration2)
|
|
15565
|
+
cooldowns.current = { scope, configuration: configuration2, code: 0, confirm: 0 };
|
|
15566
|
+
}, [scope, configuration2]);
|
|
15567
|
+
useEffect18(() => {
|
|
15568
|
+
if (!state.retryAfter) return;
|
|
15569
|
+
const timer = setTimeout(() => {
|
|
15570
|
+
if (owns()) setStored((value6) => ({ ...value6, retryAfter: remainingCooldown() }));
|
|
15571
|
+
}, 1e3);
|
|
15572
|
+
return () => clearTimeout(timer);
|
|
15573
|
+
}, [state.retryAfter, scope, configuration2]);
|
|
15574
|
+
const update = (patch2) => {
|
|
15575
|
+
if (owns())
|
|
15576
|
+
setStored((value6) => ({
|
|
15577
|
+
...value6.scope === scope && value6.configuration === configuration2 ? value6 : empty(),
|
|
15578
|
+
...patch2
|
|
15579
|
+
}));
|
|
15580
|
+
};
|
|
15581
|
+
const ownsEditor = () => owns() && editor.current.scope === scope && editor.current.configuration === configuration2 && editor.current.generation === generation;
|
|
15582
|
+
const remainingCooldown = () => Math.ceil(
|
|
15583
|
+
Math.max(
|
|
15584
|
+
0,
|
|
15585
|
+
cooldowns.current.code - Date.now(),
|
|
15586
|
+
cooldowns.current.confirm - Date.now()
|
|
15587
|
+
) / 1e3
|
|
15588
|
+
);
|
|
15589
|
+
const retry = async () => {
|
|
15590
|
+
if (!owns() || !accountSession) return;
|
|
15591
|
+
update({ error: "" });
|
|
15592
|
+
if (!session.buyerId) await profile.refetch();
|
|
15593
|
+
else await query.refetch();
|
|
15594
|
+
};
|
|
15595
|
+
const perform = async (action, deleting = false) => {
|
|
15596
|
+
var _a2, _b, _c, _d;
|
|
15597
|
+
if (!owns() || !signedIn || pending2.current) return false;
|
|
15598
|
+
const operation = /* @__PURE__ */ Symbol();
|
|
15599
|
+
pending2.current = operation;
|
|
15600
|
+
update({ busy: true, error: "" });
|
|
15601
|
+
try {
|
|
15602
|
+
const result2 = await action();
|
|
15603
|
+
if (deleting) {
|
|
15604
|
+
const retired = getConfig() === configuration2 && !isAuthenticated() && getSessionEpoch() === epoch + 1 && getSessionCacheScope() === scope + 1;
|
|
15605
|
+
client.removeQueries({
|
|
15606
|
+
predicate: (query2) => {
|
|
15607
|
+
const tail = query2.queryKey[query2.queryKey.length - 1];
|
|
15608
|
+
return Boolean(
|
|
15609
|
+
tail && typeof tail === "object" && "tfSessionScope" in tail && tail.tfSessionScope === scope
|
|
15610
|
+
);
|
|
15611
|
+
}
|
|
15612
|
+
});
|
|
15613
|
+
if (!active2.current || !retired) return false;
|
|
15614
|
+
setStored({
|
|
15615
|
+
...empty(),
|
|
15616
|
+
scope: getSessionCacheScope(),
|
|
15617
|
+
busy: false,
|
|
15618
|
+
deleted: true
|
|
15619
|
+
});
|
|
15620
|
+
return true;
|
|
15621
|
+
}
|
|
15622
|
+
if (!owns()) return false;
|
|
15623
|
+
cooldowns.current.code = Date.now() + 6e4;
|
|
15624
|
+
update({
|
|
15625
|
+
busy: false,
|
|
15626
|
+
codeSent: result2,
|
|
15627
|
+
retryAfter: remainingCooldown()
|
|
15628
|
+
});
|
|
15629
|
+
return true;
|
|
15630
|
+
} catch (caught) {
|
|
15631
|
+
if (owns() && !(caught instanceof TtfError && caught.code === "SESSION_CHANGED")) {
|
|
15632
|
+
const details = caught instanceof TtfError ? caught.data : void 0;
|
|
15633
|
+
const seconds = Number(
|
|
15634
|
+
(_d = (_c = (_b = caught instanceof TtfError ? caught.retryAfter : void 0) != null ? _b : (_a2 = details == null ? void 0 : details.details) == null ? void 0 : _a2.retryAfter) != null ? _c : details == null ? void 0 : details.retryAfter) != null ? _d : 0
|
|
15635
|
+
);
|
|
15636
|
+
if (Number.isFinite(seconds) && seconds > 0)
|
|
15637
|
+
cooldowns.current[deleting ? "confirm" : "code"] = Date.now() + Math.ceil(seconds) * 1e3;
|
|
15638
|
+
update({
|
|
15639
|
+
busy: false,
|
|
15640
|
+
error: caught instanceof Error ? caught.message : "Unable to update your account. Try again.",
|
|
15641
|
+
retryAfter: remainingCooldown()
|
|
15642
|
+
});
|
|
15643
|
+
}
|
|
15644
|
+
return false;
|
|
15645
|
+
} finally {
|
|
15646
|
+
if (pending2.current === operation) pending2.current = null;
|
|
15647
|
+
}
|
|
15648
|
+
};
|
|
15649
|
+
return {
|
|
15650
|
+
signedIn,
|
|
15651
|
+
confirmingAccount,
|
|
15652
|
+
status: signedIn ? query.data : void 0,
|
|
15653
|
+
query,
|
|
15654
|
+
retry,
|
|
15655
|
+
canConfirm: Boolean(
|
|
15656
|
+
signedIn && ownsEditor() && editor.current.isOpen && !pending2.current && Date.now() >= cooldowns.current.confirm && ((_a = query.data) == null ? void 0 : _a.canDelete) && (query.data.verification === "password" ? state.proof.length : state.proof.trim().length)
|
|
15657
|
+
),
|
|
15658
|
+
isOpen: state.isOpen,
|
|
15659
|
+
proof: state.proof,
|
|
15660
|
+
busy: state.busy,
|
|
15661
|
+
error: state.error || (signedIn && query.error instanceof Error ? query.error.message : "") || (accountSession && profile.error instanceof Error ? profile.error.message : ""),
|
|
15662
|
+
codeSent: state.codeSent,
|
|
15663
|
+
retryAfter: state.retryAfter,
|
|
15664
|
+
deleted: state.deleted,
|
|
15665
|
+
open: () => {
|
|
15666
|
+
if (!signedIn || !ownsEditor() || pending2.current) return;
|
|
15667
|
+
editor.current = {
|
|
15668
|
+
scope,
|
|
15669
|
+
configuration: configuration2,
|
|
15670
|
+
generation: generation + 1,
|
|
15671
|
+
isOpen: true,
|
|
15672
|
+
proof: ""
|
|
15673
|
+
};
|
|
15674
|
+
update({ isOpen: true, proof: "", error: "", deleted: false });
|
|
15675
|
+
},
|
|
15676
|
+
cancel: () => {
|
|
15677
|
+
if (!ownsEditor() || pending2.current) return;
|
|
15678
|
+
editor.current = {
|
|
15679
|
+
scope,
|
|
15680
|
+
configuration: configuration2,
|
|
15681
|
+
generation: generation + 1,
|
|
15682
|
+
isOpen: false,
|
|
15683
|
+
proof: ""
|
|
15684
|
+
};
|
|
15685
|
+
update({ isOpen: false, proof: "", error: "" });
|
|
15686
|
+
},
|
|
15687
|
+
setProof: (proof) => {
|
|
15688
|
+
if (!ownsEditor() || !editor.current.isOpen || pending2.current) return;
|
|
15689
|
+
editor.current.proof = proof;
|
|
15690
|
+
update({ proof, error: "" });
|
|
15691
|
+
},
|
|
15692
|
+
sendCode: (language = "en") => {
|
|
15693
|
+
var _a2;
|
|
15694
|
+
return !ownsEditor() || !editor.current.isOpen || remainingCooldown() > 0 || !((_a2 = query.data) == null ? void 0 : _a2.canDelete) || query.data.verification !== "email_code" ? Promise.resolve(false) : perform(() => sendAccountDeletionCode(language));
|
|
15695
|
+
},
|
|
15696
|
+
confirm: () => {
|
|
15697
|
+
const status = query.data;
|
|
15698
|
+
if (!ownsEditor() || !editor.current.isOpen || Date.now() < cooldowns.current.confirm || !(status == null ? void 0 : status.canDelete) || !editor.current.proof)
|
|
15699
|
+
return Promise.resolve(false);
|
|
15700
|
+
const proof = editor.current.proof;
|
|
15701
|
+
return perform(
|
|
15702
|
+
() => deleteAccount(
|
|
15703
|
+
status.verification === "password" ? { password: proof } : { code: proof.trim() }
|
|
15704
|
+
),
|
|
15705
|
+
true
|
|
15706
|
+
);
|
|
15707
|
+
}
|
|
15708
|
+
};
|
|
15709
|
+
};
|
|
15386
15710
|
var accountEn = {
|
|
15387
15711
|
"account.loading_your_interests": "Loading your interests\u2026",
|
|
15388
15712
|
"account.your_interests_could_not_load": "Your interests could not load.",
|
|
@@ -16085,6 +16409,98 @@ Object.assign(accountEs, {
|
|
|
16085
16409
|
"account.your_imported_spotify_data_and_approved_names_will_be_removed_your_saved_interests_stay": "Se eliminar\xE1n tus datos importados de Spotify y los nombres aprobados. Tus intereses guardados se conservan.",
|
|
16086
16410
|
"account.sign_in_to_manage_your_music_connections": "Inicia sesi\xF3n para gestionar tus conexiones de m\xFAsica."
|
|
16087
16411
|
});
|
|
16412
|
+
Object.assign(accountEn, {
|
|
16413
|
+
"account.delete_account": "Delete account",
|
|
16414
|
+
"account.account_deleted": "Account deleted",
|
|
16415
|
+
"account.your_ticket_fairy_account_has_been_closed_you_are_signed_out": "Your Ticket Fairy account has been closed. You are signed out.",
|
|
16416
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Financial and transaction records are retained where required.",
|
|
16417
|
+
"account.continue_browsing": "Continue browsing",
|
|
16418
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Sign in to review and delete your Ticket Fairy account.",
|
|
16419
|
+
"account.loading_account_deletion_options": "Loading account deletion options\u2026",
|
|
16420
|
+
"account.account_deletion_options_could_not_load": "Account deletion options could not load.",
|
|
16421
|
+
"account.this_closes_your_ticket_fairy_account_across_the_app_website_and_organiser_dashboard": "This closes your Ticket Fairy account across the app, website and organiser dashboard.",
|
|
16422
|
+
"account.what_is_removed": "What is removed",
|
|
16423
|
+
"account.your_personal_profile_sign_in_access_friends_saved_preferences_and_the_content_you_posted_are_removed_or_anonymised": "Your personal profile, sign-in access, friends, saved preferences and the content you posted are removed or anonymised.",
|
|
16424
|
+
"account.what_is_kept": "What is kept",
|
|
16425
|
+
"account.financial_and_transaction_records_are_retained_where_required_deleting_your_account_does_not_refund_or_cancel_orders_and_does_not_delete_other_ticket_holders_details": "Financial and transaction records are retained where required. Deleting your account does not refund or cancel orders, and does not delete other ticket holders\u2019 details.",
|
|
16426
|
+
"account.if_ticket_fairy_still_appears_in_your_apple_account_after_deletion_remove_its_access_there_too": "If Ticket Fairy still appears in your Apple Account after deletion, remove its access there too.",
|
|
16427
|
+
"account.before_you_delete_your_account": "Before you delete your account",
|
|
16428
|
+
"account.open_name_team_settings": "Open {{name}} team settings",
|
|
16429
|
+
"account.check_again": "Check again",
|
|
16430
|
+
"account.confirm_account_deletion": "Confirm account deletion",
|
|
16431
|
+
"account.delete_your_account_permanently": "Delete your account permanently?",
|
|
16432
|
+
"account.this_cannot_be_undone_confirm_that_you_want_to_close_this_account": "This cannot be undone. Confirm that you want to close this account.",
|
|
16433
|
+
"account.we_will_email_a_deletion_code_to_email": "We will email a deletion code to {{email}}.",
|
|
16434
|
+
"account.send_a_new_code": "Send a new code",
|
|
16435
|
+
"account.email_deletion_code": "Email deletion code",
|
|
16436
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "A code was sent to {{email}}. It expires in {{minutes}} minutes.",
|
|
16437
|
+
"account.try_again_in_seconds_seconds": "Try again in {{seconds}} seconds.",
|
|
16438
|
+
"account.current_password": "Current password",
|
|
16439
|
+
"account.deletion_code": "Deletion code",
|
|
16440
|
+
"account.keep_account": "Keep account",
|
|
16441
|
+
"account.permanently_delete_account": "Permanently delete account",
|
|
16442
|
+
"account.please_wait": "Please wait\u2026",
|
|
16443
|
+
"account.team_settings": "Team settings",
|
|
16444
|
+
"account.unable_to_open_team_settings_please_try_again": "Unable to open team settings. Please try again.",
|
|
16445
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Sign in to your Ticket Fairy account to delete it.",
|
|
16446
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "Account deletion could not be confirmed. Try again.",
|
|
16447
|
+
"account.unable_to_update_your_account": "Unable to update your account.",
|
|
16448
|
+
"account.unable_to_update_your_account_try_again": "Unable to update your account. Try again.",
|
|
16449
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Enter your password or the code sent to your email.",
|
|
16450
|
+
"account.that_password_is_not_right_enter_the_password_you_sign_in_with": "That password is not right. Enter the password you sign in with.",
|
|
16451
|
+
"account.that_code_is_not_right_check_the_newest_email_from_ticket_fairy_and_enter_the_code_in_it": "That code is not right. Check the newest email from Ticket Fairy and enter the code in it.",
|
|
16452
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "That code no longer works. Ask for a new code.",
|
|
16453
|
+
"account.we_have_just_sent_you_a_code_check_your_email_or_ask_for_a_new_code_in_a_minute": "We have just sent you a code. Check your email, or ask for a new code in a minute.",
|
|
16454
|
+
"account.we_could_not_send_the_code_just_now_try_again_in_a_few_minutes": "We could not send the code just now. Try again in a few minutes.",
|
|
16455
|
+
"account.we_re_finishing_a_change_to_your_account_wait_a_moment_then_reload_the_page": "We\u2019re finishing a change to your account. Wait a moment, then reload the page.",
|
|
16456
|
+
"account.we_could_not_finish_deleting_your_account_sign_in_and_try_again_or_contact_ticket_fairy_support": "We could not finish deleting your account. Sign in and try again, or contact Ticket Fairy support."
|
|
16457
|
+
});
|
|
16458
|
+
Object.assign(accountEs, {
|
|
16459
|
+
"account.delete_account": "Eliminar cuenta",
|
|
16460
|
+
"account.account_deleted": "Cuenta eliminada",
|
|
16461
|
+
"account.your_ticket_fairy_account_has_been_closed_you_are_signed_out": "Tu cuenta de Ticket Fairy se ha cerrado. Se ha cerrado tu sesi\xF3n.",
|
|
16462
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Los registros financieros y de transacciones se conservan cuando sea necesario.",
|
|
16463
|
+
"account.continue_browsing": "Seguir explorando",
|
|
16464
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Inicia sesi\xF3n para revisar y eliminar tu cuenta de Ticket Fairy.",
|
|
16465
|
+
"account.loading_account_deletion_options": "Cargando las opciones para eliminar la cuenta\u2026",
|
|
16466
|
+
"account.account_deletion_options_could_not_load": "No se pudieron cargar las opciones para eliminar la cuenta.",
|
|
16467
|
+
"account.this_closes_your_ticket_fairy_account_across_the_app_website_and_organiser_dashboard": "Esto cierra tu cuenta de Ticket Fairy en la app, el sitio web y el panel de organizadores.",
|
|
16468
|
+
"account.what_is_removed": "Qu\xE9 se elimina",
|
|
16469
|
+
"account.your_personal_profile_sign_in_access_friends_saved_preferences_and_the_content_you_posted_are_removed_or_anonymised": "Tu perfil personal, acceso, amigos, preferencias guardadas y contenido publicado se eliminan o se anonimizan.",
|
|
16470
|
+
"account.what_is_kept": "Qu\xE9 se conserva",
|
|
16471
|
+
"account.financial_and_transaction_records_are_retained_where_required_deleting_your_account_does_not_refund_or_cancel_orders_and_does_not_delete_other_ticket_holders_details": "Los registros financieros y de transacciones se conservan cuando sea necesario. Eliminar tu cuenta no reembolsa ni cancela pedidos, ni elimina los datos de otros titulares de entradas.",
|
|
16472
|
+
"account.if_ticket_fairy_still_appears_in_your_apple_account_after_deletion_remove_its_access_there_too": "Si Ticket Fairy sigue apareciendo en tu cuenta de Apple despu\xE9s de la eliminaci\xF3n, retira tambi\xE9n su acceso all\xED.",
|
|
16473
|
+
"account.before_you_delete_your_account": "Antes de eliminar tu cuenta",
|
|
16474
|
+
"account.open_name_team_settings": "Abrir la configuraci\xF3n del equipo de {{name}}",
|
|
16475
|
+
"account.check_again": "Volver a comprobar",
|
|
16476
|
+
"account.confirm_account_deletion": "Confirmar la eliminaci\xF3n de la cuenta",
|
|
16477
|
+
"account.delete_your_account_permanently": "\xBFEliminar tu cuenta de forma permanente?",
|
|
16478
|
+
"account.this_cannot_be_undone_confirm_that_you_want_to_close_this_account": "Esta acci\xF3n no se puede deshacer. Confirma que quieres cerrar esta cuenta.",
|
|
16479
|
+
"account.we_will_email_a_deletion_code_to_email": "Enviaremos un c\xF3digo de eliminaci\xF3n a {{email}}.",
|
|
16480
|
+
"account.send_a_new_code": "Enviar un c\xF3digo nuevo",
|
|
16481
|
+
"account.email_deletion_code": "Enviar c\xF3digo de eliminaci\xF3n",
|
|
16482
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "Se envi\xF3 un c\xF3digo a {{email}}. Caduca en {{minutes}} minutos.",
|
|
16483
|
+
"account.try_again_in_seconds_seconds": "Int\xE9ntalo de nuevo en {{seconds}} segundos.",
|
|
16484
|
+
"account.current_password": "Contrase\xF1a actual",
|
|
16485
|
+
"account.deletion_code": "C\xF3digo de eliminaci\xF3n",
|
|
16486
|
+
"account.keep_account": "Conservar cuenta",
|
|
16487
|
+
"account.permanently_delete_account": "Eliminar cuenta permanentemente",
|
|
16488
|
+
"account.please_wait": "Espera un momento\u2026",
|
|
16489
|
+
"account.team_settings": "Configuraci\xF3n del equipo",
|
|
16490
|
+
"account.unable_to_open_team_settings_please_try_again": "No se pudo abrir la configuraci\xF3n del equipo. Int\xE9ntalo de nuevo.",
|
|
16491
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Inicia sesi\xF3n en tu cuenta de Ticket Fairy para eliminarla.",
|
|
16492
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "No se pudo confirmar la eliminaci\xF3n de la cuenta. Int\xE9ntalo de nuevo.",
|
|
16493
|
+
"account.unable_to_update_your_account": "No se pudo actualizar tu cuenta.",
|
|
16494
|
+
"account.unable_to_update_your_account_try_again": "No se pudo actualizar tu cuenta. Int\xE9ntalo de nuevo.",
|
|
16495
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Introduce tu contrase\xF1a o el c\xF3digo enviado a tu correo.",
|
|
16496
|
+
"account.that_password_is_not_right_enter_the_password_you_sign_in_with": "Esa contrase\xF1a no es correcta. Introduce la contrase\xF1a que usas para iniciar sesi\xF3n.",
|
|
16497
|
+
"account.that_code_is_not_right_check_the_newest_email_from_ticket_fairy_and_enter_the_code_in_it": "Ese c\xF3digo no es correcto. Revisa el correo m\xE1s reciente de Ticket Fairy e introduce su c\xF3digo.",
|
|
16498
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "Ese c\xF3digo ya no funciona. Solicita uno nuevo.",
|
|
16499
|
+
"account.we_have_just_sent_you_a_code_check_your_email_or_ask_for_a_new_code_in_a_minute": "Acabamos de enviarte un c\xF3digo. Revisa tu correo o solicita otro en un minuto.",
|
|
16500
|
+
"account.we_could_not_send_the_code_just_now_try_again_in_a_few_minutes": "No pudimos enviar el c\xF3digo. Int\xE9ntalo de nuevo en unos minutos.",
|
|
16501
|
+
"account.we_re_finishing_a_change_to_your_account_wait_a_moment_then_reload_the_page": "Estamos terminando un cambio en tu cuenta. Espera un momento y vuelve a cargar la p\xE1gina.",
|
|
16502
|
+
"account.we_could_not_finish_deleting_your_account_sign_in_and_try_again_or_contact_ticket_fairy_support": "No pudimos terminar de eliminar tu cuenta. Inicia sesi\xF3n e int\xE9ntalo de nuevo, o contacta con el soporte de Ticket Fairy."
|
|
16503
|
+
});
|
|
16088
16504
|
var en = {
|
|
16089
16505
|
"auth.completionAgree": "I agree to the Terms of Service and Privacy Policy.",
|
|
16090
16506
|
"auth.completionTerms": "Read Terms of Service",
|
|
@@ -17183,7 +17599,7 @@ var translateAccountMessage = (translate2, english, vars) => {
|
|
|
17183
17599
|
};
|
|
17184
17600
|
|
|
17185
17601
|
// src/CardInput.tsx
|
|
17186
|
-
import { useEffect as
|
|
17602
|
+
import { useEffect as useEffect21, useRef as useRef22, useState as useState27 } from "react";
|
|
17187
17603
|
import { Platform, StyleSheet as StyleSheet4 } from "react-native";
|
|
17188
17604
|
import { CardField } from "@stripe/stripe-react-native";
|
|
17189
17605
|
|
|
@@ -17193,12 +17609,12 @@ import {
|
|
|
17193
17609
|
useCallback as useCallback13,
|
|
17194
17610
|
useContext as useContext2,
|
|
17195
17611
|
useMemo as useMemo14,
|
|
17196
|
-
useState as
|
|
17612
|
+
useState as useState26
|
|
17197
17613
|
} from "react";
|
|
17198
17614
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
17199
17615
|
|
|
17200
17616
|
// src/ui/InstallmentPicker.tsx
|
|
17201
|
-
import { useEffect as
|
|
17617
|
+
import { useEffect as useEffect19, useMemo as useMemo13, useState as useState24 } from "react";
|
|
17202
17618
|
import { Modal, Pressable as Pressable2, StyleSheet as StyleSheet2, Text as Text2, View as View2 } from "react-native";
|
|
17203
17619
|
|
|
17204
17620
|
// src/ui/primitives.tsx
|
|
@@ -17238,48 +17654,48 @@ var Card = ({
|
|
|
17238
17654
|
style
|
|
17239
17655
|
}) => {
|
|
17240
17656
|
const theme = useTheme();
|
|
17241
|
-
const
|
|
17242
|
-
return /* @__PURE__ */ jsx2(View, { style: [
|
|
17657
|
+
const s6 = useStyles(theme);
|
|
17658
|
+
return /* @__PURE__ */ jsx2(View, { style: [s6.card, style], children });
|
|
17243
17659
|
};
|
|
17244
17660
|
var SectionHeader = ({
|
|
17245
17661
|
title,
|
|
17246
17662
|
subtitle
|
|
17247
17663
|
}) => {
|
|
17248
17664
|
const theme = useTheme();
|
|
17249
|
-
const
|
|
17250
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
17251
|
-
/* @__PURE__ */ jsx2(Text, { style:
|
|
17252
|
-
subtitle ? /* @__PURE__ */ jsx2(Text, { style:
|
|
17665
|
+
const s6 = useStyles(theme);
|
|
17666
|
+
return /* @__PURE__ */ jsxs(View, { style: s6.sectionHeader, children: [
|
|
17667
|
+
/* @__PURE__ */ jsx2(Text, { style: s6.sectionTitle, children: title }),
|
|
17668
|
+
subtitle ? /* @__PURE__ */ jsx2(Text, { style: s6.sectionSubtitle, children: subtitle }) : null
|
|
17253
17669
|
] });
|
|
17254
17670
|
};
|
|
17255
17671
|
var Divider = () => {
|
|
17256
17672
|
const theme = useTheme();
|
|
17257
|
-
const
|
|
17258
|
-
return /* @__PURE__ */ jsx2(View, { style:
|
|
17673
|
+
const s6 = useStyles(theme);
|
|
17674
|
+
return /* @__PURE__ */ jsx2(View, { style: s6.divider });
|
|
17259
17675
|
};
|
|
17260
17676
|
var BodyText = ({
|
|
17261
17677
|
children,
|
|
17262
17678
|
style
|
|
17263
17679
|
}) => {
|
|
17264
17680
|
const theme = useTheme();
|
|
17265
|
-
const
|
|
17266
|
-
return /* @__PURE__ */ jsx2(Text, { style: [
|
|
17681
|
+
const s6 = useStyles(theme);
|
|
17682
|
+
return /* @__PURE__ */ jsx2(Text, { style: [s6.body, style], children });
|
|
17267
17683
|
};
|
|
17268
17684
|
var MutedText = ({
|
|
17269
17685
|
children,
|
|
17270
17686
|
style
|
|
17271
17687
|
}) => {
|
|
17272
17688
|
const theme = useTheme();
|
|
17273
|
-
const
|
|
17274
|
-
return /* @__PURE__ */ jsx2(Text, { style: [
|
|
17689
|
+
const s6 = useStyles(theme);
|
|
17690
|
+
return /* @__PURE__ */ jsx2(Text, { style: [s6.muted, style], children });
|
|
17275
17691
|
};
|
|
17276
17692
|
var ErrorText = ({ children }) => {
|
|
17277
17693
|
const theme = useTheme();
|
|
17278
|
-
const
|
|
17694
|
+
const s6 = useStyles(theme);
|
|
17279
17695
|
return /* @__PURE__ */ jsx2(
|
|
17280
17696
|
Text,
|
|
17281
17697
|
{
|
|
17282
|
-
style:
|
|
17698
|
+
style: s6.errorText,
|
|
17283
17699
|
accessibilityRole: "alert",
|
|
17284
17700
|
accessibilityLiveRegion: "assertive",
|
|
17285
17701
|
children
|
|
@@ -17294,7 +17710,7 @@ var Button = ({
|
|
|
17294
17710
|
variant = "primary"
|
|
17295
17711
|
}) => {
|
|
17296
17712
|
const theme = useTheme();
|
|
17297
|
-
const
|
|
17713
|
+
const s6 = useStyles(theme);
|
|
17298
17714
|
const frozen = useFrozen();
|
|
17299
17715
|
const isDisabled = disabled || loading || frozen;
|
|
17300
17716
|
const ghost = variant === "ghost";
|
|
@@ -17306,10 +17722,10 @@ var Button = ({
|
|
|
17306
17722
|
disabled: isDisabled,
|
|
17307
17723
|
onPress,
|
|
17308
17724
|
style: ({ pressed }) => [
|
|
17309
|
-
|
|
17310
|
-
ghost &&
|
|
17311
|
-
isDisabled &&
|
|
17312
|
-
pressed && !isDisabled &&
|
|
17725
|
+
s6.button,
|
|
17726
|
+
ghost && s6.buttonGhost,
|
|
17727
|
+
isDisabled && s6.buttonDisabled,
|
|
17728
|
+
pressed && !isDisabled && s6.buttonPressed
|
|
17313
17729
|
],
|
|
17314
17730
|
children: loading ? /* @__PURE__ */ jsx2(
|
|
17315
17731
|
ActivityIndicator,
|
|
@@ -17317,7 +17733,7 @@ var Button = ({
|
|
|
17317
17733
|
size: "small",
|
|
17318
17734
|
color: ghost ? theme.accent : theme.accentContrast
|
|
17319
17735
|
}
|
|
17320
|
-
) : /* @__PURE__ */ jsx2(Text, { style: [
|
|
17736
|
+
) : /* @__PURE__ */ jsx2(Text, { style: [s6.buttonLabel, ghost && s6.buttonLabelGhost], children })
|
|
17321
17737
|
}
|
|
17322
17738
|
);
|
|
17323
17739
|
};
|
|
@@ -17386,9 +17802,9 @@ var useStyles = (theme) => useMemo12(
|
|
|
17386
17802
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
17387
17803
|
var useInstallmentPicker = () => {
|
|
17388
17804
|
var _a;
|
|
17389
|
-
const [pending2, setPending] =
|
|
17390
|
-
const [choices] =
|
|
17391
|
-
|
|
17805
|
+
const [pending2, setPending] = useState24(null);
|
|
17806
|
+
const [choices] = useState24(() => createInstallmentChoices(setPending));
|
|
17807
|
+
useEffect19(() => () => choices.cancel(), [choices]);
|
|
17392
17808
|
const onInstallmentOffers = choices.ask;
|
|
17393
17809
|
const choose = (offer) => pending2 == null ? void 0 : pending2.choose(offer);
|
|
17394
17810
|
const picker = /* @__PURE__ */ jsx3(
|
|
@@ -17403,7 +17819,7 @@ var useInstallmentPicker = () => {
|
|
|
17403
17819
|
};
|
|
17404
17820
|
var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
17405
17821
|
const theme = useTheme();
|
|
17406
|
-
const
|
|
17822
|
+
const s6 = useStyles2(theme);
|
|
17407
17823
|
return /* @__PURE__ */ jsx3(
|
|
17408
17824
|
Modal,
|
|
17409
17825
|
{
|
|
@@ -17411,25 +17827,25 @@ var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
|
17411
17827
|
transparent: true,
|
|
17412
17828
|
animationType: "fade",
|
|
17413
17829
|
onRequestClose: onClose,
|
|
17414
|
-
children: /* @__PURE__ */ jsx3(Pressable2, { style:
|
|
17830
|
+
children: /* @__PURE__ */ jsx3(Pressable2, { style: s6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs2(Pressable2, { style: s6.box, onPress: () => {
|
|
17415
17831
|
}, children: [
|
|
17416
|
-
/* @__PURE__ */ jsx3(Text2, { style:
|
|
17417
|
-
/* @__PURE__ */ jsx3(View2, { style:
|
|
17832
|
+
/* @__PURE__ */ jsx3(Text2, { style: s6.title, accessibilityRole: "header", children: "Pay in installments?" }),
|
|
17833
|
+
/* @__PURE__ */ jsx3(View2, { style: s6.list, children: (offers != null ? offers : []).map((offer, i) => {
|
|
17418
17834
|
var _a;
|
|
17419
17835
|
return /* @__PURE__ */ jsxs2(
|
|
17420
17836
|
Pressable2,
|
|
17421
17837
|
{
|
|
17422
17838
|
accessibilityRole: "button",
|
|
17423
|
-
style: ({ pressed }) => [
|
|
17839
|
+
style: ({ pressed }) => [s6.option, pressed && s6.optionPressed],
|
|
17424
17840
|
onPress: () => onChoose(offer),
|
|
17425
17841
|
children: [
|
|
17426
|
-
/* @__PURE__ */ jsxs2(Text2, { style:
|
|
17842
|
+
/* @__PURE__ */ jsxs2(Text2, { style: s6.optionMain, children: [
|
|
17427
17843
|
offer.count,
|
|
17428
17844
|
" \xD7",
|
|
17429
17845
|
" ",
|
|
17430
17846
|
(_a = offer.per_installment_formatted) != null ? _a : offer.per_installment
|
|
17431
17847
|
] }),
|
|
17432
|
-
/* @__PURE__ */ jsxs2(Text2, { style:
|
|
17848
|
+
/* @__PURE__ */ jsxs2(Text2, { style: s6.optionMeta, children: [
|
|
17433
17849
|
offer.total_formatted ? `${offer.total_formatted} total` : "",
|
|
17434
17850
|
offer.diff_from_original_formatted ? ` \xB7 ${offer.diff_from_original_formatted}` : ""
|
|
17435
17851
|
] })
|
|
@@ -17494,7 +17910,7 @@ var useStyles2 = (theme) => useMemo13(
|
|
|
17494
17910
|
);
|
|
17495
17911
|
|
|
17496
17912
|
// src/ui/ProviderPages.tsx
|
|
17497
|
-
import { useEffect as
|
|
17913
|
+
import { useEffect as useEffect20, useState as useState25 } from "react";
|
|
17498
17914
|
import {
|
|
17499
17915
|
ActivityIndicator as ActivityIndicator2,
|
|
17500
17916
|
Linking,
|
|
@@ -17506,10 +17922,10 @@ import {
|
|
|
17506
17922
|
import { WebView } from "react-native-webview";
|
|
17507
17923
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
17508
17924
|
var useProviderPages = () => {
|
|
17509
|
-
const [pending2, setPending] =
|
|
17510
|
-
const [pages] =
|
|
17511
|
-
|
|
17512
|
-
|
|
17925
|
+
const [pending2, setPending] = useState25(null);
|
|
17926
|
+
const [pages] = useState25(() => createProviderPages(setPending));
|
|
17927
|
+
useEffect20(() => () => pages.cancel(), [pages]);
|
|
17928
|
+
useEffect20(() => {
|
|
17513
17929
|
if (!pending2) return;
|
|
17514
17930
|
const subscription = Linking.addEventListener("url", ({ url: url2 }) => {
|
|
17515
17931
|
if (providerPageMatchesReturn(url2, pending2.request.returnUrlPrefix))
|
|
@@ -17528,8 +17944,8 @@ var ProviderPage = ({
|
|
|
17528
17944
|
}) => {
|
|
17529
17945
|
var _a;
|
|
17530
17946
|
const theme = useTheme();
|
|
17531
|
-
const [error, setError] =
|
|
17532
|
-
const [reload, setReload] =
|
|
17947
|
+
const [error, setError] = useState25("");
|
|
17948
|
+
const [reload, setReload] = useState25(0);
|
|
17533
17949
|
const close = () => settle(pending2.id, { event: "dismiss" });
|
|
17534
17950
|
const source = pending2.request.uri ? { uri: pending2.request.uri } : { html: (_a = pending2.request.html) != null ? _a : "", baseUrl: pending2.request.baseUrl };
|
|
17535
17951
|
return /* @__PURE__ */ jsx4(
|
|
@@ -17661,7 +18077,7 @@ var getQueryClient = () => {
|
|
|
17661
18077
|
return sharedQueryClient;
|
|
17662
18078
|
};
|
|
17663
18079
|
var CheckoutRoot = ({ checkout, theme, children }) => {
|
|
17664
|
-
const [attempt, setAttempt] =
|
|
18080
|
+
const [attempt, setAttempt] = useState26(0);
|
|
17665
18081
|
const requestValidation = useCallback13(() => setAttempt((n) => n + 1), []);
|
|
17666
18082
|
const validation = useMemo14(
|
|
17667
18083
|
() => ({ attempt, requestValidation }),
|
|
@@ -17733,11 +18149,11 @@ var CardInput = ({
|
|
|
17733
18149
|
visible = true
|
|
17734
18150
|
}) => {
|
|
17735
18151
|
const theme = useTheme();
|
|
17736
|
-
const [attachment, setAttachment] =
|
|
17737
|
-
const handleRef =
|
|
17738
|
-
const visibleRef =
|
|
18152
|
+
const [attachment, setAttachment] = useState27(0);
|
|
18153
|
+
const handleRef = useRef22(null);
|
|
18154
|
+
const visibleRef = useRef22(visible);
|
|
17739
18155
|
visibleRef.current = visible;
|
|
17740
|
-
|
|
18156
|
+
useEffect21(() => {
|
|
17741
18157
|
const handle = cardFields.mount(
|
|
17742
18158
|
owner,
|
|
17743
18159
|
() => setAttachment((n) => n + 1),
|
|
@@ -17749,7 +18165,7 @@ var CardInput = ({
|
|
|
17749
18165
|
handleRef.current = null;
|
|
17750
18166
|
};
|
|
17751
18167
|
}, [owner]);
|
|
17752
|
-
|
|
18168
|
+
useEffect21(() => {
|
|
17753
18169
|
var _a;
|
|
17754
18170
|
(_a = handleRef.current) == null ? void 0 : _a.setVisible(visible);
|
|
17755
18171
|
}, [visible]);
|
|
@@ -18030,7 +18446,7 @@ var configureCheckout = (config) => configure({
|
|
|
18030
18446
|
});
|
|
18031
18447
|
|
|
18032
18448
|
// src/ui/Field.tsx
|
|
18033
|
-
import { useMemo as useMemo15, useState as
|
|
18449
|
+
import { useMemo as useMemo15, useState as useState28 } from "react";
|
|
18034
18450
|
import {
|
|
18035
18451
|
Pressable as Pressable3,
|
|
18036
18452
|
StyleSheet as StyleSheet5,
|
|
@@ -18041,14 +18457,14 @@ import {
|
|
|
18041
18457
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
18042
18458
|
var Field = ({ label, error, required, children }) => {
|
|
18043
18459
|
const theme = useTheme();
|
|
18044
|
-
const
|
|
18045
|
-
return /* @__PURE__ */ jsxs5(View4, { style:
|
|
18046
|
-
label ? /* @__PURE__ */ jsxs5(Text3, { style:
|
|
18460
|
+
const s6 = useFieldStyles(theme);
|
|
18461
|
+
return /* @__PURE__ */ jsxs5(View4, { style: s6.field, children: [
|
|
18462
|
+
label ? /* @__PURE__ */ jsxs5(Text3, { style: s6.label, children: [
|
|
18047
18463
|
label,
|
|
18048
|
-
required ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18464
|
+
required ? /* @__PURE__ */ jsx7(Text3, { style: s6.required, children: " *" }) : null
|
|
18049
18465
|
] }) : null,
|
|
18050
18466
|
children,
|
|
18051
|
-
error ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18467
|
+
error ? /* @__PURE__ */ jsx7(Text3, { style: s6.error, children: error }) : null
|
|
18052
18468
|
] });
|
|
18053
18469
|
};
|
|
18054
18470
|
var Input = ({
|
|
@@ -18059,24 +18475,24 @@ var Input = ({
|
|
|
18059
18475
|
autoCapitalize = "sentences",
|
|
18060
18476
|
secureTextEntry,
|
|
18061
18477
|
editable: editableProp = true,
|
|
18062
|
-
invalid = false,
|
|
18478
|
+
invalid: invalid2 = false,
|
|
18063
18479
|
onBlur,
|
|
18064
18480
|
...nativeProps
|
|
18065
18481
|
}) => {
|
|
18066
18482
|
const frozen = useFrozen();
|
|
18067
18483
|
const editable = editableProp && !frozen;
|
|
18068
18484
|
const theme = useTheme();
|
|
18069
|
-
const
|
|
18070
|
-
const [focused, setFocused] =
|
|
18485
|
+
const s6 = useFieldStyles(theme);
|
|
18486
|
+
const [focused, setFocused] = useState28(false);
|
|
18071
18487
|
return /* @__PURE__ */ jsx7(
|
|
18072
18488
|
TextInput,
|
|
18073
18489
|
{
|
|
18074
18490
|
...nativeProps,
|
|
18075
18491
|
style: [
|
|
18076
|
-
|
|
18077
|
-
focused &&
|
|
18078
|
-
|
|
18079
|
-
!editable &&
|
|
18492
|
+
s6.input,
|
|
18493
|
+
focused && s6.inputFocused,
|
|
18494
|
+
invalid2 && s6.inputInvalid,
|
|
18495
|
+
!editable && s6.inputDisabled
|
|
18080
18496
|
],
|
|
18081
18497
|
value: value6,
|
|
18082
18498
|
onChangeText,
|
|
@@ -18095,9 +18511,9 @@ var Input = ({
|
|
|
18095
18511
|
}
|
|
18096
18512
|
);
|
|
18097
18513
|
};
|
|
18098
|
-
var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
18514
|
+
var Checkbox = ({ checked, onChange, label, invalid: invalid2 = false }) => {
|
|
18099
18515
|
const theme = useTheme();
|
|
18100
|
-
const
|
|
18516
|
+
const s6 = useFieldStyles(theme);
|
|
18101
18517
|
const frozen = useFrozen();
|
|
18102
18518
|
return /* @__PURE__ */ jsxs5(
|
|
18103
18519
|
Pressable3,
|
|
@@ -18106,20 +18522,20 @@ var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
|
18106
18522
|
accessibilityState: { checked, disabled: frozen },
|
|
18107
18523
|
disabled: frozen,
|
|
18108
18524
|
onPress: () => onChange(!checked),
|
|
18109
|
-
style:
|
|
18525
|
+
style: s6.checkboxRow,
|
|
18110
18526
|
children: [
|
|
18111
18527
|
/* @__PURE__ */ jsx7(
|
|
18112
18528
|
View4,
|
|
18113
18529
|
{
|
|
18114
18530
|
style: [
|
|
18115
|
-
|
|
18116
|
-
checked &&
|
|
18117
|
-
|
|
18531
|
+
s6.checkboxBox,
|
|
18532
|
+
checked && s6.checkboxBoxChecked,
|
|
18533
|
+
invalid2 && !checked && s6.checkboxBoxInvalid
|
|
18118
18534
|
],
|
|
18119
|
-
children: checked ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18535
|
+
children: checked ? /* @__PURE__ */ jsx7(Text3, { style: s6.checkboxMark, children: "\u2713" }) : null
|
|
18120
18536
|
}
|
|
18121
18537
|
),
|
|
18122
|
-
typeof label === "string" ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18538
|
+
typeof label === "string" ? /* @__PURE__ */ jsx7(Text3, { style: s6.checkboxLabel, children: label }) : label
|
|
18123
18539
|
]
|
|
18124
18540
|
}
|
|
18125
18541
|
);
|
|
@@ -18174,7 +18590,7 @@ var useFieldStyles = (theme) => useMemo15(
|
|
|
18174
18590
|
);
|
|
18175
18591
|
|
|
18176
18592
|
// src/ui/Select.tsx
|
|
18177
|
-
import { useMemo as useMemo16, useState as
|
|
18593
|
+
import { useMemo as useMemo16, useState as useState29 } from "react";
|
|
18178
18594
|
import { FlatList, Modal as Modal3, Pressable as Pressable4, StyleSheet as StyleSheet6, Text as Text4, View as View5 } from "react-native";
|
|
18179
18595
|
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
18180
18596
|
function Select({
|
|
@@ -18182,14 +18598,14 @@ function Select({
|
|
|
18182
18598
|
onChange,
|
|
18183
18599
|
options,
|
|
18184
18600
|
placeholder = "Select\u2026",
|
|
18185
|
-
invalid = false,
|
|
18601
|
+
invalid: invalid2 = false,
|
|
18186
18602
|
disabled: disabledProp = false
|
|
18187
18603
|
}) {
|
|
18188
18604
|
const frozen = useFrozen();
|
|
18189
18605
|
const disabled = disabledProp || frozen;
|
|
18190
18606
|
const theme = useTheme();
|
|
18191
|
-
const
|
|
18192
|
-
const [open, setOpen] =
|
|
18607
|
+
const s6 = useSelectStyles(theme);
|
|
18608
|
+
const [open, setOpen] = useState29(false);
|
|
18193
18609
|
const selected = options.find((o) => o.value === value6);
|
|
18194
18610
|
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
18195
18611
|
/* @__PURE__ */ jsxs6(
|
|
@@ -18198,10 +18614,10 @@ function Select({
|
|
|
18198
18614
|
accessibilityRole: "button",
|
|
18199
18615
|
disabled,
|
|
18200
18616
|
onPress: () => setOpen(true),
|
|
18201
|
-
style: [
|
|
18617
|
+
style: [s6.control, invalid2 && s6.controlInvalid, disabled && s6.controlDisabled],
|
|
18202
18618
|
children: [
|
|
18203
|
-
/* @__PURE__ */ jsx8(Text4, { style: [
|
|
18204
|
-
/* @__PURE__ */ jsx8(Text4, { style:
|
|
18619
|
+
/* @__PURE__ */ jsx8(Text4, { style: [s6.value, !selected && s6.placeholder], numberOfLines: 1, children: selected ? selected.label : placeholder }),
|
|
18620
|
+
/* @__PURE__ */ jsx8(Text4, { style: s6.chevron, children: "\u25BE" })
|
|
18205
18621
|
]
|
|
18206
18622
|
}
|
|
18207
18623
|
),
|
|
@@ -18212,7 +18628,7 @@ function Select({
|
|
|
18212
18628
|
transparent: true,
|
|
18213
18629
|
animationType: "fade",
|
|
18214
18630
|
onRequestClose: () => setOpen(false),
|
|
18215
|
-
children: /* @__PURE__ */ jsx8(Pressable4, { style:
|
|
18631
|
+
children: /* @__PURE__ */ jsx8(Pressable4, { style: s6.backdrop, onPress: () => setOpen(false), children: /* @__PURE__ */ jsx8(Pressable4, { style: s6.sheet, onPress: () => {
|
|
18216
18632
|
}, children: /* @__PURE__ */ jsx8(
|
|
18217
18633
|
FlatList,
|
|
18218
18634
|
{
|
|
@@ -18224,19 +18640,19 @@ function Select({
|
|
|
18224
18640
|
return /* @__PURE__ */ jsxs6(
|
|
18225
18641
|
Pressable4,
|
|
18226
18642
|
{
|
|
18227
|
-
style:
|
|
18643
|
+
style: s6.option,
|
|
18228
18644
|
onPress: () => {
|
|
18229
18645
|
onChange(item.value);
|
|
18230
18646
|
setOpen(false);
|
|
18231
18647
|
},
|
|
18232
18648
|
children: [
|
|
18233
|
-
/* @__PURE__ */ jsx8(Text4, { style: [
|
|
18234
|
-
isSelected ? /* @__PURE__ */ jsx8(Text4, { style:
|
|
18649
|
+
/* @__PURE__ */ jsx8(Text4, { style: [s6.optionLabel, isSelected && s6.optionLabelSelected], children: item.label }),
|
|
18650
|
+
isSelected ? /* @__PURE__ */ jsx8(Text4, { style: s6.optionCheck, children: "\u2713" }) : null
|
|
18235
18651
|
]
|
|
18236
18652
|
}
|
|
18237
18653
|
);
|
|
18238
18654
|
},
|
|
18239
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ jsx8(View5, { style:
|
|
18655
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ jsx8(View5, { style: s6.sep })
|
|
18240
18656
|
}
|
|
18241
18657
|
) }) })
|
|
18242
18658
|
}
|
|
@@ -18319,7 +18735,7 @@ var QuantitySelect = ({
|
|
|
18319
18735
|
const frozen = useFrozen();
|
|
18320
18736
|
const disabled = disabledProp || frozen;
|
|
18321
18737
|
const theme = useTheme();
|
|
18322
|
-
const
|
|
18738
|
+
const s6 = useQuantityStyles(theme);
|
|
18323
18739
|
const lo = Math.max(1, min);
|
|
18324
18740
|
const cap = Math.min(max, 50);
|
|
18325
18741
|
const atZero = value6 <= 0;
|
|
@@ -18335,7 +18751,7 @@ var QuantitySelect = ({
|
|
|
18335
18751
|
return /* @__PURE__ */ jsxs7(
|
|
18336
18752
|
View6,
|
|
18337
18753
|
{
|
|
18338
|
-
style:
|
|
18754
|
+
style: s6.stepper,
|
|
18339
18755
|
accessible: Boolean(label),
|
|
18340
18756
|
accessibilityRole: label ? "adjustable" : void 0,
|
|
18341
18757
|
accessibilityLabel: label,
|
|
@@ -18354,11 +18770,11 @@ var QuantitySelect = ({
|
|
|
18354
18770
|
accessibilityLabel: "Remove one",
|
|
18355
18771
|
disabled: disabled || atZero,
|
|
18356
18772
|
onPress: dec,
|
|
18357
|
-
style: [
|
|
18358
|
-
children: /* @__PURE__ */ jsx9(Text5, { style:
|
|
18773
|
+
style: [s6.btn, (disabled || atZero) && s6.btnDisabled],
|
|
18774
|
+
children: /* @__PURE__ */ jsx9(Text5, { style: s6.glyph, children: "\u2212" })
|
|
18359
18775
|
}
|
|
18360
18776
|
),
|
|
18361
|
-
/* @__PURE__ */ jsx9(Text5, { style:
|
|
18777
|
+
/* @__PURE__ */ jsx9(Text5, { style: s6.value, children: value6 }),
|
|
18362
18778
|
/* @__PURE__ */ jsx9(
|
|
18363
18779
|
Pressable5,
|
|
18364
18780
|
{
|
|
@@ -18366,8 +18782,8 @@ var QuantitySelect = ({
|
|
|
18366
18782
|
accessibilityLabel: "Add one",
|
|
18367
18783
|
disabled: disabled || atCap,
|
|
18368
18784
|
onPress: inc,
|
|
18369
|
-
style: [
|
|
18370
|
-
children: /* @__PURE__ */ jsx9(Text5, { style:
|
|
18785
|
+
style: [s6.btn, (disabled || atCap) && s6.btnDisabled],
|
|
18786
|
+
children: /* @__PURE__ */ jsx9(Text5, { style: s6.glyph, children: "+" })
|
|
18371
18787
|
}
|
|
18372
18788
|
)
|
|
18373
18789
|
]
|
|
@@ -18404,8 +18820,8 @@ var useQuantityStyles = (theme) => useMemo17(
|
|
|
18404
18820
|
import { useMemo as useMemo18 } from "react";
|
|
18405
18821
|
import { StyleSheet as StyleSheet8, Text as Text6, View as View7 } from "react-native";
|
|
18406
18822
|
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
18407
|
-
var clock = (
|
|
18408
|
-
const v = Math.max(0, Math.floor(
|
|
18823
|
+
var clock = (s6) => {
|
|
18824
|
+
const v = Math.max(0, Math.floor(s6));
|
|
18409
18825
|
return v >= 3600 ? `${Math.floor(v / 3600)}:${String(Math.floor(v % 3600 / 60)).padStart(
|
|
18410
18826
|
2,
|
|
18411
18827
|
"0"
|
|
@@ -18413,11 +18829,11 @@ var clock = (s5) => {
|
|
|
18413
18829
|
};
|
|
18414
18830
|
var Timer = ({ seconds, urgentAt = 60, label }) => {
|
|
18415
18831
|
const theme = useTheme();
|
|
18416
|
-
const
|
|
18832
|
+
const s6 = useTimerStyles(theme);
|
|
18417
18833
|
const urgent = seconds <= urgentAt;
|
|
18418
|
-
return /* @__PURE__ */ jsxs8(View7, { style:
|
|
18419
|
-
label != null ? typeof label === "string" ? /* @__PURE__ */ jsx10(Text6, { style:
|
|
18420
|
-
/* @__PURE__ */ jsx10(Text6, { style: [
|
|
18834
|
+
return /* @__PURE__ */ jsxs8(View7, { style: s6.row, children: [
|
|
18835
|
+
label != null ? typeof label === "string" ? /* @__PURE__ */ jsx10(Text6, { style: s6.label, children: label }) : label : null,
|
|
18836
|
+
/* @__PURE__ */ jsx10(Text6, { style: [s6.clock, urgent && s6.clockUrgent], children: clock(seconds) })
|
|
18421
18837
|
] });
|
|
18422
18838
|
};
|
|
18423
18839
|
var useTimerStyles = (theme) => useMemo18(
|
|
@@ -18441,12 +18857,12 @@ var useTimerStyles = (theme) => useMemo18(
|
|
|
18441
18857
|
);
|
|
18442
18858
|
|
|
18443
18859
|
// src/ui/TimerBanner.tsx
|
|
18444
|
-
import { useMemo as useMemo19, useState as
|
|
18860
|
+
import { useMemo as useMemo19, useState as useState30 } from "react";
|
|
18445
18861
|
import { Pressable as Pressable6, StyleSheet as StyleSheet9, Text as Text7, View as View8 } from "react-native";
|
|
18446
18862
|
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
18447
|
-
var clock2 = (
|
|
18448
|
-
const m = String(Math.floor(
|
|
18449
|
-
const ss = String(
|
|
18863
|
+
var clock2 = (s6) => {
|
|
18864
|
+
const m = String(Math.floor(s6 / 60)).padStart(2, "0");
|
|
18865
|
+
const ss = String(s6 % 60).padStart(2, "0");
|
|
18450
18866
|
return `${m}:${ss}`;
|
|
18451
18867
|
};
|
|
18452
18868
|
var TimerBanner = ({
|
|
@@ -18455,16 +18871,16 @@ var TimerBanner = ({
|
|
|
18455
18871
|
message = "Please complete your purchase before the timer reaches zero."
|
|
18456
18872
|
}) => {
|
|
18457
18873
|
const theme = useTheme();
|
|
18458
|
-
const
|
|
18459
|
-
const [dismissed, setDismissed] =
|
|
18874
|
+
const s6 = useBannerStyles(theme);
|
|
18875
|
+
const [dismissed, setDismissed] = useState30(false);
|
|
18460
18876
|
if (seconds === void 0 || seconds <= 0 || dismissed) return null;
|
|
18461
18877
|
const urgent = seconds <= urgentAt;
|
|
18462
18878
|
return (
|
|
18463
18879
|
// `accessibilityLiveRegion="polite"` is the RN analogue of the web
|
|
18464
18880
|
// `role="status"` — announce the countdown without stealing focus.
|
|
18465
|
-
/* @__PURE__ */ jsxs9(View8, { accessibilityLiveRegion: "polite", style: [
|
|
18466
|
-
/* @__PURE__ */ jsx11(Text7, { style: [
|
|
18467
|
-
/* @__PURE__ */ jsx11(Text7, { style: [
|
|
18881
|
+
/* @__PURE__ */ jsxs9(View8, { accessibilityLiveRegion: "polite", style: [s6.banner, urgent && s6.bannerUrgent], children: [
|
|
18882
|
+
/* @__PURE__ */ jsx11(Text7, { style: [s6.msg, urgent && s6.textUrgent], children: message }),
|
|
18883
|
+
/* @__PURE__ */ jsx11(Text7, { style: [s6.clock, urgent && s6.textUrgent], children: clock2(seconds) }),
|
|
18468
18884
|
/* @__PURE__ */ jsx11(
|
|
18469
18885
|
Pressable6,
|
|
18470
18886
|
{
|
|
@@ -18472,8 +18888,8 @@ var TimerBanner = ({
|
|
|
18472
18888
|
accessibilityLabel: "Dismiss",
|
|
18473
18889
|
hitSlop: 8,
|
|
18474
18890
|
onPress: () => setDismissed(true),
|
|
18475
|
-
style:
|
|
18476
|
-
children: /* @__PURE__ */ jsx11(Text7, { style: [
|
|
18891
|
+
style: s6.close,
|
|
18892
|
+
children: /* @__PURE__ */ jsx11(Text7, { style: [s6.closeGlyph, urgent && s6.textUrgent], children: "\xD7" })
|
|
18477
18893
|
}
|
|
18478
18894
|
)
|
|
18479
18895
|
] })
|
|
@@ -18538,14 +18954,14 @@ var PaymentMethods = ({
|
|
|
18538
18954
|
}) => {
|
|
18539
18955
|
const theme = useTheme();
|
|
18540
18956
|
const frozen = useFrozen();
|
|
18541
|
-
const
|
|
18542
|
-
return /* @__PURE__ */ jsx12(View9, { style:
|
|
18957
|
+
const s6 = useStyles3(theme);
|
|
18958
|
+
return /* @__PURE__ */ jsx12(View9, { style: s6.list, accessibilityRole: "radiogroup", children: options.map((option) => {
|
|
18543
18959
|
var _a, _b;
|
|
18544
18960
|
const active2 = option.value === selected;
|
|
18545
18961
|
const extraValue = option.extra === "phoneNumber" ? (_a = extraValues[option.value]) == null ? void 0 : _a.phoneNumber : (_b = extraValues[option.value]) == null ? void 0 : _b.cashtag;
|
|
18546
18962
|
const extraInvalid = Boolean(active2 && option.extra && showValidation) && !(extraValue == null ? void 0 : extraValue.trim());
|
|
18547
18963
|
const showBody = active2 && (option.value === inputSlotFor || Boolean(option.extra));
|
|
18548
|
-
return /* @__PURE__ */ jsxs10(View9, { style: [
|
|
18964
|
+
return /* @__PURE__ */ jsxs10(View9, { style: [s6.row, active2 && s6.rowActive], children: [
|
|
18549
18965
|
/* @__PURE__ */ jsxs10(
|
|
18550
18966
|
Pressable7,
|
|
18551
18967
|
{
|
|
@@ -18555,23 +18971,23 @@ var PaymentMethods = ({
|
|
|
18555
18971
|
onPress: () => {
|
|
18556
18972
|
if (!frozen) onSelect(option.value);
|
|
18557
18973
|
},
|
|
18558
|
-
style:
|
|
18974
|
+
style: s6.rowHead,
|
|
18559
18975
|
children: [
|
|
18560
|
-
/* @__PURE__ */ jsx12(View9, { style: [
|
|
18976
|
+
/* @__PURE__ */ jsx12(View9, { style: [s6.radio, active2 && s6.radioActive], children: active2 ? /* @__PURE__ */ jsx12(View9, { style: s6.radioDot }) : null }),
|
|
18561
18977
|
option.iconUrl ? /* @__PURE__ */ jsx12(
|
|
18562
18978
|
Image,
|
|
18563
18979
|
{
|
|
18564
18980
|
source: { uri: option.iconUrl },
|
|
18565
|
-
style:
|
|
18981
|
+
style: s6.icon,
|
|
18566
18982
|
resizeMode: "contain",
|
|
18567
18983
|
accessibilityIgnoresInvertColors: true
|
|
18568
18984
|
}
|
|
18569
18985
|
) : null,
|
|
18570
|
-
/* @__PURE__ */ jsx12(Text8, { style:
|
|
18986
|
+
/* @__PURE__ */ jsx12(Text8, { style: s6.rowLabel, children: option.label })
|
|
18571
18987
|
]
|
|
18572
18988
|
}
|
|
18573
18989
|
),
|
|
18574
|
-
showBody ? /* @__PURE__ */ jsxs10(View9, { style:
|
|
18990
|
+
showBody ? /* @__PURE__ */ jsxs10(View9, { style: s6.slot, children: [
|
|
18575
18991
|
option.value === inputSlotFor ? children : null,
|
|
18576
18992
|
option.extra ? /* @__PURE__ */ jsx12(
|
|
18577
18993
|
Field,
|
|
@@ -18644,18 +19060,18 @@ var useStyles3 = (theme) => useMemo20(
|
|
|
18644
19060
|
// src/sections/Tickets.tsx
|
|
18645
19061
|
import {
|
|
18646
19062
|
Fragment as Fragment2,
|
|
18647
|
-
useEffect as
|
|
19063
|
+
useEffect as useEffect22,
|
|
18648
19064
|
useMemo as useMemo21,
|
|
18649
|
-
useRef as
|
|
18650
|
-
useState as
|
|
19065
|
+
useRef as useRef23,
|
|
19066
|
+
useState as useState31
|
|
18651
19067
|
} from "react";
|
|
18652
19068
|
import { Pressable as Pressable8, StyleSheet as StyleSheet11, Text as Text9, View as View10 } from "react-native";
|
|
18653
19069
|
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
18654
19070
|
var money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
|
|
18655
19071
|
var WaitingListForm = ({ ticket, onJoin }) => {
|
|
18656
|
-
const [form, setForm] =
|
|
18657
|
-
const [state, setState] =
|
|
18658
|
-
const [error, setError] =
|
|
19072
|
+
const [form, setForm] = useState31({ firstName: "", lastName: "", email: "" });
|
|
19073
|
+
const [state, setState] = useState31("idle");
|
|
19074
|
+
const [error, setError] = useState31("");
|
|
18659
19075
|
const ok = Boolean(form.firstName.trim() && form.lastName.trim() && form.email.trim());
|
|
18660
19076
|
if (state === "done")
|
|
18661
19077
|
return /* @__PURE__ */ jsx13(MutedText, { children: "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens." });
|
|
@@ -18723,14 +19139,14 @@ var Tickets = ({
|
|
|
18723
19139
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
18724
19140
|
const checkout = useCheckoutContext();
|
|
18725
19141
|
const theme = useTheme();
|
|
18726
|
-
const
|
|
19142
|
+
const s6 = useTicketStyles(theme);
|
|
18727
19143
|
const ticketsQuery = hooks_exports.useTicketsWithMeta(eventId);
|
|
18728
19144
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
18729
19145
|
const bundleStarting = bundleWait !== null;
|
|
18730
19146
|
const promoMeta = (_a = ticketsQuery.data) == null ? void 0 : _a.promo;
|
|
18731
19147
|
const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
|
|
18732
|
-
const [qty, setQty] =
|
|
18733
|
-
const [slotDate, setSlotDate] =
|
|
19148
|
+
const [qty, setQty] = useState31({});
|
|
19149
|
+
const [slotDate, setSlotDate] = useState31("");
|
|
18734
19150
|
const eventInfo = hooks_exports.useEvent(eventId).data;
|
|
18735
19151
|
const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
|
|
18736
19152
|
const dates = useMemo21(
|
|
@@ -18740,7 +19156,7 @@ var Tickets = ({
|
|
|
18740
19156
|
},
|
|
18741
19157
|
[timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
|
|
18742
19158
|
);
|
|
18743
|
-
|
|
19159
|
+
useEffect22(() => {
|
|
18744
19160
|
if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
|
|
18745
19161
|
}, [isTimeSlot, slotDate, dates]);
|
|
18746
19162
|
const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
|
|
@@ -18751,10 +19167,10 @@ var Tickets = ({
|
|
|
18751
19167
|
},
|
|
18752
19168
|
[isTimeSlot, slotQuery.data, (_d = ticketsQuery.data) == null ? void 0 : _d.tickets]
|
|
18753
19169
|
);
|
|
18754
|
-
const [error, setError] =
|
|
18755
|
-
const [code, setCode] =
|
|
18756
|
-
const [codeState, setCodeState] =
|
|
18757
|
-
const [promoOpen, setPromoOpen] =
|
|
19170
|
+
const [error, setError] = useState31("");
|
|
19171
|
+
const [code, setCode] = useState31("");
|
|
19172
|
+
const [codeState, setCodeState] = useState31("idle");
|
|
19173
|
+
const [promoOpen, setPromoOpen] = useState31(false);
|
|
18758
19174
|
hooks_exports.useOnEventChange(eventId, () => {
|
|
18759
19175
|
setQty({});
|
|
18760
19176
|
setSlotDate("");
|
|
@@ -18762,10 +19178,10 @@ var Tickets = ({
|
|
|
18762
19178
|
setPromoOpen(false);
|
|
18763
19179
|
setError("");
|
|
18764
19180
|
});
|
|
18765
|
-
const [wlOpen, setWlOpen] =
|
|
18766
|
-
const [visibleDescription, setVisibleDescription] =
|
|
18767
|
-
const attributionEvent =
|
|
18768
|
-
|
|
19181
|
+
const [wlOpen, setWlOpen] = useState31({});
|
|
19182
|
+
const [visibleDescription, setVisibleDescription] = useState31(null);
|
|
19183
|
+
const attributionEvent = useRef23(null);
|
|
19184
|
+
useEffect22(() => {
|
|
18769
19185
|
var _a2;
|
|
18770
19186
|
if (attributionEvent.current === eventId) return;
|
|
18771
19187
|
attributionEvent.current = eventId;
|
|
@@ -18783,7 +19199,7 @@ var Tickets = ({
|
|
|
18783
19199
|
});
|
|
18784
19200
|
}
|
|
18785
19201
|
}, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
|
|
18786
|
-
|
|
19202
|
+
useEffect22(() => {
|
|
18787
19203
|
checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
|
|
18788
19204
|
}, [eventId]);
|
|
18789
19205
|
const changeCurrency = (nextCode) => {
|
|
@@ -18794,8 +19210,8 @@ var Tickets = ({
|
|
|
18794
19210
|
}
|
|
18795
19211
|
}).catch(() => void 0);
|
|
18796
19212
|
};
|
|
18797
|
-
const originals =
|
|
18798
|
-
|
|
19213
|
+
const originals = useRef23({});
|
|
19214
|
+
useEffect22(() => {
|
|
18799
19215
|
for (const t of tickets)
|
|
18800
19216
|
if (originals.current[t.id] == null) originals.current[t.id] = t.price;
|
|
18801
19217
|
}, [tickets]);
|
|
@@ -18858,13 +19274,13 @@ var Tickets = ({
|
|
|
18858
19274
|
const ticketIndex = tickets.findIndex((candidate) => candidate.id === t.id);
|
|
18859
19275
|
const previousTicket = ticketIndex > 0 ? tickets[ticketIndex - 1] : void 0;
|
|
18860
19276
|
const startsNamedGroup = Boolean(t.groupName) && t.groupName !== (previousTicket == null ? void 0 : previousTicket.groupName);
|
|
18861
|
-
const groupHeading = startsNamedGroup ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19277
|
+
const groupHeading = startsNamedGroup ? /* @__PURE__ */ jsx13(Text9, { style: s6.group, children: t.groupName }) : t.id === firstTableId ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18862
19278
|
/* @__PURE__ */ jsx13(Divider, {}),
|
|
18863
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19279
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.group, children: "Reserve tables" })
|
|
18864
19280
|
] }) : null;
|
|
18865
19281
|
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
18866
19282
|
groupHeading,
|
|
18867
|
-
/* @__PURE__ */ jsxs11(View10, { style: renderTicket ? void 0 :
|
|
19283
|
+
/* @__PURE__ */ jsxs11(View10, { style: renderTicket ? void 0 : s6.rowWrap, children: [
|
|
18868
19284
|
renderTicket ? renderTicket({
|
|
18869
19285
|
ticket: t,
|
|
18870
19286
|
quantity: (_a2 = qty[t.id]) != null ? _a2 : 0,
|
|
@@ -18875,36 +19291,36 @@ var Tickets = ({
|
|
|
18875
19291
|
if (!checkout.orderFixed) selectQty(t, value6);
|
|
18876
19292
|
}
|
|
18877
19293
|
}) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18878
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18879
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18880
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18881
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19294
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.row, children: [
|
|
19295
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.info, children: [
|
|
19296
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.nameRow, children: [
|
|
19297
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.name, children: t.name }),
|
|
18882
19298
|
t.descriptionRich ? /* @__PURE__ */ jsx13(
|
|
18883
19299
|
Pressable8,
|
|
18884
19300
|
{
|
|
18885
19301
|
accessibilityRole: "button",
|
|
18886
19302
|
onPress: () => setVisibleDescription((cur) => cur === t.id ? null : t.id),
|
|
18887
|
-
children: /* @__PURE__ */ jsx13(Text9, { style:
|
|
19303
|
+
children: /* @__PURE__ */ jsx13(Text9, { style: s6.infoToggle, children: visibleDescription === t.id ? "Hide info" : "View info" })
|
|
18888
19304
|
}
|
|
18889
19305
|
) : null
|
|
18890
19306
|
] }),
|
|
18891
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18892
|
-
discounted && original != null ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18893
|
-
/* @__PURE__ */ jsx13(Text9, { style: [
|
|
18894
|
-
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18895
|
-
!isFree && !t.soldOut ? /* @__PURE__ */ jsxs11(Text9, { style:
|
|
19307
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.priceRow, children: [
|
|
19308
|
+
discounted && original != null ? /* @__PURE__ */ jsx13(Text9, { style: s6.oldPrice, children: money(sym, original) }) : null,
|
|
19309
|
+
/* @__PURE__ */ jsx13(Text9, { style: [s6.amount, isFree && s6.amountFree], children: isFree ? "FREE" : money(sym, t.price) }),
|
|
19310
|
+
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style: s6.perTable, children: "\xB7 per table" }) : null,
|
|
19311
|
+
!isFree && !t.soldOut ? /* @__PURE__ */ jsxs11(Text9, { style: s6.fees, children: [
|
|
18896
19312
|
"(",
|
|
18897
19313
|
money(sym, t.priceWithFees),
|
|
18898
19314
|
" with fees)"
|
|
18899
19315
|
] }) : null,
|
|
18900
|
-
t.depositPercent != null ? /* @__PURE__ */ jsxs11(Text9, { style:
|
|
19316
|
+
t.depositPercent != null ? /* @__PURE__ */ jsxs11(Text9, { style: s6.deposit, children: [
|
|
18901
19317
|
t.depositPercent.toFixed(2),
|
|
18902
19318
|
"% DEPOSIT"
|
|
18903
19319
|
] }) : null
|
|
18904
19320
|
] })
|
|
18905
19321
|
] }),
|
|
18906
|
-
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18907
|
-
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19322
|
+
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ jsx13(Text9, { style: s6.soldout, children: t.soldOut ? "Sold out" : notStarted ? "Sales not started" : "Sales Ended" }) : /* @__PURE__ */ jsxs11(View10, { style: s6.qtyWrap, children: [
|
|
19323
|
+
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style: s6.guests, children: "Guests" }) : null,
|
|
18908
19324
|
/* @__PURE__ */ jsx13(
|
|
18909
19325
|
QuantitySelect,
|
|
18910
19326
|
{
|
|
@@ -18917,7 +19333,7 @@ var Tickets = ({
|
|
|
18917
19333
|
)
|
|
18918
19334
|
] })
|
|
18919
19335
|
] }),
|
|
18920
|
-
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19336
|
+
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ jsx13(Text9, { style: s6.description, children: htmlToPlainText(t.descriptionRich) }) : null
|
|
18921
19337
|
] }),
|
|
18922
19338
|
canWaitlist ? wlOpen[t.id] ? /* @__PURE__ */ jsx13(
|
|
18923
19339
|
WaitingListForm,
|
|
@@ -18930,7 +19346,7 @@ var Tickets = ({
|
|
|
18930
19346
|
{
|
|
18931
19347
|
accessibilityRole: "button",
|
|
18932
19348
|
onPress: () => setWlOpen((w) => ({ ...w, [t.id]: true })),
|
|
18933
|
-
children: /* @__PURE__ */ jsx13(Text9, { style:
|
|
19349
|
+
children: /* @__PURE__ */ jsx13(Text9, { style: s6.wlToggle, children: "Join the waiting list" })
|
|
18934
19350
|
}
|
|
18935
19351
|
) : null
|
|
18936
19352
|
] })
|
|
@@ -18948,10 +19364,10 @@ var Tickets = ({
|
|
|
18948
19364
|
const continueTitle = checkout.isBusy ? "Reserving\u2026" : selectionIsTable ? "Reserve tables" : buttonLabel;
|
|
18949
19365
|
return /* @__PURE__ */ jsx13(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs11(Container, { children: [
|
|
18950
19366
|
title ? /* @__PURE__ */ jsx13(SectionHeader, { title }) : null,
|
|
18951
|
-
listQuery.isLoading ? /* @__PURE__ */ jsx13(View10, { style:
|
|
19367
|
+
listQuery.isLoading ? /* @__PURE__ */ jsx13(View10, { style: s6.loading, children: /* @__PURE__ */ jsx13(Loader, {}) }) : null,
|
|
18952
19368
|
listQuery.error ? /* @__PURE__ */ jsx13(ErrorText, { children: listQuery.error.message }) : null,
|
|
18953
|
-
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ jsxs11(View10, { style:
|
|
18954
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19369
|
+
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ jsxs11(View10, { style: s6.selectBlock, children: [
|
|
19370
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.selectLabel, children: "Date" }),
|
|
18955
19371
|
/* @__PURE__ */ jsx13(
|
|
18956
19372
|
Select,
|
|
18957
19373
|
{
|
|
@@ -18964,8 +19380,8 @@ var Tickets = ({
|
|
|
18964
19380
|
}
|
|
18965
19381
|
)
|
|
18966
19382
|
] }) : null,
|
|
18967
|
-
currency && currency.available.length > 1 ? /* @__PURE__ */ jsxs11(View10, { style:
|
|
18968
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19383
|
+
currency && currency.available.length > 1 ? /* @__PURE__ */ jsxs11(View10, { style: s6.selectBlock, children: [
|
|
19384
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.selectLabel, children: "Currency" }),
|
|
18969
19385
|
/* @__PURE__ */ jsx13(
|
|
18970
19386
|
Select,
|
|
18971
19387
|
{
|
|
@@ -18980,10 +19396,10 @@ var Tickets = ({
|
|
|
18980
19396
|
] }) : null,
|
|
18981
19397
|
isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate ? /* @__PURE__ */ jsx13(MutedText, { children: "No sessions available on this date." }) : null,
|
|
18982
19398
|
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
18983
|
-
g.time ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19399
|
+
g.time ? /* @__PURE__ */ jsx13(Text9, { style: s6.slotTime, children: g.time }) : null,
|
|
18984
19400
|
g.items.map(renderRow)
|
|
18985
19401
|
] }, g.time)) : tickets.map(renderRow),
|
|
18986
|
-
showCodeInput ? /* @__PURE__ */ jsx13(View10, { style:
|
|
19402
|
+
showCodeInput ? /* @__PURE__ */ jsx13(View10, { style: s6.promo, children: !isAccess && !promoOpen ? /* @__PURE__ */ jsx13(Pressable8, { accessibilityRole: "button", onPress: () => setPromoOpen(true), children: /* @__PURE__ */ jsx13(Text9, { style: s6.promoToggle, children: "Got a promo code? Tap here" }) }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18987
19403
|
/* @__PURE__ */ jsx13(Field, { children: /* @__PURE__ */ jsx13(
|
|
18988
19404
|
Input,
|
|
18989
19405
|
{
|
|
@@ -19243,7 +19659,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
19243
19659
|
};
|
|
19244
19660
|
|
|
19245
19661
|
// src/sections/SeatMap.tsx
|
|
19246
|
-
import { useEffect as
|
|
19662
|
+
import { useEffect as useEffect23, useMemo as useMemo23, useRef as useRef24, useState as useState32 } from "react";
|
|
19247
19663
|
import { StyleSheet as StyleSheet12, Text as Text10, View as View12 } from "react-native";
|
|
19248
19664
|
import { WebView as WebView3 } from "react-native-webview";
|
|
19249
19665
|
|
|
@@ -19259,9 +19675,9 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19259
19675
|
const theme = useTheme();
|
|
19260
19676
|
const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
|
|
19261
19677
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
19262
|
-
const webview =
|
|
19263
|
-
const [rendererError, setRendererError] =
|
|
19264
|
-
const [size, setSize] =
|
|
19678
|
+
const webview = useRef24(null);
|
|
19679
|
+
const [rendererError, setRendererError] = useState32(false);
|
|
19680
|
+
const [size, setSize] = useState32(320);
|
|
19265
19681
|
const properties = flow.chart.state === "ready" ? {
|
|
19266
19682
|
seatData: flow.chart.data.seatData,
|
|
19267
19683
|
statuses: flow.statuses,
|
|
@@ -19288,7 +19704,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19288
19704
|
`window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
|
|
19289
19705
|
);
|
|
19290
19706
|
};
|
|
19291
|
-
|
|
19707
|
+
useEffect23(update, [properties && safeJson2(properties)]);
|
|
19292
19708
|
if (flow.chart.state === "provider") return /* @__PURE__ */ jsx15(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
|
|
19293
19709
|
return /* @__PURE__ */ jsx15(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs13(Card, { children: [
|
|
19294
19710
|
/* @__PURE__ */ jsx15(SectionHeader, { title: "Select your seats" }),
|
|
@@ -19441,13 +19857,13 @@ var CustomFieldInput = ({
|
|
|
19441
19857
|
onChange,
|
|
19442
19858
|
error
|
|
19443
19859
|
}) => {
|
|
19444
|
-
const
|
|
19860
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
19445
19861
|
const desc = field.description ? /* @__PURE__ */ jsx16(MutedText, { children: field.description }) : null;
|
|
19446
19862
|
switch (field.type) {
|
|
19447
19863
|
case "textarea":
|
|
19448
19864
|
return /* @__PURE__ */ jsxs14(Field, { label: field.label, required: field.required, error, children: [
|
|
19449
19865
|
desc,
|
|
19450
|
-
/* @__PURE__ */ jsx16(Input, { value: asString(value6), onChangeText: onChange, invalid })
|
|
19866
|
+
/* @__PURE__ */ jsx16(Input, { value: asString(value6), onChangeText: onChange, invalid: invalid2 })
|
|
19451
19867
|
] });
|
|
19452
19868
|
case "select":
|
|
19453
19869
|
case "radio": {
|
|
@@ -19464,7 +19880,7 @@ var CustomFieldInput = ({
|
|
|
19464
19880
|
onChange,
|
|
19465
19881
|
options,
|
|
19466
19882
|
placeholder: "\u2014 select \u2014",
|
|
19467
|
-
invalid
|
|
19883
|
+
invalid: invalid2
|
|
19468
19884
|
}
|
|
19469
19885
|
)
|
|
19470
19886
|
] });
|
|
@@ -19493,7 +19909,7 @@ var CustomFieldInput = ({
|
|
|
19493
19909
|
checked: asString(value6) === "1",
|
|
19494
19910
|
onChange: (on) => onChange(on ? "1" : ""),
|
|
19495
19911
|
label: `${field.label}${field.required ? " *" : ""}`,
|
|
19496
|
-
invalid
|
|
19912
|
+
invalid: invalid2
|
|
19497
19913
|
}
|
|
19498
19914
|
),
|
|
19499
19915
|
error !== void 0 && error !== null ? /* @__PURE__ */ jsx16(ErrorText, { children: error }) : null
|
|
@@ -19513,7 +19929,7 @@ var CustomFieldInput = ({
|
|
|
19513
19929
|
onChangeText: onChange,
|
|
19514
19930
|
keyboardType: field.type === "email" ? "email-address" : field.type === "phone" ? "phone-pad" : "default",
|
|
19515
19931
|
autoCapitalize: field.type === "email" ? "none" : "sentences",
|
|
19516
|
-
invalid
|
|
19932
|
+
invalid: invalid2
|
|
19517
19933
|
}
|
|
19518
19934
|
)
|
|
19519
19935
|
] });
|
|
@@ -19548,7 +19964,7 @@ var AddOns = ({
|
|
|
19548
19964
|
var _a, _b;
|
|
19549
19965
|
const checkout = useCheckoutContext();
|
|
19550
19966
|
const theme = useTheme();
|
|
19551
|
-
const
|
|
19967
|
+
const s6 = useAddonStyles(theme);
|
|
19552
19968
|
const {
|
|
19553
19969
|
query: addonsQuery,
|
|
19554
19970
|
addons,
|
|
@@ -19564,15 +19980,15 @@ var AddOns = ({
|
|
|
19564
19980
|
save,
|
|
19565
19981
|
skip
|
|
19566
19982
|
} = hooks_exports.useAddOnSelection(eventId, checkout, { onContinue, onSkip });
|
|
19567
|
-
const head = /* @__PURE__ */ jsxs15(View14, { style:
|
|
19568
|
-
eyebrow ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
19569
|
-
/* @__PURE__ */ jsx17(Text11, { style:
|
|
19570
|
-
onSkip && !hasRequired ? /* @__PURE__ */ jsx17(Pressable9, { accessibilityRole: "button", onPress: skip, style:
|
|
19983
|
+
const head = /* @__PURE__ */ jsxs15(View14, { style: s6.head, children: [
|
|
19984
|
+
eyebrow ? /* @__PURE__ */ jsx17(Text11, { style: s6.eyebrow, children: eyebrow }) : null,
|
|
19985
|
+
/* @__PURE__ */ jsx17(Text11, { style: s6.heading, children: heading }),
|
|
19986
|
+
onSkip && !hasRequired ? /* @__PURE__ */ jsx17(Pressable9, { accessibilityRole: "button", onPress: skip, style: s6.skipBtn, children: /* @__PURE__ */ jsx17(Text11, { style: s6.skip, children: "Skip" }) }) : null
|
|
19571
19987
|
] });
|
|
19572
19988
|
if (addonsQuery.isLoading) {
|
|
19573
19989
|
return /* @__PURE__ */ jsxs15(Card, { children: [
|
|
19574
19990
|
head,
|
|
19575
|
-
/* @__PURE__ */ jsx17(View14, { style:
|
|
19991
|
+
/* @__PURE__ */ jsx17(View14, { style: s6.sectionLoader, children: /* @__PURE__ */ jsx17(Loader, {}) })
|
|
19576
19992
|
] });
|
|
19577
19993
|
}
|
|
19578
19994
|
if (addonsQuery.isError)
|
|
@@ -19595,30 +20011,30 @@ var AddOns = ({
|
|
|
19595
20011
|
const selectedCount = Object.values(qty).filter((n) => n > 0).length;
|
|
19596
20012
|
return /* @__PURE__ */ jsx17(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs15(Card, { children: [
|
|
19597
20013
|
head,
|
|
19598
|
-
/* @__PURE__ */ jsx17(Text11, { style:
|
|
20014
|
+
/* @__PURE__ */ jsx17(Text11, { style: s6.subtitle, children: "PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW" }),
|
|
19599
20015
|
groups.map((g, gi) => {
|
|
19600
20016
|
var _a2;
|
|
19601
20017
|
return /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
19602
|
-
g.heading ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20018
|
+
g.heading ? /* @__PURE__ */ jsx17(Text11, { style: s6.group, children: g.heading }) : null,
|
|
19603
20019
|
g.items.map((a) => {
|
|
19604
20020
|
var _a3, _b2;
|
|
19605
20021
|
const n = (_a3 = qty[a.id]) != null ? _a3 : 0;
|
|
19606
20022
|
const group = fieldGroups[a.id];
|
|
19607
20023
|
const desc = a.description ? htmlToPlainText(a.description) : "";
|
|
19608
|
-
return /* @__PURE__ */ jsxs15(View14, { style:
|
|
19609
|
-
/* @__PURE__ */ jsxs15(View14, { style:
|
|
19610
|
-
/* @__PURE__ */ jsxs15(View14, { style:
|
|
19611
|
-
/* @__PURE__ */ jsxs15(Text11, { style:
|
|
20024
|
+
return /* @__PURE__ */ jsxs15(View14, { style: s6.item, children: [
|
|
20025
|
+
/* @__PURE__ */ jsxs15(View14, { style: s6.row, children: [
|
|
20026
|
+
/* @__PURE__ */ jsxs15(View14, { style: s6.info, children: [
|
|
20027
|
+
/* @__PURE__ */ jsxs15(Text11, { style: s6.name, children: [
|
|
19612
20028
|
a.name,
|
|
19613
|
-
a.required ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20029
|
+
a.required ? /* @__PURE__ */ jsx17(Text11, { style: s6.req, children: " \xB7 required" }) : null
|
|
19614
20030
|
] }),
|
|
19615
|
-
/* @__PURE__ */ jsxs15(Text11, { style:
|
|
20031
|
+
/* @__PURE__ */ jsxs15(Text11, { style: s6.price, children: [
|
|
19616
20032
|
money2(a.currency, a.price),
|
|
19617
|
-
a.feeIncluded ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20033
|
+
a.feeIncluded ? /* @__PURE__ */ jsx17(Text11, { style: s6.priceNote, children: " incl. fees" }) : null
|
|
19618
20034
|
] }),
|
|
19619
|
-
desc ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20035
|
+
desc ? /* @__PURE__ */ jsx17(Text11, { style: s6.desc, children: desc }) : null
|
|
19620
20036
|
] }),
|
|
19621
|
-
soldOut(a) ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20037
|
+
soldOut(a) ? /* @__PURE__ */ jsx17(Text11, { style: s6.soldOut, children: "Sold out" }) : /* @__PURE__ */ jsx17(
|
|
19622
20038
|
QuantitySelect,
|
|
19623
20039
|
{
|
|
19624
20040
|
value: n,
|
|
@@ -19628,7 +20044,7 @@ var AddOns = ({
|
|
|
19628
20044
|
}
|
|
19629
20045
|
)
|
|
19630
20046
|
] }),
|
|
19631
|
-
n > 0 && group ? /* @__PURE__ */ jsx17(View14, { style:
|
|
20047
|
+
n > 0 && group ? /* @__PURE__ */ jsx17(View14, { style: s6.fields, children: /* @__PURE__ */ jsx17(
|
|
19632
20048
|
CustomFieldGroupFields,
|
|
19633
20049
|
{
|
|
19634
20050
|
group,
|
|
@@ -19762,7 +20178,7 @@ var Bundles = ({
|
|
|
19762
20178
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
19763
20179
|
const checkout = useCheckoutContext();
|
|
19764
20180
|
const theme = useTheme();
|
|
19765
|
-
const
|
|
20181
|
+
const s6 = useBundleStyles(theme);
|
|
19766
20182
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
19767
20183
|
const flow = hooks_exports.useBundleFlow(rnConfirmer, eventId, {
|
|
19768
20184
|
claimCard: claimCardField,
|
|
@@ -19778,7 +20194,7 @@ var Bundles = ({
|
|
|
19778
20194
|
onPurchased
|
|
19779
20195
|
});
|
|
19780
20196
|
if (flow.view === "loading") {
|
|
19781
|
-
return /* @__PURE__ */ jsx18(Card, { children: /* @__PURE__ */ jsx18(View15, { style:
|
|
20197
|
+
return /* @__PURE__ */ jsx18(Card, { children: /* @__PURE__ */ jsx18(View15, { style: s6.loader, children: /* @__PURE__ */ jsx18(Loader, {}) }) });
|
|
19782
20198
|
}
|
|
19783
20199
|
if (flow.view === "catalogError") {
|
|
19784
20200
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
@@ -19796,11 +20212,11 @@ var Bundles = ({
|
|
|
19796
20212
|
] });
|
|
19797
20213
|
}
|
|
19798
20214
|
if (flow.view === "hidden") return null;
|
|
19799
|
-
const title = /* @__PURE__ */ jsx18(Text12, { style:
|
|
20215
|
+
const title = /* @__PURE__ */ jsx18(Text12, { style: s6.heading, children: heading != null ? heading : t("bundles.heading") });
|
|
19800
20216
|
if (flow.view === "redirecting") {
|
|
19801
20217
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19802
20218
|
title,
|
|
19803
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20219
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.redirecting") }),
|
|
19804
20220
|
/* @__PURE__ */ jsx18(Loader, {})
|
|
19805
20221
|
] });
|
|
19806
20222
|
}
|
|
@@ -19808,10 +20224,10 @@ var Bundles = ({
|
|
|
19808
20224
|
const { result: result2 } = flow;
|
|
19809
20225
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19810
20226
|
title,
|
|
19811
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19812
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19813
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19814
|
-
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20227
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.done.title") }),
|
|
20228
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: result2.pending ? t("bundles.done.pending") : result2.email ? t("bundles.done.email", { email: result2.email }) : t("bundles.done.emailUnknown") }),
|
|
20229
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.done.order", { orderHash: result2.orderHash }) }),
|
|
20230
|
+
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
19815
20231
|
/* @__PURE__ */ jsx18(
|
|
19816
20232
|
Button,
|
|
19817
20233
|
{
|
|
@@ -19828,8 +20244,8 @@ var Bundles = ({
|
|
|
19828
20244
|
const amount = money3(flow.payAmount.currency || flow.currency, flow.payAmount.amount);
|
|
19829
20245
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19830
20246
|
title,
|
|
19831
|
-
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19832
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20247
|
+
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
20248
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.buyerHeading") }),
|
|
19833
20249
|
/* @__PURE__ */ jsx18(Field, { label: t("bundles.firstName"), children: /* @__PURE__ */ jsx18(
|
|
19834
20250
|
Input,
|
|
19835
20251
|
{
|
|
@@ -19859,8 +20275,8 @@ var Bundles = ({
|
|
|
19859
20275
|
}
|
|
19860
20276
|
) }),
|
|
19861
20277
|
flow.slots.length > 0 ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19862
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19863
|
-
!flow.namesRequired ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20278
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.holdersHeading") }),
|
|
20279
|
+
!flow.namesRequired ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.holdersOptional") }) : null,
|
|
19864
20280
|
flow.slots.map((slot) => {
|
|
19865
20281
|
var _a2, _b2;
|
|
19866
20282
|
const value6 = flow.holderValue(slot);
|
|
@@ -19891,17 +20307,17 @@ var Bundles = ({
|
|
|
19891
20307
|
})
|
|
19892
20308
|
] }) : null,
|
|
19893
20309
|
flow.problems.map((key4) => /* @__PURE__ */ jsx18(ErrorText, { children: t(key4) }, key4)),
|
|
19894
|
-
flow.awaitingCard ? /* @__PURE__ */ jsxs16(View15, { style:
|
|
19895
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20310
|
+
flow.awaitingCard ? /* @__PURE__ */ jsxs16(View15, { style: s6.card, children: [
|
|
20311
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.cardHeading") }),
|
|
19896
20312
|
flow.cardElsewhere ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19897
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20313
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.payingElsewhere") }),
|
|
19898
20314
|
/* @__PURE__ */ jsx18(Button, { variant: "ghost", onPress: flow.payHere, children: t("bundles.payHere") })
|
|
19899
20315
|
] }) : flow.cardFailed ? /* @__PURE__ */ jsx18(Button, { variant: "ghost", onPress: flow.retryCard, children: t("bundles.retryCard") }) : flow.cardReady && visible ? /* @__PURE__ */ jsx18(CardInput, { owner: flow.cardOwner, visible }) : /* @__PURE__ */ jsx18(Loader, {})
|
|
19900
20316
|
] }) : null,
|
|
19901
|
-
flow.stillSaving ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19902
|
-
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19903
|
-
flow.waitingForTickets ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19904
|
-
flow.waitingForBundle ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20317
|
+
flow.stillSaving ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
20318
|
+
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20319
|
+
flow.waitingForTickets ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.waitTickets") }) : null,
|
|
20320
|
+
flow.waitingForBundle ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t((_g = flow.gatewayWait) != null ? _g : "bundles.waitOtherBundle") }) : null,
|
|
19905
20321
|
/* @__PURE__ */ jsx18(
|
|
19906
20322
|
Button,
|
|
19907
20323
|
{
|
|
@@ -19936,13 +20352,13 @@ var Bundles = ({
|
|
|
19936
20352
|
const ticketsInCart = checkout.selections.length > 0;
|
|
19937
20353
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19938
20354
|
title,
|
|
19939
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19940
|
-
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20355
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.subtitle") }),
|
|
20356
|
+
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
19941
20357
|
flow.view === "heldOrder" ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19942
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20358
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.heldOrder") }),
|
|
19943
20359
|
flow.error ? /* @__PURE__ */ jsx18(ErrorText, { children: t(flow.error) }) : null,
|
|
19944
|
-
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19945
|
-
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20360
|
+
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20361
|
+
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
19946
20362
|
/* @__PURE__ */ jsx18(
|
|
19947
20363
|
Button,
|
|
19948
20364
|
{
|
|
@@ -19967,18 +20383,18 @@ var Bundles = ({
|
|
|
19967
20383
|
const stock = bundleAvailabilityCopy(bundle);
|
|
19968
20384
|
const contents = bundleContentsLine(bundle);
|
|
19969
20385
|
const desc = htmlToPlainText((_a2 = bundle.description) != null ? _a2 : "");
|
|
19970
|
-
return /* @__PURE__ */ jsxs16(View15, { style: [
|
|
19971
|
-
/* @__PURE__ */ jsxs16(View15, { style:
|
|
19972
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19973
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19974
|
-
contents ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19975
|
-
bundle.bookingFee > 0 && /* @__PURE__ */ jsx18(Text12, { style:
|
|
20386
|
+
return /* @__PURE__ */ jsxs16(View15, { style: [s6.item, { borderTopColor: theme.border }], children: [
|
|
20387
|
+
/* @__PURE__ */ jsxs16(View15, { style: s6.info, children: [
|
|
20388
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.name, children: bundle.name }),
|
|
20389
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.price, children: money3(bundle.currency, bundle.price) }),
|
|
20390
|
+
contents ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.includes", { contents }) }) : null,
|
|
20391
|
+
bundle.bookingFee > 0 && /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.bookingFee", {
|
|
19976
20392
|
amount: money3(bundle.currency, bundle.bookingFee)
|
|
19977
20393
|
}) }),
|
|
19978
|
-
desc ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19979
|
-
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ jsx18(Text12, { style: [
|
|
20394
|
+
desc ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: desc }) : null,
|
|
20395
|
+
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ jsx18(Text12, { style: [s6.muted, s6.stock], children: t(stock.key, stock.values) }) : null
|
|
19980
20396
|
] }),
|
|
19981
|
-
range.max === 0 ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20397
|
+
range.max === 0 ? /* @__PURE__ */ jsx18(Text12, { style: s6.soldOut, children: t("bundles.soldOut") }) : /* @__PURE__ */ jsx18(
|
|
19982
20398
|
QuantitySelect,
|
|
19983
20399
|
{
|
|
19984
20400
|
label: t("bundles.quantity", { name: bundle.name }),
|
|
@@ -19990,8 +20406,8 @@ var Bundles = ({
|
|
|
19990
20406
|
)
|
|
19991
20407
|
] }, bundle.id);
|
|
19992
20408
|
}),
|
|
19993
|
-
anySelected ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19994
|
-
anySelected && ticketsInCart ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20409
|
+
anySelected ? /* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.total", { amount: money3(flow.currency, flow.total) }) }) : null,
|
|
20410
|
+
anySelected && ticketsInCart ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.boughtSeparately") }) : null,
|
|
19995
20411
|
/* @__PURE__ */ jsx18(Button, { onPress: flow.continueToDetails, disabled: !anySelected, children: t("bundles.continue") })
|
|
19996
20412
|
] });
|
|
19997
20413
|
};
|
|
@@ -20050,10 +20466,10 @@ var useBundleStyles = (theme) => useMemo25(
|
|
|
20050
20466
|
// src/sections/BillingInfo.tsx
|
|
20051
20467
|
import {
|
|
20052
20468
|
Fragment as Fragment10,
|
|
20053
|
-
useEffect as
|
|
20469
|
+
useEffect as useEffect24,
|
|
20054
20470
|
useMemo as useMemo26,
|
|
20055
|
-
useRef as
|
|
20056
|
-
useState as
|
|
20471
|
+
useRef as useRef25,
|
|
20472
|
+
useState as useState35
|
|
20057
20473
|
} from "react";
|
|
20058
20474
|
import { Linking as Linking3, Pressable as Pressable10, StyleSheet as StyleSheet17, Text as Text14, View as View20 } from "react-native";
|
|
20059
20475
|
|
|
@@ -20162,11 +20578,11 @@ var styles4 = StyleSheet15.create({
|
|
|
20162
20578
|
});
|
|
20163
20579
|
|
|
20164
20580
|
// src/sections/billing/PhoneIdentity.tsx
|
|
20165
|
-
import { useState as
|
|
20581
|
+
import { useState as useState34 } from "react";
|
|
20166
20582
|
import { Text as Text13, View as View18 } from "react-native";
|
|
20167
20583
|
|
|
20168
20584
|
// src/auth/TwoFactorForm.tsx
|
|
20169
|
-
import { useState as
|
|
20585
|
+
import { useState as useState33 } from "react";
|
|
20170
20586
|
import { View as View17 } from "react-native";
|
|
20171
20587
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
20172
20588
|
var TwoFactorForm = ({
|
|
@@ -20179,7 +20595,7 @@ var TwoFactorForm = ({
|
|
|
20179
20595
|
onSendSms,
|
|
20180
20596
|
onCancel
|
|
20181
20597
|
}) => {
|
|
20182
|
-
const [code, setCode] =
|
|
20598
|
+
const [code, setCode] = useState33("");
|
|
20183
20599
|
return /* @__PURE__ */ jsxs18(View17, { style: { gap: 14 }, children: [
|
|
20184
20600
|
/* @__PURE__ */ jsx20(MutedText, { children: "Enter the six-digit code from your authenticator app or registered phone to complete sign-in." }),
|
|
20185
20601
|
error ? /* @__PURE__ */ jsx20(ErrorText, { children: error }) : null,
|
|
@@ -20231,8 +20647,8 @@ var PhoneIdentity = ({
|
|
|
20231
20647
|
}) => {
|
|
20232
20648
|
var _a;
|
|
20233
20649
|
const identity = hooks_exports.useCheckoutPhoneIdentity(options);
|
|
20234
|
-
const [code, setCode] =
|
|
20235
|
-
const [emailInstead, setEmailInstead] =
|
|
20650
|
+
const [code, setCode] = useState34("");
|
|
20651
|
+
const [emailInstead, setEmailInstead] = useState34(false);
|
|
20236
20652
|
if (emailInstead) return null;
|
|
20237
20653
|
if (identity.challenge)
|
|
20238
20654
|
return /* @__PURE__ */ jsx21(
|
|
@@ -20367,7 +20783,7 @@ var BuyerField = ({
|
|
|
20367
20783
|
error,
|
|
20368
20784
|
onChange
|
|
20369
20785
|
}) => {
|
|
20370
|
-
const
|
|
20786
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
20371
20787
|
if (field.kind === "gender") {
|
|
20372
20788
|
const options = [
|
|
20373
20789
|
{ label: "Male", value: "M" },
|
|
@@ -20380,7 +20796,7 @@ var BuyerField = ({
|
|
|
20380
20796
|
onChange,
|
|
20381
20797
|
options,
|
|
20382
20798
|
placeholder: "\u2014 select \u2014",
|
|
20383
|
-
invalid
|
|
20799
|
+
invalid: invalid2
|
|
20384
20800
|
}
|
|
20385
20801
|
) });
|
|
20386
20802
|
}
|
|
@@ -20396,7 +20812,7 @@ var BuyerField = ({
|
|
|
20396
20812
|
onChange,
|
|
20397
20813
|
options,
|
|
20398
20814
|
placeholder: "\u2014 select \u2014",
|
|
20399
|
-
invalid
|
|
20815
|
+
invalid: invalid2
|
|
20400
20816
|
}
|
|
20401
20817
|
) });
|
|
20402
20818
|
}
|
|
@@ -20407,7 +20823,7 @@ var BuyerField = ({
|
|
|
20407
20823
|
value: value6,
|
|
20408
20824
|
onChangeText: onChange,
|
|
20409
20825
|
autoCapitalize: "none",
|
|
20410
|
-
invalid
|
|
20826
|
+
invalid: invalid2
|
|
20411
20827
|
}
|
|
20412
20828
|
) });
|
|
20413
20829
|
};
|
|
@@ -20539,21 +20955,21 @@ var BillingInfo = ({
|
|
|
20539
20955
|
const checkout = useCheckoutContext();
|
|
20540
20956
|
const validation = useCheckoutValidation();
|
|
20541
20957
|
const theme = useTheme();
|
|
20542
|
-
const
|
|
20958
|
+
const s6 = useStyles4(theme);
|
|
20543
20959
|
const profile = hooks_exports.useCheckoutBuyerProfile(eventId);
|
|
20544
20960
|
const event = hooks_exports.useEvent(eventId);
|
|
20545
20961
|
const combined = !onContinue;
|
|
20546
|
-
const [billing, setBilling] =
|
|
20962
|
+
const [billing, setBilling] = useState35(
|
|
20547
20963
|
() => billingDraftFrom(checkout.billing)
|
|
20548
20964
|
);
|
|
20549
|
-
const [dataCapture, setDataCapture] =
|
|
20965
|
+
const [dataCapture, setDataCapture] = useState35(
|
|
20550
20966
|
(_b = (_a = checkout.billing) == null ? void 0 : _a.dataCapture) != null ? _b : {}
|
|
20551
20967
|
);
|
|
20552
|
-
const [holders, setHolders] =
|
|
20968
|
+
const [holders, setHolders] = useState35(
|
|
20553
20969
|
() => holderDraftsFrom(checkout.holders, checkout.backfilledHolderIndexes)
|
|
20554
20970
|
);
|
|
20555
|
-
const [consent, setConsent] =
|
|
20556
|
-
const [dob, setDob] =
|
|
20971
|
+
const [consent, setConsent] = useState35({ ttfOptIn: false, brandOptIn: false });
|
|
20972
|
+
const [dob, setDob] = useState35(() => billingDobIso(checkout.billing));
|
|
20557
20973
|
hooks_exports.useOnOrderReleased(checkout.orderFixed, () => {
|
|
20558
20974
|
var _a2, _b2;
|
|
20559
20975
|
setBilling(billingDraftFrom(checkout.billing));
|
|
@@ -20564,14 +20980,14 @@ var BillingInfo = ({
|
|
|
20564
20980
|
(prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
|
|
20565
20981
|
);
|
|
20566
20982
|
});
|
|
20567
|
-
const restoredHolders =
|
|
20983
|
+
const restoredHolders = useRef25(checkout.holders);
|
|
20568
20984
|
hooks_exports.useOnEventChange(checkout.eventId, () => {
|
|
20569
20985
|
restoredHolders.current = [];
|
|
20570
20986
|
setHolders([]);
|
|
20571
20987
|
setDataCapture({});
|
|
20572
20988
|
});
|
|
20573
|
-
const profileSeeded =
|
|
20574
|
-
const countryDefaultApplied =
|
|
20989
|
+
const profileSeeded = useRef25(false);
|
|
20990
|
+
const countryDefaultApplied = useRef25(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
|
|
20575
20991
|
const {
|
|
20576
20992
|
setBilling: commitBilling,
|
|
20577
20993
|
setHolders: commitHolders,
|
|
@@ -20605,7 +21021,7 @@ var BillingInfo = ({
|
|
|
20605
21021
|
}
|
|
20606
21022
|
return out;
|
|
20607
21023
|
}, [checkout.breakdown, checkout.selections]);
|
|
20608
|
-
|
|
21024
|
+
useEffect24(() => {
|
|
20609
21025
|
const p = profile.data;
|
|
20610
21026
|
if (!p || profileSeeded.current) return;
|
|
20611
21027
|
profileSeeded.current = true;
|
|
@@ -20628,10 +21044,10 @@ var BillingInfo = ({
|
|
|
20628
21044
|
return keys.every((k) => next[k] === prev[k]) ? prev : next;
|
|
20629
21045
|
});
|
|
20630
21046
|
}, [profile.data, checkout.isLoggedIn]);
|
|
20631
|
-
|
|
21047
|
+
useEffect24(() => {
|
|
20632
21048
|
setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
|
|
20633
21049
|
}, [slots]);
|
|
20634
|
-
|
|
21050
|
+
useEffect24(() => {
|
|
20635
21051
|
if (!showHolders) return;
|
|
20636
21052
|
setHolders(
|
|
20637
21053
|
(prev) => holderDraftsMirroringBuyer(prev, {
|
|
@@ -20642,7 +21058,7 @@ var BillingInfo = ({
|
|
|
20642
21058
|
})
|
|
20643
21059
|
);
|
|
20644
21060
|
}, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
|
|
20645
|
-
|
|
21061
|
+
useEffect24(() => {
|
|
20646
21062
|
const email = billing.email.trim();
|
|
20647
21063
|
if (checkout.isLoggedIn || !isEmail(email)) return;
|
|
20648
21064
|
const t = setTimeout(
|
|
@@ -20667,7 +21083,7 @@ var BillingInfo = ({
|
|
|
20667
21083
|
var _a2;
|
|
20668
21084
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
20669
21085
|
}, [statesQuery.data]);
|
|
20670
|
-
|
|
21086
|
+
useEffect24(() => {
|
|
20671
21087
|
var _a2, _b2, _c2, _d2;
|
|
20672
21088
|
if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
|
|
20673
21089
|
return;
|
|
@@ -20706,7 +21122,7 @@ var BillingInfo = ({
|
|
|
20706
21122
|
event.isLoading,
|
|
20707
21123
|
(_e = event.data) == null ? void 0 : _e.countryCode
|
|
20708
21124
|
]);
|
|
20709
|
-
|
|
21125
|
+
useEffect24(() => {
|
|
20710
21126
|
var _a2;
|
|
20711
21127
|
if (!billing.countryId) return;
|
|
20712
21128
|
const country = countries.find(
|
|
@@ -20717,7 +21133,7 @@ var BillingInfo = ({
|
|
|
20717
21133
|
setBilling((current4) => ({ ...current4, countryCode }));
|
|
20718
21134
|
}
|
|
20719
21135
|
}, [billing.countryId, billing.countryCode, countries]);
|
|
20720
|
-
|
|
21136
|
+
useEffect24(() => {
|
|
20721
21137
|
if (!billing.stateId) return;
|
|
20722
21138
|
const state = states.find(
|
|
20723
21139
|
(candidate) => String(candidate.id) === String(billing.stateId)
|
|
@@ -20777,7 +21193,7 @@ var BillingInfo = ({
|
|
|
20777
21193
|
});
|
|
20778
21194
|
if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
|
|
20779
21195
|
};
|
|
20780
|
-
|
|
21196
|
+
useEffect24(() => {
|
|
20781
21197
|
if (combined) commit();
|
|
20782
21198
|
}, [
|
|
20783
21199
|
combined,
|
|
@@ -20811,9 +21227,9 @@ var BillingInfo = ({
|
|
|
20811
21227
|
return /* @__PURE__ */ jsxs21(FrozenFields, { frozen: checkout.orderFixed, children: [
|
|
20812
21228
|
/* @__PURE__ */ jsxs21(Card, { children: [
|
|
20813
21229
|
/* @__PURE__ */ jsx24(SectionHeader, { title: heading }),
|
|
20814
|
-
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ jsxs21(View20, { style:
|
|
20815
|
-
/* @__PURE__ */ jsx24(Text14, { style:
|
|
20816
|
-
/* @__PURE__ */ jsx24(Pressable10, { onPress: () => onLogin(), children: /* @__PURE__ */ jsx24(Text14, { style:
|
|
21230
|
+
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ jsxs21(View20, { style: s6.loginRow, children: [
|
|
21231
|
+
/* @__PURE__ */ jsx24(Text14, { style: s6.note, children: "Login & skip ahead:" }),
|
|
21232
|
+
/* @__PURE__ */ jsx24(Pressable10, { onPress: () => onLogin(), children: /* @__PURE__ */ jsx24(Text14, { style: s6.link, children: "Login" }) })
|
|
20817
21233
|
] }) : null,
|
|
20818
21234
|
gates.phoneFirstCheckout && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(
|
|
20819
21235
|
BillingPhoneIdentity,
|
|
@@ -20824,8 +21240,8 @@ var BillingInfo = ({
|
|
|
20824
21240
|
whatsappAvailable: Boolean(gates.phoneFirstWhatsapp)
|
|
20825
21241
|
}
|
|
20826
21242
|
) : null,
|
|
20827
|
-
/* @__PURE__ */ jsxs21(View20, { style:
|
|
20828
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21243
|
+
/* @__PURE__ */ jsxs21(View20, { style: s6.row, children: [
|
|
21244
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(Field, { error: fieldError("First name", "First name is required."), children: /* @__PURE__ */ jsx24(
|
|
20829
21245
|
Input,
|
|
20830
21246
|
{
|
|
20831
21247
|
placeholder: "First name *",
|
|
@@ -20835,7 +21251,7 @@ var BillingInfo = ({
|
|
|
20835
21251
|
invalid: Boolean(fieldError("First name"))
|
|
20836
21252
|
}
|
|
20837
21253
|
) }) }),
|
|
20838
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21254
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(Field, { error: fieldError("Last name", "Last name is required."), children: /* @__PURE__ */ jsx24(
|
|
20839
21255
|
Input,
|
|
20840
21256
|
{
|
|
20841
21257
|
placeholder: "Last name *",
|
|
@@ -20846,8 +21262,8 @@ var BillingInfo = ({
|
|
|
20846
21262
|
}
|
|
20847
21263
|
) }) })
|
|
20848
21264
|
] }),
|
|
20849
|
-
/* @__PURE__ */ jsxs21(View20, { style:
|
|
20850
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21265
|
+
/* @__PURE__ */ jsxs21(View20, { style: s6.row, children: [
|
|
21266
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(
|
|
20851
21267
|
Field,
|
|
20852
21268
|
{
|
|
20853
21269
|
error: fieldError("Valid email address", "Enter a valid email address."),
|
|
@@ -20864,7 +21280,7 @@ var BillingInfo = ({
|
|
|
20864
21280
|
)
|
|
20865
21281
|
}
|
|
20866
21282
|
) }),
|
|
20867
|
-
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(View20, { style:
|
|
21283
|
+
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(
|
|
20868
21284
|
Field,
|
|
20869
21285
|
{
|
|
20870
21286
|
error: fieldError(
|
|
@@ -20886,10 +21302,10 @@ var BillingInfo = ({
|
|
|
20886
21302
|
) }) : null
|
|
20887
21303
|
] }),
|
|
20888
21304
|
!showValidation && requireEmailConfirmation && billing.confirmEmail && billing.confirmEmail.trim().toLowerCase() !== billing.email.trim().toLowerCase() ? /* @__PURE__ */ jsx24(ErrorText, { children: "The email addresses do not match." }) : null,
|
|
20889
|
-
emailTaken ? /* @__PURE__ */ jsxs21(Text14, { style:
|
|
21305
|
+
emailTaken ? /* @__PURE__ */ jsxs21(Text14, { style: s6.note, children: [
|
|
20890
21306
|
"This email is already registered.",
|
|
20891
21307
|
" ",
|
|
20892
|
-
onLogin ? /* @__PURE__ */ jsx24(Text14, { style:
|
|
21308
|
+
onLogin ? /* @__PURE__ */ jsx24(Text14, { style: s6.link, onPress: () => onLogin(billing.email), children: "Log in to autofill your details" }) : "Log in to autofill your details."
|
|
20893
21309
|
] }) : null,
|
|
20894
21310
|
checkout.buyerFields.map((f) => {
|
|
20895
21311
|
var _a2;
|
|
@@ -20953,7 +21369,7 @@ var BillingInfo = ({
|
|
|
20953
21369
|
}
|
|
20954
21370
|
) : null,
|
|
20955
21371
|
orderGroups.map((g) => /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
20956
|
-
g.label ? /* @__PURE__ */ jsx24(Text14, { style:
|
|
21372
|
+
g.label ? /* @__PURE__ */ jsx24(Text14, { style: s6.sectionLabel, children: g.label }) : null,
|
|
20957
21373
|
renderGroupFields(
|
|
20958
21374
|
g,
|
|
20959
21375
|
dataCapture,
|
|
@@ -20968,21 +21384,21 @@ var BillingInfo = ({
|
|
|
20968
21384
|
label: brandOptInLabel
|
|
20969
21385
|
}
|
|
20970
21386
|
) : null,
|
|
20971
|
-
privacyPolicy ? /* @__PURE__ */ jsxs21(View20, { style:
|
|
21387
|
+
privacyPolicy ? /* @__PURE__ */ jsxs21(View20, { style: s6.consent, children: [
|
|
20972
21388
|
/* @__PURE__ */ jsx24(
|
|
20973
21389
|
Checkbox,
|
|
20974
21390
|
{
|
|
20975
21391
|
checked: consent.ttfOptIn,
|
|
20976
21392
|
onChange: (ttfOptIn) => setConsent((c) => ({ ...c, ttfOptIn })),
|
|
20977
21393
|
invalid: privacyInvalid,
|
|
20978
|
-
label: /* @__PURE__ */ jsxs21(Text14, { style:
|
|
21394
|
+
label: /* @__PURE__ */ jsxs21(Text14, { style: s6.consentLabel, children: [
|
|
20979
21395
|
"I have read and agree to ",
|
|
20980
21396
|
privacyPolicy.brandName,
|
|
20981
21397
|
" ",
|
|
20982
21398
|
/* @__PURE__ */ jsx24(
|
|
20983
21399
|
Text14,
|
|
20984
21400
|
{
|
|
20985
|
-
style:
|
|
21401
|
+
style: s6.link,
|
|
20986
21402
|
onPress: () => Linking3.openURL(privacyPolicy.url).catch(() => void 0),
|
|
20987
21403
|
children: privacyPolicy.linkLabel || "Privacy Policy."
|
|
20988
21404
|
}
|
|
@@ -21207,7 +21623,7 @@ var Accommodation = ({ eventId }) => {
|
|
|
21207
21623
|
var styles7 = StyleSheet19.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
|
|
21208
21624
|
|
|
21209
21625
|
// src/sections/Payment.tsx
|
|
21210
|
-
import { useEffect as
|
|
21626
|
+
import { useEffect as useEffect25, useMemo as useMemo27, useState as useState36 } from "react";
|
|
21211
21627
|
import { Platform as Platform2, View as View23 } from "react-native";
|
|
21212
21628
|
import { isPlatformPaySupported } from "@stripe/stripe-react-native";
|
|
21213
21629
|
import { Fragment as Fragment12, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -21261,14 +21677,14 @@ var Payment = ({
|
|
|
21261
21677
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
21262
21678
|
const bundleStarting = bundleWait !== null;
|
|
21263
21679
|
const validation = useCheckoutValidation();
|
|
21264
|
-
const [error, setError] =
|
|
21680
|
+
const [error, setError] = useState36("");
|
|
21265
21681
|
const paymentMethods = hooks_exports.useCheckoutPaymentMethods(checkout.store);
|
|
21266
21682
|
const methods = (_a = paymentMethods.data) != null ? _a : null;
|
|
21267
|
-
const [selected, setSelected] =
|
|
21268
|
-
const [extras, setExtras] =
|
|
21269
|
-
const [useSavedCard, setUseSavedCard] =
|
|
21270
|
-
const [nativeWalletSupported, setNativeWalletSupported] =
|
|
21271
|
-
|
|
21683
|
+
const [selected, setSelected] = useState36("");
|
|
21684
|
+
const [extras, setExtras] = useState36({});
|
|
21685
|
+
const [useSavedCard, setUseSavedCard] = useState36(true);
|
|
21686
|
+
const [nativeWalletSupported, setNativeWalletSupported] = useState36(false);
|
|
21687
|
+
useEffect25(() => {
|
|
21272
21688
|
let mounted = true;
|
|
21273
21689
|
const env = getConfig().env;
|
|
21274
21690
|
isPlatformPaySupported({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
|
|
@@ -21341,7 +21757,7 @@ var Payment = ({
|
|
|
21341
21757
|
nativeWalletSupported,
|
|
21342
21758
|
offersOxxo
|
|
21343
21759
|
]);
|
|
21344
|
-
|
|
21760
|
+
useEffect25(() => {
|
|
21345
21761
|
if (options.length && !options.some((o) => o.value === selected))
|
|
21346
21762
|
setSelected(options[0].value);
|
|
21347
21763
|
}, [options, selected]);
|
|
@@ -21467,7 +21883,7 @@ var Payment = ({
|
|
|
21467
21883
|
selected,
|
|
21468
21884
|
onSelect: setSelected,
|
|
21469
21885
|
extraValues: extras,
|
|
21470
|
-
onExtraChange: (v, patch2) => setExtras((
|
|
21886
|
+
onExtraChange: (v, patch2) => setExtras((s6) => ({ ...s6, [v]: { ...s6[v], ...patch2 } })),
|
|
21471
21887
|
showValidation: validation.attempt > 0,
|
|
21472
21888
|
inputSlotFor: isPlanSelected ? reuseSavedCard ? void 0 : "paymentPlan" : cardValue,
|
|
21473
21889
|
children: paymentInput
|
|
@@ -21476,18 +21892,18 @@ var Payment = ({
|
|
|
21476
21892
|
] }) : null,
|
|
21477
21893
|
conditions.map((c) => {
|
|
21478
21894
|
var _a2, _b2;
|
|
21479
|
-
const
|
|
21895
|
+
const invalid2 = validation.attempt > 0 && c.isRequired && !((_a2 = checkout.acceptedConditions) == null ? void 0 : _a2[c.id]);
|
|
21480
21896
|
return /* @__PURE__ */ jsxs24(View23, { style: { gap: 4 }, children: [
|
|
21481
21897
|
/* @__PURE__ */ jsx27(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsx27(
|
|
21482
21898
|
Checkbox,
|
|
21483
21899
|
{
|
|
21484
21900
|
checked: Boolean((_b2 = checkout.acceptedConditions) == null ? void 0 : _b2[c.id]),
|
|
21485
|
-
invalid,
|
|
21901
|
+
invalid: invalid2,
|
|
21486
21902
|
onChange: (next) => checkout.acceptCondition(c.id, next),
|
|
21487
21903
|
label: `${conditionText(c.content || c.name)}${c.isRequired ? " *" : ""}`
|
|
21488
21904
|
}
|
|
21489
21905
|
) }),
|
|
21490
|
-
|
|
21906
|
+
invalid2 ? /* @__PURE__ */ jsx27(ErrorText, { children: "You must accept this condition to continue." }) : null
|
|
21491
21907
|
] }, c.id);
|
|
21492
21908
|
})
|
|
21493
21909
|
] }),
|
|
@@ -21511,11 +21927,11 @@ var Payment = ({
|
|
|
21511
21927
|
};
|
|
21512
21928
|
|
|
21513
21929
|
// src/sections/WaiverSigning.tsx
|
|
21514
|
-
import { useMemo as useMemo29, useRef as
|
|
21930
|
+
import { useMemo as useMemo29, useRef as useRef27, useState as useState38 } from "react";
|
|
21515
21931
|
import { Pressable as Pressable12, ScrollView, StyleSheet as StyleSheet21, Text as Text17, View as View25 } from "react-native";
|
|
21516
21932
|
|
|
21517
21933
|
// src/ui/SignaturePad.tsx
|
|
21518
|
-
import { memo, useEffect as
|
|
21934
|
+
import { memo, useEffect as useEffect26, useMemo as useMemo28, useRef as useRef26, useState as useState37 } from "react";
|
|
21519
21935
|
import { PanResponder, Pressable as Pressable11, StyleSheet as StyleSheet20, Text as Text16, View as View24 } from "react-native";
|
|
21520
21936
|
import { Fragment as Fragment13, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
21521
21937
|
var LINE_WIDTH = 2.5;
|
|
@@ -21561,13 +21977,13 @@ var SignaturePad = ({
|
|
|
21561
21977
|
disabled
|
|
21562
21978
|
}) => {
|
|
21563
21979
|
const theme = useTheme();
|
|
21564
|
-
const strokesRef =
|
|
21565
|
-
const [, setFrame] =
|
|
21566
|
-
const frameRequest =
|
|
21567
|
-
const size =
|
|
21568
|
-
const report =
|
|
21980
|
+
const strokesRef = useRef26([]);
|
|
21981
|
+
const [, setFrame] = useState37(0);
|
|
21982
|
+
const frameRequest = useRef26(null);
|
|
21983
|
+
const size = useRef26({ width: 0, height: PAD_HEIGHT });
|
|
21984
|
+
const report = useRef26(onChange);
|
|
21569
21985
|
report.current = onChange;
|
|
21570
|
-
const disabledRef =
|
|
21986
|
+
const disabledRef = useRef26(disabled);
|
|
21571
21987
|
disabledRef.current = disabled;
|
|
21572
21988
|
const render = () => {
|
|
21573
21989
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
@@ -21578,7 +21994,7 @@ var SignaturePad = ({
|
|
|
21578
21994
|
if (frameRequest.current !== null) return;
|
|
21579
21995
|
frameRequest.current = requestAnimationFrame(render);
|
|
21580
21996
|
};
|
|
21581
|
-
|
|
21997
|
+
useEffect26(
|
|
21582
21998
|
() => () => {
|
|
21583
21999
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
21584
22000
|
},
|
|
@@ -21696,7 +22112,7 @@ var WaiverSigning = ({
|
|
|
21696
22112
|
const checkout = useCheckoutContext();
|
|
21697
22113
|
const locked = Boolean(checkout.orderFixed);
|
|
21698
22114
|
const theme = useTheme();
|
|
21699
|
-
const
|
|
22115
|
+
const s6 = useWaiverStyles(theme);
|
|
21700
22116
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
21701
22117
|
const waiver = checkout.waiver;
|
|
21702
22118
|
const signing = hooks_exports.useWaiverSigning(
|
|
@@ -21705,8 +22121,8 @@ var WaiverSigning = ({
|
|
|
21705
22121
|
checkout.setWaiverSignature,
|
|
21706
22122
|
checkout.holdWaiverSigning
|
|
21707
22123
|
);
|
|
21708
|
-
const [open, setOpen] =
|
|
21709
|
-
const [reloading, setReloading] =
|
|
22124
|
+
const [open, setOpen] = useState38({});
|
|
22125
|
+
const [reloading, setReloading] = useState38(false);
|
|
21710
22126
|
if ((_a = checkout.unavailableDetails) == null ? void 0 : _a.includes("waiver")) {
|
|
21711
22127
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21712
22128
|
/* @__PURE__ */ jsx29(SectionHeader, { title: t("waivers.heading") }),
|
|
@@ -21730,16 +22146,16 @@ var WaiverSigning = ({
|
|
|
21730
22146
|
if (!waiverSignableAtCheckout(waiver)) {
|
|
21731
22147
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21732
22148
|
/* @__PURE__ */ jsx29(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
21733
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22149
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.muted, children: t("waivers.signLater") })
|
|
21734
22150
|
] });
|
|
21735
22151
|
}
|
|
21736
22152
|
const signatures = (_b = checkout.waiverSignatures) != null ? _b : {};
|
|
21737
22153
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21738
22154
|
/* @__PURE__ */ jsx29(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
21739
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22155
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.muted, children: t(
|
|
21740
22156
|
waiver.checkoutMode === "required" ? "waivers.intro.required" : "waivers.intro.optional"
|
|
21741
22157
|
) }),
|
|
21742
|
-
/* @__PURE__ */ jsx29(ScrollView, { style: [
|
|
22158
|
+
/* @__PURE__ */ jsx29(ScrollView, { style: [s6.textBox, { borderColor: theme.border }], nestedScrollEnabled: true, children: /* @__PURE__ */ jsx29(Text17, { style: s6.body, children: htmlToPlainText(waiver.bodyHtml) }) }),
|
|
21743
22159
|
tickets.map((ticket) => {
|
|
21744
22160
|
const signed = signatures[ticket.index];
|
|
21745
22161
|
const formKey = waiverTicketFormKey(checkout.eventId, waiver, ticket);
|
|
@@ -21752,10 +22168,10 @@ var WaiverSigning = ({
|
|
|
21752
22168
|
number: ticket.ticketNumber,
|
|
21753
22169
|
name: ticket.holderName
|
|
21754
22170
|
}) : t("waivers.ticket", { number: ticket.ticketNumber });
|
|
21755
|
-
return /* @__PURE__ */ jsxs26(View25, { style: [
|
|
21756
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
21757
|
-
signed ? /* @__PURE__ */ jsxs26(View25, { style:
|
|
21758
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22171
|
+
return /* @__PURE__ */ jsxs26(View25, { style: [s6.ticket, { borderTopColor: theme.border }], children: [
|
|
22172
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.strong, children: label }),
|
|
22173
|
+
signed ? /* @__PURE__ */ jsxs26(View25, { style: s6.row, children: [
|
|
22174
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(
|
|
21759
22175
|
!forHolder ? "waivers.signedForSomeoneElse" : signed.signerRole === "guardian" ? "waivers.signedByGuardian" : "waivers.signedBy",
|
|
21760
22176
|
{ name: signed.signerName }
|
|
21761
22177
|
) }),
|
|
@@ -21799,25 +22215,25 @@ var WaiverSigning = ({
|
|
|
21799
22215
|
var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error, onSign }) => {
|
|
21800
22216
|
var _a, _b, _c, _d;
|
|
21801
22217
|
const theme = useTheme();
|
|
21802
|
-
const
|
|
21803
|
-
const [heldDraft, setDraft] =
|
|
22218
|
+
const s6 = useWaiverStyles(theme);
|
|
22219
|
+
const [heldDraft, setDraft] = useState38(
|
|
21804
22220
|
() => emptyWaiverDraft(
|
|
21805
22221
|
{ firstName: ticket.holderFirstName, lastName: ticket.holderLastName },
|
|
21806
22222
|
{ signatureMethods: methods }
|
|
21807
22223
|
)
|
|
21808
22224
|
);
|
|
21809
22225
|
const draft = draftWithAllowedMethod(heldDraft, methods);
|
|
21810
|
-
const [problems, setProblems] =
|
|
21811
|
-
const [pressed, setPressed] =
|
|
22226
|
+
const [problems, setProblems] = useState38([]);
|
|
22227
|
+
const [pressed, setPressed] = useState38(false);
|
|
21812
22228
|
const frozen = busy || locked;
|
|
21813
|
-
const draftRef =
|
|
22229
|
+
const draftRef = useRef27(draft);
|
|
21814
22230
|
draftRef.current = draft;
|
|
21815
22231
|
const patch2 = (next) => {
|
|
21816
22232
|
if (!frozen) setDraft((d) => ({ ...d, ...next }));
|
|
21817
22233
|
};
|
|
21818
22234
|
const guardian = draft.signerRole === "guardian";
|
|
21819
|
-
return /* @__PURE__ */ jsxs26(View25, { style:
|
|
21820
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22235
|
+
return /* @__PURE__ */ jsxs26(View25, { style: s6.form, children: [
|
|
22236
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.strong, children: t("waivers.role.label") }),
|
|
21821
22237
|
["holder", "guardian"].map((role) => /* @__PURE__ */ jsxs26(
|
|
21822
22238
|
Pressable12,
|
|
21823
22239
|
{
|
|
@@ -21833,19 +22249,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21833
22249
|
} : { signerRole: role }
|
|
21834
22250
|
);
|
|
21835
22251
|
},
|
|
21836
|
-
style:
|
|
22252
|
+
style: s6.choice,
|
|
21837
22253
|
children: [
|
|
21838
22254
|
/* @__PURE__ */ jsx29(
|
|
21839
22255
|
View25,
|
|
21840
22256
|
{
|
|
21841
22257
|
style: [
|
|
21842
|
-
|
|
22258
|
+
s6.radio,
|
|
21843
22259
|
{ borderColor: theme.accent },
|
|
21844
22260
|
draft.signerRole === role && { backgroundColor: theme.accent }
|
|
21845
22261
|
]
|
|
21846
22262
|
}
|
|
21847
22263
|
),
|
|
21848
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22264
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(`waivers.role.${role}`) })
|
|
21849
22265
|
]
|
|
21850
22266
|
},
|
|
21851
22267
|
role
|
|
@@ -21905,19 +22321,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21905
22321
|
accessibilityState: { selected: draft.method === method },
|
|
21906
22322
|
disabled: frozen,
|
|
21907
22323
|
onPress: () => setDraft((d) => withSignatureMethod(d, method)),
|
|
21908
|
-
style:
|
|
22324
|
+
style: s6.choice,
|
|
21909
22325
|
children: [
|
|
21910
22326
|
/* @__PURE__ */ jsx29(
|
|
21911
22327
|
View25,
|
|
21912
22328
|
{
|
|
21913
22329
|
style: [
|
|
21914
|
-
|
|
22330
|
+
s6.radio,
|
|
21915
22331
|
{ borderColor: theme.accent },
|
|
21916
22332
|
draft.method === method && { backgroundColor: theme.accent }
|
|
21917
22333
|
]
|
|
21918
22334
|
}
|
|
21919
22335
|
),
|
|
21920
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22336
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(`waivers.method.${method}`) })
|
|
21921
22337
|
]
|
|
21922
22338
|
},
|
|
21923
22339
|
method
|
|
@@ -21949,7 +22365,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21949
22365
|
),
|
|
21950
22366
|
problems.map((key4) => /* @__PURE__ */ jsx29(ErrorText, { children: t(key4) }, key4)),
|
|
21951
22367
|
error ? /* @__PURE__ */ jsx29(ErrorText, { children: error }) : null,
|
|
21952
|
-
busy && !pressed ? /* @__PURE__ */ jsx29(Text17, { style:
|
|
22368
|
+
busy && !pressed ? /* @__PURE__ */ jsx29(Text17, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
21953
22369
|
/* @__PURE__ */ jsx29(
|
|
21954
22370
|
Button,
|
|
21955
22371
|
{
|
|
@@ -22009,7 +22425,7 @@ var useWaiverStyles = (theme) => useMemo29(
|
|
|
22009
22425
|
);
|
|
22010
22426
|
|
|
22011
22427
|
// src/sections/IDVerification.tsx
|
|
22012
|
-
import { useState as
|
|
22428
|
+
import { useState as useState39 } from "react";
|
|
22013
22429
|
import { Linking as Linking4 } from "react-native";
|
|
22014
22430
|
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
22015
22431
|
var MESSAGE = {
|
|
@@ -22024,8 +22440,8 @@ var IDVerification = () => {
|
|
|
22024
22440
|
const checkout = useCheckoutContext();
|
|
22025
22441
|
const theme = useTheme();
|
|
22026
22442
|
const order = checkout.order;
|
|
22027
|
-
const [phase, setPhase] =
|
|
22028
|
-
const [error, setError] =
|
|
22443
|
+
const [phase, setPhase] = useState39("idle");
|
|
22444
|
+
const [error, setError] = useState39("");
|
|
22029
22445
|
if (!(order == null ? void 0 : order.needIdVerification)) return null;
|
|
22030
22446
|
const done = phase === "verified";
|
|
22031
22447
|
const running = phase === "starting" || phase === "polling";
|
|
@@ -22052,7 +22468,7 @@ var IDVerification = () => {
|
|
|
22052
22468
|
};
|
|
22053
22469
|
|
|
22054
22470
|
// src/sections/Confirmation.tsx
|
|
22055
|
-
import { useState as
|
|
22471
|
+
import { useState as useState40 } from "react";
|
|
22056
22472
|
import { Linking as Linking5, Share, StyleSheet as StyleSheet22, Text as Text18, View as View26 } from "react-native";
|
|
22057
22473
|
import Clipboard from "@react-native-clipboard/clipboard";
|
|
22058
22474
|
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
@@ -22066,7 +22482,7 @@ var Confirmation = ({
|
|
|
22066
22482
|
const checkout = useCheckoutContext();
|
|
22067
22483
|
const theme = useTheme();
|
|
22068
22484
|
const order = checkout.order;
|
|
22069
|
-
const [copied, setCopied] =
|
|
22485
|
+
const [copied, setCopied] = useState40(false);
|
|
22070
22486
|
if (!order) return null;
|
|
22071
22487
|
const pending2 = order.pending;
|
|
22072
22488
|
const url2 = shareUrl != null ? shareUrl : "";
|
|
@@ -22120,12 +22536,12 @@ var styles9 = StyleSheet22.create({
|
|
|
22120
22536
|
});
|
|
22121
22537
|
|
|
22122
22538
|
// src/sections/Rewards.tsx
|
|
22123
|
-
import { useEffect as
|
|
22539
|
+
import { useEffect as useEffect27, useState as useState42 } from "react";
|
|
22124
22540
|
import { Alert, Image as Image2, Share as Share2, StyleSheet as StyleSheet25, View as View29 } from "react-native";
|
|
22125
22541
|
import Clipboard2 from "@react-native-clipboard/clipboard";
|
|
22126
22542
|
|
|
22127
22543
|
// src/sections/rewards/RewardsLadder.tsx
|
|
22128
|
-
import { useState as
|
|
22544
|
+
import { useState as useState41 } from "react";
|
|
22129
22545
|
import { StyleSheet as StyleSheet23, View as View27 } from "react-native";
|
|
22130
22546
|
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
22131
22547
|
var AWARD_STATUS_KEYS = {
|
|
@@ -22135,9 +22551,9 @@ var AWARD_STATUS_KEYS = {
|
|
|
22135
22551
|
cancelled: "rewards.awards.cancelled"
|
|
22136
22552
|
};
|
|
22137
22553
|
var DeliveryDetails = ({ fields, translate: t, onSubmit }) => {
|
|
22138
|
-
const [values2, setValues] =
|
|
22139
|
-
const [saving, setSaving] =
|
|
22140
|
-
const [failure, setFailure] =
|
|
22554
|
+
const [values2, setValues] = useState41({});
|
|
22555
|
+
const [saving, setSaving] = useState41(false);
|
|
22556
|
+
const [failure, setFailure] = useState41("");
|
|
22141
22557
|
return /* @__PURE__ */ jsxs29(View27, { style: { gap: 10 }, children: [
|
|
22142
22558
|
fields.map((field) => {
|
|
22143
22559
|
var _a;
|
|
@@ -22328,10 +22744,10 @@ var RewardsView = ({
|
|
|
22328
22744
|
var _a, _b, _c, _d, _e, _f;
|
|
22329
22745
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22330
22746
|
const { rewards, failure, busy, hash } = flow;
|
|
22331
|
-
const [packName, setPackName] =
|
|
22332
|
-
const [packCode, setPackCode] =
|
|
22333
|
-
const [copied, setCopied] =
|
|
22334
|
-
|
|
22747
|
+
const [packName, setPackName] = useState42("");
|
|
22748
|
+
const [packCode, setPackCode] = useState42("");
|
|
22749
|
+
const [copied, setCopied] = useState42(false);
|
|
22750
|
+
useEffect27(() => {
|
|
22335
22751
|
setCopied(false);
|
|
22336
22752
|
}, [rewards == null ? void 0 : rewards.share_link]);
|
|
22337
22753
|
if (!rewards)
|
|
@@ -22534,17 +22950,17 @@ var TicketChange = ({
|
|
|
22534
22950
|
}) => {
|
|
22535
22951
|
var _a;
|
|
22536
22952
|
const theme = useTheme();
|
|
22537
|
-
const
|
|
22953
|
+
const s6 = useChangeStyles(theme);
|
|
22538
22954
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22539
22955
|
const open = openUrl != null ? openUrl : rnPorts.openUrl;
|
|
22540
22956
|
const flow = hooks_exports.useTicketChange({ ticketHash, orderHash }, open);
|
|
22541
22957
|
const options = flow.query.data;
|
|
22542
22958
|
const signInLine = flow.signInRequired ? /* @__PURE__ */ jsxs32(View30, { children: [
|
|
22543
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22959
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.signInRequired") }),
|
|
22544
22960
|
onLogin ? /* @__PURE__ */ jsx35(Button, { onPress: () => flow.signIn(onLogin), children: t("ticketChange.signIn") }) : null
|
|
22545
22961
|
] }) : null;
|
|
22546
22962
|
const label = (option) => option.eventName ? t("ticketChange.otherEvent", { name: option.name, event: option.eventName }) : option.name;
|
|
22547
|
-
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
22963
|
+
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null;
|
|
22548
22964
|
const refreshLine = flow.refreshFailed ? /* @__PURE__ */ jsxs32(View30, { children: [
|
|
22549
22965
|
/* @__PURE__ */ jsx35(ErrorText, { children: t("ticketChange.refreshFailed") }),
|
|
22550
22966
|
/* @__PURE__ */ jsx35(
|
|
@@ -22565,7 +22981,7 @@ var TicketChange = ({
|
|
|
22565
22981
|
if (flow.paymentInProgress) {
|
|
22566
22982
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22567
22983
|
header,
|
|
22568
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22984
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.paymentInProgress") }),
|
|
22569
22985
|
flow.canContinuePayment ? /* @__PURE__ */ jsx35(Button, { onPress: flow.continuePayment, children: t("ticketChange.continuePayment") }) : null,
|
|
22570
22986
|
flow.notice ? /* @__PURE__ */ jsx35(ErrorText, { children: t(flow.notice) }) : null,
|
|
22571
22987
|
/* @__PURE__ */ jsx35(Button, { variant: "ghost", onPress: flow.startAgain, children: t("ticketChange.startAgain") })
|
|
@@ -22574,7 +22990,7 @@ var TicketChange = ({
|
|
|
22574
22990
|
if (flow.query.isLoading) {
|
|
22575
22991
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22576
22992
|
header,
|
|
22577
|
-
/* @__PURE__ */ jsx35(View30, { style:
|
|
22993
|
+
/* @__PURE__ */ jsx35(View30, { style: s6.loader, children: /* @__PURE__ */ jsx35(Loader, {}) })
|
|
22578
22994
|
] });
|
|
22579
22995
|
}
|
|
22580
22996
|
if (!options) {
|
|
@@ -22588,8 +23004,8 @@ var TicketChange = ({
|
|
|
22588
23004
|
const priceText = flow.result && "priceText" in flow.result ? flow.result.priceText : "";
|
|
22589
23005
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22590
23006
|
header,
|
|
22591
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22592
|
-
priceText ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23007
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: "text" in done ? done.text : t(done.key, done.values) }),
|
|
23008
|
+
priceText ? /* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: priceText }) : null,
|
|
22593
23009
|
/* @__PURE__ */ jsx35(
|
|
22594
23010
|
Button,
|
|
22595
23011
|
{
|
|
@@ -22602,7 +23018,7 @@ var TicketChange = ({
|
|
|
22602
23018
|
if (flow.step === "payment" && ((_a = flow.result) == null ? void 0 : _a.status) === "payment_required") {
|
|
22603
23019
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22604
23020
|
header,
|
|
22605
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23021
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.payment") }),
|
|
22606
23022
|
/* @__PURE__ */ jsx35(Button, { disabled: !flow.can.pay, onPress: flow.openPayment, children: t("ticketChange.paymentOpen") }),
|
|
22607
23023
|
flow.notice ? /* @__PURE__ */ jsx35(ErrorText, { children: t(flow.notice) }) : null,
|
|
22608
23024
|
/* @__PURE__ */ jsx35(
|
|
@@ -22622,12 +23038,12 @@ var TicketChange = ({
|
|
|
22622
23038
|
const submitting = flow.step === "submitting";
|
|
22623
23039
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22624
23040
|
header,
|
|
22625
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22626
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23041
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: t("ticketChange.confirmTitle", { name: label(option) }) }),
|
|
23042
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.price, children: option.priceText }),
|
|
22627
23043
|
(() => {
|
|
22628
23044
|
const charge = ticketChangeCharge(option);
|
|
22629
23045
|
if (!charge || option.fee <= 0) return null;
|
|
22630
|
-
return /* @__PURE__ */ jsxs32(Text19, { style:
|
|
23046
|
+
return /* @__PURE__ */ jsxs32(Text19, { style: s6.muted, children: [
|
|
22631
23047
|
t("ticketChange.fee", {
|
|
22632
23048
|
amount: `${option.currency} ${option.fee.toFixed(2)}`
|
|
22633
23049
|
}),
|
|
@@ -22638,10 +23054,10 @@ var TicketChange = ({
|
|
|
22638
23054
|
] });
|
|
22639
23055
|
})(),
|
|
22640
23056
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22641
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23057
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
22642
23058
|
signInLine,
|
|
22643
|
-
flow.alternatives.length > 0 ? /* @__PURE__ */ jsxs32(View30, { style:
|
|
22644
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23059
|
+
flow.alternatives.length > 0 ? /* @__PURE__ */ jsxs32(View30, { style: s6.slots, children: [
|
|
23060
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.slotFull") }),
|
|
22645
23061
|
flow.alternatives.map((slot) => /* @__PURE__ */ jsx35(
|
|
22646
23062
|
Button,
|
|
22647
23063
|
{
|
|
@@ -22668,7 +23084,7 @@ var TicketChange = ({
|
|
|
22668
23084
|
if (ticketChangeView(options) === "choose") {
|
|
22669
23085
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22670
23086
|
header,
|
|
22671
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23087
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.choose") }),
|
|
22672
23088
|
options.options.map((option) => /* @__PURE__ */ jsxs32(
|
|
22673
23089
|
Pressable13,
|
|
22674
23090
|
{
|
|
@@ -22677,31 +23093,31 @@ var TicketChange = ({
|
|
|
22677
23093
|
disabled: !flow.can.select,
|
|
22678
23094
|
onPress: () => flow.select(option),
|
|
22679
23095
|
style: [
|
|
22680
|
-
|
|
23096
|
+
s6.option,
|
|
22681
23097
|
{ borderColor: theme.border },
|
|
22682
|
-
!flow.can.select &&
|
|
23098
|
+
!flow.can.select && s6.optionDisabled
|
|
22683
23099
|
],
|
|
22684
23100
|
children: [
|
|
22685
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22686
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23101
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: label(option) }),
|
|
23102
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.price, children: option.priceText })
|
|
22687
23103
|
]
|
|
22688
23104
|
},
|
|
22689
23105
|
option.ticketTypeId
|
|
22690
23106
|
)),
|
|
22691
23107
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22692
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23108
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
22693
23109
|
signInLine
|
|
22694
23110
|
] });
|
|
22695
23111
|
}
|
|
22696
23112
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22697
23113
|
header,
|
|
22698
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23114
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: options.message || t("ticketChange.closed") }),
|
|
22699
23115
|
options.sellInstead.available ? /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
22700
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23116
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.sellInsteadNote") }),
|
|
22701
23117
|
/* @__PURE__ */ jsx35(Button, { disabled: !flow.can.sellInstead, onPress: flow.sellInstead, children: t("ticketChange.sellInstead") })
|
|
22702
23118
|
] }) : null,
|
|
22703
|
-
options.waitlistOptions.map((wait) => /* @__PURE__ */ jsx35(View30, { style:
|
|
22704
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23119
|
+
options.waitlistOptions.map((wait) => /* @__PURE__ */ jsx35(View30, { style: s6.waitlist, children: wait.entry ? /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
23120
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(
|
|
22705
23121
|
wait.entry.status === "offered" ? "ticketChange.waitlist.offered" : "ticketChange.waitlist.waiting",
|
|
22706
23122
|
{ name: wait.name }
|
|
22707
23123
|
) }),
|
|
@@ -22726,7 +23142,7 @@ var TicketChange = ({
|
|
|
22726
23142
|
}
|
|
22727
23143
|
) }, wait.ticketTypeId)),
|
|
22728
23144
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22729
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23145
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null
|
|
22730
23146
|
] });
|
|
22731
23147
|
};
|
|
22732
23148
|
var useChangeStyles = (theme) => useMemo31(
|
|
@@ -22825,7 +23241,7 @@ var Trips = ({
|
|
|
22825
23241
|
};
|
|
22826
23242
|
|
|
22827
23243
|
// src/sections/EventDiscussionView.tsx
|
|
22828
|
-
import { useRef as
|
|
23244
|
+
import { useRef as useRef29, useState as useState44 } from "react";
|
|
22829
23245
|
import {
|
|
22830
23246
|
ActivityIndicator as ActivityIndicator4,
|
|
22831
23247
|
Alert as Alert2,
|
|
@@ -22843,7 +23259,7 @@ import {
|
|
|
22843
23259
|
} from "react-native";
|
|
22844
23260
|
|
|
22845
23261
|
// src/sections/discussion/CommentImages.tsx
|
|
22846
|
-
import { useEffect as
|
|
23262
|
+
import { useEffect as useEffect28, useState as useState43 } from "react";
|
|
22847
23263
|
import {
|
|
22848
23264
|
ActivityIndicator as ActivityIndicator3,
|
|
22849
23265
|
Image as Image3,
|
|
@@ -22922,8 +23338,8 @@ var CommentImages = ({
|
|
|
22922
23338
|
const t = useAccountT(locale);
|
|
22923
23339
|
const theme = useTheme();
|
|
22924
23340
|
const white = [s.white, { fontFamily: theme.fontFamily }];
|
|
22925
|
-
const [selected, setSelected] =
|
|
22926
|
-
|
|
23341
|
+
const [selected, setSelected] = useState43(null);
|
|
23342
|
+
useEffect28(() => {
|
|
22927
23343
|
if (selected === null) return;
|
|
22928
23344
|
onPreviewChange(true);
|
|
22929
23345
|
return () => onPreviewChange(false);
|
|
@@ -23179,7 +23595,7 @@ var s = StyleSheet27.create({
|
|
|
23179
23595
|
});
|
|
23180
23596
|
|
|
23181
23597
|
// src/sections/discussion/SwipeReply.tsx
|
|
23182
|
-
import { useMemo as useMemo33, useRef as
|
|
23598
|
+
import { useMemo as useMemo33, useRef as useRef28 } from "react";
|
|
23183
23599
|
import { Animated, PanResponder as PanResponder2, StyleSheet as StyleSheet28, Text as Text21, View as View33 } from "react-native";
|
|
23184
23600
|
import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
23185
23601
|
var SwipeReply = ({
|
|
@@ -23190,7 +23606,7 @@ var SwipeReply = ({
|
|
|
23190
23606
|
children
|
|
23191
23607
|
}) => {
|
|
23192
23608
|
const theme = useTheme();
|
|
23193
|
-
const offset =
|
|
23609
|
+
const offset = useRef28(new Animated.Value(0)).current;
|
|
23194
23610
|
const gesture = useMemo33(() => {
|
|
23195
23611
|
const reset = () => Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
|
|
23196
23612
|
return PanResponder2.create({
|
|
@@ -23271,17 +23687,17 @@ var EventDiscussionBody = ({
|
|
|
23271
23687
|
var _a, _b, _c;
|
|
23272
23688
|
const theme = useTheme();
|
|
23273
23689
|
const t = useAccountT(locale);
|
|
23274
|
-
const list2 =
|
|
23275
|
-
const firstContent =
|
|
23276
|
-
const [actions, setActions] =
|
|
23277
|
-
const [reporting, setReporting] =
|
|
23278
|
-
const [moderating, setModerating] =
|
|
23279
|
-
const [reason, setReason] =
|
|
23280
|
-
const [blocksVisible, setBlocksVisible] =
|
|
23281
|
-
const [pickerError, setPickerError] =
|
|
23282
|
-
const [imageOpen, setImageOpen] =
|
|
23283
|
-
const [pickerBusy, setPickerBusy] =
|
|
23284
|
-
const picking =
|
|
23690
|
+
const list2 = useRef29(null);
|
|
23691
|
+
const firstContent = useRef29(true);
|
|
23692
|
+
const [actions, setActions] = useState44(null);
|
|
23693
|
+
const [reporting, setReporting] = useState44(null);
|
|
23694
|
+
const [moderating, setModerating] = useState44(null);
|
|
23695
|
+
const [reason, setReason] = useState44("");
|
|
23696
|
+
const [blocksVisible, setBlocksVisible] = useState44(false);
|
|
23697
|
+
const [pickerError, setPickerError] = useState44("");
|
|
23698
|
+
const [imageOpen, setImageOpen] = useState44(false);
|
|
23699
|
+
const [pickerBusy, setPickerBusy] = useState44(false);
|
|
23700
|
+
const picking = useRef29(false);
|
|
23285
23701
|
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
23286
23702
|
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
23287
23703
|
const closeActions = (work) => {
|
|
@@ -23583,7 +23999,7 @@ var EventDiscussionBody = ({
|
|
|
23583
23999
|
accessibilityRole: "link",
|
|
23584
24000
|
style: s3.support,
|
|
23585
24001
|
onPress: () => {
|
|
23586
|
-
if (/^https
|
|
24002
|
+
if (/^(https:\/\/|mailto:)/i.test(d.supportUrl))
|
|
23587
24003
|
void Linking6.openURL(d.supportUrl).catch(() => void 0);
|
|
23588
24004
|
},
|
|
23589
24005
|
children: /* @__PURE__ */ jsx39(Text22, { style: [muted, s3.date], children: "Need help? Contact support" })
|
|
@@ -24291,7 +24707,7 @@ var styles13 = StyleSheet30.create({
|
|
|
24291
24707
|
});
|
|
24292
24708
|
|
|
24293
24709
|
// src/sections/Streaming.tsx
|
|
24294
|
-
import { useMemo as useMemo34, useRef as
|
|
24710
|
+
import { useMemo as useMemo34, useRef as useRef30, useState as useState45 } from "react";
|
|
24295
24711
|
import {
|
|
24296
24712
|
ActivityIndicator as ActivityIndicator5,
|
|
24297
24713
|
Alert as Alert4,
|
|
@@ -24326,8 +24742,8 @@ var StreamingView = ({
|
|
|
24326
24742
|
);
|
|
24327
24743
|
const session = hooks_exports.useAuthSession();
|
|
24328
24744
|
const assertOwner = hooks_exports.useSessionAction();
|
|
24329
|
-
const pendingBrowser =
|
|
24330
|
-
const [stored, setStored] =
|
|
24745
|
+
const pendingBrowser = useRef30({ scope: session.sessionScope, locked: false });
|
|
24746
|
+
const [stored, setStored] = useState45({
|
|
24331
24747
|
scope: session.sessionScope,
|
|
24332
24748
|
busy: false,
|
|
24333
24749
|
error: ""
|
|
@@ -24489,14 +24905,264 @@ var s4 = StyleSheet31.create({
|
|
|
24489
24905
|
note: { fontSize: 14, lineHeight: 20, marginTop: 24 }
|
|
24490
24906
|
});
|
|
24491
24907
|
|
|
24908
|
+
// src/sections/AccountDeletion.tsx
|
|
24909
|
+
import { useMemo as useMemo35 } from "react";
|
|
24910
|
+
import {
|
|
24911
|
+
ActivityIndicator as ActivityIndicator6,
|
|
24912
|
+
Alert as Alert5,
|
|
24913
|
+
Linking as Linking7,
|
|
24914
|
+
Pressable as Pressable19,
|
|
24915
|
+
StyleSheet as StyleSheet32,
|
|
24916
|
+
Text as Text25,
|
|
24917
|
+
TextInput as TextInput3,
|
|
24918
|
+
View as View41
|
|
24919
|
+
} from "react-native";
|
|
24920
|
+
import { Fragment as Fragment24, jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
24921
|
+
var AccountDeletion = (props) => {
|
|
24922
|
+
const deletion = hooks_exports.useAccountDeletion();
|
|
24923
|
+
return /* @__PURE__ */ jsx46(AccountDeletionView, { ...props, deletion });
|
|
24924
|
+
};
|
|
24925
|
+
var AccountDeletionView = ({
|
|
24926
|
+
deletion: flow,
|
|
24927
|
+
showHeader = true,
|
|
24928
|
+
showExplanation = true,
|
|
24929
|
+
onSignIn,
|
|
24930
|
+
onDone,
|
|
24931
|
+
onOpenTeam,
|
|
24932
|
+
locale,
|
|
24933
|
+
translate: translate2,
|
|
24934
|
+
theme: override,
|
|
24935
|
+
style
|
|
24936
|
+
}) => {
|
|
24937
|
+
const defaultT = useAccountT(locale);
|
|
24938
|
+
const t = translate2 != null ? translate2 : defaultT;
|
|
24939
|
+
const inherited = useTheme();
|
|
24940
|
+
const theme = useMemo35(
|
|
24941
|
+
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
24942
|
+
[inherited, override]
|
|
24943
|
+
);
|
|
24944
|
+
const assertOwner = hooks_exports.useSessionAction();
|
|
24945
|
+
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
24946
|
+
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
24947
|
+
const action = (label, execute, danger = false, disabled = flow.busy) => /* @__PURE__ */ jsx46(
|
|
24948
|
+
Pressable19,
|
|
24949
|
+
{
|
|
24950
|
+
accessibilityRole: "button",
|
|
24951
|
+
accessibilityState: { disabled, busy: flow.busy },
|
|
24952
|
+
disabled,
|
|
24953
|
+
onPress: () => {
|
|
24954
|
+
try {
|
|
24955
|
+
assertOwner();
|
|
24956
|
+
execute();
|
|
24957
|
+
} catch (e) {
|
|
24958
|
+
}
|
|
24959
|
+
},
|
|
24960
|
+
style: [
|
|
24961
|
+
s5.button,
|
|
24962
|
+
{ borderColor: danger ? theme.error : theme.accent },
|
|
24963
|
+
disabled && s5.disabled
|
|
24964
|
+
],
|
|
24965
|
+
children: /* @__PURE__ */ jsx46(Text25, { style: [text3, { color: danger ? theme.error : theme.accent }], children: t(label) })
|
|
24966
|
+
}
|
|
24967
|
+
);
|
|
24968
|
+
const openTeam = async (url2) => {
|
|
24969
|
+
try {
|
|
24970
|
+
assertOwner();
|
|
24971
|
+
await (onOpenTeam ? onOpenTeam(url2) : Linking7.openURL(url2));
|
|
24972
|
+
} catch (e) {
|
|
24973
|
+
try {
|
|
24974
|
+
assertOwner();
|
|
24975
|
+
Alert5.alert(
|
|
24976
|
+
t("Team settings"),
|
|
24977
|
+
t("Unable to open team settings. Please try again.")
|
|
24978
|
+
);
|
|
24979
|
+
} catch (e2) {
|
|
24980
|
+
}
|
|
24981
|
+
}
|
|
24982
|
+
};
|
|
24983
|
+
if (flow.deleted)
|
|
24984
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
24985
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.title, text3], children: t("Account deleted") }),
|
|
24986
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, text3], children: t("Your Ticket Fairy account has been closed. You are signed out.") }),
|
|
24987
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t("Financial and transaction records are retained where required.") }),
|
|
24988
|
+
onDone && action("Continue browsing", onDone, false, false)
|
|
24989
|
+
] });
|
|
24990
|
+
if (flow.confirmingAccount)
|
|
24991
|
+
return /* @__PURE__ */ jsx46(
|
|
24992
|
+
ActivityIndicator6,
|
|
24993
|
+
{
|
|
24994
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
24995
|
+
color: theme.accent
|
|
24996
|
+
}
|
|
24997
|
+
);
|
|
24998
|
+
if (!flow.signedIn)
|
|
24999
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25000
|
+
flow.error && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25001
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25002
|
+
action("Try again", () => void flow.retry())
|
|
25003
|
+
] }),
|
|
25004
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t("Sign in to review and delete your Ticket Fairy account.") }),
|
|
25005
|
+
onSignIn && action("Sign in", onSignIn, false, false)
|
|
25006
|
+
] });
|
|
25007
|
+
if (flow.query.isPending)
|
|
25008
|
+
return /* @__PURE__ */ jsx46(
|
|
25009
|
+
ActivityIndicator6,
|
|
25010
|
+
{
|
|
25011
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
25012
|
+
color: theme.accent
|
|
25013
|
+
}
|
|
25014
|
+
);
|
|
25015
|
+
if (!flow.status)
|
|
25016
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25017
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error || "Account deletion options could not load.") }),
|
|
25018
|
+
action("Try again", () => void flow.retry(), false, false)
|
|
25019
|
+
] });
|
|
25020
|
+
const status = flow.status;
|
|
25021
|
+
const password = status.verification === "password";
|
|
25022
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25023
|
+
showHeader && /* @__PURE__ */ jsx46(Text25, { style: [s5.title, text3], children: t("Delete account") }),
|
|
25024
|
+
showExplanation && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25025
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t(
|
|
25026
|
+
"This closes your Ticket Fairy account across the app, website and organiser dashboard."
|
|
25027
|
+
) }),
|
|
25028
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("What is removed") }),
|
|
25029
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25030
|
+
"Your personal profile, sign-in access, friends, saved preferences and the content you posted are removed or anonymised."
|
|
25031
|
+
) }),
|
|
25032
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("What is kept") }),
|
|
25033
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25034
|
+
"Financial and transaction records are retained where required. Deleting your account does not refund or cancel orders, and does not delete other ticket holders\u2019 details."
|
|
25035
|
+
) })
|
|
25036
|
+
] }),
|
|
25037
|
+
status.appleLinked && /* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25038
|
+
"If Ticket Fairy still appears in your Apple Account after deletion, remove its access there too."
|
|
25039
|
+
) }),
|
|
25040
|
+
status.blockers.length > 0 && /* @__PURE__ */ jsxs43(View41, { style: [s5.panel, { borderColor: theme.border }], children: [
|
|
25041
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("Before you delete your account") }),
|
|
25042
|
+
status.blockers.map((blocker) => {
|
|
25043
|
+
var _a;
|
|
25044
|
+
return /* @__PURE__ */ jsxs43(View41, { style: s5.container, children: [
|
|
25045
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t(blocker.message) }),
|
|
25046
|
+
(_a = blocker.brands) == null ? void 0 : _a.map(
|
|
25047
|
+
(brand2) => brand2.teamUrl ? /* @__PURE__ */ jsx46(
|
|
25048
|
+
Pressable19,
|
|
25049
|
+
{
|
|
25050
|
+
accessibilityRole: "link",
|
|
25051
|
+
disabled: flow.busy,
|
|
25052
|
+
onPress: () => {
|
|
25053
|
+
if (brand2.teamUrl) void openTeam(brand2.teamUrl);
|
|
25054
|
+
},
|
|
25055
|
+
style: s5.link,
|
|
25056
|
+
children: /* @__PURE__ */ jsx46(Text25, { style: { color: theme.accent, fontFamily: theme.fontFamily }, children: t("Open {{name}} team settings", { name: brand2.name }) })
|
|
25057
|
+
},
|
|
25058
|
+
brand2.id
|
|
25059
|
+
) : null
|
|
25060
|
+
)
|
|
25061
|
+
] }, blocker.code);
|
|
25062
|
+
}),
|
|
25063
|
+
action("Check again", () => void flow.retry())
|
|
25064
|
+
] }),
|
|
25065
|
+
!flow.isOpen && status.canDelete && action("Delete account", flow.open, true),
|
|
25066
|
+
flow.isOpen && /* @__PURE__ */ jsxs43(
|
|
25067
|
+
View41,
|
|
25068
|
+
{
|
|
25069
|
+
accessibilityLabel: t("Confirm account deletion"),
|
|
25070
|
+
style: [s5.panel, { borderColor: theme.border }],
|
|
25071
|
+
children: [
|
|
25072
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("Delete your account permanently?") }),
|
|
25073
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t("This cannot be undone. Confirm that you want to close this account.") }),
|
|
25074
|
+
!password && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25075
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t("We will email a deletion code to {{email}}.", {
|
|
25076
|
+
email: status.email
|
|
25077
|
+
}) }),
|
|
25078
|
+
action(
|
|
25079
|
+
flow.codeSent ? "Send a new code" : "Email deletion code",
|
|
25080
|
+
() => void flow.sendCode(locale),
|
|
25081
|
+
false,
|
|
25082
|
+
flow.busy || flow.retryAfter > 0
|
|
25083
|
+
),
|
|
25084
|
+
flow.codeSent && /* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("A code was sent to {{email}}. It expires in {{minutes}} minutes.", {
|
|
25085
|
+
email: flow.codeSent.email,
|
|
25086
|
+
minutes: flow.codeSent.expiresInMinutes
|
|
25087
|
+
}) })
|
|
25088
|
+
] }),
|
|
25089
|
+
flow.retryAfter > 0 && /* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("Try again in {{seconds}} seconds.", { seconds: flow.retryAfter }) }),
|
|
25090
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t(password ? "Current password" : "Deletion code") }),
|
|
25091
|
+
/* @__PURE__ */ jsx46(
|
|
25092
|
+
TextInput3,
|
|
25093
|
+
{
|
|
25094
|
+
accessibilityLabel: t(password ? "Current password" : "Deletion code"),
|
|
25095
|
+
value: flow.proof,
|
|
25096
|
+
onChangeText: flow.setProof,
|
|
25097
|
+
secureTextEntry: password,
|
|
25098
|
+
textContentType: password ? "password" : "oneTimeCode",
|
|
25099
|
+
autoComplete: password ? "current-password" : "one-time-code",
|
|
25100
|
+
keyboardType: password ? "default" : "number-pad",
|
|
25101
|
+
maxLength: password ? void 0 : 6,
|
|
25102
|
+
autoCapitalize: "none",
|
|
25103
|
+
autoCorrect: false,
|
|
25104
|
+
editable: !flow.busy,
|
|
25105
|
+
style: [
|
|
25106
|
+
s5.input,
|
|
25107
|
+
text3,
|
|
25108
|
+
{ borderColor: theme.border, backgroundColor: theme.background }
|
|
25109
|
+
]
|
|
25110
|
+
}
|
|
25111
|
+
),
|
|
25112
|
+
flow.error && /* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25113
|
+
flow.busy && /* @__PURE__ */ jsx46(
|
|
25114
|
+
ActivityIndicator6,
|
|
25115
|
+
{
|
|
25116
|
+
color: theme.accent,
|
|
25117
|
+
accessibilityLabel: t("Please wait\u2026")
|
|
25118
|
+
}
|
|
25119
|
+
),
|
|
25120
|
+
action("Keep account", flow.cancel),
|
|
25121
|
+
action(
|
|
25122
|
+
"Permanently delete account",
|
|
25123
|
+
() => void flow.confirm(),
|
|
25124
|
+
true,
|
|
25125
|
+
!flow.canConfirm
|
|
25126
|
+
)
|
|
25127
|
+
]
|
|
25128
|
+
}
|
|
25129
|
+
),
|
|
25130
|
+
!flow.isOpen && flow.error && /* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) })
|
|
25131
|
+
] });
|
|
25132
|
+
};
|
|
25133
|
+
var s5 = StyleSheet32.create({
|
|
25134
|
+
container: { gap: 12 },
|
|
25135
|
+
title: { fontSize: 22, fontWeight: "600", lineHeight: 28 },
|
|
25136
|
+
heading: { fontSize: 16, fontWeight: "600", lineHeight: 23 },
|
|
25137
|
+
body: { fontSize: 15, lineHeight: 22 },
|
|
25138
|
+
panel: {
|
|
25139
|
+
borderWidth: StyleSheet32.hairlineWidth,
|
|
25140
|
+
borderRadius: 16,
|
|
25141
|
+
padding: 16,
|
|
25142
|
+
gap: 12
|
|
25143
|
+
},
|
|
25144
|
+
button: {
|
|
25145
|
+
minHeight: 48,
|
|
25146
|
+
borderWidth: 1,
|
|
25147
|
+
borderRadius: 12,
|
|
25148
|
+
paddingVertical: 12,
|
|
25149
|
+
paddingHorizontal: 16,
|
|
25150
|
+
alignItems: "center",
|
|
25151
|
+
justifyContent: "center"
|
|
25152
|
+
},
|
|
25153
|
+
input: { minHeight: 48, borderWidth: 1, borderRadius: 10, padding: 12, fontSize: 16 },
|
|
25154
|
+
link: { minHeight: 44, justifyContent: "center" },
|
|
25155
|
+
disabled: { opacity: 0.5 }
|
|
25156
|
+
});
|
|
25157
|
+
|
|
24492
25158
|
// src/auth/AuthModal.tsx
|
|
24493
25159
|
import { useCallback as useCallback14 } from "react";
|
|
24494
|
-
import { Image as Image6, Modal as Modal6, Pressable as
|
|
25160
|
+
import { Image as Image6, Modal as Modal6, Pressable as Pressable24, ScrollView as ScrollView3, StyleSheet as StyleSheet37, Text as Text29, View as View47 } from "react-native";
|
|
24495
25161
|
|
|
24496
25162
|
// src/auth/ForgotPasswordForm.tsx
|
|
24497
|
-
import { useEffect as
|
|
24498
|
-
import { Pressable as
|
|
24499
|
-
import { jsx as
|
|
25163
|
+
import { useEffect as useEffect29, useState as useState46 } from "react";
|
|
25164
|
+
import { Pressable as Pressable20, StyleSheet as StyleSheet33, Text as Text26, View as View42 } from "react-native";
|
|
25165
|
+
import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
24500
25166
|
var ForgotPasswordForm = ({
|
|
24501
25167
|
initialEmail = "",
|
|
24502
25168
|
errors = {},
|
|
@@ -24508,21 +25174,21 @@ var ForgotPasswordForm = ({
|
|
|
24508
25174
|
onFieldChange
|
|
24509
25175
|
}) => {
|
|
24510
25176
|
const theme = useTheme();
|
|
24511
|
-
const [email, setEmail] =
|
|
24512
|
-
|
|
25177
|
+
const [email, setEmail] = useState46(initialEmail);
|
|
25178
|
+
useEffect29(() => {
|
|
24513
25179
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
24514
25180
|
}, [email, initialEmail]);
|
|
24515
25181
|
const submit = () => void onSubmit(email);
|
|
24516
25182
|
if (successMessage) {
|
|
24517
|
-
return /* @__PURE__ */
|
|
24518
|
-
/* @__PURE__ */
|
|
24519
|
-
/* @__PURE__ */
|
|
25183
|
+
return /* @__PURE__ */ jsxs44(View42, { style: styles14.form, children: [
|
|
25184
|
+
/* @__PURE__ */ jsx47(Text26, { style: [styles14.success, { color: theme.success }], children: successMessage }),
|
|
25185
|
+
/* @__PURE__ */ jsx47(Button, { onPress: () => onBackToLogin(email), children: "Back to log in" })
|
|
24520
25186
|
] });
|
|
24521
25187
|
}
|
|
24522
|
-
return /* @__PURE__ */
|
|
24523
|
-
/* @__PURE__ */
|
|
24524
|
-
error ? /* @__PURE__ */
|
|
24525
|
-
/* @__PURE__ */
|
|
25188
|
+
return /* @__PURE__ */ jsxs44(View42, { style: styles14.form, children: [
|
|
25189
|
+
/* @__PURE__ */ jsx47(MutedText, { children: "Enter your email and we\u2019ll send you instructions to reset your password." }),
|
|
25190
|
+
error ? /* @__PURE__ */ jsx47(ErrorText, { children: error }) : null,
|
|
25191
|
+
/* @__PURE__ */ jsx47(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx47(
|
|
24526
25192
|
Input,
|
|
24527
25193
|
{
|
|
24528
25194
|
value: email,
|
|
@@ -24536,20 +25202,20 @@ var ForgotPasswordForm = ({
|
|
|
24536
25202
|
invalid: Boolean(errors.email)
|
|
24537
25203
|
}
|
|
24538
25204
|
) }),
|
|
24539
|
-
/* @__PURE__ */
|
|
24540
|
-
/* @__PURE__ */
|
|
24541
|
-
|
|
25205
|
+
/* @__PURE__ */ jsx47(Button, { onPress: submit, loading, children: "Send reset instructions" }),
|
|
25206
|
+
/* @__PURE__ */ jsx47(
|
|
25207
|
+
Pressable20,
|
|
24542
25208
|
{
|
|
24543
25209
|
accessibilityRole: "button",
|
|
24544
25210
|
onPress: () => onBackToLogin(email),
|
|
24545
25211
|
hitSlop: 8,
|
|
24546
25212
|
style: styles14.link,
|
|
24547
|
-
children: /* @__PURE__ */
|
|
25213
|
+
children: /* @__PURE__ */ jsx47(Text26, { style: [styles14.linkText, { color: theme.accent }], children: "Back to log in" })
|
|
24548
25214
|
}
|
|
24549
25215
|
)
|
|
24550
25216
|
] });
|
|
24551
25217
|
};
|
|
24552
|
-
var styles14 =
|
|
25218
|
+
var styles14 = StyleSheet33.create({
|
|
24553
25219
|
form: { gap: 14 },
|
|
24554
25220
|
success: { fontSize: 15, fontWeight: "600" },
|
|
24555
25221
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
@@ -24557,19 +25223,19 @@ var styles14 = StyleSheet32.create({
|
|
|
24557
25223
|
});
|
|
24558
25224
|
|
|
24559
25225
|
// src/auth/LoginForm.tsx
|
|
24560
|
-
import { useEffect as
|
|
24561
|
-
import { Pressable as
|
|
25226
|
+
import { useEffect as useEffect30, useState as useState48 } from "react";
|
|
25227
|
+
import { Pressable as Pressable22, StyleSheet as StyleSheet35, Text as Text28, View as View44 } from "react-native";
|
|
24562
25228
|
|
|
24563
25229
|
// src/auth/PasswordInput.tsx
|
|
24564
|
-
import { useState as
|
|
24565
|
-
import { Pressable as
|
|
24566
|
-
import { jsx as
|
|
25230
|
+
import { useState as useState47 } from "react";
|
|
25231
|
+
import { Pressable as Pressable21, StyleSheet as StyleSheet34, Text as Text27, View as View43 } from "react-native";
|
|
25232
|
+
import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
24567
25233
|
var PasswordInput = (props) => {
|
|
24568
|
-
const [visible, setVisible] =
|
|
24569
|
-
return /* @__PURE__ */
|
|
24570
|
-
/* @__PURE__ */
|
|
24571
|
-
/* @__PURE__ */
|
|
24572
|
-
|
|
25234
|
+
const [visible, setVisible] = useState47(false);
|
|
25235
|
+
return /* @__PURE__ */ jsxs45(View43, { style: styles15.wrap, children: [
|
|
25236
|
+
/* @__PURE__ */ jsx48(Input, { ...props, autoCapitalize: "none", secureTextEntry: !visible }),
|
|
25237
|
+
/* @__PURE__ */ jsx48(
|
|
25238
|
+
Pressable21,
|
|
24573
25239
|
{
|
|
24574
25240
|
accessibilityRole: "button",
|
|
24575
25241
|
accessibilityLabel: visible ? "Hide password" : "Show password",
|
|
@@ -24577,12 +25243,12 @@ var PasswordInput = (props) => {
|
|
|
24577
25243
|
onPress: () => setVisible((current4) => !current4),
|
|
24578
25244
|
hitSlop: 10,
|
|
24579
25245
|
style: styles15.toggle,
|
|
24580
|
-
children: /* @__PURE__ */
|
|
25246
|
+
children: /* @__PURE__ */ jsx48(Text27, { style: styles15.icon, children: visible ? "\u{1F648}" : "\u{1F441}" })
|
|
24581
25247
|
}
|
|
24582
25248
|
)
|
|
24583
25249
|
] });
|
|
24584
25250
|
};
|
|
24585
|
-
var styles15 =
|
|
25251
|
+
var styles15 = StyleSheet34.create({
|
|
24586
25252
|
wrap: { position: "relative", justifyContent: "center" },
|
|
24587
25253
|
toggle: {
|
|
24588
25254
|
position: "absolute",
|
|
@@ -24595,7 +25261,7 @@ var styles15 = StyleSheet33.create({
|
|
|
24595
25261
|
});
|
|
24596
25262
|
|
|
24597
25263
|
// src/auth/LoginForm.tsx
|
|
24598
|
-
import { jsx as
|
|
25264
|
+
import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
24599
25265
|
var LoginForm = ({
|
|
24600
25266
|
initialEmail = "",
|
|
24601
25267
|
errors = {},
|
|
@@ -24607,15 +25273,15 @@ var LoginForm = ({
|
|
|
24607
25273
|
onFieldChange
|
|
24608
25274
|
}) => {
|
|
24609
25275
|
const theme = useTheme();
|
|
24610
|
-
const [email, setEmail] =
|
|
24611
|
-
const [password, setPassword] =
|
|
24612
|
-
|
|
25276
|
+
const [email, setEmail] = useState48(initialEmail);
|
|
25277
|
+
const [password, setPassword] = useState48("");
|
|
25278
|
+
useEffect30(() => {
|
|
24613
25279
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
24614
25280
|
}, [email, initialEmail]);
|
|
24615
25281
|
const submit = () => void onSubmit({ email, password });
|
|
24616
|
-
return /* @__PURE__ */
|
|
24617
|
-
error ? /* @__PURE__ */
|
|
24618
|
-
/* @__PURE__ */
|
|
25282
|
+
return /* @__PURE__ */ jsxs46(View44, { style: styles16.form, children: [
|
|
25283
|
+
error ? /* @__PURE__ */ jsx49(ErrorText, { children: error }) : null,
|
|
25284
|
+
/* @__PURE__ */ jsx49(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx49(
|
|
24619
25285
|
Input,
|
|
24620
25286
|
{
|
|
24621
25287
|
value: email,
|
|
@@ -24629,7 +25295,7 @@ var LoginForm = ({
|
|
|
24629
25295
|
invalid: Boolean(errors.email)
|
|
24630
25296
|
}
|
|
24631
25297
|
) }),
|
|
24632
|
-
/* @__PURE__ */
|
|
25298
|
+
/* @__PURE__ */ jsx49(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ jsx49(
|
|
24633
25299
|
PasswordInput,
|
|
24634
25300
|
{
|
|
24635
25301
|
value: password,
|
|
@@ -24641,29 +25307,29 @@ var LoginForm = ({
|
|
|
24641
25307
|
invalid: Boolean(errors.password)
|
|
24642
25308
|
}
|
|
24643
25309
|
) }),
|
|
24644
|
-
/* @__PURE__ */
|
|
24645
|
-
allowPasswordReset && onForgotPassword ? /* @__PURE__ */
|
|
24646
|
-
|
|
25310
|
+
/* @__PURE__ */ jsx49(Button, { onPress: submit, loading, children: "Login" }),
|
|
25311
|
+
allowPasswordReset && onForgotPassword ? /* @__PURE__ */ jsx49(
|
|
25312
|
+
Pressable22,
|
|
24647
25313
|
{
|
|
24648
25314
|
accessibilityRole: "button",
|
|
24649
25315
|
onPress: () => onForgotPassword(email),
|
|
24650
25316
|
hitSlop: 8,
|
|
24651
25317
|
style: styles16.link,
|
|
24652
|
-
children: /* @__PURE__ */
|
|
25318
|
+
children: /* @__PURE__ */ jsx49(Text28, { style: [styles16.linkText, { color: theme.accent }], children: "Forgot password?" })
|
|
24653
25319
|
}
|
|
24654
25320
|
) : null
|
|
24655
25321
|
] });
|
|
24656
25322
|
};
|
|
24657
|
-
var styles16 =
|
|
25323
|
+
var styles16 = StyleSheet35.create({
|
|
24658
25324
|
form: { gap: 14 },
|
|
24659
25325
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
24660
25326
|
linkText: { fontSize: 14, fontWeight: "600" }
|
|
24661
25327
|
});
|
|
24662
25328
|
|
|
24663
25329
|
// src/auth/RegisterForm.tsx
|
|
24664
|
-
import { useEffect as
|
|
24665
|
-
import { Linking as
|
|
24666
|
-
import { Fragment as
|
|
25330
|
+
import { useEffect as useEffect31, useMemo as useMemo36, useState as useState49 } from "react";
|
|
25331
|
+
import { Linking as Linking8, Pressable as Pressable23, StyleSheet as StyleSheet36, View as View45 } from "react-native";
|
|
25332
|
+
import { Fragment as Fragment25, jsx as jsx50, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
24667
25333
|
var emptyRegistration = (email) => ({
|
|
24668
25334
|
firstName: "",
|
|
24669
25335
|
lastName: "",
|
|
@@ -24690,30 +25356,30 @@ var RegisterForm = ({
|
|
|
24690
25356
|
onFieldChange
|
|
24691
25357
|
}) => {
|
|
24692
25358
|
var _a, _b, _c, _d, _e, _f;
|
|
24693
|
-
const t =
|
|
24694
|
-
const [values2, setValues] =
|
|
25359
|
+
const t = useMemo36(() => createTranslator({ locale }), [locale]);
|
|
25360
|
+
const [values2, setValues] = useState49(
|
|
24695
25361
|
() => emptyRegistration(initialEmail)
|
|
24696
25362
|
);
|
|
24697
|
-
const [termsAccepted, setTermsAccepted] =
|
|
24698
|
-
const [refreshingProof, setRefreshingProof] =
|
|
24699
|
-
const [refreshCode, setRefreshCode] =
|
|
25363
|
+
const [termsAccepted, setTermsAccepted] = useState49(false);
|
|
25364
|
+
const [refreshingProof, setRefreshingProof] = useState49(false);
|
|
25365
|
+
const [refreshCode, setRefreshCode] = useState49("");
|
|
24700
25366
|
const countriesQuery = hooks_exports.useCountries();
|
|
24701
|
-
const countries =
|
|
25367
|
+
const countries = useMemo36(() => {
|
|
24702
25368
|
var _a2;
|
|
24703
25369
|
return (_a2 = countriesQuery.data) != null ? _a2 : [];
|
|
24704
25370
|
}, [countriesQuery.data]);
|
|
24705
25371
|
const statesQuery = hooks_exports.useStates(values2.countryId, {
|
|
24706
25372
|
enabled: requireAddress && Boolean(values2.countryId)
|
|
24707
25373
|
});
|
|
24708
|
-
const states =
|
|
25374
|
+
const states = useMemo36(() => {
|
|
24709
25375
|
var _a2;
|
|
24710
25376
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
24711
25377
|
}, [statesQuery.data]);
|
|
24712
|
-
|
|
25378
|
+
useEffect31(() => {
|
|
24713
25379
|
if (initialEmail && !values2.email)
|
|
24714
25380
|
setValues((current4) => ({ ...current4, email: initialEmail }));
|
|
24715
25381
|
}, [initialEmail, values2.email]);
|
|
24716
|
-
|
|
25382
|
+
useEffect31(() => {
|
|
24717
25383
|
var _a2;
|
|
24718
25384
|
if (!requireAddress || values2.countryId || countries.length === 0) return;
|
|
24719
25385
|
const preferred = (_a2 = countries.find((country) => {
|
|
@@ -24734,19 +25400,19 @@ var RegisterForm = ({
|
|
|
24734
25400
|
setValues((current4) => ({ ...current4, [field]: value6 }));
|
|
24735
25401
|
onFieldChange == null ? void 0 : onFieldChange(field);
|
|
24736
25402
|
};
|
|
24737
|
-
const countryOptions =
|
|
25403
|
+
const countryOptions = useMemo36(
|
|
24738
25404
|
() => countries.map((country) => ({ label: country.name, value: String(country.id) })),
|
|
24739
25405
|
[countries]
|
|
24740
25406
|
);
|
|
24741
|
-
const stateOptions =
|
|
25407
|
+
const stateOptions = useMemo36(
|
|
24742
25408
|
() => states.map((state) => ({ label: state.name, value: String(state.id) })),
|
|
24743
25409
|
[states]
|
|
24744
25410
|
);
|
|
24745
25411
|
const submit = () => void onSubmit(values2, { requireState: states.length > 0, termsAccepted });
|
|
24746
|
-
return /* @__PURE__ */
|
|
24747
|
-
error ? /* @__PURE__ */
|
|
24748
|
-
/* @__PURE__ */
|
|
24749
|
-
/* @__PURE__ */
|
|
25412
|
+
return /* @__PURE__ */ jsxs47(View45, { style: styles17.form, children: [
|
|
25413
|
+
error ? /* @__PURE__ */ jsx50(ErrorText, { children: error }) : null,
|
|
25414
|
+
/* @__PURE__ */ jsxs47(View45, { style: styles17.row, children: [
|
|
25415
|
+
/* @__PURE__ */ jsx50(View45, { style: styles17.flex, children: /* @__PURE__ */ jsx50(Field, { label: "First name", required: true, error: errors.firstName, children: /* @__PURE__ */ jsx50(
|
|
24750
25416
|
Input,
|
|
24751
25417
|
{
|
|
24752
25418
|
value: values2.firstName,
|
|
@@ -24756,7 +25422,7 @@ var RegisterForm = ({
|
|
|
24756
25422
|
invalid: Boolean(errors.firstName)
|
|
24757
25423
|
}
|
|
24758
25424
|
) }) }),
|
|
24759
|
-
/* @__PURE__ */
|
|
25425
|
+
/* @__PURE__ */ jsx50(View45, { style: styles17.flex, children: /* @__PURE__ */ jsx50(Field, { label: "Last name", required: true, error: errors.lastName, children: /* @__PURE__ */ jsx50(
|
|
24760
25426
|
Input,
|
|
24761
25427
|
{
|
|
24762
25428
|
value: values2.lastName,
|
|
@@ -24767,7 +25433,7 @@ var RegisterForm = ({
|
|
|
24767
25433
|
}
|
|
24768
25434
|
) }) })
|
|
24769
25435
|
] }),
|
|
24770
|
-
/* @__PURE__ */
|
|
25436
|
+
/* @__PURE__ */ jsx50(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx50(
|
|
24771
25437
|
Input,
|
|
24772
25438
|
{
|
|
24773
25439
|
value: values2.email,
|
|
@@ -24779,8 +25445,8 @@ var RegisterForm = ({
|
|
|
24779
25445
|
invalid: Boolean(errors.email)
|
|
24780
25446
|
}
|
|
24781
25447
|
) }),
|
|
24782
|
-
requireAddress ? /* @__PURE__ */
|
|
24783
|
-
/* @__PURE__ */
|
|
25448
|
+
requireAddress ? /* @__PURE__ */ jsxs47(Fragment25, { children: [
|
|
25449
|
+
/* @__PURE__ */ jsx50(Field, { label: "Street address", required: true, error: errors.streetAddress, children: /* @__PURE__ */ jsx50(
|
|
24784
25450
|
Input,
|
|
24785
25451
|
{
|
|
24786
25452
|
value: (_a = values2.streetAddress) != null ? _a : "",
|
|
@@ -24789,7 +25455,7 @@ var RegisterForm = ({
|
|
|
24789
25455
|
invalid: Boolean(errors.streetAddress)
|
|
24790
25456
|
}
|
|
24791
25457
|
) }),
|
|
24792
|
-
/* @__PURE__ */
|
|
25458
|
+
/* @__PURE__ */ jsx50(Field, { label: "ZIP / postcode", required: true, error: errors.zip, children: /* @__PURE__ */ jsx50(
|
|
24793
25459
|
Input,
|
|
24794
25460
|
{
|
|
24795
25461
|
value: (_b = values2.zip) != null ? _b : "",
|
|
@@ -24798,7 +25464,7 @@ var RegisterForm = ({
|
|
|
24798
25464
|
invalid: Boolean(errors.zip)
|
|
24799
25465
|
}
|
|
24800
25466
|
) }),
|
|
24801
|
-
/* @__PURE__ */
|
|
25467
|
+
/* @__PURE__ */ jsx50(Field, { label: "Country", required: true, error: errors.countryId, children: /* @__PURE__ */ jsx50(
|
|
24802
25468
|
Select,
|
|
24803
25469
|
{
|
|
24804
25470
|
value: (_c = values2.countryId) != null ? _c : "",
|
|
@@ -24812,13 +25478,13 @@ var RegisterForm = ({
|
|
|
24812
25478
|
}
|
|
24813
25479
|
}
|
|
24814
25480
|
) }),
|
|
24815
|
-
/* @__PURE__ */
|
|
25481
|
+
/* @__PURE__ */ jsx50(
|
|
24816
25482
|
Field,
|
|
24817
25483
|
{
|
|
24818
25484
|
label: "State / Province",
|
|
24819
25485
|
required: states.length > 0,
|
|
24820
25486
|
error: errors.stateId,
|
|
24821
|
-
children: /* @__PURE__ */
|
|
25487
|
+
children: /* @__PURE__ */ jsx50(
|
|
24822
25488
|
Select,
|
|
24823
25489
|
{
|
|
24824
25490
|
value: (_d = values2.stateId) != null ? _d : "",
|
|
@@ -24831,7 +25497,7 @@ var RegisterForm = ({
|
|
|
24831
25497
|
)
|
|
24832
25498
|
}
|
|
24833
25499
|
),
|
|
24834
|
-
/* @__PURE__ */
|
|
25500
|
+
/* @__PURE__ */ jsx50(Field, { label: "City", required: true, error: errors.city, children: /* @__PURE__ */ jsx50(
|
|
24835
25501
|
Input,
|
|
24836
25502
|
{
|
|
24837
25503
|
value: (_e = values2.city) != null ? _e : "",
|
|
@@ -24841,7 +25507,7 @@ var RegisterForm = ({
|
|
|
24841
25507
|
}
|
|
24842
25508
|
) })
|
|
24843
25509
|
] }) : null,
|
|
24844
|
-
/* @__PURE__ */
|
|
25510
|
+
/* @__PURE__ */ jsx50(Field, { label: "Phone", children: /* @__PURE__ */ jsx50(
|
|
24845
25511
|
Input,
|
|
24846
25512
|
{
|
|
24847
25513
|
value: (_f = values2.phone) != null ? _f : "",
|
|
@@ -24851,7 +25517,7 @@ var RegisterForm = ({
|
|
|
24851
25517
|
autoCapitalize: "none"
|
|
24852
25518
|
}
|
|
24853
25519
|
) }),
|
|
24854
|
-
/* @__PURE__ */
|
|
25520
|
+
/* @__PURE__ */ jsx50(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ jsx50(
|
|
24855
25521
|
PasswordInput,
|
|
24856
25522
|
{
|
|
24857
25523
|
value: values2.password,
|
|
@@ -24860,7 +25526,7 @@ var RegisterForm = ({
|
|
|
24860
25526
|
invalid: Boolean(errors.password)
|
|
24861
25527
|
}
|
|
24862
25528
|
) }),
|
|
24863
|
-
/* @__PURE__ */
|
|
25529
|
+
/* @__PURE__ */ jsx50(Field, { label: "Confirm password", required: true, error: errors.passwordConfirmation, children: /* @__PURE__ */ jsx50(
|
|
24864
25530
|
PasswordInput,
|
|
24865
25531
|
{
|
|
24866
25532
|
value: values2.passwordConfirmation,
|
|
@@ -24869,8 +25535,8 @@ var RegisterForm = ({
|
|
|
24869
25535
|
invalid: Boolean(errors.passwordConfirmation)
|
|
24870
25536
|
}
|
|
24871
25537
|
) }),
|
|
24872
|
-
completionRefresh ? /* @__PURE__ */
|
|
24873
|
-
/* @__PURE__ */
|
|
25538
|
+
completionRefresh ? /* @__PURE__ */ jsxs47(View45, { style: { gap: 12 }, children: [
|
|
25539
|
+
/* @__PURE__ */ jsxs47(
|
|
24874
25540
|
Button,
|
|
24875
25541
|
{
|
|
24876
25542
|
disabled: loading || completionRefresh.retryAfter > 0,
|
|
@@ -24884,8 +25550,8 @@ var RegisterForm = ({
|
|
|
24884
25550
|
]
|
|
24885
25551
|
}
|
|
24886
25552
|
),
|
|
24887
|
-
refreshingProof ? /* @__PURE__ */
|
|
24888
|
-
/* @__PURE__ */
|
|
25553
|
+
refreshingProof ? /* @__PURE__ */ jsxs47(Fragment25, { children: [
|
|
25554
|
+
/* @__PURE__ */ jsx50(Field, { label: t("auth.completionNewCode"), children: /* @__PURE__ */ jsx50(
|
|
24889
25555
|
Input,
|
|
24890
25556
|
{
|
|
24891
25557
|
value: refreshCode,
|
|
@@ -24895,7 +25561,7 @@ var RegisterForm = ({
|
|
|
24895
25561
|
onChangeText: (value6) => setRefreshCode(value6.replace(/\D/g, "").slice(0, 6))
|
|
24896
25562
|
}
|
|
24897
25563
|
) }),
|
|
24898
|
-
/* @__PURE__ */
|
|
25564
|
+
/* @__PURE__ */ jsx50(
|
|
24899
25565
|
Button,
|
|
24900
25566
|
{
|
|
24901
25567
|
disabled: loading || !/^\d{6}$/.test(refreshCode),
|
|
@@ -24905,38 +25571,38 @@ var RegisterForm = ({
|
|
|
24905
25571
|
)
|
|
24906
25572
|
] }) : null
|
|
24907
25573
|
] }) : null,
|
|
24908
|
-
requireTerms ? /* @__PURE__ */
|
|
24909
|
-
/* @__PURE__ */
|
|
24910
|
-
|
|
25574
|
+
requireTerms ? /* @__PURE__ */ jsxs47(View45, { style: { gap: 8 }, children: [
|
|
25575
|
+
/* @__PURE__ */ jsx50(
|
|
25576
|
+
Pressable23,
|
|
24911
25577
|
{
|
|
24912
25578
|
accessibilityRole: "checkbox",
|
|
24913
25579
|
accessibilityState: { checked: termsAccepted },
|
|
24914
25580
|
onPress: () => setTermsAccepted((current4) => !current4),
|
|
24915
|
-
children: /* @__PURE__ */
|
|
25581
|
+
children: /* @__PURE__ */ jsxs47(MutedText, { children: [
|
|
24916
25582
|
termsAccepted ? "\u2611" : "\u2610",
|
|
24917
25583
|
" ",
|
|
24918
25584
|
t("auth.completionAgree")
|
|
24919
25585
|
] })
|
|
24920
25586
|
}
|
|
24921
25587
|
),
|
|
24922
|
-
/* @__PURE__ */
|
|
24923
|
-
|
|
25588
|
+
/* @__PURE__ */ jsx50(
|
|
25589
|
+
Pressable23,
|
|
24924
25590
|
{
|
|
24925
25591
|
accessibilityRole: "link",
|
|
24926
|
-
onPress: () => void
|
|
24927
|
-
children: /* @__PURE__ */
|
|
25592
|
+
onPress: () => void Linking8.openURL("https://www.ticketfairy.com/terms-of-service"),
|
|
25593
|
+
children: /* @__PURE__ */ jsx50(MutedText, { children: t("auth.completionTerms") })
|
|
24928
25594
|
}
|
|
24929
25595
|
),
|
|
24930
|
-
/* @__PURE__ */
|
|
24931
|
-
|
|
25596
|
+
/* @__PURE__ */ jsx50(
|
|
25597
|
+
Pressable23,
|
|
24932
25598
|
{
|
|
24933
25599
|
accessibilityRole: "link",
|
|
24934
|
-
onPress: () => void
|
|
24935
|
-
children: /* @__PURE__ */
|
|
25600
|
+
onPress: () => void Linking8.openURL("https://www.ticketfairy.com/privacy"),
|
|
25601
|
+
children: /* @__PURE__ */ jsx50(MutedText, { children: t("auth.completionPrivacy") })
|
|
24936
25602
|
}
|
|
24937
25603
|
)
|
|
24938
25604
|
] }) : null,
|
|
24939
|
-
/* @__PURE__ */
|
|
25605
|
+
/* @__PURE__ */ jsx50(
|
|
24940
25606
|
Button,
|
|
24941
25607
|
{
|
|
24942
25608
|
onPress: submit,
|
|
@@ -24947,16 +25613,16 @@ var RegisterForm = ({
|
|
|
24947
25613
|
)
|
|
24948
25614
|
] });
|
|
24949
25615
|
};
|
|
24950
|
-
var styles17 =
|
|
25616
|
+
var styles17 = StyleSheet36.create({
|
|
24951
25617
|
form: { gap: 14 },
|
|
24952
25618
|
row: { flexDirection: "row", gap: 10 },
|
|
24953
25619
|
flex: { flex: 1 }
|
|
24954
25620
|
});
|
|
24955
25621
|
|
|
24956
25622
|
// src/auth/EmailCodeForm.tsx
|
|
24957
|
-
import { useState as
|
|
24958
|
-
import { View as
|
|
24959
|
-
import { Fragment as
|
|
25623
|
+
import { useState as useState50 } from "react";
|
|
25624
|
+
import { View as View46 } from "react-native";
|
|
25625
|
+
import { Fragment as Fragment26, jsx as jsx51, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
24960
25626
|
var EmailCodeForm = ({
|
|
24961
25627
|
initialEmail,
|
|
24962
25628
|
sent,
|
|
@@ -24969,13 +25635,13 @@ var EmailCodeForm = ({
|
|
|
24969
25635
|
onVerify,
|
|
24970
25636
|
onBack
|
|
24971
25637
|
}) => {
|
|
24972
|
-
const [email, setEmail] =
|
|
24973
|
-
const [code, setCode] =
|
|
24974
|
-
return /* @__PURE__ */
|
|
24975
|
-
/* @__PURE__ */
|
|
24976
|
-
error ? /* @__PURE__ */
|
|
24977
|
-
successMessage ? /* @__PURE__ */
|
|
24978
|
-
/* @__PURE__ */
|
|
25638
|
+
const [email, setEmail] = useState50(initialEmail);
|
|
25639
|
+
const [code, setCode] = useState50("");
|
|
25640
|
+
return /* @__PURE__ */ jsxs48(View46, { style: { gap: 14 }, children: [
|
|
25641
|
+
/* @__PURE__ */ jsx51(MutedText, { children: sent ? `Enter the sign-in code sent to ${target}.` : "Receive a one-time sign-in code by email." }),
|
|
25642
|
+
error ? /* @__PURE__ */ jsx51(ErrorText, { children: error }) : null,
|
|
25643
|
+
successMessage ? /* @__PURE__ */ jsx51(MutedText, { children: successMessage }) : null,
|
|
25644
|
+
/* @__PURE__ */ jsx51(Field, { label: "Email", required: true, children: /* @__PURE__ */ jsx51(
|
|
24979
25645
|
Input,
|
|
24980
25646
|
{
|
|
24981
25647
|
value: email,
|
|
@@ -24986,8 +25652,8 @@ var EmailCodeForm = ({
|
|
|
24986
25652
|
accessibilityLabel: "Email"
|
|
24987
25653
|
}
|
|
24988
25654
|
) }),
|
|
24989
|
-
sent ? /* @__PURE__ */
|
|
24990
|
-
/* @__PURE__ */
|
|
25655
|
+
sent ? /* @__PURE__ */ jsxs48(Fragment26, { children: [
|
|
25656
|
+
/* @__PURE__ */ jsx51(Field, { label: "Sign-in code", required: true, children: /* @__PURE__ */ jsx51(
|
|
24991
25657
|
Input,
|
|
24992
25658
|
{
|
|
24993
25659
|
value: code,
|
|
@@ -25001,7 +25667,7 @@ var EmailCodeForm = ({
|
|
|
25001
25667
|
editable: !loading
|
|
25002
25668
|
}
|
|
25003
25669
|
) }),
|
|
25004
|
-
/* @__PURE__ */
|
|
25670
|
+
/* @__PURE__ */ jsx51(
|
|
25005
25671
|
Button,
|
|
25006
25672
|
{
|
|
25007
25673
|
loading,
|
|
@@ -25011,7 +25677,7 @@ var EmailCodeForm = ({
|
|
|
25011
25677
|
}
|
|
25012
25678
|
)
|
|
25013
25679
|
] }) : null,
|
|
25014
|
-
/* @__PURE__ */
|
|
25680
|
+
/* @__PURE__ */ jsx51(
|
|
25015
25681
|
Button,
|
|
25016
25682
|
{
|
|
25017
25683
|
loading: !sent && loading,
|
|
@@ -25021,26 +25687,26 @@ var EmailCodeForm = ({
|
|
|
25021
25687
|
children: retryAfter > 0 ? `Send another code in ${retryAfter}s` : sent ? "Resend code" : "Send sign-in code"
|
|
25022
25688
|
}
|
|
25023
25689
|
),
|
|
25024
|
-
/* @__PURE__ */
|
|
25690
|
+
/* @__PURE__ */ jsx51(Button, { variant: "ghost", disabled: loading, onPress: onBack, children: "Use password instead" })
|
|
25025
25691
|
] });
|
|
25026
25692
|
};
|
|
25027
25693
|
|
|
25028
25694
|
// src/auth/AuthModal.tsx
|
|
25029
|
-
import { jsx as
|
|
25695
|
+
import { jsx as jsx52, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
25030
25696
|
var Tab = ({
|
|
25031
25697
|
label,
|
|
25032
25698
|
active: active2,
|
|
25033
25699
|
onPress
|
|
25034
25700
|
}) => {
|
|
25035
25701
|
const theme = useTheme();
|
|
25036
|
-
return /* @__PURE__ */
|
|
25037
|
-
|
|
25702
|
+
return /* @__PURE__ */ jsx52(
|
|
25703
|
+
Pressable24,
|
|
25038
25704
|
{
|
|
25039
25705
|
accessibilityRole: "tab",
|
|
25040
25706
|
accessibilityState: { selected: active2 },
|
|
25041
25707
|
onPress,
|
|
25042
25708
|
style: [styles18.tab, { borderBottomColor: active2 ? theme.accent : "transparent" }],
|
|
25043
|
-
children: /* @__PURE__ */
|
|
25709
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: [styles18.tabText, { color: active2 ? theme.text : theme.muted }], children: label })
|
|
25044
25710
|
}
|
|
25045
25711
|
);
|
|
25046
25712
|
};
|
|
@@ -25082,34 +25748,34 @@ var AuthModal = ({
|
|
|
25082
25748
|
if (auth.twoFactorChallenge) await auth.cancelTwoFactor();
|
|
25083
25749
|
onClose();
|
|
25084
25750
|
};
|
|
25085
|
-
return /* @__PURE__ */
|
|
25086
|
-
|
|
25751
|
+
return /* @__PURE__ */ jsx52(Modal6, { visible: open, animationType: "slide", transparent: true, onRequestClose: requestClose, children: /* @__PURE__ */ jsx52(Pressable24, { style: styles18.backdrop, onPress: requestClose, children: /* @__PURE__ */ jsxs49(
|
|
25752
|
+
Pressable24,
|
|
25087
25753
|
{
|
|
25088
25754
|
style: [styles18.sheet, { backgroundColor: theme.surface }],
|
|
25089
25755
|
onPress: () => {
|
|
25090
25756
|
},
|
|
25091
25757
|
children: [
|
|
25092
|
-
/* @__PURE__ */
|
|
25093
|
-
/* @__PURE__ */
|
|
25094
|
-
/* @__PURE__ */
|
|
25095
|
-
|
|
25758
|
+
/* @__PURE__ */ jsxs49(View47, { style: styles18.header, children: [
|
|
25759
|
+
/* @__PURE__ */ jsx52(Text29, { style: [styles18.title, { color: theme.text }], children: isPasswordReset ? "Password reset" : auth.view === "two-factor" ? "Verify your sign in" : "Ticket Fairy account" }),
|
|
25760
|
+
/* @__PURE__ */ jsx52(
|
|
25761
|
+
Pressable24,
|
|
25096
25762
|
{
|
|
25097
25763
|
accessibilityRole: "button",
|
|
25098
25764
|
accessibilityLabel: "Close",
|
|
25099
25765
|
disabled: auth.isSubmitting,
|
|
25100
25766
|
onPress: () => void requestClose(),
|
|
25101
25767
|
hitSlop: 12,
|
|
25102
|
-
children: /* @__PURE__ */
|
|
25768
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: [styles18.close, { color: theme.muted }], children: "\u2715" })
|
|
25103
25769
|
}
|
|
25104
25770
|
)
|
|
25105
25771
|
] }),
|
|
25106
|
-
/* @__PURE__ */
|
|
25772
|
+
/* @__PURE__ */ jsxs49(
|
|
25107
25773
|
ScrollView3,
|
|
25108
25774
|
{
|
|
25109
25775
|
contentContainerStyle: styles18.body,
|
|
25110
25776
|
keyboardShouldPersistTaps: "handled",
|
|
25111
25777
|
children: [
|
|
25112
|
-
logoUrl ? /* @__PURE__ */
|
|
25778
|
+
logoUrl ? /* @__PURE__ */ jsx52(
|
|
25113
25779
|
Image6,
|
|
25114
25780
|
{
|
|
25115
25781
|
accessibilityLabel: "The Ticket Fairy",
|
|
@@ -25118,8 +25784,8 @@ var AuthModal = ({
|
|
|
25118
25784
|
resizeMode: "contain"
|
|
25119
25785
|
}
|
|
25120
25786
|
) : null,
|
|
25121
|
-
showTabs ? /* @__PURE__ */
|
|
25122
|
-
/* @__PURE__ */
|
|
25787
|
+
showTabs ? /* @__PURE__ */ jsxs49(View47, { style: [styles18.tabs, { borderBottomColor: theme.border }], children: [
|
|
25788
|
+
/* @__PURE__ */ jsx52(
|
|
25123
25789
|
Tab,
|
|
25124
25790
|
{
|
|
25125
25791
|
label: "Login",
|
|
@@ -25127,7 +25793,7 @@ var AuthModal = ({
|
|
|
25127
25793
|
onPress: () => auth.showLogin(auth.suggestedEmail)
|
|
25128
25794
|
}
|
|
25129
25795
|
),
|
|
25130
|
-
/* @__PURE__ */
|
|
25796
|
+
/* @__PURE__ */ jsx52(
|
|
25131
25797
|
Tab,
|
|
25132
25798
|
{
|
|
25133
25799
|
label: "Sign Up",
|
|
@@ -25136,8 +25802,8 @@ var AuthModal = ({
|
|
|
25136
25802
|
}
|
|
25137
25803
|
)
|
|
25138
25804
|
] }) : null,
|
|
25139
|
-
message && !isPasswordReset ? /* @__PURE__ */
|
|
25140
|
-
auth.view === "email-code" ? /* @__PURE__ */
|
|
25805
|
+
message && !isPasswordReset ? /* @__PURE__ */ jsx52(MutedText, { children: message }) : null,
|
|
25806
|
+
auth.view === "email-code" ? /* @__PURE__ */ jsx52(
|
|
25141
25807
|
EmailCodeForm,
|
|
25142
25808
|
{
|
|
25143
25809
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25152,7 +25818,7 @@ var AuthModal = ({
|
|
|
25152
25818
|
onBack: () => auth.showLogin(auth.suggestedEmail)
|
|
25153
25819
|
}
|
|
25154
25820
|
) : null,
|
|
25155
|
-
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */
|
|
25821
|
+
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */ jsx52(
|
|
25156
25822
|
TwoFactorForm,
|
|
25157
25823
|
{
|
|
25158
25824
|
loading: auth.isSubmitting,
|
|
@@ -25165,7 +25831,7 @@ var AuthModal = ({
|
|
|
25165
25831
|
onCancel: auth.cancelTwoFactor
|
|
25166
25832
|
}
|
|
25167
25833
|
) : null,
|
|
25168
|
-
auth.view === "login" ? /* @__PURE__ */
|
|
25834
|
+
auth.view === "login" ? /* @__PURE__ */ jsx52(
|
|
25169
25835
|
LoginForm,
|
|
25170
25836
|
{
|
|
25171
25837
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25178,18 +25844,18 @@ var AuthModal = ({
|
|
|
25178
25844
|
onFieldChange: auth.clearFieldError
|
|
25179
25845
|
}
|
|
25180
25846
|
) : null,
|
|
25181
|
-
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */
|
|
25182
|
-
|
|
25847
|
+
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */ jsx52(View47, { style: { gap: 12 }, children: ["google", "apple", "facebook", "passkey"].map((provider) => /* @__PURE__ */ jsx52(
|
|
25848
|
+
Pressable24,
|
|
25183
25849
|
{
|
|
25184
25850
|
accessibilityRole: "button",
|
|
25185
25851
|
disabled: auth.isSubmitting,
|
|
25186
25852
|
onPress: () => void auth.submitBrowserSignIn(provider),
|
|
25187
|
-
children: /* @__PURE__ */
|
|
25853
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: { color: theme.accent }, children: provider === "passkey" ? "Sign in with a passkey" : `Sign in with ${provider === "google" ? "Google" : provider === "apple" ? "Apple" : "Facebook"}` })
|
|
25188
25854
|
},
|
|
25189
25855
|
provider
|
|
25190
25856
|
)) }) : null,
|
|
25191
|
-
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */
|
|
25192
|
-
auth.view === "register" && allowRegistration ? /* @__PURE__ */
|
|
25857
|
+
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */ jsx52(Pressable24, { onPress: () => auth.showEmailCode(auth.suggestedEmail), children: /* @__PURE__ */ jsx52(Text29, { style: { color: theme.accent }, children: "Sign in with an email code" }) }) : null,
|
|
25858
|
+
auth.view === "register" && allowRegistration ? /* @__PURE__ */ jsx52(
|
|
25193
25859
|
RegisterForm,
|
|
25194
25860
|
{
|
|
25195
25861
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25207,7 +25873,7 @@ var AuthModal = ({
|
|
|
25207
25873
|
onFieldChange: auth.clearFieldError
|
|
25208
25874
|
}
|
|
25209
25875
|
) : null,
|
|
25210
|
-
isPasswordReset ? /* @__PURE__ */
|
|
25876
|
+
isPasswordReset ? /* @__PURE__ */ jsx52(
|
|
25211
25877
|
ForgotPasswordForm,
|
|
25212
25878
|
{
|
|
25213
25879
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25227,7 +25893,7 @@ var AuthModal = ({
|
|
|
25227
25893
|
}
|
|
25228
25894
|
) }) });
|
|
25229
25895
|
};
|
|
25230
|
-
var styles18 =
|
|
25896
|
+
var styles18 = StyleSheet37.create({
|
|
25231
25897
|
backdrop: { flex: 1, justifyContent: "flex-end", backgroundColor: "rgba(0,0,0,0.4)" },
|
|
25232
25898
|
sheet: {
|
|
25233
25899
|
borderTopLeftRadius: 20,
|
|
@@ -25247,7 +25913,7 @@ var styles18 = StyleSheet36.create({
|
|
|
25247
25913
|
logo: { width: "100%", height: 44, alignSelf: "center" },
|
|
25248
25914
|
tabs: {
|
|
25249
25915
|
flexDirection: "row",
|
|
25250
|
-
borderBottomWidth:
|
|
25916
|
+
borderBottomWidth: StyleSheet37.hairlineWidth
|
|
25251
25917
|
},
|
|
25252
25918
|
tab: {
|
|
25253
25919
|
flex: 1,
|
|
@@ -25259,20 +25925,20 @@ var styles18 = StyleSheet36.create({
|
|
|
25259
25925
|
});
|
|
25260
25926
|
|
|
25261
25927
|
// src/auth/ResetPasswordForm.tsx
|
|
25262
|
-
import { useMemo as
|
|
25263
|
-
import { StyleSheet as
|
|
25264
|
-
import { jsx as
|
|
25928
|
+
import { useMemo as useMemo37, useState as useState51 } from "react";
|
|
25929
|
+
import { StyleSheet as StyleSheet38, Text as Text30, View as View48 } from "react-native";
|
|
25930
|
+
import { jsx as jsx53, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
25265
25931
|
var ResetPasswordForm = ({
|
|
25266
25932
|
token,
|
|
25267
25933
|
onSuccess,
|
|
25268
25934
|
onBackToLogin
|
|
25269
25935
|
}) => {
|
|
25270
25936
|
const theme = useTheme();
|
|
25271
|
-
const [password, setPassword] =
|
|
25272
|
-
const [confirmation, setConfirmation] =
|
|
25273
|
-
const [submitted, setSubmitted] =
|
|
25274
|
-
const [success, setSuccess] =
|
|
25275
|
-
const validation =
|
|
25937
|
+
const [password, setPassword] = useState51("");
|
|
25938
|
+
const [confirmation, setConfirmation] = useState51("");
|
|
25939
|
+
const [submitted, setSubmitted] = useState51(false);
|
|
25940
|
+
const [success, setSuccess] = useState51(false);
|
|
25941
|
+
const validation = useMemo37(() => {
|
|
25276
25942
|
if (!submitted)
|
|
25277
25943
|
return {};
|
|
25278
25944
|
return {
|
|
@@ -25294,16 +25960,16 @@ var ResetPasswordForm = ({
|
|
|
25294
25960
|
reset.mutate({ token, password, passwordConfirmation: confirmation });
|
|
25295
25961
|
};
|
|
25296
25962
|
if (success) {
|
|
25297
|
-
return /* @__PURE__ */
|
|
25298
|
-
/* @__PURE__ */
|
|
25299
|
-
onBackToLogin ? /* @__PURE__ */
|
|
25963
|
+
return /* @__PURE__ */ jsxs50(View48, { style: styles19.form, children: [
|
|
25964
|
+
/* @__PURE__ */ jsx53(Text30, { style: [styles19.success, { color: theme.success }], children: "Your password has been changed. You can now log in." }),
|
|
25965
|
+
onBackToLogin ? /* @__PURE__ */ jsx53(Button, { onPress: onBackToLogin, children: "Log in" }) : null
|
|
25300
25966
|
] });
|
|
25301
25967
|
}
|
|
25302
|
-
return /* @__PURE__ */
|
|
25303
|
-
/* @__PURE__ */
|
|
25304
|
-
validation.token ? /* @__PURE__ */
|
|
25305
|
-
reset.error ? /* @__PURE__ */
|
|
25306
|
-
/* @__PURE__ */
|
|
25968
|
+
return /* @__PURE__ */ jsxs50(View48, { style: styles19.form, children: [
|
|
25969
|
+
/* @__PURE__ */ jsx53(Text30, { style: [styles19.title, { color: theme.text }], children: "Change Password" }),
|
|
25970
|
+
validation.token ? /* @__PURE__ */ jsx53(ErrorText, { children: validation.token }) : null,
|
|
25971
|
+
reset.error ? /* @__PURE__ */ jsx53(ErrorText, { children: errorMessage(reset.error) }) : null,
|
|
25972
|
+
/* @__PURE__ */ jsx53(Field, { label: "New Password", required: true, error: validation.password, children: /* @__PURE__ */ jsx53(
|
|
25307
25973
|
PasswordInput,
|
|
25308
25974
|
{
|
|
25309
25975
|
value: password,
|
|
@@ -25312,7 +25978,7 @@ var ResetPasswordForm = ({
|
|
|
25312
25978
|
invalid: Boolean(validation.password)
|
|
25313
25979
|
}
|
|
25314
25980
|
) }),
|
|
25315
|
-
/* @__PURE__ */
|
|
25981
|
+
/* @__PURE__ */ jsx53(Field, { label: "Confirm Password", required: true, error: validation.confirmation, children: /* @__PURE__ */ jsx53(
|
|
25316
25982
|
PasswordInput,
|
|
25317
25983
|
{
|
|
25318
25984
|
value: confirmation,
|
|
@@ -25321,19 +25987,19 @@ var ResetPasswordForm = ({
|
|
|
25321
25987
|
invalid: Boolean(validation.confirmation)
|
|
25322
25988
|
}
|
|
25323
25989
|
) }),
|
|
25324
|
-
/* @__PURE__ */
|
|
25990
|
+
/* @__PURE__ */ jsx53(Button, { onPress: submit, loading: reset.isPending, disabled: !token, children: "Submit" })
|
|
25325
25991
|
] });
|
|
25326
25992
|
};
|
|
25327
|
-
var styles19 =
|
|
25993
|
+
var styles19 = StyleSheet38.create({
|
|
25328
25994
|
form: { gap: 14 },
|
|
25329
25995
|
title: { fontSize: 18, fontWeight: "700" },
|
|
25330
25996
|
success: { fontSize: 15, fontWeight: "600" }
|
|
25331
25997
|
});
|
|
25332
25998
|
|
|
25333
25999
|
// src/EmbeddedCheckout.tsx
|
|
25334
|
-
import { useEffect as
|
|
25335
|
-
import { Pressable as
|
|
25336
|
-
import { Fragment as
|
|
26000
|
+
import { useEffect as useEffect32, useRef as useRef31, useState as useState52 } from "react";
|
|
26001
|
+
import { Pressable as Pressable25, ScrollView as ScrollView4, StyleSheet as StyleSheet39, Text as Text31, View as View49 } from "react-native";
|
|
26002
|
+
import { Fragment as Fragment27, jsx as jsx54, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
25337
26003
|
var Flow = ({
|
|
25338
26004
|
eventId,
|
|
25339
26005
|
onComplete,
|
|
@@ -25359,13 +26025,13 @@ var Flow = ({
|
|
|
25359
26025
|
var _a;
|
|
25360
26026
|
const checkout = useCheckoutContext();
|
|
25361
26027
|
const theme = useTheme();
|
|
25362
|
-
const [view, setView] =
|
|
25363
|
-
const [selectionView, setSelectionView] =
|
|
25364
|
-
const editedDetailsRef =
|
|
25365
|
-
const [authRequest, setAuthRequest] =
|
|
26028
|
+
const [view, setView] = useState52(initialView);
|
|
26029
|
+
const [selectionView, setSelectionView] = useState52(initialView);
|
|
26030
|
+
const editedDetailsRef = useRef31(null);
|
|
26031
|
+
const [authRequest, setAuthRequest] = useState52(
|
|
25366
26032
|
null
|
|
25367
26033
|
);
|
|
25368
|
-
const [privacyAttempted, setPrivacyAttempted] =
|
|
26034
|
+
const [privacyAttempted, setPrivacyAttempted] = useState52(false);
|
|
25369
26035
|
const openBuiltInAuth = (email) => setAuthRequest((current4) => {
|
|
25370
26036
|
var _a2;
|
|
25371
26037
|
return { email, key: ((_a2 = current4 == null ? void 0 : current4.key) != null ? _a2 : 0) + 1 };
|
|
@@ -25378,7 +26044,7 @@ var Flow = ({
|
|
|
25378
26044
|
orderFixed: checkout.orderFixed
|
|
25379
26045
|
});
|
|
25380
26046
|
const leaveAllowed = canLeavePayment(checkout);
|
|
25381
|
-
|
|
26047
|
+
useEffect32(() => {
|
|
25382
26048
|
if (visibleView === view) return;
|
|
25383
26049
|
if (visibleView === "checkout") setView("checkout");
|
|
25384
26050
|
else {
|
|
@@ -25386,7 +26052,7 @@ var Flow = ({
|
|
|
25386
26052
|
setSelectionView("tickets");
|
|
25387
26053
|
}
|
|
25388
26054
|
}, [view, visibleView]);
|
|
25389
|
-
|
|
26055
|
+
useEffect32(() => {
|
|
25390
26056
|
onViewChange == null ? void 0 : onViewChange(visibleView);
|
|
25391
26057
|
}, [onViewChange, visibleView]);
|
|
25392
26058
|
const enterCheckout = (from) => {
|
|
@@ -25418,18 +26084,18 @@ var Flow = ({
|
|
|
25418
26084
|
const formattedTotal = breakdown ? breakdown.currencySymbol ? `${breakdown.currencySymbol}${Number(selectedTicketsTotal).toFixed(2)}` : `${breakdown.currencyCode} ${Number(selectedTicketsTotal).toFixed(2)}` : null;
|
|
25419
26085
|
const succeeded = checkout.status === "succeeded" && Boolean(checkout.order);
|
|
25420
26086
|
if (visibleView === "checkout" && succeeded && confirmationMode === "inline") {
|
|
25421
|
-
return /* @__PURE__ */
|
|
25422
|
-
/* @__PURE__ */
|
|
25423
|
-
/* @__PURE__ */
|
|
26087
|
+
return /* @__PURE__ */ jsxs51(ScrollView4, { contentContainerStyle: styles20.content, children: [
|
|
26088
|
+
/* @__PURE__ */ jsx54(IDVerification, {}),
|
|
26089
|
+
/* @__PURE__ */ jsx54(Confirmation, { children: confirmationChildren })
|
|
25424
26090
|
] });
|
|
25425
26091
|
}
|
|
25426
|
-
return /* @__PURE__ */
|
|
26092
|
+
return /* @__PURE__ */ jsxs51(
|
|
25427
26093
|
ScrollView4,
|
|
25428
26094
|
{
|
|
25429
26095
|
contentContainerStyle: styles20.content,
|
|
25430
26096
|
keyboardShouldPersistTaps: "handled",
|
|
25431
26097
|
children: [
|
|
25432
|
-
/* @__PURE__ */
|
|
26098
|
+
/* @__PURE__ */ jsx54(View49, { style: visibleView === "tickets" ? styles20.stack : styles20.hidden, children: /* @__PURE__ */ jsx54(
|
|
25433
26099
|
Bundles,
|
|
25434
26100
|
{
|
|
25435
26101
|
eventId,
|
|
@@ -25438,7 +26104,7 @@ var Flow = ({
|
|
|
25438
26104
|
confirmationMode
|
|
25439
26105
|
}
|
|
25440
26106
|
) }),
|
|
25441
|
-
visibleView === "tickets" && /* @__PURE__ */
|
|
26107
|
+
visibleView === "tickets" && /* @__PURE__ */ jsx54(View49, { style: styles20.stack, children: /* @__PURE__ */ jsx54(
|
|
25442
26108
|
Tickets,
|
|
25443
26109
|
{
|
|
25444
26110
|
eventId,
|
|
@@ -25449,29 +26115,29 @@ var Flow = ({
|
|
|
25449
26115
|
readAttributionFromUrl
|
|
25450
26116
|
}
|
|
25451
26117
|
) }),
|
|
25452
|
-
visibleView === "seats" && /* @__PURE__ */
|
|
25453
|
-
/* @__PURE__ */
|
|
25454
|
-
/* @__PURE__ */
|
|
26118
|
+
visibleView === "seats" && /* @__PURE__ */ jsxs51(View49, { style: styles20.stack, children: [
|
|
26119
|
+
/* @__PURE__ */ jsx54(Pressable25, { onPress: () => setView("tickets"), style: styles20.back, children: /* @__PURE__ */ jsx54(Text31, { style: [styles20.backText, { color: theme.accent }], children: "\u2190 Back to tickets" }) }),
|
|
26120
|
+
/* @__PURE__ */ jsx54(SeatMap, { eventId, onContinue: () => enterCheckout("seats") })
|
|
25455
26121
|
] }),
|
|
25456
|
-
visibleView === "checkout" && /* @__PURE__ */
|
|
25457
|
-
/* @__PURE__ */
|
|
25458
|
-
/* @__PURE__ */
|
|
25459
|
-
/* @__PURE__ */
|
|
26122
|
+
visibleView === "checkout" && /* @__PURE__ */ jsxs51(View49, { style: styles20.stack, children: [
|
|
26123
|
+
/* @__PURE__ */ jsx54(TimerBanner, { seconds: checkout.secondsLeft }),
|
|
26124
|
+
/* @__PURE__ */ jsxs51(View49, { style: [styles20.selection, { borderColor: theme.border }], children: [
|
|
26125
|
+
/* @__PURE__ */ jsxs51(Text31, { style: [styles20.selectionText, { color: theme.text }], children: [
|
|
25460
26126
|
selectedCount,
|
|
25461
26127
|
" ",
|
|
25462
26128
|
selectedCount === 1 ? "ticket" : "tickets",
|
|
25463
26129
|
" selected",
|
|
25464
26130
|
formattedTotal ? ` \xB7 ${formattedTotal}` : ""
|
|
25465
26131
|
] }),
|
|
25466
|
-
/* @__PURE__ */
|
|
25467
|
-
|
|
26132
|
+
/* @__PURE__ */ jsx54(
|
|
26133
|
+
Pressable25,
|
|
25468
26134
|
{
|
|
25469
26135
|
onPress: editSelection,
|
|
25470
26136
|
disabled: !leaveAllowed,
|
|
25471
26137
|
accessibilityRole: "button",
|
|
25472
26138
|
accessibilityState: { disabled: !leaveAllowed },
|
|
25473
|
-
children: /* @__PURE__ */
|
|
25474
|
-
|
|
26139
|
+
children: /* @__PURE__ */ jsx54(
|
|
26140
|
+
Text31,
|
|
25475
26141
|
{
|
|
25476
26142
|
style: [
|
|
25477
26143
|
styles20.editText,
|
|
@@ -25484,8 +26150,8 @@ var Flow = ({
|
|
|
25484
26150
|
}
|
|
25485
26151
|
)
|
|
25486
26152
|
] }),
|
|
25487
|
-
/* @__PURE__ */
|
|
25488
|
-
/* @__PURE__ */
|
|
26153
|
+
/* @__PURE__ */ jsx54(AddOns, { eventId }),
|
|
26154
|
+
/* @__PURE__ */ jsx54(
|
|
25489
26155
|
BillingInfo,
|
|
25490
26156
|
{
|
|
25491
26157
|
eventId,
|
|
@@ -25500,8 +26166,8 @@ var Flow = ({
|
|
|
25500
26166
|
showPrivacyError: privacyAttempted
|
|
25501
26167
|
}
|
|
25502
26168
|
),
|
|
25503
|
-
/* @__PURE__ */
|
|
25504
|
-
/* @__PURE__ */
|
|
26169
|
+
/* @__PURE__ */ jsx54(WaiverSigning, { eventId }),
|
|
26170
|
+
/* @__PURE__ */ jsx54(
|
|
25505
26171
|
Payment,
|
|
25506
26172
|
{
|
|
25507
26173
|
onComplete,
|
|
@@ -25516,7 +26182,7 @@ var Flow = ({
|
|
|
25516
26182
|
}
|
|
25517
26183
|
)
|
|
25518
26184
|
] }),
|
|
25519
|
-
authRequest && auth !== false && !onLogin && /* @__PURE__ */
|
|
26185
|
+
authRequest && auth !== false && !onLogin && /* @__PURE__ */ jsx54(
|
|
25520
26186
|
AuthModal,
|
|
25521
26187
|
{
|
|
25522
26188
|
checkoutEventId: eventId,
|
|
@@ -25545,20 +26211,20 @@ var EventFlow = (flow) => {
|
|
|
25545
26211
|
const flowProps = embeddedCheckoutProps(checkout.store, flow);
|
|
25546
26212
|
const heldEvent = hooks_exports.useEvent(shown.waitingFor ? shown.eventId : void 0).data;
|
|
25547
26213
|
const notice = shown.waitingFor ? heldOrderNotice(heldEvent == null ? void 0 : heldEvent.name) : null;
|
|
25548
|
-
return /* @__PURE__ */
|
|
25549
|
-
notice && /* @__PURE__ */
|
|
25550
|
-
|
|
26214
|
+
return /* @__PURE__ */ jsxs51(Fragment27, { children: [
|
|
26215
|
+
notice && /* @__PURE__ */ jsx54(
|
|
26216
|
+
View49,
|
|
25551
26217
|
{
|
|
25552
26218
|
accessibilityLiveRegion: "polite",
|
|
25553
26219
|
style: [styles20.notice, { borderColor: theme.accent }],
|
|
25554
|
-
children: /* @__PURE__ */
|
|
26220
|
+
children: /* @__PURE__ */ jsx54(Text31, { style: [styles20.noticeText, { color: theme.text }], children: translate(notice.key, notice.params) })
|
|
25555
26221
|
}
|
|
25556
26222
|
),
|
|
25557
|
-
/* @__PURE__ */
|
|
26223
|
+
/* @__PURE__ */ jsx54(Flow, { ...flowProps }, flowProps.eventId)
|
|
25558
26224
|
] });
|
|
25559
26225
|
};
|
|
25560
|
-
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */
|
|
25561
|
-
var styles20 =
|
|
26226
|
+
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */ jsx54(CheckoutProvider, { theme, children: /* @__PURE__ */ jsx54(EventFlow, { ...flow }) });
|
|
26227
|
+
var styles20 = StyleSheet39.create({
|
|
25562
26228
|
content: { padding: 16, gap: 12 },
|
|
25563
26229
|
hidden: { display: "none" },
|
|
25564
26230
|
stack: { gap: 12 },
|
|
@@ -25568,7 +26234,7 @@ var styles20 = StyleSheet38.create({
|
|
|
25568
26234
|
flexDirection: "row",
|
|
25569
26235
|
alignItems: "center",
|
|
25570
26236
|
justifyContent: "space-between",
|
|
25571
|
-
borderWidth:
|
|
26237
|
+
borderWidth: StyleSheet39.hairlineWidth,
|
|
25572
26238
|
borderRadius: 10,
|
|
25573
26239
|
paddingVertical: 10,
|
|
25574
26240
|
paddingHorizontal: 14
|
|
@@ -25579,7 +26245,7 @@ var styles20 = StyleSheet38.create({
|
|
|
25579
26245
|
notice: {
|
|
25580
26246
|
marginHorizontal: 16,
|
|
25581
26247
|
marginTop: 16,
|
|
25582
|
-
borderWidth:
|
|
26248
|
+
borderWidth: StyleSheet39.hairlineWidth,
|
|
25583
26249
|
borderRadius: 10,
|
|
25584
26250
|
paddingVertical: 10,
|
|
25585
26251
|
paddingHorizontal: 14
|
|
@@ -25589,6 +26255,8 @@ var styles20 = StyleSheet38.create({
|
|
|
25589
26255
|
export {
|
|
25590
26256
|
ADD_ON_DEFAULT_MAX_QUANTITY,
|
|
25591
26257
|
Accommodation,
|
|
26258
|
+
AccountDeletion,
|
|
26259
|
+
AccountDeletionView,
|
|
25592
26260
|
AccountRewardsSection,
|
|
25593
26261
|
AddOns,
|
|
25594
26262
|
AuthModal,
|