tf-checkout-react-native 2.0.0-beta.6 → 2.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +90 -4
- package/dist/index.d.ts +90 -4
- package/dist/index.js +1389 -730
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1336 -668
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/sections/AccountDeletion.tsx +329 -0
- package/src/sections/index.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -32,6 +32,8 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ADD_ON_DEFAULT_MAX_QUANTITY: () => ADD_ON_DEFAULT_MAX_QUANTITY,
|
|
34
34
|
Accommodation: () => Accommodation,
|
|
35
|
+
AccountDeletion: () => AccountDeletion,
|
|
36
|
+
AccountDeletionView: () => AccountDeletionView,
|
|
35
37
|
AccountRewardsSection: () => AccountRewardsSection,
|
|
36
38
|
AddOns: () => AddOns,
|
|
37
39
|
AuthModal: () => AuthModal,
|
|
@@ -546,6 +548,8 @@ var import_react29 = require("react");
|
|
|
546
548
|
var import_react_query16 = require("@tanstack/react-query");
|
|
547
549
|
var import_react30 = require("react");
|
|
548
550
|
var import_react31 = require("react");
|
|
551
|
+
var import_react32 = require("react");
|
|
552
|
+
var import_react_query17 = require("@tanstack/react-query");
|
|
549
553
|
var __defProp2 = Object.defineProperty;
|
|
550
554
|
var __export2 = (target, all) => {
|
|
551
555
|
for (var name in all)
|
|
@@ -600,12 +604,13 @@ var getConfig = () => {
|
|
|
600
604
|
var getOriginUrl = () => getConfig().host;
|
|
601
605
|
var isConfigured = () => current !== null;
|
|
602
606
|
var TtfError = class extends Error {
|
|
603
|
-
constructor(message, status, code, data) {
|
|
607
|
+
constructor(message, status, code, data, retryAfter) {
|
|
604
608
|
super(message);
|
|
605
609
|
this.name = "TtfError";
|
|
606
610
|
this.status = status;
|
|
607
611
|
this.code = code;
|
|
608
612
|
this.data = data;
|
|
613
|
+
this.retryAfter = retryAfter;
|
|
609
614
|
}
|
|
610
615
|
};
|
|
611
616
|
var flattenMessages = (value6) => {
|
|
@@ -634,8 +639,14 @@ var codeFrom = (payload) => {
|
|
|
634
639
|
}
|
|
635
640
|
return void 0;
|
|
636
641
|
};
|
|
642
|
+
var retryAfterFrom = (value6) => {
|
|
643
|
+
if (typeof value6 !== "string" && typeof value6 !== "number") return void 0;
|
|
644
|
+
const text3 = String(value6).trim();
|
|
645
|
+
const seconds = /^\d+$/.test(text3) ? Number(text3) : (Date.parse(text3) - Date.now()) / 1e3;
|
|
646
|
+
return Number.isFinite(seconds) && seconds > 0 ? Math.ceil(seconds) : void 0;
|
|
647
|
+
};
|
|
637
648
|
var toTtfError = (error, fallback = "Something went wrong") => {
|
|
638
|
-
var _a, _b, _c;
|
|
649
|
+
var _a, _b, _c, _d, _e;
|
|
639
650
|
if (error instanceof TtfError) return error;
|
|
640
651
|
if (error instanceof import_axios.AxiosError) {
|
|
641
652
|
const status = (_b = (_a = error.response) == null ? void 0 : _a.status) != null ? _b : 0;
|
|
@@ -644,7 +655,8 @@ var toTtfError = (error, fallback = "Something went wrong") => {
|
|
|
644
655
|
messageFrom(payload, error.message || fallback),
|
|
645
656
|
status,
|
|
646
657
|
codeFrom(payload),
|
|
647
|
-
payload
|
|
658
|
+
payload,
|
|
659
|
+
retryAfterFrom((_e = (_d = error.response) == null ? void 0 : _d.headers) == null ? void 0 : _e["retry-after"])
|
|
648
660
|
);
|
|
649
661
|
}
|
|
650
662
|
if (error instanceof Error) return new TtfError(error.message || fallback, 0);
|
|
@@ -923,11 +935,11 @@ var active = null;
|
|
|
923
935
|
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))\/?$/;
|
|
924
936
|
var checkoutGrantEvent = (url2, currentEvent) => {
|
|
925
937
|
if (/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(url2)) return null;
|
|
926
|
-
const
|
|
927
|
-
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(
|
|
938
|
+
const path4 = url2.split(/[?#]/, 1)[0].replace(/^\/+/, "").replace(/^api\//, "");
|
|
939
|
+
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(path4);
|
|
928
940
|
if (event)
|
|
929
941
|
return event[1] === currentEvent && (!event[2] || eventSuffix.test(event[2])) ? event[1] : null;
|
|
930
|
-
if (/^v1\/(?:cart|checkout-configs|checkout|on-checkout)\/?$/.test(
|
|
942
|
+
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))
|
|
931
943
|
return currentEvent;
|
|
932
944
|
return null;
|
|
933
945
|
};
|
|
@@ -1657,23 +1669,23 @@ var missingCheckoutDetails = (state, options = {}) => {
|
|
|
1657
1669
|
return missing;
|
|
1658
1670
|
};
|
|
1659
1671
|
var buildOnCheckoutBody = (input, base = {}) => {
|
|
1660
|
-
const
|
|
1672
|
+
const attributes6 = { ...base };
|
|
1661
1673
|
const buyer2 = input.buyerFields || {};
|
|
1662
1674
|
if (buyer2.phoneVerificationToken)
|
|
1663
|
-
|
|
1675
|
+
attributes6.phone_verification_token = buyer2.phoneVerificationToken;
|
|
1664
1676
|
if (buyer2.phoneVerificationToken && buyer2.phoneFirstUseKnownEmail === true)
|
|
1665
|
-
|
|
1677
|
+
attributes6.phone_first_use_known_email = true;
|
|
1666
1678
|
if (buyer2.nationality !== void 0 && buyer2.nationality !== "") {
|
|
1667
|
-
|
|
1679
|
+
attributes6.nationality = buyer2.nationality;
|
|
1668
1680
|
}
|
|
1669
1681
|
if (buyer2.gender) {
|
|
1670
|
-
|
|
1682
|
+
attributes6.gender = buyer2.gender;
|
|
1671
1683
|
}
|
|
1672
1684
|
if (buyer2.instagramHandle) {
|
|
1673
|
-
|
|
1685
|
+
attributes6.instagram_handle = buyer2.instagramHandle;
|
|
1674
1686
|
}
|
|
1675
1687
|
if (hasKeys(input.dataCapture)) {
|
|
1676
|
-
|
|
1688
|
+
attributes6.data_capture = { ...input.dataCapture };
|
|
1677
1689
|
}
|
|
1678
1690
|
if (input.ticketHolders && input.ticketHolders.length) {
|
|
1679
1691
|
const holders = [];
|
|
@@ -1697,21 +1709,21 @@ var buildOnCheckoutBody = (input, base = {}) => {
|
|
|
1697
1709
|
holders.push(row);
|
|
1698
1710
|
ticketDataCapture.push(hasKeys(capture) ? { ...capture } : {});
|
|
1699
1711
|
});
|
|
1700
|
-
|
|
1712
|
+
attributes6.ticket_holders = holders;
|
|
1701
1713
|
if (hasTicketCapture) {
|
|
1702
|
-
|
|
1714
|
+
attributes6.ticket_data_capture = ticketDataCapture;
|
|
1703
1715
|
}
|
|
1704
1716
|
}
|
|
1705
1717
|
if (hasKeys(input.addOns)) {
|
|
1706
|
-
|
|
1718
|
+
attributes6.add_ons = { ...input.addOns };
|
|
1707
1719
|
}
|
|
1708
1720
|
if (hasKeys(input.addOnDataCapture)) {
|
|
1709
|
-
|
|
1721
|
+
attributes6.add_on_data_capture = { ...input.addOnDataCapture };
|
|
1710
1722
|
}
|
|
1711
1723
|
if (input.waiverSignatures && input.waiverSignatures.length) {
|
|
1712
|
-
|
|
1724
|
+
attributes6.waiver_signatures = input.waiverSignatures.map((entry) => ({ ...entry }));
|
|
1713
1725
|
}
|
|
1714
|
-
return
|
|
1726
|
+
return attributes6;
|
|
1715
1727
|
};
|
|
1716
1728
|
var evaluateFieldGates = (gates) => {
|
|
1717
1729
|
const g = gates || {};
|
|
@@ -1808,9 +1820,9 @@ var buildChangePaymentMethodAttributes = (input) => ({
|
|
|
1808
1820
|
order_hash: input.orderHash,
|
|
1809
1821
|
redirect: false
|
|
1810
1822
|
});
|
|
1811
|
-
var resolvePayPalForm = (
|
|
1812
|
-
const actionUrl =
|
|
1813
|
-
const fields =
|
|
1823
|
+
var resolvePayPalForm = (attributes6) => {
|
|
1824
|
+
const actionUrl = attributes6 && attributes6.action_url;
|
|
1825
|
+
const fields = attributes6 && attributes6.fields;
|
|
1814
1826
|
if (typeof actionUrl !== "string" || !actionUrl) return null;
|
|
1815
1827
|
if (!fields || typeof fields !== "object") return null;
|
|
1816
1828
|
return { action_url: actionUrl, fields };
|
|
@@ -2136,8 +2148,8 @@ var rewardsFromResponse = (response) => {
|
|
|
2136
2148
|
if (!isObject(response)) return null;
|
|
2137
2149
|
if (looksLikeRewards(response)) return response;
|
|
2138
2150
|
const data = isObject(response.data) ? response.data : {};
|
|
2139
|
-
const
|
|
2140
|
-
for (const candidate of [
|
|
2151
|
+
const attributes6 = isObject(data.attributes) ? data.attributes : {};
|
|
2152
|
+
for (const candidate of [attributes6.rewards, data.rewards, response.rewards]) {
|
|
2141
2153
|
if (looksLikeRewards(candidate)) return candidate;
|
|
2142
2154
|
}
|
|
2143
2155
|
return null;
|
|
@@ -3172,8 +3184,8 @@ var mapBundle = (b) => {
|
|
|
3172
3184
|
maxQuantity: max
|
|
3173
3185
|
};
|
|
3174
3186
|
};
|
|
3175
|
-
var bundlesFromCatalog = (
|
|
3176
|
-
const attrs =
|
|
3187
|
+
var bundlesFromCatalog = (attributes6) => {
|
|
3188
|
+
const attrs = attributes6 != null ? attributes6 : {};
|
|
3177
3189
|
return asList(attrs.bundles).map(mapBundle).filter((bundle) => bundle.id !== "");
|
|
3178
3190
|
};
|
|
3179
3191
|
var bundleQuantityRange = (bundle) => {
|
|
@@ -4180,18 +4192,18 @@ var ticketChangeDoneCopy = (result2) => {
|
|
|
4180
4192
|
var slotAlternativesFromError = (error) => {
|
|
4181
4193
|
const e = error != null ? error : {};
|
|
4182
4194
|
const payload = e.data && typeof e.data === "object" ? e.data : e;
|
|
4183
|
-
return list(payload.alternatives).map((
|
|
4195
|
+
return list(payload.alternatives).map((s6) => {
|
|
4184
4196
|
var _a, _b, _c, _d, _e;
|
|
4185
4197
|
return {
|
|
4186
|
-
ticketTypeId: String((_a =
|
|
4187
|
-
label: String((_c = (_b =
|
|
4188
|
-
startsAt: String((_d =
|
|
4189
|
-
slotValue: String((_e =
|
|
4198
|
+
ticketTypeId: String((_a = s6.ticketTypeId) != null ? _a : ""),
|
|
4199
|
+
label: String((_c = (_b = s6.label) != null ? _b : s6.startsAt) != null ? _c : ""),
|
|
4200
|
+
startsAt: String((_d = s6.startsAt) != null ? _d : ""),
|
|
4201
|
+
slotValue: String((_e = s6.slotValue) != null ? _e : "")
|
|
4190
4202
|
};
|
|
4191
|
-
}).filter((
|
|
4203
|
+
}).filter((s6) => s6.ticketTypeId !== "" && s6.label !== "").slice(0, 3);
|
|
4192
4204
|
};
|
|
4193
4205
|
var ticketChangeView = (options) => options.canChange ? "choose" : "closed";
|
|
4194
|
-
var resolveSiteUrl = (
|
|
4206
|
+
var resolveSiteUrl = (path4, origin) => /^https?:\/\//i.test(path4) ? path4 : `${origin.replace(/\/+$/, "")}/${path4.replace(/^\/+/, "")}`;
|
|
4195
4207
|
var ticketChangeAccessKey = (access) => {
|
|
4196
4208
|
var _a;
|
|
4197
4209
|
return JSON.stringify([access.ticketHash, (_a = access.orderHash) != null ? _a : ""]);
|
|
@@ -4389,8 +4401,8 @@ var signaturePngDataUrl = (strokes, { padWidth, padHeight, width = 600, lineWidt
|
|
|
4389
4401
|
const a = points[i - 1];
|
|
4390
4402
|
const b = points[i];
|
|
4391
4403
|
const steps = Math.max(1, Math.ceil(Math.hypot(b.x - a.x, b.y - a.y) * 2));
|
|
4392
|
-
for (let
|
|
4393
|
-
ink(a.x + (b.x - a.x) *
|
|
4404
|
+
for (let s6 = 0; s6 <= steps; s6++) {
|
|
4405
|
+
ink(a.x + (b.x - a.x) * s6 / steps, a.y + (b.y - a.y) * s6 / steps);
|
|
4394
4406
|
}
|
|
4395
4407
|
}
|
|
4396
4408
|
}
|
|
@@ -4653,23 +4665,23 @@ var waiverSignaturesAttribute = (waiver, signatures, holders, billing, backfille
|
|
|
4653
4665
|
backfilledHolderIndexes
|
|
4654
4666
|
);
|
|
4655
4667
|
if (!waiver || !counted) return [];
|
|
4656
|
-
return Object.entries(counted).map(([index,
|
|
4668
|
+
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]) => {
|
|
4657
4669
|
var _a, _b, _c, _d;
|
|
4658
4670
|
return {
|
|
4659
4671
|
holder_index: index,
|
|
4660
4672
|
version_id: waiver.versionId,
|
|
4661
4673
|
body_sha256: waiver.bodySha256,
|
|
4662
|
-
signer_role:
|
|
4663
|
-
first_name:
|
|
4664
|
-
last_name:
|
|
4665
|
-
...
|
|
4666
|
-
minor_name: (_a =
|
|
4667
|
-
guardian_relationship: (_b =
|
|
4668
|
-
...
|
|
4674
|
+
signer_role: s6.signerRole,
|
|
4675
|
+
first_name: s6.firstName,
|
|
4676
|
+
last_name: s6.lastName,
|
|
4677
|
+
...s6.signerRole === "guardian" ? {
|
|
4678
|
+
minor_name: (_a = s6.minorName) != null ? _a : "",
|
|
4679
|
+
guardian_relationship: (_b = s6.guardianRelationship) != null ? _b : "",
|
|
4680
|
+
...s6.minorDob ? { minor_dob: s6.minorDob } : {}
|
|
4669
4681
|
} : {},
|
|
4670
|
-
method:
|
|
4671
|
-
...
|
|
4672
|
-
agree_electronic:
|
|
4682
|
+
method: s6.method,
|
|
4683
|
+
...s6.method === "typed" ? { typed_name: (_c = s6.typedName) != null ? _c : "" } : { image_reference: (_d = s6.imageReference) != null ? _d : "" },
|
|
4684
|
+
agree_electronic: s6.agreeElectronic
|
|
4673
4685
|
};
|
|
4674
4686
|
});
|
|
4675
4687
|
};
|
|
@@ -4747,7 +4759,7 @@ var checkoutIsBusy = (snapshot) => {
|
|
|
4747
4759
|
};
|
|
4748
4760
|
var cartTicketCount = (cart) => {
|
|
4749
4761
|
var _a, _b;
|
|
4750
|
-
return cart.selections.reduce((n,
|
|
4762
|
+
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;
|
|
4751
4763
|
};
|
|
4752
4764
|
var cartTicketSlots = (cart) => {
|
|
4753
4765
|
var _a, _b;
|
|
@@ -5847,6 +5859,7 @@ __export2(api_exports, {
|
|
|
5847
5859
|
createPaymentPlan: () => createPaymentPlan,
|
|
5848
5860
|
declineResale: () => declineResale,
|
|
5849
5861
|
decodeShareActionToken: () => decodeShareActionToken,
|
|
5862
|
+
deleteAccount: () => deleteAccount,
|
|
5850
5863
|
disconnectAccount: () => disconnectAccount,
|
|
5851
5864
|
disconnectAppleMusic: () => disconnectAppleMusic,
|
|
5852
5865
|
disconnectSpotify: () => disconnectSpotify,
|
|
@@ -5854,6 +5867,7 @@ __export2(api_exports, {
|
|
|
5854
5867
|
exchangeCheckoutBrowserCode: () => exchangeCheckoutBrowserCode,
|
|
5855
5868
|
filterAddonsForTickets: () => filterAddonsForTickets,
|
|
5856
5869
|
getAccommodation: () => getAccommodation,
|
|
5870
|
+
getAccountDeletionStatus: () => getAccountDeletionStatus,
|
|
5857
5871
|
getAccountRewards: () => getAccountRewards,
|
|
5858
5872
|
getCart: () => getCart,
|
|
5859
5873
|
getCheckoutBuyerProfile: () => getCheckoutBuyerProfile,
|
|
@@ -5959,6 +5973,7 @@ __export2(api_exports, {
|
|
|
5959
5973
|
sdkSeatSessionHeaders: () => sdkSeatSessionHeaders,
|
|
5960
5974
|
seatSelectionSecurity: () => seatSelectionSecurity,
|
|
5961
5975
|
sellTicket: () => sellTicket,
|
|
5976
|
+
sendAccountDeletionCode: () => sendAccountDeletionCode,
|
|
5962
5977
|
sendCheckoutTwoFactorSms: () => sendCheckoutTwoFactorSms,
|
|
5963
5978
|
sendPhoneCode: () => sendPhoneCode,
|
|
5964
5979
|
sendRsvp: () => sendRsvp,
|
|
@@ -6048,15 +6063,15 @@ var assertSuccess = (response) => {
|
|
|
6048
6063
|
}
|
|
6049
6064
|
return response.data;
|
|
6050
6065
|
};
|
|
6051
|
-
var updateAccount = async (
|
|
6066
|
+
var updateAccount = async (attributes6) => {
|
|
6052
6067
|
const response = await patch(ENDPOINTS.profile.account, {
|
|
6053
|
-
data: { attributes:
|
|
6068
|
+
data: { attributes: attributes6 }
|
|
6054
6069
|
});
|
|
6055
6070
|
return assertSuccess(response);
|
|
6056
6071
|
};
|
|
6057
|
-
var updateProfile = async (
|
|
6072
|
+
var updateProfile = async (attributes6) => {
|
|
6058
6073
|
const epoch = getSessionEpoch();
|
|
6059
|
-
const normalized = buildProfileUpdate(
|
|
6074
|
+
const normalized = buildProfileUpdate(attributes6);
|
|
6060
6075
|
const response = await patch(ENDPOINTS.profile.update, {
|
|
6061
6076
|
data: { attributes: normalized }
|
|
6062
6077
|
});
|
|
@@ -6208,13 +6223,13 @@ var register = async (fields) => {
|
|
|
6208
6223
|
return profile;
|
|
6209
6224
|
}
|
|
6210
6225
|
const data = res.data;
|
|
6211
|
-
const
|
|
6212
|
-
if (
|
|
6226
|
+
const attributes6 = data && typeof data === "object" && "attributes" in data ? data.attributes : void 0;
|
|
6227
|
+
if (attributes6 == null ? void 0 : attributes6.access_token) {
|
|
6213
6228
|
assertAuthEpoch(epoch);
|
|
6214
6229
|
setTokens(
|
|
6215
6230
|
{
|
|
6216
|
-
access:
|
|
6217
|
-
refresh:
|
|
6231
|
+
access: attributes6.access_token,
|
|
6232
|
+
refresh: attributes6.refresh_token
|
|
6218
6233
|
},
|
|
6219
6234
|
epoch
|
|
6220
6235
|
);
|
|
@@ -6228,7 +6243,7 @@ var register = async (fields) => {
|
|
|
6228
6243
|
if (error instanceof TtfError && error.code === "two_factor_auth") throw error;
|
|
6229
6244
|
}
|
|
6230
6245
|
}
|
|
6231
|
-
const candidate = (_c =
|
|
6246
|
+
const candidate = (_c = attributes6 == null ? void 0 : attributes6.user_profile) != null ? _c : data;
|
|
6232
6247
|
assertAuthEpoch(epoch);
|
|
6233
6248
|
const firstName = String((_e = (_d = candidate == null ? void 0 : candidate.firstName) != null ? _d : candidate == null ? void 0 : candidate.first_name) != null ? _e : "");
|
|
6234
6249
|
const lastName = String((_g = (_f = candidate == null ? void 0 : candidate.lastName) != null ? _f : candidate == null ? void 0 : candidate.last_name) != null ? _g : "");
|
|
@@ -6656,7 +6671,7 @@ var decodeShareActionToken = (value6, method) => {
|
|
|
6656
6671
|
}
|
|
6657
6672
|
return value6;
|
|
6658
6673
|
};
|
|
6659
|
-
var confirmPreRegistration = async (eventId,
|
|
6674
|
+
var confirmPreRegistration = async (eventId, attributes6) => post(ENDPOINTS.preRegistration.confirm(eventId), { data: { attributes: attributes6 } });
|
|
6660
6675
|
var getInfluencers = async (eventId) => get(ENDPOINTS.preRegistration.influencers(eventId));
|
|
6661
6676
|
var getConfirmationPage = async (hash) => get(ENDPOINTS.preRegistration.confirmationPage(hash));
|
|
6662
6677
|
var submitShareAction = async (hash, input) => {
|
|
@@ -6824,14 +6839,14 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6824
6839
|
const body = await get(ENDPOINTS.events.info(eventId), {
|
|
6825
6840
|
params: pk ? { pk } : void 0
|
|
6826
6841
|
});
|
|
6827
|
-
const
|
|
6828
|
-
const a =
|
|
6842
|
+
const attributes6 = (_b = (_a = body == null ? void 0 : body.data) == null ? void 0 : _a.attributes) != null ? _b : {};
|
|
6843
|
+
const a = attributes6;
|
|
6829
6844
|
const slotSettings = (_d = (_c = a.timeslotSettings) != null ? _c : a.timeslot_settings) != null ? _d : {};
|
|
6830
6845
|
const dates = (_g = (_f = (_e = slotSettings.availableDates) != null ? _e : slotSettings.available_dates) != null ? _f : a.available_dates) != null ? _g : [];
|
|
6831
6846
|
const rawCountry = a.country;
|
|
6832
6847
|
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;
|
|
6833
6848
|
return {
|
|
6834
|
-
isSeatedEvent: isSeatedEvent(
|
|
6849
|
+
isSeatedEvent: isSeatedEvent(attributes6),
|
|
6835
6850
|
tableMapEnabled: Boolean((_k = a.tableMapEnabled) != null ? _k : a.table_map_enabled),
|
|
6836
6851
|
isTimeSlotEvent: Boolean(
|
|
6837
6852
|
(_n = (_m = (_l = a.isTimeSlotEvent) != null ? _l : a.is_time_slot_event) != null ? _m : a.time_slot_event) != null ? _n : a.is_timeslot
|
|
@@ -6840,8 +6855,8 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6840
6855
|
allowMultipleTicketTypePurchases: Boolean(
|
|
6841
6856
|
(_o = a.allowMultipleTicketTypePurchases) != null ? _o : a.allow_multiple_ticket_type_purchases
|
|
6842
6857
|
),
|
|
6843
|
-
slug: (_p =
|
|
6844
|
-
name: (_q =
|
|
6858
|
+
slug: (_p = attributes6.slug) != null ? _p : null,
|
|
6859
|
+
name: (_q = attributes6.name) != null ? _q : null,
|
|
6845
6860
|
countryCode: countryCode ? String(countryCode).toUpperCase() : null
|
|
6846
6861
|
};
|
|
6847
6862
|
};
|
|
@@ -6879,30 +6894,30 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
|
6879
6894
|
for (const hourKey of Object.keys(hours != null ? hours : {}).sort()) {
|
|
6880
6895
|
const times = (_e = hours[hourKey]) != null ? _e : {};
|
|
6881
6896
|
for (const timeKey of Object.keys(times).sort()) {
|
|
6882
|
-
for (const
|
|
6883
|
-
if (!(
|
|
6884
|
-
const stock = Number((_h = (_g =
|
|
6897
|
+
for (const s6 of Object.values((_f = times[timeKey]) != null ? _f : {})) {
|
|
6898
|
+
if (!(s6 == null ? void 0 : s6.matrix_record_id)) continue;
|
|
6899
|
+
const stock = Number((_h = (_g = s6.in_stock) != null ? _g : s6.real_stock) != null ? _h : 0);
|
|
6885
6900
|
out.push({
|
|
6886
|
-
id: String(
|
|
6887
|
-
name:
|
|
6888
|
-
groupName: (_j = (_i =
|
|
6889
|
-
optionName: String((_k =
|
|
6890
|
-
price: Number((_l =
|
|
6891
|
-
priceWithFees: Number((_n = (_m =
|
|
6892
|
-
priceSymbol: (_p = (_o =
|
|
6901
|
+
id: String(s6.matrix_record_id),
|
|
6902
|
+
name: s6.display_name || s6.option_value || "Ticket",
|
|
6903
|
+
groupName: (_j = (_i = s6.group_name) != null ? _i : s6.groupName) != null ? _j : null,
|
|
6904
|
+
optionName: String((_k = s6.option_key) != null ? _k : ""),
|
|
6905
|
+
price: Number((_l = s6.base_price) != null ? _l : 0),
|
|
6906
|
+
priceWithFees: Number((_n = (_m = s6.price_with_fees) != null ? _m : s6.base_price) != null ? _n : 0),
|
|
6907
|
+
priceSymbol: (_p = (_o = s6.price_symbol) != null ? _o : s6.priceSymbol) != null ? _p : "",
|
|
6893
6908
|
currency: "",
|
|
6894
6909
|
feeIncluded: false,
|
|
6895
|
-
depositPercent:
|
|
6896
|
-
soldOut: Boolean(
|
|
6897
|
-
salesStarted:
|
|
6898
|
-
salesEnded: Boolean(
|
|
6899
|
-
minQuantity: Number((_q =
|
|
6900
|
-
maxQuantity: Number((_r =
|
|
6901
|
-
multiplier: Number((_s =
|
|
6902
|
-
isTable: Boolean(
|
|
6910
|
+
depositPercent: s6.deposit_percent != null ? Number(s6.deposit_percent) : null,
|
|
6911
|
+
soldOut: Boolean(s6.sold_out) || stock <= 0,
|
|
6912
|
+
salesStarted: s6.sales_started != null ? Boolean(s6.sales_started) : true,
|
|
6913
|
+
salesEnded: Boolean(s6.sales_ended),
|
|
6914
|
+
minQuantity: Number((_q = s6.min_quantity) != null ? _q : 1) || 1,
|
|
6915
|
+
maxQuantity: Number((_r = s6.max_quantity) != null ? _r : 10) || 10,
|
|
6916
|
+
multiplier: Number((_s = s6.multiplier) != null ? _s : 1) || 1,
|
|
6917
|
+
isTable: Boolean(s6.is_table),
|
|
6903
6918
|
allowDirectPurchase: true,
|
|
6904
|
-
descriptionRich: (_t =
|
|
6905
|
-
badgeText: badgeOf((_u =
|
|
6919
|
+
descriptionRich: (_t = s6.description) != null ? _t : null,
|
|
6920
|
+
badgeText: badgeOf((_u = s6.badge_text) != null ? _u : s6.badgeText),
|
|
6906
6921
|
timeSlot: { date: slotDate, time: timeKey }
|
|
6907
6922
|
});
|
|
6908
6923
|
}
|
|
@@ -7328,7 +7343,7 @@ var createOrder = async (input) => {
|
|
|
7328
7343
|
billing,
|
|
7329
7344
|
input.backfilledHolderIndexes
|
|
7330
7345
|
);
|
|
7331
|
-
const
|
|
7346
|
+
const attributes6 = buildOnCheckoutBody(
|
|
7332
7347
|
{
|
|
7333
7348
|
buyerFields: {
|
|
7334
7349
|
phoneVerificationToken: billing.phoneVerificationToken,
|
|
@@ -7381,7 +7396,7 @@ var createOrder = async (input) => {
|
|
|
7381
7396
|
} : {}
|
|
7382
7397
|
}
|
|
7383
7398
|
);
|
|
7384
|
-
const body = await post(ENDPOINTS.order.create, { data: { attributes:
|
|
7399
|
+
const body = await post(ENDPOINTS.order.create, { data: { attributes: attributes6 } });
|
|
7385
7400
|
const a = (_b = body == null ? void 0 : body.data) == null ? void 0 : _b.attributes;
|
|
7386
7401
|
if (!(a == null ? void 0 : a.hash)) throw new TtfError("Order was not created (no hash in response).", 0);
|
|
7387
7402
|
return {
|
|
@@ -7421,8 +7436,8 @@ var mapProfileToBilling = (profile) => {
|
|
|
7421
7436
|
var _a, _b, _c, _d;
|
|
7422
7437
|
const str = (v) => v == null || v === "" ? void 0 : String(v);
|
|
7423
7438
|
const idStr = (v) => {
|
|
7424
|
-
const
|
|
7425
|
-
return
|
|
7439
|
+
const s6 = str(v);
|
|
7440
|
+
return s6 === void 0 || s6 === "0" || s6 === "-1" ? void 0 : s6;
|
|
7426
7441
|
};
|
|
7427
7442
|
const dobParts = /^(\d{4})-(\d{2})-(\d{2})/.exec((_a = profile.dateOfBirth) != null ? _a : "");
|
|
7428
7443
|
const dob = dobParts && Number(dobParts[1]) > 1900 ? {
|
|
@@ -7539,9 +7554,9 @@ var chargeSavedCardPlan = async (orderHash, paymentMethodId) => {
|
|
|
7539
7554
|
clientSecret: typeof inner.client_secret === "string" ? inner.client_secret : void 0
|
|
7540
7555
|
};
|
|
7541
7556
|
};
|
|
7542
|
-
var changePaymentMethod = async (
|
|
7557
|
+
var changePaymentMethod = async (attributes6) => {
|
|
7543
7558
|
await post(ENDPOINTS.payment.changeMethod, {
|
|
7544
|
-
data: { attributes:
|
|
7559
|
+
data: { attributes: attributes6 }
|
|
7545
7560
|
});
|
|
7546
7561
|
};
|
|
7547
7562
|
var getPayPalForm = async (orderHash) => {
|
|
@@ -8480,14 +8495,14 @@ var unwrap3 = (response) => {
|
|
|
8480
8495
|
return response.data;
|
|
8481
8496
|
};
|
|
8482
8497
|
var getWordPostReaction = async (postId) => {
|
|
8483
|
-
const
|
|
8498
|
+
const path4 = endpoint(postId);
|
|
8484
8499
|
const epoch = getSessionEpoch();
|
|
8485
|
-
const result2 = unwrap3(await get(
|
|
8500
|
+
const result2 = unwrap3(await get(path4));
|
|
8486
8501
|
assertSessionEpoch(epoch);
|
|
8487
8502
|
return result2;
|
|
8488
8503
|
};
|
|
8489
8504
|
var setWordPostReaction = async (postId, reaction, revision) => {
|
|
8490
|
-
const
|
|
8505
|
+
const path4 = endpoint(postId);
|
|
8491
8506
|
if (![null, "up", "down"].includes(reaction) || !Number.isSafeInteger(revision) || revision < 0)
|
|
8492
8507
|
throw new TtfError(
|
|
8493
8508
|
"Choose an article reaction and try again.",
|
|
@@ -8498,7 +8513,7 @@ var setWordPostReaction = async (postId, reaction, revision) => {
|
|
|
8498
8513
|
const security2 = await sessionWriteSecurity(epoch);
|
|
8499
8514
|
assertSessionEpoch(epoch);
|
|
8500
8515
|
const result2 = unwrap3(
|
|
8501
|
-
await put(
|
|
8516
|
+
await put(path4, { reaction, revision }, security2)
|
|
8502
8517
|
);
|
|
8503
8518
|
assertSessionEpoch(epoch);
|
|
8504
8519
|
return result2;
|
|
@@ -8668,6 +8683,98 @@ var cancelTicketGift = async (hash, tokenId) => {
|
|
|
8668
8683
|
)
|
|
8669
8684
|
);
|
|
8670
8685
|
};
|
|
8686
|
+
var path3 = "/customer/account-deletion";
|
|
8687
|
+
var requireAccount2 = () => {
|
|
8688
|
+
if (!getConfig().accountAuth || !getConfig().cookieAuth || !isAuthenticated() || !getConfirmedBuyerId())
|
|
8689
|
+
throw new TtfError("Sign in to your Ticket Fairy account to delete it.", 401);
|
|
8690
|
+
};
|
|
8691
|
+
var invalid = () => {
|
|
8692
|
+
throw new TtfError("Account deletion could not be confirmed. Try again.", 502);
|
|
8693
|
+
};
|
|
8694
|
+
var attributes5 = (raw) => {
|
|
8695
|
+
var _a, _b, _c, _d;
|
|
8696
|
+
if ((raw == null ? void 0 : raw.success) === false || (raw == null ? void 0 : raw.error) === true)
|
|
8697
|
+
throw new TtfError(
|
|
8698
|
+
typeof raw.message === "string" ? raw.message : "Unable to update your account.",
|
|
8699
|
+
typeof raw.status === "number" ? raw.status : 422,
|
|
8700
|
+
typeof raw.code === "string" ? raw.code : void 0,
|
|
8701
|
+
raw
|
|
8702
|
+
);
|
|
8703
|
+
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 : {};
|
|
8704
|
+
};
|
|
8705
|
+
var brand = (value6) => {
|
|
8706
|
+
if (!Number.isSafeInteger(value6 == null ? void 0 : value6.id) || value6.id <= 0 || typeof value6.name !== "string")
|
|
8707
|
+
invalid();
|
|
8708
|
+
let teamUrl;
|
|
8709
|
+
if (typeof value6.teamUrl === "string") {
|
|
8710
|
+
try {
|
|
8711
|
+
const url2 = new URL(value6.teamUrl);
|
|
8712
|
+
if (url2.protocol === "https:" && !url2.port && !url2.username && !url2.password && !url2.search && !url2.hash && [
|
|
8713
|
+
"manage.ticketfairy.com",
|
|
8714
|
+
"manage.theticketfairy.com",
|
|
8715
|
+
"test-manage.ticketfairy.com",
|
|
8716
|
+
"preproduction-manage.ticketfairy.com"
|
|
8717
|
+
].includes(url2.hostname) && url2.pathname === `/brand/${value6.id}/team`)
|
|
8718
|
+
teamUrl = url2.toString();
|
|
8719
|
+
} catch (e) {
|
|
8720
|
+
}
|
|
8721
|
+
}
|
|
8722
|
+
return { id: value6.id, name: value6.name, ...teamUrl ? { teamUrl } : {} };
|
|
8723
|
+
};
|
|
8724
|
+
var getAccountDeletionStatus = async () => {
|
|
8725
|
+
requireAccount2();
|
|
8726
|
+
const assertOwner = captureSessionAction();
|
|
8727
|
+
const value6 = attributes5(await get(path3));
|
|
8728
|
+
assertOwner();
|
|
8729
|
+
if (typeof value6.canDelete !== "boolean" || typeof value6.email !== "string" || !["password", "email_code"].includes(value6.verification) || typeof value6.appleLinked !== "boolean" || !Array.isArray(value6.blockers))
|
|
8730
|
+
invalid();
|
|
8731
|
+
const blockers = value6.blockers.map((row) => {
|
|
8732
|
+
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")
|
|
8733
|
+
invalid();
|
|
8734
|
+
return {
|
|
8735
|
+
code: row.code,
|
|
8736
|
+
message: row.message,
|
|
8737
|
+
...row.brands ? { brands: row.brands.map(brand) } : {},
|
|
8738
|
+
...row.moreBrands !== void 0 ? { moreBrands: row.moreBrands } : {}
|
|
8739
|
+
};
|
|
8740
|
+
});
|
|
8741
|
+
if (value6.canDelete !== (blockers.length === 0)) invalid();
|
|
8742
|
+
return {
|
|
8743
|
+
canDelete: value6.canDelete,
|
|
8744
|
+
verification: value6.verification,
|
|
8745
|
+
email: value6.email,
|
|
8746
|
+
appleLinked: value6.appleLinked,
|
|
8747
|
+
blockers
|
|
8748
|
+
};
|
|
8749
|
+
};
|
|
8750
|
+
var sendAccountDeletionCode = async (language = "en") => {
|
|
8751
|
+
requireAccount2();
|
|
8752
|
+
const assertOwner = captureSessionAction();
|
|
8753
|
+
const security2 = await sessionWriteSecurity();
|
|
8754
|
+
assertOwner();
|
|
8755
|
+
const value6 = attributes5(
|
|
8756
|
+
await post(`${path3}/code`, { data: { attributes: { language } } }, security2)
|
|
8757
|
+
);
|
|
8758
|
+
assertOwner();
|
|
8759
|
+
if (typeof value6.email !== "string" || !Number.isFinite(value6.expiresInMinutes) || value6.expiresInMinutes <= 0)
|
|
8760
|
+
invalid();
|
|
8761
|
+
return { email: value6.email, expiresInMinutes: value6.expiresInMinutes };
|
|
8762
|
+
};
|
|
8763
|
+
var deleteAccount = async (proof) => {
|
|
8764
|
+
requireAccount2();
|
|
8765
|
+
const keys = proof && typeof proof === "object" ? Object.keys(proof) : [];
|
|
8766
|
+
if (keys.length !== 1 || !["password", "code"].includes(keys[0]) || typeof proof[keys[0]] !== "string" || !proof[keys[0]])
|
|
8767
|
+
throw new TtfError("Enter your password or the code sent to your email.", 422);
|
|
8768
|
+
const assertOwner = captureSessionAction();
|
|
8769
|
+
const security2 = await sessionWriteSecurity();
|
|
8770
|
+
assertOwner();
|
|
8771
|
+
const value6 = attributes5(await post(path3, { data: { attributes: proof } }, security2));
|
|
8772
|
+
assertOwner();
|
|
8773
|
+
if (value6.deleted !== true || !Number.isSafeInteger(value6.teamsLeft) || value6.teamsLeft < 0)
|
|
8774
|
+
invalid();
|
|
8775
|
+
clearSession();
|
|
8776
|
+
return { deleted: true, teamsLeft: value6.teamsLeft };
|
|
8777
|
+
};
|
|
8671
8778
|
var retiredStores = /* @__PURE__ */ new WeakSet();
|
|
8672
8779
|
var retireCheckoutStore = (store) => {
|
|
8673
8780
|
retiredStores.add(store);
|
|
@@ -10316,7 +10423,7 @@ var bundleFlowAvailable = (draft, catalog, catalogState) => {
|
|
|
10316
10423
|
];
|
|
10317
10424
|
const slots = bundleHolderSlots(catalog, bundleSelectionAttribute(qty));
|
|
10318
10425
|
const holders = draft.holders.filter(
|
|
10319
|
-
(h) => !changed.includes(h.bundleId) || slots.some((
|
|
10426
|
+
(h) => !changed.includes(h.bundleId) || slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex)
|
|
10320
10427
|
);
|
|
10321
10428
|
return { draft: { ...draft, qty, holders }, removed, reduced, belowMinimum };
|
|
10322
10429
|
};
|
|
@@ -10361,7 +10468,7 @@ var bundleDraftWithHolder = (draft, slot, next) => {
|
|
|
10361
10468
|
var bundleFlowInput = (eventId, draft, slots) => {
|
|
10362
10469
|
const selection = bundleSelectionAttribute(draft.qty);
|
|
10363
10470
|
const holders = draft.holders.filter(
|
|
10364
|
-
(h) => slots.some((
|
|
10471
|
+
(h) => slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex) && (h.firstName.trim() || h.lastName.trim())
|
|
10365
10472
|
);
|
|
10366
10473
|
const buyer2 = holders.length ? { ...draft.buyer, holders } : { ...draft.buyer };
|
|
10367
10474
|
return {
|
|
@@ -10969,6 +11076,9 @@ var ttf = {
|
|
|
10969
11076
|
sendCheckoutTwoFactorSms,
|
|
10970
11077
|
cancelCheckoutTwoFactor,
|
|
10971
11078
|
logoutFromCheckout,
|
|
11079
|
+
getAccountDeletionStatus,
|
|
11080
|
+
sendAccountDeletionCode,
|
|
11081
|
+
deleteAccount,
|
|
10972
11082
|
getLinkedAccounts,
|
|
10973
11083
|
linkAccount,
|
|
10974
11084
|
disconnectAccount,
|
|
@@ -11178,6 +11288,7 @@ __export2(hooks_exports, {
|
|
|
11178
11288
|
ticketHolderFor: () => ticketHolderFor,
|
|
11179
11289
|
ttfKeys: () => ttfKeys,
|
|
11180
11290
|
useAccommodationSelection: () => useAccommodationSelection,
|
|
11291
|
+
useAccountDeletion: () => useAccountDeletion,
|
|
11181
11292
|
useAccountPreferences: () => useAccountPreferences,
|
|
11182
11293
|
useAccountRewards: () => useAccountRewards,
|
|
11183
11294
|
useAccountRewardsSummary: () => useAccountRewardsSummary,
|
|
@@ -12310,23 +12421,23 @@ var useSeatSelection = (eventId, checkout, onContinue) => {
|
|
|
12310
12421
|
ttf.seatmap.data(eventId).then((response) => {
|
|
12311
12422
|
var _a, _b, _c;
|
|
12312
12423
|
if (!current4 || !active2()) return;
|
|
12313
|
-
const
|
|
12314
|
-
if ((
|
|
12315
|
-
setChart({ state: "provider", data:
|
|
12424
|
+
const attributes6 = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.attributes;
|
|
12425
|
+
if ((attributes6 == null ? void 0 : attributes6.provider) === "seats_io") {
|
|
12426
|
+
setChart({ state: "provider", data: attributes6 });
|
|
12316
12427
|
return;
|
|
12317
12428
|
}
|
|
12318
|
-
if (!
|
|
12429
|
+
if (!attributes6 || attributes6.seatData == null) {
|
|
12319
12430
|
setChart({ state: "empty" });
|
|
12320
12431
|
return;
|
|
12321
12432
|
}
|
|
12322
12433
|
const data = {
|
|
12323
|
-
seatData: typeof
|
|
12324
|
-
ticketTypeTierRelations: (_b =
|
|
12325
|
-
eventSeats: (_c =
|
|
12326
|
-
seatReservationTime: Number(
|
|
12327
|
-
seatMapType: typeof
|
|
12328
|
-
tierPrices:
|
|
12329
|
-
predefinedSeats:
|
|
12434
|
+
seatData: typeof attributes6.seatData === "string" ? JSON.parse(attributes6.seatData) : attributes6.seatData,
|
|
12435
|
+
ticketTypeTierRelations: (_b = attributes6.ticketTypeTierRelations) != null ? _b : {},
|
|
12436
|
+
eventSeats: (_c = attributes6.eventSeats) != null ? _c : [],
|
|
12437
|
+
seatReservationTime: Number(attributes6.seatReservationTime) || 0,
|
|
12438
|
+
seatMapType: typeof attributes6.seatMapType === "string" ? attributes6.seatMapType : null,
|
|
12439
|
+
tierPrices: attributes6.tierPrices,
|
|
12440
|
+
predefinedSeats: attributes6.predefinedSeats
|
|
12330
12441
|
};
|
|
12331
12442
|
chartRef.current = data;
|
|
12332
12443
|
setChart({ state: "ready", data });
|
|
@@ -15848,6 +15959,221 @@ var useReceiptRewards = ({ orderHash, data }) => {
|
|
|
15848
15959
|
submitDetails: (award, details) => run("details", () => ttf.rewards.submitPrizeDetails(hash, award, details))
|
|
15849
15960
|
};
|
|
15850
15961
|
};
|
|
15962
|
+
var useAccountDeletion = () => {
|
|
15963
|
+
var _a;
|
|
15964
|
+
const session = useAuthSession();
|
|
15965
|
+
const configuration2 = getConfig();
|
|
15966
|
+
const scope = session.sessionScope;
|
|
15967
|
+
const epoch = getSessionEpoch();
|
|
15968
|
+
const assertOwner = captureSessionAction();
|
|
15969
|
+
const accountSession = Boolean(
|
|
15970
|
+
configuration2.accountAuth && configuration2.cookieAuth && session.isAuthenticated
|
|
15971
|
+
);
|
|
15972
|
+
const profile = useProfile({
|
|
15973
|
+
enabled: accountSession && !session.buyerId,
|
|
15974
|
+
retry: false
|
|
15975
|
+
});
|
|
15976
|
+
const confirmingAccount = Boolean(accountSession && !session.buyerId && !profile.error);
|
|
15977
|
+
const signedIn = Boolean(accountSession && session.buyerId);
|
|
15978
|
+
const empty = () => ({
|
|
15979
|
+
scope,
|
|
15980
|
+
configuration: configuration2,
|
|
15981
|
+
isOpen: false,
|
|
15982
|
+
proof: "",
|
|
15983
|
+
busy: false,
|
|
15984
|
+
error: "",
|
|
15985
|
+
codeSent: null,
|
|
15986
|
+
retryAfter: 0,
|
|
15987
|
+
deleted: false
|
|
15988
|
+
});
|
|
15989
|
+
const [stored, setStored] = (0, import_react32.useState)(empty);
|
|
15990
|
+
const current4 = stored.scope === scope && stored.configuration === configuration2;
|
|
15991
|
+
const state = current4 ? stored : empty();
|
|
15992
|
+
const active2 = (0, import_react32.useRef)(true);
|
|
15993
|
+
const pending2 = (0, import_react32.useRef)(null);
|
|
15994
|
+
const cooldowns = (0, import_react32.useRef)({ scope, configuration: configuration2, code: 0, confirm: 0 });
|
|
15995
|
+
const editor = (0, import_react32.useRef)({ scope, configuration: configuration2, generation: 0, isOpen: false, proof: "" });
|
|
15996
|
+
const generation = editor.current.generation;
|
|
15997
|
+
const client = (0, import_react_query17.useQueryClient)();
|
|
15998
|
+
const query = useSessionQuery({
|
|
15999
|
+
queryKey: ["ttf", "account-deletion"],
|
|
16000
|
+
queryFn: getAccountDeletionStatus,
|
|
16001
|
+
enabled: signedIn,
|
|
16002
|
+
retry: false
|
|
16003
|
+
});
|
|
16004
|
+
const owns = () => {
|
|
16005
|
+
try {
|
|
16006
|
+
assertOwner();
|
|
16007
|
+
return active2.current;
|
|
16008
|
+
} catch (e) {
|
|
16009
|
+
return false;
|
|
16010
|
+
}
|
|
16011
|
+
};
|
|
16012
|
+
(0, import_react32.useEffect)(() => {
|
|
16013
|
+
active2.current = true;
|
|
16014
|
+
return () => {
|
|
16015
|
+
active2.current = false;
|
|
16016
|
+
};
|
|
16017
|
+
}, []);
|
|
16018
|
+
(0, import_react32.useEffect)(() => {
|
|
16019
|
+
setStored(
|
|
16020
|
+
(value6) => value6.scope === scope && value6.configuration === configuration2 ? value6 : empty()
|
|
16021
|
+
);
|
|
16022
|
+
if (editor.current.scope !== scope || editor.current.configuration !== configuration2)
|
|
16023
|
+
editor.current = {
|
|
16024
|
+
scope,
|
|
16025
|
+
configuration: configuration2,
|
|
16026
|
+
generation: editor.current.generation + 1,
|
|
16027
|
+
isOpen: false,
|
|
16028
|
+
proof: ""
|
|
16029
|
+
};
|
|
16030
|
+
pending2.current = null;
|
|
16031
|
+
if (cooldowns.current.scope !== scope || cooldowns.current.configuration !== configuration2)
|
|
16032
|
+
cooldowns.current = { scope, configuration: configuration2, code: 0, confirm: 0 };
|
|
16033
|
+
}, [scope, configuration2]);
|
|
16034
|
+
(0, import_react32.useEffect)(() => {
|
|
16035
|
+
if (!state.retryAfter) return;
|
|
16036
|
+
const timer = setTimeout(() => {
|
|
16037
|
+
if (owns()) setStored((value6) => ({ ...value6, retryAfter: remainingCooldown() }));
|
|
16038
|
+
}, 1e3);
|
|
16039
|
+
return () => clearTimeout(timer);
|
|
16040
|
+
}, [state.retryAfter, scope, configuration2]);
|
|
16041
|
+
const update = (patch2) => {
|
|
16042
|
+
if (owns())
|
|
16043
|
+
setStored((value6) => ({
|
|
16044
|
+
...value6.scope === scope && value6.configuration === configuration2 ? value6 : empty(),
|
|
16045
|
+
...patch2
|
|
16046
|
+
}));
|
|
16047
|
+
};
|
|
16048
|
+
const ownsEditor = () => owns() && editor.current.scope === scope && editor.current.configuration === configuration2 && editor.current.generation === generation;
|
|
16049
|
+
const remainingCooldown = () => Math.ceil(
|
|
16050
|
+
Math.max(
|
|
16051
|
+
0,
|
|
16052
|
+
cooldowns.current.code - Date.now(),
|
|
16053
|
+
cooldowns.current.confirm - Date.now()
|
|
16054
|
+
) / 1e3
|
|
16055
|
+
);
|
|
16056
|
+
const retry = async () => {
|
|
16057
|
+
if (!owns() || !accountSession) return;
|
|
16058
|
+
update({ error: "" });
|
|
16059
|
+
if (!session.buyerId) await profile.refetch();
|
|
16060
|
+
else await query.refetch();
|
|
16061
|
+
};
|
|
16062
|
+
const perform = async (action, deleting = false) => {
|
|
16063
|
+
var _a2, _b, _c, _d;
|
|
16064
|
+
if (!owns() || !signedIn || pending2.current) return false;
|
|
16065
|
+
const operation = /* @__PURE__ */ Symbol();
|
|
16066
|
+
pending2.current = operation;
|
|
16067
|
+
update({ busy: true, error: "" });
|
|
16068
|
+
try {
|
|
16069
|
+
const result2 = await action();
|
|
16070
|
+
if (deleting) {
|
|
16071
|
+
const retired = getConfig() === configuration2 && !isAuthenticated() && getSessionEpoch() === epoch + 1 && getSessionCacheScope() === scope + 1;
|
|
16072
|
+
client.removeQueries({
|
|
16073
|
+
predicate: (query2) => {
|
|
16074
|
+
const tail = query2.queryKey[query2.queryKey.length - 1];
|
|
16075
|
+
return Boolean(
|
|
16076
|
+
tail && typeof tail === "object" && "tfSessionScope" in tail && tail.tfSessionScope === scope
|
|
16077
|
+
);
|
|
16078
|
+
}
|
|
16079
|
+
});
|
|
16080
|
+
if (!active2.current || !retired) return false;
|
|
16081
|
+
setStored({
|
|
16082
|
+
...empty(),
|
|
16083
|
+
scope: getSessionCacheScope(),
|
|
16084
|
+
busy: false,
|
|
16085
|
+
deleted: true
|
|
16086
|
+
});
|
|
16087
|
+
return true;
|
|
16088
|
+
}
|
|
16089
|
+
if (!owns()) return false;
|
|
16090
|
+
cooldowns.current.code = Date.now() + 6e4;
|
|
16091
|
+
update({
|
|
16092
|
+
busy: false,
|
|
16093
|
+
codeSent: result2,
|
|
16094
|
+
retryAfter: remainingCooldown()
|
|
16095
|
+
});
|
|
16096
|
+
return true;
|
|
16097
|
+
} catch (caught) {
|
|
16098
|
+
if (owns() && !(caught instanceof TtfError && caught.code === "SESSION_CHANGED")) {
|
|
16099
|
+
const details = caught instanceof TtfError ? caught.data : void 0;
|
|
16100
|
+
const seconds = Number(
|
|
16101
|
+
(_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
|
|
16102
|
+
);
|
|
16103
|
+
if (Number.isFinite(seconds) && seconds > 0)
|
|
16104
|
+
cooldowns.current[deleting ? "confirm" : "code"] = Date.now() + Math.ceil(seconds) * 1e3;
|
|
16105
|
+
update({
|
|
16106
|
+
busy: false,
|
|
16107
|
+
error: caught instanceof Error ? caught.message : "Unable to update your account. Try again.",
|
|
16108
|
+
retryAfter: remainingCooldown()
|
|
16109
|
+
});
|
|
16110
|
+
}
|
|
16111
|
+
return false;
|
|
16112
|
+
} finally {
|
|
16113
|
+
if (pending2.current === operation) pending2.current = null;
|
|
16114
|
+
}
|
|
16115
|
+
};
|
|
16116
|
+
return {
|
|
16117
|
+
signedIn,
|
|
16118
|
+
confirmingAccount,
|
|
16119
|
+
status: signedIn ? query.data : void 0,
|
|
16120
|
+
query,
|
|
16121
|
+
retry,
|
|
16122
|
+
canConfirm: Boolean(
|
|
16123
|
+
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)
|
|
16124
|
+
),
|
|
16125
|
+
isOpen: state.isOpen,
|
|
16126
|
+
proof: state.proof,
|
|
16127
|
+
busy: state.busy,
|
|
16128
|
+
error: state.error || (signedIn && query.error instanceof Error ? query.error.message : "") || (accountSession && profile.error instanceof Error ? profile.error.message : ""),
|
|
16129
|
+
codeSent: state.codeSent,
|
|
16130
|
+
retryAfter: state.retryAfter,
|
|
16131
|
+
deleted: state.deleted,
|
|
16132
|
+
open: () => {
|
|
16133
|
+
if (!signedIn || !ownsEditor() || pending2.current) return;
|
|
16134
|
+
editor.current = {
|
|
16135
|
+
scope,
|
|
16136
|
+
configuration: configuration2,
|
|
16137
|
+
generation: generation + 1,
|
|
16138
|
+
isOpen: true,
|
|
16139
|
+
proof: ""
|
|
16140
|
+
};
|
|
16141
|
+
update({ isOpen: true, proof: "", error: "", deleted: false });
|
|
16142
|
+
},
|
|
16143
|
+
cancel: () => {
|
|
16144
|
+
if (!ownsEditor() || pending2.current) return;
|
|
16145
|
+
editor.current = {
|
|
16146
|
+
scope,
|
|
16147
|
+
configuration: configuration2,
|
|
16148
|
+
generation: generation + 1,
|
|
16149
|
+
isOpen: false,
|
|
16150
|
+
proof: ""
|
|
16151
|
+
};
|
|
16152
|
+
update({ isOpen: false, proof: "", error: "" });
|
|
16153
|
+
},
|
|
16154
|
+
setProof: (proof) => {
|
|
16155
|
+
if (!ownsEditor() || !editor.current.isOpen || pending2.current) return;
|
|
16156
|
+
editor.current.proof = proof;
|
|
16157
|
+
update({ proof, error: "" });
|
|
16158
|
+
},
|
|
16159
|
+
sendCode: (language = "en") => {
|
|
16160
|
+
var _a2;
|
|
16161
|
+
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));
|
|
16162
|
+
},
|
|
16163
|
+
confirm: () => {
|
|
16164
|
+
const status = query.data;
|
|
16165
|
+
if (!ownsEditor() || !editor.current.isOpen || Date.now() < cooldowns.current.confirm || !(status == null ? void 0 : status.canDelete) || !editor.current.proof)
|
|
16166
|
+
return Promise.resolve(false);
|
|
16167
|
+
const proof = editor.current.proof;
|
|
16168
|
+
return perform(
|
|
16169
|
+
() => deleteAccount(
|
|
16170
|
+
status.verification === "password" ? { password: proof } : { code: proof.trim() }
|
|
16171
|
+
),
|
|
16172
|
+
true
|
|
16173
|
+
);
|
|
16174
|
+
}
|
|
16175
|
+
};
|
|
16176
|
+
};
|
|
15851
16177
|
var accountEn = {
|
|
15852
16178
|
"account.loading_your_interests": "Loading your interests\u2026",
|
|
15853
16179
|
"account.your_interests_could_not_load": "Your interests could not load.",
|
|
@@ -16550,6 +16876,98 @@ Object.assign(accountEs, {
|
|
|
16550
16876
|
"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.",
|
|
16551
16877
|
"account.sign_in_to_manage_your_music_connections": "Inicia sesi\xF3n para gestionar tus conexiones de m\xFAsica."
|
|
16552
16878
|
});
|
|
16879
|
+
Object.assign(accountEn, {
|
|
16880
|
+
"account.delete_account": "Delete account",
|
|
16881
|
+
"account.account_deleted": "Account deleted",
|
|
16882
|
+
"account.your_ticket_fairy_account_has_been_closed_you_are_signed_out": "Your Ticket Fairy account has been closed. You are signed out.",
|
|
16883
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Financial and transaction records are retained where required.",
|
|
16884
|
+
"account.continue_browsing": "Continue browsing",
|
|
16885
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Sign in to review and delete your Ticket Fairy account.",
|
|
16886
|
+
"account.loading_account_deletion_options": "Loading account deletion options\u2026",
|
|
16887
|
+
"account.account_deletion_options_could_not_load": "Account deletion options could not load.",
|
|
16888
|
+
"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.",
|
|
16889
|
+
"account.what_is_removed": "What is removed",
|
|
16890
|
+
"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.",
|
|
16891
|
+
"account.what_is_kept": "What is kept",
|
|
16892
|
+
"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.",
|
|
16893
|
+
"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.",
|
|
16894
|
+
"account.before_you_delete_your_account": "Before you delete your account",
|
|
16895
|
+
"account.open_name_team_settings": "Open {{name}} team settings",
|
|
16896
|
+
"account.check_again": "Check again",
|
|
16897
|
+
"account.confirm_account_deletion": "Confirm account deletion",
|
|
16898
|
+
"account.delete_your_account_permanently": "Delete your account permanently?",
|
|
16899
|
+
"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.",
|
|
16900
|
+
"account.we_will_email_a_deletion_code_to_email": "We will email a deletion code to {{email}}.",
|
|
16901
|
+
"account.send_a_new_code": "Send a new code",
|
|
16902
|
+
"account.email_deletion_code": "Email deletion code",
|
|
16903
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "A code was sent to {{email}}. It expires in {{minutes}} minutes.",
|
|
16904
|
+
"account.try_again_in_seconds_seconds": "Try again in {{seconds}} seconds.",
|
|
16905
|
+
"account.current_password": "Current password",
|
|
16906
|
+
"account.deletion_code": "Deletion code",
|
|
16907
|
+
"account.keep_account": "Keep account",
|
|
16908
|
+
"account.permanently_delete_account": "Permanently delete account",
|
|
16909
|
+
"account.please_wait": "Please wait\u2026",
|
|
16910
|
+
"account.team_settings": "Team settings",
|
|
16911
|
+
"account.unable_to_open_team_settings_please_try_again": "Unable to open team settings. Please try again.",
|
|
16912
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Sign in to your Ticket Fairy account to delete it.",
|
|
16913
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "Account deletion could not be confirmed. Try again.",
|
|
16914
|
+
"account.unable_to_update_your_account": "Unable to update your account.",
|
|
16915
|
+
"account.unable_to_update_your_account_try_again": "Unable to update your account. Try again.",
|
|
16916
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Enter your password or the code sent to your email.",
|
|
16917
|
+
"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.",
|
|
16918
|
+
"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.",
|
|
16919
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "That code no longer works. Ask for a new code.",
|
|
16920
|
+
"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.",
|
|
16921
|
+
"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.",
|
|
16922
|
+
"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.",
|
|
16923
|
+
"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."
|
|
16924
|
+
});
|
|
16925
|
+
Object.assign(accountEs, {
|
|
16926
|
+
"account.delete_account": "Eliminar cuenta",
|
|
16927
|
+
"account.account_deleted": "Cuenta eliminada",
|
|
16928
|
+
"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.",
|
|
16929
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Los registros financieros y de transacciones se conservan cuando sea necesario.",
|
|
16930
|
+
"account.continue_browsing": "Seguir explorando",
|
|
16931
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Inicia sesi\xF3n para revisar y eliminar tu cuenta de Ticket Fairy.",
|
|
16932
|
+
"account.loading_account_deletion_options": "Cargando las opciones para eliminar la cuenta\u2026",
|
|
16933
|
+
"account.account_deletion_options_could_not_load": "No se pudieron cargar las opciones para eliminar la cuenta.",
|
|
16934
|
+
"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.",
|
|
16935
|
+
"account.what_is_removed": "Qu\xE9 se elimina",
|
|
16936
|
+
"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.",
|
|
16937
|
+
"account.what_is_kept": "Qu\xE9 se conserva",
|
|
16938
|
+
"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.",
|
|
16939
|
+
"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.",
|
|
16940
|
+
"account.before_you_delete_your_account": "Antes de eliminar tu cuenta",
|
|
16941
|
+
"account.open_name_team_settings": "Abrir la configuraci\xF3n del equipo de {{name}}",
|
|
16942
|
+
"account.check_again": "Volver a comprobar",
|
|
16943
|
+
"account.confirm_account_deletion": "Confirmar la eliminaci\xF3n de la cuenta",
|
|
16944
|
+
"account.delete_your_account_permanently": "\xBFEliminar tu cuenta de forma permanente?",
|
|
16945
|
+
"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.",
|
|
16946
|
+
"account.we_will_email_a_deletion_code_to_email": "Enviaremos un c\xF3digo de eliminaci\xF3n a {{email}}.",
|
|
16947
|
+
"account.send_a_new_code": "Enviar un c\xF3digo nuevo",
|
|
16948
|
+
"account.email_deletion_code": "Enviar c\xF3digo de eliminaci\xF3n",
|
|
16949
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "Se envi\xF3 un c\xF3digo a {{email}}. Caduca en {{minutes}} minutos.",
|
|
16950
|
+
"account.try_again_in_seconds_seconds": "Int\xE9ntalo de nuevo en {{seconds}} segundos.",
|
|
16951
|
+
"account.current_password": "Contrase\xF1a actual",
|
|
16952
|
+
"account.deletion_code": "C\xF3digo de eliminaci\xF3n",
|
|
16953
|
+
"account.keep_account": "Conservar cuenta",
|
|
16954
|
+
"account.permanently_delete_account": "Eliminar cuenta permanentemente",
|
|
16955
|
+
"account.please_wait": "Espera un momento\u2026",
|
|
16956
|
+
"account.team_settings": "Configuraci\xF3n del equipo",
|
|
16957
|
+
"account.unable_to_open_team_settings_please_try_again": "No se pudo abrir la configuraci\xF3n del equipo. Int\xE9ntalo de nuevo.",
|
|
16958
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Inicia sesi\xF3n en tu cuenta de Ticket Fairy para eliminarla.",
|
|
16959
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "No se pudo confirmar la eliminaci\xF3n de la cuenta. Int\xE9ntalo de nuevo.",
|
|
16960
|
+
"account.unable_to_update_your_account": "No se pudo actualizar tu cuenta.",
|
|
16961
|
+
"account.unable_to_update_your_account_try_again": "No se pudo actualizar tu cuenta. Int\xE9ntalo de nuevo.",
|
|
16962
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Introduce tu contrase\xF1a o el c\xF3digo enviado a tu correo.",
|
|
16963
|
+
"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.",
|
|
16964
|
+
"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.",
|
|
16965
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "Ese c\xF3digo ya no funciona. Solicita uno nuevo.",
|
|
16966
|
+
"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.",
|
|
16967
|
+
"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.",
|
|
16968
|
+
"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.",
|
|
16969
|
+
"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."
|
|
16970
|
+
});
|
|
16553
16971
|
var en = {
|
|
16554
16972
|
"auth.completionAgree": "I agree to the Terms of Service and Privacy Policy.",
|
|
16555
16973
|
"auth.completionTerms": "Read Terms of Service",
|
|
@@ -17648,27 +18066,27 @@ var translateAccountMessage = (translate2, english, vars) => {
|
|
|
17648
18066
|
};
|
|
17649
18067
|
|
|
17650
18068
|
// src/CardInput.tsx
|
|
17651
|
-
var
|
|
18069
|
+
var import_react38 = require("react");
|
|
17652
18070
|
var import_react_native4 = require("react-native");
|
|
17653
18071
|
var import_stripe_react_native = require("@stripe/stripe-react-native");
|
|
17654
18072
|
|
|
17655
18073
|
// src/ui/CheckoutProvider.tsx
|
|
17656
|
-
var
|
|
17657
|
-
var
|
|
18074
|
+
var import_react37 = require("react");
|
|
18075
|
+
var import_react_query18 = require("@tanstack/react-query");
|
|
17658
18076
|
|
|
17659
18077
|
// src/ui/InstallmentPicker.tsx
|
|
17660
|
-
var
|
|
18078
|
+
var import_react35 = require("react");
|
|
17661
18079
|
var import_react_native2 = require("react-native");
|
|
17662
18080
|
|
|
17663
18081
|
// src/ui/primitives.tsx
|
|
17664
|
-
var
|
|
18082
|
+
var import_react34 = require("react");
|
|
17665
18083
|
var import_react_native = require("react-native");
|
|
17666
18084
|
|
|
17667
18085
|
// src/ui/Frozen.tsx
|
|
17668
|
-
var
|
|
18086
|
+
var import_react33 = require("react");
|
|
17669
18087
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
17670
|
-
var FrozenContext = (0,
|
|
17671
|
-
var useFrozen = () => (0,
|
|
18088
|
+
var FrozenContext = (0, import_react33.createContext)(false);
|
|
18089
|
+
var useFrozen = () => (0, import_react33.useContext)(FrozenContext);
|
|
17672
18090
|
var FrozenFields = ({
|
|
17673
18091
|
frozen = false,
|
|
17674
18092
|
children
|
|
@@ -17691,48 +18109,48 @@ var Card = ({
|
|
|
17691
18109
|
style
|
|
17692
18110
|
}) => {
|
|
17693
18111
|
const theme = useTheme();
|
|
17694
|
-
const
|
|
17695
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.View, { style: [
|
|
18112
|
+
const s6 = useStyles(theme);
|
|
18113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.View, { style: [s6.card, style], children });
|
|
17696
18114
|
};
|
|
17697
18115
|
var SectionHeader = ({
|
|
17698
18116
|
title,
|
|
17699
18117
|
subtitle
|
|
17700
18118
|
}) => {
|
|
17701
18119
|
const theme = useTheme();
|
|
17702
|
-
const
|
|
17703
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native.View, { style:
|
|
17704
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style:
|
|
17705
|
-
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style:
|
|
18120
|
+
const s6 = useStyles(theme);
|
|
18121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native.View, { style: s6.sectionHeader, children: [
|
|
18122
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: s6.sectionTitle, children: title }),
|
|
18123
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: s6.sectionSubtitle, children: subtitle }) : null
|
|
17706
18124
|
] });
|
|
17707
18125
|
};
|
|
17708
18126
|
var Divider = () => {
|
|
17709
18127
|
const theme = useTheme();
|
|
17710
|
-
const
|
|
17711
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.View, { style:
|
|
18128
|
+
const s6 = useStyles(theme);
|
|
18129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.View, { style: s6.divider });
|
|
17712
18130
|
};
|
|
17713
18131
|
var BodyText = ({
|
|
17714
18132
|
children,
|
|
17715
18133
|
style
|
|
17716
18134
|
}) => {
|
|
17717
18135
|
const theme = useTheme();
|
|
17718
|
-
const
|
|
17719
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [
|
|
18136
|
+
const s6 = useStyles(theme);
|
|
18137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [s6.body, style], children });
|
|
17720
18138
|
};
|
|
17721
18139
|
var MutedText = ({
|
|
17722
18140
|
children,
|
|
17723
18141
|
style
|
|
17724
18142
|
}) => {
|
|
17725
18143
|
const theme = useTheme();
|
|
17726
|
-
const
|
|
17727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [
|
|
18144
|
+
const s6 = useStyles(theme);
|
|
18145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [s6.muted, style], children });
|
|
17728
18146
|
};
|
|
17729
18147
|
var ErrorText = ({ children }) => {
|
|
17730
18148
|
const theme = useTheme();
|
|
17731
|
-
const
|
|
18149
|
+
const s6 = useStyles(theme);
|
|
17732
18150
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
17733
18151
|
import_react_native.Text,
|
|
17734
18152
|
{
|
|
17735
|
-
style:
|
|
18153
|
+
style: s6.errorText,
|
|
17736
18154
|
accessibilityRole: "alert",
|
|
17737
18155
|
accessibilityLiveRegion: "assertive",
|
|
17738
18156
|
children
|
|
@@ -17747,7 +18165,7 @@ var Button = ({
|
|
|
17747
18165
|
variant = "primary"
|
|
17748
18166
|
}) => {
|
|
17749
18167
|
const theme = useTheme();
|
|
17750
|
-
const
|
|
18168
|
+
const s6 = useStyles(theme);
|
|
17751
18169
|
const frozen = useFrozen();
|
|
17752
18170
|
const isDisabled = disabled || loading || frozen;
|
|
17753
18171
|
const ghost = variant === "ghost";
|
|
@@ -17759,10 +18177,10 @@ var Button = ({
|
|
|
17759
18177
|
disabled: isDisabled,
|
|
17760
18178
|
onPress,
|
|
17761
18179
|
style: ({ pressed }) => [
|
|
17762
|
-
|
|
17763
|
-
ghost &&
|
|
17764
|
-
isDisabled &&
|
|
17765
|
-
pressed && !isDisabled &&
|
|
18180
|
+
s6.button,
|
|
18181
|
+
ghost && s6.buttonGhost,
|
|
18182
|
+
isDisabled && s6.buttonDisabled,
|
|
18183
|
+
pressed && !isDisabled && s6.buttonPressed
|
|
17766
18184
|
],
|
|
17767
18185
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
17768
18186
|
import_react_native.ActivityIndicator,
|
|
@@ -17770,11 +18188,11 @@ var Button = ({
|
|
|
17770
18188
|
size: "small",
|
|
17771
18189
|
color: ghost ? theme.accent : theme.accentContrast
|
|
17772
18190
|
}
|
|
17773
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [
|
|
18191
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native.Text, { style: [s6.buttonLabel, ghost && s6.buttonLabelGhost], children })
|
|
17774
18192
|
}
|
|
17775
18193
|
);
|
|
17776
18194
|
};
|
|
17777
|
-
var useStyles = (theme) => (0,
|
|
18195
|
+
var useStyles = (theme) => (0, import_react34.useMemo)(
|
|
17778
18196
|
() => import_react_native.StyleSheet.create({
|
|
17779
18197
|
card: {
|
|
17780
18198
|
backgroundColor: theme.surface,
|
|
@@ -17839,9 +18257,9 @@ var useStyles = (theme) => (0, import_react33.useMemo)(
|
|
|
17839
18257
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
17840
18258
|
var useInstallmentPicker = () => {
|
|
17841
18259
|
var _a;
|
|
17842
|
-
const [pending2, setPending] = (0,
|
|
17843
|
-
const [choices] = (0,
|
|
17844
|
-
(0,
|
|
18260
|
+
const [pending2, setPending] = (0, import_react35.useState)(null);
|
|
18261
|
+
const [choices] = (0, import_react35.useState)(() => createInstallmentChoices(setPending));
|
|
18262
|
+
(0, import_react35.useEffect)(() => () => choices.cancel(), [choices]);
|
|
17845
18263
|
const onInstallmentOffers = choices.ask;
|
|
17846
18264
|
const choose = (offer) => pending2 == null ? void 0 : pending2.choose(offer);
|
|
17847
18265
|
const picker = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -17856,7 +18274,7 @@ var useInstallmentPicker = () => {
|
|
|
17856
18274
|
};
|
|
17857
18275
|
var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
17858
18276
|
const theme = useTheme();
|
|
17859
|
-
const
|
|
18277
|
+
const s6 = useStyles2(theme);
|
|
17860
18278
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
17861
18279
|
import_react_native2.Modal,
|
|
17862
18280
|
{
|
|
@@ -17864,25 +18282,25 @@ var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
|
17864
18282
|
transparent: true,
|
|
17865
18283
|
animationType: "fade",
|
|
17866
18284
|
onRequestClose: onClose,
|
|
17867
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.Pressable, { style:
|
|
18285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.Pressable, { style: s6.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native2.Pressable, { style: s6.box, onPress: () => {
|
|
17868
18286
|
}, children: [
|
|
17869
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.Text, { style:
|
|
17870
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.View, { style:
|
|
18287
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.Text, { style: s6.title, accessibilityRole: "header", children: "Pay in installments?" }),
|
|
18288
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native2.View, { style: s6.list, children: (offers != null ? offers : []).map((offer, i) => {
|
|
17871
18289
|
var _a;
|
|
17872
18290
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
17873
18291
|
import_react_native2.Pressable,
|
|
17874
18292
|
{
|
|
17875
18293
|
accessibilityRole: "button",
|
|
17876
|
-
style: ({ pressed }) => [
|
|
18294
|
+
style: ({ pressed }) => [s6.option, pressed && s6.optionPressed],
|
|
17877
18295
|
onPress: () => onChoose(offer),
|
|
17878
18296
|
children: [
|
|
17879
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native2.Text, { style:
|
|
18297
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native2.Text, { style: s6.optionMain, children: [
|
|
17880
18298
|
offer.count,
|
|
17881
18299
|
" \xD7",
|
|
17882
18300
|
" ",
|
|
17883
18301
|
(_a = offer.per_installment_formatted) != null ? _a : offer.per_installment
|
|
17884
18302
|
] }),
|
|
17885
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native2.Text, { style:
|
|
18303
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native2.Text, { style: s6.optionMeta, children: [
|
|
17886
18304
|
offer.total_formatted ? `${offer.total_formatted} total` : "",
|
|
17887
18305
|
offer.diff_from_original_formatted ? ` \xB7 ${offer.diff_from_original_formatted}` : ""
|
|
17888
18306
|
] })
|
|
@@ -17896,7 +18314,7 @@ var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
|
17896
18314
|
}
|
|
17897
18315
|
);
|
|
17898
18316
|
};
|
|
17899
|
-
var useStyles2 = (theme) => (0,
|
|
18317
|
+
var useStyles2 = (theme) => (0, import_react35.useMemo)(
|
|
17900
18318
|
() => import_react_native2.StyleSheet.create({
|
|
17901
18319
|
backdrop: {
|
|
17902
18320
|
flex: 1,
|
|
@@ -17947,15 +18365,15 @@ var useStyles2 = (theme) => (0, import_react34.useMemo)(
|
|
|
17947
18365
|
);
|
|
17948
18366
|
|
|
17949
18367
|
// src/ui/ProviderPages.tsx
|
|
17950
|
-
var
|
|
18368
|
+
var import_react36 = require("react");
|
|
17951
18369
|
var import_react_native3 = require("react-native");
|
|
17952
18370
|
var import_react_native_webview = require("react-native-webview");
|
|
17953
18371
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
17954
18372
|
var useProviderPages = () => {
|
|
17955
|
-
const [pending2, setPending] = (0,
|
|
17956
|
-
const [pages] = (0,
|
|
17957
|
-
(0,
|
|
17958
|
-
(0,
|
|
18373
|
+
const [pending2, setPending] = (0, import_react36.useState)(null);
|
|
18374
|
+
const [pages] = (0, import_react36.useState)(() => createProviderPages(setPending));
|
|
18375
|
+
(0, import_react36.useEffect)(() => () => pages.cancel(), [pages]);
|
|
18376
|
+
(0, import_react36.useEffect)(() => {
|
|
17959
18377
|
if (!pending2) return;
|
|
17960
18378
|
const subscription = import_react_native3.Linking.addEventListener("url", ({ url: url2 }) => {
|
|
17961
18379
|
if (providerPageMatchesReturn(url2, pending2.request.returnUrlPrefix))
|
|
@@ -17974,8 +18392,8 @@ var ProviderPage = ({
|
|
|
17974
18392
|
}) => {
|
|
17975
18393
|
var _a;
|
|
17976
18394
|
const theme = useTheme();
|
|
17977
|
-
const [error, setError] = (0,
|
|
17978
|
-
const [reload, setReload] = (0,
|
|
18395
|
+
const [error, setError] = (0, import_react36.useState)("");
|
|
18396
|
+
const [reload, setReload] = (0, import_react36.useState)(0);
|
|
17979
18397
|
const close = () => settle(pending2.id, { event: "dismiss" });
|
|
17980
18398
|
const source = pending2.request.uri ? { uri: pending2.request.uri } : { html: (_a = pending2.request.html) != null ? _a : "", baseUrl: pending2.request.baseUrl };
|
|
17981
18399
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -18094,26 +18512,26 @@ var resolveTheme = (theme) => {
|
|
|
18094
18512
|
|
|
18095
18513
|
// src/ui/CheckoutProvider.tsx
|
|
18096
18514
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
18097
|
-
var CheckoutCtx = (0,
|
|
18098
|
-
var ThemeCtx = (0,
|
|
18099
|
-
var ValidationCtx = (0,
|
|
18515
|
+
var CheckoutCtx = (0, import_react37.createContext)(null);
|
|
18516
|
+
var ThemeCtx = (0, import_react37.createContext)(resolveTheme());
|
|
18517
|
+
var ValidationCtx = (0, import_react37.createContext)(null);
|
|
18100
18518
|
var sharedQueryClient = null;
|
|
18101
18519
|
var getQueryClient = () => {
|
|
18102
18520
|
if (!sharedQueryClient) {
|
|
18103
|
-
sharedQueryClient = new
|
|
18521
|
+
sharedQueryClient = new import_react_query18.QueryClient({
|
|
18104
18522
|
defaultOptions: { queries: { retry: 1, staleTime: 6e4 } }
|
|
18105
18523
|
});
|
|
18106
18524
|
}
|
|
18107
18525
|
return sharedQueryClient;
|
|
18108
18526
|
};
|
|
18109
18527
|
var CheckoutRoot = ({ checkout, theme, children }) => {
|
|
18110
|
-
const [attempt, setAttempt] = (0,
|
|
18111
|
-
const requestValidation = (0,
|
|
18112
|
-
const validation = (0,
|
|
18528
|
+
const [attempt, setAttempt] = (0, import_react37.useState)(0);
|
|
18529
|
+
const requestValidation = (0, import_react37.useCallback)(() => setAttempt((n) => n + 1), []);
|
|
18530
|
+
const validation = (0, import_react37.useMemo)(
|
|
18113
18531
|
() => ({ attempt, requestValidation }),
|
|
18114
18532
|
[attempt, requestValidation]
|
|
18115
18533
|
);
|
|
18116
|
-
const resolved = (0,
|
|
18534
|
+
const resolved = (0, import_react37.useMemo)(() => resolveTheme(theme), [theme]);
|
|
18117
18535
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckoutCtx.Provider, { value: checkout, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ThemeCtx.Provider, { value: resolved, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ValidationCtx.Provider, { value: validation, children }) }) });
|
|
18118
18536
|
};
|
|
18119
18537
|
var SelfProvidedCheckout = ({
|
|
@@ -18143,19 +18561,19 @@ var CheckoutProvider = ({
|
|
|
18143
18561
|
return (
|
|
18144
18562
|
// `value` present ⇒ don't call `useCheckout()` (no second binding); absent ⇒
|
|
18145
18563
|
// the self-providing branch owns it. The choice is static per mount.
|
|
18146
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
18564
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_query18.QueryClientProvider, { client: queryClient != null ? queryClient : getQueryClient(), children: value6 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckoutRoot, { checkout: value6, ...rest }, sessionKey) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelfProvidedCheckout, { ...rest }, sessionKey) })
|
|
18147
18565
|
);
|
|
18148
18566
|
};
|
|
18149
18567
|
var useCheckoutContext = () => {
|
|
18150
|
-
const ctx = (0,
|
|
18568
|
+
const ctx = (0, import_react37.useContext)(CheckoutCtx);
|
|
18151
18569
|
if (!ctx) {
|
|
18152
18570
|
throw new Error("useCheckoutContext must be used within <CheckoutProvider>.");
|
|
18153
18571
|
}
|
|
18154
18572
|
return ctx;
|
|
18155
18573
|
};
|
|
18156
|
-
var useTheme = () => (0,
|
|
18574
|
+
var useTheme = () => (0, import_react37.useContext)(ThemeCtx);
|
|
18157
18575
|
var useCheckoutValidation = () => {
|
|
18158
|
-
const ctx = (0,
|
|
18576
|
+
const ctx = (0, import_react37.useContext)(ValidationCtx);
|
|
18159
18577
|
if (!ctx) {
|
|
18160
18578
|
throw new Error("useCheckoutValidation must be used within <CheckoutProvider>.");
|
|
18161
18579
|
}
|
|
@@ -18179,11 +18597,11 @@ var CardInput = ({
|
|
|
18179
18597
|
visible = true
|
|
18180
18598
|
}) => {
|
|
18181
18599
|
const theme = useTheme();
|
|
18182
|
-
const [attachment, setAttachment] = (0,
|
|
18183
|
-
const handleRef = (0,
|
|
18184
|
-
const visibleRef = (0,
|
|
18600
|
+
const [attachment, setAttachment] = (0, import_react38.useState)(0);
|
|
18601
|
+
const handleRef = (0, import_react38.useRef)(null);
|
|
18602
|
+
const visibleRef = (0, import_react38.useRef)(visible);
|
|
18185
18603
|
visibleRef.current = visible;
|
|
18186
|
-
(0,
|
|
18604
|
+
(0, import_react38.useEffect)(() => {
|
|
18187
18605
|
const handle = cardFields.mount(
|
|
18188
18606
|
owner,
|
|
18189
18607
|
() => setAttachment((n) => n + 1),
|
|
@@ -18195,7 +18613,7 @@ var CardInput = ({
|
|
|
18195
18613
|
handleRef.current = null;
|
|
18196
18614
|
};
|
|
18197
18615
|
}, [owner]);
|
|
18198
|
-
(0,
|
|
18616
|
+
(0, import_react38.useEffect)(() => {
|
|
18199
18617
|
var _a;
|
|
18200
18618
|
(_a = handleRef.current) == null ? void 0 : _a.setVisible(visible);
|
|
18201
18619
|
}, [visible]);
|
|
@@ -18467,19 +18885,19 @@ var configureCheckout = (config) => configure({
|
|
|
18467
18885
|
});
|
|
18468
18886
|
|
|
18469
18887
|
// src/ui/Field.tsx
|
|
18470
|
-
var
|
|
18888
|
+
var import_react39 = require("react");
|
|
18471
18889
|
var import_react_native6 = require("react-native");
|
|
18472
18890
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
18473
18891
|
var Field = ({ label, error, required, children }) => {
|
|
18474
18892
|
const theme = useTheme();
|
|
18475
|
-
const
|
|
18476
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style:
|
|
18477
|
-
label ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.Text, { style:
|
|
18893
|
+
const s6 = useFieldStyles(theme);
|
|
18894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: s6.field, children: [
|
|
18895
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.Text, { style: s6.label, children: [
|
|
18478
18896
|
label,
|
|
18479
|
-
required ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style:
|
|
18897
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style: s6.required, children: " *" }) : null
|
|
18480
18898
|
] }) : null,
|
|
18481
18899
|
children,
|
|
18482
|
-
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style:
|
|
18900
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style: s6.error, children: error }) : null
|
|
18483
18901
|
] });
|
|
18484
18902
|
};
|
|
18485
18903
|
var Input = ({
|
|
@@ -18490,24 +18908,24 @@ var Input = ({
|
|
|
18490
18908
|
autoCapitalize = "sentences",
|
|
18491
18909
|
secureTextEntry,
|
|
18492
18910
|
editable: editableProp = true,
|
|
18493
|
-
invalid = false,
|
|
18911
|
+
invalid: invalid2 = false,
|
|
18494
18912
|
onBlur,
|
|
18495
18913
|
...nativeProps
|
|
18496
18914
|
}) => {
|
|
18497
18915
|
const frozen = useFrozen();
|
|
18498
18916
|
const editable = editableProp && !frozen;
|
|
18499
18917
|
const theme = useTheme();
|
|
18500
|
-
const
|
|
18501
|
-
const [focused, setFocused] = (0,
|
|
18918
|
+
const s6 = useFieldStyles(theme);
|
|
18919
|
+
const [focused, setFocused] = (0, import_react39.useState)(false);
|
|
18502
18920
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
18503
18921
|
import_react_native6.TextInput,
|
|
18504
18922
|
{
|
|
18505
18923
|
...nativeProps,
|
|
18506
18924
|
style: [
|
|
18507
|
-
|
|
18508
|
-
focused &&
|
|
18509
|
-
|
|
18510
|
-
!editable &&
|
|
18925
|
+
s6.input,
|
|
18926
|
+
focused && s6.inputFocused,
|
|
18927
|
+
invalid2 && s6.inputInvalid,
|
|
18928
|
+
!editable && s6.inputDisabled
|
|
18511
18929
|
],
|
|
18512
18930
|
value: value6,
|
|
18513
18931
|
onChangeText,
|
|
@@ -18526,9 +18944,9 @@ var Input = ({
|
|
|
18526
18944
|
}
|
|
18527
18945
|
);
|
|
18528
18946
|
};
|
|
18529
|
-
var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
18947
|
+
var Checkbox = ({ checked, onChange, label, invalid: invalid2 = false }) => {
|
|
18530
18948
|
const theme = useTheme();
|
|
18531
|
-
const
|
|
18949
|
+
const s6 = useFieldStyles(theme);
|
|
18532
18950
|
const frozen = useFrozen();
|
|
18533
18951
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
18534
18952
|
import_react_native6.Pressable,
|
|
@@ -18537,25 +18955,25 @@ var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
|
18537
18955
|
accessibilityState: { checked, disabled: frozen },
|
|
18538
18956
|
disabled: frozen,
|
|
18539
18957
|
onPress: () => onChange(!checked),
|
|
18540
|
-
style:
|
|
18958
|
+
style: s6.checkboxRow,
|
|
18541
18959
|
children: [
|
|
18542
18960
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
18543
18961
|
import_react_native6.View,
|
|
18544
18962
|
{
|
|
18545
18963
|
style: [
|
|
18546
|
-
|
|
18547
|
-
checked &&
|
|
18548
|
-
|
|
18964
|
+
s6.checkboxBox,
|
|
18965
|
+
checked && s6.checkboxBoxChecked,
|
|
18966
|
+
invalid2 && !checked && s6.checkboxBoxInvalid
|
|
18549
18967
|
],
|
|
18550
|
-
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style:
|
|
18968
|
+
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style: s6.checkboxMark, children: "\u2713" }) : null
|
|
18551
18969
|
}
|
|
18552
18970
|
),
|
|
18553
|
-
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style:
|
|
18971
|
+
typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style: s6.checkboxLabel, children: label }) : label
|
|
18554
18972
|
]
|
|
18555
18973
|
}
|
|
18556
18974
|
);
|
|
18557
18975
|
};
|
|
18558
|
-
var useFieldStyles = (theme) => (0,
|
|
18976
|
+
var useFieldStyles = (theme) => (0, import_react39.useMemo)(
|
|
18559
18977
|
() => import_react_native6.StyleSheet.create({
|
|
18560
18978
|
field: { gap: 6 },
|
|
18561
18979
|
label: {
|
|
@@ -18605,7 +19023,7 @@ var useFieldStyles = (theme) => (0, import_react38.useMemo)(
|
|
|
18605
19023
|
);
|
|
18606
19024
|
|
|
18607
19025
|
// src/ui/Select.tsx
|
|
18608
|
-
var
|
|
19026
|
+
var import_react40 = require("react");
|
|
18609
19027
|
var import_react_native7 = require("react-native");
|
|
18610
19028
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
18611
19029
|
function Select({
|
|
@@ -18613,14 +19031,14 @@ function Select({
|
|
|
18613
19031
|
onChange,
|
|
18614
19032
|
options,
|
|
18615
19033
|
placeholder = "Select\u2026",
|
|
18616
|
-
invalid = false,
|
|
19034
|
+
invalid: invalid2 = false,
|
|
18617
19035
|
disabled: disabledProp = false
|
|
18618
19036
|
}) {
|
|
18619
19037
|
const frozen = useFrozen();
|
|
18620
19038
|
const disabled = disabledProp || frozen;
|
|
18621
19039
|
const theme = useTheme();
|
|
18622
|
-
const
|
|
18623
|
-
const [open, setOpen] = (0,
|
|
19040
|
+
const s6 = useSelectStyles(theme);
|
|
19041
|
+
const [open, setOpen] = (0, import_react40.useState)(false);
|
|
18624
19042
|
const selected = options.find((o) => o.value === value6);
|
|
18625
19043
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
18626
19044
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -18629,10 +19047,10 @@ function Select({
|
|
|
18629
19047
|
accessibilityRole: "button",
|
|
18630
19048
|
disabled,
|
|
18631
19049
|
onPress: () => setOpen(true),
|
|
18632
|
-
style: [
|
|
19050
|
+
style: [s6.control, invalid2 && s6.controlInvalid, disabled && s6.controlDisabled],
|
|
18633
19051
|
children: [
|
|
18634
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [
|
|
18635
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style:
|
|
19052
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [s6.value, !selected && s6.placeholder], numberOfLines: 1, children: selected ? selected.label : placeholder }),
|
|
19053
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: s6.chevron, children: "\u25BE" })
|
|
18636
19054
|
]
|
|
18637
19055
|
}
|
|
18638
19056
|
),
|
|
@@ -18643,7 +19061,7 @@ function Select({
|
|
|
18643
19061
|
transparent: true,
|
|
18644
19062
|
animationType: "fade",
|
|
18645
19063
|
onRequestClose: () => setOpen(false),
|
|
18646
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style:
|
|
19064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style: s6.backdrop, onPress: () => setOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style: s6.sheet, onPress: () => {
|
|
18647
19065
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
18648
19066
|
import_react_native7.FlatList,
|
|
18649
19067
|
{
|
|
@@ -18655,26 +19073,26 @@ function Select({
|
|
|
18655
19073
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
18656
19074
|
import_react_native7.Pressable,
|
|
18657
19075
|
{
|
|
18658
|
-
style:
|
|
19076
|
+
style: s6.option,
|
|
18659
19077
|
onPress: () => {
|
|
18660
19078
|
onChange(item.value);
|
|
18661
19079
|
setOpen(false);
|
|
18662
19080
|
},
|
|
18663
19081
|
children: [
|
|
18664
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [
|
|
18665
|
-
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style:
|
|
19082
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [s6.optionLabel, isSelected && s6.optionLabelSelected], children: item.label }),
|
|
19083
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: s6.optionCheck, children: "\u2713" }) : null
|
|
18666
19084
|
]
|
|
18667
19085
|
}
|
|
18668
19086
|
);
|
|
18669
19087
|
},
|
|
18670
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style:
|
|
19088
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: s6.sep })
|
|
18671
19089
|
}
|
|
18672
19090
|
) }) })
|
|
18673
19091
|
}
|
|
18674
19092
|
)
|
|
18675
19093
|
] });
|
|
18676
19094
|
}
|
|
18677
|
-
var useSelectStyles = (theme) => (0,
|
|
19095
|
+
var useSelectStyles = (theme) => (0, import_react40.useMemo)(
|
|
18678
19096
|
() => import_react_native7.StyleSheet.create({
|
|
18679
19097
|
control: {
|
|
18680
19098
|
flexDirection: "row",
|
|
@@ -18735,7 +19153,7 @@ var useSelectStyles = (theme) => (0, import_react39.useMemo)(
|
|
|
18735
19153
|
);
|
|
18736
19154
|
|
|
18737
19155
|
// src/ui/QuantitySelect.tsx
|
|
18738
|
-
var
|
|
19156
|
+
var import_react41 = require("react");
|
|
18739
19157
|
var import_react_native8 = require("react-native");
|
|
18740
19158
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
18741
19159
|
var QuantitySelect = ({
|
|
@@ -18750,7 +19168,7 @@ var QuantitySelect = ({
|
|
|
18750
19168
|
const frozen = useFrozen();
|
|
18751
19169
|
const disabled = disabledProp || frozen;
|
|
18752
19170
|
const theme = useTheme();
|
|
18753
|
-
const
|
|
19171
|
+
const s6 = useQuantityStyles(theme);
|
|
18754
19172
|
const lo = Math.max(1, min);
|
|
18755
19173
|
const cap = Math.min(max, 50);
|
|
18756
19174
|
const atZero = value6 <= 0;
|
|
@@ -18766,7 +19184,7 @@ var QuantitySelect = ({
|
|
|
18766
19184
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
18767
19185
|
import_react_native8.View,
|
|
18768
19186
|
{
|
|
18769
|
-
style:
|
|
19187
|
+
style: s6.stepper,
|
|
18770
19188
|
accessible: Boolean(label),
|
|
18771
19189
|
accessibilityRole: label ? "adjustable" : void 0,
|
|
18772
19190
|
accessibilityLabel: label,
|
|
@@ -18785,11 +19203,11 @@ var QuantitySelect = ({
|
|
|
18785
19203
|
accessibilityLabel: "Remove one",
|
|
18786
19204
|
disabled: disabled || atZero,
|
|
18787
19205
|
onPress: dec,
|
|
18788
|
-
style: [
|
|
18789
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style:
|
|
19206
|
+
style: [s6.btn, (disabled || atZero) && s6.btnDisabled],
|
|
19207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: s6.glyph, children: "\u2212" })
|
|
18790
19208
|
}
|
|
18791
19209
|
),
|
|
18792
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style:
|
|
19210
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: s6.value, children: value6 }),
|
|
18793
19211
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
18794
19212
|
import_react_native8.Pressable,
|
|
18795
19213
|
{
|
|
@@ -18797,15 +19215,15 @@ var QuantitySelect = ({
|
|
|
18797
19215
|
accessibilityLabel: "Add one",
|
|
18798
19216
|
disabled: disabled || atCap,
|
|
18799
19217
|
onPress: inc,
|
|
18800
|
-
style: [
|
|
18801
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style:
|
|
19218
|
+
style: [s6.btn, (disabled || atCap) && s6.btnDisabled],
|
|
19219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: s6.glyph, children: "+" })
|
|
18802
19220
|
}
|
|
18803
19221
|
)
|
|
18804
19222
|
]
|
|
18805
19223
|
}
|
|
18806
19224
|
);
|
|
18807
19225
|
};
|
|
18808
|
-
var useQuantityStyles = (theme) => (0,
|
|
19226
|
+
var useQuantityStyles = (theme) => (0, import_react41.useMemo)(
|
|
18809
19227
|
() => import_react_native8.StyleSheet.create({
|
|
18810
19228
|
stepper: { flexDirection: "row", alignItems: "center", gap: 14 },
|
|
18811
19229
|
btn: {
|
|
@@ -18832,11 +19250,11 @@ var useQuantityStyles = (theme) => (0, import_react40.useMemo)(
|
|
|
18832
19250
|
);
|
|
18833
19251
|
|
|
18834
19252
|
// src/ui/Timer.tsx
|
|
18835
|
-
var
|
|
19253
|
+
var import_react42 = require("react");
|
|
18836
19254
|
var import_react_native9 = require("react-native");
|
|
18837
19255
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
18838
|
-
var clock = (
|
|
18839
|
-
const v = Math.max(0, Math.floor(
|
|
19256
|
+
var clock = (s6) => {
|
|
19257
|
+
const v = Math.max(0, Math.floor(s6));
|
|
18840
19258
|
return v >= 3600 ? `${Math.floor(v / 3600)}:${String(Math.floor(v % 3600 / 60)).padStart(
|
|
18841
19259
|
2,
|
|
18842
19260
|
"0"
|
|
@@ -18844,14 +19262,14 @@ var clock = (s5) => {
|
|
|
18844
19262
|
};
|
|
18845
19263
|
var Timer = ({ seconds, urgentAt = 60, label }) => {
|
|
18846
19264
|
const theme = useTheme();
|
|
18847
|
-
const
|
|
19265
|
+
const s6 = useTimerStyles(theme);
|
|
18848
19266
|
const urgent = seconds <= urgentAt;
|
|
18849
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style:
|
|
18850
|
-
label != null ? typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style:
|
|
18851
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [
|
|
19267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: s6.row, children: [
|
|
19268
|
+
label != null ? typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: s6.label, children: label }) : label : null,
|
|
19269
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [s6.clock, urgent && s6.clockUrgent], children: clock(seconds) })
|
|
18852
19270
|
] });
|
|
18853
19271
|
};
|
|
18854
|
-
var useTimerStyles = (theme) => (0,
|
|
19272
|
+
var useTimerStyles = (theme) => (0, import_react42.useMemo)(
|
|
18855
19273
|
() => import_react_native9.StyleSheet.create({
|
|
18856
19274
|
row: { flexDirection: "row", alignItems: "center", gap: 6 },
|
|
18857
19275
|
label: {
|
|
@@ -18872,16 +19290,16 @@ var useTimerStyles = (theme) => (0, import_react41.useMemo)(
|
|
|
18872
19290
|
);
|
|
18873
19291
|
|
|
18874
19292
|
// src/ui/TimerBanner.tsx
|
|
18875
|
-
var
|
|
19293
|
+
var import_react43 = require("react");
|
|
18876
19294
|
var import_react_native10 = require("react-native");
|
|
18877
19295
|
var import_jsx_runtime11 = (
|
|
18878
19296
|
// `accessibilityLiveRegion="polite"` is the RN analogue of the web
|
|
18879
19297
|
// `role="status"` — announce the countdown without stealing focus.
|
|
18880
19298
|
require("react/jsx-runtime")
|
|
18881
19299
|
);
|
|
18882
|
-
var clock2 = (
|
|
18883
|
-
const m = String(Math.floor(
|
|
18884
|
-
const ss = String(
|
|
19300
|
+
var clock2 = (s6) => {
|
|
19301
|
+
const m = String(Math.floor(s6 / 60)).padStart(2, "0");
|
|
19302
|
+
const ss = String(s6 % 60).padStart(2, "0");
|
|
18885
19303
|
return `${m}:${ss}`;
|
|
18886
19304
|
};
|
|
18887
19305
|
var TimerBanner = ({
|
|
@@ -18890,13 +19308,13 @@ var TimerBanner = ({
|
|
|
18890
19308
|
message = "Please complete your purchase before the timer reaches zero."
|
|
18891
19309
|
}) => {
|
|
18892
19310
|
const theme = useTheme();
|
|
18893
|
-
const
|
|
18894
|
-
const [dismissed, setDismissed] = (0,
|
|
19311
|
+
const s6 = useBannerStyles(theme);
|
|
19312
|
+
const [dismissed, setDismissed] = (0, import_react43.useState)(false);
|
|
18895
19313
|
if (seconds === void 0 || seconds <= 0 || dismissed) return null;
|
|
18896
19314
|
const urgent = seconds <= urgentAt;
|
|
18897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { accessibilityLiveRegion: "polite", style: [
|
|
18898
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [
|
|
18899
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [
|
|
19315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { accessibilityLiveRegion: "polite", style: [s6.banner, urgent && s6.bannerUrgent], children: [
|
|
19316
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [s6.msg, urgent && s6.textUrgent], children: message }),
|
|
19317
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [s6.clock, urgent && s6.textUrgent], children: clock2(seconds) }),
|
|
18900
19318
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
18901
19319
|
import_react_native10.Pressable,
|
|
18902
19320
|
{
|
|
@@ -18904,13 +19322,13 @@ var TimerBanner = ({
|
|
|
18904
19322
|
accessibilityLabel: "Dismiss",
|
|
18905
19323
|
hitSlop: 8,
|
|
18906
19324
|
onPress: () => setDismissed(true),
|
|
18907
|
-
style:
|
|
18908
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [
|
|
19325
|
+
style: s6.close,
|
|
19326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [s6.closeGlyph, urgent && s6.textUrgent], children: "\xD7" })
|
|
18909
19327
|
}
|
|
18910
19328
|
)
|
|
18911
19329
|
] });
|
|
18912
19330
|
};
|
|
18913
|
-
var useBannerStyles = (theme) => (0,
|
|
19331
|
+
var useBannerStyles = (theme) => (0, import_react43.useMemo)(
|
|
18914
19332
|
() => import_react_native10.StyleSheet.create({
|
|
18915
19333
|
banner: {
|
|
18916
19334
|
flexDirection: "row",
|
|
@@ -18950,7 +19368,7 @@ var useBannerStyles = (theme) => (0, import_react42.useMemo)(
|
|
|
18950
19368
|
);
|
|
18951
19369
|
|
|
18952
19370
|
// src/ui/PaymentMethods.tsx
|
|
18953
|
-
var
|
|
19371
|
+
var import_react44 = require("react");
|
|
18954
19372
|
var import_react_native11 = require("react-native");
|
|
18955
19373
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
18956
19374
|
var EXTRA_LABEL = {
|
|
@@ -18969,14 +19387,14 @@ var PaymentMethods = ({
|
|
|
18969
19387
|
}) => {
|
|
18970
19388
|
const theme = useTheme();
|
|
18971
19389
|
const frozen = useFrozen();
|
|
18972
|
-
const
|
|
18973
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style:
|
|
19390
|
+
const s6 = useStyles3(theme);
|
|
19391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: s6.list, accessibilityRole: "radiogroup", children: options.map((option) => {
|
|
18974
19392
|
var _a, _b;
|
|
18975
19393
|
const active2 = option.value === selected;
|
|
18976
19394
|
const extraValue = option.extra === "phoneNumber" ? (_a = extraValues[option.value]) == null ? void 0 : _a.phoneNumber : (_b = extraValues[option.value]) == null ? void 0 : _b.cashtag;
|
|
18977
19395
|
const extraInvalid = Boolean(active2 && option.extra && showValidation) && !(extraValue == null ? void 0 : extraValue.trim());
|
|
18978
19396
|
const showBody = active2 && (option.value === inputSlotFor || Boolean(option.extra));
|
|
18979
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: [
|
|
19397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: [s6.row, active2 && s6.rowActive], children: [
|
|
18980
19398
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
18981
19399
|
import_react_native11.Pressable,
|
|
18982
19400
|
{
|
|
@@ -18986,23 +19404,23 @@ var PaymentMethods = ({
|
|
|
18986
19404
|
onPress: () => {
|
|
18987
19405
|
if (!frozen) onSelect(option.value);
|
|
18988
19406
|
},
|
|
18989
|
-
style:
|
|
19407
|
+
style: s6.rowHead,
|
|
18990
19408
|
children: [
|
|
18991
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: [
|
|
19409
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: [s6.radio, active2 && s6.radioActive], children: active2 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: s6.radioDot }) : null }),
|
|
18992
19410
|
option.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18993
19411
|
import_react_native11.Image,
|
|
18994
19412
|
{
|
|
18995
19413
|
source: { uri: option.iconUrl },
|
|
18996
|
-
style:
|
|
19414
|
+
style: s6.icon,
|
|
18997
19415
|
resizeMode: "contain",
|
|
18998
19416
|
accessibilityIgnoresInvertColors: true
|
|
18999
19417
|
}
|
|
19000
19418
|
) : null,
|
|
19001
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Text, { style:
|
|
19419
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Text, { style: s6.rowLabel, children: option.label })
|
|
19002
19420
|
]
|
|
19003
19421
|
}
|
|
19004
19422
|
),
|
|
19005
|
-
showBody ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style:
|
|
19423
|
+
showBody ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: s6.slot, children: [
|
|
19006
19424
|
option.value === inputSlotFor ? children : null,
|
|
19007
19425
|
option.extra ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
19008
19426
|
Field,
|
|
@@ -19029,7 +19447,7 @@ var PaymentMethods = ({
|
|
|
19029
19447
|
] }, option.value);
|
|
19030
19448
|
}) });
|
|
19031
19449
|
};
|
|
19032
|
-
var useStyles3 = (theme) => (0,
|
|
19450
|
+
var useStyles3 = (theme) => (0, import_react44.useMemo)(
|
|
19033
19451
|
() => import_react_native11.StyleSheet.create({
|
|
19034
19452
|
list: { gap: 8 },
|
|
19035
19453
|
row: {
|
|
@@ -19073,14 +19491,14 @@ var useStyles3 = (theme) => (0, import_react43.useMemo)(
|
|
|
19073
19491
|
);
|
|
19074
19492
|
|
|
19075
19493
|
// src/sections/Tickets.tsx
|
|
19076
|
-
var
|
|
19494
|
+
var import_react45 = require("react");
|
|
19077
19495
|
var import_react_native12 = require("react-native");
|
|
19078
19496
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
19079
19497
|
var money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
|
|
19080
19498
|
var WaitingListForm = ({ ticket, onJoin }) => {
|
|
19081
|
-
const [form, setForm] = (0,
|
|
19082
|
-
const [state, setState] = (0,
|
|
19083
|
-
const [error, setError] = (0,
|
|
19499
|
+
const [form, setForm] = (0, import_react45.useState)({ firstName: "", lastName: "", email: "" });
|
|
19500
|
+
const [state, setState] = (0, import_react45.useState)("idle");
|
|
19501
|
+
const [error, setError] = (0, import_react45.useState)("");
|
|
19084
19502
|
const ok = Boolean(form.firstName.trim() && form.lastName.trim() && form.email.trim());
|
|
19085
19503
|
if (state === "done")
|
|
19086
19504
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MutedText, { children: "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens." });
|
|
@@ -19148,38 +19566,38 @@ var Tickets = ({
|
|
|
19148
19566
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
19149
19567
|
const checkout = useCheckoutContext();
|
|
19150
19568
|
const theme = useTheme();
|
|
19151
|
-
const
|
|
19569
|
+
const s6 = useTicketStyles(theme);
|
|
19152
19570
|
const ticketsQuery = hooks_exports.useTicketsWithMeta(eventId);
|
|
19153
19571
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
19154
19572
|
const bundleStarting = bundleWait !== null;
|
|
19155
19573
|
const promoMeta = (_a = ticketsQuery.data) == null ? void 0 : _a.promo;
|
|
19156
19574
|
const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
|
|
19157
|
-
const [qty, setQty] = (0,
|
|
19158
|
-
const [slotDate, setSlotDate] = (0,
|
|
19575
|
+
const [qty, setQty] = (0, import_react45.useState)({});
|
|
19576
|
+
const [slotDate, setSlotDate] = (0, import_react45.useState)("");
|
|
19159
19577
|
const eventInfo = hooks_exports.useEvent(eventId).data;
|
|
19160
19578
|
const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
|
|
19161
|
-
const dates = (0,
|
|
19579
|
+
const dates = (0, import_react45.useMemo)(
|
|
19162
19580
|
() => {
|
|
19163
19581
|
var _a2;
|
|
19164
19582
|
return (_a2 = timeSlotDates != null ? timeSlotDates : eventInfo == null ? void 0 : eventInfo.availableDates) != null ? _a2 : [];
|
|
19165
19583
|
},
|
|
19166
19584
|
[timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
|
|
19167
19585
|
);
|
|
19168
|
-
(0,
|
|
19586
|
+
(0, import_react45.useEffect)(() => {
|
|
19169
19587
|
if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
|
|
19170
19588
|
}, [isTimeSlot, slotDate, dates]);
|
|
19171
19589
|
const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
|
|
19172
|
-
const tickets = (0,
|
|
19590
|
+
const tickets = (0, import_react45.useMemo)(
|
|
19173
19591
|
() => {
|
|
19174
19592
|
var _a2, _b2, _c2;
|
|
19175
19593
|
return isTimeSlot ? (_a2 = slotQuery.data) != null ? _a2 : [] : (_c2 = (_b2 = ticketsQuery.data) == null ? void 0 : _b2.tickets) != null ? _c2 : [];
|
|
19176
19594
|
},
|
|
19177
19595
|
[isTimeSlot, slotQuery.data, (_d = ticketsQuery.data) == null ? void 0 : _d.tickets]
|
|
19178
19596
|
);
|
|
19179
|
-
const [error, setError] = (0,
|
|
19180
|
-
const [code, setCode] = (0,
|
|
19181
|
-
const [codeState, setCodeState] = (0,
|
|
19182
|
-
const [promoOpen, setPromoOpen] = (0,
|
|
19597
|
+
const [error, setError] = (0, import_react45.useState)("");
|
|
19598
|
+
const [code, setCode] = (0, import_react45.useState)("");
|
|
19599
|
+
const [codeState, setCodeState] = (0, import_react45.useState)("idle");
|
|
19600
|
+
const [promoOpen, setPromoOpen] = (0, import_react45.useState)(false);
|
|
19183
19601
|
hooks_exports.useOnEventChange(eventId, () => {
|
|
19184
19602
|
setQty({});
|
|
19185
19603
|
setSlotDate("");
|
|
@@ -19187,10 +19605,10 @@ var Tickets = ({
|
|
|
19187
19605
|
setPromoOpen(false);
|
|
19188
19606
|
setError("");
|
|
19189
19607
|
});
|
|
19190
|
-
const [wlOpen, setWlOpen] = (0,
|
|
19191
|
-
const [visibleDescription, setVisibleDescription] = (0,
|
|
19192
|
-
const attributionEvent = (0,
|
|
19193
|
-
(0,
|
|
19608
|
+
const [wlOpen, setWlOpen] = (0, import_react45.useState)({});
|
|
19609
|
+
const [visibleDescription, setVisibleDescription] = (0, import_react45.useState)(null);
|
|
19610
|
+
const attributionEvent = (0, import_react45.useRef)(null);
|
|
19611
|
+
(0, import_react45.useEffect)(() => {
|
|
19194
19612
|
var _a2;
|
|
19195
19613
|
if (attributionEvent.current === eventId) return;
|
|
19196
19614
|
attributionEvent.current = eventId;
|
|
@@ -19208,7 +19626,7 @@ var Tickets = ({
|
|
|
19208
19626
|
});
|
|
19209
19627
|
}
|
|
19210
19628
|
}, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
|
|
19211
|
-
(0,
|
|
19629
|
+
(0, import_react45.useEffect)(() => {
|
|
19212
19630
|
checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
|
|
19213
19631
|
}, [eventId]);
|
|
19214
19632
|
const changeCurrency = (nextCode) => {
|
|
@@ -19219,8 +19637,8 @@ var Tickets = ({
|
|
|
19219
19637
|
}
|
|
19220
19638
|
}).catch(() => void 0);
|
|
19221
19639
|
};
|
|
19222
|
-
const originals = (0,
|
|
19223
|
-
(0,
|
|
19640
|
+
const originals = (0, import_react45.useRef)({});
|
|
19641
|
+
(0, import_react45.useEffect)(() => {
|
|
19224
19642
|
for (const t of tickets)
|
|
19225
19643
|
if (originals.current[t.id] == null) originals.current[t.id] = t.price;
|
|
19226
19644
|
}, [tickets]);
|
|
@@ -19283,13 +19701,13 @@ var Tickets = ({
|
|
|
19283
19701
|
const ticketIndex = tickets.findIndex((candidate) => candidate.id === t.id);
|
|
19284
19702
|
const previousTicket = ticketIndex > 0 ? tickets[ticketIndex - 1] : void 0;
|
|
19285
19703
|
const startsNamedGroup = Boolean(t.groupName) && t.groupName !== (previousTicket == null ? void 0 : previousTicket.groupName);
|
|
19286
|
-
const groupHeading = startsNamedGroup ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19704
|
+
const groupHeading = startsNamedGroup ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.group, children: t.groupName }) : t.id === firstTableId ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
19287
19705
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Divider, {}),
|
|
19288
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19706
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.group, children: "Reserve tables" })
|
|
19289
19707
|
] }) : null;
|
|
19290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
19708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react45.Fragment, { children: [
|
|
19291
19709
|
groupHeading,
|
|
19292
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: renderTicket ? void 0 :
|
|
19710
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: renderTicket ? void 0 : s6.rowWrap, children: [
|
|
19293
19711
|
renderTicket ? renderTicket({
|
|
19294
19712
|
ticket: t,
|
|
19295
19713
|
quantity: (_a2 = qty[t.id]) != null ? _a2 : 0,
|
|
@@ -19300,36 +19718,36 @@ var Tickets = ({
|
|
|
19300
19718
|
if (!checkout.orderFixed) selectQty(t, value6);
|
|
19301
19719
|
}
|
|
19302
19720
|
}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
19303
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19304
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19305
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19306
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19721
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.row, children: [
|
|
19722
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.info, children: [
|
|
19723
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.nameRow, children: [
|
|
19724
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.name, children: t.name }),
|
|
19307
19725
|
t.descriptionRich ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19308
19726
|
import_react_native12.Pressable,
|
|
19309
19727
|
{
|
|
19310
19728
|
accessibilityRole: "button",
|
|
19311
19729
|
onPress: () => setVisibleDescription((cur) => cur === t.id ? null : t.id),
|
|
19312
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.infoToggle, children: visibleDescription === t.id ? "Hide info" : "View info" })
|
|
19313
19731
|
}
|
|
19314
19732
|
) : null
|
|
19315
19733
|
] }),
|
|
19316
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19317
|
-
discounted && original != null ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19318
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: [
|
|
19319
|
-
t.isTable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19320
|
-
!isFree && !t.soldOut ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.Text, { style:
|
|
19734
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.priceRow, children: [
|
|
19735
|
+
discounted && original != null ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.oldPrice, children: money(sym, original) }) : null,
|
|
19736
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: [s6.amount, isFree && s6.amountFree], children: isFree ? "FREE" : money(sym, t.price) }),
|
|
19737
|
+
t.isTable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.perTable, children: "\xB7 per table" }) : null,
|
|
19738
|
+
!isFree && !t.soldOut ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.Text, { style: s6.fees, children: [
|
|
19321
19739
|
"(",
|
|
19322
19740
|
money(sym, t.priceWithFees),
|
|
19323
19741
|
" with fees)"
|
|
19324
19742
|
] }) : null,
|
|
19325
|
-
t.depositPercent != null ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.Text, { style:
|
|
19743
|
+
t.depositPercent != null ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.Text, { style: s6.deposit, children: [
|
|
19326
19744
|
t.depositPercent.toFixed(2),
|
|
19327
19745
|
"% DEPOSIT"
|
|
19328
19746
|
] }) : null
|
|
19329
19747
|
] })
|
|
19330
19748
|
] }),
|
|
19331
|
-
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19332
|
-
t.isTable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19749
|
+
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.soldout, children: t.soldOut ? "Sold out" : notStarted ? "Sales not started" : "Sales Ended" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.qtyWrap, children: [
|
|
19750
|
+
t.isTable ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.guests, children: "Guests" }) : null,
|
|
19333
19751
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19334
19752
|
QuantitySelect,
|
|
19335
19753
|
{
|
|
@@ -19342,7 +19760,7 @@ var Tickets = ({
|
|
|
19342
19760
|
)
|
|
19343
19761
|
] })
|
|
19344
19762
|
] }),
|
|
19345
|
-
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19763
|
+
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.description, children: htmlToPlainText(t.descriptionRich) }) : null
|
|
19346
19764
|
] }),
|
|
19347
19765
|
canWaitlist ? wlOpen[t.id] ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19348
19766
|
WaitingListForm,
|
|
@@ -19355,7 +19773,7 @@ var Tickets = ({
|
|
|
19355
19773
|
{
|
|
19356
19774
|
accessibilityRole: "button",
|
|
19357
19775
|
onPress: () => setWlOpen((w) => ({ ...w, [t.id]: true })),
|
|
19358
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.wlToggle, children: "Join the waiting list" })
|
|
19359
19777
|
}
|
|
19360
19778
|
) : null
|
|
19361
19779
|
] })
|
|
@@ -19373,10 +19791,10 @@ var Tickets = ({
|
|
|
19373
19791
|
const continueTitle = checkout.isBusy ? "Reserving\u2026" : selectionIsTable ? "Reserve tables" : buttonLabel;
|
|
19374
19792
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Container, { children: [
|
|
19375
19793
|
title ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionHeader, { title }) : null,
|
|
19376
|
-
listQuery.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style:
|
|
19794
|
+
listQuery.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: s6.loading, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Loader, {}) }) : null,
|
|
19377
19795
|
listQuery.error ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorText, { children: listQuery.error.message }) : null,
|
|
19378
|
-
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19379
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19796
|
+
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.selectBlock, children: [
|
|
19797
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.selectLabel, children: "Date" }),
|
|
19380
19798
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19381
19799
|
Select,
|
|
19382
19800
|
{
|
|
@@ -19389,8 +19807,8 @@ var Tickets = ({
|
|
|
19389
19807
|
}
|
|
19390
19808
|
)
|
|
19391
19809
|
] }) : null,
|
|
19392
|
-
currency && currency.available.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style:
|
|
19393
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19810
|
+
currency && currency.available.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: s6.selectBlock, children: [
|
|
19811
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.selectLabel, children: "Currency" }),
|
|
19394
19812
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19395
19813
|
Select,
|
|
19396
19814
|
{
|
|
@@ -19404,11 +19822,11 @@ var Tickets = ({
|
|
|
19404
19822
|
)
|
|
19405
19823
|
] }) : null,
|
|
19406
19824
|
isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MutedText, { children: "No sessions available on this date." }) : null,
|
|
19407
|
-
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
19408
|
-
g.time ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style:
|
|
19825
|
+
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react45.Fragment, { children: [
|
|
19826
|
+
g.time ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.slotTime, children: g.time }) : null,
|
|
19409
19827
|
g.items.map(renderRow)
|
|
19410
19828
|
] }, g.time)) : tickets.map(renderRow),
|
|
19411
|
-
showCodeInput ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style:
|
|
19829
|
+
showCodeInput ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: s6.promo, children: !isAccess && !promoOpen ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Pressable, { accessibilityRole: "button", onPress: () => setPromoOpen(true), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s6.promoToggle, children: "Got a promo code? Tap here" }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
19412
19830
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Field, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
19413
19831
|
Input,
|
|
19414
19832
|
{
|
|
@@ -19460,7 +19878,7 @@ var Tickets = ({
|
|
|
19460
19878
|
var staticStyles = import_react_native12.StyleSheet.create({
|
|
19461
19879
|
wlForm: { gap: 8 }
|
|
19462
19880
|
});
|
|
19463
|
-
var useTicketStyles = (theme) => (0,
|
|
19881
|
+
var useTicketStyles = (theme) => (0, import_react45.useMemo)(
|
|
19464
19882
|
() => import_react_native12.StyleSheet.create({
|
|
19465
19883
|
loading: { paddingVertical: 24, alignItems: "center" },
|
|
19466
19884
|
selectBlock: { gap: 6 },
|
|
@@ -19573,7 +19991,7 @@ var useTicketStyles = (theme) => (0, import_react44.useMemo)(
|
|
|
19573
19991
|
);
|
|
19574
19992
|
|
|
19575
19993
|
// src/sections/SeatsIoMap.tsx
|
|
19576
|
-
var
|
|
19994
|
+
var import_react46 = require("react");
|
|
19577
19995
|
var import_react_native13 = require("react-native");
|
|
19578
19996
|
var import_react_native_webview2 = require("react-native-webview");
|
|
19579
19997
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -19582,7 +20000,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
19582
20000
|
const checkout = useCheckoutContext();
|
|
19583
20001
|
const flow = hooks_exports.useSeatsIoSelection(eventId, checkout, initial, onContinue);
|
|
19584
20002
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
19585
|
-
const html = (0,
|
|
20003
|
+
const html = (0, import_react46.useMemo)(
|
|
19586
20004
|
() => flow.data.chart ? seatsIoChartDocument(flow.data.chart, flow.nonce) : "",
|
|
19587
20005
|
[flow.data.chart, flow.nonce]
|
|
19588
20006
|
);
|
|
@@ -19668,7 +20086,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
19668
20086
|
};
|
|
19669
20087
|
|
|
19670
20088
|
// src/sections/SeatMap.tsx
|
|
19671
|
-
var
|
|
20089
|
+
var import_react47 = require("react");
|
|
19672
20090
|
var import_react_native14 = require("react-native");
|
|
19673
20091
|
var import_react_native_webview3 = require("react-native-webview");
|
|
19674
20092
|
|
|
@@ -19684,9 +20102,9 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19684
20102
|
const theme = useTheme();
|
|
19685
20103
|
const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
|
|
19686
20104
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
19687
|
-
const webview = (0,
|
|
19688
|
-
const [rendererError, setRendererError] = (0,
|
|
19689
|
-
const [size, setSize] = (0,
|
|
20105
|
+
const webview = (0, import_react47.useRef)(null);
|
|
20106
|
+
const [rendererError, setRendererError] = (0, import_react47.useState)(false);
|
|
20107
|
+
const [size, setSize] = (0, import_react47.useState)(320);
|
|
19690
20108
|
const properties = flow.chart.state === "ready" ? {
|
|
19691
20109
|
seatData: flow.chart.data.seatData,
|
|
19692
20110
|
statuses: flow.statuses,
|
|
@@ -19702,7 +20120,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19702
20120
|
predefinedSeats: flow.chart.data.predefinedSeats
|
|
19703
20121
|
} : null;
|
|
19704
20122
|
const chart = flow.chart.state === "ready" ? flow.chart.data : null;
|
|
19705
|
-
const html = (0,
|
|
20123
|
+
const html = (0, import_react47.useMemo)(
|
|
19706
20124
|
() => chart ? `<!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><style>html,body,#seat-map{margin:0;width:100%;height:100%;overflow:hidden}body{background:#fff}${SEAT_MAP_CSS}</style></head><body><div id="seat-map"></div><script>${SEAT_MAP_SCRIPT.replace(/<\/script/gi, "<\\/script")}</script></body></html>` : "",
|
|
19707
20125
|
[chart]
|
|
19708
20126
|
);
|
|
@@ -19713,7 +20131,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19713
20131
|
`window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
|
|
19714
20132
|
);
|
|
19715
20133
|
};
|
|
19716
|
-
(0,
|
|
20134
|
+
(0, import_react47.useEffect)(update, [properties && safeJson2(properties)]);
|
|
19717
20135
|
if (flow.chart.state === "provider") return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
|
|
19718
20136
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Card, { children: [
|
|
19719
20137
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SectionHeader, { title: "Select your seats" }),
|
|
@@ -19849,7 +20267,7 @@ var styles3 = import_react_native14.StyleSheet.create({
|
|
|
19849
20267
|
});
|
|
19850
20268
|
|
|
19851
20269
|
// src/sections/AddOns.tsx
|
|
19852
|
-
var
|
|
20270
|
+
var import_react48 = require("react");
|
|
19853
20271
|
var import_react_native16 = require("react-native");
|
|
19854
20272
|
|
|
19855
20273
|
// src/ui/CustomFields.tsx
|
|
@@ -19866,13 +20284,13 @@ var CustomFieldInput = ({
|
|
|
19866
20284
|
onChange,
|
|
19867
20285
|
error
|
|
19868
20286
|
}) => {
|
|
19869
|
-
const
|
|
20287
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
19870
20288
|
const desc = field.description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MutedText, { children: field.description }) : null;
|
|
19871
20289
|
switch (field.type) {
|
|
19872
20290
|
case "textarea":
|
|
19873
20291
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Field, { label: field.label, required: field.required, error, children: [
|
|
19874
20292
|
desc,
|
|
19875
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Input, { value: asString(value6), onChangeText: onChange, invalid })
|
|
20293
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Input, { value: asString(value6), onChangeText: onChange, invalid: invalid2 })
|
|
19876
20294
|
] });
|
|
19877
20295
|
case "select":
|
|
19878
20296
|
case "radio": {
|
|
@@ -19889,7 +20307,7 @@ var CustomFieldInput = ({
|
|
|
19889
20307
|
onChange,
|
|
19890
20308
|
options,
|
|
19891
20309
|
placeholder: "\u2014 select \u2014",
|
|
19892
|
-
invalid
|
|
20310
|
+
invalid: invalid2
|
|
19893
20311
|
}
|
|
19894
20312
|
)
|
|
19895
20313
|
] });
|
|
@@ -19918,7 +20336,7 @@ var CustomFieldInput = ({
|
|
|
19918
20336
|
checked: asString(value6) === "1",
|
|
19919
20337
|
onChange: (on) => onChange(on ? "1" : ""),
|
|
19920
20338
|
label: `${field.label}${field.required ? " *" : ""}`,
|
|
19921
|
-
invalid
|
|
20339
|
+
invalid: invalid2
|
|
19922
20340
|
}
|
|
19923
20341
|
),
|
|
19924
20342
|
error !== void 0 && error !== null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorText, { children: error }) : null
|
|
@@ -19938,7 +20356,7 @@ var CustomFieldInput = ({
|
|
|
19938
20356
|
onChangeText: onChange,
|
|
19939
20357
|
keyboardType: field.type === "email" ? "email-address" : field.type === "phone" ? "phone-pad" : "default",
|
|
19940
20358
|
autoCapitalize: field.type === "email" ? "none" : "sentences",
|
|
19941
|
-
invalid
|
|
20359
|
+
invalid: invalid2
|
|
19942
20360
|
}
|
|
19943
20361
|
)
|
|
19944
20362
|
] });
|
|
@@ -19973,7 +20391,7 @@ var AddOns = ({
|
|
|
19973
20391
|
var _a, _b;
|
|
19974
20392
|
const checkout = useCheckoutContext();
|
|
19975
20393
|
const theme = useTheme();
|
|
19976
|
-
const
|
|
20394
|
+
const s6 = useAddonStyles(theme);
|
|
19977
20395
|
const {
|
|
19978
20396
|
query: addonsQuery,
|
|
19979
20397
|
addons,
|
|
@@ -19989,15 +20407,15 @@ var AddOns = ({
|
|
|
19989
20407
|
save,
|
|
19990
20408
|
skip
|
|
19991
20409
|
} = hooks_exports.useAddOnSelection(eventId, checkout, { onContinue, onSkip });
|
|
19992
|
-
const head = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style:
|
|
19993
|
-
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
19994
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
19995
|
-
onSkip && !hasRequired ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Pressable, { accessibilityRole: "button", onPress: skip, style:
|
|
20410
|
+
const head = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: s6.head, children: [
|
|
20411
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.eyebrow, children: eyebrow }) : null,
|
|
20412
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.heading, children: heading }),
|
|
20413
|
+
onSkip && !hasRequired ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Pressable, { accessibilityRole: "button", onPress: skip, style: s6.skipBtn, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.skip, children: "Skip" }) }) : null
|
|
19996
20414
|
] });
|
|
19997
20415
|
if (addonsQuery.isLoading) {
|
|
19998
20416
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Card, { children: [
|
|
19999
20417
|
head,
|
|
20000
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { style:
|
|
20418
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { style: s6.sectionLoader, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Loader, {}) })
|
|
20001
20419
|
] });
|
|
20002
20420
|
}
|
|
20003
20421
|
if (addonsQuery.isError)
|
|
@@ -20020,30 +20438,30 @@ var AddOns = ({
|
|
|
20020
20438
|
const selectedCount = Object.values(qty).filter((n) => n > 0).length;
|
|
20021
20439
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Card, { children: [
|
|
20022
20440
|
head,
|
|
20023
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20441
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.subtitle, children: "PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW" }),
|
|
20024
20442
|
groups.map((g, gi) => {
|
|
20025
20443
|
var _a2;
|
|
20026
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20027
|
-
g.heading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react48.Fragment, { children: [
|
|
20445
|
+
g.heading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.group, children: g.heading }) : null,
|
|
20028
20446
|
g.items.map((a) => {
|
|
20029
20447
|
var _a3, _b2;
|
|
20030
20448
|
const n = (_a3 = qty[a.id]) != null ? _a3 : 0;
|
|
20031
20449
|
const group = fieldGroups[a.id];
|
|
20032
20450
|
const desc = a.description ? htmlToPlainText(a.description) : "";
|
|
20033
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style:
|
|
20034
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style:
|
|
20035
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style:
|
|
20036
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.Text, { style:
|
|
20451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: s6.item, children: [
|
|
20452
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: s6.row, children: [
|
|
20453
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: s6.info, children: [
|
|
20454
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.Text, { style: s6.name, children: [
|
|
20037
20455
|
a.name,
|
|
20038
|
-
a.required ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20456
|
+
a.required ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.req, children: " \xB7 required" }) : null
|
|
20039
20457
|
] }),
|
|
20040
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.Text, { style:
|
|
20458
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.Text, { style: s6.price, children: [
|
|
20041
20459
|
money2(a.currency, a.price),
|
|
20042
|
-
a.feeIncluded ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20460
|
+
a.feeIncluded ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.priceNote, children: " incl. fees" }) : null
|
|
20043
20461
|
] }),
|
|
20044
|
-
desc ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20462
|
+
desc ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.desc, children: desc }) : null
|
|
20045
20463
|
] }),
|
|
20046
|
-
soldOut(a) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style:
|
|
20464
|
+
soldOut(a) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s6.soldOut, children: "Sold out" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20047
20465
|
QuantitySelect,
|
|
20048
20466
|
{
|
|
20049
20467
|
value: n,
|
|
@@ -20053,7 +20471,7 @@ var AddOns = ({
|
|
|
20053
20471
|
}
|
|
20054
20472
|
)
|
|
20055
20473
|
] }),
|
|
20056
|
-
n > 0 && group ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { style:
|
|
20474
|
+
n > 0 && group ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { style: s6.fields, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20057
20475
|
CustomFieldGroupFields,
|
|
20058
20476
|
{
|
|
20059
20477
|
group,
|
|
@@ -20088,7 +20506,7 @@ var AddOns = ({
|
|
|
20088
20506
|
error || checkout.error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorText, { children: error || checkout.error }) : null
|
|
20089
20507
|
] }) });
|
|
20090
20508
|
};
|
|
20091
|
-
var useAddonStyles = (theme) => (0,
|
|
20509
|
+
var useAddonStyles = (theme) => (0, import_react48.useMemo)(
|
|
20092
20510
|
() => import_react_native16.StyleSheet.create({
|
|
20093
20511
|
head: { flexDirection: "row", alignItems: "center", flexWrap: "wrap", gap: 8 },
|
|
20094
20512
|
eyebrow: {
|
|
@@ -20169,7 +20587,7 @@ var useAddonStyles = (theme) => (0, import_react47.useMemo)(
|
|
|
20169
20587
|
);
|
|
20170
20588
|
|
|
20171
20589
|
// src/sections/Bundles.tsx
|
|
20172
|
-
var
|
|
20590
|
+
var import_react49 = require("react");
|
|
20173
20591
|
var import_react_native17 = require("react-native");
|
|
20174
20592
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
20175
20593
|
var money3 = (currency, amount) => `${currency} ${amount.toFixed(2)}`;
|
|
@@ -20187,7 +20605,7 @@ var Bundles = ({
|
|
|
20187
20605
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
20188
20606
|
const checkout = useCheckoutContext();
|
|
20189
20607
|
const theme = useTheme();
|
|
20190
|
-
const
|
|
20608
|
+
const s6 = useBundleStyles(theme);
|
|
20191
20609
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
20192
20610
|
const flow = hooks_exports.useBundleFlow(rnConfirmer, eventId, {
|
|
20193
20611
|
claimCard: claimCardField,
|
|
@@ -20203,7 +20621,7 @@ var Bundles = ({
|
|
|
20203
20621
|
onPurchased
|
|
20204
20622
|
});
|
|
20205
20623
|
if (flow.view === "loading") {
|
|
20206
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.View, { style:
|
|
20624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.View, { style: s6.loader, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader, {}) }) });
|
|
20207
20625
|
}
|
|
20208
20626
|
if (flow.view === "catalogError") {
|
|
20209
20627
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { children: [
|
|
@@ -20221,11 +20639,11 @@ var Bundles = ({
|
|
|
20221
20639
|
] });
|
|
20222
20640
|
}
|
|
20223
20641
|
if (flow.view === "hidden") return null;
|
|
20224
|
-
const title = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20642
|
+
const title = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.heading, children: heading != null ? heading : t("bundles.heading") });
|
|
20225
20643
|
if (flow.view === "redirecting") {
|
|
20226
20644
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { children: [
|
|
20227
20645
|
title,
|
|
20228
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20646
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.redirecting") }),
|
|
20229
20647
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader, {})
|
|
20230
20648
|
] });
|
|
20231
20649
|
}
|
|
@@ -20233,10 +20651,10 @@ var Bundles = ({
|
|
|
20233
20651
|
const { result: result2 } = flow;
|
|
20234
20652
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { children: [
|
|
20235
20653
|
title,
|
|
20236
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20237
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20238
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20239
|
-
flow.gatewayWait ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20654
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.strong, children: t("bundles.done.title") }),
|
|
20655
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: result2.pending ? t("bundles.done.pending") : result2.email ? t("bundles.done.email", { email: result2.email }) : t("bundles.done.emailUnknown") }),
|
|
20656
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.done.order", { orderHash: result2.orderHash }) }),
|
|
20657
|
+
flow.gatewayWait ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
20240
20658
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20241
20659
|
Button,
|
|
20242
20660
|
{
|
|
@@ -20253,8 +20671,8 @@ var Bundles = ({
|
|
|
20253
20671
|
const amount = money3(flow.payAmount.currency || flow.currency, flow.payAmount.amount);
|
|
20254
20672
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { children: [
|
|
20255
20673
|
title,
|
|
20256
|
-
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20257
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20674
|
+
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
20675
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.strong, children: t("bundles.buyerHeading") }),
|
|
20258
20676
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Field, { label: t("bundles.firstName"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20259
20677
|
Input,
|
|
20260
20678
|
{
|
|
@@ -20284,8 +20702,8 @@ var Bundles = ({
|
|
|
20284
20702
|
}
|
|
20285
20703
|
) }),
|
|
20286
20704
|
flow.slots.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
20287
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20288
|
-
!flow.namesRequired ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20705
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.strong, children: t("bundles.holdersHeading") }),
|
|
20706
|
+
!flow.namesRequired ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.holdersOptional") }) : null,
|
|
20289
20707
|
flow.slots.map((slot) => {
|
|
20290
20708
|
var _a2, _b2;
|
|
20291
20709
|
const value6 = flow.holderValue(slot);
|
|
@@ -20316,17 +20734,17 @@ var Bundles = ({
|
|
|
20316
20734
|
})
|
|
20317
20735
|
] }) : null,
|
|
20318
20736
|
flow.problems.map((key4) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ErrorText, { children: t(key4) }, key4)),
|
|
20319
|
-
flow.awaitingCard ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style:
|
|
20320
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20737
|
+
flow.awaitingCard ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: s6.card, children: [
|
|
20738
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.strong, children: t("bundles.cardHeading") }),
|
|
20321
20739
|
flow.cardElsewhere ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
20322
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20740
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.payingElsewhere") }),
|
|
20323
20741
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "ghost", onPress: flow.payHere, children: t("bundles.payHere") })
|
|
20324
20742
|
] }) : flow.cardFailed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "ghost", onPress: flow.retryCard, children: t("bundles.retryCard") }) : flow.cardReady && visible ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardInput, { owner: flow.cardOwner, visible }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader, {})
|
|
20325
20743
|
] }) : null,
|
|
20326
|
-
flow.stillSaving ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20327
|
-
flow.checkingAttempt ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20328
|
-
flow.waitingForTickets ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20329
|
-
flow.waitingForBundle ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20744
|
+
flow.stillSaving ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
20745
|
+
flow.checkingAttempt ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20746
|
+
flow.waitingForTickets ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.waitTickets") }) : null,
|
|
20747
|
+
flow.waitingForBundle ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t((_g = flow.gatewayWait) != null ? _g : "bundles.waitOtherBundle") }) : null,
|
|
20330
20748
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20331
20749
|
Button,
|
|
20332
20750
|
{
|
|
@@ -20361,13 +20779,13 @@ var Bundles = ({
|
|
|
20361
20779
|
const ticketsInCart = checkout.selections.length > 0;
|
|
20362
20780
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { children: [
|
|
20363
20781
|
title,
|
|
20364
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20365
|
-
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20782
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.subtitle") }),
|
|
20783
|
+
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
20366
20784
|
flow.view === "heldOrder" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
20367
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20785
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.heldOrder") }),
|
|
20368
20786
|
flow.error ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ErrorText, { children: t(flow.error) }) : null,
|
|
20369
|
-
flow.checkingAttempt ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20370
|
-
flow.gatewayWait ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20787
|
+
flow.checkingAttempt ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20788
|
+
flow.gatewayWait ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
20371
20789
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20372
20790
|
Button,
|
|
20373
20791
|
{
|
|
@@ -20392,18 +20810,18 @@ var Bundles = ({
|
|
|
20392
20810
|
const stock = bundleAvailabilityCopy(bundle);
|
|
20393
20811
|
const contents = bundleContentsLine(bundle);
|
|
20394
20812
|
const desc = htmlToPlainText((_a2 = bundle.description) != null ? _a2 : "");
|
|
20395
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: [
|
|
20396
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style:
|
|
20397
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20398
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20399
|
-
contents ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20400
|
-
bundle.bookingFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: [s6.item, { borderTopColor: theme.border }], children: [
|
|
20814
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: s6.info, children: [
|
|
20815
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.name, children: bundle.name }),
|
|
20816
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.price, children: money3(bundle.currency, bundle.price) }),
|
|
20817
|
+
contents ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.includes", { contents }) }) : null,
|
|
20818
|
+
bundle.bookingFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.bookingFee", {
|
|
20401
20819
|
amount: money3(bundle.currency, bundle.bookingFee)
|
|
20402
20820
|
}) }),
|
|
20403
|
-
desc ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20404
|
-
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [
|
|
20821
|
+
desc ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: desc }) : null,
|
|
20822
|
+
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [s6.muted, s6.stock], children: t(stock.key, stock.values) }) : null
|
|
20405
20823
|
] }),
|
|
20406
|
-
range.max === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20824
|
+
range.max === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.soldOut, children: t("bundles.soldOut") }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20407
20825
|
QuantitySelect,
|
|
20408
20826
|
{
|
|
20409
20827
|
label: t("bundles.quantity", { name: bundle.name }),
|
|
@@ -20415,12 +20833,12 @@ var Bundles = ({
|
|
|
20415
20833
|
)
|
|
20416
20834
|
] }, bundle.id);
|
|
20417
20835
|
}),
|
|
20418
|
-
anySelected ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20419
|
-
anySelected && ticketsInCart ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style:
|
|
20836
|
+
anySelected ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.strong, children: t("bundles.total", { amount: money3(flow.currency, flow.total) }) }) : null,
|
|
20837
|
+
anySelected && ticketsInCart ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: s6.muted, children: t("bundles.boughtSeparately") }) : null,
|
|
20420
20838
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onPress: flow.continueToDetails, disabled: !anySelected, children: t("bundles.continue") })
|
|
20421
20839
|
] });
|
|
20422
20840
|
};
|
|
20423
|
-
var useBundleStyles = (theme) => (0,
|
|
20841
|
+
var useBundleStyles = (theme) => (0, import_react49.useMemo)(
|
|
20424
20842
|
() => import_react_native17.StyleSheet.create({
|
|
20425
20843
|
loader: { paddingVertical: 20, alignItems: "center" },
|
|
20426
20844
|
heading: {
|
|
@@ -20473,7 +20891,7 @@ var useBundleStyles = (theme) => (0, import_react48.useMemo)(
|
|
|
20473
20891
|
);
|
|
20474
20892
|
|
|
20475
20893
|
// src/sections/BillingInfo.tsx
|
|
20476
|
-
var
|
|
20894
|
+
var import_react52 = require("react");
|
|
20477
20895
|
var import_react_native22 = require("react-native");
|
|
20478
20896
|
|
|
20479
20897
|
// src/sections/billing/BillingAddressFields.tsx
|
|
@@ -20581,11 +20999,11 @@ var styles4 = import_react_native18.StyleSheet.create({
|
|
|
20581
20999
|
});
|
|
20582
21000
|
|
|
20583
21001
|
// src/sections/billing/PhoneIdentity.tsx
|
|
20584
|
-
var
|
|
21002
|
+
var import_react51 = require("react");
|
|
20585
21003
|
var import_react_native20 = require("react-native");
|
|
20586
21004
|
|
|
20587
21005
|
// src/auth/TwoFactorForm.tsx
|
|
20588
|
-
var
|
|
21006
|
+
var import_react50 = require("react");
|
|
20589
21007
|
var import_react_native19 = require("react-native");
|
|
20590
21008
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
20591
21009
|
var TwoFactorForm = ({
|
|
@@ -20598,7 +21016,7 @@ var TwoFactorForm = ({
|
|
|
20598
21016
|
onSendSms,
|
|
20599
21017
|
onCancel
|
|
20600
21018
|
}) => {
|
|
20601
|
-
const [code, setCode] = (0,
|
|
21019
|
+
const [code, setCode] = (0, import_react50.useState)("");
|
|
20602
21020
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.View, { style: { gap: 14 }, children: [
|
|
20603
21021
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MutedText, { children: "Enter the six-digit code from your authenticator app or registered phone to complete sign-in." }),
|
|
20604
21022
|
error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorText, { children: error }) : null,
|
|
@@ -20650,8 +21068,8 @@ var PhoneIdentity = ({
|
|
|
20650
21068
|
}) => {
|
|
20651
21069
|
var _a;
|
|
20652
21070
|
const identity = hooks_exports.useCheckoutPhoneIdentity(options);
|
|
20653
|
-
const [code, setCode] = (0,
|
|
20654
|
-
const [emailInstead, setEmailInstead] = (0,
|
|
21071
|
+
const [code, setCode] = (0, import_react51.useState)("");
|
|
21072
|
+
const [emailInstead, setEmailInstead] = (0, import_react51.useState)(false);
|
|
20655
21073
|
if (emailInstead) return null;
|
|
20656
21074
|
if (identity.challenge)
|
|
20657
21075
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
@@ -20786,7 +21204,7 @@ var BuyerField = ({
|
|
|
20786
21204
|
error,
|
|
20787
21205
|
onChange
|
|
20788
21206
|
}) => {
|
|
20789
|
-
const
|
|
21207
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
20790
21208
|
if (field.kind === "gender") {
|
|
20791
21209
|
const options = [
|
|
20792
21210
|
{ label: "Male", value: "M" },
|
|
@@ -20799,7 +21217,7 @@ var BuyerField = ({
|
|
|
20799
21217
|
onChange,
|
|
20800
21218
|
options,
|
|
20801
21219
|
placeholder: "\u2014 select \u2014",
|
|
20802
|
-
invalid
|
|
21220
|
+
invalid: invalid2
|
|
20803
21221
|
}
|
|
20804
21222
|
) });
|
|
20805
21223
|
}
|
|
@@ -20815,7 +21233,7 @@ var BuyerField = ({
|
|
|
20815
21233
|
onChange,
|
|
20816
21234
|
options,
|
|
20817
21235
|
placeholder: "\u2014 select \u2014",
|
|
20818
|
-
invalid
|
|
21236
|
+
invalid: invalid2
|
|
20819
21237
|
}
|
|
20820
21238
|
) });
|
|
20821
21239
|
}
|
|
@@ -20826,7 +21244,7 @@ var BuyerField = ({
|
|
|
20826
21244
|
value: value6,
|
|
20827
21245
|
onChangeText: onChange,
|
|
20828
21246
|
autoCapitalize: "none",
|
|
20829
|
-
invalid
|
|
21247
|
+
invalid: invalid2
|
|
20830
21248
|
}
|
|
20831
21249
|
) });
|
|
20832
21250
|
};
|
|
@@ -20958,21 +21376,21 @@ var BillingInfo = ({
|
|
|
20958
21376
|
const checkout = useCheckoutContext();
|
|
20959
21377
|
const validation = useCheckoutValidation();
|
|
20960
21378
|
const theme = useTheme();
|
|
20961
|
-
const
|
|
21379
|
+
const s6 = useStyles4(theme);
|
|
20962
21380
|
const profile = hooks_exports.useCheckoutBuyerProfile(eventId);
|
|
20963
21381
|
const event = hooks_exports.useEvent(eventId);
|
|
20964
21382
|
const combined = !onContinue;
|
|
20965
|
-
const [billing, setBilling] = (0,
|
|
21383
|
+
const [billing, setBilling] = (0, import_react52.useState)(
|
|
20966
21384
|
() => billingDraftFrom(checkout.billing)
|
|
20967
21385
|
);
|
|
20968
|
-
const [dataCapture, setDataCapture] = (0,
|
|
21386
|
+
const [dataCapture, setDataCapture] = (0, import_react52.useState)(
|
|
20969
21387
|
(_b = (_a = checkout.billing) == null ? void 0 : _a.dataCapture) != null ? _b : {}
|
|
20970
21388
|
);
|
|
20971
|
-
const [holders, setHolders] = (0,
|
|
21389
|
+
const [holders, setHolders] = (0, import_react52.useState)(
|
|
20972
21390
|
() => holderDraftsFrom(checkout.holders, checkout.backfilledHolderIndexes)
|
|
20973
21391
|
);
|
|
20974
|
-
const [consent, setConsent] = (0,
|
|
20975
|
-
const [dob, setDob] = (0,
|
|
21392
|
+
const [consent, setConsent] = (0, import_react52.useState)({ ttfOptIn: false, brandOptIn: false });
|
|
21393
|
+
const [dob, setDob] = (0, import_react52.useState)(() => billingDobIso(checkout.billing));
|
|
20976
21394
|
hooks_exports.useOnOrderReleased(checkout.orderFixed, () => {
|
|
20977
21395
|
var _a2, _b2;
|
|
20978
21396
|
setBilling(billingDraftFrom(checkout.billing));
|
|
@@ -20983,35 +21401,35 @@ var BillingInfo = ({
|
|
|
20983
21401
|
(prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
|
|
20984
21402
|
);
|
|
20985
21403
|
});
|
|
20986
|
-
const restoredHolders = (0,
|
|
21404
|
+
const restoredHolders = (0, import_react52.useRef)(checkout.holders);
|
|
20987
21405
|
hooks_exports.useOnEventChange(checkout.eventId, () => {
|
|
20988
21406
|
restoredHolders.current = [];
|
|
20989
21407
|
setHolders([]);
|
|
20990
21408
|
setDataCapture({});
|
|
20991
21409
|
});
|
|
20992
|
-
const profileSeeded = (0,
|
|
20993
|
-
const countryDefaultApplied = (0,
|
|
21410
|
+
const profileSeeded = (0, import_react52.useRef)(false);
|
|
21411
|
+
const countryDefaultApplied = (0, import_react52.useRef)(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
|
|
20994
21412
|
const {
|
|
20995
21413
|
setBilling: commitBilling,
|
|
20996
21414
|
setHolders: commitHolders,
|
|
20997
21415
|
setConsent: commitConsent
|
|
20998
21416
|
} = checkout;
|
|
20999
21417
|
const gates = checkout.fieldGates;
|
|
21000
|
-
const orderGroups = (0,
|
|
21418
|
+
const orderGroups = (0, import_react52.useMemo)(
|
|
21001
21419
|
() => checkout.customFields.filter((g) => g.scope === "order"),
|
|
21002
21420
|
[checkout.customFields]
|
|
21003
21421
|
);
|
|
21004
|
-
const ticketGroups = (0,
|
|
21422
|
+
const ticketGroups = (0, import_react52.useMemo)(
|
|
21005
21423
|
() => checkout.customFields.filter((g) => g.scope === "ticket"),
|
|
21006
21424
|
[checkout.customFields]
|
|
21007
21425
|
);
|
|
21008
|
-
const ticketFields = (0,
|
|
21426
|
+
const ticketFields = (0, import_react52.useMemo)(
|
|
21009
21427
|
() => ticketGroups.flatMap((g) => g.fields),
|
|
21010
21428
|
[ticketGroups]
|
|
21011
21429
|
);
|
|
21012
21430
|
const holderNamesRequired = checkout.holderNamesRequired || collectTicketHolders;
|
|
21013
21431
|
const showHolders = holderNamesRequired || ticketFields.length > 0;
|
|
21014
|
-
const slots = (0,
|
|
21432
|
+
const slots = (0, import_react52.useMemo)(() => {
|
|
21015
21433
|
var _a2, _b2;
|
|
21016
21434
|
const out = [];
|
|
21017
21435
|
const lines = (_b2 = (_a2 = checkout.breakdown) == null ? void 0 : _a2.tickets) != null ? _b2 : [];
|
|
@@ -21024,7 +21442,7 @@ var BillingInfo = ({
|
|
|
21024
21442
|
}
|
|
21025
21443
|
return out;
|
|
21026
21444
|
}, [checkout.breakdown, checkout.selections]);
|
|
21027
|
-
(0,
|
|
21445
|
+
(0, import_react52.useEffect)(() => {
|
|
21028
21446
|
const p = profile.data;
|
|
21029
21447
|
if (!p || profileSeeded.current) return;
|
|
21030
21448
|
profileSeeded.current = true;
|
|
@@ -21047,10 +21465,10 @@ var BillingInfo = ({
|
|
|
21047
21465
|
return keys.every((k) => next[k] === prev[k]) ? prev : next;
|
|
21048
21466
|
});
|
|
21049
21467
|
}, [profile.data, checkout.isLoggedIn]);
|
|
21050
|
-
(0,
|
|
21468
|
+
(0, import_react52.useEffect)(() => {
|
|
21051
21469
|
setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
|
|
21052
21470
|
}, [slots]);
|
|
21053
|
-
(0,
|
|
21471
|
+
(0, import_react52.useEffect)(() => {
|
|
21054
21472
|
if (!showHolders) return;
|
|
21055
21473
|
setHolders(
|
|
21056
21474
|
(prev) => holderDraftsMirroringBuyer(prev, {
|
|
@@ -21061,7 +21479,7 @@ var BillingInfo = ({
|
|
|
21061
21479
|
})
|
|
21062
21480
|
);
|
|
21063
21481
|
}, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
|
|
21064
|
-
(0,
|
|
21482
|
+
(0, import_react52.useEffect)(() => {
|
|
21065
21483
|
const email = billing.email.trim();
|
|
21066
21484
|
if (checkout.isLoggedIn || !isEmail(email)) return;
|
|
21067
21485
|
const t = setTimeout(
|
|
@@ -21075,18 +21493,18 @@ var BillingInfo = ({
|
|
|
21075
21493
|
const countriesQuery = hooks_exports.useCountries({
|
|
21076
21494
|
enabled: needsNationality || gates.showAddress
|
|
21077
21495
|
});
|
|
21078
|
-
const countries = (0,
|
|
21496
|
+
const countries = (0, import_react52.useMemo)(() => {
|
|
21079
21497
|
var _a2;
|
|
21080
21498
|
return (_a2 = countriesQuery.data) != null ? _a2 : [];
|
|
21081
21499
|
}, [countriesQuery.data]);
|
|
21082
21500
|
const statesQuery = hooks_exports.useStates(billing.countryId, {
|
|
21083
21501
|
enabled: Boolean(billing.countryId)
|
|
21084
21502
|
});
|
|
21085
|
-
const states = (0,
|
|
21503
|
+
const states = (0, import_react52.useMemo)(() => {
|
|
21086
21504
|
var _a2;
|
|
21087
21505
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
21088
21506
|
}, [statesQuery.data]);
|
|
21089
|
-
(0,
|
|
21507
|
+
(0, import_react52.useEffect)(() => {
|
|
21090
21508
|
var _a2, _b2, _c2, _d2;
|
|
21091
21509
|
if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
|
|
21092
21510
|
return;
|
|
@@ -21125,7 +21543,7 @@ var BillingInfo = ({
|
|
|
21125
21543
|
event.isLoading,
|
|
21126
21544
|
(_e = event.data) == null ? void 0 : _e.countryCode
|
|
21127
21545
|
]);
|
|
21128
|
-
(0,
|
|
21546
|
+
(0, import_react52.useEffect)(() => {
|
|
21129
21547
|
var _a2;
|
|
21130
21548
|
if (!billing.countryId) return;
|
|
21131
21549
|
const country = countries.find(
|
|
@@ -21136,7 +21554,7 @@ var BillingInfo = ({
|
|
|
21136
21554
|
setBilling((current4) => ({ ...current4, countryCode }));
|
|
21137
21555
|
}
|
|
21138
21556
|
}, [billing.countryId, billing.countryCode, countries]);
|
|
21139
|
-
(0,
|
|
21557
|
+
(0, import_react52.useEffect)(() => {
|
|
21140
21558
|
if (!billing.stateId) return;
|
|
21141
21559
|
const state = states.find(
|
|
21142
21560
|
(candidate) => String(candidate.id) === String(billing.stateId)
|
|
@@ -21196,7 +21614,7 @@ var BillingInfo = ({
|
|
|
21196
21614
|
});
|
|
21197
21615
|
if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
|
|
21198
21616
|
};
|
|
21199
|
-
(0,
|
|
21617
|
+
(0, import_react52.useEffect)(() => {
|
|
21200
21618
|
if (combined) commit();
|
|
21201
21619
|
}, [
|
|
21202
21620
|
combined,
|
|
@@ -21230,9 +21648,9 @@ var BillingInfo = ({
|
|
|
21230
21648
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(FrozenFields, { frozen: checkout.orderFixed, children: [
|
|
21231
21649
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Card, { children: [
|
|
21232
21650
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SectionHeader, { title: heading }),
|
|
21233
|
-
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style:
|
|
21234
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style:
|
|
21235
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Pressable, { onPress: () => onLogin(), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style:
|
|
21651
|
+
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style: s6.loginRow, children: [
|
|
21652
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style: s6.note, children: "Login & skip ahead:" }),
|
|
21653
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Pressable, { onPress: () => onLogin(), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style: s6.link, children: "Login" }) })
|
|
21236
21654
|
] }) : null,
|
|
21237
21655
|
gates.phoneFirstCheckout && !checkout.isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21238
21656
|
BillingPhoneIdentity,
|
|
@@ -21243,8 +21661,8 @@ var BillingInfo = ({
|
|
|
21243
21661
|
whatsappAvailable: Boolean(gates.phoneFirstWhatsapp)
|
|
21244
21662
|
}
|
|
21245
21663
|
) : null,
|
|
21246
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style:
|
|
21247
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style:
|
|
21664
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style: s6.row, children: [
|
|
21665
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style: s6.col, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Field, { error: fieldError("First name", "First name is required."), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21248
21666
|
Input,
|
|
21249
21667
|
{
|
|
21250
21668
|
placeholder: "First name *",
|
|
@@ -21254,7 +21672,7 @@ var BillingInfo = ({
|
|
|
21254
21672
|
invalid: Boolean(fieldError("First name"))
|
|
21255
21673
|
}
|
|
21256
21674
|
) }) }),
|
|
21257
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style:
|
|
21675
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style: s6.col, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Field, { error: fieldError("Last name", "Last name is required."), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21258
21676
|
Input,
|
|
21259
21677
|
{
|
|
21260
21678
|
placeholder: "Last name *",
|
|
@@ -21265,8 +21683,8 @@ var BillingInfo = ({
|
|
|
21265
21683
|
}
|
|
21266
21684
|
) }) })
|
|
21267
21685
|
] }),
|
|
21268
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style:
|
|
21269
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style:
|
|
21686
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style: s6.row, children: [
|
|
21687
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style: s6.col, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21270
21688
|
Field,
|
|
21271
21689
|
{
|
|
21272
21690
|
error: fieldError("Valid email address", "Enter a valid email address."),
|
|
@@ -21283,7 +21701,7 @@ var BillingInfo = ({
|
|
|
21283
21701
|
)
|
|
21284
21702
|
}
|
|
21285
21703
|
) }),
|
|
21286
|
-
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style:
|
|
21704
|
+
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.View, { style: s6.col, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21287
21705
|
Field,
|
|
21288
21706
|
{
|
|
21289
21707
|
error: fieldError(
|
|
@@ -21305,10 +21723,10 @@ var BillingInfo = ({
|
|
|
21305
21723
|
) }) : null
|
|
21306
21724
|
] }),
|
|
21307
21725
|
!showValidation && requireEmailConfirmation && billing.confirmEmail && billing.confirmEmail.trim().toLowerCase() !== billing.email.trim().toLowerCase() ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ErrorText, { children: "The email addresses do not match." }) : null,
|
|
21308
|
-
emailTaken ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.Text, { style:
|
|
21726
|
+
emailTaken ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.Text, { style: s6.note, children: [
|
|
21309
21727
|
"This email is already registered.",
|
|
21310
21728
|
" ",
|
|
21311
|
-
onLogin ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style:
|
|
21729
|
+
onLogin ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style: s6.link, onPress: () => onLogin(billing.email), children: "Log in to autofill your details" }) : "Log in to autofill your details."
|
|
21312
21730
|
] }) : null,
|
|
21313
21731
|
checkout.buyerFields.map((f) => {
|
|
21314
21732
|
var _a2;
|
|
@@ -21371,8 +21789,8 @@ var BillingInfo = ({
|
|
|
21371
21789
|
setBilling
|
|
21372
21790
|
}
|
|
21373
21791
|
) : null,
|
|
21374
|
-
orderGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
21375
|
-
g.label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style:
|
|
21792
|
+
orderGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react52.Fragment, { children: [
|
|
21793
|
+
g.label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style: s6.sectionLabel, children: g.label }) : null,
|
|
21376
21794
|
renderGroupFields(
|
|
21377
21795
|
g,
|
|
21378
21796
|
dataCapture,
|
|
@@ -21387,21 +21805,21 @@ var BillingInfo = ({
|
|
|
21387
21805
|
label: brandOptInLabel
|
|
21388
21806
|
}
|
|
21389
21807
|
) : null,
|
|
21390
|
-
privacyPolicy ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style:
|
|
21808
|
+
privacyPolicy ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.View, { style: s6.consent, children: [
|
|
21391
21809
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21392
21810
|
Checkbox,
|
|
21393
21811
|
{
|
|
21394
21812
|
checked: consent.ttfOptIn,
|
|
21395
21813
|
onChange: (ttfOptIn) => setConsent((c) => ({ ...c, ttfOptIn })),
|
|
21396
21814
|
invalid: privacyInvalid,
|
|
21397
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.Text, { style:
|
|
21815
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native22.Text, { style: s6.consentLabel, children: [
|
|
21398
21816
|
"I have read and agree to ",
|
|
21399
21817
|
privacyPolicy.brandName,
|
|
21400
21818
|
" ",
|
|
21401
21819
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
21402
21820
|
import_react_native22.Text,
|
|
21403
21821
|
{
|
|
21404
|
-
style:
|
|
21822
|
+
style: s6.link,
|
|
21405
21823
|
onPress: () => import_react_native22.Linking.openURL(privacyPolicy.url).catch(() => void 0),
|
|
21406
21824
|
children: privacyPolicy.linkLabel || "Privacy Policy."
|
|
21407
21825
|
}
|
|
@@ -21460,7 +21878,7 @@ var BillingInfo = ({
|
|
|
21460
21878
|
) : null
|
|
21461
21879
|
] });
|
|
21462
21880
|
};
|
|
21463
|
-
var useStyles4 = (theme) => (0,
|
|
21881
|
+
var useStyles4 = (theme) => (0, import_react52.useMemo)(
|
|
21464
21882
|
() => import_react_native22.StyleSheet.create({
|
|
21465
21883
|
loginRow: { flexDirection: "row", alignItems: "center", gap: 8 },
|
|
21466
21884
|
note: {
|
|
@@ -21626,7 +22044,7 @@ var Accommodation = ({ eventId }) => {
|
|
|
21626
22044
|
var styles7 = import_react_native24.StyleSheet.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
|
|
21627
22045
|
|
|
21628
22046
|
// src/sections/Payment.tsx
|
|
21629
|
-
var
|
|
22047
|
+
var import_react53 = require("react");
|
|
21630
22048
|
var import_react_native25 = require("react-native");
|
|
21631
22049
|
var import_stripe_react_native3 = require("@stripe/stripe-react-native");
|
|
21632
22050
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
@@ -21680,14 +22098,14 @@ var Payment = ({
|
|
|
21680
22098
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
21681
22099
|
const bundleStarting = bundleWait !== null;
|
|
21682
22100
|
const validation = useCheckoutValidation();
|
|
21683
|
-
const [error, setError] = (0,
|
|
22101
|
+
const [error, setError] = (0, import_react53.useState)("");
|
|
21684
22102
|
const paymentMethods = hooks_exports.useCheckoutPaymentMethods(checkout.store);
|
|
21685
22103
|
const methods = (_a = paymentMethods.data) != null ? _a : null;
|
|
21686
|
-
const [selected, setSelected] = (0,
|
|
21687
|
-
const [extras, setExtras] = (0,
|
|
21688
|
-
const [useSavedCard, setUseSavedCard] = (0,
|
|
21689
|
-
const [nativeWalletSupported, setNativeWalletSupported] = (0,
|
|
21690
|
-
(0,
|
|
22104
|
+
const [selected, setSelected] = (0, import_react53.useState)("");
|
|
22105
|
+
const [extras, setExtras] = (0, import_react53.useState)({});
|
|
22106
|
+
const [useSavedCard, setUseSavedCard] = (0, import_react53.useState)(true);
|
|
22107
|
+
const [nativeWalletSupported, setNativeWalletSupported] = (0, import_react53.useState)(false);
|
|
22108
|
+
(0, import_react53.useEffect)(() => {
|
|
21691
22109
|
let mounted = true;
|
|
21692
22110
|
const env = getConfig().env;
|
|
21693
22111
|
(0, import_stripe_react_native3.isPlatformPaySupported)({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
|
|
@@ -21703,7 +22121,7 @@ var Payment = ({
|
|
|
21703
22121
|
const isFree = bd !== void 0 && Number(bd.total) === 0;
|
|
21704
22122
|
const isXendit = checkout.gateway === "xendit";
|
|
21705
22123
|
const offersOxxo = stripeOffersOxxo(checkout.stripeElementsConfig);
|
|
21706
|
-
const options = (0,
|
|
22124
|
+
const options = (0, import_react53.useMemo)(() => {
|
|
21707
22125
|
var _a2, _b2, _c2, _d2, _e2;
|
|
21708
22126
|
if (isFree || !methods) return [];
|
|
21709
22127
|
const out = [];
|
|
@@ -21760,7 +22178,7 @@ var Payment = ({
|
|
|
21760
22178
|
nativeWalletSupported,
|
|
21761
22179
|
offersOxxo
|
|
21762
22180
|
]);
|
|
21763
|
-
(0,
|
|
22181
|
+
(0, import_react53.useEffect)(() => {
|
|
21764
22182
|
if (options.length && !options.some((o) => o.value === selected))
|
|
21765
22183
|
setSelected(options[0].value);
|
|
21766
22184
|
}, [options, selected]);
|
|
@@ -21886,7 +22304,7 @@ var Payment = ({
|
|
|
21886
22304
|
selected,
|
|
21887
22305
|
onSelect: setSelected,
|
|
21888
22306
|
extraValues: extras,
|
|
21889
|
-
onExtraChange: (v, patch2) => setExtras((
|
|
22307
|
+
onExtraChange: (v, patch2) => setExtras((s6) => ({ ...s6, [v]: { ...s6[v], ...patch2 } })),
|
|
21890
22308
|
showValidation: validation.attempt > 0,
|
|
21891
22309
|
inputSlotFor: isPlanSelected ? reuseSavedCard ? void 0 : "paymentPlan" : cardValue,
|
|
21892
22310
|
children: paymentInput
|
|
@@ -21895,18 +22313,18 @@ var Payment = ({
|
|
|
21895
22313
|
] }) : null,
|
|
21896
22314
|
conditions.map((c) => {
|
|
21897
22315
|
var _a2, _b2;
|
|
21898
|
-
const
|
|
22316
|
+
const invalid2 = validation.attempt > 0 && c.isRequired && !((_a2 = checkout.acceptedConditions) == null ? void 0 : _a2[c.id]);
|
|
21899
22317
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_native25.View, { style: { gap: 4 }, children: [
|
|
21900
22318
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
21901
22319
|
Checkbox,
|
|
21902
22320
|
{
|
|
21903
22321
|
checked: Boolean((_b2 = checkout.acceptedConditions) == null ? void 0 : _b2[c.id]),
|
|
21904
|
-
invalid,
|
|
22322
|
+
invalid: invalid2,
|
|
21905
22323
|
onChange: (next) => checkout.acceptCondition(c.id, next),
|
|
21906
22324
|
label: `${conditionText(c.content || c.name)}${c.isRequired ? " *" : ""}`
|
|
21907
22325
|
}
|
|
21908
22326
|
) }),
|
|
21909
|
-
|
|
22327
|
+
invalid2 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ErrorText, { children: "You must accept this condition to continue." }) : null
|
|
21910
22328
|
] }, c.id);
|
|
21911
22329
|
})
|
|
21912
22330
|
] }),
|
|
@@ -21930,17 +22348,17 @@ var Payment = ({
|
|
|
21930
22348
|
};
|
|
21931
22349
|
|
|
21932
22350
|
// src/sections/WaiverSigning.tsx
|
|
21933
|
-
var
|
|
22351
|
+
var import_react55 = require("react");
|
|
21934
22352
|
var import_react_native27 = require("react-native");
|
|
21935
22353
|
|
|
21936
22354
|
// src/ui/SignaturePad.tsx
|
|
21937
|
-
var
|
|
22355
|
+
var import_react54 = require("react");
|
|
21938
22356
|
var import_react_native26 = require("react-native");
|
|
21939
22357
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
21940
22358
|
var LINE_WIDTH = 2.5;
|
|
21941
22359
|
var PAD_HEIGHT = 160;
|
|
21942
22360
|
var MIN_STEP = 1.5;
|
|
21943
|
-
var StrokeView = (0,
|
|
22361
|
+
var StrokeView = (0, import_react54.memo)(
|
|
21944
22362
|
({ stroke }) => stroke.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
21945
22363
|
import_react_native26.View,
|
|
21946
22364
|
{
|
|
@@ -21980,13 +22398,13 @@ var SignaturePad = ({
|
|
|
21980
22398
|
disabled
|
|
21981
22399
|
}) => {
|
|
21982
22400
|
const theme = useTheme();
|
|
21983
|
-
const strokesRef = (0,
|
|
21984
|
-
const [, setFrame] = (0,
|
|
21985
|
-
const frameRequest = (0,
|
|
21986
|
-
const size = (0,
|
|
21987
|
-
const report = (0,
|
|
22401
|
+
const strokesRef = (0, import_react54.useRef)([]);
|
|
22402
|
+
const [, setFrame] = (0, import_react54.useState)(0);
|
|
22403
|
+
const frameRequest = (0, import_react54.useRef)(null);
|
|
22404
|
+
const size = (0, import_react54.useRef)({ width: 0, height: PAD_HEIGHT });
|
|
22405
|
+
const report = (0, import_react54.useRef)(onChange);
|
|
21988
22406
|
report.current = onChange;
|
|
21989
|
-
const disabledRef = (0,
|
|
22407
|
+
const disabledRef = (0, import_react54.useRef)(disabled);
|
|
21990
22408
|
disabledRef.current = disabled;
|
|
21991
22409
|
const render = () => {
|
|
21992
22410
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
@@ -21997,7 +22415,7 @@ var SignaturePad = ({
|
|
|
21997
22415
|
if (frameRequest.current !== null) return;
|
|
21998
22416
|
frameRequest.current = requestAnimationFrame(render);
|
|
21999
22417
|
};
|
|
22000
|
-
(0,
|
|
22418
|
+
(0, import_react54.useEffect)(
|
|
22001
22419
|
() => () => {
|
|
22002
22420
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
22003
22421
|
},
|
|
@@ -22012,7 +22430,7 @@ var SignaturePad = ({
|
|
|
22012
22430
|
});
|
|
22013
22431
|
if (ended) report.current(ended.pngDataUrl, ended.inkLength);
|
|
22014
22432
|
};
|
|
22015
|
-
const responder = (0,
|
|
22433
|
+
const responder = (0, import_react54.useMemo)(
|
|
22016
22434
|
() => import_react_native26.PanResponder.create({
|
|
22017
22435
|
onStartShouldSetPanResponder: () => !disabledRef.current,
|
|
22018
22436
|
onMoveShouldSetPanResponder: () => !disabledRef.current,
|
|
@@ -22115,7 +22533,7 @@ var WaiverSigning = ({
|
|
|
22115
22533
|
const checkout = useCheckoutContext();
|
|
22116
22534
|
const locked = Boolean(checkout.orderFixed);
|
|
22117
22535
|
const theme = useTheme();
|
|
22118
|
-
const
|
|
22536
|
+
const s6 = useWaiverStyles(theme);
|
|
22119
22537
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22120
22538
|
const waiver = checkout.waiver;
|
|
22121
22539
|
const signing = hooks_exports.useWaiverSigning(
|
|
@@ -22124,8 +22542,8 @@ var WaiverSigning = ({
|
|
|
22124
22542
|
checkout.setWaiverSignature,
|
|
22125
22543
|
checkout.holdWaiverSigning
|
|
22126
22544
|
);
|
|
22127
|
-
const [open, setOpen] = (0,
|
|
22128
|
-
const [reloading, setReloading] = (0,
|
|
22545
|
+
const [open, setOpen] = (0, import_react55.useState)({});
|
|
22546
|
+
const [reloading, setReloading] = (0, import_react55.useState)(false);
|
|
22129
22547
|
if ((_a = checkout.unavailableDetails) == null ? void 0 : _a.includes("waiver")) {
|
|
22130
22548
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Card, { children: [
|
|
22131
22549
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SectionHeader, { title: t("waivers.heading") }),
|
|
@@ -22149,16 +22567,16 @@ var WaiverSigning = ({
|
|
|
22149
22567
|
if (!waiverSignableAtCheckout(waiver)) {
|
|
22150
22568
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Card, { children: [
|
|
22151
22569
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
22152
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22570
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.muted, children: t("waivers.signLater") })
|
|
22153
22571
|
] });
|
|
22154
22572
|
}
|
|
22155
22573
|
const signatures = (_b = checkout.waiverSignatures) != null ? _b : {};
|
|
22156
22574
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Card, { children: [
|
|
22157
22575
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
22158
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22576
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.muted, children: t(
|
|
22159
22577
|
waiver.checkoutMode === "required" ? "waivers.intro.required" : "waivers.intro.optional"
|
|
22160
22578
|
) }),
|
|
22161
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.ScrollView, { style: [
|
|
22579
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.ScrollView, { style: [s6.textBox, { borderColor: theme.border }], nestedScrollEnabled: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.body, children: htmlToPlainText(waiver.bodyHtml) }) }),
|
|
22162
22580
|
tickets.map((ticket) => {
|
|
22163
22581
|
const signed = signatures[ticket.index];
|
|
22164
22582
|
const formKey = waiverTicketFormKey(checkout.eventId, waiver, ticket);
|
|
@@ -22171,10 +22589,10 @@ var WaiverSigning = ({
|
|
|
22171
22589
|
number: ticket.ticketNumber,
|
|
22172
22590
|
name: ticket.holderName
|
|
22173
22591
|
}) : t("waivers.ticket", { number: ticket.ticketNumber });
|
|
22174
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style: [
|
|
22175
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22176
|
-
signed ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style:
|
|
22177
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style: [s6.ticket, { borderTopColor: theme.border }], children: [
|
|
22593
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.strong, children: label }),
|
|
22594
|
+
signed ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style: s6.row, children: [
|
|
22595
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.body, children: t(
|
|
22178
22596
|
!forHolder ? "waivers.signedForSomeoneElse" : signed.signerRole === "guardian" ? "waivers.signedByGuardian" : "waivers.signedBy",
|
|
22179
22597
|
{ name: signed.signerName }
|
|
22180
22598
|
) }),
|
|
@@ -22218,25 +22636,25 @@ var WaiverSigning = ({
|
|
|
22218
22636
|
var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error, onSign }) => {
|
|
22219
22637
|
var _a, _b, _c, _d;
|
|
22220
22638
|
const theme = useTheme();
|
|
22221
|
-
const
|
|
22222
|
-
const [heldDraft, setDraft] = (0,
|
|
22639
|
+
const s6 = useWaiverStyles(theme);
|
|
22640
|
+
const [heldDraft, setDraft] = (0, import_react55.useState)(
|
|
22223
22641
|
() => emptyWaiverDraft(
|
|
22224
22642
|
{ firstName: ticket.holderFirstName, lastName: ticket.holderLastName },
|
|
22225
22643
|
{ signatureMethods: methods }
|
|
22226
22644
|
)
|
|
22227
22645
|
);
|
|
22228
22646
|
const draft = draftWithAllowedMethod(heldDraft, methods);
|
|
22229
|
-
const [problems, setProblems] = (0,
|
|
22230
|
-
const [pressed, setPressed] = (0,
|
|
22647
|
+
const [problems, setProblems] = (0, import_react55.useState)([]);
|
|
22648
|
+
const [pressed, setPressed] = (0, import_react55.useState)(false);
|
|
22231
22649
|
const frozen = busy || locked;
|
|
22232
|
-
const draftRef = (0,
|
|
22650
|
+
const draftRef = (0, import_react55.useRef)(draft);
|
|
22233
22651
|
draftRef.current = draft;
|
|
22234
22652
|
const patch2 = (next) => {
|
|
22235
22653
|
if (!frozen) setDraft((d) => ({ ...d, ...next }));
|
|
22236
22654
|
};
|
|
22237
22655
|
const guardian = draft.signerRole === "guardian";
|
|
22238
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style:
|
|
22239
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native27.View, { style: s6.form, children: [
|
|
22657
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.strong, children: t("waivers.role.label") }),
|
|
22240
22658
|
["holder", "guardian"].map((role) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
22241
22659
|
import_react_native27.Pressable,
|
|
22242
22660
|
{
|
|
@@ -22252,19 +22670,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
22252
22670
|
} : { signerRole: role }
|
|
22253
22671
|
);
|
|
22254
22672
|
},
|
|
22255
|
-
style:
|
|
22673
|
+
style: s6.choice,
|
|
22256
22674
|
children: [
|
|
22257
22675
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
22258
22676
|
import_react_native27.View,
|
|
22259
22677
|
{
|
|
22260
22678
|
style: [
|
|
22261
|
-
|
|
22679
|
+
s6.radio,
|
|
22262
22680
|
{ borderColor: theme.accent },
|
|
22263
22681
|
draft.signerRole === role && { backgroundColor: theme.accent }
|
|
22264
22682
|
]
|
|
22265
22683
|
}
|
|
22266
22684
|
),
|
|
22267
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22685
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.body, children: t(`waivers.role.${role}`) })
|
|
22268
22686
|
]
|
|
22269
22687
|
},
|
|
22270
22688
|
role
|
|
@@ -22324,19 +22742,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
22324
22742
|
accessibilityState: { selected: draft.method === method },
|
|
22325
22743
|
disabled: frozen,
|
|
22326
22744
|
onPress: () => setDraft((d) => withSignatureMethod(d, method)),
|
|
22327
|
-
style:
|
|
22745
|
+
style: s6.choice,
|
|
22328
22746
|
children: [
|
|
22329
22747
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
22330
22748
|
import_react_native27.View,
|
|
22331
22749
|
{
|
|
22332
22750
|
style: [
|
|
22333
|
-
|
|
22751
|
+
s6.radio,
|
|
22334
22752
|
{ borderColor: theme.accent },
|
|
22335
22753
|
draft.method === method && { backgroundColor: theme.accent }
|
|
22336
22754
|
]
|
|
22337
22755
|
}
|
|
22338
22756
|
),
|
|
22339
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22757
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.body, children: t(`waivers.method.${method}`) })
|
|
22340
22758
|
]
|
|
22341
22759
|
},
|
|
22342
22760
|
method
|
|
@@ -22368,7 +22786,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
22368
22786
|
),
|
|
22369
22787
|
problems.map((key4) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorText, { children: t(key4) }, key4)),
|
|
22370
22788
|
error ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorText, { children: error }) : null,
|
|
22371
|
-
busy && !pressed ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style:
|
|
22789
|
+
busy && !pressed ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native27.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
22372
22790
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
22373
22791
|
Button,
|
|
22374
22792
|
{
|
|
@@ -22383,7 +22801,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
22383
22801
|
)
|
|
22384
22802
|
] });
|
|
22385
22803
|
};
|
|
22386
|
-
var useWaiverStyles = (theme) => (0,
|
|
22804
|
+
var useWaiverStyles = (theme) => (0, import_react55.useMemo)(
|
|
22387
22805
|
() => import_react_native27.StyleSheet.create({
|
|
22388
22806
|
muted: {
|
|
22389
22807
|
color: theme.muted,
|
|
@@ -22428,7 +22846,7 @@ var useWaiverStyles = (theme) => (0, import_react54.useMemo)(
|
|
|
22428
22846
|
);
|
|
22429
22847
|
|
|
22430
22848
|
// src/sections/IDVerification.tsx
|
|
22431
|
-
var
|
|
22849
|
+
var import_react56 = require("react");
|
|
22432
22850
|
var import_react_native28 = require("react-native");
|
|
22433
22851
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
22434
22852
|
var MESSAGE = {
|
|
@@ -22443,8 +22861,8 @@ var IDVerification = () => {
|
|
|
22443
22861
|
const checkout = useCheckoutContext();
|
|
22444
22862
|
const theme = useTheme();
|
|
22445
22863
|
const order = checkout.order;
|
|
22446
|
-
const [phase, setPhase] = (0,
|
|
22447
|
-
const [error, setError] = (0,
|
|
22864
|
+
const [phase, setPhase] = (0, import_react56.useState)("idle");
|
|
22865
|
+
const [error, setError] = (0, import_react56.useState)("");
|
|
22448
22866
|
if (!(order == null ? void 0 : order.needIdVerification)) return null;
|
|
22449
22867
|
const done = phase === "verified";
|
|
22450
22868
|
const running = phase === "starting" || phase === "polling";
|
|
@@ -22471,7 +22889,7 @@ var IDVerification = () => {
|
|
|
22471
22889
|
};
|
|
22472
22890
|
|
|
22473
22891
|
// src/sections/Confirmation.tsx
|
|
22474
|
-
var
|
|
22892
|
+
var import_react57 = require("react");
|
|
22475
22893
|
var import_react_native29 = require("react-native");
|
|
22476
22894
|
var import_clipboard = __toESM(require("@react-native-clipboard/clipboard"));
|
|
22477
22895
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -22485,7 +22903,7 @@ var Confirmation = ({
|
|
|
22485
22903
|
const checkout = useCheckoutContext();
|
|
22486
22904
|
const theme = useTheme();
|
|
22487
22905
|
const order = checkout.order;
|
|
22488
|
-
const [copied, setCopied] = (0,
|
|
22906
|
+
const [copied, setCopied] = (0, import_react57.useState)(false);
|
|
22489
22907
|
if (!order) return null;
|
|
22490
22908
|
const pending2 = order.pending;
|
|
22491
22909
|
const url2 = shareUrl != null ? shareUrl : "";
|
|
@@ -22539,12 +22957,12 @@ var styles9 = import_react_native29.StyleSheet.create({
|
|
|
22539
22957
|
});
|
|
22540
22958
|
|
|
22541
22959
|
// src/sections/Rewards.tsx
|
|
22542
|
-
var
|
|
22960
|
+
var import_react60 = require("react");
|
|
22543
22961
|
var import_react_native32 = require("react-native");
|
|
22544
22962
|
var import_clipboard2 = __toESM(require("@react-native-clipboard/clipboard"));
|
|
22545
22963
|
|
|
22546
22964
|
// src/sections/rewards/RewardsLadder.tsx
|
|
22547
|
-
var
|
|
22965
|
+
var import_react58 = require("react");
|
|
22548
22966
|
var import_react_native30 = require("react-native");
|
|
22549
22967
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
22550
22968
|
var AWARD_STATUS_KEYS = {
|
|
@@ -22554,9 +22972,9 @@ var AWARD_STATUS_KEYS = {
|
|
|
22554
22972
|
cancelled: "rewards.awards.cancelled"
|
|
22555
22973
|
};
|
|
22556
22974
|
var DeliveryDetails = ({ fields, translate: t, onSubmit }) => {
|
|
22557
|
-
const [values2, setValues] = (0,
|
|
22558
|
-
const [saving, setSaving] = (0,
|
|
22559
|
-
const [failure, setFailure] = (0,
|
|
22975
|
+
const [values2, setValues] = (0, import_react58.useState)({});
|
|
22976
|
+
const [saving, setSaving] = (0, import_react58.useState)(false);
|
|
22977
|
+
const [failure, setFailure] = (0, import_react58.useState)("");
|
|
22560
22978
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_native30.View, { style: { gap: 10 }, children: [
|
|
22561
22979
|
fields.map((field) => {
|
|
22562
22980
|
var _a;
|
|
@@ -22648,7 +23066,7 @@ var styles10 = import_react_native30.StyleSheet.create({
|
|
|
22648
23066
|
});
|
|
22649
23067
|
|
|
22650
23068
|
// src/sections/rewards/RewardsTree.tsx
|
|
22651
|
-
var
|
|
23069
|
+
var import_react59 = require("react");
|
|
22652
23070
|
var import_react_native31 = require("react-native");
|
|
22653
23071
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
22654
23072
|
var MAX_NODES = 120;
|
|
@@ -22656,11 +23074,11 @@ var DOT = 10;
|
|
|
22656
23074
|
var ROOT_DOT = 16;
|
|
22657
23075
|
var RewardsTree = ({ tree, size = 260 }) => {
|
|
22658
23076
|
const theme = useTheme();
|
|
22659
|
-
const nodes = (0,
|
|
23077
|
+
const nodes = (0, import_react59.useMemo)(() => {
|
|
22660
23078
|
var _a;
|
|
22661
23079
|
return ((_a = tree == null ? void 0 : tree.nodes) != null ? _a : []).slice(0, MAX_NODES);
|
|
22662
23080
|
}, [tree]);
|
|
22663
|
-
const { layout, edges, rootId } = (0,
|
|
23081
|
+
const { layout, edges, rootId } = (0, import_react59.useMemo)(() => {
|
|
22664
23082
|
const root = treeRootId(nodes);
|
|
22665
23083
|
const computed = computeRadialTreeLayout(nodes, root);
|
|
22666
23084
|
return { layout: computed, edges: radialTreeEdges(nodes, computed), rootId: root };
|
|
@@ -22747,10 +23165,10 @@ var RewardsView = ({
|
|
|
22747
23165
|
var _a, _b, _c, _d, _e, _f;
|
|
22748
23166
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22749
23167
|
const { rewards, failure, busy, hash } = flow;
|
|
22750
|
-
const [packName, setPackName] = (0,
|
|
22751
|
-
const [packCode, setPackCode] = (0,
|
|
22752
|
-
const [copied, setCopied] = (0,
|
|
22753
|
-
(0,
|
|
23168
|
+
const [packName, setPackName] = (0, import_react60.useState)("");
|
|
23169
|
+
const [packCode, setPackCode] = (0, import_react60.useState)("");
|
|
23170
|
+
const [copied, setCopied] = (0, import_react60.useState)(false);
|
|
23171
|
+
(0, import_react60.useEffect)(() => {
|
|
22754
23172
|
setCopied(false);
|
|
22755
23173
|
}, [rewards == null ? void 0 : rewards.share_link]);
|
|
22756
23174
|
if (!rewards)
|
|
@@ -22938,7 +23356,7 @@ var styles12 = import_react_native32.StyleSheet.create({
|
|
|
22938
23356
|
});
|
|
22939
23357
|
|
|
22940
23358
|
// src/sections/TicketChange.tsx
|
|
22941
|
-
var
|
|
23359
|
+
var import_react61 = require("react");
|
|
22942
23360
|
var import_react_native33 = require("react-native");
|
|
22943
23361
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
22944
23362
|
var TicketChange = ({
|
|
@@ -22953,17 +23371,17 @@ var TicketChange = ({
|
|
|
22953
23371
|
}) => {
|
|
22954
23372
|
var _a;
|
|
22955
23373
|
const theme = useTheme();
|
|
22956
|
-
const
|
|
23374
|
+
const s6 = useChangeStyles(theme);
|
|
22957
23375
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22958
23376
|
const open = openUrl != null ? openUrl : rnPorts.openUrl;
|
|
22959
23377
|
const flow = hooks_exports.useTicketChange({ ticketHash, orderHash }, open);
|
|
22960
23378
|
const options = flow.query.data;
|
|
22961
23379
|
const signInLine = flow.signInRequired ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.View, { children: [
|
|
22962
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23380
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.signInRequired") }),
|
|
22963
23381
|
onLogin ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { onPress: () => flow.signIn(onLogin), children: t("ticketChange.signIn") }) : null
|
|
22964
23382
|
] }) : null;
|
|
22965
23383
|
const label = (option) => option.eventName ? t("ticketChange.otherEvent", { name: option.name, event: option.eventName }) : option.name;
|
|
22966
|
-
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23384
|
+
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null;
|
|
22967
23385
|
const refreshLine = flow.refreshFailed ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.View, { children: [
|
|
22968
23386
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: t("ticketChange.refreshFailed") }),
|
|
22969
23387
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -22984,7 +23402,7 @@ var TicketChange = ({
|
|
|
22984
23402
|
if (flow.paymentInProgress) {
|
|
22985
23403
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
22986
23404
|
header,
|
|
22987
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23405
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.paymentInProgress") }),
|
|
22988
23406
|
flow.canContinuePayment ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { onPress: flow.continuePayment, children: t("ticketChange.continuePayment") }) : null,
|
|
22989
23407
|
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: t(flow.notice) }) : null,
|
|
22990
23408
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "ghost", onPress: flow.startAgain, children: t("ticketChange.startAgain") })
|
|
@@ -22993,7 +23411,7 @@ var TicketChange = ({
|
|
|
22993
23411
|
if (flow.query.isLoading) {
|
|
22994
23412
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
22995
23413
|
header,
|
|
22996
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.View, { style:
|
|
23414
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.View, { style: s6.loader, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Loader, {}) })
|
|
22997
23415
|
] });
|
|
22998
23416
|
}
|
|
22999
23417
|
if (!options) {
|
|
@@ -23007,8 +23425,8 @@ var TicketChange = ({
|
|
|
23007
23425
|
const priceText = flow.result && "priceText" in flow.result ? flow.result.priceText : "";
|
|
23008
23426
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
23009
23427
|
header,
|
|
23010
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23011
|
-
priceText ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23428
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.strong, children: "text" in done ? done.text : t(done.key, done.values) }),
|
|
23429
|
+
priceText ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.strong, children: priceText }) : null,
|
|
23012
23430
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
23013
23431
|
Button,
|
|
23014
23432
|
{
|
|
@@ -23021,7 +23439,7 @@ var TicketChange = ({
|
|
|
23021
23439
|
if (flow.step === "payment" && ((_a = flow.result) == null ? void 0 : _a.status) === "payment_required") {
|
|
23022
23440
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
23023
23441
|
header,
|
|
23024
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23442
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t("ticketChange.payment") }),
|
|
23025
23443
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { disabled: !flow.can.pay, onPress: flow.openPayment, children: t("ticketChange.paymentOpen") }),
|
|
23026
23444
|
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: t(flow.notice) }) : null,
|
|
23027
23445
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -23041,12 +23459,12 @@ var TicketChange = ({
|
|
|
23041
23459
|
const submitting = flow.step === "submitting";
|
|
23042
23460
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
23043
23461
|
header,
|
|
23044
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23045
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23462
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.strong, children: t("ticketChange.confirmTitle", { name: label(option) }) }),
|
|
23463
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.price, children: option.priceText }),
|
|
23046
23464
|
(() => {
|
|
23047
23465
|
const charge = ticketChangeCharge(option);
|
|
23048
23466
|
if (!charge || option.fee <= 0) return null;
|
|
23049
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.Text, { style:
|
|
23467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.Text, { style: s6.muted, children: [
|
|
23050
23468
|
t("ticketChange.fee", {
|
|
23051
23469
|
amount: `${option.currency} ${option.fee.toFixed(2)}`
|
|
23052
23470
|
}),
|
|
@@ -23057,10 +23475,10 @@ var TicketChange = ({
|
|
|
23057
23475
|
] });
|
|
23058
23476
|
})(),
|
|
23059
23477
|
flow.error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: flow.error }) : null,
|
|
23060
|
-
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23478
|
+
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
23061
23479
|
signInLine,
|
|
23062
|
-
flow.alternatives.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.View, { style:
|
|
23063
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23480
|
+
flow.alternatives.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native33.View, { style: s6.slots, children: [
|
|
23481
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t("ticketChange.slotFull") }),
|
|
23064
23482
|
flow.alternatives.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
23065
23483
|
Button,
|
|
23066
23484
|
{
|
|
@@ -23087,7 +23505,7 @@ var TicketChange = ({
|
|
|
23087
23505
|
if (ticketChangeView(options) === "choose") {
|
|
23088
23506
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
23089
23507
|
header,
|
|
23090
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23508
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t("ticketChange.choose") }),
|
|
23091
23509
|
options.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
23092
23510
|
import_react_native33.Pressable,
|
|
23093
23511
|
{
|
|
@@ -23096,31 +23514,31 @@ var TicketChange = ({
|
|
|
23096
23514
|
disabled: !flow.can.select,
|
|
23097
23515
|
onPress: () => flow.select(option),
|
|
23098
23516
|
style: [
|
|
23099
|
-
|
|
23517
|
+
s6.option,
|
|
23100
23518
|
{ borderColor: theme.border },
|
|
23101
|
-
!flow.can.select &&
|
|
23519
|
+
!flow.can.select && s6.optionDisabled
|
|
23102
23520
|
],
|
|
23103
23521
|
children: [
|
|
23104
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23105
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23522
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.strong, children: label(option) }),
|
|
23523
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.price, children: option.priceText })
|
|
23106
23524
|
]
|
|
23107
23525
|
},
|
|
23108
23526
|
option.ticketTypeId
|
|
23109
23527
|
)),
|
|
23110
23528
|
flow.error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: flow.error }) : null,
|
|
23111
|
-
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23529
|
+
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
23112
23530
|
signInLine
|
|
23113
23531
|
] });
|
|
23114
23532
|
}
|
|
23115
23533
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Card, { children: [
|
|
23116
23534
|
header,
|
|
23117
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23535
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: options.message || t("ticketChange.closed") }),
|
|
23118
23536
|
options.sellInstead.available ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
23119
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23537
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t("ticketChange.sellInsteadNote") }),
|
|
23120
23538
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { disabled: !flow.can.sellInstead, onPress: flow.sellInstead, children: t("ticketChange.sellInstead") })
|
|
23121
23539
|
] }) : null,
|
|
23122
|
-
options.waitlistOptions.map((wait) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.View, { style:
|
|
23123
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23540
|
+
options.waitlistOptions.map((wait) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.View, { style: s6.waitlist, children: wait.entry ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
23541
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t(
|
|
23124
23542
|
wait.entry.status === "offered" ? "ticketChange.waitlist.offered" : "ticketChange.waitlist.waiting",
|
|
23125
23543
|
{ name: wait.name }
|
|
23126
23544
|
) }),
|
|
@@ -23145,10 +23563,10 @@ var TicketChange = ({
|
|
|
23145
23563
|
}
|
|
23146
23564
|
) }, wait.ticketTypeId)),
|
|
23147
23565
|
flow.error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorText, { children: flow.error }) : null,
|
|
23148
|
-
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style:
|
|
23566
|
+
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s6.muted, children: t(flow.notice) }) : null
|
|
23149
23567
|
] });
|
|
23150
23568
|
};
|
|
23151
|
-
var useChangeStyles = (theme) => (0,
|
|
23569
|
+
var useChangeStyles = (theme) => (0, import_react61.useMemo)(
|
|
23152
23570
|
() => import_react_native33.StyleSheet.create({
|
|
23153
23571
|
loader: { paddingVertical: 20, alignItems: "center" },
|
|
23154
23572
|
muted: {
|
|
@@ -23244,17 +23662,17 @@ var Trips = ({
|
|
|
23244
23662
|
};
|
|
23245
23663
|
|
|
23246
23664
|
// src/sections/EventDiscussionView.tsx
|
|
23247
|
-
var
|
|
23665
|
+
var import_react65 = require("react");
|
|
23248
23666
|
var import_react_native37 = require("react-native");
|
|
23249
23667
|
|
|
23250
23668
|
// src/sections/discussion/CommentImages.tsx
|
|
23251
|
-
var
|
|
23669
|
+
var import_react63 = require("react");
|
|
23252
23670
|
var import_react_native35 = require("react-native");
|
|
23253
23671
|
|
|
23254
23672
|
// src/ui/useAccountT.ts
|
|
23255
|
-
var
|
|
23673
|
+
var import_react62 = require("react");
|
|
23256
23674
|
var useAccountT = (locale) => {
|
|
23257
|
-
const translate2 = (0,
|
|
23675
|
+
const translate2 = (0, import_react62.useMemo)(
|
|
23258
23676
|
() => createTranslator({ locale: resolveLocale(locale) }),
|
|
23259
23677
|
[locale]
|
|
23260
23678
|
);
|
|
@@ -23318,8 +23736,8 @@ var CommentImages = ({
|
|
|
23318
23736
|
const t = useAccountT(locale);
|
|
23319
23737
|
const theme = useTheme();
|
|
23320
23738
|
const white = [s.white, { fontFamily: theme.fontFamily }];
|
|
23321
|
-
const [selected, setSelected] = (0,
|
|
23322
|
-
(0,
|
|
23739
|
+
const [selected, setSelected] = (0, import_react63.useState)(null);
|
|
23740
|
+
(0, import_react63.useEffect)(() => {
|
|
23323
23741
|
if (selected === null) return;
|
|
23324
23742
|
onPreviewChange(true);
|
|
23325
23743
|
return () => onPreviewChange(false);
|
|
@@ -23575,7 +23993,7 @@ var s = import_react_native35.StyleSheet.create({
|
|
|
23575
23993
|
});
|
|
23576
23994
|
|
|
23577
23995
|
// src/sections/discussion/SwipeReply.tsx
|
|
23578
|
-
var
|
|
23996
|
+
var import_react64 = require("react");
|
|
23579
23997
|
var import_react_native36 = require("react-native");
|
|
23580
23998
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
23581
23999
|
var SwipeReply = ({
|
|
@@ -23586,8 +24004,8 @@ var SwipeReply = ({
|
|
|
23586
24004
|
children
|
|
23587
24005
|
}) => {
|
|
23588
24006
|
const theme = useTheme();
|
|
23589
|
-
const offset = (0,
|
|
23590
|
-
const gesture = (0,
|
|
24007
|
+
const offset = (0, import_react64.useRef)(new import_react_native36.Animated.Value(0)).current;
|
|
24008
|
+
const gesture = (0, import_react64.useMemo)(() => {
|
|
23591
24009
|
const reset = () => import_react_native36.Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
|
|
23592
24010
|
return import_react_native36.PanResponder.create({
|
|
23593
24011
|
onMoveShouldSetPanResponder: (_, value6) => enabled && value6.dx < -12 && Math.abs(value6.dx) > Math.abs(value6.dy) * 1.5,
|
|
@@ -23667,17 +24085,17 @@ var EventDiscussionBody = ({
|
|
|
23667
24085
|
var _a, _b, _c;
|
|
23668
24086
|
const theme = useTheme();
|
|
23669
24087
|
const t = useAccountT(locale);
|
|
23670
|
-
const list2 = (0,
|
|
23671
|
-
const firstContent = (0,
|
|
23672
|
-
const [actions, setActions] = (0,
|
|
23673
|
-
const [reporting, setReporting] = (0,
|
|
23674
|
-
const [moderating, setModerating] = (0,
|
|
23675
|
-
const [reason, setReason] = (0,
|
|
23676
|
-
const [blocksVisible, setBlocksVisible] = (0,
|
|
23677
|
-
const [pickerError, setPickerError] = (0,
|
|
23678
|
-
const [imageOpen, setImageOpen] = (0,
|
|
23679
|
-
const [pickerBusy, setPickerBusy] = (0,
|
|
23680
|
-
const picking = (0,
|
|
24088
|
+
const list2 = (0, import_react65.useRef)(null);
|
|
24089
|
+
const firstContent = (0, import_react65.useRef)(true);
|
|
24090
|
+
const [actions, setActions] = (0, import_react65.useState)(null);
|
|
24091
|
+
const [reporting, setReporting] = (0, import_react65.useState)(null);
|
|
24092
|
+
const [moderating, setModerating] = (0, import_react65.useState)(null);
|
|
24093
|
+
const [reason, setReason] = (0, import_react65.useState)("");
|
|
24094
|
+
const [blocksVisible, setBlocksVisible] = (0, import_react65.useState)(false);
|
|
24095
|
+
const [pickerError, setPickerError] = (0, import_react65.useState)("");
|
|
24096
|
+
const [imageOpen, setImageOpen] = (0, import_react65.useState)(false);
|
|
24097
|
+
const [pickerBusy, setPickerBusy] = (0, import_react65.useState)(false);
|
|
24098
|
+
const picking = (0, import_react65.useRef)(false);
|
|
23681
24099
|
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
23682
24100
|
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
23683
24101
|
const closeActions = (work) => {
|
|
@@ -24687,7 +25105,7 @@ var styles13 = import_react_native42.StyleSheet.create({
|
|
|
24687
25105
|
});
|
|
24688
25106
|
|
|
24689
25107
|
// src/sections/Streaming.tsx
|
|
24690
|
-
var
|
|
25108
|
+
var import_react66 = require("react");
|
|
24691
25109
|
var import_react_native43 = require("react-native");
|
|
24692
25110
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
24693
25111
|
var Streaming = (props) => {
|
|
@@ -24709,14 +25127,14 @@ var StreamingView = ({
|
|
|
24709
25127
|
const defaultT = useAccountT(locale);
|
|
24710
25128
|
const t = translate2 != null ? translate2 : defaultT;
|
|
24711
25129
|
const inherited = useTheme();
|
|
24712
|
-
const theme = (0,
|
|
25130
|
+
const theme = (0, import_react66.useMemo)(
|
|
24713
25131
|
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
24714
25132
|
[inherited, override]
|
|
24715
25133
|
);
|
|
24716
25134
|
const session = hooks_exports.useAuthSession();
|
|
24717
25135
|
const assertOwner = hooks_exports.useSessionAction();
|
|
24718
|
-
const pendingBrowser = (0,
|
|
24719
|
-
const [stored, setStored] = (0,
|
|
25136
|
+
const pendingBrowser = (0, import_react66.useRef)({ scope: session.sessionScope, locked: false });
|
|
25137
|
+
const [stored, setStored] = (0, import_react66.useState)({
|
|
24720
25138
|
scope: session.sessionScope,
|
|
24721
25139
|
busy: false,
|
|
24722
25140
|
error: ""
|
|
@@ -24878,14 +25296,255 @@ var s4 = import_react_native43.StyleSheet.create({
|
|
|
24878
25296
|
note: { fontSize: 14, lineHeight: 20, marginTop: 24 }
|
|
24879
25297
|
});
|
|
24880
25298
|
|
|
25299
|
+
// src/sections/AccountDeletion.tsx
|
|
25300
|
+
var import_react67 = require("react");
|
|
25301
|
+
var import_react_native44 = require("react-native");
|
|
25302
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
25303
|
+
var AccountDeletion = (props) => {
|
|
25304
|
+
const deletion = hooks_exports.useAccountDeletion();
|
|
25305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccountDeletionView, { ...props, deletion });
|
|
25306
|
+
};
|
|
25307
|
+
var AccountDeletionView = ({
|
|
25308
|
+
deletion: flow,
|
|
25309
|
+
showHeader = true,
|
|
25310
|
+
showExplanation = true,
|
|
25311
|
+
onSignIn,
|
|
25312
|
+
onDone,
|
|
25313
|
+
onOpenTeam,
|
|
25314
|
+
locale,
|
|
25315
|
+
translate: translate2,
|
|
25316
|
+
theme: override,
|
|
25317
|
+
style
|
|
25318
|
+
}) => {
|
|
25319
|
+
const defaultT = useAccountT(locale);
|
|
25320
|
+
const t = translate2 != null ? translate2 : defaultT;
|
|
25321
|
+
const inherited = useTheme();
|
|
25322
|
+
const theme = (0, import_react67.useMemo)(
|
|
25323
|
+
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
25324
|
+
[inherited, override]
|
|
25325
|
+
);
|
|
25326
|
+
const assertOwner = hooks_exports.useSessionAction();
|
|
25327
|
+
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
25328
|
+
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
25329
|
+
const action = (label, execute, danger = false, disabled = flow.busy) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25330
|
+
import_react_native44.Pressable,
|
|
25331
|
+
{
|
|
25332
|
+
accessibilityRole: "button",
|
|
25333
|
+
accessibilityState: { disabled, busy: flow.busy },
|
|
25334
|
+
disabled,
|
|
25335
|
+
onPress: () => {
|
|
25336
|
+
try {
|
|
25337
|
+
assertOwner();
|
|
25338
|
+
execute();
|
|
25339
|
+
} catch (e) {
|
|
25340
|
+
}
|
|
25341
|
+
},
|
|
25342
|
+
style: [
|
|
25343
|
+
s5.button,
|
|
25344
|
+
{ borderColor: danger ? theme.error : theme.accent },
|
|
25345
|
+
disabled && s5.disabled
|
|
25346
|
+
],
|
|
25347
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [text3, { color: danger ? theme.error : theme.accent }], children: t(label) })
|
|
25348
|
+
}
|
|
25349
|
+
);
|
|
25350
|
+
const openTeam = async (url2) => {
|
|
25351
|
+
try {
|
|
25352
|
+
assertOwner();
|
|
25353
|
+
await (onOpenTeam ? onOpenTeam(url2) : import_react_native44.Linking.openURL(url2));
|
|
25354
|
+
} catch (e) {
|
|
25355
|
+
try {
|
|
25356
|
+
assertOwner();
|
|
25357
|
+
import_react_native44.Alert.alert(
|
|
25358
|
+
t("Team settings"),
|
|
25359
|
+
t("Unable to open team settings. Please try again.")
|
|
25360
|
+
);
|
|
25361
|
+
} catch (e2) {
|
|
25362
|
+
}
|
|
25363
|
+
}
|
|
25364
|
+
};
|
|
25365
|
+
if (flow.deleted)
|
|
25366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: [s5.container, style], children: [
|
|
25367
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.title, text3], children: t("Account deleted") }),
|
|
25368
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityLiveRegion: "polite", style: [s5.body, text3], children: t("Your Ticket Fairy account has been closed. You are signed out.") }),
|
|
25369
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, muted], children: t("Financial and transaction records are retained where required.") }),
|
|
25370
|
+
onDone && action("Continue browsing", onDone, false, false)
|
|
25371
|
+
] });
|
|
25372
|
+
if (flow.confirmingAccount)
|
|
25373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25374
|
+
import_react_native44.ActivityIndicator,
|
|
25375
|
+
{
|
|
25376
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
25377
|
+
color: theme.accent
|
|
25378
|
+
}
|
|
25379
|
+
);
|
|
25380
|
+
if (!flow.signedIn)
|
|
25381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: [s5.container, style], children: [
|
|
25382
|
+
flow.error && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
25383
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25384
|
+
action("Try again", () => void flow.retry())
|
|
25385
|
+
] }),
|
|
25386
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, text3], children: t("Sign in to review and delete your Ticket Fairy account.") }),
|
|
25387
|
+
onSignIn && action("Sign in", onSignIn, false, false)
|
|
25388
|
+
] });
|
|
25389
|
+
if (flow.query.isPending)
|
|
25390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25391
|
+
import_react_native44.ActivityIndicator,
|
|
25392
|
+
{
|
|
25393
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
25394
|
+
color: theme.accent
|
|
25395
|
+
}
|
|
25396
|
+
);
|
|
25397
|
+
if (!flow.status)
|
|
25398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: [s5.container, style], children: [
|
|
25399
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error || "Account deletion options could not load.") }),
|
|
25400
|
+
action("Try again", () => void flow.retry(), false, false)
|
|
25401
|
+
] });
|
|
25402
|
+
const status = flow.status;
|
|
25403
|
+
const password = status.verification === "password";
|
|
25404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: [s5.container, style], children: [
|
|
25405
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.title, text3], children: t("Delete account") }),
|
|
25406
|
+
showExplanation && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
25407
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, text3], children: t(
|
|
25408
|
+
"This closes your Ticket Fairy account across the app, website and organiser dashboard."
|
|
25409
|
+
) }),
|
|
25410
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.heading, text3], children: t("What is removed") }),
|
|
25411
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, muted], children: t(
|
|
25412
|
+
"Your personal profile, sign-in access, friends, saved preferences and the content you posted are removed or anonymised."
|
|
25413
|
+
) }),
|
|
25414
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.heading, text3], children: t("What is kept") }),
|
|
25415
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, muted], children: t(
|
|
25416
|
+
"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."
|
|
25417
|
+
) })
|
|
25418
|
+
] }),
|
|
25419
|
+
status.appleLinked && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, muted], children: t(
|
|
25420
|
+
"If Ticket Fairy still appears in your Apple Account after deletion, remove its access there too."
|
|
25421
|
+
) }),
|
|
25422
|
+
status.blockers.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: [s5.panel, { borderColor: theme.border }], children: [
|
|
25423
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.heading, text3], children: t("Before you delete your account") }),
|
|
25424
|
+
status.blockers.map((blocker) => {
|
|
25425
|
+
var _a;
|
|
25426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native44.View, { style: s5.container, children: [
|
|
25427
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, text3], children: t(blocker.message) }),
|
|
25428
|
+
(_a = blocker.brands) == null ? void 0 : _a.map(
|
|
25429
|
+
(brand2) => brand2.teamUrl ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25430
|
+
import_react_native44.Pressable,
|
|
25431
|
+
{
|
|
25432
|
+
accessibilityRole: "link",
|
|
25433
|
+
disabled: flow.busy,
|
|
25434
|
+
onPress: () => {
|
|
25435
|
+
if (brand2.teamUrl) void openTeam(brand2.teamUrl);
|
|
25436
|
+
},
|
|
25437
|
+
style: s5.link,
|
|
25438
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: { color: theme.accent, fontFamily: theme.fontFamily }, children: t("Open {{name}} team settings", { name: brand2.name }) })
|
|
25439
|
+
},
|
|
25440
|
+
brand2.id
|
|
25441
|
+
) : null
|
|
25442
|
+
)
|
|
25443
|
+
] }, blocker.code);
|
|
25444
|
+
}),
|
|
25445
|
+
action("Check again", () => void flow.retry())
|
|
25446
|
+
] }),
|
|
25447
|
+
!flow.isOpen && status.canDelete && action("Delete account", flow.open, true),
|
|
25448
|
+
flow.isOpen && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
25449
|
+
import_react_native44.View,
|
|
25450
|
+
{
|
|
25451
|
+
accessibilityLabel: t("Confirm account deletion"),
|
|
25452
|
+
style: [s5.panel, { borderColor: theme.border }],
|
|
25453
|
+
children: [
|
|
25454
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.heading, text3], children: t("Delete your account permanently?") }),
|
|
25455
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, text3], children: t("This cannot be undone. Confirm that you want to close this account.") }),
|
|
25456
|
+
!password && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
25457
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.body, muted], children: t("We will email a deletion code to {{email}}.", {
|
|
25458
|
+
email: status.email
|
|
25459
|
+
}) }),
|
|
25460
|
+
action(
|
|
25461
|
+
flow.codeSent ? "Send a new code" : "Email deletion code",
|
|
25462
|
+
() => void flow.sendCode(locale),
|
|
25463
|
+
false,
|
|
25464
|
+
flow.busy || flow.retryAfter > 0
|
|
25465
|
+
),
|
|
25466
|
+
flow.codeSent && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("A code was sent to {{email}}. It expires in {{minutes}} minutes.", {
|
|
25467
|
+
email: flow.codeSent.email,
|
|
25468
|
+
minutes: flow.codeSent.expiresInMinutes
|
|
25469
|
+
}) })
|
|
25470
|
+
] }),
|
|
25471
|
+
flow.retryAfter > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("Try again in {{seconds}} seconds.", { seconds: flow.retryAfter }) }),
|
|
25472
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { style: [s5.heading, text3], children: t(password ? "Current password" : "Deletion code") }),
|
|
25473
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25474
|
+
import_react_native44.TextInput,
|
|
25475
|
+
{
|
|
25476
|
+
accessibilityLabel: t(password ? "Current password" : "Deletion code"),
|
|
25477
|
+
value: flow.proof,
|
|
25478
|
+
onChangeText: flow.setProof,
|
|
25479
|
+
secureTextEntry: password,
|
|
25480
|
+
textContentType: password ? "password" : "oneTimeCode",
|
|
25481
|
+
autoComplete: password ? "current-password" : "one-time-code",
|
|
25482
|
+
keyboardType: password ? "default" : "number-pad",
|
|
25483
|
+
maxLength: password ? void 0 : 6,
|
|
25484
|
+
autoCapitalize: "none",
|
|
25485
|
+
autoCorrect: false,
|
|
25486
|
+
editable: !flow.busy,
|
|
25487
|
+
style: [
|
|
25488
|
+
s5.input,
|
|
25489
|
+
text3,
|
|
25490
|
+
{ borderColor: theme.border, backgroundColor: theme.background }
|
|
25491
|
+
]
|
|
25492
|
+
}
|
|
25493
|
+
),
|
|
25494
|
+
flow.error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25495
|
+
flow.busy && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
25496
|
+
import_react_native44.ActivityIndicator,
|
|
25497
|
+
{
|
|
25498
|
+
color: theme.accent,
|
|
25499
|
+
accessibilityLabel: t("Please wait\u2026")
|
|
25500
|
+
}
|
|
25501
|
+
),
|
|
25502
|
+
action("Keep account", flow.cancel),
|
|
25503
|
+
action(
|
|
25504
|
+
"Permanently delete account",
|
|
25505
|
+
() => void flow.confirm(),
|
|
25506
|
+
true,
|
|
25507
|
+
!flow.canConfirm
|
|
25508
|
+
)
|
|
25509
|
+
]
|
|
25510
|
+
}
|
|
25511
|
+
),
|
|
25512
|
+
!flow.isOpen && flow.error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native44.Text, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) })
|
|
25513
|
+
] });
|
|
25514
|
+
};
|
|
25515
|
+
var s5 = import_react_native44.StyleSheet.create({
|
|
25516
|
+
container: { gap: 12 },
|
|
25517
|
+
title: { fontSize: 22, fontWeight: "600", lineHeight: 28 },
|
|
25518
|
+
heading: { fontSize: 16, fontWeight: "600", lineHeight: 23 },
|
|
25519
|
+
body: { fontSize: 15, lineHeight: 22 },
|
|
25520
|
+
panel: {
|
|
25521
|
+
borderWidth: import_react_native44.StyleSheet.hairlineWidth,
|
|
25522
|
+
borderRadius: 16,
|
|
25523
|
+
padding: 16,
|
|
25524
|
+
gap: 12
|
|
25525
|
+
},
|
|
25526
|
+
button: {
|
|
25527
|
+
minHeight: 48,
|
|
25528
|
+
borderWidth: 1,
|
|
25529
|
+
borderRadius: 12,
|
|
25530
|
+
paddingVertical: 12,
|
|
25531
|
+
paddingHorizontal: 16,
|
|
25532
|
+
alignItems: "center",
|
|
25533
|
+
justifyContent: "center"
|
|
25534
|
+
},
|
|
25535
|
+
input: { minHeight: 48, borderWidth: 1, borderRadius: 10, padding: 12, fontSize: 16 },
|
|
25536
|
+
link: { minHeight: 44, justifyContent: "center" },
|
|
25537
|
+
disabled: { opacity: 0.5 }
|
|
25538
|
+
});
|
|
25539
|
+
|
|
24881
25540
|
// src/auth/AuthModal.tsx
|
|
24882
|
-
var
|
|
24883
|
-
var
|
|
25541
|
+
var import_react73 = require("react");
|
|
25542
|
+
var import_react_native50 = require("react-native");
|
|
24884
25543
|
|
|
24885
25544
|
// src/auth/ForgotPasswordForm.tsx
|
|
24886
|
-
var
|
|
24887
|
-
var
|
|
24888
|
-
var
|
|
25545
|
+
var import_react68 = require("react");
|
|
25546
|
+
var import_react_native45 = require("react-native");
|
|
25547
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
24889
25548
|
var ForgotPasswordForm = ({
|
|
24890
25549
|
initialEmail = "",
|
|
24891
25550
|
errors = {},
|
|
@@ -24897,21 +25556,21 @@ var ForgotPasswordForm = ({
|
|
|
24897
25556
|
onFieldChange
|
|
24898
25557
|
}) => {
|
|
24899
25558
|
const theme = useTheme();
|
|
24900
|
-
const [email, setEmail] = (0,
|
|
24901
|
-
(0,
|
|
25559
|
+
const [email, setEmail] = (0, import_react68.useState)(initialEmail);
|
|
25560
|
+
(0, import_react68.useEffect)(() => {
|
|
24902
25561
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
24903
25562
|
}, [email, initialEmail]);
|
|
24904
25563
|
const submit = () => void onSubmit(email);
|
|
24905
25564
|
if (successMessage) {
|
|
24906
|
-
return /* @__PURE__ */ (0,
|
|
24907
|
-
/* @__PURE__ */ (0,
|
|
24908
|
-
/* @__PURE__ */ (0,
|
|
25565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native45.View, { style: styles14.form, children: [
|
|
25566
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native45.Text, { style: [styles14.success, { color: theme.success }], children: successMessage }),
|
|
25567
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Button, { onPress: () => onBackToLogin(email), children: "Back to log in" })
|
|
24909
25568
|
] });
|
|
24910
25569
|
}
|
|
24911
|
-
return /* @__PURE__ */ (0,
|
|
24912
|
-
/* @__PURE__ */ (0,
|
|
24913
|
-
error ? /* @__PURE__ */ (0,
|
|
24914
|
-
/* @__PURE__ */ (0,
|
|
25570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native45.View, { style: styles14.form, children: [
|
|
25571
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(MutedText, { children: "Enter your email and we\u2019ll send you instructions to reset your password." }),
|
|
25572
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorText, { children: error }) : null,
|
|
25573
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
24915
25574
|
Input,
|
|
24916
25575
|
{
|
|
24917
25576
|
value: email,
|
|
@@ -24925,20 +25584,20 @@ var ForgotPasswordForm = ({
|
|
|
24925
25584
|
invalid: Boolean(errors.email)
|
|
24926
25585
|
}
|
|
24927
25586
|
) }),
|
|
24928
|
-
/* @__PURE__ */ (0,
|
|
24929
|
-
/* @__PURE__ */ (0,
|
|
24930
|
-
|
|
25587
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Button, { onPress: submit, loading, children: "Send reset instructions" }),
|
|
25588
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
25589
|
+
import_react_native45.Pressable,
|
|
24931
25590
|
{
|
|
24932
25591
|
accessibilityRole: "button",
|
|
24933
25592
|
onPress: () => onBackToLogin(email),
|
|
24934
25593
|
hitSlop: 8,
|
|
24935
25594
|
style: styles14.link,
|
|
24936
|
-
children: /* @__PURE__ */ (0,
|
|
25595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native45.Text, { style: [styles14.linkText, { color: theme.accent }], children: "Back to log in" })
|
|
24937
25596
|
}
|
|
24938
25597
|
)
|
|
24939
25598
|
] });
|
|
24940
25599
|
};
|
|
24941
|
-
var styles14 =
|
|
25600
|
+
var styles14 = import_react_native45.StyleSheet.create({
|
|
24942
25601
|
form: { gap: 14 },
|
|
24943
25602
|
success: { fontSize: 15, fontWeight: "600" },
|
|
24944
25603
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
@@ -24946,19 +25605,19 @@ var styles14 = import_react_native44.StyleSheet.create({
|
|
|
24946
25605
|
});
|
|
24947
25606
|
|
|
24948
25607
|
// src/auth/LoginForm.tsx
|
|
24949
|
-
var
|
|
24950
|
-
var
|
|
25608
|
+
var import_react70 = require("react");
|
|
25609
|
+
var import_react_native47 = require("react-native");
|
|
24951
25610
|
|
|
24952
25611
|
// src/auth/PasswordInput.tsx
|
|
24953
|
-
var
|
|
24954
|
-
var
|
|
24955
|
-
var
|
|
25612
|
+
var import_react69 = require("react");
|
|
25613
|
+
var import_react_native46 = require("react-native");
|
|
25614
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
24956
25615
|
var PasswordInput = (props) => {
|
|
24957
|
-
const [visible, setVisible] = (0,
|
|
24958
|
-
return /* @__PURE__ */ (0,
|
|
24959
|
-
/* @__PURE__ */ (0,
|
|
24960
|
-
/* @__PURE__ */ (0,
|
|
24961
|
-
|
|
25616
|
+
const [visible, setVisible] = (0, import_react69.useState)(false);
|
|
25617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native46.View, { style: styles15.wrap, children: [
|
|
25618
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Input, { ...props, autoCapitalize: "none", secureTextEntry: !visible }),
|
|
25619
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
25620
|
+
import_react_native46.Pressable,
|
|
24962
25621
|
{
|
|
24963
25622
|
accessibilityRole: "button",
|
|
24964
25623
|
accessibilityLabel: visible ? "Hide password" : "Show password",
|
|
@@ -24966,12 +25625,12 @@ var PasswordInput = (props) => {
|
|
|
24966
25625
|
onPress: () => setVisible((current4) => !current4),
|
|
24967
25626
|
hitSlop: 10,
|
|
24968
25627
|
style: styles15.toggle,
|
|
24969
|
-
children: /* @__PURE__ */ (0,
|
|
25628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native46.Text, { style: styles15.icon, children: visible ? "\u{1F648}" : "\u{1F441}" })
|
|
24970
25629
|
}
|
|
24971
25630
|
)
|
|
24972
25631
|
] });
|
|
24973
25632
|
};
|
|
24974
|
-
var styles15 =
|
|
25633
|
+
var styles15 = import_react_native46.StyleSheet.create({
|
|
24975
25634
|
wrap: { position: "relative", justifyContent: "center" },
|
|
24976
25635
|
toggle: {
|
|
24977
25636
|
position: "absolute",
|
|
@@ -24984,7 +25643,7 @@ var styles15 = import_react_native45.StyleSheet.create({
|
|
|
24984
25643
|
});
|
|
24985
25644
|
|
|
24986
25645
|
// src/auth/LoginForm.tsx
|
|
24987
|
-
var
|
|
25646
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
24988
25647
|
var LoginForm = ({
|
|
24989
25648
|
initialEmail = "",
|
|
24990
25649
|
errors = {},
|
|
@@ -24996,15 +25655,15 @@ var LoginForm = ({
|
|
|
24996
25655
|
onFieldChange
|
|
24997
25656
|
}) => {
|
|
24998
25657
|
const theme = useTheme();
|
|
24999
|
-
const [email, setEmail] = (0,
|
|
25000
|
-
const [password, setPassword] = (0,
|
|
25001
|
-
(0,
|
|
25658
|
+
const [email, setEmail] = (0, import_react70.useState)(initialEmail);
|
|
25659
|
+
const [password, setPassword] = (0, import_react70.useState)("");
|
|
25660
|
+
(0, import_react70.useEffect)(() => {
|
|
25002
25661
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
25003
25662
|
}, [email, initialEmail]);
|
|
25004
25663
|
const submit = () => void onSubmit({ email, password });
|
|
25005
|
-
return /* @__PURE__ */ (0,
|
|
25006
|
-
error ? /* @__PURE__ */ (0,
|
|
25007
|
-
/* @__PURE__ */ (0,
|
|
25664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native47.View, { style: styles16.form, children: [
|
|
25665
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ErrorText, { children: error }) : null,
|
|
25666
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
25008
25667
|
Input,
|
|
25009
25668
|
{
|
|
25010
25669
|
value: email,
|
|
@@ -25018,7 +25677,7 @@ var LoginForm = ({
|
|
|
25018
25677
|
invalid: Boolean(errors.email)
|
|
25019
25678
|
}
|
|
25020
25679
|
) }),
|
|
25021
|
-
/* @__PURE__ */ (0,
|
|
25680
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
25022
25681
|
PasswordInput,
|
|
25023
25682
|
{
|
|
25024
25683
|
value: password,
|
|
@@ -25030,29 +25689,29 @@ var LoginForm = ({
|
|
|
25030
25689
|
invalid: Boolean(errors.password)
|
|
25031
25690
|
}
|
|
25032
25691
|
) }),
|
|
25033
|
-
/* @__PURE__ */ (0,
|
|
25034
|
-
allowPasswordReset && onForgotPassword ? /* @__PURE__ */ (0,
|
|
25035
|
-
|
|
25692
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { onPress: submit, loading, children: "Login" }),
|
|
25693
|
+
allowPasswordReset && onForgotPassword ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
25694
|
+
import_react_native47.Pressable,
|
|
25036
25695
|
{
|
|
25037
25696
|
accessibilityRole: "button",
|
|
25038
25697
|
onPress: () => onForgotPassword(email),
|
|
25039
25698
|
hitSlop: 8,
|
|
25040
25699
|
style: styles16.link,
|
|
25041
|
-
children: /* @__PURE__ */ (0,
|
|
25700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native47.Text, { style: [styles16.linkText, { color: theme.accent }], children: "Forgot password?" })
|
|
25042
25701
|
}
|
|
25043
25702
|
) : null
|
|
25044
25703
|
] });
|
|
25045
25704
|
};
|
|
25046
|
-
var styles16 =
|
|
25705
|
+
var styles16 = import_react_native47.StyleSheet.create({
|
|
25047
25706
|
form: { gap: 14 },
|
|
25048
25707
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
25049
25708
|
linkText: { fontSize: 14, fontWeight: "600" }
|
|
25050
25709
|
});
|
|
25051
25710
|
|
|
25052
25711
|
// src/auth/RegisterForm.tsx
|
|
25053
|
-
var
|
|
25054
|
-
var
|
|
25055
|
-
var
|
|
25712
|
+
var import_react71 = require("react");
|
|
25713
|
+
var import_react_native48 = require("react-native");
|
|
25714
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
25056
25715
|
var emptyRegistration = (email) => ({
|
|
25057
25716
|
firstName: "",
|
|
25058
25717
|
lastName: "",
|
|
@@ -25079,30 +25738,30 @@ var RegisterForm = ({
|
|
|
25079
25738
|
onFieldChange
|
|
25080
25739
|
}) => {
|
|
25081
25740
|
var _a, _b, _c, _d, _e, _f;
|
|
25082
|
-
const t = (0,
|
|
25083
|
-
const [values2, setValues] = (0,
|
|
25741
|
+
const t = (0, import_react71.useMemo)(() => createTranslator({ locale }), [locale]);
|
|
25742
|
+
const [values2, setValues] = (0, import_react71.useState)(
|
|
25084
25743
|
() => emptyRegistration(initialEmail)
|
|
25085
25744
|
);
|
|
25086
|
-
const [termsAccepted, setTermsAccepted] = (0,
|
|
25087
|
-
const [refreshingProof, setRefreshingProof] = (0,
|
|
25088
|
-
const [refreshCode, setRefreshCode] = (0,
|
|
25745
|
+
const [termsAccepted, setTermsAccepted] = (0, import_react71.useState)(false);
|
|
25746
|
+
const [refreshingProof, setRefreshingProof] = (0, import_react71.useState)(false);
|
|
25747
|
+
const [refreshCode, setRefreshCode] = (0, import_react71.useState)("");
|
|
25089
25748
|
const countriesQuery = hooks_exports.useCountries();
|
|
25090
|
-
const countries = (0,
|
|
25749
|
+
const countries = (0, import_react71.useMemo)(() => {
|
|
25091
25750
|
var _a2;
|
|
25092
25751
|
return (_a2 = countriesQuery.data) != null ? _a2 : [];
|
|
25093
25752
|
}, [countriesQuery.data]);
|
|
25094
25753
|
const statesQuery = hooks_exports.useStates(values2.countryId, {
|
|
25095
25754
|
enabled: requireAddress && Boolean(values2.countryId)
|
|
25096
25755
|
});
|
|
25097
|
-
const states = (0,
|
|
25756
|
+
const states = (0, import_react71.useMemo)(() => {
|
|
25098
25757
|
var _a2;
|
|
25099
25758
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
25100
25759
|
}, [statesQuery.data]);
|
|
25101
|
-
(0,
|
|
25760
|
+
(0, import_react71.useEffect)(() => {
|
|
25102
25761
|
if (initialEmail && !values2.email)
|
|
25103
25762
|
setValues((current4) => ({ ...current4, email: initialEmail }));
|
|
25104
25763
|
}, [initialEmail, values2.email]);
|
|
25105
|
-
(0,
|
|
25764
|
+
(0, import_react71.useEffect)(() => {
|
|
25106
25765
|
var _a2;
|
|
25107
25766
|
if (!requireAddress || values2.countryId || countries.length === 0) return;
|
|
25108
25767
|
const preferred = (_a2 = countries.find((country) => {
|
|
@@ -25123,19 +25782,19 @@ var RegisterForm = ({
|
|
|
25123
25782
|
setValues((current4) => ({ ...current4, [field]: value6 }));
|
|
25124
25783
|
onFieldChange == null ? void 0 : onFieldChange(field);
|
|
25125
25784
|
};
|
|
25126
|
-
const countryOptions = (0,
|
|
25785
|
+
const countryOptions = (0, import_react71.useMemo)(
|
|
25127
25786
|
() => countries.map((country) => ({ label: country.name, value: String(country.id) })),
|
|
25128
25787
|
[countries]
|
|
25129
25788
|
);
|
|
25130
|
-
const stateOptions = (0,
|
|
25789
|
+
const stateOptions = (0, import_react71.useMemo)(
|
|
25131
25790
|
() => states.map((state) => ({ label: state.name, value: String(state.id) })),
|
|
25132
25791
|
[states]
|
|
25133
25792
|
);
|
|
25134
25793
|
const submit = () => void onSubmit(values2, { requireState: states.length > 0, termsAccepted });
|
|
25135
|
-
return /* @__PURE__ */ (0,
|
|
25136
|
-
error ? /* @__PURE__ */ (0,
|
|
25137
|
-
/* @__PURE__ */ (0,
|
|
25138
|
-
/* @__PURE__ */ (0,
|
|
25794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native48.View, { style: styles17.form, children: [
|
|
25795
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ErrorText, { children: error }) : null,
|
|
25796
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native48.View, { style: styles17.row, children: [
|
|
25797
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native48.View, { style: styles17.flex, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "First name", required: true, error: errors.firstName, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25139
25798
|
Input,
|
|
25140
25799
|
{
|
|
25141
25800
|
value: values2.firstName,
|
|
@@ -25145,7 +25804,7 @@ var RegisterForm = ({
|
|
|
25145
25804
|
invalid: Boolean(errors.firstName)
|
|
25146
25805
|
}
|
|
25147
25806
|
) }) }),
|
|
25148
|
-
/* @__PURE__ */ (0,
|
|
25807
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native48.View, { style: styles17.flex, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Last name", required: true, error: errors.lastName, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25149
25808
|
Input,
|
|
25150
25809
|
{
|
|
25151
25810
|
value: values2.lastName,
|
|
@@ -25156,7 +25815,7 @@ var RegisterForm = ({
|
|
|
25156
25815
|
}
|
|
25157
25816
|
) }) })
|
|
25158
25817
|
] }),
|
|
25159
|
-
/* @__PURE__ */ (0,
|
|
25818
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25160
25819
|
Input,
|
|
25161
25820
|
{
|
|
25162
25821
|
value: values2.email,
|
|
@@ -25168,8 +25827,8 @@ var RegisterForm = ({
|
|
|
25168
25827
|
invalid: Boolean(errors.email)
|
|
25169
25828
|
}
|
|
25170
25829
|
) }),
|
|
25171
|
-
requireAddress ? /* @__PURE__ */ (0,
|
|
25172
|
-
/* @__PURE__ */ (0,
|
|
25830
|
+
requireAddress ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
25831
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Street address", required: true, error: errors.streetAddress, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25173
25832
|
Input,
|
|
25174
25833
|
{
|
|
25175
25834
|
value: (_a = values2.streetAddress) != null ? _a : "",
|
|
@@ -25178,7 +25837,7 @@ var RegisterForm = ({
|
|
|
25178
25837
|
invalid: Boolean(errors.streetAddress)
|
|
25179
25838
|
}
|
|
25180
25839
|
) }),
|
|
25181
|
-
/* @__PURE__ */ (0,
|
|
25840
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "ZIP / postcode", required: true, error: errors.zip, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25182
25841
|
Input,
|
|
25183
25842
|
{
|
|
25184
25843
|
value: (_b = values2.zip) != null ? _b : "",
|
|
@@ -25187,7 +25846,7 @@ var RegisterForm = ({
|
|
|
25187
25846
|
invalid: Boolean(errors.zip)
|
|
25188
25847
|
}
|
|
25189
25848
|
) }),
|
|
25190
|
-
/* @__PURE__ */ (0,
|
|
25849
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Country", required: true, error: errors.countryId, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25191
25850
|
Select,
|
|
25192
25851
|
{
|
|
25193
25852
|
value: (_c = values2.countryId) != null ? _c : "",
|
|
@@ -25201,13 +25860,13 @@ var RegisterForm = ({
|
|
|
25201
25860
|
}
|
|
25202
25861
|
}
|
|
25203
25862
|
) }),
|
|
25204
|
-
/* @__PURE__ */ (0,
|
|
25863
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25205
25864
|
Field,
|
|
25206
25865
|
{
|
|
25207
25866
|
label: "State / Province",
|
|
25208
25867
|
required: states.length > 0,
|
|
25209
25868
|
error: errors.stateId,
|
|
25210
|
-
children: /* @__PURE__ */ (0,
|
|
25869
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25211
25870
|
Select,
|
|
25212
25871
|
{
|
|
25213
25872
|
value: (_d = values2.stateId) != null ? _d : "",
|
|
@@ -25220,7 +25879,7 @@ var RegisterForm = ({
|
|
|
25220
25879
|
)
|
|
25221
25880
|
}
|
|
25222
25881
|
),
|
|
25223
|
-
/* @__PURE__ */ (0,
|
|
25882
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "City", required: true, error: errors.city, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25224
25883
|
Input,
|
|
25225
25884
|
{
|
|
25226
25885
|
value: (_e = values2.city) != null ? _e : "",
|
|
@@ -25230,7 +25889,7 @@ var RegisterForm = ({
|
|
|
25230
25889
|
}
|
|
25231
25890
|
) })
|
|
25232
25891
|
] }) : null,
|
|
25233
|
-
/* @__PURE__ */ (0,
|
|
25892
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Phone", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25234
25893
|
Input,
|
|
25235
25894
|
{
|
|
25236
25895
|
value: (_f = values2.phone) != null ? _f : "",
|
|
@@ -25240,7 +25899,7 @@ var RegisterForm = ({
|
|
|
25240
25899
|
autoCapitalize: "none"
|
|
25241
25900
|
}
|
|
25242
25901
|
) }),
|
|
25243
|
-
/* @__PURE__ */ (0,
|
|
25902
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25244
25903
|
PasswordInput,
|
|
25245
25904
|
{
|
|
25246
25905
|
value: values2.password,
|
|
@@ -25249,7 +25908,7 @@ var RegisterForm = ({
|
|
|
25249
25908
|
invalid: Boolean(errors.password)
|
|
25250
25909
|
}
|
|
25251
25910
|
) }),
|
|
25252
|
-
/* @__PURE__ */ (0,
|
|
25911
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: "Confirm password", required: true, error: errors.passwordConfirmation, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25253
25912
|
PasswordInput,
|
|
25254
25913
|
{
|
|
25255
25914
|
value: values2.passwordConfirmation,
|
|
@@ -25258,8 +25917,8 @@ var RegisterForm = ({
|
|
|
25258
25917
|
invalid: Boolean(errors.passwordConfirmation)
|
|
25259
25918
|
}
|
|
25260
25919
|
) }),
|
|
25261
|
-
completionRefresh ? /* @__PURE__ */ (0,
|
|
25262
|
-
/* @__PURE__ */ (0,
|
|
25920
|
+
completionRefresh ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native48.View, { style: { gap: 12 }, children: [
|
|
25921
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
25263
25922
|
Button,
|
|
25264
25923
|
{
|
|
25265
25924
|
disabled: loading || completionRefresh.retryAfter > 0,
|
|
@@ -25273,8 +25932,8 @@ var RegisterForm = ({
|
|
|
25273
25932
|
]
|
|
25274
25933
|
}
|
|
25275
25934
|
),
|
|
25276
|
-
refreshingProof ? /* @__PURE__ */ (0,
|
|
25277
|
-
/* @__PURE__ */ (0,
|
|
25935
|
+
refreshingProof ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
25936
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field, { label: t("auth.completionNewCode"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25278
25937
|
Input,
|
|
25279
25938
|
{
|
|
25280
25939
|
value: refreshCode,
|
|
@@ -25284,7 +25943,7 @@ var RegisterForm = ({
|
|
|
25284
25943
|
onChangeText: (value6) => setRefreshCode(value6.replace(/\D/g, "").slice(0, 6))
|
|
25285
25944
|
}
|
|
25286
25945
|
) }),
|
|
25287
|
-
/* @__PURE__ */ (0,
|
|
25946
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25288
25947
|
Button,
|
|
25289
25948
|
{
|
|
25290
25949
|
disabled: loading || !/^\d{6}$/.test(refreshCode),
|
|
@@ -25294,38 +25953,38 @@ var RegisterForm = ({
|
|
|
25294
25953
|
)
|
|
25295
25954
|
] }) : null
|
|
25296
25955
|
] }) : null,
|
|
25297
|
-
requireTerms ? /* @__PURE__ */ (0,
|
|
25298
|
-
/* @__PURE__ */ (0,
|
|
25299
|
-
|
|
25956
|
+
requireTerms ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native48.View, { style: { gap: 8 }, children: [
|
|
25957
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25958
|
+
import_react_native48.Pressable,
|
|
25300
25959
|
{
|
|
25301
25960
|
accessibilityRole: "checkbox",
|
|
25302
25961
|
accessibilityState: { checked: termsAccepted },
|
|
25303
25962
|
onPress: () => setTermsAccepted((current4) => !current4),
|
|
25304
|
-
children: /* @__PURE__ */ (0,
|
|
25963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(MutedText, { children: [
|
|
25305
25964
|
termsAccepted ? "\u2611" : "\u2610",
|
|
25306
25965
|
" ",
|
|
25307
25966
|
t("auth.completionAgree")
|
|
25308
25967
|
] })
|
|
25309
25968
|
}
|
|
25310
25969
|
),
|
|
25311
|
-
/* @__PURE__ */ (0,
|
|
25312
|
-
|
|
25970
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25971
|
+
import_react_native48.Pressable,
|
|
25313
25972
|
{
|
|
25314
25973
|
accessibilityRole: "link",
|
|
25315
|
-
onPress: () => void
|
|
25316
|
-
children: /* @__PURE__ */ (0,
|
|
25974
|
+
onPress: () => void import_react_native48.Linking.openURL("https://www.ticketfairy.com/terms-of-service"),
|
|
25975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MutedText, { children: t("auth.completionTerms") })
|
|
25317
25976
|
}
|
|
25318
25977
|
),
|
|
25319
|
-
/* @__PURE__ */ (0,
|
|
25320
|
-
|
|
25978
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25979
|
+
import_react_native48.Pressable,
|
|
25321
25980
|
{
|
|
25322
25981
|
accessibilityRole: "link",
|
|
25323
|
-
onPress: () => void
|
|
25324
|
-
children: /* @__PURE__ */ (0,
|
|
25982
|
+
onPress: () => void import_react_native48.Linking.openURL("https://www.ticketfairy.com/privacy"),
|
|
25983
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MutedText, { children: t("auth.completionPrivacy") })
|
|
25325
25984
|
}
|
|
25326
25985
|
)
|
|
25327
25986
|
] }) : null,
|
|
25328
|
-
/* @__PURE__ */ (0,
|
|
25987
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25329
25988
|
Button,
|
|
25330
25989
|
{
|
|
25331
25990
|
onPress: submit,
|
|
@@ -25336,16 +25995,16 @@ var RegisterForm = ({
|
|
|
25336
25995
|
)
|
|
25337
25996
|
] });
|
|
25338
25997
|
};
|
|
25339
|
-
var styles17 =
|
|
25998
|
+
var styles17 = import_react_native48.StyleSheet.create({
|
|
25340
25999
|
form: { gap: 14 },
|
|
25341
26000
|
row: { flexDirection: "row", gap: 10 },
|
|
25342
26001
|
flex: { flex: 1 }
|
|
25343
26002
|
});
|
|
25344
26003
|
|
|
25345
26004
|
// src/auth/EmailCodeForm.tsx
|
|
25346
|
-
var
|
|
25347
|
-
var
|
|
25348
|
-
var
|
|
26005
|
+
var import_react72 = require("react");
|
|
26006
|
+
var import_react_native49 = require("react-native");
|
|
26007
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
25349
26008
|
var EmailCodeForm = ({
|
|
25350
26009
|
initialEmail,
|
|
25351
26010
|
sent,
|
|
@@ -25358,13 +26017,13 @@ var EmailCodeForm = ({
|
|
|
25358
26017
|
onVerify,
|
|
25359
26018
|
onBack
|
|
25360
26019
|
}) => {
|
|
25361
|
-
const [email, setEmail] = (0,
|
|
25362
|
-
const [code, setCode] = (0,
|
|
25363
|
-
return /* @__PURE__ */ (0,
|
|
25364
|
-
/* @__PURE__ */ (0,
|
|
25365
|
-
error ? /* @__PURE__ */ (0,
|
|
25366
|
-
successMessage ? /* @__PURE__ */ (0,
|
|
25367
|
-
/* @__PURE__ */ (0,
|
|
26020
|
+
const [email, setEmail] = (0, import_react72.useState)(initialEmail);
|
|
26021
|
+
const [code, setCode] = (0, import_react72.useState)("");
|
|
26022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react_native49.View, { style: { gap: 14 }, children: [
|
|
26023
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MutedText, { children: sent ? `Enter the sign-in code sent to ${target}.` : "Receive a one-time sign-in code by email." }),
|
|
26024
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ErrorText, { children: error }) : null,
|
|
26025
|
+
successMessage ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MutedText, { children: successMessage }) : null,
|
|
26026
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Field, { label: "Email", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25368
26027
|
Input,
|
|
25369
26028
|
{
|
|
25370
26029
|
value: email,
|
|
@@ -25375,8 +26034,8 @@ var EmailCodeForm = ({
|
|
|
25375
26034
|
accessibilityLabel: "Email"
|
|
25376
26035
|
}
|
|
25377
26036
|
) }),
|
|
25378
|
-
sent ? /* @__PURE__ */ (0,
|
|
25379
|
-
/* @__PURE__ */ (0,
|
|
26037
|
+
sent ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
26038
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Field, { label: "Sign-in code", required: true, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25380
26039
|
Input,
|
|
25381
26040
|
{
|
|
25382
26041
|
value: code,
|
|
@@ -25390,7 +26049,7 @@ var EmailCodeForm = ({
|
|
|
25390
26049
|
editable: !loading
|
|
25391
26050
|
}
|
|
25392
26051
|
) }),
|
|
25393
|
-
/* @__PURE__ */ (0,
|
|
26052
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25394
26053
|
Button,
|
|
25395
26054
|
{
|
|
25396
26055
|
loading,
|
|
@@ -25400,7 +26059,7 @@ var EmailCodeForm = ({
|
|
|
25400
26059
|
}
|
|
25401
26060
|
)
|
|
25402
26061
|
] }) : null,
|
|
25403
|
-
/* @__PURE__ */ (0,
|
|
26062
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
25404
26063
|
Button,
|
|
25405
26064
|
{
|
|
25406
26065
|
loading: !sent && loading,
|
|
@@ -25410,26 +26069,26 @@ var EmailCodeForm = ({
|
|
|
25410
26069
|
children: retryAfter > 0 ? `Send another code in ${retryAfter}s` : sent ? "Resend code" : "Send sign-in code"
|
|
25411
26070
|
}
|
|
25412
26071
|
),
|
|
25413
|
-
/* @__PURE__ */ (0,
|
|
26072
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { variant: "ghost", disabled: loading, onPress: onBack, children: "Use password instead" })
|
|
25414
26073
|
] });
|
|
25415
26074
|
};
|
|
25416
26075
|
|
|
25417
26076
|
// src/auth/AuthModal.tsx
|
|
25418
|
-
var
|
|
26077
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
25419
26078
|
var Tab = ({
|
|
25420
26079
|
label,
|
|
25421
26080
|
active: active2,
|
|
25422
26081
|
onPress
|
|
25423
26082
|
}) => {
|
|
25424
26083
|
const theme = useTheme();
|
|
25425
|
-
return /* @__PURE__ */ (0,
|
|
25426
|
-
|
|
26084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
26085
|
+
import_react_native50.Pressable,
|
|
25427
26086
|
{
|
|
25428
26087
|
accessibilityRole: "tab",
|
|
25429
26088
|
accessibilityState: { selected: active2 },
|
|
25430
26089
|
onPress,
|
|
25431
26090
|
style: [styles18.tab, { borderBottomColor: active2 ? theme.accent : "transparent" }],
|
|
25432
|
-
children: /* @__PURE__ */ (0,
|
|
26091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Text, { style: [styles18.tabText, { color: active2 ? theme.text : theme.muted }], children: label })
|
|
25433
26092
|
}
|
|
25434
26093
|
);
|
|
25435
26094
|
};
|
|
@@ -25447,7 +26106,7 @@ var AuthModal = ({
|
|
|
25447
26106
|
message
|
|
25448
26107
|
}) => {
|
|
25449
26108
|
const theme = useTheme();
|
|
25450
|
-
const closeAfterAuth = (0,
|
|
26109
|
+
const closeAfterAuth = (0, import_react73.useCallback)(
|
|
25451
26110
|
(profile) => {
|
|
25452
26111
|
onAuthenticated == null ? void 0 : onAuthenticated(profile);
|
|
25453
26112
|
onClose();
|
|
@@ -25471,35 +26130,35 @@ var AuthModal = ({
|
|
|
25471
26130
|
if (auth.twoFactorChallenge) await auth.cancelTwoFactor();
|
|
25472
26131
|
onClose();
|
|
25473
26132
|
};
|
|
25474
|
-
return /* @__PURE__ */ (0,
|
|
25475
|
-
|
|
26133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Modal, { visible: open, animationType: "slide", transparent: true, onRequestClose: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Pressable, { style: styles18.backdrop, onPress: requestClose, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
26134
|
+
import_react_native50.Pressable,
|
|
25476
26135
|
{
|
|
25477
26136
|
style: [styles18.sheet, { backgroundColor: theme.surface }],
|
|
25478
26137
|
onPress: () => {
|
|
25479
26138
|
},
|
|
25480
26139
|
children: [
|
|
25481
|
-
/* @__PURE__ */ (0,
|
|
25482
|
-
/* @__PURE__ */ (0,
|
|
25483
|
-
/* @__PURE__ */ (0,
|
|
25484
|
-
|
|
26140
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_native50.View, { style: styles18.header, children: [
|
|
26141
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Text, { style: [styles18.title, { color: theme.text }], children: isPasswordReset ? "Password reset" : auth.view === "two-factor" ? "Verify your sign in" : "Ticket Fairy account" }),
|
|
26142
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
26143
|
+
import_react_native50.Pressable,
|
|
25485
26144
|
{
|
|
25486
26145
|
accessibilityRole: "button",
|
|
25487
26146
|
accessibilityLabel: "Close",
|
|
25488
26147
|
disabled: auth.isSubmitting,
|
|
25489
26148
|
onPress: () => void requestClose(),
|
|
25490
26149
|
hitSlop: 12,
|
|
25491
|
-
children: /* @__PURE__ */ (0,
|
|
26150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Text, { style: [styles18.close, { color: theme.muted }], children: "\u2715" })
|
|
25492
26151
|
}
|
|
25493
26152
|
)
|
|
25494
26153
|
] }),
|
|
25495
|
-
/* @__PURE__ */ (0,
|
|
25496
|
-
|
|
26154
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
26155
|
+
import_react_native50.ScrollView,
|
|
25497
26156
|
{
|
|
25498
26157
|
contentContainerStyle: styles18.body,
|
|
25499
26158
|
keyboardShouldPersistTaps: "handled",
|
|
25500
26159
|
children: [
|
|
25501
|
-
logoUrl ? /* @__PURE__ */ (0,
|
|
25502
|
-
|
|
26160
|
+
logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
26161
|
+
import_react_native50.Image,
|
|
25503
26162
|
{
|
|
25504
26163
|
accessibilityLabel: "The Ticket Fairy",
|
|
25505
26164
|
source: { uri: logoUrl },
|
|
@@ -25507,8 +26166,8 @@ var AuthModal = ({
|
|
|
25507
26166
|
resizeMode: "contain"
|
|
25508
26167
|
}
|
|
25509
26168
|
) : null,
|
|
25510
|
-
showTabs ? /* @__PURE__ */ (0,
|
|
25511
|
-
/* @__PURE__ */ (0,
|
|
26169
|
+
showTabs ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_native50.View, { style: [styles18.tabs, { borderBottomColor: theme.border }], children: [
|
|
26170
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25512
26171
|
Tab,
|
|
25513
26172
|
{
|
|
25514
26173
|
label: "Login",
|
|
@@ -25516,7 +26175,7 @@ var AuthModal = ({
|
|
|
25516
26175
|
onPress: () => auth.showLogin(auth.suggestedEmail)
|
|
25517
26176
|
}
|
|
25518
26177
|
),
|
|
25519
|
-
/* @__PURE__ */ (0,
|
|
26178
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25520
26179
|
Tab,
|
|
25521
26180
|
{
|
|
25522
26181
|
label: "Sign Up",
|
|
@@ -25525,8 +26184,8 @@ var AuthModal = ({
|
|
|
25525
26184
|
}
|
|
25526
26185
|
)
|
|
25527
26186
|
] }) : null,
|
|
25528
|
-
message && !isPasswordReset ? /* @__PURE__ */ (0,
|
|
25529
|
-
auth.view === "email-code" ? /* @__PURE__ */ (0,
|
|
26187
|
+
message && !isPasswordReset ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MutedText, { children: message }) : null,
|
|
26188
|
+
auth.view === "email-code" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25530
26189
|
EmailCodeForm,
|
|
25531
26190
|
{
|
|
25532
26191
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25541,7 +26200,7 @@ var AuthModal = ({
|
|
|
25541
26200
|
onBack: () => auth.showLogin(auth.suggestedEmail)
|
|
25542
26201
|
}
|
|
25543
26202
|
) : null,
|
|
25544
|
-
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */ (0,
|
|
26203
|
+
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25545
26204
|
TwoFactorForm,
|
|
25546
26205
|
{
|
|
25547
26206
|
loading: auth.isSubmitting,
|
|
@@ -25554,7 +26213,7 @@ var AuthModal = ({
|
|
|
25554
26213
|
onCancel: auth.cancelTwoFactor
|
|
25555
26214
|
}
|
|
25556
26215
|
) : null,
|
|
25557
|
-
auth.view === "login" ? /* @__PURE__ */ (0,
|
|
26216
|
+
auth.view === "login" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25558
26217
|
LoginForm,
|
|
25559
26218
|
{
|
|
25560
26219
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25567,18 +26226,18 @@ var AuthModal = ({
|
|
|
25567
26226
|
onFieldChange: auth.clearFieldError
|
|
25568
26227
|
}
|
|
25569
26228
|
) : null,
|
|
25570
|
-
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */ (0,
|
|
25571
|
-
|
|
26229
|
+
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.View, { style: { gap: 12 }, children: ["google", "apple", "facebook", "passkey"].map((provider) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
26230
|
+
import_react_native50.Pressable,
|
|
25572
26231
|
{
|
|
25573
26232
|
accessibilityRole: "button",
|
|
25574
26233
|
disabled: auth.isSubmitting,
|
|
25575
26234
|
onPress: () => void auth.submitBrowserSignIn(provider),
|
|
25576
|
-
children: /* @__PURE__ */ (0,
|
|
26235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Text, { style: { color: theme.accent }, children: provider === "passkey" ? "Sign in with a passkey" : `Sign in with ${provider === "google" ? "Google" : provider === "apple" ? "Apple" : "Facebook"}` })
|
|
25577
26236
|
},
|
|
25578
26237
|
provider
|
|
25579
26238
|
)) }) : null,
|
|
25580
|
-
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */ (0,
|
|
25581
|
-
auth.view === "register" && allowRegistration ? /* @__PURE__ */ (0,
|
|
26239
|
+
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Pressable, { onPress: () => auth.showEmailCode(auth.suggestedEmail), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native50.Text, { style: { color: theme.accent }, children: "Sign in with an email code" }) }) : null,
|
|
26240
|
+
auth.view === "register" && allowRegistration ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25582
26241
|
RegisterForm,
|
|
25583
26242
|
{
|
|
25584
26243
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25596,7 +26255,7 @@ var AuthModal = ({
|
|
|
25596
26255
|
onFieldChange: auth.clearFieldError
|
|
25597
26256
|
}
|
|
25598
26257
|
) : null,
|
|
25599
|
-
isPasswordReset ? /* @__PURE__ */ (0,
|
|
26258
|
+
isPasswordReset ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25600
26259
|
ForgotPasswordForm,
|
|
25601
26260
|
{
|
|
25602
26261
|
initialEmail: auth.suggestedEmail,
|
|
@@ -25616,7 +26275,7 @@ var AuthModal = ({
|
|
|
25616
26275
|
}
|
|
25617
26276
|
) }) });
|
|
25618
26277
|
};
|
|
25619
|
-
var styles18 =
|
|
26278
|
+
var styles18 = import_react_native50.StyleSheet.create({
|
|
25620
26279
|
backdrop: { flex: 1, justifyContent: "flex-end", backgroundColor: "rgba(0,0,0,0.4)" },
|
|
25621
26280
|
sheet: {
|
|
25622
26281
|
borderTopLeftRadius: 20,
|
|
@@ -25636,7 +26295,7 @@ var styles18 = import_react_native49.StyleSheet.create({
|
|
|
25636
26295
|
logo: { width: "100%", height: 44, alignSelf: "center" },
|
|
25637
26296
|
tabs: {
|
|
25638
26297
|
flexDirection: "row",
|
|
25639
|
-
borderBottomWidth:
|
|
26298
|
+
borderBottomWidth: import_react_native50.StyleSheet.hairlineWidth
|
|
25640
26299
|
},
|
|
25641
26300
|
tab: {
|
|
25642
26301
|
flex: 1,
|
|
@@ -25648,20 +26307,20 @@ var styles18 = import_react_native49.StyleSheet.create({
|
|
|
25648
26307
|
});
|
|
25649
26308
|
|
|
25650
26309
|
// src/auth/ResetPasswordForm.tsx
|
|
25651
|
-
var
|
|
25652
|
-
var
|
|
25653
|
-
var
|
|
26310
|
+
var import_react74 = require("react");
|
|
26311
|
+
var import_react_native51 = require("react-native");
|
|
26312
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
25654
26313
|
var ResetPasswordForm = ({
|
|
25655
26314
|
token,
|
|
25656
26315
|
onSuccess,
|
|
25657
26316
|
onBackToLogin
|
|
25658
26317
|
}) => {
|
|
25659
26318
|
const theme = useTheme();
|
|
25660
|
-
const [password, setPassword] = (0,
|
|
25661
|
-
const [confirmation, setConfirmation] = (0,
|
|
25662
|
-
const [submitted, setSubmitted] = (0,
|
|
25663
|
-
const [success, setSuccess] = (0,
|
|
25664
|
-
const validation = (0,
|
|
26319
|
+
const [password, setPassword] = (0, import_react74.useState)("");
|
|
26320
|
+
const [confirmation, setConfirmation] = (0, import_react74.useState)("");
|
|
26321
|
+
const [submitted, setSubmitted] = (0, import_react74.useState)(false);
|
|
26322
|
+
const [success, setSuccess] = (0, import_react74.useState)(false);
|
|
26323
|
+
const validation = (0, import_react74.useMemo)(() => {
|
|
25665
26324
|
if (!submitted)
|
|
25666
26325
|
return {};
|
|
25667
26326
|
return {
|
|
@@ -25683,16 +26342,16 @@ var ResetPasswordForm = ({
|
|
|
25683
26342
|
reset.mutate({ token, password, passwordConfirmation: confirmation });
|
|
25684
26343
|
};
|
|
25685
26344
|
if (success) {
|
|
25686
|
-
return /* @__PURE__ */ (0,
|
|
25687
|
-
/* @__PURE__ */ (0,
|
|
25688
|
-
onBackToLogin ? /* @__PURE__ */ (0,
|
|
26345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react_native51.View, { style: styles19.form, children: [
|
|
26346
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_native51.Text, { style: [styles19.success, { color: theme.success }], children: "Your password has been changed. You can now log in." }),
|
|
26347
|
+
onBackToLogin ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { onPress: onBackToLogin, children: "Log in" }) : null
|
|
25689
26348
|
] });
|
|
25690
26349
|
}
|
|
25691
|
-
return /* @__PURE__ */ (0,
|
|
25692
|
-
/* @__PURE__ */ (0,
|
|
25693
|
-
validation.token ? /* @__PURE__ */ (0,
|
|
25694
|
-
reset.error ? /* @__PURE__ */ (0,
|
|
25695
|
-
/* @__PURE__ */ (0,
|
|
26350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react_native51.View, { style: styles19.form, children: [
|
|
26351
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_native51.Text, { style: [styles19.title, { color: theme.text }], children: "Change Password" }),
|
|
26352
|
+
validation.token ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorText, { children: validation.token }) : null,
|
|
26353
|
+
reset.error ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorText, { children: errorMessage(reset.error) }) : null,
|
|
26354
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Field, { label: "New Password", required: true, error: validation.password, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25696
26355
|
PasswordInput,
|
|
25697
26356
|
{
|
|
25698
26357
|
value: password,
|
|
@@ -25701,7 +26360,7 @@ var ResetPasswordForm = ({
|
|
|
25701
26360
|
invalid: Boolean(validation.password)
|
|
25702
26361
|
}
|
|
25703
26362
|
) }),
|
|
25704
|
-
/* @__PURE__ */ (0,
|
|
26363
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Field, { label: "Confirm Password", required: true, error: validation.confirmation, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25705
26364
|
PasswordInput,
|
|
25706
26365
|
{
|
|
25707
26366
|
value: confirmation,
|
|
@@ -25710,19 +26369,19 @@ var ResetPasswordForm = ({
|
|
|
25710
26369
|
invalid: Boolean(validation.confirmation)
|
|
25711
26370
|
}
|
|
25712
26371
|
) }),
|
|
25713
|
-
/* @__PURE__ */ (0,
|
|
26372
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { onPress: submit, loading: reset.isPending, disabled: !token, children: "Submit" })
|
|
25714
26373
|
] });
|
|
25715
26374
|
};
|
|
25716
|
-
var styles19 =
|
|
26375
|
+
var styles19 = import_react_native51.StyleSheet.create({
|
|
25717
26376
|
form: { gap: 14 },
|
|
25718
26377
|
title: { fontSize: 18, fontWeight: "700" },
|
|
25719
26378
|
success: { fontSize: 15, fontWeight: "600" }
|
|
25720
26379
|
});
|
|
25721
26380
|
|
|
25722
26381
|
// src/EmbeddedCheckout.tsx
|
|
25723
|
-
var
|
|
25724
|
-
var
|
|
25725
|
-
var
|
|
26382
|
+
var import_react75 = require("react");
|
|
26383
|
+
var import_react_native52 = require("react-native");
|
|
26384
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
25726
26385
|
var Flow = ({
|
|
25727
26386
|
eventId,
|
|
25728
26387
|
onComplete,
|
|
@@ -25748,13 +26407,13 @@ var Flow = ({
|
|
|
25748
26407
|
var _a;
|
|
25749
26408
|
const checkout = useCheckoutContext();
|
|
25750
26409
|
const theme = useTheme();
|
|
25751
|
-
const [view, setView] = (0,
|
|
25752
|
-
const [selectionView, setSelectionView] = (0,
|
|
25753
|
-
const editedDetailsRef = (0,
|
|
25754
|
-
const [authRequest, setAuthRequest] = (0,
|
|
26410
|
+
const [view, setView] = (0, import_react75.useState)(initialView);
|
|
26411
|
+
const [selectionView, setSelectionView] = (0, import_react75.useState)(initialView);
|
|
26412
|
+
const editedDetailsRef = (0, import_react75.useRef)(null);
|
|
26413
|
+
const [authRequest, setAuthRequest] = (0, import_react75.useState)(
|
|
25755
26414
|
null
|
|
25756
26415
|
);
|
|
25757
|
-
const [privacyAttempted, setPrivacyAttempted] = (0,
|
|
26416
|
+
const [privacyAttempted, setPrivacyAttempted] = (0, import_react75.useState)(false);
|
|
25758
26417
|
const openBuiltInAuth = (email) => setAuthRequest((current4) => {
|
|
25759
26418
|
var _a2;
|
|
25760
26419
|
return { email, key: ((_a2 = current4 == null ? void 0 : current4.key) != null ? _a2 : 0) + 1 };
|
|
@@ -25767,7 +26426,7 @@ var Flow = ({
|
|
|
25767
26426
|
orderFixed: checkout.orderFixed
|
|
25768
26427
|
});
|
|
25769
26428
|
const leaveAllowed = canLeavePayment(checkout);
|
|
25770
|
-
(0,
|
|
26429
|
+
(0, import_react75.useEffect)(() => {
|
|
25771
26430
|
if (visibleView === view) return;
|
|
25772
26431
|
if (visibleView === "checkout") setView("checkout");
|
|
25773
26432
|
else {
|
|
@@ -25775,7 +26434,7 @@ var Flow = ({
|
|
|
25775
26434
|
setSelectionView("tickets");
|
|
25776
26435
|
}
|
|
25777
26436
|
}, [view, visibleView]);
|
|
25778
|
-
(0,
|
|
26437
|
+
(0, import_react75.useEffect)(() => {
|
|
25779
26438
|
onViewChange == null ? void 0 : onViewChange(visibleView);
|
|
25780
26439
|
}, [onViewChange, visibleView]);
|
|
25781
26440
|
const enterCheckout = (from) => {
|
|
@@ -25807,18 +26466,18 @@ var Flow = ({
|
|
|
25807
26466
|
const formattedTotal = breakdown ? breakdown.currencySymbol ? `${breakdown.currencySymbol}${Number(selectedTicketsTotal).toFixed(2)}` : `${breakdown.currencyCode} ${Number(selectedTicketsTotal).toFixed(2)}` : null;
|
|
25808
26467
|
const succeeded = checkout.status === "succeeded" && Boolean(checkout.order);
|
|
25809
26468
|
if (visibleView === "checkout" && succeeded && confirmationMode === "inline") {
|
|
25810
|
-
return /* @__PURE__ */ (0,
|
|
25811
|
-
/* @__PURE__ */ (0,
|
|
25812
|
-
/* @__PURE__ */ (0,
|
|
26469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native52.ScrollView, { contentContainerStyle: styles20.content, children: [
|
|
26470
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(IDVerification, {}),
|
|
26471
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Confirmation, { children: confirmationChildren })
|
|
25813
26472
|
] });
|
|
25814
26473
|
}
|
|
25815
|
-
return /* @__PURE__ */ (0,
|
|
25816
|
-
|
|
26474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
26475
|
+
import_react_native52.ScrollView,
|
|
25817
26476
|
{
|
|
25818
26477
|
contentContainerStyle: styles20.content,
|
|
25819
26478
|
keyboardShouldPersistTaps: "handled",
|
|
25820
26479
|
children: [
|
|
25821
|
-
/* @__PURE__ */ (0,
|
|
26480
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native52.View, { style: visibleView === "tickets" ? styles20.stack : styles20.hidden, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
25822
26481
|
Bundles,
|
|
25823
26482
|
{
|
|
25824
26483
|
eventId,
|
|
@@ -25827,7 +26486,7 @@ var Flow = ({
|
|
|
25827
26486
|
confirmationMode
|
|
25828
26487
|
}
|
|
25829
26488
|
) }),
|
|
25830
|
-
visibleView === "tickets" && /* @__PURE__ */ (0,
|
|
26489
|
+
visibleView === "tickets" && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native52.View, { style: styles20.stack, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
25831
26490
|
Tickets,
|
|
25832
26491
|
{
|
|
25833
26492
|
eventId,
|
|
@@ -25838,29 +26497,29 @@ var Flow = ({
|
|
|
25838
26497
|
readAttributionFromUrl
|
|
25839
26498
|
}
|
|
25840
26499
|
) }),
|
|
25841
|
-
visibleView === "seats" && /* @__PURE__ */ (0,
|
|
25842
|
-
/* @__PURE__ */ (0,
|
|
25843
|
-
/* @__PURE__ */ (0,
|
|
26500
|
+
visibleView === "seats" && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native52.View, { style: styles20.stack, children: [
|
|
26501
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native52.Pressable, { onPress: () => setView("tickets"), style: styles20.back, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native52.Text, { style: [styles20.backText, { color: theme.accent }], children: "\u2190 Back to tickets" }) }),
|
|
26502
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SeatMap, { eventId, onContinue: () => enterCheckout("seats") })
|
|
25844
26503
|
] }),
|
|
25845
|
-
visibleView === "checkout" && /* @__PURE__ */ (0,
|
|
25846
|
-
/* @__PURE__ */ (0,
|
|
25847
|
-
/* @__PURE__ */ (0,
|
|
25848
|
-
/* @__PURE__ */ (0,
|
|
26504
|
+
visibleView === "checkout" && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native52.View, { style: styles20.stack, children: [
|
|
26505
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TimerBanner, { seconds: checkout.secondsLeft }),
|
|
26506
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native52.View, { style: [styles20.selection, { borderColor: theme.border }], children: [
|
|
26507
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react_native52.Text, { style: [styles20.selectionText, { color: theme.text }], children: [
|
|
25849
26508
|
selectedCount,
|
|
25850
26509
|
" ",
|
|
25851
26510
|
selectedCount === 1 ? "ticket" : "tickets",
|
|
25852
26511
|
" selected",
|
|
25853
26512
|
formattedTotal ? ` \xB7 ${formattedTotal}` : ""
|
|
25854
26513
|
] }),
|
|
25855
|
-
/* @__PURE__ */ (0,
|
|
25856
|
-
|
|
26514
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
26515
|
+
import_react_native52.Pressable,
|
|
25857
26516
|
{
|
|
25858
26517
|
onPress: editSelection,
|
|
25859
26518
|
disabled: !leaveAllowed,
|
|
25860
26519
|
accessibilityRole: "button",
|
|
25861
26520
|
accessibilityState: { disabled: !leaveAllowed },
|
|
25862
|
-
children: /* @__PURE__ */ (0,
|
|
25863
|
-
|
|
26521
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
26522
|
+
import_react_native52.Text,
|
|
25864
26523
|
{
|
|
25865
26524
|
style: [
|
|
25866
26525
|
styles20.editText,
|
|
@@ -25873,8 +26532,8 @@ var Flow = ({
|
|
|
25873
26532
|
}
|
|
25874
26533
|
)
|
|
25875
26534
|
] }),
|
|
25876
|
-
/* @__PURE__ */ (0,
|
|
25877
|
-
/* @__PURE__ */ (0,
|
|
26535
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(AddOns, { eventId }),
|
|
26536
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
25878
26537
|
BillingInfo,
|
|
25879
26538
|
{
|
|
25880
26539
|
eventId,
|
|
@@ -25889,8 +26548,8 @@ var Flow = ({
|
|
|
25889
26548
|
showPrivacyError: privacyAttempted
|
|
25890
26549
|
}
|
|
25891
26550
|
),
|
|
25892
|
-
/* @__PURE__ */ (0,
|
|
25893
|
-
/* @__PURE__ */ (0,
|
|
26551
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(WaiverSigning, { eventId }),
|
|
26552
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
25894
26553
|
Payment,
|
|
25895
26554
|
{
|
|
25896
26555
|
onComplete,
|
|
@@ -25905,7 +26564,7 @@ var Flow = ({
|
|
|
25905
26564
|
}
|
|
25906
26565
|
)
|
|
25907
26566
|
] }),
|
|
25908
|
-
authRequest && auth !== false && !onLogin && /* @__PURE__ */ (0,
|
|
26567
|
+
authRequest && auth !== false && !onLogin && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
25909
26568
|
AuthModal,
|
|
25910
26569
|
{
|
|
25911
26570
|
checkoutEventId: eventId,
|
|
@@ -25934,20 +26593,20 @@ var EventFlow = (flow) => {
|
|
|
25934
26593
|
const flowProps = embeddedCheckoutProps(checkout.store, flow);
|
|
25935
26594
|
const heldEvent = hooks_exports.useEvent(shown.waitingFor ? shown.eventId : void 0).data;
|
|
25936
26595
|
const notice = shown.waitingFor ? heldOrderNotice(heldEvent == null ? void 0 : heldEvent.name) : null;
|
|
25937
|
-
return /* @__PURE__ */ (0,
|
|
25938
|
-
notice && /* @__PURE__ */ (0,
|
|
25939
|
-
|
|
26596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
26597
|
+
notice && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
26598
|
+
import_react_native52.View,
|
|
25940
26599
|
{
|
|
25941
26600
|
accessibilityLiveRegion: "polite",
|
|
25942
26601
|
style: [styles20.notice, { borderColor: theme.accent }],
|
|
25943
|
-
children: /* @__PURE__ */ (0,
|
|
26602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_native52.Text, { style: [styles20.noticeText, { color: theme.text }], children: translate(notice.key, notice.params) })
|
|
25944
26603
|
}
|
|
25945
26604
|
),
|
|
25946
|
-
/* @__PURE__ */ (0,
|
|
26605
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Flow, { ...flowProps }, flowProps.eventId)
|
|
25947
26606
|
] });
|
|
25948
26607
|
};
|
|
25949
|
-
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */ (0,
|
|
25950
|
-
var styles20 =
|
|
26608
|
+
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CheckoutProvider, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(EventFlow, { ...flow }) });
|
|
26609
|
+
var styles20 = import_react_native52.StyleSheet.create({
|
|
25951
26610
|
content: { padding: 16, gap: 12 },
|
|
25952
26611
|
hidden: { display: "none" },
|
|
25953
26612
|
stack: { gap: 12 },
|
|
@@ -25957,7 +26616,7 @@ var styles20 = import_react_native51.StyleSheet.create({
|
|
|
25957
26616
|
flexDirection: "row",
|
|
25958
26617
|
alignItems: "center",
|
|
25959
26618
|
justifyContent: "space-between",
|
|
25960
|
-
borderWidth:
|
|
26619
|
+
borderWidth: import_react_native52.StyleSheet.hairlineWidth,
|
|
25961
26620
|
borderRadius: 10,
|
|
25962
26621
|
paddingVertical: 10,
|
|
25963
26622
|
paddingHorizontal: 14
|
|
@@ -25968,7 +26627,7 @@ var styles20 = import_react_native51.StyleSheet.create({
|
|
|
25968
26627
|
notice: {
|
|
25969
26628
|
marginHorizontal: 16,
|
|
25970
26629
|
marginTop: 16,
|
|
25971
|
-
borderWidth:
|
|
26630
|
+
borderWidth: import_react_native52.StyleSheet.hairlineWidth,
|
|
25972
26631
|
borderRadius: 10,
|
|
25973
26632
|
paddingVertical: 10,
|
|
25974
26633
|
paddingHorizontal: 14
|