@nxgt/material 3.6.0 → 3.7.1

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 (97) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +46 -1
  3. package/dist/{button-1Fornjtn.js → button--cF4gY14.js} +1 -1
  4. package/dist/charts.js +1 -1
  5. package/dist/{code-editor-DeZYlIO2.js → code-editor-0CdGwKDg.js} +3 -3
  6. package/dist/code-editor.js +3 -3
  7. package/dist/{code-language-items-Bb7afEj-.js → code-language-items-CGARRbVm.js} +1 -1
  8. package/dist/components/animations/scroll.css +1 -1
  9. package/dist/components/base-content.css +1 -1
  10. package/dist/components/base.css +1 -1
  11. package/dist/components/components.css +2 -0
  12. package/dist/components/editor-field-expressive.css +5 -0
  13. package/dist/components/editor-prose.css +1 -1
  14. package/dist/components/theme-tokens.css +17 -4
  15. package/dist/components/ui/display/period-cards/period-cards.css +2 -2
  16. package/dist/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  17. package/dist/components/ui/widgets/drawing/drawing-animate.css +123 -0
  18. package/dist/components/ui/widgets/drawing/drawing.css +459 -0
  19. package/dist/{components-BCYZgeoV.js → components-bYGPzyKd.js} +761 -761
  20. package/dist/components.js +18 -18
  21. package/dist/{dialog-JQT6iETD.js → dialog-DdJ1C4BR.js} +168 -168
  22. package/dist/dnd.js +1 -1
  23. package/dist/draw-animate.js +106 -0
  24. package/dist/draw-png.js +2 -0
  25. package/dist/draw-sketch.js +38 -0
  26. package/dist/draw.js +65 -0
  27. package/dist/drawing-B8VuG7nx.js +390 -0
  28. package/dist/drawing-context-CeKeZE6b.js +10 -0
  29. package/dist/{dropdown-menu-DiZvX4tG.js → dropdown-menu-DWtgUVW7.js} +1 -1
  30. package/dist/editor-viewer.js +1 -1
  31. package/dist/editor.js +120 -120
  32. package/dist/{empty-state-Cpvsmk0R.js → empty-state-CRWLQ1sM.js} +2 -2
  33. package/dist/{icon-badge-C30yKsAM.js → icon-badge-Bb5-73XP.js} +18 -18
  34. package/dist/{icon-button-BXlI3DJ_.js → icon-button-5A6Mrj6w.js} +60 -90
  35. package/dist/lib/components/ui/display/shape/use-shape-morph.d.ts +1 -0
  36. package/dist/lib/components/ui/widgets/drawing/drawing-a11y.d.ts +20 -0
  37. package/dist/lib/components/ui/widgets/drawing/drawing-context.d.ts +23 -0
  38. package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +63 -0
  39. package/dist/lib/components/ui/widgets/drawing/drawing.d.ts +17 -0
  40. package/dist/lib/components/ui/widgets/drawing/index.d.ts +5 -0
  41. package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +17 -0
  42. package/dist/lib/components/ui/widgets/drawing/partials/interactive-node.d.ts +22 -0
  43. package/dist/lib/components/ui/widgets/drawing/partials/primitives/content.d.ts +20 -0
  44. package/dist/lib/components/ui/widgets/drawing/partials/primitives/path.d.ts +29 -0
  45. package/dist/lib/components/ui/widgets/drawing/partials/primitives/primitive.d.ts +19 -0
  46. package/dist/lib/components/ui/widgets/drawing/partials/primitives/shapes.d.ts +18 -0
  47. package/dist/lib/components/ui/widgets/drawing/partials/react-attrs.d.ts +5 -0
  48. package/dist/lib/components/ui/widgets/drawing/partials/ring.d.ts +9 -0
  49. package/dist/lib/components/ui/widgets/drawing/partials/svg-tree.d.ts +29 -0
  50. package/dist/lib/components/ui/widgets/drawing/use-exact-text.d.ts +16 -0
  51. package/dist/lib/draw/index.d.ts +32 -0
  52. package/dist/lib/draw-animate/index.d.ts +19 -0
  53. package/dist/lib/draw-animate/morph-drawing.d.ts +32 -0
  54. package/dist/lib/draw-animate/reduced-motion.d.ts +2 -0
  55. package/dist/lib/draw-animate/use-drawing-controls.d.ts +27 -0
  56. package/dist/lib/draw-animate/use-scene-morph.d.ts +15 -0
  57. package/dist/lib/draw-png/index.d.ts +11 -0
  58. package/dist/lib/draw-sketch/index.d.ts +17 -0
  59. package/dist/lib/draw-sketch/sketch.d.ts +19 -0
  60. package/dist/lib/print/components/print-drawing.d.ts +16 -0
  61. package/dist/lib/print/index.d.ts +2 -1
  62. package/dist/main.js +23 -23
  63. package/dist/map.js +63 -63
  64. package/dist/material.css +1 -1
  65. package/dist/pdf-reader.js +1 -1
  66. package/dist/print.js +123 -115
  67. package/dist/{public-Cde8_SN8.js → public-SsiazLEv.js} +743 -743
  68. package/dist/{render-json-BwJX1jZ2.js → render-json-DyFYFIkZ.js} +1 -1
  69. package/dist/{rich-code-block-yxMXBuGd.js → rich-code-block-CwNwQs5z.js} +3 -3
  70. package/dist/{rich-text-viewer-Bq-2vTVm.js → rich-text-viewer-LO1IZCWs.js} +1 -1
  71. package/dist/{sortable-provider-DYlpq8lP.js → sortable-provider-BvD98s8Y.js} +19 -19
  72. package/dist/{spinner-D-FE_mTW.js → spinner-CtGCPza-.js} +4 -4
  73. package/dist/styles.css +1 -0
  74. package/dist/{toolbar-items-DnkS3bDY.js → toolbar-items-DsDDD5AY.js} +1 -1
  75. package/dist/{use-chat-composer-BwpSgP_D.js → use-chat-composer-DZ01a16D.js} +923 -922
  76. package/dist/use-shape-morph-BKA_R5P5.js +35 -0
  77. package/docs/README.md +1 -0
  78. package/docs/components/rich-widgets.md +196 -0
  79. package/docs/guides/drawing.md +499 -0
  80. package/docs/guides/printing.md +47 -0
  81. package/docs/guides/theming.md +3 -2
  82. package/docs/previews/rich-widgets-drawing.webp +0 -0
  83. package/docs/roadmap.md +17 -0
  84. package/docs/troubleshooting.md +145 -1
  85. package/lib/components/animations/scroll.css +1 -1
  86. package/lib/components/base-content.css +1 -1
  87. package/lib/components/base.css +1 -1
  88. package/lib/components/components.css +2 -0
  89. package/lib/components/editor-field-expressive.css +5 -0
  90. package/lib/components/editor-prose.css +1 -1
  91. package/lib/components/theme-tokens.css +17 -4
  92. package/lib/components/ui/display/period-cards/period-cards.css +2 -2
  93. package/lib/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  94. package/lib/components/ui/widgets/drawing/drawing-animate.css +123 -0
  95. package/lib/components/ui/widgets/drawing/drawing.css +459 -0
  96. package/lib/styles.css +1 -0
  97. package/package.json +22 -2
@@ -1,77 +1,77 @@
1
1
  import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
2
  import { n as t } from "./ui.utils-CAnKTCw5.js";
3
3
  import { t as n } from "./utils-Bcd2Z3ea.js";
4
- import { n as r, t as i } from "./icon-button-BXlI3DJ_.js";
5
- import { A as a, E as o, M as s, O as c, R as l, a as u, k as d, o as f, w as p } from "./tooltip-tmFoTU_d.js";
6
- import { $ as m, c as h, d as g, f as _, i as v, l as y, n as b, o as x, t as S, u as C } from "./dropdown-menu-DiZvX4tG.js";
7
- import { r as ee, t as te } from "./in-dialog-AiwTD3DK.js";
8
- import { C as w, D as T, E, O as ne, S as re, T as ie, _ as ae, f as oe, g as se, k as ce, r as le, t as ue, u as de, w as fe } from "./dialog-JQT6iETD.js";
9
- import { S as pe, a as D, d as O, g as me, h as he, i as ge, m as _e, n as k, r as ve, t as A, u as ye, w as be } from "./toolbar-items-DnkS3bDY.js";
4
+ import { A as r, E as i, M as a, O as o, R as s, a as c, k as l, o as u, w as d } from "./tooltip-tmFoTU_d.js";
5
+ import { $ as f, c as p, d as m, f as h, i as g, l as _, n as v, o as y, t as b, u as x } from "./dropdown-menu-DWtgUVW7.js";
6
+ import { r as S, t as ee } from "./in-dialog-AiwTD3DK.js";
7
+ import { C, D as w, E as T, O as te, S as E, T as ne, _ as re, f as ie, g as ae, k as oe, r as se, t as ce, u as le, w as ue } from "./dialog-DdJ1C4BR.js";
8
+ import { S as de, a as D, d as O, g as fe, h as pe, i as me, m as he, n as k, r as ge, t as A, u as _e, w as ve } from "./toolbar-items-DsDDD5AY.js";
10
9
  import { t as j } from "./use-material-translation-hLQzOjF0.js";
11
- import { t as xe } from "./button-1Fornjtn.js";
12
- import { t as Se } from "./useEvent-2fKq-6w8.js";
13
- import { i as Ce, n as we, r as Te, t as Ee } from "./empty-state-Cpvsmk0R.js";
14
- import { n as De } from "./use-slice-reducer-0r5dXnJe.js";
15
- import { r as Oe } from "./use-csp-nonce-ZKs9k-ov.js";
16
- import { t as ke } from "./client-only.utils-lQ7GqP8w.js";
17
- import { t as Ae } from "./use-scroll-away-PQRFZkT2.js";
18
- import { ArrowLeft as je, BookOpenText as Me, ChevronDown as Ne, ChevronLeft as Pe, ChevronRight as Fe, ChevronUp as Ie, Download as Le, Eraser as Re, FileText as ze, FileWarning as Be, FileX2 as Ve, Highlighter as He, KeyRound as Ue, LayoutGrid as We, List as Ge, Loader2 as Ke, Maximize as qe, MessageSquareText as Je, Minimize as Ye, MoreVertical as Xe, MousePointer2 as Ze, MoveHorizontal as Qe, PanelLeft as $e, Pen as et, PencilLine as tt, Printer as nt, RotateCw as rt, Search as it, StickyNote as at, Type as ot, Underline as st, Undo2 as ct, Volume2 as lt, X as ut, XIcon as dt, ZoomIn as ft, ZoomOut as pt } from "lucide-react";
19
- import * as M from "react";
20
- import { createContext as mt, memo as ht, useCallback as N, useContext as gt, useEffect as P, useId as _t, useLayoutEffect as F, useMemo as I, useReducer as vt, useRef as L, useState as R, useSyncExternalStore as yt } from "react";
21
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
22
- import { flushSync as bt } from "react-dom";
23
- import { createSlice as xt } from "@reduxjs/toolkit";
24
- import { STATE_ACTION_KEYS as H, describeError as St, stateCopy as Ct } from "@nxgt/material-core/states";
25
- import { formatFileSize as wt } from "@nxgt/material-core/format-file-size";
26
- import { anchorAt as Tt, applyPageHighlight as Et, classifyPdfError as Dt, createPdfLinkService as Ot, layoutSpreads as kt, mountedPages as At, offsetOf as jt, openPdfDocument as Mt, pageAtOffset as Nt, planRender as Pt, renderPageToCanvas as Ft, rowStarts as It } from "@nxgt/material-core/pdf-reader";
27
- import { DEFAULT_PAGE_SIZE as Lt, FIT_PAGES as Rt, createPageSizesLoader as zt, fitScale as Bt, hitAt as Vt, labelLinkAnchors as Ht, mapPdfOutline as Ut, placeholderSize as Wt, readerFitScale as Gt, resolveDestinationPage as Kt, revealHit as qt, rotatedSize as Jt, searchDocument as Yt, stepHit as Xt, withPageMatches as Zt } from "@nxgt/material-core/pdf-viewer";
28
- import { resolvePdfFileName as Qt } from "@nxgt/material-core/pdf-file-name";
29
- import { downloadPdfFile as $t, printPdfFile as en } from "@nxgt/material-core/pdf-download";
30
- import { pdfSourceKey as tn, toPdfjsParams as nn } from "@nxgt/material-core/pdf-source";
10
+ import { t as M } from "./button--cF4gY14.js";
11
+ import { n as ye, t as be } from "./icon-button-5A6Mrj6w.js";
12
+ import { t as xe } from "./useEvent-2fKq-6w8.js";
13
+ import { i as Se, n as Ce, r as we, t as Te } from "./empty-state-CRWLQ1sM.js";
14
+ import { n as Ee } from "./use-slice-reducer-0r5dXnJe.js";
15
+ import { r as De } from "./use-csp-nonce-ZKs9k-ov.js";
16
+ import { t as Oe } from "./client-only.utils-lQ7GqP8w.js";
17
+ import { t as ke } from "./use-scroll-away-PQRFZkT2.js";
18
+ import { ArrowLeft as Ae, BookOpenText as je, ChevronDown as Me, ChevronLeft as Ne, ChevronRight as Pe, ChevronUp as Fe, Download as Ie, Eraser as Le, FileText as Re, FileWarning as ze, FileX2 as Be, Highlighter as Ve, KeyRound as He, LayoutGrid as Ue, List as We, Loader2 as Ge, Maximize as Ke, MessageSquareText as qe, Minimize as Je, MoreVertical as Ye, MousePointer2 as Xe, MoveHorizontal as Ze, PanelLeft as Qe, Pen as $e, PencilLine as et, Printer as tt, RotateCw as nt, Search as rt, StickyNote as it, Type as at, Underline as ot, Undo2 as st, Volume2 as ct, X as lt, XIcon as ut, ZoomIn as dt, ZoomOut as ft } from "lucide-react";
19
+ import * as N from "react";
20
+ import { createContext as pt, memo as mt, useCallback as P, useContext as ht, useEffect as F, useId as gt, useLayoutEffect as I, useMemo as L, useReducer as _t, useRef as R, useState as z, useSyncExternalStore as vt } from "react";
21
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
22
+ import { flushSync as yt } from "react-dom";
23
+ import { createSlice as bt } from "@reduxjs/toolkit";
24
+ import { STATE_ACTION_KEYS as U, describeError as xt, stateCopy as St } from "@nxgt/material-core/states";
25
+ import { formatFileSize as Ct } from "@nxgt/material-core/format-file-size";
26
+ import { anchorAt as wt, applyPageHighlight as Tt, classifyPdfError as Et, createPdfLinkService as Dt, layoutSpreads as Ot, mountedPages as kt, offsetOf as At, openPdfDocument as jt, pageAtOffset as Mt, planRender as Nt, renderPageToCanvas as Pt, rowStarts as Ft } from "@nxgt/material-core/pdf-reader";
27
+ import { DEFAULT_PAGE_SIZE as It, FIT_PAGES as Lt, createPageSizesLoader as Rt, fitScale as zt, hitAt as Bt, labelLinkAnchors as Vt, mapPdfOutline as Ht, placeholderSize as Ut, readerFitScale as Wt, resolveDestinationPage as Gt, revealHit as Kt, rotatedSize as qt, searchDocument as Jt, stepHit as Yt, withPageMatches as Xt } from "@nxgt/material-core/pdf-viewer";
28
+ import { resolvePdfFileName as Zt } from "@nxgt/material-core/pdf-file-name";
29
+ import { downloadPdfFile as Qt, printPdfFile as $t } from "@nxgt/material-core/pdf-download";
30
+ import { pdfSourceKey as en, toPdfjsParams as tn } from "@nxgt/material-core/pdf-source";
31
31
  //#region ../../node_modules/@radix-ui/number/dist/index.mjs
