@revolist/ui 4.0.4-rc → 4.0.5-rc

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 (192) hide show
  1. package/OWNERSHIP.md +1 -1
  2. package/README.md +16 -0
  3. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  4. package/_chunks/badge.view-D30pMUfi.js +14 -0
  5. package/_chunks/calculator-CDWOuAcp.js +4 -0
  6. package/_chunks/{calendar-xpZ0v3xf.js → calendar-DsXIhybL.js} +19 -19
  7. package/_chunks/chart-frame-CuZABXVI.js +141 -0
  8. package/_chunks/check-BwI7iCAm.js +4 -0
  9. package/_chunks/choice-chips-BhP8MZjs.js +126 -0
  10. package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
  11. package/_chunks/color-picker-B4TQvxxB.js +143 -0
  12. package/_chunks/{component-C_T2VN5u.js → component-qKctqdzk.js} +281 -265
  13. package/_chunks/configurator-actions-C19O1rda.js +155 -0
  14. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  15. package/_chunks/{control-AHKXD5Eu.js → control-BkWukVt9.js} +13 -13
  16. package/_chunks/{controls-DsNi8V8I.js → controls-BLQnWEd7.js} +147 -155
  17. package/_chunks/{date-control-DrVFX13g.js → date-control-Cgw5PwlZ.js} +1 -1
  18. package/_chunks/date-time-B8rK5gpC.js +784 -0
  19. package/_chunks/{dialog.parts-CKGkC5zP.js → dialog.parts-BSbvnEwX.js} +21 -21
  20. package/_chunks/{duration-CL68Em0o.js → duration-DwFXonEV.js} +1 -4
  21. package/_chunks/editor-popup-BaaxL89T.js +81 -0
  22. package/_chunks/field-configurator-1eQP0tKy.js +223 -0
  23. package/_chunks/icon-toolbar-xbqa0hu9.js +128 -0
  24. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  25. package/_chunks/minus-BOAR3A1C.js +4 -0
  26. package/_chunks/mount-D1i5DLRn.js +266 -0
  27. package/_chunks/native-control-DO0d1kgx.js +636 -0
  28. package/_chunks/{number-input-BKwA5FnM.js → number-input-s9ddPwX6.js} +7 -7
  29. package/_chunks/{picker-h1P5RUgp.js → picker-AY05b41W.js} +2 -2
  30. package/_chunks/plus-CbGRkIGl.js +4 -0
  31. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  32. package/_chunks/{popup-CT2uD3go.js → popup-UXGCiv3n.js} +97 -97
  33. package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-BEs_QFZC.js} +1 -1
  34. package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-A49l172e.js} +1 -1
  35. package/_chunks/request-trail-DCOfa5zw.js +753 -0
  36. package/_chunks/rich-text-xfMWadGi.js +842 -0
  37. package/_chunks/rotate-left-BF6G883o.js +4 -0
  38. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  39. package/_chunks/tooltip-D4xkio5G.js +54 -0
  40. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  41. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  42. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  43. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  44. package/ai/_chat.scss +28 -3
  45. package/ai/_style.scss +55 -2
  46. package/ai/chat.d.ts +3 -1
  47. package/ai/components.d.ts +13 -2
  48. package/ai/index.d.ts +1 -0
  49. package/ai/index.js +3 -3
  50. package/ai/mount.d.ts +17 -1
  51. package/ai/results/_style.scss +80 -0
  52. package/ai/results/index.d.ts +11 -0
  53. package/ai/results/metrics.d.ts +5 -0
  54. package/ai/results/table.d.ts +5 -0
  55. package/ai/results/text.d.ts +5 -0
  56. package/ai/results/types.d.ts +29 -0
  57. package/ai/transcript.d.ts +2 -0
  58. package/ai/translations.d.ts +1 -1
  59. package/assignee/index.js +2 -2
  60. package/avatar/index.js +32 -31
  61. package/badge.view.d.ts +8 -0
  62. package/brush-range/component.js +28 -27
  63. package/buttons/svg-button.d.ts +1 -1
  64. package/buttons/svg-button.js +16 -16
  65. package/calendar/_calendar.scss +2 -2
  66. package/calendar/calendar.js +1 -1
  67. package/calendar/index.js +2 -2
  68. package/choice-chips/index.d.ts +3 -1
  69. package/choice-chips/index.js +1 -1
  70. package/color-palette/color-palette.js +1 -1
  71. package/color-palette/color-palette.style.scss +1 -1
  72. package/color-palette/color-picker.js +2 -2
  73. package/component-catalog.d.ts +6 -1
  74. package/configurator-actions.d.ts +67 -0
  75. package/configurator-actions.js +1 -0
  76. package/configurator-aggregation-list.d.ts +14 -0
  77. package/configurator-aggregation-list.js +61 -0
  78. package/configurator-drop-zone.d.ts +38 -0
  79. package/configurator-drop-zone.js +64 -0
  80. package/configurator-field-icon.d.ts +10 -0
  81. package/configurator-field-icon.js +1 -0
  82. package/configurator-focus.d.ts +4 -0
  83. package/configurator-focus.js +39 -0
  84. package/configurator-sections.d.ts +42 -0
  85. package/configurator-sections.js +71 -0
  86. package/control-presentation.js +24 -19
  87. package/controls.d.ts +1 -2
  88. package/controls.js +4 -3
  89. package/core/editor-popup.js +1 -1
  90. package/core/popover-controller.d.ts +35 -0
  91. package/core/popup-ownership.d.ts +2 -0
  92. package/core/title-tooltip.d.ts +2 -0
  93. package/core/tooltip-session.d.ts +29 -0
  94. package/core/tooltip-surface.d.ts +13 -0
  95. package/core/tooltip-text.d.ts +6 -0
  96. package/core/tooltip.d.ts +35 -0
  97. package/core/top-layer-popup.d.ts +4 -0
  98. package/core/top-layer-popup.js +1 -23
  99. package/date-time/index.js +1 -1
  100. package/date-time/style.scss +50 -7
  101. package/date-time/time-selection.d.ts +3 -1
  102. package/dialog/dialog.dom.js +8 -8
  103. package/dialog/dialog.parts.js +1 -1
  104. package/distribution-chart/_distribution-chart.scss +1 -57
  105. package/distribution-chart/area-chart.js +1 -1
  106. package/distribution-chart/bar-chart.js +1 -1
  107. package/distribution-chart/line-chart.js +1 -1
  108. package/dropdown/content.js +1 -1
  109. package/dropdown/control.js +1 -1
  110. package/dropdown/index.js +2 -2
  111. package/dropdown/lookup-field.js +2 -1
  112. package/dropdown/popup.d.ts +2 -2
  113. package/dropdown/popup.js +1 -1
  114. package/duration/index.js +1 -1
  115. package/editor-actions.js +1 -1
  116. package/field-configurator.d.ts +19 -0
  117. package/field-configurator.js +4 -170
  118. package/field-expansion.d.ts +9 -0
  119. package/filter/filters/slider/_slider.scss +0 -17
  120. package/filter/filters/slider/control.js +2 -0
  121. package/filter/filters/slider/runtime.js +49 -22
  122. package/filter/filters/slider/single.js +1 -1
  123. package/filter-badge.js +1 -1
  124. package/filter-controls.js +1 -1
  125. package/form-controls/index.js +6 -6
  126. package/form-controls/presentation.js +12 -12
  127. package/formatting/control-tooltip.d.ts +2 -27
  128. package/formatting/index.js +22 -21
  129. package/formatting/styles.scss +2 -47
  130. package/framework.js +215 -208
  131. package/history-controls.js +27 -1
  132. package/icon-toolbar.d.ts +58 -0
  133. package/icon-toolbar.js +1 -0
  134. package/masked-input/index.js +1 -1
  135. package/native-control.d.ts +1 -2
  136. package/native-control.js +1 -1
  137. package/native-styles.css +1 -1
  138. package/native.js +45 -42
  139. package/number-input/index.js +1 -1
  140. package/package.json +36 -1
  141. package/pagination.js +1 -1
  142. package/pdf-viewer/index.js +1 -1
  143. package/pickers.d.ts +5 -1
  144. package/preact-mount.js +1 -1
  145. package/preact.d.ts +7 -0
  146. package/preact.js +68 -61
  147. package/rating-choice.js +1 -1
  148. package/react.d.ts +5 -0
  149. package/react.js +67 -65
  150. package/reorder-list.js +1 -1
  151. package/resource-picker/resource-picker-popup.js +1 -1
  152. package/resource-picker/resource-picker.js +4 -4
  153. package/rich-text/engine.d.ts +1 -0
  154. package/rich-text/format-html.d.ts +2 -0
  155. package/rich-text/index.d.ts +4 -0
  156. package/rich-text/index.js +1 -1
  157. package/rich-text/model.d.ts +2 -0
  158. package/rich-text/style.scss +165 -70
  159. package/rich-text/syntax.d.ts +5 -0
  160. package/rich-text/translations.d.ts +2 -0
  161. package/select.d.ts +3 -1
  162. package/select.js +1 -1
  163. package/status-feedback/exit-snapshot.js +4 -4
  164. package/status-feedback/popover.js +4 -4
  165. package/styles/_compositions.scss +3 -3
  166. package/styles/_field-configurator.scss +146 -0
  167. package/styles/_fields-grid.scss +35 -0
  168. package/styles/_primitives.scss +25 -18
  169. package/styles/configurator-actions.scss +141 -0
  170. package/styles/legacy-pagination.css +19 -2
  171. package/styles.css +1 -1
  172. package/surfaces.d.ts +3 -0
  173. package/surfaces.js +34 -131
  174. package/surfaces.view.d.ts +4 -34
  175. package/svelte.js +1 -1
  176. package/switch/index.js +15 -14
  177. package/time-grid.js +37 -36
  178. package/timeline-track/index.js +2 -2
  179. package/ui.css +1 -1
  180. package/vue.d.ts +24 -9
  181. package/vue.js +118 -116
  182. package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
  183. package/_chunks/choice-chips-CHQTUdLs.js +0 -110
  184. package/_chunks/color-picker-CudqPYZo.js +0 -138
  185. package/_chunks/control-tooltip-uscKfAnV.js +0 -100
  186. package/_chunks/date-time-qIhp5vaX.js +0 -768
  187. package/_chunks/editor-popup-WDdtVDNA.js +0 -81
  188. package/_chunks/history-controls-B3u3INEK.js +0 -27
  189. package/_chunks/mount-DQ1cpppK.js +0 -257
  190. package/_chunks/native-control-C_yok8_-.js +0 -605
  191. package/_chunks/request-trail-DSlFix6i.js +0 -618
  192. package/_chunks/rich-text-CH7gIqOS.js +0 -636
