your-ai-workflow-firebase-os 2.0.2 → 2.0.3
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/AccessNotice-BZ5Gt1nP.js +40 -0
- package/dist/AccessNotice-CN7kc70o.cjs +1 -0
- package/dist/{AddressField-B2YBRXcx.js → AddressField-9Sqn8TvC.js} +3 -3
- package/dist/{AddressField-BBv8NGX8.cjs → AddressField-B7wtV8yA.cjs} +1 -1
- package/dist/Assets-DBMwZ3bN.cjs +1 -0
- package/dist/Assets-DT-NU_WO.js +296 -0
- package/dist/Attachments-Bl9_dfsu.js +46 -0
- package/dist/Attachments-UVK9SRXf.cjs +1 -0
- package/dist/Billing-0RIHayHy.cjs +1 -0
- package/dist/Billing-FNE2r3_d.js +379 -0
- package/dist/BookingCalendar-BP5kiv3d.cjs +1 -0
- package/dist/BookingCalendar-DZ2fEFja.js +309 -0
- package/dist/Button-4lzOE31p.js +48 -0
- package/dist/Button-5DlB2MCi.cjs +1 -0
- package/dist/CalendarView-BimoXy_k.cjs +1 -0
- package/dist/CalendarView-D-ykjpvI.js +664 -0
- package/dist/ConfirmModal-Di9GR-vV.cjs +1 -0
- package/dist/ConfirmModal-gKQEpd4d.js +113 -0
- package/dist/ContactPopup-BXnHrRwl.js +1114 -0
- package/dist/ContactPopup-lxmRMoIa.cjs +1 -0
- package/dist/CopyLink-BpEQWmfI.cjs +1 -0
- package/dist/CopyLink-CBAVfcm1.js +43 -0
- package/dist/DashboardNav-CXa_ci-_.cjs +1 -0
- package/dist/DashboardNav-Dmn7PVSp.js +886 -0
- package/dist/EmailAdmin-CjN_rvxT.js +318 -0
- package/dist/EmailAdmin-lAEBdY1s.cjs +1 -0
- package/dist/EventCard-46EquygT.cjs +1 -0
- package/dist/EventCard-B6xD-mk3.js +97 -0
- package/dist/FileViewerPopup-CX-J75TM.js +1283 -0
- package/dist/FileViewerPopup-D8-MmIoS.cjs +3 -0
- package/dist/FormNote-BivRNA3J.js +50 -0
- package/dist/FormNote-BtdTGpml.cjs +1 -0
- package/dist/FormsAdmin-B5PBCG2W.js +812 -0
- package/dist/FormsAdmin-BQCULvi5.cjs +1 -0
- package/dist/Inbox-BPk2ZkE5.js +779 -0
- package/dist/Inbox-DNrcBx0o.cjs +3 -0
- package/dist/Loader-Bu89fsbB.cjs +1 -0
- package/dist/Loader-D4gwgBOq.js +32 -0
- package/dist/ManagePlanButton-B0dwqZBd.cjs +1 -0
- package/dist/ManagePlanButton-BSrOHYze.js +29 -0
- package/dist/MyBookings-6qr0GgzO.cjs +1 -0
- package/dist/MyBookings-BQjGM2LQ.js +113 -0
- package/dist/PageTitle-CZhgmmDT.cjs +3 -0
- package/dist/PageTitle-D93YCiN8.js +1606 -0
- package/dist/PagesAdmin-BcHIcqM5.cjs +34 -0
- package/dist/PagesAdmin-D69P9nRb.js +5802 -0
- package/dist/PagesAdmin-DNwZOKjA.cjs +1 -0
- package/dist/PagesAdmin-HUITEcHx.js +3 -0
- package/dist/PaymentsAdmin-C2iCI9qC.js +1291 -0
- package/dist/PaymentsAdmin-CoXi2vCm.cjs +2 -0
- package/dist/{PhoneInputField-B3P_vUDW.cjs → PhoneInputField-BEwYZMB7.cjs} +1 -1
- package/dist/{PhoneInputField-D3wWs-M8.js → PhoneInputField-BG0L2djE.js} +2 -2
- package/dist/PhoneInputField-DfOtCIH_.js +2 -0
- package/dist/{PhoneInputField-CdNTvWXQ.cjs → PhoneInputField-jhWvto8C.cjs} +1 -1
- package/dist/Popup-DHYGFl2-.cjs +1 -0
- package/dist/Popup-xROLytgr.js +142 -0
- package/dist/ProviderMark-BBfaM5Yl.js +52 -0
- package/dist/ProviderMark-xLkUN3Fx.cjs +1 -0
- package/dist/PublishApp-Bm-6r3Td.js +595 -0
- package/dist/PublishApp-D4XJUkJa.cjs +2 -0
- package/dist/Said-CoC15awL.js +94 -0
- package/dist/Said-IqCNofdh.cjs +1 -0
- package/dist/ScheduleAdmin-BKfQkrR8.js +1853 -0
- package/dist/ScheduleAdmin-DwK36GAZ.cjs +1 -0
- package/dist/SchedulePicker--urIH2Eb.js +112 -0
- package/dist/SchedulePicker-nmqzUnUH.cjs +1 -0
- package/dist/Setup-CHLgd-ag.js +849 -0
- package/dist/Setup-CaDranTm.cjs +1374 -0
- package/dist/SetupPayments-CVIwh1eQ.js +411 -0
- package/dist/SetupPayments-HNXWA25X.cjs +1 -0
- package/dist/SignInAdmin-C94-A-0w.cjs +4 -0
- package/dist/SignInAdmin-Yxgv_8U4.js +766 -0
- package/dist/SupportBar-CDT0HwdP.cjs +1 -0
- package/dist/SupportBar-CN_JGC-9.js +117 -0
- package/dist/SystemTabContent-L3vGGF3P.cjs +1 -0
- package/dist/SystemTabContent-QdxxLILE.js +35 -0
- package/dist/TemplateDrive-DV8zNjYe.cjs +1 -0
- package/dist/TemplateDrive-NJY_AAvV.js +1197 -0
- package/dist/ThemeAdmin-BzFjJkLg.js +269 -0
- package/dist/ThemeAdmin-DVnPNxe7.cjs +1 -0
- package/dist/ThemeAdmin-DY7Vc4Sj.cjs +3 -0
- package/dist/ThemeAdmin-DnC-D2N3.js +2 -0
- package/dist/{ContactPopup-Dsg2ntq3.js → TimeZoneField-DkI1Bkcz.js} +3191 -5322
- package/dist/TimeZoneField-qs7NPR30.cjs +12 -0
- package/dist/TransactionsAdmin-BsZ-oQWi.js +582 -0
- package/dist/TransactionsAdmin-CTSTiPld.cjs +1 -0
- package/dist/Trouble-9es_AI4F.cjs +1 -0
- package/dist/Trouble-oWt9fMsm.js +164 -0
- package/dist/Users-CTitWXyd.cjs +1 -0
- package/dist/Users-DJjQTWJF.js +1207 -0
- package/dist/aiModels-DIP9fn8T.cjs +1 -0
- package/dist/{aiModels-BHlEfuRJ.js → aiModels-DnDhNGup.js} +29 -61
- package/dist/arrivalRoads-BJ-35vkk.js +228 -0
- package/dist/arrivalRoads-qoU-B4jt.cjs +4 -0
- package/dist/{bake-BWG3y-15.cjs → bake-n2wyFw0B.cjs} +1 -1
- package/dist/{bake-BtYOG1Du.js → bake-naZeMu98.js} +1 -1
- package/dist/bookingPages-C7a3srPG.js +102 -0
- package/dist/bookingPages-DvbFbD9X.cjs +1 -0
- package/dist/components/CustomSelect.d.ts +7 -1
- package/dist/components/RegistrationFields.d.ts +6 -1
- package/dist/components/Reveal.d.ts +12 -0
- package/dist/components/ScrollToTop.d.ts +4 -0
- package/dist/contentFallback-C9MZjdq7.cjs +1 -0
- package/dist/contentFallback-CEDY0Pwp.js +96 -0
- package/dist/contentKey-Bwry4lDa.js +13 -0
- package/dist/contentKey-DJGYYnAE.cjs +1 -0
- package/dist/email-BfnZnMwD.cjs +1 -0
- package/dist/email-Ddj8Dlu6.js +58 -0
- package/dist/{fileBytes-BdwaFKRy.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
- package/dist/{fileBytes-DuW2K-H_.js → fileBytes-bjgvCfWu.js} +2 -2
- package/dist/forms-Bvx9HTM6.js +75 -0
- package/dist/forms-CmNeTETW.cjs +1 -0
- package/dist/lib/ThemeContext.d.ts +0 -14
- package/dist/lib/bareImgWatch.d.ts +6 -1
- package/dist/lib/localEdits.d.ts +2 -0
- package/dist/lib/paymentProducts.d.ts +8 -0
- package/dist/lib/payments.d.ts +11 -1
- package/dist/notices-B7iIrIEg.js +29 -0
- package/dist/notices-upMg8UVh.cjs +1 -0
- package/dist/openOnArrival-Buwqb86D.cjs +1 -0
- package/dist/openOnArrival-S2K6v-lB.js +35 -0
- package/dist/pageFiles--Ih60ITP.js +45 -0
- package/dist/pageFiles-UtBmlOcD.cjs +1 -0
- package/dist/pages/PagesAdmin.d.ts +69 -0
- package/dist/people-2jZE_pdI.js +102 -0
- package/dist/people-BpVvIr9-.cjs +1 -0
- package/dist/personName-CFw3pxuu.js +18 -0
- package/dist/personName-CbzN_i57.cjs +1 -0
- package/dist/publishSteps-C1cDFzzB.js +88 -0
- package/dist/publishSteps-SSm8afDw.cjs +1 -0
- package/dist/recordLock-DHVvI9bP.js +61 -0
- package/dist/recordLock-DWeIxiwh.cjs +1 -0
- package/dist/recordsKey-B7QrxdeU.cjs +1 -0
- package/dist/recordsKey-D5-wC0Aw.js +141 -0
- package/dist/registrationFields-CLeR2lQJ.js +181 -0
- package/dist/registrationFields-v4pOoRdn.cjs +1 -0
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/roles-D6VaHWfV.js +147 -0
- package/dist/roles-DQUFFBQe.cjs +1 -0
- package/dist/scheduleData-ATN8w5hI.js +727 -0
- package/dist/scheduleData-Cltj0ABZ.cjs +1 -0
- package/dist/server.cjs.js +6 -6
- package/dist/server.es.js +716 -715
- package/dist/serviceStatus-TQyZO_Y_.cjs +1 -0
- package/dist/serviceStatus-vS8AI7SZ.js +125 -0
- package/dist/tabAudience-BqpN6dsR.cjs +1 -0
- package/dist/tabAudience-CRyMvv0v.js +34 -0
- package/dist/transactions-BqMQDRx3.js +343 -0
- package/dist/transactions-CufFrdAM.cjs +1 -0
- package/dist/useIsPhone-BVGx_X3e.js +13 -0
- package/dist/useIsPhone-o63tNneA.cjs +1 -0
- package/dist/{validate-DzSJWuyL.js → validate-CmC_tLK-.js} +433 -351
- package/dist/validate-DZMwqSrb.cjs +103 -0
- package/dist/vite/validate.d.ts +14 -0
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/your-ai-workflow-firebase-os.cjs.js +15 -1431
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +8200 -32421
- package/package.json +1 -1
- package/src/index.css +122 -2
- package/dist/ContactPopup-IwBm-eqz.cjs +0 -12
- package/dist/PhoneInputField-CVamkTJg.js +0 -2
- package/dist/aiModels-BIhoTNH0.cjs +0 -1
- package/dist/validate-e48WXJdP.cjs +0 -103
- /package/dist/{address-DI1YaCI4.cjs → address-Bsb8COq2.cjs} +0 -0
- /package/dist/{address-Ca1h_UZX.js → address-C2bHNxJU.js} +0 -0
- /package/dist/{dist-BkUiTtIb.js → dist-DUPvBnOA.js} +0 -0
- /package/dist/{dist-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
- /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +0 -0
- /package/dist/{lucide-react-ehRy1vqS.js → lucide-react-CA7GD7Nv.js} +0 -0
- /package/dist/{mediaKind-dk396a03.cjs → mediaKind-D0MWyv6b.cjs} +0 -0
- /package/dist/{mediaKind-De2Cx_kB.js → mediaKind-DmKMsjeY.js} +0 -0
- /package/dist/{pdf-u73U7-6s.js → pdf-DRXcPGkr.js} +0 -0
- /package/dist/{pdf-B24jYmSf.cjs → pdf-jLjjhvjp.cjs} +0 -0
- /package/dist/{pdf.worker.min-BPOWx2_9.js → pdf.worker.min-CfKZezeM.js} +0 -0
- /package/dist/{pdf.worker.min-BvhEiZFe.cjs → pdf.worker.min-bLgNWd7w.cjs} +0 -0
- /package/dist/{verifiedAccount-C1iCxopN.js → verifiedAccount-DRbRFJ6H.js} +0 -0
- /package/dist/{verifiedAccount-D3OeaOBo.cjs → verifiedAccount-DScyKk96.cjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, t } from "./chunk-NnHqS4_Y.js";
|
|
2
|
-
import { o as n, r, s as i, t as a } from "./fileBytes-
|
|
2
|
+
import { o as n, r, s as i, t as a } from "./fileBytes-bjgvCfWu.js";
|
|
3
3
|
//#region node_modules/pdf-lib/node_modules/tslib/tslib.es6.js
|
|
4
4
|
var o = function(e, t) {
|
|
5
5
|
return o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { cn as e, ct as t, ka as n } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
import { useEffect as r, useState as i } from "react";
|
|
3
|
+
import { collection as a, deleteDoc as o, doc as s, onSnapshot as c, setDoc as l } from "firebase/firestore";
|
|
4
|
+
//#region src/lib/bookingPageShape.ts
|
|
5
|
+
var u = "sys_bookingpages", d = (e, t = "", n = "") => ({
|
|
6
|
+
id: e,
|
|
7
|
+
title: t,
|
|
8
|
+
intro: "",
|
|
9
|
+
photo: "",
|
|
10
|
+
schedules: [],
|
|
11
|
+
enabled: !0,
|
|
12
|
+
memberId: n,
|
|
13
|
+
createdAt: Date.now()
|
|
14
|
+
}), f = (e) => e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 48);
|
|
15
|
+
function p(e, t) {
|
|
16
|
+
let n = f(e) || "page";
|
|
17
|
+
if (!t.includes(n)) return n;
|
|
18
|
+
for (let e = 2;; e++) {
|
|
19
|
+
let r = `${n}-${e}`;
|
|
20
|
+
if (!t.includes(r)) return r;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
var m = (e) => `/meet/${e}`;
|
|
24
|
+
function h(e, t) {
|
|
25
|
+
let n = t && typeof t == "object" ? t : {};
|
|
26
|
+
return {
|
|
27
|
+
id: e,
|
|
28
|
+
title: String(n.title || ""),
|
|
29
|
+
intro: String(n.intro || ""),
|
|
30
|
+
photo: String(n.photo || ""),
|
|
31
|
+
schedules: Array.isArray(n.schedules) ? n.schedules.filter((e) => typeof e == "string" || typeof e == "number").map(String).filter(Boolean) : [],
|
|
32
|
+
enabled: n.enabled !== !1,
|
|
33
|
+
memberId: String(n.memberId || ""),
|
|
34
|
+
createdAt: Number(n.createdAt) || 0
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
var g = (e, t, n) => n ? e : e.filter((e) => !!t && e.memberId === t), _ = (e, t) => e.schedules.map((e) => t.find((t) => t.id === e)).filter((e) => !!e), v = (e, n) => _(e, n).filter(t), y = (e, t) => ({
|
|
38
|
+
...e,
|
|
39
|
+
schedules: e.schedules.includes(t) ? e.schedules.filter((e) => e !== t) : [...e.schedules, t]
|
|
40
|
+
});
|
|
41
|
+
function b(t, n) {
|
|
42
|
+
if (!t.title.trim()) return "Give the page a name — usually the name of whoever it is for.";
|
|
43
|
+
if (!t.schedules.length) return "Tick at least one meeting to offer on this page.";
|
|
44
|
+
if (!v(t, n).length) {
|
|
45
|
+
let r = _(t, n);
|
|
46
|
+
return r.length ? `${e(r[0])} is not taking bookings — switch it on above, or tick a different meeting.` : "The meetings picked for this page no longer exist — tick one that does.";
|
|
47
|
+
}
|
|
48
|
+
return "";
|
|
49
|
+
}
|
|
50
|
+
var x = (e) => e.title.trim() || "Booking page";
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/lib/bookingPages.ts
|
|
53
|
+
function S() {
|
|
54
|
+
let [e, t] = i({
|
|
55
|
+
loading: !0,
|
|
56
|
+
pages: []
|
|
57
|
+
});
|
|
58
|
+
return r(() => {
|
|
59
|
+
let e = c(a(n, u), (e) => {
|
|
60
|
+
let n = [];
|
|
61
|
+
e.forEach((e) => n.push(h(e.id, e.data()))), n.sort((e, t) => (e.createdAt || 0) - (t.createdAt || 0) || e.id.localeCompare(t.id)), t({
|
|
62
|
+
loading: !1,
|
|
63
|
+
pages: n
|
|
64
|
+
});
|
|
65
|
+
}, () => t({
|
|
66
|
+
loading: !1,
|
|
67
|
+
pages: []
|
|
68
|
+
}));
|
|
69
|
+
return () => e();
|
|
70
|
+
}, []), e;
|
|
71
|
+
}
|
|
72
|
+
async function C(e) {
|
|
73
|
+
try {
|
|
74
|
+
let { id: t, ...r } = e;
|
|
75
|
+
return await l(s(n, u, t), {
|
|
76
|
+
...r,
|
|
77
|
+
updatedAt: Date.now()
|
|
78
|
+
}), null;
|
|
79
|
+
} catch (e) {
|
|
80
|
+
return console.error("Could not save the booking page", e), "The page could not be saved — it is saved by whoever it belongs to, so make sure you are signed in as them or as an admin, and try again.";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function w(e) {
|
|
84
|
+
try {
|
|
85
|
+
return await o(s(n, u, e)), null;
|
|
86
|
+
} catch (e) {
|
|
87
|
+
return console.error("Could not remove the booking page", e), "It could not be removed — a page is removed by whoever it belongs to, or by an admin.";
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function T(e, t) {
|
|
91
|
+
if (e === t.id) return C(t);
|
|
92
|
+
let r = await C(t);
|
|
93
|
+
if (r) return r;
|
|
94
|
+
try {
|
|
95
|
+
await o(s(n, u, e));
|
|
96
|
+
} catch (e) {
|
|
97
|
+
return console.error("Could not remove the old booking page", e), "The page moved, but its old address is still live — remove it and try again.";
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { d as a, b as c, _ as d, f, S as i, m as l, p as m, T as n, v as o, y as p, C as r, x as s, w as t, g as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./TimeZoneField-qs7NPR30.cjs`);let t=require(`react`),n=require(`firebase/firestore`);var r=`sys_bookingpages`,i=(e,t=``,n=``)=>({id:e,title:t,intro:``,photo:``,schedules:[],enabled:!0,memberId:n,createdAt:Date.now()}),a=e=>e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48);function o(e,t){let n=a(e)||`page`;if(!t.includes(n))return n;for(let e=2;;e++){let r=`${n}-${e}`;if(!t.includes(r))return r}}var s=e=>`/meet/${e}`;function c(e,t){let n=t&&typeof t==`object`?t:{};return{id:e,title:String(n.title||``),intro:String(n.intro||``),photo:String(n.photo||``),schedules:Array.isArray(n.schedules)?n.schedules.filter(e=>typeof e==`string`||typeof e==`number`).map(String).filter(Boolean):[],enabled:n.enabled!==!1,memberId:String(n.memberId||``),createdAt:Number(n.createdAt)||0}}var l=(e,t,n)=>n?e:e.filter(e=>!!t&&e.memberId===t),u=(e,t)=>e.schedules.map(e=>t.find(t=>t.id===e)).filter(e=>!!e),d=(t,n)=>u(t,n).filter(e.ct),f=(e,t)=>({...e,schedules:e.schedules.includes(t)?e.schedules.filter(e=>e!==t):[...e.schedules,t]});function p(t,n){if(!t.title.trim())return`Give the page a name — usually the name of whoever it is for.`;if(!t.schedules.length)return`Tick at least one meeting to offer on this page.`;if(!d(t,n).length){let r=u(t,n);return r.length?`${e.cn(r[0])} is not taking bookings — switch it on above, or tick a different meeting.`:`The meetings picked for this page no longer exist — tick one that does.`}return``}var m=e=>e.title.trim()||`Booking page`;function h(){let[i,a]=(0,t.useState)({loading:!0,pages:[]});return(0,t.useEffect)(()=>{let t=(0,n.onSnapshot)((0,n.collection)(e.ka,r),e=>{let t=[];e.forEach(e=>t.push(c(e.id,e.data()))),t.sort((e,t)=>(e.createdAt||0)-(t.createdAt||0)||e.id.localeCompare(t.id)),a({loading:!1,pages:t})},()=>a({loading:!1,pages:[]}));return()=>t()},[]),i}async function g(t){try{let{id:i,...a}=t;return await(0,n.setDoc)((0,n.doc)(e.ka,r,i),{...a,updatedAt:Date.now()}),null}catch(e){return console.error(`Could not save the booking page`,e),`The page could not be saved — it is saved by whoever it belongs to, so make sure you are signed in as them or as an admin, and try again.`}}async function _(t){try{return await(0,n.deleteDoc)((0,n.doc)(e.ka,r,t)),null}catch(e){return console.error(`Could not remove the booking page`,e),`It could not be removed — a page is removed by whoever it belongs to, or by an admin.`}}async function v(t,i){if(t===i.id)return g(i);let a=await g(i);if(a)return a;try{await(0,n.deleteDoc)((0,n.doc)(e.ka,r,t))}catch(e){return console.error(`Could not remove the old booking page`,e),`The page moved, but its old address is still live — remove it and try again.`}return null}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return l}});
|
|
@@ -50,6 +50,7 @@ interface CustomSelectProps {
|
|
|
50
50
|
* Where the list opens. The default `up` is what the form pop-up has always
|
|
51
51
|
* done (the select sits at the foot of a modal). `auto` measures the space
|
|
52
52
|
* under the trigger and flips only when it would run off the screen.
|
|
53
|
+
* Inside a <Popup> the default is `auto`: see `portal`.
|
|
53
54
|
*/
|
|
54
55
|
direction?: 'up' | 'down' | 'auto';
|
|
55
56
|
/**
|
|
@@ -57,6 +58,11 @@ interface CustomSelectProps {
|
|
|
57
58
|
* inside a collapsible row that clips its overflow while it animates, so an
|
|
58
59
|
* in-tree list is cut off at the row's edge. A portal draws it over
|
|
59
60
|
* everything, at the trigger's measured position.
|
|
61
|
+
*
|
|
62
|
+
* On by default inside a <Popup>. A page's window scrolls its own body, so
|
|
63
|
+
* an in-tree list that opened upward from the first field was cut off at
|
|
64
|
+
* the window's top edge — the arrow turned and no list appeared — and the
|
|
65
|
+
* page's own select passes neither prop (the contract's example doesn't).
|
|
60
66
|
*/
|
|
61
67
|
portal?: boolean;
|
|
62
68
|
/**
|
|
@@ -68,5 +74,5 @@ interface CustomSelectProps {
|
|
|
68
74
|
ariaLabel?: string;
|
|
69
75
|
className?: string;
|
|
70
76
|
}
|
|
71
|
-
export declare function CustomSelect({ value, options, onChange, label, disabled, variant, multiple, values, placeholder, footer, compact, dense, direction, portal, empty, ariaLabel, className, }: CustomSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
export declare function CustomSelect({ value, options, onChange, label, disabled, variant, multiple, values, placeholder, footer, compact, dense, direction: askedDirection, portal: askedPortal, empty, ariaLabel, className, }: CustomSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
72
78
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RegistrationField } from '../lib/registrationFields';
|
|
2
|
-
export declare function RegistrationFields({ fields, values, errors, profile, disabled, onChange, }: {
|
|
2
|
+
export declare function RegistrationFields({ fields, values, errors, profile, disabled, onChange, onCommit, }: {
|
|
3
3
|
fields: RegistrationField[];
|
|
4
4
|
/** What is in the boxes right now, by key. */
|
|
5
5
|
values: Record<string, any>;
|
|
@@ -9,4 +9,9 @@ export declare function RegistrationFields({ fields, values, errors, profile, di
|
|
|
9
9
|
profile?: Record<string, any> | null;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
onChange: (key: string, value: string | boolean) => void;
|
|
12
|
+
/**
|
|
13
|
+
* This answer is finished with: save it. Left out on a screen that saves
|
|
14
|
+
* everything at once, which is every registration screen.
|
|
15
|
+
*/
|
|
16
|
+
onCommit?: (key: string) => void;
|
|
12
17
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* How a thing opens to its own height — a row's settings, a card's foot, a
|
|
4
|
+
* question's answers — everywhere in the app: the one timing, so a row on
|
|
5
|
+
* the Pages screen and one on the Forms screen open the same way. Given to
|
|
6
|
+
* `motion.div`'s `transition` beside `animate={{ height: 'auto' }}`. Left
|
|
7
|
+
* to its defaults, every screen opened at a different speed and one of them
|
|
8
|
+
* at a spring's.
|
|
9
|
+
*/
|
|
10
|
+
export declare const EXPAND: {
|
|
11
|
+
readonly duration: 0.3;
|
|
12
|
+
readonly ease: readonly [0.16, 1, 0.3, 1];
|
|
13
|
+
};
|
|
2
14
|
type RevealTag = 'div' | 'section' | 'article' | 'header' | 'footer' | 'aside' | 'li';
|
|
3
15
|
export interface RevealProps {
|
|
4
16
|
children?: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-CiTBaPhY.cjs`),t=require(`./TimeZoneField-qs7NPR30.cjs`),n=require(`./Trouble-9es_AI4F.cjs`);let r=require(`react`);r=e.a(r,1);let i=require(`react/jsx-runtime`);var a=`This screen stopped`,o=`Something went wrong while drawing this page. Nothing you have saved is affected — trying again usually puts it right.`,s=`This part stopped`,c=`One piece of this page could not be drawn. Everything else on the screen still works — try again, and reload the page if it keeps happening.`,l=6e3,u=2,d=class extends r.default.Component{state={error:null,attempt:0,failed:0};retriedAt=0;static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Your AI Firebase could not draw this screen`,e,t),this.retriedAt&&Date.now()-this.retriedAt<l&&this.setState(e=>({failed:e.failed+1}))}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&(this.setState({error:null,failed:0}),this.retriedAt=0)}tryAgain=()=>{this.retriedAt=Date.now(),this.setState(e=>({error:null,attempt:e.attempt+1}))};reload=()=>{if(this.props.reload){this.props.reload();return}typeof window<`u`&&window.location.reload()};render(){if(!this.state.error)return(0,i.jsx)(r.default.Fragment,{children:this.props.children},this.state.attempt);let e=this.props.size===`part`,l=t.wa(this.state.error),d=l.kind===`unknown`?{title:e?s:a,message:e?c:o}:void 0,f=this.state.failed<u;return(0,i.jsx)(n.t,{error:this.state.error,override:d,size:e?`part`:`page`,onRetry:f&&l.next!==`reload`?this.tryAgain:void 0,reload:this.reload})}},f=`/src/your-ai-workflow-firebase-os/microcomponents`,p=e=>(e||``).split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``),m=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toLowerCase();return[t,t.replace(/_/g,``)]},h=e=>{let t=[e?.contentKey,e?.tabName,e?.pageId,e?.pageName].filter(e=>typeof e==`string`&&e.trim()).map(e=>p(e)).filter(Boolean);return[...new Set(t)].map(e=>`${e}Content.tsx`)},g=e=>{if(typeof window>`u`)return!1;let t=window.__FBOS_MICROCOMPONENTS__;if(!t)return!1;let n=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);return[e?.contentKey,e?.tabName,e?.pageId,e?.pageName].filter(e=>typeof e==`string`&&e.trim()).some(e=>t[n(e)])},_=new Map,v=e=>{let t=_.get(e);return t||(t=import(`${f}/${e}`).then(e=>typeof e?.default==`function`||typeof e?.default==`object`?e.default:null).catch(()=>null),_.set(e,t)),t};async function y(e){if(typeof window>`u`||g(e))return null;for(let t of h(e)){let e=await v(t);if(!e)continue;let[n,r]=m(t.replace(/Content\.tsx$/,``)),i=window.__FBOS_MICROCOMPONENTS__||{};return window.__FBOS_MICROCOMPONENTS__={[n]:e,[r]:e,...i},e}return null}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return y}});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { wa as e } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
import { t } from "./Trouble-oWt9fMsm.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/AppCrash.tsx
|
|
6
|
+
var i = "This screen stopped", a = "Something went wrong while drawing this page. Nothing you have saved is affected — trying again usually puts it right.", o = "This part stopped", s = "One piece of this page could not be drawn. Everything else on the screen still works — try again, and reload the page if it keeps happening.", c = 6e3, l = 2, u = class extends n.Component {
|
|
7
|
+
state = {
|
|
8
|
+
error: null,
|
|
9
|
+
attempt: 0,
|
|
10
|
+
failed: 0
|
|
11
|
+
};
|
|
12
|
+
retriedAt = 0;
|
|
13
|
+
static getDerivedStateFromError(e) {
|
|
14
|
+
return { error: e };
|
|
15
|
+
}
|
|
16
|
+
componentDidCatch(e, t) {
|
|
17
|
+
console.error("Your AI Firebase could not draw this screen", e, t), this.retriedAt && Date.now() - this.retriedAt < c && this.setState((e) => ({ failed: e.failed + 1 }));
|
|
18
|
+
}
|
|
19
|
+
componentDidUpdate(e) {
|
|
20
|
+
this.state.error && e.resetKey !== this.props.resetKey && (this.setState({
|
|
21
|
+
error: null,
|
|
22
|
+
failed: 0
|
|
23
|
+
}), this.retriedAt = 0);
|
|
24
|
+
}
|
|
25
|
+
tryAgain = () => {
|
|
26
|
+
this.retriedAt = Date.now(), this.setState((e) => ({
|
|
27
|
+
error: null,
|
|
28
|
+
attempt: e.attempt + 1
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
reload = () => {
|
|
32
|
+
if (this.props.reload) {
|
|
33
|
+
this.props.reload();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
typeof window < "u" && window.location.reload();
|
|
37
|
+
};
|
|
38
|
+
render() {
|
|
39
|
+
if (!this.state.error) return /* @__PURE__ */ r(n.Fragment, { children: this.props.children }, this.state.attempt);
|
|
40
|
+
let c = this.props.size === "part", u = e(this.state.error), d = u.kind === "unknown" ? {
|
|
41
|
+
title: c ? o : i,
|
|
42
|
+
message: c ? s : a
|
|
43
|
+
} : void 0, f = this.state.failed < l;
|
|
44
|
+
return /* @__PURE__ */ r(t, {
|
|
45
|
+
error: this.state.error,
|
|
46
|
+
override: d,
|
|
47
|
+
size: c ? "part" : "page",
|
|
48
|
+
onRetry: f && u.next !== "reload" ? this.tryAgain : void 0,
|
|
49
|
+
reload: this.reload
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}, d = "/src/your-ai-workflow-firebase-os/microcomponents", f = (e) => (e || "").split(/[^a-zA-Z0-9]+/).filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(""), p = (e) => {
|
|
53
|
+
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
54
|
+
return [t, t.replace(/_/g, "")];
|
|
55
|
+
}, m = (e) => {
|
|
56
|
+
let t = [
|
|
57
|
+
e?.contentKey,
|
|
58
|
+
e?.tabName,
|
|
59
|
+
e?.pageId,
|
|
60
|
+
e?.pageName
|
|
61
|
+
].filter((e) => typeof e == "string" && e.trim()).map((e) => f(e)).filter(Boolean);
|
|
62
|
+
return [...new Set(t)].map((e) => `${e}Content.tsx`);
|
|
63
|
+
}, h = (e) => {
|
|
64
|
+
if (typeof window > "u") return !1;
|
|
65
|
+
let t = window.__FBOS_MICROCOMPONENTS__;
|
|
66
|
+
if (!t) return !1;
|
|
67
|
+
let n = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
|
|
68
|
+
return [
|
|
69
|
+
e?.contentKey,
|
|
70
|
+
e?.tabName,
|
|
71
|
+
e?.pageId,
|
|
72
|
+
e?.pageName
|
|
73
|
+
].filter((e) => typeof e == "string" && e.trim()).some((e) => t[n(e)]);
|
|
74
|
+
}, g = /* @__PURE__ */ new Map(), _ = (e) => {
|
|
75
|
+
let t = g.get(e);
|
|
76
|
+
return t || (t = import(
|
|
77
|
+
/* @vite-ignore */
|
|
78
|
+
`${d}/${e}`
|
|
79
|
+
).then((e) => typeof e?.default == "function" || typeof e?.default == "object" ? e.default : null).catch(() => null), g.set(e, t)), t;
|
|
80
|
+
};
|
|
81
|
+
async function v(e) {
|
|
82
|
+
if (typeof window > "u" || h(e)) return null;
|
|
83
|
+
for (let t of m(e)) {
|
|
84
|
+
let e = await _(t);
|
|
85
|
+
if (!e) continue;
|
|
86
|
+
let [n, r] = p(t.replace(/Content\.tsx$/, "")), i = window.__FBOS_MICROCOMPONENTS__ || {};
|
|
87
|
+
return window.__FBOS_MICROCOMPONENTS__ = {
|
|
88
|
+
[n]: e,
|
|
89
|
+
[r]: e,
|
|
90
|
+
...i
|
|
91
|
+
}, e;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { h as n, u as r, v as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/lib/contentKey.ts
|
|
2
|
+
var e = (e) => String(e ?? "").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, ""), t = () => (typeof window < "u" ? window.__FBOS_MICROCOMPONENTS__ : null) || null;
|
|
3
|
+
function n(n, r, i = t()) {
|
|
4
|
+
let a = [
|
|
5
|
+
n?.tabName || n?.pageName,
|
|
6
|
+
n?.pageId,
|
|
7
|
+
r,
|
|
8
|
+
n?.pageName
|
|
9
|
+
], o = [...new Set(a.map(e).filter(Boolean))];
|
|
10
|
+
return (i ? o.find((e) => !!i[e]) : void 0) || o[0] || e(r);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as n, n as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>String(e??``).toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``),t=()=>(typeof window<`u`?window.__FBOS_MICROCOMPONENTS__:null)||null;function n(n,r,i=t()){let a=[n?.tabName||n?.pageName,n?.pageId,r,n?.pageName],o=[...new Set(a.map(e).filter(Boolean))];return(i?o.find(e=>!!i[e]):void 0)||o[0]||e(r)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./TimeZoneField-qs7NPR30.cjs`);var t=`Could not reach the server. Check your connection and try again.`;async function n(n,r,i=!1){try{let t=i?await e.Oa?.currentUser?.getIdToken().catch(()=>null):null,a=await fetch(n,{method:`POST`,headers:{"Content-Type":`application/json`,...t?{Authorization:`Bearer ${t}`}:{}},body:JSON.stringify(r)}),o=await a.json().catch(()=>({}));return!a.ok||o?.success===!1?typeof o?.error==`string`&&o.error||`The email could not be sent.`:null}catch{return t}}function r(e,t={}){return n(`/api/email/notify`,{template:e,data:t})}function i(e,t,r,i={}){return n(`/api/email/send`,{template:e,collection:t,docId:r,data:i},!0)}function a(e,t,r,i={}){return n(`/api/email/compose`,{to:e,subject:t,message:r,...i},!0)}async function o(){try{let e=await(await fetch(`/api/email/status`)).json();return{configured:e?.configured===!0&&e?.enabled!==!1,from:e?.from??null,error:null}}catch{return{configured:!1,from:null,error:t}}}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Oa as e } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
//#region src/lib/email.ts
|
|
3
|
+
var t = "Could not reach the server. Check your connection and try again.";
|
|
4
|
+
async function n(n, r, i = !1) {
|
|
5
|
+
try {
|
|
6
|
+
let t = i ? await e?.currentUser?.getIdToken().catch(() => null) : null, a = await fetch(n, {
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: {
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
...t ? { Authorization: `Bearer ${t}` } : {}
|
|
11
|
+
},
|
|
12
|
+
body: JSON.stringify(r)
|
|
13
|
+
}), o = await a.json().catch(() => ({}));
|
|
14
|
+
return !a.ok || o?.success === !1 ? typeof o?.error == "string" && o.error || "The email could not be sent." : null;
|
|
15
|
+
} catch {
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function r(e, t = {}) {
|
|
20
|
+
return n("/api/email/notify", {
|
|
21
|
+
template: e,
|
|
22
|
+
data: t
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function i(e, t, r, i = {}) {
|
|
26
|
+
return n("/api/email/send", {
|
|
27
|
+
template: e,
|
|
28
|
+
collection: t,
|
|
29
|
+
docId: r,
|
|
30
|
+
data: i
|
|
31
|
+
}, !0);
|
|
32
|
+
}
|
|
33
|
+
function a(e, t, r, i = {}) {
|
|
34
|
+
return n("/api/email/compose", {
|
|
35
|
+
to: e,
|
|
36
|
+
subject: t,
|
|
37
|
+
message: r,
|
|
38
|
+
...i
|
|
39
|
+
}, !0);
|
|
40
|
+
}
|
|
41
|
+
async function o() {
|
|
42
|
+
try {
|
|
43
|
+
let e = await (await fetch("/api/email/status")).json();
|
|
44
|
+
return {
|
|
45
|
+
configured: e?.configured === !0 && e?.enabled !== !1,
|
|
46
|
+
from: e?.from ?? null,
|
|
47
|
+
error: null
|
|
48
|
+
};
|
|
49
|
+
} catch {
|
|
50
|
+
return {
|
|
51
|
+
configured: !1,
|
|
52
|
+
from: null,
|
|
53
|
+
error: t
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { o as i, r as n, i as r, a as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./mediaKind-
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./mediaKind-D0MWyv6b.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`);var r=[{id:`black`,label:`Black pen`,color:`#111827`,alpha:1,width:.0028},{id:`blue`,label:`Blue pen`,color:`#2563eb`,alpha:1,width:.0028},{id:`red`,label:`Red pen`,color:`#dc2626`,alpha:1,width:.0028},{id:`marker`,label:`Highlighter`,color:`#facc15`,alpha:.4,width:.016}],i=e=>r.find(t=>t.id===e)||r[0];function a(e,t,n,r){let a=i(t.ink),o=t.points;if(!(o.length<2)){e.save(),e.globalAlpha=a.alpha,e.strokeStyle=a.color,e.lineWidth=Math.max(1,a.width*n),e.lineCap=`round`,e.lineJoin=`round`,e.beginPath(),e.moveTo(o[0]*n,o[1]*r),o.length===2&&e.lineTo(o[0]*n+.01,o[1]*r);for(let t=2;t<o.length;t+=2)e.lineTo(o[t]*n,o[t+1]*r);e.stroke(),e.restore()}}function o({strokes:e,active:r,ink:i,onStroke:o}){let s=(0,t.useRef)(null),c=(0,t.useRef)(null),l=(0,t.useRef)(0),[u,d]=(0,t.useState)({w:0,h:0});(0,t.useLayoutEffect)(()=>{let e=s.current?.parentElement;if(!e)return;let t=()=>d({w:e.clientWidth,h:e.clientHeight});if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let f=(0,t.useCallback)(()=>{let t=s.current;if(!t||!u.w||!u.h)return;let n=window.devicePixelRatio||1,r=Math.round(u.w*n),i=Math.round(u.h*n);(t.width!==r||t.height!==i)&&(t.width=r,t.height=i);let o=t.getContext(`2d`);if(o){o.setTransform(n,0,0,n,0,0),o.clearRect(0,0,u.w,u.h);for(let t of e)a(o,t,u.w,u.h);c.current&&a(o,c.current,u.w,u.h)}},[e,u]);(0,t.useEffect)(f,[f]),(0,t.useEffect)(()=>()=>cancelAnimationFrame(l.current),[]);let p=()=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame(f)},m=e=>{let t=e.currentTarget.getBoundingClientRect();return[Math.min(1,Math.max(0,(e.clientX-t.left)/(t.width||1))),Math.min(1,Math.max(0,(e.clientY-t.top)/(t.height||1)))]},h=()=>{let e=c.current;c.current=null,e&&o(e)};return(0,n.jsx)(`canvas`,{ref:s,"aria-hidden":!r,className:`absolute inset-0 w-full h-full ${r?`cursor-crosshair touch-none`:`pointer-events-none`}`,onPointerDown:e=>{!r||e.button>0||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),c.current={ink:i,points:m(e)},p())},onPointerMove:e=>{c.current&&(c.current.points.push(...m(e)),p())},onPointerUp:h,onPointerCancel:h})}var s=null;function c(){return s||(s=(async()=>{let[e,t]=await Promise.all([Promise.resolve().then(()=>require(`./pdf-jLjjhvjp.cjs`)),Promise.resolve().then(()=>require(`./pdf.worker.min-bLgNWd7w.cjs`))]),n=e.GlobalWorkerOptions;if(!n.workerPort&&!n.workerSrc){let e=URL.createObjectURL(new Blob([t.default],{type:`text/javascript`}));n.workerSrc=e;try{n.workerPort=new Worker(e,{type:`module`})}catch{}}return e})(),s.catch(()=>{s=null})),s}var l=`/api/files/raw`,u=new Map,d=6;async function f(t){if(/^(blob|data):/i.test(t))return(await fetch(t)).blob();try{let e=await fetch(t,{mode:`cors`,credentials:`omit`});if(e.ok)return await e.blob()}catch{}if(e.c(t))try{let e=await fetch(`${l}?url=${encodeURIComponent(t)}`);if(e.ok&&e.headers.get(`x-fbos-file`)===`1`)return await e.blob()}catch{}throw Error(`This file cannot be read here.`)}function p(e){let t=u.get(e);if(t)return t;let n=f(e);for(u.set(e,n),n.catch(()=>u.delete(e));u.size>d;)u.delete(u.keys().next().value);return n}function m(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t||`file`,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),4e3)}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "./mediaKind-
|
|
1
|
+
import { c as e } from "./mediaKind-DmKMsjeY.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
3
3
|
import { jsx as o } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/media/DrawLayer.tsx
|
|
@@ -100,7 +100,7 @@ function u({ strokes: e, active: s, ink: c, onStroke: u }) {
|
|
|
100
100
|
var d = null;
|
|
101
101
|
function f() {
|
|
102
102
|
return d || (d = (async () => {
|
|
103
|
-
let [e, t] = await Promise.all([import("./pdf-
|
|
103
|
+
let [e, t] = await Promise.all([import("./pdf-DRXcPGkr.js"), import("./pdf.worker.min-CfKZezeM.js")]), n = e.GlobalWorkerOptions;
|
|
104
104
|
if (!n.workerPort && !n.workerSrc) {
|
|
105
105
|
let e = URL.createObjectURL(new Blob([t.default], { type: "text/javascript" }));
|
|
106
106
|
n.workerSrc = e;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { r as e } from "./chunk-NnHqS4_Y.js";
|
|
2
|
+
//#region src/configs/forms/contactForm.config.ts
|
|
3
|
+
var t = /* @__PURE__ */ e({ contactFormConfig: () => n }), n = {
|
|
4
|
+
systemName: "contact",
|
|
5
|
+
formType: "public",
|
|
6
|
+
redirectTo: "/",
|
|
7
|
+
title: "Get in Touch",
|
|
8
|
+
buttonName: "Contact Us",
|
|
9
|
+
submitText: "Send Message",
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
name: "name",
|
|
13
|
+
type: "text",
|
|
14
|
+
label: "Full Name",
|
|
15
|
+
placeholder: "John Doe",
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "email",
|
|
20
|
+
type: "email",
|
|
21
|
+
label: "Email Address",
|
|
22
|
+
placeholder: "john@example.com",
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "phone",
|
|
27
|
+
type: "tel",
|
|
28
|
+
label: "Phone Number",
|
|
29
|
+
placeholder: "+1 (555) 000-0000",
|
|
30
|
+
required: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "questions",
|
|
34
|
+
type: "textarea",
|
|
35
|
+
label: "Your Questions",
|
|
36
|
+
placeholder: "How can we help you?",
|
|
37
|
+
required: !0
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}, r = /* @__PURE__ */ e({ supportFormConfig: () => i }), i = {
|
|
41
|
+
systemName: "support",
|
|
42
|
+
formType: "private",
|
|
43
|
+
redirectTo: "/dashboard",
|
|
44
|
+
title: "Request Assistance",
|
|
45
|
+
buttonName: "Get Assistance",
|
|
46
|
+
submitText: "Submit Request",
|
|
47
|
+
fields: [
|
|
48
|
+
{
|
|
49
|
+
name: "topic",
|
|
50
|
+
type: "text",
|
|
51
|
+
label: "Topic",
|
|
52
|
+
placeholder: "E.g. Password reset issue",
|
|
53
|
+
required: !0
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "contactEmail",
|
|
57
|
+
type: "email",
|
|
58
|
+
label: "Contact Email",
|
|
59
|
+
placeholder: "your@email.com",
|
|
60
|
+
required: !0
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "description",
|
|
64
|
+
type: "textarea",
|
|
65
|
+
label: "Description",
|
|
66
|
+
placeholder: "Please describe your issue in detail...",
|
|
67
|
+
required: !0
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}, a = (e) => e?.formType === "private" || e?.submitPage === "requests" ? "user_requests" : "user_submissions", o = {
|
|
71
|
+
contact: n,
|
|
72
|
+
support: i
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
export { n as a, r as i, a as n, t as o, i as r, o as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-CiTBaPhY.cjs`);var t=e.r({contactFormConfig:()=>n}),n={systemName:`contact`,formType:`public`,redirectTo:`/`,title:`Get in Touch`,buttonName:`Contact Us`,submitText:`Send Message`,fields:[{name:`name`,type:`text`,label:`Full Name`,placeholder:`John Doe`,required:!0},{name:`email`,type:`email`,label:`Email Address`,placeholder:`john@example.com`,required:!0},{name:`phone`,type:`tel`,label:`Phone Number`,placeholder:`+1 (555) 000-0000`,required:!1},{name:`questions`,type:`textarea`,label:`Your Questions`,placeholder:`How can we help you?`,required:!0}]},r=e.r({supportFormConfig:()=>i}),i={systemName:`support`,formType:`private`,redirectTo:`/dashboard`,title:`Request Assistance`,buttonName:`Get Assistance`,submitText:`Submit Request`,fields:[{name:`topic`,type:`text`,label:`Topic`,placeholder:`E.g. Password reset issue`,required:!0},{name:`contactEmail`,type:`email`,label:`Contact Email`,placeholder:`your@email.com`,required:!0},{name:`description`,type:`textarea`,label:`Description`,placeholder:`Please describe your issue in detail...`,required:!0}]},a=e=>e?.formType===`private`||e?.submitPage===`requests`?`user_requests`:`user_submissions`,o={contact:n,support:i};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -25,20 +25,6 @@ interface ThemeContextType {
|
|
|
25
25
|
* left behind from a look that named a face this one does not.
|
|
26
26
|
*/
|
|
27
27
|
export declare function applyFonts(root: HTMLElement, fonts: ThemeFonts | undefined): void;
|
|
28
|
-
/**
|
|
29
|
-
* theme.config.ts is the whole theme.
|
|
30
|
-
*
|
|
31
|
-
* For a long time it was not. The owner's Theme screen saved hand-picked
|
|
32
|
-
* colours to Firestore at sys_configs/theme, and this provider merged them
|
|
33
|
-
* over the file — first always, then only until the file's colours moved.
|
|
34
|
-
* Two hands writing one theme is what every "nothing changed" report came
|
|
35
|
-
* down to: a pick saved weeks before outranked a look the assistant had just
|
|
36
|
-
* written, and a colour the file did not name showed factory purple on the
|
|
37
|
-
* screen that edited it. The hand editor is gone; the assistant writes the
|
|
38
|
-
* file, and every colour on the site comes from that file — the five per
|
|
39
|
-
* mode applied as written, the rest derived from them below unless the file
|
|
40
|
-
* names them too.
|
|
41
|
-
*/
|
|
42
28
|
export declare function ThemeProvider({ children, scopeSelector }: {
|
|
43
29
|
children: React.ReactNode;
|
|
44
30
|
scopeSelector?: string;
|
|
@@ -39,4 +39,9 @@ export declare function barePicturesIn(root: ParentNode): Set<BarePictureKind>;
|
|
|
39
39
|
*
|
|
40
40
|
* Hands back the way to stop.
|
|
41
41
|
*/
|
|
42
|
-
export declare function watchBarePictures(root: HTMLElement, report: (kind: BarePictureKind, message: string) => void
|
|
42
|
+
export declare function watchBarePictures(root: HTMLElement, report: (kind: BarePictureKind, message: string) => void,
|
|
43
|
+
/**
|
|
44
|
+
* What a kind is said once PER — the page's address, read when a picture
|
|
45
|
+
* is found. Left out, each kind is said once for as long as this watches.
|
|
46
|
+
*/
|
|
47
|
+
scope?: () => string): () => void;
|
|
@@ -218,6 +218,14 @@ export declare const BUYER_ANSWERS_RULE = "Who is paying is asked by the button
|
|
|
218
218
|
* see. Said on every payment, because it is the page that knows.
|
|
219
219
|
*/
|
|
220
220
|
export declare const PURCHASE_DETAILS_RULE = "Put what was bought into the button's metadata as well, whenever the page knows more than productName says \u2014 a basket, a chosen plan, options, a quantity, hours: items as one line per thing (quantity, name, the options chosen and its price \u2014 '2 \u00D7 Blazer, Noir Black, size M \u2014 240; 1 \u00D7 Belt \u2014 60', joined with '; '), total as the number charged, and delivery, discount or whatever else made up the amount under a key each. Every value a plain string under 500 characters, never an object or an array. My Transactions screen shows those under What they bought, so a payment there says what the money was for and not only how much.";
|
|
221
|
+
/** Words that say a one-off buys something the page then GIVES — credits, access, a download, a seat. */
|
|
222
|
+
export declare const ONCE_UNLOCK_WORDS: RegExp;
|
|
223
|
+
/**
|
|
224
|
+
* How a page learns what THIS buyer has bought once — the payments the app
|
|
225
|
+
* already keeps, by the product's name. Presentation, never protection: the
|
|
226
|
+
* same line a plan without a role gets, said for the thing bought once.
|
|
227
|
+
*/
|
|
228
|
+
export declare const onceUnlockRule: (names: string) => string;
|
|
221
229
|
/** Gating by plan is what a buyer SEES, never what protects the paid thing. */
|
|
222
230
|
export declare const GATING_RULE = "Show and hide what a plan unlocks with the app's own useMyPayments() \u2014 it returns { loading, active, subscriptions, payments } \u2014 and that is presentation, not protection: anything genuinely paid, like a file or a secret, must come from the server.";
|
|
223
231
|
/**
|
package/dist/lib/payments.d.ts
CHANGED
|
@@ -163,7 +163,17 @@ export declare function openBillingPortal(): Promise<string | null>;
|
|
|
163
163
|
* The browser arriving on the success page proves nothing — anyone can type
|
|
164
164
|
* that URL. Only `paid: true` from here means money moved.
|
|
165
165
|
*/
|
|
166
|
-
export declare function confirmPayment(sessionId: string
|
|
166
|
+
export declare function confirmPayment(sessionId: string,
|
|
167
|
+
/**
|
|
168
|
+
* `quiet`: a LOOK at an old payment, not a buyer arriving back from Stripe.
|
|
169
|
+
* The Schedule calendar asks about every paid booking on it; each paid
|
|
170
|
+
* answer used to tell the menu and the bell to ask the server again, so a
|
|
171
|
+
* calendar of a hundred paid bookings sent the bell to the server a
|
|
172
|
+
* hundred times on every open.
|
|
173
|
+
*/
|
|
174
|
+
options?: {
|
|
175
|
+
quiet?: boolean;
|
|
176
|
+
}): Promise<PaymentConfirmation>;
|
|
167
177
|
export interface PaymentsStatus {
|
|
168
178
|
configured: boolean;
|
|
169
179
|
mode: 'live' | 'test' | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Oa as e, ka as t } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
import { addDoc as n, collection as r } from "firebase/firestore";
|
|
3
|
+
//#region src/lib/notices.ts
|
|
4
|
+
var i = "user_notices";
|
|
5
|
+
async function a(a, o) {
|
|
6
|
+
let s = String(a || "").trim();
|
|
7
|
+
if (!s || !o?.title) {
|
|
8
|
+
console.warn("leaveNotice(): needs the uid of the person to tell and a title.", o);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
await n(r(t, i), {
|
|
13
|
+
uid: s,
|
|
14
|
+
kind: "notice",
|
|
15
|
+
title: o.title,
|
|
16
|
+
body: o.body || "",
|
|
17
|
+
link: o.link || "",
|
|
18
|
+
fromName: e.currentUser?.displayName || e.currentUser?.email || "",
|
|
19
|
+
createdAt: Date.now()
|
|
20
|
+
});
|
|
21
|
+
} catch (e) {
|
|
22
|
+
console.warn("leaveNotice(): the notice was not saved — only an admin may leave one.", e);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function o(e, t) {
|
|
26
|
+
for (let n of [...new Set(e.map((e) => String(e || "").trim()).filter(Boolean))]) await a(n, t);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as n, o as r, i as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./TimeZoneField-qs7NPR30.cjs`);let t=require(`firebase/firestore`);var n=`user_notices`;async function r(r,i){let a=String(r||``).trim();if(!a||!i?.title){console.warn(`leaveNotice(): needs the uid of the person to tell and a title.`,i);return}try{await(0,t.addDoc)((0,t.collection)(e.ka,n),{uid:a,kind:`notice`,title:i.title,body:i.body||``,link:i.link||``,fromName:e.Oa.currentUser?.displayName||e.Oa.currentUser?.email||``,createdAt:Date.now()})}catch(e){console.warn(`leaveNotice(): the notice was not saved — only an admin may leave one.`,e)}}async function i(e,t){for(let n of[...new Set(e.map(e=>String(e||``).trim()).filter(Boolean))])await r(n,t)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);let e=require(`react`);var t=320;function n(e){if(typeof document>`u`)return null;for(let t of document.querySelectorAll(`[data-ledger-row]`))if(t.getAttribute(`data-ledger-row`)===e)return t;return null}function r(r,i,a,o){let s=(0,e.useRef)({open:a,done:o});(0,e.useEffect)(()=>{s.current={open:a,done:o}});let c=(0,e.useRef)(void 0);(0,e.useEffect)(()=>()=>clearTimeout(c.current),[]),(0,e.useEffect)(()=>{if(!r||!i)return;s.current.open(r);let e=typeof window<`u`&&!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches;clearTimeout(c.current),c.current=setTimeout(()=>{let t=n(r);t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`start`,behavior:e?`auto`:`smooth`})},e?0:t),s.current.done?.()},[r,i])}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
//#region src/lib/openOnArrival.ts
|
|
3
|
+
var n = 320;
|
|
4
|
+
function r(e) {
|
|
5
|
+
if (typeof document > "u") return null;
|
|
6
|
+
for (let t of document.querySelectorAll("[data-ledger-row]")) if (t.getAttribute("data-ledger-row") === e) return t;
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
function i(i, a, o, s) {
|
|
10
|
+
let c = t({
|
|
11
|
+
open: o,
|
|
12
|
+
done: s
|
|
13
|
+
});
|
|
14
|
+
e(() => {
|
|
15
|
+
c.current = {
|
|
16
|
+
open: o,
|
|
17
|
+
done: s
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
let l = t(void 0);
|
|
21
|
+
e(() => () => clearTimeout(l.current), []), e(() => {
|
|
22
|
+
if (!i || !a) return;
|
|
23
|
+
c.current.open(i);
|
|
24
|
+
let e = typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches;
|
|
25
|
+
clearTimeout(l.current), l.current = setTimeout(() => {
|
|
26
|
+
let t = r(i);
|
|
27
|
+
t && typeof t.scrollIntoView == "function" && t.scrollIntoView({
|
|
28
|
+
block: "start",
|
|
29
|
+
behavior: e ? "auto" : "smooth"
|
|
30
|
+
});
|
|
31
|
+
}, e ? 0 : n), c.current.done?.();
|
|
32
|
+
}, [i, a]);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { i as t };
|