your-ai-workflow-firebase-os 1.14.21 → 1.14.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContactPopup-DrMOJl4b.cjs → ContactPopup-BMpDAMkL.cjs} +1 -1
- package/dist/{ContactPopup-DFF2AR_d.js → ContactPopup-Bb4kow11.js} +2 -2
- package/dist/{PhoneInputField-DjBSFQd9.js → PhoneInputField-MI_-wa7l.js} +1 -1
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/your-ai-workflow-firebase-os.cjs.js +7 -7
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +614 -608
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as e, $i as t, $n as n, $r as r, $t as i, A as a, Aa as o, Ai as s, An as c, Ar as l, At as u, B as d, Bi as f, Bn as p, Br as m, Bt as h, C as g, Ca as _, Ci as v, Cn as y, Cr as b, Ct as x, D as S, Da as C, Di as w, Dn as T, Dr as E, Dt as D, E as O, Ea as k, Ei as A, En as j, Er as M, Et as N, F as P, Fa as F, Fi as ee, Fn as I, Fr as te, Ft as L, G as ne, Gi as re, Gn as ie, Gr as ae, Gt as R, H as z, Hi as oe, Hn as B, Hr as se, Ht as ce, I as le, Ia as ue, Ii as de, In as fe, Ir as pe, It as me, J as he, Ji as ge, Jn as _e, Jr as ve, Jt as ye, K as be, Ki as xe, Kn as Se, Kr as Ce, Kt as we, L as Te, La as Ee, Li as De, Ln as Oe, Lr as ke, Lt as Ae, M as je, Ma as Me, Mi as Ne, Mn as Pe, Mr as Fe, Mt as Ie, N as Le, Na as Re, Ni as ze, Nn as Be, Nr as Ve, Nt as He, O as Ue, Oa as We, Oi as Ge, On as Ke, Or as qe, Ot as Je, P as Ye, Pa as Xe, Pi as Ze, Pn as Qe, Pr as $e, Pt as et, Q as V, Qi as tt, Qn as nt, Qr as rt, Qt as it, R as at, Ra as ot, Ri as st, Rn as ct, Rr as lt, Rt as ut, S as dt, Sa as ft, Si as pt, Sn as mt, Sr as ht, St as gt, T as _t, Ta as vt, Ti as yt, Tn as bt, Tr as xt, Tt as St, U as Ct, Ui as wt, Un as Tt, Ur as H, Ut as Et, V as Dt, Vi as Ot, Vn as kt, Vr as At, Vt as jt, W as Mt, Wi as Nt, Wn as Pt, Wr as Ft, Wt as It, X as Lt, Xi as Rt, Xn as zt, Xr as Bt, Xt as Vt, Y as Ht, Yi as Ut, Yn as Wt, Yr as Gt, Yt as Kt, Z as qt, Zi as Jt, Zn as Yt, Zr as Xt, Zt, _ as Qt, _a as $t, _i as en, _n as tn, _r as nn, _t as rn, a as an, aa as on, ai as sn, an as cn, ar as ln, at as un, b as dn, ba as fn, bi as pn, bn as mn, br as hn, bt as gn, c as _n, ca as vn, ci as yn, cn as bn, cr as xn, ct as Sn, d as Cn, da as wn, di as Tn, dn as En, dr as Dn, dt as On, ea as kn, ei as An, en as jn, er as Mn, et as Nn, f as Pn, fa as Fn, fi as In, fn as Ln, fr as U, ft as Rn, g as zn, ga as Bn, gi as Vn, gn as Hn, gr as Un, gt as Wn, h as Gn, ha as Kn, hi as qn, hn as Jn, hr as Yn, ht as Xn, i as Zn, ia as Qn, ii as $n, in as er, ir as tr, it as nr, j as rr, ja as ir, ji as ar, jn as or, jr as sr, jt as cr, k as lr, ka as ur, ki as dr, kn as fr, kr as pr, kt as mr, l as hr, la as gr, li as _r, ln as vr, lr as yr, lt as br, m as xr, ma as Sr, mi as Cr, mn as wr, mr as Tr, mt as Er, n as Dr, na as Or, ni as kr, nn as Ar, nr as jr, nt as Mr, o as Nr, oa as Pr, oi as Fr, on as Ir, or as Lr, ot as Rr, p as zr, pa as Br, pi as Vr, pn as Hr, pr as Ur, pt as Wr, q as Gr, qi as Kr, qn as qr, qr as Jr, qt as Yr, r as Xr, ra as Zr, ri as Qr, rn as $r, rr as ei, rt as ti, s as ni, sa as ri, si as ii, sn as ai, sr as oi, st as si, t as ci, ta as li, ti as ui, tn as di, tr as fi, tt as pi, u as mi, ua as hi, ui as gi, un as _i, ur as vi, ut as yi, v as bi, va as xi, vi as Si, vn as Ci, vr as wi, vt as Ti, w as Ei, wa as Di, wi as Oi, wn as ki, wr as Ai, wt as ji, x as Mi, xa as Ni, xi as Pi, xn as Fi, xr as Ii, xt as Li, y as Ri, ya as zi, yi as Bi, yn as Vi, yr as Hi, yt as Ui, z as Wi, zi as Gi, zn as Ki, zr as qi, zt as Ji } from "./ContactPopup-
|
|
2
|
-
import { t as Yi } from "./PhoneInputField-
|
|
1
|
+
import { $ as e, $i as t, $n as n, $r as r, $t as i, A as a, Aa as o, Ai as s, An as c, Ar as l, At as u, B as d, Bi as f, Bn as p, Br as m, Bt as h, C as g, Ca as _, Ci as v, Cn as y, Cr as b, Ct as x, D as S, Da as C, Di as w, Dn as T, Dr as E, Dt as D, E as O, Ea as k, Ei as A, En as j, Er as M, Et as N, F as P, Fa as F, Fi as ee, Fn as I, Fr as te, Ft as L, G as ne, Gi as re, Gn as ie, Gr as ae, Gt as R, H as z, Hi as oe, Hn as B, Hr as se, Ht as ce, I as le, Ia as ue, Ii as de, In as fe, Ir as pe, It as me, J as he, Ji as ge, Jn as _e, Jr as ve, Jt as ye, K as be, Ki as xe, Kn as Se, Kr as Ce, Kt as we, L as Te, La as Ee, Li as De, Ln as Oe, Lr as ke, Lt as Ae, M as je, Ma as Me, Mi as Ne, Mn as Pe, Mr as Fe, Mt as Ie, N as Le, Na as Re, Ni as ze, Nn as Be, Nr as Ve, Nt as He, O as Ue, Oa as We, Oi as Ge, On as Ke, Or as qe, Ot as Je, P as Ye, Pa as Xe, Pi as Ze, Pn as Qe, Pr as $e, Pt as et, Q as V, Qi as tt, Qn as nt, Qr as rt, Qt as it, R as at, Ra as ot, Ri as st, Rn as ct, Rr as lt, Rt as ut, S as dt, Sa as ft, Si as pt, Sn as mt, Sr as ht, St as gt, T as _t, Ta as vt, Ti as yt, Tn as bt, Tr as xt, Tt as St, U as Ct, Ui as wt, Un as Tt, Ur as H, Ut as Et, V as Dt, Vi as Ot, Vn as kt, Vr as At, Vt as jt, W as Mt, Wi as Nt, Wn as Pt, Wr as Ft, Wt as It, X as Lt, Xi as Rt, Xn as zt, Xr as Bt, Xt as Vt, Y as Ht, Yi as Ut, Yn as Wt, Yr as Gt, Yt as Kt, Z as qt, Zi as Jt, Zn as Yt, Zr as Xt, Zt, _ as Qt, _a as $t, _i as en, _n as tn, _r as nn, _t as rn, a as an, aa as on, ai as sn, an as cn, ar as ln, at as un, b as dn, ba as fn, bi as pn, bn as mn, br as hn, bt as gn, c as _n, ca as vn, ci as yn, cn as bn, cr as xn, ct as Sn, d as Cn, da as wn, di as Tn, dn as En, dr as Dn, dt as On, ea as kn, ei as An, en as jn, er as Mn, et as Nn, f as Pn, fa as Fn, fi as In, fn as Ln, fr as U, ft as Rn, g as zn, ga as Bn, gi as Vn, gn as Hn, gr as Un, gt as Wn, h as Gn, ha as Kn, hi as qn, hn as Jn, hr as Yn, ht as Xn, i as Zn, ia as Qn, ii as $n, in as er, ir as tr, it as nr, j as rr, ja as ir, ji as ar, jn as or, jr as sr, jt as cr, k as lr, ka as ur, ki as dr, kn as fr, kr as pr, kt as mr, l as hr, la as gr, li as _r, ln as vr, lr as yr, lt as br, m as xr, ma as Sr, mi as Cr, mn as wr, mr as Tr, mt as Er, n as Dr, na as Or, ni as kr, nn as Ar, nr as jr, nt as Mr, o as Nr, oa as Pr, oi as Fr, on as Ir, or as Lr, ot as Rr, p as zr, pa as Br, pi as Vr, pn as Hr, pr as Ur, pt as Wr, q as Gr, qi as Kr, qn as qr, qr as Jr, qt as Yr, r as Xr, ra as Zr, ri as Qr, rn as $r, rr as ei, rt as ti, s as ni, sa as ri, si as ii, sn as ai, sr as oi, st as si, t as ci, ta as li, ti as ui, tn as di, tr as fi, tt as pi, u as mi, ua as hi, ui as gi, un as _i, ur as vi, ut as yi, v as bi, va as xi, vi as Si, vn as Ci, vr as wi, vt as Ti, w as Ei, wa as Di, wi as Oi, wn as ki, wr as Ai, wt as ji, x as Mi, xa as Ni, xi as Pi, xn as Fi, xr as Ii, xt as Li, y as Ri, ya as zi, yi as Bi, yn as Vi, yr as Hi, yt as Ui, z as Wi, zi as Gi, zn as Ki, zr as qi, zt as Ji } from "./ContactPopup-Bb4kow11.js";
|
|
2
|
+
import { t as Yi } from "./PhoneInputField-MI_-wa7l.js";
|
|
3
3
|
import * as Xi from "react";
|
|
4
4
|
import Zi, { Suspense as Qi, forwardRef as $i, lazy as ea, useCallback as ta, useEffect as W, useLayoutEffect as na, useMemo as ra, useRef as ia, useState as G } from "react";
|
|
5
5
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
@@ -15923,21 +15923,30 @@ function __({ name: e, shownAs: t, hint: n }) {
|
|
|
15923
15923
|
})]
|
|
15924
15924
|
});
|
|
15925
15925
|
}
|
|
15926
|
-
var v_ =
|
|
15926
|
+
var v_ = {
|
|
15927
|
+
VITE_FIREBASE_API_KEY: "AIzaSyD3k9xQeL7vR2mN8pT4wY6…",
|
|
15928
|
+
VITE_FIREBASE_AUTH_DOMAIN: "your-project.firebaseapp.com",
|
|
15929
|
+
VITE_FIREBASE_PROJECT_ID: "your-project",
|
|
15930
|
+
VITE_FIREBASE_MESSAGING_SENDER_ID: "482915736204",
|
|
15931
|
+
VITE_FIREBASE_APP_ID: "1:482915736204:web:9c1e7a4b2d8f6e3a"
|
|
15932
|
+
}, y_ = a_.map(({ key: e }) => e === "VITE_FIREBASE_STORAGE_BUCKET" ? {
|
|
15927
15933
|
name: e,
|
|
15928
15934
|
value: "leave empty",
|
|
15929
15935
|
empty: !0
|
|
15930
15936
|
} : {
|
|
15931
15937
|
name: e,
|
|
15932
|
-
value:
|
|
15938
|
+
value: v_[e]
|
|
15933
15939
|
});
|
|
15934
|
-
function
|
|
15940
|
+
function b_({ name: e, value: t, empty: n }) {
|
|
15935
15941
|
return /* @__PURE__ */ J("div", {
|
|
15936
15942
|
className: "px-3 sm:px-4 py-1.5 flex flex-col gap-1 sm:grid sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_2.25rem] sm:gap-3 sm:items-center",
|
|
15937
15943
|
children: [/* @__PURE__ */ q("div", {
|
|
15938
15944
|
title: e,
|
|
15939
|
-
className: "text-[12.5px] sm:text-[13px] font-semibold text-foreground/80
|
|
15940
|
-
children:
|
|
15945
|
+
className: "min-w-0 sm:h-9 sm:px-3 flex items-center sm:rounded-xl sm:bg-foreground/[0.05] text-[12.5px] sm:text-[13px] font-semibold text-foreground/80",
|
|
15946
|
+
children: /* @__PURE__ */ q("span", {
|
|
15947
|
+
className: "break-all sm:truncate",
|
|
15948
|
+
children: e
|
|
15949
|
+
})
|
|
15941
15950
|
}), /* @__PURE__ */ J("div", {
|
|
15942
15951
|
className: "flex items-center gap-2 sm:contents",
|
|
15943
15952
|
children: [/* @__PURE__ */ q("div", {
|
|
@@ -15954,20 +15963,20 @@ function y_({ name: e, value: t, empty: n }) {
|
|
|
15954
15963
|
})]
|
|
15955
15964
|
});
|
|
15956
15965
|
}
|
|
15957
|
-
function
|
|
15966
|
+
function x_() {
|
|
15958
15967
|
return /* @__PURE__ */ J("div", {
|
|
15959
15968
|
className: "glass-panel border border-[var(--panel-border)] rounded-2xl overflow-hidden bg-background",
|
|
15960
15969
|
children: [
|
|
15961
15970
|
/* @__PURE__ */ q("div", {
|
|
15962
15971
|
className: "max-sm:hidden sm:grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_2.25rem] gap-3 px-4 pt-3.5 pb-1",
|
|
15963
15972
|
children: ["Name", "Value"].map((e) => /* @__PURE__ */ q("span", {
|
|
15964
|
-
className: "text-[12.5px] font-semibold text-foreground/45",
|
|
15973
|
+
className: "px-3 text-[12.5px] font-semibold text-foreground/45",
|
|
15965
15974
|
children: e
|
|
15966
15975
|
}, e))
|
|
15967
15976
|
}),
|
|
15968
15977
|
/* @__PURE__ */ q("div", {
|
|
15969
15978
|
className: "py-2 sm:py-1.5",
|
|
15970
|
-
children:
|
|
15979
|
+
children: y_.map((e) => /* @__PURE__ */ q(b_, { ...e }, e.name))
|
|
15971
15980
|
}),
|
|
15972
15981
|
/* @__PURE__ */ q("div", {
|
|
15973
15982
|
className: "flex justify-end px-3 sm:px-4 py-3 border-t border-[var(--panel-border)]/40",
|
|
@@ -15980,7 +15989,7 @@ function b_() {
|
|
|
15980
15989
|
]
|
|
15981
15990
|
});
|
|
15982
15991
|
}
|
|
15983
|
-
function
|
|
15992
|
+
function S_() {
|
|
15984
15993
|
let [e, t] = G(""), [n, r] = G(""), [i, a] = G([]), [o, s] = G(""), c = (e) => {
|
|
15985
15994
|
t(e), n && (r(""), a([])), o && s("");
|
|
15986
15995
|
}, l = () => {
|
|
@@ -16070,8 +16079,8 @@ function x_() {
|
|
|
16070
16079
|
]
|
|
16071
16080
|
});
|
|
16072
16081
|
}
|
|
16073
|
-
var
|
|
16074
|
-
function
|
|
16082
|
+
var C_ = "text-accent underline underline-offset-2 font-semibold hover:text-accent-deep transition-colors";
|
|
16083
|
+
function w_({ text: e, label: t }) {
|
|
16075
16084
|
return /* @__PURE__ */ J("div", {
|
|
16076
16085
|
className: "glass-panel border border-[var(--panel-border)] rounded-2xl bg-background overflow-hidden",
|
|
16077
16086
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -16090,7 +16099,7 @@ function C_({ text: e, label: t }) {
|
|
|
16090
16099
|
})]
|
|
16091
16100
|
});
|
|
16092
16101
|
}
|
|
16093
|
-
function
|
|
16102
|
+
function T_({ number: e, title: t, aside: n, children: r }) {
|
|
16094
16103
|
return /* @__PURE__ */ J("div", {
|
|
16095
16104
|
className: "flex flex-col relative pb-10 mb-10 border-b border-[var(--panel-border)]/50 last:border-0 last:pb-0 last:mb-0",
|
|
16096
16105
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -16112,7 +16121,7 @@ function w_({ number: e, title: t, aside: n, children: r }) {
|
|
|
16112
16121
|
})]
|
|
16113
16122
|
});
|
|
16114
16123
|
}
|
|
16115
|
-
function
|
|
16124
|
+
function E_({ basename: e }) {
|
|
16116
16125
|
return /* @__PURE__ */ J("div", {
|
|
16117
16126
|
className: "mt-6 sm:mt-8 relative z-10 flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-6 p-5 sm:p-6 rounded-3xl border border-accent/20 bg-accent/[0.06]",
|
|
16118
16127
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -16138,7 +16147,7 @@ function T_({ basename: e }) {
|
|
|
16138
16147
|
})]
|
|
16139
16148
|
});
|
|
16140
16149
|
}
|
|
16141
|
-
function
|
|
16150
|
+
function D_({ standalone: e }) {
|
|
16142
16151
|
let t = Re(), [n, r] = $g(), i = n === "local", a = {
|
|
16143
16152
|
project: i ? 2 : 1,
|
|
16144
16153
|
webApp: i ? 3 : 2,
|
|
@@ -16232,7 +16241,7 @@ function E_({ standalone: e }) {
|
|
|
16232
16241
|
/* @__PURE__ */ J("div", {
|
|
16233
16242
|
className: "flex flex-col relative z-10 p-4 sm:p-6 md:p-8 bg-foreground/[0.015] rounded-3xl border border-[var(--panel-border)]/50",
|
|
16234
16243
|
children: [
|
|
16235
|
-
i && /* @__PURE__ */ J(
|
|
16244
|
+
i && /* @__PURE__ */ J(T_, {
|
|
16236
16245
|
number: 1,
|
|
16237
16246
|
title: "Set your project up",
|
|
16238
16247
|
children: [
|
|
@@ -16240,7 +16249,7 @@ function E_({ standalone: e }) {
|
|
|
16240
16249
|
className: "text-foreground/80",
|
|
16241
16250
|
children: "Your assistant does this part — none of it is yours to type. Copy the block below into Claude Code, Codex or Antigravity and let it finish before you carry on. If you are already looking at this page on your own machine, paste it anyway: it only fills in what is missing and changes nothing that is already right."
|
|
16242
16251
|
}),
|
|
16243
|
-
/* @__PURE__ */ q(
|
|
16252
|
+
/* @__PURE__ */ q(w_, {
|
|
16244
16253
|
text: e_,
|
|
16245
16254
|
label: "Copy the setup prompt"
|
|
16246
16255
|
}),
|
|
@@ -16255,7 +16264,7 @@ function E_({ standalone: e }) {
|
|
|
16255
16264
|
href: "https://aistudio.google.com/apikey",
|
|
16256
16265
|
target: "_blank",
|
|
16257
16266
|
rel: "noopener noreferrer",
|
|
16258
|
-
className:
|
|
16267
|
+
className: C_,
|
|
16259
16268
|
children: "aistudio.google.com/apikey"
|
|
16260
16269
|
}),
|
|
16261
16270
|
" ",
|
|
@@ -16264,7 +16273,7 @@ function E_({ standalone: e }) {
|
|
|
16264
16273
|
})
|
|
16265
16274
|
]
|
|
16266
16275
|
}),
|
|
16267
|
-
/* @__PURE__ */ q(
|
|
16276
|
+
/* @__PURE__ */ q(T_, {
|
|
16268
16277
|
number: a.project,
|
|
16269
16278
|
title: "Create a Firebase project",
|
|
16270
16279
|
children: /* @__PURE__ */ J("ol", {
|
|
@@ -16310,7 +16319,7 @@ function E_({ standalone: e }) {
|
|
|
16310
16319
|
]
|
|
16311
16320
|
})
|
|
16312
16321
|
}),
|
|
16313
|
-
/* @__PURE__ */ q(
|
|
16322
|
+
/* @__PURE__ */ q(T_, {
|
|
16314
16323
|
number: a.webApp,
|
|
16315
16324
|
title: "Add a web app and copy the six values",
|
|
16316
16325
|
children: /* @__PURE__ */ J("ol", {
|
|
@@ -16342,9 +16351,9 @@ function E_({ standalone: e }) {
|
|
|
16342
16351
|
]
|
|
16343
16352
|
})
|
|
16344
16353
|
}),
|
|
16345
|
-
/* @__PURE__ */ q(
|
|
16354
|
+
/* @__PURE__ */ q(T_, {
|
|
16346
16355
|
number: a.keys,
|
|
16347
|
-
title: i ? "Put the six values in your .env" : "Paste the values into the
|
|
16356
|
+
title: i ? "Put the six values in your .env" : "Paste the values into the environment variables window",
|
|
16348
16357
|
children: i ? /* @__PURE__ */ J(K, { children: [
|
|
16349
16358
|
/* @__PURE__ */ J("p", {
|
|
16350
16359
|
className: "text-foreground/80",
|
|
@@ -16381,12 +16390,10 @@ function E_({ standalone: e }) {
|
|
|
16381
16390
|
/* @__PURE__ */ J("p", {
|
|
16382
16391
|
className: "text-foreground/80",
|
|
16383
16392
|
children: [
|
|
16384
|
-
"
|
|
16393
|
+
"AI Studio pops up a window that says",
|
|
16385
16394
|
" ",
|
|
16386
16395
|
/* @__PURE__ */ q("strong", { children: "Enter your environment variables to continue" }),
|
|
16387
|
-
", with a form like the one below. Paste each value from your Firebase tab into its row
|
|
16388
|
-
/* @__PURE__ */ q("strong", { children: "Apply" }),
|
|
16389
|
-
"."
|
|
16396
|
+
", with a form like the one below. Paste each value from your Firebase tab into its row — the values below are only examples of what each one looks like."
|
|
16390
16397
|
]
|
|
16391
16398
|
}),
|
|
16392
16399
|
/* @__PURE__ */ J("p", {
|
|
@@ -16394,15 +16401,17 @@ function E_({ standalone: e }) {
|
|
|
16394
16401
|
children: [
|
|
16395
16402
|
"Leave ",
|
|
16396
16403
|
/* @__PURE__ */ q("strong", { children: "VITE_FIREBASE_STORAGE_BUCKET" }),
|
|
16397
|
-
" empty —
|
|
16404
|
+
" empty and keep the window open — don't press ",
|
|
16405
|
+
/* @__PURE__ */ q("strong", { children: "Apply" }),
|
|
16406
|
+
" yet. Step ",
|
|
16398
16407
|
a.storage,
|
|
16399
|
-
" gives you
|
|
16408
|
+
" gives you the last value, and Apply comes after it."
|
|
16400
16409
|
]
|
|
16401
16410
|
}),
|
|
16402
|
-
/* @__PURE__ */ q(
|
|
16411
|
+
/* @__PURE__ */ q(x_, {})
|
|
16403
16412
|
] })
|
|
16404
16413
|
}),
|
|
16405
|
-
/* @__PURE__ */ J(
|
|
16414
|
+
/* @__PURE__ */ J(T_, {
|
|
16406
16415
|
number: a.signIn,
|
|
16407
16416
|
title: "Turn on sign-in",
|
|
16408
16417
|
children: [/* @__PURE__ */ J("ol", {
|
|
@@ -16458,12 +16467,12 @@ function E_({ standalone: e }) {
|
|
|
16458
16467
|
/* @__PURE__ */ q("strong", { children: "Your app's address is right here" }),
|
|
16459
16468
|
" — copy it below, then in Firebase click ",
|
|
16460
16469
|
/* @__PURE__ */ q("strong", { children: "Add domain" }),
|
|
16461
|
-
", paste it, and save.
|
|
16470
|
+
", paste it, and save."
|
|
16462
16471
|
] })
|
|
16463
16472
|
]
|
|
16464
16473
|
}), /* @__PURE__ */ q(g_, {})]
|
|
16465
16474
|
}),
|
|
16466
|
-
/* @__PURE__ */ J(
|
|
16475
|
+
/* @__PURE__ */ J(T_, {
|
|
16467
16476
|
number: a.database,
|
|
16468
16477
|
title: "Create the database and publish its rules",
|
|
16469
16478
|
children: [/* @__PURE__ */ J("ol", {
|
|
@@ -16498,11 +16507,11 @@ function E_({ standalone: e }) {
|
|
|
16498
16507
|
"."
|
|
16499
16508
|
] })
|
|
16500
16509
|
]
|
|
16501
|
-
}), /* @__PURE__ */ q(
|
|
16510
|
+
}), /* @__PURE__ */ q(S_, {})]
|
|
16502
16511
|
}),
|
|
16503
|
-
/* @__PURE__ */ J(
|
|
16512
|
+
/* @__PURE__ */ J(T_, {
|
|
16504
16513
|
number: a.storage,
|
|
16505
|
-
title:
|
|
16514
|
+
title: "Create storage and publish its rules",
|
|
16506
16515
|
children: [/* @__PURE__ */ J("ol", {
|
|
16507
16516
|
className: "space-y-2 list-decimal list-inside text-foreground/80 mb-4",
|
|
16508
16517
|
children: [
|
|
@@ -16549,15 +16558,12 @@ function E_({ standalone: e }) {
|
|
|
16549
16558
|
/* @__PURE__ */ q("strong", { children: "VITE_FIREBASE_STORAGE_BUCKET" }),
|
|
16550
16559
|
" — the line you left empty."
|
|
16551
16560
|
] }) : /* @__PURE__ */ J("li", { children: [
|
|
16552
|
-
"
|
|
16553
|
-
|
|
16554
|
-
"
|
|
16555
|
-
|
|
16556
|
-
". Paste it as the value of ",
|
|
16561
|
+
"Back in the environment variables window from step ",
|
|
16562
|
+
a.keys,
|
|
16563
|
+
", paste it into",
|
|
16564
|
+
" ",
|
|
16557
16565
|
/* @__PURE__ */ q("strong", { children: "VITE_FIREBASE_STORAGE_BUCKET" }),
|
|
16558
|
-
" — the
|
|
16559
|
-
/* @__PURE__ */ q("strong", { children: "+ Add secret" }),
|
|
16560
|
-
" and use that name."
|
|
16566
|
+
" — the row you left empty."
|
|
16561
16567
|
] }),
|
|
16562
16568
|
i ? /* @__PURE__ */ J("li", { children: [/* @__PURE__ */ q("strong", { children: "Start the app again." }), " Stop it and start it once more — or just ask your assistant to restart it. A value added while it is running is not read until then. That is the last thing to do: then reload this page and your app is connected."] }) : /* @__PURE__ */ J("li", { children: [/* @__PURE__ */ q("strong", { children: "Press Apply, then reload this page." }), " Your app is connected."] })
|
|
16563
16569
|
]
|
|
@@ -16568,7 +16574,7 @@ function E_({ standalone: e }) {
|
|
|
16568
16574
|
})
|
|
16569
16575
|
]
|
|
16570
16576
|
}),
|
|
16571
|
-
/* @__PURE__ */ q(
|
|
16577
|
+
/* @__PURE__ */ q(E_, { basename: t.basename })
|
|
16572
16578
|
]
|
|
16573
16579
|
})
|
|
16574
16580
|
})]
|
|
@@ -16576,7 +16582,7 @@ function E_({ standalone: e }) {
|
|
|
16576
16582
|
}
|
|
16577
16583
|
//#endregion
|
|
16578
16584
|
//#region src/lib/serviceSwitches.ts
|
|
16579
|
-
var
|
|
16585
|
+
var O_ = {
|
|
16580
16586
|
email: {
|
|
16581
16587
|
collection: "sys_configs",
|
|
16582
16588
|
doc: "email"
|
|
@@ -16585,15 +16591,15 @@ var D_ = {
|
|
|
16585
16591
|
collection: "sys_payments",
|
|
16586
16592
|
doc: "_settings"
|
|
16587
16593
|
}
|
|
16588
|
-
},
|
|
16589
|
-
function
|
|
16590
|
-
let { collection: t, doc: n } =
|
|
16594
|
+
}, k_ = (e) => e?.enabled !== !1;
|
|
16595
|
+
function A_(e) {
|
|
16596
|
+
let { collection: t, doc: n } = O_[e], [r, i] = G({
|
|
16591
16597
|
loading: !0,
|
|
16592
16598
|
on: !0
|
|
16593
16599
|
});
|
|
16594
16600
|
return W(() => xa(X(C, t, n), (e) => i({
|
|
16595
16601
|
loading: !1,
|
|
16596
|
-
on:
|
|
16602
|
+
on: k_(e.exists() ? e.data() : null)
|
|
16597
16603
|
}), () => i({
|
|
16598
16604
|
loading: !1,
|
|
16599
16605
|
on: !0
|
|
@@ -16619,8 +16625,8 @@ function k_(e) {
|
|
|
16619
16625
|
}
|
|
16620
16626
|
//#endregion
|
|
16621
16627
|
//#region src/lib/serviceStatus.ts
|
|
16622
|
-
var
|
|
16623
|
-
function
|
|
16628
|
+
var j_ = "The server could not be reached.";
|
|
16629
|
+
function M_(e, t, n = 0) {
|
|
16624
16630
|
let [r, i] = G(null), [a, o] = G(""), s = ia(!0);
|
|
16625
16631
|
W(() => (s.current = !0, () => {
|
|
16626
16632
|
s.current = !1;
|
|
@@ -16635,7 +16641,7 @@ function j_(e, t, n = 0) {
|
|
|
16635
16641
|
if (!s.current) return;
|
|
16636
16642
|
i(c.current(t)), o("");
|
|
16637
16643
|
} catch {
|
|
16638
|
-
s.current && o(
|
|
16644
|
+
s.current && o(j_);
|
|
16639
16645
|
}
|
|
16640
16646
|
}, [e]);
|
|
16641
16647
|
return W(() => {
|
|
@@ -16648,20 +16654,20 @@ function j_(e, t, n = 0) {
|
|
|
16648
16654
|
reread: l
|
|
16649
16655
|
};
|
|
16650
16656
|
}
|
|
16651
|
-
var
|
|
16657
|
+
var N_ = (e) => ({
|
|
16652
16658
|
configured: !!e?.configured,
|
|
16653
16659
|
mode: e?.mode === "live" || e?.mode === "test" ? e.mode : null,
|
|
16654
16660
|
webhookConfigured: !!e?.webhookConfigured
|
|
16655
|
-
}),
|
|
16661
|
+
}), P_ = (e) => ({
|
|
16656
16662
|
configured: !!e?.configured,
|
|
16657
16663
|
from: e?.from ?? null,
|
|
16658
16664
|
adminCount: Number(e?.adminCount) || 0
|
|
16659
|
-
}),
|
|
16665
|
+
}), F_ = {
|
|
16660
16666
|
email: "/api/email/status",
|
|
16661
16667
|
payments: "/api/payments/status"
|
|
16662
|
-
},
|
|
16663
|
-
function
|
|
16664
|
-
let t =
|
|
16668
|
+
}, I_ = (e = 0) => M_(F_.payments, N_, e), L_ = (e = 0) => M_(F_.email, P_, e), R_ = (e) => !!e?.configured;
|
|
16669
|
+
function z_(e) {
|
|
16670
|
+
let t = M_(F_[e], R_), n = A_(e);
|
|
16665
16671
|
return {
|
|
16666
16672
|
loading: t.status === null && !t.error || n.loading,
|
|
16667
16673
|
configured: t.status === !0,
|
|
@@ -16670,45 +16676,45 @@ function R_(e) {
|
|
|
16670
16676
|
}
|
|
16671
16677
|
//#endregion
|
|
16672
16678
|
//#region src/lib/publishSteps.ts
|
|
16673
|
-
var
|
|
16679
|
+
var B_ = {
|
|
16674
16680
|
collection: "sys_configs",
|
|
16675
16681
|
doc: "publish"
|
|
16676
|
-
},
|
|
16682
|
+
}, V_ = [
|
|
16677
16683
|
"published",
|
|
16678
16684
|
"connected",
|
|
16679
16685
|
"authorised"
|
|
16680
|
-
],
|
|
16686
|
+
], H_ = {
|
|
16681
16687
|
appName: "",
|
|
16682
16688
|
domain: "",
|
|
16683
16689
|
done: []
|
|
16684
16690
|
};
|
|
16685
|
-
function
|
|
16691
|
+
function U_(e) {
|
|
16686
16692
|
let t = Array.isArray(e?.done) ? e.done : [];
|
|
16687
16693
|
return {
|
|
16688
16694
|
appName: typeof e?.appName == "string" ? e.appName : "",
|
|
16689
16695
|
domain: typeof e?.domain == "string" ? e.domain : "",
|
|
16690
|
-
done:
|
|
16696
|
+
done: V_.filter((e) => t.includes(e))
|
|
16691
16697
|
};
|
|
16692
16698
|
}
|
|
16693
|
-
function
|
|
16699
|
+
function W_(e) {
|
|
16694
16700
|
let t = String(e ?? "").trim().toLowerCase();
|
|
16695
16701
|
return t = t.replace(/^[a-z][a-z0-9+.-]*:\/\//, ""), t = t.split(/[/?#]/)[0], t = t.replace(/\.ai\.studio$/, ""), t.replace(/[\s_]+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "");
|
|
16696
16702
|
}
|
|
16697
|
-
var
|
|
16698
|
-
let t =
|
|
16703
|
+
var G_ = (e) => {
|
|
16704
|
+
let t = W_(e);
|
|
16699
16705
|
return t ? `https://${t}.ai.studio/` : "";
|
|
16700
16706
|
};
|
|
16701
|
-
function
|
|
16707
|
+
function K_(e) {
|
|
16702
16708
|
let t = String(e ?? "").trim().toLowerCase();
|
|
16703
16709
|
return t = t.replace(/^[a-z][a-z0-9+.-]*:\/\//, ""), t = t.replace(/^[^/@]*@/, ""), t = t.split(/[/?#]/)[0], t = t.split(":")[0], t = t.replace(/^www\./, ""), t = t.replace(/^\.+|\.+$/g, ""), /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.[a-z]{2,}$/.test(t) ? t : "";
|
|
16704
16710
|
}
|
|
16705
|
-
var
|
|
16706
|
-
let t =
|
|
16711
|
+
var q_ = (e) => {
|
|
16712
|
+
let t = K_(e);
|
|
16707
16713
|
return t ? `https://${t}/` : "";
|
|
16708
|
-
},
|
|
16709
|
-
function
|
|
16710
|
-
let n = (t) => e.includes(t), r =
|
|
16711
|
-
return
|
|
16714
|
+
}, J_ = (e) => q_(e?.domain) || G_(e?.appName);
|
|
16715
|
+
function Y_(e, t = null) {
|
|
16716
|
+
let n = (t) => e.includes(t), r = V_.find((e) => !n(e)) ?? null, i = r ? V_.indexOf(r) : V_.length - 1;
|
|
16717
|
+
return V_.map((e, a) => {
|
|
16712
16718
|
let o = a <= i, s = t !== null && t === e && o;
|
|
16713
16719
|
return {
|
|
16714
16720
|
id: e,
|
|
@@ -16718,21 +16724,21 @@ function J_(e, t = null) {
|
|
|
16718
16724
|
};
|
|
16719
16725
|
});
|
|
16720
16726
|
}
|
|
16721
|
-
var
|
|
16722
|
-
function
|
|
16727
|
+
var X_ = (e, t) => V_.filter((n) => n === t || e.includes(n));
|
|
16728
|
+
function Z_(e) {
|
|
16723
16729
|
return !e || !e.configured ? !1 : e.mode === "live" ? !e.webhookConfigured : !0;
|
|
16724
16730
|
}
|
|
16725
|
-
function
|
|
16731
|
+
function Q_() {
|
|
16726
16732
|
let [e, t] = G({
|
|
16727
16733
|
loading: !0,
|
|
16728
|
-
record:
|
|
16734
|
+
record: H_
|
|
16729
16735
|
});
|
|
16730
|
-
return W(() => xa(X(C,
|
|
16736
|
+
return W(() => xa(X(C, B_.collection, B_.doc), (e) => t({
|
|
16731
16737
|
loading: !1,
|
|
16732
|
-
record:
|
|
16738
|
+
record: U_(e.exists() ? e.data() : null)
|
|
16733
16739
|
}), () => t({
|
|
16734
16740
|
loading: !1,
|
|
16735
|
-
record:
|
|
16741
|
+
record: H_
|
|
16736
16742
|
})), []), {
|
|
16737
16743
|
loading: e.loading,
|
|
16738
16744
|
record: e.record,
|
|
@@ -16745,7 +16751,7 @@ function Z_() {
|
|
|
16745
16751
|
}
|
|
16746
16752
|
}));
|
|
16747
16753
|
try {
|
|
16748
|
-
return await Z(X(C,
|
|
16754
|
+
return await Z(X(C, B_.collection, B_.doc), e, { merge: !0 }), null;
|
|
16749
16755
|
} catch (e) {
|
|
16750
16756
|
return console.error("Could not save where you got to", e), "That could not be saved. Only an admin can, and only while you are signed in.";
|
|
16751
16757
|
}
|
|
@@ -16754,7 +16760,7 @@ function Z_() {
|
|
|
16754
16760
|
}
|
|
16755
16761
|
//#endregion
|
|
16756
16762
|
//#region src/pages/PaymentsGoLive.tsx
|
|
16757
|
-
function
|
|
16763
|
+
function $_(e, t) {
|
|
16758
16764
|
return !e && t !== "live" ? {
|
|
16759
16765
|
state: "off",
|
|
16760
16766
|
label: "In test mode"
|
|
@@ -16766,9 +16772,9 @@ function Q_(e, t) {
|
|
|
16766
16772
|
label: "Waiting for the live key"
|
|
16767
16773
|
};
|
|
16768
16774
|
}
|
|
16769
|
-
var
|
|
16770
|
-
function
|
|
16771
|
-
let [e, t] = G(null), [n, r] = G([]), { status: i } =
|
|
16775
|
+
var ev = ["checkout.session.completed", "checkout.session.async_payment_succeeded"], tv = "text-[12.5px] font-medium text-foreground/70 leading-relaxed", nv = "mt-1.5 space-y-1 list-disc list-inside marker:text-foreground/30", rv = "my-2 glass-panel border border-[var(--panel-border)] rounded-2xl overflow-hidden bg-background";
|
|
16776
|
+
function iv() {
|
|
16777
|
+
let [e, t] = G(null), [n, r] = G([]), { status: i } = I_(5e3), a = i?.mode ?? null, o = i?.webhookConfigured ?? !1, [s] = $g(), c = s === "local", { record: l } = Q_(), u = _o(J_(l)), d = l.done.includes("authorised") && !!u;
|
|
16772
16778
|
W(() => xa(Y(C, sd), (e) => {
|
|
16773
16779
|
t(!!e.docs.find((e) => e.id === cd)?.data()?.liveMode);
|
|
16774
16780
|
let n = [];
|
|
@@ -16783,7 +16789,7 @@ function rv() {
|
|
|
16783
16789
|
} catch (e) {
|
|
16784
16790
|
console.error("Could not save the go-live switch", e);
|
|
16785
16791
|
}
|
|
16786
|
-
}, p = !!e, m =
|
|
16792
|
+
}, p = !!e, m = $_(p, a), h = n.filter((e) => Cd(e, !1)), g = h.filter((e) => !Cd(e, !0)), _ = h.length > 0 && g.length === 0, v = h.some((e) => e.kind === "subscription");
|
|
16787
16793
|
return /* @__PURE__ */ q(yi, {
|
|
16788
16794
|
icon: qi,
|
|
16789
16795
|
title: "Go live",
|
|
@@ -16793,7 +16799,7 @@ function rv() {
|
|
|
16793
16799
|
onChange: f,
|
|
16794
16800
|
children: p && /* @__PURE__ */ J(K, { children: [
|
|
16795
16801
|
/* @__PURE__ */ J("ol", {
|
|
16796
|
-
className: `space-y-3.5 list-decimal list-inside ${
|
|
16802
|
+
className: `space-y-3.5 list-decimal list-inside ${tv}`,
|
|
16797
16803
|
children: [
|
|
16798
16804
|
/* @__PURE__ */ J("li", { children: [
|
|
16799
16805
|
/* @__PURE__ */ q("strong", { children: "Your live secret key." }),
|
|
@@ -16801,7 +16807,7 @@ function rv() {
|
|
|
16801
16807
|
/* @__PURE__ */ q("strong", { children: "live" }),
|
|
16802
16808
|
" account — not the sandbox.",
|
|
16803
16809
|
/* @__PURE__ */ J("ul", {
|
|
16804
|
-
className:
|
|
16810
|
+
className: nv,
|
|
16805
16811
|
children: [
|
|
16806
16812
|
/* @__PURE__ */ J("li", { children: [
|
|
16807
16813
|
"Open the dark strip along the bottom that says ",
|
|
@@ -16889,7 +16895,7 @@ function rv() {
|
|
|
16889
16895
|
})
|
|
16890
16896
|
}),
|
|
16891
16897
|
d ? /* @__PURE__ */ J("ul", {
|
|
16892
|
-
className:
|
|
16898
|
+
className: nv,
|
|
16893
16899
|
children: [
|
|
16894
16900
|
/* @__PURE__ */ J("li", { children: [
|
|
16895
16901
|
"Still in your ",
|
|
@@ -16912,7 +16918,7 @@ function rv() {
|
|
|
16912
16918
|
" search bar to find these two, and click the checkmark on each:",
|
|
16913
16919
|
/* @__PURE__ */ q("div", {
|
|
16914
16920
|
className: "mt-1.5 flex flex-col gap-1",
|
|
16915
|
-
children:
|
|
16921
|
+
children: ev.map((e) => /* @__PURE__ */ q(m_, {
|
|
16916
16922
|
code: e,
|
|
16917
16923
|
label: e,
|
|
16918
16924
|
compact: !0
|
|
@@ -16974,7 +16980,7 @@ function rv() {
|
|
|
16974
16980
|
/* @__PURE__ */ q("strong", { children: "Apply" }),
|
|
16975
16981
|
" and refresh this page. You are all set — the chip beside this step turns green."
|
|
16976
16982
|
] }), /* @__PURE__ */ q("div", {
|
|
16977
|
-
className:
|
|
16983
|
+
className: rv,
|
|
16978
16984
|
children: /* @__PURE__ */ q(__, {
|
|
16979
16985
|
name: "STRIPE_WEBHOOK_SECRET",
|
|
16980
16986
|
hint: "the whsec_… signing secret from the destination you just made"
|
|
@@ -17035,19 +17041,19 @@ function rv() {
|
|
|
17035
17041
|
}
|
|
17036
17042
|
//#endregion
|
|
17037
17043
|
//#region src/pages/SetupPayments.tsx
|
|
17038
|
-
var
|
|
17044
|
+
var av = {
|
|
17039
17045
|
configured: !1,
|
|
17040
17046
|
mode: null,
|
|
17041
17047
|
webhookConfigured: !1
|
|
17042
17048
|
};
|
|
17043
|
-
function
|
|
17044
|
-
let { status: t, error: n } =
|
|
17049
|
+
function ov(e = 5e3) {
|
|
17050
|
+
let { status: t, error: n } = I_(e);
|
|
17045
17051
|
return {
|
|
17046
|
-
...t ??
|
|
17052
|
+
...t ?? av,
|
|
17047
17053
|
checked: t !== null || !!n
|
|
17048
17054
|
};
|
|
17049
17055
|
}
|
|
17050
|
-
function
|
|
17056
|
+
function sv(e, t) {
|
|
17051
17057
|
if (!t.checked) return {
|
|
17052
17058
|
state: "saving",
|
|
17053
17059
|
label: "Checking"
|
|
@@ -17070,19 +17076,19 @@ function ov(e, t) {
|
|
|
17070
17076
|
};
|
|
17071
17077
|
}
|
|
17072
17078
|
}
|
|
17073
|
-
var
|
|
17079
|
+
var cv = {
|
|
17074
17080
|
configured: !1,
|
|
17075
17081
|
from: null,
|
|
17076
17082
|
adminCount: 0
|
|
17077
17083
|
};
|
|
17078
|
-
function
|
|
17079
|
-
let { status: t, error: n } =
|
|
17084
|
+
function lv(e = 5e3) {
|
|
17085
|
+
let { status: t, error: n } = L_(e);
|
|
17080
17086
|
return {
|
|
17081
|
-
...t ??
|
|
17087
|
+
...t ?? cv,
|
|
17082
17088
|
checked: t !== null || !!n
|
|
17083
17089
|
};
|
|
17084
17090
|
}
|
|
17085
|
-
function
|
|
17091
|
+
function uv(e) {
|
|
17086
17092
|
return e.checked ? e.configured ? {
|
|
17087
17093
|
state: "saved",
|
|
17088
17094
|
label: "Connected"
|
|
@@ -17094,7 +17100,7 @@ function lv(e) {
|
|
|
17094
17100
|
label: "Checking"
|
|
17095
17101
|
};
|
|
17096
17102
|
}
|
|
17097
|
-
function
|
|
17103
|
+
function dv(e) {
|
|
17098
17104
|
return e.checked ? e.from && !String(e.from).toLowerCase().endsWith("@resend.dev") ? {
|
|
17099
17105
|
state: "saved",
|
|
17100
17106
|
label: "Your own address"
|
|
@@ -17106,17 +17112,17 @@ function uv(e) {
|
|
|
17106
17112
|
label: "Checking"
|
|
17107
17113
|
};
|
|
17108
17114
|
}
|
|
17109
|
-
var
|
|
17110
|
-
function
|
|
17115
|
+
var fv = "text-accent underline underline-offset-2 font-semibold hover:text-accent-deep transition-colors";
|
|
17116
|
+
function pv({ href: e, children: t }) {
|
|
17111
17117
|
return /* @__PURE__ */ q("a", {
|
|
17112
17118
|
href: e,
|
|
17113
17119
|
target: "_blank",
|
|
17114
17120
|
rel: "noopener noreferrer",
|
|
17115
|
-
className:
|
|
17121
|
+
className: fv,
|
|
17116
17122
|
children: t
|
|
17117
17123
|
});
|
|
17118
17124
|
}
|
|
17119
|
-
function
|
|
17125
|
+
function mv({ number: e, title: t, aside: n, children: r }) {
|
|
17120
17126
|
return /* @__PURE__ */ J("div", {
|
|
17121
17127
|
className: "flex flex-col gap-3 pb-5 mb-5 border-b border-[var(--panel-border)]/50 last:border-0 last:pb-0 last:mb-0",
|
|
17122
17128
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -17138,8 +17144,8 @@ function pv({ number: e, title: t, aside: n, children: r }) {
|
|
|
17138
17144
|
})]
|
|
17139
17145
|
});
|
|
17140
17146
|
}
|
|
17141
|
-
var
|
|
17142
|
-
function
|
|
17147
|
+
var hv = "space-y-1.5 list-decimal list-inside text-foreground/75", gv = "glass-panel border border-[var(--panel-border)] rounded-2xl overflow-hidden bg-background";
|
|
17148
|
+
function _v({ onConfirm: t, hint: n }) {
|
|
17143
17149
|
let [r] = $g();
|
|
17144
17150
|
return /* @__PURE__ */ J("div", {
|
|
17145
17151
|
className: "flex flex-col gap-2 pt-1",
|
|
@@ -17154,7 +17160,7 @@ function gv({ onConfirm: t, hint: n }) {
|
|
|
17154
17160
|
})]
|
|
17155
17161
|
});
|
|
17156
17162
|
}
|
|
17157
|
-
function
|
|
17163
|
+
function vv({ icon: e, title: t, description: n, stepsDescription: r, button: i, secret: a, open: o, onOpen: s, confirmed: c, steps: l, children: u }) {
|
|
17158
17164
|
let [d] = $g();
|
|
17159
17165
|
return /* @__PURE__ */ q(un, {
|
|
17160
17166
|
icon: e,
|
|
@@ -17190,20 +17196,20 @@ function _v({ icon: e, title: t, description: n, stepsDescription: r, button: i,
|
|
|
17190
17196
|
] })
|
|
17191
17197
|
});
|
|
17192
17198
|
}
|
|
17193
|
-
function
|
|
17194
|
-
let t =
|
|
17199
|
+
function yv({ onConfirm: e }) {
|
|
17200
|
+
let t = ov(), [n] = $g(), r = n === "local";
|
|
17195
17201
|
return /* @__PURE__ */ J("div", {
|
|
17196
17202
|
className: "flex flex-col",
|
|
17197
17203
|
children: [
|
|
17198
|
-
/* @__PURE__ */ q(
|
|
17204
|
+
/* @__PURE__ */ q(mv, {
|
|
17199
17205
|
number: 1,
|
|
17200
17206
|
title: "Make a Stripe account",
|
|
17201
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17207
|
+
aside: /* @__PURE__ */ q(br, { ...sv(1, t) }),
|
|
17202
17208
|
children: /* @__PURE__ */ J("ol", {
|
|
17203
|
-
className:
|
|
17209
|
+
className: hv,
|
|
17204
17210
|
children: [/* @__PURE__ */ J("li", { children: [
|
|
17205
17211
|
"Open ",
|
|
17206
|
-
/* @__PURE__ */ q(
|
|
17212
|
+
/* @__PURE__ */ q(pv, {
|
|
17207
17213
|
href: "https://dashboard.stripe.com",
|
|
17208
17214
|
children: "dashboard.stripe.com"
|
|
17209
17215
|
}),
|
|
@@ -17218,12 +17224,12 @@ function vv({ onConfirm: e }) {
|
|
|
17218
17224
|
] })]
|
|
17219
17225
|
})
|
|
17220
17226
|
}),
|
|
17221
|
-
/* @__PURE__ */ q(
|
|
17227
|
+
/* @__PURE__ */ q(mv, {
|
|
17222
17228
|
number: 2,
|
|
17223
17229
|
title: "Copy the test secret key",
|
|
17224
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17230
|
+
aside: /* @__PURE__ */ q(br, { ...sv(2, t) }),
|
|
17225
17231
|
children: /* @__PURE__ */ J("ol", {
|
|
17226
|
-
className:
|
|
17232
|
+
className: hv,
|
|
17227
17233
|
children: [/* @__PURE__ */ J("li", { children: [
|
|
17228
17234
|
"Along the very bottom of the Stripe page is a dark bar that says ",
|
|
17229
17235
|
/* @__PURE__ */ q("strong", { children: "Developers" }),
|
|
@@ -17240,10 +17246,10 @@ function vv({ onConfirm: e }) {
|
|
|
17240
17246
|
] })]
|
|
17241
17247
|
})
|
|
17242
17248
|
}),
|
|
17243
|
-
/* @__PURE__ */ J(
|
|
17249
|
+
/* @__PURE__ */ J(mv, {
|
|
17244
17250
|
number: 3,
|
|
17245
17251
|
title: r ? "Put it in your .env and start the app again" : "Paste it into Secrets and press Apply",
|
|
17246
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17252
|
+
aside: /* @__PURE__ */ q(br, { ...sv(3, t) }),
|
|
17247
17253
|
children: [
|
|
17248
17254
|
r ? /* @__PURE__ */ J("p", { children: [
|
|
17249
17255
|
"Open your ",
|
|
@@ -17252,7 +17258,7 @@ function vv({ onConfirm: e }) {
|
|
|
17252
17258
|
/* @__PURE__ */ q("strong", { children: "start the app again" }),
|
|
17253
17259
|
" so it is read."
|
|
17254
17260
|
] }) : /* @__PURE__ */ J("ol", {
|
|
17255
|
-
className:
|
|
17261
|
+
className: hv,
|
|
17256
17262
|
children: [
|
|
17257
17263
|
/* @__PURE__ */ J("li", { children: [
|
|
17258
17264
|
"Click the ",
|
|
@@ -17280,7 +17286,7 @@ function vv({ onConfirm: e }) {
|
|
|
17280
17286
|
]
|
|
17281
17287
|
}),
|
|
17282
17288
|
/* @__PURE__ */ q("div", {
|
|
17283
|
-
className:
|
|
17289
|
+
className: gv,
|
|
17284
17290
|
children: /* @__PURE__ */ q(__, {
|
|
17285
17291
|
name: "STRIPE_SECRET_KEY",
|
|
17286
17292
|
hint: "the sk_test_… key you copied in step 2"
|
|
@@ -17293,24 +17299,24 @@ function vv({ onConfirm: e }) {
|
|
|
17293
17299
|
] })
|
|
17294
17300
|
]
|
|
17295
17301
|
}),
|
|
17296
|
-
/* @__PURE__ */ q(
|
|
17302
|
+
/* @__PURE__ */ q(_v, { onConfirm: e })
|
|
17297
17303
|
]
|
|
17298
17304
|
});
|
|
17299
17305
|
}
|
|
17300
|
-
function
|
|
17301
|
-
let t =
|
|
17306
|
+
function bv({ onConfirm: e }) {
|
|
17307
|
+
let t = lv(), [n] = $g(), r = n === "local";
|
|
17302
17308
|
return /* @__PURE__ */ J("div", {
|
|
17303
17309
|
className: "flex flex-col",
|
|
17304
17310
|
children: [
|
|
17305
|
-
/* @__PURE__ */ q(
|
|
17311
|
+
/* @__PURE__ */ q(mv, {
|
|
17306
17312
|
number: 1,
|
|
17307
17313
|
title: "Make a Resend account and a key",
|
|
17308
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17314
|
+
aside: /* @__PURE__ */ q(br, { ...uv(t) }),
|
|
17309
17315
|
children: /* @__PURE__ */ J("ol", {
|
|
17310
|
-
className:
|
|
17316
|
+
className: hv,
|
|
17311
17317
|
children: [/* @__PURE__ */ J("li", { children: [
|
|
17312
17318
|
"Open ",
|
|
17313
|
-
/* @__PURE__ */ q(
|
|
17319
|
+
/* @__PURE__ */ q(pv, {
|
|
17314
17320
|
href: "https://resend.com",
|
|
17315
17321
|
children: "resend.com"
|
|
17316
17322
|
}),
|
|
@@ -17326,10 +17332,10 @@ function yv({ onConfirm: e }) {
|
|
|
17326
17332
|
] })]
|
|
17327
17333
|
})
|
|
17328
17334
|
}),
|
|
17329
|
-
/* @__PURE__ */ J(
|
|
17335
|
+
/* @__PURE__ */ J(mv, {
|
|
17330
17336
|
number: 2,
|
|
17331
17337
|
title: r ? "Put two values in your .env and start the app again" : "Paste two secrets and press Apply",
|
|
17332
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17338
|
+
aside: /* @__PURE__ */ q(br, { ...uv(t) }),
|
|
17333
17339
|
children: [r ? /* @__PURE__ */ J("p", { children: [
|
|
17334
17340
|
"Open your ",
|
|
17335
17341
|
/* @__PURE__ */ q("strong", { children: ".env" }),
|
|
@@ -17337,7 +17343,7 @@ function yv({ onConfirm: e }) {
|
|
|
17337
17343
|
/* @__PURE__ */ q("strong", { children: "start the app again" }),
|
|
17338
17344
|
" so they are read."
|
|
17339
17345
|
] }) : /* @__PURE__ */ J("ol", {
|
|
17340
|
-
className:
|
|
17346
|
+
className: hv,
|
|
17341
17347
|
children: [
|
|
17342
17348
|
/* @__PURE__ */ J("li", { children: [
|
|
17343
17349
|
"Click the ",
|
|
@@ -17364,7 +17370,7 @@ function yv({ onConfirm: e }) {
|
|
|
17364
17370
|
] })
|
|
17365
17371
|
]
|
|
17366
17372
|
}), /* @__PURE__ */ J("div", {
|
|
17367
|
-
className:
|
|
17373
|
+
className: gv,
|
|
17368
17374
|
children: [/* @__PURE__ */ q(__, {
|
|
17369
17375
|
name: "RESEND_API_KEY",
|
|
17370
17376
|
hint: "the re_… key you just made in Resend"
|
|
@@ -17374,18 +17380,18 @@ function yv({ onConfirm: e }) {
|
|
|
17374
17380
|
})]
|
|
17375
17381
|
})]
|
|
17376
17382
|
}),
|
|
17377
|
-
/* @__PURE__ */ J(
|
|
17383
|
+
/* @__PURE__ */ J(mv, {
|
|
17378
17384
|
number: 3,
|
|
17379
17385
|
title: "Verify your domain, or mail only reaches you",
|
|
17380
|
-
aside: /* @__PURE__ */ q(br, { ...
|
|
17386
|
+
aside: /* @__PURE__ */ q(br, { ...dv(t) }),
|
|
17381
17387
|
children: [
|
|
17382
17388
|
/* @__PURE__ */ J("p", { children: [/* @__PURE__ */ q("strong", { children: "Until you verify a domain of your own, Resend delivers only to the email address you made your Resend account with." }), " A test email to yourself works; a customer's confirmation, a buyer's receipt, a booking note to someone else does not arrive at all. Do this before anyone but you should get an email."] }),
|
|
17383
17389
|
/* @__PURE__ */ J("ol", {
|
|
17384
|
-
className:
|
|
17390
|
+
className: hv,
|
|
17385
17391
|
children: [
|
|
17386
17392
|
/* @__PURE__ */ J("li", { children: [
|
|
17387
17393
|
"In Resend open ",
|
|
17388
|
-
/* @__PURE__ */ q(
|
|
17394
|
+
/* @__PURE__ */ q(pv, {
|
|
17389
17395
|
href: "https://resend.com/domains",
|
|
17390
17396
|
children: "Domains"
|
|
17391
17397
|
}),
|
|
@@ -17416,7 +17422,7 @@ function yv({ onConfirm: e }) {
|
|
|
17416
17422
|
]
|
|
17417
17423
|
}),
|
|
17418
17424
|
/* @__PURE__ */ q("div", {
|
|
17419
|
-
className:
|
|
17425
|
+
className: gv,
|
|
17420
17426
|
children: /* @__PURE__ */ q(__, {
|
|
17421
17427
|
name: "EMAIL_FROM",
|
|
17422
17428
|
hint: "an address at your verified domain, like hello@yourbusiness.com"
|
|
@@ -17424,11 +17430,11 @@ function yv({ onConfirm: e }) {
|
|
|
17424
17430
|
})
|
|
17425
17431
|
]
|
|
17426
17432
|
}),
|
|
17427
|
-
/* @__PURE__ */ q(
|
|
17433
|
+
/* @__PURE__ */ q(_v, { onConfirm: e })
|
|
17428
17434
|
]
|
|
17429
17435
|
});
|
|
17430
17436
|
}
|
|
17431
|
-
function
|
|
17437
|
+
function xv() {
|
|
17432
17438
|
return /* @__PURE__ */ q(Na, {
|
|
17433
17439
|
to: "/setup",
|
|
17434
17440
|
replace: !0
|
|
@@ -17436,7 +17442,7 @@ function bv() {
|
|
|
17436
17442
|
}
|
|
17437
17443
|
//#endregion
|
|
17438
17444
|
//#region src/pages/PaymentsAdmin.tsx
|
|
17439
|
-
function
|
|
17445
|
+
function Sv(e) {
|
|
17440
17446
|
return e.kind === "subscription" ? e.active ? {
|
|
17441
17447
|
label: "Subscription active",
|
|
17442
17448
|
tone: "good"
|
|
@@ -17457,7 +17463,7 @@ function xv(e) {
|
|
|
17457
17463
|
tone: "quiet"
|
|
17458
17464
|
};
|
|
17459
17465
|
}
|
|
17460
|
-
function
|
|
17466
|
+
function Cv(e, t) {
|
|
17461
17467
|
if (e == null) return "—";
|
|
17462
17468
|
try {
|
|
17463
17469
|
return new Intl.NumberFormat(void 0, {
|
|
@@ -17468,7 +17474,7 @@ function Sv(e, t) {
|
|
|
17468
17474
|
return `${e} ${(t || "").toUpperCase()}`.trim();
|
|
17469
17475
|
}
|
|
17470
17476
|
}
|
|
17471
|
-
var
|
|
17477
|
+
var wv = (e) => e ? {
|
|
17472
17478
|
description: "Every Pay button on your pages works. Switch it off to pause all of it at once.",
|
|
17473
17479
|
chip: {
|
|
17474
17480
|
state: "saved",
|
|
@@ -17480,19 +17486,19 @@ var Cv = (e) => e ? {
|
|
|
17480
17486
|
state: "off",
|
|
17481
17487
|
label: "Off"
|
|
17482
17488
|
}
|
|
17483
|
-
},
|
|
17489
|
+
}, Tv = (e) => e ? (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString(void 0, {
|
|
17484
17490
|
day: "numeric",
|
|
17485
17491
|
month: "short",
|
|
17486
17492
|
year: "numeric"
|
|
17487
17493
|
}) : "";
|
|
17488
|
-
function
|
|
17494
|
+
function Ev({ label: e, tone: t }) {
|
|
17489
17495
|
return /* @__PURE__ */ q("span", {
|
|
17490
17496
|
className: `inline-flex items-center h-6 px-2.5 rounded-full border text-[11px] font-bold whitespace-nowrap shrink-0 ${t === "good" ? "text-emerald-500 bg-emerald-500/10 border-emerald-500/20" : t === "bad" ? "text-red-500 bg-red-500/10 border-red-500/20" : "text-foreground/50 bg-foreground/[0.04] border-[var(--panel-border)]"}`,
|
|
17491
17497
|
children: e
|
|
17492
17498
|
});
|
|
17493
17499
|
}
|
|
17494
|
-
function
|
|
17495
|
-
let { user: e } = Or(), { status: t, error: n, reread: r } =
|
|
17500
|
+
function Dv() {
|
|
17501
|
+
let { user: e } = Or(), { status: t, error: n, reread: r } = I_(), [i, a] = G(!1), [o, s] = G(!1), [c, u] = G(null), [d, f] = G(""), [p, m] = G([]), [h, g] = G([]), [_, v] = G(!1), [y, b] = G(""), [x, S] = G(!1), [C, w] = G(!1), [T, E] = G(""), D = A_("payments"), [O, k] = G(""), A = wv(D.on), j = ta(async (t) => {
|
|
17496
17502
|
let n = e ? await e.getIdToken() : "", r = await fetch(t, { headers: n ? { Authorization: `Bearer ${n}` } : void 0 }), i = await r.json().catch(() => ({}));
|
|
17497
17503
|
if (!r.ok || i?.success === !1) throw Error(i?.error || "The server could not answer.");
|
|
17498
17504
|
return i;
|
|
@@ -17557,7 +17563,7 @@ function Ev() {
|
|
|
17557
17563
|
children: !t && !n ? /* @__PURE__ */ q("div", {
|
|
17558
17564
|
className: "flex items-center justify-center flex-1 text-foreground/40 py-16",
|
|
17559
17565
|
children: /* @__PURE__ */ q(ui, { className: "w-6 h-6 animate-spin text-accent" })
|
|
17560
|
-
}) : ne ? /* @__PURE__ */ q(
|
|
17566
|
+
}) : ne ? /* @__PURE__ */ q(vv, {
|
|
17561
17567
|
icon: Oi,
|
|
17562
17568
|
title: "Connect Stripe",
|
|
17563
17569
|
description: "This app is not taking payments yet.",
|
|
@@ -17567,7 +17573,7 @@ function Ev() {
|
|
|
17567
17573
|
open: i,
|
|
17568
17574
|
onOpen: () => a(!0),
|
|
17569
17575
|
confirmed: o,
|
|
17570
|
-
steps: /* @__PURE__ */ q(
|
|
17576
|
+
steps: /* @__PURE__ */ q(yv, { onConfirm: N }),
|
|
17571
17577
|
children: /* @__PURE__ */ q(si, { children: "Payments run through Stripe, and connecting it is one pasted key — no code, no terminal. Once it is in, this screen fills itself: what you sell, and every payment as it happens." })
|
|
17572
17578
|
}) : /* @__PURE__ */ J("div", {
|
|
17573
17579
|
className: "flex flex-col gap-4",
|
|
@@ -17608,7 +17614,7 @@ function Ev() {
|
|
|
17608
17614
|
children: n
|
|
17609
17615
|
}) : /* @__PURE__ */ q(si, { children: t?.mode === "live" ? "Connected with a live key. Payments made anywhere on your site are real money." : "Test mode connected. Your Pay buttons work end to end, but only test cards are accepted and no real money moves. When you are ready for real payments, use Go live below." })
|
|
17610
17616
|
}),
|
|
17611
|
-
/* @__PURE__ */ q(
|
|
17617
|
+
/* @__PURE__ */ q(iv, {}),
|
|
17612
17618
|
/* @__PURE__ */ q(Hg, {}),
|
|
17613
17619
|
/* @__PURE__ */ q(un, {
|
|
17614
17620
|
icon: l,
|
|
@@ -17644,7 +17650,7 @@ function Ev() {
|
|
|
17644
17650
|
}),
|
|
17645
17651
|
/* @__PURE__ */ J("span", {
|
|
17646
17652
|
className: "text-[12.5px] font-semibold text-foreground/60 whitespace-nowrap shrink-0",
|
|
17647
|
-
children: [
|
|
17653
|
+
children: [Cv(e.amount, e.currency), e.interval ? ` / ${e.interval}` : ""]
|
|
17648
17654
|
}),
|
|
17649
17655
|
/* @__PURE__ */ q(V, {
|
|
17650
17656
|
compact: !0,
|
|
@@ -17668,7 +17674,7 @@ function Ev() {
|
|
|
17668
17674
|
}) : _ ? I.length === 0 ? /* @__PURE__ */ q(si, { children: "Nothing yet. When someone pays, it lands here on its own — and refunds you make in Stripe show up here too, with nothing to sync." }) : /* @__PURE__ */ J("div", {
|
|
17669
17675
|
className: "flex flex-col gap-2.5",
|
|
17670
17676
|
children: [I.map((e) => {
|
|
17671
|
-
let t =
|
|
17677
|
+
let t = Sv(e);
|
|
17672
17678
|
return /* @__PURE__ */ J("div", {
|
|
17673
17679
|
className: `flex items-center gap-3 px-3.5 py-2.5 ${Lt}`,
|
|
17674
17680
|
children: [
|
|
@@ -17684,13 +17690,13 @@ function Ev() {
|
|
|
17684
17690
|
}),
|
|
17685
17691
|
/* @__PURE__ */ q("span", {
|
|
17686
17692
|
className: "max-sm:hidden text-[11.5px] font-medium text-foreground/45 whitespace-nowrap shrink-0",
|
|
17687
|
-
children:
|
|
17693
|
+
children: Tv(e.created)
|
|
17688
17694
|
}),
|
|
17689
17695
|
/* @__PURE__ */ J("span", {
|
|
17690
17696
|
className: "text-[12.5px] font-semibold text-foreground/70 whitespace-nowrap shrink-0",
|
|
17691
|
-
children: [
|
|
17697
|
+
children: [Cv(e.amount, e.currency), e.kind === "subscription" && e.interval ? ` / ${e.interval}` : ""]
|
|
17692
17698
|
}),
|
|
17693
|
-
/* @__PURE__ */ q(
|
|
17699
|
+
/* @__PURE__ */ q(Ev, {
|
|
17694
17700
|
label: t.label,
|
|
17695
17701
|
tone: t.tone
|
|
17696
17702
|
})
|
|
@@ -17715,17 +17721,17 @@ function Ev() {
|
|
|
17715
17721
|
}
|
|
17716
17722
|
//#endregion
|
|
17717
17723
|
//#region src/components/schedule/BlockedDatesField.tsx
|
|
17718
|
-
var
|
|
17724
|
+
var Ov = "w-[6.5rem] shrink-0", kv = "w-9 h-9 rounded-[var(--btn-radius,0.75rem)] border border-[var(--panel-border)] flex items-center justify-center shrink-0 text-foreground/45 hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06] active:scale-[0.98] transition-all cursor-pointer", Av = "date-field h-9 w-[10.5rem] shrink-0 px-3 text-[13px] font-semibold bg-transparent border border-[var(--panel-border)] text-foreground focus:outline-none focus:border-accent transition-colors", jv = {
|
|
17719
17725
|
from: "09:00",
|
|
17720
17726
|
to: "13:00"
|
|
17721
17727
|
};
|
|
17722
|
-
function
|
|
17728
|
+
function Mv(e, t) {
|
|
17723
17729
|
return {
|
|
17724
17730
|
upcoming: e.filter((e) => e.date >= t),
|
|
17725
17731
|
past: e.filter((e) => e.date < t)
|
|
17726
17732
|
};
|
|
17727
17733
|
}
|
|
17728
|
-
function
|
|
17734
|
+
function Nv({ row: e, onChange: t, onRemove: n }) {
|
|
17729
17735
|
let r = e.windows.length === 0, i = (n, r) => t({
|
|
17730
17736
|
...e,
|
|
17731
17737
|
windows: e.windows.map((e, t) => t === n ? {
|
|
@@ -17746,7 +17752,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17746
17752
|
...e,
|
|
17747
17753
|
date: n.target.value
|
|
17748
17754
|
}),
|
|
17749
|
-
className:
|
|
17755
|
+
className: Av,
|
|
17750
17756
|
style: { borderRadius: "var(--input-radius, 0.75rem)" }
|
|
17751
17757
|
}),
|
|
17752
17758
|
/* @__PURE__ */ q("div", {
|
|
@@ -17763,7 +17769,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17763
17769
|
}],
|
|
17764
17770
|
onChange: (n) => t({
|
|
17765
17771
|
...e,
|
|
17766
|
-
windows: n === "all" ? [] : [
|
|
17772
|
+
windows: n === "all" ? [] : [jv]
|
|
17767
17773
|
}),
|
|
17768
17774
|
className: "console-select",
|
|
17769
17775
|
compact: !0,
|
|
@@ -17777,7 +17783,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17777
17783
|
title: `Remove ${e.date || "this date"}`,
|
|
17778
17784
|
"aria-label": `Remove ${e.date || "this date"}`,
|
|
17779
17785
|
onClick: n,
|
|
17780
|
-
className: `${
|
|
17786
|
+
className: `${kv} ml-auto`,
|
|
17781
17787
|
children: /* @__PURE__ */ q(nn, { className: "w-3.5 h-3.5" })
|
|
17782
17788
|
})
|
|
17783
17789
|
]
|
|
@@ -17787,7 +17793,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17787
17793
|
className: "flex items-center gap-2",
|
|
17788
17794
|
children: [
|
|
17789
17795
|
/* @__PURE__ */ q("div", {
|
|
17790
|
-
className:
|
|
17796
|
+
className: Ov,
|
|
17791
17797
|
children: /* @__PURE__ */ q(oi, {
|
|
17792
17798
|
ariaLabel: `${e.date} from${r ? ` (${r + 1})` : ""}`,
|
|
17793
17799
|
value: n.from,
|
|
@@ -17804,7 +17810,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17804
17810
|
children: "–"
|
|
17805
17811
|
}),
|
|
17806
17812
|
/* @__PURE__ */ q("div", {
|
|
17807
|
-
className:
|
|
17813
|
+
className: Ov,
|
|
17808
17814
|
children: /* @__PURE__ */ q(oi, {
|
|
17809
17815
|
ariaLabel: `${e.date} to${r ? ` (${r + 1})` : ""}`,
|
|
17810
17816
|
value: n.to,
|
|
@@ -17824,7 +17830,7 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17824
17830
|
...e,
|
|
17825
17831
|
windows: e.windows.filter((e, t) => t !== r)
|
|
17826
17832
|
}),
|
|
17827
|
-
className:
|
|
17833
|
+
className: kv,
|
|
17828
17834
|
children: /* @__PURE__ */ q(nn, { className: "w-3.5 h-3.5" })
|
|
17829
17835
|
})
|
|
17830
17836
|
]
|
|
@@ -17843,8 +17849,8 @@ function Mv({ row: e, onChange: t, onRemove: n }) {
|
|
|
17843
17849
|
})]
|
|
17844
17850
|
});
|
|
17845
17851
|
}
|
|
17846
|
-
function
|
|
17847
|
-
let i = qr(r ? r() : /* @__PURE__ */ new Date()), [a, o] = G(!1), { upcoming: s, past: c } =
|
|
17852
|
+
function Pv({ blocked: t, onChange: n, now: r }) {
|
|
17853
|
+
let i = qr(r ? r() : /* @__PURE__ */ new Date()), [a, o] = G(!1), { upcoming: s, past: c } = Mv(t, i), l = a ? [...c, ...s] : s, u = (e, r) => n(t.map((t) => t === e ? r : t));
|
|
17848
17854
|
return /* @__PURE__ */ q(qt, {
|
|
17849
17855
|
label: "Days away",
|
|
17850
17856
|
hint: "Dates this week's hours do not apply to — a holiday, a flight, an afternoon out. Nobody can book them, on any link on these hours.",
|
|
@@ -17853,7 +17859,7 @@ function Nv({ blocked: t, onChange: n, now: r }) {
|
|
|
17853
17859
|
children: [l.length === 0 ? /* @__PURE__ */ q("p", {
|
|
17854
17860
|
className: `${e} py-3`,
|
|
17855
17861
|
children: "No days blocked out. Add one for a holiday or a day off."
|
|
17856
|
-
}) : l.map((e, r) => /* @__PURE__ */ q(
|
|
17862
|
+
}) : l.map((e, r) => /* @__PURE__ */ q(Nv, {
|
|
17857
17863
|
row: e,
|
|
17858
17864
|
onChange: (t) => u(e, t),
|
|
17859
17865
|
onRemove: () => n(t.filter((t) => t !== e))
|
|
@@ -17880,8 +17886,8 @@ function Nv({ blocked: t, onChange: n, now: r }) {
|
|
|
17880
17886
|
}
|
|
17881
17887
|
//#endregion
|
|
17882
17888
|
//#region src/components/schedule/BookingQuestionsField.tsx
|
|
17883
|
-
var
|
|
17884
|
-
function
|
|
17889
|
+
var Fv = (e) => Li.find((t) => t.value === e)?.label || "Short text";
|
|
17890
|
+
function Iv({ options: e, onChange: t }) {
|
|
17885
17891
|
return /* @__PURE__ */ q(qt, {
|
|
17886
17892
|
label: "Choices",
|
|
17887
17893
|
hint: "What people pick from.",
|
|
@@ -17919,7 +17925,7 @@ function Fv({ options: e, onChange: t }) {
|
|
|
17919
17925
|
})
|
|
17920
17926
|
});
|
|
17921
17927
|
}
|
|
17922
|
-
function
|
|
17928
|
+
function Lv({ question: t, index: n, count: r, siblings: a, fixed: o, onChange: s, onMove: c, onRemove: l }) {
|
|
17923
17929
|
let [u, d] = G(!t.label.trim()), f = t.label.trim() || "A new question";
|
|
17924
17930
|
return /* @__PURE__ */ J("div", {
|
|
17925
17931
|
className: "rounded-2xl border border-[var(--panel-border)]",
|
|
@@ -17937,7 +17943,7 @@ function Iv({ question: t, index: n, count: r, siblings: a, fixed: o, onChange:
|
|
|
17937
17943
|
className: "flex items-center gap-2.5 shrink-0",
|
|
17938
17944
|
children: [/* @__PURE__ */ q("span", {
|
|
17939
17945
|
className: `${e} max-sm:hidden`,
|
|
17940
|
-
children: o ? "Always asked" : `${
|
|
17946
|
+
children: o ? "Always asked" : `${Fv(t.type)}${t.required ? " · must be answered" : ""}`
|
|
17941
17947
|
}), /* @__PURE__ */ q(st, { className: `w-3.5 h-3.5 text-foreground/40 shrink-0 transition-transform ${u ? "rotate-180" : ""}` })]
|
|
17942
17948
|
})]
|
|
17943
17949
|
}), !o && /* @__PURE__ */ J("div", {
|
|
@@ -18006,7 +18012,7 @@ function Iv({ question: t, index: n, count: r, siblings: a, fixed: o, onChange:
|
|
|
18006
18012
|
required: e
|
|
18007
18013
|
})
|
|
18008
18014
|
})] }),
|
|
18009
|
-
t.type === "select" && /* @__PURE__ */ q(
|
|
18015
|
+
t.type === "select" && /* @__PURE__ */ q(Iv, {
|
|
18010
18016
|
options: t.options,
|
|
18011
18017
|
onChange: (e) => s({
|
|
18012
18018
|
...t,
|
|
@@ -18027,14 +18033,14 @@ function Iv({ question: t, index: n, count: r, siblings: a, fixed: o, onChange:
|
|
|
18027
18033
|
})]
|
|
18028
18034
|
});
|
|
18029
18035
|
}
|
|
18030
|
-
function
|
|
18036
|
+
function Rv({ questions: e, onChange: t }) {
|
|
18031
18037
|
let n = e.filter((e) => Ci(e.name)), r = e.filter((e) => !Ci(e.name)), i = (e) => t([...n, ...e]);
|
|
18032
18038
|
return /* @__PURE__ */ q(qt, {
|
|
18033
18039
|
label: "What does a booking ask for?",
|
|
18034
18040
|
children: /* @__PURE__ */ J("div", {
|
|
18035
18041
|
className: "flex flex-col gap-3.5",
|
|
18036
18042
|
children: [
|
|
18037
|
-
n.map((n) => /* @__PURE__ */ q(
|
|
18043
|
+
n.map((n) => /* @__PURE__ */ q(Lv, {
|
|
18038
18044
|
question: n,
|
|
18039
18045
|
index: 0,
|
|
18040
18046
|
count: 1,
|
|
@@ -18044,7 +18050,7 @@ function Lv({ questions: e, onChange: t }) {
|
|
|
18044
18050
|
onMove: () => {},
|
|
18045
18051
|
onRemove: () => {}
|
|
18046
18052
|
}, n.name)),
|
|
18047
|
-
r.map((t, n) => /* @__PURE__ */ q(
|
|
18053
|
+
r.map((t, n) => /* @__PURE__ */ q(Lv, {
|
|
18048
18054
|
question: t,
|
|
18049
18055
|
index: n,
|
|
18050
18056
|
count: r.length,
|
|
@@ -18074,12 +18080,12 @@ function Lv({ questions: e, onChange: t }) {
|
|
|
18074
18080
|
})
|
|
18075
18081
|
});
|
|
18076
18082
|
}
|
|
18077
|
-
var
|
|
18078
|
-
function
|
|
18083
|
+
var zv = (e, t, n = 72) => e >= n && e <= Math.max(n, t * .45);
|
|
18084
|
+
function Bv(e, t = 340) {
|
|
18079
18085
|
if (!e) return null;
|
|
18080
18086
|
let n = () => {
|
|
18081
18087
|
let t = e.getBoundingClientRect?.(), n = typeof window < "u" && window.innerHeight || 0;
|
|
18082
|
-
t && n &&
|
|
18088
|
+
t && n && zv(t.top, n) || e.scrollIntoView?.({
|
|
18083
18089
|
behavior: "smooth",
|
|
18084
18090
|
block: "start"
|
|
18085
18091
|
});
|
|
@@ -18088,8 +18094,8 @@ function zv(e, t = 340) {
|
|
|
18088
18094
|
}
|
|
18089
18095
|
//#endregion
|
|
18090
18096
|
//#region src/components/schedule/BookingLinksCard.tsx
|
|
18091
|
-
var
|
|
18092
|
-
function
|
|
18097
|
+
var Vv = "__new_payment__";
|
|
18098
|
+
function Hv() {
|
|
18093
18099
|
let [e, t] = G([]);
|
|
18094
18100
|
return W(() => {
|
|
18095
18101
|
let e = xa(Y(C, sd), (e) => {
|
|
@@ -18101,7 +18107,7 @@ function Vv() {
|
|
|
18101
18107
|
return () => e();
|
|
18102
18108
|
}, []), e;
|
|
18103
18109
|
}
|
|
18104
|
-
function
|
|
18110
|
+
function Uv({ service: e, what: t, path: n, screen: r, children: i }) {
|
|
18105
18111
|
return e.loading ? null : e.configured ? e.on ? /* @__PURE__ */ q(K, { children: i }) : null : /* @__PURE__ */ J("div", {
|
|
18106
18112
|
className: "rounded-2xl border border-accent/25 bg-accent/[0.05] px-4 py-3.5 flex flex-wrap items-center justify-between gap-x-4 gap-y-2",
|
|
18107
18113
|
children: [/* @__PURE__ */ J("span", {
|
|
@@ -18123,12 +18129,12 @@ function Hv({ service: e, what: t, path: n, screen: r, children: i }) {
|
|
|
18123
18129
|
})]
|
|
18124
18130
|
});
|
|
18125
18131
|
}
|
|
18126
|
-
function
|
|
18132
|
+
function Wv({ value: e, products: t, meetingName: n, canCreate: r, onChange: i, onCreate: a }) {
|
|
18127
18133
|
let [o, s] = G(!1), [c, l] = G(""), [u, d] = G(""), [f, p] = G(!1), m = [...t.map((e) => ({
|
|
18128
18134
|
value: e.id,
|
|
18129
18135
|
label: `${Td(e)} — ${pd(e).map((e) => e.amount).filter(Boolean).join(" + ") || "no price yet"}`
|
|
18130
18136
|
})), ...r ? [{
|
|
18131
|
-
value:
|
|
18137
|
+
value: Vv,
|
|
18132
18138
|
label: "+ A new one-time payment"
|
|
18133
18139
|
}] : []], h = t.find((t) => t.id === e), g = c.trim() && md(c) === null ? "Just a number, like 25." : void 0;
|
|
18134
18140
|
return /* @__PURE__ */ J("div", {
|
|
@@ -18136,7 +18142,7 @@ function Uv({ value: e, products: t, meetingName: n, canCreate: r, onChange: i,
|
|
|
18136
18142
|
children: [/* @__PURE__ */ q(Sn, {
|
|
18137
18143
|
label: "Payment for this meeting",
|
|
18138
18144
|
hint: h ? "Taken on the booking page before the time is confirmed. Its price and its link are on the Payments screen." : r ? "Optional. A one-time payment taken on the booking page before the time is confirmed." : t.length ? "Optional. One of the payments your admin set up, taken on the booking page before the time is confirmed." : "Your admin has not set up a payment to charge for a meeting yet.",
|
|
18139
|
-
value: o ?
|
|
18145
|
+
value: o ? Vv : e,
|
|
18140
18146
|
placeholder: "No payment",
|
|
18141
18147
|
options: m,
|
|
18142
18148
|
onChange: (e) => {
|
|
@@ -18186,7 +18192,7 @@ function Uv({ value: e, products: t, meetingName: n, canCreate: r, onChange: i,
|
|
|
18186
18192
|
})]
|
|
18187
18193
|
});
|
|
18188
18194
|
}
|
|
18189
|
-
function
|
|
18195
|
+
function Gv({ link: e, onChange: t }) {
|
|
18190
18196
|
return /* @__PURE__ */ q(qt, {
|
|
18191
18197
|
label: "Emails about bookings",
|
|
18192
18198
|
hint: "Sent the moment a time is taken. Every booking is in your Inbox and on the calendar regardless.",
|
|
@@ -18208,7 +18214,7 @@ function Wv({ link: e, onChange: t }) {
|
|
|
18208
18214
|
})
|
|
18209
18215
|
});
|
|
18210
18216
|
}
|
|
18211
|
-
var
|
|
18217
|
+
var Kv = (e) => {
|
|
18212
18218
|
let t = {
|
|
18213
18219
|
...a(le(), e),
|
|
18214
18220
|
createdAt: Date.now()
|
|
@@ -18219,7 +18225,7 @@ var Gv = (e) => {
|
|
|
18219
18225
|
description: Ae(t)
|
|
18220
18226
|
};
|
|
18221
18227
|
};
|
|
18222
|
-
function
|
|
18228
|
+
function qv({ link: t, schedules: n, products: r, services: i, isAdmin: a = !0, onChange: o, onCreatePayment: s }) {
|
|
18223
18229
|
let c = n.find((e) => e.id === t.scheduleId), l = (e) => o({
|
|
18224
18230
|
...t,
|
|
18225
18231
|
...e
|
|
@@ -18296,16 +18302,16 @@ function Kv({ link: t, schedules: n, products: r, services: i, isAdmin: a = !0,
|
|
|
18296
18302
|
allowEmpty: !1,
|
|
18297
18303
|
onChange: (e) => l({ noticeHours: Number(e) })
|
|
18298
18304
|
}),
|
|
18299
|
-
/* @__PURE__ */ q(
|
|
18305
|
+
/* @__PURE__ */ q(Rv, {
|
|
18300
18306
|
questions: t.questions,
|
|
18301
18307
|
onChange: (e) => l({ questions: e })
|
|
18302
18308
|
}),
|
|
18303
|
-
/* @__PURE__ */ q(
|
|
18309
|
+
/* @__PURE__ */ q(Uv, {
|
|
18304
18310
|
service: i.payments,
|
|
18305
18311
|
what: "Stripe",
|
|
18306
18312
|
path: "/payments",
|
|
18307
18313
|
screen: "Payments",
|
|
18308
|
-
children: /* @__PURE__ */ q(
|
|
18314
|
+
children: /* @__PURE__ */ q(Wv, {
|
|
18309
18315
|
value: t.paymentId,
|
|
18310
18316
|
products: r,
|
|
18311
18317
|
meetingName: P(t),
|
|
@@ -18317,12 +18323,12 @@ function Kv({ link: t, schedules: n, products: r, services: i, isAdmin: a = !0,
|
|
|
18317
18323
|
}
|
|
18318
18324
|
})
|
|
18319
18325
|
}),
|
|
18320
|
-
/* @__PURE__ */ q(
|
|
18326
|
+
/* @__PURE__ */ q(Uv, {
|
|
18321
18327
|
service: i.email,
|
|
18322
18328
|
what: "emails",
|
|
18323
18329
|
path: "/email",
|
|
18324
18330
|
screen: "Email",
|
|
18325
|
-
children: /* @__PURE__ */ q(
|
|
18331
|
+
children: /* @__PURE__ */ q(Gv, {
|
|
18326
18332
|
link: t,
|
|
18327
18333
|
onChange: l
|
|
18328
18334
|
})
|
|
@@ -18353,11 +18359,11 @@ function Kv({ link: t, schedules: n, products: r, services: i, isAdmin: a = !0,
|
|
|
18353
18359
|
})
|
|
18354
18360
|
] });
|
|
18355
18361
|
}
|
|
18356
|
-
function
|
|
18362
|
+
function Jv({ link: e, schedules: t, products: n, services: r, isAdmin: i = !0, open: a, fresh: o, error: s, onToggle: c, onChange: l, onRemove: u, onCreatePayment: d }) {
|
|
18357
18363
|
let f = t.find((t) => t.id === e.scheduleId), p = je(e, f), [m, h] = G(!1), g = P(e), _ = ia(null);
|
|
18358
18364
|
return W(() => {
|
|
18359
18365
|
if (!o) return;
|
|
18360
|
-
let e =
|
|
18366
|
+
let e = Bv(_.current);
|
|
18361
18367
|
return () => {
|
|
18362
18368
|
e && clearTimeout(e);
|
|
18363
18369
|
};
|
|
@@ -18418,7 +18424,7 @@ function qv({ link: e, schedules: t, products: n, services: r, isAdmin: i = !0,
|
|
|
18418
18424
|
}),
|
|
18419
18425
|
a && /* @__PURE__ */ q("div", {
|
|
18420
18426
|
className: "px-4 pb-4 pt-4 border-t border-[var(--panel-border)]/60 flex flex-col gap-4",
|
|
18421
|
-
children: /* @__PURE__ */ q(
|
|
18427
|
+
children: /* @__PURE__ */ q(qv, {
|
|
18422
18428
|
link: e,
|
|
18423
18429
|
schedules: t,
|
|
18424
18430
|
products: n,
|
|
@@ -18435,10 +18441,10 @@ function qv({ link: e, schedules: t, products: n, services: r, isAdmin: i = !0,
|
|
|
18435
18441
|
]
|
|
18436
18442
|
});
|
|
18437
18443
|
}
|
|
18438
|
-
function
|
|
18439
|
-
let { user: n } = Or(), { loading: r, docs: i } = dn(), a =
|
|
18440
|
-
payments:
|
|
18441
|
-
email:
|
|
18444
|
+
function Yv({ isAdmin: t = !0 } = {}) {
|
|
18445
|
+
let { user: n } = Or(), { loading: r, docs: i } = dn(), a = Hv(), o = {
|
|
18446
|
+
payments: z_("payments"),
|
|
18447
|
+
email: z_("email")
|
|
18442
18448
|
}, [s, c] = G({}), [l, u] = G([]), [d, f] = G(null), [p, m] = G(null), [h, g] = G({}), _ = ia(/* @__PURE__ */ new Map()), v = n?.uid || "", y = ra(() => [...t ? i.schedules : i.schedules.filter((e) => e.memberId === v)].sort((e, t) => Number(t.memberId === v) - Number(e.memberId === v)), [
|
|
18443
18449
|
i.schedules,
|
|
18444
18450
|
t,
|
|
@@ -18472,7 +18478,7 @@ function Jv({ isAdmin: t = !0 } = {}) {
|
|
|
18472
18478
|
}, w = () => {
|
|
18473
18479
|
let e = y.find((e) => e.memberId === v) || y[0];
|
|
18474
18480
|
if (!e) return;
|
|
18475
|
-
let t =
|
|
18481
|
+
let t = Kv(e);
|
|
18476
18482
|
c((e) => ({
|
|
18477
18483
|
...e,
|
|
18478
18484
|
[t.id]: t
|
|
@@ -18532,7 +18538,7 @@ function Jv({ isAdmin: t = !0 } = {}) {
|
|
|
18532
18538
|
wr(y[0]),
|
|
18533
18539
|
" into something people can book."
|
|
18534
18540
|
]
|
|
18535
|
-
}) : b.map((e) => /* @__PURE__ */ q(
|
|
18541
|
+
}) : b.map((e) => /* @__PURE__ */ q(Jv, {
|
|
18536
18542
|
link: e,
|
|
18537
18543
|
schedules: y,
|
|
18538
18544
|
products: a,
|
|
@@ -18551,8 +18557,8 @@ function Jv({ isAdmin: t = !0 } = {}) {
|
|
|
18551
18557
|
}
|
|
18552
18558
|
//#endregion
|
|
18553
18559
|
//#region src/components/schedule/EventCard.tsx
|
|
18554
|
-
var
|
|
18555
|
-
function
|
|
18560
|
+
var Xv = (e, t = "host") => e.heldOnly ? "Held time" : t === "booker" ? e.scheduleName.trim() || "A meeting" : bn(e), Zv = (e, t = "host") => e.heldOnly ? "Held with no booking behind it" : e.own ? "Your own event" : t === "booker" ? e.memberName.trim() ? `With ${e.memberName.trim()}` : "Booked" : e.scheduleName || e.email || "Booked", Qv = (e, t = "host") => t === "booker" && !e.heldOnly ? Kt(e) : Xv(e, t), $v = (e) => !e.pending || e.cancelled || e.own || e.heldOnly ? "" : e.partySize > 1 ? `${e.partyAccepted} of ${e.partySize}` : "Pending";
|
|
18561
|
+
function ey({ value: e, onChange: t }) {
|
|
18556
18562
|
return /* @__PURE__ */ q("div", {
|
|
18557
18563
|
className: "flex items-center gap-2 flex-wrap",
|
|
18558
18564
|
children: N.map((n) => {
|
|
@@ -18576,32 +18582,32 @@ function $v({ value: e, onChange: t }) {
|
|
|
18576
18582
|
})
|
|
18577
18583
|
});
|
|
18578
18584
|
}
|
|
18579
|
-
function
|
|
18585
|
+
function ty({ className: e = "" }) {
|
|
18580
18586
|
return /* @__PURE__ */ q("span", {
|
|
18581
18587
|
className: `inline-flex items-center h-[18px] px-1.5 rounded-md shrink-0 border border-red-500/25 bg-red-500/10 text-[10px] font-bold uppercase tracking-[0.08em] text-red-500/90 ${e}`,
|
|
18582
18588
|
children: "Cancelled"
|
|
18583
18589
|
});
|
|
18584
18590
|
}
|
|
18585
|
-
function
|
|
18591
|
+
function ny({ label: e = "Pending", className: t = "" }) {
|
|
18586
18592
|
return /* @__PURE__ */ q("span", {
|
|
18587
18593
|
title: "Waiting to be accepted",
|
|
18588
18594
|
className: `inline-flex items-center h-[18px] px-1.5 rounded-md shrink-0 border border-amber-500/25 bg-amber-500/10 text-[10px] font-bold uppercase tracking-[0.08em] text-amber-600 dark:text-amber-400 ${t}`,
|
|
18589
18595
|
children: e
|
|
18590
18596
|
});
|
|
18591
18597
|
}
|
|
18592
|
-
function
|
|
18598
|
+
function ry({ className: e = "" }) {
|
|
18593
18599
|
return /* @__PURE__ */ q("span", {
|
|
18594
18600
|
title: "Held with nothing booked",
|
|
18595
18601
|
className: `inline-flex items-center h-[18px] px-1.5 rounded-md shrink-0 border border-[var(--panel-border)] bg-foreground/[0.04] text-[10px] font-bold uppercase tracking-[0.08em] text-foreground/45 ${e}`,
|
|
18596
18602
|
children: "Held"
|
|
18597
18603
|
});
|
|
18598
18604
|
}
|
|
18599
|
-
function
|
|
18600
|
-
let s = e.end < (o ? o() : /* @__PURE__ */ new Date()).toISOString(), c = e.cancelled, l =
|
|
18605
|
+
function iy({ booking: e, zone: t, chip: n, withMember: r = !1, side: i = "host", onOpen: a, now: o }) {
|
|
18606
|
+
let s = e.end < (o ? o() : /* @__PURE__ */ new Date()).toISOString(), c = e.cancelled, l = $v(e), u = e.color;
|
|
18601
18607
|
return /* @__PURE__ */ J("button", {
|
|
18602
18608
|
type: "button",
|
|
18603
18609
|
onClick: a,
|
|
18604
|
-
"aria-label": `${En(new Date(e.start), t)} — ${
|
|
18610
|
+
"aria-label": `${En(new Date(e.start), t)} — ${Xv(e, i)}${c ? " (cancelled)" : ""}`,
|
|
18605
18611
|
className: `group relative w-full text-left rounded-2xl border overflow-hidden flex items-stretch gap-2.5 p-2.5 transition-all cursor-pointer active:scale-[0.99] ${s && !c ? "opacity-60" : ""} ${c || e.heldOnly ? "border-dashed border-[var(--panel-border)]/60 bg-foreground/[0.02]" : ""}`,
|
|
18606
18612
|
style: c || e.heldOnly ? void 0 : {
|
|
18607
18613
|
background: vr(u, 7),
|
|
@@ -18626,14 +18632,14 @@ function ry({ booking: e, zone: t, chip: n, withMember: r = !1, side: i = "host"
|
|
|
18626
18632
|
children: En(new Date(e.start), t)
|
|
18627
18633
|
}), /* @__PURE__ */ q("span", {
|
|
18628
18634
|
className: `text-[12.5px] font-semibold truncate ${c ? "text-foreground/45 line-through" : "text-foreground/80"}`,
|
|
18629
|
-
children:
|
|
18635
|
+
children: Xv(e, i)
|
|
18630
18636
|
})]
|
|
18631
18637
|
}), /* @__PURE__ */ J("span", {
|
|
18632
18638
|
className: "flex items-center justify-between gap-2 min-w-0",
|
|
18633
18639
|
children: [/* @__PURE__ */ q("span", {
|
|
18634
18640
|
className: "text-[11.5px] font-medium text-foreground/45 truncate",
|
|
18635
|
-
children: r && e.memberName ? `${e.memberName} · ${
|
|
18636
|
-
}), c ? /* @__PURE__ */ q(
|
|
18641
|
+
children: r && e.memberName ? `${e.memberName} · ${Zv(e, i)}` : Zv(e, i)
|
|
18642
|
+
}), c ? /* @__PURE__ */ q(ty, {}) : e.heldOnly ? /* @__PURE__ */ q(ry, {}) : l ? /* @__PURE__ */ q(ny, { label: l }) : n && /* @__PURE__ */ q(br, {
|
|
18637
18643
|
state: n.state,
|
|
18638
18644
|
label: n.label
|
|
18639
18645
|
})]
|
|
@@ -18644,11 +18650,11 @@ function ry({ booking: e, zone: t, chip: n, withMember: r = !1, side: i = "host"
|
|
|
18644
18650
|
}
|
|
18645
18651
|
//#endregion
|
|
18646
18652
|
//#region src/components/schedule/EventDetail.tsx
|
|
18647
|
-
var
|
|
18653
|
+
var ay = (e) => {
|
|
18648
18654
|
let t = e.replace(/_/g, " ").trim();
|
|
18649
18655
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
18650
18656
|
};
|
|
18651
|
-
function
|
|
18657
|
+
function oy(e, t) {
|
|
18652
18658
|
let n = e.memberName.trim();
|
|
18653
18659
|
if (e.partySize > 1) {
|
|
18654
18660
|
let n = `${e.partyAccepted} of ${e.partySize} have accepted.`;
|
|
@@ -18656,11 +18662,11 @@ function ay(e, t) {
|
|
|
18656
18662
|
}
|
|
18657
18663
|
return t ? "This is waiting for you to accept." : n ? `Waiting for ${n} to accept.` : "Waiting to be accepted.";
|
|
18658
18664
|
}
|
|
18659
|
-
function
|
|
18665
|
+
function sy(e) {
|
|
18660
18666
|
let t = e.memberName.trim();
|
|
18661
18667
|
return e.partySize > 1 ? e.partyAccepted > 0 ? `${e.partyAccepted} of ${e.partySize} have confirmed so far. You will hear once they all have.` : "Waiting to be confirmed. You will hear as soon as it is." : t ? `Waiting for ${t} to confirm. You will hear as soon as they do.` : "Waiting to be confirmed. You will hear as soon as it is.";
|
|
18662
18668
|
}
|
|
18663
|
-
function
|
|
18669
|
+
function cy({ open: e, onClose: t, children: n }) {
|
|
18664
18670
|
return W(() => {
|
|
18665
18671
|
if (!e) return;
|
|
18666
18672
|
let n = (e) => {
|
|
@@ -18698,7 +18704,7 @@ function sy({ open: e, onClose: t, children: n }) {
|
|
|
18698
18704
|
})]
|
|
18699
18705
|
}) });
|
|
18700
18706
|
}
|
|
18701
|
-
function
|
|
18707
|
+
function ly({ color: e, title: t, line: n, cancelled: r, onClose: i }) {
|
|
18702
18708
|
return /* @__PURE__ */ J("div", {
|
|
18703
18709
|
className: "flex items-start gap-3 mb-4",
|
|
18704
18710
|
children: [
|
|
@@ -18714,7 +18720,7 @@ function cy({ color: e, title: t, line: n, cancelled: r, onClose: i }) {
|
|
|
18714
18720
|
children: [/* @__PURE__ */ q("h3", {
|
|
18715
18721
|
className: `text-[17px] font-extrabold tracking-tight leading-tight break-words ${r ? "text-foreground/50 line-through" : "text-foreground"}`,
|
|
18716
18722
|
children: t
|
|
18717
|
-
}), r && /* @__PURE__ */ q(
|
|
18723
|
+
}), r && /* @__PURE__ */ q(ty, {})]
|
|
18718
18724
|
}), /* @__PURE__ */ q("p", {
|
|
18719
18725
|
className: "text-[12.5px] font-medium text-foreground/50 leading-snug mt-0.5",
|
|
18720
18726
|
children: n
|
|
@@ -18730,7 +18736,7 @@ function cy({ color: e, title: t, line: n, cancelled: r, onClose: i }) {
|
|
|
18730
18736
|
]
|
|
18731
18737
|
});
|
|
18732
18738
|
}
|
|
18733
|
-
function
|
|
18739
|
+
function uy({ label: e, children: t }) {
|
|
18734
18740
|
return /* @__PURE__ */ J("div", {
|
|
18735
18741
|
className: "flex items-start justify-between gap-3 px-3.5 py-2.5",
|
|
18736
18742
|
children: [/* @__PURE__ */ q("span", {
|
|
@@ -18742,15 +18748,15 @@ function ly({ label: e, children: t }) {
|
|
|
18742
18748
|
})]
|
|
18743
18749
|
});
|
|
18744
18750
|
}
|
|
18745
|
-
function
|
|
18746
|
-
let [d, f] = G(!1), [p, m] = G(!1), [h, g] = G(""), [_, v] = G(!1), [y, b] = G(""), x = B(e, t), S = e.end < (/* @__PURE__ */ new Date()).toISOString(), C = !e.own && e.timeZone && e.timeZone !== t ? e.timeZone : "", w = Object.entries(e.answers).filter(([, e]) => e), T = i === "booker", E = !e.heldOnly && (w.length > 0 || !!C || !!n || !T && !e.own && (!!e.scheduleName || !!e.email || e.createdAt > 0)), D = e.heldOnly, O = !D && (e.own || e.cancelled || S), k = !T && !!r && e.memberId === r, A =
|
|
18747
|
-
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(
|
|
18751
|
+
function dy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClose: a, onColor: o, onAccept: s, onCancel: c, onDelete: l, onRelease: u }) {
|
|
18752
|
+
let [d, f] = G(!1), [p, m] = G(!1), [h, g] = G(""), [_, v] = G(!1), [y, b] = G(""), x = B(e, t), S = e.end < (/* @__PURE__ */ new Date()).toISOString(), C = !e.own && e.timeZone && e.timeZone !== t ? e.timeZone : "", w = Object.entries(e.answers).filter(([, e]) => e), T = i === "booker", E = !e.heldOnly && (w.length > 0 || !!C || !!n || !T && !e.own && (!!e.scheduleName || !!e.email || e.createdAt > 0)), D = e.heldOnly, O = !D && (e.own || e.cancelled || S), k = !T && !!r && e.memberId === r, A = $v(e), j = !!A && k && !!s, M = D ? "Free this held time" : e.own ? "Delete this event" : e.cancelled ? "Remove this cancelled booking" : S ? "Remove this booking" : A && k ? "Decline this booking" : "Cancel this booking", N = D ? !!u : O && !!l, P = !O && !D, F = !!A && k && !O;
|
|
18753
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(cy, {
|
|
18748
18754
|
open: !0,
|
|
18749
18755
|
onClose: a,
|
|
18750
18756
|
children: [
|
|
18751
|
-
/* @__PURE__ */ q(
|
|
18757
|
+
/* @__PURE__ */ q(ly, {
|
|
18752
18758
|
color: e.color,
|
|
18753
|
-
title:
|
|
18759
|
+
title: Qv(e, i),
|
|
18754
18760
|
line: `${x.day} · ${x.time}`,
|
|
18755
18761
|
cancelled: e.cancelled,
|
|
18756
18762
|
onClose: a
|
|
@@ -18759,7 +18765,7 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18759
18765
|
className: "mb-4 px-3.5 py-2.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.03] flex flex-col gap-1.5",
|
|
18760
18766
|
children: [/* @__PURE__ */ J("p", {
|
|
18761
18767
|
className: "text-[12.5px] font-medium text-foreground/70 leading-snug",
|
|
18762
|
-
children: [
|
|
18768
|
+
children: [fy(e), " The time is free again — it stays here so you have the record."]
|
|
18763
18769
|
}), !!e.cancelReason && /* @__PURE__ */ J("p", {
|
|
18764
18770
|
className: "text-[12.5px] font-semibold text-foreground/80 leading-snug border-l-2 border-[var(--panel-border)] pl-2.5",
|
|
18765
18771
|
children: [
|
|
@@ -18780,9 +18786,9 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18780
18786
|
}),
|
|
18781
18787
|
/* @__PURE__ */ q("p", {
|
|
18782
18788
|
className: "text-[12.5px] font-semibold text-foreground/75 leading-snug flex-1 min-w-0",
|
|
18783
|
-
children: T ?
|
|
18789
|
+
children: T ? sy(e) : oy(e, k)
|
|
18784
18790
|
}),
|
|
18785
|
-
e.partySize > 1 && /* @__PURE__ */ q(
|
|
18791
|
+
e.partySize > 1 && /* @__PURE__ */ q(ny, { label: A })
|
|
18786
18792
|
]
|
|
18787
18793
|
}), j && !p && /* @__PURE__ */ J(xn, {
|
|
18788
18794
|
onClick: async () => {
|
|
@@ -18805,11 +18811,11 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18805
18811
|
E && /* @__PURE__ */ J("div", {
|
|
18806
18812
|
className: "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] divide-y divide-[var(--panel-border)]/40",
|
|
18807
18813
|
children: [
|
|
18808
|
-
!T && !e.own && e.scheduleName && /* @__PURE__ */ q(
|
|
18814
|
+
!T && !e.own && e.scheduleName && /* @__PURE__ */ q(uy, {
|
|
18809
18815
|
label: "Meeting",
|
|
18810
18816
|
children: e.scheduleName
|
|
18811
18817
|
}),
|
|
18812
|
-
!T && e.email && /* @__PURE__ */ q(
|
|
18818
|
+
!T && e.email && /* @__PURE__ */ q(uy, {
|
|
18813
18819
|
label: "Email",
|
|
18814
18820
|
children: /* @__PURE__ */ q("a", {
|
|
18815
18821
|
href: `mailto:${e.email}`,
|
|
@@ -18817,8 +18823,8 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18817
18823
|
children: e.email
|
|
18818
18824
|
})
|
|
18819
18825
|
}),
|
|
18820
|
-
w.map(([e, t]) => /* @__PURE__ */ q(
|
|
18821
|
-
label: e === "note" ? "Note" :
|
|
18826
|
+
w.map(([e, t]) => /* @__PURE__ */ q(uy, {
|
|
18827
|
+
label: e === "note" ? "Note" : ay(e),
|
|
18822
18828
|
children: ei(t) ? /* @__PURE__ */ q("span", {
|
|
18823
18829
|
className: "flex flex-col items-end gap-1 min-w-0",
|
|
18824
18830
|
children: jr(t).map((e) => /* @__PURE__ */ J("a", {
|
|
@@ -18834,7 +18840,7 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18834
18840
|
}, e))
|
|
18835
18841
|
}) : t
|
|
18836
18842
|
}, e)),
|
|
18837
|
-
C && /* @__PURE__ */ J(
|
|
18843
|
+
C && /* @__PURE__ */ J(uy, {
|
|
18838
18844
|
label: T ? "The time you booked in" : "Their time",
|
|
18839
18845
|
children: [
|
|
18840
18846
|
En(new Date(e.start), C),
|
|
@@ -18842,14 +18848,14 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18842
18848
|
Se(C)
|
|
18843
18849
|
]
|
|
18844
18850
|
}),
|
|
18845
|
-
n && /* @__PURE__ */ q(
|
|
18851
|
+
n && /* @__PURE__ */ q(uy, {
|
|
18846
18852
|
label: "Payment",
|
|
18847
18853
|
children: /* @__PURE__ */ q(br, {
|
|
18848
18854
|
state: n.state,
|
|
18849
18855
|
label: n.label
|
|
18850
18856
|
})
|
|
18851
18857
|
}),
|
|
18852
|
-
!T && !e.own && e.createdAt > 0 && /* @__PURE__ */ q(
|
|
18858
|
+
!T && !e.own && e.createdAt > 0 && /* @__PURE__ */ q(uy, {
|
|
18853
18859
|
label: "Booked",
|
|
18854
18860
|
children: new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(new Date(e.createdAt))
|
|
18855
18861
|
})
|
|
@@ -18862,7 +18868,7 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18862
18868
|
className: "text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none ml-1",
|
|
18863
18869
|
children: "Colour"
|
|
18864
18870
|
}),
|
|
18865
|
-
/* @__PURE__ */ q(
|
|
18871
|
+
/* @__PURE__ */ q(ey, {
|
|
18866
18872
|
value: e.color,
|
|
18867
18873
|
onChange: async (e) => {
|
|
18868
18874
|
b("");
|
|
@@ -18950,27 +18956,27 @@ function uy({ booking: e, zone: t, chip: n, me: r = "", side: i = "host", onClos
|
|
|
18950
18956
|
}
|
|
18951
18957
|
})] });
|
|
18952
18958
|
}
|
|
18953
|
-
function
|
|
18959
|
+
function fy(e) {
|
|
18954
18960
|
let t = e.cancelledAt > 0 ? ` on ${new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(new Date(e.cancelledAt))}` : "", n = e.cancelledBy.trim();
|
|
18955
18961
|
return e.cancelledSide === "booker" ? `${n || "The person who booked"} cancelled this${t}.` : e.cancelledSide === "host" ? `${n || "Your team"} cancelled this${t}.` : `This booking was cancelled${t}.`;
|
|
18956
18962
|
}
|
|
18957
|
-
var
|
|
18963
|
+
var py = (e, t, n, r) => ({
|
|
18958
18964
|
title: "",
|
|
18959
18965
|
time: e === r ? bt(n, t) : "09:00",
|
|
18960
18966
|
minutes: "60",
|
|
18961
18967
|
color: "",
|
|
18962
18968
|
note: ""
|
|
18963
18969
|
});
|
|
18964
|
-
function
|
|
18965
|
-
let [s, c] = G(() =>
|
|
18970
|
+
function my({ dateKey: e, dayLabel: t, zone: n, today: r, now: i, onClose: a, onAdd: o }) {
|
|
18971
|
+
let [s, c] = G(() => py(e, n, i ? i() : /* @__PURE__ */ new Date(), r)), [l, u] = G(!1), [d, f] = G(""), p = (e) => c((t) => ({
|
|
18966
18972
|
...t,
|
|
18967
18973
|
...e
|
|
18968
18974
|
}));
|
|
18969
|
-
return /* @__PURE__ */ J(
|
|
18975
|
+
return /* @__PURE__ */ J(cy, {
|
|
18970
18976
|
open: !0,
|
|
18971
18977
|
onClose: a,
|
|
18972
18978
|
children: [
|
|
18973
|
-
/* @__PURE__ */ q(
|
|
18979
|
+
/* @__PURE__ */ q(ly, {
|
|
18974
18980
|
color: s.color,
|
|
18975
18981
|
title: s.title.trim() || "Add an event",
|
|
18976
18982
|
line: `${t} · your time, ${Se(n)}`,
|
|
@@ -19007,7 +19013,7 @@ function py({ dateKey: e, dayLabel: t, zone: n, today: r, now: i, onClose: a, on
|
|
|
19007
19013
|
children: [/* @__PURE__ */ q("span", {
|
|
19008
19014
|
className: `${Mr} ml-1`,
|
|
19009
19015
|
children: "Colour"
|
|
19010
|
-
}), /* @__PURE__ */ q(
|
|
19016
|
+
}), /* @__PURE__ */ q(ey, {
|
|
19011
19017
|
value: s.color,
|
|
19012
19018
|
onChange: (e) => p({ color: e })
|
|
19013
19019
|
})]
|
|
@@ -19056,12 +19062,12 @@ function py({ dateKey: e, dayLabel: t, zone: n, today: r, now: i, onClose: a, on
|
|
|
19056
19062
|
]
|
|
19057
19063
|
});
|
|
19058
19064
|
}
|
|
19059
|
-
var
|
|
19065
|
+
var hy = (e, t) => new Intl.DateTimeFormat(t, {
|
|
19060
19066
|
timeZone: "UTC",
|
|
19061
19067
|
weekday: "short",
|
|
19062
19068
|
day: "numeric",
|
|
19063
19069
|
month: "long"
|
|
19064
|
-
}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`)),
|
|
19070
|
+
}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`)), gy = [
|
|
19065
19071
|
"M",
|
|
19066
19072
|
"T",
|
|
19067
19073
|
"W",
|
|
@@ -19069,8 +19075,8 @@ var my = (e, t) => new Intl.DateTimeFormat(t, {
|
|
|
19069
19075
|
"F",
|
|
19070
19076
|
"S",
|
|
19071
19077
|
"S"
|
|
19072
|
-
],
|
|
19073
|
-
function
|
|
19078
|
+
], _y = (e) => e.slice(0, 7), vy = (e, t, n) => En(e, t, n).replace(/[\s\u00a0\u202f]+/g, "").toLowerCase();
|
|
19079
|
+
function yy(e, t = 3) {
|
|
19074
19080
|
return e.length <= t ? {
|
|
19075
19081
|
shown: e,
|
|
19076
19082
|
extra: 0
|
|
@@ -19079,8 +19085,8 @@ function vy(e, t = 3) {
|
|
|
19079
19085
|
extra: e.length - (t - 1)
|
|
19080
19086
|
};
|
|
19081
19087
|
}
|
|
19082
|
-
var
|
|
19083
|
-
function
|
|
19088
|
+
var by = (e, t, n = "host") => n === "booker" ? Qv(e, n) : t && e.memberName ? `${Xv(e)} · ${e.memberName}` : Xv(e);
|
|
19089
|
+
function xy(e, t) {
|
|
19084
19090
|
let n = /* @__PURE__ */ new Map();
|
|
19085
19091
|
for (let r of e) {
|
|
19086
19092
|
let e = Yt(new Date(r.start), t).dateKey, i = n.get(e) || [];
|
|
@@ -19089,7 +19095,7 @@ function by(e, t) {
|
|
|
19089
19095
|
for (let e of n.values()) e.sort((e, t) => e.start.localeCompare(t.start));
|
|
19090
19096
|
return n;
|
|
19091
19097
|
}
|
|
19092
|
-
function
|
|
19098
|
+
function Sy(e, t, n = !0) {
|
|
19093
19099
|
return !n || !e.paymentId && !e.paymentSession ? null : e.paymentSession ? t === void 0 ? {
|
|
19094
19100
|
state: "saving",
|
|
19095
19101
|
label: "Checking payment"
|
|
@@ -19104,9 +19110,9 @@ function xy(e, t, n = !0) {
|
|
|
19104
19110
|
label: "Not paid"
|
|
19105
19111
|
};
|
|
19106
19112
|
}
|
|
19107
|
-
var
|
|
19108
|
-
function
|
|
19109
|
-
let _ = Yt(g ? g() : /* @__PURE__ */ new Date(), t).dateKey, v = ra(() =>
|
|
19113
|
+
var Cy = "h-8 px-3 rounded-xl border border-[var(--panel-border)]/60 inline-flex items-center gap-1.5 text-[12.5px] font-semibold text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/5 active:scale-[0.98] transition-all cursor-pointer";
|
|
19114
|
+
function wy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, withMember: a = !1, me: o = "", side: s = "host", onAccept: c, onCancel: l, onDelete: u, canDelete: f, onColor: p, onRelease: m, onAdd: h, now: g }) {
|
|
19115
|
+
let _ = Yt(g ? g() : /* @__PURE__ */ new Date(), t).dateKey, v = ra(() => xy(e, t), [e, t]), [y, b] = G(_y(_)), [x, S] = G(_), [C, w] = G(null), [T, E] = G(!1), D = ia("");
|
|
19110
19116
|
W(() => {
|
|
19111
19117
|
if (!r) {
|
|
19112
19118
|
D.current = "";
|
|
@@ -19117,14 +19123,14 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19117
19123
|
if (!n) return;
|
|
19118
19124
|
D.current = r;
|
|
19119
19125
|
let a = Yt(new Date(n.start), t).dateKey;
|
|
19120
|
-
b(
|
|
19126
|
+
b(_y(a)), S(a), w(n.id), i?.();
|
|
19121
19127
|
}, [
|
|
19122
19128
|
r,
|
|
19123
19129
|
e,
|
|
19124
19130
|
t,
|
|
19125
19131
|
i
|
|
19126
19132
|
]);
|
|
19127
|
-
let O = Ct(y), k = v.get(x) || [], A = (g ? g() : /* @__PURE__ */ new Date()).toISOString(), j =
|
|
19133
|
+
let O = Ct(y), k = v.get(x) || [], A = (g ? g() : /* @__PURE__ */ new Date()).toISOString(), j = hy(x), M = C ? e.find((e) => e.id === C) : void 0, { ref: N, moreBelow: P } = Mt(k.length, x);
|
|
19128
19134
|
return /* @__PURE__ */ J("div", {
|
|
19129
19135
|
className: "flex flex-col md:flex-row gap-3 md:gap-4 w-full md:items-stretch",
|
|
19130
19136
|
children: [
|
|
@@ -19141,9 +19147,9 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19141
19147
|
/* @__PURE__ */ q("button", {
|
|
19142
19148
|
type: "button",
|
|
19143
19149
|
onClick: () => {
|
|
19144
|
-
b(
|
|
19150
|
+
b(_y(_)), S(_);
|
|
19145
19151
|
},
|
|
19146
|
-
className:
|
|
19152
|
+
className: Cy,
|
|
19147
19153
|
children: "Today"
|
|
19148
19154
|
}),
|
|
19149
19155
|
/* @__PURE__ */ q("button", {
|
|
@@ -19168,12 +19174,12 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19168
19174
|
className: "grid grid-cols-7 gap-1",
|
|
19169
19175
|
role: "grid",
|
|
19170
19176
|
"aria-label": ki(y),
|
|
19171
|
-
children: [
|
|
19177
|
+
children: [gy.map((e, t) => /* @__PURE__ */ q("div", {
|
|
19172
19178
|
className: "text-center text-[10.5px] font-bold uppercase tracking-wider text-foreground/35 pb-1",
|
|
19173
19179
|
children: e
|
|
19174
19180
|
}, t)), O.map((e, n) => {
|
|
19175
19181
|
if (!e) return /* @__PURE__ */ q("div", { "aria-hidden": !0 }, `blank-${n}`);
|
|
19176
|
-
let r = v.get(e) || [], { shown: i, extra: o } =
|
|
19182
|
+
let r = v.get(e) || [], { shown: i, extra: o } = yy(r), c = e === x, l = e === _;
|
|
19177
19183
|
return /* @__PURE__ */ J("button", {
|
|
19178
19184
|
type: "button",
|
|
19179
19185
|
role: "gridcell",
|
|
@@ -19197,11 +19203,11 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19197
19203
|
}),
|
|
19198
19204
|
/* @__PURE__ */ q("span", {
|
|
19199
19205
|
className: `text-[9.5px] font-bold tabular-nums shrink-0 ${e.cancelled ? "text-foreground/40" : "text-foreground/85"}`,
|
|
19200
|
-
children:
|
|
19206
|
+
children: vy(new Date(e.start), t)
|
|
19201
19207
|
}),
|
|
19202
19208
|
/* @__PURE__ */ q("span", {
|
|
19203
19209
|
className: `text-[9.5px] font-medium truncate ${e.cancelled ? "text-foreground/40" : "text-foreground/60"}`,
|
|
19204
|
-
children:
|
|
19210
|
+
children: by(e, a, s)
|
|
19205
19211
|
})
|
|
19206
19212
|
]
|
|
19207
19213
|
}, e.id)), o > 0 && /* @__PURE__ */ J("span", {
|
|
@@ -19240,7 +19246,7 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19240
19246
|
type: "button",
|
|
19241
19247
|
onClick: () => E(!0),
|
|
19242
19248
|
title: `Add an event on ${j}`,
|
|
19243
|
-
className:
|
|
19249
|
+
className: Cy,
|
|
19244
19250
|
children: [/* @__PURE__ */ q(H, { className: "w-3.5 h-3.5 shrink-0" }), "Add"]
|
|
19245
19251
|
})]
|
|
19246
19252
|
})]
|
|
@@ -19258,11 +19264,11 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19258
19264
|
className: "text-[12.5px] font-medium text-foreground/45 leading-relaxed",
|
|
19259
19265
|
children: "Nothing on this day yet."
|
|
19260
19266
|
})]
|
|
19261
|
-
}) : k.map((e) => /* @__PURE__ */ q(
|
|
19267
|
+
}) : k.map((e) => /* @__PURE__ */ q(iy, {
|
|
19262
19268
|
booking: e,
|
|
19263
19269
|
zone: t,
|
|
19264
19270
|
now: g,
|
|
19265
|
-
chip:
|
|
19271
|
+
chip: Sy(e, n?.[e.paymentSession], !!n),
|
|
19266
19272
|
withMember: a,
|
|
19267
19273
|
side: s,
|
|
19268
19274
|
onOpen: () => w(e.id)
|
|
@@ -19271,10 +19277,10 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19271
19277
|
})]
|
|
19272
19278
|
})
|
|
19273
19279
|
}),
|
|
19274
|
-
M && /* @__PURE__ */ q(
|
|
19280
|
+
M && /* @__PURE__ */ q(dy, {
|
|
19275
19281
|
booking: M,
|
|
19276
19282
|
zone: t,
|
|
19277
|
-
chip:
|
|
19283
|
+
chip: Sy(M, n?.[M.paymentSession], !!n),
|
|
19278
19284
|
onClose: () => w(null),
|
|
19279
19285
|
me: o,
|
|
19280
19286
|
side: s,
|
|
@@ -19284,7 +19290,7 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19284
19290
|
onDelete: u && (!f || f(M)) ? () => u(M) : void 0,
|
|
19285
19291
|
onRelease: m ? () => m(M) : void 0
|
|
19286
19292
|
}),
|
|
19287
|
-
T && h && /* @__PURE__ */ q(
|
|
19293
|
+
T && h && /* @__PURE__ */ q(my, {
|
|
19288
19294
|
dateKey: x,
|
|
19289
19295
|
dayLabel: j,
|
|
19290
19296
|
zone: t,
|
|
@@ -19296,26 +19302,26 @@ function Cy({ bookings: e, zone: t, paid: n, openBookingId: r, onOpened: i, with
|
|
|
19296
19302
|
]
|
|
19297
19303
|
});
|
|
19298
19304
|
}
|
|
19299
|
-
var
|
|
19300
|
-
function
|
|
19305
|
+
var Ty = "team", Ey = (e) => `m:${e}`, Dy = "__nobody__";
|
|
19306
|
+
function Oy(e, t, n) {
|
|
19301
19307
|
return [
|
|
19302
19308
|
{
|
|
19303
19309
|
value: "me",
|
|
19304
19310
|
label: "My calendar"
|
|
19305
19311
|
},
|
|
19306
19312
|
{
|
|
19307
|
-
value:
|
|
19313
|
+
value: Ty,
|
|
19308
19314
|
label: "My team's calendar"
|
|
19309
19315
|
},
|
|
19310
19316
|
...e.filter((e) => e.id !== n).map((e) => ({
|
|
19311
|
-
value:
|
|
19317
|
+
value: Ey(e.id),
|
|
19312
19318
|
label: Gn(e) || e.email,
|
|
19313
19319
|
disabled: !t.has(e.id)
|
|
19314
19320
|
}))
|
|
19315
19321
|
];
|
|
19316
19322
|
}
|
|
19317
|
-
var
|
|
19318
|
-
function
|
|
19323
|
+
var ky = (e) => e.startsWith("m:") ? e.slice(2) : "";
|
|
19324
|
+
function Ay(e) {
|
|
19319
19325
|
let [t, n] = G({});
|
|
19320
19326
|
return W(() => {
|
|
19321
19327
|
let r = e.filter((e) => e.paymentSession && t[e.paymentSession] === void 0);
|
|
@@ -19331,7 +19337,7 @@ function ky(e) {
|
|
|
19331
19337
|
};
|
|
19332
19338
|
}, [e, t]), t;
|
|
19333
19339
|
}
|
|
19334
|
-
function
|
|
19340
|
+
function jy(e, t, n, r = "") {
|
|
19335
19341
|
if (!e.email) return Promise.resolve();
|
|
19336
19342
|
let i = B(e, e.timeZone || n);
|
|
19337
19343
|
return Df(t, Xn, e.id, {
|
|
@@ -19341,7 +19347,7 @@ function Ay(e, t, n, r = "") {
|
|
|
19341
19347
|
reason: r.trim()
|
|
19342
19348
|
}).then(() => {}).catch(() => {});
|
|
19343
19349
|
}
|
|
19344
|
-
function
|
|
19350
|
+
function My(e, t, n) {
|
|
19345
19351
|
let r = (e) => [...new Set(e.map((e) => String(e || "").trim()))].filter((e) => e && e !== n), i = r([
|
|
19346
19352
|
e.memberId,
|
|
19347
19353
|
...t.map((e) => e.memberId),
|
|
@@ -19352,14 +19358,14 @@ function jy(e, t, n) {
|
|
|
19352
19358
|
bookers: r([e.uid, ...t.map((e) => e.uid)]).filter((e) => e !== "guest").filter((e) => !i.includes(e))
|
|
19353
19359
|
};
|
|
19354
19360
|
}
|
|
19355
|
-
async function
|
|
19361
|
+
async function Ny(e, t, n, r) {
|
|
19356
19362
|
if (e.own || e.heldOnly) return;
|
|
19357
19363
|
let i = {
|
|
19358
19364
|
title: "Meeting removed",
|
|
19359
19365
|
body: `${Kt(e)} · ${_i(new Date(e.start), r)}`
|
|
19360
19366
|
};
|
|
19361
|
-
await
|
|
19362
|
-
let { members: a, bookers: o } =
|
|
19367
|
+
await jy(e, "booking_cancelled", r, "The meeting was removed from the calendar.");
|
|
19368
|
+
let { members: a, bookers: o } = My(e, t, n);
|
|
19363
19369
|
await no(a, {
|
|
19364
19370
|
...i,
|
|
19365
19371
|
link: "/schedule"
|
|
@@ -19368,8 +19374,8 @@ async function My(e, t, n, r) {
|
|
|
19368
19374
|
link: "/my-bookings"
|
|
19369
19375
|
});
|
|
19370
19376
|
}
|
|
19371
|
-
function
|
|
19372
|
-
let { user: n } = Or(), r = n?.uid || "", i = cn(), [a, o] = za(), s = a.get("open") || a.get("booking") || "", { schedules: c } = dt(), { members: l } = g(), u = ra(() => new Set(c.map((e) => e.memberId)), [c]), d = ra(() =>
|
|
19377
|
+
function Py({ isAdmin: t }) {
|
|
19378
|
+
let { user: n } = Or(), r = n?.uid || "", i = cn(), [a, o] = za(), s = a.get("open") || a.get("booking") || "", { schedules: c } = dt(), { members: l } = g(), u = ra(() => new Set(c.map((e) => e.memberId)), [c]), d = ra(() => Oy(l, u, r), [
|
|
19373
19379
|
l,
|
|
19374
19380
|
u,
|
|
19375
19381
|
r
|
|
@@ -19377,10 +19383,10 @@ function Ny({ isAdmin: t }) {
|
|
|
19377
19383
|
W(() => {
|
|
19378
19384
|
s && t && p((e) => e ?? "team");
|
|
19379
19385
|
}, [s, t]);
|
|
19380
|
-
let m = f ?? "me", h = new Set(d.filter((e) => !e.disabled).map((e) => e.value)).has(m) ? m : "me", _ =
|
|
19381
|
-
members: h === "team" ? void 0 : [_ || r ||
|
|
19386
|
+
let m = f ?? "me", h = new Set(d.filter((e) => !e.disabled).map((e) => e.value)).has(m) ? m : "me", _ = ky(h), { loading: v, bookings: y, error: b } = zn({
|
|
19387
|
+
members: h === "team" ? void 0 : [_ || r || Dy],
|
|
19382
19388
|
includePast: !0
|
|
19383
|
-
}), x =
|
|
19389
|
+
}), x = Ay(y), C = Mi(ra(() => (h === "team" ? l.map((e) => e.id) : [_ || r]).filter(Boolean), [
|
|
19384
19390
|
h,
|
|
19385
19391
|
l,
|
|
19386
19392
|
_,
|
|
@@ -19434,17 +19440,17 @@ function Ny({ isAdmin: t }) {
|
|
|
19434
19440
|
}) : b ? /* @__PURE__ */ q("p", {
|
|
19435
19441
|
className: "text-[12px] font-semibold text-red-500 px-1",
|
|
19436
19442
|
children: b
|
|
19437
|
-
}) : /* @__PURE__ */ q(
|
|
19443
|
+
}) : /* @__PURE__ */ q(wy, {
|
|
19438
19444
|
bookings: D,
|
|
19439
19445
|
zone: i,
|
|
19440
19446
|
paid: x,
|
|
19441
19447
|
openBookingId: s || void 0,
|
|
19442
19448
|
onOpened: s ? () => o((e) => (e.delete("open"), e.delete("booking"), e), { replace: !0 }) : void 0,
|
|
19443
|
-
withMember: h ===
|
|
19449
|
+
withMember: h === Ty,
|
|
19444
19450
|
me: r,
|
|
19445
19451
|
onAccept: async (e) => {
|
|
19446
19452
|
let t = await Dr(e.id);
|
|
19447
|
-
return t ||
|
|
19453
|
+
return t || jy(e, "booking_confirmed", i), t;
|
|
19448
19454
|
},
|
|
19449
19455
|
onCancel: async (e, t) => {
|
|
19450
19456
|
let a = await Zn(e.id, {
|
|
@@ -19454,9 +19460,9 @@ function Ny({ isAdmin: t }) {
|
|
|
19454
19460
|
by: e.memberId === r ? A || String(n?.displayName || "") : e.memberName,
|
|
19455
19461
|
byUid: r
|
|
19456
19462
|
});
|
|
19457
|
-
return a ||
|
|
19463
|
+
return a || jy(e, "booking_cancelled", i, t), a;
|
|
19458
19464
|
},
|
|
19459
|
-
onDelete: async (e) => (await
|
|
19465
|
+
onDelete: async (e) => (await Ny(e, y, r, i), Nr(e.id, e.copyIds)),
|
|
19460
19466
|
canDelete: (e) => t || e.own && e.memberId === r,
|
|
19461
19467
|
onRelease: (e) => ni(e.memberId, e.start),
|
|
19462
19468
|
onColor: zr,
|
|
@@ -19471,7 +19477,7 @@ function Ny({ isAdmin: t }) {
|
|
|
19471
19477
|
}
|
|
19472
19478
|
//#endregion
|
|
19473
19479
|
//#region src/components/schedule/BookingPagesCard.tsx
|
|
19474
|
-
function
|
|
19480
|
+
function Fy(e, t) {
|
|
19475
19481
|
if (!e.enabled) return {
|
|
19476
19482
|
state: "off",
|
|
19477
19483
|
label: "Off"
|
|
@@ -19486,11 +19492,11 @@ function Py(e, t) {
|
|
|
19486
19492
|
label: n === 1 ? "1 meeting" : `${n} meetings`
|
|
19487
19493
|
};
|
|
19488
19494
|
}
|
|
19489
|
-
var
|
|
19495
|
+
var Iy = (e) => {
|
|
19490
19496
|
let t = e.schedules.length;
|
|
19491
19497
|
return `${Vf(e)} — ${t === 0 ? "nothing on it yet" : t === 1 ? "1 meeting" : `${t} meetings`}`;
|
|
19492
19498
|
};
|
|
19493
|
-
function
|
|
19499
|
+
function Ly({ page: t, schedules: n, onChange: r }) {
|
|
19494
19500
|
return n.length ? /* @__PURE__ */ q(qt, {
|
|
19495
19501
|
label: "Meetings on this page",
|
|
19496
19502
|
hint: "They appear in the order you tick them. A meeting switched off above is kept off the page too.",
|
|
@@ -19523,7 +19529,7 @@ function Iy({ page: t, schedules: n, onChange: r }) {
|
|
|
19523
19529
|
})
|
|
19524
19530
|
});
|
|
19525
19531
|
}
|
|
19526
|
-
function
|
|
19532
|
+
function Ry({ page: e, taken: t, onRename: n }) {
|
|
19527
19533
|
let [r, i] = G(e.id), a = Mf(r), o = !!a && a !== e.id && t.includes(a);
|
|
19528
19534
|
return /* @__PURE__ */ q(Rn, {
|
|
19529
19535
|
label: "Its address",
|
|
@@ -19542,11 +19548,11 @@ function Ly({ page: e, taken: t, onRename: n }) {
|
|
|
19542
19548
|
hint: "Change it and the old link stops working, so change it before you send it out."
|
|
19543
19549
|
});
|
|
19544
19550
|
}
|
|
19545
|
-
function
|
|
19546
|
-
let [u, d] = G(!1), f =
|
|
19551
|
+
function zy({ page: e, schedules: t, taken: n, open: r, fresh: i, error: a, onToggle: o, onChange: s, onRename: c, onRemove: l }) {
|
|
19552
|
+
let [u, d] = G(!1), f = Fy(e, t), p = Vf(e), m = Bf(e, t), h = ia(null);
|
|
19547
19553
|
return W(() => {
|
|
19548
19554
|
if (!i) return;
|
|
19549
|
-
let e =
|
|
19555
|
+
let e = Bv(h.current);
|
|
19550
19556
|
return () => {
|
|
19551
19557
|
e && clearTimeout(e);
|
|
19552
19558
|
};
|
|
@@ -19564,7 +19570,7 @@ function Ry({ page: e, schedules: t, taken: n, open: r, fresh: i, error: a, onTo
|
|
|
19564
19570
|
className: "flex-1 min-w-0 flex items-center justify-between gap-3 px-4 py-3 text-left cursor-pointer",
|
|
19565
19571
|
children: [/* @__PURE__ */ q("span", {
|
|
19566
19572
|
className: "text-[13px] font-semibold text-foreground/75 truncate",
|
|
19567
|
-
children:
|
|
19573
|
+
children: Iy(e)
|
|
19568
19574
|
}), /* @__PURE__ */ J("span", {
|
|
19569
19575
|
className: "flex items-center gap-2.5 shrink-0",
|
|
19570
19576
|
children: [/* @__PURE__ */ q("span", {
|
|
@@ -19637,12 +19643,12 @@ function Ry({ page: e, schedules: t, taken: n, open: r, fresh: i, error: a, onTo
|
|
|
19637
19643
|
rows: 3,
|
|
19638
19644
|
placeholder: "I help small studios get their bookkeeping straight. Pick a time below and tell me what you need."
|
|
19639
19645
|
}),
|
|
19640
|
-
/* @__PURE__ */ q(
|
|
19646
|
+
/* @__PURE__ */ q(Ly, {
|
|
19641
19647
|
page: e,
|
|
19642
19648
|
schedules: t,
|
|
19643
19649
|
onChange: s
|
|
19644
19650
|
}),
|
|
19645
|
-
/* @__PURE__ */ q(
|
|
19651
|
+
/* @__PURE__ */ q(Ry, {
|
|
19646
19652
|
page: e,
|
|
19647
19653
|
taken: n,
|
|
19648
19654
|
onRename: c
|
|
@@ -19663,7 +19669,7 @@ function Ry({ page: e, schedules: t, taken: n, open: r, fresh: i, error: a, onTo
|
|
|
19663
19669
|
]
|
|
19664
19670
|
});
|
|
19665
19671
|
}
|
|
19666
|
-
function
|
|
19672
|
+
function By({ schedules: t, myName: n, isAdmin: r = !0, meId: i = "" }) {
|
|
19667
19673
|
let { loading: a, pages: o } = Hf(), [s, c] = G({}), [l, u] = G([]), [d, f] = G(null), [p, m] = G(null), [h, g] = G({}), _ = ia(/* @__PURE__ */ new Map()), v = new Map(o.map((e) => [e.id, e]));
|
|
19668
19674
|
for (let e of Object.values(s)) v.set(e.id, e);
|
|
19669
19675
|
for (let e of l) v.delete(e);
|
|
@@ -19737,7 +19743,7 @@ function zy({ schedules: t, myName: n, isAdmin: r = !0, meId: i = "" }) {
|
|
|
19737
19743
|
}) : x.length === 0 ? /* @__PURE__ */ q("p", {
|
|
19738
19744
|
className: `${e} px-1`,
|
|
19739
19745
|
children: "No pages yet. Create one to hand out a single link — a visitor sees your photo, what you do and every meeting you offer, and picks the one they want."
|
|
19740
|
-
}) : x.map((e) => /* @__PURE__ */ q(
|
|
19746
|
+
}) : x.map((e) => /* @__PURE__ */ q(zy, {
|
|
19741
19747
|
page: e,
|
|
19742
19748
|
schedules: S,
|
|
19743
19749
|
taken: b,
|
|
@@ -19754,22 +19760,22 @@ function zy({ schedules: t, myName: n, isAdmin: r = !0, meId: i = "" }) {
|
|
|
19754
19760
|
}
|
|
19755
19761
|
//#endregion
|
|
19756
19762
|
//#region src/pages/ScheduleAdmin.tsx
|
|
19757
|
-
var
|
|
19763
|
+
var Vy = {
|
|
19758
19764
|
from: "09:00",
|
|
19759
19765
|
to: "17:00"
|
|
19760
|
-
},
|
|
19766
|
+
}, Hy = (e) => Hn(e) ? {
|
|
19761
19767
|
state: "saved",
|
|
19762
19768
|
label: "Ready"
|
|
19763
19769
|
} : {
|
|
19764
19770
|
state: "off",
|
|
19765
19771
|
label: "In progress"
|
|
19766
|
-
},
|
|
19772
|
+
}, Uy = (e) => ({
|
|
19767
19773
|
...ce(Te(), e.id, Gn(e), cn()),
|
|
19768
19774
|
name: "Working hours",
|
|
19769
19775
|
enabled: !0,
|
|
19770
19776
|
createdAt: Date.now()
|
|
19771
|
-
}),
|
|
19772
|
-
function
|
|
19777
|
+
}), Wy = "w-[6.5rem] shrink-0", Gy = "w-9 h-9 rounded-[var(--btn-radius,0.75rem)] border border-[var(--panel-border)] flex items-center justify-center shrink-0 text-foreground/45 hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06] active:scale-[0.98] transition-all cursor-pointer";
|
|
19778
|
+
function Ky({ day: e, windows: t, onChange: n }) {
|
|
19773
19779
|
let r = t.length > 0, i = (e, r) => n(t.map((t, n) => n === e ? {
|
|
19774
19780
|
...t,
|
|
19775
19781
|
...r
|
|
@@ -19783,7 +19789,7 @@ function Gy({ day: e, windows: t, onChange: n }) {
|
|
|
19783
19789
|
children: ji[e]
|
|
19784
19790
|
}), /* @__PURE__ */ q(Wr, {
|
|
19785
19791
|
enabled: r,
|
|
19786
|
-
onChange: (e) => n(e ? [
|
|
19792
|
+
onChange: (e) => n(e ? [Vy] : []),
|
|
19787
19793
|
label: `${ji[e]} — bookable`
|
|
19788
19794
|
})]
|
|
19789
19795
|
}), r && /* @__PURE__ */ J("div", {
|
|
@@ -19792,7 +19798,7 @@ function Gy({ day: e, windows: t, onChange: n }) {
|
|
|
19792
19798
|
className: "flex items-center gap-2",
|
|
19793
19799
|
children: [
|
|
19794
19800
|
/* @__PURE__ */ q("div", {
|
|
19795
|
-
className:
|
|
19801
|
+
className: Wy,
|
|
19796
19802
|
children: /* @__PURE__ */ q(oi, {
|
|
19797
19803
|
ariaLabel: `${ji[e]} from${a ? ` (${a + 1})` : ""}`,
|
|
19798
19804
|
value: r.from,
|
|
@@ -19809,7 +19815,7 @@ function Gy({ day: e, windows: t, onChange: n }) {
|
|
|
19809
19815
|
children: "–"
|
|
19810
19816
|
}),
|
|
19811
19817
|
/* @__PURE__ */ q("div", {
|
|
19812
|
-
className:
|
|
19818
|
+
className: Wy,
|
|
19813
19819
|
children: /* @__PURE__ */ q(oi, {
|
|
19814
19820
|
ariaLabel: `${ji[e]} to${a ? ` (${a + 1})` : ""}`,
|
|
19815
19821
|
value: r.to,
|
|
@@ -19826,7 +19832,7 @@ function Gy({ day: e, windows: t, onChange: n }) {
|
|
|
19826
19832
|
title: `Remove these hours on ${ji[e]}`,
|
|
19827
19833
|
"aria-label": `Remove ${ji[e]} hours ${a + 1}`,
|
|
19828
19834
|
onClick: () => n(t.filter((e, t) => t !== a)),
|
|
19829
|
-
className:
|
|
19835
|
+
className: Gy,
|
|
19830
19836
|
children: /* @__PURE__ */ q(nn, { className: "w-3.5 h-3.5" })
|
|
19831
19837
|
})
|
|
19832
19838
|
]
|
|
@@ -19842,7 +19848,7 @@ function Gy({ day: e, windows: t, onChange: n }) {
|
|
|
19842
19848
|
})]
|
|
19843
19849
|
});
|
|
19844
19850
|
}
|
|
19845
|
-
function
|
|
19851
|
+
function qy({ schedule: e, onChange: t }) {
|
|
19846
19852
|
let n = (n) => t({
|
|
19847
19853
|
...e,
|
|
19848
19854
|
...n
|
|
@@ -19864,7 +19870,7 @@ function Ky({ schedule: e, onChange: t }) {
|
|
|
19864
19870
|
hint: "The hours on each day, in this person's own time zone. Add a second stretch for a break in the middle. A time booked in any of their hours is taken here too.",
|
|
19865
19871
|
children: /* @__PURE__ */ q("div", {
|
|
19866
19872
|
className: "flex flex-col divide-y divide-[var(--panel-border)]/60 rounded-2xl border border-[var(--panel-border)]/60 px-4 py-1",
|
|
19867
|
-
children: x.map((t) => /* @__PURE__ */ q(
|
|
19873
|
+
children: x.map((t) => /* @__PURE__ */ q(Ky, {
|
|
19868
19874
|
day: t,
|
|
19869
19875
|
windows: e.days[t] || [],
|
|
19870
19876
|
onChange: (r) => n({ days: {
|
|
@@ -19874,7 +19880,7 @@ function Ky({ schedule: e, onChange: t }) {
|
|
|
19874
19880
|
}, t))
|
|
19875
19881
|
})
|
|
19876
19882
|
}),
|
|
19877
|
-
/* @__PURE__ */ q(
|
|
19883
|
+
/* @__PURE__ */ q(Pv, {
|
|
19878
19884
|
blocked: e.blocked,
|
|
19879
19885
|
onChange: (e) => n({ blocked: e })
|
|
19880
19886
|
}),
|
|
@@ -19890,11 +19896,11 @@ function Ky({ schedule: e, onChange: t }) {
|
|
|
19890
19896
|
})
|
|
19891
19897
|
] });
|
|
19892
19898
|
}
|
|
19893
|
-
function
|
|
19894
|
-
let l =
|
|
19899
|
+
function Jy({ schedule: t, open: n, stale: r, fresh: i, error: a, onToggle: o, onChange: s, onRemove: c }) {
|
|
19900
|
+
let l = Hy(t), [u, d] = G(!1), f = wr(t), p = ia(null);
|
|
19895
19901
|
return W(() => {
|
|
19896
19902
|
if (!i) return;
|
|
19897
|
-
let e =
|
|
19903
|
+
let e = Bv(p.current);
|
|
19898
19904
|
return () => {
|
|
19899
19905
|
e && clearTimeout(e);
|
|
19900
19906
|
};
|
|
@@ -19947,7 +19953,7 @@ function qy({ schedule: t, open: n, stale: r, fresh: i, error: a, onToggle: o, o
|
|
|
19947
19953
|
}),
|
|
19948
19954
|
n && /* @__PURE__ */ q("div", {
|
|
19949
19955
|
className: "px-4 pb-4 pt-4 border-t border-[var(--panel-border)]/60 flex flex-col gap-4",
|
|
19950
|
-
children: /* @__PURE__ */ q(
|
|
19956
|
+
children: /* @__PURE__ */ q(qy, {
|
|
19951
19957
|
schedule: t,
|
|
19952
19958
|
onChange: s
|
|
19953
19959
|
})
|
|
@@ -19959,11 +19965,11 @@ function qy({ schedule: t, open: n, stale: r, fresh: i, error: a, onToggle: o, o
|
|
|
19959
19965
|
]
|
|
19960
19966
|
});
|
|
19961
19967
|
}
|
|
19962
|
-
function
|
|
19968
|
+
function Yy({ name: t, schedules: n, stale: r, open: i, onToggle: a, onAdd: o, openScheduleId: s, freshId: c, errors: l, onToggleSchedule: u, onChange: d, onRemove: f }) {
|
|
19963
19969
|
let p = r ? "No longer on the team" : n.length === 0 ? "No schedules yet" : `${n.length} schedule${n.length === 1 ? "" : "s"}`, m = ia(null);
|
|
19964
19970
|
return W(() => {
|
|
19965
19971
|
if (!i) return;
|
|
19966
|
-
let e =
|
|
19972
|
+
let e = Bv(m.current);
|
|
19967
19973
|
return () => {
|
|
19968
19974
|
e && clearTimeout(e);
|
|
19969
19975
|
};
|
|
@@ -19987,7 +19993,7 @@ function Jy({ name: t, schedules: n, stale: r, open: i, onToggle: a, onAdd: o, o
|
|
|
19987
19993
|
})]
|
|
19988
19994
|
}), i && /* @__PURE__ */ J("div", {
|
|
19989
19995
|
className: "px-4 pb-4 pt-4 border-t border-[var(--panel-border)]/60 flex flex-col gap-3",
|
|
19990
|
-
children: [n.map((e) => /* @__PURE__ */ q(
|
|
19996
|
+
children: [n.map((e) => /* @__PURE__ */ q(Jy, {
|
|
19991
19997
|
schedule: e,
|
|
19992
19998
|
stale: r,
|
|
19993
19999
|
fresh: c === e.id,
|
|
@@ -20022,13 +20028,13 @@ function Jy({ name: t, schedules: n, stale: r, open: i, onToggle: a, onAdd: o, o
|
|
|
20022
20028
|
})]
|
|
20023
20029
|
});
|
|
20024
20030
|
}
|
|
20025
|
-
var
|
|
20031
|
+
var Xy = (e) => ({
|
|
20026
20032
|
id: e.uid,
|
|
20027
20033
|
name: String(e.displayName || ""),
|
|
20028
20034
|
email: String(e.email || ""),
|
|
20029
20035
|
role: "admin"
|
|
20030
20036
|
});
|
|
20031
|
-
function
|
|
20037
|
+
function Zy({ isAdmin: t = !0 } = {}) {
|
|
20032
20038
|
let { user: n } = Or(), { loading: r, members: i } = g(), { loading: a, docs: o } = dn(), s = o.schedules, [c, l] = G({}), [u, d] = G([]), [f, p] = G(null), [m, h] = G(null), [_, v] = G(null), [y, b] = G({}), x = ia(/* @__PURE__ */ new Map()), S = ra(() => {
|
|
20033
20039
|
let e = new Map(s.map((e) => [e.id, e]));
|
|
20034
20040
|
for (let t of Object.values(c)) e.set(t.id, t);
|
|
@@ -20053,7 +20059,7 @@ function Xy({ isAdmin: t = !0 } = {}) {
|
|
|
20053
20059
|
...t,
|
|
20054
20060
|
[e.id]: e
|
|
20055
20061
|
})), C(e);
|
|
20056
|
-
}, T = ra(() => n ? i.find((e) => e.id === n.uid) ||
|
|
20062
|
+
}, T = ra(() => n ? i.find((e) => e.id === n.uid) || Xy(n) : null, [n, i]), E = ra(() => T && !i.some((e) => e.id === T.id) ? [T, ...i] : i, [T, i]), D = ia(!1), [O, k] = G(""), A = ra(() => o.schedules.filter((e) => o.legacyIds.includes(e.id) && (t || e.memberId === T?.id)), [
|
|
20057
20063
|
o.schedules,
|
|
20058
20064
|
o.legacyIds,
|
|
20059
20065
|
t,
|
|
@@ -20065,7 +20071,7 @@ function Xy({ isAdmin: t = !0 } = {}) {
|
|
|
20065
20071
|
}));
|
|
20066
20072
|
}, [A]);
|
|
20067
20073
|
let j = (e) => {
|
|
20068
|
-
let t =
|
|
20074
|
+
let t = Uy(e);
|
|
20069
20075
|
l((e) => ({
|
|
20070
20076
|
...e,
|
|
20071
20077
|
[t.id]: t
|
|
@@ -20131,7 +20137,7 @@ function Xy({ isAdmin: t = !0 } = {}) {
|
|
|
20131
20137
|
}) : ee.length === 0 ? /* @__PURE__ */ q("p", {
|
|
20132
20138
|
className: `${e} px-1`,
|
|
20133
20139
|
children: "No hours of your own yet — press Add a schedule. Everything booked in them shares one availability, so a time taken once is gone from all of it."
|
|
20134
|
-
}) : ee.map((e) => /* @__PURE__ */ q(
|
|
20140
|
+
}) : ee.map((e) => /* @__PURE__ */ q(Jy, {
|
|
20135
20141
|
schedule: e,
|
|
20136
20142
|
stale: !F.has(e.memberId),
|
|
20137
20143
|
fresh: m === e.id,
|
|
@@ -20166,7 +20172,7 @@ function Xy({ isAdmin: t = !0 } = {}) {
|
|
|
20166
20172
|
}),
|
|
20167
20173
|
" and a folded row for them appears here."
|
|
20168
20174
|
]
|
|
20169
|
-
}) : I.map((e) => /* @__PURE__ */ q(
|
|
20175
|
+
}) : I.map((e) => /* @__PURE__ */ q(Yy, {
|
|
20170
20176
|
name: e.name,
|
|
20171
20177
|
schedules: e.schedules,
|
|
20172
20178
|
stale: e.stale,
|
|
@@ -20189,7 +20195,7 @@ function Xy({ isAdmin: t = !0 } = {}) {
|
|
|
20189
20195
|
})
|
|
20190
20196
|
})] });
|
|
20191
20197
|
}
|
|
20192
|
-
function
|
|
20198
|
+
function Qy() {
|
|
20193
20199
|
let { user: e, userRole: t } = Or(), n = t === "admin", { schedules: r } = Qt(), i = e && (e.displayName || e.email?.split("@")[0]) || "";
|
|
20194
20200
|
return Fn(t) ? /* @__PURE__ */ J("main", {
|
|
20195
20201
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 z-10 flex flex-col min-h-screen",
|
|
@@ -20221,10 +20227,10 @@ function Zy() {
|
|
|
20221
20227
|
children: n ? "When you and your team are free, and everything built on it. A schedule is a week of hours in one person’s own time zone; a booking link turns those hours into a meeting people can book, with an address to send. The same hours are what a page you ask for is built on." : "When you are free, and what people can book in it. Your schedule is your week of hours; a booking link turns it into a meeting, with an address of its own to send — they pick a free time and it lands on your calendar. A booking page gathers your meetings under one address to hand out."
|
|
20222
20228
|
})
|
|
20223
20229
|
}),
|
|
20224
|
-
/* @__PURE__ */ q(
|
|
20225
|
-
/* @__PURE__ */ q(
|
|
20226
|
-
/* @__PURE__ */ q(
|
|
20227
|
-
/* @__PURE__ */ q(
|
|
20230
|
+
/* @__PURE__ */ q(Py, { isAdmin: n }),
|
|
20231
|
+
/* @__PURE__ */ q(Zy, { isAdmin: n }),
|
|
20232
|
+
/* @__PURE__ */ q(Yv, { isAdmin: n }),
|
|
20233
|
+
/* @__PURE__ */ q(By, {
|
|
20228
20234
|
schedules: r,
|
|
20229
20235
|
myName: i,
|
|
20230
20236
|
isAdmin: n,
|
|
@@ -20241,7 +20247,7 @@ function Zy() {
|
|
|
20241
20247
|
}
|
|
20242
20248
|
//#endregion
|
|
20243
20249
|
//#region src/pages/MyBookings.tsx
|
|
20244
|
-
function
|
|
20250
|
+
function $y() {
|
|
20245
20251
|
let { user: t } = Or(), n = cn(), { loading: r, bookings: i, error: a } = bi(t?.uid || "", t?.email || ""), { docs: o } = dn(), s = ra(() => Ei(o), [o]), c = ra(() => _t(i, s), [i, s]);
|
|
20246
20252
|
return /* @__PURE__ */ J("main", {
|
|
20247
20253
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 z-10 flex flex-col min-h-screen",
|
|
@@ -20296,7 +20302,7 @@ function Qy() {
|
|
|
20296
20302
|
icon: Nt,
|
|
20297
20303
|
title: "Your calendar",
|
|
20298
20304
|
description: "Press a day to see what is on it. Everything you have booked is here, including the meetings that have been and the ones called off.",
|
|
20299
|
-
children: /* @__PURE__ */ q(
|
|
20305
|
+
children: /* @__PURE__ */ q(wy, {
|
|
20300
20306
|
bookings: c,
|
|
20301
20307
|
zone: n,
|
|
20302
20308
|
side: "booker",
|
|
@@ -20339,18 +20345,18 @@ function Qy() {
|
|
|
20339
20345
|
}
|
|
20340
20346
|
//#endregion
|
|
20341
20347
|
//#region src/components/schedule/BookingAnswers.tsx
|
|
20342
|
-
var
|
|
20343
|
-
function
|
|
20348
|
+
var eb = ea(() => import("./PhoneInputField-MI_-wa7l.js").then((e) => e.n)), tb = "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1", nb = "text-[12px] font-semibold text-red-500 mt-1 ml-1", rb = "flex w-full text-[15px] text-foreground px-4 py-3 transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus glass-panel resize-none";
|
|
20349
|
+
function ib({ children: e }) {
|
|
20344
20350
|
return /* @__PURE__ */ q("div", {
|
|
20345
20351
|
className: "flex flex-col w-full min-w-0",
|
|
20346
20352
|
children: e
|
|
20347
20353
|
});
|
|
20348
20354
|
}
|
|
20349
|
-
function
|
|
20355
|
+
function ab({ question: e, value: t, error: r, onChange: i }) {
|
|
20350
20356
|
let a = e.label.trim(), o = e.required ? `${a} *` : a;
|
|
20351
|
-
return e.type === "textarea" ? /* @__PURE__ */ J(
|
|
20357
|
+
return e.type === "textarea" ? /* @__PURE__ */ J(ib, { children: [
|
|
20352
20358
|
/* @__PURE__ */ q("label", {
|
|
20353
|
-
className:
|
|
20359
|
+
className: tb,
|
|
20354
20360
|
htmlFor: `q_${e.name}`,
|
|
20355
20361
|
children: o
|
|
20356
20362
|
}),
|
|
@@ -20360,13 +20366,13 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20360
20366
|
value: t,
|
|
20361
20367
|
placeholder: e.placeholder,
|
|
20362
20368
|
onChange: (e) => i(e.target.value),
|
|
20363
|
-
className: `${
|
|
20369
|
+
className: `${rb} rounded-xl min-h-[90px]`
|
|
20364
20370
|
}),
|
|
20365
20371
|
r && /* @__PURE__ */ q("p", {
|
|
20366
|
-
className:
|
|
20372
|
+
className: nb,
|
|
20367
20373
|
children: r
|
|
20368
20374
|
})
|
|
20369
|
-
] }) : e.type === "checkbox" ? /* @__PURE__ */ J(
|
|
20375
|
+
] }) : e.type === "checkbox" ? /* @__PURE__ */ J(ib, { children: [/* @__PURE__ */ J("label", {
|
|
20370
20376
|
className: "flex items-center gap-3 w-full cursor-pointer group py-1.5",
|
|
20371
20377
|
children: [/* @__PURE__ */ J("span", {
|
|
20372
20378
|
className: "relative flex items-center justify-center w-5 h-5 rounded border border-foreground/20 bg-background/50 group-hover:border-accent transition-colors shrink-0",
|
|
@@ -20381,9 +20387,9 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20381
20387
|
children: o
|
|
20382
20388
|
})]
|
|
20383
20389
|
}), r && /* @__PURE__ */ q("p", {
|
|
20384
|
-
className:
|
|
20390
|
+
className: nb,
|
|
20385
20391
|
children: r
|
|
20386
|
-
})] }) : e.type === "select" ? /* @__PURE__ */ J(
|
|
20392
|
+
})] }) : e.type === "select" ? /* @__PURE__ */ J(ib, { children: [/* @__PURE__ */ q(oi, {
|
|
20387
20393
|
label: o,
|
|
20388
20394
|
direction: "auto",
|
|
20389
20395
|
value: t,
|
|
@@ -20399,11 +20405,11 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20399
20405
|
}))],
|
|
20400
20406
|
onChange: i
|
|
20401
20407
|
}), r && /* @__PURE__ */ q("p", {
|
|
20402
|
-
className:
|
|
20408
|
+
className: nb,
|
|
20403
20409
|
children: r
|
|
20404
|
-
})] }) : e.type === "tel" ? /* @__PURE__ */ J(
|
|
20410
|
+
})] }) : e.type === "tel" ? /* @__PURE__ */ J(ib, { children: [/* @__PURE__ */ q(Qi, {
|
|
20405
20411
|
fallback: /* @__PURE__ */ q("div", { className: "h-12 w-full glass-panel animate-pulse rounded-xl" }),
|
|
20406
|
-
children: /* @__PURE__ */ q(
|
|
20412
|
+
children: /* @__PURE__ */ q(eb, {
|
|
20407
20413
|
field: {
|
|
20408
20414
|
label: o,
|
|
20409
20415
|
required: !1,
|
|
@@ -20413,9 +20419,9 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20413
20419
|
onChange: i
|
|
20414
20420
|
})
|
|
20415
20421
|
}), r && /* @__PURE__ */ q("p", {
|
|
20416
|
-
className:
|
|
20422
|
+
className: nb,
|
|
20417
20423
|
children: r
|
|
20418
|
-
})] }) : e.type === "file" ? /* @__PURE__ */ q(
|
|
20424
|
+
})] }) : e.type === "file" ? /* @__PURE__ */ q(ib, { children: /* @__PURE__ */ q(n, {
|
|
20419
20425
|
field: {
|
|
20420
20426
|
label: o,
|
|
20421
20427
|
placeholder: e.placeholder
|
|
@@ -20423,9 +20429,9 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20423
20429
|
value: t,
|
|
20424
20430
|
error: r,
|
|
20425
20431
|
onChange: (e) => i(e(t))
|
|
20426
|
-
}) }) : e.type === "date" ? /* @__PURE__ */ J(
|
|
20432
|
+
}) }) : e.type === "date" ? /* @__PURE__ */ J(ib, { children: [
|
|
20427
20433
|
/* @__PURE__ */ q("label", {
|
|
20428
|
-
className:
|
|
20434
|
+
className: tb,
|
|
20429
20435
|
htmlFor: `q_${e.name}`,
|
|
20430
20436
|
children: o
|
|
20431
20437
|
}),
|
|
@@ -20444,10 +20450,10 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20444
20450
|
})]
|
|
20445
20451
|
}),
|
|
20446
20452
|
r && /* @__PURE__ */ q("p", {
|
|
20447
|
-
className:
|
|
20453
|
+
className: nb,
|
|
20448
20454
|
children: r
|
|
20449
20455
|
})
|
|
20450
|
-
] }) : /* @__PURE__ */ q(
|
|
20456
|
+
] }) : /* @__PURE__ */ q(ib, { children: /* @__PURE__ */ q(yr, {
|
|
20451
20457
|
label: o,
|
|
20452
20458
|
type: e.type,
|
|
20453
20459
|
value: t,
|
|
@@ -20456,8 +20462,8 @@ function ib({ question: e, value: t, error: r, onChange: i }) {
|
|
|
20456
20462
|
onChange: (e) => i(e.target.value)
|
|
20457
20463
|
}) });
|
|
20458
20464
|
}
|
|
20459
|
-
function
|
|
20460
|
-
return /* @__PURE__ */ q(K, { children: me(e).map((e) => /* @__PURE__ */ q(
|
|
20465
|
+
function ob({ questions: e, answers: t, errors: n, onChange: r }) {
|
|
20466
|
+
return /* @__PURE__ */ q(K, { children: me(e).map((e) => /* @__PURE__ */ q(ab, {
|
|
20461
20467
|
question: e,
|
|
20462
20468
|
value: t[e.name] || "",
|
|
20463
20469
|
error: n[e.name],
|
|
@@ -20466,8 +20472,8 @@ function ab({ questions: e, answers: t, errors: n, onChange: r }) {
|
|
|
20466
20472
|
}
|
|
20467
20473
|
//#endregion
|
|
20468
20474
|
//#region src/pages/BookingPage.tsx
|
|
20469
|
-
var
|
|
20470
|
-
function
|
|
20475
|
+
var sb = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
|
|
20476
|
+
function cb(e) {
|
|
20471
20477
|
if (!e || e.kind !== "once") return null;
|
|
20472
20478
|
let t = pd(e), n = t.reduce((e, t) => e + (md(t.amount) || 0), 0), r = e.name.trim() || t.map((e) => e.name.trim()).filter(Boolean).join(" and ") || Td(e);
|
|
20473
20479
|
return n > 0 ? {
|
|
@@ -20475,7 +20481,7 @@ function sb(e) {
|
|
|
20475
20481
|
name: r
|
|
20476
20482
|
} : null;
|
|
20477
20483
|
}
|
|
20478
|
-
var
|
|
20484
|
+
var lb = (e, t = "usd") => {
|
|
20479
20485
|
try {
|
|
20480
20486
|
return new Intl.NumberFormat(void 0, {
|
|
20481
20487
|
style: "currency",
|
|
@@ -20485,7 +20491,7 @@ var cb = (e, t = "usd") => {
|
|
|
20485
20491
|
return `${e} ${t.toUpperCase()}`;
|
|
20486
20492
|
}
|
|
20487
20493
|
};
|
|
20488
|
-
function
|
|
20494
|
+
function ub(e) {
|
|
20489
20495
|
let [t, n] = G({
|
|
20490
20496
|
id: "",
|
|
20491
20497
|
product: null
|
|
@@ -20517,7 +20523,7 @@ function lb(e) {
|
|
|
20517
20523
|
product: null
|
|
20518
20524
|
};
|
|
20519
20525
|
}
|
|
20520
|
-
function
|
|
20526
|
+
function db({ icon: e, accent: t, children: n }) {
|
|
20521
20527
|
return /* @__PURE__ */ J("span", {
|
|
20522
20528
|
className: `inline-flex items-center gap-1.5 h-7 px-3 rounded-full border text-[12.5px] font-semibold whitespace-nowrap ${t ? "border-accent/40 bg-accent/10 text-accent" : "border-[var(--panel-border)]/70 text-foreground/65"}`,
|
|
20523
20529
|
children: [e && /* @__PURE__ */ q(e, {
|
|
@@ -20526,7 +20532,7 @@ function ub({ icon: e, accent: t, children: n }) {
|
|
|
20526
20532
|
}), n]
|
|
20527
20533
|
});
|
|
20528
20534
|
}
|
|
20529
|
-
function
|
|
20535
|
+
function fb({ children: e, wide: t, form: n }) {
|
|
20530
20536
|
return /* @__PURE__ */ q("main", {
|
|
20531
20537
|
className: `flex-1 w-full mx-auto px-4 py-8 md:py-12 z-10 flex flex-col justify-center transition-[max-width] duration-500 ease-out ${t ? "max-w-4xl" : n ? "max-w-2xl" : "max-w-xl"}`,
|
|
20532
20538
|
children: /* @__PURE__ */ q(U.div, {
|
|
@@ -20544,14 +20550,14 @@ function db({ children: e, wide: t, form: n }) {
|
|
|
20544
20550
|
})
|
|
20545
20551
|
});
|
|
20546
20552
|
}
|
|
20547
|
-
function
|
|
20553
|
+
function pb({ children: e }) {
|
|
20548
20554
|
return /* @__PURE__ */ q("h1", {
|
|
20549
20555
|
ref: $o([e]),
|
|
20550
20556
|
className: "text-2xl sm:text-3xl font-extrabold tracking-tight text-gradient leading-tight whitespace-nowrap data-[fold]:whitespace-normal data-[fold]:text-balance",
|
|
20551
20557
|
children: e
|
|
20552
20558
|
});
|
|
20553
20559
|
}
|
|
20554
|
-
function
|
|
20560
|
+
function mb({ icon: e, title: t, children: n }) {
|
|
20555
20561
|
return /* @__PURE__ */ J("div", {
|
|
20556
20562
|
className: "flex flex-col items-center text-center py-8 gap-4",
|
|
20557
20563
|
children: [
|
|
@@ -20575,7 +20581,7 @@ function pb({ icon: e, title: t, children: n }) {
|
|
|
20575
20581
|
]
|
|
20576
20582
|
});
|
|
20577
20583
|
}
|
|
20578
|
-
function
|
|
20584
|
+
function hb({ sessionId: e, schedule: t }) {
|
|
20579
20585
|
let [n, r] = G(null);
|
|
20580
20586
|
if (W(() => {
|
|
20581
20587
|
let t = !1;
|
|
@@ -20584,13 +20590,13 @@ function mb({ sessionId: e, schedule: t }) {
|
|
|
20584
20590
|
}), () => {
|
|
20585
20591
|
t = !0;
|
|
20586
20592
|
};
|
|
20587
|
-
}, [e]), !n) return /* @__PURE__ */ q(
|
|
20593
|
+
}, [e]), !n) return /* @__PURE__ */ q(mb, {
|
|
20588
20594
|
icon: ui,
|
|
20589
20595
|
title: "Confirming your payment…",
|
|
20590
20596
|
children: "One moment — checking with the payment provider."
|
|
20591
20597
|
});
|
|
20592
20598
|
let i = n.metadata?.when || "";
|
|
20593
|
-
return n.paid ? /* @__PURE__ */ q(
|
|
20599
|
+
return n.paid ? /* @__PURE__ */ q(mb, {
|
|
20594
20600
|
icon: re,
|
|
20595
20601
|
title: "Paid — your time is held",
|
|
20596
20602
|
children: /* @__PURE__ */ J("p", { children: [
|
|
@@ -20599,31 +20605,31 @@ function mb({ sessionId: e, schedule: t }) {
|
|
|
20599
20605
|
". Held for you while it is confirmed.",
|
|
20600
20606
|
n.customerEmail ? ` A receipt is on its way to ${n.customerEmail}.` : ""
|
|
20601
20607
|
] })
|
|
20602
|
-
}) : /* @__PURE__ */ q(
|
|
20608
|
+
}) : /* @__PURE__ */ q(mb, {
|
|
20603
20609
|
icon: Ge,
|
|
20604
20610
|
title: "Not confirmed yet",
|
|
20605
20611
|
children: /* @__PURE__ */ q("p", { children: n.error || "The payment provider has not confirmed this payment yet. Your time is held; if a receipt arrives by email, the booking is yours." })
|
|
20606
20612
|
});
|
|
20607
20613
|
}
|
|
20608
|
-
function
|
|
20609
|
-
let { id: e = "" } = Ra(), [t] = za(), { activeConfig: n } = ir(), { loading: r, schedule: i } = Ri(e), { loading: a, product: o } =
|
|
20610
|
-
if (r) return /* @__PURE__ */ q(
|
|
20614
|
+
function gb() {
|
|
20615
|
+
let { id: e = "" } = Ra(), [t] = za(), { activeConfig: n } = ir(), { loading: r, schedule: i } = Ri(e), { loading: a, product: o } = ub(i?.paymentId || ""), s = cb(o), c = Oo(), [l, u] = G(() => cn()), [d] = G(() => /* @__PURE__ */ new Date()), f = Mi(i ? [i.memberId] : [], d), m = ra(() => i && It(i) ? [i] : [], [i]), [h, g] = G(null), [_, v] = G(() => k.currentUser?.displayName || ""), [y, x] = G(() => k.currentUser?.email || ""), [S, C] = G({}), [w, T] = G({}), [E, D] = G(!1), [A, j] = G(""), [M, N] = G(""), [P, F] = G(""), ee = t.get("session_id") || "", I = t.get("cancelled") === "1";
|
|
20616
|
+
if (r) return /* @__PURE__ */ q(fb, { children: /* @__PURE__ */ J("div", {
|
|
20611
20617
|
className: "flex items-center justify-center gap-3 py-16 text-foreground/50",
|
|
20612
20618
|
children: [/* @__PURE__ */ q(ui, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ q("span", {
|
|
20613
20619
|
className: "text-[13px] font-medium",
|
|
20614
20620
|
children: "Loading…"
|
|
20615
20621
|
})]
|
|
20616
20622
|
}) });
|
|
20617
|
-
if (!i) return /* @__PURE__ */ q(
|
|
20623
|
+
if (!i) return /* @__PURE__ */ q(fb, { children: /* @__PURE__ */ q(mb, {
|
|
20618
20624
|
icon: oe,
|
|
20619
20625
|
title: "This booking link is no longer open",
|
|
20620
20626
|
children: "It may have been taken down. Ask whoever sent it for a new one."
|
|
20621
20627
|
}) });
|
|
20622
|
-
if (ee) return /* @__PURE__ */ q(
|
|
20628
|
+
if (ee) return /* @__PURE__ */ q(fb, { children: /* @__PURE__ */ q(hb, {
|
|
20623
20629
|
sessionId: ee,
|
|
20624
20630
|
schedule: i
|
|
20625
20631
|
}) });
|
|
20626
|
-
if (M) return /* @__PURE__ */ q(
|
|
20632
|
+
if (M) return /* @__PURE__ */ q(fb, { children: /* @__PURE__ */ q(mb, {
|
|
20627
20633
|
icon: Ge,
|
|
20628
20634
|
title: "Your time is held",
|
|
20629
20635
|
children: /* @__PURE__ */ J("p", { children: [
|
|
@@ -20634,7 +20640,7 @@ function hb() {
|
|
|
20634
20640
|
P ? ` We have sent the details to ${P}, and will write again the moment it is confirmed.` : ""
|
|
20635
20641
|
] })
|
|
20636
20642
|
}) });
|
|
20637
|
-
if (!It(i)) return /* @__PURE__ */ q(
|
|
20643
|
+
if (!It(i)) return /* @__PURE__ */ q(fb, { children: /* @__PURE__ */ q(mb, {
|
|
20638
20644
|
icon: oe,
|
|
20639
20645
|
title: fe(i),
|
|
20640
20646
|
children: "This is not taking bookings at the moment."
|
|
@@ -20642,7 +20648,7 @@ function hb() {
|
|
|
20642
20648
|
let te = !!i.paymentId && !a && (!s || !c.loading && !c.configured), re = async () => {
|
|
20643
20649
|
if (!h || E) return;
|
|
20644
20650
|
let e = { ...Yr(i.questions, S) };
|
|
20645
|
-
if (_.trim() || (e._name = "Your name, please."),
|
|
20651
|
+
if (_.trim() || (e._name = "Your name, please."), sb.test(y.trim()) || (e._email = "That does not look like an email address — check for a typo, e.g. jane@example.com"), T(e), Object.keys(e).length) return;
|
|
20646
20652
|
D(!0), j("");
|
|
20647
20653
|
let t = Ar(h, i.memberName, l), n = await an(h);
|
|
20648
20654
|
if (n) {
|
|
@@ -20718,7 +20724,7 @@ function hb() {
|
|
|
20718
20724
|
}
|
|
20719
20725
|
N(t), D(!1);
|
|
20720
20726
|
}, ie = !te && !h, ae = !te && !!h, z = L(i.questions, "name"), B = L(i.questions, "email");
|
|
20721
|
-
return /* @__PURE__ */ J(
|
|
20727
|
+
return /* @__PURE__ */ J(fb, {
|
|
20722
20728
|
wide: ie,
|
|
20723
20729
|
form: ae,
|
|
20724
20730
|
children: [
|
|
@@ -20739,23 +20745,23 @@ function hb() {
|
|
|
20739
20745
|
children: [n?.appName && /* @__PURE__ */ q("span", {
|
|
20740
20746
|
className: "text-[10.5px] font-bold uppercase tracking-[0.18em] text-foreground/40 truncate",
|
|
20741
20747
|
children: n.appName
|
|
20742
|
-
}), /* @__PURE__ */ q(
|
|
20748
|
+
}), /* @__PURE__ */ q(pb, { children: fe(i) })]
|
|
20743
20749
|
})]
|
|
20744
20750
|
}),
|
|
20745
20751
|
/* @__PURE__ */ J("div", {
|
|
20746
20752
|
className: "flex flex-wrap items-center gap-2",
|
|
20747
20753
|
children: [
|
|
20748
|
-
!i.memberName.trim() && /* @__PURE__ */ q(
|
|
20754
|
+
!i.memberName.trim() && /* @__PURE__ */ q(db, {
|
|
20749
20755
|
icon: b,
|
|
20750
20756
|
children: "with your host"
|
|
20751
20757
|
}),
|
|
20752
|
-
/* @__PURE__ */ q(
|
|
20758
|
+
/* @__PURE__ */ q(db, {
|
|
20753
20759
|
icon: Ge,
|
|
20754
20760
|
children: p(i.slotMinutes)
|
|
20755
20761
|
}),
|
|
20756
|
-
s && /* @__PURE__ */ q(
|
|
20762
|
+
s && /* @__PURE__ */ q(db, {
|
|
20757
20763
|
accent: !0,
|
|
20758
|
-
children:
|
|
20764
|
+
children: lb(s.amount)
|
|
20759
20765
|
})
|
|
20760
20766
|
]
|
|
20761
20767
|
}),
|
|
@@ -20795,7 +20801,7 @@ function hb() {
|
|
|
20795
20801
|
error: w._email,
|
|
20796
20802
|
placeholder: B.placeholder
|
|
20797
20803
|
}),
|
|
20798
|
-
/* @__PURE__ */ q(
|
|
20804
|
+
/* @__PURE__ */ q(ob, {
|
|
20799
20805
|
questions: i.questions,
|
|
20800
20806
|
answers: S,
|
|
20801
20807
|
errors: w,
|
|
@@ -20825,7 +20831,7 @@ function hb() {
|
|
|
20825
20831
|
onClick: re,
|
|
20826
20832
|
disabled: E || a,
|
|
20827
20833
|
className: "max-sm:w-full h-11 px-6 text-[13.5px] font-bold shrink-0",
|
|
20828
|
-
children: E ? s ? "Opening checkout…" : "Booking…" : s ? `Book and pay ${
|
|
20834
|
+
children: E ? s ? "Opening checkout…" : "Booking…" : s ? `Book and pay ${lb(s.amount)}` : "Confirm booking"
|
|
20829
20835
|
})
|
|
20830
20836
|
})
|
|
20831
20837
|
]
|
|
@@ -20846,8 +20852,8 @@ function hb() {
|
|
|
20846
20852
|
}
|
|
20847
20853
|
//#endregion
|
|
20848
20854
|
//#region src/pages/MeetPage.tsx
|
|
20849
|
-
var
|
|
20850
|
-
function
|
|
20855
|
+
var _b = "rounded-2xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent", vb = "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015]";
|
|
20856
|
+
function yb(e) {
|
|
20851
20857
|
let [t, n] = G(/* @__PURE__ */ new Map()), r = e.join(",");
|
|
20852
20858
|
return W(() => {
|
|
20853
20859
|
let e = r ? r.split(",") : [];
|
|
@@ -20871,7 +20877,7 @@ function vb(e) {
|
|
|
20871
20877
|
};
|
|
20872
20878
|
}, [r]), t;
|
|
20873
20879
|
}
|
|
20874
|
-
function
|
|
20880
|
+
function bb({ children: e }) {
|
|
20875
20881
|
return /* @__PURE__ */ q("main", {
|
|
20876
20882
|
className: "flex-1 w-full max-w-2xl mx-auto px-4 py-8 md:py-12 z-10 flex flex-col justify-center",
|
|
20877
20883
|
children: /* @__PURE__ */ q(U.div, {
|
|
@@ -20889,12 +20895,12 @@ function yb({ children: e }) {
|
|
|
20889
20895
|
})
|
|
20890
20896
|
});
|
|
20891
20897
|
}
|
|
20892
|
-
function
|
|
20898
|
+
function xb({ icon: e, title: t, children: n }) {
|
|
20893
20899
|
return /* @__PURE__ */ J("div", {
|
|
20894
20900
|
className: "flex flex-col items-center text-center py-8 gap-4",
|
|
20895
20901
|
children: [
|
|
20896
20902
|
/* @__PURE__ */ q("div", {
|
|
20897
|
-
className: `w-14 h-14 ${
|
|
20903
|
+
className: `w-14 h-14 ${_b}`,
|
|
20898
20904
|
children: /* @__PURE__ */ q(e, { className: "w-6 h-6" })
|
|
20899
20905
|
}),
|
|
20900
20906
|
/* @__PURE__ */ q("h1", {
|
|
@@ -20913,7 +20919,7 @@ function bb({ icon: e, title: t, children: n }) {
|
|
|
20913
20919
|
]
|
|
20914
20920
|
});
|
|
20915
20921
|
}
|
|
20916
|
-
function
|
|
20922
|
+
function Sb({ icon: e, accent: t, children: n }) {
|
|
20917
20923
|
return /* @__PURE__ */ J("span", {
|
|
20918
20924
|
className: `inline-flex items-center gap-1.5 h-6 px-2.5 rounded-full border text-[11.5px] font-semibold whitespace-nowrap ${t ? "border-accent/40 bg-accent/10 text-accent" : "border-[var(--panel-border)]/70 text-foreground/60"}`,
|
|
20919
20925
|
children: [e && /* @__PURE__ */ q(e, {
|
|
@@ -20922,11 +20928,11 @@ function xb({ icon: e, accent: t, children: n }) {
|
|
|
20922
20928
|
}), n]
|
|
20923
20929
|
});
|
|
20924
20930
|
}
|
|
20925
|
-
function
|
|
20931
|
+
function Cb({ schedule: e, price: t }) {
|
|
20926
20932
|
let n = or(e), r = kt(e.slotMinutes);
|
|
20927
20933
|
return /* @__PURE__ */ J(Q, {
|
|
20928
20934
|
to: it(e.id),
|
|
20929
|
-
className: `${
|
|
20935
|
+
className: `${vb} group relative overflow-hidden flex items-center gap-3.5 sm:gap-4 p-3 sm:p-4 transition-all duration-300
|
|
20930
20936
|
hover:border-accent/50 hover:shadow-[0_10px_30px_-12px_rgba(0,0,0,0.28)] hover:-translate-y-[2px] active:translate-y-0 active:scale-[0.995]`,
|
|
20931
20937
|
children: [
|
|
20932
20938
|
/* @__PURE__ */ q("span", {
|
|
@@ -20957,12 +20963,12 @@ function Sb({ schedule: e, price: t }) {
|
|
|
20957
20963
|
}),
|
|
20958
20964
|
/* @__PURE__ */ J("span", {
|
|
20959
20965
|
className: "flex flex-wrap items-center gap-1.5",
|
|
20960
|
-
children: [/* @__PURE__ */ q(
|
|
20966
|
+
children: [/* @__PURE__ */ q(Sb, {
|
|
20961
20967
|
icon: Ge,
|
|
20962
20968
|
children: p(e.slotMinutes)
|
|
20963
|
-
}), t && /* @__PURE__ */ q(
|
|
20969
|
+
}), t && /* @__PURE__ */ q(Sb, {
|
|
20964
20970
|
accent: !0,
|
|
20965
|
-
children:
|
|
20971
|
+
children: lb(t.amount)
|
|
20966
20972
|
})]
|
|
20967
20973
|
}),
|
|
20968
20974
|
n && /* @__PURE__ */ q("span", {
|
|
@@ -20979,7 +20985,7 @@ function Sb({ schedule: e, price: t }) {
|
|
|
20979
20985
|
]
|
|
20980
20986
|
});
|
|
20981
20987
|
}
|
|
20982
|
-
function
|
|
20988
|
+
function wb({ page: e }) {
|
|
20983
20989
|
let t = "w-24 h-24 sm:w-28 sm:h-28";
|
|
20984
20990
|
return /* @__PURE__ */ J("div", {
|
|
20985
20991
|
className: "relative shrink-0",
|
|
@@ -20991,38 +20997,38 @@ function Cb({ page: e }) {
|
|
|
20991
20997
|
alt: "",
|
|
20992
20998
|
className: `relative ${t} rounded-2xl object-cover border border-[var(--panel-border)] shadow-[0_10px_30px_rgba(0,0,0,0.12)]`
|
|
20993
20999
|
}) : /* @__PURE__ */ q("div", {
|
|
20994
|
-
className: `relative ${t} ${
|
|
21000
|
+
className: `relative ${t} ${_b}`,
|
|
20995
21001
|
children: /* @__PURE__ */ q(b, { className: "w-9 h-9" })
|
|
20996
21002
|
})]
|
|
20997
21003
|
});
|
|
20998
21004
|
}
|
|
20999
|
-
function
|
|
21000
|
-
let { id: e = "" } = Ra(), { activeConfig: t } = ir(), { loading: n, pages: r } = Hf(), { loading: i, schedules: a } = Qt(), o = r.find((t) => t.id === e) || null, s = ra(() => o ? Rf(o, a) : [], [o, a]), c =
|
|
21001
|
-
if (n || i) return /* @__PURE__ */ q(
|
|
21005
|
+
function Tb() {
|
|
21006
|
+
let { id: e = "" } = Ra(), { activeConfig: t } = ir(), { loading: n, pages: r } = Hf(), { loading: i, schedules: a } = Qt(), o = r.find((t) => t.id === e) || null, s = ra(() => o ? Rf(o, a) : [], [o, a]), c = yb(ra(() => [...new Set(s.map((e) => e.paymentId).filter(Boolean))], [s]));
|
|
21007
|
+
if (n || i) return /* @__PURE__ */ q(bb, { children: /* @__PURE__ */ J("div", {
|
|
21002
21008
|
className: "flex items-center justify-center gap-3 py-16 text-foreground/50",
|
|
21003
21009
|
children: [/* @__PURE__ */ q(ui, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ q("span", {
|
|
21004
21010
|
className: "text-[13px] font-medium",
|
|
21005
21011
|
children: "Loading…"
|
|
21006
21012
|
})]
|
|
21007
21013
|
}) });
|
|
21008
|
-
if (!o || !o.enabled) return /* @__PURE__ */ q(
|
|
21014
|
+
if (!o || !o.enabled) return /* @__PURE__ */ q(bb, { children: /* @__PURE__ */ q(xb, {
|
|
21009
21015
|
icon: oe,
|
|
21010
21016
|
title: "This page is no longer open",
|
|
21011
21017
|
children: "It may have been taken down. Ask whoever sent it for a new link."
|
|
21012
21018
|
}) });
|
|
21013
21019
|
if (!s.length) {
|
|
21014
21020
|
let e = Lf(o, a).length;
|
|
21015
|
-
return /* @__PURE__ */ q(
|
|
21021
|
+
return /* @__PURE__ */ q(bb, { children: /* @__PURE__ */ q(xb, {
|
|
21016
21022
|
icon: oe,
|
|
21017
21023
|
title: Vf(o),
|
|
21018
21024
|
children: e ? "Nothing here is taking bookings at the moment. Please check back later." : "There is nothing to book here at the moment. Please check back later."
|
|
21019
21025
|
}) });
|
|
21020
21026
|
}
|
|
21021
21027
|
let l = o.intro.trim();
|
|
21022
|
-
return /* @__PURE__ */ J(
|
|
21028
|
+
return /* @__PURE__ */ J(bb, { children: [
|
|
21023
21029
|
/* @__PURE__ */ J("div", {
|
|
21024
21030
|
className: "flex flex-col items-center text-center gap-4",
|
|
21025
|
-
children: [/* @__PURE__ */ q(
|
|
21031
|
+
children: [/* @__PURE__ */ q(wb, { page: o }), /* @__PURE__ */ J("div", {
|
|
21026
21032
|
className: "flex flex-col items-center gap-1.5 w-full min-w-0",
|
|
21027
21033
|
children: [
|
|
21028
21034
|
t?.appName && /* @__PURE__ */ q("span", {
|
|
@@ -21052,16 +21058,16 @@ function wb() {
|
|
|
21052
21058
|
className: "text-[11px] font-semibold text-foreground/35 tabular-nums",
|
|
21053
21059
|
children: [s.length, " meetings"]
|
|
21054
21060
|
})]
|
|
21055
|
-
}), s.map((e) => /* @__PURE__ */ q(
|
|
21061
|
+
}), s.map((e) => /* @__PURE__ */ q(Cb, {
|
|
21056
21062
|
schedule: e,
|
|
21057
|
-
price:
|
|
21063
|
+
price: cb(c.get(e.paymentId) || null)
|
|
21058
21064
|
}, e.id))]
|
|
21059
21065
|
})
|
|
21060
21066
|
] });
|
|
21061
21067
|
}
|
|
21062
21068
|
//#endregion
|
|
21063
21069
|
//#region src/components/PayButton.tsx
|
|
21064
|
-
function
|
|
21070
|
+
function Eb({ children: e, className: t, variant: n = "primary", pendingLabel: r = "Opening checkout…", ...i }) {
|
|
21065
21071
|
let { loading: a, configured: o } = Oo(), { userRole: s } = Or(), [c, l] = G(!1), [u, d] = G(null);
|
|
21066
21072
|
return a ? null : o ? /* @__PURE__ */ J("span", {
|
|
21067
21073
|
className: "inline-flex flex-col items-stretch gap-2",
|
|
@@ -21088,7 +21094,7 @@ function Tb({ children: e, className: t, variant: n = "primary", pendingLabel: r
|
|
|
21088
21094
|
}
|
|
21089
21095
|
//#endregion
|
|
21090
21096
|
//#region src/pages/PayPage.tsx
|
|
21091
|
-
function
|
|
21097
|
+
function Db() {
|
|
21092
21098
|
let { id: e = "" } = Ra(), { activeConfig: t } = ir(), n = Oo(), [r, i] = G({
|
|
21093
21099
|
loading: !0,
|
|
21094
21100
|
product: null
|
|
@@ -21190,9 +21196,9 @@ function Eb() {
|
|
|
21190
21196
|
children: e.name.trim() || c
|
|
21191
21197
|
}), /* @__PURE__ */ q("span", {
|
|
21192
21198
|
className: "text-[13px] font-medium text-foreground/50",
|
|
21193
|
-
children:
|
|
21199
|
+
children: lb(md(e.amount) || 0)
|
|
21194
21200
|
})]
|
|
21195
|
-
}), /* @__PURE__ */ J(
|
|
21201
|
+
}), /* @__PURE__ */ J(Eb, {
|
|
21196
21202
|
amount: md(e.amount) || 0,
|
|
21197
21203
|
productName: e.name.trim() || c,
|
|
21198
21204
|
metadata: {
|
|
@@ -21204,7 +21210,7 @@ function Eb() {
|
|
|
21204
21210
|
successPath: "/payment-complete",
|
|
21205
21211
|
cancelPath: fr(a.id),
|
|
21206
21212
|
className: "px-5 py-2.5 text-[14px] font-bold",
|
|
21207
|
-
children: ["Pay ",
|
|
21213
|
+
children: ["Pay ", lb(md(e.amount) || 0)]
|
|
21208
21214
|
})]
|
|
21209
21215
|
}, t))
|
|
21210
21216
|
})
|
|
@@ -21215,7 +21221,7 @@ function Eb() {
|
|
|
21215
21221
|
}
|
|
21216
21222
|
//#endregion
|
|
21217
21223
|
//#region src/components/SendTestEmail.tsx
|
|
21218
|
-
function
|
|
21224
|
+
function Ob({ trailing: e, onSent: t }) {
|
|
21219
21225
|
let [n, r] = G("idle"), [i, a] = G("");
|
|
21220
21226
|
return /* @__PURE__ */ J("div", {
|
|
21221
21227
|
className: "flex flex-col gap-1.5",
|
|
@@ -21258,16 +21264,16 @@ function Db({ trailing: e, onSent: t }) {
|
|
|
21258
21264
|
}
|
|
21259
21265
|
//#endregion
|
|
21260
21266
|
//#region src/lib/emailTested.ts
|
|
21261
|
-
var { collection:
|
|
21267
|
+
var { collection: kb, doc: Ab } = O_.email, jb = (e, t) => {
|
|
21262
21268
|
let n = String(e || "").trim().toLowerCase(), r = String(t || "").trim().toLowerCase();
|
|
21263
21269
|
return !!n && n === r;
|
|
21264
21270
|
};
|
|
21265
|
-
function
|
|
21271
|
+
function Mb() {
|
|
21266
21272
|
let [e, t] = G({
|
|
21267
21273
|
loading: !0,
|
|
21268
21274
|
testedFrom: null
|
|
21269
21275
|
});
|
|
21270
|
-
return W(() => xa(X(C,
|
|
21276
|
+
return W(() => xa(X(C, kb, Ab), (e) => {
|
|
21271
21277
|
let n = e.exists() ? e.data()?.testedFrom : null;
|
|
21272
21278
|
t({
|
|
21273
21279
|
loading: !1,
|
|
@@ -21286,7 +21292,7 @@ function jb() {
|
|
|
21286
21292
|
testedFrom: e
|
|
21287
21293
|
});
|
|
21288
21294
|
try {
|
|
21289
|
-
await Z(X(C,
|
|
21295
|
+
await Z(X(C, kb, Ab), { testedFrom: e }, { merge: !0 });
|
|
21290
21296
|
} catch (e) {
|
|
21291
21297
|
console.error("Could not remember the test send", e);
|
|
21292
21298
|
}
|
|
@@ -21296,7 +21302,7 @@ function jb() {
|
|
|
21296
21302
|
}
|
|
21297
21303
|
//#endregion
|
|
21298
21304
|
//#region src/pages/EmailAdmin.tsx
|
|
21299
|
-
var
|
|
21305
|
+
var Nb = (e) => [
|
|
21300
21306
|
{
|
|
21301
21307
|
title: "Hear about what happens",
|
|
21302
21308
|
body: "A booking, a form entry, a new member — at your address the moment it happens.",
|
|
@@ -21333,7 +21339,7 @@ var Mb = (e) => [
|
|
|
21333
21339
|
label: "Pages screen"
|
|
21334
21340
|
}
|
|
21335
21341
|
}
|
|
21336
|
-
],
|
|
21342
|
+
], Pb = (e) => String(e || "").toLowerCase().endsWith("@resend.dev"), Fb = (e) => String(e || "").split("@")[1] || "", Ib = (e) => e ? {
|
|
21337
21343
|
description: "Every page you told to send email does. Switch it off to stop all of it at once.",
|
|
21338
21344
|
chip: {
|
|
21339
21345
|
state: "saved",
|
|
@@ -21346,10 +21352,10 @@ var Mb = (e) => [
|
|
|
21346
21352
|
label: "Off"
|
|
21347
21353
|
}
|
|
21348
21354
|
};
|
|
21349
|
-
function
|
|
21355
|
+
function Lb({ from: e }) {
|
|
21350
21356
|
return /* @__PURE__ */ q("div", {
|
|
21351
21357
|
className: "flex flex-col divide-y divide-[var(--panel-border)]/60 rounded-2xl border border-[var(--panel-border)]/60",
|
|
21352
|
-
children:
|
|
21358
|
+
children: Nb(e).map((e) => {
|
|
21353
21359
|
let t = e.icon;
|
|
21354
21360
|
return /* @__PURE__ */ J("div", {
|
|
21355
21361
|
className: "grid grid-cols-[auto_minmax(0,1fr)] sm:grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 sm:gap-x-3.5 gap-y-0.5 px-4 py-3",
|
|
@@ -21376,7 +21382,7 @@ function Ib({ from: e }) {
|
|
|
21376
21382
|
})
|
|
21377
21383
|
});
|
|
21378
21384
|
}
|
|
21379
|
-
function
|
|
21385
|
+
function Rb({ adminCount: e, onSetUp: t }) {
|
|
21380
21386
|
return /* @__PURE__ */ J("div", {
|
|
21381
21387
|
className: "flex items-center gap-2.5 px-1 flex-wrap",
|
|
21382
21388
|
children: [/* @__PURE__ */ q(br, {
|
|
@@ -21396,10 +21402,10 @@ function Lb({ adminCount: e, onSetUp: t }) {
|
|
|
21396
21402
|
})]
|
|
21397
21403
|
});
|
|
21398
21404
|
}
|
|
21399
|
-
function
|
|
21400
|
-
let { status: e, error: t, reread: n } =
|
|
21405
|
+
function zb() {
|
|
21406
|
+
let { status: e, error: t, reread: n } = L_(), r = A_("email"), [i, a] = G(""), o = Mb(), [s, c] = G(!1), [l, u] = G(!1), d = () => {
|
|
21401
21407
|
c(!1), n().then(() => u(!0));
|
|
21402
|
-
}, f = !!(e && !e.configured), p =
|
|
21408
|
+
}, f = !!(e && !e.configured), p = Pb(e?.from), m = Ib(r.on), h = !o.loading && jb(o.testedFrom, e?.from);
|
|
21403
21409
|
return /* @__PURE__ */ J("main", {
|
|
21404
21410
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 z-10 flex flex-col min-h-screen",
|
|
21405
21411
|
children: [/* @__PURE__ */ J(U.div, {
|
|
@@ -21423,7 +21429,7 @@ function Rb() {
|
|
|
21423
21429
|
children: !e && !t ? /* @__PURE__ */ q("div", {
|
|
21424
21430
|
className: "flex items-center justify-center flex-1 text-foreground/40 py-16",
|
|
21425
21431
|
children: /* @__PURE__ */ q(ui, { className: "w-6 h-6 animate-spin text-accent" })
|
|
21426
|
-
}) : f ? /* @__PURE__ */ q(
|
|
21432
|
+
}) : f ? /* @__PURE__ */ q(vv, {
|
|
21427
21433
|
icon: Xt,
|
|
21428
21434
|
title: "Connect email",
|
|
21429
21435
|
description: "This app is not sending email yet.",
|
|
@@ -21433,7 +21439,7 @@ function Rb() {
|
|
|
21433
21439
|
open: s,
|
|
21434
21440
|
onOpen: () => c(!0),
|
|
21435
21441
|
confirmed: l,
|
|
21436
|
-
steps: /* @__PURE__ */ q(
|
|
21442
|
+
steps: /* @__PURE__ */ q(bv, { onConfirm: d }),
|
|
21437
21443
|
children: /* @__PURE__ */ q(si, { children: "Email runs through Resend, and connecting it is two pasted rows — a key, and your own address for the mail that is meant for you. Once they are in, this screen fills itself: what your app can do with email, and where it goes." })
|
|
21438
21444
|
}) : /* @__PURE__ */ J("div", {
|
|
21439
21445
|
className: "flex flex-col gap-4",
|
|
@@ -21473,24 +21479,24 @@ function Rb() {
|
|
|
21473
21479
|
children: e?.from
|
|
21474
21480
|
}),
|
|
21475
21481
|
".",
|
|
21476
|
-
p ? " That is Resend’s shared practice address: it delivers only to the address you made your Resend account with, so a test to yourself works and a customer’s email does not arrive. Before anyone else should get one, verify your own domain in Resend and add EMAIL_FROM — " : ` That only works if ${
|
|
21482
|
+
p ? " That is Resend’s shared practice address: it delivers only to the address you made your Resend account with, so a test to yourself works and a customer’s email does not arrive. Before anyone else should get one, verify your own domain in Resend and add EMAIL_FROM — " : ` That only works if ${Fb(e?.from)} is verified under Domains in your Resend account — an unverified domain makes every send fail. Every send also appears in your Resend dashboard, with nothing to sync.`,
|
|
21477
21483
|
p && /* @__PURE__ */ q(ti, {
|
|
21478
21484
|
onClick: () => c(!0),
|
|
21479
21485
|
children: "show me how"
|
|
21480
21486
|
}),
|
|
21481
21487
|
p && "."
|
|
21482
21488
|
] }),
|
|
21483
|
-
/* @__PURE__ */ q(
|
|
21489
|
+
/* @__PURE__ */ q(Rb, {
|
|
21484
21490
|
adminCount: e?.adminCount || 0,
|
|
21485
21491
|
onSetUp: () => c(!0)
|
|
21486
21492
|
}),
|
|
21487
21493
|
s && /* @__PURE__ */ q("div", {
|
|
21488
21494
|
className: "px-1 pt-1",
|
|
21489
|
-
children: /* @__PURE__ */ q(
|
|
21495
|
+
children: /* @__PURE__ */ q(bv, { onConfirm: d })
|
|
21490
21496
|
}),
|
|
21491
21497
|
!h && /* @__PURE__ */ q("div", {
|
|
21492
21498
|
className: "px-1",
|
|
21493
|
-
children: /* @__PURE__ */ q(
|
|
21499
|
+
children: /* @__PURE__ */ q(Ob, {
|
|
21494
21500
|
onSent: (t) => o.mark(t || e?.from || ""),
|
|
21495
21501
|
trailing: /* @__PURE__ */ J("a", {
|
|
21496
21502
|
href: "https://resend.com/emails",
|
|
@@ -21507,7 +21513,7 @@ function Rb() {
|
|
|
21507
21513
|
icon: Ve,
|
|
21508
21514
|
title: "What you can do with email",
|
|
21509
21515
|
description: "Each is switched on where it happens — a page on the Pages screen, a payment on the Payments screen.",
|
|
21510
|
-
children: /* @__PURE__ */ q(
|
|
21516
|
+
children: /* @__PURE__ */ q(Lb, { from: e?.from || "" })
|
|
21511
21517
|
})
|
|
21512
21518
|
]
|
|
21513
21519
|
})
|
|
@@ -21517,8 +21523,8 @@ function Rb() {
|
|
|
21517
21523
|
}
|
|
21518
21524
|
//#endregion
|
|
21519
21525
|
//#region src/lib/notFoundHelp.ts
|
|
21520
|
-
var
|
|
21521
|
-
function
|
|
21526
|
+
var Bb = "src/your-ai-workflow-firebase-os";
|
|
21527
|
+
function Vb() {
|
|
21522
21528
|
let e = /* @__PURE__ */ new Set();
|
|
21523
21529
|
for (let [t, n] of Za()) {
|
|
21524
21530
|
let r = n?.config?.route, i = typeof r == "string" && r.trim() ? r.startsWith("/") ? r : "/" + r : "/" + t.toLowerCase();
|
|
@@ -21526,29 +21532,29 @@ function Bb() {
|
|
|
21526
21532
|
}
|
|
21527
21533
|
return [...e].sort();
|
|
21528
21534
|
}
|
|
21529
|
-
var
|
|
21530
|
-
function
|
|
21535
|
+
var Hb = (e) => (e || "").split(/[^a-zA-Z0-9]+/).filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("");
|
|
21536
|
+
function Ub(e) {
|
|
21531
21537
|
let t = e?.contentKey || e?.tabName || e?.pageName || e?.pageId || "Page";
|
|
21532
|
-
return `${
|
|
21538
|
+
return `${Bb}/microcomponents/${Hb(String(t)) || "Page"}Content.tsx`;
|
|
21533
21539
|
}
|
|
21534
|
-
function
|
|
21540
|
+
function Wb(e, t) {
|
|
21535
21541
|
let n = t.replace(/^.*\//, "").replace(/\.tsx$/, ""), r = n.replace(/Content$/, "").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
21536
21542
|
return [
|
|
21537
|
-
`My app has a page at ${e} and it is still empty after you said it was done. The ONLY thing that fills this page is one file: ${t}, with a default export, registered in ${
|
|
21543
|
+
`My app has a page at ${e} and it is still empty after you said it was done. The ONLY thing that fills this page is one file: ${t}, with a default export, registered in ${Bb}/microcomponents/registry.ts.`,
|
|
21538
21544
|
"Check these in order and fix whatever is wrong, without asking me questions:",
|
|
21539
21545
|
"1. The file exists at exactly that path and name — not another folder, not another spelling. If you put it somewhere else, move it there.",
|
|
21540
21546
|
"2. It has a default export. A named-only export is silently ignored.",
|
|
21541
|
-
`3. ${
|
|
21547
|
+
`3. ${Bb}/microcomponents/registry.ts contains these two lines: import ${n} from './${n}'; and registerMicrocomponent('${r}', ${n}); — registerMicrocomponent is imported there from 'your-ai-workflow-firebase-os'. Add them if they are missing, and never remove another page's lines.`,
|
|
21542
21548
|
"4. You created nothing else for this page — no config file, no route, no page, and no edit to src/App.tsx or src/main.tsx. Undo any of those you made.",
|
|
21543
21549
|
"Then tell me, in one sentence, which of these was wrong."
|
|
21544
21550
|
].join("\n");
|
|
21545
21551
|
}
|
|
21546
|
-
function
|
|
21552
|
+
function Gb(e) {
|
|
21547
21553
|
return [
|
|
21548
21554
|
`The page at ${e} shows "Page Not Found". The app only finds a page when its config file is picked up, so check these in order and fix whatever is wrong, without asking me questions.`,
|
|
21549
|
-
`1. The page's config file sits directly in ${
|
|
21555
|
+
`1. The page's config file sits directly in ${Bb}/configs/ and its name ends with Tab.config.ts (a page for signed-in users, my team or admins) or Page.config.ts (a page for anyone). Not in a subfolder, not any other name.`,
|
|
21550
21556
|
`2. It exports one const whose name ends with Config, and its route is the single string '${e}'. A page has exactly one web address — remove any other addresses you registered for it.`,
|
|
21551
|
-
`3. ${
|
|
21557
|
+
`3. ${Bb}/configs/pagesRegistry.ts exists and src/main.tsx contains the line import './your-ai-workflow-firebase-os/configs/pagesRegistry'. If either is missing, run npm install so the package's postinstall script restores them.`,
|
|
21552
21558
|
"4. Put src/App.tsx back to the version the package wrote: it only mounts <FirebaseOS />. Never add routes, a router or the customRoutes prop.",
|
|
21553
21559
|
"5. If the page is for my team, its config says pageType: 'internal'. Any form on it is a *Form.config.ts file shown through <ContactPopup formId=\"...\" />, never a form you wrote by hand.",
|
|
21554
21560
|
"Then rebuild and tell me, in one sentence, which of these was wrong."
|
|
@@ -21556,7 +21562,7 @@ function Wb(e) {
|
|
|
21556
21562
|
}
|
|
21557
21563
|
//#endregion
|
|
21558
21564
|
//#region src/templates/PublicPageTemplate.tsx
|
|
21559
|
-
function
|
|
21565
|
+
function Kb({ config: e, customContent: t }) {
|
|
21560
21566
|
let { config: n } = ir(), { userRole: r } = Or();
|
|
21561
21567
|
return W(() => {
|
|
21562
21568
|
document.title = e.pageName || e.pageTitle || n.appName || "Your AI Firebase";
|
|
@@ -21618,7 +21624,7 @@ function Gb({ config: e, customContent: t }) {
|
|
|
21618
21624
|
children: /* @__PURE__ */ q(Fs, {
|
|
21619
21625
|
compact: !0,
|
|
21620
21626
|
title: "Already asked, and it is still empty? Paste this",
|
|
21621
|
-
prompt:
|
|
21627
|
+
prompt: Wb(e.route || "/", Ub(e))
|
|
21622
21628
|
})
|
|
21623
21629
|
})]
|
|
21624
21630
|
})
|
|
@@ -21627,7 +21633,7 @@ function Gb({ config: e, customContent: t }) {
|
|
|
21627
21633
|
}
|
|
21628
21634
|
//#endregion
|
|
21629
21635
|
//#region src/templates/UserPageTemplate.tsx
|
|
21630
|
-
function
|
|
21636
|
+
function qb({ config: e, customContent: t }) {
|
|
21631
21637
|
let { user: n } = Or(), { config: r } = ir(), [i, a] = G([]), [o, s] = G(!0), [c, l] = G(!1), [u, d] = G(""), [f, p] = G(""), [m, h] = G(!1), [g, _] = G(null), v = ia(null), [y, b] = G(!1), [x, S] = G(null), [w, T] = G(null), E = (e) => {
|
|
21632
21638
|
if (T(e), e) {
|
|
21633
21639
|
let t = e.fileType || "";
|
|
@@ -22568,7 +22574,7 @@ function Kb({ config: e, customContent: t }) {
|
|
|
22568
22574
|
}
|
|
22569
22575
|
//#endregion
|
|
22570
22576
|
//#region src/templates/AdminPageTemplate.tsx
|
|
22571
|
-
function
|
|
22577
|
+
function Jb({ config: e, customContent: t }) {
|
|
22572
22578
|
let { user: n } = Or(), { config: r } = ir(), [i, a] = G([]), [o, s] = G(!0), [c, l] = G(!1), [u, d] = G(""), [f, p] = G(""), [m, h] = G(!1), [g, _] = G(null), v = ia(null), [y, b] = G(!1), [x, S] = G(null), [w, T] = G(null), E = (e) => {
|
|
22573
22579
|
if (T(e), e) {
|
|
22574
22580
|
let t = e.fileType || "";
|
|
@@ -23551,7 +23557,7 @@ function qb({ config: e, customContent: t }) {
|
|
|
23551
23557
|
}
|
|
23552
23558
|
//#endregion
|
|
23553
23559
|
//#region src/templates/InternalPageTemplate.tsx
|
|
23554
|
-
function
|
|
23560
|
+
function Yb({ config: e, customContent: t }) {
|
|
23555
23561
|
let { user: n } = Or(), { config: r } = ir(), [i, a] = G([]), [o, s] = G(!0), [c, l] = G(!1), [u, d] = G(""), [f, p] = G(""), [m, h] = G(!1), [g, _] = G(null), v = ia(null), [y, b] = G(!1), [x, S] = G(null), [w, T] = G(null), E = (e) => {
|
|
23556
23562
|
if (T(e), e) {
|
|
23557
23563
|
let t = e.fileType || "";
|
|
@@ -24500,23 +24506,23 @@ function Jb({ config: e, customContent: t }) {
|
|
|
24500
24506
|
}
|
|
24501
24507
|
//#endregion
|
|
24502
24508
|
//#region src/configs/pages/templates.ts
|
|
24503
|
-
var
|
|
24509
|
+
var Xb = [
|
|
24504
24510
|
"board",
|
|
24505
24511
|
"table",
|
|
24506
24512
|
"calendar",
|
|
24507
24513
|
"drive"
|
|
24508
|
-
],
|
|
24514
|
+
], Zb = ["inline_form", "popup_form"], Qb = (e) => typeof e != "string" || e === "" || e === "none" || e === "custom" || ![...Xb, ...Zb].includes(e), $b = (e, t) => Qb(e) || t && !ex(e), ex = (e) => typeof e == "string" && Xb.includes(e), tx = "/src/your-ai-workflow-firebase-os/microcomponents", nx = (e) => (e || "").split(/[^a-zA-Z0-9]+/).filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(""), rx = (e) => {
|
|
24509
24515
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
24510
24516
|
return [t, t.replace(/_/g, "")];
|
|
24511
|
-
},
|
|
24517
|
+
}, ix = (e) => {
|
|
24512
24518
|
let t = [
|
|
24513
24519
|
e?.contentKey,
|
|
24514
24520
|
e?.tabName,
|
|
24515
24521
|
e?.pageId,
|
|
24516
24522
|
e?.pageName
|
|
24517
|
-
].filter((e) => typeof e == "string" && e.trim()).map((e) =>
|
|
24523
|
+
].filter((e) => typeof e == "string" && e.trim()).map((e) => nx(e)).filter(Boolean);
|
|
24518
24524
|
return [...new Set(t)].map((e) => `${e}Content.tsx`);
|
|
24519
|
-
},
|
|
24525
|
+
}, ax = (e) => {
|
|
24520
24526
|
if (typeof window > "u") return !1;
|
|
24521
24527
|
let t = window.__FBOS_MICROCOMPONENTS__;
|
|
24522
24528
|
if (!t) return !1;
|
|
@@ -24527,19 +24533,19 @@ var Yb = [
|
|
|
24527
24533
|
e?.pageId,
|
|
24528
24534
|
e?.pageName
|
|
24529
24535
|
].filter((e) => typeof e == "string" && e.trim()).some((e) => t[n(e)]);
|
|
24530
|
-
},
|
|
24531
|
-
let t =
|
|
24536
|
+
}, ox = /* @__PURE__ */ new Map(), sx = (e) => {
|
|
24537
|
+
let t = ox.get(e);
|
|
24532
24538
|
return t || (t = import(
|
|
24533
24539
|
/* @vite-ignore */
|
|
24534
|
-
`${
|
|
24535
|
-
).then((e) => typeof e?.default == "function" || typeof e?.default == "object" ? e.default : null).catch(() => null),
|
|
24540
|
+
`${tx}/${e}`
|
|
24541
|
+
).then((e) => typeof e?.default == "function" || typeof e?.default == "object" ? e.default : null).catch(() => null), ox.set(e, t)), t;
|
|
24536
24542
|
};
|
|
24537
|
-
async function
|
|
24538
|
-
if (typeof window > "u" ||
|
|
24539
|
-
for (let t of
|
|
24540
|
-
let e = await
|
|
24543
|
+
async function cx(e) {
|
|
24544
|
+
if (typeof window > "u" || ax(e)) return null;
|
|
24545
|
+
for (let t of ix(e)) {
|
|
24546
|
+
let e = await sx(t);
|
|
24541
24547
|
if (!e) continue;
|
|
24542
|
-
let [n, r] =
|
|
24548
|
+
let [n, r] = rx(t.replace(/Content\.tsx$/, "")), i = window.__FBOS_MICROCOMPONENTS__ || {};
|
|
24543
24549
|
return window.__FBOS_MICROCOMPONENTS__ = {
|
|
24544
24550
|
[n]: e,
|
|
24545
24551
|
[r]: e,
|
|
@@ -24550,7 +24556,7 @@ async function sx(e) {
|
|
|
24550
24556
|
}
|
|
24551
24557
|
//#endregion
|
|
24552
24558
|
//#region src/pages/DynamicPage.tsx
|
|
24553
|
-
var
|
|
24559
|
+
var lx = (e, t) => {
|
|
24554
24560
|
let n = t ? $t(e.pageType) : "public";
|
|
24555
24561
|
return {
|
|
24556
24562
|
...e,
|
|
@@ -24561,7 +24567,7 @@ var cx = (e, t) => {
|
|
|
24561
24567
|
isShared: n === "internal"
|
|
24562
24568
|
};
|
|
24563
24569
|
};
|
|
24564
|
-
function
|
|
24570
|
+
function ux() {
|
|
24565
24571
|
let e = Ia(), { user: t, userRole: n, loading: r, roleResolved: i, userInactive: a, signOut: o } = Or(), s = Re(), c = (e) => {
|
|
24566
24572
|
if (typeof window < "u") {
|
|
24567
24573
|
let t = localStorage.getItem(`fbos_route_${e}`);
|
|
@@ -24571,13 +24577,13 @@ function lx() {
|
|
|
24571
24577
|
let t = localStorage.getItem(`fbos_form_${e.form}`);
|
|
24572
24578
|
t && (e.formConfigOverride = JSON.parse(t));
|
|
24573
24579
|
}
|
|
24574
|
-
return
|
|
24580
|
+
return lx(e, e.isPrivate === !0);
|
|
24575
24581
|
} catch {}
|
|
24576
24582
|
}
|
|
24577
24583
|
let t = (typeof window < "u" ? window.__FBOS_PAGES__ : null) || {}, n = e.replace(/^\//, "");
|
|
24578
24584
|
for (let [r, i] of Object.entries(t)) {
|
|
24579
24585
|
let t = i.config, a = i.isPublic, o = t.route || "/" + r;
|
|
24580
|
-
if (o === e || r === n) return
|
|
24586
|
+
if (o === e || r === n) return lx({
|
|
24581
24587
|
...t,
|
|
24582
24588
|
route: o,
|
|
24583
24589
|
contentKey: t.pageId || r,
|
|
@@ -24621,14 +24627,14 @@ function lx() {
|
|
|
24621
24627
|
ya(Ca(Y(C, "sys_tabs"), Ea("route", "==", e.pathname), ba(1))),
|
|
24622
24628
|
ya(Ca(Y(C, "sys_tabs"), Ea("route", "==", n), ba(1)))
|
|
24623
24629
|
]), d = null, p = null, m = (e, t) => {
|
|
24624
|
-
d || e.status === "fulfilled" && (e.value.exists && e.value.exists() ? (d =
|
|
24630
|
+
d || e.status === "fulfilled" && (e.value.exists && e.value.exists() ? (d = lx(e.value.data(), t), p = e.value.id) : e.value.docs && e.value.docs.length > 0 && (d = lx(e.value.docs[0].data(), t), p = e.value.docs[0].id));
|
|
24625
24631
|
};
|
|
24626
24632
|
if (m(r, !1), m(a, !1), m(o, !1), m(i, !0), m(c, !0), m(l, !0), !d) {
|
|
24627
24633
|
let t = (typeof window < "u" ? window.__FBOS_PAGES__ : null) || {};
|
|
24628
24634
|
for (let [r, i] of Object.entries(t)) {
|
|
24629
24635
|
let t = i.config, a = i.isPublic, o = t.route || "/" + r;
|
|
24630
24636
|
if (o === e.pathname || r === n) {
|
|
24631
|
-
d =
|
|
24637
|
+
d = lx({
|
|
24632
24638
|
...t,
|
|
24633
24639
|
route: o,
|
|
24634
24640
|
contentKey: t.pageId || r,
|
|
@@ -24697,12 +24703,12 @@ function lx() {
|
|
|
24697
24703
|
l.pageName
|
|
24698
24704
|
].filter(Boolean).join("|") : "";
|
|
24699
24705
|
if (W(() => {
|
|
24700
|
-
if (g(null), !y ||
|
|
24706
|
+
if (g(null), !y || ax(l)) {
|
|
24701
24707
|
v(!1);
|
|
24702
24708
|
return;
|
|
24703
24709
|
}
|
|
24704
24710
|
let e = !1;
|
|
24705
|
-
v(!0),
|
|
24711
|
+
v(!0), cx(l).then((t) => {
|
|
24706
24712
|
e || (t && g(() => t), v(!1));
|
|
24707
24713
|
});
|
|
24708
24714
|
let t = setTimeout(() => {
|
|
@@ -24786,7 +24792,7 @@ function lx() {
|
|
|
24786
24792
|
children: "The route you are looking for does not exist or has been removed."
|
|
24787
24793
|
}),
|
|
24788
24794
|
Br(n) && (() => {
|
|
24789
|
-
let t =
|
|
24795
|
+
let t = Vb();
|
|
24790
24796
|
return /* @__PURE__ */ J("div", {
|
|
24791
24797
|
className: "mt-8 w-full max-w-lg text-left flex flex-col gap-4",
|
|
24792
24798
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -24800,7 +24806,7 @@ function lx() {
|
|
|
24800
24806
|
})]
|
|
24801
24807
|
}), /* @__PURE__ */ q(Fs, {
|
|
24802
24808
|
title: "If your assistant just made this page, paste this",
|
|
24803
|
-
prompt:
|
|
24809
|
+
prompt: Gb(e.pathname)
|
|
24804
24810
|
})]
|
|
24805
24811
|
});
|
|
24806
24812
|
})()
|
|
@@ -24833,16 +24839,16 @@ function lx() {
|
|
|
24833
24839
|
l.pageName,
|
|
24834
24840
|
l.pageName?.replace(/\s+/g, "_")
|
|
24835
24841
|
].filter(Boolean).map((e) => E(e)).reduce((e, t) => e || T?.[t], void 0), O = b || D || h || void 0, k = l.route || l.pageId || "custom";
|
|
24836
|
-
return
|
|
24842
|
+
return $b(l.template, !!O) ? l.isAdmin ? /* @__PURE__ */ q(Jb, {
|
|
24837
24843
|
config: l,
|
|
24838
24844
|
customContent: O
|
|
24839
|
-
}, k) : l.isInternal ? /* @__PURE__ */ q(
|
|
24845
|
+
}, k) : l.isInternal ? /* @__PURE__ */ q(Yb, {
|
|
24840
24846
|
config: l,
|
|
24841
24847
|
customContent: O
|
|
24842
|
-
}, k) : l.isPrivate ? /* @__PURE__ */ q(
|
|
24848
|
+
}, k) : l.isPrivate ? /* @__PURE__ */ q(qb, {
|
|
24843
24849
|
config: l,
|
|
24844
24850
|
customContent: O
|
|
24845
|
-
}, k) : /* @__PURE__ */ q(
|
|
24851
|
+
}, k) : /* @__PURE__ */ q(Kb, {
|
|
24846
24852
|
config: l,
|
|
24847
24853
|
customContent: O
|
|
24848
24854
|
}, k) : l.template === "board" ? /* @__PURE__ */ q(s.components?.TemplateBoard || Jc, {
|
|
@@ -24889,7 +24895,7 @@ function lx() {
|
|
|
24889
24895
|
}
|
|
24890
24896
|
//#endregion
|
|
24891
24897
|
//#region src/pages/PaymentComplete.tsx
|
|
24892
|
-
var
|
|
24898
|
+
var dx = (e) => e.error ? "error" : e.paid ? "paid" : "unpaid", fx = {
|
|
24893
24899
|
checking: {
|
|
24894
24900
|
icon: Ge,
|
|
24895
24901
|
tint: "text-accent",
|
|
@@ -24916,13 +24922,13 @@ var ux = (e) => e.error ? "error" : e.paid ? "paid" : "unpaid", dx = {
|
|
|
24916
24922
|
title: "Payment cancelled"
|
|
24917
24923
|
}
|
|
24918
24924
|
};
|
|
24919
|
-
function
|
|
24925
|
+
function px({ cancelled: e = !1 }) {
|
|
24920
24926
|
let [t] = za(), n = t.get("session_id") || "", [r, i] = G("checking"), [a, o] = G(null);
|
|
24921
24927
|
W(() => {
|
|
24922
24928
|
if (e) return;
|
|
24923
24929
|
let t = !1;
|
|
24924
24930
|
return wo(n).then((e) => {
|
|
24925
|
-
t || (o(e), i(
|
|
24931
|
+
t || (o(e), i(dx(e)));
|
|
24926
24932
|
}), () => {
|
|
24927
24933
|
t = !0;
|
|
24928
24934
|
};
|
|
@@ -24930,8 +24936,8 @@ function fx({ cancelled: e = !1 }) {
|
|
|
24930
24936
|
let s = async () => {
|
|
24931
24937
|
i("checking");
|
|
24932
24938
|
let e = await wo(n);
|
|
24933
|
-
o(e), i(
|
|
24934
|
-
}, c =
|
|
24939
|
+
o(e), i(dx(e));
|
|
24940
|
+
}, c = fx[e ? "cancelled" : r], l = c.icon;
|
|
24935
24941
|
return /* @__PURE__ */ q("div", {
|
|
24936
24942
|
className: "flex-1 flex items-center justify-center w-full z-10 px-4 mb-16",
|
|
24937
24943
|
children: /* @__PURE__ */ J(U.div, {
|
|
@@ -24984,7 +24990,7 @@ function fx({ cancelled: e = !1 }) {
|
|
|
24984
24990
|
}
|
|
24985
24991
|
//#endregion
|
|
24986
24992
|
//#region src/components/ManagePlanButton.tsx
|
|
24987
|
-
function
|
|
24993
|
+
function mx({ children: e, className: t, variant: n = "secondary" }) {
|
|
24988
24994
|
let { loading: r, configured: i } = Oo(), [a, o] = G(!1), [s, c] = G(null);
|
|
24989
24995
|
return r || !i ? null : /* @__PURE__ */ J("span", {
|
|
24990
24996
|
className: "inline-flex flex-col items-stretch gap-2",
|
|
@@ -25008,7 +25014,7 @@ function px({ children: e, className: t, variant: n = "secondary" }) {
|
|
|
25008
25014
|
}
|
|
25009
25015
|
//#endregion
|
|
25010
25016
|
//#region src/pages/Billing.tsx
|
|
25011
|
-
function
|
|
25017
|
+
function hx(e) {
|
|
25012
25018
|
return e.status === "past_due" ? {
|
|
25013
25019
|
label: "Past due",
|
|
25014
25020
|
tone: "bad"
|
|
@@ -25020,7 +25026,7 @@ function mx(e) {
|
|
|
25020
25026
|
tone: "quiet"
|
|
25021
25027
|
};
|
|
25022
25028
|
}
|
|
25023
|
-
function
|
|
25029
|
+
function gx(e) {
|
|
25024
25030
|
if (!e.currentPeriodEnd || !e.active) return "";
|
|
25025
25031
|
let t = (/* @__PURE__ */ new Date(e.currentPeriodEnd * 1e3)).toLocaleDateString(void 0, {
|
|
25026
25032
|
day: "numeric",
|
|
@@ -25029,8 +25035,8 @@ function hx(e) {
|
|
|
25029
25035
|
});
|
|
25030
25036
|
return e.cancelAtPeriodEnd ? `Ends on ${t}` : `Renews on ${t}`;
|
|
25031
25037
|
}
|
|
25032
|
-
function
|
|
25033
|
-
let t =
|
|
25038
|
+
function _x({ payment: e }) {
|
|
25039
|
+
let t = Sv({
|
|
25034
25040
|
kind: "charge",
|
|
25035
25041
|
email: null,
|
|
25036
25042
|
name: null,
|
|
@@ -25046,22 +25052,22 @@ function gx({ payment: e }) {
|
|
|
25046
25052
|
children: e.description || "One-off payment"
|
|
25047
25053
|
}), /* @__PURE__ */ q("span", {
|
|
25048
25054
|
className: "text-[11px] text-foreground/45 font-medium truncate",
|
|
25049
|
-
children:
|
|
25055
|
+
children: Tv(e.created)
|
|
25050
25056
|
})]
|
|
25051
25057
|
}),
|
|
25052
25058
|
/* @__PURE__ */ q("span", {
|
|
25053
25059
|
className: "text-[12.5px] font-semibold text-foreground/70 whitespace-nowrap shrink-0",
|
|
25054
|
-
children:
|
|
25060
|
+
children: Cv(e.amount, e.currency)
|
|
25055
25061
|
}),
|
|
25056
|
-
/* @__PURE__ */ q(
|
|
25062
|
+
/* @__PURE__ */ q(Ev, {
|
|
25057
25063
|
label: t.label,
|
|
25058
25064
|
tone: t.tone
|
|
25059
25065
|
})
|
|
25060
25066
|
]
|
|
25061
25067
|
});
|
|
25062
25068
|
}
|
|
25063
|
-
function
|
|
25064
|
-
let t =
|
|
25069
|
+
function vx({ sub: e }) {
|
|
25070
|
+
let t = hx(e), n = gx(e);
|
|
25065
25071
|
return /* @__PURE__ */ J("div", {
|
|
25066
25072
|
className: `flex flex-col gap-3 px-3.5 py-3 ${Lt}`,
|
|
25067
25073
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -25074,19 +25080,19 @@ function _x({ sub: e }) {
|
|
|
25074
25080
|
}), /* @__PURE__ */ J("span", {
|
|
25075
25081
|
className: "text-[11px] text-foreground/45 font-medium truncate",
|
|
25076
25082
|
children: [
|
|
25077
|
-
|
|
25083
|
+
Cv(e.amount, e.currency),
|
|
25078
25084
|
e.interval ? ` / ${e.interval}` : "",
|
|
25079
25085
|
n ? ` — ${n}` : ""
|
|
25080
25086
|
]
|
|
25081
25087
|
})]
|
|
25082
|
-
}), /* @__PURE__ */ q(
|
|
25088
|
+
}), /* @__PURE__ */ q(Ev, {
|
|
25083
25089
|
label: t.label,
|
|
25084
25090
|
tone: t.tone
|
|
25085
25091
|
})]
|
|
25086
|
-
}), /* @__PURE__ */ q(
|
|
25092
|
+
}), /* @__PURE__ */ q(mx, { className: "self-start" })]
|
|
25087
25093
|
});
|
|
25088
25094
|
}
|
|
25089
|
-
function
|
|
25095
|
+
function yx() {
|
|
25090
25096
|
let { user: e } = Or(), { loading: t, subscriptions: n, payments: r, error: i } = ko(), a = !t && !i && n.length === 0 && r.length === 0;
|
|
25091
25097
|
return /* @__PURE__ */ J("main", {
|
|
25092
25098
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 z-10 flex flex-col min-h-screen",
|
|
@@ -25140,7 +25146,7 @@ function vx() {
|
|
|
25140
25146
|
collapsible: !1,
|
|
25141
25147
|
children: /* @__PURE__ */ q("div", {
|
|
25142
25148
|
className: "flex flex-col gap-2.5",
|
|
25143
|
-
children: n.map((e) => /* @__PURE__ */ q(
|
|
25149
|
+
children: n.map((e) => /* @__PURE__ */ q(vx, { sub: e }, e.id))
|
|
25144
25150
|
})
|
|
25145
25151
|
}), r.length > 0 && /* @__PURE__ */ q(un, {
|
|
25146
25152
|
icon: At,
|
|
@@ -25149,7 +25155,7 @@ function vx() {
|
|
|
25149
25155
|
collapsible: !1,
|
|
25150
25156
|
children: /* @__PURE__ */ q("div", {
|
|
25151
25157
|
className: "flex flex-col gap-2.5",
|
|
25152
|
-
children: r.map((e) => /* @__PURE__ */ q(
|
|
25158
|
+
children: r.map((e) => /* @__PURE__ */ q(_x, { payment: e }, e.id))
|
|
25153
25159
|
})
|
|
25154
25160
|
})]
|
|
25155
25161
|
})
|
|
@@ -25159,23 +25165,23 @@ function vx() {
|
|
|
25159
25165
|
}
|
|
25160
25166
|
//#endregion
|
|
25161
25167
|
//#region src/pages/PublishApp.tsx
|
|
25162
|
-
var
|
|
25163
|
-
function
|
|
25168
|
+
var bx = "text-accent underline underline-offset-2 font-semibold hover:text-accent-deep transition-colors", xx = "space-y-2 list-decimal list-inside text-foreground/75 marker:font-bold marker:text-foreground/40";
|
|
25169
|
+
function Sx({ href: e, children: t }) {
|
|
25164
25170
|
return /* @__PURE__ */ q("a", {
|
|
25165
25171
|
href: e,
|
|
25166
25172
|
target: "_blank",
|
|
25167
25173
|
rel: "noopener noreferrer",
|
|
25168
|
-
className:
|
|
25174
|
+
className: bx,
|
|
25169
25175
|
children: t
|
|
25170
25176
|
});
|
|
25171
25177
|
}
|
|
25172
|
-
function
|
|
25178
|
+
function Cx({ children: e }) {
|
|
25173
25179
|
return /* @__PURE__ */ q("h4", {
|
|
25174
25180
|
className: "text-[12px] font-extrabold uppercase tracking-[0.14em] text-foreground/40 pt-1",
|
|
25175
25181
|
children: e
|
|
25176
25182
|
});
|
|
25177
25183
|
}
|
|
25178
|
-
function
|
|
25184
|
+
function wx({ number: e, title: t, done: n, open: r, onToggle: i, children: a }) {
|
|
25179
25185
|
let o = /* @__PURE__ */ J(K, { children: [
|
|
25180
25186
|
/* @__PURE__ */ q("span", {
|
|
25181
25187
|
className: `w-8 h-8 shrink-0 rounded-full flex items-center justify-center text-[13.5px] font-extrabold border ${n ? "bg-emerald-500/10 border-emerald-500/20 text-emerald-500" : "bg-accent/10 border-accent/20 text-accent"}`,
|
|
@@ -25222,7 +25228,7 @@ function Cx({ number: e, title: t, done: n, open: r, onToggle: i, children: a })
|
|
|
25222
25228
|
})]
|
|
25223
25229
|
});
|
|
25224
25230
|
}
|
|
25225
|
-
function
|
|
25231
|
+
function Tx({ label: e, onDone: t, waitingFor: n }) {
|
|
25226
25232
|
return /* @__PURE__ */ J("div", {
|
|
25227
25233
|
className: "flex flex-col gap-2 pt-1",
|
|
25228
25234
|
children: [/* @__PURE__ */ J(U.button, {
|
|
@@ -25239,7 +25245,7 @@ function wx({ label: e, onDone: t, waitingFor: n }) {
|
|
|
25239
25245
|
})]
|
|
25240
25246
|
});
|
|
25241
25247
|
}
|
|
25242
|
-
function
|
|
25248
|
+
function Ex({ label: e, hint: t, placeholder: n, invalid: r, value: i, clean: a, preview: o, onSave: s }) {
|
|
25243
25249
|
let [c, l] = G(i), [u, d] = G(!1), [f, p] = G(""), m = a(c), h = c.trim().length > 0, g = m !== i;
|
|
25244
25250
|
return /* @__PURE__ */ J("div", {
|
|
25245
25251
|
className: "flex flex-col gap-2",
|
|
@@ -25282,7 +25288,7 @@ function Tx({ label: e, hint: t, placeholder: n, invalid: r, value: i, clean: a,
|
|
|
25282
25288
|
})]
|
|
25283
25289
|
});
|
|
25284
25290
|
}
|
|
25285
|
-
function
|
|
25291
|
+
function Dx({ label: e, url: t }) {
|
|
25286
25292
|
return /* @__PURE__ */ J("div", {
|
|
25287
25293
|
className: "flex max-sm:flex-col sm:items-center justify-between gap-2 sm:gap-3 px-3.5 py-3 rounded-xl border border-[var(--panel-border)]/60 bg-background",
|
|
25288
25294
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -25301,15 +25307,15 @@ function Ex({ label: e, url: t }) {
|
|
|
25301
25307
|
})]
|
|
25302
25308
|
});
|
|
25303
25309
|
}
|
|
25304
|
-
var
|
|
25310
|
+
var Ox = [
|
|
25305
25311
|
"216.239.32.21",
|
|
25306
25312
|
"216.239.34.21",
|
|
25307
25313
|
"216.239.36.21",
|
|
25308
25314
|
"216.239.38.21"
|
|
25309
25315
|
];
|
|
25310
|
-
function
|
|
25311
|
-
let { loading: e, record: t, save: n } =
|
|
25312
|
-
i(null), n({ done:
|
|
25316
|
+
function kx() {
|
|
25317
|
+
let { loading: e, record: t, save: n } = Q_(), [r, i] = G(null), { status: a } = I_(), o = Y_(t.done, r), s = (e) => o[V_.indexOf(e)], c = G_(t.appName), l = q_(t.domain), u = t.done.length === V_.length, d = u && Z_(a), f = (e) => {
|
|
25318
|
+
i(null), n({ done: X_(t.done, e) });
|
|
25313
25319
|
}, p = (e) => e.open ? e.done ? () => i(null) : void 0 : () => i(e.done ? e.id : null), m = (e) => {
|
|
25314
25320
|
let t = s(e);
|
|
25315
25321
|
return {
|
|
@@ -25390,17 +25396,17 @@ function Ox() {
|
|
|
25390
25396
|
}), !e && /* @__PURE__ */ J("div", {
|
|
25391
25397
|
className: "flex flex-col gap-3",
|
|
25392
25398
|
children: [
|
|
25393
|
-
/* @__PURE__ */ J(
|
|
25399
|
+
/* @__PURE__ */ J(wx, {
|
|
25394
25400
|
number: 1,
|
|
25395
25401
|
title: "Publish in AI Studio",
|
|
25396
25402
|
...m("published"),
|
|
25397
25403
|
children: [
|
|
25398
25404
|
/* @__PURE__ */ J("ol", {
|
|
25399
|
-
className:
|
|
25405
|
+
className: xx,
|
|
25400
25406
|
children: [
|
|
25401
25407
|
/* @__PURE__ */ J("li", { children: [
|
|
25402
25408
|
"In ",
|
|
25403
|
-
/* @__PURE__ */ q(
|
|
25409
|
+
/* @__PURE__ */ q(Sx, {
|
|
25404
25410
|
href: "https://aistudio.google.com",
|
|
25405
25411
|
children: "Google AI Studio"
|
|
25406
25412
|
}),
|
|
@@ -25432,24 +25438,24 @@ function Ox() {
|
|
|
25432
25438
|
/* @__PURE__ */ q("strong", { children: "Failed to publish app" }),
|
|
25433
25439
|
", reload the page, unpublish, and publish again. It usually goes through the second time."
|
|
25434
25440
|
] }),
|
|
25435
|
-
/* @__PURE__ */ q(
|
|
25441
|
+
/* @__PURE__ */ q(Ex, {
|
|
25436
25442
|
label: "Your app name",
|
|
25437
25443
|
hint: "The name you just typed into AI Studio. Saving only keeps it for step 3 — nothing changes in AI Studio, it just says Saved. Pasting the whole address is fine; only the name is kept.",
|
|
25438
25444
|
placeholder: "my-ai-project",
|
|
25439
25445
|
invalid: "That does not look like an app name — letters, numbers and dashes.",
|
|
25440
25446
|
value: t.appName,
|
|
25441
|
-
clean:
|
|
25442
|
-
preview:
|
|
25447
|
+
clean: W_,
|
|
25448
|
+
preview: G_,
|
|
25443
25449
|
onSave: (e) => n({ appName: e })
|
|
25444
25450
|
}),
|
|
25445
|
-
/* @__PURE__ */ q(
|
|
25451
|
+
/* @__PURE__ */ q(Tx, {
|
|
25446
25452
|
label: "My app is published",
|
|
25447
25453
|
onDone: () => f("published"),
|
|
25448
25454
|
waitingFor: t.appName ? void 0 : "Save your app name first — step 3 asks for this address."
|
|
25449
25455
|
})
|
|
25450
25456
|
]
|
|
25451
25457
|
}),
|
|
25452
|
-
s("connected").visible && /* @__PURE__ */ J(
|
|
25458
|
+
s("connected").visible && /* @__PURE__ */ J(wx, {
|
|
25453
25459
|
number: 2,
|
|
25454
25460
|
title: "Connect your website domain",
|
|
25455
25461
|
...m("connected"),
|
|
@@ -25463,9 +25469,9 @@ function Ox() {
|
|
|
25463
25469
|
" ",
|
|
25464
25470
|
"already. This step puts it on a domain of your own."
|
|
25465
25471
|
] }),
|
|
25466
|
-
/* @__PURE__ */ q(
|
|
25472
|
+
/* @__PURE__ */ q(Cx, { children: "Start the mapping" }),
|
|
25467
25473
|
/* @__PURE__ */ J("ol", {
|
|
25468
|
-
className:
|
|
25474
|
+
className: xx,
|
|
25469
25475
|
children: [
|
|
25470
25476
|
/* @__PURE__ */ J("li", { children: [
|
|
25471
25477
|
"Back where you published, click ",
|
|
@@ -25503,9 +25509,9 @@ function Ox() {
|
|
|
25503
25509
|
] })
|
|
25504
25510
|
]
|
|
25505
25511
|
}),
|
|
25506
|
-
/* @__PURE__ */ q(
|
|
25512
|
+
/* @__PURE__ */ q(Cx, { children: "Prove the domain is yours" }),
|
|
25507
25513
|
/* @__PURE__ */ J("ol", {
|
|
25508
|
-
className:
|
|
25514
|
+
className: xx,
|
|
25509
25515
|
children: [
|
|
25510
25516
|
/* @__PURE__ */ J("li", { children: [
|
|
25511
25517
|
"Google Search Console opens. Click ",
|
|
@@ -25516,7 +25522,7 @@ function Ox() {
|
|
|
25516
25522
|
] }),
|
|
25517
25523
|
/* @__PURE__ */ J("li", { children: [
|
|
25518
25524
|
"On the next screen, under ",
|
|
25519
|
-
/* @__PURE__ */ J("em", { children: ["Copy the TXT record below into the DNS configuration for ",
|
|
25525
|
+
/* @__PURE__ */ J("em", { children: ["Copy the TXT record below into the DNS configuration for ", K_(t.domain) || "myaiproject.com"] }),
|
|
25520
25526
|
", copy the",
|
|
25521
25527
|
" ",
|
|
25522
25528
|
/* @__PURE__ */ q("strong", { children: "TXT record" }),
|
|
@@ -25566,15 +25572,15 @@ function Ox() {
|
|
|
25566
25572
|
" button. It should say ",
|
|
25567
25573
|
/* @__PURE__ */ J("em", { children: [
|
|
25568
25574
|
"Your ownership of ",
|
|
25569
|
-
|
|
25575
|
+
K_(t.domain) || "myaiproject.com",
|
|
25570
25576
|
" has been successfully verified. You can now map this domain to your Cloud Run services."
|
|
25571
25577
|
] })
|
|
25572
25578
|
] })
|
|
25573
25579
|
]
|
|
25574
25580
|
}),
|
|
25575
|
-
/* @__PURE__ */ q(
|
|
25581
|
+
/* @__PURE__ */ q(Cx, { children: "Point the domain at your app" }),
|
|
25576
25582
|
/* @__PURE__ */ J("ol", {
|
|
25577
|
-
className:
|
|
25583
|
+
className: xx,
|
|
25578
25584
|
children: [/* @__PURE__ */ J("li", { children: [
|
|
25579
25585
|
"Add a subdomain if you want one, then click ",
|
|
25580
25586
|
/* @__PURE__ */ q("strong", { children: "Continue" }),
|
|
@@ -25594,12 +25600,12 @@ function Ox() {
|
|
|
25594
25600
|
children: "A records"
|
|
25595
25601
|
}), /* @__PURE__ */ q(m_, {
|
|
25596
25602
|
compact: !0,
|
|
25597
|
-
code:
|
|
25603
|
+
code: Ox.join("\n"),
|
|
25598
25604
|
label: "Copy all four"
|
|
25599
25605
|
})]
|
|
25600
25606
|
}), /* @__PURE__ */ q("div", {
|
|
25601
25607
|
className: "px-3.5 py-2.5 flex flex-col gap-1",
|
|
25602
|
-
children:
|
|
25608
|
+
children: Ox.map((e) => /* @__PURE__ */ q("span", {
|
|
25603
25609
|
className: "text-[12.5px] font-mono text-foreground/70",
|
|
25604
25610
|
children: e
|
|
25605
25611
|
}, e))
|
|
@@ -25619,24 +25625,24 @@ function Ox() {
|
|
|
25619
25625
|
}),
|
|
25620
25626
|
": when your published app comes up, it is connected."
|
|
25621
25627
|
] }),
|
|
25622
|
-
/* @__PURE__ */ q(
|
|
25628
|
+
/* @__PURE__ */ q(Ex, {
|
|
25623
25629
|
label: "Your domain",
|
|
25624
25630
|
hint: "However you have it — with or without https:// and www. Only the domain itself is kept, for step 3.",
|
|
25625
25631
|
placeholder: "myaiproject.com",
|
|
25626
25632
|
invalid: "That does not look like a domain — something like myaiproject.com.",
|
|
25627
25633
|
value: t.domain,
|
|
25628
|
-
clean:
|
|
25629
|
-
preview:
|
|
25634
|
+
clean: K_,
|
|
25635
|
+
preview: q_,
|
|
25630
25636
|
onSave: (e) => n({ domain: e })
|
|
25631
25637
|
}),
|
|
25632
|
-
/* @__PURE__ */ q(
|
|
25638
|
+
/* @__PURE__ */ q(Tx, {
|
|
25633
25639
|
label: "My domain is verified and my app is connected",
|
|
25634
25640
|
onDone: () => f("connected"),
|
|
25635
25641
|
waitingFor: t.domain ? void 0 : "Save your domain first — step 3 asks for this address."
|
|
25636
25642
|
})
|
|
25637
25643
|
]
|
|
25638
25644
|
}),
|
|
25639
|
-
s("authorised").visible && /* @__PURE__ */ J(
|
|
25645
|
+
s("authorised").visible && /* @__PURE__ */ J(wx, {
|
|
25640
25646
|
number: 3,
|
|
25641
25647
|
title: "Add your domains and email sender",
|
|
25642
25648
|
...m("authorised"),
|
|
@@ -25644,7 +25650,7 @@ function Ox() {
|
|
|
25644
25650
|
/* @__PURE__ */ J("p", { children: [
|
|
25645
25651
|
"Once your domain answers, head back to the",
|
|
25646
25652
|
" ",
|
|
25647
|
-
/* @__PURE__ */ q(
|
|
25653
|
+
/* @__PURE__ */ q(Sx, {
|
|
25648
25654
|
href: "https://console.firebase.google.com",
|
|
25649
25655
|
children: "Firebase console"
|
|
25650
25656
|
}),
|
|
@@ -25652,7 +25658,7 @@ function Ox() {
|
|
|
25652
25658
|
/* @__PURE__ */ q("strong", { children: "Security → Authentication" }),
|
|
25653
25659
|
"."
|
|
25654
25660
|
] }),
|
|
25655
|
-
/* @__PURE__ */ q(
|
|
25661
|
+
/* @__PURE__ */ q(Cx, { children: "Authorise both addresses" }),
|
|
25656
25662
|
/* @__PURE__ */ J("p", { children: [
|
|
25657
25663
|
"Nobody can sign in from an address Firebase does not know. Open",
|
|
25658
25664
|
" ",
|
|
@@ -25664,17 +25670,17 @@ function Ox() {
|
|
|
25664
25670
|
] }),
|
|
25665
25671
|
/* @__PURE__ */ J("div", {
|
|
25666
25672
|
className: "flex flex-col gap-2",
|
|
25667
|
-
children: [/* @__PURE__ */ q(
|
|
25673
|
+
children: [/* @__PURE__ */ q(Dx, {
|
|
25668
25674
|
label: "Your AI Studio address",
|
|
25669
|
-
url: c ? `${
|
|
25670
|
-
}), /* @__PURE__ */ q(
|
|
25675
|
+
url: c ? `${W_(t.appName)}.ai.studio` : "—"
|
|
25676
|
+
}), /* @__PURE__ */ q(Dx, {
|
|
25671
25677
|
label: "Your own domain",
|
|
25672
|
-
url:
|
|
25678
|
+
url: K_(t.domain) || "—"
|
|
25673
25679
|
})]
|
|
25674
25680
|
}),
|
|
25675
|
-
/* @__PURE__ */ q(
|
|
25681
|
+
/* @__PURE__ */ q(Cx, { children: "Send email from your own domain" }),
|
|
25676
25682
|
/* @__PURE__ */ J("ol", {
|
|
25677
|
-
className:
|
|
25683
|
+
className: xx,
|
|
25678
25684
|
children: [
|
|
25679
25685
|
/* @__PURE__ */ J("li", { children: [
|
|
25680
25686
|
"On the same Authentication page, open the ",
|
|
@@ -25699,13 +25705,13 @@ function Ox() {
|
|
|
25699
25705
|
]
|
|
25700
25706
|
}),
|
|
25701
25707
|
/* @__PURE__ */ q("p", { children: "This is what keeps your emails out of people's spam folders, and it is why they arrive looking like they came from you." }),
|
|
25702
|
-
/* @__PURE__ */ q(
|
|
25708
|
+
/* @__PURE__ */ q(Tx, {
|
|
25703
25709
|
label: "I've added my domains and verified my email domain",
|
|
25704
25710
|
onDone: () => f("authorised")
|
|
25705
25711
|
})
|
|
25706
25712
|
]
|
|
25707
25713
|
}),
|
|
25708
|
-
d && /* @__PURE__ */ J(
|
|
25714
|
+
d && /* @__PURE__ */ J(wx, {
|
|
25709
25715
|
number: 4,
|
|
25710
25716
|
title: "Finalise your Stripe live setup",
|
|
25711
25717
|
done: !1,
|
|
@@ -25739,9 +25745,9 @@ function Ox() {
|
|
|
25739
25745
|
children: [
|
|
25740
25746
|
l ? /* @__PURE__ */ J(K, { children: [
|
|
25741
25747
|
"Anyone can open ",
|
|
25742
|
-
/* @__PURE__ */ q(
|
|
25748
|
+
/* @__PURE__ */ q(Sx, {
|
|
25743
25749
|
href: l,
|
|
25744
|
-
children:
|
|
25750
|
+
children: K_(t.domain)
|
|
25745
25751
|
}),
|
|
25746
25752
|
" and sign up."
|
|
25747
25753
|
] }) : /* @__PURE__ */ q(K, { children: "Anyone can open your app and sign up." }),
|
|
@@ -25759,13 +25765,13 @@ function Ox() {
|
|
|
25759
25765
|
}
|
|
25760
25766
|
//#endregion
|
|
25761
25767
|
//#region src/pages/Dashboard.tsx
|
|
25762
|
-
var
|
|
25763
|
-
function
|
|
25764
|
-
let { user: e } = Or(), t = Re(), [n, r] = G(null), [i, a] = G(() => typeof window < "u" && !
|
|
25768
|
+
var Ax = { contentKey: "dashboard" };
|
|
25769
|
+
function jx() {
|
|
25770
|
+
let { user: e } = Or(), t = Re(), [n, r] = G(null), [i, a] = G(() => typeof window < "u" && !ax(Ax));
|
|
25765
25771
|
W(() => {
|
|
25766
|
-
if (
|
|
25772
|
+
if (ax(Ax)) return;
|
|
25767
25773
|
let e = !1;
|
|
25768
|
-
|
|
25774
|
+
cx(Ax).then((t) => {
|
|
25769
25775
|
e || (t && r(() => t), a(!1));
|
|
25770
25776
|
});
|
|
25771
25777
|
let t = setTimeout(() => {
|
|
@@ -25845,7 +25851,7 @@ function Ax() {
|
|
|
25845
25851
|
}
|
|
25846
25852
|
//#endregion
|
|
25847
25853
|
//#region src/App.tsx
|
|
25848
|
-
var
|
|
25854
|
+
var Mx = () => /* @__PURE__ */ J("div", {
|
|
25849
25855
|
className: "flex-1 flex flex-col items-center justify-center min-h-[60vh] z-10 animate-in fade-in duration-500",
|
|
25850
25856
|
children: [/* @__PURE__ */ q("div", {
|
|
25851
25857
|
className: "w-12 h-12 rounded-xl glass-panel border border-[var(--panel-border)] flex items-center justify-center mb-6 shadow-xl",
|
|
@@ -25858,9 +25864,9 @@ var jx = () => /* @__PURE__ */ J("div", {
|
|
|
25858
25864
|
})]
|
|
25859
25865
|
})]
|
|
25860
25866
|
});
|
|
25861
|
-
function
|
|
25867
|
+
function Nx({ level: e, children: t }) {
|
|
25862
25868
|
let { user: n, userRole: r, loading: i, userInactive: a, signOut: o, roleResolved: s } = Or(), c = Ia();
|
|
25863
|
-
return i || !s ? /* @__PURE__ */ q(
|
|
25869
|
+
return i || !s ? /* @__PURE__ */ q(Mx, {}) : n ? a ? /* @__PURE__ */ q(Yu, {
|
|
25864
25870
|
tone: "red",
|
|
25865
25871
|
title: "Access Denied",
|
|
25866
25872
|
message: "You don't have access to this app. Please contact the administrator.",
|
|
@@ -25874,34 +25880,34 @@ function Mx({ level: e, children: t }) {
|
|
|
25874
25880
|
replace: !0
|
|
25875
25881
|
});
|
|
25876
25882
|
}
|
|
25877
|
-
var
|
|
25883
|
+
var Px = ({ children: e }) => /* @__PURE__ */ q(Nx, {
|
|
25878
25884
|
level: "signed-in",
|
|
25879
25885
|
children: e
|
|
25880
|
-
}),
|
|
25886
|
+
}), Fx = ({ children: e }) => /* @__PURE__ */ q(Nx, {
|
|
25881
25887
|
level: "admin",
|
|
25882
25888
|
children: e
|
|
25883
|
-
}),
|
|
25889
|
+
}), Ix = ({ children: e }) => /* @__PURE__ */ q(Nx, {
|
|
25884
25890
|
level: "internal",
|
|
25885
25891
|
children: e
|
|
25886
25892
|
});
|
|
25887
|
-
function
|
|
25893
|
+
function Lx({ children: e }) {
|
|
25888
25894
|
let { user: t, loading: n, roleResolved: r } = Or(), [i] = za();
|
|
25889
|
-
return n || !r ? /* @__PURE__ */ q(
|
|
25895
|
+
return n || !r ? /* @__PURE__ */ q(Mx, {}) : t && t.emailVerified ? /* @__PURE__ */ q(Na, {
|
|
25890
25896
|
to: i.get("from") || "/dashboard",
|
|
25891
25897
|
replace: !0
|
|
25892
25898
|
}) : /* @__PURE__ */ q(K, { children: e });
|
|
25893
25899
|
}
|
|
25894
|
-
function
|
|
25900
|
+
function Rx({ children: e }) {
|
|
25895
25901
|
let { user: t, loading: n, roleResolved: r } = Or();
|
|
25896
|
-
return n || !r ? /* @__PURE__ */ q(
|
|
25902
|
+
return n || !r ? /* @__PURE__ */ q(Mx, {}) : t ? t.emailVerified ? /* @__PURE__ */ q(Na, { to: "/dashboard" }) : /* @__PURE__ */ q(K, { children: e }) : /* @__PURE__ */ q(Na, { to: "/" });
|
|
25897
25903
|
}
|
|
25898
|
-
function
|
|
25904
|
+
function zx({ to: e }) {
|
|
25899
25905
|
return /* @__PURE__ */ q(Na, {
|
|
25900
25906
|
to: `${e}${Ia().search}`,
|
|
25901
25907
|
replace: !0
|
|
25902
25908
|
});
|
|
25903
25909
|
}
|
|
25904
|
-
function
|
|
25910
|
+
function Bx() {
|
|
25905
25911
|
return /* @__PURE__ */ J("div", {
|
|
25906
25912
|
className: "fixed top-0 left-0 w-full h-full pointer-events-none -z-0 overflow-hidden",
|
|
25907
25913
|
children: [/* @__PURE__ */ q(U.div, {
|
|
@@ -25946,7 +25952,7 @@ function zx() {
|
|
|
25946
25952
|
})]
|
|
25947
25953
|
});
|
|
25948
25954
|
}
|
|
25949
|
-
function
|
|
25955
|
+
function Vx() {
|
|
25950
25956
|
let e = Re().components?.Home || Ro, t = La();
|
|
25951
25957
|
return /* @__PURE__ */ q(li, {
|
|
25952
25958
|
onSignedOut: () => t("/", { replace: !0 }),
|
|
@@ -25957,46 +25963,46 @@ function Bx() {
|
|
|
25957
25963
|
/* @__PURE__ */ J(Fa, { children: [
|
|
25958
25964
|
/* @__PURE__ */ q(Pa, {
|
|
25959
25965
|
path: "/",
|
|
25960
|
-
element: /* @__PURE__ */ q(
|
|
25966
|
+
element: /* @__PURE__ */ q(Lx, { children: /* @__PURE__ */ q("div", {
|
|
25961
25967
|
className: "fbos-home-slot contents",
|
|
25962
25968
|
children: /* @__PURE__ */ q(e, {})
|
|
25963
25969
|
}) })
|
|
25964
25970
|
}),
|
|
25965
25971
|
/* @__PURE__ */ q(Pa, {
|
|
25966
25972
|
path: "/register",
|
|
25967
|
-
element: /* @__PURE__ */ q(
|
|
25973
|
+
element: /* @__PURE__ */ q(Lx, { children: /* @__PURE__ */ q(Yo, {}) })
|
|
25968
25974
|
}),
|
|
25969
25975
|
/* @__PURE__ */ q(Pa, {
|
|
25970
25976
|
path: "/login",
|
|
25971
|
-
element: /* @__PURE__ */ q(
|
|
25977
|
+
element: /* @__PURE__ */ q(Lx, { children: /* @__PURE__ */ q(Xo, {}) })
|
|
25972
25978
|
}),
|
|
25973
25979
|
/* @__PURE__ */ q(Pa, {
|
|
25974
25980
|
path: "/reset-password",
|
|
25975
|
-
element: /* @__PURE__ */ q(
|
|
25981
|
+
element: /* @__PURE__ */ q(Lx, { children: /* @__PURE__ */ q(ms, {}) })
|
|
25976
25982
|
}),
|
|
25977
25983
|
/* @__PURE__ */ q(Pa, {
|
|
25978
25984
|
path: "/verify",
|
|
25979
|
-
element: /* @__PURE__ */ q(
|
|
25985
|
+
element: /* @__PURE__ */ q(Rx, { children: /* @__PURE__ */ q(Zo, {}) })
|
|
25980
25986
|
}),
|
|
25981
25987
|
/* @__PURE__ */ q(Pa, {
|
|
25982
25988
|
path: "/book/:id",
|
|
25983
|
-
element: /* @__PURE__ */ q(
|
|
25989
|
+
element: /* @__PURE__ */ q(gb, {})
|
|
25984
25990
|
}),
|
|
25985
25991
|
/* @__PURE__ */ q(Pa, {
|
|
25986
25992
|
path: "/meet/:id",
|
|
25987
|
-
element: /* @__PURE__ */ q(
|
|
25993
|
+
element: /* @__PURE__ */ q(Tb, {})
|
|
25988
25994
|
}),
|
|
25989
25995
|
/* @__PURE__ */ q(Pa, {
|
|
25990
25996
|
path: "/pay/:id",
|
|
25991
|
-
element: /* @__PURE__ */ q(
|
|
25997
|
+
element: /* @__PURE__ */ q(Db, {})
|
|
25992
25998
|
}),
|
|
25993
25999
|
/* @__PURE__ */ q(Pa, {
|
|
25994
26000
|
path: "/payment-complete",
|
|
25995
|
-
element: /* @__PURE__ */ q(
|
|
26001
|
+
element: /* @__PURE__ */ q(px, {})
|
|
25996
26002
|
}),
|
|
25997
26003
|
/* @__PURE__ */ q(Pa, {
|
|
25998
26004
|
path: "/payment-cancelled",
|
|
25999
|
-
element: /* @__PURE__ */ q(
|
|
26005
|
+
element: /* @__PURE__ */ q(px, { cancelled: !0 })
|
|
26000
26006
|
}),
|
|
26001
26007
|
/* @__PURE__ */ q(Pa, {
|
|
26002
26008
|
path: "/guide",
|
|
@@ -26032,35 +26038,35 @@ function Bx() {
|
|
|
26032
26038
|
}),
|
|
26033
26039
|
/* @__PURE__ */ q(Pa, {
|
|
26034
26040
|
path: "/users",
|
|
26035
|
-
element: /* @__PURE__ */ q(
|
|
26041
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(ic, {}) })
|
|
26036
26042
|
}),
|
|
26037
26043
|
/* @__PURE__ */ q(Pa, {
|
|
26038
26044
|
path: "/users/:id",
|
|
26039
|
-
element: /* @__PURE__ */ q(
|
|
26045
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(ic, {}) })
|
|
26040
26046
|
}),
|
|
26041
26047
|
/* @__PURE__ */ q(Pa, {
|
|
26042
26048
|
path: "/inbox",
|
|
26043
|
-
element: /* @__PURE__ */ q(
|
|
26049
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(yc, {}) })
|
|
26044
26050
|
}),
|
|
26045
26051
|
/* @__PURE__ */ q(Pa, {
|
|
26046
26052
|
path: "/payments",
|
|
26047
|
-
element: /* @__PURE__ */ q(
|
|
26053
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(Dv, {}) })
|
|
26048
26054
|
}),
|
|
26049
26055
|
/* @__PURE__ */ q(Pa, {
|
|
26050
26056
|
path: "/schedule",
|
|
26051
|
-
element: /* @__PURE__ */ q(
|
|
26057
|
+
element: /* @__PURE__ */ q(Ix, { children: /* @__PURE__ */ q(Qy, {}) })
|
|
26052
26058
|
}),
|
|
26053
26059
|
/* @__PURE__ */ q(Pa, {
|
|
26054
26060
|
path: "/my-calendar",
|
|
26055
|
-
element: /* @__PURE__ */ q(
|
|
26061
|
+
element: /* @__PURE__ */ q(zx, { to: "/schedule" })
|
|
26056
26062
|
}),
|
|
26057
26063
|
/* @__PURE__ */ q(Pa, {
|
|
26058
26064
|
path: "/my-bookings",
|
|
26059
|
-
element: /* @__PURE__ */ q(
|
|
26065
|
+
element: /* @__PURE__ */ q(Px, { children: /* @__PURE__ */ q($y, {}) })
|
|
26060
26066
|
}),
|
|
26061
26067
|
/* @__PURE__ */ q(Pa, {
|
|
26062
26068
|
path: "/email",
|
|
26063
|
-
element: /* @__PURE__ */ q(
|
|
26069
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(zb, {}) })
|
|
26064
26070
|
}),
|
|
26065
26071
|
/* @__PURE__ */ q(Pa, {
|
|
26066
26072
|
path: "/submissions",
|
|
@@ -26078,7 +26084,7 @@ function Bx() {
|
|
|
26078
26084
|
}),
|
|
26079
26085
|
/* @__PURE__ */ q(Pa, {
|
|
26080
26086
|
path: "/assets",
|
|
26081
|
-
element: /* @__PURE__ */ q(
|
|
26087
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(Dc, {}) })
|
|
26082
26088
|
}),
|
|
26083
26089
|
/* @__PURE__ */ q(Pa, {
|
|
26084
26090
|
path: "/drive/:rest",
|
|
@@ -26089,15 +26095,15 @@ function Bx() {
|
|
|
26089
26095
|
}),
|
|
26090
26096
|
/* @__PURE__ */ q(Pa, {
|
|
26091
26097
|
path: "/theme",
|
|
26092
|
-
element: /* @__PURE__ */ q(
|
|
26098
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(Ju, {}) })
|
|
26093
26099
|
}),
|
|
26094
26100
|
/* @__PURE__ */ q(Pa, {
|
|
26095
26101
|
path: "/pages/*",
|
|
26096
|
-
element: /* @__PURE__ */ q(
|
|
26102
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(cg, {}) })
|
|
26097
26103
|
}),
|
|
26098
26104
|
/* @__PURE__ */ q(Pa, {
|
|
26099
26105
|
path: "/forms/*",
|
|
26100
|
-
element: /* @__PURE__ */ q(
|
|
26106
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(Cg, {}) })
|
|
26101
26107
|
}),
|
|
26102
26108
|
/* @__PURE__ */ q(Pa, {
|
|
26103
26109
|
path: "/settings",
|
|
@@ -26108,55 +26114,55 @@ function Bx() {
|
|
|
26108
26114
|
}),
|
|
26109
26115
|
/* @__PURE__ */ q(Pa, {
|
|
26110
26116
|
path: "/profile",
|
|
26111
|
-
element: /* @__PURE__ */ q(
|
|
26117
|
+
element: /* @__PURE__ */ q(Px, { children: /* @__PURE__ */ q(ps, {}) })
|
|
26112
26118
|
}),
|
|
26113
26119
|
/* @__PURE__ */ q(Pa, {
|
|
26114
26120
|
path: "/billing",
|
|
26115
|
-
element: /* @__PURE__ */ q(
|
|
26121
|
+
element: /* @__PURE__ */ q(Px, { children: /* @__PURE__ */ q(yx, {}) })
|
|
26116
26122
|
}),
|
|
26117
26123
|
/* @__PURE__ */ q(Pa, {
|
|
26118
26124
|
path: "/dashboard",
|
|
26119
|
-
element: /* @__PURE__ */ q(
|
|
26125
|
+
element: /* @__PURE__ */ q(Px, { children: /* @__PURE__ */ q(jx, {}) })
|
|
26120
26126
|
}),
|
|
26121
26127
|
/* @__PURE__ */ q(Pa, {
|
|
26122
26128
|
path: "/publish",
|
|
26123
|
-
element: /* @__PURE__ */ q(
|
|
26129
|
+
element: /* @__PURE__ */ q(Fx, { children: /* @__PURE__ */ q(kx, {}) })
|
|
26124
26130
|
}),
|
|
26125
26131
|
/* @__PURE__ */ q(Pa, {
|
|
26126
26132
|
path: "/setup",
|
|
26127
|
-
element: /* @__PURE__ */ q(
|
|
26133
|
+
element: /* @__PURE__ */ q(D_, {})
|
|
26128
26134
|
}),
|
|
26129
26135
|
/* @__PURE__ */ q(Pa, {
|
|
26130
26136
|
path: "/setup/payments",
|
|
26131
|
-
element: /* @__PURE__ */ q(
|
|
26137
|
+
element: /* @__PURE__ */ q(xv, {})
|
|
26132
26138
|
}),
|
|
26133
26139
|
/* @__PURE__ */ q(Pa, {
|
|
26134
26140
|
path: "*",
|
|
26135
|
-
element: /* @__PURE__ */ q(
|
|
26141
|
+
element: /* @__PURE__ */ q(ux, {})
|
|
26136
26142
|
})
|
|
26137
26143
|
] }),
|
|
26138
|
-
/* @__PURE__ */ q(
|
|
26144
|
+
/* @__PURE__ */ q(Bx, {})
|
|
26139
26145
|
]
|
|
26140
26146
|
})
|
|
26141
26147
|
});
|
|
26142
26148
|
}
|
|
26143
|
-
function Vx() {
|
|
26144
|
-
return /* @__PURE__ */ q(Ma, { children: /* @__PURE__ */ q(Hx, {}) });
|
|
26145
|
-
}
|
|
26146
26149
|
function Hx() {
|
|
26150
|
+
return /* @__PURE__ */ q(Ma, { children: /* @__PURE__ */ q(Ux, {}) });
|
|
26151
|
+
}
|
|
26152
|
+
function Ux() {
|
|
26147
26153
|
let e = Re();
|
|
26148
|
-
return e.firebaseConfig && e.firebaseConfig.apiKey && e.firebaseConfig.apiKey.trim() !== "" && e.firebaseConfig.projectId && e.firebaseConfig.projectId.trim() !== "" || l_() ? /* @__PURE__ */ q(
|
|
26154
|
+
return e.firebaseConfig && e.firebaseConfig.apiKey && e.firebaseConfig.apiKey.trim() !== "" && e.firebaseConfig.projectId && e.firebaseConfig.projectId.trim() !== "" || l_() ? /* @__PURE__ */ q(Vx, {}) : /* @__PURE__ */ J("div", {
|
|
26149
26155
|
className: "min-h-screen relative flex flex-col overflow-x-hidden",
|
|
26150
26156
|
children: [
|
|
26151
26157
|
/* @__PURE__ */ q(Lo, { standalone: !0 }),
|
|
26152
|
-
/* @__PURE__ */ q(
|
|
26153
|
-
/* @__PURE__ */ q(
|
|
26158
|
+
/* @__PURE__ */ q(D_, { standalone: !0 }),
|
|
26159
|
+
/* @__PURE__ */ q(Bx, {})
|
|
26154
26160
|
]
|
|
26155
26161
|
});
|
|
26156
26162
|
}
|
|
26157
26163
|
//#endregion
|
|
26158
26164
|
//#region src/FirebaseOS.tsx
|
|
26159
|
-
function
|
|
26165
|
+
function Wx(e) {
|
|
26160
26166
|
Ya();
|
|
26161
26167
|
let t = e.firebaseConfig;
|
|
26162
26168
|
return t && t.apiKey && t.apiKey.trim() !== "" && t.projectId && t.projectId.trim() !== "" && We(t), /* @__PURE__ */ q(Me, {
|
|
@@ -26176,31 +26182,31 @@ function Ux(e) {
|
|
|
26176
26182
|
background: "var(--bg-gradient)",
|
|
26177
26183
|
color: "var(--fg-color)"
|
|
26178
26184
|
},
|
|
26179
|
-
children: /* @__PURE__ */ q(
|
|
26185
|
+
children: /* @__PURE__ */ q(Hx, {})
|
|
26180
26186
|
}) })
|
|
26181
26187
|
});
|
|
26182
26188
|
}
|
|
26183
26189
|
//#endregion
|
|
26184
26190
|
//#region src/microcomponents/registry.ts
|
|
26185
|
-
var
|
|
26186
|
-
for (let e in
|
|
26187
|
-
let t =
|
|
26191
|
+
var Gx = /* @__PURE__ */ Object.assign({}), Kx = {};
|
|
26192
|
+
for (let e in Gx) {
|
|
26193
|
+
let t = Gx[e];
|
|
26188
26194
|
if (!t?.default) continue;
|
|
26189
26195
|
let n = e.replace("./", "").replace(".tsx", "");
|
|
26190
26196
|
if (n === "registry") continue;
|
|
26191
26197
|
let r = n.replace(/Content$/, "").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
26192
|
-
|
|
26198
|
+
Kx[r] = t.default, Kx[r.replace(/_/g, "")] = t.default;
|
|
26193
26199
|
}
|
|
26194
26200
|
if (typeof window < "u") {
|
|
26195
26201
|
let e = window.__FBOS_MICROCOMPONENTS__ || {};
|
|
26196
26202
|
window.__FBOS_MICROCOMPONENTS__ = {
|
|
26197
|
-
...
|
|
26203
|
+
...Kx,
|
|
26198
26204
|
...e
|
|
26199
26205
|
};
|
|
26200
26206
|
}
|
|
26201
|
-
var
|
|
26207
|
+
var qx = (e, t) => {
|
|
26202
26208
|
let n = e.toLowerCase().replace(/[^a-z0-9]+/g, "_"), r = n.replace(/_/g, "");
|
|
26203
|
-
if (
|
|
26209
|
+
if (Kx[n] = t, Kx[r] = t, typeof window < "u") {
|
|
26204
26210
|
let e = window.__FBOS_MICROCOMPONENTS__ || {};
|
|
26205
26211
|
window.__FBOS_MICROCOMPONENTS__ = {
|
|
26206
26212
|
...e,
|
|
@@ -26208,7 +26214,7 @@ var Kx = (e, t) => {
|
|
|
26208
26214
|
[r]: t
|
|
26209
26215
|
};
|
|
26210
26216
|
}
|
|
26211
|
-
},
|
|
26217
|
+
}, Jx = ({ title: e, className: t, children: n, ...r }) => /* @__PURE__ */ J("div", {
|
|
26212
26218
|
className: vi("border border-[var(--panel-border)] bg-[var(--panel-bg)] px-5 py-4", t),
|
|
26213
26219
|
style: { borderRadius: "var(--card-radius, 1rem)" },
|
|
26214
26220
|
...r,
|
|
@@ -26217,10 +26223,10 @@ var Kx = (e, t) => {
|
|
|
26217
26223
|
children: e
|
|
26218
26224
|
}) : null, n]
|
|
26219
26225
|
});
|
|
26220
|
-
|
|
26226
|
+
Jx.displayName = "Card";
|
|
26221
26227
|
//#endregion
|
|
26222
26228
|
//#region src/components/SectionHeading.tsx
|
|
26223
|
-
var
|
|
26229
|
+
var Yx = ({ sub: e, className: t, children: n, ...r }) => /* @__PURE__ */ J("div", {
|
|
26224
26230
|
className: vi("mb-4", t),
|
|
26225
26231
|
children: [/* @__PURE__ */ q("h2", {
|
|
26226
26232
|
className: "text-xl md:text-2xl font-extrabold tracking-tight text-foreground",
|
|
@@ -26231,6 +26237,6 @@ var Jx = ({ sub: e, className: t, children: n, ...r }) => /* @__PURE__ */ J("div
|
|
|
26231
26237
|
children: e
|
|
26232
26238
|
}) : null]
|
|
26233
26239
|
});
|
|
26234
|
-
|
|
26240
|
+
Yx.displayName = "SectionHeading";
|
|
26235
26241
|
//#endregion
|
|
26236
|
-
export { ao as AdminNotifications, xn as Button,
|
|
26242
|
+
export { ao as AdminNotifications, xn as Button, Jx as Card, vs as ConfirmModal, ci as ContactPopup, oi as CustomSelect, fs as DashboardNav, iy as EventCard, Wx as FirebaseOS, yr as Input, mx as ManagePlanButton, Lo as Navbar, Eb as PayButton, Yi as PhoneInputField, Yx as SectionHeading, Gr as TimeChips, Dr as acceptBooking, k as auth, Ji as availableSlots, h as availableSlotsFor, Et as blockedWindows, it as bookingPath, Zn as cancelBooking, wo as confirmPayment, $r as dayBlocked, er as daysLine, C as db, Of as emailAnyone, Ef as emailOwner, Df as emailPerson, kf as emailStatus, bn as eventName, tn as hoursSummary, Pf as meetPath, $a as notify, j as oneEach, Co as openBillingPortal, Ke as partySlots, fr as payPath, qx as registerMicrocomponent, Pe as scheduleName, fe as scheduleTitle, Tt as slotsFor, xo as startCheckout, ur as storage, Se as timeZoneLabel, zt as togetherSlots, Or as useAuth, zn as useBookings, Re as useConfig, Qt as useMemberSchedules, ko as useMyPayments, Oo as usePaymentsEnabled, Ao as useSales, Mi as useTakenSlots, dt as useTeamHours, ir as useTheme };
|