@orangelogic/design-system 2.143.0 → 2.145.0

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 (184) hide show
  1. package/library/assets/validation.worker-D3_lxKZ_.js +1 -0
  2. package/library/chunks/{AxisLabelRadial.D-dnNhId.js → AxisLabelRadial.BVjTmOAK.js} +1 -1
  3. package/library/chunks/{BaseColumnSeries.DuJGGHnE.js → BaseColumnSeries.CBs_QAAc.js} +1 -1
  4. package/library/chunks/{CandlestickSeries.Dvk4WnlG.js → CandlestickSeries.Cx0wpT9T.js} +2 -2
  5. package/library/chunks/{Circle.CSPkPGZR.js → Circle.CPg-MUlK.js} +1 -1
  6. package/library/chunks/{ColumnSeries.BgqnNaWx.js → ColumnSeries.CGSxIqPG.js} +2 -2
  7. package/library/chunks/{EditableAxisLabel.htXPpq9V.js → EditableAxisLabel.BE0SAubP.js} +2 -2
  8. package/library/chunks/{EditableLabel.BVdITrjV.js → EditableLabel.L5NEdtkw.js} +1 -1
  9. package/library/chunks/{Gradient.Bw8LaBZS.js → Gradient.oQ6wJQll.js} +1 -1
  10. package/library/chunks/{LinearGradient.DryVGwkQ.js → LinearGradient.CEimwU0Q.js} +2 -2
  11. package/library/chunks/{Picture.GEGxHvQB.js → Picture.BfLKhIYn.js} +1 -1
  12. package/library/chunks/{Polygon.B7Vu5sIv.js → Polygon.iNK22k_h.js} +1 -1
  13. package/library/chunks/{ProgressPie.C2sMNGxC.js → ProgressPie.Bcqzaeqx.js} +5 -5
  14. package/library/chunks/{RadialLabel.DCE1UsLn.js → RadialLabel.a3toiXax.js} +1 -1
  15. package/library/chunks/{Scrollbar.DoQ3emzl.js → Scrollbar.CAoY7xcW.js} +1 -1
  16. package/library/chunks/{Slice.BtEmJlKG.js → Slice.DLvisUPP.js} +1 -1
  17. package/library/chunks/{Slider.BkWEJjkG.js → Slider.syeHIyBN.js} +1 -1
  18. package/library/chunks/{SpriteResizer.CkJ6wMt2.js → SpriteResizer.BDWAslnu.js} +1 -1
  19. package/library/chunks/{Triangle.DRbqqwUv.js → Triangle.adLo6odq.js} +1 -1
  20. package/library/chunks/{ZoomTools.B2lVZ7om.js → ZoomTools.4NFU6RVT.js} +1 -1
  21. package/library/chunks/{_baseIteratee.Dhw-0WrS.js → _baseIteratee.CzjK3VFY.js} +2 -2
  22. package/library/chunks/{_baseUniq.DP9Qak6V.js → _baseUniq.CoXu-orP.js} +1 -1
  23. package/library/chunks/{_baseXor.DY_sP7af.js → _baseXor.DRclcoaa.js} +4 -4
  24. package/library/chunks/{am-chart.DaqbO8CU.js → am-chart.Bf-o9SaR.js} +252 -252
  25. package/library/chunks/{animation.DYTPen16.js → animation.BSFdTpqz.js} +1 -1
  26. package/library/chunks/{asset-link-format.BVoE-GrD.js → asset-link-format.D6XVEha7.js} +10 -10
  27. package/library/chunks/{button.Bja8HrmJ.js → button.Bx7AnUu4.js} +4 -4
  28. package/library/chunks/button.styles.svc2lIwC.js +5 -0
  29. package/library/chunks/{capitalize.WZm6pIpy.js → capitalize.DKzUtjlF.js} +1 -1
  30. package/library/chunks/{checkbox.kdSMUgR1.js → checkbox.aQnF4Zc3.js} +2 -2
  31. package/library/chunks/{color-swatch-group.CwHdAKQv.js → color-swatch-group.DORzYTrn.js} +831 -747
  32. package/library/chunks/{color-swatch.DCePblYs.js → color-swatch.Pczcitrc.js} +3 -3
  33. package/library/chunks/{colorPicker.B1c_VK97.js → colorPicker.fDJa_Rz5.js} +5 -5
  34. package/library/chunks/{confirm-popover.CQm_rVIt.js → confirm-popover.DLb5agj9.js} +3 -3
  35. package/library/chunks/{content-builder.D-_Ou8sw.js → content-builder.DZRw6hpX.js} +1 -1
  36. package/library/chunks/{dialog.0TzzxNXE.js → dialog.B1uHEUsi.js} +3 -3
  37. package/library/chunks/{document-viewer.Bb1M9uJ-.js → document-viewer.CMHuC2Di.js} +339 -271
  38. package/library/chunks/{dot-pagination.BwSugdZk.js → dot-pagination.171qk-p2.js} +2 -2
  39. package/library/chunks/{exporting.C47Rlm_F.js → exporting.Co0vJIff.js} +2 -2
  40. package/library/chunks/{flow.DhXYaDTn.js → flow.0ah2v6L5.js} +5 -5
  41. package/library/chunks/{folder-select.5f4e8jqB.js → folder-select.COFTAu2f.js} +6 -6
  42. package/library/chunks/{gantt.B-KoNU00.js → gantt.CPSE8Grs.js} +8 -8
  43. package/library/chunks/{header.BZKaF_-o.js → header.DP4ZGEwN.js} +3 -3
  44. package/library/chunks/{hierarchy.DZcTzpNv.js → hierarchy.Dlq2MwWz.js} +5 -5
  45. package/library/chunks/{hub-connection.C9j9Ce_a.js → hub-connection.CIUZJBdQ.js} +1 -1
  46. package/library/chunks/{i18n.C4wPyPTR.js → i18n.DYXys45m.js} +7 -3
  47. package/library/chunks/{icon-button.Ce2tPGuf.js → icon-button.B0L-_zT9.js} +2 -2
  48. package/library/chunks/{icon.-k4fR0bD.js → icon.CsF1BoUl.js} +1 -1
  49. package/library/chunks/{iframe.CnG8EcG1.js → iframe._3_Z5IJc.js} +7 -7
  50. package/library/chunks/{image.C2acLx6g.js → image.DVbY2O89.js} +3 -3
  51. package/library/chunks/{index.B7KpCL4Q.js → index.q6xCNzcK.js} +17 -17
  52. package/library/chunks/{input.BAvin1Qu.js → input.CSI9KLz7.js} +3 -3
  53. package/library/chunks/{json.CYp1GBUl.js → json.lgvYjT5K.js} +3 -3
  54. package/library/chunks/{map.DCp6R-yn.js → map.Cz4qZnZB.js} +2 -2
  55. package/library/chunks/{option.DT-6HmoC.js → option.BweUpygr.js} +4 -4
  56. package/library/chunks/{pagination.KvDdhXZL.js → pagination.CyY982g0.js} +6 -6
  57. package/library/chunks/{percent.C253sJzT.js → percent.TSAQO6y8.js} +3 -3
  58. package/library/chunks/{radar.Bh033jVx.js → radar.mnUjkEJF.js} +4 -4
  59. package/library/chunks/{sliceGrouper.BOB7t0KC.js → sliceGrouper.B9Hml2R8.js} +1 -1
  60. package/library/chunks/{stock.rKM7Pn6U.js → stock.CSGPjDQK.js} +9 -9
  61. package/library/chunks/{tab-group.DyInpwMz.js → tab-group.BJImZf-n.js} +4 -4
  62. package/library/chunks/{timeline.8Dbc5Mzg.js → timeline.CzbNFkA3.js} +5 -5
  63. package/library/chunks/{toString.BDhOhZPZ.js → toString.bJgZMf_C.js} +1 -1
  64. package/library/chunks/{toast.BYVF5TVe.js → toast.NfNkPs5d.js} +1 -1
  65. package/library/chunks/{tree.BpSudcAI.js → tree.CvxvKWUm.js} +176 -159
  66. package/library/chunks/{venn.9MIxwncF.js → venn.Cq0RJAER.js} +1 -1
  67. package/library/chunks/{watch.CkGTlwIo.js → watch.K-dbDP6P.js} +102 -101
  68. package/library/chunks/{wc.s24RZyr1.js → wc.Cae1yJ4l.js} +1 -1
  69. package/library/chunks/{xy.QPSrxL0Q.js → xy.CseMLD2I.js} +10 -10
  70. package/library/components/alert.js +3 -3
  71. package/library/components/am-chart.js +2 -2
  72. package/library/components/animated-image.js +2 -2
  73. package/library/components/animation.js +2 -2
  74. package/library/components/array-line-clamp.js +1 -1
  75. package/library/components/asset-link-format.js +4 -4
  76. package/library/components/atoms.js +20 -20
  77. package/library/components/audio.js +3 -3
  78. package/library/components/avatar.js +2 -2
  79. package/library/components/border-input-group.js +2 -2
  80. package/library/components/breadcrumb-item.js +1 -1
  81. package/library/components/breadcrumb.js +2 -2
  82. package/library/components/button.js +5 -5
  83. package/library/components/checkbox.js +3 -3
  84. package/library/components/color-picker.js +5 -5
  85. package/library/components/color-swatch-group.js +6 -6
  86. package/library/components/color-swatch.js +3 -3
  87. package/library/components/confirm-popover.js +4 -4
  88. package/library/components/copy-button.js +3 -3
  89. package/library/components/corner-position-input-group.js +3 -3
  90. package/library/components/date-calendar.js +1 -1
  91. package/library/components/details.js +4 -4
  92. package/library/components/dialog.js +4 -4
  93. package/library/components/diff.js +1 -1
  94. package/library/components/divider.js +1 -1
  95. package/library/components/document-viewer.js +4 -4
  96. package/library/components/dot-pagination.js +3 -3
  97. package/library/components/drawer.js +4 -4
  98. package/library/components/dropdown.js +3 -3
  99. package/library/components/dynamic-select.js +7 -7
  100. package/library/components/e-chart.js +2 -2
  101. package/library/components/element-clamp.js +3 -3
  102. package/library/components/file-on-demand.js +13 -13
  103. package/library/components/folder-select.js +6 -6
  104. package/library/components/format-bytes.js +1 -1
  105. package/library/components/format-date.js +1 -1
  106. package/library/components/format-number.js +1 -1
  107. package/library/components/format-time.js +2 -2
  108. package/library/components/grid-item.js +1 -1
  109. package/library/components/header.js +3 -3
  110. package/library/components/hub-connection.js +2 -2
  111. package/library/components/icon-button.js +3 -3
  112. package/library/components/icon.js +2 -2
  113. package/library/components/iframe.js +3 -3
  114. package/library/components/image-comparer.js +3 -3
  115. package/library/components/image.js +4 -4
  116. package/library/components/include.js +1 -1
  117. package/library/components/input.js +4 -4
  118. package/library/components/line-clamp.js +1 -1
  119. package/library/components/markdown.js +1 -1
  120. package/library/components/masonry.js +3 -3
  121. package/library/components/menu-item.js +3 -3
  122. package/library/components/menu.js +1 -1
  123. package/library/components/molecules.js +3 -3
  124. package/library/components/mutation-observer.js +1 -1
  125. package/library/components/option.js +4 -4
  126. package/library/components/organisms.js +2 -2
  127. package/library/components/padding-input-group.js +1 -1
  128. package/library/components/pagination.js +7 -7
  129. package/library/components/popup.js +1 -1
  130. package/library/components/position-picker.js +1 -1
  131. package/library/components/progress-bar.js +1 -1
  132. package/library/components/progress-ring.js +1 -1
  133. package/library/components/qr-code.js +1 -1
  134. package/library/components/radio-button.js +2 -2
  135. package/library/components/radio-card.js +1 -1
  136. package/library/components/radio-group.js +1 -1
  137. package/library/components/radio.js +2 -2
  138. package/library/components/range.js +2 -2
  139. package/library/components/rating.js +3 -3
  140. package/library/components/relative-time.js +1 -1
  141. package/library/components/resize-observer.js +1 -1
  142. package/library/components/select.js +4 -4
  143. package/library/components/shadow-input-group.js +1 -1
  144. package/library/components/share-option-list.js +3 -3
  145. package/library/components/sidebar.js +3 -3
  146. package/library/components/size-input-group.js +4 -4
  147. package/library/components/spinner.js +1 -1
  148. package/library/components/split-panel.js +2 -2
  149. package/library/components/step.js +1 -1
  150. package/library/components/stepper-wizard.js +1 -1
  151. package/library/components/stepper.js +1 -1
  152. package/library/components/switch.js +2 -2
  153. package/library/components/tab-group.js +5 -5
  154. package/library/components/tab-panel.js +1 -1
  155. package/library/components/tab.js +4 -4
  156. package/library/components/tag.js +2 -2
  157. package/library/components/textarea.js +1 -1
  158. package/library/components/timecode.js +1 -1
  159. package/library/components/tooltip.js +3 -3
  160. package/library/components/tree-item.js +5 -5
  161. package/library/components/tree.js +3 -3
  162. package/library/components/typeface.js +8 -8
  163. package/library/components/types.js +297 -285
  164. package/library/components/video.js +3 -3
  165. package/library/css/ol-base.css +3 -3
  166. package/library/package.json +1 -1
  167. package/library/packages/atoms/src/components/tree/tree.d.ts +13 -0
  168. package/library/packages/hybrid/book-reader/src/react/constant.d.ts +1 -0
  169. package/library/packages/hybrid/book-reader/src/react/hooks/useBookEvents.d.ts +1 -1
  170. package/library/packages/hybrid/book-reader/src/react/hooks/useRestoreFocusOnClose.d.ts +8 -0
  171. package/library/packages/hybrid/table-core/src/table/controllers/filter-controller.d.ts +10 -0
  172. package/library/packages/hybrid/table-core/src/table/controllers/select-all-controller.d.ts +12 -0
  173. package/library/packages/hybrid/table-core/src/table/table.d.ts +13 -0
  174. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +1 -1
  175. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/constant.d.ts +2 -2
  176. package/library/packages/organisms/src/content-builder/styleController.d.ts +3 -0
  177. package/library/packages/react-web-component.d.ts +14768 -2717
  178. package/library/packages/types/src/content-builder.d.ts +4 -0
  179. package/library/packages/types/src/table.d.ts +9 -0
  180. package/library/packages/utils/src/custom-element/i18n.d.ts +4 -0
  181. package/library/utils.js +4 -4
  182. package/package.json +1 -1
  183. package/library/assets/validation.worker-Dc_pkZlD.js +0 -1
  184. package/library/chunks/button.styles.CATjjP1T.js +0 -5
