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.
- package/dist/AccessNotice-BZ5Gt1nP.js +40 -0
- package/dist/AccessNotice-CN7kc70o.cjs +1 -0
- package/dist/{AddressField-R-HvndkG.js → AddressField-9Sqn8TvC.js} +3 -3
- package/dist/{AddressField-BkzFOo2t.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-BlYHb5e0.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-9J_YeJrb.js → TimeZoneField-DkI1Bkcz.js} +3382 -5513
- 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-D0gLVNTL.cjs → bake-n2wyFw0B.cjs} +1 -1
- package/dist/{bake-OErV2MLy.js → bake-naZeMu98.js} +14 -14
- 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/{dist-_zWHDDrc.js → dist-DUPvBnOA.js} +1 -1
- package/dist/email-BfnZnMwD.cjs +1 -0
- package/dist/email-Ddj8Dlu6.js +58 -0
- package/dist/{fileBytes-B0qxHYQL.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
- package/dist/{fileBytes-uhq3pGCS.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/pageDesignLines.d.ts +1 -1
- package/dist/lib/paymentProducts.d.ts +8 -0
- package/dist/lib/payments.d.ts +11 -1
- package/dist/lib/people.d.ts +9 -0
- package/dist/lib/recordsKey.d.ts +24 -0
- package/dist/{lucide-react-DiyP8FA_.js → lucide-react-CA7GD7Nv.js} +8 -8
- 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 -7
- package/dist/{pdf-DLuvpvHg.js → pdf-DRXcPGkr.js} +1 -1
- package/dist/{pdf.worker.min-C0gkd2Ec.js → pdf.worker.min-CfKZezeM.js} +1 -1
- 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 +11695 -35911
- package/package.json +1 -1
- package/src/index.css +122 -2
- package/dist/ContactPopup-DF8qQCoY.cjs +0 -12
- package/dist/PhoneInputField-Btx07xvM.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-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
- /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +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-CC5g01eC.cjs → pdf-jLjjhvjp.cjs} +0 -0
- /package/dist/{pdf.worker.min-pI_P-OCl.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
|
@@ -0,0 +1,1283 @@
|
|
|
1
|
+
import { Nn as e, cr as t, sr as n } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
import { C as r, Et as i, Ft as a, Gt as o, Ht as s, It as c, J as l, L as u, Lt as d, Pt as f, Q as p, Rt as m, U as h, Ut as g, Z as _, an as v, at as y, b, d as x, f as S, ht as C, i as w, in as ee, k as te, mt as ne, nt as re, o as T, p as ie, q as E, r as ae, sn as oe, st as se, vt as D } from "./lucide-react-CA7GD7Nv.js";
|
|
3
|
+
import { a as O, i as k, l as ce, o as A, r as le, t as ue } from "./mediaKind-DmKMsjeY.js";
|
|
4
|
+
import { a as de, i as j, n as fe, r as pe, t as me } from "./fileBytes-bjgvCfWu.js";
|
|
5
|
+
import { forwardRef as M, useCallback as he, useEffect as N, useImperativeHandle as ge, useLayoutEffect as P, useRef as F, useState as I } from "react";
|
|
6
|
+
import { Fragment as _e, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as ve } from "react-dom";
|
|
8
|
+
//#region src/components/media/VideoPlayer.tsx
|
|
9
|
+
var z = [
|
|
10
|
+
.5,
|
|
11
|
+
.75,
|
|
12
|
+
1,
|
|
13
|
+
1.25,
|
|
14
|
+
1.5,
|
|
15
|
+
2
|
|
16
|
+
], B = (e) => {
|
|
17
|
+
let t = Number.isFinite(e) && e > 0 ? e : 0, n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = String(Math.floor(t % 60)).padStart(2, "0");
|
|
18
|
+
return n ? `${n}:${String(r).padStart(2, "0")}:${i}` : `${r}:${i}`;
|
|
19
|
+
}, V = "w-9 h-9 shrink-0 rounded-full flex items-center justify-center text-white/85 hover:text-white hover:bg-white/15 transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-accent", ye = "absolute inset-0 m-auto w-16 h-16 md:w-20 md:h-20 rounded-full bg-accent text-[var(--button-fg,#fff)] flex items-center justify-center shadow-2xl shadow-black/40 ring-8 ring-accent/25 hover:scale-105 active:scale-95 transition-transform cursor-pointer outline-none focus-visible:ring-white/70", H = "relative w-full overflow-hidden rounded-2xl bg-black border border-[var(--panel-border)] shadow-xl";
|
|
20
|
+
function U({ value: e, max: t, buffered: n = 0, onSeek: r, tone: i, label: a, format: o = B, step: s = 5 }) {
|
|
21
|
+
let c = F(null), l = F(!1), [u, d] = I(null), f = (e) => {
|
|
22
|
+
let t = c.current?.getBoundingClientRect();
|
|
23
|
+
return t && t.width ? Math.min(1, Math.max(0, (e - t.left) / t.width)) : 0;
|
|
24
|
+
}, p = t > 0 ? Math.min(100, e / t * 100) : 0, m = t > 0 ? Math.min(100, n / t * 100) : 0, h = i === "dark", g = u !== null && o && t > 0 ? o(u * t) : null;
|
|
25
|
+
return /* @__PURE__ */ R("div", {
|
|
26
|
+
ref: c,
|
|
27
|
+
role: "slider",
|
|
28
|
+
tabIndex: 0,
|
|
29
|
+
"aria-label": a,
|
|
30
|
+
"aria-valuemin": 0,
|
|
31
|
+
"aria-valuemax": Math.round(t) || 0,
|
|
32
|
+
"aria-valuenow": Math.round(e) || 0,
|
|
33
|
+
"aria-valuetext": o ? o(e) : `${Math.round(p)}%`,
|
|
34
|
+
className: "group/scrub relative h-4 flex items-center cursor-pointer touch-none outline-none rounded-full focus-visible:ring-2 focus-visible:ring-accent/60",
|
|
35
|
+
onPointerDown: (e) => {
|
|
36
|
+
e.stopPropagation(), e.currentTarget.setPointerCapture(e.pointerId), l.current = !0, r(f(e.clientX) * t);
|
|
37
|
+
},
|
|
38
|
+
onPointerMove: (e) => {
|
|
39
|
+
d(f(e.clientX)), l.current && r(f(e.clientX) * t);
|
|
40
|
+
},
|
|
41
|
+
onPointerUp: () => {
|
|
42
|
+
l.current = !1;
|
|
43
|
+
},
|
|
44
|
+
onPointerCancel: () => {
|
|
45
|
+
l.current = !1;
|
|
46
|
+
},
|
|
47
|
+
onPointerLeave: () => d(null),
|
|
48
|
+
onKeyDown: (n) => {
|
|
49
|
+
let i = n.key;
|
|
50
|
+
[
|
|
51
|
+
"ArrowRight",
|
|
52
|
+
"ArrowUp",
|
|
53
|
+
"ArrowLeft",
|
|
54
|
+
"ArrowDown",
|
|
55
|
+
"Home",
|
|
56
|
+
"End"
|
|
57
|
+
].includes(i) && (n.preventDefault(), n.stopPropagation(), r(i === "Home" ? 0 : i === "End" ? t : Math.min(t, Math.max(0, e + (i === "ArrowRight" || i === "ArrowUp" ? s : -s)))));
|
|
58
|
+
},
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ R("div", {
|
|
61
|
+
className: `relative w-full h-1 group-hover/scrub:h-1.5 transition-[height] duration-150 rounded-full overflow-hidden ${h ? "bg-white/25" : "bg-foreground/10"}`,
|
|
62
|
+
children: [/* @__PURE__ */ L("div", {
|
|
63
|
+
className: `absolute inset-y-0 left-0 ${h ? "bg-white/35" : "bg-foreground/15"}`,
|
|
64
|
+
style: { width: `${m}%` }
|
|
65
|
+
}), /* @__PURE__ */ L("div", {
|
|
66
|
+
className: "absolute inset-y-0 left-0 bg-accent",
|
|
67
|
+
style: { width: `${p}%` }
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ L("div", {
|
|
71
|
+
className: "absolute w-3 h-3 -ml-1.5 rounded-full bg-accent shadow-md scale-0 group-hover/scrub:scale-100 group-focus-visible/scrub:scale-100 transition-transform pointer-events-none",
|
|
72
|
+
style: { left: `${p}%` }
|
|
73
|
+
}),
|
|
74
|
+
g && /* @__PURE__ */ L("div", {
|
|
75
|
+
className: `absolute bottom-full mb-2 -translate-x-1/2 px-1.5 py-0.5 rounded-md text-[11px] font-semibold tabular-nums whitespace-nowrap pointer-events-none ${h ? "bg-black/80 text-white" : "bg-background text-foreground border border-[var(--panel-border)] shadow"}`,
|
|
76
|
+
style: { left: `${u * 100}%` },
|
|
77
|
+
children: g
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function W({ src: e, poster: t, title: n, autoPlay: r, loop: i, muted: a, aspect: o = "16 / 9", className: s = "", onRatio: c }) {
|
|
83
|
+
let d = F(null), m = F(null), h = F(null), g = F(0), [_, v] = I(!1), [b, w] = I(!!r), [ee, te] = I(!1), [ne, re] = I(!1), [T, ae] = I(!1), [D, O] = I(0), [k, ce] = I(0), [A, le] = I(0), [ue, de] = I(1), [j, fe] = I(!!a || !!r), [pe, me] = I(1), [M, ge] = I(!1), [P, _e] = I(!1), [ve, W] = I(!0), [G, be] = I(null), K = he(() => {
|
|
84
|
+
W(!0), window.clearTimeout(g.current), g.current = window.setTimeout(() => W(!1), 2600);
|
|
85
|
+
}, []);
|
|
86
|
+
N(() => () => window.clearTimeout(g.current), []), N(() => {
|
|
87
|
+
let e = () => _e(!!d.current && document.fullscreenElement === d.current);
|
|
88
|
+
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
89
|
+
}, []), N(() => {
|
|
90
|
+
if (!M) return;
|
|
91
|
+
let e = (e) => {
|
|
92
|
+
h.current?.contains(e.target) || ge(!1);
|
|
93
|
+
};
|
|
94
|
+
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
95
|
+
}, [M]);
|
|
96
|
+
let q = () => {
|
|
97
|
+
let e = m.current;
|
|
98
|
+
e && (e.paused || e.ended ? e.play().catch(() => {}) : e.pause());
|
|
99
|
+
}, J = (e) => {
|
|
100
|
+
let t = m.current;
|
|
101
|
+
!t || !Number.isFinite(e) || (t.currentTime = Math.max(0, Math.min(e, Number.isFinite(t.duration) ? t.duration : e)), O(t.currentTime));
|
|
102
|
+
}, xe = (e) => {
|
|
103
|
+
let t = m.current;
|
|
104
|
+
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
105
|
+
}, Se = () => {
|
|
106
|
+
let e = m.current;
|
|
107
|
+
e && (e.muted || e.volume === 0 ? (e.muted = !1, e.volume === 0 && (e.volume = .6)) : e.muted = !0);
|
|
108
|
+
}, Y = () => {
|
|
109
|
+
if (document.fullscreenElement) {
|
|
110
|
+
document.exitFullscreen().catch(() => {});
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let e = d.current;
|
|
114
|
+
e?.requestFullscreen ? e.requestFullscreen().catch(() => {}) : m.current?.webkitEnterFullscreen?.();
|
|
115
|
+
}, Ce = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, X = async () => {
|
|
116
|
+
try {
|
|
117
|
+
document.pictureInPictureElement ? await document.exitPictureInPicture() : await m.current?.requestPictureInPicture();
|
|
118
|
+
} catch {}
|
|
119
|
+
}, we = (e) => {
|
|
120
|
+
if (e.target !== d.current) return;
|
|
121
|
+
let t = e.key.toLowerCase();
|
|
122
|
+
if (t === " " || t === "k") e.preventDefault(), q();
|
|
123
|
+
else if (t === "arrowright") e.preventDefault(), J(D + 5);
|
|
124
|
+
else if (t === "arrowleft") e.preventDefault(), J(D - 5);
|
|
125
|
+
else if (t === "arrowup") e.preventDefault(), xe(ue + .1);
|
|
126
|
+
else if (t === "arrowdown") e.preventDefault(), xe(ue - .1);
|
|
127
|
+
else if (t === "m") Se();
|
|
128
|
+
else if (t === "f") Y();
|
|
129
|
+
else return;
|
|
130
|
+
K();
|
|
131
|
+
}, Te = !_ || ve || M, Z = j || ue === 0 ? x : ue < .5 ? ie : S, Q = t || /#/.test(e) ? e : `${e}#t=0.001`, Ee = o === "auto" ? G ? String(G) : "16 / 9" : o;
|
|
132
|
+
return /* @__PURE__ */ R("div", {
|
|
133
|
+
ref: d,
|
|
134
|
+
tabIndex: 0,
|
|
135
|
+
role: "region",
|
|
136
|
+
"aria-label": n ? `Video: ${n}` : "Video player",
|
|
137
|
+
onKeyDown: we,
|
|
138
|
+
onPointerMove: K,
|
|
139
|
+
onPointerLeave: () => {
|
|
140
|
+
_ && W(!1);
|
|
141
|
+
},
|
|
142
|
+
className: `fbos-video group/player ${H} outline-none focus-visible:ring-2 focus-visible:ring-accent ${Te ? "" : "cursor-none"} ${P ? "!rounded-none !border-0" : ""} ${s}`,
|
|
143
|
+
style: P ? void 0 : { aspectRatio: Ee },
|
|
144
|
+
children: [
|
|
145
|
+
!k && !T && /* @__PURE__ */ L("span", {
|
|
146
|
+
"aria-hidden": "true",
|
|
147
|
+
className: "fbos-picture-tint fbos-video-tint absolute inset-0"
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ L("video", {
|
|
150
|
+
ref: m,
|
|
151
|
+
src: Q,
|
|
152
|
+
poster: t,
|
|
153
|
+
playsInline: !0,
|
|
154
|
+
preload: "metadata",
|
|
155
|
+
autoPlay: r,
|
|
156
|
+
loop: i,
|
|
157
|
+
muted: j,
|
|
158
|
+
className: "absolute inset-0 w-full h-full object-contain",
|
|
159
|
+
onClick: () => {
|
|
160
|
+
q(), K();
|
|
161
|
+
},
|
|
162
|
+
onDoubleClick: Y,
|
|
163
|
+
onPlay: () => {
|
|
164
|
+
v(!0), w(!0), re(!1), K();
|
|
165
|
+
},
|
|
166
|
+
onPause: () => {
|
|
167
|
+
v(!1), W(!0);
|
|
168
|
+
},
|
|
169
|
+
onEnded: () => {
|
|
170
|
+
re(!0), v(!1), W(!0);
|
|
171
|
+
},
|
|
172
|
+
onTimeUpdate: (e) => O(e.currentTarget.currentTime),
|
|
173
|
+
onLoadedMetadata: (e) => {
|
|
174
|
+
let t = e.currentTarget;
|
|
175
|
+
if (ce(t.duration), t.videoWidth && t.videoHeight) {
|
|
176
|
+
let e = t.videoWidth / t.videoHeight;
|
|
177
|
+
be(e), c?.(e);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
onDurationChange: (e) => ce(e.currentTarget.duration),
|
|
181
|
+
onProgress: (e) => {
|
|
182
|
+
let t = e.currentTarget.buffered;
|
|
183
|
+
t.length && le(t.end(t.length - 1));
|
|
184
|
+
},
|
|
185
|
+
onWaiting: () => te(!0),
|
|
186
|
+
onPlaying: () => te(!1),
|
|
187
|
+
onCanPlay: () => te(!1),
|
|
188
|
+
onVolumeChange: (e) => {
|
|
189
|
+
de(e.currentTarget.volume), fe(e.currentTarget.muted);
|
|
190
|
+
},
|
|
191
|
+
onRateChange: (e) => me(e.currentTarget.playbackRate),
|
|
192
|
+
onError: () => ae(!0)
|
|
193
|
+
}),
|
|
194
|
+
n && !T && /* @__PURE__ */ L("div", {
|
|
195
|
+
className: `absolute inset-x-0 top-0 px-4 pt-3 pb-10 bg-gradient-to-b from-black/60 to-transparent text-white text-[13px] md:text-[14px] font-semibold truncate pointer-events-none transition-opacity duration-300 ${Te ? "opacity-100" : "opacity-0"}`,
|
|
196
|
+
children: n
|
|
197
|
+
}),
|
|
198
|
+
T ? /* @__PURE__ */ R("div", {
|
|
199
|
+
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 text-white/75 text-[13px] font-medium text-center px-6",
|
|
200
|
+
children: [/* @__PURE__ */ L(f, { className: "w-8 h-8 opacity-60" }), "This video could not be played here."]
|
|
201
|
+
}) : !_ && !ee ? /* @__PURE__ */ L("button", {
|
|
202
|
+
type: "button",
|
|
203
|
+
onClick: q,
|
|
204
|
+
"aria-label": ne ? "Play again" : "Play",
|
|
205
|
+
className: ye,
|
|
206
|
+
children: ne ? /* @__PURE__ */ L(u, { className: "w-7 h-7 md:w-8 md:h-8" }) : /* @__PURE__ */ L(E, { className: "w-7 h-7 md:w-8 md:h-8 translate-x-0.5 fill-current" })
|
|
207
|
+
}) : null,
|
|
208
|
+
ee && !T && /* @__PURE__ */ L(C, { className: "absolute inset-0 m-auto w-10 h-10 text-white/90 animate-spin pointer-events-none" }),
|
|
209
|
+
!T && /* @__PURE__ */ R("div", {
|
|
210
|
+
className: `absolute inset-x-0 bottom-0 px-2.5 md:px-4 pb-1.5 md:pb-2.5 pt-12 bg-gradient-to-t from-black/75 via-black/35 to-transparent transition-opacity duration-300 ${Te && b ? "opacity-100" : "opacity-0 pointer-events-none"}`,
|
|
211
|
+
children: [/* @__PURE__ */ L(U, {
|
|
212
|
+
value: D,
|
|
213
|
+
max: k,
|
|
214
|
+
buffered: A,
|
|
215
|
+
onSeek: J,
|
|
216
|
+
tone: "dark",
|
|
217
|
+
label: "Time"
|
|
218
|
+
}), /* @__PURE__ */ R("div", {
|
|
219
|
+
className: "flex items-center gap-0.5 md:gap-1 mt-0.5",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ L("button", {
|
|
222
|
+
type: "button",
|
|
223
|
+
className: V,
|
|
224
|
+
onClick: q,
|
|
225
|
+
"aria-label": _ ? "Pause" : "Play",
|
|
226
|
+
children: _ ? /* @__PURE__ */ L(p, { className: "w-[18px] h-[18px] fill-current" }) : /* @__PURE__ */ L(E, { className: "w-[18px] h-[18px] fill-current translate-x-px" })
|
|
227
|
+
}),
|
|
228
|
+
/* @__PURE__ */ R("div", {
|
|
229
|
+
className: "group/vol flex items-center",
|
|
230
|
+
children: [/* @__PURE__ */ L("button", {
|
|
231
|
+
type: "button",
|
|
232
|
+
className: V,
|
|
233
|
+
onClick: Se,
|
|
234
|
+
"aria-label": j ? "Turn the sound on" : "Mute",
|
|
235
|
+
children: /* @__PURE__ */ L(Z, { className: "w-[18px] h-[18px]" })
|
|
236
|
+
}), /* @__PURE__ */ L("div", {
|
|
237
|
+
className: "max-sm:hidden w-0 group-hover/vol:w-[76px] group-focus-within/vol:w-[76px] overflow-hidden transition-[width] duration-200",
|
|
238
|
+
children: /* @__PURE__ */ L("div", {
|
|
239
|
+
className: "w-[68px] ml-1",
|
|
240
|
+
children: /* @__PURE__ */ L(U, {
|
|
241
|
+
value: j ? 0 : ue,
|
|
242
|
+
max: 1,
|
|
243
|
+
onSeek: xe,
|
|
244
|
+
tone: "dark",
|
|
245
|
+
label: "Volume",
|
|
246
|
+
format: null,
|
|
247
|
+
step: .1
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
})]
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ R("span", {
|
|
253
|
+
className: "px-1.5 text-[12px] md:text-[12.5px] font-semibold text-white/90 tabular-nums whitespace-nowrap select-none",
|
|
254
|
+
children: [
|
|
255
|
+
B(D),
|
|
256
|
+
" ",
|
|
257
|
+
/* @__PURE__ */ R("span", {
|
|
258
|
+
className: "text-white/50",
|
|
259
|
+
children: ["/ ", B(k)]
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ L("div", { className: "flex-1" }),
|
|
264
|
+
/* @__PURE__ */ R("div", {
|
|
265
|
+
ref: h,
|
|
266
|
+
className: "relative",
|
|
267
|
+
children: [/* @__PURE__ */ R("button", {
|
|
268
|
+
type: "button",
|
|
269
|
+
className: `${V} !w-auto px-2.5 text-[12px] font-bold tabular-nums`,
|
|
270
|
+
onClick: () => ge((e) => !e),
|
|
271
|
+
"aria-label": "Playback speed",
|
|
272
|
+
"aria-expanded": M,
|
|
273
|
+
children: [pe, "×"]
|
|
274
|
+
}), M && /* @__PURE__ */ L("div", {
|
|
275
|
+
role: "menu",
|
|
276
|
+
className: "absolute bottom-full right-0 mb-2 py-1 min-w-[108px] rounded-xl bg-black/85 backdrop-blur-md border border-white/10 shadow-2xl",
|
|
277
|
+
children: z.map((e) => /* @__PURE__ */ R("button", {
|
|
278
|
+
type: "button",
|
|
279
|
+
role: "menuitemradio",
|
|
280
|
+
"aria-checked": e === pe,
|
|
281
|
+
onClick: () => {
|
|
282
|
+
m.current && (m.current.playbackRate = e), ge(!1);
|
|
283
|
+
},
|
|
284
|
+
className: `w-full px-3 py-1.5 flex items-center justify-between gap-3 text-left text-[12.5px] font-semibold tabular-nums hover:bg-white/10 cursor-pointer ${e === pe ? "text-accent" : "text-white/85"}`,
|
|
285
|
+
children: [e === 1 ? "Normal" : `${e}×`, e === pe && /* @__PURE__ */ L(oe, { className: "w-3.5 h-3.5" })]
|
|
286
|
+
}, e))
|
|
287
|
+
})]
|
|
288
|
+
}),
|
|
289
|
+
Ce && /* @__PURE__ */ L("span", {
|
|
290
|
+
className: "max-sm:hidden",
|
|
291
|
+
children: /* @__PURE__ */ L("button", {
|
|
292
|
+
type: "button",
|
|
293
|
+
className: V,
|
|
294
|
+
onClick: X,
|
|
295
|
+
"aria-label": "Picture in picture",
|
|
296
|
+
children: /* @__PURE__ */ L(l, { className: "w-[18px] h-[18px]" })
|
|
297
|
+
})
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ L("button", {
|
|
300
|
+
type: "button",
|
|
301
|
+
className: V,
|
|
302
|
+
onClick: Y,
|
|
303
|
+
"aria-label": P ? "Leave full screen" : "Full screen",
|
|
304
|
+
children: L(P ? y : se, { className: "w-[18px] h-[18px]" })
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
})]
|
|
308
|
+
})
|
|
309
|
+
]
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
function G({ src: t, embed: n, title: r, aspect: i = "16 / 9", autoPlay: a, className: o = "" }) {
|
|
313
|
+
let [s, c] = I(!!a), [l, u] = I(!1), d = l ? null : le(t), f = s ? `${n}${n.includes("?") ? "&" : "?"}autoplay=1` : n;
|
|
314
|
+
return /* @__PURE__ */ L("div", {
|
|
315
|
+
className: `fbos-video ${H} ${o}`,
|
|
316
|
+
style: { aspectRatio: i === "auto" ? "16 / 9" : i },
|
|
317
|
+
children: s ? /* @__PURE__ */ L("iframe", {
|
|
318
|
+
src: f,
|
|
319
|
+
title: r || "Video",
|
|
320
|
+
className: "absolute inset-0 w-full h-full border-0",
|
|
321
|
+
allow: "autoplay; encrypted-media; picture-in-picture; fullscreen; clipboard-write",
|
|
322
|
+
allowFullScreen: !0,
|
|
323
|
+
referrerPolicy: "strict-origin-when-cross-origin"
|
|
324
|
+
}) : /* @__PURE__ */ R("button", {
|
|
325
|
+
type: "button",
|
|
326
|
+
onClick: () => c(!0),
|
|
327
|
+
"aria-label": r ? `Play ${r}` : "Play the video",
|
|
328
|
+
className: "group/facade absolute inset-0 w-full h-full cursor-pointer",
|
|
329
|
+
children: [
|
|
330
|
+
d ? /* @__PURE__ */ L(e, {
|
|
331
|
+
src: d,
|
|
332
|
+
alt: "",
|
|
333
|
+
className: "absolute inset-0",
|
|
334
|
+
onError: () => u(!0)
|
|
335
|
+
}) : /* @__PURE__ */ L("span", { className: "absolute inset-0 bg-gradient-to-br from-accent/30 via-black to-black" }),
|
|
336
|
+
/* @__PURE__ */ L("span", { className: "absolute inset-0 bg-gradient-to-t from-black/55 via-transparent to-black/35" }),
|
|
337
|
+
r && /* @__PURE__ */ L("span", {
|
|
338
|
+
className: "absolute left-4 right-4 top-3 text-left text-white text-[14px] font-semibold truncate",
|
|
339
|
+
children: r
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ L("span", {
|
|
342
|
+
className: `${ye} pointer-events-none group-hover/facade:scale-105`,
|
|
343
|
+
children: /* @__PURE__ */ L(E, { className: "w-7 h-7 md:w-8 md:h-8 translate-x-0.5 fill-current" })
|
|
344
|
+
})
|
|
345
|
+
]
|
|
346
|
+
})
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function be({ src: e, title: t, autoPlay: n, loop: r, className: i = "" }) {
|
|
350
|
+
let a = F(null), [o, s] = I(!1), [c, l] = I(0), [u, d] = I(0), [f, m] = I(0), [h, g] = I(!1), [_, v] = I(1), [y, b] = I(!1);
|
|
351
|
+
return /* @__PURE__ */ R("div", {
|
|
352
|
+
role: "region",
|
|
353
|
+
"aria-label": `Recording: ${t || A(e)}`,
|
|
354
|
+
className: `fbos-audio w-full flex items-center gap-3 rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] px-3 py-2.5 ${i}`,
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ L("audio", {
|
|
357
|
+
ref: a,
|
|
358
|
+
src: e,
|
|
359
|
+
preload: "metadata",
|
|
360
|
+
autoPlay: n,
|
|
361
|
+
loop: r,
|
|
362
|
+
className: "hidden",
|
|
363
|
+
onPlay: () => s(!0),
|
|
364
|
+
onPause: () => s(!1),
|
|
365
|
+
onEnded: () => s(!1),
|
|
366
|
+
onTimeUpdate: (e) => l(e.currentTarget.currentTime),
|
|
367
|
+
onLoadedMetadata: (e) => d(e.currentTarget.duration),
|
|
368
|
+
onDurationChange: (e) => d(e.currentTarget.duration),
|
|
369
|
+
onProgress: (e) => {
|
|
370
|
+
let t = e.currentTarget.buffered;
|
|
371
|
+
t.length && m(t.end(t.length - 1));
|
|
372
|
+
},
|
|
373
|
+
onVolumeChange: (e) => g(e.currentTarget.muted),
|
|
374
|
+
onRateChange: (e) => v(e.currentTarget.playbackRate),
|
|
375
|
+
onError: () => b(!0)
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ L("button", {
|
|
378
|
+
type: "button",
|
|
379
|
+
onClick: () => {
|
|
380
|
+
let e = a.current;
|
|
381
|
+
e && (e.paused ? e.play().catch(() => {}) : e.pause());
|
|
382
|
+
},
|
|
383
|
+
disabled: y,
|
|
384
|
+
"aria-label": o ? "Pause" : "Play",
|
|
385
|
+
className: "w-10 h-10 shrink-0 rounded-full bg-accent text-[var(--button-fg,#fff)] flex items-center justify-center shadow-md hover:scale-105 active:scale-95 transition-transform cursor-pointer disabled:opacity-40",
|
|
386
|
+
children: o ? /* @__PURE__ */ L(p, { className: "w-4 h-4 fill-current" }) : /* @__PURE__ */ L(E, { className: "w-4 h-4 fill-current translate-x-px" })
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ R("div", {
|
|
389
|
+
className: "flex-1 min-w-0 flex flex-col",
|
|
390
|
+
children: [/* @__PURE__ */ R("div", {
|
|
391
|
+
className: "flex items-center justify-between gap-2",
|
|
392
|
+
children: [/* @__PURE__ */ L("span", {
|
|
393
|
+
className: "text-[13px] font-semibold text-foreground truncate",
|
|
394
|
+
children: t || A(e)
|
|
395
|
+
}), /* @__PURE__ */ L("span", {
|
|
396
|
+
className: "text-[11.5px] font-medium text-foreground/50 tabular-nums whitespace-nowrap",
|
|
397
|
+
children: y ? "Could not be played" : `${B(c)} / ${B(u)}`
|
|
398
|
+
})]
|
|
399
|
+
}), /* @__PURE__ */ L(U, {
|
|
400
|
+
value: c,
|
|
401
|
+
max: u,
|
|
402
|
+
buffered: f,
|
|
403
|
+
onSeek: (e) => {
|
|
404
|
+
let t = a.current;
|
|
405
|
+
!t || !Number.isFinite(e) || (t.currentTime = Math.max(0, Math.min(e, Number.isFinite(t.duration) ? t.duration : e)), l(t.currentTime));
|
|
406
|
+
},
|
|
407
|
+
tone: "theme",
|
|
408
|
+
label: "Time"
|
|
409
|
+
})]
|
|
410
|
+
}),
|
|
411
|
+
/* @__PURE__ */ R("button", {
|
|
412
|
+
type: "button",
|
|
413
|
+
onClick: () => {
|
|
414
|
+
let e = a.current;
|
|
415
|
+
if (!e) return;
|
|
416
|
+
let t = [
|
|
417
|
+
1,
|
|
418
|
+
1.25,
|
|
419
|
+
1.5,
|
|
420
|
+
2,
|
|
421
|
+
.75
|
|
422
|
+
];
|
|
423
|
+
e.playbackRate = t[(t.indexOf(e.playbackRate) + 1) % t.length] || 1;
|
|
424
|
+
},
|
|
425
|
+
"aria-label": "Playback speed",
|
|
426
|
+
className: "h-8 px-2 shrink-0 rounded-lg text-[12px] font-bold tabular-nums text-foreground/60 hover:text-foreground hover:bg-foreground/5 transition-colors cursor-pointer",
|
|
427
|
+
children: [_, "×"]
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ L("button", {
|
|
430
|
+
type: "button",
|
|
431
|
+
onClick: () => {
|
|
432
|
+
a.current && (a.current.muted = !a.current.muted);
|
|
433
|
+
},
|
|
434
|
+
"aria-label": h ? "Turn the sound on" : "Mute",
|
|
435
|
+
className: "w-8 h-8 shrink-0 rounded-lg flex items-center justify-center text-foreground/60 hover:text-foreground hover:bg-foreground/5 transition-colors cursor-pointer",
|
|
436
|
+
children: L(h ? x : S, { className: "w-4 h-4" })
|
|
437
|
+
})
|
|
438
|
+
]
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
function K(e) {
|
|
442
|
+
let t = k(e.src);
|
|
443
|
+
return t ? /* @__PURE__ */ L(G, {
|
|
444
|
+
...e,
|
|
445
|
+
embed: t
|
|
446
|
+
}) : ce(e.src, e.type) === "audio" ? /* @__PURE__ */ L(be, { ...e }) : /* @__PURE__ */ L(W, { ...e }, e.src);
|
|
447
|
+
}
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/components/media/KindIcon.tsx
|
|
450
|
+
var q = new Set([
|
|
451
|
+
"csv",
|
|
452
|
+
"tsv",
|
|
453
|
+
"xls",
|
|
454
|
+
"xlsx",
|
|
455
|
+
"ods",
|
|
456
|
+
"numbers"
|
|
457
|
+
]), J = new Set([
|
|
458
|
+
"ppt",
|
|
459
|
+
"pptx",
|
|
460
|
+
"odp",
|
|
461
|
+
"key"
|
|
462
|
+
]), xe = new Set([
|
|
463
|
+
"json",
|
|
464
|
+
"xml",
|
|
465
|
+
"yml",
|
|
466
|
+
"yaml",
|
|
467
|
+
"log",
|
|
468
|
+
"ics"
|
|
469
|
+
]);
|
|
470
|
+
function Se({ kind: e, name: t = "", className: n = "w-4 h-4" }) {
|
|
471
|
+
let r = O(t);
|
|
472
|
+
return /* @__PURE__ */ L(e === "image" ? i : e === "video" ? f : e === "audio" ? re : e === "link" ? D : q.has(r) ? d : J.has(r) ? h : xe.has(r) ? m : e === "file" ? a : c, {
|
|
473
|
+
className: n,
|
|
474
|
+
"aria-hidden": !0
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
var Y = "shrink-0 flex items-center justify-center rounded-xl bg-gradient-to-br from-accent/25 via-accent/10 to-transparent border border-accent/30 text-accent", Ce = 16, X = 980;
|
|
478
|
+
function we({ doc: e, index: t, cssW: n, cssH: r, root: i, strokes: a, drawing: o, ink: s, onStroke: c }) {
|
|
479
|
+
let l = F(null), u = F(null), [d, f] = I(t < 2), [p, m] = I(0);
|
|
480
|
+
return N(() => {
|
|
481
|
+
let e = l.current;
|
|
482
|
+
if (!e || typeof IntersectionObserver > "u") return;
|
|
483
|
+
let t = new IntersectionObserver(([e]) => {
|
|
484
|
+
f(e.isIntersecting), !e.isIntersecting && u.current && u.current.width && (u.current.width = 0, u.current.height = 0, m(0));
|
|
485
|
+
}, {
|
|
486
|
+
root: i,
|
|
487
|
+
rootMargin: "1500px 0px"
|
|
488
|
+
});
|
|
489
|
+
return t.observe(e), () => t.disconnect();
|
|
490
|
+
}, [i]), N(() => {
|
|
491
|
+
if (!d || !n || Math.abs(p - n) < .5) return;
|
|
492
|
+
let r = !1, i = null, a = window.setTimeout(async () => {
|
|
493
|
+
try {
|
|
494
|
+
let a = await e.getPage(t + 1);
|
|
495
|
+
if (r) return;
|
|
496
|
+
let o = Math.min(window.devicePixelRatio || 1, 2), s = a.getViewport({ scale: 1 }), c = a.getViewport({ scale: n / s.width * o }), l = document.createElement("canvas");
|
|
497
|
+
l.width = Math.ceil(c.width), l.height = Math.ceil(c.height), i = a.render({
|
|
498
|
+
canvas: l,
|
|
499
|
+
viewport: c
|
|
500
|
+
}), await i.promise;
|
|
501
|
+
let d = u.current;
|
|
502
|
+
if (r || !d) return;
|
|
503
|
+
d.width = l.width, d.height = l.height, d.getContext("2d")?.drawImage(l, 0, 0), m(n);
|
|
504
|
+
} catch {}
|
|
505
|
+
}, p ? 140 : 0);
|
|
506
|
+
return () => {
|
|
507
|
+
r = !0, window.clearTimeout(a), i?.cancel();
|
|
508
|
+
};
|
|
509
|
+
}, [
|
|
510
|
+
d,
|
|
511
|
+
n,
|
|
512
|
+
e,
|
|
513
|
+
t,
|
|
514
|
+
p
|
|
515
|
+
]), /* @__PURE__ */ R("div", {
|
|
516
|
+
ref: l,
|
|
517
|
+
"data-page": t + 1,
|
|
518
|
+
className: "relative shrink-0 bg-white rounded-[3px] ring-1 ring-black/5 shadow-[0_1px_3px_rgba(0,0,0,0.12),0_12px_32px_-16px_rgba(0,0,0,0.35)]",
|
|
519
|
+
style: {
|
|
520
|
+
width: n,
|
|
521
|
+
height: r
|
|
522
|
+
},
|
|
523
|
+
children: [
|
|
524
|
+
/* @__PURE__ */ L("canvas", {
|
|
525
|
+
ref: u,
|
|
526
|
+
className: "absolute inset-0 w-full h-full rounded-[3px]",
|
|
527
|
+
"aria-label": `Page ${t + 1}`,
|
|
528
|
+
role: "img"
|
|
529
|
+
}),
|
|
530
|
+
!p && /* @__PURE__ */ L("div", {
|
|
531
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
532
|
+
children: /* @__PURE__ */ L(C, { className: "w-5 h-5 text-black/20 animate-spin" })
|
|
533
|
+
}),
|
|
534
|
+
/* @__PURE__ */ L(j, {
|
|
535
|
+
strokes: a,
|
|
536
|
+
active: o,
|
|
537
|
+
ink: s,
|
|
538
|
+
onStroke: (e) => c(t, e)
|
|
539
|
+
})
|
|
540
|
+
]
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
var Te = M(function({ data: e, zoom: t, drawing: n, ink: r, strokes: i, onStroke: a, onReady: o, onPage: s, onFail: c }, l) {
|
|
544
|
+
let u = F(null), [d, f] = I(null), [p, m] = I([]), [h, g] = I(0), [_, v] = I(null), y = F({
|
|
545
|
+
onReady: o,
|
|
546
|
+
onPage: s,
|
|
547
|
+
onFail: c
|
|
548
|
+
});
|
|
549
|
+
N(() => {
|
|
550
|
+
y.current = {
|
|
551
|
+
onReady: o,
|
|
552
|
+
onPage: s,
|
|
553
|
+
onFail: c
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
let b = F(0);
|
|
557
|
+
N(() => {
|
|
558
|
+
let t = !1, n = null;
|
|
559
|
+
return (async () => {
|
|
560
|
+
let r = await pe(), i = new Uint8Array(await e.arrayBuffer()), a = r.getDocument({ data: i });
|
|
561
|
+
n = a;
|
|
562
|
+
let o = await a.promise;
|
|
563
|
+
if (t) return;
|
|
564
|
+
let s = await Promise.all(Array.from({ length: o.numPages }, (e, t) => o.getPage(t + 1)));
|
|
565
|
+
t || (m(s.map((e) => {
|
|
566
|
+
let t = e.getViewport({ scale: 1 });
|
|
567
|
+
return {
|
|
568
|
+
w: t.width,
|
|
569
|
+
h: t.height
|
|
570
|
+
};
|
|
571
|
+
})), f(o), y.current.onReady(o.numPages));
|
|
572
|
+
})().catch((e) => {
|
|
573
|
+
t || y.current.onFail(e?.name === "PasswordException" ? "locked" : "broken");
|
|
574
|
+
}), () => {
|
|
575
|
+
t = !0, n?.destroy();
|
|
576
|
+
};
|
|
577
|
+
}, [e]), P(() => {
|
|
578
|
+
let e = u.current;
|
|
579
|
+
if (!e) return;
|
|
580
|
+
v(e);
|
|
581
|
+
let t = () => g(e.clientWidth);
|
|
582
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
583
|
+
let n = new ResizeObserver(t);
|
|
584
|
+
return n.observe(e), () => n.disconnect();
|
|
585
|
+
}, []);
|
|
586
|
+
let x = p.reduce((e, t) => Math.max(e, t.w), 0) || 612, S = h < 640 ? 12 : 32, w = Math.max(120, Math.min(h - S * 2, X)) / x * t, ee = F(w);
|
|
587
|
+
return P(() => {
|
|
588
|
+
let e = u.current, t = ee.current;
|
|
589
|
+
if (ee.current = w, !e || !t || t === w) return;
|
|
590
|
+
let n = w / t;
|
|
591
|
+
e.scrollTop = (e.scrollTop + e.clientHeight / 2) * n - e.clientHeight / 2, e.scrollLeft = (e.scrollLeft + e.clientWidth / 2) * n - e.clientWidth / 2;
|
|
592
|
+
}, [w]), N(() => () => cancelAnimationFrame(b.current), []), ge(l, () => ({ goTo: (e) => {
|
|
593
|
+
let t = u.current, n = t?.querySelector(`[data-page="${e}"]`);
|
|
594
|
+
t && n && t.scrollTo({
|
|
595
|
+
top: n.offsetTop - Ce,
|
|
596
|
+
behavior: "smooth"
|
|
597
|
+
});
|
|
598
|
+
} }), []), /* @__PURE__ */ L("div", {
|
|
599
|
+
ref: u,
|
|
600
|
+
onScroll: () => {
|
|
601
|
+
cancelAnimationFrame(b.current), b.current = requestAnimationFrame(() => {
|
|
602
|
+
let e = u.current;
|
|
603
|
+
if (!e) return;
|
|
604
|
+
let t = e.scrollTop + e.clientHeight * .35, n = 1;
|
|
605
|
+
for (let r of Array.from(e.querySelectorAll("[data-page]"))) if (r.offsetTop <= t) n = Number(r.dataset.page);
|
|
606
|
+
else break;
|
|
607
|
+
y.current.onPage(n);
|
|
608
|
+
});
|
|
609
|
+
},
|
|
610
|
+
className: "absolute inset-0 overflow-auto overscroll-contain",
|
|
611
|
+
children: d ? /* @__PURE__ */ L("div", {
|
|
612
|
+
className: "relative w-max min-w-full flex flex-col items-center",
|
|
613
|
+
style: {
|
|
614
|
+
gap: Ce,
|
|
615
|
+
padding: `${S / 2 + 4}px ${S}px ${S + 56}px`
|
|
616
|
+
},
|
|
617
|
+
children: p.map((e, t) => /* @__PURE__ */ L(we, {
|
|
618
|
+
doc: d,
|
|
619
|
+
index: t,
|
|
620
|
+
cssW: e.w * w,
|
|
621
|
+
cssH: e.h * w,
|
|
622
|
+
root: _,
|
|
623
|
+
strokes: i[t] || [],
|
|
624
|
+
drawing: n,
|
|
625
|
+
ink: r,
|
|
626
|
+
onStroke: a
|
|
627
|
+
}, t))
|
|
628
|
+
}) : /* @__PURE__ */ L("div", {
|
|
629
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
630
|
+
children: /* @__PURE__ */ L(C, { className: "w-6 h-6 text-accent animate-spin" })
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
}), Z = [
|
|
634
|
+
.5,
|
|
635
|
+
.75,
|
|
636
|
+
1,
|
|
637
|
+
1.25,
|
|
638
|
+
1.5,
|
|
639
|
+
2,
|
|
640
|
+
3
|
|
641
|
+
], Q = "h-9 min-w-9 px-2 shrink-0 rounded-xl flex items-center justify-center gap-1.5 text-[12.5px] font-semibold text-foreground/65 hover:text-foreground hover:bg-foreground/[0.06] transition-colors cursor-pointer disabled:opacity-35 disabled:pointer-events-none outline-none focus-visible:ring-2 focus-visible:ring-accent/50", Ee = "items-center h-9 shrink-0 rounded-xl border border-[var(--panel-border)] bg-[var(--panel-bg)] px-0.5", De = "w-8 h-8 rounded-lg flex items-center justify-center text-foreground/60 hover:text-foreground hover:bg-foreground/[0.06] transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none", Oe = new Set([
|
|
642
|
+
"json",
|
|
643
|
+
"xml",
|
|
644
|
+
"yml",
|
|
645
|
+
"yaml",
|
|
646
|
+
"log",
|
|
647
|
+
"ics"
|
|
648
|
+
]), $ = 4e5;
|
|
649
|
+
function ke(e, t = ",") {
|
|
650
|
+
let n = [], r = [], i = "", a = !1;
|
|
651
|
+
for (let o = 0; o < e.length; o++) {
|
|
652
|
+
let s = e[o];
|
|
653
|
+
if (a) {
|
|
654
|
+
s === "\"" ? e[o + 1] === "\"" ? (i += "\"", o++) : a = !1 : i += s;
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
s === "\"" ? a = !0 : s === t ? (r.push(i), i = "") : s === "\n" || s === "\r" ? (s === "\r" && e[o + 1] === "\n" && o++, r.push(i), n.push(r), r = [], i = "") : i += s;
|
|
658
|
+
}
|
|
659
|
+
return (i || r.length) && (r.push(i), n.push(r)), n;
|
|
660
|
+
}
|
|
661
|
+
var Ae = (e, t) => {
|
|
662
|
+
let n = e.lastIndexOf(".");
|
|
663
|
+
return `${n > 0 ? e.slice(0, n) : e} (with drawing).${t === "pdf" ? "pdf" : "png"}`;
|
|
664
|
+
};
|
|
665
|
+
function je() {
|
|
666
|
+
return /* @__PURE__ */ L("div", {
|
|
667
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
668
|
+
children: /* @__PURE__ */ L(C, { className: "w-6 h-6 text-accent animate-spin" })
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
function Me({ src: e, alt: t, zoom: n, drawing: r, ink: i, strokes: a, onStroke: o, onSize: s }) {
|
|
672
|
+
let c = F(null), l = F(null), [u, d] = I({
|
|
673
|
+
w: 0,
|
|
674
|
+
h: 0
|
|
675
|
+
}), [f, p] = I(null), [m, h] = I(!1);
|
|
676
|
+
P(() => {
|
|
677
|
+
let e = c.current;
|
|
678
|
+
if (!e) return;
|
|
679
|
+
let t = () => {
|
|
680
|
+
let t = e.clientWidth < 640 ? 24 : 48;
|
|
681
|
+
d({
|
|
682
|
+
w: Math.max(0, e.clientWidth - t),
|
|
683
|
+
h: Math.max(0, e.clientHeight - t)
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
687
|
+
let n = new ResizeObserver(t);
|
|
688
|
+
return n.observe(e), () => n.disconnect();
|
|
689
|
+
}, []);
|
|
690
|
+
let g = f && u.w && u.h ? Math.min(u.w / f.w, u.h / f.h, 1) : 0, _ = f ? f.w * g * n : 0, v = f ? f.h * g * n : 0, y = !r && n > 1;
|
|
691
|
+
return /* @__PURE__ */ R("div", {
|
|
692
|
+
ref: c,
|
|
693
|
+
className: `absolute inset-0 overflow-auto overscroll-contain flex p-3 sm:p-6 ${y ? "cursor-grab active:cursor-grabbing" : ""}`,
|
|
694
|
+
onPointerDown: (e) => {
|
|
695
|
+
!y || e.button > 0 || !c.current || (l.current = {
|
|
696
|
+
x: e.clientX,
|
|
697
|
+
y: e.clientY,
|
|
698
|
+
left: c.current.scrollLeft,
|
|
699
|
+
top: c.current.scrollTop
|
|
700
|
+
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
701
|
+
},
|
|
702
|
+
onPointerMove: (e) => {
|
|
703
|
+
let t = l.current;
|
|
704
|
+
!t || !c.current || (c.current.scrollLeft = t.left - (e.clientX - t.x), c.current.scrollTop = t.top - (e.clientY - t.y));
|
|
705
|
+
},
|
|
706
|
+
onPointerUp: () => {
|
|
707
|
+
l.current = null;
|
|
708
|
+
},
|
|
709
|
+
onPointerCancel: () => {
|
|
710
|
+
l.current = null;
|
|
711
|
+
},
|
|
712
|
+
children: [m ? /* @__PURE__ */ L("p", {
|
|
713
|
+
className: "m-auto text-[13px] font-medium text-foreground/50",
|
|
714
|
+
children: "This picture could not be shown."
|
|
715
|
+
}) : /* @__PURE__ */ R("div", {
|
|
716
|
+
className: "relative m-auto shrink-0 rounded-lg overflow-hidden shadow-lg",
|
|
717
|
+
style: f ? {
|
|
718
|
+
width: _,
|
|
719
|
+
height: v
|
|
720
|
+
} : {
|
|
721
|
+
width: 0,
|
|
722
|
+
height: 0
|
|
723
|
+
},
|
|
724
|
+
children: [/* @__PURE__ */ L("img", {
|
|
725
|
+
src: e,
|
|
726
|
+
alt: t,
|
|
727
|
+
draggable: !1,
|
|
728
|
+
onLoad: (e) => {
|
|
729
|
+
let t = {
|
|
730
|
+
w: e.currentTarget.naturalWidth || 800,
|
|
731
|
+
h: e.currentTarget.naturalHeight || 600
|
|
732
|
+
};
|
|
733
|
+
p(t), s(t.w, t.h);
|
|
734
|
+
},
|
|
735
|
+
onError: () => h(!0),
|
|
736
|
+
className: "absolute inset-0 w-full h-full select-none"
|
|
737
|
+
}), f && /* @__PURE__ */ L(j, {
|
|
738
|
+
strokes: a,
|
|
739
|
+
active: r,
|
|
740
|
+
ink: i,
|
|
741
|
+
onStroke: o
|
|
742
|
+
})]
|
|
743
|
+
}), !f && !m && /* @__PURE__ */ L(je, {})]
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
function Ne({ blob: e, name: t }) {
|
|
747
|
+
let [n, r] = I(null);
|
|
748
|
+
if (N(() => {
|
|
749
|
+
let t = !1;
|
|
750
|
+
return e.text().then((e) => {
|
|
751
|
+
t || r(e);
|
|
752
|
+
}, () => {
|
|
753
|
+
t || r("");
|
|
754
|
+
}), () => {
|
|
755
|
+
t = !0;
|
|
756
|
+
};
|
|
757
|
+
}, [e]), n === null) return /* @__PURE__ */ L(je, {});
|
|
758
|
+
let i = O(t), a = n.length > $, o = a ? n.slice(0, $) : n, s = a && /* @__PURE__ */ L("p", {
|
|
759
|
+
className: "px-4 sm:px-8 pb-8 text-[12px] font-medium text-foreground/45",
|
|
760
|
+
children: "The rest of this file is too long to show here — download it to read it all."
|
|
761
|
+
});
|
|
762
|
+
if (i === "csv" || i === "tsv") {
|
|
763
|
+
let [e, ...t] = ke(o, i === "tsv" ? " " : ",").slice(0, 2e3);
|
|
764
|
+
return /* @__PURE__ */ R("div", {
|
|
765
|
+
className: "absolute inset-0 overflow-auto",
|
|
766
|
+
children: [/* @__PURE__ */ R("table", {
|
|
767
|
+
className: "min-w-full text-[12.5px] border-separate border-spacing-0",
|
|
768
|
+
children: [e && /* @__PURE__ */ L("thead", {
|
|
769
|
+
className: "sticky top-0 z-10",
|
|
770
|
+
children: /* @__PURE__ */ L("tr", { children: e.map((e, t) => /* @__PURE__ */ L("th", {
|
|
771
|
+
className: "px-3 py-2 text-left font-bold text-foreground bg-[var(--panel-bg)] backdrop-blur-md border-b border-[var(--panel-border)] whitespace-nowrap",
|
|
772
|
+
children: e
|
|
773
|
+
}, t)) })
|
|
774
|
+
}), /* @__PURE__ */ L("tbody", { children: t.map((e, t) => /* @__PURE__ */ L("tr", {
|
|
775
|
+
className: "hover:bg-foreground/[0.03]",
|
|
776
|
+
children: e.map((e, t) => /* @__PURE__ */ L("td", {
|
|
777
|
+
className: "px-3 py-1.5 text-foreground/80 border-b border-[var(--panel-border)]/50 whitespace-nowrap",
|
|
778
|
+
children: e
|
|
779
|
+
}, t))
|
|
780
|
+
}, t)) })]
|
|
781
|
+
}), s]
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
let c = o;
|
|
785
|
+
if (i === "json") try {
|
|
786
|
+
c = JSON.stringify(JSON.parse(o), null, 2);
|
|
787
|
+
} catch {}
|
|
788
|
+
return /* @__PURE__ */ R("div", {
|
|
789
|
+
className: "absolute inset-0 overflow-auto",
|
|
790
|
+
children: [/* @__PURE__ */ L("pre", {
|
|
791
|
+
className: `m-0 mx-auto max-w-4xl p-4 sm:p-8 whitespace-pre-wrap break-words text-foreground/85 leading-relaxed ${Oe.has(i) ? "font-mono text-[12.5px]" : "font-sans text-[14px]"}`,
|
|
792
|
+
children: c
|
|
793
|
+
}), s]
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
function Pe({ src: e, type: t, title: n }) {
|
|
797
|
+
let r = F(null), [i, a] = I(16 / 9), [o, s] = I({
|
|
798
|
+
w: 0,
|
|
799
|
+
h: 0
|
|
800
|
+
});
|
|
801
|
+
P(() => {
|
|
802
|
+
let e = r.current;
|
|
803
|
+
if (!e) return;
|
|
804
|
+
let t = () => s({
|
|
805
|
+
w: e.clientWidth,
|
|
806
|
+
h: e.clientHeight
|
|
807
|
+
});
|
|
808
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
809
|
+
let n = new ResizeObserver(t);
|
|
810
|
+
return n.observe(e), () => n.disconnect();
|
|
811
|
+
}, []);
|
|
812
|
+
let c = o.w && o.h ? Math.min(o.w, o.h * i) : 0;
|
|
813
|
+
return /* @__PURE__ */ L("div", {
|
|
814
|
+
className: "absolute inset-0 p-3 sm:p-6",
|
|
815
|
+
children: /* @__PURE__ */ L("div", {
|
|
816
|
+
ref: r,
|
|
817
|
+
className: "w-full h-full flex items-center justify-center",
|
|
818
|
+
children: /* @__PURE__ */ L("div", {
|
|
819
|
+
style: c ? { width: c } : { width: "100%" },
|
|
820
|
+
children: /* @__PURE__ */ L(K, {
|
|
821
|
+
src: e,
|
|
822
|
+
type: t,
|
|
823
|
+
title: n,
|
|
824
|
+
aspect: String(i),
|
|
825
|
+
onRatio: a
|
|
826
|
+
})
|
|
827
|
+
})
|
|
828
|
+
})
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
function Fe({ kind: e, title: t, src: n, onDownload: r, busy: i, canDownload: a }) {
|
|
832
|
+
let c = O(t) || O(n), l = e === "link" ? "This is a link to another website." : e === "document" ? `${c ? `A ${c.toUpperCase()} file` : "This file"} opens in its own app — download it to read it.` : "This kind of file cannot be shown here. Download it to open it.";
|
|
833
|
+
return /* @__PURE__ */ L("div", {
|
|
834
|
+
className: "absolute inset-0 overflow-auto flex p-6",
|
|
835
|
+
children: /* @__PURE__ */ R("div", {
|
|
836
|
+
className: "m-auto flex flex-col items-center text-center max-w-sm gap-3",
|
|
837
|
+
children: [
|
|
838
|
+
/* @__PURE__ */ L("span", {
|
|
839
|
+
className: `${Y} w-16 h-16 rounded-2xl`,
|
|
840
|
+
children: /* @__PURE__ */ L(Se, {
|
|
841
|
+
kind: e,
|
|
842
|
+
name: t || n,
|
|
843
|
+
className: "w-7 h-7"
|
|
844
|
+
})
|
|
845
|
+
}),
|
|
846
|
+
/* @__PURE__ */ L("p", {
|
|
847
|
+
className: "text-[16px] font-bold text-foreground break-all",
|
|
848
|
+
children: t
|
|
849
|
+
}),
|
|
850
|
+
/* @__PURE__ */ L("p", {
|
|
851
|
+
className: "text-[13px] text-foreground/55 leading-relaxed",
|
|
852
|
+
children: l
|
|
853
|
+
}),
|
|
854
|
+
e === "link" ? /* @__PURE__ */ R("a", {
|
|
855
|
+
href: n,
|
|
856
|
+
target: "_blank",
|
|
857
|
+
rel: "noopener noreferrer",
|
|
858
|
+
className: "btn-primary inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-[13px] font-bold mt-1",
|
|
859
|
+
children: [/* @__PURE__ */ L(s, { className: "w-4 h-4" }), " Open it"]
|
|
860
|
+
}) : a ? /* @__PURE__ */ R("button", {
|
|
861
|
+
type: "button",
|
|
862
|
+
onClick: r,
|
|
863
|
+
disabled: i,
|
|
864
|
+
className: "btn-primary inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-[13px] font-bold mt-1 cursor-pointer",
|
|
865
|
+
children: [i ? /* @__PURE__ */ L(C, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ L(o, { className: "w-4 h-4" }), " Download"]
|
|
866
|
+
}) : null
|
|
867
|
+
]
|
|
868
|
+
})
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
function Ie({ src: e, name: t, type: n, height: i, className: a = "", draw: s = !0, download: c = !0, actions: l, onClose: u }) {
|
|
872
|
+
let d = ce(e, n), f = t || A(e), p = d === "pdf" || d === "text", m = F(null), h = F(null), y = F(null), [x, S] = I(null), [re, ie] = I(!1), [E, oe] = I(0), [se, D] = I(1), [k, le] = I("1"), [j, pe] = I(null), [M, ge] = I(null), [P, ve] = I(1), [z, B] = I(!1), [V, ye] = I("black"), [H, U] = I({}), [W, G] = I([]), [be, q] = I(!1), [J, xe] = I(!1);
|
|
873
|
+
N(() => {
|
|
874
|
+
if (!p) return;
|
|
875
|
+
let t = !1;
|
|
876
|
+
return me(e).then((e) => {
|
|
877
|
+
t || S(e);
|
|
878
|
+
}, () => {
|
|
879
|
+
t || ie(!0);
|
|
880
|
+
}), () => {
|
|
881
|
+
t = !0;
|
|
882
|
+
};
|
|
883
|
+
}, [e, p]), N(() => {
|
|
884
|
+
let e = () => xe(!!m.current && document.fullscreenElement === m.current);
|
|
885
|
+
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
886
|
+
}, []);
|
|
887
|
+
let Ce = d === "pdf" && !!x && !re && !j, X = Ce && E > 0 || d === "image" && !!M, we = s && X, Oe = W.length > 0, $ = he((e) => {
|
|
888
|
+
ve((t) => {
|
|
889
|
+
let n = Z.findIndex((e) => e >= t - .001);
|
|
890
|
+
return Z[Math.min(Z.length - 1, Math.max(0, (n < 0 ? 2 : n) + e))] ?? t;
|
|
891
|
+
});
|
|
892
|
+
}, []);
|
|
893
|
+
N(() => {
|
|
894
|
+
let e = h.current;
|
|
895
|
+
if (!e || !X) return;
|
|
896
|
+
let t = (e) => {
|
|
897
|
+
!e.ctrlKey && !e.metaKey || (e.preventDefault(), $(e.deltaY < 0 ? 1 : -1));
|
|
898
|
+
};
|
|
899
|
+
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
900
|
+
}, [X, $]);
|
|
901
|
+
let ke = (e, t) => {
|
|
902
|
+
U((n) => ({
|
|
903
|
+
...n,
|
|
904
|
+
[e]: [...n[e] || [], t]
|
|
905
|
+
})), G((t) => [...t, e]);
|
|
906
|
+
}, Ie = () => {
|
|
907
|
+
let e = W[W.length - 1];
|
|
908
|
+
e !== void 0 && (U((t) => ({
|
|
909
|
+
...t,
|
|
910
|
+
[e]: (t[e] || []).slice(0, -1)
|
|
911
|
+
})), G((e) => e.slice(0, -1)));
|
|
912
|
+
}, Le = () => {
|
|
913
|
+
U({}), G([]);
|
|
914
|
+
}, Re = (e) => {
|
|
915
|
+
let t = Math.min(E, Math.max(1, Math.round(e) || 1));
|
|
916
|
+
D(t), le(String(t)), y.current?.goTo(t);
|
|
917
|
+
}, ze = async () => {
|
|
918
|
+
q(!0);
|
|
919
|
+
try {
|
|
920
|
+
if (Oe && (d === "pdf" || d === "image")) {
|
|
921
|
+
let { bakePdf: t, bakeImage: n } = await import("./bake-naZeMu98.js");
|
|
922
|
+
fe(d === "pdf" && x ? await t(x, H) : await n(e, H[0] || []), Ae(f, d));
|
|
923
|
+
} else d === "video" || d === "audio" || d === "link" ? window.open(e, "_blank", "noopener,noreferrer") : fe(x || await me(e), f);
|
|
924
|
+
} catch {
|
|
925
|
+
window.open(e, "_blank", "noopener,noreferrer");
|
|
926
|
+
}
|
|
927
|
+
q(!1);
|
|
928
|
+
}, Be = () => {
|
|
929
|
+
document.fullscreenElement ? document.exitFullscreen().catch(() => {}) : m.current?.requestFullscreen?.().catch(() => {});
|
|
930
|
+
}, Ve = (e) => {
|
|
931
|
+
if (!e.target.closest("input, textarea, [role=\"slider\"], .fbos-video")) {
|
|
932
|
+
if (e.key === "Escape" && z) {
|
|
933
|
+
e.preventDefault(), B(!1);
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
!X || e.metaKey || e.ctrlKey || (e.key === "+" || e.key === "=" ? (e.preventDefault(), $(1)) : e.key === "-" ? (e.preventDefault(), $(-1)) : e.key === "0" && (e.preventDefault(), ve(1)));
|
|
937
|
+
}
|
|
938
|
+
}, He = [
|
|
939
|
+
ue[d],
|
|
940
|
+
E ? `${E} page${E === 1 ? "" : "s"}` : "",
|
|
941
|
+
M ? `${M.w} × ${M.h}` : ""
|
|
942
|
+
].filter(Boolean).join(" · "), Ue;
|
|
943
|
+
return Ue = d === "image" ? /* @__PURE__ */ L(Me, {
|
|
944
|
+
src: e,
|
|
945
|
+
alt: f,
|
|
946
|
+
zoom: P,
|
|
947
|
+
drawing: z,
|
|
948
|
+
ink: V,
|
|
949
|
+
strokes: H[0] || [],
|
|
950
|
+
onStroke: (e) => ke(0, e),
|
|
951
|
+
onSize: (e, t) => ge({
|
|
952
|
+
w: e,
|
|
953
|
+
h: t
|
|
954
|
+
})
|
|
955
|
+
}) : d === "video" || d === "audio" ? d === "audio" ? /* @__PURE__ */ L("div", {
|
|
956
|
+
className: "absolute inset-0 flex p-6",
|
|
957
|
+
children: /* @__PURE__ */ L("div", {
|
|
958
|
+
className: "m-auto w-full max-w-lg",
|
|
959
|
+
children: /* @__PURE__ */ L(K, {
|
|
960
|
+
src: e,
|
|
961
|
+
type: n,
|
|
962
|
+
title: f
|
|
963
|
+
})
|
|
964
|
+
})
|
|
965
|
+
}) : /* @__PURE__ */ L(Pe, {
|
|
966
|
+
src: e,
|
|
967
|
+
type: n,
|
|
968
|
+
title: f
|
|
969
|
+
}) : p && re ? /* @__PURE__ */ L("iframe", {
|
|
970
|
+
src: e,
|
|
971
|
+
title: f,
|
|
972
|
+
className: "absolute inset-0 w-full h-full border-0 bg-white"
|
|
973
|
+
}) : d === "pdf" && j ? /* @__PURE__ */ L("div", {
|
|
974
|
+
className: "absolute inset-0 flex p-6",
|
|
975
|
+
children: /* @__PURE__ */ R("div", {
|
|
976
|
+
className: "m-auto flex flex-col items-center text-center gap-3 max-w-sm",
|
|
977
|
+
children: [
|
|
978
|
+
/* @__PURE__ */ L("span", {
|
|
979
|
+
className: `${Y} w-14 h-14 rounded-2xl`,
|
|
980
|
+
children: j === "locked" ? /* @__PURE__ */ L(ne, { className: "w-6 h-6" }) : /* @__PURE__ */ L(Se, {
|
|
981
|
+
kind: "pdf",
|
|
982
|
+
className: "w-6 h-6"
|
|
983
|
+
})
|
|
984
|
+
}),
|
|
985
|
+
/* @__PURE__ */ L("p", {
|
|
986
|
+
className: "text-[14px] font-semibold text-foreground",
|
|
987
|
+
children: j === "locked" ? "This PDF is locked with a password." : "This PDF could not be opened here."
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ L("p", {
|
|
990
|
+
className: "text-[13px] text-foreground/55",
|
|
991
|
+
children: "Download it to open it on your own device."
|
|
992
|
+
})
|
|
993
|
+
]
|
|
994
|
+
})
|
|
995
|
+
}) : d === "pdf" ? x ? /* @__PURE__ */ L(Te, {
|
|
996
|
+
ref: y,
|
|
997
|
+
data: x,
|
|
998
|
+
zoom: P,
|
|
999
|
+
drawing: z,
|
|
1000
|
+
ink: V,
|
|
1001
|
+
strokes: H,
|
|
1002
|
+
onStroke: ke,
|
|
1003
|
+
onReady: (e) => oe(e),
|
|
1004
|
+
onPage: (e) => {
|
|
1005
|
+
D(e), le(String(e));
|
|
1006
|
+
},
|
|
1007
|
+
onFail: pe
|
|
1008
|
+
}) : /* @__PURE__ */ L(je, {}) : d === "text" ? x ? /* @__PURE__ */ L(Ne, {
|
|
1009
|
+
blob: x,
|
|
1010
|
+
name: O(f) ? f : A(e)
|
|
1011
|
+
}) : /* @__PURE__ */ L(je, {}) : /* @__PURE__ */ L(Fe, {
|
|
1012
|
+
kind: d,
|
|
1013
|
+
title: f,
|
|
1014
|
+
src: e,
|
|
1015
|
+
onDownload: ze,
|
|
1016
|
+
busy: be,
|
|
1017
|
+
canDownload: c
|
|
1018
|
+
}), /* @__PURE__ */ R("div", {
|
|
1019
|
+
ref: m,
|
|
1020
|
+
tabIndex: -1,
|
|
1021
|
+
onKeyDown: Ve,
|
|
1022
|
+
className: `fbos-file-viewer relative flex flex-col w-full overflow-hidden bg-background border border-[var(--panel-border)] shadow-2xl outline-none ${J ? "" : "rounded-2xl sm:rounded-3xl"} ${a}`,
|
|
1023
|
+
style: { height: J ? "100vh" : i ?? "min(80vh, 760px)" },
|
|
1024
|
+
children: [
|
|
1025
|
+
/* @__PURE__ */ L("div", {
|
|
1026
|
+
"aria-hidden": !0,
|
|
1027
|
+
className: "pointer-events-none absolute top-0 inset-x-0 h-[2px] z-20 bg-gradient-to-r from-transparent via-accent/60 to-transparent"
|
|
1028
|
+
}),
|
|
1029
|
+
/* @__PURE__ */ R("div", {
|
|
1030
|
+
className: "relative z-10 shrink-0 flex items-center gap-1.5 sm:gap-2 h-14 px-2.5 sm:px-3.5 border-b border-[var(--panel-border)]/60 bg-background/85 backdrop-blur-md",
|
|
1031
|
+
children: [
|
|
1032
|
+
/* @__PURE__ */ L("span", {
|
|
1033
|
+
className: "max-sm:hidden shrink-0",
|
|
1034
|
+
children: /* @__PURE__ */ L("span", {
|
|
1035
|
+
className: `${Y} w-9 h-9`,
|
|
1036
|
+
children: /* @__PURE__ */ L(Se, {
|
|
1037
|
+
kind: d,
|
|
1038
|
+
name: f
|
|
1039
|
+
})
|
|
1040
|
+
})
|
|
1041
|
+
}),
|
|
1042
|
+
/* @__PURE__ */ R("div", {
|
|
1043
|
+
className: "flex flex-col min-w-0 flex-1 mr-1",
|
|
1044
|
+
children: [/* @__PURE__ */ L("span", {
|
|
1045
|
+
className: "text-[13.5px] sm:text-[14px] font-bold text-foreground truncate leading-tight",
|
|
1046
|
+
title: f,
|
|
1047
|
+
children: f
|
|
1048
|
+
}), /* @__PURE__ */ L("span", {
|
|
1049
|
+
className: "text-[11px] sm:text-[11.5px] font-medium text-foreground/45 truncate leading-tight mt-0.5",
|
|
1050
|
+
children: He
|
|
1051
|
+
})]
|
|
1052
|
+
}),
|
|
1053
|
+
Ce && E > 1 && /* @__PURE__ */ R("div", {
|
|
1054
|
+
className: `${Ee} inline-flex`,
|
|
1055
|
+
children: [
|
|
1056
|
+
/* @__PURE__ */ L("span", {
|
|
1057
|
+
className: "max-sm:hidden",
|
|
1058
|
+
children: /* @__PURE__ */ L("button", {
|
|
1059
|
+
type: "button",
|
|
1060
|
+
className: De,
|
|
1061
|
+
onClick: () => Re(se - 1),
|
|
1062
|
+
disabled: se <= 1,
|
|
1063
|
+
"aria-label": "Previous page",
|
|
1064
|
+
children: /* @__PURE__ */ L(v, { className: "w-4 h-4" })
|
|
1065
|
+
})
|
|
1066
|
+
}),
|
|
1067
|
+
/* @__PURE__ */ R("span", {
|
|
1068
|
+
className: "flex items-center gap-1 px-1.5 text-[12.5px] font-semibold text-foreground/70 tabular-nums",
|
|
1069
|
+
children: [/* @__PURE__ */ L("input", {
|
|
1070
|
+
value: k,
|
|
1071
|
+
onChange: (e) => le(e.target.value.replace(/\D/g, "")),
|
|
1072
|
+
onBlur: () => Re(Number(k)),
|
|
1073
|
+
onKeyDown: (e) => {
|
|
1074
|
+
e.key === "Enter" && Re(Number(k));
|
|
1075
|
+
},
|
|
1076
|
+
"aria-label": "Page",
|
|
1077
|
+
inputMode: "numeric",
|
|
1078
|
+
className: "no-glow w-7 h-7 text-center rounded-md bg-transparent outline-none focus:bg-foreground/[0.06] text-foreground"
|
|
1079
|
+
}), /* @__PURE__ */ R("span", {
|
|
1080
|
+
className: "text-foreground/40",
|
|
1081
|
+
children: ["/ ", E]
|
|
1082
|
+
})]
|
|
1083
|
+
}),
|
|
1084
|
+
/* @__PURE__ */ L("span", {
|
|
1085
|
+
className: "max-sm:hidden",
|
|
1086
|
+
children: /* @__PURE__ */ L("button", {
|
|
1087
|
+
type: "button",
|
|
1088
|
+
className: De,
|
|
1089
|
+
onClick: () => Re(se + 1),
|
|
1090
|
+
disabled: se >= E,
|
|
1091
|
+
"aria-label": "Next page",
|
|
1092
|
+
children: /* @__PURE__ */ L(ee, { className: "w-4 h-4" })
|
|
1093
|
+
})
|
|
1094
|
+
})
|
|
1095
|
+
]
|
|
1096
|
+
}),
|
|
1097
|
+
X && /* @__PURE__ */ R("div", {
|
|
1098
|
+
className: `${Ee} max-sm:hidden sm:inline-flex`,
|
|
1099
|
+
children: [
|
|
1100
|
+
/* @__PURE__ */ L("button", {
|
|
1101
|
+
type: "button",
|
|
1102
|
+
className: De,
|
|
1103
|
+
onClick: () => $(-1),
|
|
1104
|
+
disabled: P <= Z[0],
|
|
1105
|
+
"aria-label": "Zoom out",
|
|
1106
|
+
children: /* @__PURE__ */ L(w, { className: "w-4 h-4" })
|
|
1107
|
+
}),
|
|
1108
|
+
/* @__PURE__ */ R("button", {
|
|
1109
|
+
type: "button",
|
|
1110
|
+
onClick: () => ve(1),
|
|
1111
|
+
title: "Fit to the window",
|
|
1112
|
+
className: "min-w-[48px] h-8 px-1 rounded-lg text-[12px] font-semibold text-foreground/70 tabular-nums hover:bg-foreground/[0.06] cursor-pointer",
|
|
1113
|
+
children: [Math.round(P * 100), "%"]
|
|
1114
|
+
}),
|
|
1115
|
+
/* @__PURE__ */ L("button", {
|
|
1116
|
+
type: "button",
|
|
1117
|
+
className: De,
|
|
1118
|
+
onClick: () => $(1),
|
|
1119
|
+
disabled: P >= Z[Z.length - 1],
|
|
1120
|
+
"aria-label": "Zoom in",
|
|
1121
|
+
children: /* @__PURE__ */ L(ae, { className: "w-4 h-4" })
|
|
1122
|
+
})
|
|
1123
|
+
]
|
|
1124
|
+
}),
|
|
1125
|
+
we && /* @__PURE__ */ R("button", {
|
|
1126
|
+
type: "button",
|
|
1127
|
+
onClick: () => B((e) => !e),
|
|
1128
|
+
"aria-pressed": z,
|
|
1129
|
+
title: z ? "Stop drawing" : "Draw on it",
|
|
1130
|
+
className: `${Q} ${z ? "!text-accent bg-accent/10 hover:bg-accent/15" : ""}`,
|
|
1131
|
+
children: [/* @__PURE__ */ L(_, { className: "w-4 h-4" }), /* @__PURE__ */ L("span", {
|
|
1132
|
+
className: "max-md:hidden",
|
|
1133
|
+
children: "Draw"
|
|
1134
|
+
})]
|
|
1135
|
+
}),
|
|
1136
|
+
c && d !== "link" && /* @__PURE__ */ R("button", {
|
|
1137
|
+
type: "button",
|
|
1138
|
+
onClick: ze,
|
|
1139
|
+
disabled: be,
|
|
1140
|
+
title: Oe ? "Download with your drawing" : "Download",
|
|
1141
|
+
className: Q,
|
|
1142
|
+
children: [be ? /* @__PURE__ */ L(C, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ L(o, { className: "w-4 h-4" }), /* @__PURE__ */ L("span", {
|
|
1143
|
+
className: "max-md:hidden",
|
|
1144
|
+
children: "Download"
|
|
1145
|
+
})]
|
|
1146
|
+
}),
|
|
1147
|
+
!u && typeof document < "u" && document.fullscreenEnabled && /* @__PURE__ */ L("span", {
|
|
1148
|
+
className: "max-sm:hidden",
|
|
1149
|
+
children: /* @__PURE__ */ L("button", {
|
|
1150
|
+
type: "button",
|
|
1151
|
+
onClick: Be,
|
|
1152
|
+
"aria-label": J ? "Leave full screen" : "Full screen",
|
|
1153
|
+
className: Q,
|
|
1154
|
+
children: L(J ? te : g, { className: "w-4 h-4" })
|
|
1155
|
+
})
|
|
1156
|
+
}),
|
|
1157
|
+
l,
|
|
1158
|
+
u && /* @__PURE__ */ R(_e, { children: [/* @__PURE__ */ L("span", {
|
|
1159
|
+
"aria-hidden": !0,
|
|
1160
|
+
className: "w-px h-6 bg-[var(--panel-border)] mx-0.5"
|
|
1161
|
+
}), /* @__PURE__ */ L("button", {
|
|
1162
|
+
type: "button",
|
|
1163
|
+
onClick: u,
|
|
1164
|
+
"aria-label": "Close",
|
|
1165
|
+
className: Q,
|
|
1166
|
+
children: /* @__PURE__ */ L(T, { className: "w-[18px] h-[18px]" })
|
|
1167
|
+
})] })
|
|
1168
|
+
]
|
|
1169
|
+
}),
|
|
1170
|
+
/* @__PURE__ */ R("div", {
|
|
1171
|
+
ref: h,
|
|
1172
|
+
className: "relative flex-1 min-h-0 bg-foreground/[0.035]",
|
|
1173
|
+
children: [Ue, z && /* @__PURE__ */ R("div", {
|
|
1174
|
+
className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex items-center gap-0.5 p-1.5 rounded-full border border-[var(--panel-border)] bg-background shadow-2xl dark:bg-[color-mix(in_srgb,var(--accent-color)_9%,var(--bg-color))] dark:border-accent/30",
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ L("span", {
|
|
1177
|
+
"aria-hidden": !0,
|
|
1178
|
+
className: "pointer-events-none absolute top-0 inset-x-4 h-px bg-gradient-to-r from-transparent via-accent/60 to-transparent"
|
|
1179
|
+
}),
|
|
1180
|
+
de.map((e) => /* @__PURE__ */ L("button", {
|
|
1181
|
+
type: "button",
|
|
1182
|
+
onClick: () => ye(e.id),
|
|
1183
|
+
"aria-label": e.label,
|
|
1184
|
+
"aria-pressed": V === e.id,
|
|
1185
|
+
title: e.label,
|
|
1186
|
+
className: `w-8 h-8 rounded-full flex items-center justify-center cursor-pointer transition-colors ${V === e.id ? "bg-foreground/[0.08]" : "hover:bg-foreground/5"}`,
|
|
1187
|
+
children: /* @__PURE__ */ L("span", {
|
|
1188
|
+
className: `block ${e.id === "marker" ? "w-5 h-2.5 rounded-sm" : "w-4 h-4 rounded-full"} border border-foreground/25 ring-2 ring-offset-2 ring-offset-background ${V === e.id ? "ring-accent" : "ring-transparent"}`,
|
|
1189
|
+
style: {
|
|
1190
|
+
background: e.color,
|
|
1191
|
+
opacity: e.id === "marker" ? .85 : 1
|
|
1192
|
+
}
|
|
1193
|
+
})
|
|
1194
|
+
}, e.id)),
|
|
1195
|
+
/* @__PURE__ */ L("span", {
|
|
1196
|
+
"aria-hidden": !0,
|
|
1197
|
+
className: "w-px h-5 bg-[var(--panel-border)] mx-1"
|
|
1198
|
+
}),
|
|
1199
|
+
/* @__PURE__ */ L("button", {
|
|
1200
|
+
type: "button",
|
|
1201
|
+
onClick: Ie,
|
|
1202
|
+
disabled: !Oe,
|
|
1203
|
+
"aria-label": "Undo",
|
|
1204
|
+
title: "Undo",
|
|
1205
|
+
className: `${Q} !h-8 !min-w-8 !rounded-full`,
|
|
1206
|
+
children: /* @__PURE__ */ L(b, { className: "w-4 h-4" })
|
|
1207
|
+
}),
|
|
1208
|
+
/* @__PURE__ */ L("button", {
|
|
1209
|
+
type: "button",
|
|
1210
|
+
onClick: Le,
|
|
1211
|
+
disabled: !Oe,
|
|
1212
|
+
"aria-label": "Clear the drawing",
|
|
1213
|
+
title: "Clear the drawing",
|
|
1214
|
+
className: `${Q} !h-8 !min-w-8 !rounded-full hover:!text-red-500`,
|
|
1215
|
+
children: /* @__PURE__ */ L(r, { className: "w-4 h-4" })
|
|
1216
|
+
}),
|
|
1217
|
+
/* @__PURE__ */ L("button", {
|
|
1218
|
+
type: "button",
|
|
1219
|
+
onClick: () => B(!1),
|
|
1220
|
+
className: "btn-primary ml-1 h-8 px-3.5 rounded-full text-[12.5px] font-bold cursor-pointer",
|
|
1221
|
+
children: "Done"
|
|
1222
|
+
})
|
|
1223
|
+
]
|
|
1224
|
+
})]
|
|
1225
|
+
})
|
|
1226
|
+
]
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
function Le(e) {
|
|
1230
|
+
return /* @__PURE__ */ L(Ie, { ...e }, e.src);
|
|
1231
|
+
}
|
|
1232
|
+
//#endregion
|
|
1233
|
+
//#region src/components/media/FileViewerPopup.tsx
|
|
1234
|
+
function Re({ open: e, onClose: r, ...i }) {
|
|
1235
|
+
return N(() => {
|
|
1236
|
+
if (!e) return;
|
|
1237
|
+
let t = (e) => {
|
|
1238
|
+
e.key === "Escape" && !e.defaultPrevented && r();
|
|
1239
|
+
};
|
|
1240
|
+
window.addEventListener("keydown", t);
|
|
1241
|
+
let n = document.body.style.overflow;
|
|
1242
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1243
|
+
window.removeEventListener("keydown", t), document.body.style.overflow = n;
|
|
1244
|
+
};
|
|
1245
|
+
}, [e, r]), typeof document > "u" ? null : ve(/* @__PURE__ */ L(t, { children: e && i.src && /* @__PURE__ */ R("div", {
|
|
1246
|
+
role: "dialog",
|
|
1247
|
+
"aria-modal": "true",
|
|
1248
|
+
"aria-label": i.name || A(i.src),
|
|
1249
|
+
className: "fixed inset-0 z-[9999] flex items-center justify-center p-2 sm:p-4 md:p-8",
|
|
1250
|
+
children: [/* @__PURE__ */ L(n.div, {
|
|
1251
|
+
onClick: r,
|
|
1252
|
+
initial: { opacity: 0 },
|
|
1253
|
+
animate: { opacity: 1 },
|
|
1254
|
+
exit: { opacity: 0 },
|
|
1255
|
+
className: "absolute inset-0 bg-background/80 backdrop-blur-xl cursor-pointer"
|
|
1256
|
+
}), /* @__PURE__ */ L(n.div, {
|
|
1257
|
+
initial: {
|
|
1258
|
+
opacity: 0,
|
|
1259
|
+
scale: .97,
|
|
1260
|
+
y: 8
|
|
1261
|
+
},
|
|
1262
|
+
animate: {
|
|
1263
|
+
opacity: 1,
|
|
1264
|
+
scale: 1,
|
|
1265
|
+
y: 0
|
|
1266
|
+
},
|
|
1267
|
+
exit: {
|
|
1268
|
+
opacity: 0,
|
|
1269
|
+
scale: .97,
|
|
1270
|
+
y: 8
|
|
1271
|
+
},
|
|
1272
|
+
transition: { duration: .18 },
|
|
1273
|
+
className: "relative z-10 w-full max-w-6xl h-full max-h-[min(92vh,1000px)]",
|
|
1274
|
+
children: /* @__PURE__ */ L(Le, {
|
|
1275
|
+
...i,
|
|
1276
|
+
onClose: r,
|
|
1277
|
+
height: "100%"
|
|
1278
|
+
})
|
|
1279
|
+
})]
|
|
1280
|
+
}) }), document.body);
|
|
1281
|
+
}
|
|
1282
|
+
//#endregion
|
|
1283
|
+
export { K as a, Se as i, Le as n, Y as r, Re as t };
|