tf-checkout-react-native 2.0.0-beta.14 → 2.0.0-beta.16

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.mjs CHANGED
@@ -6321,8 +6321,8 @@ var beginRequest = (currentScope) => {
6321
6321
  var createActionLock = () => {
6322
6322
  const held = /* @__PURE__ */ new Set();
6323
6323
  const waiting = /* @__PURE__ */ new Map();
6324
- const listeners4 = /* @__PURE__ */ new Set();
6325
- const notify = () => listeners4.forEach((listener) => listener());
6324
+ const listeners42 = /* @__PURE__ */ new Set();
6325
+ const notify = () => listeners42.forEach((listener) => listener());
6326
6326
  return {
6327
6327
  acquire: (scope) => {
6328
6328
  if (held.has(scope)) return null;
@@ -6346,9 +6346,9 @@ var createActionLock = () => {
6346
6346
  waiting.set(scope, [...(_a2 = waiting.get(scope)) != null ? _a2 : [], resolve]);
6347
6347
  }) : Promise.resolve(),
6348
6348
  subscribe: (listener) => {
6349
- listeners4.add(listener);
6349
+ listeners42.add(listener);
6350
6350
  return () => {
6351
- listeners4.delete(listener);
6351
+ listeners42.delete(listener);
6352
6352
  };
6353
6353
  }
6354
6354
  };
@@ -8381,9 +8381,9 @@ var withOrderFixed = (snapshot, progress) => {
8381
8381
  };
8382
8382
  var createCheckoutStore = (initial = initialSnapshot()) => {
8383
8383
  let state = initial;
8384
- const listeners4 = /* @__PURE__ */ new Set();
8384
+ const listeners42 = /* @__PURE__ */ new Set();
8385
8385
  const emit = () => {
8386
- listeners4.forEach((listener) => listener(state));
8386
+ listeners42.forEach((listener) => listener(state));
8387
8387
  };
8388
8388
  const store = {
8389
8389
  progress: {},
@@ -8396,9 +8396,9 @@ var createCheckoutStore = (initial = initialSnapshot()) => {
8396
8396
  emit();
8397
8397
  },
8398
8398
  subscribe: (listener) => {
8399
- listeners4.add(listener);
8399
+ listeners42.add(listener);
8400
8400
  return () => {
8401
- listeners4.delete(listener);
8401
+ listeners42.delete(listener);
8402
8402
  };
8403
8403
  },
8404
8404
  reset: () => {
@@ -13876,8 +13876,8 @@ var withCheckoutStart = async (lock2, scope, work) => {
13876
13876
  var createCardOwnership = () => {
13877
13877
  const registered = [];
13878
13878
  let chosen = null;
13879
- const listeners4 = /* @__PURE__ */ new Set();
13880
- const emit = () => listeners4.forEach((listener) => listener());
13879
+ const listeners42 = /* @__PURE__ */ new Set();
13880
+ const emit = () => listeners42.forEach((listener) => listener());
13881
13881
  return {
13882
13882
  register: (id2) => {
13883
13883
  if (!chosen && registered.length === 1 && registered[0] !== id2)
@@ -13902,8 +13902,8 @@ var createCardOwnership = () => {
13902
13902
  // single section never flashes "Continue paying here" while it mounts.
13903
13903
  owns: (id2) => registered.includes(id2) ? chosen ? chosen === id2 : registered.every((other) => other === id2) : registered.length === 0,
13904
13904
  subscribe: (listener) => {
13905
- listeners4.add(listener);
13906
- return () => listeners4.delete(listener);
13905
+ listeners42.add(listener);
13906
+ return () => listeners42.delete(listener);
13907
13907
  }
13908
13908
  };
13909
13909
  };
@@ -13984,8 +13984,8 @@ var gateCheckoutActions = (actions, gateway, holder) => {
13984
13984
  };
13985
13985
  var createConfirmerGateway = (lock2, scope) => {
13986
13986
  let current5 = null;
13987
- const listeners4 = /* @__PURE__ */ new Set();
13988
- const emit = () => listeners4.forEach((listener) => listener());
13987
+ const listeners42 = /* @__PURE__ */ new Set();
13988
+ const emit = () => listeners42.forEach((listener) => listener());
13989
13989
  const held = async (release, holder, work) => {
13990
13990
  current5 = holder;
13991
13991
  emit();
@@ -14015,9 +14015,9 @@ var createConfirmerGateway = (lock2, scope) => {
14015
14015
  },
14016
14016
  holder: () => current5,
14017
14017
  subscribe: (listener) => {
14018
- listeners4.add(listener);
14018
+ listeners42.add(listener);
14019
14019
  return () => {
14020
- listeners4.delete(listener);
14020
+ listeners42.delete(listener);
14021
14021
  };
14022
14022
  }
14023
14023
  };
@@ -14088,8 +14088,8 @@ var createPaymentMarks = () => {
14088
14088
  let marks = {};
14089
14089
  let details = {};
14090
14090
  const live = /* @__PURE__ */ new Set();
14091
- const listeners4 = /* @__PURE__ */ new Set();
14092
- const emit = () => listeners4.forEach((listener) => listener());
14091
+ const listeners42 = /* @__PURE__ */ new Set();
14092
+ const emit = () => listeners42.forEach((listener) => listener());
14093
14093
  const state = (ticketHash, owner) => {
14094
14094
  const by = marks[ticketHash];
14095
14095
  if (!by) return "none";
@@ -14126,9 +14126,9 @@ var createPaymentMarks = () => {
14126
14126
  emit();
14127
14127
  },
14128
14128
  subscribe: (listener) => {
14129
- listeners4.add(listener);
14129
+ listeners42.add(listener);
14130
14130
  return () => {
14131
- listeners4.delete(listener);
14131
+ listeners42.delete(listener);
14132
14132
  };
14133
14133
  }
14134
14134
  };
@@ -14824,8 +14824,8 @@ var bindAppCheckoutEngine = (engine) => {
14824
14824
  );
14825
14825
  };
14826
14826
  var ttfKeys = {
14827
- trips: (accountKey, query) => ["ttf", "trips", accountKey, query],
14828
- trip: (accountKey, eventId, query) => ["ttf", "trip", accountKey, eventId, query],
14827
+ trips: (accountKey2, query) => ["ttf", "trips", accountKey2, query],
14828
+ trip: (accountKey2, eventId, query) => ["ttf", "trip", accountKey2, eventId, query],
14829
14829
  profile: ["ttf", "profile"],
14830
14830
  countries: ["ttf", "countries"],
14831
14831
  states: (countryId) => ["ttf", "states", countryId],
@@ -17362,22 +17362,22 @@ var useWaiverSigning = (eventId, waiver, attach, hold) => {
17362
17362
  sign
17363
17363
  };
17364
17364
  };
17365
- var useTrips = (accountKey, query = {}, options) => {
17365
+ var useTrips = (accountKey2, query = {}, options) => {
17366
17366
  var _a2;
17367
17367
  return useSessionQuery({
17368
17368
  ...options,
17369
- queryKey: ttfKeys.trips(accountKey != null ? accountKey : "", query),
17369
+ queryKey: ttfKeys.trips(accountKey2 != null ? accountKey2 : "", query),
17370
17370
  queryFn: () => ttf.trips.list(query),
17371
- enabled: accountKey ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
17371
+ enabled: accountKey2 ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
17372
17372
  });
17373
17373
  };
17374
- var useTrip = (accountKey, eventId, query = {}, options) => {
17374
+ var useTrip = (accountKey2, eventId, query = {}, options) => {
17375
17375
  var _a2;
17376
17376
  return useSessionQuery({
17377
17377
  ...options,
17378
- queryKey: ttfKeys.trip(accountKey != null ? accountKey : "", eventId != null ? eventId : "", query),
17378
+ queryKey: ttfKeys.trip(accountKey2 != null ? accountKey2 : "", eventId != null ? eventId : "", query),
17379
17379
  queryFn: () => ttf.trips.get(eventId, query),
17380
- enabled: accountKey && eventId ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
17380
+ enabled: accountKey2 && eventId ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
17381
17381
  });
17382
17382
  };
17383
17383
  var useCheckoutPhoneIdentity = (options) => {
@@ -23498,6 +23498,9 @@ var translateAccountMessage = (translate2, english, vars) => {
23498
23498
  return english.replace(/\{\{\s*(\w+)\s*\}\}/g, (whole, name) => (vars == null ? void 0 : vars[name]) === void 0 ? whole : String(vars[name]));
23499
23499
  };
23500
23500
 
23501
+ // src/useCheckout.ts
23502
+ import { useState as useState35 } from "react";
23503
+
23501
23504
  // src/CardInput.tsx
23502
23505
  import { useEffect as useEffect26, useRef as useRef29, useState as useState34 } from "react";
23503
23506
  import { Platform, StyleSheet as StyleSheet4 } from "react-native";
@@ -24035,7 +24038,10 @@ var getQueryClient = () => {
24035
24038
  }
24036
24039
  return sharedQueryClient;
24037
24040
  };
24038
- var CheckoutThemeProvider = ({ theme, children }) => {
24041
+ var CheckoutThemeProvider = ({
24042
+ theme,
24043
+ children
24044
+ }) => {
24039
24045
  const resolved = useMemo17(() => resolveTheme(theme), [theme]);
24040
24046
  return /* @__PURE__ */ jsx5(ThemeCtx.Provider, { value: resolved, children });
24041
24047
  };
@@ -24058,7 +24064,8 @@ var SelfProvidedCheckout = ({
24058
24064
  const { providerPage, page: page2 } = useProviderPages();
24059
24065
  const checkout = useCheckout2({
24060
24066
  ports: { onInstallmentOffers, providerPage },
24061
- options: rest.options
24067
+ options: rest.options,
24068
+ paymentSheet: rest.paymentSheet
24062
24069
  });
24063
24070
  return /* @__PURE__ */ jsxs4(CheckoutRoot, { checkout, ...rest, children: [
24064
24071
  children,
@@ -24166,9 +24173,113 @@ import {
24166
24173
  createPaymentMethod,
24167
24174
  handleNextAction,
24168
24175
  initStripe,
24176
+ initPaymentSheet,
24177
+ presentPaymentSheet,
24178
+ LinkDisplay,
24169
24179
  PlatformPay,
24170
24180
  retrievePaymentIntent
24171
24181
  } from "@stripe/stripe-react-native";
24182
+
24183
+ // src/paymentSheet.ts
24184
+ var nativePaymentSheetAvailable = (snapshot) => {
24185
+ var _a2;
24186
+ return snapshot.gateway === "stripe_payment_intents" && typeof ((_a2 = snapshot.breakdown) == null ? void 0 : _a2.currencyCode) === "string" && /^[A-Z]{3}$/.test(snapshot.breakdown.currencyCode) && snapshot.breakdown.currencyCode !== "MXN";
24187
+ };
24188
+ var NATIVE_SHEET_CARD_FIELD_REQUIRED = "NATIVE_SHEET_CARD_FIELD_REQUIRED";
24189
+ var NATIVE_SHEET_CARD_FIELD_MESSAGE = "Enter your card details below, then select Pay to continue.";
24190
+ var NATIVE_SHEET_REVIEW_REQUIRED = "The original payment details changed. Review this order before paying.";
24191
+ var nativeSheetIntentIdentity = (intent, intentId, reviewed) => {
24192
+ if (!intent || typeof intent !== "object" || !reviewed || !Number.isSafeInteger(reviewed.amountMinor) || reviewed.amountMinor <= 0 || !/^[A-Z]{3}$/.test(reviewed.currency))
24193
+ return false;
24194
+ const own = (key5) => {
24195
+ var _a2;
24196
+ return (_a2 = Object.getOwnPropertyDescriptor(intent, key5)) == null ? void 0 : _a2.value;
24197
+ };
24198
+ const amount2 = own("amount");
24199
+ const currency = own("currency");
24200
+ return own("id") === intentId && Number.isSafeInteger(amount2) && amount2 === reviewed.amountMinor && typeof currency === "string" && /^[A-Za-z]{3}$/.test(currency) && currency.toUpperCase() === reviewed.currency;
24201
+ };
24202
+ var nativeSheetCardMethods = (intent) => {
24203
+ var _a2;
24204
+ if (!intent || typeof intent !== "object") return false;
24205
+ const methods = (_a2 = Object.getOwnPropertyDescriptor(intent, "paymentMethodTypes")) == null ? void 0 : _a2.value;
24206
+ return Array.isArray(methods) && methods.length === 1 && methods[0] === "card";
24207
+ };
24208
+ var createPaymentSheetConfirmation = (sdk, options) => {
24209
+ let active2 = false;
24210
+ const assertAfterPresentation = () => {
24211
+ try {
24212
+ options.assertCurrent();
24213
+ } catch (e) {
24214
+ throw paymentProviderError("The original payment owner changed.", "unknown");
24215
+ }
24216
+ };
24217
+ return async (clientSecret, billing) => {
24218
+ var _a2;
24219
+ if (active2)
24220
+ throw paymentProviderError("Another payment sheet is active.", "notStarted");
24221
+ const intentId = (_a2 = /^(pi_[A-Za-z0-9]+)_secret_[A-Za-z0-9]+$/.exec(clientSecret)) == null ? void 0 : _a2[1];
24222
+ if (!intentId || !options.merchantDisplayName.trim() || !options.returnURL)
24223
+ throw paymentProviderError("Payment sheet details are unavailable.", "notStarted");
24224
+ options.assertCurrent();
24225
+ active2 = true;
24226
+ try {
24227
+ const before = await sdk.retrievePaymentIntent(clientSecret);
24228
+ options.assertCurrent();
24229
+ const requireAdmittedIntent = (result4) => {
24230
+ if (result4.error || !nativeSheetIntentIdentity(result4.paymentIntent, intentId, options.reviewed))
24231
+ throw paymentProviderError(NATIVE_SHEET_REVIEW_REQUIRED, "notStarted");
24232
+ if (!nativeSheetCardMethods(result4.paymentIntent))
24233
+ throw paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted", {
24234
+ code: NATIVE_SHEET_CARD_FIELD_REQUIRED
24235
+ });
24236
+ };
24237
+ requireAdmittedIntent(before);
24238
+ if (CONFIRMED_INTENT_STATUSES.includes(before.paymentIntent.status))
24239
+ return confirmedStripeIntentStatus(before.paymentIntent);
24240
+ const initialized = await sdk.initPaymentSheet({
24241
+ paymentIntentClientSecret: clientSecret,
24242
+ merchantDisplayName: options.merchantDisplayName,
24243
+ returnURL: options.returnURL,
24244
+ defaultBillingDetails: billing,
24245
+ customFlow: false,
24246
+ allowsDelayedPaymentMethods: false,
24247
+ // Stripe decides whether the original account/session supports card-mode
24248
+ // Link. This preference does not add an explicit Link/non-card PI type.
24249
+ link: { display: sdk.LinkDisplay.AUTOMATIC }
24250
+ });
24251
+ if (initialized.error)
24252
+ throw paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted", {
24253
+ code: NATIVE_SHEET_CARD_FIELD_REQUIRED
24254
+ });
24255
+ options.assertCurrent();
24256
+ const ready = await sdk.retrievePaymentIntent(clientSecret);
24257
+ options.assertCurrent();
24258
+ requireAdmittedIntent(ready);
24259
+ if (CONFIRMED_INTENT_STATUSES.includes(ready.paymentIntent.status))
24260
+ return confirmedStripeIntentStatus(ready.paymentIntent);
24261
+ const presented = await sdk.presentPaymentSheet();
24262
+ if (presented.error)
24263
+ throw paymentProviderError(
24264
+ presented.error.message || "Payment failed.",
24265
+ nativeStripeErrorOutcome(presented.error)
24266
+ );
24267
+ assertAfterPresentation();
24268
+ const result3 = await sdk.retrievePaymentIntent(clientSecret);
24269
+ if (result3.error || !nativeSheetIntentIdentity(result3.paymentIntent, intentId, options.reviewed) || !nativeSheetCardMethods(result3.paymentIntent))
24270
+ throw paymentProviderError(
24271
+ "The original payment could not be verified.",
24272
+ "unknown"
24273
+ );
24274
+ assertAfterPresentation();
24275
+ return confirmedStripeIntentStatus(result3.paymentIntent);
24276
+ } finally {
24277
+ active2 = false;
24278
+ }
24279
+ };
24280
+ };
24281
+
24282
+ // src/confirmer.ts
24172
24283
  var toBillingDetails = (billing) => ({
24173
24284
  email: billing.email,
24174
24285
  name: `${billing.firstName} ${billing.lastName}`.trim(),
@@ -24191,23 +24302,169 @@ var stripeFailure = (error, fallback) => {
24191
24302
  code: (_a2 = error.stripeErrorCode) != null ? _a2 : error.code
24192
24303
  });
24193
24304
  };
24305
+ var initKey = null;
24306
+ var accountKey = null;
24307
+ var listeners4 = /* @__PURE__ */ new Set();
24308
+ var initializedScheme;
24309
+ var initializing = false;
24310
+ var sheetPresenting = false;
24311
+ var nativeOperationActive = false;
24312
+ var sheetOwner = null;
24313
+ var assertNativeLeaseFree = () => {
24314
+ if (sheetOwner || initializing || nativeOperationActive)
24315
+ throw paymentProviderError(
24316
+ "The payment SDK is owned by another operation.",
24317
+ "notStarted"
24318
+ );
24319
+ };
24320
+ var nativeSdkCall = async (operation) => {
24321
+ assertNativeLeaseFree();
24322
+ nativeOperationActive = true;
24323
+ try {
24324
+ return await operation();
24325
+ } finally {
24326
+ nativeOperationActive = false;
24327
+ }
24328
+ };
24194
24329
  var createRnStripeConfirmer = () => {
24195
- let initKey = null;
24196
- let accountKey = null;
24197
- const listeners4 = /* @__PURE__ */ new Set();
24198
- return {
24330
+ const adapter = {
24199
24331
  init: async ({ publishableKey, accountId, merchantIdentifier, urlScheme }) => {
24200
- const key5 = `${publishableKey}:${accountId != null ? accountId : ""}:${merchantIdentifier != null ? merchantIdentifier : ""}`;
24201
- if (initKey === key5) return;
24202
- await initStripe({
24332
+ const key5 = JSON.stringify([
24203
24333
  publishableKey,
24204
- ...accountId ? { stripeAccountId: accountId } : {},
24205
- ...merchantIdentifier ? { merchantIdentifier } : {},
24206
- ...urlScheme ? { urlScheme } : {}
24207
- });
24208
- initKey = key5;
24209
- accountKey = `${publishableKey}:${accountId != null ? accountId : ""}`;
24210
- listeners4.forEach((listener) => listener());
24334
+ accountId != null ? accountId : null,
24335
+ merchantIdentifier != null ? merchantIdentifier : null,
24336
+ urlScheme != null ? urlScheme : null
24337
+ ]);
24338
+ if (initializing || sheetOwner && sheetOwner.key !== key5)
24339
+ throw paymentProviderError(
24340
+ "The payment SDK is owned by another operation.",
24341
+ "notStarted"
24342
+ );
24343
+ if (initKey === key5) return;
24344
+ if (nativeOperationActive)
24345
+ throw paymentProviderError(
24346
+ "The payment SDK is owned by another operation.",
24347
+ "notStarted"
24348
+ );
24349
+ initializing = true;
24350
+ initKey = null;
24351
+ accountKey = null;
24352
+ initializedScheme = void 0;
24353
+ try {
24354
+ await initStripe({
24355
+ publishableKey,
24356
+ ...accountId ? { stripeAccountId: accountId } : {},
24357
+ ...merchantIdentifier ? { merchantIdentifier } : {},
24358
+ ...urlScheme ? { urlScheme } : {}
24359
+ });
24360
+ initKey = key5;
24361
+ initializedScheme = urlScheme;
24362
+ accountKey = `${publishableKey}:${accountId != null ? accountId : ""}`;
24363
+ listeners4.forEach((listener) => listener());
24364
+ } finally {
24365
+ initializing = false;
24366
+ }
24367
+ },
24368
+ createPaymentSheetSession: (options) => {
24369
+ let running = false;
24370
+ let owner = null;
24371
+ let requiresCardField = false;
24372
+ let reviewed;
24373
+ return {
24374
+ requiresCardField: () => requiresCardField,
24375
+ cardFieldOperation: async (operation) => {
24376
+ if (running) {
24377
+ requiresCardField = true;
24378
+ throw paymentProviderError("Use the card form for this order.", "notStarted");
24379
+ }
24380
+ return operation();
24381
+ },
24382
+ confirmer: {
24383
+ ...adapter,
24384
+ prepareCardPayment: async (context) => {
24385
+ if (!running) return;
24386
+ reviewed = stripeElementsPaymentContext(
24387
+ context == null ? void 0 : context.amountMinor,
24388
+ context == null ? void 0 : context.currency
24389
+ );
24390
+ if (!reviewed || !owner || sheetOwner !== owner) {
24391
+ throw paymentProviderError(NATIVE_SHEET_REVIEW_REQUIRED, "notStarted");
24392
+ }
24393
+ },
24394
+ confirmCard: async (clientSecret, billing) => {
24395
+ if (!running) return adapter.confirmCard(clientSecret, billing);
24396
+ if (requiresCardField)
24397
+ throw paymentProviderError(
24398
+ "Use the card form for this order.",
24399
+ "notStarted"
24400
+ );
24401
+ if (!owner || sheetOwner !== owner)
24402
+ throw paymentProviderError(
24403
+ "The payment sheet was not claimed.",
24404
+ "notStarted"
24405
+ );
24406
+ {
24407
+ if (sheetPresenting)
24408
+ throw paymentProviderError(
24409
+ "Another payment sheet is active.",
24410
+ "notStarted"
24411
+ );
24412
+ const confirm = createPaymentSheetConfirmation(
24413
+ {
24414
+ initPaymentSheet,
24415
+ presentPaymentSheet,
24416
+ retrievePaymentIntent,
24417
+ LinkDisplay
24418
+ },
24419
+ {
24420
+ ...owner.options,
24421
+ reviewed,
24422
+ assertCurrent: () => {
24423
+ if (sheetOwner !== owner || initKey !== owner.key || initializing)
24424
+ throw paymentProviderError(
24425
+ "The original payment owner changed.",
24426
+ "notStarted"
24427
+ );
24428
+ }
24429
+ }
24430
+ );
24431
+ sheetPresenting = true;
24432
+ try {
24433
+ return await confirm(clientSecret, toBillingDetails(billing));
24434
+ } catch (error) {
24435
+ if ((error == null ? void 0 : error.providerCode) === NATIVE_SHEET_CARD_FIELD_REQUIRED)
24436
+ requiresCardField = true;
24437
+ throw error;
24438
+ } finally {
24439
+ sheetPresenting = false;
24440
+ }
24441
+ }
24442
+ }
24443
+ },
24444
+ run: async (operation) => {
24445
+ if (running)
24446
+ throw paymentProviderError("This payment is already active.", "notStarted");
24447
+ running = true;
24448
+ reviewed = void 0;
24449
+ let admitted = true;
24450
+ const claim = () => {
24451
+ if (!admitted || nativeOperationActive || initializing || !initKey || sheetOwner || !initializedScheme || options.returnURL !== `${initializedScheme}://stripe-redirect` || !options.merchantDisplayName.trim())
24452
+ return "unavailable";
24453
+ owner = { key: initKey, options: { ...options } };
24454
+ sheetOwner = owner;
24455
+ return "attached";
24456
+ };
24457
+ try {
24458
+ return await operation(claim);
24459
+ } finally {
24460
+ admitted = false;
24461
+ if (owner && sheetOwner === owner) sheetOwner = null;
24462
+ owner = null;
24463
+ reviewed = void 0;
24464
+ running = false;
24465
+ }
24466
+ }
24467
+ };
24211
24468
  },
24212
24469
  // `publishableKey:accountId`, the shape `bundleConfirmerKey` expects.
24213
24470
  currentKey: () => accountKey,
@@ -24219,19 +24476,25 @@ var createRnStripeConfirmer = () => {
24219
24476
  },
24220
24477
  // Native statuses are already the port's PascalCase vocabulary — no normalize.
24221
24478
  getIntentStatus: async (clientSecret) => {
24222
- const { paymentIntent } = await retrievePaymentIntent(clientSecret);
24479
+ assertNativeLeaseFree();
24480
+ const { paymentIntent } = await nativeSdkCall(
24481
+ () => retrievePaymentIntent(clientSecret)
24482
+ );
24223
24483
  return paymentIntent == null ? void 0 : paymentIntent.status;
24224
24484
  },
24225
24485
  confirmCard: async (clientSecret, billing) => {
24226
- const { error, paymentIntent } = await confirmPayment(clientSecret, {
24227
- paymentMethodType: "Card",
24228
- paymentMethodData: { billingDetails: toBillingDetails(billing) }
24229
- });
24486
+ assertNativeLeaseFree();
24487
+ const { error, paymentIntent } = await nativeSdkCall(
24488
+ () => confirmPayment(clientSecret, {
24489
+ paymentMethodType: "Card",
24490
+ paymentMethodData: { billingDetails: toBillingDetails(billing) }
24491
+ })
24492
+ );
24230
24493
  if (error) throw stripeFailure(error, "Payment failed.");
24231
24494
  return confirmedStripeIntentStatus(paymentIntent);
24232
24495
  },
24233
24496
  confirmApplePay: async (clientSecret, total, currencyCode, merchant) => {
24234
- var _a2;
24497
+ assertNativeLeaseFree();
24235
24498
  const context = stripeWalletPaymentContext(
24236
24499
  total,
24237
24500
  currencyCode,
@@ -24242,24 +24505,29 @@ var createRnStripeConfirmer = () => {
24242
24505
  "The order wallet details are unavailable.",
24243
24506
  "notStarted"
24244
24507
  );
24245
- const { error, paymentIntent } = await confirmPlatformPayPayment(clientSecret, {
24246
- applePay: {
24247
- merchantCountryCode: context.merchantCountry,
24248
- currencyCode: context.currency,
24249
- cartItems: [
24250
- {
24251
- label: (_a2 = merchant.merchantName) != null ? _a2 : "Order",
24252
- amount: context.amount,
24253
- paymentType: PlatformPay.PaymentType.Immediate
24508
+ const { error, paymentIntent } = await nativeSdkCall(
24509
+ () => {
24510
+ var _a2;
24511
+ return confirmPlatformPayPayment(clientSecret, {
24512
+ applePay: {
24513
+ merchantCountryCode: context.merchantCountry,
24514
+ currencyCode: context.currency,
24515
+ cartItems: [
24516
+ {
24517
+ label: (_a2 = merchant.merchantName) != null ? _a2 : "Order",
24518
+ amount: context.amount,
24519
+ paymentType: PlatformPay.PaymentType.Immediate
24520
+ }
24521
+ ]
24254
24522
  }
24255
- ]
24523
+ });
24256
24524
  }
24257
- });
24525
+ );
24258
24526
  if (error) throw stripeFailure(error, "Apple Pay failed.");
24259
24527
  return confirmedStripeIntentStatus(paymentIntent);
24260
24528
  },
24261
24529
  confirmGooglePay: async (clientSecret, total, currencyCode, merchant) => {
24262
- var _a2;
24530
+ assertNativeLeaseFree();
24263
24531
  const context = stripeWalletPaymentContext(
24264
24532
  total,
24265
24533
  currencyCode,
@@ -24270,88 +24538,118 @@ var createRnStripeConfirmer = () => {
24270
24538
  "The order wallet details are unavailable.",
24271
24539
  "notStarted"
24272
24540
  );
24273
- const { error, paymentIntent } = await confirmPlatformPayPayment(clientSecret, {
24274
- googlePay: {
24275
- testEnv: merchant.testEnv === true,
24276
- merchantCountryCode: context.merchantCountry,
24277
- currencyCode: context.currency,
24278
- merchantName: (_a2 = merchant.merchantName) != null ? _a2 : "Order"
24541
+ const { error, paymentIntent } = await nativeSdkCall(
24542
+ () => {
24543
+ var _a2;
24544
+ return confirmPlatformPayPayment(clientSecret, {
24545
+ googlePay: {
24546
+ testEnv: merchant.testEnv === true,
24547
+ merchantCountryCode: context.merchantCountry,
24548
+ currencyCode: context.currency,
24549
+ merchantName: (_a2 = merchant.merchantName) != null ? _a2 : "Order"
24550
+ }
24551
+ });
24279
24552
  }
24280
- });
24553
+ );
24281
24554
  if (error) throw stripeFailure(error, "Google Pay failed.");
24282
24555
  return confirmedStripeIntentStatus(paymentIntent);
24283
24556
  }
24284
24557
  };
24558
+ return adapter;
24285
24559
  };
24286
24560
  var createRnPorts = () => ({
24287
24561
  // The promise is handed back: a URL the device cannot open rejects, and the
24288
24562
  // caller shows its failure (for example "We could not open the payment page").
24289
24563
  openUrl: (url2) => Linking2.openURL(url2).then(() => void 0),
24290
24564
  createCardPaymentMethod: async (billing) => {
24291
- const { paymentMethod, error } = await createPaymentMethod({
24292
- paymentMethodType: "Card",
24293
- paymentMethodData: { billingDetails: toBillingDetails(billing) }
24294
- });
24565
+ assertNativeLeaseFree();
24566
+ const { paymentMethod, error } = await nativeSdkCall(
24567
+ () => createPaymentMethod({
24568
+ paymentMethodType: "Card",
24569
+ paymentMethodData: { billingDetails: toBillingDetails(billing) }
24570
+ })
24571
+ );
24295
24572
  if (error || !(paymentMethod == null ? void 0 : paymentMethod.id)) throw failed(error == null ? void 0 : error.message, "Payment failed");
24296
24573
  return paymentMethod.id;
24297
24574
  },
24298
24575
  createRedirectPaymentMethod: async (methodType, billing) => {
24299
24576
  var _a2, _b;
24577
+ assertNativeLeaseFree();
24300
24578
  const details = toBillingDetails(billing);
24301
24579
  const result3 = await (() => {
24302
24580
  switch (methodType) {
24303
24581
  case "klarna":
24304
- return createPaymentMethod({
24305
- paymentMethodType: "Klarna",
24306
- paymentMethodData: { billingDetails: details }
24307
- });
24582
+ return nativeSdkCall(
24583
+ () => createPaymentMethod({
24584
+ paymentMethodType: "Klarna",
24585
+ paymentMethodData: { billingDetails: details }
24586
+ })
24587
+ );
24308
24588
  case "afterpay_clearpay":
24309
- return createPaymentMethod({
24310
- paymentMethodType: "AfterpayClearpay",
24311
- paymentMethodData: { billingDetails: details, shippingDetails: details }
24312
- });
24589
+ return nativeSdkCall(
24590
+ () => createPaymentMethod({
24591
+ paymentMethodType: "AfterpayClearpay",
24592
+ paymentMethodData: { billingDetails: details, shippingDetails: details }
24593
+ })
24594
+ );
24313
24595
  case "affirm":
24314
- return createPaymentMethod({
24315
- paymentMethodType: "Affirm",
24316
- paymentMethodData: { billingDetails: details }
24317
- });
24596
+ return nativeSdkCall(
24597
+ () => createPaymentMethod({
24598
+ paymentMethodType: "Affirm",
24599
+ paymentMethodData: { billingDetails: details }
24600
+ })
24601
+ );
24318
24602
  case "ideal":
24319
- return createPaymentMethod({
24320
- paymentMethodType: "Ideal",
24321
- paymentMethodData: { billingDetails: details }
24322
- });
24603
+ return nativeSdkCall(
24604
+ () => createPaymentMethod({
24605
+ paymentMethodType: "Ideal",
24606
+ paymentMethodData: { billingDetails: details }
24607
+ })
24608
+ );
24323
24609
  case "bancontact":
24324
- return createPaymentMethod({
24325
- paymentMethodType: "Bancontact",
24326
- paymentMethodData: { billingDetails: details }
24327
- });
24610
+ return nativeSdkCall(
24611
+ () => createPaymentMethod({
24612
+ paymentMethodType: "Bancontact",
24613
+ paymentMethodData: { billingDetails: details }
24614
+ })
24615
+ );
24328
24616
  case "eps":
24329
- return createPaymentMethod({
24330
- paymentMethodType: "Eps",
24331
- paymentMethodData: { billingDetails: details }
24332
- });
24617
+ return nativeSdkCall(
24618
+ () => createPaymentMethod({
24619
+ paymentMethodType: "Eps",
24620
+ paymentMethodData: { billingDetails: details }
24621
+ })
24622
+ );
24333
24623
  case "p24":
24334
- return createPaymentMethod({
24335
- paymentMethodType: "P24",
24336
- paymentMethodData: { billingDetails: details }
24337
- });
24624
+ return nativeSdkCall(
24625
+ () => createPaymentMethod({
24626
+ paymentMethodType: "P24",
24627
+ paymentMethodData: { billingDetails: details }
24628
+ })
24629
+ );
24338
24630
  case "alipay":
24339
- return createPaymentMethod({ paymentMethodType: "Alipay" });
24631
+ return nativeSdkCall(() => createPaymentMethod({ paymentMethodType: "Alipay" }));
24340
24632
  case "grabpay":
24341
- return createPaymentMethod({
24342
- paymentMethodType: "GrabPay",
24343
- paymentMethodData: { billingDetails: details }
24344
- });
24633
+ return nativeSdkCall(
24634
+ () => createPaymentMethod({
24635
+ paymentMethodType: "GrabPay",
24636
+ paymentMethodData: { billingDetails: details }
24637
+ })
24638
+ );
24345
24639
  case "cashapp":
24346
- return createPaymentMethod({
24347
- paymentMethodType: "CashApp",
24348
- paymentMethodData: { billingDetails: details }
24349
- });
24640
+ return nativeSdkCall(
24641
+ () => createPaymentMethod({
24642
+ paymentMethodType: "CashApp",
24643
+ paymentMethodData: { billingDetails: details }
24644
+ })
24645
+ );
24350
24646
  case "paypal":
24351
- return createPaymentMethod({
24352
- paymentMethodType: "PayPal",
24353
- paymentMethodData: { billingDetails: details }
24354
- });
24647
+ return nativeSdkCall(
24648
+ () => createPaymentMethod({
24649
+ paymentMethodType: "PayPal",
24650
+ paymentMethodData: { billingDetails: details }
24651
+ })
24652
+ );
24355
24653
  default:
24356
24654
  throw new Error("This payment method is not available on this device.");
24357
24655
  }
@@ -24361,24 +24659,31 @@ var createRnPorts = () => ({
24361
24659
  return result3.paymentMethod.id;
24362
24660
  },
24363
24661
  handleNextAction: async (clientSecret) => {
24364
- const { error } = await handleNextAction(clientSecret);
24662
+ assertNativeLeaseFree();
24663
+ const { error } = await nativeSdkCall(() => handleNextAction(clientSecret));
24365
24664
  if (error) throw stripeFailure(error, "Payment failed");
24366
24665
  },
24367
24666
  confirmOxxo: async (clientSecret, billing) => {
24368
- const { error, paymentIntent } = await confirmPayment(clientSecret, {
24369
- paymentMethodType: "Oxxo",
24370
- paymentMethodData: { billingDetails: toBillingDetails(billing) }
24371
- });
24667
+ assertNativeLeaseFree();
24668
+ const { error, paymentIntent } = await nativeSdkCall(
24669
+ () => confirmPayment(clientSecret, {
24670
+ paymentMethodType: "Oxxo",
24671
+ paymentMethodData: { billingDetails: toBillingDetails(billing) }
24672
+ })
24673
+ );
24372
24674
  return { error: error == null ? void 0 : error.message, nextAction: paymentIntent == null ? void 0 : paymentIntent.nextAction };
24373
24675
  },
24374
24676
  // Payment plan (new card): confirm the SetupIntent to SAVE the card (nothing
24375
24677
  // charged) and return its PaymentMethod id for the server-side plan.
24376
24678
  confirmPaymentPlanSetup: async (clientSecret, billing) => {
24377
24679
  var _a2;
24378
- const { setupIntent, error } = await confirmSetupIntent(clientSecret, {
24379
- paymentMethodType: "Card",
24380
- paymentMethodData: { billingDetails: toBillingDetails(billing) }
24381
- });
24680
+ assertNativeLeaseFree();
24681
+ const { setupIntent, error } = await nativeSdkCall(
24682
+ () => confirmSetupIntent(clientSecret, {
24683
+ paymentMethodType: "Card",
24684
+ paymentMethodData: { billingDetails: toBillingDetails(billing) }
24685
+ })
24686
+ );
24382
24687
  const paymentMethodId = (_a2 = setupIntent == null ? void 0 : setupIntent.paymentMethod) == null ? void 0 : _a2.id;
24383
24688
  if (error || !paymentMethodId) throw failed(error == null ? void 0 : error.message, "Card setup failed");
24384
24689
  return paymentMethodId;
@@ -24386,10 +24691,13 @@ var createRnPorts = () => ({
24386
24691
  // Payment plan (saved-card 3DS): confirm the pending charge against the
24387
24692
  // existing PaymentMethod when the plan comes back requires_action.
24388
24693
  confirmSavedCardPayment: async (clientSecret, paymentMethodId) => {
24389
- const { error } = await confirmPayment(clientSecret, {
24390
- paymentMethodType: "Card",
24391
- paymentMethodData: { paymentMethodId }
24392
- });
24694
+ assertNativeLeaseFree();
24695
+ const { error } = await nativeSdkCall(
24696
+ () => confirmPayment(clientSecret, {
24697
+ paymentMethodType: "Card",
24698
+ paymentMethodData: { paymentMethodId }
24699
+ })
24700
+ );
24393
24701
  if (error) throw stripeFailure(error, "Payment failed");
24394
24702
  }
24395
24703
  });
@@ -24399,11 +24707,61 @@ var rnConfirmer = createRnStripeConfirmer();
24399
24707
  var rnPorts = createRnPorts();
24400
24708
 
24401
24709
  // src/useCheckout.ts
24402
- var useCheckout2 = (opts = {}) => useCheckout({
24403
- // A Pay without its own claim uses the default ticket field (`checkout`).
24404
- ports: { confirmer: rnConfirmer, ...rnPorts, claimDefaultCardField, ...opts.ports },
24405
- options: opts.options
24406
- });
24710
+ var useCheckout2 = (opts = {}) => {
24711
+ var _a2;
24712
+ const [sheetConfig] = useState35(
24713
+ () => opts.paymentSheet ? { ...opts.paymentSheet } : void 0
24714
+ );
24715
+ const [sheetScheme] = useState35(() => {
24716
+ var _a3;
24717
+ return (_a3 = opts.options) == null ? void 0 : _a3.urlScheme;
24718
+ });
24719
+ const [sheet] = useState35(
24720
+ () => sheetConfig ? rnConfirmer.createPaymentSheetSession(sheetConfig) : void 0
24721
+ );
24722
+ const nativePorts = { ...rnPorts, ...opts.ports };
24723
+ const checkout = useCheckout({
24724
+ // A Pay without its own claim uses the default ticket field (`checkout`).
24725
+ ports: {
24726
+ confirmer: (_a2 = sheet == null ? void 0 : sheet.confirmer) != null ? _a2 : rnConfirmer,
24727
+ claimDefaultCardField,
24728
+ ...nativePorts,
24729
+ ...sheet && nativePorts.createCardPaymentMethod ? {
24730
+ createCardPaymentMethod: (billing) => sheet.cardFieldOperation(
24731
+ () => nativePorts.createCardPaymentMethod(billing)
24732
+ )
24733
+ } : {}
24734
+ },
24735
+ options: opts.options
24736
+ });
24737
+ return {
24738
+ ...checkout,
24739
+ paymentSheet: sheet && !sheet.requiresCardField() ? {
24740
+ placeOrder: () => {
24741
+ var _a3, _b, _c, _d;
24742
+ if (sheet.requiresCardField())
24743
+ return Promise.reject(
24744
+ paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted")
24745
+ );
24746
+ if (!((_a3 = opts.options) == null ? void 0 : _a3.urlScheme) || !(sheetConfig == null ? void 0 : sheetConfig.merchantDisplayName.trim()) || opts.options.urlScheme !== sheetScheme || ((_b = opts.paymentSheet) == null ? void 0 : _b.merchantDisplayName) !== (sheetConfig == null ? void 0 : sheetConfig.merchantDisplayName) || ((_c = opts.paymentSheet) == null ? void 0 : _c.returnURL) !== (sheetConfig == null ? void 0 : sheetConfig.returnURL) || ((_d = opts.paymentSheet) == null ? void 0 : _d.returnURL) !== `${opts.options.urlScheme}://stripe-redirect`)
24747
+ return Promise.reject(
24748
+ paymentProviderError(
24749
+ "The payment return route is not configured.",
24750
+ "notStarted"
24751
+ )
24752
+ );
24753
+ if (!nativePaymentSheetAvailable(checkout.store.getState()))
24754
+ return Promise.reject(
24755
+ paymentProviderError(
24756
+ "Use the installment card form for this currency.",
24757
+ "notStarted"
24758
+ )
24759
+ );
24760
+ return sheet.run((claimCard) => checkout.placeOrder("card", { claimCard }));
24761
+ }
24762
+ } : void 0
24763
+ };
24764
+ };
24407
24765
 
24408
24766
  // src/storage.ts
24409
24767
  import { MMKV } from "react-native-mmkv";
@@ -24440,7 +24798,7 @@ var configureCheckout = (config) => configure({
24440
24798
  });
24441
24799
 
24442
24800
  // src/ui/Field.tsx
24443
- import { useMemo as useMemo18, useState as useState35 } from "react";
24801
+ import { useMemo as useMemo18, useState as useState36 } from "react";
24444
24802
  import {
24445
24803
  Pressable as Pressable3,
24446
24804
  StyleSheet as StyleSheet5,
@@ -24477,7 +24835,7 @@ var Input = ({
24477
24835
  const editable = editableProp && !frozen;
24478
24836
  const theme = useTheme();
24479
24837
  const s9 = useFieldStyles(theme);
24480
- const [focused, setFocused] = useState35(false);
24838
+ const [focused, setFocused] = useState36(false);
24481
24839
  return /* @__PURE__ */ jsx7(
24482
24840
  TextInput,
24483
24841
  {
@@ -24584,7 +24942,7 @@ var useFieldStyles = (theme) => useMemo18(
24584
24942
  );
24585
24943
 
24586
24944
  // src/ui/Select.tsx
24587
- import { useMemo as useMemo19, useState as useState36 } from "react";
24945
+ import { useCallback as useCallback15, useEffect as useEffect27, useMemo as useMemo19, useRef as useRef30, useState as useState37 } from "react";
24588
24946
  import { FlatList, Modal as Modal3, Pressable as Pressable4, StyleSheet as StyleSheet6, Text as Text5, View as View5 } from "react-native";
24589
24947
  import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
24590
24948
  function Select({
@@ -24599,7 +24957,18 @@ function Select({
24599
24957
  const disabled = disabledProp || frozen;
24600
24958
  const theme = useTheme();
24601
24959
  const s9 = useSelectStyles(theme);
24602
- const [open, setOpen] = useState36(false);
24960
+ const [open, setOpen] = useState37(false);
24961
+ const interaction = useRef30({ disabled, open: false, revision: 0 });
24962
+ interaction.current.disabled = disabled;
24963
+ const revision = interaction.current.revision;
24964
+ const close = useCallback15(() => {
24965
+ interaction.current.open = false;
24966
+ interaction.current.revision += 1;
24967
+ setOpen(false);
24968
+ }, []);
24969
+ useEffect27(() => {
24970
+ if (disabled && interaction.current.open) close();
24971
+ }, [disabled, close]);
24603
24972
  const selected = options.find((o) => o.value === value6);
24604
24973
  return /* @__PURE__ */ jsxs6(Fragment, { children: [
24605
24974
  /* @__PURE__ */ jsxs6(
@@ -24607,7 +24976,12 @@ function Select({
24607
24976
  {
24608
24977
  accessibilityRole: "button",
24609
24978
  disabled,
24610
- onPress: () => setOpen(true),
24979
+ onPress: () => {
24980
+ if (interaction.current.disabled) return;
24981
+ interaction.current.open = true;
24982
+ interaction.current.revision += 1;
24983
+ setOpen(true);
24984
+ },
24611
24985
  style: [s9.control, invalid3 && s9.controlInvalid, disabled && s9.controlDisabled],
24612
24986
  children: [
24613
24987
  /* @__PURE__ */ jsx8(Text5, { style: [s9.value, !selected && s9.placeholder], numberOfLines: 1, children: selected ? selected.label : placeholder }),
@@ -24618,11 +24992,11 @@ function Select({
24618
24992
  /* @__PURE__ */ jsx8(
24619
24993
  Modal3,
24620
24994
  {
24621
- visible: open,
24995
+ visible: open && !disabled,
24622
24996
  transparent: true,
24623
24997
  animationType: "fade",
24624
- onRequestClose: () => setOpen(false),
24625
- children: /* @__PURE__ */ jsx8(Pressable4, { style: s9.backdrop, onPress: () => setOpen(false), children: /* @__PURE__ */ jsx8(Pressable4, { style: s9.sheet, onPress: () => {
24998
+ onRequestClose: close,
24999
+ children: /* @__PURE__ */ jsx8(Pressable4, { style: s9.backdrop, onPress: close, children: /* @__PURE__ */ jsx8(Pressable4, { style: s9.sheet, onPress: () => {
24626
25000
  }, children: /* @__PURE__ */ jsx8(
24627
25001
  FlatList,
24628
25002
  {
@@ -24635,9 +25009,13 @@ function Select({
24635
25009
  Pressable4,
24636
25010
  {
24637
25011
  style: s9.option,
25012
+ disabled,
24638
25013
  onPress: () => {
25014
+ const current5 = interaction.current;
25015
+ if (current5.disabled || !current5.open || current5.revision !== revision)
25016
+ return;
24639
25017
  onChange(item.value);
24640
- setOpen(false);
25018
+ close();
24641
25019
  },
24642
25020
  children: [
24643
25021
  /* @__PURE__ */ jsx8(Text5, { style: [s9.optionLabel, isSelected && s9.optionLabelSelected], children: item.label }),
@@ -24853,7 +25231,7 @@ var useTimerStyles = (theme) => useMemo21(
24853
25231
  );
24854
25232
 
24855
25233
  // src/ui/TimerBanner.tsx
24856
- import { useMemo as useMemo22, useState as useState37 } from "react";
25234
+ import { useMemo as useMemo22, useState as useState38 } from "react";
24857
25235
  import { Pressable as Pressable6, StyleSheet as StyleSheet9, Text as Text8, View as View8 } from "react-native";
24858
25236
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
24859
25237
  var clock2 = (s9) => {
@@ -24868,7 +25246,7 @@ var TimerBanner = ({
24868
25246
  }) => {
24869
25247
  const theme = useTheme();
24870
25248
  const s9 = useBannerStyles(theme);
24871
- const [dismissed, setDismissed] = useState37(false);
25249
+ const [dismissed, setDismissed] = useState38(false);
24872
25250
  if (seconds2 === void 0 || seconds2 <= 0 || dismissed) return null;
24873
25251
  const urgent = seconds2 <= urgentAt;
24874
25252
  return (
@@ -25056,18 +25434,18 @@ var useStyles3 = (theme) => useMemo23(
25056
25434
  // src/sections/Tickets.tsx
25057
25435
  import {
25058
25436
  Fragment as Fragment2,
25059
- useEffect as useEffect27,
25437
+ useEffect as useEffect28,
25060
25438
  useMemo as useMemo24,
25061
- useRef as useRef30,
25062
- useState as useState38
25439
+ useRef as useRef31,
25440
+ useState as useState39
25063
25441
  } from "react";
25064
25442
  import { Pressable as Pressable8, StyleSheet as StyleSheet11, Text as Text10, View as View10 } from "react-native";
25065
25443
  import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
25066
25444
  var money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
25067
25445
  var WaitingListForm = ({ ticket, onJoin }) => {
25068
- const [form, setForm] = useState38({ firstName: "", lastName: "", email: "" });
25069
- const [state, setState] = useState38("idle");
25070
- const [error, setError] = useState38("");
25446
+ const [form, setForm] = useState39({ firstName: "", lastName: "", email: "" });
25447
+ const [state, setState] = useState39("idle");
25448
+ const [error, setError] = useState39("");
25071
25449
  const ok = Boolean(form.firstName.trim() && form.lastName.trim() && form.email.trim());
25072
25450
  if (state === "done")
25073
25451
  return /* @__PURE__ */ jsx13(MutedText, { children: "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens." });
@@ -25141,8 +25519,8 @@ var Tickets = ({
25141
25519
  const bundleStarting = bundleWait !== null;
25142
25520
  const promoMeta = (_a2 = ticketsQuery.data) == null ? void 0 : _a2.promo;
25143
25521
  const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
25144
- const [qty, setQty] = useState38({});
25145
- const [slotDate, setSlotDate] = useState38("");
25522
+ const [qty, setQty] = useState39({});
25523
+ const [slotDate, setSlotDate] = useState39("");
25146
25524
  const eventInfo = hooks_exports.useEvent(eventId).data;
25147
25525
  const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
25148
25526
  const dates = useMemo24(
@@ -25152,7 +25530,7 @@ var Tickets = ({
25152
25530
  },
25153
25531
  [timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
25154
25532
  );
25155
- useEffect27(() => {
25533
+ useEffect28(() => {
25156
25534
  if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
25157
25535
  }, [isTimeSlot, slotDate, dates]);
25158
25536
  const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
@@ -25163,10 +25541,10 @@ var Tickets = ({
25163
25541
  },
25164
25542
  [isTimeSlot, slotQuery.data, (_d = ticketsQuery.data) == null ? void 0 : _d.tickets]
25165
25543
  );
25166
- const [error, setError] = useState38("");
25167
- const [code, setCode] = useState38("");
25168
- const [codeState, setCodeState] = useState38("idle");
25169
- const [promoOpen, setPromoOpen] = useState38(false);
25544
+ const [error, setError] = useState39("");
25545
+ const [code, setCode] = useState39("");
25546
+ const [codeState, setCodeState] = useState39("idle");
25547
+ const [promoOpen, setPromoOpen] = useState39(false);
25170
25548
  hooks_exports.useOnEventChange(eventId, () => {
25171
25549
  setQty({});
25172
25550
  setSlotDate("");
@@ -25174,10 +25552,10 @@ var Tickets = ({
25174
25552
  setPromoOpen(false);
25175
25553
  setError("");
25176
25554
  });
25177
- const [wlOpen, setWlOpen] = useState38({});
25178
- const [visibleDescription, setVisibleDescription] = useState38(null);
25179
- const attributionEvent = useRef30(null);
25180
- useEffect27(() => {
25555
+ const [wlOpen, setWlOpen] = useState39({});
25556
+ const [visibleDescription, setVisibleDescription] = useState39(null);
25557
+ const attributionEvent = useRef31(null);
25558
+ useEffect28(() => {
25181
25559
  var _a3;
25182
25560
  if (attributionEvent.current === eventId) return;
25183
25561
  attributionEvent.current = eventId;
@@ -25195,7 +25573,7 @@ var Tickets = ({
25195
25573
  });
25196
25574
  }
25197
25575
  }, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
25198
- useEffect27(() => {
25576
+ useEffect28(() => {
25199
25577
  checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
25200
25578
  }, [eventId]);
25201
25579
  const changeCurrency = (nextCode) => {
@@ -25206,8 +25584,8 @@ var Tickets = ({
25206
25584
  }
25207
25585
  }).catch(() => void 0);
25208
25586
  };
25209
- const originals = useRef30({});
25210
- useEffect27(() => {
25587
+ const originals = useRef31({});
25588
+ useEffect28(() => {
25211
25589
  for (const t of tickets)
25212
25590
  if (originals.current[t.id] == null) originals.current[t.id] = t.price;
25213
25591
  }, [tickets]);
@@ -25691,7 +26069,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
25691
26069
  };
25692
26070
 
25693
26071
  // src/sections/SeatMap.tsx
25694
- import { useEffect as useEffect28, useMemo as useMemo26, useRef as useRef31, useState as useState39 } from "react";
26072
+ import { useEffect as useEffect29, useMemo as useMemo26, useRef as useRef32, useState as useState40 } from "react";
25695
26073
  import { StyleSheet as StyleSheet12, Text as Text11, View as View12 } from "react-native";
25696
26074
  import { WebView as WebView3 } from "react-native-webview";
25697
26075
 
@@ -25707,9 +26085,9 @@ var SeatMap = ({ eventId, onContinue }) => {
25707
26085
  const theme = useTheme();
25708
26086
  const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
25709
26087
  const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
25710
- const webview = useRef31(null);
25711
- const [rendererError, setRendererError] = useState39(false);
25712
- const [size, setSize] = useState39(320);
26088
+ const webview = useRef32(null);
26089
+ const [rendererError, setRendererError] = useState40(false);
26090
+ const [size, setSize] = useState40(320);
25713
26091
  const properties = flow.chart.state === "ready" ? {
25714
26092
  seatData: flow.chart.data.seatData,
25715
26093
  statuses: flow.statuses,
@@ -25736,7 +26114,7 @@ var SeatMap = ({ eventId, onContinue }) => {
25736
26114
  `window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
25737
26115
  );
25738
26116
  };
25739
- useEffect28(update, [properties && safeJson2(properties)]);
26117
+ useEffect29(update, [properties && safeJson2(properties)]);
25740
26118
  if (flow.chart.state === "provider") return /* @__PURE__ */ jsx15(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
25741
26119
  return /* @__PURE__ */ jsx15(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs13(Card, { children: [
25742
26120
  /* @__PURE__ */ jsx15(SectionHeader, { title: "Select your seats" }),
@@ -26544,10 +26922,10 @@ var useBundleStyles = (theme) => useMemo28(
26544
26922
  // src/sections/BillingInfo.tsx
26545
26923
  import {
26546
26924
  Fragment as Fragment10,
26547
- useEffect as useEffect29,
26925
+ useEffect as useEffect30,
26548
26926
  useMemo as useMemo29,
26549
- useRef as useRef32,
26550
- useState as useState42
26927
+ useRef as useRef33,
26928
+ useState as useState43
26551
26929
  } from "react";
26552
26930
  import { Linking as Linking3, Pressable as Pressable10, StyleSheet as StyleSheet17, Text as Text15, View as View20 } from "react-native";
26553
26931
 
@@ -26656,11 +27034,11 @@ var styles4 = StyleSheet15.create({
26656
27034
  });
26657
27035
 
26658
27036
  // src/sections/billing/PhoneIdentity.tsx
26659
- import { useState as useState41 } from "react";
27037
+ import { useState as useState42 } from "react";
26660
27038
  import { Text as Text14, View as View18 } from "react-native";
26661
27039
 
26662
27040
  // src/auth/TwoFactorForm.tsx
26663
- import { useState as useState40 } from "react";
27041
+ import { useState as useState41 } from "react";
26664
27042
  import { View as View17 } from "react-native";
26665
27043
  import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
26666
27044
  var TwoFactorForm = ({
@@ -26673,7 +27051,7 @@ var TwoFactorForm = ({
26673
27051
  onSendSms,
26674
27052
  onCancel
26675
27053
  }) => {
26676
- const [code, setCode] = useState40("");
27054
+ const [code, setCode] = useState41("");
26677
27055
  return /* @__PURE__ */ jsxs18(View17, { style: { gap: 14 }, children: [
26678
27056
  /* @__PURE__ */ jsx20(MutedText, { children: "Enter the six-digit code from your authenticator app or registered phone to complete sign-in." }),
26679
27057
  error ? /* @__PURE__ */ jsx20(ErrorText, { children: error }) : null,
@@ -26725,8 +27103,8 @@ var PhoneIdentity = ({
26725
27103
  }) => {
26726
27104
  var _a2;
26727
27105
  const identity = hooks_exports.useCheckoutPhoneIdentity(options);
26728
- const [code, setCode] = useState41("");
26729
- const [emailInstead, setEmailInstead] = useState41(false);
27106
+ const [code, setCode] = useState42("");
27107
+ const [emailInstead, setEmailInstead] = useState42(false);
26730
27108
  if (emailInstead) return null;
26731
27109
  if (identity.challenge)
26732
27110
  return /* @__PURE__ */ jsx21(
@@ -27041,17 +27419,17 @@ var BillingInfo = ({
27041
27419
  const profile = hooks_exports.useCheckoutBuyerProfile(eventId);
27042
27420
  const event = hooks_exports.useEvent(eventId);
27043
27421
  const combined = !onContinue;
27044
- const [billing, setBilling] = useState42(
27422
+ const [billing, setBilling] = useState43(
27045
27423
  () => billingDraftFrom(checkout.billing)
27046
27424
  );
27047
- const [dataCapture, setDataCapture] = useState42(
27425
+ const [dataCapture, setDataCapture] = useState43(
27048
27426
  (_b = (_a2 = checkout.billing) == null ? void 0 : _a2.dataCapture) != null ? _b : {}
27049
27427
  );
27050
- const [holders, setHolders] = useState42(
27428
+ const [holders, setHolders] = useState43(
27051
27429
  () => holderDraftsFrom(checkout.holders, checkout.backfilledHolderIndexes)
27052
27430
  );
27053
- const [consent, setConsent] = useState42({ ttfOptIn: false, brandOptIn: false });
27054
- const [dob, setDob] = useState42(() => billingDobIso(checkout.billing));
27431
+ const [consent, setConsent] = useState43({ ttfOptIn: false, brandOptIn: false });
27432
+ const [dob, setDob] = useState43(() => billingDobIso(checkout.billing));
27055
27433
  hooks_exports.useOnOrderReleased(checkout.orderFixed, () => {
27056
27434
  var _a3, _b2;
27057
27435
  setBilling(billingDraftFrom(checkout.billing));
@@ -27062,14 +27440,14 @@ var BillingInfo = ({
27062
27440
  (prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
27063
27441
  );
27064
27442
  });
27065
- const restoredHolders = useRef32(checkout.holders);
27443
+ const restoredHolders = useRef33(checkout.holders);
27066
27444
  hooks_exports.useOnEventChange(checkout.eventId, () => {
27067
27445
  restoredHolders.current = [];
27068
27446
  setHolders([]);
27069
27447
  setDataCapture({});
27070
27448
  });
27071
- const profileSeeded = useRef32(false);
27072
- const countryDefaultApplied = useRef32(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
27449
+ const profileSeeded = useRef33(false);
27450
+ const countryDefaultApplied = useRef33(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
27073
27451
  const {
27074
27452
  setBilling: commitBilling,
27075
27453
  setHolders: commitHolders,
@@ -27103,7 +27481,7 @@ var BillingInfo = ({
27103
27481
  }
27104
27482
  return out;
27105
27483
  }, [checkout.breakdown, checkout.selections]);
27106
- useEffect29(() => {
27484
+ useEffect30(() => {
27107
27485
  const p = profile.data;
27108
27486
  if (!p || profileSeeded.current) return;
27109
27487
  profileSeeded.current = true;
@@ -27126,10 +27504,10 @@ var BillingInfo = ({
27126
27504
  return keys.every((k) => next[k] === prev[k]) ? prev : next;
27127
27505
  });
27128
27506
  }, [profile.data, checkout.isLoggedIn]);
27129
- useEffect29(() => {
27507
+ useEffect30(() => {
27130
27508
  setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
27131
27509
  }, [slots]);
27132
- useEffect29(() => {
27510
+ useEffect30(() => {
27133
27511
  if (!showHolders) return;
27134
27512
  setHolders(
27135
27513
  (prev) => holderDraftsMirroringBuyer(prev, {
@@ -27140,7 +27518,7 @@ var BillingInfo = ({
27140
27518
  })
27141
27519
  );
27142
27520
  }, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
27143
- useEffect29(() => {
27521
+ useEffect30(() => {
27144
27522
  const email = billing.email.trim();
27145
27523
  if (checkout.isLoggedIn || !isEmail(email)) return;
27146
27524
  const t = setTimeout(
@@ -27165,7 +27543,7 @@ var BillingInfo = ({
27165
27543
  var _a3;
27166
27544
  return (_a3 = statesQuery.data) != null ? _a3 : [];
27167
27545
  }, [statesQuery.data]);
27168
- useEffect29(() => {
27546
+ useEffect30(() => {
27169
27547
  var _a3, _b2, _c2, _d2;
27170
27548
  if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
27171
27549
  return;
@@ -27204,7 +27582,7 @@ var BillingInfo = ({
27204
27582
  event.isLoading,
27205
27583
  (_e = event.data) == null ? void 0 : _e.countryCode
27206
27584
  ]);
27207
- useEffect29(() => {
27585
+ useEffect30(() => {
27208
27586
  var _a3;
27209
27587
  if (!billing.countryId) return;
27210
27588
  const country = countries.find(
@@ -27215,7 +27593,7 @@ var BillingInfo = ({
27215
27593
  setBilling((current5) => ({ ...current5, countryCode }));
27216
27594
  }
27217
27595
  }, [billing.countryId, billing.countryCode, countries]);
27218
- useEffect29(() => {
27596
+ useEffect30(() => {
27219
27597
  if (!billing.stateId) return;
27220
27598
  const state = states.find(
27221
27599
  (candidate) => String(candidate.id) === String(billing.stateId)
@@ -27275,7 +27653,7 @@ var BillingInfo = ({
27275
27653
  });
27276
27654
  if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
27277
27655
  };
27278
- useEffect29(() => {
27656
+ useEffect30(() => {
27279
27657
  if (combined) commit();
27280
27658
  }, [
27281
27659
  combined,
@@ -27742,7 +28120,7 @@ var Accommodation = ({ eventId }) => {
27742
28120
  var styles7 = StyleSheet19.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
27743
28121
 
27744
28122
  // src/sections/Payment.tsx
27745
- import { useEffect as useEffect30, useMemo as useMemo30, useState as useState43 } from "react";
28123
+ import { useEffect as useEffect31, useMemo as useMemo30, useState as useState44 } from "react";
27746
28124
  import { Platform as Platform2, View as View23 } from "react-native";
27747
28125
  import { isPlatformPaySupported } from "@stripe/stripe-react-native";
27748
28126
  import { Fragment as Fragment12, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
@@ -27796,14 +28174,14 @@ var Payment = ({
27796
28174
  const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
27797
28175
  const bundleStarting = bundleWait !== null;
27798
28176
  const validation = useCheckoutValidation();
27799
- const [error, setError] = useState43("");
28177
+ const [error, setError] = useState44("");
27800
28178
  const paymentMethods = hooks_exports.useCheckoutPaymentMethods(checkout.store);
27801
28179
  const methods = (_a2 = paymentMethods.data) != null ? _a2 : null;
27802
- const [selected, setSelected] = useState43("");
27803
- const [extras, setExtras] = useState43({});
27804
- const [useSavedCard, setUseSavedCard] = useState43(true);
27805
- const [nativeWalletSupported, setNativeWalletSupported] = useState43(false);
27806
- useEffect30(() => {
28180
+ const [selected, setSelected] = useState44("");
28181
+ const [extras, setExtras] = useState44({});
28182
+ const [useSavedCard, setUseSavedCard] = useState44(true);
28183
+ const [nativeWalletSupported, setNativeWalletSupported] = useState44(false);
28184
+ useEffect31(() => {
27807
28185
  let mounted = true;
27808
28186
  const env = getConfig().env;
27809
28187
  isPlatformPaySupported({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
@@ -27876,7 +28254,7 @@ var Payment = ({
27876
28254
  nativeWalletSupported,
27877
28255
  offersOxxo
27878
28256
  ]);
27879
- useEffect30(() => {
28257
+ useEffect31(() => {
27880
28258
  if (options.length && !options.some((o) => o.value === selected))
27881
28259
  setSelected(options[0].value);
27882
28260
  }, [options, selected]);
@@ -27886,7 +28264,10 @@ var Payment = ({
27886
28264
  const isPlanSelected = (selectedOption == null ? void 0 : selectedOption.id.kind) === "paymentPlan";
27887
28265
  const savedLast4 = methods == null ? void 0 : methods.savedPlanCardLast4;
27888
28266
  const reuseSavedCard = planUsesSavedCard(savedLast4, useSavedCard);
27889
- const showStripeCardField = !isXendit && (isCardSelected || isPlanSelected && !reuseSavedCard);
28267
+ const useStripeSheet = Boolean(
28268
+ checkout.paymentSheet && isCardSelected && nativePaymentSheetAvailable(checkout)
28269
+ );
28270
+ const showStripeCardField = !isXendit && (!useStripeSheet && isCardSelected || isPlanSelected && !reuseSavedCard);
27890
28271
  const showXenditCardNote = isXendit && isCardSelected;
27891
28272
  const ticketCard = hooks_exports.useTicketCardForm({
27892
28273
  confirmer: rnConfirmer,
@@ -27948,14 +28329,16 @@ var Payment = ({
27948
28329
  req = { method: "xenditEWallet", walletKey: id2.walletKey, extra: extras[selected] };
27949
28330
  else if (id2.kind === "redirect")
27950
28331
  req = { method: "redirect", methodType: id2.methodType };
27951
- else if (id2.kind === "paymentPlan") req = { method: "paymentPlan", useSavedCard: reuseSavedCard };
28332
+ else if (id2.kind === "paymentPlan")
28333
+ req = { method: "paymentPlan", useSavedCard: reuseSavedCard };
27952
28334
  else req = { method: id2.kind };
27953
- checkout.placeOrder(
28335
+ const payment = useStripeSheet && checkout.paymentSheet && !isFree ? checkout.paymentSheet.placeOrder() : checkout.placeOrder(
27954
28336
  req,
27955
28337
  usesOwnCardField ? {
27956
28338
  claimCard: cardClaimStep("nativeCard", () => claimCardField(cardOwner))
27957
28339
  } : void 0
27958
- ).then((order) => onComplete == null ? void 0 : onComplete(order)).catch(
28340
+ );
28341
+ payment.then((order) => onComplete == null ? void 0 : onComplete(order)).catch(
27959
28342
  (e) => setError(
27960
28343
  e instanceof CartChangedError ? t("checkout.error.cartChanged") : e instanceof CardClaimError || e instanceof ConfirmerBusyError ? createTranslator()(e.message) : errorMessage(e)
27961
28344
  )
@@ -27968,6 +28351,7 @@ var Payment = ({
27968
28351
  /* @__PURE__ */ jsx27(MutedText, { children: createTranslator()("bundles.payingElsewhere") }),
27969
28352
  /* @__PURE__ */ jsx27(Button, { variant: "ghost", onPress: ticketCard.payHere, children: createTranslator()("bundles.payHere") })
27970
28353
  ] }) : showStripeCardField ? /* @__PURE__ */ jsx27(CardInput, { owner: cardOwner }) : null,
28354
+ useStripeSheet && !isFree ? /* @__PURE__ */ jsx27(MutedText, { children: "Choose your payment details securely with Stripe when you pay." }) : null,
27971
28355
  showXenditCardNote ? (
27972
28356
  // Xendit card tokenizes in a WebView sheet (deferred — see confirmer.ts).
27973
28357
  /* @__PURE__ */ jsx27(MutedText, { children: "Card details are entered in a secure Xendit window when you pay." })
@@ -28046,11 +28430,11 @@ var Payment = ({
28046
28430
  };
28047
28431
 
28048
28432
  // src/sections/WaiverSigning.tsx
28049
- import { useMemo as useMemo32, useRef as useRef34, useState as useState45 } from "react";
28433
+ import { useMemo as useMemo32, useRef as useRef35, useState as useState46 } from "react";
28050
28434
  import { Pressable as Pressable12, ScrollView, StyleSheet as StyleSheet21, Text as Text18, View as View25 } from "react-native";
28051
28435
 
28052
28436
  // src/ui/SignaturePad.tsx
28053
- import { memo, useEffect as useEffect31, useMemo as useMemo31, useRef as useRef33, useState as useState44 } from "react";
28437
+ import { memo, useEffect as useEffect32, useMemo as useMemo31, useRef as useRef34, useState as useState45 } from "react";
28054
28438
  import { PanResponder, Pressable as Pressable11, StyleSheet as StyleSheet20, Text as Text17, View as View24 } from "react-native";
28055
28439
  import { Fragment as Fragment13, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
28056
28440
  var LINE_WIDTH = 2.5;
@@ -28096,13 +28480,13 @@ var SignaturePad = ({
28096
28480
  disabled
28097
28481
  }) => {
28098
28482
  const theme = useTheme();
28099
- const strokesRef = useRef33([]);
28100
- const [, setFrame] = useState44(0);
28101
- const frameRequest = useRef33(null);
28102
- const size = useRef33({ width: 0, height: PAD_HEIGHT });
28103
- const report = useRef33(onChange);
28483
+ const strokesRef = useRef34([]);
28484
+ const [, setFrame] = useState45(0);
28485
+ const frameRequest = useRef34(null);
28486
+ const size = useRef34({ width: 0, height: PAD_HEIGHT });
28487
+ const report = useRef34(onChange);
28104
28488
  report.current = onChange;
28105
- const disabledRef = useRef33(disabled);
28489
+ const disabledRef = useRef34(disabled);
28106
28490
  disabledRef.current = disabled;
28107
28491
  const render = () => {
28108
28492
  if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
@@ -28113,7 +28497,7 @@ var SignaturePad = ({
28113
28497
  if (frameRequest.current !== null) return;
28114
28498
  frameRequest.current = requestAnimationFrame(render);
28115
28499
  };
28116
- useEffect31(
28500
+ useEffect32(
28117
28501
  () => () => {
28118
28502
  if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
28119
28503
  },
@@ -28240,8 +28624,8 @@ var WaiverSigning = ({
28240
28624
  checkout.setWaiverSignature,
28241
28625
  checkout.holdWaiverSigning
28242
28626
  );
28243
- const [open, setOpen] = useState45({});
28244
- const [reloading, setReloading] = useState45(false);
28627
+ const [open, setOpen] = useState46({});
28628
+ const [reloading, setReloading] = useState46(false);
28245
28629
  if ((_a2 = checkout.unavailableDetails) == null ? void 0 : _a2.includes("waiver")) {
28246
28630
  return /* @__PURE__ */ jsxs26(Card, { children: [
28247
28631
  /* @__PURE__ */ jsx29(SectionHeader, { title: t("waivers.heading") }),
@@ -28335,17 +28719,17 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
28335
28719
  var _a2, _b, _c, _d;
28336
28720
  const theme = useTheme();
28337
28721
  const s9 = useWaiverStyles(theme);
28338
- const [heldDraft, setDraft] = useState45(
28722
+ const [heldDraft, setDraft] = useState46(
28339
28723
  () => emptyWaiverDraft(
28340
28724
  { firstName: ticket.holderFirstName, lastName: ticket.holderLastName },
28341
28725
  { signatureMethods: methods }
28342
28726
  )
28343
28727
  );
28344
28728
  const draft = draftWithAllowedMethod(heldDraft, methods);
28345
- const [problems, setProblems] = useState45([]);
28346
- const [pressed, setPressed] = useState45(false);
28729
+ const [problems, setProblems] = useState46([]);
28730
+ const [pressed, setPressed] = useState46(false);
28347
28731
  const frozen = busy || locked;
28348
- const draftRef = useRef34(draft);
28732
+ const draftRef = useRef35(draft);
28349
28733
  draftRef.current = draft;
28350
28734
  const patch2 = (next) => {
28351
28735
  if (!frozen) setDraft((d) => ({ ...d, ...next }));
@@ -28544,7 +28928,7 @@ var useWaiverStyles = (theme) => useMemo32(
28544
28928
  );
28545
28929
 
28546
28930
  // src/sections/IDVerification.tsx
28547
- import { useState as useState46 } from "react";
28931
+ import { useState as useState47 } from "react";
28548
28932
  import { Linking as Linking4 } from "react-native";
28549
28933
  import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
28550
28934
  var MESSAGE = {
@@ -28559,8 +28943,8 @@ var IDVerification = () => {
28559
28943
  const checkout = useCheckoutContext();
28560
28944
  const theme = useTheme();
28561
28945
  const order = checkout.order;
28562
- const [phase, setPhase] = useState46("idle");
28563
- const [error, setError] = useState46("");
28946
+ const [phase, setPhase] = useState47("idle");
28947
+ const [error, setError] = useState47("");
28564
28948
  if (!(order == null ? void 0 : order.needIdVerification)) return null;
28565
28949
  const done = phase === "verified";
28566
28950
  const running = phase === "starting" || phase === "polling";
@@ -28587,7 +28971,7 @@ var IDVerification = () => {
28587
28971
  };
28588
28972
 
28589
28973
  // src/sections/Confirmation.tsx
28590
- import { useState as useState47 } from "react";
28974
+ import { useState as useState48 } from "react";
28591
28975
  import { Linking as Linking5, Share, StyleSheet as StyleSheet22, Text as Text19, View as View26 } from "react-native";
28592
28976
  import Clipboard from "@react-native-clipboard/clipboard";
28593
28977
  import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
@@ -28601,7 +28985,7 @@ var Confirmation = ({
28601
28985
  const checkout = useCheckoutContext();
28602
28986
  const theme = useTheme();
28603
28987
  const order = checkout.order;
28604
- const [copied, setCopied] = useState47(false);
28988
+ const [copied, setCopied] = useState48(false);
28605
28989
  if (!order) return null;
28606
28990
  const pending3 = order.pending;
28607
28991
  const url2 = shareUrl != null ? shareUrl : "";
@@ -28655,12 +29039,12 @@ var styles9 = StyleSheet22.create({
28655
29039
  });
28656
29040
 
28657
29041
  // src/sections/Rewards.tsx
28658
- import { useEffect as useEffect32, useState as useState49 } from "react";
29042
+ import { useEffect as useEffect33, useState as useState50 } from "react";
28659
29043
  import { Alert, Image as Image3, Share as Share2, StyleSheet as StyleSheet25, View as View29 } from "react-native";
28660
29044
  import Clipboard2 from "@react-native-clipboard/clipboard";
28661
29045
 
28662
29046
  // src/sections/rewards/RewardsLadder.tsx
28663
- import { useState as useState48 } from "react";
29047
+ import { useState as useState49 } from "react";
28664
29048
  import { StyleSheet as StyleSheet23, View as View27 } from "react-native";
28665
29049
  import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
28666
29050
  var AWARD_STATUS_KEYS = {
@@ -28670,9 +29054,9 @@ var AWARD_STATUS_KEYS = {
28670
29054
  cancelled: "rewards.awards.cancelled"
28671
29055
  };
28672
29056
  var DeliveryDetails = ({ fields, translate: t, onSubmit }) => {
28673
- const [values2, setValues] = useState48({});
28674
- const [saving, setSaving] = useState48(false);
28675
- const [failure, setFailure] = useState48("");
29057
+ const [values2, setValues] = useState49({});
29058
+ const [saving, setSaving] = useState49(false);
29059
+ const [failure, setFailure] = useState49("");
28676
29060
  return /* @__PURE__ */ jsxs29(View27, { style: { gap: 10 }, children: [
28677
29061
  fields.map((field) => {
28678
29062
  var _a2;
@@ -28863,10 +29247,10 @@ var RewardsView = ({
28863
29247
  var _a2, _b, _c, _d, _e, _f;
28864
29248
  const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
28865
29249
  const { rewards, failure, busy, hash } = flow;
28866
- const [packName, setPackName] = useState49("");
28867
- const [packCode, setPackCode] = useState49("");
28868
- const [copied, setCopied] = useState49(false);
28869
- useEffect32(() => {
29250
+ const [packName, setPackName] = useState50("");
29251
+ const [packCode, setPackCode] = useState50("");
29252
+ const [copied, setCopied] = useState50(false);
29253
+ useEffect33(() => {
28870
29254
  setCopied(false);
28871
29255
  }, [rewards == null ? void 0 : rewards.share_link]);
28872
29256
  if (!rewards)
@@ -29360,7 +29744,7 @@ var Trips = ({
29360
29744
  };
29361
29745
 
29362
29746
  // src/sections/EventDiscussionView.tsx
29363
- import { useRef as useRef36, useState as useState51 } from "react";
29747
+ import { useRef as useRef37, useState as useState52 } from "react";
29364
29748
  import {
29365
29749
  ActivityIndicator as ActivityIndicator4,
29366
29750
  Alert as Alert2,
@@ -29378,7 +29762,7 @@ import {
29378
29762
  } from "react-native";
29379
29763
 
29380
29764
  // src/sections/discussion/CommentImages.tsx
29381
- import { useEffect as useEffect33, useState as useState50 } from "react";
29765
+ import { useEffect as useEffect34, useState as useState51 } from "react";
29382
29766
  import {
29383
29767
  ActivityIndicator as ActivityIndicator3,
29384
29768
  Image as Image4,
@@ -29457,8 +29841,8 @@ var CommentImages = ({
29457
29841
  const t = useAccountT(locale);
29458
29842
  const theme = useTheme();
29459
29843
  const white = [s.white, { fontFamily: theme.fontFamily }];
29460
- const [selected, setSelected] = useState50(null);
29461
- useEffect33(() => {
29844
+ const [selected, setSelected] = useState51(null);
29845
+ useEffect34(() => {
29462
29846
  if (selected === null) return;
29463
29847
  onPreviewChange(true);
29464
29848
  return () => onPreviewChange(false);
@@ -29714,7 +30098,7 @@ var s = StyleSheet27.create({
29714
30098
  });
29715
30099
 
29716
30100
  // src/sections/discussion/SwipeReply.tsx
29717
- import { useMemo as useMemo36, useRef as useRef35 } from "react";
30101
+ import { useMemo as useMemo36, useRef as useRef36 } from "react";
29718
30102
  import { Animated, PanResponder as PanResponder2, StyleSheet as StyleSheet28, Text as Text22, View as View33 } from "react-native";
29719
30103
  import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
29720
30104
  var SwipeReply = ({
@@ -29725,7 +30109,7 @@ var SwipeReply = ({
29725
30109
  children
29726
30110
  }) => {
29727
30111
  const theme = useTheme();
29728
- const offset = useRef35(new Animated.Value(0)).current;
30112
+ const offset = useRef36(new Animated.Value(0)).current;
29729
30113
  const gesture = useMemo36(() => {
29730
30114
  const reset = () => Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
29731
30115
  return PanResponder2.create({
@@ -29806,17 +30190,17 @@ var EventDiscussionBody = ({
29806
30190
  var _a2, _b, _c;
29807
30191
  const theme = useTheme();
29808
30192
  const t = useAccountT(locale);
29809
- const list2 = useRef36(null);
29810
- const firstContent = useRef36(true);
29811
- const [actions, setActions] = useState51(null);
29812
- const [reporting, setReporting] = useState51(null);
29813
- const [moderating, setModerating] = useState51(null);
29814
- const [reason, setReason] = useState51("");
29815
- const [blocksVisible, setBlocksVisible] = useState51(false);
29816
- const [pickerError, setPickerError] = useState51("");
29817
- const [imageOpen, setImageOpen] = useState51(false);
29818
- const [pickerBusy, setPickerBusy] = useState51(false);
29819
- const picking = useRef36(false);
30193
+ const list2 = useRef37(null);
30194
+ const firstContent = useRef37(true);
30195
+ const [actions, setActions] = useState52(null);
30196
+ const [reporting, setReporting] = useState52(null);
30197
+ const [moderating, setModerating] = useState52(null);
30198
+ const [reason, setReason] = useState52("");
30199
+ const [blocksVisible, setBlocksVisible] = useState52(false);
30200
+ const [pickerError, setPickerError] = useState52("");
30201
+ const [imageOpen, setImageOpen] = useState52(false);
30202
+ const [pickerBusy, setPickerBusy] = useState52(false);
30203
+ const picking = useRef37(false);
29820
30204
  const text6 = { color: theme.text, fontFamily: theme.fontFamily };
29821
30205
  const muted = { color: theme.muted, fontFamily: theme.fontFamily };
29822
30206
  const closeActions = (work) => {
@@ -30830,7 +31214,7 @@ var styles13 = StyleSheet30.create({
30830
31214
  });
30831
31215
 
30832
31216
  // src/sections/Streaming.tsx
30833
- import { useMemo as useMemo37, useRef as useRef37, useState as useState52 } from "react";
31217
+ import { useMemo as useMemo37, useRef as useRef38, useState as useState53 } from "react";
30834
31218
  import {
30835
31219
  ActivityIndicator as ActivityIndicator5,
30836
31220
  Alert as Alert4,
@@ -30865,8 +31249,8 @@ var StreamingView = ({
30865
31249
  );
30866
31250
  const session = hooks_exports.useAuthSession();
30867
31251
  const assertOwner = hooks_exports.useSessionAction();
30868
- const pendingBrowser = useRef37({ scope: session.sessionScope, locked: false });
30869
- const [stored, setStored] = useState52({
31252
+ const pendingBrowser = useRef38({ scope: session.sessionScope, locked: false });
31253
+ const [stored, setStored] = useState53({
30870
31254
  scope: session.sessionScope,
30871
31255
  busy: false,
30872
31256
  error: ""
@@ -31290,7 +31674,7 @@ var s5 = StyleSheet32.create({
31290
31674
  });
31291
31675
 
31292
31676
  // src/sections/ProfileSettings.tsx
31293
- import { useEffect as useEffect34, useMemo as useMemo39 } from "react";
31677
+ import { useEffect as useEffect35, useMemo as useMemo39 } from "react";
31294
31678
  import {
31295
31679
  ActivityIndicator as ActivityIndicator7,
31296
31680
  KeyboardAvoidingView as KeyboardAvoidingView2,
@@ -31337,7 +31721,7 @@ var ProfileSettingsView = ({
31337
31721
  } catch (e) {
31338
31722
  }
31339
31723
  };
31340
- useEffect34(() => {
31724
+ useEffect35(() => {
31341
31725
  if (flow.settings) flow.open(mode);
31342
31726
  }, [mode, flow.scopeKey, Boolean(flow.settings)]);
31343
31727
  const text6 = { color: theme.text, fontFamily: theme.fontFamily };
@@ -31842,7 +32226,7 @@ var AccountPaymentPlanSection = ({
31842
32226
  };
31843
32227
 
31844
32228
  // src/sections/NotificationPreferences.tsx
31845
- import { useEffect as useEffect35, useMemo as useMemo40 } from "react";
32229
+ import { useEffect as useEffect36, useMemo as useMemo40 } from "react";
31846
32230
  import {
31847
32231
  ActivityIndicator as ActivityIndicator8,
31848
32232
  Pressable as Pressable21,
@@ -31883,7 +32267,7 @@ var NotificationPreferencesView = ({
31883
32267
  } catch (e) {
31884
32268
  }
31885
32269
  };
31886
- useEffect35(() => {
32270
+ useEffect36(() => {
31887
32271
  var _a3;
31888
32272
  if ((_a3 = flow.preferences) == null ? void 0 : _a3.available) flow.begin();
31889
32273
  }, [flow.scopeKey, Boolean(flow.preferences), (_a2 = flow.preferences) == null ? void 0 : _a2.available]);
@@ -32053,15 +32437,15 @@ import {
32053
32437
  } from "react-native";
32054
32438
 
32055
32439
  // src/auth/LoginForm.tsx
32056
- import { useEffect as useEffect36, useState as useState54 } from "react";
32440
+ import { useEffect as useEffect37, useState as useState55 } from "react";
32057
32441
  import { Pressable as Pressable23, StyleSheet as StyleSheet36, Text as Text30, View as View47 } from "react-native";
32058
32442
 
32059
32443
  // src/auth/PasswordInput.tsx
32060
- import { useState as useState53 } from "react";
32444
+ import { useState as useState54 } from "react";
32061
32445
  import { Pressable as Pressable22, StyleSheet as StyleSheet35, Text as Text29, View as View46 } from "react-native";
32062
32446
  import { jsx as jsx51, jsxs as jsxs48 } from "react/jsx-runtime";
32063
32447
  var PasswordInput = (props) => {
32064
- const [visible, setVisible] = useState53(false);
32448
+ const [visible, setVisible] = useState54(false);
32065
32449
  return /* @__PURE__ */ jsxs48(View46, { style: styles14.wrap, children: [
32066
32450
  /* @__PURE__ */ jsx51(Input, { ...props, autoCapitalize: "none", secureTextEntry: !visible }),
32067
32451
  /* @__PURE__ */ jsx51(
@@ -32103,9 +32487,9 @@ var LoginForm = ({
32103
32487
  onFieldChange
32104
32488
  }) => {
32105
32489
  const theme = useTheme();
32106
- const [email, setEmail] = useState54(initialEmail);
32107
- const [password, setPassword] = useState54("");
32108
- useEffect36(() => {
32490
+ const [email, setEmail] = useState55(initialEmail);
32491
+ const [password, setPassword] = useState55("");
32492
+ useEffect37(() => {
32109
32493
  if (initialEmail && !email) setEmail(initialEmail);
32110
32494
  }, [email, initialEmail]);
32111
32495
  const submit = () => void onSubmit({ email, password });
@@ -32157,7 +32541,7 @@ var styles15 = StyleSheet36.create({
32157
32541
  });
32158
32542
 
32159
32543
  // src/auth/EmailCodeForm.tsx
32160
- import { useState as useState55 } from "react";
32544
+ import { useState as useState56 } from "react";
32161
32545
  import { View as View48 } from "react-native";
32162
32546
  import { Fragment as Fragment28, jsx as jsx53, jsxs as jsxs50 } from "react/jsx-runtime";
32163
32547
  var EmailCodeForm = ({
@@ -32172,8 +32556,8 @@ var EmailCodeForm = ({
32172
32556
  onVerify,
32173
32557
  onBack
32174
32558
  }) => {
32175
- const [email, setEmail] = useState55(initialEmail);
32176
- const [code, setCode] = useState55("");
32559
+ const [email, setEmail] = useState56(initialEmail);
32560
+ const [code, setCode] = useState56("");
32177
32561
  return /* @__PURE__ */ jsxs50(View48, { style: { gap: 14 }, children: [
32178
32562
  /* @__PURE__ */ jsx53(MutedText, { children: sent ? `Enter the sign-in code sent to ${target}.` : "Receive a one-time sign-in code by email." }),
32179
32563
  error ? /* @__PURE__ */ jsx53(ErrorText, { children: error }) : null,
@@ -32229,7 +32613,7 @@ var EmailCodeForm = ({
32229
32613
  };
32230
32614
 
32231
32615
  // src/auth/ForgotPasswordForm.tsx
32232
- import { useEffect as useEffect37, useState as useState56 } from "react";
32616
+ import { useEffect as useEffect38, useState as useState57 } from "react";
32233
32617
  import { Pressable as Pressable24, StyleSheet as StyleSheet37, Text as Text31, View as View49 } from "react-native";
32234
32618
  import { jsx as jsx54, jsxs as jsxs51 } from "react/jsx-runtime";
32235
32619
  var ForgotPasswordForm = ({
@@ -32243,8 +32627,8 @@ var ForgotPasswordForm = ({
32243
32627
  onFieldChange
32244
32628
  }) => {
32245
32629
  const theme = useTheme();
32246
- const [email, setEmail] = useState56(initialEmail);
32247
- useEffect37(() => {
32630
+ const [email, setEmail] = useState57(initialEmail);
32631
+ useEffect38(() => {
32248
32632
  if (initialEmail && !email) setEmail(initialEmail);
32249
32633
  }, [email, initialEmail]);
32250
32634
  const submit = () => void onSubmit(email);
@@ -32292,7 +32676,7 @@ var styles16 = StyleSheet37.create({
32292
32676
  });
32293
32677
 
32294
32678
  // src/auth/RegisterForm.tsx
32295
- import { useEffect as useEffect38, useMemo as useMemo41, useState as useState57 } from "react";
32679
+ import { useEffect as useEffect39, useMemo as useMemo41, useState as useState58 } from "react";
32296
32680
  import { Linking as Linking8, Pressable as Pressable25, StyleSheet as StyleSheet38, View as View50 } from "react-native";
32297
32681
  import { Fragment as Fragment29, jsx as jsx55, jsxs as jsxs52 } from "react/jsx-runtime";
32298
32682
  var emptyRegistration = (email) => ({
@@ -32322,12 +32706,12 @@ var RegisterForm = ({
32322
32706
  }) => {
32323
32707
  var _a2, _b, _c, _d, _e, _f;
32324
32708
  const t = useMemo41(() => createTranslator({ locale }), [locale]);
32325
- const [values2, setValues] = useState57(
32709
+ const [values2, setValues] = useState58(
32326
32710
  () => emptyRegistration(initialEmail)
32327
32711
  );
32328
- const [termsAccepted, setTermsAccepted] = useState57(false);
32329
- const [refreshingProof, setRefreshingProof] = useState57(false);
32330
- const [refreshCode, setRefreshCode] = useState57("");
32712
+ const [termsAccepted, setTermsAccepted] = useState58(false);
32713
+ const [refreshingProof, setRefreshingProof] = useState58(false);
32714
+ const [refreshCode, setRefreshCode] = useState58("");
32331
32715
  const countriesQuery = hooks_exports.useCountries();
32332
32716
  const countries = useMemo41(() => {
32333
32717
  var _a3;
@@ -32340,11 +32724,11 @@ var RegisterForm = ({
32340
32724
  var _a3;
32341
32725
  return (_a3 = statesQuery.data) != null ? _a3 : [];
32342
32726
  }, [statesQuery.data]);
32343
- useEffect38(() => {
32727
+ useEffect39(() => {
32344
32728
  if (initialEmail && !values2.email)
32345
32729
  setValues((current5) => ({ ...current5, email: initialEmail }));
32346
32730
  }, [initialEmail, values2.email]);
32347
- useEffect38(() => {
32731
+ useEffect39(() => {
32348
32732
  var _a3;
32349
32733
  if (!requireAddress || values2.countryId || countries.length === 0) return;
32350
32734
  const preferred = (_a3 = countries.find((country) => {
@@ -32968,7 +33352,7 @@ function AccountEmailEnrichment({
32968
33352
  }
32969
33353
 
32970
33354
  // src/auth/AuthModal.tsx
32971
- import { useCallback as useCallback15, useEffect as useEffect39, useRef as useRef38 } from "react";
33355
+ import { useCallback as useCallback16, useEffect as useEffect40, useRef as useRef39 } from "react";
32972
33356
  import { Image as Image8, Modal as Modal7, Pressable as Pressable26, ScrollView as ScrollView4, StyleSheet as StyleSheet40, Text as Text33, View as View53 } from "react-native";
32973
33357
  import { jsx as jsx58, jsxs as jsxs55 } from "react/jsx-runtime";
32974
33358
  var Tab = ({
@@ -33003,7 +33387,7 @@ var CredentialAuthModal = ({
33003
33387
  }) => {
33004
33388
  const theme = useTheme();
33005
33389
  const t = useAccountT();
33006
- const closeAfterAuth = useCallback15(
33390
+ const closeAfterAuth = useCallback16(
33007
33391
  (profile) => {
33008
33392
  onAuthenticated == null ? void 0 : onAuthenticated(profile);
33009
33393
  onClose();
@@ -33195,8 +33579,8 @@ var PhoneAccountModal = ({
33195
33579
  },
33196
33580
  onCancelled: onClose
33197
33581
  });
33198
- const prepared = useRef38(false);
33199
- useEffect39(() => {
33582
+ const prepared = useRef39(false);
33583
+ useEffect40(() => {
33200
33584
  if (prepared.current) return;
33201
33585
  prepared.current = true;
33202
33586
  if (initialEmail) flow.emailAuth.showLogin(initialEmail);
@@ -33286,7 +33670,7 @@ var styles18 = StyleSheet40.create({
33286
33670
  });
33287
33671
 
33288
33672
  // src/auth/ResetPasswordForm.tsx
33289
- import { useMemo as useMemo42, useState as useState58 } from "react";
33673
+ import { useMemo as useMemo42, useState as useState59 } from "react";
33290
33674
  import { StyleSheet as StyleSheet41, Text as Text34, View as View54 } from "react-native";
33291
33675
  import { jsx as jsx59, jsxs as jsxs56 } from "react/jsx-runtime";
33292
33676
  var ResetPasswordForm = ({
@@ -33295,10 +33679,10 @@ var ResetPasswordForm = ({
33295
33679
  onBackToLogin
33296
33680
  }) => {
33297
33681
  const theme = useTheme();
33298
- const [password, setPassword] = useState58("");
33299
- const [confirmation, setConfirmation] = useState58("");
33300
- const [submitted, setSubmitted] = useState58(false);
33301
- const [success, setSuccess] = useState58(false);
33682
+ const [password, setPassword] = useState59("");
33683
+ const [confirmation, setConfirmation] = useState59("");
33684
+ const [submitted, setSubmitted] = useState59(false);
33685
+ const [success, setSuccess] = useState59(false);
33302
33686
  const validation = useMemo42(() => {
33303
33687
  if (!submitted)
33304
33688
  return {};
@@ -33358,7 +33742,7 @@ var styles19 = StyleSheet41.create({
33358
33742
  });
33359
33743
 
33360
33744
  // src/EmbeddedCheckout.tsx
33361
- import { useEffect as useEffect40, useRef as useRef39, useState as useState59 } from "react";
33745
+ import { useEffect as useEffect41, useRef as useRef40, useState as useState60 } from "react";
33362
33746
  import { Pressable as Pressable27, ScrollView as ScrollView5, StyleSheet as StyleSheet42, Text as Text35, View as View55 } from "react-native";
33363
33747
  import { Fragment as Fragment32, jsx as jsx60, jsxs as jsxs57 } from "react/jsx-runtime";
33364
33748
  var Flow = ({
@@ -33386,13 +33770,13 @@ var Flow = ({
33386
33770
  var _a2;
33387
33771
  const checkout = useCheckoutContext();
33388
33772
  const theme = useTheme();
33389
- const [view, setView] = useState59(initialView);
33390
- const [selectionView, setSelectionView] = useState59(initialView);
33391
- const editedDetailsRef = useRef39(null);
33392
- const [authRequest, setAuthRequest] = useState59(
33773
+ const [view, setView] = useState60(initialView);
33774
+ const [selectionView, setSelectionView] = useState60(initialView);
33775
+ const editedDetailsRef = useRef40(null);
33776
+ const [authRequest, setAuthRequest] = useState60(
33393
33777
  null
33394
33778
  );
33395
- const [privacyAttempted, setPrivacyAttempted] = useState59(false);
33779
+ const [privacyAttempted, setPrivacyAttempted] = useState60(false);
33396
33780
  const openBuiltInAuth = (email) => setAuthRequest((current5) => {
33397
33781
  var _a3;
33398
33782
  return { email, key: ((_a3 = current5 == null ? void 0 : current5.key) != null ? _a3 : 0) + 1 };
@@ -33405,7 +33789,7 @@ var Flow = ({
33405
33789
  orderFixed: checkout.orderFixed
33406
33790
  });
33407
33791
  const leaveAllowed = canLeavePayment(checkout);
33408
- useEffect40(() => {
33792
+ useEffect41(() => {
33409
33793
  if (visibleView === view) return;
33410
33794
  if (visibleView === "checkout") setView("checkout");
33411
33795
  else {
@@ -33413,7 +33797,7 @@ var Flow = ({
33413
33797
  setSelectionView("tickets");
33414
33798
  }
33415
33799
  }, [view, visibleView]);
33416
- useEffect40(() => {
33800
+ useEffect41(() => {
33417
33801
  onViewChange == null ? void 0 : onViewChange(visibleView);
33418
33802
  }, [onViewChange, visibleView]);
33419
33803
  const enterCheckout = (from) => {