@@ -1,10 +1,10 @@
1
1
  import { r as resizableComponentStyles, R as ResizableElement, a as ResizeDirection, b as HeightMode } from "./resizable-component.styles.CAfXABBc.js";
2
- import { C as CxButton } from "./button.Bja8HrmJ.js";
2
+ import { C as CxButton } from "./button.Bx7AnUu4.js";
3
3
  import CxDrawer from "../components/drawer.js";
4
4
  import CxDropdown from "../components/dropdown.js";
5
- import { C as CxIcon } from "./icon.-k4fR0bD.js";
6
- import { C as CxIconButton } from "./icon-button.Ce2tPGuf.js";
7
- import { C as CxInput } from "./input.BAvin1Qu.js";
5
+ import { C as CxIcon } from "./icon.CsF1BoUl.js";
6
+ import { C as CxIconButton } from "./icon-button.B0L-_zT9.js";
7
+ import { C as CxInput } from "./input.CSI9KLz7.js";
8
8
  import CxMenu from "../components/menu.js";
9
9
  import CxMenuItem from "../components/menu-item.js";
10
10
  import CxPopup from "../components/popup.js";
@@ -19,21 +19,22 @@ import "./browser.BHOCIF_A.js";
19
19
  import { c as customElement } from "./custom-element.L4WJXn1j.js";
20
20
  import { i, x, E } from "./lit-element.jLBm65_O.js";
21
21
  import "./form.BSqXLytJ.js";
22
- import { L as LocalizeController } from "./i18n.C4wPyPTR.js";
22
+ import { L as LocalizeController } from "./i18n.DYXys45m.js";
23
23
  import "./purify.es.BIuh5IAZ.js";
24
- import { w as watch } from "./watch.CkGTlwIo.js";
24
+ import { w as watch } from "./watch.K-dbDP6P.js";
25
25
  import "./date-picker.DTUICGb9.js";
26
- import { f as fetchCortexApi } from "./content-builder.D-_Ou8sw.js";
26
+ import { f as fetchCortexApi } from "./content-builder.DZRw6hpX.js";
27
27
  import "./unsafe-html.Dff7-rCx.js";
28
28
  import { r as reactExports, a as React, j as jsxRuntimeExports, w, R as ReactDOM } from "./jsx-runtime.CTpPVMxj.js";
29
29
  import { a as getDefaultExportFromCjs, c as commonjsGlobal } from "./_commonjsHelpers.DQNKXVTB.js";
30
30
  import { r as require$$0 } from "./___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
31
+ import { f as focusWhenVisible } from "./focus-when-visible.jWSw9ks0.js";
31
32
  import { b as _inheritsLoose, a as _extends, c as _assertThisInitialized } from "./inheritsLoose.BuSn_CvZ.js";
32
33
  import { a as ObjectFit } from "./index.Cpamj0jB.js";
33
34
  import { r as r$1 } from "./state.CSDxrqLd.js";
34
35
  import { e } from "./class-map.BiVq-cVR.js";
35
36
  import { n as n$1 } from "./when.Dr1es41R.js";
36
- import { C as CxImage } from "./image.C2acLx6g.js";
37
+ import { C as CxImage } from "./image.DVbY2O89.js";
37
38
  var BookReaderMode$1 = /* @__PURE__ */ ((l) => (l.Image = "Image", l.Pdf = "Pdf", l))(BookReaderMode$1 || {}), BookReaderViewMode = /* @__PURE__ */ ((l) => (l.FourPage = "FourPage", l.OnePage = "OnePage", l.TwoPage = "TwoPage", l))(BookReaderViewMode || {});
