@msm-platform/customer-react 0.4.1 → 0.4.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to `@msm-platform/customer-react`. The format follows [Keep
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.2] - 2026-11-20
8
+
9
+ ### Added
10
+
11
+ - An event type's first three tags show as small chips on its card in `MsmBooking`'s first step, in the tag's colour from the shared palette, readable in light and dark; a service with no tags shows none. It needs the engine release with partner tags and `@msm-platform/customer-sdk` with `tags` on event types.
12
+ - A customer the business has banned after repeated no-shows is told so when holding or confirming a time is refused: "You can't book online until {date} because of bookings you didn't show up to", with the day the ban ends in the business's timezone, instead of a generic failure. Other refusals read as before. It needs the engine release with no-show bans and `@msm-platform/customer-sdk` with `BookingBanned`.
13
+
14
+ ### Changed
15
+
16
+ - An event's card and the booking summary show its resources as the business presents them, in the event's order: each label the business sets before the name, such as "Room: Hall A", or the name alone without one, with neighbours that share a label listed once ("Room: Hall A, Hall B"). A time slot's "With …" uses the name the business presents. They no longer show "Instructor:", "Room:" and "Guest instructors:" on their own. It needs the engine release with resource presentation; with an earlier engine, the names show without labels.
17
+
7
18
  ## [0.4.1] - 2026-11-20
8
19
 
9
20
  ### Added
