@revolist/ui 4.0.2-rc → 4.0.2

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 (343) hide show
  1. package/LICENSE +21 -0
  2. package/MIGRATION.md +36 -0
  3. package/OWNERSHIP.md +32 -32
  4. package/README.md +405 -265
  5. package/_button.scss +6 -2
  6. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  7. package/_chunks/calculator-CDWOuAcp.js +4 -0
  8. package/_chunks/{calendar-CpaUK7w1.js → calendar-CgXQgkga.js} +28 -18
  9. package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
  10. package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
  11. package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
  12. package/_chunks/choice-chips-SkllS5Kl.js +126 -0
  13. package/_chunks/clock-BOhPNlW3.js +4 -0
  14. package/_chunks/{color-palette-BBMFmUNA.js → color-palette-DMJUChWC.js} +20 -22
  15. package/_chunks/{color-picker-D90Jg-M8.js → color-picker-BpCTuIdm.js} +77 -72
  16. package/_chunks/{component-YDcfoOLz.js → component-CfeHXgIw.js} +301 -282
  17. package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
  18. package/_chunks/configurator-actions-DnStE6Yl.js +155 -0
  19. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  20. package/_chunks/control-Dcrjsunl.js +118 -0
  21. package/_chunks/{controls-DIum-E66.js → controls-B_6NJarZ.js} +217 -182
  22. package/_chunks/{date-control-BJSzu79z.js → date-control-C4h4m75W.js} +1 -1
  23. package/_chunks/{date-time-BxPJusp9.js → date-time-CTOSbzb0.js} +344 -307
  24. package/_chunks/{delete-button-Bblyah10.js → delete-button-CW9vjLnk.js} +6 -6
  25. package/_chunks/dialog.parts-3w5FR06n.js +131 -0
  26. package/_chunks/{duration-87U2EoMS.js → duration-Bf2OS1V5.js} +19 -18
  27. package/_chunks/editor-popup-ByU7qiub.js +82 -0
  28. package/_chunks/field-configurator-D5dZRhDe.js +288 -0
  29. package/_chunks/field-context-D57PnBbH.js +5 -0
  30. package/_chunks/{framework-mount-C-Zwm44H.js → framework-mount-Bk4O_T7T.js} +1 -1
  31. package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
  32. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  33. package/_chunks/minus-BOAR3A1C.js +4 -0
  34. package/_chunks/mount-BRdcG60g.js +267 -0
  35. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  36. package/_chunks/native-control-B_fVA5bL.js +649 -0
  37. package/_chunks/{number-input-BeIadZuL.js → number-input-CmM6_2vR.js} +7 -7
  38. package/_chunks/{picker-DpP7iQLA.js → picker-DTqET-2W.js} +2 -2
  39. package/_chunks/plus-CbGRkIGl.js +4 -0
  40. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  41. package/_chunks/popup-C35Isk7p.js +378 -0
  42. package/_chunks/{rating-choice-Ca8ZBty3.js → rating-choice-C-6wcb9U.js} +1 -1
  43. package/_chunks/render-m5eMMwFR.js +83 -0
  44. package/_chunks/{reorder-list-Cc3KmfAN.js → reorder-list-DIl1gkV6.js} +1 -1
  45. package/_chunks/request-trail-DrhdpWiH.js +762 -0
  46. package/_chunks/rich-text-BnilBbhU.js +842 -0
  47. package/_chunks/rotate-left-BF6G883o.js +4 -0
  48. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  49. package/_chunks/selection-list-tooltips-C5oMJe26.js +42 -0
  50. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  51. package/_chunks/tooltip-D4xkio5G.js +54 -0
  52. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  53. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  54. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  55. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  56. package/_dialog.scss +55 -21
  57. package/_form.scss +71 -21
  58. package/_legend.scss +25 -7
  59. package/_shared/data-query/index.d.ts +2 -2
  60. package/_shared/data-query/load-options.d.ts +2 -2
  61. package/_variables.scss +34 -32
  62. package/_view-switcher.scss +6 -0
  63. package/activity-message.d.ts +1 -1
  64. package/ai/_chat.scss +227 -0
  65. package/ai/_style.scss +170 -39
  66. package/ai/chat.d.ts +65 -0
  67. package/ai/components.d.ts +34 -5
  68. package/ai/index.d.ts +3 -0
  69. package/ai/index.js +3 -3
  70. package/ai/mount.d.ts +59 -6
  71. package/ai/prompt-history.d.ts +13 -0
  72. package/ai/request-trail.d.ts +9 -3
  73. package/ai/results/_style.scss +83 -0
  74. package/ai/results/index.d.ts +11 -0
  75. package/ai/results/metrics.d.ts +5 -0
  76. package/ai/results/table.d.ts +5 -0
  77. package/ai/results/text.d.ts +5 -0
  78. package/ai/results/types.d.ts +29 -0
  79. package/ai/transcript.d.ts +27 -0
  80. package/ai/translations.d.ts +1 -1
  81. package/angular/angular.d.ts +1 -1
  82. package/angular/angular.js +13 -10
  83. package/assignee/assignee.scss +28 -6
  84. package/assignee/index.js +34 -35
  85. package/avatar/avatar.style.scss +23 -6
  86. package/avatar/index.d.ts +25 -2
  87. package/avatar/index.js +33 -32
  88. package/badge.d.ts +1 -1
  89. package/badge.view.d.ts +8 -0
  90. package/brush-range/_brush-range.scss +55 -49
  91. package/brush-range/component.d.ts +1 -3
  92. package/brush-range/component.js +27 -27
  93. package/buttons/delete-button.d.ts +2 -1
  94. package/buttons/delete-button.js +1 -1
  95. package/buttons/delete-button.style.scss +6 -2
  96. package/buttons/remove-button.d.ts +1 -1
  97. package/buttons/remove-button.js +1 -1
  98. package/buttons/remove-button.style.scss +1 -1
  99. package/buttons/svg-button.d.ts +2 -1
  100. package/buttons/svg-button.js +19 -19
  101. package/calendar/_calendar.scss +27 -26
  102. package/calendar/calendar.js +1 -1
  103. package/calendar/header.js +1 -2
  104. package/calendar/index.js +2 -2
  105. package/cell-input.scss +3 -7
  106. package/cell-visuals/badge.style.scss +6 -3
  107. package/cell-visuals/bar-chart.style.scss +2 -1
  108. package/cell-visuals/column-type.style.css +12 -0
  109. package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
  110. package/cell-visuals/progress-line.style.scss +1 -4
  111. package/cell-visuals/sparkline.style.scss +2 -1
  112. package/cell-visuals/timeline.style.css +4 -2
  113. package/checkbox/checkbox.scss +6 -24
  114. package/choice-chips/index.d.ts +3 -1
  115. package/choice-chips/index.js +1 -1
  116. package/color-palette/color-palette.js +1 -1
  117. package/color-palette/color-palette.style.scss +88 -25
  118. package/color-palette/color-picker.js +2 -2
  119. package/color-palette/color-picker.style.scss +23 -10
  120. package/color-palette/common-palettes.d.ts +1 -1
  121. package/color-palette/common-palettes.js +1 -1
  122. package/color-palette/native.d.ts +15 -2
  123. package/component-catalog.d.ts +24 -11
  124. package/configurator-actions.d.ts +67 -0
  125. package/configurator-actions.js +1 -0
  126. package/configurator-aggregation-list.d.ts +14 -0
  127. package/configurator-aggregation-list.js +63 -0
  128. package/configurator-drop-zone.d.ts +39 -0
  129. package/configurator-drop-zone.js +66 -0
  130. package/configurator-field-icon.d.ts +10 -0
  131. package/configurator-field-icon.js +1 -0
  132. package/configurator-focus.d.ts +4 -0
  133. package/configurator-focus.js +39 -0
  134. package/configurator-sections.d.ts +42 -0
  135. package/configurator-sections.js +71 -0
  136. package/control-attributes.js +7 -7
  137. package/control-presentation.d.ts +8 -2
  138. package/control-presentation.js +25 -20
  139. package/controls.d.ts +19 -7
  140. package/controls.js +4 -3
  141. package/core/editor-popup-position.d.ts +6 -2
  142. package/core/editor-popup.d.ts +4 -0
  143. package/core/editor-popup.js +1 -1
  144. package/core/popover-controller.d.ts +35 -0
  145. package/core/popup-ownership.d.ts +2 -0
  146. package/core/selection-list-tooltips.d.ts +2 -0
  147. package/core/title-tooltip.d.ts +2 -0
  148. package/core/tooltip-session.d.ts +29 -0
  149. package/core/tooltip-surface.d.ts +13 -0
  150. package/core/tooltip-text.d.ts +6 -0
  151. package/core/tooltip.d.ts +35 -0
  152. package/core/top-layer-popup.d.ts +4 -0
  153. package/core/top-layer-popup.js +1 -23
  154. package/date-time/attach.d.ts +1 -1
  155. package/date-time/date-control.d.ts +1 -1
  156. package/date-time/field.d.ts +3 -2
  157. package/date-time/index.js +1 -1
  158. package/date-time/style.scss +242 -39
  159. package/date-time/time-selection.d.ts +3 -1
  160. package/date-time/types.d.ts +5 -1
  161. package/dialog/dialog-action-footer.d.ts +17 -2
  162. package/dialog/dialog.dom.d.ts +15 -2
  163. package/dialog/dialog.dom.js +3 -3
  164. package/dialog/dialog.parts.d.ts +1 -1
  165. package/dialog/dialog.parts.js +1 -1
  166. package/distribution-chart/_distribution-chart.scss +113 -77
  167. package/distribution-chart/area-chart.js +1 -1
  168. package/distribution-chart/bar-chart.d.ts +5 -2
  169. package/distribution-chart/bar-chart.js +7 -3
  170. package/distribution-chart/chart-frame.d.ts +2 -1
  171. package/distribution-chart/index.d.ts +1 -1
  172. package/distribution-chart/line-chart.js +1 -1
  173. package/dropdown/content.d.ts +2 -1
  174. package/dropdown/content.js +1 -142
  175. package/dropdown/control.d.ts +14 -0
  176. package/dropdown/control.js +1 -0
  177. package/dropdown/control.view.d.ts +6 -0
  178. package/dropdown/dropdown.types.d.ts +5 -1
  179. package/dropdown/editor-dropdown.style.scss +54 -16
  180. package/dropdown/index.d.ts +1 -1
  181. package/dropdown/index.js +3 -4
  182. package/dropdown/lookup-field.d.ts +5 -0
  183. package/dropdown/lookup-field.js +2 -1
  184. package/dropdown/popup.d.ts +2 -2
  185. package/dropdown/popup.js +1 -141
  186. package/duration/index.js +1 -1
  187. package/duration/style.scss +1 -1
  188. package/editor-actions.js +1 -1
  189. package/editor-layout/index.d.ts +4 -4
  190. package/editor-layout/index.js +39 -34
  191. package/editor-layout/style.scss +82 -18
  192. package/field-configurator.d.ts +39 -1
  193. package/field-configurator.js +4 -170
  194. package/field-expansion.d.ts +9 -0
  195. package/fieldset.d.ts +3 -0
  196. package/filter/filters/slider/_single-slider.scss +57 -38
  197. package/filter/filters/slider/_slider.scss +41 -33
  198. package/filter/filters/slider/control.js +2 -0
  199. package/filter/filters/slider/runtime.js +49 -22
  200. package/filter/filters/slider/single.js +1 -1
  201. package/filter-badge.js +1 -1
  202. package/filter-controls.d.ts +0 -1
  203. package/filter-controls.js +9 -10
  204. package/form-controls/field-context.d.ts +5 -0
  205. package/form-controls/index.d.ts +10 -2
  206. package/form-controls/index.js +4 -9
  207. package/form-controls/presentation.d.ts +1 -1
  208. package/form-controls/presentation.js +53 -45
  209. package/formatting/index.d.ts +1 -1
  210. package/formatting/index.js +40 -35
  211. package/formatting/styles.scss +14 -57
  212. package/framework.js +237 -226
  213. package/history-controls.d.ts +14 -0
  214. package/history-controls.js +27 -0
  215. package/icon-toolbar.d.ts +62 -0
  216. package/icon-toolbar.js +1 -0
  217. package/icons/icon.d.ts +1 -1
  218. package/legend.d.ts +1 -1
  219. package/masked-input/index.js +1 -1
  220. package/native-control.d.ts +6 -5
  221. package/native-control.js +3 -26
  222. package/native-controls.d.ts +54 -2
  223. package/native-styles.css +1 -1
  224. package/native-styles.scss +6 -2
  225. package/native.d.ts +3 -3
  226. package/native.js +41 -37
  227. package/number-input/index.d.ts +1 -1
  228. package/number-input/index.js +1 -1
  229. package/package.json +88 -14
  230. package/pagination.d.ts +3 -0
  231. package/pagination.js +50 -40
  232. package/pdf-viewer/header.d.ts +1 -1
  233. package/pdf-viewer/index.d.ts +2 -2
  234. package/pdf-viewer/index.js +1 -1
  235. package/pdf-viewer/search-bar.d.ts +1 -1
  236. package/pdf-viewer/status.d.ts +1 -1
  237. package/pdf-viewer/style.scss +205 -45
  238. package/pickers.d.ts +5 -1
  239. package/preact-mount.js +1 -1
  240. package/preact.d.ts +15 -10
  241. package/preact.js +109 -64
  242. package/progress/_bar.scss +9 -3
  243. package/progress/_circular.scss +2 -1
  244. package/rating-choice.js +1 -1
  245. package/react-adapter.d.ts +4 -2
  246. package/react-control.d.ts +1 -0
  247. package/react.d.ts +20 -11
  248. package/react.js +72 -88
  249. package/reorder-list.d.ts +1 -1
  250. package/reorder-list.js +1 -1
  251. package/reorder-list.scss +59 -17
  252. package/resource-picker/resource-picker-popup.js +1 -1
  253. package/resource-picker/resource-picker.js +73 -71
  254. package/resource-picker/resource-picker.scss +66 -35
  255. package/rich-text/engine.d.ts +17 -19
  256. package/rich-text/format-html.d.ts +2 -0
  257. package/rich-text/index.d.ts +11 -7
  258. package/rich-text/index.js +1 -1
  259. package/rich-text/model.d.ts +6 -3
  260. package/rich-text/render-model.d.ts +4 -5
  261. package/rich-text/style.scss +295 -55
  262. package/rich-text/syntax.d.ts +5 -2
  263. package/rich-text/toolbar.d.ts +6 -6
  264. package/rich-text/translations.d.ts +5 -15
  265. package/search-input/index.js +1 -1
  266. package/search-input/native.d.ts +21 -2
  267. package/select.d.ts +22 -0
  268. package/select.js +1 -0
  269. package/selection-list.d.ts +1 -0
  270. package/selection-list.js +3 -1
  271. package/status-feedback/exit-snapshot.js +1 -1
  272. package/status-feedback/index.js +2 -2
  273. package/status-feedback/popover.js +9 -9
  274. package/status-feedback/render.js +3 -44
  275. package/status-feedback/status-feedback.scss +130 -34
  276. package/status-feedback/types.d.ts +4 -0
  277. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  278. package/styles/_activity-message.scss +24 -7
  279. package/styles/_alert.scss +78 -17
  280. package/styles/_cell-editor-frame.scss +11 -0
  281. package/styles/_compositions.scss +404 -82
  282. package/styles/_control.scss +42 -12
  283. package/styles/_disclosure.scss +15 -5
  284. package/styles/_editor-counter.scss +16 -6
  285. package/styles/_editor-slider.scss +8 -4
  286. package/styles/_field-configurator.scss +321 -23
  287. package/styles/_fields-grid.scss +49 -0
  288. package/styles/_filter-controls.scss +10 -2
  289. package/styles/_icon-action.scss +48 -15
  290. package/styles/_loading.scss +12 -3
  291. package/styles/_motion.scss +32 -9
  292. package/styles/_palette.scss +0 -24
  293. package/styles/_primitives.scss +376 -116
  294. package/styles/_theme.scss +130 -86
  295. package/styles/_thresholds.scss +28 -25
  296. package/styles/_time-grid.scss +8 -3
  297. package/styles/_tokens.scss +6 -1
  298. package/styles/configurator-actions.scss +241 -0
  299. package/styles/pagination.css +213 -0
  300. package/styles/{legacy-rating.css → rating.css} +8 -3
  301. package/styles.css +1 -1
  302. package/styles.scss +3 -5
  303. package/surfaces.d.ts +38 -2
  304. package/surfaces.js +37 -134
  305. package/svelte/UiComponent.server.js +1 -48
  306. package/svelte/UiComponent.svelte +44 -32
  307. package/svelte.d.ts +1 -1
  308. package/svelte.js +33 -68
  309. package/switch/index.js +15 -14
  310. package/time-grid.d.ts +0 -1
  311. package/time-grid.js +38 -37
  312. package/timeline-track/_style.scss +96 -24
  313. package/timeline-track/component.d.ts +5 -1
  314. package/timeline-track/index.js +71 -54
  315. package/timeline-track/model.d.ts +9 -0
  316. package/timeline-track/model.js +10 -1
  317. package/ui.css +1 -1
  318. package/view-switcher.d.ts +23 -0
  319. package/vue.d.ts +51 -35
  320. package/vue.js +149 -178
  321. package/_chunks/chart-frame-BC99KjGa.js +0 -127
  322. package/_chunks/choice-chips-Cs4D-3nH.js +0 -110
  323. package/_chunks/compat.module-DDB2pm9O.js +0 -229
  324. package/_chunks/control-tooltip-ztgmsG7H.js +0 -100
  325. package/_chunks/dialog.parts-DBqo3Qwb.js +0 -134
  326. package/_chunks/dropdown-voWqmwAe.js +0 -357
  327. package/_chunks/editor-popup-D3JdS8l3.js +0 -81
  328. package/_chunks/mount-DZe_6VtR.js +0 -90
  329. package/_chunks/request-trail-IdNiFvKH.js +0 -347
  330. package/_chunks/rich-text-BzI1DyfF.js +0 -477
  331. package/avatar/index.view.d.ts +0 -25
  332. package/color-palette/native.view.d.ts +0 -15
  333. package/control-presentation.view.d.ts +0 -8
  334. package/dialog/dialog-action-footer.view.d.ts +0 -20
  335. package/dialog/dialog.dom.view.d.ts +0 -15
  336. package/form-controls/index.view.d.ts +0 -12
  337. package/formatting/control-tooltip.d.ts +0 -27
  338. package/native-controls.view.d.ts +0 -54
  339. package/react-native-select.d.ts +0 -6
  340. package/search-input/native.view.d.ts +0 -21
  341. package/styles/legacy-pagination.css +0 -112
  342. package/surfaces.view.d.ts +0 -63
  343. package/vue-native-select.d.ts +0 -9