38
39
  function commonjsRequire(l) {
39
40
  throw new Error('Could not dynamically require "' + l + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
@@ -53,7 +54,7 @@ function requirePdf() {
53
54
  (l, t) => {
54
55
  Object.defineProperty(t, "__esModule", {
55
56
  value: !0
56
- }), t.VerbosityLevel = t.Util = t.UnknownErrorException = t.UnexpectedResponseException = t.TextRenderingMode = t.RenderingIntentFlag = t.PromiseCapability = t.PermissionFlag = t.PasswordResponses = t.PasswordException = t.PageActionEventType = t.OPS = t.MissingPDFException = t.MAX_IMAGE_SIZE_TO_CACHE = t.LINE_FACTOR = t.LINE_DESCENT_FACTOR = t.InvalidPDFException = t.ImageKind = t.IDENTITY_MATRIX = t.FormatError = t.FeatureTest = t.FONT_IDENTITY_MATRIX = t.DocumentActionEventType = t.CMapCompressionType = t.BaseException = t.BASELINE_FACTOR = t.AnnotationType = t.AnnotationReplyType = t.AnnotationPrefix = t.AnnotationMode = t.AnnotationFlag = t.AnnotationFieldFlag = t.AnnotationEditorType = t.AnnotationEditorPrefix = t.AnnotationEditorParamsType = t.AnnotationBorderStyleType = t.AnnotationActionEventType = t.AbortException = void 0, t.assert = V, t.bytesToString = B, t.createValidAbsoluteUrl = D, t.getModificationDate = pt, t.getUuid = Ot, t.getVerbosityLevel = dt, t.info = tt, t.isArrayBuffer = rt, t.isArrayEqual = Xt, t.isNodeJS = void 0, t.normalizeUnicode = Kt, t.objectFromMap = it, t.objectSize = ht, t.setVerbosityLevel = et, t.shadow = O, t.string32 = ct, t.stringToBytes = H, t.stringToPDFString = mt, t.stringToUTF8String = ot, t.unreachable = z, t.utf8StringToString = Wt, t.warn = k;
57
+ }), t.VerbosityLevel = t.Util = t.UnknownErrorException = t.UnexpectedResponseException = t.TextRenderingMode = t.RenderingIntentFlag = t.PromiseCapability = t.PermissionFlag = t.PasswordResponses = t.PasswordException = t.PageActionEventType = t.OPS = t.MissingPDFException = t.MAX_IMAGE_SIZE_TO_CACHE = t.LINE_FACTOR = t.LINE_DESCENT_FACTOR = t.InvalidPDFException = t.ImageKind = t.IDENTITY_MATRIX = t.FormatError = t.FeatureTest = t.FONT_IDENTITY_MATRIX = t.DocumentActionEventType = t.CMapCompressionType = t.BaseException = t.BASELINE_FACTOR = t.AnnotationType = t.AnnotationReplyType = t.AnnotationPrefix = t.AnnotationMode = t.AnnotationFlag = t.AnnotationFieldFlag = t.AnnotationEditorType = t.AnnotationEditorPrefix = t.AnnotationEditorParamsType = t.AnnotationBorderStyleType = t.AnnotationActionEventType = t.AbortException = void 0, t.assert = V, t.bytesToString = B, t.createValidAbsoluteUrl = D, t.getModificationDate = pt, t.getUuid = Jt, t.getVerbosityLevel = dt, t.info = tt, t.isArrayBuffer = rt, t.isArrayEqual = Xt, t.isNodeJS = void 0, t.normalizeUnicode = Kt, t.objectFromMap = it, t.objectSize = ht, t.setVerbosityLevel = et, t.shadow = O, t.string32 = ct, t.stringToBytes = H, t.stringToPDFString = mt, t.stringToUTF8String = ot, t.unreachable = z, t.utf8StringToString = Wt, t.warn = k;
57
58
  const s = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser");
58
59
  t.isNodeJS = s;
59
60
  const c = [1, 0, 0, 1, 0, 0];
@@ -462,8 +463,8 @@ function requirePdf() {
462
463
  return String.fromCharCode.apply(null, Gt);
463
464
  const Mt = [];
464
465
  for (let Vt = 0; Vt < Zt; Vt += nt) {
465
- const Dt = Math.min(Vt + nt, Zt), gt = Gt.subarray(Vt, Dt);
466
- Mt.push(String.fromCharCode.apply(null, gt));
466
+ const xt = Math.min(Vt + nt, Zt), Dt = Gt.subarray(Vt, xt);
467
+ Mt.push(String.fromCharCode.apply(null, Dt));
467
468
  }
468
469
  return Mt.join("");
469
470
  }
@@ -538,20 +539,20 @@ function requirePdf() {
538
539
  return [Mt, Vt];
539
540
  }
540
541
  static applyInverseTransform(Zt, nt) {
541
- const Mt = nt[0] * nt[3] - nt[1] * nt[2], Vt = (Zt[0] * nt[3] - Zt[1] * nt[2] + nt[2] * nt[5] - nt[4] * nt[3]) / Mt, Dt = (-Zt[0] * nt[1] + Zt[1] * nt[0] + nt[4] * nt[1] - nt[5] * nt[0]) / Mt;
542
- return [Vt, Dt];
542
+ const Mt = nt[0] * nt[3] - nt[1] * nt[2], Vt = (Zt[0] * nt[3] - Zt[1] * nt[2] + nt[2] * nt[5] - nt[4] * nt[3]) / Mt, xt = (-Zt[0] * nt[1] + Zt[1] * nt[0] + nt[4] * nt[1] - nt[5] * nt[0]) / Mt;
543
+ return [Vt, xt];
543
544
  }
544
545
  static getAxialAlignedBoundingBox(Zt, nt) {
545
- const Mt = this.applyTransform(Zt, nt), Vt = this.applyTransform(Zt.slice(2, 4), nt), Dt = this.applyTransform([Zt[0], Zt[3]], nt), gt = this.applyTransform([Zt[2], Zt[1]], nt);
546
- return [Math.min(Mt[0], Vt[0], Dt[0], gt[0]), Math.min(Mt[1], Vt[1], Dt[1], gt[1]), Math.max(Mt[0], Vt[0], Dt[0], gt[0]), Math.max(Mt[1], Vt[1], Dt[1], gt[1])];
546
+ const Mt = this.applyTransform(Zt, nt), Vt = this.applyTransform(Zt.slice(2, 4), nt), xt = this.applyTransform([Zt[0], Zt[3]], nt), Dt = this.applyTransform([Zt[2], Zt[1]], nt);
547
+ return [Math.min(Mt[0], Vt[0], xt[0], Dt[0]), Math.min(Mt[1], Vt[1], xt[1], Dt[1]), Math.max(Mt[0], Vt[0], xt[0], Dt[0]), Math.max(Mt[1], Vt[1], xt[1], Dt[1])];
547
548
  }
548
549
  static inverseTransform(Zt) {
549
550
  const nt = Zt[0] * Zt[3] - Zt[1] * Zt[2];
550
551
  return [Zt[3] / nt, -Zt[1] / nt, -Zt[2] / nt, Zt[0] / nt, (Zt[2] * Zt[5] - Zt[4] * Zt[3]) / nt, (Zt[4] * Zt[1] - Zt[5] * Zt[0]) / nt];
551
552
  }
552
553
  static singularValueDecompose2dScale(Zt) {
553
- const nt = [Zt[0], Zt[2], Zt[1], Zt[3]], Mt = Zt[0] * nt[0] + Zt[1] * nt[2], Vt = Zt[0] * nt[1] + Zt[1] * nt[3], Dt = Zt[2] * nt[0] + Zt[3] * nt[2], gt = Zt[2] * nt[1] + Zt[3] * nt[3], _t = (Mt + gt) / 2, vt = Math.sqrt((Mt + gt) ** 2 - 4 * (Mt * gt - Dt * Vt)) / 2, Bt = _t + vt || 1, wt = _t - vt || 1;
554
- return [Math.sqrt(Bt), Math.sqrt(wt)];
554
+ const nt = [Zt[0], Zt[2], Zt[1], Zt[3]], Mt = Zt[0] * nt[0] + Zt[1] * nt[2], Vt = Zt[0] * nt[1] + Zt[1] * nt[3], xt = Zt[2] * nt[0] + Zt[3] * nt[2], Dt = Zt[2] * nt[1] + Zt[3] * nt[3], _t = (Mt + Dt) / 2, vt = Math.sqrt((Mt + Dt) ** 2 - 4 * (Mt * Dt - xt * Vt)) / 2, Bt = _t + vt || 1, St = _t - vt || 1;
555
+ return [Math.sqrt(Bt), Math.sqrt(St)];
555
556
  }
556
557
  static normalizeRect(Zt) {
557
558
  const nt = Zt.slice(0);
@@ -561,26 +562,26 @@ function requirePdf() {
561
562
  const Mt = Math.max(Math.min(Zt[0], Zt[2]), Math.min(nt[0], nt[2])), Vt = Math.min(Math.max(Zt[0], Zt[2]), Math.max(nt[0], nt[2]));
562
563
  if (Mt > Vt)
563
564
  return null;
564
- const Dt = Math.max(Math.min(Zt[1], Zt[3]), Math.min(nt[1], nt[3])), gt = Math.min(Math.max(Zt[1], Zt[3]), Math.max(nt[1], nt[3]));
565
- return Dt > gt ? null : [Mt, Dt, Vt, gt];
566
- }
567
- static bezierBoundingBox(Zt, nt, Mt, Vt, Dt, gt, _t, vt) {
568
- const Bt = [], wt = [[], []];
569
- let At, Pt, Qt, St, qt, ll, tl, el;
570
- for (let xt = 0; xt < 2; ++xt) {
571
- if (xt === 0 ? (Pt = 6 * Zt - 12 * Mt + 6 * Dt, At = -3 * Zt + 9 * Mt - 9 * Dt + 3 * _t, Qt = 3 * Mt - 3 * Zt) : (Pt = 6 * nt - 12 * Vt + 6 * gt, At = -3 * nt + 9 * Vt - 9 * gt + 3 * vt, Qt = 3 * Vt - 3 * nt), Math.abs(At) < 1e-12) {
565
+ const xt = Math.max(Math.min(Zt[1], Zt[3]), Math.min(nt[1], nt[3])), Dt = Math.min(Math.max(Zt[1], Zt[3]), Math.max(nt[1], nt[3]));
566
+ return xt > Dt ? null : [Mt, xt, Vt, Dt];
567
+ }
568
+ static bezierBoundingBox(Zt, nt, Mt, Vt, xt, Dt, _t, vt) {
569
+ const Bt = [], St = [[], []];
570
+ let At, Pt, Qt, wt, $t, ll, tl, sl;
571
+ for (let jt = 0; jt < 2; ++jt) {
572
+ if (jt === 0 ? (Pt = 6 * Zt - 12 * Mt + 6 * xt, At = -3 * Zt + 9 * Mt - 9 * xt + 3 * _t, Qt = 3 * Mt - 3 * Zt) : (Pt = 6 * nt - 12 * Vt + 6 * Dt, At = -3 * nt + 9 * Vt - 9 * Dt + 3 * vt, Qt = 3 * Vt - 3 * nt), Math.abs(At) < 1e-12) {
572
573
  if (Math.abs(Pt) < 1e-12)
573
574
  continue;
574
- St = -Qt / Pt, 0 < St && St < 1 && Bt.push(St);
575
+ wt = -Qt / Pt, 0 < wt && wt < 1 && Bt.push(wt);
575
576
  continue;
576
577
  }
577
- tl = Pt * Pt - 4 * Qt * At, el = Math.sqrt(tl), !(tl < 0) && (qt = (-Pt + el) / (2 * At), 0 < qt && qt < 1 && Bt.push(qt), ll = (-Pt - el) / (2 * At), 0 < ll && ll < 1 && Bt.push(ll));
578
+ tl = Pt * Pt - 4 * Qt * At, sl = Math.sqrt(tl), !(tl < 0) && ($t = (-Pt + sl) / (2 * At), 0 < $t && $t < 1 && Bt.push($t), ll = (-Pt - sl) / (2 * At), 0 < ll && ll < 1 && Bt.push(ll));
578
579
  }
579
580
  let Yt = Bt.length, Lt;
580
- const Jt = Yt;
581
+ const Ct = Yt;
581
582
  for (; Yt--; )
582
- St = Bt[Yt], Lt = 1 - St, wt[0][Yt] = Lt * Lt * Lt * Zt + 3 * Lt * Lt * St * Mt + 3 * Lt * St * St * Dt + St * St * St * _t, wt[1][Yt] = Lt * Lt * Lt * nt + 3 * Lt * Lt * St * Vt + 3 * Lt * St * St * gt + St * St * St * vt;
583
- return wt[0][Jt] = Zt, wt[1][Jt] = nt, wt[0][Jt + 1] = _t, wt[1][Jt + 1] = vt, wt[0].length = wt[1].length = Jt + 2, [Math.min(...wt[0]), Math.min(...wt[1]), Math.max(...wt[0]), Math.max(...wt[1])];
583
+ wt = Bt[Yt], Lt = 1 - wt, St[0][Yt] = Lt * Lt * Lt * Zt + 3 * Lt * Lt * wt * Mt + 3 * Lt * wt * wt * xt + wt * wt * wt * _t, St[1][Yt] = Lt * Lt * Lt * nt + 3 * Lt * Lt * wt * Vt + 3 * Lt * wt * wt * Dt + wt * wt * wt * vt;
584
+ return St[0][Ct] = Zt, St[1][Ct] = nt, St[0][Ct + 1] = _t, St[1][Ct + 1] = vt, St[0].length = St[1].length = Ct + 2, [Math.min(...St[0]), Math.min(...St[1]), Math.max(...St[0]), Math.max(...St[1])];
584
585
  }
585
586
  }
586
587
  t.Util = st;
@@ -641,11 +642,11 @@ function requirePdf() {
641
642
  }
642
643
  }
643
644
  t.PromiseCapability = It;
644
- let Rt = null, Ft = null;
645
+ let Rt = null, Ot = null;
645
646
  function Kt(Gt) {
646
- return Rt || (Rt = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, Ft = /* @__PURE__ */ new Map([["ſt", "ſt"]])), Gt.replaceAll(Rt, (Zt, nt, Mt) => nt ? nt.normalize("NFKC") : Ft.get(Mt));
647
+ return Rt || (Rt = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, Ot = /* @__PURE__ */ new Map([["ſt", "ſt"]])), Gt.replaceAll(Rt, (Zt, nt, Mt) => nt ? nt.normalize("NFKC") : Ot.get(Mt));
647
648
  }
648
- function Ot() {
649
+ function Jt() {
649
650
  if (typeof crypto < "u" && typeof crypto?.randomUUID == "function")
650
651
  return crypto.randomUUID();
651
652
  const Gt = new Uint8Array(32);
@@ -5152,23 +5153,23 @@ function requirePdf() {
5152
5153
  const mt = (st.isSpace ? T : 0) + C, ot = st.fontChar, Wt = st.accent;
5153
5154
  let rt, Xt, pt = st.width;
5154
5155
  if (v) {
5155
- const Rt = st.vmetric || H, Ft = -(st.vmetric ? Rt[1] : pt * 0.5) * ct, Kt = Rt[2] * ct;
5156
- pt = Rt ? -Rt[0] : pt, rt = Ft / Q, Xt = (J + Kt) / Q;
5156
+ const Rt = st.vmetric || H, Ot = -(st.vmetric ? Rt[1] : pt * 0.5) * ct, Kt = Rt[2] * ct;
5157
+ pt = Rt ? -Rt[0] : pt, rt = Ot / Q, Xt = (J + Kt) / Q;
5157
5158
  } else
5158
5159
  rt = J / Q, Xt = 0;
5159
5160
  if (D.remeasure && pt > 0) {
5160
5161
  const Rt = F.measureText(ot).width * 1e3 / O * Q;
5161
5162
  if (pt < Rt && this.isFontSubpixelAAEnabled) {
5162
- const Ft = pt / Rt;
5163
- ut = !0, F.save(), F.scale(Ft, 1), rt /= Ft;
5163
+ const Ot = pt / Rt;
5164
+ ut = !0, F.save(), F.scale(Ot, 1), rt /= Ot;
5164
5165
  } else pt !== Rt && (rt += (pt - Rt) / 2e3 * O / Q);
5165
5166
  }
5166
5167
  if (this.contentVisible && (st.isInFont || D.missingFile)) {
5167
5168
  if (ht && !Wt)
5168
5169
  F.fillText(ot, rt, Xt);
5169
5170
  else if (this.paintChar(ot, rt, Xt, it), Wt) {
5170
- const Rt = rt + O * Wt.offset.x / Q, Ft = Xt - O * Wt.offset.y / Q;
5171
- this.paintChar(Wt.fontChar, Rt, Ft, it);
5171
+ const Rt = rt + O * Wt.offset.x / Q, Ot = Xt - O * Wt.offset.y / Q;
5172
+ this.paintChar(Wt.fontChar, Rt, Ot, it);
5172
5173
  }
5173
5174
  }
5174
5175
  const It = v ? pt * ct - mt * g : pt * ct + mt * g;
@@ -13850,13 +13851,13 @@ const defaultScale = 1, Page$5 = function l(t) {
13850
13851
  const ht = isProvided(k) ? k - 1 : tt ?? null, it = k ?? (isProvided(tt) ? tt + 1 : null), at = Q ?? (B ? B.rotate : null), bt = reactExports.useMemo(() => {
13851
13852
  if (!B)
13852
13853
  return null;
13853
- let Ot = 1;
13854
+ let Jt = 1;
13854
13855
  const Ut = C ?? defaultScale;
13855
13856
  if (g || o) {
13856
13857
  const Gt = B.getViewport({ scale: 1, rotation: at });
13857
- g ? Ot = g / Gt.width : o && (Ot = o / Gt.height);
13858
+ g ? Jt = g / Gt.width : o && (Jt = o / Gt.height);
13858
13859
  }
13859
- return Ut * Ot;
13860
+ return Ut * Jt;
13860
13861
  }, [o, B, at, C, g]);
13861
13862
  function J() {
13862
13863
  return () => {
@@ -13886,8 +13887,8 @@ const defaultScale = 1, Page$5 = function l(t) {
13886
13887
  function mt() {
13887
13888
  if (!z || !it)
13888
13889
  return;
13889
- const Ot = makeCancellablePromise$1(z.getPage(it)), Ut = Ot;
13890
- return Ot.promise.then((Gt) => {
13890
+ const Jt = makeCancellablePromise$1(z.getPage(it)), Ut = Jt;
13891
+ return Jt.promise.then((Gt) => {
13891
13892
  v({ type: "RESOLVE", value: Gt });
13892
13893
  }).catch((Gt) => {
13893
13894
  v({ type: "REJECT", error: Gt });
@@ -13978,7 +13979,7 @@ const defaultScale = 1, Page$5 = function l(t) {
13978
13979
  function Rt() {
13979
13980
  return p ? React.createElement(AnnotationLayer, { key: `${rt}_annotations` }) : null;
13980
13981
  }
13981
- function Ft() {
13982
+ function Ot() {
13982
13983
  return React.createElement(
13983
13984
  PageContext.Provider,
13984
13985
  { value: ot },
@@ -13989,7 +13990,7 @@ const defaultScale = 1, Page$5 = function l(t) {
13989
13990
  );
13990
13991
  }
13991
13992
  function Kt() {
13992
- return it ? z === null || B === void 0 || B === null ? React.createElement(Message, { type: "loading" }, typeof X == "function" ? X() : X) : z === !1 || B === !1 ? React.createElement(Message, { type: "error" }, typeof M == "function" ? M() : M) : Ft() : React.createElement(Message, { type: "no-data" }, typeof Y == "function" ? Y() : Y);
13993
+ return it ? z === null || B === void 0 || B === null ? React.createElement(Message, { type: "loading" }, typeof X == "function" ? X() : X) : z === !1 || B === !1 ? React.createElement(Message, { type: "error" }, typeof M == "function" ? M() : M) : Ot() : React.createElement(Message, { type: "no-data" }, typeof Y == "function" ? Y() : Y);
13993
13994
  }
13994
13995
  return React.createElement("div", Object.assign({ className: clsx(d, u), "data-page-number": it, ref: mergeRefs$2(G, ct), style: {
13995
13996
  "--scale-factor": `${bt}`,
@@ -14121,7 +14122,7 @@ const FIRST_PAGE = 1, COVER_FLIP_PAGE_LOAD = 10, DEFAULT_VIEW_MODE = 2, SCALE_ST
14121
14122
  }, API_ENDPOINT = {
14122
14123
  GET_IMAGES: "webapi/extensibility/integration/assetpreview/bookreader/GetBookInfoForDisplay_23A_v1",
14123
14124
  SEARCH_TEXT: "webapi/extensibility/integration/assetpreview/bookreader/search_23B_v1"
14124
- }, MAX_WHEEL_DISTANCE = 50, PASSWORD_REASON = {
14125
+ }, MAX_WHEEL_DISTANCE = 50, ARROW_KEY_SCROLL_STEP = 80, PASSWORD_REASON = {
14125
14126
  INCORRECT_PASSWORD: 2
14126
14127
  }, DEFAULT_RANGE_CHUNK_SIZE = 65536, RE_FETCH_INTERVAL = 5e3, LOADING_INTERVAL = 1e3, CSS_VAR = {
14127
14128
  TEXT: {
@@ -14395,6 +14396,15 @@ const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports), useKe
14395
14396
  }, [a, l]), {
14396
14397
  updateShortcuts: c
14397
14398
  };
14399
+ }, canScrollVertically = (l) => {
14400
+ const { overflowY: t } = getComputedStyle(l);
14401
+ return (t === "auto" || t === "scroll") && l.scrollHeight > l.clientHeight;
14402
+ }, scrollVerticallyOrNavigate = (l, t, s) => {
14403
+ if (canScrollVertically(l)) {
14404
+ l.scrollBy({ top: t });
14405
+ return;
14406
+ }
14407
+ s();
14398
14408
  }, useBookEvents = (l, t, {
14399
14409
  onNextPage: s,
14400
14410
  onOpenSearchBox: c,
@@ -14405,39 +14415,39 @@ const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports), useKe
14405
14415
  onZoomIn: N,
14406
14416
  onZoomOut: u,
14407
14417
  toggleFullscreen: Z
14408
- }) => {
14409
- const { updateShortcuts: m } = useKeyboardShortcuts(l);
14418
+ }, m) => {
14419
+ const { updateShortcuts: W } = useKeyboardShortcuts(l);
14410
14420
  reactExports.useEffect(() => {
14411
14421
  if (!l || !t)
14412
14422
  return;
14413
- const W = {};
14414
- W[KEYCODE.ARROW_LEFT] = {
14423
+ const M = m ?? l, o = () => scrollVerticallyOrNavigate(M, -ARROW_KEY_SCROLL_STEP, a), G = () => scrollVerticallyOrNavigate(M, ARROW_KEY_SCROLL_STEP, s), X = {};
14424
+ X[KEYCODE.ARROW_LEFT] = {
14415
14425
  callback: a
14416
- }, W[KEYCODE.ARROW_RIGHT] = {
14426
+ }, X[KEYCODE.ARROW_RIGHT] = {
14417
14427
  callback: s
14418
- }, W[KEYCODE.NUMPAD_ADD] = {
14428
+ }, X[KEYCODE.NUMPAD_ADD] = {
14419
14429
  callback: N
14420
- }, W[KEYCODE.NUMPAD_SUBTRACT] = {
14430
+ }, X[KEYCODE.NUMPAD_SUBTRACT] = {
14421
14431
  callback: u
14422
- }, W[KEYCODE.MINUS] = {
14432
+ }, X[KEYCODE.MINUS] = {
14423
14433
  callback: u
14424
- }, W[KEYCODE.EQUAL] = {
14434
+ }, X[KEYCODE.EQUAL] = {
14425
14435
  callback: N
14426
- }, W[KEYCODE.DIGIT_0] = {
14436
+ }, X[KEYCODE.DIGIT_0] = {
14427
14437
  ctrlCallback: () => {
14428
14438
  b("1"), h("1");
14429
14439
  },
14430
14440
  metaCallback: () => {
14431
14441
  b("1"), h("1");
14432
14442
  }
14433
- }, W[KEYCODE.NUMPAD_0] = {
14443
+ }, X[KEYCODE.NUMPAD_0] = {
14434
14444
  ctrlCallback: () => {
14435
14445
  b("1"), h("1");
14436
14446
  },
14437
14447
  metaCallback: () => {
14438
14448
  b("1"), h("1");
14439
14449
  }
14440
- }, W[KEYCODE.KEY_F] = {
14450
+ }, X[KEYCODE.KEY_F] = {
14441
14451
  callback: () => {
14442
14452
  Z();
14443
14453
  },
@@ -14447,66 +14457,67 @@ const throttle = /* @__PURE__ */ getDefaultExportFromCjs(throttleExports), useKe
14447
14457
  metaCallback: () => {
14448
14458
  c();
14449
14459
  }
14450
- }, W[KEYCODE.ARROW_DOWN] = {
14451
- callback: s,
14460
+ }, X[KEYCODE.ARROW_DOWN] = {
14461
+ callback: G,
14452
14462
  ctrlCallback: () => {
14453
14463
  d(t);
14454
14464
  },
14455
14465
  metaCallback: () => {
14456
14466
  d(t);
14457
14467
  }
14458
- }, W[KEYCODE.ARROW_UP] = {
14459
- callback: a,
14468
+ }, X[KEYCODE.ARROW_UP] = {
14469
+ callback: o,
14460
14470
  ctrlCallback: () => {
14461
14471
  d(FIRST_PAGE);
14462
14472
  },
14463
14473
  metaCallback: () => {
14464
14474
  d(FIRST_PAGE);
14465
14475
  }
14466
- }, W[KEYCODE.PAGE_DOWN] = {
14476
+ }, X[KEYCODE.PAGE_DOWN] = {
14467
14477
  callback: s
14468
- }, W[KEYCODE.PAGE_UP] = {
14478
+ }, X[KEYCODE.PAGE_UP] = {
14469
14479
  callback: a
14470
- }, W[KEYCODE.HOME] = {
14480
+ }, X[KEYCODE.HOME] = {
14471
14481
  callback: () => {
14472
14482
  d(FIRST_PAGE);
14473
14483
  }
14474
- }, W[KEYCODE.END] = {
14484
+ }, X[KEYCODE.END] = {
14475
14485
  callback: () => {
14476
14486
  d(t);
14477
14487
  }
14478
- }, m(W);
14488
+ }, W(X);
14479
14489
  }, [
14480
14490
  h,
14481
14491
  c,
14482
14492
  u,
14483
14493
  N,
14484
- m,
14494
+ W,
14485
14495
  t,
14486
14496
  a,
14487
14497
  s,
14488
14498
  b,
14489
14499
  d,
14490
14500
  l,
14501
+ m,
14491
14502
  Z
14492
14503
  ]), reactExports.useEffect(() => {
14493
14504
  if (!l)
14494
14505
  return;
14495
- const W = throttle(
14496
- (o) => {
14497
- o.deltaY > 0 ? s() : o.deltaY < 0 && a();
14506
+ const M = throttle(
14507
+ (X) => {
14508
+ X.deltaY > 0 ? s() : X.deltaY < 0 && a();
14498
14509
  },
14499
14510
  THROTTLE_TIME,
14500
14511
  {
14501
14512
  trailing: !1
14502
14513
  }
14503
- ), M = (o) => {
14504
- o.ctrlKey || (o.stopPropagation(), o.preventDefault(), W(o));
14514
+ ), o = m ?? l, G = (X) => {
14515
+ X.ctrlKey || canScrollVertically(o) || (X.stopPropagation(), X.preventDefault(), M(X));
14505
14516
  };
14506
- return l.addEventListener("wheel", M), () => {
14507
- l.removeEventListener("wheel", M), W.cancel();
14517
+ return l.addEventListener("wheel", G), () => {
14518
+ l.removeEventListener("wheel", G), M.cancel();
14508
14519
  };
14509
- }, [l, s, a]);
14520
+ }, [l, m, s, a]);
14510
14521
  }, transition = "margin 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms", useDrawer = (l) => {
14511
14522
  const [t, s] = reactExports.useState(!1), c = reactExports.useCallback(() => {
14512
14523
  s(!1);
@@ -17265,7 +17276,7 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17265
17276
  ref: W,
17266
17277
  disabled: t || void 0,
17267
17278
  "oncx-input": X,
17268
- placeholder: "Search",
17279
+ placeholder: o.term("search"),
17269
17280
  size: "small",
17270
17281
  "no-spin-buttons": !0,
17271
17282
  style: { width: M ? "12rem" : "15rem" }
@@ -17289,23 +17300,32 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17289
17300
  }
17290
17301
  ),
17291
17302
  /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-space", { "align-items": "center", wrap: "nowrap", className: "no-gap", children: [
17292
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: "Previous match (Shift + Enter)", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17303
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: o.term("previousMatchShiftEnter"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17293
17304
  "cx-icon-button",
17294
17305
  {
17295
17306
  onClick: d,
17296
17307
  disabled: t || !h || !h.matchesCount || void 0,
17297
- name: "keyboard_arrow_up"
17308
+ name: "keyboard_arrow_up",
17309
+ label: o.term("previousMatch")
17298
17310
  }
17299
17311
  ) }),
17300
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: "Next match (Enter)", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17312
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: o.term("nextMatchEnter"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17301
17313
  "cx-icon-button",
17302
17314
  {
17303
17315
  onClick: c,
17304
17316
  disabled: t || !h || !h.matchesCount || void 0,
17305
- name: "keyboard_arrow_down"
17317
+ name: "keyboard_arrow_down",
17318
+ label: o.term("nextMatch")
17306
17319
  }
17307
17320
  ) }),
17308
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: "Close", children: /* @__PURE__ */ jsxRuntimeExports.jsx("cx-icon-button", { onClick: s, name: "clear" }) })
17321
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: o.term("close"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17322
+ "cx-icon-button",
17323
+ {
17324
+ onClick: s,
17325
+ name: "clear",
17326
+ label: o.term("close")
17327
+ }
17328
+ ) })
17309
17329
  ] })
17310
17330
  ]
17311
17331
  }
@@ -17417,14 +17437,26 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17417
17437
  ) })
17418
17438
  ] });