32
- var rn = Object.defineProperty, an = (e, t) => rn(e, "name", {
32
+ var nn = Object.defineProperty, rn = (e, t) => nn(e, "name", {
33
33
  value: t,
34
34
  configurable: !0
35
35
  });
36
- function on(e, [t, n]) {
36
+ function an(e, [t, n]) {
37
37
  return Math.min(n, Math.max(t, e));
38
38
  }
39
- an(on, "clamp");
39
+ rn(an, "clamp");
40
40
  //#endregion
41
41
  //#region ../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs
42
- var sn = Object.defineProperty, U = (e, t) => sn(e, "name", {
42
+ var on = Object.defineProperty, W = (e, t) => on(e, "name", {
43
43
  value: t,
44
44
  configurable: !0
45
45
  });
46
- function cn(e, t) {
47
- return M.useReducer((e, n) => t[e][n] ?? e, e);
46
+ function sn(e, t) {
47
+ return N.useReducer((e, n) => t[e][n] ?? e, e);
48
48
  }
49
- U(cn, "useStateMachine");
50
- var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
51
- let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: a = 600, ...o } = e, [c, u] = M.useState(null), [d, f] = M.useState(null), [p, h] = M.useState(null), [g, _] = M.useState(null), [v, y] = M.useState(null), [b, x] = M.useState(0), [S, C] = M.useState(0), [ee, te] = M.useState(!1), [w, T] = M.useState(!1), E = l(t, u), ne = m(i);
52
- return /* @__PURE__ */ B(fn, {
49
+ W(sn, "useStateMachine");
50
+ var cn = "ScrollArea", [ln, un] = r(cn), [dn, G] = ln(cn), fn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
51
+ let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: o = 600, ...c } = e, [l, u] = N.useState(null), [d, p] = N.useState(null), [m, h] = N.useState(null), [g, _] = N.useState(null), [v, y] = N.useState(null), [b, x] = N.useState(0), [S, ee] = N.useState(0), [C, w] = N.useState(!1), [T, te] = N.useState(!1), E = s(t, u), ne = f(i);
52
+ return /* @__PURE__ */ V(dn, {
53
53
  scope: n,
54
54
  type: r,
55
55
  dir: ne,
56
- scrollHideDelay: a,
57
- scrollArea: c,
56
+ scrollHideDelay: o,
57
+ scrollArea: l,
58
58
  viewport: d,
59
- onViewportChange: f,
60
- content: p,
59
+ onViewportChange: p,
60
+ content: m,
61
61
  onContentChange: h,
62
62
  scrollbarX: g,
63
63
  onScrollbarXChange: _,
64
- scrollbarXEnabled: ee,
65
- onScrollbarXEnabledChange: te,
64
+ scrollbarXEnabled: C,
65
+ onScrollbarXEnabledChange: w,
66
66
  scrollbarY: v,
67
67
  onScrollbarYChange: y,
68
- scrollbarYEnabled: w,
69
- onScrollbarYEnabledChange: T,
68
+ scrollbarYEnabled: T,
69
+ onScrollbarYEnabledChange: te,
70
70
  onCornerWidthChange: x,
71
- onCornerHeightChange: C,
72
- children: /* @__PURE__ */ B(s.div, {
71
+ onCornerHeightChange: ee,
72
+ children: /* @__PURE__ */ V(a.div, {
73
73
  dir: ne,
74
- ...o,
74
+ ...c,
75
75
  ref: E,
76
76
  style: {
77
77
  position: "relative",
@@ -81,19 +81,19 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
81
81
  }
82
82
  })
83
83
  });
84
- }, "ScrollArea")), mn = "ScrollAreaViewport", hn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
85
- let { __scopeScrollArea: n, children: r, nonce: i, ...a } = e, o = W(mn, n), c = l(t, M.useRef(null), o.onViewportChange);
86
- return /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(gn, { nonce: i }), /* @__PURE__ */ B(s.div, {
84
+ }, "ScrollArea")), pn = "ScrollAreaViewport", mn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
85
+ let { __scopeScrollArea: n, children: r, nonce: i, ...o } = e, c = G(pn, n), l = s(t, N.useRef(null), c.onViewportChange);
86
+ return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(hn, { nonce: i }), /* @__PURE__ */ V(a.div, {
87
87
  "data-radix-scroll-area-viewport": "",
88
- ...a,
89
- ref: c,
88
+ ...o,
89
+ ref: l,
90
90
  style: {
91
- overflowX: o.scrollbarXEnabled ? "scroll" : "hidden",
92
- overflowY: o.scrollbarYEnabled ? "scroll" : "hidden",
91
+ overflowX: c.scrollbarXEnabled ? "scroll" : "hidden",
92
+ overflowY: c.scrollbarYEnabled ? "scroll" : "hidden",
93
93
  ...e.style
94
94
  },
95
- children: /* @__PURE__ */ B("div", {
96
- ref: o.onContentChange,
95
+ children: /* @__PURE__ */ V("div", {
96
+ ref: c.onContentChange,
97
97
  style: {
98
98
  minWidth: "100%",
99
99
  display: "table"
@@ -101,60 +101,60 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
101
101
  children: r
102
102
  })
103
103
  })] });
104
- }, "ScrollAreaViewport")), gn = /* @__PURE__ */ M.memo(/* @__PURE__ */ U(function({ nonce: e }) {
105
- return /* @__PURE__ */ B("style", {
104
+ }, "ScrollAreaViewport")), hn = /* @__PURE__ */ N.memo(/* @__PURE__ */ W(function({ nonce: e }) {
105
+ return /* @__PURE__ */ V("style", {
106
106
  dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
107
107
  nonce: e
108
108
  });
109
- }, "ScrollAreaViewportStyle"), (e, t) => e.nonce === t.nonce), G = "ScrollAreaScrollbar", _n = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
110
- let { forceMount: n, ...r } = e, i = W(G, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: o } = i, s = e.orientation === "horizontal";
111
- return M.useEffect(() => (s ? a(!0) : o(!0), () => {
109
+ }, "ScrollAreaViewportStyle"), (e, t) => e.nonce === t.nonce), K = "ScrollAreaScrollbar", gn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
110
+ let { forceMount: n, ...r } = e, i = G(K, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: o } = i, s = e.orientation === "horizontal";
111
+ return N.useEffect(() => (s ? a(!0) : o(!0), () => {
112
112
  s ? a(!1) : o(!1);
113
113
  }), [
114
114
  s,
115
115
  a,
116
116
  o
117
- ]), i.type === "hover" ? /* @__PURE__ */ B(vn, {
117
+ ]), i.type === "hover" ? /* @__PURE__ */ V(_n, {
118
118
  ...r,
119
119
  ref: t,
120
120
  forceMount: n
121
- }) : i.type === "scroll" ? /* @__PURE__ */ B(yn, {
121
+ }) : i.type === "scroll" ? /* @__PURE__ */ V(vn, {
122
122
  ...r,
123
123
  ref: t,
124
124
  forceMount: n
125
- }) : i.type === "auto" ? /* @__PURE__ */ B(bn, {
125
+ }) : i.type === "auto" ? /* @__PURE__ */ V(yn, {
126
126
  ...r,
127
127
  ref: t,
128
128
  forceMount: n
129
- }) : i.type === "always" ? /* @__PURE__ */ B(xn, {
129
+ }) : i.type === "always" ? /* @__PURE__ */ V(bn, {
130
130
  ...r,
131
131
  ref: t,
132
132
  "data-state": "visible"
133
133
  }) : null;
134
- }, "ScrollAreaScrollbar")), vn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
135
- let { forceMount: n, ...r } = e, i = W(G, e.__scopeScrollArea), [a, s] = M.useState(!1);
136
- return M.useEffect(() => {
137
- let e = i.scrollArea, t = 0;
134
+ }, "ScrollAreaScrollbar")), _n = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
135
+ let { forceMount: n, ...r } = e, a = G(K, e.__scopeScrollArea), [o, s] = N.useState(!1);
136
+ return N.useEffect(() => {
137
+ let e = a.scrollArea, t = 0;
138
138
  if (e) {
139
- let n = /* @__PURE__ */ U(() => {
139
+ let n = /* @__PURE__ */ W(() => {
140
140
  window.clearTimeout(t), s(!0);
141
- }, "handlePointerEnter"), r = /* @__PURE__ */ U(() => {
142
- t = window.setTimeout(() => s(!1), i.scrollHideDelay);
141
+ }, "handlePointerEnter"), r = /* @__PURE__ */ W(() => {
142
+ t = window.setTimeout(() => s(!1), a.scrollHideDelay);
143
143
  }, "handlePointerLeave");
144
144
  return e.addEventListener("pointerenter", n), e.addEventListener("pointerleave", r), () => {
145
145
  window.clearTimeout(t), e.removeEventListener("pointerenter", n), e.removeEventListener("pointerleave", r);
146
146
  };
147
147
  }
148
- }, [i.scrollArea, i.scrollHideDelay]), /* @__PURE__ */ B(o, {
149
- present: n || a,
150
- children: /* @__PURE__ */ B(bn, {
151
- "data-state": a ? "visible" : "hidden",
148
+ }, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ V(i, {
149
+ present: n || o,
150
+ children: /* @__PURE__ */ V(yn, {
151
+ "data-state": o ? "visible" : "hidden",
152
152
  ...r,
153
153
  ref: t
154
154
  })
155
155
  });
156
- }, "ScrollAreaScrollbarHover")), yn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
157
- let { forceMount: n, ...r } = e, i = W(G, e.__scopeScrollArea), a = e.orientation === "horizontal", s = J(() => l("SCROLL_END"), 100), [c, l] = cn("hidden", {
156
+ }, "ScrollAreaScrollbarHover")), vn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
157
+ let { forceMount: n, ...r } = e, a = G(K, e.__scopeScrollArea), o = e.orientation === "horizontal", s = Y(() => u("SCROLL_END"), 100), [c, u] = sn("hidden", {
158
158
  hidden: { SCROLL: "scrolling" },
159
159
  scrolling: {
160
160
  SCROLL_END: "idle",
@@ -170,56 +170,56 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
170
170
  POINTER_ENTER: "interacting"
171
171
  }
172
172
  });
173
- return M.useEffect(() => {
173
+ return N.useEffect(() => {
174
174
  if (c === "idle") {
175
- let e = window.setTimeout(() => l("HIDE"), i.scrollHideDelay);
175
+ let e = window.setTimeout(() => u("HIDE"), a.scrollHideDelay);
176
176
  return () => window.clearTimeout(e);
177
177
  }
178
178
  }, [
179
179
  c,
180
- i.scrollHideDelay,
181
- l
182
- ]), M.useEffect(() => {
183
- let e = i.viewport, t = a ? "scrollLeft" : "scrollTop";
180
+ a.scrollHideDelay,
181
+ u
182
+ ]), N.useEffect(() => {
183
+ let e = a.viewport, t = o ? "scrollLeft" : "scrollTop";
184
184
  if (e) {
185
- let n = e[t], r = /* @__PURE__ */ U(() => {
185
+ let n = e[t], r = /* @__PURE__ */ W(() => {
186
186
  let r = e[t];
187
- n !== r && (l("SCROLL"), s()), n = r;
187
+ n !== r && (u("SCROLL"), s()), n = r;
188
188
  }, "handleScroll");
189
189
  return e.addEventListener("scroll", r), () => e.removeEventListener("scroll", r);
190
190
  }
191
191
  }, [
192
- i.viewport,
193
- a,
194
- l,
192
+ a.viewport,
193
+ o,
194
+ u,
195
195
  s
196
- ]), /* @__PURE__ */ B(o, {
196
+ ]), /* @__PURE__ */ V(i, {
197
197
  present: n || c !== "hidden",
198
- children: /* @__PURE__ */ B(xn, {
198
+ children: /* @__PURE__ */ V(bn, {
199
199
  "data-state": c === "hidden" ? "hidden" : "visible",
200
200
  ...r,
201
201
  ref: t,
202
- onPointerEnter: d(e.onPointerEnter, () => l("POINTER_ENTER")),
203
- onPointerLeave: d(e.onPointerLeave, () => l("POINTER_LEAVE"))
202
+ onPointerEnter: l(e.onPointerEnter, () => u("POINTER_ENTER")),
203
+ onPointerLeave: l(e.onPointerLeave, () => u("POINTER_LEAVE"))
204
204
  })
205
205
  });
206
- }, "ScrollAreaScrollbarScroll")), bn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
207
- let n = W(G, e.__scopeScrollArea), { forceMount: r, ...i } = e, [a, s] = M.useState(!1), c = e.orientation === "horizontal", l = J(() => {
206
+ }, "ScrollAreaScrollbarScroll")), yn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
207
+ let n = G(K, e.__scopeScrollArea), { forceMount: r, ...a } = e, [o, s] = N.useState(!1), c = e.orientation === "horizontal", l = Y(() => {
208
208
  if (n.viewport) {
209
209
  let e = n.viewport.offsetWidth < n.viewport.scrollWidth, t = n.viewport.offsetHeight < n.viewport.scrollHeight;
210
210
  s(c ? e : t);
211
211
  }
212
212
  }, 10);
213
- return Y(n.viewport, l), Y(n.content, l), /* @__PURE__ */ B(o, {
214
- present: r || a,
215
- children: /* @__PURE__ */ B(xn, {
216
- "data-state": a ? "visible" : "hidden",
217
- ...i,
213
+ return X(n.viewport, l), X(n.content, l), /* @__PURE__ */ V(i, {
214
+ present: r || o,
215
+ children: /* @__PURE__ */ V(bn, {
216
+ "data-state": o ? "visible" : "hidden",
217
+ ...a,
218
218
  ref: t
219
219
  })
220
220
  });
221
- }, "ScrollAreaScrollbarAuto")), xn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
222
- let { orientation: n = "vertical", ...r } = e, i = W(G, e.__scopeScrollArea), a = M.useRef(null), o = M.useRef(0), [s, c] = M.useState({
221
+ }, "ScrollAreaScrollbarAuto")), bn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
222
+ let { orientation: n = "vertical", ...r } = e, i = G(K, e.__scopeScrollArea), a = N.useRef(null), o = N.useRef(0), [s, c] = N.useState({
223
223
  content: 0,
224
224
  viewport: 0,
225
225
  scrollbar: {
@@ -227,24 +227,24 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
227
227
  paddingStart: 0,
228
228
  paddingEnd: 0
229
229
  }
230
- }), l = Nn(s.viewport, s.content), u = {
230
+ }), l = Mn(s.viewport, s.content), u = {
231
231
  ...r,
232
232
  sizes: s,
233
233
  onSizesChange: c,
234
234
  hasThumb: l > 0 && l < 1,
235
- onThumbChange: /* @__PURE__ */ U((e) => a.current = e, "onThumbChange"),
236
- onThumbPointerUp: /* @__PURE__ */ U(() => o.current = 0, "onThumbPointerUp"),
237
- onThumbPointerDown: /* @__PURE__ */ U((e) => o.current = e, "onThumbPointerDown")
235
+ onThumbChange: /* @__PURE__ */ W((e) => a.current = e, "onThumbChange"),
236
+ onThumbPointerUp: /* @__PURE__ */ W(() => o.current = 0, "onThumbPointerUp"),
237
+ onThumbPointerDown: /* @__PURE__ */ W((e) => o.current = e, "onThumbPointerDown")
238
238
  };
239
239
  function d(e, t) {
240
- return Pn(e, o.current, s, t);
240
+ return Nn(e, o.current, s, t);
241
241
  }
242
- return U(d, "getScrollPosition"), n === "horizontal" ? /* @__PURE__ */ B(Sn, {
242
+ return W(d, "getScrollPosition"), n === "horizontal" ? /* @__PURE__ */ V(xn, {
243
243
  ...u,
244
244
  ref: t,
245
245
  onThumbPositionChange: () => {
246
246
  if (i.viewport && a.current) {
247
- let e = i.viewport.scrollLeft, t = Fn(e, s, i.dir);
247
+ let e = i.viewport.scrollLeft, t = Pn(e, s, i.dir);
248
248
  a.current.style.transform = `translate3d(${t}px, 0, 0)`;
249
249
  }
250
250
  },
@@ -254,12 +254,12 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
254
254
  onDragScroll: (e) => {
255
255
  i.viewport && (i.viewport.scrollLeft = d(e, i.dir));
256
256
  }
257
- }) : n === "vertical" ? /* @__PURE__ */ B(Cn, {
257
+ }) : n === "vertical" ? /* @__PURE__ */ V(Sn, {
258
258
  ...u,
259
259
  ref: t,
260
260
  onThumbPositionChange: () => {
261
261
  if (i.viewport && a.current) {
262
- let e = i.viewport.scrollTop, t = Fn(e, s);
262
+ let e = i.viewport.scrollTop, t = Pn(e, s);
263
263
  a.current.style.transform = `translate3d(0, ${t}px, 0)`;
264
264
  }
265
265
  },
@@ -270,11 +270,11 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
270
270
  i.viewport && (i.viewport.scrollTop = d(e));
271
271
  }
272
272
  }) : null;
273
- }, "ScrollAreaScrollbarVisible")), Sn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
274
- let { sizes: n, onSizesChange: r, ...i } = e, a = W(G, e.__scopeScrollArea), [o, s] = M.useState(), c = M.useRef(null), u = l(t, c, a.onScrollbarXChange);
275
- return M.useEffect(() => {
276
- c.current && s(getComputedStyle(c.current));
277
- }, [c]), /* @__PURE__ */ B(En, {
273
+ }, "ScrollAreaScrollbarVisible")), xn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
274
+ let { sizes: n, onSizesChange: r, ...i } = e, a = G(K, e.__scopeScrollArea), [o, c] = N.useState(), l = N.useRef(null), u = s(t, l, a.onScrollbarXChange);
275
+ return N.useEffect(() => {
276
+ l.current && c(getComputedStyle(l.current));
277
+ }, [l]), /* @__PURE__ */ V(Tn, {
278
278
  "data-orientation": "horizontal",
279
279
  ...i,
280
280
  ref: u,
@@ -283,7 +283,7 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
283
283
  bottom: 0,
284
284
  left: a.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
285
285
  right: a.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
286
- "--radix-scroll-area-thumb-width": q(n) + "px",
286
+ "--radix-scroll-area-thumb-width": J(n) + "px",
287
287
  ...e.style
288
288
  },
289
289
  onThumbPointerDown: (t) => e.onThumbPointerDown(t.x),
@@ -291,26 +291,26 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
291
291
  onWheelScroll: (t, n) => {
292
292
  if (a.viewport) {
293
293
  let r = a.viewport.scrollLeft + t.deltaX;
294
- e.onWheelScroll(r), Ln(r, n) && t.preventDefault();
294
+ e.onWheelScroll(r), In(r, n) && t.preventDefault();
295
295
  }
296
296
  },
297
297
  onResize: () => {
298
- c.current && a.viewport && o && r({
298
+ l.current && a.viewport && o && r({
299
299
  content: a.viewport.scrollWidth,
300
300
  viewport: a.viewport.offsetWidth,
301
301
  scrollbar: {
302
- size: c.current.clientWidth,
303
- paddingStart: K(o.paddingLeft),
304
- paddingEnd: K(o.paddingRight)
302
+ size: l.current.clientWidth,
303
+ paddingStart: q(o.paddingLeft),
304
+ paddingEnd: q(o.paddingRight)
305
305
  }
306
306
  });
307
307
  }
308
308
  });
309
- }, "ScrollAreaScrollbarX")), Cn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
310
- let { sizes: n, onSizesChange: r, ...i } = e, a = W(G, e.__scopeScrollArea), [o, s] = M.useState(), c = M.useRef(null), u = l(t, c, a.onScrollbarYChange);
311
- return M.useEffect(() => {
312
- c.current && s(getComputedStyle(c.current));
313
- }, [c]), /* @__PURE__ */ B(En, {
309
+ }, "ScrollAreaScrollbarX")), Sn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
310
+ let { sizes: n, onSizesChange: r, ...i } = e, a = G(K, e.__scopeScrollArea), [o, c] = N.useState(), l = N.useRef(null), u = s(t, l, a.onScrollbarYChange);
311
+ return N.useEffect(() => {
312
+ l.current && c(getComputedStyle(l.current));
313
+ }, [l]), /* @__PURE__ */ V(Tn, {
314
314
  "data-orientation": "vertical",
315
315
  ...i,
316
316
  ref: u,
@@ -320,7 +320,7 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
320
320
  right: a.dir === "ltr" ? 0 : void 0,
321
321
  left: a.dir === "rtl" ? 0 : void 0,
322
322
  bottom: "var(--radix-scroll-area-corner-height)",
323
- "--radix-scroll-area-thumb-height": q(n) + "px",
323
+ "--radix-scroll-area-thumb-height": J(n) + "px",
324
324
  ...e.style
325
325
  },
326
326
  onThumbPointerDown: (t) => e.onThumbPointerDown(t.y),
@@ -328,135 +328,135 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
328
328
  onWheelScroll: (t, n) => {
329
329
  if (a.viewport) {
330
330
  let r = a.viewport.scrollTop + t.deltaY;
331
- e.onWheelScroll(r), Ln(r, n) && t.preventDefault();
331
+ e.onWheelScroll(r), In(r, n) && t.preventDefault();
332
332
  }
333
333
  },
334
334
  onResize: () => {
335
- c.current && a.viewport && o && r({
335
+ l.current && a.viewport && o && r({
336
336
  content: a.viewport.scrollHeight,
337
337
  viewport: a.viewport.offsetHeight,
338
338
  scrollbar: {
339
- size: c.current.clientHeight,
340
- paddingStart: K(o.paddingTop),
341
- paddingEnd: K(o.paddingBottom)
339
+ size: l.current.clientHeight,
340
+ paddingStart: q(o.paddingTop),
341
+ paddingEnd: q(o.paddingBottom)
342
342
  }
343
343
  });
344
344
  }
345
345
  });
346
- }, "ScrollAreaScrollbarY")), [wn, Tn] = un(G), En = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
347
- let { __scopeScrollArea: n, sizes: r, hasThumb: i, onThumbChange: a, onThumbPointerUp: o, onThumbPointerDown: c, onThumbPositionChange: u, onDragScroll: f, onWheelScroll: m, onResize: h, ...g } = e, _ = W(G, n), [v, y] = M.useState(null), b = l(t, y), x = M.useRef(null), S = M.useRef(""), C = _.viewport, ee = r.content - r.viewport, te = p(m), w = p(u), T = J(h, 10);
346
+ }, "ScrollAreaScrollbarY")), [Cn, wn] = ln(K), Tn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
347
+ let { __scopeScrollArea: n, sizes: r, hasThumb: i, onThumbChange: o, onThumbPointerUp: c, onThumbPointerDown: u, onThumbPositionChange: f, onDragScroll: p, onWheelScroll: m, onResize: h, ...g } = e, _ = G(K, n), [v, y] = N.useState(null), b = s(t, y), x = N.useRef(null), S = N.useRef(""), ee = _.viewport, C = r.content - r.viewport, w = d(m), T = d(f), te = Y(h, 10);
348
348
  function E(e) {
349
349
  if (x.current) {
350
350
  let t = e.clientX - x.current.left, n = e.clientY - x.current.top;
351
- f({
351
+ p({
352
352
  x: t,
353
353
  y: n
354
354
  });
355
355
  }
356
356
  }
357
- return U(E, "handleDragScroll"), M.useEffect(() => {
358
- let e = /* @__PURE__ */ U((e) => {
357
+ return W(E, "handleDragScroll"), N.useEffect(() => {
358
+ let e = /* @__PURE__ */ W((e) => {
359
359
  let t = e.target;
360
- v?.contains(t) && te(e, ee);
360
+ v?.contains(t) && w(e, C);
361
361
  }, "handleWheel");
362
362
  return document.addEventListener("wheel", e, { passive: !1 }), () => document.removeEventListener("wheel", e, { passive: !1 });
363
363
  }, [
364
- C,
365
- v,
366
364
  ee,
367
- te
368
- ]), M.useEffect(w, [r, w]), Y(v, T), Y(_.content, T), /* @__PURE__ */ B(wn, {
365
+ v,
366
+ C,
367
+ w
368
+ ]), N.useEffect(T, [r, T]), X(v, te), X(_.content, te), /* @__PURE__ */ V(Cn, {
369
369
  scope: n,
370
370
  scrollbar: v,
371
371
  hasThumb: i,
372
- onThumbChange: p(a),
373
- onThumbPointerUp: p(o),
374
- onThumbPositionChange: w,
375
- onThumbPointerDown: p(c),
376
- children: /* @__PURE__ */ B(s.div, {
372
+ onThumbChange: d(o),
373
+ onThumbPointerUp: d(c),
374
+ onThumbPositionChange: T,
375
+ onThumbPointerDown: d(u),
376
+ children: /* @__PURE__ */ V(a.div, {
377
377
  ...g,
378
378
  ref: b,
379
379
  style: {
380
380
  position: "absolute",
381
381
  ...g.style
382
382
  },
383
- onPointerDown: d(e.onPointerDown, (e) => {
383
+ onPointerDown: l(e.onPointerDown, (e) => {
384
384
  e.button === 0 && (e.target.setPointerCapture(e.pointerId), x.current = v.getBoundingClientRect(), S.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", _.viewport && (_.viewport.style.scrollBehavior = "auto"), E(e));
385
385
  }),
386
- onPointerMove: d(e.onPointerMove, E),
387
- onPointerUp: d(e.onPointerUp, (e) => {
386
+ onPointerMove: l(e.onPointerMove, E),
387
+ onPointerUp: l(e.onPointerUp, (e) => {
388
388
  let t = e.target;
389
389
  t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), document.body.style.webkitUserSelect = S.current, _.viewport && (_.viewport.style.scrollBehavior = ""), x.current = null;
390
390
  })
391
391
  })
392
392
  });
393
- }, "ScrollAreaScrollbarImpl")), Dn = "ScrollAreaThumb", On = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
394
- let { forceMount: n, ...r } = e, i = Tn(Dn, e.__scopeScrollArea);
395
- return /* @__PURE__ */ B(o, {
396
- present: n || i.hasThumb,
397
- children: /* @__PURE__ */ B(kn, {
393
+ }, "ScrollAreaScrollbarImpl")), En = "ScrollAreaThumb", Dn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
394
+ let { forceMount: n, ...r } = e, a = wn(En, e.__scopeScrollArea);
395
+ return /* @__PURE__ */ V(i, {
396
+ present: n || a.hasThumb,
397
+ children: /* @__PURE__ */ V(On, {
398
398
  ref: t,
399
399
  ...r
400
400
  })
401
401
  });
402
- }, "ScrollAreaThumb")), kn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
403
- let { __scopeScrollArea: n, style: r, ...i } = e, a = W(Dn, n), o = Tn(Dn, n), { onThumbPositionChange: c } = o, u = l(t, o.onThumbChange), f = M.useRef(void 0), p = J(() => {
402
+ }, "ScrollAreaThumb")), On = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
403
+ let { __scopeScrollArea: n, style: r, ...i } = e, o = G(En, n), c = wn(En, n), { onThumbPositionChange: u } = c, d = s(t, c.onThumbChange), f = N.useRef(void 0), p = Y(() => {
404
404
  f.current &&= (f.current(), void 0);
405
405
  }, 100);
406
- return M.useEffect(() => {
407
- let e = a.viewport;
406
+ return N.useEffect(() => {
407
+ let e = o.viewport;
408
408
  if (e) {
409
- let t = /* @__PURE__ */ U(() => {
409
+ let t = /* @__PURE__ */ W(() => {
410
410
  if (p(), !f.current) {
411
- let t = Rn(e, c);
412
- f.current = t, c();
411
+ let t = Ln(e, u);
412
+ f.current = t, u();
413
413
  }
414
414
  }, "handleScroll");
415
- return c(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
415
+ return u(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
416
416
  }
417
417
  }, [
418
- a.viewport,
418
+ o.viewport,
419
419
  p,
420
- c
421
- ]), /* @__PURE__ */ B(s.div, {
422
- "data-state": o.hasThumb ? "visible" : "hidden",
420
+ u
421
+ ]), /* @__PURE__ */ V(a.div, {
422
+ "data-state": c.hasThumb ? "visible" : "hidden",
423
423
  ...i,
424
- ref: u,
424
+ ref: d,
425
425
  style: {
426
426
  width: "var(--radix-scroll-area-thumb-width)",
427
427
  height: "var(--radix-scroll-area-thumb-height)",
428
428
  ...r
429
429
  },
430
- onPointerDownCapture: d(e.onPointerDownCapture, (e) => {
430
+ onPointerDownCapture: l(e.onPointerDownCapture, (e) => {
431
431
  let t = e.target.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
432
- o.onThumbPointerDown({
432
+ c.onThumbPointerDown({
433
433
  x: n,
434
434
  y: r
435
435
  });
436
436
  }),
437
- onPointerUp: d(e.onPointerUp, o.onThumbPointerUp)
437
+ onPointerUp: l(e.onPointerUp, c.onThumbPointerUp)
438
438
  });
439
- }, "ScrollAreaThumbImpl")), An = "ScrollAreaCorner", jn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
440
- let n = W(An, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
441
- return n.type !== "scroll" && r ? /* @__PURE__ */ B(Mn, {
439
+ }, "ScrollAreaThumbImpl")), kn = "ScrollAreaCorner", An = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
440
+ let n = G(kn, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
441
+ return n.type !== "scroll" && r ? /* @__PURE__ */ V(jn, {
442
442
  ...e,
443
443
  ref: t
444
444
  }) : null;
445
- }, "ScrollAreaCorner")), Mn = /* @__PURE__ */ M.forwardRef(/* @__PURE__ */ U(function(e, t) {
446
- let { __scopeScrollArea: n, ...r } = e, i = W(An, n), [a, o] = M.useState(0), [c, l] = M.useState(0), u = !!(a && c), { onCornerWidthChange: d, onCornerHeightChange: f } = i;
447
- return Y(i.scrollbarX, () => {
445
+ }, "ScrollAreaCorner")), jn = /* @__PURE__ */ N.forwardRef(/* @__PURE__ */ W(function(e, t) {
446
+ let { __scopeScrollArea: n, ...r } = e, i = G(kn, n), [o, s] = N.useState(0), [c, l] = N.useState(0), u = !!(o && c), { onCornerWidthChange: d, onCornerHeightChange: f } = i;
447
+ return X(i.scrollbarX, () => {
448
448
  let e = i.scrollbarX?.offsetHeight || 0;
449
449
  i.onCornerHeightChange(e), l(e);
450
- }), Y(i.scrollbarY, () => {
450
+ }), X(i.scrollbarY, () => {
451
451
  let e = i.scrollbarY?.offsetWidth || 0;
452
- i.onCornerWidthChange(e), o(e);
453
- }), M.useEffect(() => () => {
452
+ i.onCornerWidthChange(e), s(e);
453
+ }), N.useEffect(() => () => {
454
454
  d(0), f(0);
455
- }, [d, f]), u ? /* @__PURE__ */ B(s.div, {
455
+ }, [d, f]), u ? /* @__PURE__ */ V(a.div, {
456
456
  ...r,
457
457
  ref: t,
458
458
  style: {
459
- width: a,
459
+ width: o,
460
460
  height: c,
461
461
  position: "absolute",
462
462
  right: i.dir === "ltr" ? 0 : void 0,
@@ -466,48 +466,48 @@ var ln = "ScrollArea", [un, dn] = a(ln), [fn, W] = un(ln), pn = /* @__PURE__ */
466
466
  }
467
467
  }) : null;
468
468
  }, "ScrollAreaCornerImpl"));
469
- function K(e) {
469
+ function q(e) {
470
470
  return e ? parseInt(e, 10) : 0;
471
471
  }
472
- U(K, "toInt");
473
- function Nn(e, t) {
472
+ W(q, "toInt");
473
+ function Mn(e, t) {
474
474
  let n = e / t;
475
475
  return isNaN(n) ? 0 : n;
476
476
  }
477
- U(Nn, "getThumbRatio");
478
- function q(e) {
479
- let t = Nn(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
477
+ W(Mn, "getThumbRatio");
478
+ function J(e) {
479
+ let t = Mn(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
480
480
  return Math.max(r, 18);
481
481
  }
482
- U(q, "getThumbSize");
483
- function Pn(e, t, n, r = "ltr") {
484
- let i = q(n), a = i / 2, o = t || a, s = i - o, c = n.scrollbar.paddingStart + o, l = n.scrollbar.size - n.scrollbar.paddingEnd - s, u = n.content - n.viewport, d = r === "ltr" ? [0, u] : [u * -1, 0];
485
- return In([c, l], d)(e);
482
+ W(J, "getThumbSize");
483
+ function Nn(e, t, n, r = "ltr") {
484
+ let i = J(n), a = i / 2, o = t || a, s = i - o, c = n.scrollbar.paddingStart + o, l = n.scrollbar.size - n.scrollbar.paddingEnd - s, u = n.content - n.viewport, d = r === "ltr" ? [0, u] : [u * -1, 0];
485
+ return Fn([c, l], d)(e);
486
486
  }
487
- U(Pn, "getScrollPositionFromPointer");
488
- function Fn(e, t, n = "ltr") {
489
- let r = q(t), i = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - i, o = t.content - t.viewport, s = a - r, c = on(e, n === "ltr" ? [0, o] : [o * -1, 0]);
490
- return In([0, o], [0, s])(c);
487
+ W(Nn, "getScrollPositionFromPointer");
488
+ function Pn(e, t, n = "ltr") {
489
+ let r = J(t), i = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - i, o = t.content - t.viewport, s = a - r, c = an(e, n === "ltr" ? [0, o] : [o * -1, 0]);
490
+ return Fn([0, o], [0, s])(c);
491
491
  }
492
- U(Fn, "getThumbOffsetFromScroll");
493
- function In(e, t) {
492
+ W(Pn, "getThumbOffsetFromScroll");
493
+ function Fn(e, t) {
494
494
  return (n) => {
495
495
  if (e[0] === e[1] || t[0] === t[1]) return t[0];
496
496
  let r = (t[1] - t[0]) / (e[1] - e[0]);
497
497
  return t[0] + r * (n - e[0]);
498
498
  };
499
499
  }
500
- U(In, "linearScale");
501
- function Ln(e, t) {
500
+ W(Fn, "linearScale");
501
+ function In(e, t) {
502
502
  return e > 0 && e < t;
503
503
  }
504
- U(Ln, "isScrollingWithinScrollbarBounds");
505
- var Rn = /* @__PURE__ */ U((e, t = () => {}) => {
504
+ W(In, "isScrollingWithinScrollbarBounds");
505
+ var Ln = /* @__PURE__ */ W((e, t = () => {}) => {
506
506
  let n = {
507
507
  left: e.scrollLeft,
508
508
  top: e.scrollTop
509
509
  }, r = 0;
510
- return (/* @__PURE__ */ U((function i() {
510
+ return (/* @__PURE__ */ W((function i() {
511
511
  let a = {
512
512
  left: e.scrollLeft,
513
513
  top: e.scrollTop
@@ -515,16 +515,16 @@ var Rn = /* @__PURE__ */ U((e, t = () => {}) => {
515
515
  (o || s) && t(), n = a, r = window.requestAnimationFrame(i);
516
516
  }), "loop"))(), () => window.cancelAnimationFrame(r);
517
517
  }, "addUnlinkedScrollListener");
518
- function J(e, t) {
519
- let n = p(e), r = M.useRef(0);
520
- return M.useEffect(() => () => window.clearTimeout(r.current), []), M.useCallback(() => {
518
+ function Y(e, t) {
519
+ let n = d(e), r = N.useRef(0);
520
+ return N.useEffect(() => () => window.clearTimeout(r.current), []), N.useCallback(() => {
521
521
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
522
522
  }, [n, t]);
523
523
  }
524
- U(J, "useDebounceCallback");
525
- function Y(e, t) {
526
- let n = p(t);
527
- c(() => {
524
+ W(Y, "useDebounceCallback");
525
+ function X(e, t) {
526
+ let n = d(t);
527
+ o(() => {
528
528
  let t = 0;
529
529
  if (e) {
530
530
  let r = new ResizeObserver(() => {
@@ -536,12 +536,12 @@ function Y(e, t) {
536
536
  }
537
537
  }, [e, n]);
538
538
  }
539
- U(Y, "useResizeObserver");
540
- var zn = pn, Bn = hn, Vn = jn;
539
+ W(X, "useResizeObserver");
540
+ var Rn = fn, zn = mn, Bn = An;
541
541
  //#endregion
542
542
  //#region lib/components/ui/actions/toolbar/toolbar-toggle-group.tsx
543
- function Hn(e, t, n) {
544
- let [r, i] = R(t ?? "");
543
+ function Vn(e, t, n) {
544
+ let [r, i] = z(t ?? "");
545
545
  return {
546
546
  value: e ?? r,
547
547
  onValueChange: (e) => {
@@ -549,28 +549,28 @@ function Hn(e, t, n) {
549
549
  }
550
550
  };
551
551
  }
552
- function Un(e) {
553
- let { label: t, children: r, priority: i, moreAs: a, disabled: o, className: s } = e, { spilled: c, inside: l, props: u } = me({
552
+ function Hn(e) {
553
+ let { label: t, children: r, priority: i, moreAs: a, disabled: o, className: s } = e, { spilled: c, inside: l, props: u } = fe({
554
554
  label: t,
555
555
  group: !0,
556
556
  choice: e.type,
557
557
  moreAs: a
558
- }, i), d = I(() => ({ spilled: c }), [c]), f = Hn(e.type === "single" ? e.value : void 0, e.type === "single" ? e.defaultValue : void 0, e.type === "single" ? e.onValueChange : void 0), p = {
558
+ }, i), d = L(() => ({ spilled: c }), [c]), f = Vn(e.type === "single" ? e.value : void 0, e.type === "single" ? e.defaultValue : void 0, e.type === "single" ? e.onValueChange : void 0), p = {
559
559
  ...u,
560
560
  "aria-label": t,
561
561
  disabled: o,
562
562
  "data-slot": "toolbar-toggle-group",
563
563
  className: n(l && "nxgt-toolbar-group", s),
564
- children: /* @__PURE__ */ B(_e, {
564
+ children: /* @__PURE__ */ V(he, {
565
565
  value: d,
566
566
  children: r
567
567
  })
568
568
  };
569
- return e.type === "single" ? /* @__PURE__ */ B(be, {
569
+ return e.type === "single" ? /* @__PURE__ */ V(ve, {
570
570
  ...p,
571
571
  type: "single",
572
572
  ...f
573
- }) : /* @__PURE__ */ B(be, {
573
+ }) : /* @__PURE__ */ V(ve, {
574
574
  ...p,
575
575
  type: "multiple",
576
576
  role: "group",
@@ -579,8 +579,8 @@ function Un(e) {
579
579
  onValueChange: e.onValueChange
580
580
  });
581
581
  }
582
- function Wn({ value: e, ...t }) {
583
- return /* @__PURE__ */ B(ge, {
582
+ function Un({ value: e, ...t }) {
583
+ return /* @__PURE__ */ V(me, {
584
584
  ...t,
585
585
  toggle: !0,
586
586
  toggleValue: e
@@ -588,7 +588,7 @@ function Wn({ value: e, ...t }) {
588
588
  }
589
589
  //#endregion
590
590
  //#region lib/components/touch-box.ts
591
- var Gn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-content", Kn = `${Gn} pointer-coarse:-m-1.5`, qn = "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", Jn = f("nxgt-sheet fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain", {
591
+ var Wn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-content", Gn = `${Wn} pointer-coarse:-m-1.5`, Kn = "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", qn = u("nxgt-sheet fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain", {
592
592
  variants: {
593
593
  side: {
594
594
  right: "inset-y-0 right-0 h-full w-[calc(100%-3.5rem)] sm:max-w-sm",
@@ -630,29 +630,29 @@ var Gn = "pointer-coarse:size-11 pointer-coarse:p-1.5 pointer-coarse:bg-clip-con
630
630
  });
631
631
  //#endregion
632
632
  //#region lib/components/ui/overlays/sheet/sheet-parts.tsx
633
- function Yn({ className: e, ...t }) {
634
- return /* @__PURE__ */ B("div", {
633
+ function Jn({ className: e, ...t }) {
634
+ return /* @__PURE__ */ V("div", {
635
635
  "data-slot": "sheet-header",
636
636
  className: n("flex flex-col gap-1.5 p-4", e),
637
637
  ...t
638
638
  });
639
639
  }
640
- function Xn({ className: e, ...t }) {
641
- return /* @__PURE__ */ B("div", {
640
+ function Yn({ className: e, ...t }) {
641
+ return /* @__PURE__ */ V("div", {
642
642
  "data-slot": "sheet-footer",
643
643
  className: n("mt-auto flex flex-col gap-2 p-4 *:w-full", e),
644
644
  ...t
645
645
  });
646
646
  }
647
- function Zn({ className: e, ...t }) {
648
- return /* @__PURE__ */ B(ne, {
647
+ function Xn({ className: e, ...t }) {
648
+ return /* @__PURE__ */ V(te, {
649
649
  "data-slot": "sheet-title",
650
650
  className: n("text-foreground text-xl/7 font-medium tracking-tight", e),
651
651
  ...t
652
652
  });
653
653
  }
654
- function Qn({ className: e, ...t }) {
655
- return /* @__PURE__ */ B(ie, {
654
+ function Zn({ className: e, ...t }) {
655
+ return /* @__PURE__ */ V(ne, {
656
656
  "data-slot": "sheet-description",
657
657
  className: n("text-muted-foreground text-sm/5", e),
658
658
  ...t
@@ -660,118 +660,118 @@ function Qn({ className: e, ...t }) {
660
660
  }
661
661
  //#endregion
662
662
  //#region lib/components/ui/overlays/sheet/sheet.tsx
663
- function $n({ ...e }) {
664
- return /* @__PURE__ */ B(ee, {
663
+ function Qn({ ...e }) {
664
+ return /* @__PURE__ */ V(S, {
665
665
  value: e.modal ?? !0,
666
- children: /* @__PURE__ */ B(re, {
666
+ children: /* @__PURE__ */ V(E, {
667
667
  "data-slot": "sheet",
668
668
  ...e
669
669
  })
670
670
  });
671
671
  }
672
- function er({ ...e }) {
673
- return /* @__PURE__ */ B(ce, {
672
+ function $n({ ...e }) {
673
+ return /* @__PURE__ */ V(oe, {
674
674
  "data-slot": "sheet-trigger",
675
675
  ...e
676
676
  });
677
677
  }
678
- function tr({ className: e, color: t, children: i, type: a = "button", variant: o = "ghost", ...s }) {
679
- let { t: c } = j();
680
- return /* @__PURE__ */ B(w, {
681
- "aria-label": i ? void 0 : c("material.buttons.close", "Close"),
682
- ...s,
683
- type: a,
684
- className: n("absolute top-2 right-2", r({
685
- variant: o,
678
+ function er({ className: e, color: t, children: r, type: i = "button", variant: a = "ghost", ...o }) {
679
+ let { t: s } = j();
680
+ return /* @__PURE__ */ V(C, {
681
+ "aria-label": r ? void 0 : s("material.buttons.close", "Close"),
682
+ ...o,
683
+ type: i,
684
+ className: n("absolute top-2 right-2", ye({
685
+ variant: a,
686
686
  color: t,
687
- className: n(qn, e)
687
+ className: n(Kn, e)
688
688
  })),
689
689
  "data-slot": "sheet-close",
690
- children: i || /* @__PURE__ */ B(ut, { className: "size-4" })
690
+ children: r || /* @__PURE__ */ V(lt, { className: "size-4" })
691
691
  });
692
692
  }
693
- function nr({ ...e }) {
694
- return /* @__PURE__ */ B(T, {
693
+ function tr({ ...e }) {
694
+ return /* @__PURE__ */ V(w, {
695
695
  "data-slot": "sheet-portal",
696
696
  ...e
697
697
  });
698
698
  }
699
- function rr({ className: e, scrim: t = "dim", ...r }) {
700
- return /* @__PURE__ */ B(E, {
699
+ function nr({ className: e, scrim: t = "dim", ...r }) {
700
+ return /* @__PURE__ */ V(T, {
701
701
  "data-slot": "sheet-overlay",
702
702
  "data-scrim": t,
703
703
  className: n("nxgt-scrim fixed inset-0 z-50", e),
704
704
  ...r
705
705
  });
706
706
  }
707
- function ir({ className: e, children: t, side: i = "right", withCloseButton: a, inset: o = !1, scrim: s, onOpenAutoFocus: c, onCloseAutoFocus: l, onEscapeKeyDown: u, ref: d, ...f }) {
708
- let { t: p } = j(), m = se({
709
- onOpenAutoFocus: c,
710
- onCloseAutoFocus: l
711
- }), h = ae({
712
- ref: d,
713
- onEscapeKeyDown: u,
714
- ...f
707
+ function rr({ className: e, children: t, side: r = "right", withCloseButton: i, inset: a = !1, scrim: o, onOpenAutoFocus: s, onCloseAutoFocus: c, onEscapeKeyDown: l, ref: u, ...d }) {
708
+ let { t: f } = j(), p = ae({
709
+ onOpenAutoFocus: s,
710
+ onCloseAutoFocus: c
711
+ }), m = re({
712
+ ref: u,
713
+ onEscapeKeyDown: l,
714
+ ...d
715
715
  });
716
- return /* @__PURE__ */ B(te, {
716
+ return /* @__PURE__ */ V(ee, {
717
717
  value: !0,
718
- children: /* @__PURE__ */ V(nr, { children: [/* @__PURE__ */ B(rr, {
719
- ref: h.overlayRef,
720
- scrim: s
721
- }), /* @__PURE__ */ V(fe, {
722
- ref: h.ref,
718
+ children: /* @__PURE__ */ H(tr, { children: [/* @__PURE__ */ V(nr, {
719
+ ref: m.overlayRef,
720
+ scrim: o
721
+ }), /* @__PURE__ */ H(ue, {
722
+ ref: m.ref,
723
723
  "data-slot": "sheet-content",
724
- "data-side": i,
725
- "data-inset": o || void 0,
726
- className: n(Jn({
727
- side: i,
728
- inset: o
729
- }), a && (i === "bottom" || o ? "pt-8" : "pt-[calc(2rem+env(safe-area-inset-top))]"), e),
730
- onOpenAutoFocus: m.onOpenAutoFocus,
731
- onCloseAutoFocus: m.onCloseAutoFocus,
732
- onEscapeKeyDown: h.onEscapeKeyDown,
733
- ...f,
734
- ...h.outside,
735
- children: [t, a && /* @__PURE__ */ B(w, {
736
- "aria-label": p("material.buttons.close", "Close"),
737
- className: r({
724
+ "data-side": r,
725
+ "data-inset": a || void 0,
726
+ className: n(qn({
727
+ side: r,
728
+ inset: a
729
+ }), i && (r === "bottom" || a ? "pt-8" : "pt-[calc(2rem+env(safe-area-inset-top))]"), e),
730
+ onOpenAutoFocus: p.onOpenAutoFocus,
731
+ onCloseAutoFocus: p.onCloseAutoFocus,
732
+ onEscapeKeyDown: m.onEscapeKeyDown,
733
+ ...d,
734
+ ...m.outside,
735
+ children: [t, i && /* @__PURE__ */ V(C, {
736
+ "aria-label": f("material.buttons.close", "Close"),
737
+ className: ye({
738
738
  variant: "tonal",
739
739
  color: "default",
740
- className: n("absolute right-3 top-3", "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", !o && i !== "bottom" && "top-[max(0.75rem,env(safe-area-inset-top))]", !o && i === "right" && "right-[max(0.75rem,env(safe-area-inset-right))]")
740
+ className: n("absolute right-3 top-3", "pointer-coarse:size-11 pointer-coarse:p-1 pointer-coarse:-m-1 pointer-coarse:bg-clip-content", !a && r !== "bottom" && "top-[max(0.75rem,env(safe-area-inset-top))]", !a && r === "right" && "right-[max(0.75rem,env(safe-area-inset-right))]")
741
741
  }),
742
- children: /* @__PURE__ */ B(dt, { className: "size-4" })
742
+ children: /* @__PURE__ */ V(ut, { className: "size-4" })
743
743
  })]
744
744
  })] })
745
745
  });
746
746
  }
747
747
  //#endregion
748
748
  //#region lib/components/ui/primitives/scroll-area/scroll-area.tsx
749
- function ar({ className: e, children: t, viewportProps: r, ...i }) {
750
- let a = Oe();
751
- return /* @__PURE__ */ V(zn, {
749
+ function ir({ className: e, children: t, viewportProps: r, ...i }) {
750
+ let a = De();
751
+ return /* @__PURE__ */ H(Rn, {
752
752
  "data-slot": "scroll-area",
753
753
  className: n("relative", e),
754
754
  ...i,
755
755
  children: [
756
- /* @__PURE__ */ B(Bn, {
756
+ /* @__PURE__ */ V(zn, {
757
757
  ...r,
758
758
  "data-slot": "scroll-area-viewport",
759
759
  nonce: a,
760
760
  className: n("focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", r?.className),
761
761
  children: t
762
762
  }),
763
- /* @__PURE__ */ B(or, {}),
764
- /* @__PURE__ */ B(Vn, {})
763
+ /* @__PURE__ */ V(ar, {}),
764
+ /* @__PURE__ */ V(Bn, {})
765
765
  ]
766
766
  });
767
767
  }
768
- function or({ className: e, orientation: t = "vertical", ...r }) {
769
- return /* @__PURE__ */ B(_n, {
768
+ function ar({ className: e, orientation: t = "vertical", ...r }) {
769
+ return /* @__PURE__ */ V(gn, {
770
770
  "data-slot": "scroll-area-scrollbar",
771
771
  orientation: t,
772
772
  className: n("flex touch-none p-px transition-colors select-none", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
773
773
  ...r,
774
- children: /* @__PURE__ */ B(On, {
774
+ children: /* @__PURE__ */ V(Dn, {
775
775
  "data-slot": "scroll-area-thumb",
776
776
  className: "bg-border relative flex-1 rounded-full"
777
777
  })
@@ -779,9 +779,9 @@ function or({ className: e, orientation: t = "vertical", ...r }) {
779
779
  }
780
780
  //#endregion
781
781
  //#region lib/components/ui/feedback/error-state/partials/error-state-actions.tsx
782
- function sr({ onRetry: e, retrying: t, retryLabel: n, action: r }) {
783
- let { t: i } = j(), [a, o] = R(!1);
784
- return /* @__PURE__ */ V(z, { children: [e && /* @__PURE__ */ B(xe, {
782
+ function or({ onRetry: e, retrying: t, retryLabel: n, action: r }) {
783
+ let { t: i } = j(), [a, o] = z(!1);
784
+ return /* @__PURE__ */ H(B, { children: [e && /* @__PURE__ */ V(M, {
785
785
  variant: "outlined",
786
786
  className: "text-foreground",
787
787
  "data-slot": "error-state-retry",
@@ -794,29 +794,29 @@ function sr({ onRetry: e, retrying: t, retryLabel: n, action: r }) {
794
794
  t.then(e, e);
795
795
  }
796
796
  },
797
- children: n ?? i(H.retry.key, H.retry.fallback)
797
+ children: n ?? i(U.retry.key, U.retry.fallback)
798
798
  }), r] });
799
799
  }
800
800
  //#endregion
801
801
  //#region lib/components/ui/feedback/error-state/partials/error-state-details.tsx
802
- function cr({ details: e }) {
803
- let { t } = j(), n = (e) => t(H[e].key, H[e].fallback);
804
- return /* @__PURE__ */ V("details", {
802
+ function sr({ details: e }) {
803
+ let { t } = j(), n = (e) => t(U[e].key, U[e].fallback);
804
+ return /* @__PURE__ */ H("details", {
805
805
  "data-slot": "error-state-details",
806
806
  className: "w-full max-w-sm rounded border border-border px-3 py-2 text-left text-sm text-foreground",
807
- children: [/* @__PURE__ */ B("summary", {
807
+ children: [/* @__PURE__ */ V("summary", {
808
808
  className: "cursor-pointer font-medium",
809
809
  children: n("details")
810
- }), /* @__PURE__ */ B("dl", {
810
+ }), /* @__PURE__ */ V("dl", {
811
811
  className: "mt-2 flex flex-col gap-2",
812
- children: e.map((e, t) => /* @__PURE__ */ V("div", {
812
+ children: e.map((e, t) => /* @__PURE__ */ H("div", {
813
813
  className: "flex flex-col gap-0.5",
814
- children: [/* @__PURE__ */ V("dt", {
814
+ children: [/* @__PURE__ */ H("dt", {
815
815
  className: "font-medium",
816
816
  children: [n(t === 0 ? "detailsName" : "detailsCause"), `: ${e.name}`]
817
- }), /* @__PURE__ */ V("dd", {
817
+ }), /* @__PURE__ */ H("dd", {
818
818
  className: "break-words",
819
- children: [/* @__PURE__ */ V("span", {
819
+ children: [/* @__PURE__ */ H("span", {
820
820
  className: "font-medium",
821
821
  children: [n("detailsMessage"), ": "]
822
822
  }), e.message]
@@ -827,17 +827,17 @@ function cr({ details: e }) {
827
827
  }
828
828
  //#endregion
829
829
  //#region lib/components/ui/feedback/error-state/error-state.tsx
830
- function lr(e, n) {
831
- return e === void 0 ? n.length > 0 && /* @__PURE__ */ B(cr, { details: n }) : t(e, n);
830
+ function cr(e, n) {
831
+ return e === void 0 ? n.length > 0 && /* @__PURE__ */ V(sr, { details: n }) : t(e, n);
832
832
  }
833
- function ur({ kind: e = "generic", size: t, title: n, description: r, illustration: i, icon: a, error: o, showDetails: s, details: c, onRetry: l, retrying: u, retryLabel: d, action: f, children: p, ...m }) {
834
- let { t: h } = j(), g = Ct(e, "error-state"), _ = s === !1 ? [] : St(o), v = (l || f) && /* @__PURE__ */ B(sr, {
833
+ function lr({ kind: e = "generic", size: t, title: n, description: r, illustration: i, icon: a, error: o, showDetails: s, details: c, onRetry: l, retrying: u, retryLabel: d, action: f, children: p, ...m }) {
834
+ let { t: h } = j(), g = St(e, "error-state"), _ = s === !1 ? [] : xt(o), v = (l || f) && /* @__PURE__ */ V(or, {
835
835
  onRetry: l,
836
836
  retrying: u,
837
837
  retryLabel: d,
838
838
  action: f
839
839
  });
840
- return /* @__PURE__ */ V(we, {
840
+ return /* @__PURE__ */ H(Ce, {
841
841
  role: "alert",
842
842
  "data-slot": "error-state",
843
843
  kind: e,
@@ -848,35 +848,35 @@ function ur({ kind: e = "generic", size: t, title: n, description: r, illustrati
848
848
  description: r ?? (n == null ? h(g.descriptionKey, g.description) : void 0),
849
849
  actions: v || void 0,
850
850
  ...m,
851
- children: [p, lr(c, _)]
851
+ children: [p, cr(c, _)]
852
852
  });
853
853
  }
854
854
  //#endregion
855
855
  //#region lib/components/ui/media/pdf-viewer/pdf-reader-states.tsx
856
- function dr({ className: e }) {
856
+ function ur({ className: e }) {
857
857
  let { t } = j();
858
- return /* @__PURE__ */ B(Ee, {
858
+ return /* @__PURE__ */ V(Te, {
859
859
  size: "compact",
860
860
  kind: "empty",
861
861
  className: n("min-h-64 h-full", e),
862
- icon: /* @__PURE__ */ B(Ve, { "aria-hidden": !0 }),
862
+ icon: /* @__PURE__ */ V(Be, { "aria-hidden": !0 }),
863
863
  title: t("material.pdf-reader.empty", "No document selected")
864
864
  });
865
865
  }
866
- function fr() {
866
+ function dr() {
867
867
  let { t: e } = j();
868
- return /* @__PURE__ */ V("div", {
868
+ return /* @__PURE__ */ H("div", {
869
869
  role: "status",
870
870
  className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-background/80 backdrop-blur-sm",
871
- children: [/* @__PURE__ */ B(Ke, { className: "size-8 animate-spin text-primary-text" }), /* @__PURE__ */ B("p", {
871
+ children: [/* @__PURE__ */ V(Ge, { className: "size-8 animate-spin text-primary-text" }), /* @__PURE__ */ V("p", {
872
872
  className: "text-sm text-muted-foreground",
873
873
  children: e("material.pdf-reader.loading", "Loading document…")
874
874
  })]
875
875
  });
876
876
  }
877
- function pr({ error: e, onRetry: t, title: n }) {
877
+ function fr({ error: e, onRetry: t, title: n }) {
878
878
  let { t: r } = j();
879
- return /* @__PURE__ */ B(ur, {
879
+ return /* @__PURE__ */ V(lr, {
880
880
  size: "compact",
881
881
  className: "absolute inset-0",
882
882
  title: n ?? r("material.pdf-reader.error", "Failed to load document"),
@@ -885,21 +885,21 @@ function pr({ error: e, onRetry: t, title: n }) {
885
885
  retryLabel: r("material.pdf-reader.retry", "Retry")
886
886
  });
887
887
  }
888
- function mr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
889
- let { t: i } = j(), a = _t(), o = L(null);
890
- return P(() => {
888
+ function pr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
889
+ let { t: i } = j(), a = gt(), o = R(null);
890
+ return F(() => {
891
891
  t && o.current?.focus();
892
- }, [t]), /* @__PURE__ */ V("div", {
892
+ }, [t]), /* @__PURE__ */ H("div", {
893
893
  className: "absolute inset-0 flex flex-col items-center justify-center gap-4",
894
894
  children: [
895
- /* @__PURE__ */ B(Ue, { className: "size-10 text-primary-text opacity-70" }),
896
- /* @__PURE__ */ B("p", {
895
+ /* @__PURE__ */ V(He, { className: "size-10 text-primary-text opacity-70" }),
896
+ /* @__PURE__ */ V("p", {
897
897
  className: "text-sm font-semibold",
898
898
  children: i("material.pdf-reader.password", "Password protected")
899
899
  }),
900
- /* @__PURE__ */ V("div", {
900
+ /* @__PURE__ */ H("div", {
901
901
  className: "flex gap-2",
902
- children: [/* @__PURE__ */ B(oe, {
902
+ children: [/* @__PURE__ */ V(ie, {
903
903
  type: "password",
904
904
  placeholder: i("material.pdf-reader.password-placeholder", "Enter password"),
905
905
  ref: o,
@@ -913,14 +913,14 @@ function mr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
913
913
  e.key === "Enter" && r();
914
914
  },
915
915
  autoFocus: !0
916
- }), /* @__PURE__ */ B(xe, {
916
+ }), /* @__PURE__ */ V(M, {
917
917
  variant: "filled",
918
918
  color: "primary",
919
919
  onClick: r,
920
920
  children: i("material.pdf-reader.unlock", "Unlock")
921
921
  })]
922
922
  }),
923
- t && /* @__PURE__ */ B("p", {
923
+ t && /* @__PURE__ */ V("p", {
924
924
  id: a,
925
925
  role: "alert",
926
926
  className: "text-sm text-error-text",
@@ -931,26 +931,26 @@ function mr({ value: e, incorrect: t = !1, onChange: n, onSubmit: r }) {
931
931
  }
932
932
  //#endregion
933
933
  //#region lib/components/ui/media/pdf-reader/use-open-focus-gate.ts
934
- function hr() {
935
- let e = L(!1);
934
+ function mr() {
935
+ let e = R(!1);
936
936
  return {
937
937
  gate: e,
938
938
  onOpenAutoFocus: () => {
939
939
  e.current = !0;
940
940
  },
941
- clear: N(() => {
941
+ clear: P(() => {
942
942
  e.current = !1;
943
943
  }, [])
944
944
  };
945
945
  }
946
946
  //#endregion
947
947
  //#region lib/components/ui/media/pdf-reader/modes/dialog-mode.tsx
948
- function gr({ open: e, onOpenChange: t, title: n, children: r }) {
949
- let { t: i } = j(), a = hr();
950
- return /* @__PURE__ */ B(ue, {
948
+ function hr({ open: e, onOpenChange: t, title: n, children: r }) {
949
+ let { t: i } = j(), a = mr();
950
+ return /* @__PURE__ */ V(ce, {
951
951
  open: e,
952
952
  onOpenChange: t,
953
- children: /* @__PURE__ */ V(le, {
953
+ children: /* @__PURE__ */ H(se, {
954
954
  size: "full",
955
955
  mobilePresentation: "fullscreen",
956
956
  "aria-describedby": void 0,
@@ -959,17 +959,17 @@ function gr({ open: e, onOpenChange: t, title: n, children: r }) {
959
959
  onPointerMoveCapture: a.clear,
960
960
  onKeyDownCapture: a.clear,
961
961
  className: "h-[min(56rem,calc(100dvh-4rem))] gap-0 overflow-hidden p-0 max-sm:h-dvh max-sm:p-0",
962
- children: [/* @__PURE__ */ B(de, {
962
+ children: [/* @__PURE__ */ V(le, {
963
963
  className: "sr-only",
964
964
  children: n || i("material.pdf-reader.label", "PDF reader")
965
- }), /* @__PURE__ */ B(he, {
965
+ }), /* @__PURE__ */ V(pe, {
966
966
  value: a.gate,
967
967
  children: r
968
968
  })]
969
969
  })
970
970
  });
971
971
  }
972
- var _r = xt({
972
+ var gr = bt({
973
973
  name: "pdf-reader",
974
974
  initialState: ((e) => ({
975
975
  size: "expanded",
@@ -1029,24 +1029,24 @@ var _r = xt({
1029
1029
  }
1030
1030
  }
1031
1031
  });
1032
- _r.actions;
1033
- var X = {
1032
+ gr.actions;
1033
+ var _r = {
1034
1034
  selectEscapeTarget: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : null,
1035
1035
  selectHeaderKind: (e) => e.annotating ? "annotate" : e.searchOpen ? "search" : "default",
1036
1036
  selectRailValue: (e) => e.panelOpen ? e.panelTab : ""
1037
- }, vr = mt(null), yr = mt(null);
1037
+ }, vr = pt(null), yr = pt(null);
1038
1038
  function br(e, t) {
1039
1039
  if (!e) throw Error(`${t} must be used within PdfReader`);
1040
1040
  return e;
1041
1041
  }
1042
- var Z = () => br(gt(vr), "useReaderChrome"), Q = () => br(gt(yr), "useReaderDocumentContext");
1042
+ var Z = () => br(ht(vr), "useReaderChrome"), Q = () => br(ht(yr), "useReaderDocumentContext");
1043
1043
  function xr(e) {
1044
1044
  return e < 600 ? "compact" : e < 840 ? "medium" : "expanded";
1045
1045
  }
1046
1046
  //#endregion
1047
1047
  //#region lib/components/ui/media/pdf-reader/use-container-size.ts
1048
1048
  function Sr(e, t) {
1049
- F(() => {
1049
+ I(() => {
1050
1050
  let n = e.current;
1051
1051
  if (!n || (t(xr(n.getBoundingClientRect().width)), typeof ResizeObserver > "u")) return;
1052
1052
  let r = new ResizeObserver((e) => {
@@ -1059,8 +1059,8 @@ function Sr(e, t) {
1059
1059
  //#endregion
1060
1060
  //#region lib/components/ui/media/pdf-reader/use-focus-hand-off.ts
1061
1061
  function Cr(e, t) {
1062
- let n = L(t);
1063
- P(() => {
1062
+ let n = R(t);
1063
+ F(() => {
1064
1064
  let r = n.current;
1065
1065
  n.current = t;
1066
1066
  let i = e.current;
@@ -1108,7 +1108,7 @@ function wr(e, { typing: t, inBar: n, scrollsSideways: r = !1, rtl: i = !1 }) {
1108
1108
  //#region lib/components/ui/media/pdf-reader/use-reader-keys.ts
1109
1109
  var Tr = 1, Er = "[role=\"toolbar\"], [role=\"menu\"], [role=\"radiogroup\"], [role=\"tablist\"], [role=\"listbox\"], [role=\"tree\"], [role=\"grid\"]";
1110
1110
  function Dr() {
1111
- let { chrome: e, chromeActions: t, frameRef: n, openSearch: r } = Z(), { state: i, actions: a, searchHits: o } = Q(), s = pe(n) === "rtl", c = N((e) => {
1111
+ let { chrome: e, chromeActions: t, frameRef: n, openSearch: r } = Z(), { state: i, actions: a, searchHits: o } = Q(), s = de(n) === "rtl", c = P((e) => {
1112
1112
  if (e.defaultPrevented) return;
1113
1113
  let t = e.target, c = n.current?.querySelector("[data-slot=\"scroll-area-viewport\"]"), l = wr(e.nativeEvent, {
1114
1114
  typing: ["INPUT", "TEXTAREA"].includes(t.tagName),
@@ -1139,7 +1139,7 @@ function Dr() {
1139
1139
  s,
1140
1140
  o,
1141
1141
  i.numPages
1142
- ]), l = X.selectEscapeTarget(e), u = N((e) => {
1142
+ ]), l = _r.selectEscapeTarget(e), u = P((e) => {
1143
1143
  if (e.key !== "Escape" || e.defaultPrevented) return;
1144
1144
  let r = e.target;
1145
1145
  !(r instanceof Node) || !n.current?.contains(r) || r instanceof Element && r.closest("[role=\"menu\"]") || (e.preventDefault(), e.stopPropagation(), l === "annotate" ? t.stopAnnotating() : t.closeSearchField());
@@ -1148,7 +1148,7 @@ function Dr() {
1148
1148
  l,
1149
1149
  n
1150
1150
  ]);
1151
- return Se("keydown", l ? u : null, void 0, !0), c;
1151
+ return xe("keydown", l ? u : null, void 0, !0), c;
1152
1152
  }
1153
1153
  //#endregion
1154
1154
  //#region lib/components/ui/media/pdf-reader/format-locale.ts
@@ -1161,8 +1161,8 @@ function Or(e, t = "en") {
1161
1161
  //#endregion
1162
1162
  //#region lib/components/ui/media/pdf-reader/partials/announcer.tsx
1163
1163
  function kr() {
1164
- let { t: e, language: t } = j(), { state: n, scale: r, announcements: i } = Q(), [a, o] = R(""), { currentPage: s, numPages: c } = n, { recent: l } = i;
1165
- return P(() => {
1164
+ let { t: e, language: t } = j(), { state: n, scale: r, announcements: i } = Q(), [a, o] = z(""), { currentPage: s, numPages: c } = n, { recent: l } = i;
1165
+ return F(() => {
1166
1166
  !l("page") || c === 0 || o(e("material.pdf-reader.next.announce-page", "Page {page} of {total}", {
1167
1167
  page: s,
1168
1168
  total: c
@@ -1171,13 +1171,13 @@ function kr() {
1171
1171
  s,
1172
1172
  c,
1173
1173
  l
1174
- ]), P(() => {
1174
+ ]), F(() => {
1175
1175
  l("zoom") && o(e("material.pdf-reader.next.announce-zoom", "Zoom {level}", { level: Or(r, t ?? "en") }));
1176
1176
  }, [
1177
1177
  r,
1178
1178
  t,
1179
1179
  l
1180
- ]), /* @__PURE__ */ B("div", {
1180
+ ]), /* @__PURE__ */ V("div", {
1181
1181
  "aria-live": "polite",
1182
1182
  "aria-atomic": "true",
1183
1183
  className: "sr-only",
@@ -1188,7 +1188,7 @@ function kr() {
1188
1188
  //#region lib/components/ui/media/pdf-reader/partials/reader-status.tsx
1189
1189
  function Ar({ onRetry: e }) {
1190
1190
  let { t } = j(), { state: n, password: r } = Q();
1191
- if (n.isPasswordProtected) return /* @__PURE__ */ B(mr, {
1191
+ if (n.isPasswordProtected) return /* @__PURE__ */ V(pr, {
1192
1192
  value: r.input,
1193
1193
  incorrect: n.passwordError ?? !1,
1194
1194
  onChange: r.setInput,
@@ -1196,13 +1196,13 @@ function Ar({ onRetry: e }) {
1196
1196
  });
1197
1197
  if (n.error) {
1198
1198
  let r = n.loadError ?? Error(n.error);
1199
- return /* @__PURE__ */ B(pr, {
1199
+ return /* @__PURE__ */ V(fr, {
1200
1200
  error: r,
1201
1201
  onRetry: e,
1202
- title: Dt(r).kind === "invalid" ? t("material.pdf-reader.next.invalid-error", "This file is not a valid PDF") : void 0
1202
+ title: Et(r).kind === "invalid" ? t("material.pdf-reader.next.invalid-error", "This file is not a valid PDF") : void 0
1203
1203
  });
1204
1204
  }
1205
- return n.isLoading ? /* @__PURE__ */ B(fr, {}) : null;
1205
+ return n.isLoading ? /* @__PURE__ */ V(dr, {}) : null;
1206
1206
  }
1207
1207
  //#endregion
1208
1208
  //#region lib/components/ui/media/pdf-reader/panel-surface.ts
@@ -1211,17 +1211,17 @@ var jr = "bg-[color-mix(in_oklab,var(--primary)_5%,var(--background))] dark:bg-[
1211
1211
  //#region lib/components/ui/media/pdf-viewer/pdf-outline-sidebar.tsx
1212
1212
  function Mr({ items: e, onSelect: t, className: r }) {
1213
1213
  let { t: i } = j();
1214
- return /* @__PURE__ */ B("div", {
1214
+ return /* @__PURE__ */ V("div", {
1215
1215
  className: n("flex min-h-0 flex-1 flex-col", r),
1216
- children: e.length === 0 ? /* @__PURE__ */ B("p", {
1216
+ children: e.length === 0 ? /* @__PURE__ */ V("p", {
1217
1217
  className: "px-3 py-6 text-center text-xs text-muted-foreground",
1218
1218
  children: i("material.pdf-reader.outline-empty", "No outline in this document")
1219
- }) : /* @__PURE__ */ B(ar, {
1219
+ }) : /* @__PURE__ */ V(ir, {
1220
1220
  className: "flex-1",
1221
- children: /* @__PURE__ */ B("nav", {
1221
+ children: /* @__PURE__ */ V("nav", {
1222
1222
  className: "p-2",
1223
1223
  "aria-label": i("material.pdf-reader.outline", "Outline"),
1224
- children: e.map((e, n) => /* @__PURE__ */ B(Nr, {
1224
+ children: e.map((e, n) => /* @__PURE__ */ V(Nr, {
1225
1225
  item: e,
1226
1226
  depth: 0,
1227
1227
  onSelect: t
@@ -1231,22 +1231,22 @@ function Mr({ items: e, onSelect: t, className: r }) {
1231
1231
  });
1232
1232
  }
1233
1233
  function Nr({ item: e, depth: t, onSelect: n }) {
1234
- let { t: r } = j(), [i, a] = R(t < 1), o = e.items.length > 0;
1235
- return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("button", {
1234
+ let { t: r } = j(), [i, a] = z(t < 1), o = e.items.length > 0;
1235
+ return /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ H("button", {
1236
1236
  type: "button",
1237
1237
  style: { paddingLeft: 8 + t * 12 },
1238
1238
  className: "flex w-full items-center gap-1 rounded px-2 py-1 text-left text-xs hover:bg-accent",
1239
1239
  onClick: () => {
1240
1240
  n(e), o && a((e) => !e);
1241
1241
  },
1242
- children: [o && /* @__PURE__ */ B("span", {
1242
+ children: [o && /* @__PURE__ */ V("span", {
1243
1243
  className: "text-muted-foreground",
1244
1244
  children: i ? "▾" : "▸"
1245
- }), /* @__PURE__ */ B("span", {
1245
+ }), /* @__PURE__ */ V("span", {
1246
1246
  className: "truncate",
1247
1247
  children: e.title || r("material.pdf-reader.untitled", "Untitled")
1248
1248
  })]
1249
- }), o && i && e.items.map((e, r) => /* @__PURE__ */ B(Nr, {
1249
+ }), o && i && e.items.map((e, r) => /* @__PURE__ */ V(Nr, {
1250
1250
  item: e,
1251
1251
  depth: t + 1,
1252
1252
  onSelect: n
@@ -1255,60 +1255,60 @@ function Nr({ item: e, depth: t, onSelect: n }) {
1255
1255
  //#endregion
1256
1256
  //#region lib/components/ui/media/pdf-reader/partials/search-field.tsx
1257
1257
  function Pr({ autoFocus: e = !0, stacked: t = !1 }) {
1258
- let { t: r } = j(), { state: a, actions: o, searchHits: s } = Q(), c = L(null), { chrome: l } = Z(), u = l.searchFocusTick;
1259
- P(() => {
1260
- e && c.current?.focus();
1261
- }, [e, u]);
1262
- let d = (e) => {
1263
- e.key === "Enter" && (e.preventDefault(), s.jump(e.shiftKey ? -1 : 1));
1264
- }, f = r("material.pdf-reader.search-prev", "Previous match (Shift+F3)"), p = r("material.pdf-reader.search-next", "Next match (F3)"), m = r("material.pdf-reader.search", "Search");
1265
- return /* @__PURE__ */ V("div", {
1258
+ let { t: r } = j(), { state: i, actions: a, searchHits: o } = Q(), s = R(null), { chrome: c } = Z(), l = c.searchFocusTick;
1259
+ F(() => {
1260
+ e && s.current?.focus();
1261
+ }, [e, l]);
1262
+ let u = (e) => {
1263
+ e.key === "Enter" && (e.preventDefault(), o.jump(e.shiftKey ? -1 : 1));
1264
+ }, d = r("material.pdf-reader.search-prev", "Previous match (Shift+F3)"), f = r("material.pdf-reader.search-next", "Next match (F3)"), p = r("material.pdf-reader.search", "Search");
1265
+ return /* @__PURE__ */ H("div", {
1266
1266
  className: n("flex min-w-0 flex-1 items-center gap-1", t && "flex-wrap"),
1267
1267
  children: [
1268
- /* @__PURE__ */ B(D, {
1269
- label: m,
1268
+ /* @__PURE__ */ V(D, {
1269
+ label: p,
1270
1270
  fit: !1,
1271
- children: /* @__PURE__ */ B(oe, {
1272
- ref: c,
1271
+ children: /* @__PURE__ */ V(ie, {
1272
+ ref: s,
1273
1273
  type: "search",
1274
- "aria-label": m,
1275
- placeholder: m,
1274
+ "aria-label": p,
1275
+ placeholder: p,
1276
1276
  className: n("h-9 min-w-0 flex-1 text-sm", t && "basis-full"),
1277
- value: a.searchQuery,
1277
+ value: i.searchQuery,
1278
1278
  onChange: (e) => {
1279
- o.setSearch(e.target.value), s.reset();
1279
+ a.setSearch(e.target.value), o.reset();
1280
1280
  },
1281
- onKeyDown: d
1281
+ onKeyDown: u
1282
1282
  })
1283
1283
  }),
1284
- /* @__PURE__ */ B("span", {
1284
+ /* @__PURE__ */ V("span", {
1285
1285
  role: "status",
1286
1286
  className: n("shrink-0 text-muted-foreground text-xs tabular-nums", t ? "me-auto text-start empty:w-0" : "min-w-14 text-center"),
1287
- children: a.searchQuery ? r("material.pdf-reader.next.search-count", "{count, plural, =0 {No match} one {# match} other {# matches}}", { count: s.hitCount }) : null
1287
+ children: i.searchQuery ? r("material.pdf-reader.next.search-count", "{count, plural, =0 {No match} one {# match} other {# matches}}", { count: o.hitCount }) : null
1288
1288
  }),
1289
- /* @__PURE__ */ V("div", {
1289
+ /* @__PURE__ */ H("div", {
1290
1290
  className: n(t ? "ms-auto flex gap-1" : "contents"),
1291
- children: [/* @__PURE__ */ B(D, {
1292
- label: f,
1293
- children: /* @__PURE__ */ B(i, {
1291
+ children: [/* @__PURE__ */ V(D, {
1292
+ label: d,
1293
+ children: /* @__PURE__ */ V(be, {
1294
1294
  variant: "ghost",
1295
1295
  color: "default",
1296
- "aria-label": f,
1297
- tooltip: f,
1298
- disabled: s.hitCount === 0,
1299
- onClick: () => s.jump(-1),
1300
- children: /* @__PURE__ */ B(Ie, {})
1296
+ "aria-label": d,
1297
+ tooltip: d,
1298
+ disabled: o.hitCount === 0,
1299
+ onClick: () => o.jump(-1),
1300
+ children: /* @__PURE__ */ V(Fe, {})
1301
1301
  })
1302
- }), /* @__PURE__ */ B(D, {
1303
- label: p,
1304
- children: /* @__PURE__ */ B(i, {
1302
+ }), /* @__PURE__ */ V(D, {
1303
+ label: f,
1304
+ children: /* @__PURE__ */ V(be, {
1305
1305
  variant: "ghost",
1306
1306
  color: "default",
1307
- "aria-label": p,
1308
- tooltip: p,
1309
- disabled: s.hitCount === 0,
1310
- onClick: () => s.jump(1),
1311
- children: /* @__PURE__ */ B(Ne, {})
1307
+ "aria-label": f,
1308
+ tooltip: f,
1309
+ disabled: o.hitCount === 0,
1310
+ onClick: () => o.jump(1),
1311
+ children: /* @__PURE__ */ V(Me, {})
1312
1312
  })
1313
1313
  })]
1314
1314
  })
@@ -1316,7 +1316,7 @@ function Pr({ autoFocus: e = !0, stacked: t = !1 }) {
1316
1316
  });
1317
1317
  }
1318
1318
  function Fr(e, t, n, r, i = "single", a = "ltr") {
1319
- return kt(Array.from({ length: e }, (e, i) => Wt(t[i], n, r)), {
1319
+ return Ot(Array.from({ length: e }, (e, i) => Ut(t[i], n, r)), {
1320
1320
  mode: i,
1321
1321
  gap: 16,
1322
1322
  columnGap: 12,
@@ -1324,8 +1324,8 @@ function Fr(e, t, n, r, i = "single", a = "ltr") {
1324
1324
  });
1325
1325
  }
1326
1326
  function Ir(e, t, n, r, i, a) {
1327
- let o = Math.min(n || 1, Rt), s = Fr(o, r, 1, i, t), c = Fr(o, r, 2, i, t).maxWidth - s.maxWidth, l = s.maxWidth - c;
1328
- return Bt(e, {
1327
+ let o = Math.min(n || 1, Lt), s = Fr(o, r, 1, i, t), c = Fr(o, r, 2, i, t).maxWidth - s.maxWidth, l = s.maxWidth - c;
1328
+ return zt(e, {
1329
1329
  width: c,
1330
1330
  height: Math.max(...s.rows.map((e) => e.height))
1331
1331
  }, {
@@ -1455,7 +1455,7 @@ async function Jr(e, t, n, r, i) {
1455
1455
  }
1456
1456
  async function Yr(e, t, n) {
1457
1457
  let { page: r, viewport: i, scale: a, rotation: o } = e;
1458
- return await Ft(r, t, Pt({
1458
+ return await Pt(r, t, Nt({
1459
1459
  cssWidth: i.width,
1460
1460
  cssHeight: i.height,
1461
1461
  devicePixelRatio: window.devicePixelRatio,
@@ -1468,15 +1468,15 @@ async function Yr(e, t, n) {
1468
1468
  //#endregion
1469
1469
  //#region lib/components/ui/media/pdf-reader/engine/use-thumbnail.ts
1470
1470
  function Xr(e) {
1471
- let { doc: t, pageNumber: n, width: r, rotation: i, box: a, host: o } = e, [s, c] = R(!1), l = L(null), u = L(e.onError);
1472
- F(() => {
1471
+ let { doc: t, pageNumber: n, width: r, rotation: i, box: a, host: o } = e, [s, c] = z(!1), l = R(null), u = R(e.onError);
1472
+ I(() => {
1473
1473
  u.current = e.onError;
1474
- }), P(() => {
1474
+ }), F(() => {
1475
1475
  let e = a.current;
1476
1476
  if (!e) return;
1477
1477
  let t = new IntersectionObserver(([e]) => c(!!e?.isIntersecting), { rootMargin: "240px 0px" });
1478
1478
  return t.observe(e), () => t.disconnect();
1479
- }, [a]), P(() => {
1479
+ }, [a]), F(() => {
1480
1480
  let e = o.current;
1481
1481
  if (!t || !e || !s) return;
1482
1482
  let a = new AbortController(), { signal: c } = a, d = document.createElement("canvas");
@@ -1495,7 +1495,7 @@ function Xr(e) {
1495
1495
  i,
1496
1496
  s,
1497
1497
  o
1498
- ]), P(() => () => {
1498
+ ]), F(() => () => {
1499
1499
  l.current?.cleanup(), l.current = null;
1500
1500
  }, [
1501
1501
  t,
@@ -1503,8 +1503,8 @@ function Xr(e) {
1503
1503
  s
1504
1504
  ]);
1505
1505
  }
1506
- var Zr = ht(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, current: o, tabStop: s, onGo: c }) {
1507
- let { t: l } = j(), u = L(null), d = L(null);
1506
+ var Zr = mt(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, current: o, tabStop: s, onGo: c }) {
1507
+ let { t: l } = j(), u = R(null), d = R(null);
1508
1508
  Xr({
1509
1509
  doc: t,
1510
1510
  pageNumber: e,
@@ -1513,8 +1513,8 @@ var Zr = ht(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1513
1513
  box: u,
1514
1514
  host: d
1515
1515
  });
1516
- let f = Wt(r, 120 / Jt(r ?? Lt, i).width, i);
1517
- return /* @__PURE__ */ V("button", {
1516
+ let f = Ut(r, 120 / qt(r ?? It, i).width, i);
1517
+ return /* @__PURE__ */ H("button", {
1518
1518
  ref: u,
1519
1519
  "data-lit": a ? "" : void 0,
1520
1520
  "data-page-number": e,
@@ -1524,11 +1524,11 @@ var Zr = ht(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1524
1524
  "aria-label": l("material.pdf-reader.go-to-page", "Go to page {page}", { page: e }),
1525
1525
  "aria-current": o ? "page" : void 0,
1526
1526
  className: n("flex cursor-pointer flex-col items-center gap-1 rounded-lg p-1.5 outline-none transition-colors hover:bg-foreground/5 focus-visible:ring-2 focus-visible:ring-ring", a && "bg-primary/10"),
1527
- children: [/* @__PURE__ */ B("div", {
1527
+ children: [/* @__PURE__ */ V("div", {
1528
1528
  ref: d,
1529
- className: n("overflow-hidden rounded-sm bg-white shadow-sm [&>canvas]:block [&>canvas]:size-full", a && "ring-2 ring-primary"),
1529
+ className: n("overflow-hidden rounded-sm bg-white shadow-sm [&>canvas]:block [&>canvas]:size-full", a && "ring-2 ring-primary-indicator"),
1530
1530
  style: f
1531
- }), /* @__PURE__ */ B("span", {
1531
+ }), /* @__PURE__ */ V("span", {
1532
1532
  "aria-hidden": !0,
1533
1533
  className: n("text-xs tabular-nums", a ? "font-semibold text-primary-text" : "text-muted-foreground"),
1534
1534
  children: e
@@ -1541,10 +1541,10 @@ var Zr = ht(function({ pageNumber: e, doc: t, size: r, rotation: i, lit: a, curr
1541
1541
  End: (e, t) => t
1542
1542
  };
1543
1543
  function $r() {
1544
- let { t: e } = j(), { state: t, actions: n, doc: r, rowStarts: i } = Q(), { numPages: a, currentPage: o, rotation: s } = t, c = L(null), [l, u] = R(null), [d, f] = zr(i, o, a), p = Math.min(Math.max(l ?? o, 1), a);
1545
- return /* @__PURE__ */ B("div", {
1544
+ let { t: e } = j(), { state: t, actions: n, doc: r, rowStarts: i } = Q(), { numPages: a, currentPage: o, rotation: s } = t, c = R(null), [l, u] = z(null), [d, f] = zr(i, o, a), p = Math.min(Math.max(l ?? o, 1), a);
1545
+ return /* @__PURE__ */ V("div", {
1546
1546
  className: "min-h-0 flex-1 overflow-y-auto",
1547
- children: /* @__PURE__ */ B("div", {
1547
+ children: /* @__PURE__ */ V("div", {
1548
1548
  ref: c,
1549
1549
  role: "group",
1550
1550
  "aria-label": e("material.pdf-reader.thumbnails", "Page thumbnails"),
@@ -1565,7 +1565,7 @@ function $r() {
1565
1565
  className: "flex flex-col items-center gap-2 p-2",
1566
1566
  children: Array.from({ length: a }, (e, i) => {
1567
1567
  let a = i + 1;
1568
- return /* @__PURE__ */ B(Zr, {
1568
+ return /* @__PURE__ */ V(Zr, {
1569
1569
  pageNumber: a,
1570
1570
  doc: r,
1571
1571
  size: t.pageSizes?.[i],
@@ -1583,19 +1583,19 @@ function $r() {
1583
1583
  //#region lib/components/ui/media/pdf-reader/partials/panel-content.tsx
1584
1584
  function ei() {
1585
1585
  let { t: e } = j(), { chrome: t } = Z(), { state: n, onOutlineSelect: r } = Q();
1586
- return t.panelTab === "thumbs" ? /* @__PURE__ */ B($r, {}) : t.panelTab === "outline" ? n.outline.length === 0 ? /* @__PURE__ */ V("div", {
1586
+ return t.panelTab === "thumbs" ? /* @__PURE__ */ V($r, {}) : t.panelTab === "outline" ? n.outline.length === 0 ? /* @__PURE__ */ H("div", {
1587
1587
  className: "flex flex-col items-center gap-2 px-6 py-10 text-center text-muted-foreground text-sm",
1588
- children: [/* @__PURE__ */ B(Ge, {
1588
+ children: [/* @__PURE__ */ V(We, {
1589
1589
  "aria-hidden": !0,
1590
1590
  className: "size-6 opacity-60"
1591
- }), /* @__PURE__ */ B("p", { children: e("material.pdf-reader.next.outline-empty", "This document has no outline") })]
1592
- }) : /* @__PURE__ */ B(Mr, {
1591
+ }), /* @__PURE__ */ V("p", { children: e("material.pdf-reader.next.outline-empty", "This document has no outline") })]
1592
+ }) : /* @__PURE__ */ V(Mr, {
1593
1593
  items: n.outline,
1594
1594
  onSelect: r
1595
- }) : t.panelTab === "search" ? /* @__PURE__ */ B("div", {
1595
+ }) : t.panelTab === "search" ? /* @__PURE__ */ V("div", {
1596
1596
  className: "p-3",
1597
- children: /* @__PURE__ */ B(Pr, { stacked: !0 })
1598
- }) : /* @__PURE__ */ B("p", {
1597
+ children: /* @__PURE__ */ V(Pr, { stacked: !0 })
1598
+ }) : /* @__PURE__ */ V("p", {
1599
1599
  className: "p-4 text-muted-foreground text-sm",
1600
1600
  children: e("material.pdf-reader.next.annotations-empty", "No annotations yet")
1601
1601
  });
@@ -1619,10 +1619,10 @@ var ti = [
1619
1619
  "initialChrome",
1620
1620
  "showUnfinished"
1621
1621
  ], ii = {
1622
- thumbs: We,
1623
- outline: Ge,
1624
- annotations: Je,
1625
- search: it
1622
+ thumbs: Ue,
1623
+ outline: We,
1624
+ annotations: qe,
1625
+ search: rt
1626
1626
  };
1627
1627
  function ai() {
1628
1628
  let { t: e } = j();
@@ -1641,7 +1641,7 @@ function oi() {
1641
1641
  //#region lib/components/ui/media/pdf-reader/partials/panel-tabs.tsx
1642
1642
  function si({ iconOnly: e }) {
1643
1643
  let { t } = j(), { chrome: n, chromeActions: r } = Z(), i = ai(), a = oi(), o = e ? a : a.filter((e) => e !== "search");
1644
- return /* @__PURE__ */ B(Te, {
1644
+ return /* @__PURE__ */ V(we, {
1645
1645
  type: "single",
1646
1646
  variant: "segmented",
1647
1647
  value: n.panelTab,
@@ -1650,11 +1650,11 @@ function si({ iconOnly: e }) {
1650
1650
  className: "mx-3 mt-3 mb-1 w-auto shrink-0",
1651
1651
  children: o.map((t) => {
1652
1652
  let n = ii[t];
1653
- return /* @__PURE__ */ V(Ce, {
1653
+ return /* @__PURE__ */ H(Se, {
1654
1654
  value: t,
1655
1655
  "aria-label": e ? i[t] : void 0,
1656
1656
  className: "flex-1",
1657
- children: [/* @__PURE__ */ B(n, {}), e ? null : i[t]]
1657
+ children: [/* @__PURE__ */ V(n, {}), e ? null : i[t]]
1658
1658
  }, t);
1659
1659
  })
1660
1660
  });
@@ -1662,31 +1662,31 @@ function si({ iconOnly: e }) {
1662
1662
  //#endregion
1663
1663
  //#region lib/components/ui/media/pdf-reader/partials/phone-sheet.tsx
1664
1664
  function ci() {
1665
- let { t: e } = j(), { chrome: t, chromeActions: r, mode: a } = Z(), o = e("material.pdf-reader.next.panel", "Document panel"), s = /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(si, { iconOnly: !1 }), /* @__PURE__ */ B("div", {
1665
+ let { t: e } = j(), { chrome: t, chromeActions: r, mode: i } = Z(), a = e("material.pdf-reader.next.panel", "Document panel"), o = /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(si, { iconOnly: !1 }), /* @__PURE__ */ V("div", {
1666
1666
  className: "flex h-[min(46dvh,22rem)] min-h-0 flex-col",
1667
- children: /* @__PURE__ */ B(ei, {})
1667
+ children: /* @__PURE__ */ V(ei, {})
1668
1668
  })] });
1669
- return a === "fullscreen" ? t.panelOpen ? /* @__PURE__ */ V("aside", {
1670
- "aria-label": o,
1669
+ return i === "fullscreen" ? t.panelOpen ? /* @__PURE__ */ H("aside", {
1670
+ "aria-label": a,
1671
1671
  className: n("absolute inset-x-0 bottom-0 z-20 flex flex-col rounded-t-2xl border-t pb-2 shadow-2xl", jr),
1672
- children: [/* @__PURE__ */ B(i, {
1672
+ children: [/* @__PURE__ */ V(be, {
1673
1673
  variant: "ghost",
1674
1674
  color: "default",
1675
1675
  "aria-label": e("material.buttons.close", "Close"),
1676
1676
  className: "absolute end-1 top-1 z-10",
1677
1677
  onClick: () => r.closePanel(),
1678
- children: /* @__PURE__ */ B(ut, {})
1679
- }), s]
1680
- }) : null : /* @__PURE__ */ B($n, {
1678
+ children: /* @__PURE__ */ V(lt, {})
1679
+ }), o]
1680
+ }) : null : /* @__PURE__ */ V(Qn, {
1681
1681
  open: t.panelOpen,
1682
1682
  onOpenChange: (e) => !e && r.closePanel(),
1683
- children: /* @__PURE__ */ V(ir, {
1683
+ children: /* @__PURE__ */ H(rr, {
1684
1684
  side: "bottom",
1685
1685
  className: n("gap-0 rounded-t-2xl p-0", jr),
1686
- children: [/* @__PURE__ */ B(Zn, {
1686
+ children: [/* @__PURE__ */ V(Xn, {
1687
1687
  className: "sr-only",
1688
- children: o
1689
- }), s]
1688
+ children: a
1689
+ }), o]
1690
1690
  })
1691
1691
  });
1692
1692
  }
@@ -1694,22 +1694,22 @@ function ci() {
1694
1694
  //#region lib/components/ui/media/pdf-reader/partials/side-panel.tsx
1695
1695
  function li() {
1696
1696
  let { t: e } = j(), { chrome: t } = Z();
1697
- return t.size === "compact" ? /* @__PURE__ */ B(ci, {}) : t.panelOpen ? /* @__PURE__ */ V("aside", {
1697
+ return t.size === "compact" ? /* @__PURE__ */ V(ci, {}) : t.panelOpen ? /* @__PURE__ */ H("aside", {
1698
1698
  "aria-label": e("material.pdf-reader.next.panel", "Document panel"),
1699
1699
  className: n("flex h-full w-56 shrink-0 flex-col border-e border-border", jr),
1700
- children: [t.size === "medium" ? /* @__PURE__ */ B(si, { iconOnly: !0 }) : null, /* @__PURE__ */ B("div", {
1700
+ children: [t.size === "medium" ? /* @__PURE__ */ V(si, { iconOnly: !0 }) : null, /* @__PURE__ */ V("div", {
1701
1701
  className: "flex min-h-0 flex-1 flex-col",
1702
- children: /* @__PURE__ */ B(ei, {})
1702
+ children: /* @__PURE__ */ V(ei, {})
1703
1703
  })]
1704
1704
  }) : null;
1705
1705
  }
1706
1706
  //#endregion
1707
1707
  //#region lib/components/ui/media/pdf-reader/engine/use-page-canvas.ts
1708
1708
  function ui(e) {
1709
- let { doc: t, pageNumber: n, scale: r, rotation: i, host: a, cache: o, attempt: s } = e, [c, l] = R(null), u = L(null), d = L(e.onError), f = L(e.onDrawn);
1710
- return F(() => {
1709
+ let { doc: t, pageNumber: n, scale: r, rotation: i, host: a, cache: o, attempt: s } = e, [c, l] = z(null), u = R(null), d = R(e.onError), f = R(e.onDrawn);
1710
+ return I(() => {
1711
1711
  d.current = e.onError, f.current = e.onDrawn;
1712
- }), P(() => {
1712
+ }), F(() => {
1713
1713
  let e = a.current;
1714
1714
  if (!t || !e || !o) return;
1715
1715
  let s = {
@@ -1742,27 +1742,27 @@ function ui(e) {
1742
1742
  a,
1743
1743
  o,
1744
1744
  s
1745
- ]), P(() => () => {
1745
+ ]), F(() => () => {
1746
1746
  u.current?.cleanup(), u.current = null;
1747
1747
  }, [t, n]), c;
1748
1748
  }
1749
1749
  //#endregion
1750
1750
  //#region lib/components/ui/media/pdf-reader/engine/use-page-failure.ts
1751
1751
  function di() {
1752
- let [e, t] = R(null), [n, r] = R(0), i = L(null);
1752
+ let [e, t] = z(null), [n, r] = z(0), i = R(null);
1753
1753
  return {
1754
1754
  failure: e,
1755
1755
  attempt: n,
1756
1756
  box: i,
1757
- onError: N((e) => t({
1757
+ onError: P((e) => t({
1758
1758
  error: e,
1759
1759
  busy: !1
1760
1760
  }), []),
1761
- onDrawn: N(() => {
1761
+ onDrawn: P(() => {
1762
1762
  let e = i.current;
1763
1763
  e?.contains(document.activeElement) && e.closest("[data-slot=\"scroll-area-viewport\"]")?.focus({ preventScroll: !0 }), t(null);
1764
1764
  }, []),
1765
- retry: N(() => {
1765
+ retry: P(() => {
1766
1766
  t((e) => e && {
1767
1767
  ...e,
1768
1768
  busy: !0
@@ -1773,7 +1773,7 @@ function di() {
1773
1773
  //#endregion
1774
1774
  //#region lib/components/ui/media/pdf-viewer/use-pdf-link-labels.ts
1775
1775
  function fi(e) {
1776
- let { t } = j(), n = L(/* @__PURE__ */ new Map()), r = I(() => ({
1776
+ let { t } = j(), n = R(/* @__PURE__ */ new Map()), r = L(() => ({
1777
1777
  external: (e) => t("material.pdf-reader.link-external", "Link: {host}", { host: e }),
1778
1778
  goToPage: (e) => t("material.pdf-reader.go-to-page", "Go to page {page}", { page: e }),
1779
1779
  internal: t("material.pdf-reader.link-internal", "Link in document"),
@@ -1783,10 +1783,10 @@ function fi(e) {
1783
1783
  })
1784
1784
  }), [t]);
1785
1785
  return {
1786
- onAnnotations: N((e) => {
1786
+ onAnnotations: P((e) => {
1787
1787
  for (let t of e) t.id && n.current.set(t.id, t);
1788
1788
  }, []),
1789
- labelLinks: N((t) => Ht(t, (e) => n.current.get(e), (t) => Kt(e?.current, t), r), [e, r])
1789
+ labelLinks: P((t) => Vt(t, (e) => n.current.get(e), (t) => Gt(e?.current, t), r), [e, r])
1790
1790
  };
1791
1791
  }
1792
1792
  //#endregion
@@ -1861,13 +1861,13 @@ async function Si({ page: e, viewport: t }, n, r, i) {
1861
1861
  //#endregion
1862
1862
  //#region lib/components/ui/media/pdf-reader/engine/use-page-layers.ts
1863
1863
  function Ci(e) {
1864
- let { drawn: t, pageNumber: n, doc: r, linkService: i, highlight: a } = e, { text: o, annotations: s, page: c } = e, [l, u] = R(null), [d, f] = R(0), { onAnnotations: p, labelLinks: m } = fi(e.pdfRef);
1865
- P(() => {
1864
+ let { drawn: t, pageNumber: n, doc: r, linkService: i, highlight: a } = e, { text: o, annotations: s, page: c } = e, [l, u] = z(null), [d, f] = z(0), { onAnnotations: p, labelLinks: m } = fi(e.pdfRef);
1865
+ F(() => {
1866
1866
  let e = o.current;
1867
1867
  if (!t || !e) return;
1868
1868
  let n = new AbortController();
1869
1869
  return xi(t, e, n.signal).then((e) => e && u(e)).catch(() => {}), () => n.abort();
1870
- }, [t, o]), P(() => {
1870
+ }, [t, o]), F(() => {
1871
1871
  let e = s.current;
1872
1872
  if (!t || !e || !r || !i) return;
1873
1873
  let n = new AbortController();
@@ -1883,7 +1883,7 @@ function Ci(e) {
1883
1883
  r,
1884
1884
  i,
1885
1885
  p
1886
- ]), P(() => {
1886
+ ]), F(() => {
1887
1887
  d && m(c.current);
1888
1888
  }, [
1889
1889
  d,
@@ -1891,8 +1891,8 @@ function Ci(e) {
1891
1891
  c
1892
1892
  ]);
1893
1893
  let h = a.texts[n - 1], g = a.matches[n - 1], _ = a.current?.page === n ? a.current.hit : -1;
1894
- P(() => {
1895
- l && Et(l, {
1894
+ F(() => {
1895
+ l && Tt(l, {
1896
1896
  text: h,
1897
1897
  matches: g,
1898
1898
  current: _,
@@ -1910,7 +1910,7 @@ function Ci(e) {
1910
1910
  //#region lib/components/ui/media/pdf-reader/engine/use-page-drawing.ts
1911
1911
  function wi(e) {
1912
1912
  let { doc: t, cache: n, pdfRef: r, pageRefs: i, highlight: a, linkService: o } = e, { scale: s, rotation: c, searchQuery: l, nightMode: u } = e;
1913
- return I(() => ({
1913
+ return L(() => ({
1914
1914
  doc: t,
1915
1915
  cache: n,
1916
1916
  pdfRef: r,
@@ -1935,7 +1935,7 @@ function wi(e) {
1935
1935
  ]);
1936
1936
  }
1937
1937
  function Ti(e, t) {
1938
- let { doc: n, scale: r, rotation: i, pageRefs: a } = t, o = L(null), s = L(null), c = L(null), l = L(null), u = di(), d = ui({
1938
+ let { doc: n, scale: r, rotation: i, pageRefs: a } = t, o = R(null), s = R(null), c = R(null), l = R(null), u = di(), d = ui({
1939
1939
  doc: n,
1940
1940
  pageNumber: e,
1941
1941
  scale: r,
@@ -1958,7 +1958,7 @@ function Ti(e, t) {
1958
1958
  highlight: t.highlight,
1959
1959
  searchQuery: t.searchQuery
1960
1960
  }), {
1961
- setPage: N((t) => {
1961
+ setPage: P((t) => {
1962
1962
  o.current = t, t ? a.current.set(e, t) : a.current.delete(e);
1963
1963
  }, [e, a]),
1964
1964
  canvas: s,
@@ -1973,8 +1973,8 @@ function Ti(e, t) {
1973
1973
  function Ei(e, t, n) {
1974
1974
  let { scrollTop: r, clientHeight: i } = e, a = e.scrollLeft + (t ? e.scrollWidth - e.clientWidth : 0) + e.clientWidth / 2 - e.scrollWidth / 2 + n.maxWidth / 2, o = r + i >= e.scrollHeight - 2;
1975
1975
  return {
1976
- anchor: Tt(n, r, a),
1977
- page: Nt(n, {
1976
+ anchor: wt(n, r, a),
1977
+ page: Mt(n, {
1978
1978
  top: r - 20,
1979
1979
  height: i,
1980
1980
  atEnd: o
@@ -1982,46 +1982,46 @@ function Ei(e, t, n) {
1982
1982
  };
1983
1983
  }
1984
1984
  function Di(e) {
1985
- let { scroller: t, layout: n, currentPage: r } = e, [i, a] = R({
1985
+ let { scroller: t, layout: n, currentPage: r } = e, [i, a] = z({
1986
1986
  top: 0,
1987
1987
  height: 0
1988
- }), o = L({
1988
+ }), o = R({
1989
1989
  page: r,
1990
1990
  fraction: 0
1991
- }), s = L(r), c = L(null), l = L({
1991
+ }), s = R(r), c = R(null), l = R({
1992
1992
  options: e,
1993
1993
  layout: n
1994
1994
  });
1995
- F(() => {
1995
+ I(() => {
1996
1996
  l.current = {
1997
1997
  options: e,
1998
1998
  layout: n
1999
1999
  };
2000
2000
  });
2001
- let u = N((e, t) => {
2001
+ let u = P((e, t) => {
2002
2002
  e.scrollTop = t, c.current = e.scrollTop, a({
2003
2003
  top: e.scrollTop,
2004
2004
  height: e.clientHeight
2005
2005
  });
2006
2006
  }, []);
2007
- return F(() => {
2007
+ return I(() => {
2008
2008
  let e = t.current;
2009
- e && u(e, jt(n, o.current));
2009
+ e && u(e, At(n, o.current));
2010
2010
  }, [
2011
2011
  n,
2012
2012
  t,
2013
2013
  u
2014
- ]), F(() => {
2014
+ ]), I(() => {
2015
2015
  let e = t.current;
2016
2016
  !e || r === s.current || (s.current = r, o.current = {
2017
2017
  page: r,
2018
2018
  fraction: 0
2019
- }, u(e, jt(l.current.layout, o.current)));
2019
+ }, u(e, At(l.current.layout, o.current)));
2020
2020
  }, [
2021
2021
  r,
2022
2022
  t,
2023
2023
  u
2024
- ]), P(() => {
2024
+ ]), F(() => {
2025
2025
  let e = t.current;
2026
2026
  if (!e) return;
2027
2027
  let n = 0, r = getComputedStyle(e).direction === "rtl", i = () => {
@@ -2046,7 +2046,7 @@ function Di(e) {
2046
2046
  //#region lib/components/ui/media/pdf-reader/engine/use-page-window.ts
2047
2047
  var Oi = 1;
2048
2048
  function ki(e, t, n = "_blank", r = "single") {
2049
- let { state: i, scale: a, doc: o, actions: s } = e, { goToPage: c } = s, { reportPage: l } = e, u = pe(t), d = I(() => Fr(i.numPages, i.pageSizes ?? [], a, i.rotation, r, u), [
2049
+ let { state: i, scale: a, doc: o, actions: s } = e, { goToPage: c } = s, { reportPage: l } = e, u = de(t), d = L(() => Fr(i.numPages, i.pageSizes ?? [], a, i.rotation, r, u), [
2050
2050
  i.numPages,
2051
2051
  i.pageSizes,
2052
2052
  a,
@@ -2062,11 +2062,11 @@ function ki(e, t, n = "_blank", r = "single") {
2062
2062
  });
2063
2063
  return {
2064
2064
  layout: d,
2065
- shown: At(d, {
2065
+ shown: kt(d, {
2066
2066
  top: f.top - 20,
2067
2067
  height: f.height || (i.containerHeight ?? 800)
2068
2068
  }, Oi),
2069
- linkService: I(() => o ? Ot({
2069
+ linkService: L(() => o ? Dt({
2070
2070
  doc: o,
2071
2071
  goToPage: c,
2072
2072
  externalLinkTarget: n
@@ -2080,30 +2080,30 @@ function ki(e, t, n = "_blank", r = "single") {
2080
2080
  //#endregion
2081
2081
  //#region lib/components/ui/media/pdf-reader/partials/page-failure.tsx
2082
2082
  function Ai({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
2083
- let { t: o } = j(), s = Dt(t).kind === "canvas" ? o("material.pdf-reader.next.canvas-error", "This page is too large to display on this device") : o("material.pdf-reader.next.page-error", "This page could not be displayed");
2084
- return /* @__PURE__ */ V("div", {
2083
+ let { t: o } = j(), s = Et(t).kind === "canvas" ? o("material.pdf-reader.next.canvas-error", "This page is too large to display on this device") : o("material.pdf-reader.next.page-error", "This page could not be displayed");
2084
+ return /* @__PURE__ */ H("div", {
2085
2085
  ref: a,
2086
2086
  "data-page-failure": "",
2087
2087
  "aria-busy": r || void 0,
2088
2088
  className: n("absolute inset-0 flex flex-col items-center gap-3 bg-muted p-4 text-center text-muted-foreground", "justify-start pt-[clamp(2rem,12%,7rem)]"),
2089
- children: [/* @__PURE__ */ V("div", {
2089
+ children: [/* @__PURE__ */ H("div", {
2090
2090
  role: "status",
2091
2091
  className: "flex flex-col items-center gap-3",
2092
- children: [/* @__PURE__ */ B(Be, {
2092
+ children: [/* @__PURE__ */ V(ze, {
2093
2093
  "aria-hidden": !0,
2094
2094
  className: "size-6 shrink-0"
2095
- }), /* @__PURE__ */ B("p", {
2095
+ }), /* @__PURE__ */ V("p", {
2096
2096
  className: "max-w-64 text-balance text-sm",
2097
2097
  children: s
2098
2098
  })]
2099
- }), /* @__PURE__ */ V(xe, {
2099
+ }), /* @__PURE__ */ H(M, {
2100
2100
  variant: "outlined",
2101
2101
  color: "default",
2102
2102
  size: "sm",
2103
2103
  "aria-disabled": r || void 0,
2104
2104
  onClick: r ? void 0 : i,
2105
2105
  "aria-label": o("material.pdf-reader.next.retry-page", "Retry page {page}", { page: e }),
2106
- children: [/* @__PURE__ */ B(rt, {
2106
+ children: [/* @__PURE__ */ V(nt, {
2107
2107
  "aria-hidden": !0,
2108
2108
  className: n(r && "animate-spin motion-reduce:animate-none")
2109
2109
  }), o("material.pdf-reader.retry", "Retry")]
@@ -2112,7 +2112,7 @@ function Ai({ pageNumber: e, error: t, busy: r, onRetry: i, ref: a }) {
2112
2112
  }
2113
2113
  //#endregion
2114
2114
  //#region lib/components/ui/media/pdf-reader/partials/page-view.tsx
2115
- var ji = ht(function({ pageNumber: e, top: t, offset: r, width: i, height: a, env: o }) {
2115
+ var ji = mt(function({ pageNumber: e, top: t, offset: r, width: i, height: a, env: o }) {
2116
2116
  let { setPage: s, canvas: c, text: l, annotations: u, drawn: d, failed: f } = Ti(e, o), p = {
2117
2117
  top: t,
2118
2118
  left: `calc(50% + ${r}px)`,
@@ -2122,26 +2122,26 @@ var ji = ht(function({ pageNumber: e, top: t, offset: r, width: i, height: a, en
2122
2122
  "--scale-round-x": "1px",
2123
2123
  "--scale-round-y": "1px"
2124
2124
  };
2125
- return /* @__PURE__ */ V("div", {
2125
+ return /* @__PURE__ */ H("div", {
2126
2126
  ref: s,
2127
2127
  "data-page-number": e,
2128
2128
  "data-drawn": d ? "" : void 0,
2129
2129
  className: n("absolute overflow-hidden rounded-sm bg-white", "shadow-[0_1px_2px_rgb(0_0_0/0.08),0_4px_16px_-4px_rgb(0_0_0/0.18)]", o.nightMode && "pdf-night-page"),
2130
2130
  style: p,
2131
2131
  children: [
2132
- /* @__PURE__ */ B("div", {
2132
+ /* @__PURE__ */ V("div", {
2133
2133
  ref: c,
2134
2134
  className: "absolute inset-0 [&>canvas]:block [&>canvas]:size-full"
2135
2135
  }),
2136
- /* @__PURE__ */ B("div", {
2136
+ /* @__PURE__ */ V("div", {
2137
2137
  ref: l,
2138
2138
  className: "textLayer"
2139
2139
  }),
2140
- /* @__PURE__ */ B("div", {
2140
+ /* @__PURE__ */ V("div", {
2141
2141
  ref: u,
2142
2142
  className: "annotationLayer"
2143
2143
  }),
2144
- f.failure && /* @__PURE__ */ B(Ai, {
2144
+ f.failure && /* @__PURE__ */ V(Ai, {
2145
2145
  ref: f.box,
2146
2146
  pageNumber: e,
2147
2147
  error: f.failure.error,
@@ -2154,7 +2154,7 @@ var ji = ht(function({ pageNumber: e, top: t, offset: r, width: i, height: a, en
2154
2154
  //#endregion
2155
2155
  //#region lib/components/ui/media/pdf-reader/partials/viewport.tsx
2156
2156
  function Mi() {
2157
- let { t: e } = j(), { props: t, ...r } = Z(), i = Q(), a = L(null), { layout: o } = r, { layout: s, shown: c, linkService: l } = ki(i, a, t.externalLinkTarget, o.mode), u = wi({
2157
+ let { t: e } = j(), { props: t, ...r } = Z(), i = Q(), a = R(null), { layout: o } = r, { layout: s, shown: c, linkService: l } = ki(i, a, t.externalLinkTarget, o.mode), u = wi({
2158
2158
  doc: i.doc,
2159
2159
  cache: i.canvasCache,
2160
2160
  pdfRef: i.pdfRef,
@@ -2166,7 +2166,7 @@ function Mi() {
2166
2166
  searchQuery: i.state.searchQuery,
2167
2167
  nightMode: i.state.nightMode
2168
2168
  }), d = [];
2169
- for (let e = c.first; e <= c.last; e++) d.push(/* @__PURE__ */ B(ji, {
2169
+ for (let e = c.first; e <= c.last; e++) d.push(/* @__PURE__ */ V(ji, {
2170
2170
  pageNumber: e + 1,
2171
2171
  top: 20 + (s.tops[e] ?? 0),
2172
2172
  offset: (s.lefts[e] ?? 0) - s.maxWidth / 2,
@@ -2174,14 +2174,14 @@ function Mi() {
2174
2174
  height: s.heights[e] ?? 0,
2175
2175
  env: u
2176
2176
  }, e + 1));
2177
- return /* @__PURE__ */ B("section", {
2177
+ return /* @__PURE__ */ V("section", {
2178
2178
  ref: a,
2179
2179
  tabIndex: 0,
2180
2180
  "aria-label": e("material.pdf-reader.pages", "Pages"),
2181
2181
  "data-slot": "scroll-area-viewport",
2182
2182
  "data-layout": o.mode,
2183
2183
  className: n("size-full overflow-auto outline-none [overflow-anchor:none]", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "scroll-pb-24"),
2184
- children: /* @__PURE__ */ B("div", {
2184
+ children: /* @__PURE__ */ V("div", {
2185
2185
  className: "relative min-w-full",
2186
2186
  style: {
2187
2187
  height: 20 + s.totalHeight + 112,
@@ -2195,14 +2195,14 @@ function Mi() {
2195
2195
  //#region lib/components/ui/media/pdf-reader/partials/body.tsx
2196
2196
  function Ni() {
2197
2197
  let { state: e, containerRef: t, handlers: n } = Q(), r = e.numPages > 0 && !e.error && !e.isPasswordProtected;
2198
- return /* @__PURE__ */ V("div", {
2198
+ return /* @__PURE__ */ H("div", {
2199
2199
  className: "flex min-h-0 min-w-0 flex-1",
2200
- children: [r ? /* @__PURE__ */ B(li, {}) : null, /* @__PURE__ */ V("div", {
2200
+ children: [r ? /* @__PURE__ */ V(li, {}) : null, /* @__PURE__ */ H("div", {
2201
2201
  ref: t,
2202
2202
  tabIndex: -1,
2203
2203
  "aria-busy": e.isLoading || void 0,
2204
2204
  className: "relative min-w-0 flex-1 overflow-hidden bg-[color-mix(in_oklab,var(--primary)_5%,var(--background))] outline-none dark:bg-[color-mix(in_oklab,var(--primary)_10%,var(--background))]",
2205
- children: [r ? /* @__PURE__ */ B(Mi, {}) : null, /* @__PURE__ */ B(Ar, { onRetry: () => {
2205
+ children: [r ? /* @__PURE__ */ V(Mi, {}) : null, /* @__PURE__ */ V(Ar, { onRetry: () => {
2206
2206
  t.current?.focus(), n.onRetry();
2207
2207
  } })]
2208
2208
  })]
@@ -2222,14 +2222,14 @@ function $() {
2222
2222
  //#region lib/components/ui/media/pdf-reader/partials/fullscreen-exit.tsx
2223
2223
  function Pi() {
2224
2224
  let { t: e } = j(), t = $(), { leave: n } = Z(), r = e("material.pdf-reader.exit-fullscreen", "Exit fullscreen");
2225
- return /* @__PURE__ */ B("div", {
2225
+ return /* @__PURE__ */ V("div", {
2226
2226
  className: "pointer-events-none absolute top-[max(0.75rem,env(safe-area-inset-top))] z-10 ltr:[inset-inline-end:max(0.75rem,env(safe-area-inset-right))] rtl:[inset-inline-end:max(0.75rem,env(safe-area-inset-left))]",
2227
- children: /* @__PURE__ */ B(O, {
2227
+ children: /* @__PURE__ */ V(O, {
2228
2228
  label: r,
2229
2229
  ...t,
2230
2230
  className: "pointer-events-auto",
2231
- children: /* @__PURE__ */ B(A, {
2232
- icon: /* @__PURE__ */ B(Ye, {}),
2231
+ children: /* @__PURE__ */ V(A, {
2232
+ icon: /* @__PURE__ */ V(Je, {}),
2233
2233
  label: r,
2234
2234
  onClick: n
2235
2235
  })
@@ -2262,37 +2262,37 @@ function Fi(e, t, n = !0) {
2262
2262
  //#region lib/components/ui/media/pdf-reader/use-fullscreen-enabled.ts
2263
2263
  var Ii = () => () => {};
2264
2264
  function Li() {
2265
- return yt(Ii, () => document.fullscreenEnabled === !0, () => !1);
2265
+ return vt(Ii, () => document.fullscreenEnabled === !0, () => !1);
2266
2266
  }
2267
2267
  //#endregion
2268
2268
  //#region lib/components/ui/media/pdf-reader/partials/annotate-header.tsx
2269
2269
  function Ri() {
2270
2270
  let { t: e } = j(), t = $(), { chromeActions: n, props: r } = Z(), i = e("material.pdf-reader.next.annotate-done", "Done"), a = e("material.pdf-reader.next.annotate-title", "Annotation");
2271
- return /* @__PURE__ */ V(O, {
2271
+ return /* @__PURE__ */ H(O, {
2272
2272
  label: a,
2273
2273
  variant: "docked",
2274
2274
  ...t,
2275
2275
  className: "shrink-0 border-b border-border",
2276
2276
  children: [
2277
- /* @__PURE__ */ V("div", {
2277
+ /* @__PURE__ */ H("div", {
2278
2278
  className: "flex min-w-0 flex-1 items-baseline gap-2 px-1.5",
2279
- children: [/* @__PURE__ */ B("span", {
2279
+ children: [/* @__PURE__ */ V("span", {
2280
2280
  className: "truncate font-semibold text-foreground",
2281
2281
  children: a
2282
- }), /* @__PURE__ */ B("span", {
2282
+ }), /* @__PURE__ */ V("span", {
2283
2283
  className: "shrink-0 whitespace-nowrap text-muted-foreground text-sm",
2284
2284
  children: e("material.pdf-reader.next.annotate-notes", "{count, plural, one {# note} other {# notes}}", { count: r.annotationCount ?? 0 })
2285
2285
  })]
2286
2286
  }),
2287
- /* @__PURE__ */ B(A, {
2288
- icon: /* @__PURE__ */ B(ct, {}),
2287
+ /* @__PURE__ */ V(A, {
2288
+ icon: /* @__PURE__ */ V(st, {}),
2289
2289
  label: e("material.pdf-reader.next.annotate-undo", "Undo"),
2290
2290
  disabled: !0
2291
2291
  }),
2292
- /* @__PURE__ */ B(D, {
2292
+ /* @__PURE__ */ V(D, {
2293
2293
  label: i,
2294
2294
  fit: !1,
2295
- children: /* @__PURE__ */ B(xe, {
2295
+ children: /* @__PURE__ */ V(M, {
2296
2296
  size: "sm",
2297
2297
  onClick: () => n.stopAnnotating(),
2298
2298
  className: "min-h-9 min-w-0 px-4",
@@ -2305,25 +2305,25 @@ function Ri() {
2305
2305
  //#endregion
2306
2306
  //#region lib/components/ui/media/pdf-reader/partials/header-title.tsx
2307
2307
  function zi() {
2308
- let { t: e, language: t } = j(), { chrome: n, props: r } = Z(), { state: i, bytes: a } = Q(), o = r.file ? Qt(r.file, r.fileName, e("material.pdf-reader.default-file-name", "document")) : "", s = i.numPages > 0 ? e("material.pdf-reader.next.meta", "{pages, plural, one {# page} other {# pages}} · {size}", {
2308
+ let { t: e, language: t } = j(), { chrome: n, props: r } = Z(), { state: i, bytes: a } = Q(), o = r.file ? Zt(r.file, r.fileName, e("material.pdf-reader.default-file-name", "document")) : "", s = i.numPages > 0 ? e("material.pdf-reader.next.meta", "{pages, plural, one {# page} other {# pages}} · {size}", {
2309
2309
  pages: i.numPages,
2310
- size: wt(a ?? 0, { locale: t ?? "en" })
2310
+ size: Ct(a ?? 0, { locale: t ?? "en" })
2311
2311
  }) : "";
2312
- return /* @__PURE__ */ V("div", {
2312
+ return /* @__PURE__ */ H("div", {
2313
2313
  className: "flex min-w-0 flex-1 items-center gap-2.5 px-1.5",
2314
2314
  children: [
2315
- /* @__PURE__ */ B(ze, {
2315
+ /* @__PURE__ */ V(Re, {
2316
2316
  "aria-hidden": !0,
2317
2317
  className: "size-5 shrink-0 text-primary-text"
2318
2318
  }),
2319
- /* @__PURE__ */ B("span", {
2319
+ /* @__PURE__ */ V("span", {
2320
2320
  dir: "auto",
2321
2321
  className: "truncate font-semibold text-foreground",
2322
2322
  children: o
2323
2323
  }),
2324
- n.size !== "compact" && a !== null && s ? /* @__PURE__ */ B("span", {
2324
+ n.size !== "compact" && a !== null && s ? /* @__PURE__ */ V("span", {
2325
2325
  className: "shrink-0 whitespace-nowrap text-muted-foreground text-sm",
2326
- children: /* @__PURE__ */ B("bdi", { children: s })
2326
+ children: /* @__PURE__ */ V("bdi", { children: s })
2327
2327
  }) : null
2328
2328
  ]
2329
2329
  });
@@ -2333,23 +2333,23 @@ function zi() {
2333
2333
  function Bi({ action: e }) {
2334
2334
  let { t } = j(), { leave: n, toggleFullscreen: r } = Z();
2335
2335
  switch (e.kind) {
2336
- case "back": return /* @__PURE__ */ B(A, {
2337
- icon: /* @__PURE__ */ B(je, {}),
2336
+ case "back": return /* @__PURE__ */ V(A, {
2337
+ icon: /* @__PURE__ */ V(Ae, {}),
2338
2338
  label: t("material.pdf-reader.next.back", "Back"),
2339
2339
  onClick: n
2340
2340
  });
2341
- case "close": return /* @__PURE__ */ B(A, {
2342
- icon: /* @__PURE__ */ B(ut, {}),
2341
+ case "close": return /* @__PURE__ */ V(A, {
2342
+ icon: /* @__PURE__ */ V(lt, {}),
2343
2343
  label: t("material.buttons.close", "Close"),
2344
2344
  onClick: n
2345
2345
  });
2346
- case "exit-fullscreen": return /* @__PURE__ */ B(A, {
2347
- icon: /* @__PURE__ */ B(Ye, {}),
2346
+ case "exit-fullscreen": return /* @__PURE__ */ V(A, {
2347
+ icon: /* @__PURE__ */ V(Je, {}),
2348
2348
  label: t("material.pdf-reader.exit-fullscreen", "Exit fullscreen"),
2349
2349
  onClick: n
2350
2350
  });
2351
- case "fullscreen": return /* @__PURE__ */ B(A, {
2352
- icon: /* @__PURE__ */ B(qe, {}),
2351
+ case "fullscreen": return /* @__PURE__ */ V(A, {
2352
+ icon: /* @__PURE__ */ V(Ke, {}),
2353
2353
  label: t("material.pdf-reader.fullscreen", "Fullscreen"),
2354
2354
  onClick: r
2355
2355
  });
@@ -2359,33 +2359,33 @@ function Bi({ action: e }) {
2359
2359
  //#region lib/components/ui/media/pdf-reader/partials/compact-items.tsx
2360
2360
  function Vi() {
2361
2361
  let { chromeActions: e } = Z(), t = ai();
2362
- return /* @__PURE__ */ V(z, { children: [oi().filter((e) => e !== "search").map((n) => {
2362
+ return /* @__PURE__ */ H(B, { children: [oi().filter((e) => e !== "search").map((n) => {
2363
2363
  let r = ii[n];
2364
- return /* @__PURE__ */ V(C, {
2364
+ return /* @__PURE__ */ H(x, {
2365
2365
  onSelect: () => e.openPanelTab(n),
2366
- children: [/* @__PURE__ */ B(r, {}), t[n]]
2366
+ children: [/* @__PURE__ */ V(r, {}), t[n]]
2367
2367
  }, n);
2368
- }), /* @__PURE__ */ B(x, {})] });
2368
+ }), /* @__PURE__ */ V(y, {})] });
2369
2369
  }
2370
2370
  function Hi() {
2371
2371
  let { t: e } = j(), { actions: t } = Q();
2372
- return /* @__PURE__ */ V(z, { children: [
2373
- /* @__PURE__ */ B(x, {}),
2374
- /* @__PURE__ */ V(C, {
2372
+ return /* @__PURE__ */ H(B, { children: [
2373
+ /* @__PURE__ */ V(y, {}),
2374
+ /* @__PURE__ */ H(x, {
2375
2375
  onSelect: t.zoomIn,
2376
- children: [/* @__PURE__ */ B(ft, {}), e("material.pdf-reader.zoom-in", "Zoom in")]
2376
+ children: [/* @__PURE__ */ V(dt, {}), e("material.pdf-reader.zoom-in", "Zoom in")]
2377
2377
  }),
2378
- /* @__PURE__ */ V(C, {
2378
+ /* @__PURE__ */ H(x, {
2379
2379
  onSelect: t.zoomOut,
2380
- children: [/* @__PURE__ */ B(pt, {}), e("material.pdf-reader.zoom-out", "Zoom out")]
2380
+ children: [/* @__PURE__ */ V(ft, {}), e("material.pdf-reader.zoom-out", "Zoom out")]
2381
2381
  }),
2382
- /* @__PURE__ */ V(C, {
2382
+ /* @__PURE__ */ H(x, {
2383
2383
  onSelect: () => t.setFitMode("width"),
2384
- children: [/* @__PURE__ */ B(Qe, {}), e("material.pdf-reader.fit-width-full", "Fit Width")]
2384
+ children: [/* @__PURE__ */ V(Ze, {}), e("material.pdf-reader.fit-width-full", "Fit Width")]
2385
2385
  }),
2386
- /* @__PURE__ */ V(C, {
2386
+ /* @__PURE__ */ H(x, {
2387
2387
  onSelect: () => t.setFitMode("page"),
2388
- children: [/* @__PURE__ */ B(qe, {}), e("material.pdf-reader.fit-page-full", "Fit Page")]
2388
+ children: [/* @__PURE__ */ V(Ke, {}), e("material.pdf-reader.fit-page-full", "Fit Page")]
2389
2389
  })
2390
2390
  ] });
2391
2391
  }
@@ -2397,27 +2397,27 @@ var Ui = [
2397
2397
  "spread-cover"
2398
2398
  ];
2399
2399
  function Wi() {
2400
- let { t: e } = j(), { chrome: t, chromeActions: n, layout: r } = Z(), i = _t(), a = r.narrow ? "single" : t.layout, o = {
2400
+ let { t: e } = j(), { chrome: t, chromeActions: n, layout: r } = Z(), i = gt(), a = r.narrow ? "single" : t.layout, o = {
2401
2401
  single: e("material.pdf-reader.next.layout-single", "Single page"),
2402
2402
  spread: e("material.pdf-reader.next.layout-two", "Two pages"),
2403
2403
  "spread-cover": e("material.pdf-reader.next.layout-two-cover", "Two pages with cover")
2404
2404
  };
2405
- return /* @__PURE__ */ V(z, { children: [
2406
- /* @__PURE__ */ B(v, { children: e("material.pdf-reader.next.layout", "Page layout") }),
2407
- /* @__PURE__ */ B(g, {
2405
+ return /* @__PURE__ */ H(B, { children: [
2406
+ /* @__PURE__ */ V(g, { children: e("material.pdf-reader.next.layout", "Page layout") }),
2407
+ /* @__PURE__ */ V(m, {
2408
2408
  value: a,
2409
2409
  "aria-label": e("material.pdf-reader.next.layout", "Page layout"),
2410
2410
  onValueChange: (e) => {
2411
2411
  e !== a && n.setLayout(e);
2412
2412
  },
2413
- children: Ui.map((e) => /* @__PURE__ */ B(_, {
2413
+ children: Ui.map((e) => /* @__PURE__ */ V(h, {
2414
2414
  value: e,
2415
2415
  disabled: r.narrow && e !== "single",
2416
2416
  "aria-describedby": r.narrow ? i : void 0,
2417
2417
  children: o[e]
2418
2418
  }, e))
2419
2419
  }),
2420
- r.narrow ? /* @__PURE__ */ B(v, {
2420
+ r.narrow ? /* @__PURE__ */ V(g, {
2421
2421
  id: i,
2422
2422
  className: "pt-0 font-normal text-muted-foreground text-xs",
2423
2423
  children: e("material.pdf-reader.next.layout-narrow", "Two pages need a wider window")
@@ -2427,55 +2427,55 @@ function Wi() {
2427
2427
  //#endregion
2428
2428
  //#region lib/components/ui/media/pdf-reader/partials/more-menu.tsx
2429
2429
  function Gi() {
2430
- let { t: e } = j(), t = $(), { chrome: n, mode: r, openSearch: i, props: a } = Z(), { state: o, actions: s, fileActions: c } = Q(), l = u(), d = n.size === "compact", f = r === "fullscreen";
2431
- return /* @__PURE__ */ V(S, {
2430
+ let { t: e } = j(), t = $(), { chrome: n, mode: r, openSearch: i, props: a } = Z(), { state: o, actions: s, fileActions: l } = Q(), u = c(), d = n.size === "compact", f = r === "fullscreen";
2431
+ return /* @__PURE__ */ H(b, {
2432
2432
  modal: !1,
2433
- children: [/* @__PURE__ */ B(h, {
2433
+ children: [/* @__PURE__ */ V(p, {
2434
2434
  asChild: !0,
2435
2435
  className: t.selectedLook === "morph" ? "rounded-[var(--c-ss)] focus:bg-(--m-bg) hover:bg-(--m-bg)" : void 0,
2436
- children: /* @__PURE__ */ B(A, {
2437
- icon: /* @__PURE__ */ B(Xe, {}),
2436
+ children: /* @__PURE__ */ V(A, {
2437
+ icon: /* @__PURE__ */ V(Ye, {}),
2438
2438
  label: e("material.toolbar.more", "More")
2439
2439
  })
2440
- }), /* @__PURE__ */ V(b, {
2440
+ }), /* @__PURE__ */ H(v, {
2441
2441
  align: "end",
2442
- container: l,
2442
+ container: u,
2443
2443
  className: "min-w-52",
2444
2444
  children: [
2445
- f ? /* @__PURE__ */ V(C, {
2445
+ f ? /* @__PURE__ */ H(x, {
2446
2446
  onSelect: i,
2447
- children: [/* @__PURE__ */ B(it, {}), e("material.pdf-reader.search", "Search")]
2447
+ children: [/* @__PURE__ */ V(rt, {}), e("material.pdf-reader.search", "Search")]
2448
2448
  }) : null,
2449
- d ? /* @__PURE__ */ B(Vi, {}) : null,
2450
- /* @__PURE__ */ V(C, {
2449
+ d ? /* @__PURE__ */ V(Vi, {}) : null,
2450
+ /* @__PURE__ */ H(x, {
2451
2451
  onSelect: s.rotate,
2452
- children: [/* @__PURE__ */ B(rt, {}), e("material.pdf-reader.rotate", "Rotate")]
2452
+ children: [/* @__PURE__ */ V(nt, {}), e("material.pdf-reader.rotate", "Rotate")]
2453
2453
  }),
2454
- /* @__PURE__ */ V(C, {
2455
- onSelect: c.print,
2456
- children: [/* @__PURE__ */ B(nt, {}), e("material.pdf-reader.print", "Print")]
2454
+ /* @__PURE__ */ H(x, {
2455
+ onSelect: l.print,
2456
+ children: [/* @__PURE__ */ V(tt, {}), e("material.pdf-reader.print", "Print")]
2457
2457
  }),
2458
- d || f ? /* @__PURE__ */ V(C, {
2459
- onSelect: c.download,
2460
- children: [/* @__PURE__ */ B(Le, {}), e("material.pdf-reader.download", "Download")]
2458
+ d || f ? /* @__PURE__ */ H(x, {
2459
+ onSelect: l.download,
2460
+ children: [/* @__PURE__ */ V(Ie, {}), e("material.pdf-reader.download", "Download")]
2461
2461
  }) : null,
2462
- /* @__PURE__ */ B(y, {
2462
+ /* @__PURE__ */ V(_, {
2463
2463
  checked: o.nightMode,
2464
2464
  onCheckedChange: s.toggleNightMode,
2465
2465
  children: e("material.pdf-reader.night", "Night mode")
2466
2466
  }),
2467
- d ? /* @__PURE__ */ B(Hi, {}) : null,
2468
- /* @__PURE__ */ B(x, {}),
2469
- /* @__PURE__ */ B(Wi, {}),
2470
- a.showUnfinished ? /* @__PURE__ */ V(z, { children: [
2471
- /* @__PURE__ */ B(x, {}),
2472
- /* @__PURE__ */ V(C, {
2467
+ d ? /* @__PURE__ */ V(Hi, {}) : null,
2468
+ /* @__PURE__ */ V(y, {}),
2469
+ /* @__PURE__ */ V(Wi, {}),
2470
+ a.showUnfinished ? /* @__PURE__ */ H(B, { children: [
2471
+ /* @__PURE__ */ V(y, {}),
2472
+ /* @__PURE__ */ H(x, {
2473
2473
  disabled: !0,
2474
- children: [/* @__PURE__ */ B(lt, {}), e("material.pdf-reader.next.read-aloud", "Read aloud")]
2474
+ children: [/* @__PURE__ */ V(ct, {}), e("material.pdf-reader.next.read-aloud", "Read aloud")]
2475
2475
  }),
2476
- /* @__PURE__ */ V(C, {
2476
+ /* @__PURE__ */ H(x, {
2477
2477
  disabled: !0,
2478
- children: [/* @__PURE__ */ B(Me, {}), e("material.pdf-reader.next.reflow", "Reflowed text")]
2478
+ children: [/* @__PURE__ */ V(je, {}), e("material.pdf-reader.next.reflow", "Reflowed text")]
2479
2479
  })
2480
2480
  ] }) : null
2481
2481
  ]
@@ -2486,65 +2486,65 @@ function Gi() {
2486
2486
  //#region lib/components/ui/media/pdf-reader/partials/search-header.tsx
2487
2487
  function Ki() {
2488
2488
  let { t: e } = j(), t = $(), { chromeActions: n } = Z();
2489
- return /* @__PURE__ */ V(O, {
2489
+ return /* @__PURE__ */ H(O, {
2490
2490
  label: e("material.pdf-reader.search", "Search"),
2491
2491
  variant: "docked",
2492
2492
  ...t,
2493
2493
  className: "shrink-0 border-b border-border",
2494
- children: [/* @__PURE__ */ B(A, {
2495
- icon: /* @__PURE__ */ B(je, {}),
2494
+ children: [/* @__PURE__ */ V(A, {
2495
+ icon: /* @__PURE__ */ V(Ae, {}),
2496
2496
  label: e("material.pdf-reader.next.search-close", "Close search"),
2497
2497
  onClick: () => n.closeSearchField()
2498
- }), /* @__PURE__ */ B(Pr, {})]
2498
+ }), /* @__PURE__ */ V(Pr, {})]
2499
2499
  });
2500
2500
  }
2501
2501
  //#endregion
2502
2502
  //#region lib/components/ui/media/pdf-reader/partials/header.tsx
2503
2503
  function qi() {
2504
- let { chrome: e } = Z(), t = X.selectHeaderKind(e);
2505
- return B(t === "annotate" ? Ri : t === "search" ? Ki : Ji, {});
2504
+ let { chrome: e } = Z(), t = _r.selectHeaderKind(e);
2505
+ return V(t === "annotate" ? Ri : t === "search" ? Ki : Ji, {});
2506
2506
  }
2507
2507
  function Ji() {
2508
2508
  let { t: e } = j(), t = $(), { chrome: n, mode: r, props: i, openSearch: a } = Z(), { fileActions: o } = Q(), s = n.size === "compact", c = Li(), l = Fi(r, n.size, i.allowFullscreen !== !1 && c);
2509
- return /* @__PURE__ */ V(O, {
2509
+ return /* @__PURE__ */ H(O, {
2510
2510
  label: e("material.pdf-reader.next.header", "Document actions"),
2511
2511
  variant: "docked",
2512
2512
  ...t,
2513
2513
  className: "shrink-0 border-b border-border",
2514
2514
  children: [
2515
- l?.place === "start" ? /* @__PURE__ */ B(Bi, { action: l }) : null,
2516
- /* @__PURE__ */ B(zi, {}),
2517
- /* @__PURE__ */ B(A, {
2518
- icon: /* @__PURE__ */ B(it, {}),
2515
+ l?.place === "start" ? /* @__PURE__ */ V(Bi, { action: l }) : null,
2516
+ /* @__PURE__ */ V(zi, {}),
2517
+ /* @__PURE__ */ V(A, {
2518
+ icon: /* @__PURE__ */ V(rt, {}),
2519
2519
  label: e("material.pdf-reader.search", "Search"),
2520
2520
  onClick: a,
2521
2521
  "data-focus-target": "search"
2522
2522
  }),
2523
- s ? null : /* @__PURE__ */ B(A, {
2524
- icon: /* @__PURE__ */ B(Le, {}),
2523
+ s ? null : /* @__PURE__ */ V(A, {
2524
+ icon: /* @__PURE__ */ V(Ie, {}),
2525
2525
  label: e("material.pdf-reader.download", "Download"),
2526
2526
  onClick: o.download
2527
2527
  }),
2528
- /* @__PURE__ */ B(Gi, {}),
2529
- l?.place === "end" ? /* @__PURE__ */ B(Bi, { action: l }) : null
2528
+ /* @__PURE__ */ V(Gi, {}),
2529
+ l?.place === "end" ? /* @__PURE__ */ V(Bi, { action: l }) : null
2530
2530
  ]
2531
2531
  });
2532
2532
  }
2533
2533
  //#endregion
2534
2534
  //#region lib/components/ui/media/pdf-reader/use-pill-visibility.ts
2535
2535
  function Yi(e, t, n) {
2536
- let r = L(null);
2537
- F(() => {
2536
+ let r = R(null);
2537
+ I(() => {
2538
2538
  r.current = e.current?.querySelector("[data-slot=\"scroll-area-viewport\"]") ?? null;
2539
2539
  });
2540
- let i = Ae(r), [a, o] = R(!1);
2541
- return P(() => {
2540
+ let i = ke(r), [a, o] = z(!1);
2541
+ return F(() => {
2542
2542
  i || o(!1);
2543
- }, [i]), P(() => {
2543
+ }, [i]), F(() => {
2544
2544
  let e = t.current;
2545
2545
  if (!e || !i) return;
2546
2546
  let n = (e) => {
2547
- e.key === "Tab" && bt(() => o(!0));
2547
+ e.key === "Tab" && yt(() => o(!0));
2548
2548
  };
2549
2549
  return e.addEventListener("keydown", n, !0), () => e.removeEventListener("keydown", n, !0);
2550
2550
  }, [t, i]), i && !a && !n;
@@ -2558,13 +2558,13 @@ var Xi = {
2558
2558
  pink: "bg-pink-400",
2559
2559
  red: "bg-red-500"
2560
2560
  }, Zi = "inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-full border-0 bg-transparent px-2.5 text-inherit tabular-nums outline-0 outline-offset-2 transition-colors hover:bg-(--tb-hover) active:bg-(--tb-press) focus-visible:outline-2 focus-visible:outline-(--tb-focus,var(--primary-text))", Qi = {
2561
- pointer: /* @__PURE__ */ B(Ze, {}),
2562
- highlight: /* @__PURE__ */ B(He, {}),
2563
- underline: /* @__PURE__ */ B(st, {}),
2564
- pen: /* @__PURE__ */ B(et, {}),
2565
- note: /* @__PURE__ */ B(at, {}),
2566
- text: /* @__PURE__ */ B(ot, {}),
2567
- eraser: /* @__PURE__ */ B(Re, {})
2561
+ pointer: /* @__PURE__ */ V(Xe, {}),
2562
+ highlight: /* @__PURE__ */ V(Ve, {}),
2563
+ underline: /* @__PURE__ */ V(ot, {}),
2564
+ pen: /* @__PURE__ */ V($e, {}),
2565
+ note: /* @__PURE__ */ V(it, {}),
2566
+ text: /* @__PURE__ */ V(at, {}),
2567
+ eraser: /* @__PURE__ */ V(Le, {})
2568
2568
  }, $i = [
2569
2569
  "highlight",
2570
2570
  "pen",
@@ -2600,49 +2600,49 @@ function ta() {
2600
2600
  };
2601
2601
  }
2602
2602
  function na() {
2603
- let { t: e } = j(), { chrome: t, chromeActions: r } = Z(), i = u(), a = ta(), o = t.size === "compact" ? $i : ea, s = e("material.pdf-reader.next.color", "Colour: {color}", { color: a.color[t.color] }), c = (e) => /* @__PURE__ */ B(Wn, {
2603
+ let { t: e } = j(), { chrome: t, chromeActions: r } = Z(), i = c(), a = ta(), o = t.size === "compact" ? $i : ea, s = e("material.pdf-reader.next.color", "Colour: {color}", { color: a.color[t.color] }), l = (e) => /* @__PURE__ */ V(Un, {
2604
2604
  value: e,
2605
2605
  icon: Qi[e],
2606
2606
  label: a.tool[e]
2607
2607
  }, e);
2608
- return /* @__PURE__ */ V(z, { children: [
2609
- /* @__PURE__ */ V(Un, {
2608
+ return /* @__PURE__ */ H(B, { children: [
2609
+ /* @__PURE__ */ H(Hn, {
2610
2610
  type: "single",
2611
2611
  label: e("material.pdf-reader.next.tools", "Annotation tools"),
2612
2612
  value: t.tool,
2613
2613
  onValueChange: (e) => r.setTool(e),
2614
2614
  children: [
2615
- c("pointer"),
2616
- /* @__PURE__ */ B(k, {}),
2617
- o.map(c)
2615
+ l("pointer"),
2616
+ /* @__PURE__ */ V(k, {}),
2617
+ o.map(l)
2618
2618
  ]
2619
2619
  }),
2620
- /* @__PURE__ */ B(k, {}),
2621
- /* @__PURE__ */ V(S, {
2620
+ /* @__PURE__ */ V(k, {}),
2621
+ /* @__PURE__ */ H(b, {
2622
2622
  modal: !1,
2623
- children: [/* @__PURE__ */ B(D, {
2623
+ children: [/* @__PURE__ */ V(D, {
2624
2624
  label: s,
2625
- children: /* @__PURE__ */ B(h, {
2625
+ children: /* @__PURE__ */ V(p, {
2626
2626
  asChild: !0,
2627
- children: /* @__PURE__ */ B("button", {
2627
+ children: /* @__PURE__ */ V("button", {
2628
2628
  type: "button",
2629
2629
  "aria-label": s,
2630
2630
  className: Zi,
2631
- children: /* @__PURE__ */ B("span", {
2631
+ children: /* @__PURE__ */ V("span", {
2632
2632
  "aria-hidden": !0,
2633
2633
  className: n("size-[18px] rounded-full ring-2 ring-foreground/30", Xi[t.color])
2634
2634
  })
2635
2635
  })
2636
2636
  })
2637
- }), /* @__PURE__ */ B(b, {
2637
+ }), /* @__PURE__ */ V(v, {
2638
2638
  container: i,
2639
2639
  className: "min-w-36",
2640
- children: /* @__PURE__ */ B(g, {
2640
+ children: /* @__PURE__ */ V(m, {
2641
2641
  value: t.color,
2642
2642
  onValueChange: (e) => r.setColor(e),
2643
- children: ni.map((e) => /* @__PURE__ */ V(_, {
2643
+ children: ni.map((e) => /* @__PURE__ */ H(h, {
2644
2644
  value: e,
2645
- children: [/* @__PURE__ */ B("span", {
2645
+ children: [/* @__PURE__ */ V("span", {
2646
2646
  "aria-hidden": !0,
2647
2647
  className: n("size-3.5 rounded-full", Xi[e])
2648
2648
  }), a.color[e]]
@@ -2655,18 +2655,18 @@ function na() {
2655
2655
  //#endregion
2656
2656
  //#region lib/components/ui/media/pdf-reader/partials/page-field.tsx
2657
2657
  function ra() {
2658
- let { t: e } = j(), { state: t, actions: n } = Q(), [r, i] = R(null), a = r ?? String(t.currentPage), o = () => {
2658
+ let { t: e } = j(), { state: t, actions: n } = Q(), [r, i] = z(null), a = r ?? String(t.currentPage), o = () => {
2659
2659
  let e = Number.parseInt(r ?? "", 10);
2660
2660
  Number.isFinite(e) && n.goToPage(e), i(null);
2661
2661
  };
2662
- return /* @__PURE__ */ V(ye, {
2662
+ return /* @__PURE__ */ H(_e, {
2663
2663
  label: e("material.pdf-reader.next.page-group", "Page"),
2664
2664
  priority: "pinned",
2665
2665
  dir: "ltr",
2666
2666
  className: "gap-1.5 px-1.5 text-sm",
2667
- children: [/* @__PURE__ */ B(D, {
2667
+ children: [/* @__PURE__ */ V(D, {
2668
2668
  label: e("material.pdf-reader.next.page-go", "Go to page"),
2669
- children: /* @__PURE__ */ B("input", {
2669
+ children: /* @__PURE__ */ V("input", {
2670
2670
  type: "text",
2671
2671
  inputMode: "numeric",
2672
2672
  pattern: "[0-9]*",
@@ -2681,7 +2681,7 @@ function ra() {
2681
2681
  onBlur: () => i(null),
2682
2682
  className: "h-8 min-w-9 rounded-full bg-foreground/[0.07] px-2 text-center font-semibold text-foreground tabular-nums outline-0 [field-sizing:content] focus-visible:outline-2 focus-visible:outline-primary-text"
2683
2683
  })
2684
- }), /* @__PURE__ */ B("span", {
2684
+ }), /* @__PURE__ */ V("span", {
2685
2685
  "aria-hidden": !0,
2686
2686
  className: "text-muted-foreground tabular-nums",
2687
2687
  children: e("material.pdf-reader.next.page-total", "/ {total}", { total: t.numPages })
@@ -2699,44 +2699,44 @@ var ia = [
2699
2699
  2
2700
2700
  ];
2701
2701
  function aa() {
2702
- let { t: e, language: t } = j(), { state: n, actions: r, scale: i, limits: a } = Q(), o = u(), s = (e) => Or(e, t ?? "en"), c = n.fitMode === "custom" ? String(n.scale) : n.fitMode, l = (e) => e === "width" || e === "page" ? r.setFitMode(e) : r.setScale(Number(e)), d = e("material.pdf-reader.zoom-menu", "Zoom level {level}", { level: s(i) });
2703
- return /* @__PURE__ */ V(z, { children: [
2704
- /* @__PURE__ */ B(A, {
2705
- icon: /* @__PURE__ */ B(pt, {}),
2702
+ let { t: e, language: t } = j(), { state: n, actions: r, scale: i, limits: a } = Q(), o = c(), s = (e) => Or(e, t ?? "en"), l = n.fitMode === "custom" ? String(n.scale) : n.fitMode, u = (e) => e === "width" || e === "page" ? r.setFitMode(e) : r.setScale(Number(e)), d = e("material.pdf-reader.zoom-menu", "Zoom level {level}", { level: s(i) });
2703
+ return /* @__PURE__ */ H(B, { children: [
2704
+ /* @__PURE__ */ V(A, {
2705
+ icon: /* @__PURE__ */ V(ft, {}),
2706
2706
  label: e("material.pdf-reader.zoom-out", "Zoom out"),
2707
2707
  disabled: i <= a.minScale,
2708
2708
  onClick: r.zoomOut
2709
2709
  }),
2710
- /* @__PURE__ */ V(S, {
2710
+ /* @__PURE__ */ H(b, {
2711
2711
  modal: !1,
2712
- children: [/* @__PURE__ */ B(D, {
2712
+ children: [/* @__PURE__ */ V(D, {
2713
2713
  label: d,
2714
- children: /* @__PURE__ */ B(h, {
2714
+ children: /* @__PURE__ */ V(p, {
2715
2715
  asChild: !0,
2716
- children: /* @__PURE__ */ B("button", {
2716
+ children: /* @__PURE__ */ V("button", {
2717
2717
  type: "button",
2718
2718
  "aria-label": d,
2719
2719
  className: Zi,
2720
2720
  children: s(i)
2721
2721
  })
2722
2722
  })
2723
- }), /* @__PURE__ */ B(b, {
2723
+ }), /* @__PURE__ */ V(v, {
2724
2724
  container: o,
2725
2725
  className: "min-w-36",
2726
- children: /* @__PURE__ */ V(g, {
2727
- value: c,
2728
- onValueChange: l,
2726
+ children: /* @__PURE__ */ H(m, {
2727
+ value: l,
2728
+ onValueChange: u,
2729
2729
  children: [
2730
- /* @__PURE__ */ B(_, {
2730
+ /* @__PURE__ */ V(h, {
2731
2731
  value: "width",
2732
2732
  children: e("material.pdf-reader.fit-width-full", "Fit Width")
2733
2733
  }),
2734
- /* @__PURE__ */ B(_, {
2734
+ /* @__PURE__ */ V(h, {
2735
2735
  value: "page",
2736
2736
  children: e("material.pdf-reader.fit-page-full", "Fit Page")
2737
2737
  }),
2738
- /* @__PURE__ */ B(x, {}),
2739
- ia.map((e) => /* @__PURE__ */ B(_, {
2738
+ /* @__PURE__ */ V(y, {}),
2739
+ ia.map((e) => /* @__PURE__ */ V(h, {
2740
2740
  value: String(e),
2741
2741
  children: s(e)
2742
2742
  }, e))
@@ -2744,8 +2744,8 @@ function aa() {
2744
2744
  })
2745
2745
  })]
2746
2746
  }),
2747
- /* @__PURE__ */ B(A, {
2748
- icon: /* @__PURE__ */ B(ft, {}),
2747
+ /* @__PURE__ */ V(A, {
2748
+ icon: /* @__PURE__ */ V(dt, {}),
2749
2749
  label: e("material.pdf-reader.zoom-in", "Zoom in"),
2750
2750
  disabled: i >= a.maxScale,
2751
2751
  onClick: r.zoomIn
@@ -2756,18 +2756,18 @@ function aa() {
2756
2756
  //#region lib/components/ui/media/pdf-reader/partials/pill-nav.tsx
2757
2757
  function oa() {
2758
2758
  let { t: e } = j(), { chrome: t, chromeActions: n, props: r, mode: i } = Z(), { state: a, actions: o, rowStarts: s } = Q(), { size: c } = t;
2759
- return /* @__PURE__ */ V(z, { children: [
2760
- c === "medium" ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(ve, {
2761
- icon: /* @__PURE__ */ B($e, {
2759
+ return /* @__PURE__ */ H(B, { children: [
2760
+ c === "medium" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(ge, {
2761
+ icon: /* @__PURE__ */ V(Qe, {
2762
2762
  "aria-hidden": !0,
2763
2763
  className: "rtl:-scale-x-100"
2764
2764
  }),
2765
2765
  label: e("material.pdf-reader.next.panel-toggle", "Panel"),
2766
2766
  pressed: t.panelOpen,
2767
2767
  onPressedChange: () => n.togglePanel()
2768
- }), /* @__PURE__ */ B(k, {})] }) : null,
2769
- /* @__PURE__ */ B(A, {
2770
- icon: /* @__PURE__ */ B(Pe, {
2768
+ }), /* @__PURE__ */ V(k, {})] }) : null,
2769
+ /* @__PURE__ */ V(A, {
2770
+ icon: /* @__PURE__ */ V(Ne, {
2771
2771
  "aria-hidden": !0,
2772
2772
  className: "rtl:rotate-180"
2773
2773
  }),
@@ -2775,9 +2775,9 @@ function oa() {
2775
2775
  disabled: Rr(s, a.currentPage, -1) === null,
2776
2776
  onClick: o.prevPage
2777
2777
  }),
2778
- /* @__PURE__ */ B(ra, {}),
2779
- /* @__PURE__ */ B(A, {
2780
- icon: /* @__PURE__ */ B(Fe, {
2778
+ /* @__PURE__ */ V(ra, {}),
2779
+ /* @__PURE__ */ V(A, {
2780
+ icon: /* @__PURE__ */ V(Pe, {
2781
2781
  "aria-hidden": !0,
2782
2782
  className: "rtl:rotate-180"
2783
2783
  }),
@@ -2785,23 +2785,23 @@ function oa() {
2785
2785
  disabled: Rr(s, a.currentPage, 1) === null,
2786
2786
  onClick: o.nextPage
2787
2787
  }),
2788
- c === "compact" ? null : /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {}), /* @__PURE__ */ B(aa, {})] }),
2789
- r.annotate ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {}), /* @__PURE__ */ B(A, {
2790
- icon: /* @__PURE__ */ B(tt, {}),
2788
+ c === "compact" ? null : /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(aa, {})] }),
2789
+ r.annotate ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(A, {
2790
+ icon: /* @__PURE__ */ V(et, {}),
2791
2791
  label: e("material.pdf-reader.next.annotate", "Annotate"),
2792
2792
  onClick: () => n.startAnnotating(),
2793
2793
  "data-focus-target": "annotate"
2794
2794
  })] }) : null,
2795
- i === "fullscreen" ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(k, {}), /* @__PURE__ */ B(Gi, {})] }) : null
2795
+ i === "fullscreen" ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(k, {}), /* @__PURE__ */ V(Gi, {})] }) : null
2796
2796
  ] });
2797
2797
  }
2798
2798
  //#endregion
2799
2799
  //#region lib/components/ui/media/pdf-reader/partials/pill.tsx
2800
2800
  function sa() {
2801
2801
  let { t: e } = j(), t = $(), { chrome: n, frameRef: r } = Z(), { state: i, containerRef: a } = Q(), o = Yi(a, r, n.annotating);
2802
- return i.numPages === 0 ? null : /* @__PURE__ */ B("div", {
2802
+ return i.numPages === 0 ? null : /* @__PURE__ */ V("div", {
2803
2803
  className: "pointer-events-none absolute inset-x-0 bottom-4 z-10 flex justify-center px-4",
2804
- children: /* @__PURE__ */ B(O, {
2804
+ children: /* @__PURE__ */ V(O, {
2805
2805
  label: n.annotating ? e("material.pdf-reader.next.tools", "Annotation tools") : e("material.pdf-reader.next.pill", "Reader controls"),
2806
2806
  ...t,
2807
2807
  density: n.annotating && n.size === "compact" && t.density ? "compact" : t.density,
@@ -2809,30 +2809,30 @@ function sa() {
2809
2809
  hidden: o,
2810
2810
  className: "pointer-events-auto",
2811
2811
  "data-focus-target": "pill",
2812
- children: n.annotating ? /* @__PURE__ */ B(na, {}) : /* @__PURE__ */ B(oa, {})
2812
+ children: n.annotating ? /* @__PURE__ */ V(na, {}) : /* @__PURE__ */ V(oa, {})
2813
2813
  })
2814
2814
  });
2815
2815
  }
2816
2816
  //#endregion
2817
2817
  //#region lib/components/ui/media/pdf-reader/partials/rail.tsx
2818
2818
  function ca() {
2819
- let { t: e } = j(), { chrome: t, chromeActions: n } = Z(), r = ai(), i = oi(), a = X.selectRailValue(t), o = $();
2820
- return /* @__PURE__ */ B(O, {
2819
+ let { t: e } = j(), { chrome: t, chromeActions: n } = Z(), r = ai(), i = oi(), a = _r.selectRailValue(t), o = $();
2820
+ return /* @__PURE__ */ V(O, {
2821
2821
  label: e("material.pdf-reader.next.rail", "Document views"),
2822
2822
  variant: "docked",
2823
2823
  orientation: "vertical",
2824
2824
  ...o,
2825
2825
  className: "h-auto w-14 shrink-0 self-stretch border-e border-border",
2826
- children: /* @__PURE__ */ B(Un, {
2826
+ children: /* @__PURE__ */ V(Hn, {
2827
2827
  type: "single",
2828
2828
  label: e("material.pdf-reader.next.panel-views", "Panel views"),
2829
2829
  value: a,
2830
2830
  onValueChange: (e) => n.openPanelTab(e),
2831
2831
  children: i.map((e) => {
2832
2832
  let t = ii[e];
2833
- return /* @__PURE__ */ B(Wn, {
2833
+ return /* @__PURE__ */ V(Un, {
2834
2834
  value: e,
2835
- icon: /* @__PURE__ */ B(t, {}),
2835
+ icon: /* @__PURE__ */ V(t, {}),
2836
2836
  label: r[e],
2837
2837
  onClick: () => {
2838
2838
  e === a && n.closePanel();
@@ -2847,8 +2847,8 @@ function ca() {
2847
2847
  function la() {
2848
2848
  let { t: e } = j(), { chrome: t, chromeActions: r, frameRef: i, mode: a, props: o } = Z();
2849
2849
  Sr(i, r.setSize), Cr(i, t);
2850
- let s = a === "fullscreen" && X.selectHeaderKind(t) === "default", c = Dr();
2851
- return /* @__PURE__ */ V("section", {
2850
+ let s = a === "fullscreen" && _r.selectHeaderKind(t) === "default", c = Dr();
2851
+ return /* @__PURE__ */ H("section", {
2852
2852
  ref: i,
2853
2853
  "data-slot": "pdf-reader",
2854
2854
  "data-mode": a,
@@ -2857,17 +2857,17 @@ function la() {
2857
2857
  onKeyDown: c,
2858
2858
  className: n("relative flex h-full min-h-0 flex-col overflow-hidden bg-background text-foreground", a === "embedded" && "rounded-xl border border-border", o.className),
2859
2859
  children: [
2860
- s ? null : /* @__PURE__ */ B(qi, {}),
2861
- /* @__PURE__ */ V("div", {
2860
+ s ? null : /* @__PURE__ */ V(qi, {}),
2861
+ /* @__PURE__ */ H("div", {
2862
2862
  className: "relative flex min-h-0 flex-1",
2863
2863
  children: [
2864
- s ? /* @__PURE__ */ B(Pi, {}) : null,
2865
- t.size === "expanded" ? /* @__PURE__ */ B(ca, {}) : null,
2866
- /* @__PURE__ */ B(Ni, {}),
2867
- /* @__PURE__ */ B(sa, {})
2864
+ s ? /* @__PURE__ */ V(Pi, {}) : null,
2865
+ t.size === "expanded" ? /* @__PURE__ */ V(ca, {}) : null,
2866
+ /* @__PURE__ */ V(Ni, {}),
2867
+ /* @__PURE__ */ V(sa, {})
2868
2868
  ]
2869
2869
  }),
2870
- /* @__PURE__ */ B(kr, {})
2870
+ /* @__PURE__ */ V(kr, {})
2871
2871
  ]
2872
2872
  });
2873
2873
  }
@@ -2886,21 +2886,21 @@ function da({ file: e, fileName: t, pdfRef: n, onDownload: r, onPrint: i }) {
2886
2886
  let { t: a } = j(), o = () => n.current?.getData?.();
2887
2887
  return {
2888
2888
  download: r ?? (() => {
2889
- e && $t(e, {
2889
+ e && Qt(e, {
2890
2890
  fileName: t,
2891
2891
  getData: o,
2892
2892
  defaultName: a("material.pdf-reader.default-file-name", "document")
2893
2893
  });
2894
2894
  }),
2895
2895
  print: i ?? (() => {
2896
- e && en(e, { getData: o });
2896
+ e && $t(e, { getData: o });
2897
2897
  })
2898
2898
  };
2899
2899
  }
2900
2900
  //#endregion
2901
2901
  //#region lib/components/ui/media/pdf-viewer/use-pdf-outline-select.ts
2902
2902
  function fa(e, t) {
2903
- return N(async (n) => {
2903
+ return P(async (n) => {
2904
2904
  let r = e.current;
2905
2905
  if (!(!r || n.dest == null)) try {
2906
2906
  let e = typeof n.dest == "string" ? await r.getDestination(n.dest) : n.dest, i = Array.isArray(e) ? e[0] : e;
@@ -3102,7 +3102,7 @@ function xa(e, t) {
3102
3102
  //#endregion
3103
3103
  //#region lib/components/ui/media/pdf-viewer/use-pdf-computed-scale.ts
3104
3104
  function Sa(e) {
3105
- return N(() => e.fitMode === "custom" ? e.scale : Gt(e.fitMode, e.pageSizes ?? [], e.rotation, {
3105
+ return P(() => e.fitMode === "custom" ? e.scale : Wt(e.fitMode, e.pageSizes ?? [], e.rotation, {
3106
3106
  width: e.containerWidth,
3107
3107
  height: e.containerHeight ?? 600
3108
3108
  }), [
@@ -3117,7 +3117,7 @@ function Sa(e) {
3117
3117
  //#endregion
3118
3118
  //#region lib/components/ui/media/pdf-viewer/use-pdf-page-area.ts
3119
3119
  function Ca(e, t, n) {
3120
- P(() => {
3120
+ F(() => {
3121
3121
  let r = e.current;
3122
3122
  if (!r || !t) return;
3123
3123
  let i = new ResizeObserver((e) => {
@@ -3136,7 +3136,7 @@ function Ca(e, t, n) {
3136
3136
  t,
3137
3137
  n
3138
3138
  ]);
3139
- let [r] = R(() => zt((e) => n({
3139
+ let [r] = z(() => Rt((e) => n({
3140
3140
  type: "SET_PAGE_SIZES",
3141
3141
  payload: e
3142
3142
  })));
@@ -3145,14 +3145,14 @@ function Ca(e, t, n) {
3145
3145
  //#endregion
3146
3146
  //#region lib/components/ui/media/pdf-viewer/use-pdf-page-report.ts
3147
3147
  function wa(e, t, n) {
3148
- let r = L(e.currentPage), i = N((e) => {
3148
+ let r = R(e.currentPage), i = P((e) => {
3149
3149
  let { state: i, options: a } = n.current, o = ga(e, i.numPages);
3150
3150
  o !== i.currentPage && (t({
3151
3151
  type: "SET_PAGE",
3152
3152
  payload: o
3153
3153
  }), r.current = o, a.onPageChange?.(o));
3154
3154
  }, [t, n]);
3155
- return P(() => {
3155
+ return F(() => {
3156
3156
  e.numPages === 0 || e.currentPage === r.current || (r.current = e.currentPage, n.current.options.onPageChange?.(e.currentPage));
3157
3157
  }, [
3158
3158
  e.currentPage,
@@ -3163,24 +3163,24 @@ function wa(e, t, n) {
3163
3163
  //#endregion
3164
3164
  //#region lib/components/ui/media/pdf-viewer/use-pdf-reader.ts
3165
3165
  function Ta(e) {
3166
- let [t, n] = vt(ya, e, _a), r = L(null), [i, a] = R(0), o = Ca(r, t.numPages > 0, n);
3167
- P(() => {
3166
+ let [t, n] = _t(ya, e, _a), r = R(null), [i, a] = z(0), o = Ca(r, t.numPages > 0, n);
3167
+ F(() => {
3168
3168
  o.reset(), n({
3169
3169
  type: "RESET_DOCUMENT",
3170
3170
  payload: { page: c.current.options.initialPage ?? 1 }
3171
3171
  });
3172
- }, [tn(e.file), o]);
3173
- let s = Sa(t), c = L({
3172
+ }, [en(e.file), o]);
3173
+ let s = Sa(t), c = R({
3174
3174
  state: t,
3175
3175
  options: e
3176
3176
  });
3177
- F(() => {
3177
+ I(() => {
3178
3178
  c.current = {
3179
3179
  state: t,
3180
3180
  options: e
3181
3181
  };
3182
3182
  });
3183
- let l = wa(t, n, c), u = N((e) => {
3183
+ let l = wa(t, n, c), u = P((e) => {
3184
3184
  let r = t.fitMode === "custom" ? t.scale : s();
3185
3185
  n({
3186
3186
  type: "SET_SCALE",
@@ -3223,13 +3223,13 @@ var Ea = {
3223
3223
  matches: []
3224
3224
  };
3225
3225
  function Da(e, t, n, r = 150) {
3226
- let [i, a] = R(Ea);
3227
- return P(() => {
3226
+ let [i, a] = z(Ea);
3227
+ return F(() => {
3228
3228
  a(Ea);
3229
3229
  let i = e.current;
3230
3230
  if (!i || n === 0 || !t.trim()) return;
3231
3231
  let o = !1, s = setTimeout(() => {
3232
- Yt(i, t, (e) => a((t) => Zt(t, e)), () => o).catch(() => {});
3232
+ Jt(i, t, (e) => a((t) => Xt(t, e)), () => o).catch(() => {});
3233
3233
  }, r);
3234
3234
  return () => {
3235
3235
  o = !0, clearTimeout(s);
@@ -3244,28 +3244,28 @@ function Da(e, t, n, r = 150) {
3244
3244
  //#endregion
3245
3245
  //#region lib/components/ui/media/pdf-viewer/use-pdf-search-hits.ts
3246
3246
  function Oa(e) {
3247
- let { pdfRef: t, query: n, numPages: r, goToPage: i, pageRefs: a, holdScrollSpy: o } = e, s = Da(t, n, r), [c, l] = R(-1), u = L(() => {});
3248
- P(() => {
3247
+ let { pdfRef: t, query: n, numPages: r, goToPage: i, pageRefs: a, holdScrollSpy: o } = e, s = Da(t, n, r), [c, l] = z(-1), u = R(() => {});
3248
+ F(() => {
3249
3249
  l(-1), u.current();
3250
3250
  }, [
3251
3251
  t,
3252
3252
  n,
3253
3253
  r
3254
- ]), P(() => () => u.current(), []);
3255
- let d = I(() => Array.from(s.matches, (e) => e?.length ?? 0), [s.matches]), f = d.reduce((e, t) => e + t, 0), p = c < 0 ? null : Vt(d, c), m = L({
3254
+ ]), F(() => () => u.current(), []);
3255
+ let d = L(() => Array.from(s.matches, (e) => e?.length ?? 0), [s.matches]), f = d.reduce((e, t) => e + t, 0), p = c < 0 ? null : Bt(d, c), m = R({
3256
3256
  counts: d,
3257
3257
  hitCount: f,
3258
3258
  hitIndex: c
3259
3259
  });
3260
- F(() => {
3260
+ I(() => {
3261
3261
  m.current = {
3262
3262
  counts: d,
3263
3263
  hitCount: f,
3264
3264
  hitIndex: c
3265
3265
  };
3266
3266
  });
3267
- let h = N((e) => {
3268
- let { counts: t, hitCount: n, hitIndex: r } = m.current, s = Xt(r, e, n);
3267
+ let h = P((e) => {
3268
+ let { counts: t, hitCount: n, hitIndex: r } = m.current, s = Yt(r, e, n);
3269
3269
  if (s < 0) return {
3270
3270
  index: 0,
3271
3271
  count: n
@@ -3274,8 +3274,8 @@ function Oa(e) {
3274
3274
  ...m.current,
3275
3275
  hitIndex: s
3276
3276
  }, l(s);
3277
- let c = Vt(t, s);
3278
- return c && (i(c.page), u.current(), u.current = qt(() => a.current?.get(c.page), c.hit, o)), {
3277
+ let c = Bt(t, s);
3278
+ return c && (i(c.page), u.current(), u.current = Kt(() => a.current?.get(c.page), c.hit, o)), {
3279
3279
  index: s,
3280
3280
  count: n
3281
3281
  };
@@ -3283,13 +3283,13 @@ function Oa(e) {
3283
3283
  i,
3284
3284
  a,
3285
3285
  o
3286
- ]), g = N(() => l(-1), []), _ = p?.page ?? 0, v = p?.hit ?? -1;
3286
+ ]), g = P(() => l(-1), []), _ = p?.page ?? 0, v = p?.hit ?? -1;
3287
3287
  return {
3288
3288
  hitIndex: c,
3289
3289
  hitCount: f,
3290
3290
  jump: h,
3291
3291
  reset: g,
3292
- highlight: I(() => ({
3292
+ highlight: L(() => ({
3293
3293
  texts: s.texts,
3294
3294
  matches: s.matches,
3295
3295
  current: _ ? {
@@ -3306,9 +3306,9 @@ function Oa(e) {
3306
3306
  //#endregion
3307
3307
  //#region lib/components/ui/media/pdf-reader/engine/open-engine-document.ts
3308
3308
  async function ka(e, t, n) {
3309
- let [r, i] = await Promise.all([bi(), nn(e)]);
3309
+ let [r, i] = await Promise.all([bi(), tn(e)]);
3310
3310
  if (t.aborted) return null;
3311
- let a = await Mt(r, i, {
3311
+ let a = await jt(r, i, {
3312
3312
  signal: t,
3313
3313
  onPassword: n
3314
3314
  });
@@ -3317,39 +3317,39 @@ async function ka(e, t, n) {
3317
3317
  //#endregion
3318
3318
  //#region lib/components/ui/media/pdf-reader/engine/use-engine-document.ts
3319
3319
  function Aa(e, t, n) {
3320
- let r = L({
3320
+ let r = R({
3321
3321
  file: e,
3322
3322
  events: n
3323
3323
  });
3324
- F(() => {
3324
+ I(() => {
3325
3325
  r.current = {
3326
3326
  file: e,
3327
3327
  events: n
3328
3328
  };
3329
- }), P(() => {
3329
+ }), F(() => {
3330
3330
  let e = r.current.file;
3331
3331
  if (!e) return;
3332
3332
  let t = new AbortController(), n;
3333
3333
  return (async () => {
3334
3334
  n = await ka(e, t.signal, (e, t) => r.current.events.onPassword(e, t === "wrong")) ?? void 0, n && r.current.events.onOpen(n.doc);
3335
3335
  })().catch((e) => {
3336
- t.signal.aborted || Dt(e).kind !== "aborted" && r.current.events.onFail(qr(e));
3336
+ t.signal.aborted || Et(e).kind !== "aborted" && r.current.events.onFail(qr(e));
3337
3337
  }), () => {
3338
3338
  t.abort(), n?.destroy().catch(() => {}), r.current.events.onClose();
3339
3339
  };
3340
- }, [tn(e), t]);
3340
+ }, [en(e), t]);
3341
3341
  }
3342
3342
  //#endregion
3343
3343
  //#region lib/components/ui/media/pdf-reader/engine/use-reader-password.ts
3344
3344
  function ja() {
3345
- let [e, t] = R(""), n = L(null);
3345
+ let [e, t] = z(""), n = R(null);
3346
3346
  return {
3347
3347
  input: e,
3348
3348
  setInput: t,
3349
- ask: N((e) => {
3349
+ ask: P((e) => {
3350
3350
  n.current = e;
3351
3351
  }, []),
3352
- forget: N(() => {
3352
+ forget: P(() => {
3353
3353
  n.current = null, t("");
3354
3354
  }, []),
3355
3355
  submit: () => {
@@ -3360,8 +3360,8 @@ function ja() {
3360
3360
  //#endregion
3361
3361
  //#region lib/components/ui/media/pdf-reader/engine/use-reader-engine.ts
3362
3362
  function Ma(e) {
3363
- let [t, n] = R(null);
3364
- return P(() => {
3363
+ let [t, n] = z(null);
3364
+ return F(() => {
3365
3365
  if (!e) return;
3366
3366
  let t = Kr();
3367
3367
  return n(t), () => {
@@ -3370,10 +3370,10 @@ function Ma(e) {
3370
3370
  }, [e]), t;
3371
3371
  }
3372
3372
  function Na(e, t) {
3373
- let { actions: n, handlers: r } = t, [i, a] = R(null), o = L(null), [s, c] = R(null), l = ja(), u = Ma(i);
3373
+ let { actions: n, handlers: r } = t, [i, a] = z(null), o = R(null), [s, c] = z(null), l = ja(), u = Ma(i);
3374
3374
  return Aa(e, t.reloadKey, {
3375
3375
  onOpen: (e) => {
3376
- o.current = e, a(e), r.onDocumentLoadSuccess(e), e.getOutline().then((e) => n.setOutline(Ut(e))).catch(() => {}), e.getDownloadInfo().then((e) => c(e.length)).catch(() => c(null));
3376
+ o.current = e, a(e), r.onDocumentLoadSuccess(e), e.getOutline().then((e) => n.setOutline(Ht(e))).catch(() => {}), e.getDownloadInfo().then((e) => c(e.length)).catch(() => c(null));
3377
3377
  },
3378
3378
  onFail: r.onDocumentLoadError,
3379
3379
  onPassword: (e, t) => {
@@ -3394,11 +3394,11 @@ function Na(e, t) {
3394
3394
  //#region lib/components/ui/media/pdf-reader/use-announcements.ts
3395
3395
  var Pa = 1e3;
3396
3396
  function Fa() {
3397
- let e = L({
3397
+ let e = R({
3398
3398
  page: -Infinity,
3399
3399
  zoom: -Infinity
3400
3400
  });
3401
- return I(() => ({
3401
+ return L(() => ({
3402
3402
  asked(t, n) {
3403
3403
  return (...r) => {
3404
3404
  e.current[t] = performance.now(), n(...r);
@@ -3444,7 +3444,7 @@ function za(e, t = "single") {
3444
3444
  onPageChange: e.onPageChange,
3445
3445
  onLoadSuccess: e.onLoadSuccess,
3446
3446
  onLoadError: e.onLoadError
3447
- }), { state: s, actions: c } = o, l = Na(n, o), { pdfRef: u } = l, d = Fa(), { asked: f } = d, p = I(() => f("page", c.goToPage), [f, c.goToPage]), m = L(/* @__PURE__ */ new Map()), h = L(0), g = Oa({
3447
+ }), { state: s, actions: c } = o, l = Na(n, o), { pdfRef: u } = l, d = Fa(), { asked: f } = d, p = L(() => f("page", c.goToPage), [f, c.goToPage]), m = R(/* @__PURE__ */ new Map()), h = R(0), g = Oa({
3448
3448
  pdfRef: u,
3449
3449
  query: s.searchQuery,
3450
3450
  numPages: s.numPages,
@@ -3459,7 +3459,7 @@ function za(e, t = "single") {
3459
3459
  pdfRef: u,
3460
3460
  onDownload: i,
3461
3461
  onPrint: a
3462
- }), v = fa(u, p), y = Ra(o, t), b = I(() => It(s.numPages, t), [s.numPages, t]), x = Ia({
3462
+ }), v = fa(u, p), y = Ra(o, t), b = L(() => Ft(s.numPages, t), [s.numPages, t]), x = Ia({
3463
3463
  reader: o,
3464
3464
  announcements: d,
3465
3465
  askedPage: p,
@@ -3485,13 +3485,13 @@ function za(e, t = "single") {
3485
3485
  //#endregion
3486
3486
  //#region lib/components/ui/media/pdf-reader/pdf-reader-provider.tsx
3487
3487
  function Ba({ props: e, children: t }) {
3488
- let [n, r] = De(_r, e.defaultLayout ? {
3488
+ let [n, r] = Ee(gr, e.defaultLayout ? {
3489
3489
  ...e.initialChrome,
3490
3490
  layout: e.defaultLayout
3491
- } : e.initialChrome), i = e.layout ?? n.layout, a = I(() => ({
3491
+ } : e.initialChrome), i = e.layout ?? n.layout, a = L(() => ({
3492
3492
  ...n,
3493
3493
  layout: i
3494
- }), [n, i]), { layout: o, onLayoutChange: s } = e, c = I(() => ({
3494
+ }), [n, i]), { layout: o, onLayoutChange: s } = e, l = L(() => ({
3495
3495
  ...r,
3496
3496
  setLayout: (e) => {
3497
3497
  e !== i && (s?.(e), o === void 0 && r.setLayout(e));
@@ -3501,16 +3501,16 @@ function Ba({ props: e, children: t }) {
3501
3501
  i,
3502
3502
  o,
3503
3503
  s
3504
- ]), l = I(() => ua(i, e.coverPage, a.size), [
3504
+ ]), u = L(() => ua(i, e.coverPage, a.size), [
3505
3505
  i,
3506
3506
  e.coverPage,
3507
3507
  a.size
3508
- ]), d = za(e, l.mode), f = L(null), p = u(), m = p !== null && p === f.current ? "fullscreen" : e.mode ?? "embedded", { onOpenChange: h, onBack: g, onExitFullscreen: _ } = e, v = a.size;
3509
- return /* @__PURE__ */ B(vr, {
3510
- value: I(() => ({
3508
+ ]), d = za(e, u.mode), f = R(null), p = c(), m = p !== null && p === f.current ? "fullscreen" : e.mode ?? "embedded", { onOpenChange: h, onBack: g, onExitFullscreen: _ } = e, v = a.size;
3509
+ return /* @__PURE__ */ V(vr, {
3510
+ value: L(() => ({
3511
3511
  chrome: a,
3512
- chromeActions: c,
3513
- layout: l,
3512
+ chromeActions: l,
3513
+ layout: u,
3514
3514
  mode: m,
3515
3515
  frameRef: f,
3516
3516
  props: e,
@@ -3518,15 +3518,15 @@ function Ba({ props: e, children: t }) {
3518
3518
  document.fullscreenElement ? document.exitFullscreen?.() : f.current?.requestFullscreen?.();
3519
3519
  },
3520
3520
  openSearch: () => {
3521
- v === "compact" ? c.openSearchField() : c.openPanelTab("search"), c.focusSearch();
3521
+ v === "compact" ? l.openSearchField() : l.openPanelTab("search"), l.focusSearch();
3522
3522
  },
3523
3523
  leave: () => {
3524
3524
  m === "dialog" ? h?.(!1) : m === "page" ? g?.() : (document.fullscreenElement && document.exitFullscreen?.(), _?.());
3525
3525
  }
3526
3526
  }), [
3527
3527
  a,
3528
- c,
3529
3528
  l,
3529
+ u,
3530
3530
  m,
3531
3531
  e,
3532
3532
  v,
@@ -3534,7 +3534,7 @@ function Ba({ props: e, children: t }) {
3534
3534
  g,
3535
3535
  _
3536
3536
  ]),
3537
- children: /* @__PURE__ */ B(yr, {
3537
+ children: /* @__PURE__ */ V(yr, {
3538
3538
  value: d,
3539
3539
  children: t
3540
3540
  })
@@ -3543,23 +3543,23 @@ function Ba({ props: e, children: t }) {
3543
3543
  //#endregion
3544
3544
  //#region lib/components/ui/media/pdf-reader/pdf-reader.tsx
3545
3545
  function Va(e) {
3546
- let t = e.file ? /* @__PURE__ */ B(Ba, {
3546
+ let t = e.file ? /* @__PURE__ */ V(Ba, {
3547
3547
  props: e,
3548
- children: /* @__PURE__ */ B(la, {})
3549
- }) : /* @__PURE__ */ B(dr, { className: e.className });
3550
- return e.mode === "dialog" ? /* @__PURE__ */ B(gr, {
3548
+ children: /* @__PURE__ */ V(la, {})
3549
+ }) : /* @__PURE__ */ V(ur, { className: e.className });
3550
+ return e.mode === "dialog" ? /* @__PURE__ */ V(hr, {
3551
3551
  open: e.open ?? !0,
3552
3552
  onOpenChange: e.onOpenChange,
3553
3553
  title: e.fileName,
3554
3554
  children: t
3555
3555
  }) : t;
3556
3556
  }
3557
- var Ha = ke(Va), Ua = /* @__PURE__ */ e({ PdfReader: () => Ka }), Wa = new Set(ri);
3557
+ var Ha = Oe(Va), Ua = /* @__PURE__ */ e({ PdfReader: () => Ka }), Wa = new Set(ri);
3558
3558
  function Ga(e) {
3559
3559
  return Object.fromEntries(Object.entries(e).filter(([e]) => !Wa.has(e)));
3560
3560
  }
3561
3561
  function Ka(e) {
3562
- return /* @__PURE__ */ B(Ha, { ...Ga(e) });
3562
+ return /* @__PURE__ */ V(Ha, { ...Ga(e) });
3563
3563
  }
3564
3564
  //#endregion
3565
- export { Wn as _, or as a, ir as c, Xn as d, Yn as f, Un as g, Kn as h, ar as i, er as l, Gn as m, Ua as n, $n as o, Zn as p, ur as r, tr as s, Ka as t, Qn as u, on as v };
3565
+ export { Un as _, ar as a, rr as c, Yn as d, Jn as f, Hn as g, Gn as h, ir as i, $n as l, Wn as m, Ua as n, Qn as o, Xn as p, lr as r, er as s, Ka as t, Zn as u, an as v };