your-ai-workflow-firebase-os 2.0.1 → 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.
Files changed (183) hide show
  1. package/dist/AccessNotice-BZ5Gt1nP.js +40 -0
  2. package/dist/AccessNotice-CN7kc70o.cjs +1 -0
  3. package/dist/{AddressField-R-HvndkG.js → AddressField-9Sqn8TvC.js} +3 -3
  4. package/dist/{AddressField-BkzFOo2t.cjs → AddressField-B7wtV8yA.cjs} +1 -1
  5. package/dist/Assets-DBMwZ3bN.cjs +1 -0
  6. package/dist/Assets-DT-NU_WO.js +296 -0
  7. package/dist/Attachments-Bl9_dfsu.js +46 -0
  8. package/dist/Attachments-UVK9SRXf.cjs +1 -0
  9. package/dist/Billing-0RIHayHy.cjs +1 -0
  10. package/dist/Billing-FNE2r3_d.js +379 -0
  11. package/dist/BookingCalendar-BP5kiv3d.cjs +1 -0
  12. package/dist/BookingCalendar-DZ2fEFja.js +309 -0
  13. package/dist/Button-4lzOE31p.js +48 -0
  14. package/dist/Button-5DlB2MCi.cjs +1 -0
  15. package/dist/CalendarView-BimoXy_k.cjs +1 -0
  16. package/dist/CalendarView-D-ykjpvI.js +664 -0
  17. package/dist/ConfirmModal-Di9GR-vV.cjs +1 -0
  18. package/dist/ConfirmModal-gKQEpd4d.js +113 -0
  19. package/dist/ContactPopup-BXnHrRwl.js +1114 -0
  20. package/dist/ContactPopup-lxmRMoIa.cjs +1 -0
  21. package/dist/CopyLink-BpEQWmfI.cjs +1 -0
  22. package/dist/CopyLink-CBAVfcm1.js +43 -0
  23. package/dist/DashboardNav-CXa_ci-_.cjs +1 -0
  24. package/dist/DashboardNav-Dmn7PVSp.js +886 -0
  25. package/dist/EmailAdmin-CjN_rvxT.js +318 -0
  26. package/dist/EmailAdmin-lAEBdY1s.cjs +1 -0
  27. package/dist/EventCard-46EquygT.cjs +1 -0
  28. package/dist/EventCard-B6xD-mk3.js +97 -0
  29. package/dist/FileViewerPopup-CX-J75TM.js +1283 -0
  30. package/dist/FileViewerPopup-D8-MmIoS.cjs +3 -0
  31. package/dist/FormNote-BivRNA3J.js +50 -0
  32. package/dist/FormNote-BtdTGpml.cjs +1 -0
  33. package/dist/FormsAdmin-B5PBCG2W.js +812 -0
  34. package/dist/FormsAdmin-BQCULvi5.cjs +1 -0
  35. package/dist/Inbox-BPk2ZkE5.js +779 -0
  36. package/dist/Inbox-DNrcBx0o.cjs +3 -0
  37. package/dist/Loader-Bu89fsbB.cjs +1 -0
  38. package/dist/Loader-D4gwgBOq.js +32 -0
  39. package/dist/ManagePlanButton-B0dwqZBd.cjs +1 -0
  40. package/dist/ManagePlanButton-BSrOHYze.js +29 -0
  41. package/dist/MyBookings-6qr0GgzO.cjs +1 -0
  42. package/dist/MyBookings-BQjGM2LQ.js +113 -0
  43. package/dist/PageTitle-CZhgmmDT.cjs +3 -0
  44. package/dist/PageTitle-D93YCiN8.js +1606 -0
  45. package/dist/PagesAdmin-BcHIcqM5.cjs +34 -0
  46. package/dist/PagesAdmin-D69P9nRb.js +5802 -0
  47. package/dist/PagesAdmin-DNwZOKjA.cjs +1 -0
  48. package/dist/PagesAdmin-HUITEcHx.js +3 -0
  49. package/dist/PaymentsAdmin-C2iCI9qC.js +1291 -0
  50. package/dist/PaymentsAdmin-CoXi2vCm.cjs +2 -0
  51. package/dist/{PhoneInputField-B3P_vUDW.cjs → PhoneInputField-BEwYZMB7.cjs} +1 -1
  52. package/dist/{PhoneInputField-BlYHb5e0.js → PhoneInputField-BG0L2djE.js} +2 -2
  53. package/dist/PhoneInputField-DfOtCIH_.js +2 -0
  54. package/dist/{PhoneInputField-CdNTvWXQ.cjs → PhoneInputField-jhWvto8C.cjs} +1 -1
  55. package/dist/Popup-DHYGFl2-.cjs +1 -0
  56. package/dist/Popup-xROLytgr.js +142 -0
  57. package/dist/ProviderMark-BBfaM5Yl.js +52 -0
  58. package/dist/ProviderMark-xLkUN3Fx.cjs +1 -0
  59. package/dist/PublishApp-Bm-6r3Td.js +595 -0
  60. package/dist/PublishApp-D4XJUkJa.cjs +2 -0
  61. package/dist/Said-CoC15awL.js +94 -0
  62. package/dist/Said-IqCNofdh.cjs +1 -0
  63. package/dist/ScheduleAdmin-BKfQkrR8.js +1853 -0
  64. package/dist/ScheduleAdmin-DwK36GAZ.cjs +1 -0
  65. package/dist/SchedulePicker--urIH2Eb.js +112 -0
  66. package/dist/SchedulePicker-nmqzUnUH.cjs +1 -0
  67. package/dist/Setup-CHLgd-ag.js +849 -0
  68. package/dist/Setup-CaDranTm.cjs +1374 -0
  69. package/dist/SetupPayments-CVIwh1eQ.js +411 -0
  70. package/dist/SetupPayments-HNXWA25X.cjs +1 -0
  71. package/dist/SignInAdmin-C94-A-0w.cjs +4 -0
  72. package/dist/SignInAdmin-Yxgv_8U4.js +766 -0
  73. package/dist/SupportBar-CDT0HwdP.cjs +1 -0
  74. package/dist/SupportBar-CN_JGC-9.js +117 -0
  75. package/dist/SystemTabContent-L3vGGF3P.cjs +1 -0
  76. package/dist/SystemTabContent-QdxxLILE.js +35 -0
  77. package/dist/TemplateDrive-DV8zNjYe.cjs +1 -0
  78. package/dist/TemplateDrive-NJY_AAvV.js +1197 -0
  79. package/dist/ThemeAdmin-BzFjJkLg.js +269 -0
  80. package/dist/ThemeAdmin-DVnPNxe7.cjs +1 -0
  81. package/dist/ThemeAdmin-DY7Vc4Sj.cjs +3 -0
  82. package/dist/ThemeAdmin-DnC-D2N3.js +2 -0
  83. package/dist/{ContactPopup-9J_YeJrb.js → TimeZoneField-DkI1Bkcz.js} +3382 -5513
  84. package/dist/TimeZoneField-qs7NPR30.cjs +12 -0
  85. package/dist/TransactionsAdmin-BsZ-oQWi.js +582 -0
  86. package/dist/TransactionsAdmin-CTSTiPld.cjs +1 -0
  87. package/dist/Trouble-9es_AI4F.cjs +1 -0
  88. package/dist/Trouble-oWt9fMsm.js +164 -0
  89. package/dist/Users-CTitWXyd.cjs +1 -0
  90. package/dist/Users-DJjQTWJF.js +1207 -0
  91. package/dist/aiModels-DIP9fn8T.cjs +1 -0
  92. package/dist/{aiModels-BHlEfuRJ.js → aiModels-DnDhNGup.js} +29 -61
  93. package/dist/arrivalRoads-BJ-35vkk.js +228 -0
  94. package/dist/arrivalRoads-qoU-B4jt.cjs +4 -0
  95. package/dist/{bake-D0gLVNTL.cjs → bake-n2wyFw0B.cjs} +1 -1
  96. package/dist/{bake-OErV2MLy.js → bake-naZeMu98.js} +14 -14
  97. package/dist/bookingPages-C7a3srPG.js +102 -0
  98. package/dist/bookingPages-DvbFbD9X.cjs +1 -0
  99. package/dist/components/CustomSelect.d.ts +7 -1
  100. package/dist/components/RegistrationFields.d.ts +6 -1
  101. package/dist/components/Reveal.d.ts +12 -0
  102. package/dist/components/ScrollToTop.d.ts +4 -0
  103. package/dist/contentFallback-C9MZjdq7.cjs +1 -0
  104. package/dist/contentFallback-CEDY0Pwp.js +96 -0
  105. package/dist/contentKey-Bwry4lDa.js +13 -0
  106. package/dist/contentKey-DJGYYnAE.cjs +1 -0
  107. package/dist/{dist-_zWHDDrc.js → dist-DUPvBnOA.js} +1 -1
  108. package/dist/email-BfnZnMwD.cjs +1 -0
  109. package/dist/email-Ddj8Dlu6.js +58 -0
  110. package/dist/{fileBytes-B0qxHYQL.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
  111. package/dist/{fileBytes-uhq3pGCS.js → fileBytes-bjgvCfWu.js} +2 -2
  112. package/dist/forms-Bvx9HTM6.js +75 -0
  113. package/dist/forms-CmNeTETW.cjs +1 -0
  114. package/dist/lib/ThemeContext.d.ts +0 -14
  115. package/dist/lib/bareImgWatch.d.ts +6 -1
  116. package/dist/lib/localEdits.d.ts +2 -0
  117. package/dist/lib/pageDesignLines.d.ts +1 -1
  118. package/dist/lib/paymentProducts.d.ts +8 -0
  119. package/dist/lib/payments.d.ts +11 -1
  120. package/dist/lib/people.d.ts +9 -0
  121. package/dist/lib/recordsKey.d.ts +24 -0
  122. package/dist/{lucide-react-DiyP8FA_.js → lucide-react-CA7GD7Nv.js} +8 -8
  123. package/dist/notices-B7iIrIEg.js +29 -0
  124. package/dist/notices-upMg8UVh.cjs +1 -0
  125. package/dist/openOnArrival-Buwqb86D.cjs +1 -0
  126. package/dist/openOnArrival-S2K6v-lB.js +35 -0
  127. package/dist/pageFiles--Ih60ITP.js +45 -0
  128. package/dist/pageFiles-UtBmlOcD.cjs +1 -0
  129. package/dist/pages/PagesAdmin.d.ts +69 -7
  130. package/dist/{pdf-DLuvpvHg.js → pdf-DRXcPGkr.js} +1 -1
  131. package/dist/{pdf.worker.min-C0gkd2Ec.js → pdf.worker.min-CfKZezeM.js} +1 -1
  132. package/dist/people-2jZE_pdI.js +102 -0
  133. package/dist/people-BpVvIr9-.cjs +1 -0
  134. package/dist/personName-CFw3pxuu.js +18 -0
  135. package/dist/personName-CbzN_i57.cjs +1 -0
  136. package/dist/publishSteps-C1cDFzzB.js +88 -0
  137. package/dist/publishSteps-SSm8afDw.cjs +1 -0
  138. package/dist/recordLock-DHVvI9bP.js +61 -0
  139. package/dist/recordLock-DWeIxiwh.cjs +1 -0
  140. package/dist/recordsKey-B7QrxdeU.cjs +1 -0
  141. package/dist/recordsKey-D5-wC0Aw.js +141 -0
  142. package/dist/registrationFields-CLeR2lQJ.js +181 -0
  143. package/dist/registrationFields-v4pOoRdn.cjs +1 -0
  144. package/dist/renderer.cjs.js +1 -1
  145. package/dist/renderer.es.js +1 -1
  146. package/dist/roles-D6VaHWfV.js +147 -0
  147. package/dist/roles-DQUFFBQe.cjs +1 -0
  148. package/dist/scheduleData-ATN8w5hI.js +727 -0
  149. package/dist/scheduleData-Cltj0ABZ.cjs +1 -0
  150. package/dist/server.cjs.js +6 -6
  151. package/dist/server.es.js +716 -715
  152. package/dist/serviceStatus-TQyZO_Y_.cjs +1 -0
  153. package/dist/serviceStatus-vS8AI7SZ.js +125 -0
  154. package/dist/tabAudience-BqpN6dsR.cjs +1 -0
  155. package/dist/tabAudience-CRyMvv0v.js +34 -0
  156. package/dist/transactions-BqMQDRx3.js +343 -0
  157. package/dist/transactions-CufFrdAM.cjs +1 -0
  158. package/dist/useIsPhone-BVGx_X3e.js +13 -0
  159. package/dist/useIsPhone-o63tNneA.cjs +1 -0
  160. package/dist/{validate-DzSJWuyL.js → validate-CmC_tLK-.js} +433 -351
  161. package/dist/validate-DZMwqSrb.cjs +103 -0
  162. package/dist/vite/validate.d.ts +14 -0
  163. package/dist/vite.cjs.js +1 -1
  164. package/dist/vite.es.js +1 -1
  165. package/dist/your-ai-workflow-firebase-os.cjs.js +15 -1431
  166. package/dist/your-ai-workflow-firebase-os.css +1 -1
  167. package/dist/your-ai-workflow-firebase-os.es.js +11695 -35911
  168. package/package.json +1 -1
  169. package/src/index.css +122 -2
  170. package/dist/ContactPopup-DF8qQCoY.cjs +0 -12
  171. package/dist/PhoneInputField-Btx07xvM.js +0 -2
  172. package/dist/aiModels-BIhoTNH0.cjs +0 -1
  173. package/dist/validate-e48WXJdP.cjs +0 -103
  174. /package/dist/{address-DI1YaCI4.cjs → address-Bsb8COq2.cjs} +0 -0
  175. /package/dist/{address-Ca1h_UZX.js → address-C2bHNxJU.js} +0 -0
  176. /package/dist/{dist-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
  177. /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +0 -0
  178. /package/dist/{mediaKind-dk396a03.cjs → mediaKind-D0MWyv6b.cjs} +0 -0
  179. /package/dist/{mediaKind-De2Cx_kB.js → mediaKind-DmKMsjeY.js} +0 -0
  180. /package/dist/{pdf-CC5g01eC.cjs → pdf-jLjjhvjp.cjs} +0 -0
  181. /package/dist/{pdf.worker.min-pI_P-OCl.cjs → pdf.worker.min-bLgNWd7w.cjs} +0 -0
  182. /package/dist/{verifiedAccount-C1iCxopN.js → verifiedAccount-DRbRFJ6H.js} +0 -0
  183. /package/dist/{verifiedAccount-D3OeaOBo.cjs → verifiedAccount-DScyKk96.cjs} +0 -0
@@ -0,0 +1,1197 @@
1
+ import { t as e } from "./PageTitle-D93YCiN8.js";
2
+ import { Bn as t, In as n, Ln as r, Nn as i, Un as a, Wn as o, Yn as s, cr as c, dr as l, er as u, ja as d, ka as f, nr as p, sr as m, ya as h } from "./TimeZoneField-DkI1Bkcz.js";
3
+ import { t as ee } from "./DashboardNav-Dmn7PVSp.js";
4
+ import { C as te, O as g, g as _, i as ne } from "./verifiedAccount-DRbRFJ6H.js";
5
+ import { Bt as re, C as ie, Cn as ae, Ft as oe, G as se, Gt as ce, It as le, L as ue, Xt as de, Yt as fe, Z as pe, _t as me, bn as he, ht as ge, m as _e, o as ve, sn as ye } from "./lucide-react-CA7GD7Nv.js";
6
+ import { r as be } from "./contentFallback-CEDY0Pwp.js";
7
+ import { t as xe } from "./Button-4lzOE31p.js";
8
+ import { g as Se, h as Ce } from "./mediaKind-DmKMsjeY.js";
9
+ import { t as we } from "./FileViewerPopup-CX-J75TM.js";
10
+ import { t as Te } from "./ConfirmModal-gKQEpd4d.js";
11
+ import { i as v, n as Ee } from "./pageFiles--Ih60ITP.js";
12
+ import { s as y } from "./recordLock-DHVvI9bP.js";
13
+ import { n as De } from "./personName-CFw3pxuu.js";
14
+ import { createContext as b, useContext as x, useEffect as S, useLayoutEffect as Oe, useMemo as C, useRef as ke, useState as w, useSyncExternalStore as T } from "react";
15
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
16
+ import { addDoc as Ae, arrayRemove as k, arrayUnion as A, collection as j, deleteDoc as je, doc as M, limit as Me, onSnapshot as Ne, orderBy as Pe, query as N, serverTimestamp as Fe, setDoc as Ie, updateDoc as P, where as Le } from "firebase/firestore";
17
+ import { deleteObject as Re, getDownloadURL as F, ref as ze, uploadBytesResumable as I } from "firebase/storage";
18
+ import { Link as Be } from "react-router-dom";
19
+ //#region src/lib/cases.ts
20
+ var L = (e) => `uid:${String(e || "").trim()}`, R = (e) => `role:${g(String(e || ""))}`, z = (e, t) => [L(e), `role:${String(t || "user")}`], B = (e) => {
21
+ let t = String(e || "").trim().toLowerCase();
22
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t) ? `email:${t}` : "email:";
23
+ }, V = "everyone", H = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string" && e) : [], U = (e) => H(e?.access).includes(V), Ve = (e, t) => U(e) || H(e?.access).some((e) => t.includes(e)), He = (e, t) => H(e?.editors).some((e) => t.includes(e));
24
+ function Ue(e, { uid: t, editors: n = !0 }) {
25
+ let r = L(t), i = H(e.access), a = H(e.editors);
26
+ return {
27
+ ...e,
28
+ uid: e.uid || t,
29
+ access: i.includes(r) ? i : [...i, r],
30
+ editors: n && !a.includes(r) ? [...a, r] : a
31
+ };
32
+ }
33
+ var W = (e) => {
34
+ if (typeof e == "number") return Number.isFinite(e) ? e : 0;
35
+ if (e && typeof e.toMillis == "function") {
36
+ let t = e.toMillis();
37
+ return Number.isFinite(t) ? t : 0;
38
+ }
39
+ if (e && typeof e.seconds == "number") return e.seconds * 1e3;
40
+ if (typeof e == "string") {
41
+ let t = Date.parse(e);
42
+ return Number.isFinite(t) ? t : 0;
43
+ }
44
+ return 0;
45
+ }, We = (e, t) => W(t.createdAt) - W(e.createdAt) || e.id.localeCompare(t.id), G = (e, t) => ({
46
+ ...t,
47
+ id: e,
48
+ access: H(t?.access),
49
+ editors: H(t?.editors)
50
+ }), K = (e) => e?.code === "permission-denied" ? "These entries could not be read. The security rules may need pasting again from the Setup screen." : "These entries could not be read just now.";
51
+ function Ge(e, { max: t = 200, mine: n = !1 } = {}) {
52
+ let { user: r, userRole: i, isAdmin: a, roleConfirmed: o } = l(), s = r?.uid || "", c = r?.emailVerified ? B(r.email || "") : "email:", u = C(() => s ? [...z(s, i), ...c === "email:" ? [] : [c]] : [], [
53
+ s,
54
+ i,
55
+ c
56
+ ]), [d, p] = w({
57
+ loading: !0,
58
+ records: [],
59
+ error: "",
60
+ forUid: ""
61
+ });
62
+ return S(() => {
63
+ if (!s || !o || !_(e)) return;
64
+ let r = !0, i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = () => {
65
+ if (!r) return;
66
+ let e = /* @__PURE__ */ new Map();
67
+ for (let t of i.values()) for (let n of t) e.set(n.id, n);
68
+ p({
69
+ loading: !1,
70
+ records: [...e.values()].sort(We).slice(0, t),
71
+ error: [...c.values()][0] || "",
72
+ forUid: s
73
+ });
74
+ }, d = (e) => (t) => {
75
+ c.delete(e), i.set(e, t.docs.map((e) => G(e.id, e.data()))), l();
76
+ }, m = (e) => (t) => {
77
+ e.startsWith("email:") || e.startsWith("role:") ? i.set(e, []) : c.set(e, K(t)), l();
78
+ }, ee = a && !n ? [h(`${e}|all`, () => N(j(f, e)), d("all"), m("all"))] : u.map((t) => h(`${e}|${t}`, () => N(j(f, e), Le("access", "array-contains", t)), d(t), m(t)));
79
+ return () => {
80
+ r = !1, ee.forEach((e) => e());
81
+ };
82
+ }, [
83
+ e,
84
+ s,
85
+ u,
86
+ a,
87
+ n,
88
+ o,
89
+ t
90
+ ]), C(() => !s || !_(e) ? J(!1, [], "") : !o || d.forUid !== s ? J(!0, [], "") : J(d.loading, d.records, d.error), [
91
+ s,
92
+ o,
93
+ d,
94
+ e
95
+ ]);
96
+ }
97
+ var q = [
98
+ "list",
99
+ "cases",
100
+ "entries",
101
+ "items",
102
+ "data"
103
+ ];
104
+ function J(e, t, n) {
105
+ let r = {
106
+ loading: e,
107
+ records: t,
108
+ error: n
109
+ };
110
+ for (let e of q) Object.defineProperty(r, e, {
111
+ value: t,
112
+ enumerable: !1
113
+ });
114
+ return r;
115
+ }
116
+ function Y(e, { max: t = 200 } = {}) {
117
+ let { user: n, roleConfirmed: r } = l(), i = n?.uid || "", [a, o] = w({
118
+ loading: !0,
119
+ records: [],
120
+ error: "",
121
+ forUid: ""
122
+ });
123
+ return S(() => {
124
+ if (!i || !r || !_(e)) return;
125
+ let n = !0, a = h(`${e}|${V}`, () => N(j(f, e), Le("access", "array-contains", V)), (e) => {
126
+ n && o({
127
+ loading: !1,
128
+ records: e.docs.map((e) => G(e.id, e.data())).sort(We).slice(0, t),
129
+ error: "",
130
+ forUid: i
131
+ });
132
+ }, (e) => {
133
+ n && o({
134
+ loading: !1,
135
+ records: [],
136
+ error: K(e),
137
+ forUid: i
138
+ });
139
+ });
140
+ return () => {
141
+ n = !1, a();
142
+ };
143
+ }, [
144
+ e,
145
+ i,
146
+ r,
147
+ t
148
+ ]), C(() => !i || !_(e) ? J(!1, [], "") : !r || a.forUid !== i ? J(!0, [], "") : J(a.loading, a.records, a.error), [
149
+ i,
150
+ r,
151
+ a,
152
+ e
153
+ ]);
154
+ }
155
+ function X(e, t) {
156
+ let { user: n, roleConfirmed: r } = l(), i = n?.uid || "", [a, o] = w({
157
+ loading: !0,
158
+ record: null,
159
+ error: "",
160
+ forKey: ""
161
+ }), s = `${i}|${e}|${t}`;
162
+ return S(() => {
163
+ if (!i || !r || !_(e) || !t) return;
164
+ let n = !0, a = Ne(M(f, e, t), (e) => {
165
+ n && o({
166
+ loading: !1,
167
+ record: e.exists() ? G(e.id, e.data()) : null,
168
+ error: "",
169
+ forKey: s
170
+ });
171
+ }, (e) => {
172
+ n && o({
173
+ loading: !1,
174
+ record: null,
175
+ error: Q(e),
176
+ forKey: s
177
+ });
178
+ });
179
+ return () => {
180
+ n = !1, a();
181
+ };
182
+ }, [
183
+ e,
184
+ t,
185
+ i,
186
+ r,
187
+ s
188
+ ]), C(() => !i || !_(e) || !t ? Z(!1, null, "") : !r || a.forKey !== s ? Z(!0, null, "") : Z(a.loading, a.record, a.error), [
189
+ i,
190
+ r,
191
+ a,
192
+ e,
193
+ t,
194
+ s
195
+ ]);
196
+ }
197
+ var Ke = [
198
+ "entry",
199
+ "item",
200
+ "thing",
201
+ "data"
202
+ ];
203
+ function Z(e, t, n) {
204
+ let r = {
205
+ loading: e,
206
+ record: t,
207
+ error: n
208
+ };
209
+ for (let e of Ke) Object.defineProperty(r, e, {
210
+ value: t,
211
+ enumerable: !1
212
+ });
213
+ return r;
214
+ }
215
+ var Q = (e) => e?.code === "permission-denied" ? "This one has not been shared with you." : "This one could not be read just now.", qe = ({ people: e = [], roles: t = [] }) => {
216
+ let n = [...e.map(L), ...t.map(R)].filter((e) => e !== "uid:" && e !== "role:");
217
+ return [...new Set(n)];
218
+ }, Je = "Entries can only be sent on a page where each entry says who sees it.", Ye = (e) => e?.code === "permission-denied" ? "That entry is not yours to send on." : "That entry could not be sent on just now.";
219
+ async function Xe(e, t, n) {
220
+ if (!_(e)) return Je;
221
+ let r = qe(n);
222
+ if (!r.length || !t) return "";
223
+ try {
224
+ return await P(M(f, e, t), {
225
+ access: A(...r),
226
+ ...n.canEdit === !1 ? {} : { editors: A(...r) }
227
+ }), "";
228
+ } catch (e) {
229
+ return Ye(e);
230
+ }
231
+ }
232
+ async function Ze(e, t, n) {
233
+ if (!_(e)) return Je;
234
+ let r = qe(n);
235
+ if (!r.length || !t) return "";
236
+ try {
237
+ return await P(M(f, e, t), {
238
+ access: k(...r),
239
+ editors: k(...r)
240
+ }), "";
241
+ } catch (e) {
242
+ return Ye(e);
243
+ }
244
+ }
245
+ var Qe = "Only a page where each entry says who sees it can publish one.", $e = (e) => e?.code === "permission-denied" ? "That one is not yours to publish." : "That one could not be published just now.";
246
+ async function et(e, t) {
247
+ if (!_(e)) return Qe;
248
+ if (!t) return "";
249
+ try {
250
+ return await P(M(f, e, t), { access: A(V) }), "";
251
+ } catch (e) {
252
+ return $e(e);
253
+ }
254
+ }
255
+ async function tt(e, t) {
256
+ if (!_(e)) return Qe;
257
+ if (!t) return "";
258
+ try {
259
+ return await P(M(f, e, t), { access: k(V) }), "";
260
+ } catch (e) {
261
+ return $e(e);
262
+ }
263
+ }
264
+ var $ = ["waiting", "uploading"], nt = (e, t) => t.aborted || e?.code === "storage/canceled" || e?.name === "AbortError";
265
+ async function rt(e, t, { customMetadata: n, onProgress: r, signal: i } = {}) {
266
+ if (i?.aborted) throw Object.assign(/* @__PURE__ */ Error("The upload was stopped."), { code: "storage/canceled" });
267
+ let a = ze(d, e), o = I(a, t, s(e, n)), c = () => {
268
+ o.cancel();
269
+ };
270
+ i?.addEventListener("abort", c, { once: !0 });
271
+ let l;
272
+ try {
273
+ await new Promise((e, t) => {
274
+ o.on("state_changed", (e) => r?.(e.totalBytes ? e.bytesTransferred / e.totalBytes : 0), t, () => e());
275
+ }), r?.(1), l = await F(a);
276
+ } catch (e) {
277
+ throw i?.aborted && await it(a), e;
278
+ } finally {
279
+ i?.removeEventListener("abort", c);
280
+ }
281
+ if (i?.aborted) throw await it(a), Object.assign(/* @__PURE__ */ Error("The upload was stopped."), { code: "storage/canceled" });
282
+ return l;
283
+ }
284
+ var it = async (e) => {
285
+ try {
286
+ await Re(e);
287
+ } catch {}
288
+ };
289
+ function at(e, t) {
290
+ let n = e.flatMap((e, n) => t.has(e) ? [n] : []), r = n.map((t) => e[t]).sort((e, n) => t.get(e) - t.get(n)), i = [...e];
291
+ return n.forEach((e, t) => {
292
+ i[e] = r[t];
293
+ }), i;
294
+ }
295
+ var ot = 0, st = class {
296
+ items = [];
297
+ running = /* @__PURE__ */ new Map();
298
+ listeners = /* @__PURE__ */ new Set();
299
+ options;
300
+ constructor(e) {
301
+ this.options = e;
302
+ }
303
+ configure(e) {
304
+ this.options = e;
305
+ }
306
+ getItems = () => this.items;
307
+ subscribe = (e) => (this.listeners.add(e), () => {
308
+ this.listeners.delete(e);
309
+ });
310
+ commit(e) {
311
+ this.items = e, dt(this, this.options.stopOnUnmount ? e.filter((e) => $.includes(e.state)).length : 0), this.listeners.forEach((e) => e());
312
+ }
313
+ patch(e, t) {
314
+ let n;
315
+ return this.commit(this.items.map((r) => r.id === e ? n = {
316
+ ...r,
317
+ ...t
318
+ } : r)), n;
319
+ }
320
+ add(e, { start: t = !0 } = {}) {
321
+ let n = e.map((e) => ({
322
+ id: `upload_${++ot}`,
323
+ seq: ot,
324
+ file: e,
325
+ name: e.name,
326
+ state: t ? "waiting" : "ready",
327
+ progress: 0
328
+ }));
329
+ return n.length ? (this.commit([...this.items, ...n]), this.pump(), n) : n;
330
+ }
331
+ start() {
332
+ this.items.some((e) => e.state === "ready" || e.state === "failed") && (this.commit(this.items.map((e) => e.state === "ready" || e.state === "failed" ? {
333
+ ...e,
334
+ state: "waiting",
335
+ progress: 0,
336
+ error: void 0
337
+ } : e)), this.pump());
338
+ }
339
+ retry(e) {
340
+ this.items.find((t) => t.id === e)?.state === "failed" && (this.patch(e, {
341
+ state: "waiting",
342
+ progress: 0,
343
+ error: void 0
344
+ }), this.pump());
345
+ }
346
+ rename(e, t) {
347
+ let n = this.items.find((t) => t.id === e);
348
+ !n || n.state !== "ready" && n.state !== "failed" || this.patch(e, { name: t });
349
+ }
350
+ remove(e) {
351
+ this.running.get(e)?.abort(), this.running.delete(e), this.commit(this.items.filter((t) => t.id !== e)), this.pump();
352
+ }
353
+ stopAll() {
354
+ this.running.forEach((e) => e.abort()), this.running.clear(), this.commit(this.items.filter((e) => !$.includes(e.state)));
355
+ }
356
+ clear() {
357
+ this.commit(this.items.filter((e) => $.includes(e.state)));
358
+ }
359
+ pump() {
360
+ let e = Math.max(1, this.options.concurrency || 4);
361
+ for (let t of this.items) {
362
+ if (this.running.size >= e) break;
363
+ t.state !== "waiting" || this.running.has(t.id) || this.run(t);
364
+ }
365
+ }
366
+ run(e) {
367
+ let t = new AbortController();
368
+ this.running.set(e.id, t);
369
+ let n = this.patch(e.id, {
370
+ state: "uploading",
371
+ progress: 0
372
+ }), r = 0, i = (e) => {
373
+ if (t.signal.aborted) return;
374
+ let i = Math.min(1, Math.max(0, Math.round(e * 100) / 100));
375
+ i !== r && (r = i, this.patch(n.id, { progress: i }));
376
+ };
377
+ Promise.resolve().then(() => this.options.upload(n.file, {
378
+ item: n,
379
+ progress: i,
380
+ signal: t.signal
381
+ })).then((e) => {
382
+ if (t.signal.aborted) return;
383
+ let r = this.patch(n.id, {
384
+ state: "done",
385
+ progress: 1,
386
+ result: e
387
+ });
388
+ if (r) try {
389
+ this.options.onUploaded?.(e, r);
390
+ } catch (e) {
391
+ console.warn(`${n.file.name}: onUploaded threw`, e);
392
+ }
393
+ }, (e) => {
394
+ if (nt(e, t.signal)) return;
395
+ console.warn(`${n.file.name}: the upload did not work (${e?.code || e?.message || e}).`);
396
+ let r = this.patch(n.id, {
397
+ state: "failed",
398
+ error: o(e)
399
+ });
400
+ if (r) try {
401
+ this.options.onFailed?.(r);
402
+ } catch (e) {
403
+ console.warn(`${n.file.name}: onFailed threw`, e);
404
+ }
405
+ }).finally(() => {
406
+ this.running.get(n.id) === t && this.running.delete(n.id), this.pump(), !this.running.size && !this.items.some((e) => $.includes(e.state)) && this.options.onSettled?.(this.items);
407
+ });
408
+ }
409
+ }, ct = /* @__PURE__ */ new Map(), lt = 0, ut = /* @__PURE__ */ new Set();
410
+ function dt(e, t) {
411
+ let n = ct.get(e) || 0;
412
+ n !== t && (t ? ct.set(e, t) : ct.delete(e), lt += t - n, ut.forEach((e) => e()));
413
+ }
414
+ var ft = () => lt;
415
+ function pt(e) {
416
+ return ut.add(e), () => {
417
+ ut.delete(e);
418
+ };
419
+ }
420
+ var mt = () => T(pt, ft, () => 0);
421
+ function ht(e) {
422
+ let t = (t) => e.filter((e) => e.state === t).length, n = e.filter((e) => $.includes(e.state)), r = e.filter((e) => e.state !== "ready"), i = r.reduce((e, t) => e + (t.file.size || 1), 0), a = r.reduce((e, t) => e + (t.file.size || 1) * (t.state === "done" ? 1 : t.progress), 0);
423
+ return {
424
+ total: e.length,
425
+ ready: t("ready"),
426
+ waiting: t("waiting"),
427
+ uploading: t("uploading"),
428
+ done: t("done"),
429
+ failed: t("failed"),
430
+ active: n.length,
431
+ busy: n.length > 0,
432
+ progress: i ? a / i : 0
433
+ };
434
+ }
435
+ function gt(e) {
436
+ let [t] = w(() => new st(e));
437
+ Oe(() => {
438
+ t.configure(e);
439
+ });
440
+ let n = !!e.stopOnUnmount;
441
+ S(() => n ? () => t.stopAll() : void 0, [t, n]);
442
+ let r = T(t.subscribe, t.getItems, t.getItems), i = ht(r);
443
+ return S(() => {
444
+ if (!i.busy || typeof window > "u") return;
445
+ let e = (e) => {
446
+ e.preventDefault(), e.returnValue = "";
447
+ };
448
+ return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
449
+ }, [i.busy]), {
450
+ items: r,
451
+ ...i,
452
+ add: (e, n) => t.add(e, n),
453
+ start: () => t.start(),
454
+ retry: (e) => t.retry(e),
455
+ rename: (e, n) => t.rename(e, n),
456
+ remove: (e) => t.remove(e),
457
+ clear: () => t.clear()
458
+ };
459
+ }
460
+ var _t = `${r}/pages`, vt = `${n}/pages`, yt = b(null), bt = yt.Provider, xt = () => x(yt) || { prefix: "" };
461
+ function St({ prefix: e, shared: t = !1, internal: n = !1, collection: r = "", recordId: i = "" }) {
462
+ return !e || e === "pub_" ? vt : t ? n ? _t : vt : e === "case_" ? Ee(r, i) : v(e);
463
+ }
464
+ var Ct = (e, t = {}) => `${Date.now()}_${Math.random().toString(36).slice(2, 8)}_${Ce(t.width, t.height)}${(e || "file").replace(/[^a-zA-Z0-9.-]/g, "_")}`;
465
+ async function wt(e, { prefix: t, shared: n = !1, user: r, onProgress: i, signal: o, collection: s = "", recordId: c = "" }) {
466
+ let l = St({
467
+ prefix: t,
468
+ shared: n,
469
+ internal: !!r?.internal,
470
+ collection: s,
471
+ recordId: c
472
+ });
473
+ if (!l) throw Error("This page keeps files with the entry they belong to, and no entry was named.");
474
+ if (!r && l !== vt) throw Error("Sign in again before uploading.");
475
+ let d = await Se(e);
476
+ if (!r?.admin && d.size >= 10485760) throw Error("That file is over 10 MB. Try a smaller one.");
477
+ let f = await u(d), p = `${l}/${Ct(d.name, f)}`, m = await rt(p, d, {
478
+ customMetadata: r ? { ownerId: r.uid } : void 0,
479
+ onProgress: i,
480
+ signal: o
481
+ }), h = await a(p, d, r ? { ownerId: r.uid } : void 0);
482
+ return {
483
+ url: m,
484
+ storagePath: p,
485
+ name: d.name,
486
+ type: d.type || "",
487
+ size: d.size,
488
+ ...f.width && f.height ? {
489
+ width: f.width,
490
+ height: f.height
491
+ } : {},
492
+ ...h
493
+ };
494
+ }
495
+ async function Tt(e) {
496
+ try {
497
+ await Re(ze(d, e)), await t(e);
498
+ } catch (t) {
499
+ console.warn(`${e}: the upload was dropped but the file stayed (${t?.code || t}).`);
500
+ }
501
+ }
502
+ //#endregion
503
+ //#region src/templates/caseMode.ts
504
+ var Et = (e) => e === ne;
505
+ function Dt() {
506
+ let { user: e, userRole: t } = l(), n = e?.uid || "";
507
+ return C(() => n ? z(n, t) : [], [n, t]);
508
+ }
509
+ var Ot = (e) => {
510
+ try {
511
+ let t = M(j(f, e)).id;
512
+ if (t) return t;
513
+ } catch {}
514
+ return `rec_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
515
+ }, kt = (e, t, n) => Et(e) ? Ee(t, n || "") : v(e);
516
+ function At(e, t) {
517
+ return Ue({
518
+ createdAt: Date.now(),
519
+ ...e
520
+ }, { uid: t });
521
+ }
522
+ function jt(e, t, n, r = "") {
523
+ let i = t.find((e) => e.startsWith("role:"))?.slice(5) || null, a = (e) => n ? He(e, t) : !0;
524
+ return {
525
+ sendTo: (t, n) => Xe(e, t, n),
526
+ takeBack: (t, n) => Ze(e, t, n),
527
+ keys: t,
528
+ canEdit: a,
529
+ canDelete: (e) => a(e) && y(e, i),
530
+ publish: (t) => et(e, t),
531
+ unpublish: (t) => tt(e, t),
532
+ isPublished: (e) => n ? U(e) : !1,
533
+ draftId: n ? r : ""
534
+ };
535
+ }
536
+ //#endregion
537
+ //#region src/components/ViewingAs.tsx
538
+ var Mt = "user_profiles", Nt = "Viewing", Pt = "Everyone", Ft = (e) => {
539
+ let t = [];
540
+ return e.forEach((e) => {
541
+ let n = e.data() || {};
542
+ n.inactive === !0 || n.removed === !0 || t.push({
543
+ uid: e.id,
544
+ name: De(n)
545
+ });
546
+ }), t.sort((e, t) => e.name.localeCompare(t.name));
547
+ };
548
+ function It(e) {
549
+ let { isAdmin: t, roleConfirmed: n } = l(), [r, i] = w([]), a = e && t && n !== !1;
550
+ return S(() => {
551
+ if (!a) return;
552
+ let e = !0, t = h(Mt, () => j(f, Mt), (t) => {
553
+ e && i(Ft(t));
554
+ }, () => {
555
+ e && i([]);
556
+ });
557
+ return () => {
558
+ e = !1, t();
559
+ };
560
+ }, [a]), a ? r : [];
561
+ }
562
+ var Lt = "You are looking at somebody else’s page. Anything you add here is theirs, but a file would stay yours — so uploads are off until you switch back to your own.";
563
+ function Rt({ on: e, everyone: t = !0 }) {
564
+ let { user: n, isAdmin: r } = l(), i = n?.uid || "", a = It(e), [o, s] = w(""), c = e && r && a.length > 0, u = o && a.some((e) => e.uid === o), d = c && (u || o === "" && t) ? o : "", f = c && t && d === "", m = C(() => [...t ? [{
565
+ value: "",
566
+ label: Pt
567
+ }] : [], ...a.map((e) => ({
568
+ value: e.uid,
569
+ label: e.uid === i ? `${e.name} (you)` : e.name
570
+ }))], [
571
+ t,
572
+ a,
573
+ i
574
+ ]);
575
+ return {
576
+ uid: f ? "" : d || i,
577
+ everyone: f,
578
+ someoneElse: !!d && d !== i,
579
+ control: c ? /* @__PURE__ */ D(p, {
580
+ dense: !0,
581
+ compact: !0,
582
+ portal: !0,
583
+ direction: "auto",
584
+ className: "console-select",
585
+ ariaLabel: Nt,
586
+ value: d || (t ? "" : i),
587
+ options: m,
588
+ onChange: (e) => s(e)
589
+ }) : null
590
+ };
591
+ }
592
+ function zt({ viewing: e }) {
593
+ return e.control ? /* @__PURE__ */ O("div", {
594
+ className: "flex items-center gap-1.5 shrink-0",
595
+ children: [
596
+ /* @__PURE__ */ D(re, { className: "w-3.5 h-3.5 shrink-0 text-foreground/45" }),
597
+ /* @__PURE__ */ D("span", {
598
+ className: "text-[12.5px] font-semibold text-foreground/50 select-none whitespace-nowrap max-sm:hidden",
599
+ children: Nt
600
+ }),
601
+ e.control
602
+ ]
603
+ }) : null;
604
+ }
605
+ //#endregion
606
+ //#region src/components/BackArrow.tsx
607
+ var Bt = "inline-flex items-center justify-center w-9 h-9 rounded-full border border-[var(--panel-border)] text-foreground/50 hover:text-accent hover:bg-foreground/5 transition-colors shrink-0 cursor-pointer", Vt = ({ to: e }) => e ? /* @__PURE__ */ D(Be, {
608
+ to: e,
609
+ "aria-label": "Go back",
610
+ title: "Go back",
611
+ className: Bt,
612
+ children: /* @__PURE__ */ D(he, { className: "w-4 h-4" })
613
+ }) : /* @__PURE__ */ D("button", {
614
+ type: "button",
615
+ onClick: () => window.history.back(),
616
+ "aria-label": "Go back",
617
+ title: "Go back",
618
+ className: Bt,
619
+ children: /* @__PURE__ */ D(he, { className: "w-4 h-4" })
620
+ });
621
+ //#endregion
622
+ //#region src/components/media/LocalPicture.tsx
623
+ function Ht({ file: e, className: t, alt: n = "" }) {
624
+ let r = ke(null);
625
+ return S(() => {
626
+ if (!r.current || typeof URL.createObjectURL != "function") return;
627
+ let t = URL.createObjectURL(e);
628
+ return r.current.src = t, () => URL.revokeObjectURL(t);
629
+ }, [e]), /* @__PURE__ */ D("img", {
630
+ ref: r,
631
+ alt: n,
632
+ className: t
633
+ });
634
+ }
635
+ //#endregion
636
+ //#region src/templates/TemplateDrive.tsx
637
+ var Ut = (e) => {
638
+ if (!e) return "0 B";
639
+ let t = 1024, n = [
640
+ "B",
641
+ "KB",
642
+ "MB",
643
+ "GB"
644
+ ], r = Math.floor(Math.log(e) / Math.log(t));
645
+ return parseFloat((e / t ** +r).toFixed(2)) + " " + n[r];
646
+ }, Wt = 500;
647
+ function Gt({ title: n = "Drive", subtitle: r = "/drive", backUrl: a, filesCollection: o = "pub_files", config: s, customContent: u, footer: p, addition: h }) {
648
+ let { user: g, userRole: ne } = l(), re = !!s, he = ne === "admin", Ce = o, v = o.startsWith("user_"), y = _(o), De = Dt(), b = Rt({ on: o.startsWith("user_") && !_(o) }), x = Ge(o), [Oe, C] = w([]), [ke, T] = w(!0), k = y ? x.records.map((e) => ({
649
+ ...e,
650
+ _id: e.id
651
+ })) : Oe, A = y ? x.loading : ke, [F, I] = w(null), [L, R] = w(null), [z, B] = w(!1), [V, H] = w(null), [U, Ve] = w(null), [Ue, W] = w(!1), [We, G] = w(!1);
652
+ S(() => {
653
+ if (!(v && !g) && !y) return T(!0), Ne(v && !b.everyone ? N(j(f, o), Le("uid", "==", b.uid || g.uid), Me(Wt)) : N(j(f, o), Pe("createdAt", "desc"), Me(Wt)), (e) => {
654
+ let t = e.docs.map((e) => ({
655
+ _id: e.id,
656
+ ...e.data()
657
+ }));
658
+ t.sort((e, t) => (t.createdAt?.toMillis?.() || 0) - (e.createdAt?.toMillis?.() || 0)), C(t), T(!1);
659
+ }, (e) => {
660
+ console.warn(`Error listening to ${o}:`, e), T(!1);
661
+ });
662
+ }, [
663
+ o,
664
+ v,
665
+ g?.uid,
666
+ y,
667
+ b.uid,
668
+ b.everyone
669
+ ]);
670
+ let K = (e) => y ? He(e, De) : !!g && (e.uid === g.uid || he), q = gt({
671
+ upload: async (e, t) => {
672
+ if (!g) throw Error("Sign in again before uploading.");
673
+ let n = await Se(e), r = y ? Ot(o) : "", i = `${y ? Ee(o, r) : Ce}/${Ct(n.name)}`, a = await rt(i, n, {
674
+ customMetadata: { ownerId: g.uid },
675
+ onProgress: t.progress,
676
+ signal: t.signal
677
+ }), s = {
678
+ fileName: t.item.name.trim() || n.name,
679
+ fileType: n.type || "unknown",
680
+ fileSize: n.size,
681
+ downloadURL: a,
682
+ storagePath: i,
683
+ uid: g.uid,
684
+ uploaderEmail: g.email || ""
685
+ };
686
+ y ? await Ie(M(f, o, r), At(s, g.uid)) : await Ae(j(f, o), {
687
+ ...s,
688
+ createdAt: Fe()
689
+ });
690
+ },
691
+ onSettled: (e) => {
692
+ e.length && e.every((e) => e.state === "done") && (W(!1), q.clear());
693
+ }
694
+ }), J = q.total - q.ready, Y = (e) => {
695
+ if (!e || !g || b.someoneElse) return;
696
+ let t = Array.isArray(e) ? e : "length" in e ? Array.from(e) : [e];
697
+ t.length && (q.add(t, { start: !1 }), W(!0));
698
+ }, X = () => {
699
+ b.someoneElse || W(!0);
700
+ }, Ke = () => {
701
+ q.clear(), W(!1);
702
+ }, Z = (e) => {
703
+ let t = Array.from(e.target.files || []);
704
+ e.target.value = "", Y(t);
705
+ }, Q = q.done ? `${q.done} of ${J} uploaded` : `Uploading ${J === 1 ? "your file" : `${J} files`}`, qe = q.ready ? q.ready === 1 ? "Upload" : `Upload ${q.ready} files` : q.busy ? `${Q}…` : q.failed ? "Try again" : "Uploaded", Je = async () => {
706
+ if (L) {
707
+ B(!0);
708
+ try {
709
+ await Promise.all([
710
+ Re(ze(d, L.storagePath || L.downloadURL)).catch((e) => console.warn("Storage object missing:", e)),
711
+ t(L.storagePath || ""),
712
+ je(M(f, o, L._id))
713
+ ]), R(null);
714
+ } catch (e) {
715
+ console.error("Delete failed:", e);
716
+ }
717
+ B(!1);
718
+ }
719
+ }, Ye = async () => {
720
+ if (!V || !V.name.trim()) {
721
+ H(null);
722
+ return;
723
+ }
724
+ try {
725
+ await P(M(f, o, V.id), { fileName: V.name.trim() });
726
+ } catch (e) {
727
+ console.error("Rename failed:", e);
728
+ }
729
+ H(null);
730
+ }, Xe = (e, t) => {
731
+ navigator.clipboard.writeText(e), Ve(t), setTimeout(() => Ve(null), 2e3);
732
+ }, Ze = (e, t = "row") => {
733
+ let n = t === "card" ? "w-16 h-16" : "w-10 h-10", r = t === "card" ? "w-8 h-8" : "w-5 h-5";
734
+ return e.includes("video") || e.includes("audio") ? /* @__PURE__ */ D("div", {
735
+ className: `${n} flex items-center justify-center bg-accent/10 text-accent rounded-lg`,
736
+ children: /* @__PURE__ */ D(_e, { className: r })
737
+ }) : e.includes("pdf") || e.includes("word") || e.includes("text") ? /* @__PURE__ */ D("div", {
738
+ className: `${n} flex items-center justify-center bg-blue-500/10 text-blue-500 rounded-lg`,
739
+ children: /* @__PURE__ */ D(le, { className: r })
740
+ }) : e.includes("zip") || e.includes("rar") || e.includes("archive") ? /* @__PURE__ */ D("div", {
741
+ className: `${n} flex items-center justify-center bg-yellow-500/10 text-yellow-500 rounded-lg`,
742
+ children: /* @__PURE__ */ D(ae, { className: r })
743
+ }) : e.includes("html") || e.includes("csv") || e.includes("json") ? /* @__PURE__ */ D("div", {
744
+ className: `${n} flex items-center justify-center bg-emerald-500/10 text-emerald-500 rounded-lg`,
745
+ children: /* @__PURE__ */ D(fe, { className: r })
746
+ }) : /* @__PURE__ */ D("div", {
747
+ className: `${n} flex items-center justify-center bg-foreground/5 text-foreground/40 rounded-lg`,
748
+ children: /* @__PURE__ */ D(oe, { className: r })
749
+ });
750
+ };
751
+ return /* @__PURE__ */ O("main", {
752
+ className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 flex flex-col min-h-screen relative",
753
+ onDragOver: (e) => {
754
+ e.preventDefault(), G(!0);
755
+ },
756
+ onDragLeave: (e) => {
757
+ e.preventDefault(), G(!1);
758
+ },
759
+ onDrop: (e) => {
760
+ e.preventDefault(), G(!1), e.dataTransfer.files?.length && Y(e.dataTransfer.files);
761
+ },
762
+ children: [
763
+ /* @__PURE__ */ O(m.div, {
764
+ initial: {
765
+ opacity: 0,
766
+ y: 20
767
+ },
768
+ animate: {
769
+ opacity: 1,
770
+ y: 0
771
+ },
772
+ className: "mb-4 md:mb-6 flex items-center gap-3",
773
+ children: [!re && /* @__PURE__ */ D(Vt, { to: a }), /* @__PURE__ */ O("div", {
774
+ className: "min-w-0",
775
+ children: [/* @__PURE__ */ D(e, { children: n }), /* @__PURE__ */ O("div", {
776
+ className: "max-sm:hidden sm:flex items-center gap-2 text-foreground/40 font-bold uppercase tracking-[0.2em] text-[11px]",
777
+ children: [/* @__PURE__ */ D("span", { className: "w-8 h-[1px] bg-foreground/10" }), r]
778
+ })]
779
+ })]
780
+ }),
781
+ re && /* @__PURE__ */ D("div", {
782
+ className: "mb-6",
783
+ children: /* @__PURE__ */ D(ee, {})
784
+ }),
785
+ h && /* @__PURE__ */ D("div", {
786
+ className: "mb-6 empty:hidden",
787
+ children: h
788
+ }),
789
+ /* @__PURE__ */ O("div", {
790
+ className: "glass-panel border border-[var(--panel-border)] rounded-2xl md:rounded-3xl overflow-hidden flex-1 shadow-2xl min-h-[420px] md:min-h-[520px] mb-16 bg-background flex flex-col",
791
+ children: [/* @__PURE__ */ O("div", {
792
+ className: "p-4 md:p-8 flex items-center justify-between gap-3 md:gap-6 border-b border-[var(--panel-border)]/50 bg-background/50",
793
+ children: [/* @__PURE__ */ O("div", {
794
+ className: "min-w-0",
795
+ children: [/* @__PURE__ */ D("h2", {
796
+ className: "text-lg md:text-2xl font-bold text-foreground tracking-tight",
797
+ children: "Files"
798
+ }), /* @__PURE__ */ D("p", {
799
+ className: "max-sm:hidden text-[12px] md:text-[13px] mt-1 md:mt-2 text-foreground/60 font-medium",
800
+ children: b.someoneElse ? Lt : y ? "A file here is seen by the people it is sent to, and nobody else." : b.everyone ? "You are seeing everybody’s files. Anything you add is your own." : v ? "Only you can see the files you upload here." : "Everyone who can open this page can see these files."
801
+ })]
802
+ }), /* @__PURE__ */ O("div", {
803
+ className: "flex items-center gap-2 shrink-0",
804
+ children: [/* @__PURE__ */ D(zt, { viewing: b }), !u && !b.someoneElse && (g ? /* @__PURE__ */ O(xe, {
805
+ onClick: X,
806
+ title: q.busy ? Q : "Add files",
807
+ className: "flex items-center justify-center gap-2 w-9 h-9 p-0 sm:w-auto sm:h-auto sm:px-5 sm:py-2.5 rounded-xl text-[13px] font-bold shadow-md shrink-0",
808
+ children: [q.busy ? /* @__PURE__ */ D(ge, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ D(se, { className: "w-4 h-4" }), /* @__PURE__ */ D("span", {
809
+ className: "max-sm:hidden",
810
+ children: q.busy ? Q : "Add files"
811
+ })]
812
+ }) : /* @__PURE__ */ O(Be, {
813
+ to: "/login",
814
+ title: "Sign in to add files",
815
+ className: "btn-primary flex items-center justify-center gap-2 w-9 h-9 p-0 sm:w-auto sm:h-auto sm:px-5 sm:py-2.5 rounded-xl text-[13px] font-bold shadow-md shrink-0",
816
+ children: [
817
+ /* @__PURE__ */ D(se, { className: "w-4 h-4" }),
818
+ " ",
819
+ /* @__PURE__ */ D("span", {
820
+ className: "max-sm:hidden",
821
+ children: "Add files"
822
+ })
823
+ ]
824
+ }))]
825
+ })]
826
+ }), u ? /* @__PURE__ */ D(bt, {
827
+ value: {
828
+ prefix: te(s || {}),
829
+ collection: y ? o : "",
830
+ recordId: ""
831
+ },
832
+ children: /* @__PURE__ */ D("div", {
833
+ className: "fbos-content-slot fbos-tab-fill p-4 md:p-8 flex-1",
834
+ children: /* @__PURE__ */ D(be, {
835
+ size: "part",
836
+ children: /* @__PURE__ */ D(u, {
837
+ files: k,
838
+ loading: A,
839
+ error: y ? x.error : "",
840
+ user: g,
841
+ uploadFile: Y,
842
+ deleteFile: R,
843
+ openUploadModal: X,
844
+ viewFile: I,
845
+ config: s,
846
+ ...jt(o, De, y)
847
+ })
848
+ })
849
+ })
850
+ }) : /* @__PURE__ */ O("div", {
851
+ className: "p-4 sm:p-6 md:p-8 flex-1 relative",
852
+ children: [A && /* @__PURE__ */ D("div", {
853
+ className: "absolute inset-0 z-10 flex items-center justify-center bg-background/50 backdrop-blur-sm",
854
+ children: /* @__PURE__ */ D(ge, { className: "w-8 h-8 text-accent animate-spin" })
855
+ }), k.length > 0 ? /* @__PURE__ */ O("div", {
856
+ className: "grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 sm:gap-4",
857
+ children: [k.map((e) => /* @__PURE__ */ O("div", {
858
+ className: "flex flex-col bg-background border border-[var(--panel-border)] rounded-2xl hover:border-accent/40 transition-all group overflow-hidden shadow-sm h-[190px] relative",
859
+ children: [
860
+ /* @__PURE__ */ O("div", {
861
+ className: "absolute top-2 right-2 flex flex-col gap-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity z-10 bg-background/90 backdrop-blur-md rounded-lg p-1 border border-[var(--panel-border)] shadow-xl",
862
+ children: [
863
+ /* @__PURE__ */ D("a", {
864
+ href: e.downloadURL,
865
+ download: !0,
866
+ target: "_blank",
867
+ rel: "noreferrer",
868
+ className: "p-1.5 hover:bg-foreground/5 rounded-md text-foreground/60 hover:text-blue-500 transition-colors",
869
+ title: "Download",
870
+ children: /* @__PURE__ */ D(ce, { className: "w-4 h-4" })
871
+ }),
872
+ /* @__PURE__ */ D("button", {
873
+ onClick: (t) => {
874
+ t.stopPropagation(), Xe(e.downloadURL, e._id);
875
+ },
876
+ className: "p-1.5 hover:bg-foreground/5 rounded-md text-foreground/60 hover:text-emerald-500 transition-colors",
877
+ title: "Copy link",
878
+ children: U === e._id ? /* @__PURE__ */ D(ye, { className: "w-4 h-4 text-emerald-500" }) : /* @__PURE__ */ D(me, { className: "w-4 h-4" })
879
+ }),
880
+ K(e) && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("button", {
881
+ onClick: (t) => {
882
+ t.stopPropagation(), H({
883
+ id: e._id,
884
+ name: e.fileName
885
+ });
886
+ },
887
+ className: "p-1.5 hover:bg-foreground/5 rounded-md text-foreground/60 hover:text-accent transition-colors",
888
+ title: "Rename",
889
+ children: /* @__PURE__ */ D(pe, { className: "w-4 h-4" })
890
+ }), /* @__PURE__ */ D("button", {
891
+ onClick: (t) => {
892
+ t.stopPropagation(), R(e);
893
+ },
894
+ className: "p-1.5 hover:bg-red-500/10 rounded-md text-foreground/60 hover:text-red-500 transition-colors",
895
+ title: "Delete",
896
+ children: /* @__PURE__ */ D(ie, { className: "w-4 h-4" })
897
+ })] })
898
+ ]
899
+ }),
900
+ /* @__PURE__ */ D("div", {
901
+ className: "h-[120px] w-full border-b border-[var(--panel-border)]/50 bg-foreground/[0.02] flex items-center justify-center overflow-hidden relative cursor-pointer",
902
+ onClick: () => I(e),
903
+ children: e.fileType.startsWith("image/") ? /* @__PURE__ */ D(i, {
904
+ src: e.downloadURL,
905
+ small: e.smallURL,
906
+ medium: e.mediumURL,
907
+ alt: "",
908
+ fit: "contain",
909
+ className: "absolute inset-0",
910
+ imgClassName: "p-2"
911
+ }) : Ze(e.fileType, "card")
912
+ }),
913
+ /* @__PURE__ */ O("div", {
914
+ className: "p-3 flex flex-col justify-center flex-1 min-w-0",
915
+ onClick: () => !V && I(e),
916
+ children: [V?.id === e._id ? /* @__PURE__ */ D("input", {
917
+ autoFocus: !0,
918
+ type: "text",
919
+ value: V.name,
920
+ onChange: (e) => H({
921
+ ...V,
922
+ name: e.target.value
923
+ }),
924
+ onBlur: Ye,
925
+ onKeyDown: (e) => {
926
+ e.key === "Enter" && Ye(), e.key === "Escape" && H(null);
927
+ },
928
+ onClick: (e) => e.stopPropagation(),
929
+ className: "no-glow text-[12.5px] font-bold text-foreground bg-transparent border-b border-accent/30 outline-none pb-0.5 w-full"
930
+ }) : /* @__PURE__ */ D("span", {
931
+ className: "text-[12.5px] font-bold text-foreground truncate select-none group-hover:text-accent transition-colors",
932
+ title: e.fileName,
933
+ children: e.fileName
934
+ }), /* @__PURE__ */ D("span", {
935
+ className: "text-[11px] text-foreground/40 font-bold uppercase tracking-wider mt-1 select-none",
936
+ children: Ut(e.fileSize)
937
+ })]
938
+ })
939
+ ]
940
+ }, e._id)), k.length >= Wt && /* @__PURE__ */ O("p", {
941
+ className: "col-span-full text-[12px] font-medium text-foreground/45 text-center pt-2",
942
+ children: [
943
+ "Showing the ",
944
+ Wt,
945
+ " newest files. Older ones are still here — search or open them from a link."
946
+ ]
947
+ })]
948
+ }) : !A && /* @__PURE__ */ O("div", {
949
+ onClick: () => g && X(),
950
+ className: "min-h-[320px] flex flex-col items-center justify-center text-center cursor-pointer group",
951
+ children: [
952
+ /* @__PURE__ */ D(de, { className: "w-12 h-12 text-foreground/15 mb-4" }),
953
+ /* @__PURE__ */ D("p", {
954
+ className: "text-[20px] font-bold text-foreground/50 group-hover:text-foreground/70 transition-colors",
955
+ children: "No files yet"
956
+ }),
957
+ /* @__PURE__ */ D("p", {
958
+ className: "text-[13px] font-medium mt-1 text-foreground/40",
959
+ children: g ? "Click here or drag files in to upload" : "Sign in to upload files"
960
+ })
961
+ ]
962
+ })]
963
+ })]
964
+ }),
965
+ p,
966
+ /* @__PURE__ */ D(c, { children: Ue && /* @__PURE__ */ O("div", {
967
+ className: "fixed inset-0 z-[120] flex items-center justify-center p-4",
968
+ children: [/* @__PURE__ */ D(m.div, {
969
+ onClick: Ke,
970
+ initial: { opacity: 0 },
971
+ animate: { opacity: 1 },
972
+ exit: { opacity: 0 },
973
+ className: "absolute inset-0 bg-background/80 backdrop-blur-xl cursor-pointer"
974
+ }), /* @__PURE__ */ O(m.div, {
975
+ role: "dialog",
976
+ "aria-modal": "true",
977
+ "aria-label": "Upload files",
978
+ initial: {
979
+ opacity: 0,
980
+ scale: .95,
981
+ y: 10
982
+ },
983
+ animate: {
984
+ opacity: 1,
985
+ scale: 1,
986
+ y: 0
987
+ },
988
+ exit: {
989
+ opacity: 0,
990
+ scale: .95,
991
+ y: 10
992
+ },
993
+ className: "w-full max-w-[520px] max-h-[calc(100dvh-2rem)] border-[var(--panel-border)] border rounded-3xl relative z-10 glass-panel shadow-2xl flex flex-col bg-background",
994
+ children: [/* @__PURE__ */ O("div", {
995
+ className: "flex items-center justify-between p-4 md:p-6 border-b border-[var(--panel-border)]/50 shrink-0",
996
+ children: [/* @__PURE__ */ D("span", {
997
+ className: "text-[16px] font-extrabold text-foreground tracking-tight",
998
+ children: q.total > 1 ? `Upload ${q.total} files` : "Upload files"
999
+ }), /* @__PURE__ */ D("button", {
1000
+ onClick: Ke,
1001
+ "aria-label": "Close",
1002
+ className: "text-foreground/40 hover:text-foreground transition-colors",
1003
+ children: /* @__PURE__ */ D(ve, { className: "w-5 h-5" })
1004
+ })]
1005
+ }), q.total ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("ul", {
1006
+ className: "flex flex-col gap-2 p-4 md:p-6 overflow-y-auto min-h-0",
1007
+ children: q.items.map((e) => {
1008
+ let t = e.state === "waiting" || e.state === "uploading", n = e.state === "ready" || e.state === "failed";
1009
+ return /* @__PURE__ */ O("li", {
1010
+ className: "flex items-center gap-3 bg-foreground/[0.03] p-3 rounded-2xl border border-[var(--panel-border)]",
1011
+ children: [
1012
+ e.file.type.startsWith("image/") ? /* @__PURE__ */ D(Ht, {
1013
+ file: e.file,
1014
+ className: "w-10 h-10 shrink-0 rounded-lg object-cover bg-foreground/5"
1015
+ }) : Ze(e.file.type),
1016
+ /* @__PURE__ */ O("div", {
1017
+ className: "flex flex-col flex-1 min-w-0 gap-1",
1018
+ children: [n ? /* @__PURE__ */ D("input", {
1019
+ type: "text",
1020
+ value: e.name,
1021
+ onChange: (t) => q.rename(e.id, t.target.value),
1022
+ "aria-label": `Name for ${e.file.name}`,
1023
+ className: "no-glow w-full bg-transparent border-b border-transparent hover:border-[var(--panel-border)] focus:border-accent/50 outline-none text-[13px] font-bold text-foreground pb-0.5 transition-colors"
1024
+ }) : /* @__PURE__ */ D("span", {
1025
+ className: "text-[13px] font-bold text-foreground truncate pb-0.5",
1026
+ children: e.name
1027
+ }), t ? /* @__PURE__ */ D("span", {
1028
+ role: "progressbar",
1029
+ "aria-label": `Uploading ${e.name}`,
1030
+ "aria-valuemin": 0,
1031
+ "aria-valuemax": 100,
1032
+ "aria-valuenow": Math.round(e.progress * 100),
1033
+ className: "block h-1.5 w-full rounded-full bg-foreground/10 overflow-hidden my-1",
1034
+ children: /* @__PURE__ */ D("span", {
1035
+ className: "block h-full rounded-full bg-accent transition-[width] duration-200",
1036
+ style: { width: `${Math.max(e.state === "waiting" ? 0 : 4, e.progress * 100)}%` }
1037
+ })
1038
+ }) : e.state === "failed" ? /* @__PURE__ */ D("span", {
1039
+ className: "text-[11.5px] font-semibold text-red-500 truncate",
1040
+ title: e.error,
1041
+ children: e.error
1042
+ }) : /* @__PURE__ */ O("span", {
1043
+ className: "text-[11px] text-foreground/50 font-bold uppercase tracking-wider",
1044
+ children: [Ut(e.file.size), e.state === "done" ? " · Uploaded" : ""]
1045
+ })]
1046
+ }),
1047
+ e.state === "done" ? /* @__PURE__ */ D(ye, {
1048
+ className: "w-4 h-4 mx-2 text-emerald-500 shrink-0",
1049
+ "aria-hidden": !0
1050
+ }) : /* @__PURE__ */ O("div", {
1051
+ className: "flex items-center shrink-0",
1052
+ children: [e.state === "failed" && /* @__PURE__ */ D("button", {
1053
+ type: "button",
1054
+ onClick: () => q.retry(e.id),
1055
+ "aria-label": `Try ${e.name} again`,
1056
+ title: "Try again",
1057
+ className: "w-8 h-8 flex items-center justify-center text-foreground/40 hover:text-accent rounded-xl hover:bg-accent/10 transition-colors",
1058
+ children: /* @__PURE__ */ D(ue, { className: "w-4 h-4" })
1059
+ }), /* @__PURE__ */ D("button", {
1060
+ type: "button",
1061
+ onClick: () => q.remove(e.id),
1062
+ "aria-label": `${t ? "Stop" : "Remove"} ${e.name}`,
1063
+ title: t ? "Stop" : "Remove",
1064
+ className: "w-8 h-8 flex items-center justify-center text-foreground/40 hover:text-red-500 rounded-xl hover:bg-red-500/10 transition-colors",
1065
+ children: D(t ? ve : ie, { className: "w-4 h-4" })
1066
+ })]
1067
+ })
1068
+ ]
1069
+ }, e.id);
1070
+ })
1071
+ }), /* @__PURE__ */ O("div", {
1072
+ className: "p-4 md:p-6 pt-3 md:pt-4 border-t border-[var(--panel-border)]/50 flex flex-col gap-3 shrink-0",
1073
+ children: [q.failed > 0 && /* @__PURE__ */ O("p", {
1074
+ className: "text-[13px] font-medium text-red-400 bg-red-500/10 border border-red-500/20 rounded-xl p-3",
1075
+ children: [q.failed === 1 ? "One file did not upload." : `${q.failed} files did not upload.`, " Try again, or take it off the list."]
1076
+ }), /* @__PURE__ */ O("div", {
1077
+ className: "flex items-stretch gap-2",
1078
+ children: [/* @__PURE__ */ O("label", {
1079
+ title: "Add more files",
1080
+ className: "btn-secondary flex items-center justify-center gap-2 px-4 rounded-xl text-[13px] font-bold cursor-pointer shrink-0",
1081
+ children: [
1082
+ /* @__PURE__ */ D(se, { className: "w-4 h-4" }),
1083
+ " ",
1084
+ /* @__PURE__ */ D("span", {
1085
+ className: "max-sm:hidden",
1086
+ children: "Add more"
1087
+ }),
1088
+ /* @__PURE__ */ D("input", {
1089
+ type: "file",
1090
+ multiple: !0,
1091
+ "aria-label": "Add more files",
1092
+ onChange: Z,
1093
+ className: "sr-only"
1094
+ })
1095
+ ]
1096
+ }), /* @__PURE__ */ O(xe, {
1097
+ type: "button",
1098
+ onClick: q.start,
1099
+ disabled: !q.ready && !q.failed,
1100
+ className: "flex-1 py-4 rounded-xl text-[14px] font-bold shadow-lg",
1101
+ children: [q.busy && !q.ready && /* @__PURE__ */ D(ge, { className: "w-4 h-4 animate-spin" }), qe]
1102
+ })]
1103
+ })]
1104
+ })] }) : /* @__PURE__ */ D("div", {
1105
+ className: "p-4 md:p-6",
1106
+ children: /* @__PURE__ */ O("label", {
1107
+ className: "group flex flex-col items-center justify-center gap-1.5 px-6 py-12 rounded-2xl border-2 border-dashed border-[var(--panel-border)] bg-foreground/[0.015] hover:border-accent/50 hover:bg-accent/[0.03] cursor-pointer text-center transition-all",
1108
+ children: [
1109
+ /* @__PURE__ */ D("span", {
1110
+ className: "w-14 h-14 rounded-full bg-accent/10 text-accent flex items-center justify-center mb-2 group-hover:scale-105 transition-transform",
1111
+ children: /* @__PURE__ */ D(de, { className: "w-6 h-6" })
1112
+ }),
1113
+ /* @__PURE__ */ O("p", {
1114
+ className: "text-[15px] font-bold text-foreground",
1115
+ children: [/* @__PURE__ */ D("span", {
1116
+ className: "text-accent",
1117
+ children: "Click to upload"
1118
+ }), " or drag files in"]
1119
+ }),
1120
+ /* @__PURE__ */ D("p", {
1121
+ className: "text-[12.5px] text-foreground/45 font-medium",
1122
+ children: "Pictures, documents, anything — as many as you like"
1123
+ }),
1124
+ /* @__PURE__ */ D("input", {
1125
+ type: "file",
1126
+ multiple: !0,
1127
+ "aria-label": "Choose files to upload",
1128
+ onChange: Z,
1129
+ className: "sr-only"
1130
+ })
1131
+ ]
1132
+ })
1133
+ })]
1134
+ })]
1135
+ }) }),
1136
+ /* @__PURE__ */ D(we, {
1137
+ open: !!F,
1138
+ onClose: () => I(null),
1139
+ src: F?.downloadURL || "",
1140
+ name: F?.fileName,
1141
+ type: F?.fileType,
1142
+ actions: F && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("button", {
1143
+ type: "button",
1144
+ onClick: () => Xe(F.downloadURL, F._id),
1145
+ className: "h-9 w-9 shrink-0 rounded-xl flex items-center justify-center text-foreground/65 hover:text-emerald-500 hover:bg-foreground/[0.06] transition-colors cursor-pointer",
1146
+ title: "Copy link",
1147
+ "aria-label": "Copy link",
1148
+ children: U === F._id ? /* @__PURE__ */ D(ye, { className: "w-4 h-4 text-emerald-500" }) : /* @__PURE__ */ D(me, { className: "w-4 h-4" })
1149
+ }), K(F) && /* @__PURE__ */ D("button", {
1150
+ type: "button",
1151
+ onClick: () => {
1152
+ let e = F;
1153
+ I(null), R(e);
1154
+ },
1155
+ className: "h-9 w-9 shrink-0 rounded-xl flex items-center justify-center text-foreground/65 hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer",
1156
+ title: "Delete",
1157
+ "aria-label": "Delete",
1158
+ children: /* @__PURE__ */ D(ie, { className: "w-4 h-4" })
1159
+ })] })
1160
+ }),
1161
+ /* @__PURE__ */ D(Te, {
1162
+ isOpen: !!L,
1163
+ title: "Delete file",
1164
+ message: /* @__PURE__ */ O(E, { children: [
1165
+ "Delete ",
1166
+ /* @__PURE__ */ D("strong", {
1167
+ className: "text-foreground block my-1 break-words max-w-full text-center",
1168
+ children: L?.fileName
1169
+ }),
1170
+ " This cannot be undone."
1171
+ ] }),
1172
+ onConfirm: Je,
1173
+ onCancel: () => R(null),
1174
+ isProcessing: z,
1175
+ confirmText: "Yes, delete"
1176
+ }),
1177
+ /* @__PURE__ */ D(c, { children: We && /* @__PURE__ */ D(m.div, {
1178
+ initial: { opacity: 0 },
1179
+ animate: { opacity: 1 },
1180
+ exit: { opacity: 0 },
1181
+ className: "fixed inset-0 z-[1000] bg-background/60 backdrop-blur-md pointer-events-none flex items-center justify-center p-6",
1182
+ children: /* @__PURE__ */ O("div", {
1183
+ className: "w-full max-w-lg aspect-video bg-background/80 border-2 border-dashed border-accent rounded-[40px] shadow-2xl flex flex-col items-center justify-center gap-6",
1184
+ children: [/* @__PURE__ */ D("div", {
1185
+ className: "w-20 h-20 rounded-full bg-accent/10 flex items-center justify-center text-accent",
1186
+ children: /* @__PURE__ */ D(de, { className: "w-10 h-10 animate-bounce" })
1187
+ }), /* @__PURE__ */ D("span", {
1188
+ className: "text-[24px] font-extrabold text-foreground tracking-tight",
1189
+ children: "Drop to upload"
1190
+ })]
1191
+ })
1192
+ }) })
1193
+ ]
1194
+ });
1195
+ }
1196
+ //#endregion
1197
+ export { et as A, He as C, R as D, L as E, Ge as F, Y as I, Ue as L, Ze as M, tt as N, U as O, X as P, V as S, B as T, xt as _, zt as a, gt as b, Et as c, kt as d, Dt as f, wt as g, Ct as h, Lt as i, Xe as j, z as k, At as l, Tt as m, Ht as n, Rt as o, bt as p, Vt as r, jt as s, Gt as t, Ot as u, at as v, Ve as w, mt as x, rt as y };