17419
17439
  }, PageControl$1 = reactExports.memo(PageControl, (l, t) => l.pageNumber === t.pageNumber && l.totalPages === t.totalPages && l.onPageChange === t.onPageChange && l.onNextPage === t.onNextPage && l.onPreviousPage === t.onPreviousPage && l.viewMode === t.viewMode && l.showCover === t.showCover && l.showEdgeButtons === t.showEdgeButtons && l.showPageInput === t.showPageInput), ScaleControl = ({ disabled: l, onScaleChange: t, onZoomIn: s, onZoomOut: c, scale: d, scaleOption: a }) => {
17420
- const b = reactExports.useContext(TranslationContext), h = reactExports.useMemo(
17421
- () => SCALE_OPTIONS.find((u) => u.value.toString() === a)?.label ?? `${Math.round(parseFloat(a) * 100)}%`,
17440
+ const b = reactExports.useContext(TranslationContext), h = reactExports.useRef(null), N = reactExports.useRef(null), u = reactExports.useRef(null), Z = reactExports.useRef(null), m = reactExports.useMemo(
17441
+ () => SCALE_OPTIONS.find((G) => G.value.toString() === a)?.label ?? `${Math.round(parseFloat(a) * 100)}%`,
17422
17442
  [a]
17423
- ), N = reactExports.useCallback(
17424
- (u) => {
17425
- t(u.detail.item.value);
17443
+ );
17444
+ reactExports.useEffect(() => () => {
17445
+ Z.current?.();
17446
+ }, []);
17447
+ const W = reactExports.useCallback(
17448
+ (G) => {
17449
+ t(G.detail.item.value), h.current?.focus();
17426
17450
  },
17427
17451
  [t]
17452
+ ), M = reactExports.useCallback(() => {
17453
+ const G = u.current?.querySelector("cx-menu-item[checked]");
17454
+ G && (u.current?.setCurrentItem(G), Z.current?.(), Z.current = focusWhenVisible(G));
17455
+ }, []), o = reactExports.useCallback(
17456
+ (G) => {
17457
+ l || N.current?.open || G.key !== "Enter" && G.key !== " " || (G.preventDefault(), N.current?.show());
17458
+ },
17459
+ [l]
17428
17460
  );
17429
17461
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-space", { "align-items": "center", wrap: "nowrap", className: "no-gap", children: [
17430
17462
  /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: b.term("zoomOut"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17439,15 +17471,28 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17439
17471
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
17440
17472
  "cx-dropdown",
17441
17473
  {
17474
+ ref: N,
17442
17475
  hoist: !0,
17443
17476
  placement: "top",
17444
- "oncx-select": N,
17477
+ ignoredKeys: ["Enter", " "],
17478
+ "oncx-select": W,
17479
+ "oncx-show": M,
17445
17480
  className: "scale-dropdown",
17446
17481
  children: [
17447
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { slot: "trigger", hoist: !0, disabled: !0, className: "dropdown-trigger", children: /* @__PURE__ */ jsxRuntimeExports.jsx("cx-button", { caret: !0, disabled: l || void 0, children: h }) }),
17448
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu", { children: SCALE_OPTIONS.map((u) => {
17449
- const Z = u.value.toString(), m = Z === a;
17450
- return /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu-item", { value: Z, type: "checkbox", checked: m || void 0, children: u.label }, Z);
17482
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { slot: "trigger", hoist: !0, disabled: !0, className: "dropdown-trigger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17483
+ "cx-button",
17484
+ {
17485
+ label: m,
17486
+ ref: h,
17487
+ caret: !0,
17488
+ disabled: l || void 0,
17489
+ onKeyDown: o,
17490
+ children: m
17491
+ }
17492
+ ) }),
17493
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu", { ref: u, children: SCALE_OPTIONS.map((G) => {
17494
+ const X = G.value.toString(), Y = X === a;
17495
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu-item", { value: X, type: "checkbox", checked: Y || void 0, children: G.label }, X);
17451
17496
  }) })