package/dist/i18n.d.ts CHANGED
@@ -93,9 +93,6 @@ declare const en: {
93
93
  readonly "business.full": "Full";
94
94
  readonly "business.openTime": "Open time";
95
95
  readonly "business.with": "With {resource}";
96
- readonly "business.instructor": "Instructor: {names}";
97
- readonly "business.room": "Room: {names}";
98
- readonly "business.guests": "Guest instructors: {names}";
99
96
  readonly "business.book": "Book";
100
97
  readonly "book.heading": "Your booking";
101
98
  readonly "book.signInFirst": "Sign in with your phone to book this time.";
@@ -123,6 +120,8 @@ declare const en: {
123
120
  readonly "book.expired": "We held this time for as long as we could, and it has lapsed. Hold it again if it's still free.";
124
121
  readonly "book.notAllowed": "Booking this needs a membership or pass that covers it. Ask the business.";
125
122
  readonly "book.unavailable": "This time can no longer be booked. Choose another.";
123
+ readonly "book.banned": "You can't book online until {date} because of bookings you didn't show up to. Contact the business if you think this is a mistake.";
124
+ readonly "book.banned.undated": "You can't book online right now because of bookings you didn't show up to. Contact the business if you think this is a mistake.";
126
125
  readonly "book.refused": "This business can't take your booking. Contact them.";
127
126
  readonly "book.failed": "The booking could not be made. Try again.";
128
127
  readonly "passes.heading": "Memberships and passes";
package/dist/index.js CHANGED
@@ -107,9 +107,6 @@ var S = {
107
107
  "business.full": "Full",
108
108
  "business.openTime": "Open time",
109
109
  "business.with": "With {resource}",
110
- "business.instructor": "Instructor: {names}",
111
- "business.room": "Room: {names}",
112
- "business.guests": "Guest instructors: {names}",
113
110
  "business.book": "Book",
114
111
  "book.heading": "Your booking",
115
112
  "book.signInFirst": "Sign in with your phone to book this time.",
@@ -137,6 +134,8 @@ var S = {
137
134
  "book.expired": "We held this time for as long as we could, and it has lapsed. Hold it again if it's still free.",
138
135
  "book.notAllowed": "Booking this needs a membership or pass that covers it. Ask the business.",
139
136
  "book.unavailable": "This time can no longer be booked. Choose another.",
137
+ "book.banned": "You can't book online until {date} because of bookings you didn't show up to. Contact the business if you think this is a mistake.",
138
+ "book.banned.undated": "You can't book online right now because of bookings you didn't show up to. Contact the business if you think this is a mistake.",
140
139
  "book.refused": "This business can't take your booking. Contact them.",
141
140
  "book.failed": "The booking could not be made. Try again.",
142
141
  "passes.heading": "Memberships and passes",
@@ -670,16 +669,23 @@ function z(e) {
670
669
  function B({ candidate: e }) {
671
670
  if (e.kind === "slot") return e.resource ? /* @__PURE__ */ f("p", {
672
671
  className: "cp-hint",
673
- children: T("business.with", { resource: e.resource.displayName })
672
+ children: T("business.with", { resource: e.resources?.[0]?.presentedAs?.name ?? e.resource.displayName })
674
673
  }) : null;
675
- let t = (e) => e.map((e) => e.displayName).join(", "), n = e.resources ?? [], [r, ...i] = n.filter((e) => e.person), a = n.filter((e) => !e.person), o = [
676
- r && T("business.instructor", { names: r.displayName }),
677
- a.length > 0 && T("business.room", { names: t(a) }),
678
- i.length > 0 && T("business.guests", { names: t(i) })
679
- ].filter((e) => typeof e == "string");
680
- return o.length > 0 ? /* @__PURE__ */ f("p", {
674
+ let t = [];
675
+ for (let n of e.resources ?? []) {
676
+ let { label: e, name: r } = n.presentedAs ?? {
677
+ label: null,
678
+ name: n.displayName
679
+ }, i = t.at(-1);
680
+ i && e !== null && i.label === e ? i.names.push(r) : t.push({
681
+ label: e,
682
+ names: [r]
683
+ });
684
+ }
685
+ let n = t.map(({ label: e, names: t }) => e === null ? t.join(", ") : `${e}: ${t.join(", ")}`);
686
+ return n.length > 0 ? /* @__PURE__ */ f("p", {
681
687
  className: "cp-hint cp-resources",
682
- children: o.join(" · ")
688
+ children: n.join(" · ")
683
689
  }) : null;
684
690
  }
685
691
  function pe(e) {
@@ -716,8 +722,8 @@ function pe(e) {
716
722
  });
717
723
  }
718
724
  // src/booking.tsx
719
- var V = "/web/businesses/{businessId}/reservations", H = "/web/businesses/{businessId}/reservations/{reservationId}/confirm";
720
- function U({ choice: e }) {
725
+ var V = "/web/businesses/{businessId}/reservations", me = "/web/businesses/{businessId}/reservations/{reservationId}/confirm";
726
+ function H({ choice: e }) {
721
727
  let { business: t, candidate: n } = e;
722
728
  return /* @__PURE__ */ p("div", {
723
729
  className: "cp-summary",
@@ -729,7 +735,7 @@ function U({ choice: e }) {
729
735
  ]
730
736
  });
731
737
  }
732
- function me(e) {
738
+ function he(e) {
733
739
  let { client: n, navigate: i, accountNavigation: a } = x(), { business: c, candidate: l } = e.choice, [m, h] = s({ step: "reserving" }), [g, _] = s(), v = t(async () => {
734
740
  h({ step: "reserving" });
735
741
  try {
@@ -747,10 +753,10 @@ function me(e) {
747
753
  expiresAt: e.expiresAt
748
754
  });
749
755
  } catch (e) {
750
- let t = u(e, "post", V) ? e.code : void 0;
756
+ let t = u(e, "post", V) ? e : void 0;
751
757
  h({
752
758
  step: "refused",
753
- message: he(t),
759
+ ...ge(t, _e, l.timezone),
754
760
  again: !1
755
761
  });
756
762
  }
@@ -769,7 +775,7 @@ function me(e) {
769
775
  expiresAt: r
770
776
  });
771
777
  try {
772
- let { data: r } = await n.POST(H, { params: { path: {
778
+ let { data: r } = await n.POST(me, { params: { path: {
773
779
  businessId: c.id,
774
780
  reservationId: t
775
781
  } } });
@@ -784,14 +790,14 @@ function me(e) {
784
790
  booking: i
785
791
  });
786
792
  } catch (e) {
787
- let t = u(e, "post", H) ? e.code : void 0;
788
- h(t === "ReservationExpired" || t === "ReservationNotFound" ? {
793
+ let t = u(e, "post", me) ? e : void 0;
794
+ t?.code === "ReservationExpired" || t?.code === "ReservationNotFound" ? h({
789
795
  step: "refused",
790
796
  message: "book.expired",
791
797
  again: !0
792
- } : {
798
+ }) : h({
793
799
  step: "refused",
794
- message: ge(t),
800
+ ...ge(t, ve, l.timezone),
795
801
  again: !1
796
802
  });
797
803
  }
@@ -821,7 +827,7 @@ function me(e) {
821
827
  }), _(t ? "bookings.doneLate" : "bookings.doneOnTime");
822
828
  }
823
829
  })
824
- }) : /* @__PURE__ */ f(U, { choice: e.choice }),
830
+ }) : /* @__PURE__ */ f(H, { choice: e.choice }),
825
831
  a ? /* @__PURE__ */ f("button", {
826
832
  type: "button",
827
833
  className: "cp-secondary",
@@ -834,7 +840,7 @@ function me(e) {
834
840
  children: T("book.done")
835
841
  })
836
842
  ] }) : /* @__PURE__ */ p(d, { children: [
837
- /* @__PURE__ */ f(U, { choice: e.choice }),
843
+ /* @__PURE__ */ f(H, { choice: e.choice }),
838
844
  m.step === "reserving" && /* @__PURE__ */ f("p", {
839
845
  role: "status",
840
846
  children: T("book.reserving")
@@ -853,7 +859,7 @@ function me(e) {
853
859
  })] }),
854
860
  m.step === "refused" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("p", {
855
861
  role: "alert",
856
- children: T(m.message)
862
+ children: T(m.message, m.date ? { date: m.date } : {})
857
863
  }), /* @__PURE__ */ p("div", {
858
864
  className: "cp-actions",
859
865
  children: [m.again && /* @__PURE__ */ f("button", {
@@ -865,7 +871,15 @@ function me(e) {
865
871
  ] })]
866
872
  });
867
873
  }
868
- function he(e) {
874
+ function ge(e, t, n) {
875
+ if (e?.code !== "BookingBanned") return { message: t(e?.code) };
876
+ let { bannedUntil: r } = e.body ?? {};
877
+ return r ? {
878
+ message: "book.banned",
879
+ date: j(r, n)
880
+ } : { message: "book.banned.undated" };
881
+ }
882
+ function _e(e) {
869
883
  switch (e) {
870
884
  case "EventFull": return "book.full";
871
885
  case "SlotTaken": return "book.slotTaken";
@@ -880,7 +894,7 @@ function he(e) {
880
894
  default: return "book.failed";
881
895
  }
882
896
  }
883
- function ge(e) {
897
+ function ve(e) {
884
898
  switch (e) {
885
899
  case "NotAuthorized": return "book.notAllowed";
886
900
  case "EventStarted":
@@ -891,7 +905,7 @@ function ge(e) {
891
905
  }
892
906
  }
893
907
  // src/layout.tsx
894
- function _e({ brand: e }) {
908
+ function ye({ brand: e }) {
895
909
  return e ? /* @__PURE__ */ p("div", {
896
910
  className: "cp-brand",
897
911
  children: [e.logo && /* @__PURE__ */ f("img", {
@@ -900,19 +914,19 @@ function _e({ brand: e }) {
900
914
  }), /* @__PURE__ */ f("span", { children: e.name })]
901
915
  }) : null;
902
916
  }
903
- var ve = [["businesses", "nav.book"]], ye = [
917
+ var be = [["businesses", "nav.book"]], xe = [
904
918
  ["bookings", "nav.bookings"],
905
919
  ["passes", "nav.passes"],
906
920
  ["details", "nav.details"]
907
- ], be = [...ve, ...ye];
908
- function xe(e) {
921
+ ], Se = [...be, ...xe];
922
+ function Ce(e) {
909
923
  let t = typeof e.screen == "string" ? e.screen : "businesses";
910
924
  return /* @__PURE__ */ p("div", {
911
925
  className: "cp-shell",
912
926
  children: [
913
927
  /* @__PURE__ */ p("header", {
914
928
  className: "cp-header",
915
- children: [/* @__PURE__ */ f(_e, { brand: e.brand }), e.signedIn ? /* @__PURE__ */ f("button", {
929
+ children: [/* @__PURE__ */ f(ye, { brand: e.brand }), e.signedIn ? /* @__PURE__ */ f("button", {
916
930
  type: "button",
917
931
  className: "cp-link",
918
932
  onClick: e.onSignOut,
@@ -942,18 +956,18 @@ function xe(e) {
942
956
  });
943
957
  }
944
958
  // src/client.ts
945
- var Se = (e, t) => {
959
+ var we = (e, t) => {
946
960
  let n = new Request(e, t);
947
961
  return n.headers.set("X-MSM-BFF", "1"), fetch(n);
948
962
  };
949
- function W(e, t, n) {
950
- return Se(`${e}${t}`, {
963
+ function U(e, t, n) {
964
+ return we(`${e}${t}`, {
951
965
  method: "POST",
952
966
  headers: { "content-type": "application/json" },
953
967
  body: JSON.stringify(n ?? {})
954
968
  });
955
969
  }
956
- function Ce(e, t) {
970
+ function Te(e, t) {
957
971
  let n = l({ baseUrl: `${e}/engine` });
958
972
  return n.use({
959
973
  onRequest({ request: e }) {
@@ -965,38 +979,38 @@ function Ce(e, t) {
965
979
  }), n;
966
980
  }
967
981
  // src/session.ts
968
- var we = /* @__PURE__ */ new Map();
969
- function G(e) {
970
- let t = we.get(e);
982
+ var Ee = /* @__PURE__ */ new Map();
983
+ function W(e) {
984
+ let t = Ee.get(e);
971
985
  return t || (t = {
972
986
  value: void 0,
973
987
  listeners: /* @__PURE__ */ new Set(),
974
988
  generation: 0
975
- }, we.set(e, t)), t;
989
+ }, Ee.set(e, t)), t;
976
990
  }
977
- function K(e, t) {
978
- let n = G(e);
991
+ function G(e, t) {
992
+ let n = W(e);
979
993
  if (n.value !== t) {
980
994
  n.value = t;
981
995
  for (let e of n.listeners) e();
982
996
  }
983
997
  }
984
- function Te(e, t) {
998
+ function De(e, t) {
985
999
  let { generation: n } = t, r = (r) => {
986
- t.generation === n && t.value === void 0 && K(e, r);
1000
+ t.generation === n && t.value === void 0 && G(e, r);
987
1001
  };
988
- Se(`${e}/auth/session`).then(async (e) => r(e.ok ? (await e.json()).sessionKey : null)).catch(() => r(null));
1002
+ we(`${e}/auth/session`).then(async (e) => r(e.ok ? (await e.json()).sessionKey : null)).catch(() => r(null));
989
1003
  }
990
- function Ee(e, t) {
991
- let n = G(e);
992
- return n.listeners.size === 0 && n.value === void 0 && Te(e, n), n.listeners.add(t), () => {
1004
+ function Oe(e, t) {
1005
+ let n = W(e);
1006
+ return n.listeners.size === 0 && n.value === void 0 && De(e, n), n.listeners.add(t), () => {
993
1007
  n.listeners.delete(t), n.listeners.size === 0 && queueMicrotask(() => {
994
1008
  n.listeners.size > 0 || (n.value = void 0, n.generation++);
995
1009
  });
996
1010
  };
997
1011
  }
998
- function De(e, t) {
999
- let n = c((t) => Ee(e, t), () => G(e).value, () => void 0), i = o(void 0), a = o(t);
1012
+ function ke(e, t) {
1013
+ let n = c((t) => Oe(e, t), () => W(e).value, () => void 0), i = o(void 0), a = o(t);
1000
1014
  return a.current = t, r(() => {
1001
1015
  if (n === void 0) return;
1002
1016
  let e = n !== null;
@@ -1004,11 +1018,11 @@ function De(e, t) {
1004
1018
  }, [n]), n;
1005
1019
  }
1006
1020
  // src/portal.tsx
1007
- function q(e) {
1008
- let { navigate: n, accountNavigation: i } = e, c = e.basePath.replace(/\/$/, ""), l = De(c, e.onSessionChange), u = o(!1);
1021
+ function K(e) {
1022
+ let { navigate: n, accountNavigation: i } = e, c = e.basePath.replace(/\/$/, ""), l = ke(c, e.onSessionChange), u = o(!1);
1009
1023
  u.current = !!l;
1010
- let [d, f] = s(), [p, m] = s(/* @__PURE__ */ new Map()), [h, g] = s("loading"), _ = a(() => Ce(c, () => {
1011
- u.current && f("app.signedOut"), K(c, null);
1024
+ let [d, f] = s(), [p, m] = s(/* @__PURE__ */ new Map()), [h, g] = s("loading"), _ = a(() => Te(c, () => {
1025
+ u.current && f("app.signedOut"), G(c, null);
1012
1026
  }), [c]), v = t(async () => {
1013
1027
  g("loading");
1014
1028
  try {
@@ -1040,7 +1054,7 @@ function q(e) {
1040
1054
  navigate: n,
1041
1055
  accountNavigation: i,
1042
1056
  signOut: async (e) => {
1043
- await W(c, "/auth/logout").catch(() => {}), f(e), K(c, null);
1057
+ await U(c, "/auth/logout").catch(() => {}), f(e), G(c, null);
1044
1058
  }
1045
1059
  }), [
1046
1060
  _,
@@ -1052,11 +1066,11 @@ function q(e) {
1052
1066
  c
1053
1067
  ]),
1054
1068
  signedInAs: t((e) => {
1055
- f(void 0), K(c, e);
1069
+ f(void 0), G(c, e);
1056
1070
  }, [c])
1057
1071
  };
1058
1072
  }
1059
- function J(e) {
1073
+ function q(e) {
1060
1074
  return /* @__PURE__ */ f("div", {
1061
1075
  className: "msm-customer",
1062
1076
  children: e.loading ? /* @__PURE__ */ f("p", {
@@ -1070,7 +1084,7 @@ function J(e) {
1070
1084
  });
1071
1085
  }
1072
1086
  // src/screens/businesses.tsx
1073
- function Oe() {
1087
+ function Ae() {
1074
1088
  let { businesses: e, businessesStatus: t, reloadBusinesses: n, navigate: r } = x(), i = [...e.values()];
1075
1089
  return /* @__PURE__ */ p("section", {
1076
1090
  className: "cp-screen",
@@ -1107,7 +1121,7 @@ function Oe() {
1107
1121
  });
1108
1122
  }
1109
1123
  // src/screens/details.tsx
1110
- function ke() {
1124
+ function je() {
1111
1125
  let { client: e, signOut: n } = x(), [i, a] = s(), [o, c] = s(""), [l, u] = s(!1), [m, h] = s(!1), [g, _] = s(), v = t(async () => {
1112
1126
  u(!1);
1113
1127
  try {
@@ -1203,7 +1217,7 @@ function ke() {
1203
1217
  });
1204
1218
  }
1205
1219
  // src/screens/passes.tsx
1206
- function Ae() {
1220
+ function Me() {
1207
1221
  let { client: e, businesses: n } = x(), [i, a] = s(), [o, c] = s(!1), l = t(async () => {
1208
1222
  c(!1);
1209
1223
  try {
@@ -1259,13 +1273,13 @@ function Ae() {
1259
1273
  });
1260
1274
  }
1261
1275
  // ../ui/dist/index.js
1262
- var je = new Intl.DisplayNames(["en"], { type: "region" }), Me = (e) => e.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase().trim(), Y = h().map((e) => ({
1276
+ var Ne = new Intl.DisplayNames(["en"], { type: "region" }), Pe = (e) => e.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase().trim(), J = h().map((e) => ({
1263
1277
  code: e,
1264
- name: je.of(e) ?? e,
1278
+ name: Ne.of(e) ?? e,
1265
1279
  callingCode: g(e),
1266
1280
  flag: String.fromCodePoint(...[...e].map((e) => 127397 + e.charCodeAt(0)))
1267
- })).sort((e, t) => e.name.localeCompare(t.name)), Ne = new Map(Y.map((e) => [e.code, e])), Pe = (e) => Ne.get(e);
1268
- function Fe(e) {
1281
+ })).sort((e, t) => e.name.localeCompare(t.name)), Fe = new Map(J.map((e) => [e.code, e])), Ie = (e) => Fe.get(e);
1282
+ function Le(e) {
1269
1283
  let t = i(), n = o(null), a = o(null), c = o(null), [l, u] = s(""), d = e.search(l), m = () => n.current?.close(), h = (t) => {
1270
1284
  m(), e.onPick(t);
1271
1285
  };
@@ -1339,10 +1353,10 @@ function Fe(e) {
1339
1353
  ]
1340
1354
  });
1341
1355
  }
1342
- var Ie = new m(), X = (e) => Pe(e);
1343
- function Le(e) {
1356
+ var Re = new m(), Y = (e) => Ie(e);
1357
+ function ze(e) {
1344
1358
  for (let t = 1; t <= 3 && t <= e.length; t++) {
1345
- let n = e.slice(0, t), r = (y.country_calling_codes[n] ?? []).filter((e) => Pe(e) !== void 0), [i] = r;
1359
+ let n = e.slice(0, t), r = (y.country_calling_codes[n] ?? []).filter((e) => Ie(e) !== void 0), [i] = r;
1346
1360
  if (i) return {
1347
1361
  code: n,
1348
1362
  first: i,
@@ -1351,10 +1365,10 @@ function Le(e) {
1351
1365
  }
1352
1366
  return null;
1353
1367
  }
1354
- function Re(e, t) {
1368
+ function Be(e, t) {
1355
1369
  let n = /^\s*(\+|00)/.exec(e);
1356
1370
  if (!n) return null;
1357
- let r = e.slice(n[0].length), i = r.replace(/\D/g, ""), a = Le(i);
1371
+ let r = e.slice(n[0].length), i = r.replace(/\D/g, ""), a = ze(i);
1358
1372
  if (!a) return null;
1359
1373
  let o = _(`+${i}`), s = a.countries.includes(t) ? t : o?.country ?? a.first, c = 0;
1360
1374
  for (let e = 0; e < a.code.length; c++) /\d/.test(r.charAt(c)) && e++;
@@ -1363,45 +1377,45 @@ function Re(e, t) {
1363
1377
  text: o?.isValid() ? o.formatNational() : r.slice(c).replace(/^[\s\-().]+/, "")
1364
1378
  };
1365
1379
  }
1366
- function ze(e, t) {
1380
+ function Ve(e, t) {
1367
1381
  let n = t.replace(/\D/g, "");
1368
- return n === "" ? "" : t.trim().startsWith("+") ? `+${n}` : _(t, e)?.number ?? `+${X(e).callingCode}${n}`;
1382
+ return n === "" ? "" : t.trim().startsWith("+") ? `+${n}` : _(t, e)?.number ?? `+${Y(e).callingCode}${n}`;
1369
1383
  }
1370
- function Be(e) {
1371
- return Ie.selectNumberingPlan(e), Ie.numberingPlan?.possibleLengths() ?? [];
1384
+ function He(e) {
1385
+ return Re.selectNumberingPlan(e), Re.numberingPlan?.possibleLengths() ?? [];
1372
1386
  }
1373
- function Ve(e, t, n) {
1387
+ function Ue(e, t, n) {
1374
1388
  if (e === "") return t ? "Enter a phone number." : "";
1375
1389
  let r = _(e);
1376
1390
  if (r?.isValid()) return "";
1377
- let i = e.replace(/\D/g, ""), a = Le(i);
1391
+ let i = e.replace(/\D/g, ""), a = ze(i);
1378
1392
  if (!a) return "Unknown country code. Choose the country from the list.";
1379
- let o = n && a.countries.includes(n) ? n : r?.country ?? a.first, s = X(o).name, c = v(i.slice(a.code.length), o);
1393
+ let o = n && a.countries.includes(n) ? n : r?.country ?? a.first, s = Y(o).name, c = v(i.slice(a.code.length), o);
1380
1394
  if (c && c !== "NOT_A_NUMBER") {
1381
- let e = Be(o), t = e[0] ?? 0, n = e[e.length - 1] ?? 0;
1395
+ let e = He(o), t = e[0] ?? 0, n = e[e.length - 1] ?? 0;
1382
1396
  return e.length === 1 ? `Enter a ${t}-digit number for ${s}.` : e.length > 2 && n - t === e.length - 1 ? `Enter ${t} to ${n} digits for ${s}.` : `Enter ${e.slice(0, -1).join(", ")} or ${n} digits for ${s}.`;
1383
1397
  }
1384
1398
  return `This is not a valid number for ${s}.`;
1385
1399
  }
1386
- function He(e, t = !1) {
1387
- return Ve(e, t);
1400
+ function We(e, t = !1) {
1401
+ return Ue(e, t);
1388
1402
  }
1389
- function Ue(e, t) {
1390
- return Re(e, t) ?? {
1403
+ function Ge(e, t) {
1404
+ return Be(e, t) ?? {
1391
1405
  country: t,
1392
1406
  text: e
1393
1407
  };
1394
1408
  }
1395
- function We(e) {
1409
+ function Ke(e) {
1396
1410
  let t = i(), n = o(null), [a, c] = s(() => ({
1397
1411
  value: e.value,
1398
- ...Ue(e.value, "IS")
1412
+ ...Ge(e.value, "IS")
1399
1413
  })), l = a;
1400
1414
  e.value !== a.value && (l = {
1401
1415
  value: e.value,
1402
- ...Ue(e.value, a.country)
1416
+ ...Ge(e.value, a.country)
1403
1417
  }, c(l));
1404
- let [u, d] = s(!1), [m, h] = s(!1), g = X(l.country), _ = Ve(l.value, e.required ?? !1, l.country), v = u && _ !== "" ? _ : e.error ?? "", y = v !== "";
1418
+ let [u, d] = s(!1), [m, h] = s(!1), g = Y(l.country), _ = Ue(l.value, e.required ?? !1, l.country), v = u && _ !== "" ? _ : e.error ?? "", y = v !== "";
1405
1419
  r(() => {
1406
1420
  let e = n.current?.form;
1407
1421
  if (!e) return;
@@ -1411,7 +1425,7 @@ function We(e) {
1411
1425
  return e.addEventListener("submit", t), () => e.removeEventListener("submit", t);
1412
1426
  }, []);
1413
1427
  let b = (t, n) => {
1414
- let r = ze(t, n);
1428
+ let r = Ve(t, n);
1415
1429
  c({
1416
1430
  value: r,
1417
1431
  country: t,
@@ -1454,7 +1468,7 @@ function We(e) {
1454
1468
  "aria-invalid": y || void 0,
1455
1469
  "aria-describedby": y ? `${t}-problem` : void 0,
1456
1470
  onChange: (e) => {
1457
- let t = e.target.value.replace(/[^\d\s\-().+]/g, ""), n = Re(t, l.country);
1471
+ let t = e.target.value.replace(/[^\d\s\-().+]/g, ""), n = Be(t, l.country);
1458
1472
  b(n?.country ?? l.country, n?.text ?? t);
1459
1473
  },
1460
1474
  onBlur: () => {
@@ -1468,12 +1482,12 @@ function We(e) {
1468
1482
  role: "alert",
1469
1483
  children: v
1470
1484
  }),
1471
- m && /* @__PURE__ */ f(Fe, {
1485
+ m && /* @__PURE__ */ f(Le, {
1472
1486
  title: "Country code",
1473
1487
  searchLabel: "Search by country or code",
1474
1488
  listLabel: "Countries",
1475
1489
  empty: (e) => `No country matches “${e}”.`,
1476
- search: Ge,
1490
+ search: qe,
1477
1491
  selected: l.country,
1478
1492
  onClose: () => h(!1),
1479
1493
  onPick: (e) => {
@@ -1483,41 +1497,95 @@ function We(e) {
1483
1497
  ]
1484
1498
  });
1485
1499
  }
1486
- function Ge(e) {
1487
- let t = Me(e).replace(/^(\+|00)/, "");
1488
- return (t === "" ? Y : /^\d+$/.test(t) ? Y.filter((e) => e.callingCode.startsWith(t)) : Y.filter((e) => Me(e.name).includes(t) || e.code.toLowerCase() === t)).map((e) => ({
1500
+ function qe(e) {
1501
+ let t = Pe(e).replace(/^(\+|00)/, "");
1502
+ return (t === "" ? J : /^\d+$/.test(t) ? J.filter((e) => e.callingCode.startsWith(t)) : J.filter((e) => Pe(e.name).includes(t) || e.code.toLowerCase() === t)).map((e) => ({
1489
1503
  value: e.code,
1490
1504
  label: e.name,
1491
1505
  hint: `+${e.callingCode}`,
1492
1506
  flag: e.flag
1493
1507
  }));
1494
1508
  }
1509
+ var X = {
1510
+ red: {
1511
+ light: "#d14b4b",
1512
+ dark: "#f07a7a"
1513
+ },
1514
+ orange: {
1515
+ light: "#d9773a",
1516
+ dark: "#f29a62"
1517
+ },
1518
+ amber: {
1519
+ light: "#b8891a",
1520
+ dark: "#e3b847"
1521
+ },
1522
+ lime: {
1523
+ light: "#6f9a1f",
1524
+ dark: "#a5cf4f"
1525
+ },
1526
+ green: {
1527
+ light: "#2f9a69",
1528
+ dark: "#5cc194"
1529
+ },
1530
+ teal: {
1531
+ light: "#24918f",
1532
+ dark: "#4fc0bd"
1533
+ },
1534
+ cyan: {
1535
+ light: "#1d8fb3",
1536
+ dark: "#5bc0e0"
1537
+ },
1538
+ blue: {
1539
+ light: "#4a7fe0",
1540
+ dark: "#7ea6f5"
1541
+ },
1542
+ indigo: {
1543
+ light: "#6366d8",
1544
+ dark: "#9a9cf2"
1545
+ },
1546
+ purple: {
1547
+ light: "#9666cf",
1548
+ dark: "#bb9be6"
1549
+ },
1550
+ pink: {
1551
+ light: "#cf5c94",
1552
+ dark: "#ea8cba"
1553
+ },
1554
+ slate: {
1555
+ light: "#6c778a",
1556
+ dark: "#9aa5b5"
1557
+ }
1558
+ };
1559
+ function Je(e) {
1560
+ let { light: t, dark: n } = X[e in X ? e : "slate"];
1561
+ return `light-dark(${t}, ${n})`;
1562
+ }
1495
1563
  // src/bot-check.tsx
1496
- var Ke = () => window.turnstile, qe = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit", Z;
1497
- function Je() {
1498
- let e = Ke();
1564
+ var Ye = () => window.turnstile, Xe = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit", Z;
1565
+ function Ze() {
1566
+ let e = Ye();
1499
1567
  return e ? Promise.resolve(e) : (Z ??= new Promise((e, t) => {
1500
1568
  let n = document.createElement("script");
1501
- n.src = qe, n.async = !0;
1569
+ n.src = Xe, n.async = !0;
1502
1570
  let r = () => {
1503
1571
  Z = void 0, n.remove(), t(/* @__PURE__ */ Error("Turnstile did not load."));
1504
1572
  };
1505
1573
  n.onload = () => {
1506
- let t = Ke();
1574
+ let t = Ye();
1507
1575
  t ? e(t) : r();
1508
1576
  }, n.onerror = r, document.head.append(n);
1509
1577
  }), Z);
1510
1578
  }
1511
- function Ye(e) {
1579
+ function Qe(e) {
1512
1580
  return e?.provider === "turnstile" && typeof e.siteKey == "string" && e.siteKey.trim() !== "";
1513
1581
  }
1514
- function Xe(e) {
1582
+ function $e(e) {
1515
1583
  let t = o(null), n = o(void 0), i = o(e);
1516
1584
  i.current = e;
1517
1585
  let { siteKey: a } = e.botCheck;
1518
1586
  r(() => {
1519
1587
  let e = !0;
1520
- return Je().then((r) => {
1588
+ return Ze().then((r) => {
1521
1589
  let o = t.current;
1522
1590
  if (!e || !o) return;
1523
1591
  let s = r.render(o, {
@@ -1554,7 +1622,7 @@ function Q(e) {
1554
1622
  r(() => {
1555
1623
  n && t.current?.querySelector("input")?.focus();
1556
1624
  }, [n]);
1557
- let [i, a] = s("phone"), [c, l] = s(""), [u, m] = s(""), [h, g] = s(""), [_, v] = s(), [y, b] = s(), [x, S] = s(!1), [C, w] = s(), [E, D] = s(0), O = Ye(e.botCheck) ? e.botCheck : void 0, [k, A] = s();
1625
+ let [i, a] = s("phone"), [c, l] = s(""), [u, m] = s(""), [h, g] = s(""), [_, v] = s(), [y, b] = s(), [x, S] = s(!1), [C, w] = s(), [E, D] = s(0), O = Qe(e.botCheck) ? e.botCheck : void 0, [k, A] = s();
1558
1626
  r(() => {
1559
1627
  if (!k) return;
1560
1628
  let e = setTimeout(() => {
@@ -1566,16 +1634,16 @@ function Q(e) {
1566
1634
  a("phone"), v(void 0), g(""), l(""), b(e);
1567
1635
  }
1568
1636
  async function M(t) {
1569
- if (t.preventDefault(), (i !== "phone" || !He(u, !0) && O && C) && (i !== "name" || c.trim())) {
1637
+ if (t.preventDefault(), (i !== "phone" || !We(u, !0) && O && C) && (i !== "name" || c.trim())) {
1570
1638
  S(!0), b(void 0);
1571
1639
  try {
1572
- let t = i === "phone" ? await W(e.basePath, "/auth/initiate", {
1640
+ let t = i === "phone" ? await U(e.basePath, "/auth/initiate", {
1573
1641
  phone: u,
1574
1642
  botCheckToken: C
1575
- }) : i === "code" ? await W(e.basePath, "/auth/login", {
1643
+ }) : i === "code" ? await U(e.basePath, "/auth/login", {
1576
1644
  challenge: _,
1577
1645
  code: h
1578
- }) : await W(e.basePath, "/auth/register", { name: c.trim() });
1646
+ }) : await U(e.basePath, "/auth/register", { name: c.trim() });
1579
1647
  if (t.ok) {
1580
1648
  let n = await t.json();
1581
1649
  i === "phone" ? (v(n.challenge), a("code")) : n.result === "nameRequired" ? a("name") : e.onSignedIn(n.sessionKey);
@@ -1586,7 +1654,7 @@ function Q(e) {
1586
1654
  j(T("register.error.expired"));
1587
1655
  return;
1588
1656
  }
1589
- let r = Number(t.headers.get("retry-after")), o = Number.isInteger(r) && r > 0 ? r : void 0, s = Ze(t.status, n?.code, o, i);
1657
+ let r = Number(t.headers.get("retry-after")), o = Number.isInteger(r) && r > 0 ? r : void 0, s = et(t.status, n?.code, o, i);
1590
1658
  t.status === 429 && o && i === "phone" && A({
1591
1659
  phone: u,
1592
1660
  seconds: o,
@@ -1606,7 +1674,7 @@ function Q(e) {
1606
1674
  onSubmit: M,
1607
1675
  "aria-busy": x,
1608
1676
  children: [
1609
- /* @__PURE__ */ f(_e, { brand: e.brand }),
1677
+ /* @__PURE__ */ f(ye, { brand: e.brand }),
1610
1678
  /* @__PURE__ */ f("h1", { children: T("signIn.heading") }),
1611
1679
  e.children,
1612
1680
  e.notice && i === "phone" && /* @__PURE__ */ f("p", {
@@ -1630,13 +1698,13 @@ function Q(e) {
1630
1698
  autoFocus: !0
1631
1699
  })] })] }) : /* @__PURE__ */ p(d, { children: [
1632
1700
  /* @__PURE__ */ f("p", { children: T("signIn.intro") }),
1633
- /* @__PURE__ */ f(We, {
1701
+ /* @__PURE__ */ f(Ke, {
1634
1702
  label: T("signIn.phone"),
1635
1703
  value: u,
1636
1704
  onChange: m,
1637
1705
  required: !0
1638
1706
  }),
1639
- O && /* @__PURE__ */ f(Xe, {
1707
+ O && /* @__PURE__ */ f($e, {
1640
1708
  botCheck: O,
1641
1709
  attempt: E,
1642
1710
  onToken: w,
@@ -1672,7 +1740,7 @@ function Q(e) {
1672
1740
  })
1673
1741
  });
1674
1742
  }
1675
- function Ze(e, t, n, r) {
1743
+ function et(e, t, n, r) {
1676
1744
  if (e === 429) return n ? T("signIn.error.tooMany", { wait: ee(n) }) : T("signIn.error.tooManyLater");
1677
1745
  if (r === "name" && (e === 400 || e === 422)) return T("register.error.name");
1678
1746
  let i = r === "phone";
@@ -1685,27 +1753,27 @@ function Ze(e, t, n, r) {
1685
1753
  ].includes(e) ? T("signIn.error.badCode") : T(e === 400 ? "signIn.error.invalid" : e === 403 ? "signIn.error.refused" : "signIn.error.failed");
1686
1754
  }
1687
1755
  // src/account.tsx
1688
- function Qe(e) {
1756
+ function tt(e) {
1689
1757
  let [n, r] = s("bookings"), i = e.screen ?? n, a = e.onNavigate ?? r, o = t((e) => {
1690
1758
  (e === "bookings" || e === "passes" || e === "details") && a(e);
1691
- }, [a]), { basePath: c, sessionKey: l, notice: u, portal: d, signedInAs: p } = q({
1759
+ }, [a]), { basePath: c, sessionKey: l, notice: u, portal: d, signedInAs: p } = K({
1692
1760
  basePath: e.basePath,
1693
1761
  navigate: o,
1694
1762
  accountNavigation: !0,
1695
1763
  onSessionChange: e.onSessionChange
1696
1764
  });
1697
- return /* @__PURE__ */ f(J, {
1765
+ return /* @__PURE__ */ f(q, {
1698
1766
  portal: d,
1699
1767
  loading: l === void 0,
1700
- children: /* @__PURE__ */ f(xe, {
1768
+ children: /* @__PURE__ */ f(Ce, {
1701
1769
  brand: e.brand,
1702
- tabs: ye,
1770
+ tabs: xe,
1703
1771
  screen: i,
1704
1772
  signedIn: !!l,
1705
1773
  signingIn: !l,
1706
1774
  onNavigate: o,
1707
1775
  onSignOut: () => d.signOut(),
1708
- children: l ? f(i === "passes" ? Ae : i === "details" ? ke : P, {}) : /* @__PURE__ */ f(Q, {
1776
+ children: l ? f(i === "passes" ? Me : i === "details" ? je : P, {}) : /* @__PURE__ */ f(Q, {
1709
1777
  basePath: c,
1710
1778
  brand: void 0,
1711
1779
  botCheck: e.botCheck,
@@ -1717,7 +1785,7 @@ function Qe(e) {
1717
1785
  });
1718
1786
  }
1719
1787
  // src/booking-flow.tsx
1720
- function $e(e) {
1788
+ function nt(e) {
1721
1789
  return {
1722
1790
  startsAt: e.startsAt,
1723
1791
  eventTypeId: e.eventTypeId,
@@ -1733,10 +1801,10 @@ function $(e) {
1733
1801
  e.resourceId ?? ""
1734
1802
  ].join("|") : "";
1735
1803
  }
1736
- function et(e, t) {
1804
+ function rt(e, t) {
1737
1805
  return t.eventId ? e.eventId === t.eventId : e.eventTypeId === t.eventTypeId && Date.parse(e.startsAt) === Date.parse(t.startsAt) && (!t.resourceId || e.resource?.id === t.resourceId);
1738
1806
  }
1739
- function tt(e) {
1807
+ function it(e) {
1740
1808
  let n = e.onChange !== void 0, r = {
1741
1809
  businessId: e.businessId,
1742
1810
  ...e.eventTypeId && { eventTypeId: e.eventTypeId },
@@ -1756,12 +1824,12 @@ function tt(e) {
1756
1824
  businessId: e.businessId,
1757
1825
  ...e.eventTypeId && { eventTypeId: e.eventTypeId }
1758
1826
  });
1759
- }, [h]), { basePath: _, sessionKey: v, notice: y, portal: b, signedInAs: x } = q({
1827
+ }, [h]), { basePath: _, sessionKey: v, notice: y, portal: b, signedInAs: x } = K({
1760
1828
  basePath: e.basePath,
1761
1829
  navigate: g,
1762
1830
  accountNavigation: !1,
1763
1831
  onSessionChange: e.onSessionChange
1764
- }), [S, C] = s(), [w, E] = s(), D = u.time, O = $(D), k = S && D && S.business.id === u.businessId && $($e(S.candidate)) === O ? S : void 0, A = () => {
1832
+ }), [S, C] = s(), [w, E] = s(), D = u.time, O = $(D), k = S && D && S.business.id === u.businessId && $(nt(S.candidate)) === O ? S : void 0, A = () => {
1765
1833
  C(void 0);
1766
1834
  let { time: e, ...t } = u;
1767
1835
  h(t);
@@ -1771,10 +1839,10 @@ function tt(e) {
1771
1839
  candidate: t
1772
1840
  }), h({
1773
1841
  ...u,
1774
- time: $e(t)
1842
+ time: nt(t)
1775
1843
  });
1776
1844
  }, M;
1777
- M = k ? v ? /* @__PURE__ */ f(me, {
1845
+ M = k ? v ? /* @__PURE__ */ f(he, {
1778
1846
  choice: k,
1779
1847
  onBack: A,
1780
1848
  onBooked: e.onBooked,
@@ -1788,7 +1856,7 @@ function tt(e) {
1788
1856
  autoFocus: !0,
1789
1857
  children: [
1790
1858
  /* @__PURE__ */ f("p", { children: T("book.signInFirst") }),
1791
- /* @__PURE__ */ f(U, { choice: k }),
1859
+ /* @__PURE__ */ f(H, { choice: k }),
1792
1860
  /* @__PURE__ */ f("button", {
1793
1861
  type: "button",
1794
1862
  className: "cp-link",
@@ -1796,7 +1864,7 @@ function tt(e) {
1796
1864
  children: T("book.back")
1797
1865
  })
1798
1866
  ]
1799
- }) : D && w !== O ? /* @__PURE__ */ f(rt, {
1867
+ }) : D && w !== O ? /* @__PURE__ */ f(ot, {
1800
1868
  businessId: u.businessId,
1801
1869
  time: D,
1802
1870
  onFound: C,
@@ -1816,7 +1884,7 @@ function tt(e) {
1816
1884
  ...e
1817
1885
  }),
1818
1886
  onChoose: j
1819
- })] }) : /* @__PURE__ */ f(nt, {
1887
+ })] }) : /* @__PURE__ */ f(at, {
1820
1888
  selection: u,
1821
1889
  change: h,
1822
1890
  onChoose: j
@@ -1827,10 +1895,10 @@ function tt(e) {
1827
1895
  u.resourceId ?? "",
1828
1896
  D && w !== O ? "time" : ""
1829
1897
  ].join("/");
1830
- return /* @__PURE__ */ f(J, {
1898
+ return /* @__PURE__ */ f(q, {
1831
1899
  portal: b,
1832
1900
  loading: v === void 0,
1833
- children: /* @__PURE__ */ p(at, {
1901
+ children: /* @__PURE__ */ p(ct, {
1834
1902
  step: N,
1835
1903
  children: [
1836
1904
  e.onClose && /* @__PURE__ */ f("div", {
@@ -1852,7 +1920,7 @@ function tt(e) {
1852
1920
  })
1853
1921
  });
1854
1922
  }
1855
- function nt(e) {
1923
+ function at(e) {
1856
1924
  let { selection: t, change: n } = e, { businessId: r, eventTypeId: i } = t, a = ce(r), o = le(a, null), { business: s, types: c } = a;
1857
1925
  if (o || !s || !c) return o;
1858
1926
  let l = /* @__PURE__ */ f(fe, { business: s }), u = /* @__PURE__ */ f("button", {
@@ -1891,7 +1959,15 @@ function nt(e) {
1891
1959
  }),
1892
1960
  /* @__PURE__ */ f("strong", { children: e.displayName }),
1893
1961
  e.description && /* @__PURE__ */ f("span", { children: e.description }),
1894
- /* @__PURE__ */ f("span", { children: T("business.minutes", { minutes: e.durationMinutes }) })
1962
+ /* @__PURE__ */ f("span", { children: T("business.minutes", { minutes: e.durationMinutes }) }),
1963
+ e.tags.length > 0 && /* @__PURE__ */ f("span", {
1964
+ className: "cp-tags",
1965
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ f("span", {
1966
+ className: "cp-tag",
1967
+ style: { "--cp-tag": Je(e.colour) },
1968
+ children: e.name
1969
+ }, e.id))
1970
+ })
1895
1971
  ]
1896
1972
  }) }, e.id))
1897
1973
  }),
@@ -1969,7 +2045,7 @@ function nt(e) {
1969
2045
  ]
1970
2046
  });
1971
2047
  }
1972
- function rt(e) {
2048
+ function ot(e) {
1973
2049
  let { client: t } = x(), { businessId: n, time: i } = e, a = o(e);
1974
2050
  a.current = e;
1975
2051
  let s = $(i);
@@ -1986,7 +2062,7 @@ function rt(e) {
1986
2062
  eventTypeId: i.eventTypeId,
1987
2063
  ...!i.eventId && i.resourceId && { resourceId: i.resourceId }
1988
2064
  }
1989
- } }), c = s?.items.find((e) => et(e, i));
2065
+ } }), c = s?.items.find((e) => rt(e, i));
1990
2066
  e && (c ? a.current.onFound({
1991
2067
  business: r,
1992
2068
  candidate: c
@@ -2008,8 +2084,8 @@ function rt(e) {
2008
2084
  })
2009
2085
  });
2010
2086
  }
2011
- var it = "input, .cp-option, .cp-chips button, .cp-candidate button, .cp-actions button:not(:disabled)";
2012
- function at(e) {
2087
+ var st = "input, .cp-option, .cp-chips button, .cp-candidate button, .cp-actions button:not(:disabled)";
2088
+ function ct(e) {
2013
2089
  let t = o(null), n = o(!1), { step: i } = e;
2014
2090
  return r(() => {
2015
2091
  let e = t.current;
@@ -2017,7 +2093,7 @@ function at(e) {
2017
2093
  let r = n.current;
2018
2094
  if (n.current = !0, r && e.contains(document.activeElement)) return;
2019
2095
  let i = () => {
2020
- let t = e.querySelector(it);
2096
+ let t = e.querySelector(st);
2021
2097
  return t?.focus(), !!t;
2022
2098
  };
2023
2099
  if (i()) return;
@@ -2039,8 +2115,8 @@ function at(e) {
2039
2115
  });
2040
2116
  }
2041
2117
  // src/sign-in-standalone.tsx
2042
- function ot(e) {
2043
- let t = e.basePath.replace(/\/$/, ""), n = De(t, e.onSessionChange), i = o(e.onSignedIn);
2118
+ function lt(e) {
2119
+ let t = e.basePath.replace(/\/$/, ""), n = ke(t, e.onSessionChange), i = o(e.onSignedIn);
2044
2120
  i.current = e.onSignedIn;
2045
2121
  let a = o(!1);
2046
2122
  return r(() => {
@@ -2056,15 +2132,15 @@ function ot(e) {
2056
2132
  brand: e.brand,
2057
2133
  botCheck: e.botCheck,
2058
2134
  notice: void 0,
2059
- onSignedIn: (e) => K(t, e),
2135
+ onSignedIn: (e) => G(t, e),
2060
2136
  onCancel: e.onCancel,
2061
2137
  autoFocus: !0
2062
2138
  })
2063
2139
  });
2064
2140
  }
2065
2141
  // src/index.tsx
2066
- function st(e) {
2067
- let [t, n] = s("businesses"), r = e.screen ?? t, i = e.onNavigate ?? n, { basePath: a, sessionKey: o, notice: c, portal: l, signedInAs: u } = q({
2142
+ function ut(e) {
2143
+ let [t, n] = s("businesses"), r = e.screen ?? t, i = e.onNavigate ?? n, { basePath: a, sessionKey: o, notice: c, portal: l, signedInAs: u } = K({
2068
2144
  basePath: e.basePath,
2069
2145
  navigate: i,
2070
2146
  accountNavigation: !0,
@@ -2079,23 +2155,23 @@ function st(e) {
2079
2155
  onSignedIn: u,
2080
2156
  children: t
2081
2157
  });
2082
- return /* @__PURE__ */ f(J, {
2158
+ return /* @__PURE__ */ f(q, {
2083
2159
  portal: l,
2084
2160
  loading: o === void 0,
2085
- children: /* @__PURE__ */ f(xe, {
2161
+ children: /* @__PURE__ */ f(Ce, {
2086
2162
  brand: e.brand,
2087
- tabs: be,
2163
+ tabs: Se,
2088
2164
  screen: r,
2089
2165
  signedIn: !!o,
2090
2166
  signingIn: !o && (!!m || typeof r == "string" && r !== "businesses"),
2091
2167
  onNavigate: i,
2092
2168
  onSignOut: () => l.signOut(),
2093
- children: m ? o ? /* @__PURE__ */ f(me, {
2169
+ children: m ? o ? /* @__PURE__ */ f(he, {
2094
2170
  choice: m,
2095
2171
  onBack: () => h(void 0)
2096
2172
  }, `${m.candidate.startsAt}-${m.candidate.eventId ?? m.candidate.eventTypeId}`) : y(/* @__PURE__ */ p(d, { children: [
2097
2173
  /* @__PURE__ */ f("p", { children: T("book.signInFirst") }),
2098
- /* @__PURE__ */ f(U, { choice: m }),
2174
+ /* @__PURE__ */ f(H, { choice: m }),
2099
2175
  /* @__PURE__ */ f("button", {
2100
2176
  type: "button",
2101
2177
  className: "cp-link",
@@ -2109,8 +2185,8 @@ function st(e) {
2109
2185
  business: e,
2110
2186
  candidate: t
2111
2187
  })
2112
- }) : r === "businesses" ? /* @__PURE__ */ f(Oe, {}) : o ? f(r === "passes" ? Ae : r === "details" ? ke : P, {}) : y()
2188
+ }) : r === "businesses" ? /* @__PURE__ */ f(Ae, {}) : o ? f(r === "passes" ? Me : r === "details" ? je : P, {}) : y()
2113
2189
  })
2114
2190
  });
2115
2191
  }
2116
- export { Qe as MsmAccount, tt as MsmBooking, st as MsmCustomer, ot as MsmSignIn, te as cancellationState, j as formatDate, k as formatDateTime, O as formatNumber, C as locale, T as t };
2192
+ export { tt as MsmAccount, it as MsmBooking, ut as MsmCustomer, lt as MsmSignIn, te as cancellationState, j as formatDate, k as formatDateTime, O as formatNumber, C as locale, T as t };
package/dist/portal.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare function useCustomerPortal(options: {
14
14
  }): {
15
15
  basePath: string;
16
16
  sessionKey: import("./session").SessionState;
17
- notice: "app.loading" | "app.loadFailed" | "app.retry" | "app.signedOut" | "app.signedOutEverywhere" | "image.logo" | "nav.label" | "nav.book" | "nav.signIn" | "nav.bookings" | "nav.passes" | "nav.details" | "nav.signOut" | "signIn.heading" | "signIn.intro" | "register.intro" | "register.name" | "signIn.phone" | "signIn.codeSent" | "signIn.code" | "signIn.sendCode" | "signIn.submit" | "register.submit" | "signIn.wait" | "signIn.differentNumber" | "signIn.cancel" | "signIn.error.tooMany" | "signIn.error.tooManyLater" | "signIn.error.paused" | "signIn.error.pausedLater" | "signIn.error.destination" | "signIn.error.badCode" | "register.error.expired" | "register.error.name" | "signIn.error.invalid" | "signIn.error.refused" | "signIn.error.unreachable" | "signIn.error.failed" | "signIn.error.botCheck" | "signIn.error.botCheckUnavailable" | "signIn.error.notConfigured" | "wait.seconds.one" | "wait.seconds.other" | "wait.minutes.one" | "wait.minutes.other" | "wait.hours.one" | "wait.hours.other" | "bookings.heading" | "bookings.period" | "bookings.upcoming" | "bookings.past" | "bookings.emptyUpcoming" | "bookings.emptyPast" | "bookings.more" | "bookings.when" | "bookings.cancelled" | "bookings.cancelledLate" | "bookings.attended" | "bookings.noShow" | "bookings.lateFrom" | "bookings.started" | "bookings.cancel" | "bookings.confirmHeading" | "bookings.confirmLate" | "bookings.confirmCredit" | "bookings.confirm" | "bookings.keep" | "bookings.cancelling" | "bookings.doneOnTime" | "bookings.doneLate" | "bookings.cancelFailed" | "bookings.gone" | "businesses.heading" | "businesses.intro" | "businesses.empty" | "businesses.open" | "business.all" | "business.notFound" | "business.types" | "business.allTypes" | "business.resources" | "business.anyResource" | "business.typeMissing" | "business.minutes" | "business.week" | "business.previousWeek" | "business.nextWeek" | "business.weekOf" | "business.empty" | "business.seatsLeft.one" | "business.seatsLeft.other" | "business.full" | "business.openTime" | "business.with" | "business.instructor" | "business.room" | "business.guests" | "business.book" | "book.heading" | "book.signInFirst" | "book.back" | "book.reserving" | "book.heldUntil" | "book.confirm" | "book.confirming" | "book.booked" | "book.toBookings" | "book.done" | "book.close" | "book.chooseType" | "book.noTypes" | "book.seeAll" | "book.chooseResource" | "book.anyResource" | "book.anyResourceHint" | "book.toTypes" | "book.otherResource" | "book.reserveAgain" | "book.full" | "book.slotTaken" | "book.limit" | "book.expired" | "book.notAllowed" | "book.unavailable" | "book.refused" | "book.failed" | "passes.heading" | "passes.empty" | "passes.unlimited" | "passes.credits" | "passes.validFrom" | "passes.validRange" | "passes.expired" | "details.heading" | "details.name" | "details.phone" | "details.email" | "details.none" | "details.readOnly" | "details.save" | "details.saving" | "details.saved" | "details.saveFailed" | "details.signOutEverywhere" | "details.signOutEverywhereHint" | "details.signOutEverywhereFailed" | undefined;
17
+ notice: "app.loading" | "app.loadFailed" | "app.retry" | "app.signedOut" | "app.signedOutEverywhere" | "image.logo" | "nav.label" | "nav.book" | "nav.signIn" | "nav.bookings" | "nav.passes" | "nav.details" | "nav.signOut" | "signIn.heading" | "signIn.intro" | "register.intro" | "register.name" | "signIn.phone" | "signIn.codeSent" | "signIn.code" | "signIn.sendCode" | "signIn.submit" | "register.submit" | "signIn.wait" | "signIn.differentNumber" | "signIn.cancel" | "signIn.error.tooMany" | "signIn.error.tooManyLater" | "signIn.error.paused" | "signIn.error.pausedLater" | "signIn.error.destination" | "signIn.error.badCode" | "register.error.expired" | "register.error.name" | "signIn.error.invalid" | "signIn.error.refused" | "signIn.error.unreachable" | "signIn.error.failed" | "signIn.error.botCheck" | "signIn.error.botCheckUnavailable" | "signIn.error.notConfigured" | "wait.seconds.one" | "wait.seconds.other" | "wait.minutes.one" | "wait.minutes.other" | "wait.hours.one" | "wait.hours.other" | "bookings.heading" | "bookings.period" | "bookings.upcoming" | "bookings.past" | "bookings.emptyUpcoming" | "bookings.emptyPast" | "bookings.more" | "bookings.when" | "bookings.cancelled" | "bookings.cancelledLate" | "bookings.attended" | "bookings.noShow" | "bookings.lateFrom" | "bookings.started" | "bookings.cancel" | "bookings.confirmHeading" | "bookings.confirmLate" | "bookings.confirmCredit" | "bookings.confirm" | "bookings.keep" | "bookings.cancelling" | "bookings.doneOnTime" | "bookings.doneLate" | "bookings.cancelFailed" | "bookings.gone" | "businesses.heading" | "businesses.intro" | "businesses.empty" | "businesses.open" | "business.all" | "business.notFound" | "business.types" | "business.allTypes" | "business.resources" | "business.anyResource" | "business.typeMissing" | "business.minutes" | "business.week" | "business.previousWeek" | "business.nextWeek" | "business.weekOf" | "business.empty" | "business.seatsLeft.one" | "business.seatsLeft.other" | "business.full" | "business.openTime" | "business.with" | "business.book" | "book.heading" | "book.signInFirst" | "book.back" | "book.reserving" | "book.heldUntil" | "book.confirm" | "book.confirming" | "book.booked" | "book.toBookings" | "book.done" | "book.close" | "book.chooseType" | "book.noTypes" | "book.seeAll" | "book.chooseResource" | "book.anyResource" | "book.anyResourceHint" | "book.toTypes" | "book.otherResource" | "book.reserveAgain" | "book.full" | "book.slotTaken" | "book.limit" | "book.expired" | "book.notAllowed" | "book.unavailable" | "book.banned" | "book.banned.undated" | "book.refused" | "book.failed" | "passes.heading" | "passes.empty" | "passes.unlimited" | "passes.credits" | "passes.validFrom" | "passes.validRange" | "passes.expired" | "details.heading" | "details.name" | "details.phone" | "details.email" | "details.none" | "details.readOnly" | "details.save" | "details.saving" | "details.saved" | "details.saveFailed" | "details.signOutEverywhere" | "details.signOutEverywhereHint" | "details.signOutEverywhereFailed" | undefined;
18
18
  portal: Portal;
19
19
  signedInAs: (next: string) => void;
20
20
  };
@@ -41,7 +41,6 @@ export declare function useCatalog(businessId: string): {
41
41
  } | null | undefined;
42
42
  types: {
43
43
  cancellationCutoffMinutes: number | null;
44
- categoryId: string | null;
45
44
  description: string | null;
46
45
  displayName: string;
47
46
  durationMinutes: number;
@@ -72,6 +71,12 @@ export declare function useCatalog(businessId: string): {
72
71
  width: number;
73
72
  } | null;
74
73
  }[];
74
+ tags: {
75
+ colour: "red" | "orange" | "amber" | "lime" | "green" | "teal" | "cyan" | "blue" | "indigo" | "purple" | "pink" | "slate";
76
+ id: string;
77
+ name: string;
78
+ slug: string;
79
+ }[];
75
80
  timeSlotBooking: boolean;
76
81
  }[] | undefined;
77
82
  failed: boolean;
@@ -133,8 +138,8 @@ export declare function Availability(props: {
133
138
  }): import("react").JSX.Element;
134
139
  /**
135
140
  * Who and where: a slot's resource when the customer chose it; an event's
136
- * first person as its instructor, its places as the room and its other people
137
- * as guest instructors, each in the event's order (#404).
141
+ * resources in its order, each as staff present it (#462): its label before
142
+ * its name, or its name alone. Neighbours with the same label share it.
138
143
  */
139
144
  export declare function CandidateResources({ candidate }: {
140
145
  candidate: Candidate;
package/dist/style.css CHANGED
@@ -1,2 +1,2 @@
1
- .msm-phone{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-phone .msm-phone-row{gap:8px;display:flex}.msm-phone .msm-phone-row button.msm-phone-country{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:48px;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;cursor:pointer;border-radius:6px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px;font-size:16px;font-weight:400;display:flex}.msm-phone .msm-phone-row button.msm-phone-country:after{content:"▾";color:var(--msm-muted,#66736c);font-size:12px}.msm-phone .msm-phone-row input.msm-phone-number{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:0;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;flex:1;padding:0 12px;font-size:16px;font-weight:400}.msm-phone .msm-phone-row input.msm-phone-number[aria-invalid=true]{border-color:var(--msm-danger,#9b2c2c)}.msm-phone p.msm-phone-problem{color:var(--msm-danger,#9b2c2c);margin:0;font-size:14px;font-weight:400}:is(.msm-phone,.msm-select) .msm-picker-dialog{background:var(--msm-surface,#fff);width:min(440px,100vw - 32px);max-width:none;height:min(640px,100dvh - 64px);max-height:none;color:var(--msm-text,#202e2b);border:0;border-radius:12px;padding:0;font:16px/1.4 system-ui,sans-serif;box-shadow:0 16px 48px #202e2b40}:is(.msm-phone,.msm-select) .msm-picker-dialog[open]{flex-direction:column;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog::backdrop{background:#202e2b73}:is(.msm-phone,.msm-select) .msm-picker-head{justify-content:space-between;align-items:center;padding:8px 8px 8px 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-head h2{letter-spacing:0;margin:0;font-size:18px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-head button{min-width:48px;min-height:48px;color:var(--msm-accent,#235b4b);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 12px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog input.msm-picker-search{border:1px solid var(--msm-border,#c9d1c8);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;margin:0 16px 8px;padding:0 12px}:is(.msm-phone,.msm-select) .msm-picker-dialog ul{overscroll-behavior:contain;border-top:1px solid var(--msm-divider,#dce2db);flex:1;margin:0;padding:0 0 8px;list-style:none;overflow-y:auto}:is(.msm-phone,.msm-select) .msm-picker-dialog li button{width:100%;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:0;align-items:center;gap:12px;padding:0 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:hover,:is(.msm-phone,.msm-select) .msm-picker-dialog li button.msm-picker-first{background:var(--msm-highlight,#e5ece5)}:is(.msm-phone,.msm-select) .msm-picker-dialog li button[aria-current=true]{color:var(--msm-accent,#235b4b);font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:focus-visible{outline-offset:-3px}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-label{overflow-wrap:anywhere;flex:1;min-width:0}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-hint{color:var(--msm-muted,#66736c);font-variant-numeric:tabular-nums;white-space:nowrap}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-empty{color:var(--msm-muted,#66736c);margin:0;padding:16px 20px}.msm-select{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-select button.msm-select-value{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;border-radius:6px;justify-self:stretch;align-items:center;gap:8px;padding:8px 12px;font-size:16px;font-weight:400;display:flex}.msm-select button.msm-select-value:after{content:"▾";color:var(--msm-muted,#66736c);margin-left:auto;font-size:12px}.msm-select .msm-select-text{overflow-wrap:anywhere;min-width:0}@media (width<=600px){:is(.msm-phone,.msm-select) .msm-picker-dialog{border-radius:0;width:100%;height:100%;margin:0}}.msm-customer{--cp-accent:var(--msm-customer-accent,#235b4b);--cp-accent-text:var(--msm-customer-accent-text,#fff);--cp-ink:var(--msm-customer-text,#202e2b);--cp-muted:var(--msm-customer-muted,#66736c);--cp-control-line:var(--msm-customer-border,#c9d1c8);--cp-line:var(--msm-customer-border,#dce2db);--cp-bg:var(--msm-customer-background,#f6f7f4);--cp-surface:var(--msm-customer-surface,#fff);--cp-radius:var(--msm-customer-radius,6px);--cp-card-radius:calc(var(--cp-radius) * 4 / 3);--msm-accent:var(--cp-accent);--msm-text:var(--cp-ink);--msm-muted:var(--cp-muted);--msm-border:var(--cp-control-line);--msm-divider:var(--cp-line);--msm-surface:var(--cp-surface);box-sizing:border-box;background:var(--cp-bg);color:var(--cp-ink);font-size:15px;line-height:1.6;font-family:var(--msm-customer-font,inherit)}.msm-customer *{box-sizing:border-box}.msm-customer .cp-status{place-items:center;margin:0;padding:24px;display:grid}.msm-customer button{min-height:44px;font:inherit;border-radius:var(--cp-radius);background:var(--cp-accent);color:var(--cp-accent-text);cursor:pointer;border:0;padding:10px 14px;font-weight:600}.msm-customer button:disabled{opacity:.55;cursor:default}.msm-customer button.cp-secondary{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line)}.msm-customer button.cp-link{color:var(--cp-accent);background:0 0;padding:10px 0;text-decoration:underline}.msm-customer input{min-height:44px;font:inherit;border:1px solid var(--cp-control-line);border-radius:var(--cp-radius);background:var(--cp-surface);color:var(--cp-ink);width:100%;padding:10px 12px;font-size:16px;font-weight:400}.msm-customer input:focus,.msm-customer button:focus-visible{outline:2px solid var(--cp-accent);outline-offset:1px}.msm-customer label{gap:6px;font-size:13px;font-weight:600;display:grid}.msm-customer [role=alert]{color:#a3271f;margin:0}.cp-notice{border-radius:var(--cp-radius);color:var(--cp-ink);background:#eef3ee;margin:0;padding:10px 12px}.cp-brand{letter-spacing:-.5px;align-items:center;gap:10px;font-size:20px;font-weight:750;display:flex}.cp-brand img{max-width:120px;max-height:36px}.cp-sign-in{place-items:center;display:grid}.cp-sign-in form{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:14px;width:min(400px,100%);margin:16px 0;padding:32px 24px;display:grid}.cp-sign-in h1{margin:8px 0 0;font-size:22px;font-weight:600}.cp-sign-in p{color:var(--cp-muted);margin:0}.cp-shell{max-width:640px;padding:env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));margin:0 auto}.cp-header{justify-content:space-between;align-items:center;padding:12px 0;display:flex}.cp-nav{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);grid-auto-columns:1fr;grid-auto-flow:column;gap:4px;padding:4px;display:grid}.msm-customer .cp-nav button{white-space:nowrap;color:var(--cp-ink);background:0 0;padding:6px 2px;line-height:1.2}.msm-customer .cp-nav button[aria-current=page]{background:var(--cp-accent);color:var(--cp-accent-text)}.cp-main{padding-top:8px}.cp-screen{gap:12px;display:grid}.cp-screen h1{margin:12px 0 0;font-size:22px;font-weight:600}.msm-customer fieldset{min-width:0;margin:0}.cp-tabs{border:0;gap:8px;padding:0;display:flex}.msm-customer .cp-tabs button{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line);flex:1}.msm-customer .cp-tabs button[aria-pressed=true]{border-color:var(--cp-accent);box-shadow:inset 0 0 0 1px var(--cp-accent)}.cp-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.cp-card{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:6px;padding:16px;display:grid}.cp-card p{margin:0}.cp-card-head{justify-content:space-between;align-items:start;gap:8px;display:flex}.cp-card h2{margin:0;font-size:17px;font-weight:600}.cp-badge{color:var(--cp-muted);background:#eef0ec;border-radius:999px;flex:none;padding:2px 8px;font-size:12px;font-weight:600}.cp-hint,.cp-empty{color:var(--cp-muted);margin:0;font-size:14px}.cp-credits{font-weight:600}.cp-confirm{border-radius:var(--cp-radius);background:#faf6ec;border:1px solid #eadfbf;gap:8px;padding:12px;display:grid}.cp-confirm legend{float:left;width:100%;padding:0;font-weight:600}.cp-warning{color:#7a4b00}.cp-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.cp-actions>:only-child{grid-column:1/-1}.cp-form{gap:12px}.cp-form dl{grid-template-columns:max-content 1fr;gap:4px 16px;margin:0;display:grid}.cp-form dt{font-size:13px;font-weight:600}.cp-form dd{overflow-wrap:anywhere;margin:0}.cp-error{gap:8px;display:grid}.cp-business{gap:10px}.msm-customer .cp-business button{justify-self:start}.msm-customer button.cp-back{justify-self:start;min-height:0;padding:4px 0}.cp-business-head{align-items:center;gap:14px;display:flex}.cp-business-head>div{min-width:0}.cp-business-head p{margin:0}.cp-logo{object-fit:contain;object-position:left center;flex:none;width:auto;max-width:40%;height:48px}.cp-card .cp-logo{justify-self:start;max-width:100%;height:40px}.cp-detail-image{object-fit:cover;border-radius:var(--cp-card-radius);width:100%;height:auto;max-height:320px;margin-bottom:10px;display:block}.cp-thumb{object-fit:cover;border-radius:var(--cp-radius);width:72px;height:72px}.cp-chips{border:0;flex-wrap:wrap;gap:8px;padding:0;display:flex}.cp-chips legend{color:var(--cp-muted);margin-bottom:6px;padding:0;font-size:14px}.msm-customer .cp-chips button{background:var(--cp-surface);min-height:36px;color:var(--cp-ink);border:1px solid var(--cp-control-line);border-radius:999px;padding:6px 12px;font-weight:500}.msm-customer .cp-chips button[aria-pressed=true]{background:var(--cp-accent);color:var(--cp-accent-text);border-color:var(--cp-accent)}.cp-type h2{margin:0;font-size:17px;font-weight:600}.cp-type p{margin:0}.cp-week{text-align:center;border:0;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;padding:0;font-weight:600;display:grid}.msm-customer .cp-week button{padding:0;font-size:20px}.cp-day{gap:8px;display:grid}.cp-day h2{color:var(--cp-muted);margin:8px 0 0;font-size:15px;font-weight:600}.cp-candidate{grid-template-columns:auto 1fr auto;align-items:center;gap:4px 14px}.cp-time{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:650}.cp-candidate-body{min-width:0}.cp-candidate h3{margin:0;font-size:16px;font-weight:600}@media (width<=479px){.msm-customer .cp-nav button{font-size:14px}.cp-candidate{grid-template-columns:1fr auto}.cp-time{grid-column:1/-1}}.cp-summary{border-radius:var(--cp-radius);border:1px solid var(--cp-line);background:var(--cp-surface);gap:2px;padding:12px 14px;display:grid}.cp-summary h2{margin:0;font-size:17px;font-weight:600}.cp-summary p{color:var(--cp-ink);margin:0}.cp-summary p.cp-hint{color:var(--cp-muted)}@media (width<=359px){.msm-customer .cp-nav button{white-space:normal}}.cp-flow-head{justify-content:flex-end;padding-top:12px;display:flex}.msm-customer button.cp-option{text-align:left;background:var(--cp-surface);width:100%;color:var(--cp-ink);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:4px;padding:14px 16px;display:grid}.msm-customer button.cp-option:hover{border-color:var(--cp-accent)}.cp-option:has(>.cp-thumb){grid-template-columns:72px 1fr;column-gap:14px}.cp-option>.cp-thumb{grid-area:1/1/span 3}.cp-option:has(>.cp-thumb)>:not(.cp-thumb){grid-column:2}.cp-option strong{font-weight:600}.cp-option span{color:var(--cp-muted);font-weight:400}
1
+ .msm-phone{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-phone .msm-phone-row{gap:8px;display:flex}.msm-phone .msm-phone-row button.msm-phone-country{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:48px;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;cursor:pointer;border-radius:6px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px;font-size:16px;font-weight:400;display:flex}.msm-phone .msm-phone-row button.msm-phone-country:after{content:"▾";color:var(--msm-muted,#66736c);font-size:12px}.msm-phone .msm-phone-row input.msm-phone-number{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:0;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;flex:1;padding:0 12px;font-size:16px;font-weight:400}.msm-phone .msm-phone-row input.msm-phone-number[aria-invalid=true]{border-color:var(--msm-danger,#9b2c2c)}.msm-phone p.msm-phone-problem{color:var(--msm-danger,#9b2c2c);margin:0;font-size:14px;font-weight:400}:is(.msm-phone,.msm-select) .msm-picker-dialog{background:var(--msm-surface,#fff);width:min(440px,100vw - 32px);max-width:none;height:min(640px,100dvh - 64px);max-height:none;color:var(--msm-text,#202e2b);border:0;border-radius:12px;padding:0;font:16px/1.4 system-ui,sans-serif;box-shadow:0 16px 48px #202e2b40}:is(.msm-phone,.msm-select) .msm-picker-dialog[open]{flex-direction:column;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog::backdrop{background:#202e2b73}:is(.msm-phone,.msm-select) .msm-picker-head{justify-content:space-between;align-items:center;padding:8px 8px 8px 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-head h2{letter-spacing:0;margin:0;font-size:18px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-head button{min-width:48px;min-height:48px;color:var(--msm-accent,#235b4b);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 12px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog input.msm-picker-search{border:1px solid var(--msm-border,#c9d1c8);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;margin:0 16px 8px;padding:0 12px}:is(.msm-phone,.msm-select) .msm-picker-dialog ul{overscroll-behavior:contain;border-top:1px solid var(--msm-divider,#dce2db);flex:1;margin:0;padding:0 0 8px;list-style:none;overflow-y:auto}:is(.msm-phone,.msm-select) .msm-picker-dialog li button{width:100%;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:0;align-items:center;gap:12px;padding:0 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:hover,:is(.msm-phone,.msm-select) .msm-picker-dialog li button.msm-picker-first{background:var(--msm-highlight,#e5ece5)}:is(.msm-phone,.msm-select) .msm-picker-dialog li button[aria-current=true]{color:var(--msm-accent,#235b4b);font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:focus-visible{outline-offset:-3px}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-label{overflow-wrap:anywhere;flex:1;min-width:0}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-hint{color:var(--msm-muted,#66736c);font-variant-numeric:tabular-nums;white-space:nowrap}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-empty{color:var(--msm-muted,#66736c);margin:0;padding:16px 20px}.msm-select{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-select button.msm-select-value{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;border-radius:6px;justify-self:stretch;align-items:center;gap:8px;padding:8px 12px;font-size:16px;font-weight:400;display:flex}.msm-select button.msm-select-value:after{content:"▾";color:var(--msm-muted,#66736c);margin-left:auto;font-size:12px}.msm-select .msm-select-text{overflow-wrap:anywhere;min-width:0}@media (width<=600px){:is(.msm-phone,.msm-select) .msm-picker-dialog{border-radius:0;width:100%;height:100%;margin:0}}.msm-customer{--cp-accent:var(--msm-customer-accent,#235b4b);--cp-accent-text:var(--msm-customer-accent-text,#fff);--cp-ink:var(--msm-customer-text,#202e2b);--cp-muted:var(--msm-customer-muted,#66736c);--cp-control-line:var(--msm-customer-border,#c9d1c8);--cp-line:var(--msm-customer-border,#dce2db);--cp-bg:var(--msm-customer-background,#f6f7f4);--cp-surface:var(--msm-customer-surface,#fff);--cp-radius:var(--msm-customer-radius,6px);--cp-card-radius:calc(var(--cp-radius) * 4 / 3);--msm-accent:var(--cp-accent);--msm-text:var(--cp-ink);--msm-muted:var(--cp-muted);--msm-border:var(--cp-control-line);--msm-divider:var(--cp-line);--msm-surface:var(--cp-surface);box-sizing:border-box;background:var(--cp-bg);color:var(--cp-ink);font-size:15px;line-height:1.6;font-family:var(--msm-customer-font,inherit)}.msm-customer *{box-sizing:border-box}.msm-customer .cp-status{place-items:center;margin:0;padding:24px;display:grid}.msm-customer button{min-height:44px;font:inherit;border-radius:var(--cp-radius);background:var(--cp-accent);color:var(--cp-accent-text);cursor:pointer;border:0;padding:10px 14px;font-weight:600}.msm-customer button:disabled{opacity:.55;cursor:default}.msm-customer button.cp-secondary{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line)}.msm-customer button.cp-link{color:var(--cp-accent);background:0 0;padding:10px 0;text-decoration:underline}.msm-customer input{min-height:44px;font:inherit;border:1px solid var(--cp-control-line);border-radius:var(--cp-radius);background:var(--cp-surface);color:var(--cp-ink);width:100%;padding:10px 12px;font-size:16px;font-weight:400}.msm-customer input:focus,.msm-customer button:focus-visible{outline:2px solid var(--cp-accent);outline-offset:1px}.msm-customer label{gap:6px;font-size:13px;font-weight:600;display:grid}.msm-customer [role=alert]{color:#a3271f;margin:0}.cp-notice{border-radius:var(--cp-radius);color:var(--cp-ink);background:#eef3ee;margin:0;padding:10px 12px}.cp-brand{letter-spacing:-.5px;align-items:center;gap:10px;font-size:20px;font-weight:750;display:flex}.cp-brand img{max-width:120px;max-height:36px}.cp-sign-in{place-items:center;display:grid}.cp-sign-in form{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:14px;width:min(400px,100%);margin:16px 0;padding:32px 24px;display:grid}.cp-sign-in h1{margin:8px 0 0;font-size:22px;font-weight:600}.cp-sign-in p{color:var(--cp-muted);margin:0}.cp-shell{max-width:640px;padding:env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));margin:0 auto}.cp-header{justify-content:space-between;align-items:center;padding:12px 0;display:flex}.cp-nav{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);grid-auto-columns:1fr;grid-auto-flow:column;gap:4px;padding:4px;display:grid}.msm-customer .cp-nav button{white-space:nowrap;color:var(--cp-ink);background:0 0;padding:6px 2px;line-height:1.2}.msm-customer .cp-nav button[aria-current=page]{background:var(--cp-accent);color:var(--cp-accent-text)}.cp-main{padding-top:8px}.cp-screen{gap:12px;display:grid}.cp-screen h1{margin:12px 0 0;font-size:22px;font-weight:600}.msm-customer fieldset{min-width:0;margin:0}.cp-tabs{border:0;gap:8px;padding:0;display:flex}.msm-customer .cp-tabs button{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line);flex:1}.msm-customer .cp-tabs button[aria-pressed=true]{border-color:var(--cp-accent);box-shadow:inset 0 0 0 1px var(--cp-accent)}.cp-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.cp-card{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:6px;padding:16px;display:grid}.cp-card p{margin:0}.cp-card-head{justify-content:space-between;align-items:start;gap:8px;display:flex}.cp-card h2{margin:0;font-size:17px;font-weight:600}.cp-badge{color:var(--cp-muted);background:#eef0ec;border-radius:999px;flex:none;padding:2px 8px;font-size:12px;font-weight:600}.cp-hint,.cp-empty{color:var(--cp-muted);margin:0;font-size:14px}.cp-credits{font-weight:600}.cp-confirm{border-radius:var(--cp-radius);background:#faf6ec;border:1px solid #eadfbf;gap:8px;padding:12px;display:grid}.cp-confirm legend{float:left;width:100%;padding:0;font-weight:600}.cp-warning{color:#7a4b00}.cp-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.cp-actions>:only-child{grid-column:1/-1}.cp-form{gap:12px}.cp-form dl{grid-template-columns:max-content 1fr;gap:4px 16px;margin:0;display:grid}.cp-form dt{font-size:13px;font-weight:600}.cp-form dd{overflow-wrap:anywhere;margin:0}.cp-error{gap:8px;display:grid}.cp-business{gap:10px}.msm-customer .cp-business button{justify-self:start}.msm-customer button.cp-back{justify-self:start;min-height:0;padding:4px 0}.cp-business-head{align-items:center;gap:14px;display:flex}.cp-business-head>div{min-width:0}.cp-business-head p{margin:0}.cp-logo{object-fit:contain;object-position:left center;flex:none;width:auto;max-width:40%;height:48px}.cp-card .cp-logo{justify-self:start;max-width:100%;height:40px}.cp-detail-image{object-fit:cover;border-radius:var(--cp-card-radius);width:100%;height:auto;max-height:320px;margin-bottom:10px;display:block}.cp-thumb{object-fit:cover;border-radius:var(--cp-radius);width:72px;height:72px}.cp-chips{border:0;flex-wrap:wrap;gap:8px;padding:0;display:flex}.cp-chips legend{color:var(--cp-muted);margin-bottom:6px;padding:0;font-size:14px}.msm-customer .cp-chips button{background:var(--cp-surface);min-height:36px;color:var(--cp-ink);border:1px solid var(--cp-control-line);border-radius:999px;padding:6px 12px;font-weight:500}.msm-customer .cp-chips button[aria-pressed=true]{background:var(--cp-accent);color:var(--cp-accent-text);border-color:var(--cp-accent)}.cp-type h2{margin:0;font-size:17px;font-weight:600}.cp-type p{margin:0}.cp-week{text-align:center;border:0;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;padding:0;font-weight:600;display:grid}.msm-customer .cp-week button{padding:0;font-size:20px}.cp-day{gap:8px;display:grid}.cp-day h2{color:var(--cp-muted);margin:8px 0 0;font-size:15px;font-weight:600}.cp-candidate{grid-template-columns:auto 1fr auto;align-items:center;gap:4px 14px}.cp-time{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:650}.cp-candidate-body{min-width:0}.cp-candidate h3{margin:0;font-size:16px;font-weight:600}@media (width<=479px){.msm-customer .cp-nav button{font-size:14px}.cp-candidate{grid-template-columns:1fr auto}.cp-time{grid-column:1/-1}}.cp-summary{border-radius:var(--cp-radius);border:1px solid var(--cp-line);background:var(--cp-surface);gap:2px;padding:12px 14px;display:grid}.cp-summary h2{margin:0;font-size:17px;font-weight:600}.cp-summary p{color:var(--cp-ink);margin:0}.cp-summary p.cp-hint{color:var(--cp-muted)}@media (width<=359px){.msm-customer .cp-nav button{white-space:normal}}.cp-flow-head{justify-content:flex-end;padding-top:12px;display:flex}.msm-customer button.cp-option{text-align:left;background:var(--cp-surface);width:100%;color:var(--cp-ink);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:4px;padding:14px 16px;display:grid}.msm-customer button.cp-option:hover{border-color:var(--cp-accent)}.cp-option:has(>.cp-thumb){grid-template-columns:72px 1fr;column-gap:14px}.cp-option>.cp-thumb{grid-area:1/1/span 3}.cp-option:has(>.cp-thumb)>:not(.cp-thumb){grid-column:2}.cp-tags{flex-wrap:wrap;gap:6px;display:flex}.msm-customer .cp-option .cp-tag{text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--cp-tag);background:color-mix(in srgb, var(--cp-tag) 16%, transparent);max-width:100%;color:var(--cp-ink);border-radius:999px;padding:1px 8px;font-size:.8125rem;overflow:hidden}.cp-option strong{font-weight:600}.cp-option span{color:var(--cp-muted);font-weight:400}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-react",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "MSM's customer screens for React, and their server half for a partner's server",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@msm-platform/customer-sdk": "^0.3.2",
34
+ "@msm-platform/customer-sdk": "^0.4.0",
35
35
  "libphonenumber-js": "^1.13.15"
36
36
  },
37
37
  "peerDependencies": {