@@ -1,29 +1,33 @@
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 { t as c } from "./compat.module-DDB2pm9O.js";
6
- import { Input as l, Select as u } from "../native-control.js";
7
- import { I as d, L as f, O as p, S as m, _ as h, m as g, n as _, u as v, z as y } from "./controls-DIum-E66.js";
8
- import { t as b } from "./chevron-left-D0nc4Z5S.js";
9
- import { t as x } from "./chevron-right-sxHQMSkq.js";
10
- import { createControlId as S } from "../core/control-id.js";
11
- import { t as C } from "./chevron-down-GbplLa6s.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 { avatarTemplate as k } from "../avatar/index.js";
15
- import { renderProgressBar as A } from "../progress/bar.js";
16
- import { SearchInput as j } from "../search-input/index.js";
17
- import { s as M } from "./iso-B0YHBK7m.js";
18
- import { f as N, h as P, o as F } from "./model-mPO2tG2f.js";
19
- import { n as I, t as L } from "./date-control-BJSzu79z.js";
20
- import { t as R } from "./calendar-CpaUK7w1.js";
21
- import { t as z } from "./dropdown-voWqmwAe.js";
22
- import { t as ee } from "./chevron-up-BLuNMPDn.js";
23
- import { t as te } from "./controller-hRBm_Lfz.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-B_fVA5bL.js";
8
+ import { n as p } from "./popup-C35Isk7p.js";
9
+ import { t as m } from "./chevron-down-GbplLa6s.js";
10
+ import { D as h, F as g, I as _, R as v, b as y, g as b, l as x, p as S, t as C } from "./controls-B_6NJarZ.js";
11
+ import { n as w, t as T } from "./chevron-right-CM3ljziP.js";
12
+ import { t as E } from "./xmark-DD_PBvZI.js";
13
+ import { t as D } from "./tooltip-text-BXsUEmBH.js";
14
+ import { DialogController as O, attachMenuKeyboard as k } from "../surfaces.js";
15
+ import { t as A } from "./rotate-right-Iha5ScJ1.js";
16
+ import { t as j } from "./chevron-up-BLuNMPDn.js";
17
+ import { avatarTemplate as M } from "../avatar/index.js";
18
+ import { renderProgressBar as ee } from "../progress/bar.js";
19
+ import { t as te } from "./plus-CbGRkIGl.js";
20
+ import { t as ne } from "./minus-BOAR3A1C.js";
21
+ import { SearchInput as re } from "../search-input/index.js";
22
+ import { s as N } from "./iso-B0YHBK7m.js";
23
+ import { f as P, h as F, o as I } from "./model-mPO2tG2f.js";
24
+ import { n as L, t as R } from "./date-control-C4h4m75W.js";
25
+ import { t as z } from "./calendar-CgXQgkga.js";
26
+ import { t as B } from "./magnifying-glass-CvrTDSkB.js";
27
+ import { t as V } from "./controller-hRBm_Lfz.js";
24
28
  //#region src/pickers.tsx