17452
17497
  ]
17453
17498
  }
@@ -17484,11 +17529,17 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17484
17529
  "data-testid": "view-mode-btn"
17485
17530
  }
17486
17531
  ) });
17532
+ }, useRestoreFocusOnClose = (l) => {
17533
+ const t = reactExports.useRef(null), s = reactExports.useRef(l);
17534
+ return reactExports.useEffect(() => {
17535
+ s.current && !l && t.current?.focus(), s.current = l;
17536
+ }, [l]), t;
17487
17537
  }, ToggleSearchBox = ({ disabled: l, onToggle: t, open: s }) => {
17488
- const c = reactExports.useContext(TranslationContext);
17538
+ const c = reactExports.useContext(TranslationContext), d = useRestoreFocusOnClose(s);
17489
17539
  return /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: c.term("search"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17490
17540
  "cx-icon-button",
17491
17541
  {
17542
+ ref: d,
17492
17543
  onClick: t,
17493
17544
  disabled: l || void 0,
17494
17545
  name: "search",
@@ -17498,10 +17549,11 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17498
17549
  }
17499
17550
  ) });
17500
17551
  }, ToggleSearchBox$1 = reactExports.memo(ToggleSearchBox, (l, t) => l.open === t.open && l.disabled === t.disabled && l.onToggle === t.onToggle), ToggleSidebar = ({ disabled: l, onToggle: t, open: s }) => {
17501
- const c = reactExports.useContext(TranslationContext);
17552
+ const c = reactExports.useContext(TranslationContext), d = useRestoreFocusOnClose(s);
17502
17553
  return /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: c.term("toggleSidebar"), trigger: "hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17503
17554
  "cx-icon-button",
17504
17555
  {
17556
+ ref: d,
17505
17557
  onClick: t,
17506
17558
  disabled: l || void 0,
17507
17559
  name: "view_array",
@@ -17511,7 +17563,7 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17511
17563
  }
17512
17564
  ) });
17513
17565
  }, ToggleSidebar$1 = reactExports.memo(ToggleSidebar, (l, t) => l.open === t.open && l.disabled === t.disabled && l.onToggle === t.onToggle), ViewControl = ({ disabled: l, onViewModeChange: t, viewMode: s }) => {
17514
- const c = reactExports.useContext(TranslationContext), d = reactExports.useMemo(
17566
+ const c = reactExports.useContext(TranslationContext), d = reactExports.useRef(null), a = reactExports.useMemo(
17515
17567
  () => [
17516
17568
  {
17517
17569
  icon: "article",
@@ -17530,27 +17582,28 @@ const getRndInteger = (l, t) => Math.floor(Math.random() * (t - l + 1)) + l, are
17530
17582
  }
17531
17583
  ],
17532
17584
  [c]
17533
- ), a = reactExports.useMemo(() => d.find((h) => h.value === s), [s, d]), b = reactExports.useCallback(
17534
- (h) => {
17535
- t(parseInt(h.detail.item.value));
17585
+ ), b = reactExports.useMemo(() => a.find((N) => N.value === s), [s, a]), h = reactExports.useCallback(
17586
+ (N) => {
17587
+ t(parseInt(N.detail.item.value)), d.current?.focus();
17536
17588
  },
17537
17589
  [t]
17538
17590
  );
17539
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-dropdown", { hoist: !0, placement: "top", "oncx-select": b, children: [
17591
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-dropdown", { hoist: !0, placement: "top", "oncx-select": h, children: [
17540
17592
  /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { slot: "trigger", hoist: !0, content: c.term("viewMode"), className: "dropdown-trigger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17541
17593
  "cx-icon-button",
17542
17594
  {
17543
- name: a?.icon,
17595
+ ref: d,
17596
+ name: b?.icon,
17544
17597
  label: c.term("viewMode"),
17545
17598
  disabled: l || void 0
17546
17599
  }
17547
17600
  ) }),
17548
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu", { children: d.map((h) => {
17549
- const N = h.value.toString(), u = h.value === s;
17550
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-menu-item", { value: N, type: "checkbox", checked: u || void 0, children: [
17551
- /* @__PURE__ */ jsxRuntimeExports.jsx("cx-icon", { slot: "prefix", name: h.icon }),
17552
- h.label
17553
- ] }, N);
17601
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-menu", { children: a.map((N) => {
17602
+ const u = N.value.toString(), Z = N.value === s;
17603
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-menu-item", { value: u, type: "checkbox", checked: Z || void 0, children: [
17604
+ /* @__PURE__ */ jsxRuntimeExports.jsx("cx-icon", { slot: "prefix", name: N.icon }),
17605
+ N.label
17606
+ ] }, u);
17554
17607
  }) })
17555
17608
  ] });