@@ -1,29 +1,34 @@
1
1
  import { c as e, i as t } from "./preact.module-BBM36DnO.js";
2
2
  import { i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
3
3
  import { t as o } from "./jsxRuntime.module-F6UFnpT-.js";
4
- import { SvgIcon as s } from "../icons/icon.js";
5
- import { l as c, n as l } from "./native-control-C_yok8_-.js";
6
- import { n as u } from "./popup-CT2uD3go.js";
7
- import { t as d } from "./chevron-down-GbplLa6s.js";
8
- import { D as f, F as p, I as m, R as h, _ as g, m as _, n as v, u as y, x as b } from "./controls-DsNi8V8I.js";
9
- import { t as x } from "./chevron-left-D0nc4Z5S.js";
10
- import { t as S } from "./chevron-right-sxHQMSkq.js";
11
- import { createControlId as C } from "../core/control-id.js";
12
- import { t as w } from "./xmark-DD_PBvZI.js";
13
- import { DialogController as T, PopoverController as E, TooltipController as D, attachMenuKeyboard as O } from "../surfaces.js";
14
- import { t as k } from "./rotate-right-Iha5ScJ1.js";
15
- import { t as A } from "./chevron-up-BLuNMPDn.js";
16
- import { avatarTemplate as j } from "../avatar/index.js";
17
- import { renderProgressBar as M } from "../progress/bar.js";
18
- import { SearchInput as ee } from "../search-input/index.js";
4
+ import { createControlId as s } from "../core/control-id.js";
5
+ import { n as c, t as l } from "./popover-controller-D-AvKQ7B.js";
6
+ import { SvgIcon as u } from "../icons/icon.js";
7
+ import { l as d, n as f } from "./native-control-DO0d1kgx.js";
8
+ import { n as p } from "./popup-UXGCiv3n.js";
9
+ import { t as m } from "./chevron-down-GbplLa6s.js";
10
+ import { E as h, F as g, L as _, P as v, b as y, g as b, l as x, p as S, t as C } from "./controls-BLQnWEd7.js";
11
+ import { t as w } from "./chevron-left-D0nc4Z5S.js";
12
+ import { t as T } from "./chevron-right-sxHQMSkq.js";
13
+ import { t as E } from "./xmark-DD_PBvZI.js";
14
+ import { t as D } from "./tooltip-text-BXsUEmBH.js";
15
+ import { DialogController as O, attachMenuKeyboard as k } from "../surfaces.js";
16
+ import { t as A } from "./rotate-right-Iha5ScJ1.js";
17
+ import { t as j } from "./chevron-up-BLuNMPDn.js";
18
+ import { avatarTemplate as M } from "../avatar/index.js";
19
+ import { renderProgressBar as ee } from "../progress/bar.js";
20
+ import { t as te } from "./plus-CbGRkIGl.js";
21
+ import { t as ne } from "./minus-BOAR3A1C.js";
22
+ import { SearchInput as re } from "../search-input/index.js";
19
23
  import { s as N } from "./iso-B0YHBK7m.js";
20
24
  import { f as P, h as F, o as I } from "./model-mPO2tG2f.js";
21
- import { n as L, t as R } from "./date-control-DrVFX13g.js";
22
- import { t as z } from "./calendar-xpZ0v3xf.js";
23
- import { t as B } from "./controller-hRBm_Lfz.js";
25
+ import { n as L, t as R } from "./date-control-Cgw5PwlZ.js";
26
+ import { t as z } from "./calendar-DsXIhybL.js";
27
+ import { t as B } from "./magnifying-glass-CvrTDSkB.js";
28
+ import { t as V } from "./controller-hRBm_Lfz.js";
24
29
  //#region src/pickers.tsx
25
- function V(e) {
26
- return /* @__PURE__ */ o(c, {
30
+ function H(e) {
31
+ return /* @__PURE__ */ o(d, {
27
32
  ...e,
28
33
  className: `rv-combobox ${e.className ?? ""}`,
29
34
  config: {
@@ -33,8 +38,8 @@ function V(e) {
33
38
  }
34
39
  });
35
40
  }
36
- function H(e) {
37
- return /* @__PURE__ */ o(c, {
41
+ function U(e) {
42
+ return /* @__PURE__ */ o(d, {
38
43
  ...e,
39
44
  className: `rv-multi-select ${e.className ?? ""}`,
40
45
  config: {
@@ -43,50 +48,61 @@ function H(e) {
43
48
  }
44
49
  });
45
50
  }
46
- function U(t) {
47
- return j(e, t);
48
- }
49
- function te(t) {
51
+ function ie(t) {
50
52
  return M(e, t);
51
53
  }
52
- function W({ open: e, anchor: t, appendTo: n, onClose: r, children: s, label: c, className: l = "", role: u = "dialog" }) {
53
- let d = a(null), f = a(r);
54
- return f.current = r, i(() => {
55
- if (!e || !t || !d.current) return;
56
- let r = d.current, i = new E(), a = !0;
54
+ function ae(t) {
55
+ return ee(e, t);
56
+ }
57
+ function W({ open: e, anchor: t, appendTo: n, closeOnOutside: r, closeOnEscape: s, onClose: c, children: u, label: d, className: f = "", role: p = "dialog" }) {
58
+ let m = a(null), h = a(c);
59
+ h.current = c;
60
+ let g = a({
61
+ closeOnOutside: r,
62
+ closeOnEscape: s
63
+ }).current;
64
+ return g.closeOnOutside = r, g.closeOnEscape = s, i(() => {
65
+ if (!e || !t || !m.current) return;
66
+ let r = m.current, i = new l(), a = !0;
57
67
  i.open({
58
68
  anchor: t,
59
69
  appendTo: n,
60
- content: d.current,
61
- display: u === "menu" ? "grid" : void 0,
70
+ get closeOnOutside() {
71
+ return g.closeOnOutside;
72
+ },
73
+ get closeOnEscape() {
74
+ return g.closeOnEscape;
75
+ },
76
+ content: m.current,
77
+ display: p === "menu" ? "grid" : void 0,
62
78
  onClose: () => {
63
- a && f.current();
79
+ a && h.current();
64
80
  }
65
81
  });
66
- let o = u === "menu" ? O(r, () => i.close()) : void 0;
82
+ let o = p === "menu" ? k(r, () => i.close(), g) : void 0;
67
83
  return () => {
68
84
  a = !1, o?.(), i.destroy(), r.hidden = !0;
69
85
  };
70
86
  }, [
71
87
  e,
72
88
  t,
73
- u,
89
+ p,
74
90
  n
75
91
  ]), /* @__PURE__ */ o("div", {
76
- ref: d,
77
- class: `rv-popover ${u === "menu" ? "rv-menu " : ""}${l}`,
78
- role: u,
79
- "aria-label": c,
92
+ ref: m,
93
+ class: `rv-popover ${p === "menu" ? "rv-menu " : ""}${f}`,
94
+ role: p,
95
+ "aria-label": d,
80
96
  hidden: !e,
81
- children: e ? s : null
97
+ children: e ? u : null
82
98
  });
83
99
  }
84
- function ne({ text: e, children: t }) {
100
+ function oe({ text: e, children: t }) {
85
101
  let n = a(null);
86
102
  return i(() => {
87
103
  let t = n.current;
88
104
  if (!t) return;
89
- let r = new D(), i, a = () => {
105
+ let r = new c(), i, a = () => {
90
106
  let n = t.querySelector("button, input, a[href], [tabindex]") ?? t;
91
107
  n !== i && (r.bind(n, e), i = n);
92
108
  };
@@ -106,7 +122,7 @@ function ne({ text: e, children: t }) {
106
122
  children: t
107
123
  });
108
124
  }
109
- function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer: d, draggable: f, returnFocus: p }) {
125
+ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer: u, draggable: d, returnFocus: f }) {
110
126
  let m = a(null), h = a(c);
111
127
  h.current = c;
112
128
  let [g, _] = n();
@@ -115,11 +131,11 @@ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer:
115
131
  _(void 0);
116
132
  return;
117
133
  }
118
- let t = new T(m.current.ownerDocument), n = !0, i = t.open({
134
+ let t = new O(m.current.ownerDocument), n = !0, i = t.open({
119
135
  title: r,
120
136
  closeLabel: s,
121
- draggable: f,
122
- returnFocus: p,
137
+ draggable: d,
138
+ returnFocus: f,
123
139
  surfaceClass: "rv-ui-dialog",
124
140
  onClose: () => {
125
141
  _(void 0), n && h.current();
@@ -135,25 +151,25 @@ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer:
135
151
  e,
136
152
  r,
137
153
  s,
138
- f,
139
- p
154
+ d,
155
+ f
140
156
  ]), /* @__PURE__ */ o(t, { children: [
141
157
  /* @__PURE__ */ o("span", {
142
158
  ref: m,
143
159
  hidden: !0
144
160
  }),
145
- g && u(l, g.body),
146
- g && d && u(d, g.footer)
161
+ g && p(l, g.body),
162
+ g && u && p(u, g.footer)
147
163
  ] });
148
164
  }
149
- function re({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a }) {
165
+ function se({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a }) {
150
166
  return /* @__PURE__ */ o(G, {
151
167
  ...a,
152
- footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(v, {
168
+ footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(C, {
153
169
  disabled: i,
154
170
  onClick: a.onClose,
155
171
  children: r
156
- }), /* @__PURE__ */ o(v, {
172
+ }), /* @__PURE__ */ o(C, {
157
173
  variant: "primary",
158
174
  disabled: i,
159
175
  onClick: e,
@@ -161,55 +177,55 @@ function re({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a })
161
177
  })] })
162
178
  });
163
179
  }
164
- function ie({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOnly: l, ...u }) {
165
- let [d, f] = n(!1), [p, m] = n(null), [h, g] = n(e && N(e) ? e : F()), [_, y] = n(P(h, u.calendarSystem)), [b] = n(() => C("rv-date-picker"));
180
+ function ce({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOnly: l, ...d }) {
181
+ let [f, p] = n(!1), [m, h] = n(null), [g, _] = n(e && N(e) ? e : F()), [v, y] = n(P(g, d.calendarSystem)), [b] = n(() => s("rv-date-picker"));
166
182
  return i(() => {
167
- (c || l) && f(!1);
183
+ (c || l) && p(!1);
168
184
  }, [c, l]), /* @__PURE__ */ o("div", {
169
185
  class: "rv-date-picker",
170
186
  children: [
171
187
  /* @__PURE__ */ o(R, {
172
188
  label: r,
173
189
  value: e ?? "",
174
- minDate: u.minDate,
175
- maxDate: u.maxDate,
190
+ minDate: d.minDate,
191
+ maxDate: d.maxDate,
176
192
  disabled: c,
177
193
  readOnly: l,
178
194
  onChange: (e) => {
179
- typeof e != "string" || c || l || e && (u.minDate && e < u.minDate || u.maxDate && e > u.maxDate) || (!e || N(e)) && t(e || void 0);
195
+ typeof e != "string" || c || l || e && (d.minDate && e < d.minDate || d.maxDate && e > d.maxDate) || (!e || N(e)) && t(e || void 0);
180
196
  }
181
197
  }),
182
- /* @__PURE__ */ o(v, {
183
- ref: m,
198
+ /* @__PURE__ */ o(C, {
199
+ ref: h,
184
200
  "aria-label": a,
185
201
  "aria-haspopup": "dialog",
186
- "aria-expanded": d,
202
+ "aria-expanded": f,
187
203
  "aria-controls": b,
188
204
  disabled: c || l,
189
205
  onClick: () => {
190
- e && N(e) && (g(e), y(P(e, u.calendarSystem))), f(!d);
206
+ e && N(e) && (_(e), y(P(e, d.calendarSystem))), p(!f);
191
207
  },
192
- children: /* @__PURE__ */ o(s, { svg: L })
208
+ children: /* @__PURE__ */ o(u, { svg: L })
193
209
  }),
194
210
  /* @__PURE__ */ o(W, {
195
- open: d,
196
- anchor: p,
197
- onClose: () => f(!1),
211
+ open: f,
212
+ anchor: m,
213
+ onClose: () => p(!1),
198
214
  label: r,
199
215
  children: /* @__PURE__ */ o("div", {
200
216
  id: b,
201
217
  children: /* @__PURE__ */ o(z, {
202
- ...u,
203
- month: _,
204
- focusedDate: h,
218
+ ...d,
219
+ month: v,
220
+ focusedDate: g,
205
221
  selection: e ? {
206
222
  from: e,
207
223
  to: e
208
224
  } : void 0,
209
225
  onMonthChange: y,
210
- onFocusedDateChange: g,
226
+ onFocusedDateChange: _,
211
227
  onSelect: (e) => {
212
- t(e), f(!1), p?.focus();
228
+ t(e), p(!1), m?.focus();
213
229
  }
214
230
  })
215
231
  })
@@ -217,13 +233,13 @@ function ie({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOn
217
233
  ]
218
234
  });
219
235
  }
220
- function ae({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLabel: l, disabled: u, readOnly: d, ...f }) {
221
- let [p, m] = n(!1), [h, g] = n(null), [_, y] = n(), [b, x] = n(e?.from ?? F()), [S, w] = n(P(b, f.calendarSystem)), [T] = n(() => C("rv-date-picker"));
236
+ function le({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLabel: l, disabled: d, readOnly: f, ...p }) {
237
+ let [m, h] = n(!1), [g, _] = n(null), [v, y] = n(), [b, x] = n(e?.from ?? F()), [S, w] = n(P(b, p.calendarSystem)), [T] = n(() => s("rv-date-picker"));
222
238
  i(() => {
223
- (u || d) && (m(!1), y(void 0));
224
- }, [u, d]);
239
+ (d || f) && (h(!1), y(void 0));
240
+ }, [d, f]);
225
241
  let E = (n, r) => {
226
- if (u || d || !N(r) || f.minDate && r < f.minDate || f.maxDate && r > f.maxDate) return;
242
+ if (d || f || !N(r) || p.minDate && r < p.minDate || p.maxDate && r > p.maxDate) return;
227
243
  let i = r;
228
244
  t(I(n === "from" ? i : e?.from ?? i, n === "to" ? i : e?.to ?? i));
229
245
  };
@@ -235,10 +251,10 @@ function ae({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLab
235
251
  /* @__PURE__ */ o(R, {
236
252
  label: a,
237
253
  value: e?.from ?? "",
238
- disabled: u,
239
- readOnly: d,
240
- minDate: f.minDate,
241
- maxDate: f.maxDate,
254
+ disabled: d,
255
+ readOnly: f,
256
+ minDate: p.minDate,
257
+ maxDate: p.maxDate,
242
258
  onChange: (e) => {
243
259
  typeof e == "string" && E("from", e);
244
260
  }
@@ -246,44 +262,44 @@ function ae({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLab
246
262
  /* @__PURE__ */ o(R, {
247
263
  label: c,
248
264
  value: e?.to ?? "",
249
- disabled: u,
250
- readOnly: d,
251
- minDate: f.minDate,
252
- maxDate: f.maxDate,
265
+ disabled: d,
266
+ readOnly: f,
267
+ minDate: p.minDate,
268
+ maxDate: p.maxDate,
253
269
  onChange: (e) => {
254
270
  typeof e == "string" && E("to", e);
255
271
  }
256
272
  }),
257
- /* @__PURE__ */ o(v, {
258
- ref: g,
259
- disabled: u || d,
273
+ /* @__PURE__ */ o(C, {
274
+ ref: _,
275
+ disabled: d || f,
260
276
  "aria-label": l,
261
277
  "aria-haspopup": "dialog",
262
- "aria-expanded": p,
278
+ "aria-expanded": m,
263
279
  "aria-controls": T,
264
280
  onClick: () => {
265
- y(void 0), e && (x(e.from), w(P(e.from, f.calendarSystem))), m(!p);
281
+ y(void 0), e && (x(e.from), w(P(e.from, p.calendarSystem))), h(!m);
266
282
  },
267
- children: /* @__PURE__ */ o(s, { svg: L })
283
+ children: /* @__PURE__ */ o(u, { svg: L })
268
284
  }),
269
285
  /* @__PURE__ */ o(W, {
270
- open: p,
271
- anchor: h,
286
+ open: m,
287
+ anchor: g,
272
288
  onClose: () => {
273
- m(!1), y(void 0);
289
+ h(!1), y(void 0);
274
290
  },
275
291
  label: r,
276
292
  children: /* @__PURE__ */ o("div", {
277
293
  id: T,
278
294
  children: /* @__PURE__ */ o(z, {
279
- ...f,
295
+ ...p,
280
296
  month: S,
281
297
  focusedDate: b,
282
- selection: _ ? I(_, b) : e,
298
+ selection: v ? I(v, b) : e,
283
299
  onMonthChange: w,
284
300
  onFocusedDateChange: x,
285
301
  onSelect: (e) => {
286
- _ ? (t(I(_, e)), y(void 0), m(!1), h?.focus()) : y(e);
302
+ v ? (t(I(v, e)), y(void 0), h(!1), g?.focus()) : y(e);
287
303
  }
288
304
  })
289
305
  })
@@ -362,28 +378,28 @@ function X(e, t) {
362
378
  //#endregion
363
379
  //#region src/pdf-viewer/icons.ts
364
380
  var Z = {
365
- previous: x,
366
- next: S,
381
+ previous: w,
382
+ next: T,
367
383
  document: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l80 0 0-112c0-35.3 28.7-64 64-64l176 0 0-165.5c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM240 380c-11 0-20 9-20 20l0 128c0 11 9 20 20 20s20-9 20-20l0-28 12 0c33.1 0 60-26.9 60-60s-26.9-60-60-60l-32 0zm32 80l-12 0 0-40 12 0c11 0 20 9 20 20s-9 20-20 20zm96-80c-11 0-20 9-20 20l0 128c0 11 9 20 20 20l32 0c28.7 0 52-23.3 52-52l0-64c0-28.7-23.3-52-52-52l-32 0zm20 128l0-88 12 0c6.6 0 12 5.4 12 12l0 64c0 6.6-5.4 12-12 12l-12 0zm88-108l0 128c0 11 9 20 20 20s20-9 20-20l0-44 28 0c11 0 20-9 20-20s-9-20-20-20l-28 0 0-24 28 0c11 0 20-9 20-20s-9-20-20-20l-48 0c-11 0-20 9-20 20z\"/></svg>",
368
384
  open: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M56 225.6L32.4 296.2 32.4 96c0-35.3 28.7-64 64-64l138.7 0c13.8 0 27.3 4.5 38.4 12.8l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4l117.3 0c35.3 0 64 28.7 64 64l0 16-365.4 0c-41.3 0-78 26.4-91.1 65.6zM477.8 448L99 448c-32.8 0-55.9-32.1-45.5-63.2l48-144C108 221.2 126.4 208 147 208l378.8 0c32.8 0 55.9 32.1 45.5 63.2l-48 144c-6.5 19.6-24.9 32.8-45.5 32.8z\"/></svg>",
369
- search: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\"/></svg>",
370
- minus: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z\"/></svg>",
371
- plus: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z\"/></svg>",
372
- rotate: k,
385
+ search: B,
386
+ minus: ne,
387
+ plus: te,
388
+ rotate: A,
373
389
  download: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 242.7 256 32zM64 320c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-46.9 0-56.6 56.6c-31.2 31.2-81.9 31.2-113.1 0L110.9 320 64 320zm304 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"/></svg>",
374
390
  print: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M64 64C64 28.7 92.7 0 128 0L341.5 0c17 0 33.3 6.7 45.3 18.7l42.5 42.5c12 12 18.7 28.3 18.7 45.3l0 37.5-384 0 0-80zM0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 96c0 17.7-14.3 32-32 32l-32 0 0 64c0 35.3-28.7 64-64 64l-256 0c-35.3 0-64-28.7-64-64l0-64-32 0c-17.7 0-32-14.3-32-32l0-96zM128 416l0 32 256 0 0-96-256 0 0 64zM456 272a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"/></svg>",
375
- close: w,
376
- up: A,
377
- down: d,
391
+ close: E,
392
+ up: j,
393
+ down: m,
378
394
  more: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 128 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z\"/></svg>"
379
395
  };
380
396
  //#endregion
381
397
  //#region src/pdf-viewer/toolbar.tsx
382
398
  function Q(e) {
383
- let { controller: r, state: u } = e, d = J(e.text), f = Y(e.config), h = u.status === "ready", y = (e) => f.buttons?.[e] !== !1, x = (e) => {
384
- let t = f.buttons?.[e];
399
+ let { controller: r, state: s } = e, c = J(e.text), l = Y(e.config), p = s.status === "ready", m = (e) => l.buttons?.[e] !== !1, h = (e) => {
400
+ let t = l.buttons?.[e];
385
401
  return t === !1 ? {} : t ?? {};
386
- }, S = (t) => X(e.config, t), [C, w] = n(!1), T = a(null), E = a(null), [D, O] = n(String(u.page || "")), k = Number.isFinite(f.zoomStep) && f.zoomStep > 1 ? f.zoomStep : 1.25, A = [...new Set((f.zoomLevels ?? [
402
+ }, _ = (t) => X(e.config, t), [x, w] = n(!1), T = a(null), E = a(null), [D, O] = n(String(s.page || "")), k = Number.isFinite(l.zoomStep) && l.zoomStep > 1 ? l.zoomStep : 1.25, A = [...new Set((l.zoomLevels ?? [
387
403
  "page-width",
388
404
  "page-fit",
389
405
  .5,
@@ -395,22 +411,22 @@ function Q(e) {
395
411
  3,
396
412
  5
397
413
  ]).filter((e) => e === "page-width" || e === "page-fit" || typeof e == "number" && Number.isFinite(e) && e >= .25 && e <= 5))];
398
- A.includes(u.zoom) || A.push(u.zoom), i(() => {
399
- O(String(u.page || ""));
400
- }, [u.page, r]), i(() => {
414
+ A.includes(s.zoom) || A.push(s.zoom), i(() => {
415
+ O(String(s.page || ""));
416
+ }, [s.page, r]), i(() => {
401
417
  w(!1);
402
418
  }, [
403
419
  e.config,
404
- h,
420
+ p,
405
421
  r
406
422
  ]), i(() => {
407
- if (!C) return;
423
+ if (!x) return;
408
424
  E.current?.querySelector("[role=\"menuitem\"]:not(:disabled)")?.focus();
409
425
  let e = T.current, t = new ResizeObserver(() => {
410
426
  e && !e.getClientRects().length && w(!1);
411
427
  });
412
428
  return e && t.observe(e), () => t.disconnect();
413
- }, [C]);
429
+ }, [x]);
414
430
  let j = () => {
415
431
  w(!1), T.current?.focus({ preventScroll: !0 });
416
432
  }, M = () => {
@@ -424,88 +440,88 @@ function Q(e) {
424
440
  "rotate",
425
441
  "download",
426
442
  "print"
427
- ].some(S) ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(p, {
428
- label: d.toolbar,
429
- className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${f.className ?? ""}`,
443
+ ].some(_) ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(v, {
444
+ label: c.toolbar,
445
+ className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${l.className ?? ""}`,
430
446
  children: [
431
- S("open") && /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(v, {
447
+ _("open") && /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(C, {
432
448
  variant: "ghost",
433
449
  size: "compact",
434
- ...x("open"),
435
- title: x("open").title ?? d.open,
436
- "aria-label": d.open,
450
+ ...h("open"),
451
+ title: h("open").title ?? c.open,
452
+ "aria-label": c.open,
437
453
  onClick: () => e.onOpen(),
438
- children: [/* @__PURE__ */ o(s, { svg: Z.open }), /* @__PURE__ */ o("span", {
454
+ children: [/* @__PURE__ */ o(u, { svg: Z.open }), /* @__PURE__ */ o("span", {
439
455
  class: "rv-pdf-viewer__open-label",
440
- children: d.open
456
+ children: c.open
441
457
  })]
442
458
  }) }),
443
- S("navigation") && (f.boundaryButtons || y("previous") || y("next") || f.showPageInput !== !1 || f.showPageCount !== !1) && /* @__PURE__ */ o(m, {
444
- label: d.page,
445
- children: /* @__PURE__ */ o(b, {
446
- page: u.page - 1,
447
- pageCount: u.pageCount,
459
+ _("navigation") && (l.boundaryButtons || m("previous") || m("next") || l.showPageInput !== !1 || l.showPageCount !== !1) && /* @__PURE__ */ o(g, {
460
+ label: c.page,
461
+ children: /* @__PURE__ */ o(y, {
462
+ page: s.page - 1,
463
+ pageCount: s.pageCount,
448
464
  onChange: (e) => r.goToPage(e + 1),
449
- label: d.page,
450
- previousLabel: d.previous,
451
- nextLabel: d.next,
452
- firstLabel: d.first,
453
- lastLabel: d.last,
465
+ label: c.page,
466
+ previousLabel: c.previous,
467
+ nextLabel: c.next,
468
+ firstLabel: c.first,
469
+ lastLabel: c.last,
454
470
  variant: "icons",
455
- disabled: !h,
456
- boundaryButtons: f.boundaryButtons,
471
+ disabled: !p,
472
+ boundaryButtons: l.boundaryButtons,
457
473
  buttons: {
458
- first: f.buttons?.first,
459
- previous: f.buttons?.previous,
460
- next: f.buttons?.next,
461
- last: f.buttons?.last
474
+ first: l.buttons?.first,
475
+ previous: l.buttons?.previous,
476
+ next: l.buttons?.next,
477
+ last: l.buttons?.last
462
478
  },
463
- children: [f.showPageInput !== !1 && /* @__PURE__ */ o(l, {
479
+ children: [l.showPageInput !== !1 && /* @__PURE__ */ o(f, {
464
480
  class: "rv-pdf-viewer__page-input",
465
481
  type: "number",
466
482
  min: 1,
467
- max: u.pageCount || 1,
468
- disabled: !h,
469
- "aria-label": d.page,
483
+ max: s.pageCount || 1,
484
+ disabled: !p,
485
+ "aria-label": c.page,
470
486
  value: D,
471
487
  onInput: (e) => O(e.currentTarget.value),
472
488
  onChange: M,
473
489
  onKeyDown: (e) => {
474
- e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(u.page)));
490
+ e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(s.page)));
475
491
  }
476
- }), f.showPageCount !== !1 && /* @__PURE__ */ o("span", {
492
+ }), l.showPageCount !== !1 && /* @__PURE__ */ o("span", {
477
493
  class: "rv-pdf-viewer__page-count",
478
- children: q(d.pageCount, {
479
- of: d.of,
480
- pages: u.pageCount
494
+ children: q(c.pageCount, {
495
+ of: c.of,
496
+ pages: s.pageCount
481
497
  })
482
498
  })]
483
499
  })
484
500
  }),
485
- S("zoom") && (y("zoomOut") || y("zoomIn") || f.showZoomSelect !== !1) && /* @__PURE__ */ o(m, {
486
- label: d.zoom,
501
+ _("zoom") && (m("zoomOut") || m("zoomIn") || l.showZoomSelect !== !1) && /* @__PURE__ */ o(g, {
502
+ label: c.zoom,
487
503
  children: [
488
- y("zoomOut") && /* @__PURE__ */ o(_, {
489
- ...x("zoomOut"),
490
- label: d.zoomOut,
504
+ m("zoomOut") && /* @__PURE__ */ o(S, {
505
+ ...h("zoomOut"),
506
+ label: c.zoomOut,
491
507
  icon: Z.minus,
492
508
  size: "compact",
493
- disabled: !h || u.scale <= .25 || !!x("zoomOut").disabled,
494
- onClick: () => r.setZoom(u.scale / k)
509
+ disabled: !p || s.scale <= .25 || !!h("zoomOut").disabled,
510
+ onClick: () => r.setZoom(s.scale / k)
495
511
  }),
496
- f.showZoomSelect !== !1 && /* @__PURE__ */ o("div", {
512
+ l.showZoomSelect !== !1 && /* @__PURE__ */ o("div", {
497
513
  class: "rv-pdf-viewer__zoom-select",
498
- children: /* @__PURE__ */ o(c, {
514
+ children: /* @__PURE__ */ o(d, {
499
515
  className: "rv-select",
500
516
  config: {
501
- ariaLabel: d.zoom,
517
+ ariaLabel: c.zoom,
502
518
  portalTarget: e.appendTo
503
519
  },
504
- disabled: !h,
505
- value: String(u.zoom),
520
+ disabled: !p,
521
+ value: String(s.zoom),
506
522
  source: A.map((e) => ({
507
523
  value: String(e),
508
- label: e === "page-width" ? d.fitWidth : e === "page-fit" ? d.fitPage : q(d.zoomPercentage, { percent: Math.round(e * 100) })
524
+ label: e === "page-width" ? c.fitWidth : e === "page-fit" ? c.fitPage : q(c.zoomPercentage, { percent: Math.round(e * 100) })
509
525
  })),
510
526
  onChange: (e) => {
511
527
  let t = String(e);
@@ -513,111 +529,111 @@ function Q(e) {
513
529
  }
514
530
  })
515
531
  }),
516
- y("zoomIn") && /* @__PURE__ */ o(_, {
517
- ...x("zoomIn"),
518
- label: d.zoomIn,
532
+ m("zoomIn") && /* @__PURE__ */ o(S, {
533
+ ...h("zoomIn"),
534
+ label: c.zoomIn,
519
535
  icon: Z.plus,
520
536
  size: "compact",
521
- disabled: !h || u.scale >= 5 || !!x("zoomIn").disabled,
522
- onClick: () => r.setZoom(u.scale * k)
537
+ disabled: !p || s.scale >= 5 || !!h("zoomIn").disabled,
538
+ onClick: () => r.setZoom(s.scale * k)
523
539
  })
524
540
  ]
525
541
  }),
526
- S("search") && /* @__PURE__ */ o(m, { children: y("search") && /* @__PURE__ */ o(_, {
527
- ...x("search"),
528
- label: d.search,
542
+ _("search") && /* @__PURE__ */ o(g, { children: m("search") && /* @__PURE__ */ o(S, {
543
+ ...h("search"),
544
+ label: c.search,
529
545
  icon: Z.search,
530
546
  size: "compact",
531
- disabled: !h || !!x("search").disabled,
547
+ disabled: !p || !!h("search").disabled,
532
548
  "aria-expanded": e.searchOpen,
533
549
  "aria-controls": e.searchId,
534
550
  "aria-keyshortcuts": "Control+f Meta+f",
535
551
  onClick: (t) => e.onToggleSearch(t.currentTarget)
536
552
  }) }),
537
- (S("rotate") || S("download") || S("print")) && /* @__PURE__ */ o(m, {
553
+ (_("rotate") || _("download") || _("print")) && /* @__PURE__ */ o(g, {
538
554
  className: "rv-pdf-viewer__actions rv-pdf-viewer__desktop-actions",
539
555
  children: [
540
- S("rotate") && /* @__PURE__ */ o(_, {
541
- ...x("rotate"),
542
- label: d.rotate,
556
+ _("rotate") && /* @__PURE__ */ o(S, {
557
+ ...h("rotate"),
558
+ label: c.rotate,
543
559
  icon: Z.rotate,
544
560
  size: "compact",
545
- disabled: !h || !!x("rotate").disabled,
561
+ disabled: !p || !!h("rotate").disabled,
546
562
  onClick: () => r.rotate()
547
563
  }),
548
- S("download") && /* @__PURE__ */ o(_, {
549
- ...x("download"),
550
- label: d.download,
564
+ _("download") && /* @__PURE__ */ o(S, {
565
+ ...h("download"),
566
+ label: c.download,
551
567
  icon: Z.download,
552
568
  size: "compact",
553
- disabled: !h || !!x("download").disabled,
569
+ disabled: !p || !!h("download").disabled,
554
570
  onClick: () => void r.download()
555
571
  }),
556
- S("print") && /* @__PURE__ */ o(_, {
557
- ...x("print"),
558
- label: d.print,
572
+ _("print") && /* @__PURE__ */ o(S, {
573
+ ...h("print"),
574
+ label: c.print,
559
575
  icon: Z.print,
560
576
  size: "compact",
561
- disabled: !h || u.printing || !!x("print").disabled,
562
- busy: u.printing,
577
+ disabled: !p || s.printing || !!h("print").disabled,
578
+ busy: s.printing,
563
579
  onClick: () => void r.print()
564
580
  })
565
581
  ]
566
582
  }),
567
- (S("rotate") || S("download") || S("print")) && /* @__PURE__ */ o(m, {
583
+ (_("rotate") || _("download") || _("print")) && /* @__PURE__ */ o(g, {
568
584
  className: "rv-pdf-viewer__more",
569
- children: /* @__PURE__ */ o(v, {
585
+ children: /* @__PURE__ */ o(C, {
570
586
  ref: T,
571
587
  variant: "ghost",
572
588
  size: "compact",
573
589
  className: "rv-btn-icon",
574
- title: d.more,
575
- "aria-label": d.more,
590
+ title: c.more,
591
+ "aria-label": c.more,
576
592
  "aria-haspopup": "menu",
577
- "aria-expanded": C,
578
- disabled: !h,
579
- onClick: () => w(!C),
593
+ "aria-expanded": x,
594
+ disabled: !p,
595
+ onClick: () => w(!x),
580
596
  onKeyDown: (e) => {
581
597
  e.key === "ArrowDown" && (e.preventDefault(), w(!0));
582
598
  },
583
- children: /* @__PURE__ */ o(s, { svg: Z.more })
599
+ children: /* @__PURE__ */ o(u, { svg: Z.more })
584
600
  })
585
601
  })
586
602
  ]
587
603
  }), /* @__PURE__ */ o(W, {
588
- open: C,
604
+ open: x,
589
605
  anchor: T.current,
590
606
  appendTo: e.appendTo,
591
607
  onClose: () => w(!1),
592
608
  role: "menu",
593
- label: d.more,
609
+ label: c.more,
594
610
  children: /* @__PURE__ */ o("div", {
595
611
  ref: E,
596
612
  class: "rv-pdf-viewer__menu",
597
613
  children: [
598
- S("rotate") && /* @__PURE__ */ o(g, {
599
- className: x("rotate").className,
600
- disabled: !!x("rotate").disabled,
614
+ _("rotate") && /* @__PURE__ */ o(b, {
615
+ className: h("rotate").className,
616
+ disabled: !!h("rotate").disabled,
601
617
  onClick: () => {
602
618
  r.rotate(), j();
603
619
  },
604
- children: [/* @__PURE__ */ o(s, { svg: Z.rotate }), d.rotate]
620
+ children: [/* @__PURE__ */ o(u, { svg: Z.rotate }), c.rotate]
605
621
  }),
606
- S("download") && /* @__PURE__ */ o(g, {
607
- className: x("download").className,
608
- disabled: !!x("download").disabled,
622
+ _("download") && /* @__PURE__ */ o(b, {
623
+ className: h("download").className,
624
+ disabled: !!h("download").disabled,
609
625
  onClick: () => {
610
626
  r.download(), j();
611
627
  },
612
- children: [/* @__PURE__ */ o(s, { svg: Z.download }), d.download]
628
+ children: [/* @__PURE__ */ o(u, { svg: Z.download }), c.download]
613
629
  }),
614
- S("print") && /* @__PURE__ */ o(g, {
615
- className: x("print").className,
616
- disabled: u.printing || !!x("print").disabled,
630
+ _("print") && /* @__PURE__ */ o(b, {
631
+ className: h("print").className,
632
+ disabled: s.printing || !!h("print").disabled,
617
633
  onClick: () => {
618
634
  r.print(), j();
619
635
  },
620
- children: [/* @__PURE__ */ o(s, { svg: Z.print }), d.print]
636
+ children: [/* @__PURE__ */ o(u, { svg: Z.print }), c.print]
621
637
  })
622
638
  ]
623
639
  })
@@ -625,10 +641,10 @@ function Q(e) {
625
641
  }
626
642
  //#endregion
627
643
  //#region src/pdf-viewer/search-bar.tsx
628
- function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }) {
629
- let l = n.status === "ready";
644
+ function ue({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: s }) {
645
+ let c = n.status === "ready";
630
646
  return i(() => {
631
- c.current?.focus();
647
+ s.current?.focus();
632
648
  }, []), /* @__PURE__ */ o("div", {
633
649
  id: e,
634
650
  class: "rv-pdf-viewer__search",
@@ -637,13 +653,13 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
637
653
  onKeyDown: (e) => {
638
654
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), a());
639
655
  },
640
- children: [/* @__PURE__ */ o(ee, {
641
- icon: /* @__PURE__ */ o(s, { svg: Z.search }),
642
- inputRef: c,
656
+ children: [/* @__PURE__ */ o(re, {
657
+ icon: /* @__PURE__ */ o(u, { svg: Z.search }),
658
+ inputRef: s,
643
659
  "aria-label": r.search,
644
660
  placeholder: r.search,
645
661
  value: n.query,
646
- disabled: !l,
662
+ disabled: !c,
647
663
  onValueChange: (e) => t.search(e),
648
664
  onKeyDown: (e) => {
649
665
  e.key === "Enter" && (e.preventDefault(), t.search(n.query, e.shiftKey, !0));
@@ -660,21 +676,21 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
660
676
  matches: r.matches
661
677
  }) : r.noMatches : ""
662
678
  }),
663
- /* @__PURE__ */ o(_, {
679
+ /* @__PURE__ */ o(S, {
664
680
  label: r.previousMatch,
665
681
  icon: Z.up,
666
682
  size: "compact",
667
- disabled: !l || !n.matchCount,
683
+ disabled: !c || !n.matchCount,
668
684
  onClick: () => t.search(n.query, !0, !0)
669
685
  }),
670
- /* @__PURE__ */ o(_, {
686
+ /* @__PURE__ */ o(S, {
671
687
  label: r.nextMatch,
672
688
  icon: Z.down,
673
689
  size: "compact",
674
- disabled: !l || !n.matchCount,
690
+ disabled: !c || !n.matchCount,
675
691
  onClick: () => t.search(n.query, !1, !0)
676
692
  }),
677
- /* @__PURE__ */ o(_, {
693
+ /* @__PURE__ */ o(S, {
678
694
  label: r.closeSearch,
679
695
  icon: Z.close,
680
696
  size: "compact",
@@ -686,15 +702,15 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
686
702
  }
687
703
  //#endregion
688
704
  //#region src/pdf-viewer/header.tsx
689
- function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
705
+ function de({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
690
706
  let a = e.status === "ready";
691
707
  return /* @__PURE__ */ o("header", {
692
708
  class: "rv-pdf-viewer__header",
693
709
  children: [
694
- i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(s, {
710
+ i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(u, {
695
711
  svg: Z.document,
696
712
  className: "rv-svg-icon rv-pdf-viewer__document-icon"
697
- }), /* @__PURE__ */ o("span", {
713
+ }), /* @__PURE__ */ o(D, {
698
714
  class: "rv-pdf-viewer__filename",
699
715
  title: e.fileName,
700
716
  children: e.fileName
@@ -708,7 +724,7 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
708
724
  pages: e.pageCount
709
725
  }) : ""
710
726
  }),
711
- e.printing && /* @__PURE__ */ o(v, {
727
+ e.printing && /* @__PURE__ */ o(C, {
712
728
  variant: "ghost",
713
729
  size: "compact",
714
730
  onClick: () => r(),
@@ -719,24 +735,24 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
719
735
  }
720
736
  //#endregion
721
737
  //#region src/pdf-viewer/status.tsx
722
- function ce({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
723
- return e.status === "loading" ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(f, { label: n.loading }), /* @__PURE__ */ o("span", { children: n.loading })] }) : e.status === "error" ? /* @__PURE__ */ o(h, {
738
+ function fe({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
739
+ return e.status === "loading" ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(h, { label: n.loading }), /* @__PURE__ */ o("span", { children: n.loading })] }) : e.status === "error" ? /* @__PURE__ */ o(_, {
724
740
  tone: "danger",
725
741
  title: n.error,
726
742
  description: n.errorDescription,
727
- actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(v, {
743
+ actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(C, {
728
744
  size: "compact",
729
745
  onClick: () => void r.retry(),
730
746
  children: n.retry
731
- }), i && /* @__PURE__ */ o(v, {
747
+ }), i && /* @__PURE__ */ o(C, {
732
748
  size: "compact",
733
749
  onClick: () => a(),
734
750
  children: n.open
735
751
  })] })
736
- }) : /* @__PURE__ */ o(y, {
752
+ }) : /* @__PURE__ */ o(x, {
737
753
  title: n.empty,
738
754
  description: n.emptyHint,
739
- children: i && /* @__PURE__ */ o(v, {
755
+ children: i && /* @__PURE__ */ o(C, {
740
756
  variant: "primary",
741
757
  onClick: () => a(),
742
758
  children: n.open
@@ -745,8 +761,8 @@ function ce({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
745
761
  }
746
762
  //#endregion
747
763
  //#region src/pdf-viewer/component.tsx
748
- function le(e) {
749
- let t = r(() => new B(e), [
764
+ function pe(e) {
765
+ let t = r(() => new V(e), [
750
766
  e.workerSrc,
751
767
  e.documentOptions,
752
768
  e.initialPage,
@@ -759,13 +775,13 @@ function le(e) {
759
775
  });
760
776
  }
761
777
  function $(e) {
762
- let { controller: t } = e, [r, s] = n(t.snapshot), [c, u] = n(!1), [d] = n(() => C("rv-pdf-search")), f = a(null), p = a(null), m = a(null), g = a(null), _ = a(null), v = J(e.text), y = r.status === "ready", b = Y(e.toolbar).buttons, x = (e) => {
763
- let t = b?.[e];
778
+ let { controller: t } = e, [r, c] = n(t.snapshot), [l, u] = n(!1), [d] = n(() => s("rv-pdf-search")), p = a(null), m = a(null), h = a(null), g = a(null), v = a(null), y = J(e.text), b = r.status === "ready", x = Y(e.toolbar).buttons, S = (e) => {
779
+ let t = x?.[e];
764
780
  return t !== !1 && !t?.disabled;
765
- }, S = X(e.toolbar, "search") && x("search"), w = X(e.toolbar, "open") && x("open");
766
- t.setCallbacks(e), t.setPrintTitle(v.printDocument), i(() => {
767
- let n = t.subscribe(s);
768
- return t.attach(m.current).catch(() => {}), e.onReady?.(t), () => {
781
+ }, C = X(e.toolbar, "search") && S("search"), w = X(e.toolbar, "open") && S("open");
782
+ t.setCallbacks(e), t.setPrintTitle(y.printDocument), i(() => {
783
+ let n = t.subscribe(c);
784
+ return t.attach(h.current).catch(() => {}), e.onReady?.(t), () => {
769
785
  n(), t.destroy();
770
786
  };
771
787
  }, [t]), i(() => {
@@ -777,87 +793,87 @@ function $(e) {
777
793
  ]);
778
794
  let T = () => {
779
795
  t.clearSearch(), u(!1);
780
- let e = f.current;
781
- e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) : m.current?.focus({ preventScroll: !0 });
796
+ let e = p.current;
797
+ e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) : h.current?.focus({ preventScroll: !0 });
782
798
  }, E = (e) => {
783
- c || (f.current = e), u(!0), _.current?.focus();
799
+ l || (p.current = e), u(!0), v.current?.focus();
784
800
  };
785
801
  i(() => {
786
- S || (t.clearSearch(), u(!1), c && m.current?.focus({ preventScroll: !0 }));
787
- }, [S, t]);
802
+ C || (t.clearSearch(), u(!1), l && h.current?.focus({ preventScroll: !0 }));
803
+ }, [C, t]);
788
804
  let D = {
789
805
  controller: t,
790
806
  state: r,
791
- text: v,
807
+ text: y,
792
808
  config: e.toolbar,
793
- searchOpen: c,
809
+ searchOpen: l,
794
810
  searchId: d,
795
- appendTo: p.current ?? void 0,
811
+ appendTo: m.current ?? void 0,
796
812
  onOpen: () => g.current?.click(),
797
- onToggleSearch: (e) => c ? T() : E(e)
813
+ onToggleSearch: (e) => l ? T() : E(e)
798
814
  };
799
815
  return /* @__PURE__ */ o("section", {
800
- ref: p,
816
+ ref: m,
801
817
  class: `rv-pdf-viewer ${e.className ?? ""}`,
802
818
  style: { height: e.height ?? 640 },
803
- "aria-label": v.viewer,
819
+ "aria-label": y.viewer,
804
820
  onKeyDown: (e) => {
805
- (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" && y && S && (e.preventDefault(), E(e.target));
821
+ (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" && b && C && (e.preventDefault(), E(e.target));
806
822
  },
807
823
  children: [
808
- (e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(se, {
824
+ (e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(de, {
809
825
  showDetails: e.showHeader !== !1,
810
826
  state: r,
811
- text: v,
827
+ text: y,
812
828
  onCancelPrint: () => t.cancelPrint()
813
829
  }),
814
830
  e.toolbar !== !1 && (e.renderToolbar ? e.renderToolbar(t, r, D) : /* @__PURE__ */ o(Q, { ...D })),
815
- /* @__PURE__ */ o(l, {
831
+ /* @__PURE__ */ o(f, {
816
832
  ref: g,
817
833
  type: "file",
818
834
  accept: "application/pdf,.pdf",
819
835
  hidden: !0,
820
- "aria-label": v.open,
836
+ "aria-label": y.open,
821
837
  onChange: (e) => {
822
838
  let n = e.currentTarget.files?.[0];
823
839
  e.currentTarget.value = "", n && t.load(n);
824
840
  }
825
841
  }),
826
- c && S && /* @__PURE__ */ o(oe, {
827
- inputRef: _,
842
+ l && C && /* @__PURE__ */ o(ue, {
843
+ inputRef: v,
828
844
  id: d,
829
845
  controller: t,
830
846
  state: r,
831
- text: v,
847
+ text: y,
832
848
  onClose: T
833
849
  }),
834
850
  /* @__PURE__ */ o("div", {
835
851
  class: "rv-pdf-viewer__body",
836
852
  "aria-busy": r.status === "loading",
837
853
  children: [/* @__PURE__ */ o("div", {
838
- ref: m,
854
+ ref: h,
839
855
  class: "rv-pdf-viewer__viewport",
840
856
  tabIndex: 0,
841
857
  role: "region",
842
- "aria-label": v.pages
843
- }), !y && /* @__PURE__ */ o("div", {
858
+ "aria-label": y.pages
859
+ }), !b && /* @__PURE__ */ o("div", {
844
860
  class: "rv-pdf-viewer__status",
845
- children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(ce, {
861
+ children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(fe, {
846
862
  state: r,
847
- text: v,
863
+ text: y,
848
864
  controller: t,
849
865
  canOpen: w,
850
866
  onOpen: D.onOpen
851
867
  })
852
868
  })]
853
869
  }),
854
- y && r.error && /* @__PURE__ */ o(h, {
870
+ b && r.error && /* @__PURE__ */ o(_, {
855
871
  className: "rv-pdf-viewer__error",
856
872
  tone: "danger",
857
- description: v.operationError
873
+ description: y.operationError
858
874
  })
859
875
  ]
860
876
  });
861
877
  }
862
878
  //#endregion
863
- export { U as a, ie as c, H as d, W as f, K as i, ae as l, ne as m, $ as n, V as o, te as p, Q as r, re as s, le as t, G as u };
879
+ export { ie as a, ce as c, U as d, W as f, K as i, le as l, oe as m, $ as n, H as o, ae as p, Q as r, se as s, pe as t, G as u };