25
- function B(e) {
26
- return /* @__PURE__ */ o(z, {
29
+ function H(e) {
30
+ return /* @__PURE__ */ o(d, {
27
31
  ...e,
28
32
  className: `rv-combobox ${e.className ?? ""}`,
29
33
  config: {
@@ -33,8 +37,8 @@ function B(e) {
33
37
  }
34
38
  });
35
39
  }
36
- function V(e) {
37
- return /* @__PURE__ */ o(z, {
40
+ function U(e) {
41
+ return /* @__PURE__ */ o(d, {
38
42
  ...e,
39
43
  className: `rv-multi-select ${e.className ?? ""}`,
40
44
  config: {
@@ -43,50 +47,61 @@ function V(e) {
43
47
  }
44
48
  });
45
49
  }
46
- function H(t) {
47
- return k(e, t);
50
+ function ie(t) {
51
+ return M(e, t);
48
52
  }
49
- function U(t) {
50
- return A(e, t);
53
+ function ae(t) {
54
+ return ee(e, t);
51
55
  }
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;
56
+ function W({ open: e, anchor: t, appendTo: n, closeOnOutside: r, closeOnEscape: s, onClose: c, children: u, label: d, className: f = "", role: p = "dialog" }) {
57
+ let m = a(null), h = a(c);
58
+ h.current = c;
59
+ let g = a({
60
+ closeOnOutside: r,
61
+ closeOnEscape: s
62
+ }).current;
63
+ return g.closeOnOutside = r, g.closeOnEscape = s, i(() => {
64
+ if (!e || !t || !m.current) return;
65
+ let r = m.current, i = new l(), a = !0;
57
66
  i.open({
58
67
  anchor: t,
59
68
  appendTo: n,
60
- content: d.current,
61
- display: u === "menu" ? "grid" : void 0,
69
+ get closeOnOutside() {
70
+ return g.closeOnOutside;
71
+ },
72
+ get closeOnEscape() {
73
+ return g.closeOnEscape;
74
+ },
75
+ content: m.current,
76
+ display: p === "menu" ? "grid" : void 0,
62
77
  onClose: () => {
63
- a && f.current();
78
+ a && h.current();
64
79
  }
65
80
  });
66
- let o = u === "menu" ? O(r, () => i.close()) : void 0;
81
+ let o = p === "menu" ? k(r, () => i.close(), g) : void 0;
67
82
  return () => {
68
83
  a = !1, o?.(), i.destroy(), r.hidden = !0;
69
84
  };
70
85
  }, [
71
86
  e,
72
87
  t,
73
- u,
88
+ p,
74
89
  n
75
90
  ]), /* @__PURE__ */ o("div", {
76
- ref: d,
77
- class: `rv-popover ${u === "menu" ? "rv-menu " : ""}${l}`,
78
- role: u,
79
- "aria-label": c,
91
+ ref: m,
92
+ class: `rv-popover ${p === "menu" ? "rv-menu " : ""}${f}`,
93
+ role: p,
94
+ "aria-label": d,
80
95
  hidden: !e,
81
- children: e ? s : null
96
+ children: e ? u : null
82
97
  });
83
98
  }
84
- function ne({ text: e, children: t }) {
99
+ function oe({ text: e, children: t }) {
85
100
  let n = a(null);
86
101
  return i(() => {
87
102
  let t = n.current;
88
103
  if (!t) return;
89
- let r = new D(), i, a = () => {
104
+ let r = new c(), i, a = () => {
90
105
  let n = t.querySelector("button, input, a[href], [tabindex]") ?? t;
91
106
  n !== i && (r.bind(n, e), i = n);
92
107
  };
@@ -106,20 +121,20 @@ function ne({ text: e, children: t }) {
106
121
  children: t
107
122
  });
108
123
  }
109
- function G({ open: e, title: r, closeLabel: s, onClose: l, children: u, footer: d, draggable: f, returnFocus: p }) {
110
- let m = a(null), h = a(l);
111
- h.current = l;
124
+ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer: u, draggable: d, returnFocus: f }) {
125
+ let m = a(null), h = a(c);
126
+ h.current = c;
112
127
  let [g, _] = n();
113
128
  return i(() => {
114
129
  if (!e || !m.current) {
115
130
  _(void 0);
116
131
  return;
117
132
  }
118
- let t = new T(m.current.ownerDocument), n = !0, i = t.open({
133
+ let t = new O(m.current.ownerDocument), n = !0, i = t.open({
119
134
  title: r,
120
135
  closeLabel: s,
121
- draggable: f,
122
- returnFocus: p,
136
+ draggable: d,
137
+ returnFocus: f,
123
138
  surfaceClass: "rv-ui-dialog",
124
139
  onClose: () => {
125
140
  _(void 0), n && h.current();
@@ -135,25 +150,25 @@ function G({ open: e, title: r, closeLabel: s, onClose: l, children: u, footer:
135
150
  e,
136
151
  r,
137
152
  s,
138
- f,
139
- p
153
+ d,
154
+ f
140
155
  ]), /* @__PURE__ */ o(t, { children: [
141
156
  /* @__PURE__ */ o("span", {
142
157
  ref: m,
143
158
  hidden: !0
144
159
  }),
145
- g && c(u, g.body),
146
- g && d && c(d, g.footer)
160
+ g && p(l, g.body),
161
+ g && u && p(u, g.footer)
147
162
  ] });
148
163
  }
149
- function re({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a }) {
164
+ function se({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a }) {
150
165
  return /* @__PURE__ */ o(G, {
151
166
  ...a,
152
- footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(_, {
167
+ footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(C, {
153
168
  disabled: i,
154
169
  onClick: a.onClose,
155
170
  children: r
156
- }), /* @__PURE__ */ o(_, {
171
+ }), /* @__PURE__ */ o(C, {
157
172
  variant: "primary",
158
173
  disabled: i,
159
174
  onClick: e,
@@ -161,55 +176,55 @@ function re({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a })
161
176
  })] })
162
177
  });
163
178
  }
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 && M(e) ? e : P()), [v, y] = n(N(h, u.calendarSystem)), [b] = n(() => S("rv-date-picker"));
179
+ function ce({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOnly: l, ...d }) {
180
+ 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
181
  return i(() => {
167
- (c || l) && f(!1);
182
+ (c || l) && p(!1);
168
183
  }, [c, l]), /* @__PURE__ */ o("div", {
169
184
  class: "rv-date-picker",
170
185
  children: [
171
- /* @__PURE__ */ o(L, {
186
+ /* @__PURE__ */ o(R, {
172
187
  label: r,
173
188
  value: e ?? "",
174
- minDate: u.minDate,
175
- maxDate: u.maxDate,
189
+ minDate: d.minDate,
190
+ maxDate: d.maxDate,
176
191
  disabled: c,
177
192
  readOnly: l,
178
193
  onChange: (e) => {
179
- typeof e != "string" || c || l || e && (u.minDate && e < u.minDate || u.maxDate && e > u.maxDate) || (!e || M(e)) && t(e || void 0);
194
+ typeof e != "string" || c || l || e && (d.minDate && e < d.minDate || d.maxDate && e > d.maxDate) || (!e || N(e)) && t(e || void 0);
180
195
  }
181
196
  }),
182
- /* @__PURE__ */ o(_, {
183
- ref: m,
197
+ /* @__PURE__ */ o(C, {
198
+ ref: h,
184
199
  "aria-label": a,
185
200
  "aria-haspopup": "dialog",
186
- "aria-expanded": d,
201
+ "aria-expanded": f,
187
202
  "aria-controls": b,
188
203
  disabled: c || l,
189
204
  onClick: () => {
190
- e && M(e) && (g(e), y(N(e, u.calendarSystem))), f(!d);
205
+ e && N(e) && (_(e), y(P(e, d.calendarSystem))), p(!f);
191
206
  },
192
- children: /* @__PURE__ */ o(s, { svg: I })
207
+ children: /* @__PURE__ */ o(u, { svg: L })
193
208
  }),
194
209
  /* @__PURE__ */ o(W, {
195
- open: d,
196
- anchor: p,
197
- onClose: () => f(!1),
210
+ open: f,
211
+ anchor: m,
212
+ onClose: () => p(!1),
198
213
  label: r,
199
214
  children: /* @__PURE__ */ o("div", {
200
215
  id: b,
201
- children: /* @__PURE__ */ o(R, {
202
- ...u,
216
+ children: /* @__PURE__ */ o(z, {
217
+ ...d,
203
218
  month: v,
204
- focusedDate: h,
219
+ focusedDate: g,
205
220
  selection: e ? {
206
221
  from: e,
207
222
  to: e
208
223
  } : void 0,
209
224
  onMonthChange: y,
210
- onFocusedDateChange: g,
225
+ onFocusedDateChange: _,
211
226
  onSelect: (e) => {
212
- t(e), f(!1), p?.focus();
227
+ t(e), p(!1), m?.focus();
213
228
  }
214
229
  })
215
230
  })
@@ -217,73 +232,73 @@ function ie({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOn
217
232
  ]
218
233
  });
219
234
  }
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), [v, y] = n(), [b, x] = n(e?.from ?? P()), [C, w] = n(N(b, f.calendarSystem)), [T] = n(() => S("rv-date-picker"));
235
+ function le({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLabel: l, disabled: d, readOnly: f, ...p }) {
236
+ 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
237
  i(() => {
223
- (u || d) && (m(!1), y(void 0));
224
- }, [u, d]);
238
+ (d || f) && (h(!1), y(void 0));
239
+ }, [d, f]);
225
240
  let E = (n, r) => {
226
- if (u || d || !M(r) || f.minDate && r < f.minDate || f.maxDate && r > f.maxDate) return;
241
+ if (d || f || !N(r) || p.minDate && r < p.minDate || p.maxDate && r > p.maxDate) return;
227
242
  let i = r;
228
- t(F(n === "from" ? i : e?.from ?? i, n === "to" ? i : e?.to ?? i));
243
+ t(I(n === "from" ? i : e?.from ?? i, n === "to" ? i : e?.to ?? i));
229
244
  };
230
245
  return /* @__PURE__ */ o("div", {
231
246
  class: "rv-date-range-picker",
232
247
  role: "group",
233
248
  "aria-label": r,
234
249
  children: [
235
- /* @__PURE__ */ o(L, {
250
+ /* @__PURE__ */ o(R, {
236
251
  label: a,
237
252
  value: e?.from ?? "",
238
- disabled: u,
239
- readOnly: d,
240
- minDate: f.minDate,
241
- maxDate: f.maxDate,
253
+ disabled: d,
254
+ readOnly: f,
255
+ minDate: p.minDate,
256
+ maxDate: p.maxDate,
242
257
  onChange: (e) => {
243
258
  typeof e == "string" && E("from", e);
244
259
  }
245
260
  }),
246
- /* @__PURE__ */ o(L, {
261
+ /* @__PURE__ */ o(R, {
247
262
  label: c,
248
263
  value: e?.to ?? "",
249
- disabled: u,
250
- readOnly: d,
251
- minDate: f.minDate,
252
- maxDate: f.maxDate,
264
+ disabled: d,
265
+ readOnly: f,
266
+ minDate: p.minDate,
267
+ maxDate: p.maxDate,
253
268
  onChange: (e) => {
254
269
  typeof e == "string" && E("to", e);
255
270
  }
256
271
  }),
257
- /* @__PURE__ */ o(_, {
258
- ref: g,
259
- disabled: u || d,
272
+ /* @__PURE__ */ o(C, {
273
+ ref: _,
274
+ disabled: d || f,
260
275
  "aria-label": l,
261
276
  "aria-haspopup": "dialog",
262
- "aria-expanded": p,
277
+ "aria-expanded": m,
263
278
  "aria-controls": T,
264
279
  onClick: () => {
265
- y(void 0), e && (x(e.from), w(N(e.from, f.calendarSystem))), m(!p);
280
+ y(void 0), e && (x(e.from), w(P(e.from, p.calendarSystem))), h(!m);
266
281
  },
267
- children: /* @__PURE__ */ o(s, { svg: I })
282
+ children: /* @__PURE__ */ o(u, { svg: L })
268
283
  }),
269
284
  /* @__PURE__ */ o(W, {
270
- open: p,
271
- anchor: h,
285
+ open: m,
286
+ anchor: g,
272
287
  onClose: () => {
273
- m(!1), y(void 0);
288
+ h(!1), y(void 0);
274
289
  },
275
290
  label: r,
276
291
  children: /* @__PURE__ */ o("div", {
277
292
  id: T,
278
- children: /* @__PURE__ */ o(R, {
279
- ...f,
280
- month: C,
293
+ children: /* @__PURE__ */ o(z, {
294
+ ...p,
295
+ month: S,
281
296
  focusedDate: b,
282
- selection: v ? F(v, b) : e,
297
+ selection: v ? I(v, b) : e,
283
298
  onMonthChange: w,
284
299
  onFocusedDateChange: x,
285
300
  onSelect: (e) => {
286
- v ? (t(F(v, e)), y(void 0), m(!1), h?.focus()) : y(e);
301
+ v ? (t(I(v, e)), y(void 0), h(!1), g?.focus()) : y(e);
287
302
  }
288
303
  })
289
304
  })
@@ -362,28 +377,28 @@ function X(e, t) {
362
377
  //#endregion
363
378
  //#region src/pdf-viewer/icons.ts
364
379
  var Z = {
365
- previous: b,
366
- next: x,
380
+ previous: w,
381
+ next: T,
367
382
  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
383
  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: "<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=\"M488 192l-144 0c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l46.7-46.7c-75.3-58.6-184.3-53.3-253.5 15.9-75 75-75 196.5 0 271.5s196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c94.3-94.3 243.7-99.6 344.3-16.2L471 7c6.9-6.9 17.2-8.9 26.2-5.2S512 14.3 512 24l0 144c0 13.3-10.7 24-24 24z\"/></svg>",
384
+ search: B,
385
+ minus: ne,
386
+ plus: te,
387
+ rotate: A,
373
388
  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
389
  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: ee,
377
- down: C,
390
+ close: E,
391
+ up: j,
392
+ down: m,
378
393
  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
394
  };
380
395
  //#endregion
381
396
  //#region src/pdf-viewer/toolbar.tsx
382
397
  function Q(e) {
383
- let { controller: r, state: c } = e, p = J(e.text), v = Y(e.config), y = c.status === "ready", b = (e) => v.buttons?.[e] !== !1, x = (e) => {
384
- let t = v.buttons?.[e];
398
+ 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) => {
399
+ let t = l.buttons?.[e];
385
400
  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(c.page || "")), k = Number.isFinite(v.zoomStep) && v.zoomStep > 1 ? v.zoomStep : 1.25, A = [...new Set((v.zoomLevels ?? [
401
+ }, v = (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
402
  "page-width",
388
403
  "page-fit",
389
404
  .5,
@@ -395,22 +410,22 @@ function Q(e) {
395
410
  3,
396
411
  5
397
412
  ]).filter((e) => e === "page-width" || e === "page-fit" || typeof e == "number" && Number.isFinite(e) && e >= .25 && e <= 5))];
398
- A.includes(c.zoom) || A.push(c.zoom), i(() => {
399
- O(String(c.page || ""));
400
- }, [c.page, r]), i(() => {
413
+ A.includes(s.zoom) || A.push(s.zoom), i(() => {
414
+ O(String(s.page || ""));
415
+ }, [s.page, r]), i(() => {
401
416
  w(!1);
402
417
  }, [
403
418
  e.config,
404
- y,
419
+ p,
405
420
  r
406
421
  ]), i(() => {
407
- if (!C) return;
422
+ if (!x) return;
408
423
  E.current?.querySelector("[role=\"menuitem\"]:not(:disabled)")?.focus();
409
424
  let e = T.current, t = new ResizeObserver(() => {
410
425
  e && !e.getClientRects().length && w(!1);
411
426
  });
412
427
  return e && t.observe(e), () => t.disconnect();
413
- }, [C]);
428
+ }, [x]);
414
429
  let j = () => {
415
430
  w(!1), T.current?.focus({ preventScroll: !0 });
416
431
  }, M = () => {
@@ -424,196 +439,200 @@ function Q(e) {
424
439
  "rotate",
425
440
  "download",
426
441
  "print"
427
- ].some(S) ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(d, {
428
- label: p.toolbar,
429
- className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${v.className ?? ""}`,
442
+ ].some(v) ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(g, {
443
+ label: c.toolbar,
444
+ className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${l.className ?? ""}`,
430
445
  children: [
431
- S("open") && /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(_, {
446
+ v("open") && /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(C, {
432
447
  variant: "ghost",
433
448
  size: "compact",
434
- ...x("open"),
435
- title: x("open").title ?? p.open,
436
- "aria-label": p.open,
449
+ ...h("open"),
450
+ title: h("open").title ?? c.open,
451
+ "aria-label": c.open,
437
452
  onClick: () => e.onOpen(),
438
- children: [/* @__PURE__ */ o(s, { svg: Z.open }), /* @__PURE__ */ o("span", {
453
+ children: [/* @__PURE__ */ o(u, { svg: Z.open }), /* @__PURE__ */ o("span", {
439
454
  class: "rv-pdf-viewer__open-label",
440
- children: p.open
455
+ children: c.open
441
456
  })]
442
457
  }) }),
443
- S("navigation") && (v.boundaryButtons || b("previous") || b("next") || v.showPageInput !== !1 || v.showPageCount !== !1) && /* @__PURE__ */ o(f, {
444
- label: p.page,
445
- children: /* @__PURE__ */ o(m, {
446
- page: c.page - 1,
447
- pageCount: c.pageCount,
458
+ v("navigation") && (l.boundaryButtons || m("previous") || m("next") || l.showPageInput !== !1 || l.showPageCount !== !1) && /* @__PURE__ */ o(_, {
459
+ label: c.page,
460
+ children: /* @__PURE__ */ o(y, {
461
+ page: s.page - 1,
462
+ pageCount: s.pageCount,
448
463
  onChange: (e) => r.goToPage(e + 1),
449
- label: p.page,
450
- previousLabel: p.previous,
451
- nextLabel: p.next,
452
- firstLabel: p.first,
453
- lastLabel: p.last,
464
+ label: c.page,
465
+ previousLabel: c.previous,
466
+ nextLabel: c.next,
467
+ firstLabel: c.first,
468
+ lastLabel: c.last,
454
469
  variant: "icons",
455
- disabled: !y,
456
- boundaryButtons: v.boundaryButtons,
470
+ disabled: !p,
471
+ boundaryButtons: l.boundaryButtons,
457
472
  buttons: {
458
- first: v.buttons?.first,
459
- previous: v.buttons?.previous,
460
- next: v.buttons?.next,
461
- last: v.buttons?.last
473
+ first: l.buttons?.first,
474
+ previous: l.buttons?.previous,
475
+ next: l.buttons?.next,
476
+ last: l.buttons?.last
462
477
  },
463
- children: [v.showPageInput !== !1 && /* @__PURE__ */ o(l, {
478
+ children: [l.showPageInput !== !1 && /* @__PURE__ */ o(f, {
464
479
  class: "rv-pdf-viewer__page-input",
465
480
  type: "number",
466
481
  min: 1,
467
- max: c.pageCount || 1,
468
- disabled: !y,
469
- "aria-label": p.page,
482
+ max: s.pageCount || 1,
483
+ disabled: !p,
484
+ "aria-label": c.page,
470
485
  value: D,
471
486
  onInput: (e) => O(e.currentTarget.value),
472
487
  onChange: M,
473
488
  onKeyDown: (e) => {
474
- e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(c.page)));
489
+ e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(s.page)));
475
490
  }
476
- }), v.showPageCount !== !1 && /* @__PURE__ */ o("span", {
491
+ }), l.showPageCount !== !1 && /* @__PURE__ */ o("span", {
477
492
  class: "rv-pdf-viewer__page-count",
478
- children: q(p.pageCount, {
479
- of: p.of,
480
- pages: c.pageCount
493
+ children: q(c.pageCount, {
494
+ of: c.of,
495
+ pages: s.pageCount
481
496
  })
482
497
  })]
483
498
  })
484
499
  }),
485
- S("zoom") && (b("zoomOut") || b("zoomIn") || v.showZoomSelect !== !1) && /* @__PURE__ */ o(f, {
486
- label: p.zoom,
500
+ v("zoom") && (m("zoomOut") || m("zoomIn") || l.showZoomSelect !== !1) && /* @__PURE__ */ o(_, {
501
+ label: c.zoom,
487
502
  children: [
488
- b("zoomOut") && /* @__PURE__ */ o(g, {
489
- ...x("zoomOut"),
490
- label: p.zoomOut,
503
+ m("zoomOut") && /* @__PURE__ */ o(S, {
504
+ ...h("zoomOut"),
505
+ label: c.zoomOut,
491
506
  icon: Z.minus,
492
507
  size: "compact",
493
- disabled: !y || c.scale <= .25 || !!x("zoomOut").disabled,
494
- onClick: () => r.setZoom(c.scale / k)
508
+ disabled: !p || s.scale <= .25 || !!h("zoomOut").disabled,
509
+ onClick: () => r.setZoom(s.scale / k)
495
510
  }),
496
- v.showZoomSelect !== !1 && /* @__PURE__ */ o("div", {
511
+ l.showZoomSelect !== !1 && /* @__PURE__ */ o("div", {
497
512
  class: "rv-pdf-viewer__zoom-select",
498
- children: [/* @__PURE__ */ o(u, {
499
- "aria-label": p.zoom,
500
- disabled: !y,
501
- value: String(c.zoom),
513
+ children: /* @__PURE__ */ o(d, {
514
+ className: "rv-select",
515
+ config: {
516
+ ariaLabel: c.zoom,
517
+ portalTarget: e.appendTo
518
+ },
519
+ disabled: !p,
520
+ value: String(s.zoom),
521
+ source: A.map((e) => ({
522
+ value: String(e),
523
+ label: e === "page-width" ? c.fitWidth : e === "page-fit" ? c.fitPage : q(c.zoomPercentage, { percent: Math.round(e * 100) })
524
+ })),
502
525
  onChange: (e) => {
503
- let t = e.currentTarget.value;
526
+ let t = String(e);
504
527
  r.setZoom(t === "page-fit" || t === "page-width" ? t : Number(t));
505
- },
506
- children: A.map((e) => /* @__PURE__ */ o("option", {
507
- value: e,
508
- children: e === "page-width" ? p.fitWidth : e === "page-fit" ? p.fitPage : q(p.zoomPercentage, { percent: Math.round(e * 100) })
509
- }, String(e)))
510
- }), /* @__PURE__ */ o(s, { svg: Z.down })]
528
+ }
529
+ })
511
530
  }),
512
- b("zoomIn") && /* @__PURE__ */ o(g, {
513
- ...x("zoomIn"),
514
- label: p.zoomIn,
531
+ m("zoomIn") && /* @__PURE__ */ o(S, {
532
+ ...h("zoomIn"),
533
+ label: c.zoomIn,
515
534
  icon: Z.plus,
516
535
  size: "compact",
517
- disabled: !y || c.scale >= 5 || !!x("zoomIn").disabled,
518
- onClick: () => r.setZoom(c.scale * k)
536
+ disabled: !p || s.scale >= 5 || !!h("zoomIn").disabled,
537
+ onClick: () => r.setZoom(s.scale * k)
519
538
  })
520
539
  ]
521
540
  }),
522
- S("search") && /* @__PURE__ */ o(f, { children: b("search") && /* @__PURE__ */ o(g, {
523
- ...x("search"),
524
- label: p.search,
541
+ v("search") && /* @__PURE__ */ o(_, { children: m("search") && /* @__PURE__ */ o(S, {
542
+ ...h("search"),
543
+ label: c.search,
525
544
  icon: Z.search,
526
545
  size: "compact",
527
- disabled: !y || !!x("search").disabled,
546
+ disabled: !p || !!h("search").disabled,
528
547
  "aria-expanded": e.searchOpen,
529
548
  "aria-controls": e.searchId,
530
549
  "aria-keyshortcuts": "Control+f Meta+f",
531
550
  onClick: (t) => e.onToggleSearch(t.currentTarget)
532
551
  }) }),
533
- (S("rotate") || S("download") || S("print")) && /* @__PURE__ */ o(f, {
552
+ (v("rotate") || v("download") || v("print")) && /* @__PURE__ */ o(_, {
534
553
  className: "rv-pdf-viewer__actions rv-pdf-viewer__desktop-actions",
535
554
  children: [
536
- S("rotate") && /* @__PURE__ */ o(g, {
537
- ...x("rotate"),
538
- label: p.rotate,
555
+ v("rotate") && /* @__PURE__ */ o(S, {
556
+ ...h("rotate"),
557
+ label: c.rotate,
539
558
  icon: Z.rotate,
540
559
  size: "compact",
541
- disabled: !y || !!x("rotate").disabled,
560
+ disabled: !p || !!h("rotate").disabled,
542
561
  onClick: () => r.rotate()
543
562
  }),
544
- S("download") && /* @__PURE__ */ o(g, {
545
- ...x("download"),
546
- label: p.download,
563
+ v("download") && /* @__PURE__ */ o(S, {
564
+ ...h("download"),
565
+ label: c.download,
547
566
  icon: Z.download,
548
567
  size: "compact",
549
- disabled: !y || !!x("download").disabled,
568
+ disabled: !p || !!h("download").disabled,
550
569
  onClick: () => void r.download()
551
570
  }),
552
- S("print") && /* @__PURE__ */ o(g, {
553
- ...x("print"),
554
- label: p.print,
571
+ v("print") && /* @__PURE__ */ o(S, {
572
+ ...h("print"),
573
+ label: c.print,
555
574
  icon: Z.print,
556
575
  size: "compact",
557
- disabled: !y || c.printing || !!x("print").disabled,
558
- busy: c.printing,
576
+ disabled: !p || s.printing || !!h("print").disabled,
577
+ busy: s.printing,
559
578
  onClick: () => void r.print()
560
579
  })
561
580
  ]
562
581
  }),
563
- (S("rotate") || S("download") || S("print")) && /* @__PURE__ */ o(f, {
582
+ (v("rotate") || v("download") || v("print")) && /* @__PURE__ */ o(_, {
564
583
  className: "rv-pdf-viewer__more",
565
- children: /* @__PURE__ */ o(_, {
584
+ children: /* @__PURE__ */ o(C, {
566
585
  ref: T,
567
586
  variant: "ghost",
568
587
  size: "compact",
569
588
  className: "rv-btn-icon",
570
- title: p.more,
571
- "aria-label": p.more,
589
+ title: c.more,
590
+ "aria-label": c.more,
572
591
  "aria-haspopup": "menu",
573
- "aria-expanded": C,
574
- disabled: !y,
575
- onClick: () => w(!C),
592
+ "aria-expanded": x,
593
+ disabled: !p,
594
+ onClick: () => w(!x),
576
595
  onKeyDown: (e) => {
577
596
  e.key === "ArrowDown" && (e.preventDefault(), w(!0));
578
597
  },
579
- children: /* @__PURE__ */ o(s, { svg: Z.more })
598
+ children: /* @__PURE__ */ o(u, { svg: Z.more })
580
599
  })
581
600
  })
582
601
  ]
583
602
  }), /* @__PURE__ */ o(W, {
584
- open: C,
603
+ open: x,
585
604
  anchor: T.current,
586
605
  appendTo: e.appendTo,
587
606
  onClose: () => w(!1),
588
607
  role: "menu",
589
- label: p.more,
608
+ label: c.more,
590
609
  children: /* @__PURE__ */ o("div", {
591
610
  ref: E,
592
611
  class: "rv-pdf-viewer__menu",
593
612
  children: [
594
- S("rotate") && /* @__PURE__ */ o(h, {
595
- className: x("rotate").className,
596
- disabled: !!x("rotate").disabled,
613
+ v("rotate") && /* @__PURE__ */ o(b, {
614
+ className: h("rotate").className,
615
+ disabled: !!h("rotate").disabled,
597
616
  onClick: () => {
598
617
  r.rotate(), j();
599
618
  },
600
- children: [/* @__PURE__ */ o(s, { svg: Z.rotate }), p.rotate]
619
+ children: [/* @__PURE__ */ o(u, { svg: Z.rotate }), c.rotate]
601
620
  }),
602
- S("download") && /* @__PURE__ */ o(h, {
603
- className: x("download").className,
604
- disabled: !!x("download").disabled,
621
+ v("download") && /* @__PURE__ */ o(b, {
622
+ className: h("download").className,
623
+ disabled: !!h("download").disabled,
605
624
  onClick: () => {
606
625
  r.download(), j();
607
626
  },
608
- children: [/* @__PURE__ */ o(s, { svg: Z.download }), p.download]
627
+ children: [/* @__PURE__ */ o(u, { svg: Z.download }), c.download]
609
628
  }),
610
- S("print") && /* @__PURE__ */ o(h, {
611
- className: x("print").className,
612
- disabled: c.printing || !!x("print").disabled,
629
+ v("print") && /* @__PURE__ */ o(b, {
630
+ className: h("print").className,
631
+ disabled: s.printing || !!h("print").disabled,
613
632
  onClick: () => {
614
633
  r.print(), j();
615
634
  },
616
- children: [/* @__PURE__ */ o(s, { svg: Z.print }), p.print]
635
+ children: [/* @__PURE__ */ o(u, { svg: Z.print }), c.print]
617
636
  })
618
637
  ]
619
638
  })
@@ -621,10 +640,10 @@ function Q(e) {
621
640
  }
622
641
  //#endregion
623
642
  //#region src/pdf-viewer/search-bar.tsx
624
- function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }) {
625
- let l = n.status === "ready";
643
+ function ue({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: s }) {
644
+ let c = n.status === "ready";
626
645
  return i(() => {
627
- c.current?.focus();
646
+ s.current?.focus();
628
647
  }, []), /* @__PURE__ */ o("div", {
629
648
  id: e,
630
649
  class: "rv-pdf-viewer__search",
@@ -633,13 +652,13 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
633
652
  onKeyDown: (e) => {
634
653
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), a());
635
654
  },
636
- children: [/* @__PURE__ */ o(j, {
637
- icon: /* @__PURE__ */ o(s, { svg: Z.search }),
638
- inputRef: c,
655
+ children: [/* @__PURE__ */ o(re, {
656
+ icon: /* @__PURE__ */ o(u, { svg: Z.search }),
657
+ inputRef: s,
639
658
  "aria-label": r.search,
640
659
  placeholder: r.search,
641
660
  value: n.query,
642
- disabled: !l,
661
+ disabled: !c,
643
662
  onValueChange: (e) => t.search(e),
644
663
  onKeyDown: (e) => {
645
664
  e.key === "Enter" && (e.preventDefault(), t.search(n.query, e.shiftKey, !0));
@@ -656,21 +675,21 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
656
675
  matches: r.matches
657
676
  }) : r.noMatches : ""
658
677
  }),
659
- /* @__PURE__ */ o(g, {
678
+ /* @__PURE__ */ o(S, {
660
679
  label: r.previousMatch,
661
680
  icon: Z.up,
662
681
  size: "compact",
663
- disabled: !l || !n.matchCount,
682
+ disabled: !c || !n.matchCount,
664
683
  onClick: () => t.search(n.query, !0, !0)
665
684
  }),
666
- /* @__PURE__ */ o(g, {
685
+ /* @__PURE__ */ o(S, {
667
686
  label: r.nextMatch,
668
687
  icon: Z.down,
669
688
  size: "compact",
670
- disabled: !l || !n.matchCount,
689
+ disabled: !c || !n.matchCount,
671
690
  onClick: () => t.search(n.query, !1, !0)
672
691
  }),
673
- /* @__PURE__ */ o(g, {
692
+ /* @__PURE__ */ o(S, {
674
693
  label: r.closeSearch,
675
694
  icon: Z.close,
676
695
  size: "compact",
@@ -682,15 +701,15 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
682
701
  }
683
702
  //#endregion
684
703
  //#region src/pdf-viewer/header.tsx
685
- function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
704
+ function de({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
686
705
  let a = e.status === "ready";
687
706
  return /* @__PURE__ */ o("header", {
688
707
  class: "rv-pdf-viewer__header",
689
708
  children: [
690
- i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(s, {
709
+ i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(u, {
691
710
  svg: Z.document,
692
711
  className: "rv-svg-icon rv-pdf-viewer__document-icon"
693
- }), /* @__PURE__ */ o("span", {
712
+ }), /* @__PURE__ */ o(D, {
694
713
  class: "rv-pdf-viewer__filename",
695
714
  title: e.fileName,
696
715
  children: e.fileName
@@ -704,7 +723,7 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
704
723
  pages: e.pageCount
705
724
  }) : ""
706
725
  }),
707
- e.printing && /* @__PURE__ */ o(_, {
726
+ e.printing && /* @__PURE__ */ o(C, {
708
727
  variant: "ghost",
709
728
  size: "compact",
710
729
  onClick: () => r(),
@@ -715,24 +734,24 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
715
734
  }
716
735
  //#endregion
717
736
  //#region src/pdf-viewer/status.tsx
718
- function ce({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
719
- return e.status === "loading" ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(p, { label: n.loading }), /* @__PURE__ */ o("span", { children: n.loading })] }) : e.status === "error" ? /* @__PURE__ */ o(y, {
737
+ function fe({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
738
+ 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(v, {
720
739
  tone: "danger",
721
740
  title: n.error,
722
741
  description: n.errorDescription,
723
- actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(_, {
742
+ actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(C, {
724
743
  size: "compact",
725
744
  onClick: () => void r.retry(),
726
745
  children: n.retry
727
- }), i && /* @__PURE__ */ o(_, {
746
+ }), i && /* @__PURE__ */ o(C, {
728
747
  size: "compact",
729
748
  onClick: () => a(),
730
749
  children: n.open
731
750
  })] })
732
- }) : /* @__PURE__ */ o(v, {
751
+ }) : /* @__PURE__ */ o(x, {
733
752
  title: n.empty,
734
753
  description: n.emptyHint,
735
- children: i && /* @__PURE__ */ o(_, {
754
+ children: i && /* @__PURE__ */ o(C, {
736
755
  variant: "primary",
737
756
  onClick: () => a(),
738
757
  children: n.open
@@ -741,8 +760,8 @@ function ce({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
741
760
  }
742
761
  //#endregion
743
762
  //#region src/pdf-viewer/component.tsx
744
- function le(e) {
745
- let t = r(() => new te(e), [
763
+ function pe(e) {
764
+ let t = r(() => new V(e), [
746
765
  e.workerSrc,
747
766
  e.documentOptions,
748
767
  e.initialPage,
@@ -755,13 +774,13 @@ function le(e) {
755
774
  });
756
775
  }
757
776
  function $(e) {
758
- let { controller: t } = e, [r, s] = n(t.snapshot), [c, u] = n(!1), [d] = n(() => S("rv-pdf-search")), f = a(null), p = a(null), m = a(null), h = a(null), g = a(null), _ = J(e.text), v = r.status === "ready", b = Y(e.toolbar).buttons, x = (e) => {
759
- let t = b?.[e];
777
+ 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), _ = a(null), y = J(e.text), b = r.status === "ready", x = Y(e.toolbar).buttons, S = (e) => {
778
+ let t = x?.[e];
760
779
  return t !== !1 && !t?.disabled;
761
- }, C = X(e.toolbar, "search") && x("search"), w = X(e.toolbar, "open") && x("open");
762
- t.setCallbacks(e), t.setPrintTitle(_.printDocument), i(() => {
763
- let n = t.subscribe(s);
764
- return t.attach(m.current).catch(() => {}), e.onReady?.(t), () => {
780
+ }, C = X(e.toolbar, "search") && S("search"), w = X(e.toolbar, "open") && S("open");
781
+ t.setCallbacks(e), t.setPrintTitle(y.printDocument), i(() => {
782
+ let n = t.subscribe(c);
783
+ return t.attach(h.current).catch(() => {}), e.onReady?.(t), () => {
765
784
  n(), t.destroy();
766
785
  };
767
786
  }, [t]), i(() => {
@@ -773,87 +792,87 @@ function $(e) {
773
792
  ]);
774
793
  let T = () => {
775
794
  t.clearSearch(), u(!1);
776
- let e = f.current;
777
- e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) : m.current?.focus({ preventScroll: !0 });
795
+ let e = p.current;
796
+ e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) : h.current?.focus({ preventScroll: !0 });
778
797
  }, E = (e) => {
779
- c || (f.current = e), u(!0), g.current?.focus();
798
+ l || (p.current = e), u(!0), _.current?.focus();
780
799
  };
781
800
  i(() => {
782
- C || (t.clearSearch(), u(!1), c && m.current?.focus({ preventScroll: !0 }));
801
+ C || (t.clearSearch(), u(!1), l && h.current?.focus({ preventScroll: !0 }));
783
802
  }, [C, t]);
784
803
  let D = {
785
804
  controller: t,
786
805
  state: r,
787
- text: _,
806
+ text: y,
788
807
  config: e.toolbar,
789
- searchOpen: c,
808
+ searchOpen: l,
790
809
  searchId: d,
791
- appendTo: p.current ?? void 0,
792
- onOpen: () => h.current?.click(),
793
- onToggleSearch: (e) => c ? T() : E(e)
810
+ appendTo: m.current ?? void 0,
811
+ onOpen: () => g.current?.click(),
812
+ onToggleSearch: (e) => l ? T() : E(e)
794
813
  };
795
814
  return /* @__PURE__ */ o("section", {
796
- ref: p,
815
+ ref: m,
797
816
  class: `rv-pdf-viewer ${e.className ?? ""}`,
798
817
  style: { height: e.height ?? 640 },
799
- "aria-label": _.viewer,
818
+ "aria-label": y.viewer,
800
819
  onKeyDown: (e) => {
801
- (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" && v && C && (e.preventDefault(), E(e.target));
820
+ (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" && b && C && (e.preventDefault(), E(e.target));
802
821
  },
803
822
  children: [
804
- (e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(se, {
823
+ (e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(de, {
805
824
  showDetails: e.showHeader !== !1,
806
825
  state: r,
807
- text: _,
826
+ text: y,
808
827
  onCancelPrint: () => t.cancelPrint()
809
828
  }),
810
829
  e.toolbar !== !1 && (e.renderToolbar ? e.renderToolbar(t, r, D) : /* @__PURE__ */ o(Q, { ...D })),
811
- /* @__PURE__ */ o(l, {
812
- ref: h,
830
+ /* @__PURE__ */ o(f, {
831
+ ref: g,
813
832
  type: "file",
814
833
  accept: "application/pdf,.pdf",
815
834
  hidden: !0,
816
- "aria-label": _.open,
835
+ "aria-label": y.open,
817
836
  onChange: (e) => {
818
837
  let n = e.currentTarget.files?.[0];
819
838
  e.currentTarget.value = "", n && t.load(n);
820
839
  }
821
840
  }),
822
- c && C && /* @__PURE__ */ o(oe, {
823
- inputRef: g,
841
+ l && C && /* @__PURE__ */ o(ue, {
842
+ inputRef: _,
824
843
  id: d,
825
844
  controller: t,
826
845
  state: r,
827
- text: _,
846
+ text: y,
828
847
  onClose: T
829
848
  }),
830
849
  /* @__PURE__ */ o("div", {
831
850
  class: "rv-pdf-viewer__body",
832
851
  "aria-busy": r.status === "loading",
833
852
  children: [/* @__PURE__ */ o("div", {
834
- ref: m,
853
+ ref: h,
835
854
  class: "rv-pdf-viewer__viewport",
836
855
  tabIndex: 0,
837
856
  role: "region",
838
- "aria-label": _.pages
839
- }), !v && /* @__PURE__ */ o("div", {
857
+ "aria-label": y.pages
858
+ }), !b && /* @__PURE__ */ o("div", {
840
859
  class: "rv-pdf-viewer__status",
841
- children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(ce, {
860
+ children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(fe, {
842
861
  state: r,
843
- text: _,
862
+ text: y,
844
863
  controller: t,
845
864
  canOpen: w,
846
865
  onOpen: D.onOpen
847
866
  })
848
867
  })]
849
868
  }),
850
- v && r.error && /* @__PURE__ */ o(y, {
869
+ b && r.error && /* @__PURE__ */ o(v, {
851
870
  className: "rv-pdf-viewer__error",
852
871
  tone: "danger",
853
- description: _.operationError
872
+ description: y.operationError
854
873
  })
855
874
  ]
856
875
  });
857
876
  }
858
877
  //#endregion
859
- export { H as a, ie as c, V as d, W as f, K as i, ae as l, ne as m, $ as n, B as o, U as p, Q as r, re as s, le as t, G as u };
878
+ 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 };