17556
17609
  }, Controller$1 = ({
@@ -19711,10 +19764,10 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19711
19764
  onToggleSearchBox: pt,
19712
19765
  openSearchBox: It,
19713
19766
  pdfSearchResult: Rt,
19714
- pdfSearching: Ft
19767
+ pdfSearching: Ot
19715
19768
  } = useSearch(t, void 0, bt, o, N, it), Kt = reactExports.useCallback(() => {
19716
19769
  Wt(), V.current?.focusInput();
19717
- }, [Wt]), Ot = reactExports.useCallback(() => {
19770
+ }, [Wt]), Jt = reactExports.useCallback(() => {
19718
19771
  Z();
19719
19772
  }, [Z]);
19720
19773
  reactExports.useEffect(() => {
@@ -19724,47 +19777,57 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19724
19777
  return document.addEventListener("fullscreenchange", Yt), () => {
19725
19778
  document.removeEventListener("fullscreenchange", Yt);
19726
19779
  };
19727
- }, [Ot]), useBookEvents(R, m, {
19728
- onNextPage: ht,
19729
- onOpenSearchBox: Kt,
19730
- onPageChange: it,
19731
- onPreviousPage: at,
19732
- onScaleChange: T,
19733
- onScaleOptionChange: g,
19734
- onZoomIn: K,
19735
- onZoomOut: v,
19736
- toggleFullscreen: Ot
19737
- }), useBookEvents(lt?.instance.wrapperComponent || null, m, {
19738
- onNextPage: ht,
19739
- onOpenSearchBox: Kt,
19740
- onPageChange: it,
19741
- onPreviousPage: at,
19742
- onScaleChange: T,
19743
- onScaleOptionChange: g,
19744
- onZoomIn: K,
19745
- onZoomOut: v,
19746
- toggleFullscreen: Ot
19747
- });
19780
+ }, [Jt]), useBookEvents(
19781
+ R,
19782
+ m,
19783
+ {
19784
+ onNextPage: ht,
19785
+ onOpenSearchBox: Kt,
19786
+ onPageChange: it,
19787
+ onPreviousPage: at,
19788
+ onScaleChange: T,
19789
+ onScaleOptionChange: g,
19790
+ onZoomIn: K,
19791
+ onZoomOut: v,
19792
+ toggleFullscreen: Jt
19793
+ },
19794
+ lt?.instance.wrapperComponent || null
19795
+ ), useBookEvents(
19796
+ lt?.instance.wrapperComponent || null,
19797
+ m,
19798
+ {
19799
+ onNextPage: ht,
19800
+ onOpenSearchBox: Kt,
19801
+ onPageChange: it,
19802
+ onPreviousPage: at,
19803
+ onScaleChange: T,
19804
+ onScaleOptionChange: g,
19805
+ onZoomIn: K,
19806
+ onZoomOut: v,
19807
+ toggleFullscreen: Jt
19808
+ },
19809
+ lt?.instance.wrapperComponent || null
19810
+ );
19748
19811
  const Ut = reactExports.useCallback((Yt, Lt) => {
19749
19812
  if (Lt && Lt.pageNumber) {
19750
- const Jt = X[Lt.pageNumber]?.asset.pageID, xt = X[Lt.pageNumber]?.asset.representativeID;
19813
+ const Ct = X[Lt.pageNumber]?.asset.pageID, jt = X[Lt.pageNumber]?.asset.representativeID;
19751
19814
  b(Yt, {
19752
19815
  ...Lt,
19753
- pageID: xt || Jt
19816
+ pageID: jt || Ct
19754
19817
  });
19755
19818
  }
19756
- }, [X, b]), Gt = reactExports.useCallback((Yt, Lt, Jt) => {
19757
- Y((xt) => xt[Yt] && !xt[Yt].asset.width && !xt[Yt].asset.height ? {
19758
- ...xt,
19819
+ }, [X, b]), Gt = reactExports.useCallback((Yt, Lt, Ct) => {
19820
+ Y((jt) => jt[Yt] && !jt[Yt].asset.width && !jt[Yt].asset.height ? {
19821
+ ...jt,
19759
19822
  [Yt]: {
19760
- ...xt[Yt],
19823
+ ...jt[Yt],
19761
19824
  asset: {
19762
- ...xt[Yt].asset,
19763
- height: Jt,
19825
+ ...jt[Yt].asset,
19826
+ height: Ct,
19764
19827
  width: Lt
19765
19828
  }
19766
19829
  }
19767
- } : xt);
19830
+ } : jt);
19768
19831
  }, []), Zt = reactExports.useCallback(() => {
19769
19832
  S && S.focus();
19770
19833
  }, [S]), nt = reactExports.useCallback(
@@ -19782,12 +19845,12 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19782
19845
  G(Yt), Zt();
19783
19846
  },
19784
19847
  [Zt]
