your-ai-workflow-firebase-os 1.14.4 → 1.14.5

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.
@@ -124,7 +124,7 @@ function De({ config: e, children: t }) {
124
124
  children: t
125
125
  });
126
126
  }
127
- var Oe = () => d(Ee), ke = "1.14.4", Ae = typeof window < "u" ? h : f, je = o(void 0), Me = (e) => {
127
+ var Oe = () => d(Ee), ke = "1.14.5", Ae = typeof window < "u" ? h : f, je = o(void 0), Me = (e) => {
128
128
  let t = e?.defaultTheme;
129
129
  return t !== "light" && t !== "dark" || e?.showThemeToggle ? null : t;
130
130
  };
@@ -45457,7 +45457,7 @@ var BW = t.forwardRef(({ className: e, label: t, error: n, currencySymbol: r, ty
45457
45457
  children: t
45458
45458
  }),
45459
45459
  /* @__PURE__ */ x("div", {
45460
- className: "relative flex items-center",
45460
+ className: "relative flex items-center lift-focus",
45461
45461
  children: [s && r && /* @__PURE__ */ b("span", {
45462
45462
  className: "absolute left-4 font-bold text-foreground/70 z-10 pointer-events-none text-[15px]",
45463
45463
  children: r
@@ -45753,7 +45753,40 @@ function iG(e) {
45753
45753
  return "Attached file";
45754
45754
  }
45755
45755
  }
45756
- var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission to upload here." : e?.message || "That upload did not work. Try again.", oG = [
45756
+ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission to upload here." : e?.message || "That upload did not work. Try again.", oG = (e, t) => {
45757
+ let n = String(t || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
45758
+ if (!n.length) return !0;
45759
+ let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
45760
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
45761
+ }, sG = (e) => Array.from(e.dataTransfer?.types || []).includes("Files");
45762
+ function cG({ onFiles: e, onReject: t, accept: n, multiple: r = !1, disabled: i = !1 }) {
45763
+ let [a, o] = v(!1), s = _(0);
45764
+ return {
45765
+ over: a && !i,
45766
+ dropProps: {
45767
+ onDragEnter: (e) => {
45768
+ i || !sG(e) || (e.preventDefault(), s.current += 1, o(!0));
45769
+ },
45770
+ onDragOver: (e) => {
45771
+ i || !sG(e) || e.preventDefault();
45772
+ },
45773
+ onDragLeave: (e) => {
45774
+ sG(e) && (s.current = Math.max(0, s.current - 1), s.current === 0 && o(!1));
45775
+ },
45776
+ onDrop: (a) => {
45777
+ if (s.current = 0, o(!1), i || !sG(a)) return;
45778
+ a.preventDefault();
45779
+ let c = Array.from(a.dataTransfer.files || []), l = c.filter((e) => oG(e, n)), u = c.filter((e) => !oG(e, n));
45780
+ u.length && t?.(u);
45781
+ let d = r ? l : l.slice(0, 1);
45782
+ d.length && e(d);
45783
+ }
45784
+ }
45785
+ };
45786
+ }
45787
+ //#endregion
45788
+ //#region src/lib/schedule.ts
45789
+ var lG = [
45757
45790
  "mon",
45758
45791
  "tue",
45759
45792
  "wed",
@@ -45761,7 +45794,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45761
45794
  "fri",
45762
45795
  "sat",
45763
45796
  "sun"
45764
- ], sG = {
45797
+ ], uG = {
45765
45798
  mon: "Monday",
45766
45799
  tue: "Tuesday",
45767
45800
  wed: "Wednesday",
@@ -45769,7 +45802,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45769
45802
  fri: "Friday",
45770
45803
  sat: "Saturday",
45771
45804
  sun: "Sunday"
45772
- }, cG = {
45805
+ }, dG = {
45773
45806
  mon: "Mon",
45774
45807
  tue: "Tue",
45775
45808
  wed: "Wed",
@@ -45777,7 +45810,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45777
45810
  fri: "Fri",
45778
45811
  sat: "Sat",
45779
45812
  sun: "Sun"
45780
- }, lG = [
45813
+ }, fG = [
45781
45814
  "sun",
45782
45815
  "mon",
45783
45816
  "tue",
@@ -45785,7 +45818,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45785
45818
  "thu",
45786
45819
  "fri",
45787
45820
  "sat"
45788
- ], uG = "sys_schedules", dG = "pub_bookings", fG = "mem_bookings", pG = [
45821
+ ], pG = "sys_schedules", mG = "pub_bookings", hG = "mem_bookings", gG = [
45789
45822
  {
45790
45823
  value: "15",
45791
45824
  label: "15 minutes"
@@ -45810,7 +45843,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45810
45843
  value: "120",
45811
45844
  label: "2 hours"
45812
45845
  }
45813
- ], mG = [
45846
+ ], _G = [
45814
45847
  {
45815
45848
  value: "7",
45816
45849
  label: "A week ahead"
@@ -45831,7 +45864,7 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45831
45864
  value: "90",
45832
45865
  label: "Three months ahead"
45833
45866
  }
45834
- ], hG = [
45867
+ ], vG = [
45835
45868
  {
45836
45869
  value: "0",
45837
45870
  label: "No notice needed"
@@ -45852,19 +45885,19 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45852
45885
  value: "48",
45853
45886
  label: "At least two days"
45854
45887
  }
45855
- ], gG = Array.from({ length: 48 }, (e, t) => {
45888
+ ], yG = Array.from({ length: 48 }, (e, t) => {
45856
45889
  let n = `${String(Math.floor(t / 2)).padStart(2, "0")}:${t % 2 ? "30" : "00"}`;
45857
45890
  return {
45858
45891
  value: n,
45859
45892
  label: n
45860
45893
  };
45861
- }), _G = [...gG.slice(1), {
45894
+ }), bG = [...yG.slice(1), {
45862
45895
  value: "24:00",
45863
45896
  label: "Midnight"
45864
- }], vG = {
45897
+ }], xG = {
45865
45898
  from: "09:00",
45866
45899
  to: "17:00"
45867
- }, yG = (e, t = e, n = "", r = TG()) => ({
45900
+ }, SG = (e, t = e, n = "", r = OG()) => ({
45868
45901
  id: e,
45869
45902
  memberId: t,
45870
45903
  memberName: n,
@@ -45877,30 +45910,30 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45877
45910
  timeZone: r,
45878
45911
  slotMinutes: 30,
45879
45912
  days: {
45880
- mon: [vG],
45881
- tue: [vG],
45882
- wed: [vG],
45883
- thu: [vG],
45884
- fri: [vG],
45913
+ mon: [xG],
45914
+ tue: [xG],
45915
+ wed: [xG],
45916
+ thu: [xG],
45917
+ fri: [xG],
45885
45918
  sat: [],
45886
45919
  sun: []
45887
45920
  },
45888
45921
  horizonDays: 30,
45889
45922
  noticeHours: 12
45890
- }), bG = /^([01]\d|2[0-3]):[0-5]\d$/, xG = /^(([01]\d|2[0-3]):[0-5]\d|24:00)$/, SG = (e) => {
45923
+ }), CG = /^([01]\d|2[0-3]):[0-5]\d$/, wG = /^(([01]\d|2[0-3]):[0-5]\d|24:00)$/, TG = (e) => {
45891
45924
  let t = String(e?.from || ""), n = String(e?.to || "");
45892
- return bG.test(t) && xG.test(n) ? {
45925
+ return CG.test(t) && wG.test(n) ? {
45893
45926
  from: t,
45894
45927
  to: n
45895
45928
  } : null;
45896
- }, CG = (e, t, n) => {
45929
+ }, EG = (e, t, n) => {
45897
45930
  let r = typeof e == "number" ? e : Number(e);
45898
45931
  return !Number.isFinite(r) || r < 0 || n && !n.includes(r) ? t : r;
45899
- }, wG = (e, t) => {
45900
- let n = !String(t?.memberId || "").trim(), r = n ? e : String(t.memberId), i = String((n ? t?.name : t?.memberName) || ""), a = yG(e, r, i, "UTC"), o = { ...a.days };
45901
- for (let e of oG) {
45932
+ }, DG = (e, t) => {
45933
+ let n = !String(t?.memberId || "").trim(), r = n ? e : String(t.memberId), i = String((n ? t?.name : t?.memberName) || ""), a = SG(e, r, i, "UTC"), o = { ...a.days };
45934
+ for (let e of lG) {
45902
45935
  let n = t?.days?.[e];
45903
- o[e] = Array.isArray(n) ? n.map(SG).filter((e) => !!e) : [];
45936
+ o[e] = Array.isArray(n) ? n.map(TG).filter((e) => !!e) : [];
45904
45937
  }
45905
45938
  let s = t?.days && typeof t.days == "object";
45906
45939
  return {
@@ -45913,26 +45946,26 @@ var aG = (e) => e?.code === "storage/unauthorized" ? "You do not have permission
45913
45946
  notifyOwner: t?.notifyOwner !== !1,
45914
45947
  confirmBooker: t?.confirmBooker !== !1,
45915
45948
  enabled: t?.enabled === !0,
45916
- timeZone: DG(t?.timeZone) ? String(t.timeZone) : a.timeZone,
45917
- slotMinutes: CG(t?.slotMinutes, 30, pG.map((e) => Number(e.value))),
45949
+ timeZone: AG(t?.timeZone) ? String(t.timeZone) : a.timeZone,
45950
+ slotMinutes: EG(t?.slotMinutes, 30, gG.map((e) => Number(e.value))),
45918
45951
  days: s ? o : a.days,
45919
- horizonDays: CG(t?.horizonDays, 30),
45920
- noticeHours: CG(t?.noticeHours, 12),
45952
+ horizonDays: EG(t?.horizonDays, 30),
45953
+ noticeHours: EG(t?.noticeHours, 12),
45921
45954
  createdAt: typeof t?.createdAt == "number" ? t.createdAt : void 0,
45922
45955
  updatedAt: typeof t?.updatedAt == "number" ? t.updatedAt : void 0
45923
45956
  };
45924
45957
  };
45925
- function TG() {
45958
+ function OG() {
45926
45959
  try {
45927
45960
  return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
45928
45961
  } catch {
45929
45962
  return "UTC";
45930
45963
  }
45931
45964
  }
45932
- var EG = /* @__PURE__ */ new Map();
45933
- function DG(e) {
45965
+ var kG = /* @__PURE__ */ new Map();
45966
+ function AG(e) {
45934
45967
  if (typeof e != "string" || !e.trim()) return !1;
45935
- let t = EG.get(e);
45968
+ let t = kG.get(e);
45936
45969
  if (t !== void 0) return t;
45937
45970
  let n = !1;
45938
45971
  try {
@@ -45940,21 +45973,21 @@ function DG(e) {
45940
45973
  } catch {
45941
45974
  n = !1;
45942
45975
  }
45943
- return EG.set(e, n), n;
45976
+ return kG.set(e, n), n;
45944
45977
  }
45945
- function OG() {
45978
+ function jG() {
45946
45979
  try {
45947
45980
  return Intl.supportedValuesOf ? Intl.supportedValuesOf("timeZone") : ["UTC"];
45948
45981
  } catch {
45949
45982
  return ["UTC"];
45950
45983
  }
45951
45984
  }
45952
- function kG(e, t = 12) {
45953
- let n = e.trim().toLowerCase().replace(/\s+/g, "_"), r = OG(), i = TG(), a = n ? r.filter((e) => e.toLowerCase().includes(n)) : r;
45985
+ function MG(e, t = 12) {
45986
+ let n = e.trim().toLowerCase().replace(/\s+/g, "_"), r = jG(), i = OG(), a = n ? r.filter((e) => e.toLowerCase().includes(n)) : r;
45954
45987
  return (a.includes(i) ? [i, ...a.filter((e) => e !== i)] : a).slice(0, t);
45955
45988
  }
45956
- var AG = /* @__PURE__ */ new Map(), jG = (e) => {
45957
- let t = AG.get(e);
45989
+ var NG = /* @__PURE__ */ new Map(), PG = (e) => {
45990
+ let t = NG.get(e);
45958
45991
  return t || (t = new Intl.DateTimeFormat("en-US", {
45959
45992
  timeZone: e,
45960
45993
  hourCycle: "h23",
@@ -45965,11 +45998,11 @@ var AG = /* @__PURE__ */ new Map(), jG = (e) => {
45965
45998
  hour: "2-digit",
45966
45999
  minute: "2-digit",
45967
46000
  second: "2-digit"
45968
- }), AG.set(e, t)), t;
46001
+ }), NG.set(e, t)), t;
45969
46002
  };
45970
- function MG(e, t) {
46003
+ function FG(e, t) {
45971
46004
  let n = {};
45972
- for (let r of jG(t).formatToParts(e)) n[r.type] = r.value;
46005
+ for (let r of PG(t).formatToParts(e)) n[r.type] = r.value;
45973
46006
  let r = Number(n.year), i = Number(n.month), a = Number(n.day), o = Number(n.hour) % 24, s = Number(n.minute);
45974
46007
  return {
45975
46008
  year: r,
@@ -45983,23 +46016,23 @@ function MG(e, t) {
45983
46016
  time: `${String(o).padStart(2, "0")}:${String(s).padStart(2, "0")}`
45984
46017
  };
45985
46018
  }
45986
- function NG(e, t) {
45987
- let n = MG(t, e), r = Date.UTC(n.year, n.month - 1, n.day, n.hour, n.minute, n.second);
46019
+ function IG(e, t) {
46020
+ let n = FG(t, e), r = Date.UTC(n.year, n.month - 1, n.day, n.hour, n.minute, n.second);
45988
46021
  return Math.round((r - t.getTime()) / 6e4);
45989
46022
  }
45990
- function PG(e, t, n) {
45991
- let [r, i, a] = e.split("-").map(Number), [o, s] = t.split(":").map(Number), c = Date.UTC(r, i - 1, a, o, s), l = NG(n, new Date(c)), u = c - l * 6e4, d = NG(n, new Date(u));
45992
- return d !== l && (u = c - d * 6e4, NG(n, new Date(u)) !== d && (u = c - Math.min(l, d) * 6e4)), new Date(u);
46023
+ function LG(e, t, n) {
46024
+ let [r, i, a] = e.split("-").map(Number), [o, s] = t.split(":").map(Number), c = Date.UTC(r, i - 1, a, o, s), l = IG(n, new Date(c)), u = c - l * 6e4, d = IG(n, new Date(u));
46025
+ return d !== l && (u = c - d * 6e4, IG(n, new Date(u)) !== d && (u = c - Math.min(l, d) * 6e4)), new Date(u);
45993
46026
  }
45994
- function FG(e, t) {
46027
+ function RG(e, t) {
45995
46028
  let [n, r, i] = e.split("-").map(Number), a = new Date(Date.UTC(n, r - 1, i + t));
45996
46029
  return `${a.getUTCFullYear()}-${String(a.getUTCMonth() + 1).padStart(2, "0")}-${String(a.getUTCDate()).padStart(2, "0")}`;
45997
46030
  }
45998
- function IG(e) {
46031
+ function zG(e) {
45999
46032
  let [t, n, r] = e.split("-").map(Number);
46000
- return lG[new Date(Date.UTC(t, n - 1, r)).getUTCDay()];
46033
+ return fG[new Date(Date.UTC(t, n - 1, r)).getUTCDay()];
46001
46034
  }
46002
- function LG(e, t) {
46035
+ function BG(e, t) {
46003
46036
  let [n, r] = e.split("-").map(Number);
46004
46037
  return new Intl.DateTimeFormat(t, {
46005
46038
  month: "long",
@@ -46007,21 +46040,21 @@ function LG(e, t) {
46007
46040
  timeZone: "UTC"
46008
46041
  }).format(new Date(Date.UTC(n, r - 1, 1)));
46009
46042
  }
46010
- function RG(e, t) {
46043
+ function VG(e, t) {
46011
46044
  let [n, r] = e.split("-").map(Number), i = new Date(Date.UTC(n, r - 1 + t, 1));
46012
46045
  return `${i.getUTCFullYear()}-${String(i.getUTCMonth() + 1).padStart(2, "0")}`;
46013
46046
  }
46014
- var zG = (e, t) => e.start < t.end && t.start < e.end, BG = (e, t) => `${e}__${t.replace(/[-:]/g, "").slice(0, 15)}`, VG = (e) => {
46047
+ var HG = (e, t) => e.start < t.end && t.start < e.end, UG = (e, t) => `${e}__${t.replace(/[-:]/g, "").slice(0, 15)}`, WG = (e) => {
46015
46048
  let [t, n] = e.split(":").map(Number);
46016
46049
  return t * 60 + n;
46017
46050
  };
46018
- function HG(e, t) {
46019
- if (!lK(e)) return [];
46020
- let { now: n } = t, r = (t.taken || []).filter((t) => t.memberId === e.memberId), i = e.timeZone, a = e.slotMinutes * 6e4, o = n.getTime() + e.noticeHours * 36e5, s = Math.max(1, Math.min(t.days ?? e.horizonDays, e.horizonDays)), c = MG(n, i).dateKey, l = /* @__PURE__ */ new Map();
46051
+ function GG(e, t) {
46052
+ if (!fK(e)) return [];
46053
+ let { now: n } = t, r = (t.taken || []).filter((t) => t.memberId === e.memberId), i = e.timeZone, a = e.slotMinutes * 6e4, o = n.getTime() + e.noticeHours * 36e5, s = Math.max(1, Math.min(t.days ?? e.horizonDays, e.horizonDays)), c = FG(n, i).dateKey, l = /* @__PURE__ */ new Map();
46021
46054
  for (let t = 0; t < s; t++) {
46022
- let n = FG(c, t), s = (e.days[IG(n)] || []).filter((e) => VG(e.to) > VG(e.from)).sort((e, t) => VG(e.from) - VG(t.from));
46055
+ let n = RG(c, t), s = (e.days[zG(n)] || []).filter((e) => WG(e.to) > WG(e.from)).sort((e, t) => WG(e.from) - WG(t.from));
46023
46056
  for (let t of s) {
46024
- let s = PG(n, t.from, i).getTime(), c = PG(n, t.to, i).getTime();
46057
+ let s = LG(n, t.from, i).getTime(), c = LG(n, t.to, i).getTime();
46025
46058
  for (let t = s; t + a <= c; t += a) {
46026
46059
  if (t < o || l.has(t)) continue;
46027
46060
  let n = {
@@ -46030,33 +46063,33 @@ function HG(e, t) {
46030
46063
  memberId: e.memberId,
46031
46064
  scheduleId: e.id
46032
46065
  };
46033
- r.some((e) => zG(e, n)) || l.set(t, n);
46066
+ r.some((e) => HG(e, n)) || l.set(t, n);
46034
46067
  }
46035
46068
  }
46036
46069
  }
46037
46070
  return [...l.keys()].sort((e, t) => e - t).map((e) => l.get(e));
46038
46071
  }
46039
- function UG(e, t) {
46040
- return e.flatMap((e) => HG(e, t)).sort((e, t) => e.start.localeCompare(t.start) || e.memberId.localeCompare(t.memberId) || e.scheduleId.localeCompare(t.scheduleId));
46072
+ function KG(e, t) {
46073
+ return e.flatMap((e) => GG(e, t)).sort((e, t) => e.start.localeCompare(t.start) || e.memberId.localeCompare(t.memberId) || e.scheduleId.localeCompare(t.scheduleId));
46041
46074
  }
46042
- var WG = (e, t) => e.filter((e) => e.memberId === t), GG = (e, t) => t.find((t) => t.id === e.scheduleId) || t.find((t) => t.memberId === e.memberId), KG = (e) => `/book/${e}`, qG = (e) => `/pay/${e}`;
46043
- function JG(e) {
46075
+ var qG = (e, t) => e.filter((e) => e.memberId === t), JG = (e, t) => t.find((t) => t.id === e.scheduleId) || t.find((t) => t.memberId === e.memberId), YG = (e) => `/book/${e}`, XG = (e) => `/pay/${e}`;
46076
+ function ZG(e) {
46044
46077
  let t = typeof window < "u" && window.location?.origin ? window.location.origin : "";
46045
46078
  return t ? `${t}${e}` : e;
46046
46079
  }
46047
- function YG(e, t, n) {
46080
+ function QG(e, t, n) {
46048
46081
  let r = /* @__PURE__ */ new Map();
46049
46082
  for (let i of e) {
46050
- let e = new Date(i.start), { dateKey: a } = MG(e, t), o = r.get(a);
46083
+ let e = new Date(i.start), { dateKey: a } = FG(e, t), o = r.get(a);
46051
46084
  o || (o = {
46052
46085
  dateKey: a,
46053
- label: XG(e, t, n),
46086
+ label: $G(e, t, n),
46054
46087
  slots: []
46055
46088
  }, r.set(a, o)), o.slots.push(i);
46056
46089
  }
46057
46090
  return [...r.values()].sort((e, t) => e.dateKey.localeCompare(t.dateKey));
46058
46091
  }
46059
- function XG(e, t, n) {
46092
+ function $G(e, t, n) {
46060
46093
  return new Intl.DateTimeFormat(n, {
46061
46094
  timeZone: t,
46062
46095
  weekday: "short",
@@ -46065,7 +46098,7 @@ function XG(e, t, n) {
46065
46098
  year: "numeric"
46066
46099
  }).format(e);
46067
46100
  }
46068
- function ZG(e, t, n) {
46101
+ function eK(e, t, n) {
46069
46102
  return new Intl.DateTimeFormat(n, {
46070
46103
  timeZone: t,
46071
46104
  hour: "numeric",
@@ -46081,17 +46114,17 @@ function ZG(e, t, n) {
46081
46114
  hourCycle: "h23"
46082
46115
  }).format(e);
46083
46116
  }
46084
- function QG(e, t, n) {
46117
+ function tK(e, t, n) {
46085
46118
  let r = new Date(e.start), i = new Date(e.end);
46086
- return `${XG(r, t, n)}, ${ZG(r, t, n)}–${ZG(i, t, n)}`;
46119
+ return `${$G(r, t, n)}, ${eK(r, t, n)}–${eK(i, t, n)}`;
46087
46120
  }
46088
- var $G = (e) => e.replace(/_/g, " ").replace(/\//g, " / ");
46089
- function eK(e, t, n, r) {
46121
+ var nK = (e) => e.replace(/_/g, " ").replace(/\//g, " / ");
46122
+ function rK(e, t, n, r) {
46090
46123
  let i = t.trim();
46091
- return `${QG(e, n, r)} (${$G(n)})${i ? ` with ${i}` : ""}`;
46124
+ return `${tK(e, n, r)} (${nK(n)})${i ? ` with ${i}` : ""}`;
46092
46125
  }
46093
- var tK = (e) => `${e.start}|${e.end}|${e.memberId}|${e.scheduleId}`;
46094
- function nK(e) {
46126
+ var iK = (e) => `${e.start}|${e.end}|${e.memberId}|${e.scheduleId}`;
46127
+ function aK(e) {
46095
46128
  if (typeof e != "string") return null;
46096
46129
  let [t, n, r, i] = e.split("|");
46097
46130
  return !t || !n || !r || Number.isNaN(Date.parse(t)) || Number.isNaN(Date.parse(n)) ? null : {
@@ -46101,22 +46134,22 @@ function nK(e) {
46101
46134
  scheduleId: i || ""
46102
46135
  };
46103
46136
  }
46104
- function rK(e, t, n, r, i) {
46137
+ function oK(e, t, n, r, i) {
46105
46138
  return {
46106
- [e]: eK(t, n, r, i),
46139
+ [e]: rK(t, n, r, i),
46107
46140
  [`${e}Start`]: t.start,
46108
46141
  [`${e}End`]: t.end,
46109
46142
  [`${e}With`]: n,
46110
46143
  [`${e}TimeZone`]: r
46111
46144
  };
46112
46145
  }
46113
- var iK = [
46146
+ var sK = [
46114
46147
  "Start",
46115
46148
  "End",
46116
46149
  "With",
46117
46150
  "TimeZone"
46118
46151
  ];
46119
- function aK(e, t) {
46152
+ function cK(e, t) {
46120
46153
  let n = e[`${t}Start`], r = e[`${t}End`];
46121
46154
  if (typeof n != "string" || typeof r != "string" || Number.isNaN(Date.parse(n)) || Number.isNaN(Date.parse(r))) return null;
46122
46155
  let i = e[`${t}With`], a = e[`${t}TimeZone`];
@@ -46127,115 +46160,115 @@ function aK(e, t) {
46127
46160
  timeZone: typeof a == "string" ? a : ""
46128
46161
  };
46129
46162
  }
46130
- function oK(e, t) {
46131
- return iK.some((n) => t.length > n.length && t.endsWith(n) && aK(e, t.slice(0, -n.length)) !== null);
46163
+ function lK(e, t) {
46164
+ return sK.some((n) => t.length > n.length && t.endsWith(n) && cK(e, t.slice(0, -n.length)) !== null);
46132
46165
  }
46133
- function sK(e, t, n) {
46134
- if (!DG(t) || t === e.timeZone) return "";
46166
+ function uK(e, t, n) {
46167
+ if (!AG(t) || t === e.timeZone) return "";
46135
46168
  let r = {
46136
46169
  start: e.start,
46137
46170
  end: e.end,
46138
46171
  memberId: "",
46139
46172
  scheduleId: ""
46140
- }, i = QG(r, t, n);
46141
- return DG(e.timeZone) && i === QG(r, e.timeZone, n) ? "" : `${i} (${$G(t)})`;
46173
+ }, i = tK(r, t, n);
46174
+ return AG(e.timeZone) && i === tK(r, e.timeZone, n) ? "" : `${i} (${nK(t)})`;
46142
46175
  }
46143
- function cK(e) {
46176
+ function dK(e) {
46144
46177
  if (!e.name.trim()) return "Give this schedule a name, like A 1-hour session.";
46145
46178
  if (!e.memberName.trim()) return "Give the person the name visitors will see.";
46146
46179
  if (!e.memberId.trim()) return "Say whose time this is.";
46147
- if (!DG(e.timeZone)) return "Pick a time zone we know, like Europe/Rome.";
46148
- if (!pG.some((t) => Number(t.value) === e.slotMinutes)) return "Say how long a booking lasts.";
46180
+ if (!AG(e.timeZone)) return "Pick a time zone we know, like Europe/Rome.";
46181
+ if (!gG.some((t) => Number(t.value) === e.slotMinutes)) return "Say how long a booking lasts.";
46149
46182
  let t = !1;
46150
- for (let n of oG) {
46183
+ for (let n of lG) {
46151
46184
  let r = e.days[n] || [];
46152
46185
  for (let i of r) {
46153
- if (t = !0, VG(i.to) <= VG(i.from)) return `On ${sG[n]}, the end must come after the start.`;
46154
- if (VG(i.to) - VG(i.from) < e.slotMinutes) return `On ${sG[n]}, the hours are shorter than one booking.`;
46186
+ if (t = !0, WG(i.to) <= WG(i.from)) return `On ${uG[n]}, the end must come after the start.`;
46187
+ if (WG(i.to) - WG(i.from) < e.slotMinutes) return `On ${uG[n]}, the hours are shorter than one booking.`;
46155
46188
  }
46156
- let i = r.slice().sort((e, t) => VG(e.from) - VG(t.from));
46157
- for (let e = 1; e < i.length; e++) if (VG(i[e].from) < VG(i[e - 1].to)) return `On ${sG[n]}, the two stretches of hours overlap.`;
46189
+ let i = r.slice().sort((e, t) => WG(e.from) - WG(t.from));
46190
+ for (let e = 1; e < i.length; e++) if (WG(i[e].from) < WG(i[e - 1].to)) return `On ${uG[n]}, the two stretches of hours overlap.`;
46158
46191
  }
46159
46192
  return t ? "" : "Turn on at least one day.";
46160
46193
  }
46161
- var lK = (e) => e.enabled && cK(e) === "", uK = (e) => {
46194
+ var fK = (e) => e.enabled && dK(e) === "", pK = (e) => {
46162
46195
  let t = e.name.trim() || "A booking", n = e.memberName.trim();
46163
46196
  return n ? `${t} with ${n}` : t;
46164
- }, dK = (e) => pG.find((t) => Number(t.value) === e)?.label || `${e} min`, fK = (e, t) => e.length === t.length && e.every((e, n) => e.from === t[n].from && e.to === t[n].to);
46165
- function pK(e) {
46166
- let t = oG.filter((t) => (e.days[t] || []).length), n = e.name.trim() || e.memberName.trim() ? uK(e) : "Unnamed";
46197
+ }, mK = (e) => gG.find((t) => Number(t.value) === e)?.label || `${e} min`, hK = (e, t) => e.length === t.length && e.every((e, n) => e.from === t[n].from && e.to === t[n].to);
46198
+ function gK(e) {
46199
+ let t = lG.filter((t) => (e.days[t] || []).length), n = e.name.trim() || e.memberName.trim() ? pK(e) : "Unnamed";
46167
46200
  if (!t.length) return `${n} — no hours yet`;
46168
- let r = e.days[t[0]], i = t.every((t) => fK(e.days[t], r)), a = t.map((e) => oG.indexOf(e));
46169
- return `${n} — ${a.every((e, t) => t === 0 || e === a[t - 1] + 1) && t.length > 2 ? `${cG[t[0]]}–${cG[t[t.length - 1]]}` : t.map((e) => cG[e]).join(", ")}${i ? ` ${r.map((e) => `${e.from}–${e.to}`).join(", ")}` : ", hours vary"} · ${dK(e.slotMinutes)} · ${$G(e.timeZone)}`;
46201
+ let r = e.days[t[0]], i = t.every((t) => hK(e.days[t], r)), a = t.map((e) => lG.indexOf(e));
46202
+ return `${n} — ${a.every((e, t) => t === 0 || e === a[t - 1] + 1) && t.length > 2 ? `${dG[t[0]]}–${dG[t[t.length - 1]]}` : t.map((e) => dG[e]).join(", ")}${i ? ` ${r.map((e) => `${e.from}–${e.to}`).join(", ")}` : ", hours vary"} · ${mK(e.slotMinutes)} · ${nK(e.timeZone)}`;
46170
46203
  }
46171
- var mK = [], hK = (e) => {
46172
- mK = e;
46173
- }, gK = () => mK, _K = [{
46204
+ var _K = [], vK = (e) => {
46205
+ _K = e;
46206
+ }, yK = () => _K, bK = [{
46174
46207
  value: "calendar",
46175
46208
  label: "A full calendar — the page is about booking"
46176
46209
  }, {
46177
46210
  value: "compact",
46178
46211
  label: "A compact time picker — one question among others"
46179
- }], vK = (e) => (Array.isArray(e?.schedules) ? e.schedules : Array.isArray(e?.members) ? e.members : []).map(String).filter(Boolean);
46180
- function yK(e) {
46212
+ }], xK = (e) => (Array.isArray(e?.schedules) ? e.schedules : Array.isArray(e?.members) ? e.members : []).map(String).filter(Boolean);
46213
+ function SK(e) {
46181
46214
  let t = e?.booking;
46182
46215
  if (!t || typeof t != "object") return null;
46183
- let n = vK(t);
46216
+ let n = xK(t);
46184
46217
  return n.length ? {
46185
46218
  schedules: n,
46186
46219
  how: String(t.how || "")
46187
46220
  } : null;
46188
46221
  }
46189
- var bK = (e, t) => e.schedules.map((e) => t.find((t) => t.id === e)).filter((e) => !!e);
46190
- function xK(e, t, n) {
46222
+ var CK = (e, t) => e.schedules.map((e) => t.find((t) => t.id === e)).filter((e) => !!e);
46223
+ function wK(e, t, n) {
46191
46224
  if (e.includes(t)) return e.filter((e) => e !== t);
46192
46225
  let r = n.find((e) => e.id === t)?.memberId;
46193
46226
  return [...r ? e.filter((e) => n.find((t) => t.id === e)?.memberId !== r) : e, t];
46194
46227
  }
46195
- var SK = (e) => {
46228
+ var TK = (e) => {
46196
46229
  let t = e.map((e) => e.memberName.trim() || "a team member");
46197
46230
  return t.length <= 1 ? t.join("") : `${t.slice(0, -1).join(", ")} and ${t[t.length - 1]}`;
46198
- }, CK = (e) => {
46199
- let t = e.map(uK);
46231
+ }, EK = (e) => {
46232
+ let t = e.map(pK);
46200
46233
  return t.length <= 1 ? t.join("") : `${t.slice(0, -1).join(", ")}, and ${t[t.length - 1]}`;
46201
46234
  };
46202
- function wK(e, t) {
46203
- let n = yK(e);
46235
+ function DK(e, t) {
46236
+ let n = SK(e);
46204
46237
  if (!n) return "";
46205
- let r = bK(n, t);
46238
+ let r = CK(n, t);
46206
46239
  if (!r.length) return "The schedules picked for booking no longer exist — pick one on the Schedule screen.";
46207
- let i = r.find((e) => !lK(e));
46208
- return i ? `Finish ${uK(i)} on the Schedule screen first.` : n.how.trim() ? "" : "Say how booking should work on this page.";
46240
+ let i = r.find((e) => !fK(e));
46241
+ return i ? `Finish ${pK(i)} on the Schedule screen first.` : n.how.trim() ? "" : "Say how booking should work on this page.";
46209
46242
  }
46210
- var TK = "Booking goes through the app's own form system: the page's form gets ONE question of type 'schedule', and the built-in form draws the picker — never build a calendar, a time picker, a list of times or a bookings collection of your own. The app shows every visitor the free times in their own time zone, stops two people taking the same time, and lists every booking on my Schedule screen.", EK = (e, t = "time") => `{ name: '${t}', type: 'schedule', label: 'Pick a time', required: true, schedules: [${e.map((e) => `'${e}'`).join(", ")}] }`, DK = "Decide how the picker looks from my words and add a look to that question. look: 'calendar' when the page is about booking — the question draws a whole calendar with the free times under it, so show the form inline with <ContactPopup formId='…' isInline /> and give it the full width of the page, the other questions following once a time is picked. look: 'compact' when booking is one question among others — the question draws a compact picker of days and times and sits among the other questions like any of them, and the form shows inline with <ContactPopup formId='…' isInline /> like any form. If my words do not say, a page that is about nothing but booking gets the calendar and every other page gets the compact picker.", OK = "Read them with useBookings() from 'your-ai-workflow-firebase-os' — { loading, bookings, error }, each booking with id, start and end (ISO, UTC), memberId, memberName, name, email, answers and formId — the upcoming ones, soonest first; show error when it is set, format times in the reader's own zone, and cancel one with cancelBooking(id) from the same package. Never read mem_bookings or pub_bookings by hand, and never write to them.";
46211
- function kK(e, t, n) {
46212
- let r = yK(e);
46243
+ var OK = "Booking goes through the app's own form system: the page's form gets ONE question of type 'schedule', and the built-in form draws the picker — never build a calendar, a time picker, a list of times or a bookings collection of your own. The app shows every visitor the free times in their own time zone, stops two people taking the same time, and lists every booking on my Schedule screen.", kK = (e, t = "time") => `{ name: '${t}', type: 'schedule', label: 'Pick a time', required: true, schedules: [${e.map((e) => `'${e}'`).join(", ")}] }`, AK = "Decide how the picker looks from my words and add a look to that question. look: 'calendar' when the page is about booking — the question draws a whole calendar with the free times under it, so show the form inline with <ContactPopup formId='…' isInline /> and give it the full width of the page, the other questions following once a time is picked. look: 'compact' when booking is one question among others — the question draws a compact picker of days and times and sits among the other questions like any of them, and the form shows inline with <ContactPopup formId='…' isInline /> like any form. If my words do not say, a page that is about nothing but booking gets the calendar and every other page gets the compact picker.", jK = "Read them with useBookings() from 'your-ai-workflow-firebase-os' — { loading, bookings, error }, each booking with id, start and end (ISO, UTC), memberId, memberName, name, email, answers and formId — the upcoming ones, soonest first; show error when it is set, format times in the reader's own zone, and cancel one with cancelBooking(id) from the same package. Never read mem_bookings or pub_bookings by hand, and never write to them.";
46244
+ function MK(e, t, n) {
46245
+ let r = SK(e);
46213
46246
  if (!r) return [];
46214
- let i = bK(r, t).filter(lK);
46247
+ let i = CK(r, t).filter(fK);
46215
46248
  if (!i.length) return [];
46216
- let a = SK(i), o = [];
46217
- n ? o.push(`This page is where my team follows the times people book with ${a}. ${OK}`) : o.push(`People book ${CK(i)} on this page — how long a booking lasts is set by the schedule, so never state or ask for a length. ${TK}`, `Add exactly this question to the page's form, copied as it is: ${EK(i.map((e) => e.id))}`, DK);
46249
+ let a = TK(i), o = [];
46250
+ n ? o.push(`This page is where my team follows the times people book with ${a}. ${jK}`) : o.push(`People book ${EK(i)} on this page — how long a booking lasts is set by the schedule, so never state or ask for a length. ${OK}`, `Add exactly this question to the page's form, copied as it is: ${kK(i.map((e) => e.id))}`, AK);
46218
46251
  let s = r.how.trim();
46219
46252
  return s && o.push(`Here is how booking should work on this page: ${s}`), o;
46220
46253
  }
46221
- function AK(e, t, n, r) {
46222
- let i = yK(t);
46254
+ function NK(e, t, n, r) {
46255
+ let i = SK(t);
46223
46256
  if (!i) return "";
46224
- let a = bK(i, n).filter(lK);
46257
+ let a = CK(i, n).filter(fK);
46225
46258
  if (!a.length) return "";
46226
- let o = SK(a);
46227
- return r ? `Times are booked with ${o} on the page at ${e}, which this page is linked to. Show those bookings here. ${OK}` : `Times are booked with ${o} on the page at ${e}, which this page is linked to — the booking itself happens there. Put no picker on this page unless I ask for one below.`;
46259
+ let o = TK(a);
46260
+ return r ? `Times are booked with ${o} on the page at ${e}, which this page is linked to. Show those bookings here. ${jK}` : `Times are booked with ${o} on the page at ${e}, which this page is linked to — the booking itself happens there. Put no picker on this page unless I ask for one below.`;
46228
46261
  }
46229
46262
  //#endregion
46230
46263
  //#region src/components/fields/Fields.tsx
46231
- var jK = "rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-colors hover:border-accent/40", MK = "inline-flex items-center justify-center gap-1.5 h-8 px-2.5 sm:h-9 sm:px-3 shrink-0 whitespace-nowrap rounded-[var(--btn-radius,0.75rem)] text-[12.5px] font-semibold border border-[var(--panel-border)] bg-transparent text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/[0.04] active:scale-[0.98] transition-all cursor-pointer disabled:opacity-40 disabled:pointer-events-none", NK = "w-full h-11 px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] text-[14px] text-foreground outline-none transition-all duration-300 placeholder:text-foreground/35 hover:border-accent/40 focus:border-accent disabled:opacity-50 disabled:cursor-not-allowed console-field", PK = "w-full h-11 flex items-center px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-all duration-300 hover:border-accent/40 focus-within:border-accent console-field", FK = "flex-1 min-w-0 h-full bg-transparent border-none outline-none shadow-none text-[14px] text-foreground placeholder:text-foreground/35 disabled:cursor-not-allowed", IK = "text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none", LK = "text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug";
46232
- function RK({ children: e, tone: t = "quiet" }) {
46264
+ var PK = "rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-colors hover:border-accent/40", FK = "inline-flex items-center justify-center gap-1.5 h-8 px-2.5 sm:h-9 sm:px-3 shrink-0 whitespace-nowrap rounded-[var(--btn-radius,0.75rem)] text-[12.5px] font-semibold border border-[var(--panel-border)] bg-transparent text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/[0.04] active:scale-[0.98] transition-all cursor-pointer disabled:opacity-40 disabled:pointer-events-none", IK = "w-full h-11 px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] text-[14px] text-foreground outline-none transition-all duration-300 placeholder:text-foreground/35 hover:border-accent/40 focus:border-accent disabled:opacity-50 disabled:cursor-not-allowed console-field", LK = "w-full h-11 flex items-center px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-all duration-300 hover:border-accent/40 focus-within:border-accent console-field", RK = "flex-1 min-w-0 h-full bg-transparent border-none outline-none shadow-none text-[14px] text-foreground placeholder:text-foreground/35 disabled:cursor-not-allowed", zK = "text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none", BK = "text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug";
46265
+ function VK({ children: e, tone: t = "quiet" }) {
46233
46266
  return /* @__PURE__ */ b("p", {
46234
46267
  className: `text-[12.5px] font-medium leading-relaxed px-1 ${t === "error" ? "text-red-500" : "text-foreground/50"}`,
46235
46268
  children: e
46236
46269
  });
46237
46270
  }
46238
- function zK({ onClick: e, children: t }) {
46271
+ function HK({ onClick: e, children: t }) {
46239
46272
  return /* @__PURE__ */ b("button", {
46240
46273
  type: "button",
46241
46274
  onClick: e,
@@ -46243,26 +46276,26 @@ function zK({ onClick: e, children: t }) {
46243
46276
  children: t
46244
46277
  });
46245
46278
  }
46246
- function BK({ state: e = "saved", label: t }) {
46279
+ function UK({ state: e = "saved", label: t }) {
46247
46280
  return /* @__PURE__ */ x("span", {
46248
46281
  className: "inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-foreground/50 whitespace-nowrap shrink-0",
46249
46282
  children: [e === "saving" ? /* @__PURE__ */ b(R, { className: "w-3 h-3 animate-spin text-foreground/40 shrink-0" }) : /* @__PURE__ */ b("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${e === "saved" ? "bg-emerald-500" : e === "error" ? "bg-red-500" : "bg-foreground/25"}` }), t]
46250
46283
  });
46251
46284
  }
46252
- function VK({ icon: e, children: t, onClick: n, disabled: r, busy: i, tone: a = "default", className: o = "", title: s, compact: c }) {
46285
+ function WK({ icon: e, children: t, onClick: n, disabled: r, busy: i, tone: a = "default", className: o = "", title: s, compact: c }) {
46253
46286
  return /* @__PURE__ */ x("button", {
46254
46287
  type: "button",
46255
46288
  title: s,
46256
46289
  onClick: n,
46257
46290
  disabled: r || i,
46258
- className: `${MK} ${a === "danger" ? "hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06]" : ""} ${c ? "max-sm:w-8 max-sm:px-0 max-sm:gap-0 max-sm:border-transparent max-sm:hover:border-transparent max-sm:hover:bg-foreground/[0.06]" : ""} ${o}`,
46291
+ className: `${FK} ${a === "danger" ? "hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06]" : ""} ${c ? "max-sm:w-8 max-sm:px-0 max-sm:gap-0 max-sm:border-transparent max-sm:hover:border-transparent max-sm:hover:bg-foreground/[0.06]" : ""} ${o}`,
46259
46292
  children: [i ? /* @__PURE__ */ b(R, { className: "w-3.5 h-3.5 animate-spin shrink-0" }) : e ? /* @__PURE__ */ b(e, { className: "w-3.5 h-3.5 shrink-0" }) : null, c ? /* @__PURE__ */ b("span", {
46260
46293
  className: "max-sm:hidden sm:inline-flex items-center gap-1.5",
46261
46294
  children: t
46262
46295
  }) : t]
46263
46296
  });
46264
46297
  }
46265
- function HK({ icon: e, title: t, description: n, actions: r, children: i, defaultOpen: a = !0, collapsible: o = !0 }) {
46298
+ function GK({ icon: e, title: t, description: n, actions: r, children: i, defaultOpen: a = !0, collapsible: o = !0 }) {
46266
46299
  let [s, c] = v(a), l = o ? s : !0;
46267
46300
  return /* @__PURE__ */ x("div", {
46268
46301
  className: "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] overflow-hidden transition-all",
@@ -46318,7 +46351,7 @@ function HK({ icon: e, title: t, description: n, actions: r, children: i, defaul
46318
46351
  })]
46319
46352
  });
46320
46353
  }
46321
- function UK({ icon: e, title: t, description: n, chip: r, enabled: i, onChange: a, label: o, children: s }) {
46354
+ function KK({ icon: e, title: t, description: n, chip: r, enabled: i, onChange: a, label: o, children: s }) {
46322
46355
  return /* @__PURE__ */ x("div", {
46323
46356
  className: "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] overflow-hidden",
46324
46357
  children: [/* @__PURE__ */ x("div", {
@@ -46340,11 +46373,11 @@ function UK({ icon: e, title: t, description: n, chip: r, enabled: i, onChange:
46340
46373
  className: "row-start-1 row-span-2 col-start-3 self-center justify-self-end flex items-center gap-2 sm:gap-3 shrink-0",
46341
46374
  children: [r && /* @__PURE__ */ b("span", {
46342
46375
  className: "max-sm:hidden",
46343
- children: /* @__PURE__ */ b(BK, {
46376
+ children: /* @__PURE__ */ b(UK, {
46344
46377
  state: r.state,
46345
46378
  label: r.label
46346
46379
  })
46347
- }), i !== null && /* @__PURE__ */ b(XK, {
46380
+ }), i !== null && /* @__PURE__ */ b($K, {
46348
46381
  enabled: i,
46349
46382
  onChange: a,
46350
46383
  label: o || t
@@ -46357,14 +46390,14 @@ function UK({ icon: e, title: t, description: n, chip: r, enabled: i, onChange:
46357
46390
  })]
46358
46391
  });
46359
46392
  }
46360
- function WK({ label: e, hint: t, action: n, children: r, error: i }) {
46393
+ function qK({ label: e, hint: t, action: n, children: r, error: i }) {
46361
46394
  return /* @__PURE__ */ x("div", {
46362
46395
  className: "flex flex-col w-full",
46363
46396
  children: [
46364
46397
  /* @__PURE__ */ x("div", {
46365
46398
  className: "flex items-center justify-between gap-3 mb-1 sm:mb-1.5 ml-1",
46366
46399
  children: [/* @__PURE__ */ b("label", {
46367
- className: IK,
46400
+ className: zK,
46368
46401
  children: e
46369
46402
  }), n]
46370
46403
  }),
@@ -46380,14 +46413,14 @@ function WK({ label: e, hint: t, action: n, children: r, error: i }) {
46380
46413
  ]
46381
46414
  });
46382
46415
  }
46383
- function GK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder: a, prefix: o, error: s, disabled: c, action: l }) {
46384
- return /* @__PURE__ */ b(WK, {
46416
+ function JK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder: a, prefix: o, error: s, disabled: c, action: l }) {
46417
+ return /* @__PURE__ */ b(qK, {
46385
46418
  label: e,
46386
46419
  hint: t,
46387
46420
  error: s,
46388
46421
  action: l,
46389
46422
  children: o ? /* @__PURE__ */ x("div", {
46390
- className: `${PK} ${s ? "is-invalid border-red-500/60" : ""} ${c ? "opacity-50" : ""}`,
46423
+ className: `${LK} ${s ? "is-invalid border-red-500/60" : ""} ${c ? "opacity-50" : ""}`,
46391
46424
  children: [/* @__PURE__ */ b("span", {
46392
46425
  className: "mr-0.5 text-[14px] font-semibold text-foreground/40 select-none shrink-0",
46393
46426
  children: o
@@ -46399,7 +46432,7 @@ function GK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder:
46399
46432
  onChange: (e) => r(e.target.value),
46400
46433
  onBlur: i,
46401
46434
  "aria-label": e,
46402
- className: `${FK} no-glow`
46435
+ className: `${RK} no-glow`
46403
46436
  })]
46404
46437
  }) : /* @__PURE__ */ b("input", {
46405
46438
  type: "text",
@@ -46409,11 +46442,11 @@ function GK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder:
46409
46442
  onChange: (e) => r(e.target.value),
46410
46443
  onBlur: i,
46411
46444
  "aria-label": e,
46412
- className: `${NK} ${s ? "is-invalid border-red-500/60" : ""}`
46445
+ className: `${IK} ${s ? "is-invalid border-red-500/60" : ""}`
46413
46446
  })
46414
46447
  });
46415
46448
  }
46416
- function KK({ value: e, className: n = "", ...r }) {
46449
+ function YK({ value: e, className: n = "", ...r }) {
46417
46450
  let i = _(null), a = t.useCallback(() => {
46418
46451
  let e = i.current;
46419
46452
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight + (e.offsetHeight - e.clientHeight)}px`);
@@ -46432,28 +46465,28 @@ function KK({ value: e, className: n = "", ...r }) {
46432
46465
  rows: r.rows || 1
46433
46466
  });
46434
46467
  }
46435
- function qK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder: a, rows: o, error: s }) {
46436
- return /* @__PURE__ */ b(WK, {
46468
+ function XK({ label: e, hint: t, value: n, onChange: r, onBlur: i, placeholder: a, rows: o, error: s }) {
46469
+ return /* @__PURE__ */ b(qK, {
46437
46470
  label: e,
46438
46471
  hint: t,
46439
46472
  error: s,
46440
- children: /* @__PURE__ */ b(KK, {
46473
+ children: /* @__PURE__ */ b(YK, {
46441
46474
  value: n ?? "",
46442
46475
  placeholder: a,
46443
46476
  rows: o,
46444
46477
  onChange: (e) => r(e.target.value),
46445
46478
  onBlur: i,
46446
46479
  "aria-label": e,
46447
- className: `${NK.replace("h-11 ", "")} min-h-11 py-2.5 leading-5 ${s ? "is-invalid border-red-500/60" : ""}`
46480
+ className: `${IK.replace("h-11 ", "")} min-h-11 py-2.5 leading-5 ${s ? "is-invalid border-red-500/60" : ""}`
46448
46481
  })
46449
46482
  });
46450
46483
  }
46451
- function JK({ label: e, hint: t, value: n, onChange: r, options: i, placeholder: a = "None", allowEmpty: o = !0, disabled: s }) {
46484
+ function ZK({ label: e, hint: t, value: n, onChange: r, options: i, placeholder: a = "None", allowEmpty: o = !0, disabled: s }) {
46452
46485
  let c = [...o ? [{
46453
46486
  value: "",
46454
46487
  label: a
46455
46488
  }] : [], ...i.filter((e) => e.value !== "")];
46456
- return /* @__PURE__ */ b(WK, {
46489
+ return /* @__PURE__ */ b(qK, {
46457
46490
  label: e,
46458
46491
  hint: t,
46459
46492
  children: /* @__PURE__ */ b(UW, {
@@ -46469,7 +46502,7 @@ function JK({ label: e, hint: t, value: n, onChange: r, options: i, placeholder:
46469
46502
  })
46470
46503
  });
46471
46504
  }
46472
- function YK({ label: e, hint: t, enabled: n, onChange: r, disabled: i, hintWideOnly: a }) {
46505
+ function QK({ label: e, hint: t, enabled: n, onChange: r, disabled: i, hintWideOnly: a }) {
46473
46506
  return /* @__PURE__ */ x("div", {
46474
46507
  className: "flex items-center justify-between gap-4 w-full",
46475
46508
  children: [/* @__PURE__ */ x("div", {
@@ -46481,7 +46514,7 @@ function YK({ label: e, hint: t, enabled: n, onChange: r, disabled: i, hintWideO
46481
46514
  className: `text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug${a ? " max-sm:hidden" : ""}`,
46482
46515
  children: t
46483
46516
  })]
46484
- }), /* @__PURE__ */ b(XK, {
46517
+ }), /* @__PURE__ */ b($K, {
46485
46518
  enabled: n,
46486
46519
  onChange: r,
46487
46520
  disabled: i,
@@ -46489,7 +46522,7 @@ function YK({ label: e, hint: t, enabled: n, onChange: r, disabled: i, hintWideO
46489
46522
  })]
46490
46523
  });
46491
46524
  }
46492
- function XK({ enabled: e, onChange: t, disabled: n, label: r }) {
46525
+ function $K({ enabled: e, onChange: t, disabled: n, label: r }) {
46493
46526
  return /* @__PURE__ */ b("button", {
46494
46527
  type: "button",
46495
46528
  role: "switch",
@@ -46503,29 +46536,29 @@ function XK({ enabled: e, onChange: t, disabled: n, label: r }) {
46503
46536
  children: /* @__PURE__ */ b("span", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-[var(--button-fg,#fff)] shadow transition-transform ${e ? "translate-x-4" : "translate-x-0"}` })
46504
46537
  });
46505
46538
  }
46506
- function ZK({ saving: e, savedAt: t }) {
46507
- return e ? /* @__PURE__ */ b(BK, {
46539
+ function eq({ saving: e, savedAt: t }) {
46540
+ return e ? /* @__PURE__ */ b(UK, {
46508
46541
  state: "saving",
46509
46542
  label: "Saving"
46510
- }) : t ? /* @__PURE__ */ b(BK, {
46543
+ }) : t ? /* @__PURE__ */ b(UK, {
46511
46544
  state: "saved",
46512
46545
  label: "Saved"
46513
46546
  }) : null;
46514
46547
  }
46515
46548
  //#endregion
46516
46549
  //#region src/components/fields/TimeZoneField.tsx
46517
- function QK({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i }) {
46518
- let [a, o] = v(""), s = TG(), c = (n || "").trim(), l = g(() => kG(a), [a]), u = a.trim().length > 0, d = t ?? (c === s ? "Detected from your browser." : `Your browser is in ${$G(s)}.`), f = /* @__PURE__ */ x("div", {
46550
+ function tq({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i }) {
46551
+ let [a, o] = v(""), s = OG(), c = (n || "").trim(), l = g(() => MG(a), [a]), u = a.trim().length > 0, d = t ?? (c === s ? "Detected from your browser." : `Your browser is in ${nK(s)}.`), f = /* @__PURE__ */ x("div", {
46519
46552
  className: "flex flex-col gap-2",
46520
46553
  children: [/* @__PURE__ */ x("div", {
46521
- className: PK,
46554
+ className: LK,
46522
46555
  children: [c && !u ? /* @__PURE__ */ x("span", {
46523
46556
  className: "inline-flex items-center gap-2 mr-2.5 shrink-0 min-w-0 text-accent",
46524
46557
  children: [
46525
46558
  /* @__PURE__ */ b(Wm, { className: "w-4 h-4 shrink-0" }),
46526
46559
  /* @__PURE__ */ b("span", {
46527
46560
  className: "text-[13px] font-semibold truncate",
46528
- children: $G(c)
46561
+ children: nK(c)
46529
46562
  }),
46530
46563
  /* @__PURE__ */ b(ns, { className: "w-3.5 h-3.5 shrink-0" })
46531
46564
  ]
@@ -46535,7 +46568,7 @@ function QK({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i
46535
46568
  onChange: (e) => o(e.target.value),
46536
46569
  placeholder: c ? "Type a city to change it" : "Type a city, e.g. Rome",
46537
46570
  "aria-label": "Search time zones",
46538
- className: `${FK} no-glow`
46571
+ className: `${RK} no-glow`
46539
46572
  })]
46540
46573
  }), u && /* @__PURE__ */ b("div", {
46541
46574
  className: "rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] p-1.5 max-h-56 overflow-y-auto",
@@ -46548,7 +46581,7 @@ function QK({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i
46548
46581
  r(e), o("");
46549
46582
  },
46550
46583
  className: `w-full text-left px-2.5 py-1.5 rounded-lg text-[13px] font-medium transition-colors cursor-pointer ${e === c ? "bg-accent text-[var(--button-fg,#fff)]" : "text-foreground/70 hover:text-foreground hover:bg-foreground/[0.06]"}`,
46551
- children: [$G(e), e === s ? " · detected" : ""]
46584
+ children: [nK(e), e === s ? " · detected" : ""]
46552
46585
  }, e))
46553
46586
  }) : /* @__PURE__ */ b("span", {
46554
46587
  className: "block px-2 py-2 text-[12px] font-medium text-foreground/45",
@@ -46556,7 +46589,7 @@ function QK({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i
46556
46589
  })
46557
46590
  })]
46558
46591
  });
46559
- return i ? f : /* @__PURE__ */ b(WK, {
46592
+ return i ? f : /* @__PURE__ */ b(qK, {
46560
46593
  label: e,
46561
46594
  hint: d,
46562
46595
  children: f
@@ -46564,7 +46597,7 @@ function QK({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i
46564
46597
  }
46565
46598
  //#endregion
46566
46599
  //#region src/components/schedule/TimeChips.tsx
46567
- function $K({ timeZone: e, onTimeZone: t }) {
46600
+ function nq({ timeZone: e, onTimeZone: t }) {
46568
46601
  let [n, r] = v(!1);
46569
46602
  return /* @__PURE__ */ x("div", {
46570
46603
  className: "flex flex-col gap-2",
@@ -46572,7 +46605,7 @@ function $K({ timeZone: e, onTimeZone: t }) {
46572
46605
  className: "text-[12px] font-medium text-foreground/50",
46573
46606
  children: [
46574
46607
  "Times in ",
46575
- $G(e),
46608
+ nK(e),
46576
46609
  " · ",
46577
46610
  /* @__PURE__ */ b("button", {
46578
46611
  type: "button",
@@ -46581,7 +46614,7 @@ function $K({ timeZone: e, onTimeZone: t }) {
46581
46614
  children: n ? "Done" : "Change"
46582
46615
  })
46583
46616
  ]
46584
- }), n && /* @__PURE__ */ b(QK, {
46617
+ }), n && /* @__PURE__ */ b(tq, {
46585
46618
  compact: !0,
46586
46619
  value: e,
46587
46620
  onChange: (e) => {
@@ -46590,15 +46623,15 @@ function $K({ timeZone: e, onTimeZone: t }) {
46590
46623
  })]
46591
46624
  });
46592
46625
  }
46593
- var eq = (e, t) => !!e && e.memberId === t.memberId && e.start === t.start && e.scheduleId === t.scheduleId;
46594
- function tq({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
46626
+ var rq = (e, t) => !!e && e.memberId === t.memberId && e.start === t.start && e.scheduleId === t.scheduleId;
46627
+ function iq({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
46595
46628
  let a = new Set(i.map((e) => e.memberId)).size > 1, o = (e) => (i.find((t) => t.id === e.scheduleId) || i.find((t) => t.memberId === e.memberId))?.memberName.trim() || "";
46596
46629
  return e.length ? /* @__PURE__ */ b("div", {
46597
46630
  className: "flex flex-wrap gap-2",
46598
46631
  role: "listbox",
46599
46632
  "aria-label": "Free times",
46600
46633
  children: e.map((e) => {
46601
- let i = eq(t, e), s = ZG(new Date(e.start), r), c = a ? o(e) : "";
46634
+ let i = rq(t, e), s = eK(new Date(e.start), r), c = a ? o(e) : "";
46602
46635
  return /* @__PURE__ */ x("button", {
46603
46636
  type: "button",
46604
46637
  role: "option",
@@ -46614,15 +46647,15 @@ function tq({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
46614
46647
  className: `text-[11px] font-medium leading-tight ${i ? "opacity-90" : "text-foreground/50"}`,
46615
46648
  children: c
46616
46649
  })]
46617
- }, `${BG(e.memberId, e.start)}__${e.scheduleId}`);
46650
+ }, `${UG(e.memberId, e.start)}__${e.scheduleId}`);
46618
46651
  })
46619
46652
  }) : null;
46620
46653
  }
46621
46654
  //#endregion
46622
46655
  //#region src/components/schedule/SlotPicker.tsx
46623
- function nq(e, t, n, r) {
46656
+ function aq(e, t, n, r) {
46624
46657
  return {
46625
- days: g(() => YG(UG(e, {
46658
+ days: g(() => QG(KG(e, {
46626
46659
  now: r ? r() : /* @__PURE__ */ new Date(),
46627
46660
  taken: t
46628
46661
  }), n), [
@@ -46634,21 +46667,21 @@ function nq(e, t, n, r) {
46634
46667
  horizon: e.reduce((e, t) => Math.max(e, t.horizonDays), 0)
46635
46668
  };
46636
46669
  }
46637
- var rq = (e, t) => e ? MG(new Date(e.start), t).dateKey : "";
46638
- function iq({ horizon: e }) {
46670
+ var oq = (e, t) => e ? FG(new Date(e.start), t).dateKey : "";
46671
+ function sq({ horizon: e }) {
46639
46672
  return /* @__PURE__ */ b("p", {
46640
46673
  className: "text-[13px] font-medium text-foreground/50 py-2",
46641
46674
  children: e ? `No free times in the next ${e} days.` : "No free times at the moment."
46642
46675
  });
46643
46676
  }
46644
- function aq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
46645
- let { days: s, horizon: c } = nq(e, r, i, o), [l, u] = v({
46677
+ function cq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
46678
+ let { days: s, horizon: c } = aq(e, r, i, o), [l, u] = v({
46646
46679
  tz: i,
46647
46680
  day: ""
46648
- }), d = l.tz === i ? l.day : "", f = (s.some((e) => e.dateKey === d) ? d : "") || rq(t, i) || s[0]?.dateKey || "", p = s.find((e) => e.dateKey === f) || s[0];
46681
+ }), d = l.tz === i ? l.day : "", f = (s.some((e) => e.dateKey === d) ? d : "") || oq(t, i) || s[0]?.dateKey || "", p = s.find((e) => e.dateKey === f) || s[0];
46649
46682
  return /* @__PURE__ */ x("div", {
46650
46683
  className: "flex flex-col gap-3 w-full",
46651
- children: [s.length === 0 ? /* @__PURE__ */ b(iq, { horizon: c }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
46684
+ children: [s.length === 0 ? /* @__PURE__ */ b(sq, { horizon: c }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
46652
46685
  className: "flex gap-2 overflow-x-auto no-scrollbar pb-1 -mx-1 px-1",
46653
46686
  role: "tablist",
46654
46687
  "aria-label": "Days with free times",
@@ -46667,13 +46700,13 @@ function aq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46667
46700
  children: e.label
46668
46701
  }, e.dateKey);
46669
46702
  })
46670
- }), p && /* @__PURE__ */ b(tq, {
46703
+ }), p && /* @__PURE__ */ b(iq, {
46671
46704
  slots: p.slots,
46672
46705
  value: t,
46673
46706
  onChange: n,
46674
46707
  timeZone: i,
46675
46708
  members: e
46676
- })] }), /* @__PURE__ */ b($K, {
46709
+ })] }), /* @__PURE__ */ b(nq, {
46677
46710
  timeZone: i,
46678
46711
  onTimeZone: a
46679
46712
  })]
@@ -46681,7 +46714,7 @@ function aq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46681
46714
  }
46682
46715
  //#endregion
46683
46716
  //#region src/components/schedule/BookingCalendar.tsx
46684
- var oq = [
46717
+ var lq = [
46685
46718
  "M",
46686
46719
  "T",
46687
46720
  "W",
@@ -46689,22 +46722,22 @@ var oq = [
46689
46722
  "F",
46690
46723
  "S",
46691
46724
  "S"
46692
- ], sq = (e) => e.slice(0, 7);
46693
- function cq(e) {
46694
- let t = `${e}-01`, n = oG.indexOf(IG(t)), r = Array.from({ length: n }, () => null);
46725
+ ], uq = (e) => e.slice(0, 7);
46726
+ function dq(e) {
46727
+ let t = `${e}-01`, n = lG.indexOf(zG(t)), r = Array.from({ length: n }, () => null);
46695
46728
  for (let n = 0;; n++) {
46696
- let i = FG(t, n);
46697
- if (sq(i) !== e) break;
46729
+ let i = RG(t, n);
46730
+ if (uq(i) !== e) break;
46698
46731
  r.push(i);
46699
46732
  }
46700
46733
  return r;
46701
46734
  }
46702
- function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
46703
- let { days: s, horizon: c } = nq(e, r, i, o), l = MG(o ? o() : /* @__PURE__ */ new Date(), i).dateKey, u = new Map(s.map((e) => [e.dateKey, e])), d = rq(t, i), [f, p] = v(() => ({
46735
+ function fq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
46736
+ let { days: s, horizon: c } = aq(e, r, i, o), l = FG(o ? o() : /* @__PURE__ */ new Date(), i).dateKey, u = new Map(s.map((e) => [e.dateKey, e])), d = oq(t, i), [f, p] = v(() => ({
46704
46737
  tz: i,
46705
46738
  day: d,
46706
- month: sq(d || s[0]?.dateKey || l)
46707
- })), m = f.tz === i, h = m ? f.day : d, g = m ? f.month : sq(d || s[0]?.dateKey || l), _ = (e) => p({
46739
+ month: uq(d || s[0]?.dateKey || l)
46740
+ })), m = f.tz === i, h = m ? f.day : d, g = m ? f.month : uq(d || s[0]?.dateKey || l), _ = (e) => p({
46708
46741
  tz: i,
46709
46742
  day: h,
46710
46743
  month: e(g)
@@ -46712,11 +46745,11 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46712
46745
  tz: i,
46713
46746
  day: e,
46714
46747
  month: g
46715
- }), C = h ? u.get(h) : void 0, w = cq(g);
46748
+ }), C = h ? u.get(h) : void 0, w = dq(g);
46716
46749
  return /* @__PURE__ */ x("div", {
46717
46750
  className: "flex flex-col gap-4 w-full",
46718
46751
  children: [
46719
- s.length === 0 && /* @__PURE__ */ b(iq, { horizon: c }),
46752
+ s.length === 0 && /* @__PURE__ */ b(sq, { horizon: c }),
46720
46753
  /* @__PURE__ */ x("div", {
46721
46754
  className: "flex flex-col md:flex-row gap-4 md:gap-6 w-full",
46722
46755
  children: [/* @__PURE__ */ x("div", {
@@ -46725,27 +46758,27 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46725
46758
  className: "flex items-center justify-between gap-2",
46726
46759
  children: [/* @__PURE__ */ b("h4", {
46727
46760
  className: "text-[15px] sm:text-[17px] font-bold text-foreground tracking-tight truncate",
46728
- children: LG(g)
46761
+ children: BG(g)
46729
46762
  }), /* @__PURE__ */ x("div", {
46730
46763
  className: "flex items-center gap-1 shrink-0",
46731
46764
  children: [
46732
46765
  /* @__PURE__ */ b("button", {
46733
46766
  type: "button",
46734
- onClick: () => _(() => sq(l)),
46767
+ onClick: () => _(() => uq(l)),
46735
46768
  className: "px-3 py-1.5 text-[12.5px] font-bold border border-[var(--panel-border)] rounded-xl mr-1 hover:bg-foreground/5 transition-colors cursor-pointer",
46736
46769
  children: "Today"
46737
46770
  }),
46738
46771
  /* @__PURE__ */ b("button", {
46739
46772
  type: "button",
46740
46773
  "aria-label": "Previous month",
46741
- onClick: () => _((e) => RG(e, -1)),
46774
+ onClick: () => _((e) => VG(e, -1)),
46742
46775
  className: "p-1.5 rounded-xl text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-colors border border-transparent hover:border-[var(--panel-border)] cursor-pointer",
46743
46776
  children: /* @__PURE__ */ b(ps, { className: "w-4 h-4" })
46744
46777
  }),
46745
46778
  /* @__PURE__ */ b("button", {
46746
46779
  type: "button",
46747
46780
  "aria-label": "Next month",
46748
- onClick: () => _((e) => RG(e, 1)),
46781
+ onClick: () => _((e) => VG(e, 1)),
46749
46782
  className: "p-1.5 rounded-xl text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-colors border border-transparent hover:border-[var(--panel-border)] cursor-pointer",
46750
46783
  children: /* @__PURE__ */ b(ms, { className: "w-4 h-4" })
46751
46784
  })
@@ -46754,8 +46787,8 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46754
46787
  }), /* @__PURE__ */ x("div", {
46755
46788
  className: "grid grid-cols-7 gap-1",
46756
46789
  role: "grid",
46757
- "aria-label": LG(g),
46758
- children: [oq.map((e, t) => /* @__PURE__ */ b("div", {
46790
+ "aria-label": BG(g),
46791
+ children: [lq.map((e, t) => /* @__PURE__ */ b("div", {
46759
46792
  className: "text-center text-[11px] font-bold uppercase tracking-wider text-foreground/40 py-1",
46760
46793
  children: e
46761
46794
  }, t)), w.map((e, t) => {
@@ -46782,7 +46815,7 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46782
46815
  children: C ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("p", {
46783
46816
  className: "text-[13px] font-bold text-foreground",
46784
46817
  children: C.label
46785
- }), /* @__PURE__ */ b(tq, {
46818
+ }), /* @__PURE__ */ b(iq, {
46786
46819
  slots: C.slots,
46787
46820
  value: t,
46788
46821
  onChange: n,
@@ -46794,7 +46827,7 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46794
46827
  }) : null
46795
46828
  })]
46796
46829
  }),
46797
- /* @__PURE__ */ b($K, {
46830
+ /* @__PURE__ */ b(nq, {
46798
46831
  timeZone: i,
46799
46832
  onTimeZone: a
46800
46833
  })
@@ -46803,15 +46836,15 @@ function lq({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
46803
46836
  }
46804
46837
  //#endregion
46805
46838
  //#region src/lib/scheduleData.ts
46806
- function uq() {
46839
+ function pq() {
46807
46840
  let [e, t] = v({
46808
46841
  loading: !0,
46809
46842
  schedules: []
46810
46843
  });
46811
46844
  return f(() => {
46812
- let e = ie(D(I, uG), (e) => {
46845
+ let e = ie(D(I, pG), (e) => {
46813
46846
  let n = [];
46814
- e.forEach((e) => n.push(wG(e.id, e.data()))), n.sort((e, t) => (e.createdAt || 0) - (t.createdAt || 0) || e.id.localeCompare(t.id)), hK(n), t({
46847
+ e.forEach((e) => n.push(DG(e.id, e.data()))), n.sort((e, t) => (e.createdAt || 0) - (t.createdAt || 0) || e.id.localeCompare(t.id)), vK(n), t({
46815
46848
  loading: !1,
46816
46849
  schedules: n
46817
46850
  });
@@ -46822,21 +46855,21 @@ function uq() {
46822
46855
  return () => e();
46823
46856
  }, []), e;
46824
46857
  }
46825
- function dq(e) {
46826
- let t = uq();
46858
+ function mq(e) {
46859
+ let t = pq();
46827
46860
  return e ? {
46828
46861
  loading: t.loading,
46829
- schedules: WG(t.schedules, e)
46830
- } : fq;
46862
+ schedules: qG(t.schedules, e)
46863
+ } : hq;
46831
46864
  }
46832
- var fq = {
46865
+ var hq = {
46833
46866
  loading: !1,
46834
46867
  schedules: []
46835
46868
  };
46836
- async function pq(e) {
46869
+ async function gq(e) {
46837
46870
  try {
46838
46871
  let { id: t, ...n } = e;
46839
- return await j(O(I, uG, t), {
46872
+ return await j(O(I, pG, t), {
46840
46873
  ...n,
46841
46874
  updatedAt: Date.now()
46842
46875
  }), null;
@@ -46844,14 +46877,14 @@ async function pq(e) {
46844
46877
  return console.error("Could not save the schedule", e), "The hours could not be saved — make sure you are signed in as an admin and try again.";
46845
46878
  }
46846
46879
  }
46847
- async function mq(e) {
46880
+ async function _q(e) {
46848
46881
  try {
46849
- return await te(O(I, uG, e)), null;
46882
+ return await te(O(I, pG, e)), null;
46850
46883
  } catch (e) {
46851
46884
  return console.error("Could not remove the schedule", e), "It could not be removed — make sure you are signed in as an admin and try again.";
46852
46885
  }
46853
46886
  }
46854
- function hq() {
46887
+ function vq() {
46855
46888
  let [e, t] = v({
46856
46889
  loading: !0,
46857
46890
  members: []
@@ -46878,11 +46911,11 @@ function hq() {
46878
46911
  return () => e();
46879
46912
  }, []), e;
46880
46913
  }
46881
- function gq(e, t) {
46914
+ function yq(e, t) {
46882
46915
  let [n, r] = v([]), i = e.slice().sort().join(","), a = t.toISOString();
46883
46916
  return f(() => {
46884
46917
  if (!i) return;
46885
- let e = new Set(i.split(",")), n = new Date(t.getTime() - vq).toISOString(), o = ie(oe(D(I, dG), M("start", ">=", n)), (t) => {
46918
+ let e = new Set(i.split(",")), n = new Date(t.getTime() - xq).toISOString(), o = ie(oe(D(I, mG), M("start", ">=", n)), (t) => {
46886
46919
  let n = [];
46887
46920
  t.forEach((t) => {
46888
46921
  let r = t.data() || {}, i = String(r.memberId || "");
@@ -46896,29 +46929,29 @@ function gq(e, t) {
46896
46929
  }), r(n);
46897
46930
  }, () => r([]));
46898
46931
  return () => o();
46899
- }, [i, a]), i ? n : _q;
46932
+ }, [i, a]), i ? n : bq;
46900
46933
  }
46901
- var _q = [], vq = 4 * 36e5, yq = 15 * 6e4, bq = "taken", xq = "That time was just taken — pick another.";
46902
- function Sq(e) {
46903
- let t = Date.parse(e.start), n = Date.parse(e.end), r = Math.ceil((t - vq) / yq) * yq, i = [];
46904
- for (let t = r; t < n; t += yq) i.push(BG(e.memberId, new Date(t).toISOString()));
46934
+ var bq = [], xq = 4 * 36e5, Sq = 15 * 6e4, Cq = "taken", wq = "That time was just taken — pick another.";
46935
+ function Tq(e) {
46936
+ let t = Date.parse(e.start), n = Date.parse(e.end), r = Math.ceil((t - xq) / Sq) * Sq, i = [];
46937
+ for (let t = r; t < n; t += Sq) i.push(UG(e.memberId, new Date(t).toISOString()));
46905
46938
  return i;
46906
46939
  }
46907
- async function Cq(e) {
46908
- let t = BG(e.memberId, e.start);
46940
+ async function Eq(e) {
46941
+ let t = UG(e.memberId, e.start);
46909
46942
  try {
46910
46943
  return await se(I, async (n) => {
46911
- let r = O(I, dG, t);
46912
- if ((await n.get(r)).exists()) throw Error(bq);
46913
- for (let r of Sq(e)) {
46944
+ let r = O(I, mG, t);
46945
+ if ((await n.get(r)).exists()) throw Error(Cq);
46946
+ for (let r of Tq(e)) {
46914
46947
  if (r === t) continue;
46915
- let i = await n.get(O(I, dG, r));
46948
+ let i = await n.get(O(I, mG, r));
46916
46949
  if (!i.exists()) continue;
46917
46950
  let a = i.data() || {};
46918
- if (zG({
46951
+ if (HG({
46919
46952
  start: String(a.start || ""),
46920
46953
  end: String(a.end || "")
46921
- }, e)) throw Error(bq);
46954
+ }, e)) throw Error(Cq);
46922
46955
  }
46923
46956
  n.set(r, {
46924
46957
  memberId: e.memberId,
@@ -46928,17 +46961,17 @@ async function Cq(e) {
46928
46961
  });
46929
46962
  }), null;
46930
46963
  } catch (e) {
46931
- return e?.message === bq ? xq : (console.error("Could not claim the time", e), "The time could not be saved — check your connection and try again.");
46964
+ return e?.message === Cq ? wq : (console.error("Could not claim the time", e), "The time could not be saved — check your connection and try again.");
46932
46965
  }
46933
46966
  }
46934
- async function wq(e) {
46967
+ async function Dq(e) {
46935
46968
  try {
46936
- await te(O(I, dG, BG(e.memberId, e.start)));
46969
+ await te(O(I, mG, UG(e.memberId, e.start)));
46937
46970
  } catch {}
46938
46971
  }
46939
- async function Tq(e, t) {
46972
+ async function Oq(e, t) {
46940
46973
  try {
46941
- return await j(O(I, fG, BG(e.memberId, e.start)), {
46974
+ return await j(O(I, hG, UG(e.memberId, e.start)), {
46942
46975
  memberId: e.memberId,
46943
46976
  memberName: t.memberName,
46944
46977
  scheduleId: t.scheduleId,
@@ -46960,7 +46993,7 @@ async function Tq(e, t) {
46960
46993
  return console.error("Could not write the booking for the team", e), "The booking was taken but its details could not be saved.";
46961
46994
  }
46962
46995
  }
46963
- var Eq = (e, t) => ({
46996
+ var kq = (e, t) => ({
46964
46997
  id: e,
46965
46998
  memberId: String(t?.memberId || ""),
46966
46999
  scheduleId: String(t?.scheduleId || ""),
@@ -46979,17 +47012,17 @@ var Eq = (e, t) => ({
46979
47012
  uid: String(t?.uid || ""),
46980
47013
  createdAt: typeof t?.createdAt == "number" ? t.createdAt : 0
46981
47014
  });
46982
- function Dq(e = {}) {
47015
+ function Aq(e = {}) {
46983
47016
  let [t, n] = v({
46984
47017
  loading: !0,
46985
47018
  bookings: [],
46986
47019
  error: null
46987
47020
  }), r = (e.members || []).slice().sort().join(","), i = !!e.includePast, a = e.now;
46988
47021
  return f(() => {
46989
- let e = r ? new Set(r.split(",")) : null, t = ie(D(I, fG), (t) => {
47022
+ let e = r ? new Set(r.split(",")) : null, t = ie(D(I, hG), (t) => {
46990
47023
  let r = (a ? a() : /* @__PURE__ */ new Date()).toISOString(), o = [];
46991
47024
  t.forEach((t) => {
46992
- let n = Eq(t.id, t.data());
47025
+ let n = kq(t.id, t.data());
46993
47026
  e && !e.has(n.memberId) || o.push(n);
46994
47027
  });
46995
47028
  let s = o.filter((e) => e.end >= r).sort((e, t) => e.start.localeCompare(t.start)), c = i ? o.filter((e) => e.end < r).sort((e, t) => t.start.localeCompare(e.start)) : [];
@@ -47012,18 +47045,18 @@ function Dq(e = {}) {
47012
47045
  a
47013
47046
  ]), t;
47014
47047
  }
47015
- async function Oq(e) {
47048
+ async function jq(e) {
47016
47049
  try {
47017
- return await te(O(I, fG, e)), await te(O(I, dG, e)), null;
47050
+ return await te(O(I, hG, e)), await te(O(I, mG, e)), null;
47018
47051
  } catch (e) {
47019
47052
  return console.error("Could not cancel the booking", e), "It could not be cancelled — make sure you are signed in as a team member and try again.";
47020
47053
  }
47021
47054
  }
47022
47055
  //#endregion
47023
47056
  //#region src/components/ContactPopup.tsx
47024
- var kq = t.lazy(() => import("./PhoneInputField-B4j7wwjH.js").then((e) => e.n)), Aq = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
47025
- function jq({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange: a }) {
47026
- let { schedules: o } = uq(), s = vK(e), c = o.filter((e) => s.includes(e.id) && lK(e)), [l] = v(() => /* @__PURE__ */ new Date()), u = gq(c.map((e) => e.memberId), l), d = nK(t), f = e.look === "calendar" ? lq : aq;
47057
+ var Mq = t.lazy(() => import("./PhoneInputField-T0ttIIIN.js").then((e) => e.n)), Nq = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
47058
+ function Pq({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange: a }) {
47059
+ let { schedules: o } = pq(), s = xK(e), c = o.filter((e) => s.includes(e.id) && fK(e)), [l] = v(() => /* @__PURE__ */ new Date()), u = yq(c.map((e) => e.memberId), l), d = aK(t), f = e.look === "calendar" ? fq : cq;
47027
47060
  return /* @__PURE__ */ x("div", {
47028
47061
  className: "flex flex-col w-full",
47029
47062
  children: [
@@ -47034,7 +47067,7 @@ function jq({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange
47034
47067
  /* @__PURE__ */ b(f, {
47035
47068
  members: c,
47036
47069
  value: d,
47037
- onChange: (e) => a(e ? tK(e) : ""),
47070
+ onChange: (e) => a(e ? iK(e) : ""),
47038
47071
  taken: u,
47039
47072
  timeZone: r,
47040
47073
  onTimeZone: i
@@ -47046,14 +47079,14 @@ function jq({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange
47046
47079
  ]
47047
47080
  });
47048
47081
  }
47049
- var Mq = (e, t) => {
47082
+ var Fq = (e, t) => {
47050
47083
  let n = e.find((e) => e.type === "text" && /name/i.test(String(e.name || ""))) || e.find((e) => e.type === "text");
47051
47084
  return String(n && t[n.name] || F.currentUser?.displayName || "").trim();
47052
- }, Nq = (e, t) => {
47085
+ }, Iq = (e, t) => {
47053
47086
  let n = e.find((e) => e.type === "email");
47054
47087
  return String(n && t[n.name] || F.currentUser?.email || "").trim();
47055
- }, Pq = (e, t) => Object.fromEntries(e.filter((e) => e.type !== "schedule" && e.name && t[e.name] !== void 0 && t[e.name] !== "").map((e) => [e.name, String(t[e.name])]));
47056
- function Fq({ field: e, value: t, error: n, onChange: r }) {
47088
+ }, Lq = (e, t) => Object.fromEntries(e.filter((e) => e.type !== "schedule" && e.name && t[e.name] !== void 0 && t[e.name] !== "").map((e) => [e.name, String(t[e.name])]));
47089
+ function Rq({ field: e, value: t, error: n, onChange: r }) {
47057
47090
  let [i, a] = v(0), [o, s] = v(""), c = _(null), l = i > 0, u = nG(t), d = async (e) => {
47058
47091
  let t = Array.from(e || []);
47059
47092
  c.current && (c.current.value = ""), t.length && (s(""), a((e) => e + t.length), await Promise.all(t.map(async (e) => {
@@ -47068,7 +47101,13 @@ function Fq({ field: e, value: t, error: n, onChange: r }) {
47068
47101
  })));
47069
47102
  }, f = (e) => {
47070
47103
  s(""), r((t) => rG(nG(t).filter((t) => t !== e)));
47071
- }, p = n || o;
47104
+ }, { over: p, dropProps: m } = cG({
47105
+ accept: e.accept,
47106
+ multiple: !0,
47107
+ disabled: l,
47108
+ onFiles: d,
47109
+ onReject: () => s("That kind of file is not accepted here.")
47110
+ }), h = n || o;
47072
47111
  return /* @__PURE__ */ x("div", {
47073
47112
  className: "flex flex-col w-full relative",
47074
47113
  children: [
@@ -47099,13 +47138,14 @@ function Fq({ field: e, value: t, error: n, onChange: r }) {
47099
47138
  }, e))
47100
47139
  }),
47101
47140
  /* @__PURE__ */ x("label", {
47102
- className: `flex items-center gap-3 w-full rounded-xl px-4 py-3 glass-panel transition-all duration-300 cursor-pointer hover:border-accent ${l ? "opacity-60 pointer-events-none" : ""}`,
47141
+ ...m,
47142
+ className: `flex items-center gap-3 w-full rounded-xl px-4 py-3 glass-panel transition-all duration-300 cursor-pointer hover:border-accent ${l ? "opacity-60 pointer-events-none" : ""} ${p ? "!border-accent bg-accent/[0.05]" : ""}`,
47103
47143
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
47104
47144
  children: [
47105
- l ? /* @__PURE__ */ b(R, { className: "w-4 h-4 animate-spin text-accent shrink-0" }) : /* @__PURE__ */ b(yl, { className: "w-4 h-4 shrink-0 text-foreground/40" }),
47145
+ l ? /* @__PURE__ */ b(R, { className: "w-4 h-4 animate-spin text-accent shrink-0" }) : /* @__PURE__ */ b(yl, { className: `w-4 h-4 shrink-0 ${p ? "text-accent" : "text-foreground/40"}` }),
47106
47146
  /* @__PURE__ */ b("span", {
47107
- className: "flex-1 min-w-0 truncate text-[15px] text-foreground/40",
47108
- children: l ? i > 1 ? `Uploading ${i} files...` : "Uploading..." : u.length ? "Add another file" : e.placeholder || "Attach files"
47147
+ className: `flex-1 min-w-0 truncate text-[15px] ${p ? "text-accent" : "text-foreground/40"}`,
47148
+ children: p ? "Drop to attach" : l ? i > 1 ? `Uploading ${i} files...` : "Uploading..." : u.length ? "Add another file" : e.placeholder || "Attach files, or drop them here"
47109
47149
  }),
47110
47150
  !l && /* @__PURE__ */ x("span", {
47111
47151
  className: "inline-flex items-center gap-1.5 text-[12.5px] font-bold text-foreground/60 shrink-0",
@@ -47126,15 +47166,15 @@ function Fq({ field: e, value: t, error: n, onChange: r }) {
47126
47166
  })
47127
47167
  ]
47128
47168
  }),
47129
- p && /* @__PURE__ */ b("span", {
47169
+ h && /* @__PURE__ */ b("span", {
47130
47170
  className: "text-xs text-red-500 font-medium mt-1.5 ml-1",
47131
- children: p
47171
+ children: h
47132
47172
  })
47133
47173
  ]
47134
47174
  });
47135
47175
  }
47136
- function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i }) {
47137
- let [o, s] = v({}), [c, l] = v("idle"), [u, d] = v(""), [p, m] = v({}), [h, g] = v(() => TG()), [S, C] = v(""), w = _(null), [T, E] = v(n || null), [te, k] = v(!n), re = de(), ie = Oe(), ae = (e) => {
47176
+ function zq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i }) {
47177
+ let [o, s] = v({}), [c, l] = v("idle"), [u, d] = v(""), [p, m] = v({}), [h, g] = v(() => OG()), [S, C] = v(""), w = _(null), [T, E] = v(n || null), [te, k] = v(!n), re = de(), ie = Oe(), ae = (e) => {
47138
47178
  let t = (typeof window < "u" ? window.__FBOS_FORMS__ : null) || {};
47139
47179
  return ie?.defaultConfigs?.[e] || ie?.defaultConfigs?.[`${e}Form`] || t[e] || (e === "contact" ? Se : e === "support" ? we : null);
47140
47180
  };
@@ -47207,12 +47247,12 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47207
47247
  let a = (T?.fields || []).filter((e) => e.type === "email"), c = {}, u = {};
47208
47248
  a.forEach((e) => {
47209
47249
  let t = String(o[e.name] ?? "").trim();
47210
- t && (u[e.name] = t, Aq.test(t) || (c[e.name] = "That does not look like an email address — check for a typo, e.g. jane@example.com"));
47250
+ t && (u[e.name] = t, Nq.test(t) || (c[e.name] = "That does not look like an email address — check for a typo, e.g. jane@example.com"));
47211
47251
  }), (T?.fields || []).filter((e) => e.type === "file" && e.required && !o[e.name]).forEach((e) => {
47212
47252
  c[e.name] = "Please attach a file before sending.";
47213
47253
  });
47214
47254
  let f = (T?.fields || []).filter((e) => e.type === "schedule");
47215
- if (f.filter((e) => e.required && !nK(o[e.name])).forEach((e) => {
47255
+ if (f.filter((e) => e.required && !aK(o[e.name])).forEach((e) => {
47216
47256
  c[e.name] = "Pick a time before sending.";
47217
47257
  }), Object.keys(c).length > 0) {
47218
47258
  m(c);
@@ -47222,15 +47262,15 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47222
47262
  try {
47223
47263
  let r = pU(T), a = t || T?.systemName || T?.title || "unknown", c = [];
47224
47264
  for (let e of f) {
47225
- let t = nK(o[e.name]);
47265
+ let t = aK(o[e.name]);
47226
47266
  if (!t) continue;
47227
- let n = await Cq(t);
47267
+ let n = await Eq(t);
47228
47268
  if (n) {
47229
- for (let e of c) await wq(e.slot);
47269
+ for (let e of c) await Dq(e.slot);
47230
47270
  m({ [e.name]: n }), l("idle");
47231
47271
  return;
47232
47272
  }
47233
- let r = GG(t, gK());
47273
+ let r = JG(t, yK());
47234
47274
  c.push({
47235
47275
  field: e,
47236
47276
  slot: t,
@@ -47243,7 +47283,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47243
47283
  ...o,
47244
47284
  ...u
47245
47285
  };
47246
- for (let e of c) delete d[e.field.name], Object.assign(d, rK(e.field.name, e.slot, e.memberName, h));
47286
+ for (let e of c) delete d[e.field.name], Object.assign(d, oK(e.field.name, e.slot, e.memberName, h));
47247
47287
  let p = F.currentUser ? {
47248
47288
  uid: F.currentUser.uid,
47249
47289
  submitterName: F.currentUser.displayName || "",
@@ -47258,22 +47298,22 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47258
47298
  submittedAt: ce()
47259
47299
  });
47260
47300
  } catch (e) {
47261
- for (let e of c) await wq(e.slot);
47301
+ for (let e of c) await Dq(e.slot);
47262
47302
  throw e;
47263
47303
  }
47264
47304
  let _ = T?.fields || [];
47265
- for (let e of c) await Tq(e.slot, {
47305
+ for (let e of c) await Oq(e.slot, {
47266
47306
  memberName: e.memberName,
47267
47307
  scheduleId: e.scheduleId,
47268
47308
  scheduleName: e.scheduleName,
47269
47309
  timeZone: h,
47270
- name: Mq(_, d),
47271
- email: Nq(_, d),
47272
- answers: Pq(_, d),
47310
+ name: Fq(_, d),
47311
+ email: Iq(_, d),
47312
+ answers: Lq(_, d),
47273
47313
  formId: a,
47274
47314
  entryId: g.id
47275
47315
  });
47276
- c.length && C(c.map((e) => eK(e.slot, e.memberName, h)).join("; ")), l("success");
47316
+ c.length && C(c.map((e) => rK(e.slot, e.memberName, h)).join("; ")), l("success");
47277
47317
  try {
47278
47318
  i?.(Object.fromEntries(Object.entries(d).map(([e, t]) => [e, String(t ?? "")])), {
47279
47319
  collection: r,
@@ -47313,7 +47353,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47313
47353
  })]
47314
47354
  })
47315
47355
  }), document.body) : null;
47316
- let j = (T.fields || []).find((e) => e.type === "schedule" && e.look === "calendar"), M = j ? nK(o[j.name]) : null, N = !!j && !M, le = j ? "max-w-[880px]" : "max-w-[500px]", ue = /* @__PURE__ */ b("div", {
47356
+ let j = (T.fields || []).find((e) => e.type === "schedule" && e.look === "calendar"), M = j ? aK(o[j.name]) : null, N = !!j && !M, le = j ? "max-w-[880px]" : "max-w-[500px]", ue = /* @__PURE__ */ b("div", {
47317
47357
  className: "relative z-10 w-full",
47318
47358
  children: c === "success" ? /* @__PURE__ */ x(fU.div, {
47319
47359
  initial: {
@@ -47399,7 +47439,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47399
47439
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
47400
47440
  children: [/* @__PURE__ */ b("span", {
47401
47441
  className: "text-[14px] font-semibold text-foreground truncate",
47402
- children: eK(M, GG(M, gK())?.memberName || "", h)
47442
+ children: rK(M, JG(M, yK())?.memberName || "", h)
47403
47443
  }), /* @__PURE__ */ b("button", {
47404
47444
  type: "button",
47405
47445
  onClick: () => s((e) => ({
@@ -47409,7 +47449,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47409
47449
  className: "text-[12.5px] font-bold text-accent hover:underline shrink-0 cursor-pointer",
47410
47450
  children: "Change"
47411
47451
  })]
47412
- }) : /* @__PURE__ */ b(jq, {
47452
+ }) : /* @__PURE__ */ b(Pq, {
47413
47453
  field: j,
47414
47454
  value: o[j.name] || "",
47415
47455
  error: p[j.name],
@@ -47424,7 +47464,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47424
47464
  let n = e.type === "checkbox", r = t.type === "checkbox";
47425
47465
  return n && !r ? 1 : !n && r ? -1 : 0;
47426
47466
  }).map((e, t) => {
47427
- if (e.type === "schedule") return /* @__PURE__ */ b(jq, {
47467
+ if (e.type === "schedule") return /* @__PURE__ */ b(Pq, {
47428
47468
  field: e,
47429
47469
  value: o[e.name] || "",
47430
47470
  error: p[e.name],
@@ -47442,7 +47482,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47442
47482
  }, t);
47443
47483
  if (e.type === "tel") return /* @__PURE__ */ b(a, {
47444
47484
  fallback: /* @__PURE__ */ b("div", { className: "h-12 w-full glass-panel animate-pulse rounded-xl" }),
47445
- children: /* @__PURE__ */ b(kq, {
47485
+ children: /* @__PURE__ */ b(Mq, {
47446
47486
  field: e,
47447
47487
  value: o[e.name] || "",
47448
47488
  onChange: (t) => s((n) => ({
@@ -47451,7 +47491,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47451
47491
  }))
47452
47492
  })
47453
47493
  }, t);
47454
- if (e.type === "file") return /* @__PURE__ */ b(Fq, {
47494
+ if (e.type === "file") return /* @__PURE__ */ b(Rq, {
47455
47495
  field: e,
47456
47496
  value: o[e.name] || "",
47457
47497
  error: p[e.name],
@@ -47531,7 +47571,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47531
47571
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
47532
47572
  children: e.label
47533
47573
  }), /* @__PURE__ */ x("div", {
47534
- className: "relative flex items-center",
47574
+ className: "relative flex items-center lift-focus",
47535
47575
  children: [/* @__PURE__ */ b("input", {
47536
47576
  type: "date",
47537
47577
  required: e.required,
@@ -47574,7 +47614,7 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47574
47614
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
47575
47615
  children: e.label
47576
47616
  }), /* @__PURE__ */ x("div", {
47577
- className: "relative flex items-center justify-center",
47617
+ className: "relative flex items-center justify-center lift-focus",
47578
47618
  children: [/* @__PURE__ */ b("span", {
47579
47619
  className: "absolute left-4 text-foreground/70 font-bold flex items-center h-full z-10 pointer-events-none text-[15px]",
47580
47620
  children: e.currencySymbol || "$"
@@ -47675,4 +47715,4 @@ function Iq({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
47675
47715
  }), document.body);
47676
47716
  }
47677
47717
  //#endregion
47678
- export { eK as $, Os as $n, TT as $t, GK as A, Ag as An, Ce as Ar, zW as At, mG as B, Pd as Bn, uj as Bt, ZK as C, C_ as Cn, Ie as Cr, nG as Ct, BK as D, t_ as Dn, Oe as Dr, UW as Dt, JK as E, r_ as En, De as Er, XW as Et, TK as F, Gf as Fn, CM as Ft, yG as G, Ql as Gn, fA as Gt, pG as H, id as Hn, qA as Ht, oG as I, If as In, sM as It, rK as J, $c as Jn, Uk as Jt, lK as K, Tl as Kn, Qk as Kt, sG as L, rf as Ln, aM as Lt, YK as M, gg as Mn, xe as Mr, fU as Mt, _K as N, bh as Nn, ve as Nr, gV as Nt, UK as O, e_ as On, Te as Or, VW as Ot, DK as P, Wm as Pn, wM as Pt, KG as Q, Rs as Qn, fE as Qt, _G as R, Ld as Rn, tM as Rt, zK as S, T_ as Sn, Re as Sr, iG as St, RK as T, o_ as Tn, Pe as Tr, $W as Tt, OK as U, Tu as Un, HA as Ut, hG as V, wd as Vn, YA as Vt, JG as W, du as Wn, DA as Wt, sK as X, dc as Xn, AO as Xt, aK as Y, vc as Yn, PO as Yt, kK as Z, oc as Zn, pO as Zt, WK as _, mv as _n, bn as _r, dK as _t, mq as a, XC as an, oo as ar, SK as at, NK as b, $_ as bn, F as br, MG as bt, uq as c, gC as cn, Wa as cr, xK as ct, hq as d, OS as dn, $r as dr, pK as dt, xT as en, hs as er, TG as et, Tq as f, Gx as fn, Un as fr, uK as ft, jK as g, Wv as gn, wn as gr, QG as gt, QK as h, Qy as hn, On as hr, BG as ht, wq as i, Uw as in, ns as ir, AK as it, XK as j, yg as jn, Se as jr, mU as jt, qK as k, jg as kn, we as kr, BW as kt, dq as l, RS as ln, Ha as lr, cK as lt, cq as m, fx as mn, Pn as mr, RG as mt, Oq as n, tT as nn, ps as nr, oK as nt, pq as o, UC as on, ro as or, LG as ot, lq as p, Fx as pn, Vn as pr, CK as pt, wK as q, yl as qn, Wk as qt, Cq as r, Kw as rn, ls as rr, gK as rt, Dq as s, _C as sn, to as sr, qG as st, Iq as t, uT as tn, ms as tr, ZG as tt, gq as u, kS as un, Va as ur, EK as ut, VK as v, ov as vn, gn as vr, vK as vt, HK as w, S_ as wn, Ne as wr, aG as wt, PK as x, R as xn, I as xr, eG as xt, LK as y, ev as yn, Zt as yr, $G as yt, gG as z, Id as zn, Tj as zt };
47718
+ export { rK as $, Rs as $n, fE as $t, JK as A, jg as An, we as Ar, BW as At, _G as B, Id as Bn, Tj as Bt, eq as C, T_ as Cn, Re as Cr, iG as Ct, UK as D, r_ as Dn, De as Dr, XW as Dt, ZK as E, o_ as En, Pe as Er, $W as Et, OK as F, Wm as Fn, wM as Ft, SG as G, du as Gn, DA as Gt, gG as H, wd as Hn, YA as Ht, lG as I, Gf as In, CM as It, oK as J, yl as Jn, Wk as Jt, fK as K, Ql as Kn, fA as Kt, uG as L, If as Ln, sM as Lt, QK as M, yg as Mn, Se as Mr, mU as Mt, bK as N, gg as Nn, xe as Nr, fU as Nt, KK as O, t_ as On, Oe as Or, UW as Ot, AK as P, bh as Pn, ve as Pr, gV as Pt, YG as Q, oc as Qn, pO as Qt, bG as R, rf as Rn, aM as Rt, HK as S, R as Sn, I as Sr, eG as St, VK as T, S_ as Tn, Ne as Tr, aG as Tt, jK as U, id as Un, qA as Ut, vG as V, Pd as Vn, uj as Vt, ZG as W, Tu as Wn, HA as Wt, uK as X, vc as Xn, PO as Xt, cK as Y, $c as Yn, Uk as Yt, MK as Z, dc as Zn, AO as Zt, qK as _, Wv as _n, wn as _r, mK as _t, _q as a, Uw as an, ns as ar, TK as at, IK as b, ev as bn, Zt as br, FG as bt, pq as c, _C as cn, to as cr, wK as ct, vq as d, kS as dn, Va as dr, gK as dt, TT as en, Os as er, OG as et, Oq as f, OS as fn, $r as fr, pK as ft, PK as g, Qy as gn, On as gr, tK as gt, tq as h, fx as hn, Pn as hr, UG as ht, Dq as i, Kw as in, ls as ir, NK as it, $K as j, Ag as jn, Ce as jr, zW as jt, XK as k, e_ as kn, Te as kr, VW as kt, mq as l, gC as ln, Wa as lr, dK as lt, dq as m, Fx as mn, Vn as mr, VG as mt, jq as n, uT as nn, ms as nr, lK as nt, gq as o, XC as on, oo as or, BG as ot, fq as p, Gx as pn, Un as pr, EK as pt, DK as q, Tl as qn, Qk as qt, Eq as r, tT as rn, ps as rr, yK as rt, Aq as s, UC as sn, ro as sr, XG as st, zq as t, xT as tn, hs as tr, eK as tt, yq as u, RS as un, Ha as ur, kK as ut, WK as v, mv as vn, bn as vr, xK as vt, GK as w, C_ as wn, Ie as wr, nG as wt, LK as x, $_ as xn, F as xr, cG as xt, BK as y, ov as yn, gn as yr, nK as yt, yG as z, Ld as zn, tM as zt };