@scopetickets/checkout 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import {
8
8
  useState
9
9
  } from "react";
10
10
 
11
- // src/island/island-motion.ts
11
+ // ../checkout-core/src/motion/island-motion.ts
12
12
  var SURFACE_MORPH_MS = 250;
13
13
  var SURFACE_DAMPING = 0.82;
14
14
  var SURFACE_SPRING = {
@@ -39,18 +39,6 @@ function springAt(spring, t) {
39
39
  const value = 1 - Math.exp(-z * wn * t) * (Math.cos(wd * t) + z / Math.sqrt(1 - z * z) * Math.sin(wd * t));
40
40
  return spring.clampOvershoot ? Math.min(value, 1) : value;
41
41
  }
42
- function springEasing(spring, samples = 40) {
43
- const duration = settleMs(spring) / 1e3;
44
- const arrival = Math.min(springAt(spring, duration), 1);
45
- const points = [];
46
- for (let i = 0; i <= samples; i += 1) {
47
- const raw = springAt(spring, i / samples * duration);
48
- const scaled = arrival <= 0 ? raw : raw / arrival;
49
- const value = i === samples ? 1 : spring.clampOvershoot ? Math.min(1, scaled) : scaled;
50
- points.push(Number(value.toFixed(4)).toString());
51
- }
52
- return `linear(${points.join(", ")})`;
53
- }
54
42
  var OUTGOING_FADE_MS = 125;
55
43
  var SURFACE_MORPH_DELAY_MS = OUTGOING_FADE_MS;
56
44
  var INCOMING_FADE_DELAY_MS = SURFACE_MORPH_DELAY_MS + SURFACE_MORPH_MS;
@@ -60,8 +48,6 @@ var DAY_SWAP_OUT_MS = Math.round(OUTGOING_FADE_MS * DAY_SWAP_STRETCH);
60
48
  var DAY_SWAP_IN_MS = Math.round(INCOMING_FADE_MS * DAY_SWAP_STRETCH);
61
49
  var CARRY_MOVE_DELAY_MS = SURFACE_MORPH_DELAY_MS;
62
50
  var CARRY_MOVE_MS = settleMs(CARRY_SPRING);
63
- var ARC_LEAD_EASING = "cubic-bezier(0.61, 1, 0.88, 1)";
64
- var ARC_TRAIL_EASING = "cubic-bezier(0.12, 0, 0.39, 0)";
65
51
  var POP_SCALE = 0.95;
66
52
  var SHIELD_POP_SCALE = 1 - (1 - POP_SCALE) / 2;
67
53
  var POP_CONTRACT_MS = OUTGOING_FADE_MS;
@@ -149,7 +135,225 @@ function useIslandPress(scope = "island") {
149
135
  return whole || !pressedHere ? handlers : { ...handlers, "data-pressed": "" };
150
136
  }
151
137
 
152
- // src/island/island-calendar.ts
138
+ // ../checkout-core/src/domain/money.ts
139
+ var MONEY_LOCALE = "en-IE";
140
+ function formatterFor(currency) {
141
+ return new Intl.NumberFormat(MONEY_LOCALE, { style: "currency", currency });
142
+ }
143
+ function minorUnitDigits(formatter) {
144
+ return formatter.resolvedOptions().maximumFractionDigits ?? 2;
145
+ }
146
+ function formatMoney(minorUnits, currency) {
147
+ const formatter = formatterFor(currency);
148
+ return formatter.format(minorUnits / 10 ** minorUnitDigits(formatter));
149
+ }
150
+ function moneyParts(minorUnits, currency) {
151
+ const formatter = formatterFor(currency);
152
+ const digits = minorUnitDigits(formatter);
153
+ const plain = new Intl.NumberFormat(MONEY_LOCALE, {
154
+ minimumFractionDigits: digits,
155
+ maximumFractionDigits: digits
156
+ });
157
+ const value = minorUnits / 10 ** digits;
158
+ const magnitude = Math.abs(value);
159
+ const symbol = formatter.format(magnitude).replace(plain.format(magnitude), "").replace(/\s/gu, "");
160
+ return { symbol, amount: plain.format(value) };
161
+ }
162
+ function widestAmount(amounts) {
163
+ return amounts.reduce((widest, amount) => Math.max(widest, amount.length), 0);
164
+ }
165
+ function quoteLines(quote) {
166
+ if (quote.kind === "NONE") return null;
167
+ const headline = formatMoney(quote.minorUnits, quote.currency);
168
+ if (quote.kind === "FROM") return { qualifier: "From", headline };
169
+ if (quote.kind === "SAVING") {
170
+ return { qualifier: `Save ${formatMoney(quote.savedMinorUnits, quote.currency)}`, headline };
171
+ }
172
+ return { qualifier: null, headline };
173
+ }
174
+
175
+ // ../checkout-core/src/domain/user-types.ts
176
+ var SOLO_KEY = "default";
177
+ function agreed(values) {
178
+ const first = values[0];
179
+ if (first === void 0) return null;
180
+ return values.every((value) => value === first) ? first : null;
181
+ }
182
+ function groupUserTypes(rows) {
183
+ const byName = /* @__PURE__ */ new Map();
184
+ for (const row of rows) {
185
+ if (row.Name === "") continue;
186
+ const group = byName.get(row.Name);
187
+ if (group === void 0) byName.set(row.Name, [row]);
188
+ else group.push(row);
189
+ }
190
+ return [...byName.entries()].map(([name, group]) => ({
191
+ key: name,
192
+ name,
193
+ note: agreed(group.map((row) => row.Note ?? null))
194
+ }));
195
+ }
196
+ function partyTypes(host, fetched, asking) {
197
+ if (host.length > 0) return { status: "KNOWN", types: host };
198
+ if (fetched !== void 0) return { status: "KNOWN", types: fetched };
199
+ return asking ? { status: "ASKING" } : { status: "KNOWN", types: [] };
200
+ }
201
+ function assignmentFor(product, key) {
202
+ if (product.UserTypes === void 0) return key;
203
+ const offered = product.UserTypes ?? [];
204
+ const byName = offered.find((type) => type.Name === key);
205
+ if (byName !== void 0) return byName.AssignmentKey;
206
+ return offered.some((type) => type.AssignmentKey === key) ? key : void 0;
207
+ }
208
+ function userTypeNames(rows) {
209
+ return Object.fromEntries(rows.map((row) => [row.AssignmentKey, row.Name]));
210
+ }
211
+
212
+ // ../checkout-core/src/domain/island-timeslots.ts
213
+ function slotFullness(remaining, total) {
214
+ if (!Number.isFinite(remaining) || remaining < 0) return null;
215
+ if (remaining <= 1) return remaining;
216
+ if (!Number.isFinite(total) || total <= 0) return null;
217
+ return Math.min(1, remaining / total);
218
+ }
219
+ var MAX_TIME_INPUT = 40;
220
+ var WALL_CLOCK = /^(?:\d{4}-\d{2}-\d{2}[T ])?(\d{2}):(\d{2})(?::\d{2})?/;
221
+ function parseWallClockTime(value) {
222
+ if (typeof value !== "string" || value.length > MAX_TIME_INPUT) return null;
223
+ const match = WALL_CLOCK.exec(value.trim());
224
+ if (!match) return null;
225
+ if (Number(match[1]) > 23 || Number(match[2]) > 59) return null;
226
+ return `${match[1]}:${match[2]}`;
227
+ }
228
+ function timeOfDayInZone(now, timeZone) {
229
+ const read = (zone) => {
230
+ const parts = new Intl.DateTimeFormat("en-GB", {
231
+ timeZone: zone,
232
+ hour: "2-digit",
233
+ minute: "2-digit",
234
+ hourCycle: "h23"
235
+ }).formatToParts(now);
236
+ const hour = parts.find((part) => part.type === "hour")?.value ?? "00";
237
+ const minute = parts.find((part) => part.type === "minute")?.value ?? "00";
238
+ return `${String(Number(hour) % 24).padStart(2, "0")}:${minute}`;
239
+ };
240
+ try {
241
+ return read(timeZone ?? "UTC");
242
+ } catch {
243
+ return read("UTC");
244
+ }
245
+ }
246
+ function dayInZone(now, timeZone) {
247
+ const read = (zone) => new Intl.DateTimeFormat("en-CA", {
248
+ timeZone: zone,
249
+ year: "numeric",
250
+ month: "2-digit",
251
+ day: "2-digit"
252
+ }).format(now);
253
+ try {
254
+ return read(timeZone ?? "UTC");
255
+ } catch {
256
+ return read("UTC");
257
+ }
258
+ }
259
+ var PART_OF_DAY_LABELS = {
260
+ OVERNIGHT: "OVERNIGHT",
261
+ PRE_DAWN: "PRE-DAWN",
262
+ EARLY_MORNING: "EARLY MORNING",
263
+ LATE_MORNING: "LATE MORNING",
264
+ EARLY_AFTERNOON: "EARLY AFTERNOON",
265
+ LATE_AFTERNOON: "LATE AFTERNOON",
266
+ EARLY_EVENING: "EARLY EVENING",
267
+ LATE_EVENING: "LATE EVENING"
268
+ };
269
+ function partOfDayLabel(part) {
270
+ return PART_OF_DAY_LABELS[part];
271
+ }
272
+ function partOfDay(time) {
273
+ const hour = Number(time.slice(0, 2));
274
+ if (hour < 3) return "OVERNIGHT";
275
+ if (hour < 6) return "PRE_DAWN";
276
+ if (hour < 9) return "EARLY_MORNING";
277
+ if (hour < 12) return "LATE_MORNING";
278
+ if (hour < 15) return "EARLY_AFTERNOON";
279
+ if (hour < 18) return "LATE_AFTERNOON";
280
+ if (hour < 21) return "EARLY_EVENING";
281
+ return "LATE_EVENING";
282
+ }
283
+ var MINUTES_IN_DAY = 24 * 60;
284
+ function minutesOfDay(time) {
285
+ return Number(time.slice(0, 2)) * 60 + Number(time.slice(3, 5));
286
+ }
287
+ function formatSlotRange(startTime, endTime) {
288
+ return endTime === null ? startTime : `${startTime} - ${endTime}`;
289
+ }
290
+ function formatSlotDuration(startTime, endTime) {
291
+ if (endTime === null) return null;
292
+ const minutes = (minutesOfDay(endTime) - minutesOfDay(startTime) + MINUTES_IN_DAY) % MINUTES_IN_DAY;
293
+ if (!Number.isFinite(minutes) || minutes <= 0) return null;
294
+ const hours = Math.floor(minutes / 60);
295
+ const rest = minutes % 60;
296
+ if (hours === 0) return `${rest}m`;
297
+ return rest === 0 ? `${hours}h` : `${hours}h ${rest}m`;
298
+ }
299
+ function withSelectedDay(selection, day) {
300
+ return selection.day === day ? selection : { day, startTime: null };
301
+ }
302
+ function withSelectedTime(selection, startTime) {
303
+ return { day: selection.day, startTime };
304
+ }
305
+ function hasStarted(slot, options) {
306
+ if (options.selection.day < options.today) return true;
307
+ if (options.selection.day > options.today) return false;
308
+ return slot.startTime <= options.nowTime;
309
+ }
310
+ function timeslotState(slot, options) {
311
+ if (hasStarted(slot, options)) return "PAST_BUT_RELEVANT";
312
+ if (slot.remaining !== null && slot.remaining <= 0) return "UNAVAILABLE";
313
+ return slot.startTime === options.selection.startTime ? "SELECTED" : "AVAILABLE";
314
+ }
315
+ function sameTimeslots(a, b) {
316
+ if (a === b) return true;
317
+ if (a.length !== b.length) return false;
318
+ return a.every((slot, index) => {
319
+ const other = b[index];
320
+ return slot.startTime === other.startTime && slot.endTime === other.endTime && slot.remaining === other.remaining;
321
+ });
322
+ }
323
+ function buildTimeslotGroups(slots, options) {
324
+ const groups = [];
325
+ const byPart = /* @__PURE__ */ new Map();
326
+ const chronological = [...slots].sort((a, b) => a.startTime.localeCompare(b.startTime));
327
+ const cellFor = (slot) => ({
328
+ slot,
329
+ part: partOfDay(slot.startTime),
330
+ state: timeslotState(slot, options),
331
+ duration: formatSlotDuration(slot.startTime, slot.endTime)
332
+ });
333
+ if ((options.grouping ?? "PART_OF_DAY") === "NONE") {
334
+ return chronological.length === 0 ? [] : [{ part: null, label: null, cells: chronological.map(cellFor) }];
335
+ }
336
+ for (const slot of chronological) {
337
+ const part = partOfDay(slot.startTime);
338
+ let group = byPart.get(part);
339
+ if (!group) {
340
+ group = { part, label: partOfDayLabel(part), cells: [] };
341
+ byPart.set(part, group);
342
+ groups.push(group);
343
+ }
344
+ group.cells.push(cellFor(slot));
345
+ }
346
+ return groups;
347
+ }
348
+ function timeslotRequest(day, startTime, schedule) {
349
+ if (day === void 0 || startTime === void 0 || startTime === "") return void 0;
350
+ const slot = schedule?.slotsByDay?.[day]?.find((candidate) => candidate.startTime === startTime);
351
+ if (slot === void 0) return void 0;
352
+ const ends = slot.endTime ?? slot.startTime;
353
+ return { LocalStartTime: `${slot.startTime}:00`, LocalEndTime: `${ends}:00` };
354
+ }
355
+
356
+ // ../checkout-core/src/domain/island-calendar.ts
153
357
  var HIGH_FROM = 2 / 3;
154
358
  var MEDIUM_FROM = 1 / 3;
155
359
  function toAvailabilityLevel(remaining) {
@@ -364,9 +568,14 @@ function formatDayChip(day) {
364
568
  const at = /* @__PURE__ */ new Date(`${day}T12:00:00.000Z`);
365
569
  return {
366
570
  date: at.toLocaleDateString(CALENDAR_LOCALE, { day: "numeric", timeZone: "UTC" }),
367
- month: at.toLocaleDateString(CALENDAR_LOCALE, { month: "short", timeZone: "UTC" }).replace(/\.$/, "").toUpperCase()
571
+ month: shortMonthLabel(
572
+ at.toLocaleDateString(CALENDAR_LOCALE, { month: "short", timeZone: "UTC" })
573
+ )
368
574
  };
369
575
  }
576
+ function shortMonthLabel(abbreviation) {
577
+ return abbreviation.replace(/\.$/, "").slice(0, 3).toUpperCase();
578
+ }
370
579
  function formatDayWeekday(day) {
371
580
  return (/* @__PURE__ */ new Date(`${day}T12:00:00.000Z`)).toLocaleDateString(CALENDAR_LOCALE, {
372
581
  weekday: "long",
@@ -439,176 +648,39 @@ function toggleSelectedDay(selected, day) {
439
648
  return selected === day ? null : day;
440
649
  }
441
650
 
442
- // src/island/island-timeslots.ts
443
- function slotFullness(remaining, total) {
444
- if (!Number.isFinite(remaining) || remaining < 0) return null;
445
- if (remaining <= 1) return remaining;
446
- if (!Number.isFinite(total) || total <= 0) return null;
447
- return Math.min(1, remaining / total);
448
- }
449
- var MAX_TIME_INPUT = 40;
450
- var WALL_CLOCK = /^(?:\d{4}-\d{2}-\d{2}[T ])?(\d{2}):(\d{2})(?::\d{2})?/;
451
- function parseWallClockTime(value) {
452
- if (typeof value !== "string" || value.length > MAX_TIME_INPUT) return null;
453
- const match = WALL_CLOCK.exec(value.trim());
454
- if (!match) return null;
455
- if (Number(match[1]) > 23 || Number(match[2]) > 59) return null;
456
- return `${match[1]}:${match[2]}`;
457
- }
458
- function timeOfDayInZone(now, timeZone) {
459
- const read = (zone) => {
460
- const parts = new Intl.DateTimeFormat("en-GB", {
461
- timeZone: zone,
462
- hour: "2-digit",
463
- minute: "2-digit",
464
- hourCycle: "h23"
465
- }).formatToParts(now);
466
- const hour = parts.find((part) => part.type === "hour")?.value ?? "00";
467
- const minute = parts.find((part) => part.type === "minute")?.value ?? "00";
468
- return `${String(Number(hour) % 24).padStart(2, "0")}:${minute}`;
469
- };
470
- try {
471
- return read(timeZone ?? "UTC");
472
- } catch {
473
- return read("UTC");
474
- }
475
- }
476
- var PART_OF_DAY_LABELS = {
477
- OVERNIGHT: "OVERNIGHT",
478
- PRE_DAWN: "PRE-DAWN",
479
- EARLY_MORNING: "EARLY MORNING",
480
- LATE_MORNING: "LATE MORNING",
481
- EARLY_AFTERNOON: "EARLY AFTERNOON",
482
- LATE_AFTERNOON: "LATE AFTERNOON",
483
- EARLY_EVENING: "EARLY EVENING",
484
- LATE_EVENING: "LATE EVENING"
485
- };
486
- function partOfDayLabel(part) {
487
- return PART_OF_DAY_LABELS[part];
488
- }
489
- function partOfDay(time) {
490
- const hour = Number(time.slice(0, 2));
491
- if (hour < 3) return "OVERNIGHT";
492
- if (hour < 6) return "PRE_DAWN";
493
- if (hour < 9) return "EARLY_MORNING";
494
- if (hour < 12) return "LATE_MORNING";
495
- if (hour < 15) return "EARLY_AFTERNOON";
496
- if (hour < 18) return "LATE_AFTERNOON";
497
- if (hour < 21) return "EARLY_EVENING";
498
- return "LATE_EVENING";
499
- }
500
- var MINUTES_IN_DAY = 24 * 60;
501
- function minutesOfDay(time) {
502
- return Number(time.slice(0, 2)) * 60 + Number(time.slice(3, 5));
503
- }
504
- function formatSlotRange(startTime, endTime) {
505
- return endTime === null ? startTime : `${startTime} - ${endTime}`;
506
- }
507
- function formatSlotDuration(startTime, endTime) {
508
- if (endTime === null) return null;
509
- const minutes = (minutesOfDay(endTime) - minutesOfDay(startTime) + MINUTES_IN_DAY) % MINUTES_IN_DAY;
510
- if (!Number.isFinite(minutes) || minutes <= 0) return null;
511
- const hours = Math.floor(minutes / 60);
512
- const rest = minutes % 60;
513
- if (hours === 0) return `${rest}m`;
514
- return rest === 0 ? `${hours}h` : `${hours}h ${rest}m`;
515
- }
516
- function withSelectedDay(selection, day) {
517
- return selection.day === day ? selection : { day, startTime: null };
518
- }
519
- function withSelectedTime(selection, startTime) {
520
- return { day: selection.day, startTime };
521
- }
522
- function hasStarted(slot, options) {
523
- if (options.selection.day < options.today) return true;
524
- if (options.selection.day > options.today) return false;
525
- return slot.startTime <= options.nowTime;
526
- }
527
- function timeslotState(slot, options) {
528
- if (hasStarted(slot, options)) return "PAST_BUT_RELEVANT";
529
- if (slot.remaining !== null && slot.remaining <= 0) return "UNAVAILABLE";
530
- return slot.startTime === options.selection.startTime ? "SELECTED" : "AVAILABLE";
531
- }
532
- function sameTimeslots(a, b) {
533
- if (a === b) return true;
534
- if (a.length !== b.length) return false;
535
- return a.every((slot, index) => {
536
- const other = b[index];
537
- return slot.startTime === other.startTime && slot.endTime === other.endTime && slot.remaining === other.remaining;
538
- });
539
- }
540
- function buildTimeslotGroups(slots, options) {
541
- const groups = [];
542
- const byPart = /* @__PURE__ */ new Map();
543
- const chronological = [...slots].sort((a, b) => a.startTime.localeCompare(b.startTime));
544
- const cellFor = (slot) => ({
545
- slot,
546
- part: partOfDay(slot.startTime),
547
- state: timeslotState(slot, options),
548
- duration: formatSlotDuration(slot.startTime, slot.endTime)
549
- });
550
- if ((options.grouping ?? "PART_OF_DAY") === "NONE") {
551
- return chronological.length === 0 ? [] : [{ part: null, label: null, cells: chronological.map(cellFor) }];
552
- }
553
- for (const slot of chronological) {
554
- const part = partOfDay(slot.startTime);
555
- let group = byPart.get(part);
556
- if (!group) {
557
- group = { part, label: partOfDayLabel(part), cells: [] };
558
- byPart.set(part, group);
559
- groups.push(group);
560
- }
561
- group.cells.push(cellFor(slot));
562
- }
563
- return groups;
564
- }
565
- function timeslotRequest(day, startTime, schedule) {
566
- if (day === void 0 || startTime === void 0 || startTime === "") return void 0;
567
- const slot = schedule?.slotsByDay?.[day]?.find((candidate) => candidate.startTime === startTime);
568
- if (slot === void 0) return void 0;
569
- const ends = slot.endTime ?? slot.startTime;
570
- return { LocalStartTime: `${slot.startTime}:00`, LocalEndTime: `${ends}:00` };
571
- }
572
-
573
- // src/domain/user-types.ts
574
- function agreed(values) {
575
- const first = values[0];
576
- if (first === void 0) return null;
577
- return values.every((value) => value === first) ? first : null;
578
- }
579
- function groupUserTypes(rows) {
580
- const byName = /* @__PURE__ */ new Map();
581
- for (const row of rows) {
582
- if (row.Name === "") continue;
583
- const group = byName.get(row.Name);
584
- if (group === void 0) byName.set(row.Name, [row]);
585
- else group.push(row);
586
- }
587
- return [...byName.entries()].map(([name, group]) => ({
588
- key: name,
589
- name,
590
- note: agreed(group.map((row) => row.Note ?? null))
591
- }));
592
- }
593
- function partyTypes(host, fetched, asking) {
594
- if (host.length > 0) return { status: "KNOWN", types: host };
595
- if (fetched !== void 0) return { status: "KNOWN", types: fetched };
596
- return asking ? { status: "ASKING" } : { status: "KNOWN", types: [] };
597
- }
598
- function assignmentFor(product, key) {
599
- if (product.UserTypes === void 0) return key;
600
- const offered = product.UserTypes ?? [];
601
- const byName = offered.find((type) => type.Name === key);
602
- if (byName !== void 0) return byName.AssignmentKey;
603
- return offered.some((type) => type.AssignmentKey === key) ? key : void 0;
604
- }
605
- function userTypeNames(rows) {
606
- return Object.fromEntries(rows.map((row) => [row.AssignmentKey, row.Name]));
607
- }
608
-
609
651
  // src/island/PartyStepper.tsx
610
652
  import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
611
653
  import { MinusMarkIcon, PlusMarkIcon } from "@scopetickets/icons";
654
+
655
+ // ../checkout-core/src/view/component-copy.ts
656
+ var FIELD_COPY = {
657
+ firstName: "First Name",
658
+ lastName: "Last Name",
659
+ email: "Email",
660
+ countryCode: "Country Code",
661
+ phoneNumber: "Phone Number",
662
+ confirmPassword: "Confirm Password",
663
+ verificationCode: "Verification code"
664
+ };
665
+ var PARTY_COPY = {
666
+ remove: (name) => `Remove one ${name}`,
667
+ add: (name) => `Add one ${name}`,
668
+ count: (count, name) => `${count} ${name}. Change the number`,
669
+ field: (name) => `Number of ${name}`
670
+ };
671
+ var ACTION_COPY = {
672
+ cancel: "Cancel",
673
+ confirm: "Confirm",
674
+ returnToOrder: "Return to Order",
675
+ payNow: "Pay Now",
676
+ tryAgain: "Try Again"
677
+ };
678
+ var ISLAND_COPY = {
679
+ order: "Your order",
680
+ runWeeks: "Weeks of the run"
681
+ };
682
+
683
+ // src/island/PartyStepper.tsx
612
684
  import { jsx, jsxs } from "react/jsx-runtime";
613
685
  function UserTypeRow({
614
686
  option,
@@ -661,7 +733,7 @@ function UserTypeStepper({
661
733
  /* @__PURE__ */ jsx(
662
734
  StepperButton,
663
735
  {
664
- label: `Remove one ${name}`,
736
+ label: PARTY_COPY.remove(name),
665
737
  onPress: onRemove,
666
738
  kind: "remove",
667
739
  state: chosen ? "LIVE" : "CLOSED"
@@ -686,7 +758,7 @@ function UserTypeStepper({
686
758
  /* @__PURE__ */ jsx(
687
759
  StepperButton,
688
760
  {
689
- label: `Add one ${name}`,
761
+ label: PARTY_COPY.add(name),
690
762
  onPress: onAdd,
691
763
  kind: "add",
692
764
  state: atLimit ? "REFUSING" : "LIVE"
@@ -721,7 +793,7 @@ function SoloPartyStepper({ max, name, count, onSet, onRemove, onRefuse }) {
721
793
  /* @__PURE__ */ jsx(
722
794
  StepperButton,
723
795
  {
724
- label: `Remove one ${name}`,
796
+ label: PARTY_COPY.remove(name),
725
797
  onPress: onRemove,
726
798
  kind: "remove",
727
799
  state: count === 0 ? "REFUSING" : "LIVE"
@@ -742,7 +814,7 @@ function SoloPartyStepper({ max, name, count, onSet, onRemove, onRefuse }) {
742
814
  /* @__PURE__ */ jsx(
743
815
  StepperButton,
744
816
  {
745
- label: `Add one ${name}`,
817
+ label: PARTY_COPY.add(name),
746
818
  onPress: () => onSet(count + 1),
747
819
  kind: "add",
748
820
  state: count >= max ? "REFUSING" : "LIVE"
@@ -785,7 +857,7 @@ function TypedCount({
785
857
  {
786
858
  type: "button",
787
859
  className: valueClassName,
788
- "aria-label": `${count} ${name}. Change the number`,
860
+ "aria-label": PARTY_COPY.count(count, name),
789
861
  onClick: () => setTyping(String(count)),
790
862
  disabled: closed,
791
863
  children: count
@@ -801,7 +873,7 @@ function TypedCount({
801
873
  pattern: "[0-9]*",
802
874
  size: 1,
803
875
  ref: field,
804
- "aria-label": `Number of ${name}`,
876
+ "aria-label": PARTY_COPY.field(name),
805
877
  value: typing,
806
878
  onChange: (event) => setTyping(event.target.value.replace(/\D/g, "")),
807
879
  onBlur: commit,
@@ -867,7 +939,6 @@ function PartyStepper({
867
939
  option.key
868
940
  )) });
869
941
  }
870
- var SOLO_KEY = "default";
871
942
 
872
943
  // src/island/ContentFlag.tsx
873
944
  import {
@@ -889,10 +960,30 @@ function ContentFlag({ tone, title }) {
889
960
  return /* @__PURE__ */ jsx2("span", { className: `scopetickets-island-content-flag scopetickets-island-content-flag--${tone}`, children: /* @__PURE__ */ jsx2(Glyph, { fill: true, color: "currentColor", title }) });
890
961
  }
891
962
 
963
+ // src/island/Switch.tsx
964
+ import { jsx as jsx3 } from "react/jsx-runtime";
965
+ function Switch({ checked, onChange, label, size = "wide", disabled = false }) {
966
+ const press = useIslandPress("element");
967
+ return /* @__PURE__ */ jsx3(
968
+ "button",
969
+ {
970
+ type: "button",
971
+ role: "switch",
972
+ "aria-checked": checked,
973
+ "aria-label": label,
974
+ disabled,
975
+ className: `scopetickets-island-switch scopetickets-island-switch--${size}`,
976
+ onClick: () => onChange(!checked),
977
+ ...disabled ? {} : press,
978
+ children: /* @__PURE__ */ jsx3("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
979
+ }
980
+ );
981
+ }
982
+
892
983
  // src/island/CounterRing.tsx
893
984
  import { IconGlyph } from "@scopetickets/icons";
894
985
 
895
- // src/island/island-timer.ts
986
+ // ../checkout-core/src/geometry/island-timer.ts
896
987
  var TIMER_GRID = 20;
897
988
  var TIMER_CENTRE = TIMER_GRID / 2;
898
989
  var RING_OUTER = 10;
@@ -1014,7 +1105,7 @@ function timerPaths(remaining) {
1014
1105
  return paths;
1015
1106
  }
1016
1107
 
1017
- // src/island/island-counter-ring.ts
1108
+ // ../checkout-core/src/geometry/island-counter-ring.ts
1018
1109
  var RING_OUTER2 = 10;
1019
1110
  var RING_STROKE = 2.5;
1020
1111
  var RING_INNER2 = RING_OUTER2 - RING_STROKE;
@@ -1028,7 +1119,7 @@ function counterRingPaths(progress, direction = "cw") {
1028
1119
  }
1029
1120
 
1030
1121
  // src/island/CounterRing.tsx
1031
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1122
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1032
1123
  var LAYER = { position: "absolute", inset: 0 };
1033
1124
  var DEFAULT_FILL = "var(--scopetickets-island-counter-ring-fill)";
1034
1125
  var DEFAULT_TRACK = "var(--scopetickets-island-counter-ring-track)";
@@ -1043,12 +1134,12 @@ function CounterRing({
1043
1134
  track = true
1044
1135
  }) {
1045
1136
  if (complete !== void 0) {
1046
- return /* @__PURE__ */ jsx3(
1137
+ return /* @__PURE__ */ jsx4(
1047
1138
  "span",
1048
1139
  {
1049
1140
  className: "scopetickets-island-counter-ring",
1050
1141
  style: { width: size, height: size, flex: "none" },
1051
- children: /* @__PURE__ */ jsx3(ContentFlag, { tone: complete, title })
1142
+ children: /* @__PURE__ */ jsx4(ContentFlag, { tone: complete, title })
1052
1143
  }
1053
1144
  );
1054
1145
  }
@@ -1058,7 +1149,7 @@ function CounterRing({
1058
1149
  className: "scopetickets-island-counter-ring",
1059
1150
  style: { position: "relative", display: "block", width: size, height: size, flex: "none" },
1060
1151
  children: [
1061
- track ? /* @__PURE__ */ jsx3("span", { style: LAYER, children: /* @__PURE__ */ jsx3(
1152
+ track ? /* @__PURE__ */ jsx4("span", { style: LAYER, children: /* @__PURE__ */ jsx4(
1062
1153
  IconGlyph,
1063
1154
  {
1064
1155
  glyph: "StepCompletionProgressRingTrack",
@@ -1067,7 +1158,7 @@ function CounterRing({
1067
1158
  fill: true
1068
1159
  }
1069
1160
  ) }) : null,
1070
- /* @__PURE__ */ jsx3("span", { style: LAYER, children: /* @__PURE__ */ jsx3(
1161
+ /* @__PURE__ */ jsx4("span", { style: LAYER, children: /* @__PURE__ */ jsx4(
1071
1162
  IconGlyph,
1072
1163
  {
1073
1164
  glyph: "StepCompletionProgressRing",
@@ -1086,13 +1177,13 @@ function CounterRing({
1086
1177
  import { useCallback as useCallback2, useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
1087
1178
 
1088
1179
  // src/island/CalendarMonthHeading.tsx
1089
- import { jsx as jsx4 } from "react/jsx-runtime";
1180
+ import { jsx as jsx5 } from "react/jsx-runtime";
1090
1181
  function CalendarMonthHeading({ month }) {
1091
- return /* @__PURE__ */ jsx4("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
1182
+ return /* @__PURE__ */ jsx5("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
1092
1183
  }
1093
1184
 
1094
1185
  // src/island/CalendarDayIndicator.tsx
1095
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1186
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1096
1187
  var SEGMENTS = 3;
1097
1188
  var FILLED_SEGMENTS = {
1098
1189
  LOW: 1,
@@ -1104,20 +1195,20 @@ function CalendarDayIndicator({ level }) {
1104
1195
  return (
1105
1196
  // DECORATIVE, and now correctly so.
1106
1197
  /* @__PURE__ */ jsxs3("span", { className: "scopetickets-island-day-indicator", "aria-hidden": "true", children: [
1107
- /* @__PURE__ */ jsx5(
1198
+ /* @__PURE__ */ jsx6(
1108
1199
  "span",
1109
1200
  {
1110
1201
  className: `scopetickets-island-day-indicator__fill scopetickets-island-day-indicator__fill--${level.toLowerCase()}`,
1111
1202
  style: { flexGrow: filled }
1112
1203
  }
1113
1204
  ),
1114
- filled < SEGMENTS ? /* @__PURE__ */ jsx5("span", { style: { flexGrow: SEGMENTS - filled } }) : null
1205
+ filled < SEGMENTS ? /* @__PURE__ */ jsx6("span", { style: { flexGrow: SEGMENTS - filled } }) : null
1115
1206
  ] })
1116
1207
  );
1117
1208
  }
1118
1209
 
1119
1210
  // src/island/CalendarDay.tsx
1120
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1211
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1121
1212
  function CalendarDay({
1122
1213
  cell,
1123
1214
  accessory,
@@ -1129,10 +1220,10 @@ function CalendarDay({
1129
1220
  const press = useIslandPress("element");
1130
1221
  const dimmed = outsideMonth ? { "data-outside-month": "" } : null;
1131
1222
  if (cell.kind === "EMPTY") {
1132
- return /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
1223
+ return /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
1133
1224
  }
1134
1225
  if (isSelectableCalendarCell(cell)) {
1135
- return /* @__PURE__ */ jsx6(
1226
+ return /* @__PURE__ */ jsx7(
1136
1227
  CalendarDayButton,
1137
1228
  {
1138
1229
  cell,
@@ -1146,7 +1237,7 @@ function CalendarDay({
1146
1237
  );
1147
1238
  }
1148
1239
  if (cell.kind === "UNAVAILABLE") {
1149
- return /* @__PURE__ */ jsx6(
1240
+ return /* @__PURE__ */ jsx7(
1150
1241
  CalendarDayButton,
1151
1242
  {
1152
1243
  cell,
@@ -1158,7 +1249,7 @@ function CalendarDay({
1158
1249
  }
1159
1250
  );
1160
1251
  }
1161
- return /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
1252
+ return /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
1162
1253
  }
1163
1254
  function CalendarDayButton({
1164
1255
  cell,
@@ -1171,7 +1262,7 @@ function CalendarDayButton({
1171
1262
  }) {
1172
1263
  const selected = cell.kind === "SELECTED";
1173
1264
  const availability = readAvailability(remaining);
1174
- return /* @__PURE__ */ jsx6(
1265
+ return /* @__PURE__ */ jsx7(
1175
1266
  "button",
1176
1267
  {
1177
1268
  type: "button",
@@ -1183,16 +1274,16 @@ function CalendarDayButton({
1183
1274
  onClick: onSelect ? () => onSelect(cell.day) : void 0,
1184
1275
  ...press,
1185
1276
  children: /* @__PURE__ */ jsxs4("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: [
1186
- /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
1187
- cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
1188
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx6("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ jsx6(CalendarDayIndicator, { level: availability.level }) }) : null
1277
+ /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
1278
+ cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
1279
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx7("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ jsx7(CalendarDayIndicator, { level: availability.level }) }) : null
1189
1280
  ] })
1190
1281
  }
1191
1282
  );
1192
1283
  }
1193
1284
 
1194
1285
  // src/island/CalendarRunGrid.tsx
1195
- import { jsx as jsx7 } from "react/jsx-runtime";
1286
+ import { jsx as jsx8 } from "react/jsx-runtime";
1196
1287
  function CalendarRunGrid({
1197
1288
  series,
1198
1289
  weeks,
@@ -1203,10 +1294,10 @@ function CalendarRunGrid({
1203
1294
  selectedDay,
1204
1295
  onSelectDay
1205
1296
  }) {
1206
- return /* @__PURE__ */ jsx7("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
1297
+ return /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
1207
1298
  // A presentational row: the seven columns are a layout, and announcing "row 3
1208
1299
  // of 9" describes the grid rather than the run.
1209
- /* @__PURE__ */ jsx7("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx7(
1300
+ /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx8(
1210
1301
  CalendarDay,
1211
1302
  {
1212
1303
  cell,
@@ -1228,7 +1319,7 @@ import {
1228
1319
  useRef as useRef3,
1229
1320
  useState as useState3
1230
1321
  } from "react";
1231
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1322
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
1232
1323
  var WHEEL_IDLE_MS = 200;
1233
1324
  var CALENDAR_DRAG_SLOP = 4;
1234
1325
  function CalendarScroller({
@@ -1383,8 +1474,8 @@ function CalendarScroller({
1383
1474
  onPointerCancel,
1384
1475
  onClickCapture,
1385
1476
  children: [
1386
- /* @__PURE__ */ jsx8("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
1387
- /* @__PURE__ */ jsx8(
1477
+ /* @__PURE__ */ jsx9("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
1478
+ /* @__PURE__ */ jsx9(
1388
1479
  "div",
1389
1480
  {
1390
1481
  ref: trackRef,
@@ -1402,17 +1493,17 @@ function CalendarScroller({
1402
1493
  }
1403
1494
 
1404
1495
  // src/island/CalendarWeekdayNames.tsx
1405
- import { jsx as jsx9 } from "react/jsx-runtime";
1496
+ import { jsx as jsx10 } from "react/jsx-runtime";
1406
1497
  var WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
1407
1498
  function CalendarWeekdayNames() {
1408
1499
  return (
1409
1500
  // `aria-hidden`, and it is not a shortcut.
1410
- /* @__PURE__ */ jsx9("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ jsx9("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
1501
+ /* @__PURE__ */ jsx10("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ jsx10("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
1411
1502
  );
1412
1503
  }
1413
1504
 
1414
1505
  // src/island/DayPicker.tsx
1415
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1506
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1416
1507
  function DayPicker({
1417
1508
  series,
1418
1509
  today,
@@ -1446,17 +1537,17 @@ function DayPicker({
1446
1537
  );
1447
1538
  if (weeks.length === 0) return null;
1448
1539
  return /* @__PURE__ */ jsxs6("div", { className: "scopetickets-island-calendar", "data-accessory": accessory, children: [
1449
- currentMonth !== null && /* @__PURE__ */ jsx10(CalendarMonthHeading, { month: currentMonth }),
1450
- /* @__PURE__ */ jsx10(CalendarWeekdayNames, {}),
1451
- /* @__PURE__ */ jsx10(
1540
+ currentMonth !== null && /* @__PURE__ */ jsx11(CalendarMonthHeading, { month: currentMonth }),
1541
+ /* @__PURE__ */ jsx11(CalendarWeekdayNames, {}),
1542
+ /* @__PURE__ */ jsx11(
1452
1543
  CalendarScroller,
1453
1544
  {
1454
1545
  rowCount: weeks.length,
1455
1546
  row,
1456
1547
  onRowChange: setRow,
1457
1548
  onRowPreview: setShownRow,
1458
- label: "Weeks of the run",
1459
- children: /* @__PURE__ */ jsx10(
1549
+ label: ISLAND_COPY.runWeeks,
1550
+ children: /* @__PURE__ */ jsx11(
1460
1551
  CalendarRunGrid,
1461
1552
  {
1462
1553
  series,
@@ -1478,55 +1569,67 @@ function DayPicker({
1478
1569
  import { useMemo as useMemo3 } from "react";
1479
1570
 
1480
1571
  // src/island/Timeslot.tsx
1481
- import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1572
+ import { Fragment, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1482
1573
  var REMAINING_SIZE = "var(--scopetickets-island-space-4)";
1483
1574
  var SELECTED_ARC = "var(--scopetickets-island-timeslot-ring-selected)";
1484
1575
  var TRACK = "var(--scopetickets-island-timeslot-track)";
1485
1576
  var SELECTED_TRACK = "var(--scopetickets-island-timeslot-track-selected)";
1486
1577
  var SOLD_OUT = "Sold Out";
1578
+ var FROM = "From";
1487
1579
  function Timeslot({ cell, accessory, onSelect }) {
1488
1580
  if (isDatePickerCellSelectable(cell.state)) {
1489
- return /* @__PURE__ */ jsx11(TimeslotButton, { cell, accessory, onSelect });
1581
+ return /* @__PURE__ */ jsx12(TimeslotButton, { cell, accessory, onSelect });
1490
1582
  }
1491
- return /* @__PURE__ */ jsx11(TimeslotFixed, { cell });
1583
+ return /* @__PURE__ */ jsx12(TimeslotFixed, { cell });
1492
1584
  }
1493
1585
  function TimeslotRow({ cell }) {
1586
+ const price = slotPrice(cell);
1494
1587
  return /* @__PURE__ */ jsxs7("span", { className: "scopetickets-island-timeslot__times", children: [
1495
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
1588
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
1496
1589
  cell.slot.endTime === null ? null : /* @__PURE__ */ jsxs7(Fragment, { children: [
1497
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
1498
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
1590
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
1591
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
1499
1592
  ] }),
1500
- cell.state === "UNAVAILABLE" ? (
1501
- /*
1502
- * THE WORDS INSTEAD OF THE MARK, AND ONLY WHERE THE MARK WOULD SAY NOTHING.
1503
- *
1504
- * `UNAVAILABLE` is the one state the ring cannot draw: `timeslotState` reaches it
1505
- * only for `remaining <= 0`, which is an arc of zero length. A slot that has
1506
- * merely BEGUN keeps its ring — it still has seats, and "Sold Out" over them
1507
- * would be false.
1508
- */
1509
- /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
1510
- ) : cell.slot.remaining === null ? null : /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ jsx11(
1511
- CounterRing,
1512
- {
1513
- progress: cell.slot.remaining,
1514
- color: cell.state === "SELECTED" ? SELECTED_ARC : availabilityColor(cell.slot.remaining),
1515
- trackColor: cell.state === "SELECTED" ? SELECTED_TRACK : TRACK,
1516
- size: REMAINING_SIZE
1517
- }
1518
- ) })
1593
+ /* @__PURE__ */ jsxs7("span", { className: "scopetickets-island-timeslot__trailing", children: [
1594
+ price === null ? null : /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__price", children: price }),
1595
+ cell.state === "UNAVAILABLE" ? (
1596
+ /*
1597
+ * THE WORDS INSTEAD OF THE MARK, AND ONLY WHERE THE MARK WOULD SAY NOTHING.
1598
+ *
1599
+ * `UNAVAILABLE` is the one state the ring cannot draw: `timeslotState` reaches it
1600
+ * only for `remaining <= 0`, which is an arc of zero length. A slot that has
1601
+ * merely BEGUN keeps its ring — it still has seats, and "Sold Out" over them
1602
+ * would be false.
1603
+ */
1604
+ /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
1605
+ ) : cell.slot.remaining === null ? null : /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ jsx12(
1606
+ CounterRing,
1607
+ {
1608
+ progress: cell.slot.remaining,
1609
+ color: cell.state === "SELECTED" ? SELECTED_ARC : availabilityColor(cell.slot.remaining),
1610
+ trackColor: cell.state === "SELECTED" ? SELECTED_TRACK : TRACK,
1611
+ size: REMAINING_SIZE
1612
+ }
1613
+ ) })
1614
+ ] })
1519
1615
  ] });
1520
1616
  }
1617
+ function slotPrice(cell, spoken = false) {
1618
+ if (!isDatePickerCellSelectable(cell.state)) return null;
1619
+ const price = cell.slot.fromPrice;
1620
+ if (price === void 0 || price === null) return null;
1621
+ const money = formatMoney(price.minorUnits, price.currency);
1622
+ return spoken ? `${FROM} ${money}` : money;
1623
+ }
1521
1624
  function timeslotLabel(cell, announcement) {
1522
1625
  const range = cell.slot.endTime === null ? cell.slot.startTime : `${cell.slot.startTime} - ${cell.slot.endTime}`;
1523
- return [range, cell.duration, announcement].filter((part) => part !== null).join(", ");
1626
+ return [range, cell.duration, slotPrice(cell, true), announcement].filter((part) => part !== null).join(", ");
1524
1627
  }
1525
1628
  function TimeslotButton({ cell, accessory, onSelect }) {
1526
1629
  const press = useIslandPress("element");
1527
1630
  const selected = cell.state === "SELECTED";
1528
1631
  const availability = readAvailability(cell.slot.remaining);
1529
- return /* @__PURE__ */ jsx11(
1632
+ return /* @__PURE__ */ jsx12(
1530
1633
  "button",
1531
1634
  {
1532
1635
  type: "button",
@@ -1536,22 +1639,22 @@ function TimeslotButton({ cell, accessory, onSelect }) {
1536
1639
  onClick: () => onSelect(cell.slot.startTime),
1537
1640
  ...press,
1538
1641
  children: /* @__PURE__ */ jsxs7("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: [
1539
- /* @__PURE__ */ jsx11(TimeslotRow, { cell }),
1540
- accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ jsx11(CalendarDayIndicator, { level: availability.level }) }) : null
1642
+ /* @__PURE__ */ jsx12(TimeslotRow, { cell }),
1643
+ accessory === "LINE" && availability !== null ? /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ jsx12(CalendarDayIndicator, { level: availability.level }) }) : null
1541
1644
  ] })
1542
1645
  }
1543
1646
  );
1544
1647
  }
1545
1648
  function TimeslotFixed({ cell }) {
1546
- return /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ jsx11("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ jsx11(TimeslotRow, { cell }) }) });
1649
+ return /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ jsx12("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ jsx12(TimeslotRow, { cell }) }) });
1547
1650
  }
1548
1651
 
1549
1652
  // src/island/TimeslotGroupSection.tsx
1550
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1653
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1551
1654
  function TimeslotGroupSection({ group, accessory, onSelect }) {
1552
1655
  return /* @__PURE__ */ jsxs8("section", { className: "scopetickets-island-timeslots__group", children: [
1553
- group.label === null ? null : /* @__PURE__ */ jsx12("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
1554
- /* @__PURE__ */ jsx12("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ jsx12(
1656
+ group.label === null ? null : /* @__PURE__ */ jsx13("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
1657
+ /* @__PURE__ */ jsx13("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ jsx13(
1555
1658
  Timeslot,
1556
1659
  {
1557
1660
  cell,
@@ -1564,7 +1667,7 @@ function TimeslotGroupSection({ group, accessory, onSelect }) {
1564
1667
  }
1565
1668
 
1566
1669
  // src/island/TimeslotPicker.tsx
1567
- import { jsx as jsx13 } from "react/jsx-runtime";
1670
+ import { jsx as jsx14 } from "react/jsx-runtime";
1568
1671
  function TimeslotPicker({
1569
1672
  slots,
1570
1673
  selection,
@@ -1578,7 +1681,7 @@ function TimeslotPicker({
1578
1681
  () => buildTimeslotGroups(slots, { selection, today, nowTime, grouping }),
1579
1682
  [slots, selection, today, nowTime, grouping]
1580
1683
  );
1581
- return /* @__PURE__ */ jsx13("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ jsx13(
1684
+ return /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ jsx14(
1582
1685
  TimeslotGroupSection,
1583
1686
  {
1584
1687
  group,
@@ -1594,7 +1697,7 @@ import { useEffect as useEffect6, useReducer } from "react";
1594
1697
 
1595
1698
  // src/island/CalendarWeekSection.tsx
1596
1699
  import { useCallback as useCallback3, useEffect as useEffect5, useLayoutEffect, useRef as useRef4, useState as useState5 } from "react";
1597
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1700
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1598
1701
  function CalendarWeekSection({
1599
1702
  series,
1600
1703
  today,
@@ -1650,15 +1753,15 @@ function CalendarWeekSection({
1650
1753
  }, [weeks.length, visibleWeek, selectedWeek, selectedDay, onVisibleMonthChange]);
1651
1754
  if (weeks.length === 0) return null;
1652
1755
  return /* @__PURE__ */ jsxs9("div", { className: "scopetickets-island-week", children: [
1653
- /* @__PURE__ */ jsx14(CalendarWeekdayNames, {}),
1654
- /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ jsx14(
1756
+ /* @__PURE__ */ jsx15(CalendarWeekdayNames, {}),
1757
+ /* @__PURE__ */ jsx15("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ jsx15(
1655
1758
  "div",
1656
1759
  {
1657
1760
  className: "scopetickets-island-week__page",
1658
1761
  ref: (node) => {
1659
1762
  pageRefs.current[index] = node;
1660
1763
  },
1661
- children: /* @__PURE__ */ jsx14("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx14(
1764
+ children: /* @__PURE__ */ jsx15("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ jsx15(
1662
1765
  CalendarDay,
1663
1766
  {
1664
1767
  cell,
@@ -1676,18 +1779,18 @@ function CalendarWeekSection({
1676
1779
  }
1677
1780
 
1678
1781
  // src/island/SelectedDayHeading.tsx
1679
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1782
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1680
1783
  function SelectedDayHeading({ day }) {
1681
1784
  return /* @__PURE__ */ jsxs10("h3", { className: "scopetickets-island-day-heading", children: [
1682
1785
  /* @__PURE__ */ jsxs10("span", { className: "scopetickets-island-day-heading__weekday", children: [
1683
1786
  formatDayWeekday(day),
1684
1787
  ","
1685
1788
  ] }),
1686
- /* @__PURE__ */ jsx15("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
1789
+ /* @__PURE__ */ jsx16("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
1687
1790
  ] });
1688
1791
  }
1689
1792
 
1690
- // src/island/island-step-order.ts
1793
+ // ../checkout-core/src/motion/island-step-order.ts
1691
1794
  function dayDirection(from, to) {
1692
1795
  if (from === to) return "NONE";
1693
1796
  return to > from ? "FORWARD" : "BACKWARD";
@@ -1698,9 +1801,7 @@ function stepDirectionSign(direction) {
1698
1801
  return 0;
1699
1802
  }
1700
1803
 
1701
- // src/island/island-day-swap.ts
1702
- var DAY_SWAP_OUT_ANIMATION = "scopetickets-island-day-swap-out";
1703
- var DAY_SWAP_IN_ANIMATION = "scopetickets-island-day-swap-in";
1804
+ // ../checkout-core/src/motion/island-day-swap.ts
1704
1805
  function daySwapAtRest(content) {
1705
1806
  return { phase: "REST", shown: content };
1706
1807
  }
@@ -1730,8 +1831,12 @@ function reduceDaySwap(state, event) {
1730
1831
  }
1731
1832
  }
1732
1833
 
1834
+ // src/island/island-day-swap-css.ts
1835
+ var DAY_SWAP_OUT_ANIMATION = "scopetickets-island-day-swap-out";
1836
+ var DAY_SWAP_IN_ANIMATION = "scopetickets-island-day-swap-in";
1837
+
1733
1838
  // src/island/TimePicker.tsx
1734
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1839
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1735
1840
  function TimePicker({
1736
1841
  series,
1737
1842
  today,
@@ -1757,7 +1862,7 @@ function TimePicker({
1757
1862
  };
1758
1863
  const shownSelection = swap.shown.day === selection.day ? selection : { day: swap.shown.day, startTime: null };
1759
1864
  return /* @__PURE__ */ jsxs11("div", { className: "scopetickets-island-time", "data-accessory": accessory, children: [
1760
- /* @__PURE__ */ jsx16(
1865
+ /* @__PURE__ */ jsx17(
1761
1866
  CalendarWeekSection,
1762
1867
  {
1763
1868
  series,
@@ -1777,8 +1882,8 @@ function TimePicker({
1777
1882
  style: swap.phase === "REST" ? void 0 : { "--scopetickets-island-swap-sign": swap.sign },
1778
1883
  onAnimationEnd: onSwapAnimationEnd,
1779
1884
  children: [
1780
- /* @__PURE__ */ jsx16(SelectedDayHeading, { day: swap.shown.day }),
1781
- /* @__PURE__ */ jsx16(
1885
+ /* @__PURE__ */ jsx17(SelectedDayHeading, { day: swap.shown.day }),
1886
+ /* @__PURE__ */ jsx17(
1782
1887
  TimeslotPicker,
1783
1888
  {
1784
1889
  slots: swap.shown.slots,
@@ -1797,7 +1902,7 @@ function TimePicker({
1797
1902
 
1798
1903
  // src/island/CalendarGrainButton.tsx
1799
1904
  import { useCallback as useCallback4, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState6 } from "react";
1800
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1905
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1801
1906
  function useShortenedMonth(long) {
1802
1907
  const [short, setShort] = useState6(false);
1803
1908
  const title = useRef5(null);
@@ -1848,7 +1953,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
1848
1953
  ...grain === "MONTH" && short ? { "data-grain-short": "" } : null,
1849
1954
  children: [
1850
1955
  shown,
1851
- grain === "MONTH" ? /* @__PURE__ */ jsx17(
1956
+ grain === "MONTH" ? /* @__PURE__ */ jsx18(
1852
1957
  "span",
1853
1958
  {
1854
1959
  className: "scopetickets-island-header-button__probe",
@@ -1861,9 +1966,9 @@ function CalendarGrainButton({ month, grain, onPress }) {
1861
1966
  }
1862
1967
  );
1863
1968
  if (onPress === void 0) {
1864
- return /* @__PURE__ */ jsx17("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
1969
+ return /* @__PURE__ */ jsx18("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
1865
1970
  }
1866
- return /* @__PURE__ */ jsx17(
1971
+ return /* @__PURE__ */ jsx18(
1867
1972
  "button",
1868
1973
  {
1869
1974
  type: "button",
@@ -1875,40 +1980,19 @@ function CalendarGrainButton({ month, grain, onPress }) {
1875
1980
  );
1876
1981
  }
1877
1982
 
1878
- // src/island/Switch.tsx
1879
- import { jsx as jsx18 } from "react/jsx-runtime";
1880
- function Switch({ checked, onChange, label, size = "wide", disabled = false }) {
1881
- const press = useIslandPress("element");
1882
- return /* @__PURE__ */ jsx18(
1883
- "button",
1884
- {
1885
- type: "button",
1886
- role: "switch",
1887
- "aria-checked": checked,
1888
- "aria-label": label,
1889
- disabled,
1890
- className: `scopetickets-island-switch scopetickets-island-switch--${size}`,
1891
- onClick: () => onChange(!checked),
1892
- ...disabled ? {} : press,
1893
- children: /* @__PURE__ */ jsx18("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
1894
- }
1895
- );
1896
- }
1897
-
1898
1983
  export {
1899
1984
  SURFACE_MORPH_MS,
1900
1985
  SURFACE_SPRING,
1901
1986
  CARRY_SPRING,
1902
1987
  POP_RETURN_SPRING,
1903
- springEasing,
1988
+ settleMs,
1989
+ springAt,
1904
1990
  OUTGOING_FADE_MS,
1905
1991
  SURFACE_MORPH_DELAY_MS,
1906
1992
  INCOMING_FADE_DELAY_MS,
1907
1993
  INCOMING_FADE_MS,
1908
1994
  CARRY_MOVE_DELAY_MS,
1909
1995
  CARRY_MOVE_MS,
1910
- ARC_LEAD_EASING,
1911
- ARC_TRAIL_EASING,
1912
1996
  POP_SCALE,
1913
1997
  SHIELD_POP_SCALE,
1914
1998
  POP_RETURN_MS,
@@ -1922,6 +2006,31 @@ export {
1922
2006
  HOLD_TICK_MS,
1923
2007
  PressContext,
1924
2008
  useIslandPress,
2009
+ FIELD_COPY,
2010
+ ACTION_COPY,
2011
+ ISLAND_COPY,
2012
+ formatMoney,
2013
+ moneyParts,
2014
+ widestAmount,
2015
+ quoteLines,
2016
+ SOLO_KEY,
2017
+ groupUserTypes,
2018
+ partyTypes,
2019
+ assignmentFor,
2020
+ userTypeNames,
2021
+ slotFullness,
2022
+ parseWallClockTime,
2023
+ timeOfDayInZone,
2024
+ dayInZone,
2025
+ partOfDayLabel,
2026
+ partOfDay,
2027
+ formatSlotRange,
2028
+ formatSlotDuration,
2029
+ withSelectedDay,
2030
+ withSelectedTime,
2031
+ sameTimeslots,
2032
+ buildTimeslotGroups,
2033
+ timeslotRequest,
1925
2034
  toAvailabilityLevel,
1926
2035
  readAvailability,
1927
2036
  availabilityColor,
@@ -1956,34 +2065,17 @@ export {
1956
2065
  monthAtRow,
1957
2066
  monthOpeningRow,
1958
2067
  toggleSelectedDay,
1959
- slotFullness,
1960
- parseWallClockTime,
1961
- timeOfDayInZone,
1962
- partOfDayLabel,
1963
- partOfDay,
1964
- formatSlotRange,
1965
- formatSlotDuration,
1966
- withSelectedDay,
1967
- withSelectedTime,
1968
- sameTimeslots,
1969
- buildTimeslotGroups,
1970
- timeslotRequest,
1971
- groupUserTypes,
1972
- partyTypes,
1973
- assignmentFor,
1974
- userTypeNames,
1975
- PartyStepper,
1976
- SOLO_KEY,
1977
- flagTone,
1978
- ContentFlag,
1979
2068
  clampRemaining,
1980
2069
  trackPaths,
1981
2070
  timerPaths,
2071
+ PartyStepper,
2072
+ flagTone,
2073
+ ContentFlag,
2074
+ Switch,
1982
2075
  CounterRing,
1983
2076
  DayPicker,
1984
2077
  TimeslotPicker,
1985
2078
  TimePicker,
1986
- CalendarGrainButton,
1987
- Switch
2079
+ CalendarGrainButton
1988
2080
  };
1989
- //# sourceMappingURL=chunk-4BOPQURW.js.map
2081
+ //# sourceMappingURL=chunk-B7AHG2OO.js.map