19785
- ), Dt = reactExports.useCallback(
19848
+ ), xt = reactExports.useCallback(
19786
19849
  (Yt) => {
19787
19850
  g(Yt), T(Yt), Zt();
19788
19851
  },
19789
19852
  [Zt, T, g]
19790
- ), gt = reactExports.useCallback(
19853
+ ), Dt = reactExports.useCallback(
19791
19854
  ({ pageNumber: Yt }) => {
19792
19855
  it(Yt);
19793
19856
  },
@@ -19797,11 +19860,11 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19797
19860
  [X]
19798
19861
  ), vt = reactExports.useCallback(
19799
19862
  async (Yt, Lt) => {
19800
- const Jt = [];
19863
+ const Ct = [];
19801
19864
  for (let kt = Yt; kt <= Lt; kt++)
19802
- Jt.push(kt + 1);
19803
- const xt = Jt.filter((kt) => !z.current[kt]);
19804
- xt.forEach((kt) => {
19865
+ Ct.push(kt + 1);
19866
+ const jt = Ct.filter((kt) => !z.current[kt]);
19867
+ jt.forEach((kt) => {
19805
19868
  z.current[kt] = {
19806
19869
  asset: {
19807
19870
  hasFormatInColdStorage: !1,
@@ -19816,13 +19879,13 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19816
19879
  loading: !0
19817
19880
  };
19818
19881
  }), Y({ ...z.current });
19819
- const sl = [];
19820
- if (xt.length >= a && a > 0)
19821
- for (let kt = 0; kt < xt.length; kt += a)
19822
- sl.push(d(xt.slice(kt, kt + a)));
19882
+ const el = [];
19883
+ if (jt.length >= a && a > 0)
19884
+ for (let kt = 0; kt < jt.length; kt += a)
19885
+ el.push(d(jt.slice(kt, kt + a)));
19823
19886
  else
19824
- sl.push(d(xt));
19825
- (await Promise.all(sl)).flat().forEach((kt) => {
19887
+ el.push(d(jt));
19888
+ (await Promise.all(el)).flat().forEach((kt) => {
19826
19889
  z.current[kt.pageNumber] && (z.current[kt.pageNumber] = {
19827
19890
  asset: {
19828
19891
  ...kt,
@@ -19847,30 +19910,30 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19847
19910
  updateImageViewSize: Gt
19848
19911
  }),
19849
19912
  [X, Gt]
19850
- ), wt = reactExports.useContext(TranslationContext), [At, Pt] = reactExports.useState(null), [Qt, St] = reactExports.useState(null), { closeMenu: qt, openMenu: ll } = usePopoverMenu(R, At), tl = reactExports.useMemo(() => {
19913
+ ), St = reactExports.useContext(TranslationContext), [At, Pt] = reactExports.useState(null), [Qt, wt] = reactExports.useState(null), { closeMenu: $t, openMenu: ll } = usePopoverMenu(R, At), tl = reactExports.useMemo(() => {
19851
19914
  const Yt = [
19852
19915
  {
19853
19916
  icon: "text_snippet",
19854
- label: wt.term("viewPageDetails"),
19917
+ label: St.term("viewPageDetails"),
19855
19918
  onClick: () => {
19856
- Ut && Ut("VIEW_DETAILS", { pageNumber: Qt }), qt();
19919
+ Ut && Ut("VIEW_DETAILS", { pageNumber: Qt }), $t();
19857
19920
  },
19858
- tooltip: wt.term("openDetailsPopupOnThisBookPage"),
19921
+ tooltip: St.term("openDetailsPopupOnThisBookPage"),
19859
19922
  value: "VIEW_DETAILS"
19860
19923
  }
19861
19924
  ];
19862
19925
  return c && Yt.push({
19863
19926
  icon: "link",
19864
- label: wt.term("getLinkToThisAsset"),
19927
+ label: St.term("getLinkToThisAsset"),
19865
19928
  onClick: () => {
19866
- Ut && Ut("GET_LINK", { pageNumber: Qt }), qt();
19929
+ Ut && Ut("GET_LINK", { pageNumber: Qt }), $t();
19867
19930
  },
19868
- tooltip: wt.term("getLinkToThisAsset"),
19931
+ tooltip: St.term("getLinkToThisAsset"),
19869
19932
  value: "GET_LINK"
19870
19933
  }), Yt;
19871
- }, [qt, Qt, c, Ut, wt]), el = reactExports.useCallback(
19934
+ }, [$t, Qt, c, Ut, St]), sl = reactExports.useCallback(
19872
19935
  (Yt) => {
19873
- const Lt = tl.find((Jt) => Jt.value === Yt.detail.item.value);
19936
+ const Lt = tl.find((Ct) => Ct.value === Yt.detail.item.value);
19874
19937
  Lt && Lt.onClick();
19875
19938
  },
19876
19939
  [tl]
@@ -19880,7 +19943,7 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19880
19943
  {
19881
19944
  trigger: "manual",
19882
19945
  hoist: !0,
19883
- content: wt.term("useKeyboardArrowsToNavigateThroughTheDocument"),
19946
+ content: St.term("useKeyboardArrowsToNavigateThroughTheDocument"),
19884
19947
  ref: P,
19885
19948
  className: "a11y-tooltip",
19886
19949
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -19949,7 +20012,7 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19949
20012
  highlightPosition: st?.pages.find((Lt) => Lt.pageNumber === Yt)?.matchedPositions,
19950
20013
  totalPages: m,
19951
20014
  onContextMenu: (Lt) => {
19952
- L || (Lt.preventDefault(), ll(Lt), St(Yt));
20015
+ L || (Lt.preventDefault(), ll(Lt), wt(Yt));
19953
20016
  }
19954
20017
  },
19955
20018
  Yt
@@ -19967,7 +20030,7 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19967
20030
  pageNumber: bt,
19968
20031
  totalPages: m,
19969
20032
  open: O,
19970
- onItemClick: gt,
20033
+ onItemClick: Dt,
19971
20034
  showCover: u,
19972
20035
  isPageLoaded: _t,
19973
20036
  loadMorePages: vt,
@@ -19987,7 +20050,7 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
19987
20050
  onNextPage: ht,
19988
20051
  onPageChange: it,
19989
20052
  scale: H,
19990
- onScaleChange: Dt,
20053
+ onScaleChange: xt,
19991
20054
  scaleOption: ct,
19992
20055
  pageNumber: bt,
19993
20056
  totalPages: m,
@@ -20005,9 +20068,9 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
20005
20068
  openSearchBox: It,
20006
20069
  onToggleSearchBox: pt,
20007
20070
  onClosedSearchBox: mt,
20008
- pdfSearching: Ft,
20071
+ pdfSearching: Ot,
20009
20072
  imageSearching: ut,
20010
- toggleFullscreen: Ot,
20073
+ toggleFullscreen: Jt,
20011
20074
  fullscreen: L,
20012
20075
  showCover: u,
20013
20076
  setControllerHeight: dt
@@ -20017,7 +20080,7 @@ const ScaleBox = ({ children: l, fullSize: t, height: s, originalHeight: c, orig
20017
20080
  !L && tl.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("cx-popup", { ref: Pt, strategy: "fixed", placement: "right-start", flip: !0, shift: !0, className: "context-menu-popup", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
20018
20081
  "cx-menu",
20019
20082
  {
20020
- "oncx-select": el,
20083
+ "oncx-select": sl,
20021
20084
  className: "context-menu",
20022
20085
  "data-cy": "video-context-menu",
20023
20086
  children: tl.map((Yt) => /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: Yt.tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-menu-item", { value: Yt.value, children: [
@@ -22137,20 +22200,20 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22137
22200
  currentMatch: pt,
22138
22201
  imageSearchResult: It,
22139
22202
  imageSearching: Rt,
22140
- onClosedSearchBox: Ft,
22203
+ onClosedSearchBox: Ot,
22141
22204
  onNextMatch: Kt,
22142
- onOpenSearchBox: Ot,
22205
+ onOpenSearchBox: Jt,
22143
22206
  onPreviousMatch: Ut,
22144
22207
  onSearch: Gt,
22145
22208
  onToggleSearchBox: Zt,
22146
22209
  openSearchBox: nt,
22147
22210
  pdfSearchResult: Mt,
22148
22211
  pdfSearching: Vt,
22149
- pdfTextMatch: Dt,
22150
- textSearch: gt
22212
+ pdfTextMatch: xt,
22213
+ textSearch: Dt
22151
22214
  } = useSearch(t, Xt?.pdf, Wt, M, h, mt), _t = reactExports.useCallback(() => {
22152
- Ot(), D.current?.focusInput();
22153
- }, [Ot]), vt = reactExports.useCallback(() => {
22215
+ Jt(), D.current?.focusInput();
22216
+ }, [Jt]), vt = reactExports.useCallback(() => {
22154
22217
  u();
22155
22218
  }, [u]);
22156
22219
  reactExports.useEffect(() => {
@@ -22160,27 +22223,37 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22160
22223
  return document.addEventListener("fullscreenchange", Nt), () => {
22161
22224
  document.removeEventListener("fullscreenchange", Nt);
22162
22225
  };
22163
- }, [vt]), useBookEvents(U, Z, {
22164
- onNextPage: ut,
22165
- onOpenSearchBox: _t,
22166
- onPageChange: mt,
22167
- onPreviousPage: ot,
22168
- onScaleChange: v,
22169
- onScaleOptionChange: B,
22170
- onZoomIn: ct,
22171
- onZoomOut: ht,
22172
- toggleFullscreen: vt
22173
- }), useBookEvents(A?.instance.wrapperComponent || null, Z, {
22174
- onNextPage: ut,
22175
- onOpenSearchBox: _t,
22176
- onPageChange: mt,
22177
- onPreviousPage: ot,
22178
- onScaleChange: v,
22179
- onScaleOptionChange: B,
22180
- onZoomIn: ct,
22181
- onZoomOut: ht,
22182
- toggleFullscreen: vt
22183
- });
22226
+ }, [vt]), useBookEvents(
22227
+ U,
22228
+ Z,
22229
+ {
22230
+ onNextPage: ut,
22231
+ onOpenSearchBox: _t,
22232
+ onPageChange: mt,
22233
+ onPreviousPage: ot,
22234
+ onScaleChange: v,
22235
+ onScaleOptionChange: B,
22236
+ onZoomIn: ct,
22237
+ onZoomOut: ht,
22238
+ toggleFullscreen: vt
22239
+ },
22240
+ A?.instance.wrapperComponent || null
22241
+ ), useBookEvents(
22242
+ A?.instance.wrapperComponent || null,
22243
+ Z,
22244
+ {
22245
+ onNextPage: ut,
22246
+ onOpenSearchBox: _t,
22247
+ onPageChange: mt,
22248
+ onPreviousPage: ot,
22249
+ onScaleChange: v,
22250
+ onScaleOptionChange: B,
22251
+ onZoomIn: ct,
22252
+ onZoomOut: ht,
22253
+ toggleFullscreen: vt
22254
+ },
22255
+ A?.instance.wrapperComponent || null
22256
+ );
22184
22257
  const Bt = reactExports.useCallback(
22185
22258
  async (Nt = rt) => {
22186
22259
  Nt.forEach((yt) => {
@@ -22194,7 +22267,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22194
22267
  }), X({ ...z.current });
22195
22268
  },
22196
22269
  [rt]
22197
- ), wt = reactExports.useCallback(async (Nt, yt = at) => {
22270
+ ), St = reactExports.useCallback(async (Nt, yt = at) => {
22198
22271
  const Tt = z.current[Nt];
22199
22272
  if (!Tt || !Tt.page)
22200
22273
  return null;
@@ -22206,31 +22279,31 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22206
22279
  const zt = Tt.page.getViewport({ scale: 1 });
22207
22280
  let Ht = zt.height;
22208
22281
  if (y) {
22209
- const al = y.clientHeight;
22210
- al > 0 && (Ht = M === GRID_VIEW_MODE ? al / 2 : al);
22282
+ const dl = y.clientHeight;
22283
+ dl > 0 && (Ht = M === GRID_VIEW_MODE ? dl / 2 : dl);
22211
22284
  }
22212
22285
  const ft = Math.min(Math.max(getDevicePixelRatio(), MIN_CANVAS_SCALE), MAX_CANVAS_SCALE);
22213
- let Et = Ht / zt.height * yt * ft, jt = Tt.page.getViewport({ scale: Et });
22214
- const $t = jt.width * jt.height;
22215
- $t > MAX_CANVAS_PIXELS && (Et *= Math.sqrt(MAX_CANVAS_PIXELS / $t), jt = Tt.page.getViewport({ scale: Et }));
22216
- const Ct = document.createElement("canvas");
22217
- Ct.width = jt.width, Ct.height = jt.height, Ct.style.width = `${jt.width}px`, Ct.style.height = `${jt.height}px`, Ct.style.visibility = "hidden";
22218
- const dl = Ct.getContext("2d", { alpha: !1 });
22219
- if (!dl)
22286
+ let Et = Ht / zt.height * yt * ft, gt = Tt.page.getViewport({ scale: Et });
22287
+ const qt = gt.width * gt.height;
22288
+ qt > MAX_CANVAS_PIXELS && (Et *= Math.sqrt(MAX_CANVAS_PIXELS / qt), gt = Tt.page.getViewport({ scale: Et }));
22289
+ const Ft = document.createElement("canvas");
22290
+ Ft.width = gt.width, Ft.height = gt.height, Ft.style.width = `${gt.width}px`, Ft.style.height = `${gt.height}px`, Ft.style.visibility = "hidden";
22291
+ const il = Ft.getContext("2d", { alpha: !1 });
22292
+ if (!il)
22220
22293
  return null;
22221
- const Wl = {
22294
+ const hl = {
22222
22295
  annotationMode: 1,
22223
- canvasContext: dl,
22224
- viewport: jt
22225
- }, ul = Tt.page.render(Wl);
22226
- Tt.renderTask = ul;
22227
- const Gl = ul;
22296
+ canvasContext: il,
22297
+ viewport: gt
22298
+ }, bl = Tt.page.render(hl);
22299
+ Tt.renderTask = bl;
22300
+ const Wl = bl;
22228
22301
  try {
22229
- await Gl.promise;
22302
+ await Wl.promise;
22230
22303
  } catch {
22231
22304
  return null;
22232
22305
  }
22233
- return Ct.width === 0 || Ct.height === 0 ? null : await createImageBitmap(Ct);
22306
+ return Ft.width === 0 || Ft.height === 0 ? null : await createImageBitmap(Ft);
22234
22307
  }, [at, M, y]), At = async (Nt) => {
22235
22308
  const yt = z.current[Nt];
22236
22309
  if (!yt || !yt.page)
@@ -22252,33 +22325,28 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22252
22325
  ...yt,
22253
22326
  pageNumber: yt.pageNumber
22254
22327
  });
22255
- }, St = reactExports.useCallback(() => {
22256
- y && y.focus();
22257
- }, [y]), qt = reactExports.useCallback(
22328
+ }, wt = reactExports.useCallback(
22258
22329
  (Nt) => {
22259
22330
  Nt.target === Nt.currentTarget && P?.hide();
22260
22331
  },
22261
22332
  [P]
22262
- ), ll = reactExports.useCallback(
22333
+ ), $t = reactExports.useCallback(
22263
22334
  (Nt) => {
22264
22335
  Nt.target === Nt.currentTarget && Nt.key === "Enter" && (U?.focus(), P?.show());
22265
22336
  },
22266
22337
  [P, U]
22267
- ), tl = reactExports.useCallback(
22338
+ ), ll = reactExports.useCallback((Nt) => {
22339
+ o(Nt);
22340
+ }, []), tl = reactExports.useCallback(
22268
22341
  (Nt) => {
22269
- o(Nt), St();
22342
+ B(Nt), v(Nt);
22270
22343
  },
22271
- [St]
22272
- ), el = reactExports.useCallback(
22344
+ [v, B]
22345
+ ), sl = reactExports.useCallback(
22273
22346
  (Nt) => {
22274
- B(Nt), v(Nt), St();
22275
- },
22276
- [St, v, B]
22277
- ), Yt = reactExports.useCallback(
22278
- (Nt) => {
22279
- if (!gt.keyword || !Dt || !nt)
22347
+ if (!Dt.keyword || !xt || !nt)
22280
22348
  return Nt.str;
22281
- const yt = Nt.itemIndex, Tt = Dt[Nt.pageNumber];
22349
+ const yt = Nt.itemIndex, Tt = xt[Nt.pageNumber];
22282
22350
  if (!Tt)
22283
22351
  return Nt.str;
22284
22352
  const zt = Tt.filter(
@@ -22288,12 +22356,12 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22288
22356
  return Nt.str;
22289
22357
  let Ht = Nt.str;
22290
22358
  return zt.reverse().forEach((ft) => {
22291
- const Et = ft.begin.divIdx === yt ? ft.begin.offset : 0, jt = ft.end.divIdx === yt ? ft.end.offset : Ht.length, $t = Ht.substring(0, Et), Ct = Ht.substring(Et, jt), dl = Ht.substring(jt);
22292
- Ht = `${$t}<mark class="${ft.matchOrder === pt ? "active" : ""}">${Ct}</mark>${dl}`;
22359
+ const Et = ft.begin.divIdx === yt ? ft.begin.offset : 0, gt = ft.end.divIdx === yt ? ft.end.offset : Ht.length, qt = Ht.substring(0, Et), Ft = Ht.substring(Et, gt), il = Ht.substring(gt);
22360
+ Ht = `${qt}<mark class="${ft.matchOrder === pt ? "active" : ""}">${Ft}</mark>${il}`;
22293
22361
  }), Ht;
22294
22362
  },
22295
- [gt, Dt, nt, pt]
22296
- ), Lt = reactExports.useCallback(
22363
+ [Dt, xt, nt, pt]
22364
+ ), Yt = reactExports.useCallback(
22297
22365
  ({ pageNumber: Nt }) => {
22298
22366
  mt(Nt);
22299
22367
  },
@@ -22315,7 +22383,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22315
22383
  yt.bitmap?.close(), yt.bitmap = void 0, yt.isRendering = !1;
22316
22384
  }), X({ ...z.current }));
22317
22385
  }, [M]);
22318
- const Jt = reactExports.useRef(null);
22386
+ const Lt = reactExports.useRef(null);
22319
22387
  reactExports.useEffect(() => {
22320
22388
  const Nt = async () => {
22321
22389
  if (!k.current.length)
@@ -22324,8 +22392,8 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22324
22392
  if (!Tt || yt && Tt.pageNumber === yt.pageNumber || !Tt)
22325
22393
  return;
22326
22394
  const zt = Tt.pageNumber;
22327
- Jt.current = zt;
22328
- const Ht = await wt(zt);
22395
+ Lt.current = zt;
22396
+ const Ht = await St(zt);
22329
22397
  if (Ht) {
22330
22398
  if (k.current = k.current.filter((Et) => Et !== zt), z.current[zt]) {
22331
22399
  const Et = z.current[zt].bitmap;
@@ -22335,22 +22403,22 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22335
22403
  if (Object.values(z.current).length >= MAX_STORED_PAGES) {
22336
22404
  z.current = omitBy(
22337
22405
  z.current,
22338
- (jt) => !jt.bitmap && !ft.includes(jt.pageNumber)
22406
+ (gt) => !gt.bitmap && !ft.includes(gt.pageNumber)
22339
22407
  );
22340
22408
  const Et = Object.values(z.current);
22341
22409
  if (Et.length >= MAX_STORED_PAGES) {
22342
- let jt = null, $t = null;
22343
- for (const Ct of Et)
22344
- ft.includes(Ct.pageNumber) || (!Ct.visitedAt && Ct.renderedAt && (!jt?.renderedAt || Ct.renderedAt < jt.renderedAt) && (jt = Ct), Ct.visitedAt && (!$t?.visitedAt || Ct.visitedAt < $t.visitedAt) && ($t = Ct));
22345
- jt ? (jt.bitmap?.close(), delete z.current[jt.pageNumber]) : $t && ($t.bitmap?.close(), delete z.current[$t.pageNumber]);
22410
+ let gt = null, qt = null;
22411
+ for (const Ft of Et)
22412
+ ft.includes(Ft.pageNumber) || (!Ft.visitedAt && Ft.renderedAt && (!gt?.renderedAt || Ft.renderedAt < gt.renderedAt) && (gt = Ft), Ft.visitedAt && (!qt?.visitedAt || Ft.visitedAt < qt.visitedAt) && (qt = Ft));
22413
+ gt ? (gt.bitmap?.close(), delete z.current[gt.pageNumber]) : qt && (qt.bitmap?.close(), delete z.current[qt.pageNumber]);
22346
22414
  }
22347
22415
  }
22348
- X({ ...z.current }), L(k.current), zt === Jt.current && Nt();
22416
+ X({ ...z.current }), L(k.current), zt === Lt.current && Nt();
22349
22417
  }
22350
22418
  };
22351
22419
  Nt();
22352
- }, [wt, Y, Wt, N, y]);
22353
- const xt = reactExports.useMemo(
22420
+ }, [St, Y, Wt, N, y]);
22421
+ const Ct = reactExports.useMemo(
22354
22422
  () => _debounce(
22355
22423
  (Nt) => {
22356
22424
  Object.keys(z.current).forEach((yt) => {
@@ -22368,11 +22436,11 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22368
22436
  ),
22369
22437
  []
22370
22438
  );
22371
- reactExports.useEffect(() => (xt(at), () => xt.cancel()), [at, xt]), reactExports.useEffect(() => {
22439
+ reactExports.useEffect(() => (Ct(at), () => Ct.cancel()), [at, Ct]), reactExports.useEffect(() => {
22372
22440
  if (!Z)
22373
22441
  return;
22374
22442
  const Nt = () => {
22375
- xt.cancel();
22443
+ Ct.cancel();
22376
22444
  const yt = Object.values(z.current);
22377
22445
  Xt?.pdf && yt.forEach((Tt) => {
22378
22446
  Tt.bitmap?.close(), Tt.page && (Tt.renderTask && Tt.renderTask.cancel(), Tt.page.cleanup());
@@ -22381,8 +22449,8 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22381
22449
  return O.current.onClosed && O.current.onClosed(Nt), () => {
22382
22450
  Nt();
22383
22451
  };
22384
- }, [xt, Xt?.pdf, Z]);
22385
- const sl = reactExports.useMemo(
22452
+ }, [Ct, Xt?.pdf, Z]);
22453
+ const jt = reactExports.useMemo(
22386
22454
  () => ({
22387
22455
  onLoadedPDFPageProxy: Pt,
22388
22456
  pageViews: G,
@@ -22406,29 +22474,29 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22406
22474
  }, At(Tt);
22407
22475
  });
22408
22476
  }, [it, at]);
22409
- const cl = reactExports.useContext(TranslationContext), [nl, kt] = reactExports.useState(null), [Zl, ml] = reactExports.useState(null), { closeMenu: bl, openMenu: ol } = usePopoverMenu(U, nl), il = reactExports.useMemo(() => d ? [
22477
+ const el = reactExports.useContext(TranslationContext), [al, nl] = reactExports.useState(null), [kt, ul] = reactExports.useState(null), { closeMenu: Zl, openMenu: ml } = usePopoverMenu(U, al), cl = reactExports.useMemo(() => d ? [
22410
22478
  {
22411
22479
  icon: "link",
22412
- label: cl.term("getLinkToThisAsset"),
22480
+ label: el.term("getLinkToThisAsset"),
22413
22481
  onClick: () => {
22414
- Qt && Qt("GET_LINK", { pageNumber: Zl }), bl();
22482
+ Qt && Qt("GET_LINK", { pageNumber: kt }), Zl();
22415
22483
  },
22416
- tooltip: cl.term("getLinkToThisAsset"),
22484
+ tooltip: el.term("getLinkToThisAsset"),
22417
22485
  value: "GET_LINK"
22418
22486
  }
22419
- ] : [], [bl, Zl, d, cl, Qt]), hl = reactExports.useCallback(
22487
+ ] : [], [Zl, kt, d, el, Qt]), ol = reactExports.useCallback(
22420
22488
  (Nt) => {
22421
- const yt = il.find((Tt) => Tt.value === Nt.detail.item.value);
22489
+ const yt = cl.find((Tt) => Tt.value === Nt.detail.item.value);
22422
22490
  yt && yt.onClick();
22423
22491
  },
22424
- [il]
22492
+ [cl]
22425
22493
  );
22426
22494
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
22427
22495
  "cx-tooltip",
22428
22496
  {
22429
22497
  trigger: "manual",
22430
22498
  hoist: !0,
22431
- content: cl.term("useKeyboardArrowsToNavigateThroughTheDocument"),
22499
+ content: el.term("useKeyboardArrowsToNavigateThroughTheDocument"),
22432
22500
  ref: lt,
22433
22501
  className: "a11y-tooltip",
22434
22502
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -22439,10 +22507,10 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22439
22507
  tabIndex: 0,
22440
22508
  ref: R,
22441
22509
  className: "focus-root w-full h-full no-gap",
22442
- onBlur: qt,
22443
- onKeyDown: ll,
22510
+ onBlur: wt,
22511
+ onKeyDown: $t,
22444
22512
  children: [
22445
- /* @__PURE__ */ jsxRuntimeExports.jsxs(BookContext.Provider, { value: sl, children: [
22513
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(BookContext.Provider, { value: jt, children: [
22446
22514
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
22447
22515
  "cx-space",
22448
22516
  {
@@ -22452,7 +22520,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22452
22520
  tabIndex: -1,
22453
22521
  ref: f,
22454
22522
  className: "relative flex-full no-gap z-10 content-focus-root",
22455
- onBlur: qt,
22523
+ onBlur: wt,
22456
22524
  children: [
22457
22525
  /* @__PURE__ */ jsxRuntimeExports.jsx(
22458
22526
  "div",
@@ -22494,7 +22562,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22494
22562
  width: J?.width,
22495
22563
  error: /* @__PURE__ */ jsxRuntimeExports.jsx(PageError, { pageWidth: J?.width }),
22496
22564
  loading: /* @__PURE__ */ jsxRuntimeExports.jsx(PageLoading, { fullSize: !0 }),
22497
- customTextRenderer: Yt,
22565
+ customTextRenderer: sl,
22498
22566
  currentMatch: pt,
22499
22567
  openSearchBox: nt,
22500
22568
  onFireEvent: Qt,
@@ -22503,7 +22571,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22503
22571
  fullscreen: I,
22504
22572
  containerElement: U,
22505
22573
  onContextMenu: (yt) => {
22506
- I || (yt.preventDefault(), ol(yt), ml(Nt));
22574
+ I || (yt.preventDefault(), ml(yt), ul(Nt));
22507
22575
  }
22508
22576
  },
22509
22577
  Nt
@@ -22521,7 +22589,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22521
22589
  pageNumber: Wt,
22522
22590
  totalPages: Z,
22523
22591
  open: T,
22524
- onItemClick: Lt,
22592
+ onItemClick: Yt,
22525
22593
  showCover: N,
22526
22594
  pageHeight: it?.height || 0,
22527
22595
  pageWidth: it?.width || 0,
@@ -22541,14 +22609,14 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22541
22609
  onNextPage: ut,
22542
22610
  onPageChange: mt,
22543
22611
  scale: at,
22544
- onScaleChange: el,
22612
+ onScaleChange: tl,
22545
22613
  scaleOption: bt,
22546
22614
  pageNumber: Wt,
22547
22615
  totalPages: Z,
22548
22616
  onZoomIn: ct,
22549
22617
  onZoomOut: ht,
22550
22618
  viewMode: M,
22551
- onViewModeChange: tl,
22619
+ onViewModeChange: ll,
22552
22620
  onNextMatch: Kt,
22553
22621
  onPreviousMatch: Ut,
22554
22622
  onSearch: Gt,
@@ -22558,7 +22626,7 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22558
22626
  imageSearchResult: It,
22559
22627
  openSearchBox: nt,
22560
22628
  onToggleSearchBox: Zt,
22561
- onClosedSearchBox: Ft,
22629
+ onClosedSearchBox: Ot,
22562
22630
  pdfSearching: Vt,
22563
22631
  imageSearching: Rt,
22564
22632
  toggleFullscreen: vt,
@@ -22568,13 +22636,13 @@ const ThumbnailItem = ({ data: l, index: t, style: s }) => {
22568
22636
  }
22569
22637
  )
22570
22638
  ] }),
22571
- !I && il.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("cx-popup", { ref: kt, strategy: "fixed", placement: "right-start", flip: !0, shift: !0, className: "context-menu-popup", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22639
+ !I && cl.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("cx-popup", { ref: nl, strategy: "fixed", placement: "right-start", flip: !0, shift: !0, className: "context-menu-popup", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
22572
22640
  "cx-menu",
22573
22641
  {
22574
- "oncx-select": hl,
22642
+ "oncx-select": ol,
22575
22643
  className: "context-menu",
22576
22644
  "data-cy": "video-context-menu",
22577
- children: il.map((Nt) => /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: Nt.tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-menu-item", { value: Nt.value, children: [
22645
+ children: cl.map((Nt) => /* @__PURE__ */ jsxRuntimeExports.jsx("cx-tooltip", { hoist: !0, content: Nt.tooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("cx-menu-item", { value: Nt.value, children: [
22578
22646
  /* @__PURE__ */ jsxRuntimeExports.jsx("cx-icon", { slot: "prefix", name: Nt.icon }),
22579
22647
  Nt.label
22580
22648
  ] }) }, Nt.value))
@@ -23305,16 +23373,16 @@ function createFormControl(l = {}) {
23305
23373
  };
23306
23374
  if (mt) {
23307
23375
  let rt, Xt;
23308
- const pt = ot(), It = J.type === EVENTS.BLUR || J.type === EVENTS.FOCUS_OUT, Rt = !hasValidation(mt._f) && !t.resolver && !get(s.errors, st) && !mt._f.deps || skipValidation(It, get(s.touchedFields, st), s.isSubmitted, M, W), Ft = isWatched(st, h, It);
23376
+ const pt = ot(), It = J.type === EVENTS.BLUR || J.type === EVENTS.FOCUS_OUT, Rt = !hasValidation(mt._f) && !t.resolver && !get(s.errors, st) && !mt._f.deps || skipValidation(It, get(s.touchedFields, st), s.isSubmitted, M, W), Ot = isWatched(st, h, It);
23309
23377
  set(a, st, pt), It ? (mt._f.onBlur && mt._f.onBlur(J), N && N(0)) : mt._f.onChange && mt._f.onChange(J);
23310
- const Kt = R(st, pt, It, !1), Ot = !isEmptyObject(Kt) || Ft;
23378
+ const Kt = R(st, pt, It, !1), Jt = !isEmptyObject(Kt) || Ot;
23311
23379
  if (!It && m.values.next({
23312
23380
  name: st,
23313
23381
  type: J.type,
23314
23382
  values: { ...a }
23315
23383
  }), Rt)
23316
- return Z.isValid && X(), Ot && m.state.next({ name: st, ...Ft ? {} : Kt });
23317
- if (!It && Ft && m.state.next({ ...s }), t.resolver) {
23384
+ return Z.isValid && X(), Jt && m.state.next({ name: st, ...Ot ? {} : Kt });
23385
+ if (!It && Ot && m.state.next({ ...s }), t.resolver) {
23318
23386
  const { errors: Ut } = await f([st]);
23319
23387
  if (Wt(pt), ut) {
23320
23388
  const Gt = schemaErrorLookup(s.errors, c, st), Zt = schemaErrorLookup(Ut, c, Gt.name || st);