@nulib/clover 4.1.0 → 4.2.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 (253) hide show
  1. package/dist/components/Body/useControlsVisibility.mjs +35 -13
  2. package/dist/components/Panel/Panel.mjs +47 -59
  3. package/dist/components/Panel/sections.mjs +62 -0
  4. package/dist/index.d.mts +70 -6
  5. package/dist/index.mjs +2 -0
  6. package/dist/lib/pointer.mjs +1 -1
  7. package/dist/styles.css +1 -1
  8. package/dist/templates/default/Default.mjs +5 -0
  9. package/dist/templates/document/Document.mjs +10 -1
  10. package/dist/templates/gallery/Gallery.mjs +4 -0
  11. package/dist/templates/index.d.mts +68 -3
  12. package/dist/templates/shared/LightboxView.mjs +5 -0
  13. package/dist/templates/shared/PanelPane.mjs +13 -1
  14. package/dist/web-components/{About-DvyvVUK5.mjs → About-D1TBGGPL.mjs} +1 -1
  15. package/dist/web-components/{AnnotationItems-BpRcSrOM.mjs → AnnotationItems-DTacmRA9.mjs} +1 -1
  16. package/dist/web-components/{AnnotationMenu-BDPec3iI.mjs → AnnotationMenu-DYc9ekWS.mjs} +1 -1
  17. package/dist/web-components/{AnnotationState-Chs_37Kk.mjs → AnnotationState--5ghW0C2.mjs} +1 -1
  18. package/dist/web-components/{Annotations-CLPEq7Ro.mjs → Annotations-BG8lPjk1.mjs} +1 -1
  19. package/dist/web-components/{Annotations-6E-oD_wg.mjs → Annotations-Bvc_FmJ5.mjs} +1 -1
  20. package/dist/web-components/{Body-Ct61yxI7.mjs → Body-QQ1DmnbP.mjs} +1 -1
  21. package/dist/web-components/{BodyAlert-C_Qh3Up_.mjs → BodyAlert-A4xRjOKr.mjs} +1 -1
  22. package/dist/web-components/{Button-L8ZMy5lY.mjs → Button-Cx6VE_UW.mjs} +1 -1
  23. package/dist/web-components/{Camera-BPyLzZjP.mjs → Camera-DqT_1MgD.mjs} +1 -1
  24. package/dist/web-components/{Canvas2DBackend-8wFavYdl.mjs → Canvas2DBackend-TZtR3zHf.mjs} +1 -1
  25. package/dist/web-components/{CanvasView-2Fj9nT06.mjs → CanvasView-DxZASM9E.mjs} +1 -1
  26. package/dist/web-components/{CaptionDetails-DuwS-grE.mjs → CaptionDetails-DMRWmtaY.mjs} +1 -1
  27. package/dist/web-components/{ChaptersMenu-Bj2EqtVJ.mjs → ChaptersMenu-BAZVVDrK.mjs} +1 -1
  28. package/dist/web-components/{Chevron-Cyr_cc9X.mjs → Chevron-DFGbSGPI.mjs} +1 -1
  29. package/dist/web-components/{ChoiceMenu-ConzybVH.mjs → ChoiceMenu-C80kdxvq.mjs} +1 -1
  30. package/dist/web-components/{Collection-CLayN8sv.mjs → Collection-B4CxBsFL.mjs} +1 -1
  31. package/dist/web-components/{CollectionSelect-D2d8dGJ4.mjs → CollectionSelect-DO8YO2p7.mjs} +1 -1
  32. package/dist/web-components/{Connected-pyd0EBD3.mjs → Connected-CcbVqzmj.mjs} +1 -1
  33. package/dist/web-components/{Connected-CBQ6xyhr.mjs → Connected-DthCPaHl.mjs} +1 -1
  34. package/dist/web-components/{Connected-DMXG3imZ.mjs → Connected-sYBn_9MK.mjs} +1 -1
  35. package/dist/web-components/{Contents-tCMXBYDK.mjs → Contents-AVPYYXht.mjs} +1 -1
  36. package/dist/web-components/{ControlMenu-D1zkB0qX.mjs → ControlMenu-BjJsWnuZ.mjs} +1 -1
  37. package/dist/web-components/ControlsFade-C-6WhSxB.mjs +1 -0
  38. package/dist/web-components/{CountMenu-Dnzb7lKo.mjs → CountMenu-Dx8D_RJZ.mjs} +1 -1
  39. package/dist/web-components/Cue-xuo5dgKE.mjs +1 -0
  40. package/dist/web-components/Document-BWdafeEi.mjs +1 -0
  41. package/dist/web-components/{DomLayers-BxPU05-D.mjs → DomLayers-DlRapZ1u.mjs} +1 -1
  42. package/dist/web-components/{Download-Bku9Vptk.mjs → Download-Ci_JUTVd.mjs} +1 -1
  43. package/dist/web-components/{EntryBodies-77vDudCb.mjs → EntryBodies-C0ICfS2R.mjs} +1 -1
  44. package/dist/web-components/{EntryThumbnail-BxQWKW6e.mjs → EntryThumbnail-DxHhfRo_.mjs} +1 -1
  45. package/dist/web-components/{FieldPill-nFGsaru9.mjs → FieldPill-CVfeeafm.mjs} +1 -1
  46. package/dist/web-components/{FrameAnimation-BvKiSXcm.mjs → FrameAnimation-AZpVvu0R.mjs} +1 -1
  47. package/dist/web-components/{Gallery-4Hd58afA.mjs → Gallery-C2PTJmvN.mjs} +1 -1
  48. package/dist/web-components/{HideToggle-TEhY4TS4.mjs → HideToggle-0nlIo-f8.mjs} +1 -1
  49. package/dist/web-components/{ImageControls-CZO7WoPb.mjs → ImageControls-tKVAMpaj.mjs} +1 -1
  50. package/dist/web-components/{Items-CudZ4Lnb.mjs → Items-Drd82_Jj.mjs} +1 -1
  51. package/dist/web-components/{Label-f07N5Fld.mjs → Label-BIjqJ-_T.mjs} +1 -1
  52. package/dist/web-components/{LanguageChoice-B5VM21DV.mjs → LanguageChoice-DkSc-n6g.mjs} +1 -1
  53. package/dist/web-components/LightboxView-Cuqx2H1m.mjs +1 -0
  54. package/dist/web-components/{ListEnd-M39M62Cl.mjs → ListEnd-pq-BgaDI.mjs} +1 -1
  55. package/dist/web-components/{Loaded-oGFyBuos.mjs → Loaded-CSO5NFhm.mjs} +1 -1
  56. package/dist/web-components/{LoadedCanvas-IvpSzPO6.mjs → LoadedCanvas-DK6xMmM1.mjs} +1 -1
  57. package/dist/web-components/LoadedMap-DmPH-LKY.mjs +1 -0
  58. package/dist/web-components/{Loading-YxuKrDAM.mjs → Loading-CoJLSRkv.mjs} +1 -1
  59. package/dist/web-components/{Map-Cw9j3gi3.mjs → Map-BEVtD52O.mjs} +1 -1
  60. package/dist/web-components/{MapView-3OxoCr5l.mjs → MapView-DHJcn9gW.mjs} +2 -2
  61. package/dist/web-components/{Markup-DW75Jx3j.mjs → Markup-Hm6bWOjm.mjs} +1 -1
  62. package/dist/web-components/{MediaBody-CLtd0bf0.mjs → MediaBody-BpgNtpKZ.mjs} +1 -1
  63. package/dist/web-components/{MediaBody-JnKnoIqY.mjs → MediaBody-Co23JjUJ.mjs} +1 -1
  64. package/dist/web-components/{NavDate-BCCOyycx.mjs → NavDate-CYNK0Qmp.mjs} +1 -1
  65. package/dist/web-components/{Navigator-Bx4zS0Yr.mjs → Navigator-DrYPepzN.mjs} +1 -1
  66. package/dist/web-components/{Pager-B9GvQ64b.mjs → Pager-CN4lHURv.mjs} +1 -1
  67. package/dist/web-components/{PagerLayout-BF33VZL_.mjs → PagerLayout-DeqnSQcF.mjs} +1 -1
  68. package/dist/web-components/Panel-CFYUlXup.mjs +1 -0
  69. package/dist/web-components/PanelPart-CpUIRbxr.mjs +1 -0
  70. package/dist/web-components/{PanelToggle-bPcIULGZ.mjs → PanelToggle-9ud55NNI.mjs} +1 -1
  71. package/dist/web-components/{PartOfManifest-HLg-r00O.mjs → PartOfManifest-KUHUq-6q.mjs} +1 -1
  72. package/dist/web-components/{Pending-BxGjjnqq.mjs → Pending-mcmdyZPA.mjs} +1 -1
  73. package/dist/web-components/{PlaceBox-D-Zhe9-U.mjs → PlaceBox-DX4ZLDat.mjs} +1 -1
  74. package/dist/web-components/{Placeholder-DzY5hcbk.mjs → Placeholder-0hE8q-SY.mjs} +1 -1
  75. package/dist/web-components/{Position-TYnzcm8e.mjs → Position-DO5qg5Sp.mjs} +1 -1
  76. package/dist/web-components/{Primitives-C6VJXxZD.mjs → Primitives-c9sIz0oQ.mjs} +1 -1
  77. package/dist/web-components/{Provider-DyB0wpeO.mjs → Provider-a3xY016W.mjs} +1 -1
  78. package/dist/web-components/{ReadMore-De_0T7lc.mjs → ReadMore-D_WmmKEP.mjs} +1 -1
  79. package/dist/web-components/{Root-Bt3NNBFb.mjs → Root-CU1o0wje.mjs} +1 -1
  80. package/dist/web-components/Scene-CboEeptc.mjs +1 -0
  81. package/dist/web-components/SceneView-hcc78jQT.mjs +1 -0
  82. package/dist/web-components/{Search-DgT8OPsK.mjs → Search-BgxEW1UT.mjs} +1 -1
  83. package/dist/web-components/{Sections-d1acn7qm.mjs → Sections-DZVrhoAC.mjs} +1 -1
  84. package/dist/web-components/{StandaloneItems-DUb4YKCB.mjs → StandaloneItems-6cSw7nbF.mjs} +1 -1
  85. package/dist/web-components/{Status-CcU3u6P4.mjs → Status-DHTzuTkh.mjs} +1 -1
  86. package/dist/web-components/{Steps-nlSCzbDQ.mjs → Steps-Dkpy9KiJ.mjs} +1 -1
  87. package/dist/web-components/{TargetItems-BDJM3Ar-.mjs → TargetItems-CyOI9_Z4.mjs} +1 -1
  88. package/dist/web-components/Timeline-B9tD3Rar.mjs +1 -0
  89. package/dist/web-components/{Tip-OCB88zwY.mjs → Tip-nJSTYquc.mjs} +1 -1
  90. package/dist/web-components/{Transcript-bSA3cx_K.mjs → Transcript-WvFFAJQM.mjs} +1 -1
  91. package/dist/web-components/{Transport-DjOYI-fR.mjs → Transport-FxLp_bdW.mjs} +1 -1
  92. package/dist/web-components/Transport-VUxSEIQO.mjs +1 -0
  93. package/dist/web-components/{annotation-collection-D8emkElk.mjs → annotation-collection-BkC3nBPA.mjs} +1 -1
  94. package/dist/web-components/{annotation-name-DbWjhgra.mjs → annotation-name-Du2KAWoD.mjs} +1 -1
  95. package/dist/web-components/{annotations-content-Bg6aVAGC.mjs → annotations-content-CEzAS-P2.mjs} +1 -1
  96. package/dist/web-components/{body-Ct8dmQdW.mjs → body-DPlfbLt3.mjs} +1 -1
  97. package/dist/web-components/{canvas-goEZLqEd.mjs → canvas-BUwBftJW.mjs} +1 -1
  98. package/dist/web-components/{cloverEngine-Df7cMwOP.mjs → cloverEngine-UNw5K4Xg.mjs} +1 -1
  99. package/dist/web-components/{content-state-reader-CNmBpG1L.mjs → content-state-reader-GgQF2MvJ.mjs} +1 -1
  100. package/dist/web-components/{controls-BZr16sYQ.mjs → controls-CC9G5LxK.mjs} +1 -1
  101. package/dist/web-components/custom-elements.json +31 -1
  102. package/dist/web-components/{downloads-EjJ6Hpip.mjs → downloads-CmAYeEIz.mjs} +1 -1
  103. package/dist/web-components/{dragToClose-X9NbZOhA.mjs → dragToClose-DK-eM097.mjs} +1 -1
  104. package/dist/web-components/{engine-DMoc0tff.mjs → engine-Dok0z8WP.mjs} +1 -1
  105. package/dist/web-components/{engines-BmB81VXR.mjs → engines-BD2IfwQF.mjs} +1 -1
  106. package/dist/web-components/{fetchManifest-CwQC6cCh.mjs → fetchManifest-tQXcfFiz.mjs} +1 -1
  107. package/dist/web-components/{fromManifest-DrAmY1lB.mjs → fromManifest-BwQdeAuL.mjs} +1 -1
  108. package/dist/web-components/{glyphs-BFK_hvJJ.mjs → glyphs-dp_HK3Ja.mjs} +1 -1
  109. package/dist/web-components/{hooks-BhtNDs_1.mjs → hooks-C4dJ5K_D.mjs} +1 -1
  110. package/dist/web-components/{image-layers-D2nQC4R-.mjs → image-layers-xcBsiad9.mjs} +1 -1
  111. package/dist/web-components/{imageService-iFElsopt.mjs → imageService-4sFnmAFX.mjs} +1 -1
  112. package/dist/web-components/index-DspT4wUm.mjs +1 -0
  113. package/dist/web-components/index.d.mts +1 -1
  114. package/dist/web-components/index.mjs +1 -1
  115. package/dist/web-components/{items-BnEnc5ot.mjs → items-BUmOy2QY.mjs} +1 -1
  116. package/dist/web-components/items-CWMI53aN.mjs +1 -0
  117. package/dist/web-components/label-BGjL7I4b.mjs +1 -0
  118. package/dist/web-components/{layout-Djwu8f4R.mjs → layout-B29v2RKK.mjs} +1 -1
  119. package/dist/web-components/{link-0lUlTZlw.mjs → link-Ct5PpHEY.mjs} +1 -1
  120. package/dist/web-components/logo-BFstM-0a.mjs +1 -0
  121. package/dist/web-components/{models-BF2pqufA.mjs → models-BXcT4ijX.mjs} +1 -1
  122. package/dist/web-components/{nodes-ChQRLDGU.mjs → nodes-BleXuYE6.mjs} +1 -1
  123. package/dist/web-components/{overlayImage-MKrcgDep.mjs → overlayImage-BJtfot4Y.mjs} +1 -1
  124. package/dist/web-components/{panel-C13V6w6E.mjs → panel-BxxV_JkD.mjs} +1 -1
  125. package/dist/web-components/part-D4gjnYmT.mjs +1 -0
  126. package/dist/web-components/{playerSurface-DG1XipTq.mjs → playerSurface-BXNLaFk0.mjs} +1 -1
  127. package/dist/web-components/{pointer-YQppt0at.mjs → pointer-CJELU3gI.mjs} +1 -1
  128. package/dist/web-components/{provider-DiUkZYiW.mjs → provider-CPp0Sgr_.mjs} +1 -1
  129. package/dist/web-components/{range-regions-CqGjyM76.mjs → range-regions-DAaOu0IS.mjs} +1 -1
  130. package/dist/web-components/{read-more-D8RJYdtQ.mjs → read-more-lcqGslUd.mjs} +1 -1
  131. package/dist/web-components/{readingLanguages-BWOLZK2k.mjs → readingLanguages-FyVsSWJ8.mjs} +1 -1
  132. package/dist/web-components/{rendererSurface-BkbGDL_Z.mjs → rendererSurface-nh6-EfuZ.mjs} +2 -2
  133. package/dist/web-components/{renderers-LtRX5pT0.mjs → renderers-BFS7hFVU.mjs} +1 -1
  134. package/dist/web-components/{resource-Cfydiy4m.mjs → resource-Bufu7lAr.mjs} +1 -1
  135. package/dist/web-components/{save-file-dZyOpXgY.mjs → save-file-CoknKOPz.mjs} +1 -1
  136. package/dist/web-components/{search-BfUZJM3a.mjs → search-5ocrsYmT.mjs} +1 -1
  137. package/dist/web-components/{shared-DkY2a89G.mjs → shared-DFAX0n3B.mjs} +1 -1
  138. package/dist/web-components/{show-link-DgLJzG7k.mjs → show-link-DBaJj4s_.mjs} +1 -1
  139. package/dist/web-components/{sizedImage-NHzhcBYk.mjs → sizedImage-jnOGcIIZ.mjs} +1 -1
  140. package/dist/web-components/{split-CuFiKjin.mjs → split-P6J0qqf5.mjs} +1 -1
  141. package/dist/web-components/{status-C3etlkhY.mjs → status-honoOMNx.mjs} +1 -1
  142. package/dist/web-components/styles-BwkYiCLC.mjs +1 -0
  143. package/dist/web-components/three.mjs +1 -1
  144. package/dist/web-components/{thumbnail-DecrVnpj.mjs → thumbnail-EbURh-UM.mjs} +1 -1
  145. package/dist/web-components/{tip-D5YgaIWW.mjs → tip-BhNI83aT.mjs} +1 -1
  146. package/dist/web-components/{toggle-CZGB65VZ.mjs → toggle-CJKdi5KH.mjs} +1 -1
  147. package/dist/web-components/{useContainerName-hKQjEt7a.mjs → useContainerName-_48Cdi0m.mjs} +1 -1
  148. package/dist/web-components/useControlsVisibility-CieBxGnK.mjs +1 -0
  149. package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +1 -0
  150. package/dist/web-components/{useNearViewport-CDbHQUBk.mjs → useNearViewport-B34ebmIW.mjs} +1 -1
  151. package/dist/web-components/{useScrollTrack-D9l_P3_B.mjs → useScrollTrack-DgRGFeP5.mjs} +1 -1
  152. package/dist/web-components/viewer/{AnnotationItems-DtsnDXPM.mjs → AnnotationItems-BNA_92Dv.mjs} +1 -1
  153. package/dist/web-components/viewer/{AnnotationMenu-C-Mz6CCn.mjs → AnnotationMenu-BIQYVR4N.mjs} +1 -1
  154. package/dist/web-components/viewer/{AnnotationState-5pim5K72.mjs → AnnotationState-BbwQqA1U.mjs} +1 -1
  155. package/dist/web-components/viewer/{Annotations-Cqn1TkzD.mjs → Annotations-CZzOZAFP.mjs} +1 -1
  156. package/dist/web-components/viewer/{Annotations-CxwN9FkB.mjs → Annotations-P4XzAlNc.mjs} +1 -1
  157. package/dist/web-components/viewer/{Canvas2DBackend-C-ZMSCak.mjs → Canvas2DBackend-DFfCzyjL.mjs} +1 -1
  158. package/dist/web-components/viewer/{CaptionDetails-CRD-gSZP.mjs → CaptionDetails-DPtE-RQQ.mjs} +1 -1
  159. package/dist/web-components/viewer/{ChaptersMenu-Brcq3yJv.mjs → ChaptersMenu-D6Jmujag.mjs} +1 -1
  160. package/dist/web-components/viewer/{ChoiceMenu-ByGzQQx1.mjs → ChoiceMenu-GkqyTQRQ.mjs} +1 -1
  161. package/dist/web-components/viewer/{Collection-m0GCcsfQ.mjs → Collection-DjY_6qa6.mjs} +1 -1
  162. package/dist/web-components/viewer/{Connected-Dvx7wtot.mjs → Connected-D5T-mtiy.mjs} +1 -1
  163. package/dist/web-components/viewer/Connected-DIOuI3Mv.mjs +1 -0
  164. package/dist/web-components/viewer/{Contents-CwDpfiJY.mjs → Contents-DV-VxXuf.mjs} +1 -1
  165. package/dist/web-components/viewer/{ControlMenu-TcO85hDf.mjs → ControlMenu-BsEpff6N.mjs} +1 -1
  166. package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +1 -0
  167. package/dist/web-components/viewer/{CountMenu-0-ie8kIZ.mjs → CountMenu-DCmA6HdK.mjs} +1 -1
  168. package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +1 -0
  169. package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +1 -0
  170. package/dist/web-components/viewer/{DomLayers-hc0qARQc.mjs → DomLayers-BCwCxPDU.mjs} +1 -1
  171. package/dist/web-components/viewer/{Download-MO-1Rik4.mjs → Download-CL4IClAD.mjs} +1 -1
  172. package/dist/web-components/viewer/{EntryBodies-g-OEwEsk.mjs → EntryBodies-e40y47bl.mjs} +1 -1
  173. package/dist/web-components/viewer/{EntryThumbnail-DcIDYATi.mjs → EntryThumbnail-B_dP3w4o.mjs} +1 -1
  174. package/dist/web-components/viewer/{FieldPill-B9S21lxw.mjs → FieldPill-Hse1cDBE.mjs} +1 -1
  175. package/dist/web-components/viewer/{FrameAnimation-qI9cZPEs.mjs → FrameAnimation-CE218DCr.mjs} +1 -1
  176. package/dist/web-components/viewer/{Gallery-BOgUqfqw.mjs → Gallery-F2sVj4ph.mjs} +1 -1
  177. package/dist/web-components/viewer/{HideToggle-D8wH49mq.mjs → HideToggle-CYoqe_ez.mjs} +1 -1
  178. package/dist/web-components/viewer/{ImageControls-ZoEC9jWd.mjs → ImageControls-C2G4x2Es.mjs} +1 -1
  179. package/dist/web-components/viewer/{LanguageChoice-CRqsCBAp.mjs → LanguageChoice-BmO-322r.mjs} +1 -1
  180. package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +1 -0
  181. package/dist/web-components/viewer/{ListEnd-D9Obxie4.mjs → ListEnd-DX1jsvJk.mjs} +1 -1
  182. package/dist/web-components/viewer/{MapView-DQSwUzd7.mjs → MapView-Df0wZjCh.mjs} +2 -2
  183. package/dist/web-components/viewer/{MediaBody-CIw2nTlj.mjs → MediaBody-CataNonO.mjs} +1 -1
  184. package/dist/web-components/viewer/{MediaBody-D5ff6xy-.mjs → MediaBody-SkIgrEMj.mjs} +1 -1
  185. package/dist/web-components/viewer/{NavDate-BnfDG57h.mjs → NavDate-BZgeaMG9.mjs} +1 -1
  186. package/dist/web-components/viewer/{Navigator-BNwjmkXY.mjs → Navigator-Co76p-1n.mjs} +1 -1
  187. package/dist/web-components/viewer/{PagerLayout-C8jraHqs.mjs → PagerLayout-tUkN1-FV.mjs} +1 -1
  188. package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +1 -0
  189. package/dist/web-components/viewer/{PartOfManifest-DX7H0V4g.mjs → PartOfManifest-DXnbEPzS.mjs} +1 -1
  190. package/dist/web-components/viewer/{PlaceBox-CCWfzsNU.mjs → PlaceBox-xrJ4CGdN.mjs} +1 -1
  191. package/dist/web-components/viewer/{Placeholder-CsEkLhz7.mjs → Placeholder-B1AcizHL.mjs} +1 -1
  192. package/dist/web-components/viewer/{Search-CsdYzdq1.mjs → Search-DTg1cHZ3.mjs} +1 -1
  193. package/dist/web-components/viewer/{StandaloneItems-BfvBxbUm.mjs → StandaloneItems-BpBEQG8i.mjs} +1 -1
  194. package/dist/web-components/viewer/{Steps-BH8ZApS4.mjs → Steps-SpwMQdCL.mjs} +1 -1
  195. package/dist/web-components/viewer/{TargetItems-BebPFr-c.mjs → TargetItems-B6Icep5k.mjs} +1 -1
  196. package/dist/web-components/viewer/{Transcript-DXLv5WR9.mjs → Transcript-rTAhuXCF.mjs} +1 -1
  197. package/dist/web-components/viewer/{Transport-C-fh7Kx2.mjs → Transport-vKIDALE-.mjs} +1 -1
  198. package/dist/web-components/viewer/Transport-z_kdVisw.mjs +1 -0
  199. package/dist/web-components/viewer/{annotation-collection-Cjd8Dgyl.mjs → annotation-collection-B7pZiLVk.mjs} +1 -1
  200. package/dist/web-components/viewer/{annotation-name-CwmgQFia.mjs → annotation-name-BKj1O9lA.mjs} +1 -1
  201. package/dist/web-components/viewer/{annotations-content-BARXoAz-.mjs → annotations-content-9AtLlPNn.mjs} +1 -1
  202. package/dist/web-components/viewer/{cloverEngine-CumnJPKO.mjs → cloverEngine-jRrYLrWa.mjs} +1 -1
  203. package/dist/web-components/viewer/{content-state-reader-DuvyLThu.mjs → content-state-reader-CPvkju6Q.mjs} +1 -1
  204. package/dist/web-components/viewer/{dragToClose-CFCxhUxn.mjs → dragToClose-Co9kGk9q.mjs} +1 -1
  205. package/dist/web-components/viewer/{fetchManifest-qNB_KgxL.mjs → fetchManifest-D7N9WhhF.mjs} +1 -1
  206. package/dist/web-components/viewer/{host-GTHX2fPK.mjs → host-DMD9LE4H.mjs} +1 -1
  207. package/dist/web-components/viewer/{image-layers-DKOuaRTj.mjs → image-layers-x_shzPvu.mjs} +1 -1
  208. package/dist/web-components/viewer/index.mjs +1 -1
  209. package/dist/web-components/viewer/{link-BlaM0tCa.mjs → link-DikPGzNO.mjs} +1 -1
  210. package/dist/web-components/viewer/{overlayImage-RVpv69R5.mjs → overlayImage-33kKKB0T.mjs} +1 -1
  211. package/dist/web-components/viewer/{range-regions-CIZiAHOp.mjs → range-regions-TH6WWGTT.mjs} +1 -1
  212. package/dist/web-components/viewer/{renderers-Dw1klwlx.mjs → renderers-BxePmixF.mjs} +1 -1
  213. package/dist/web-components/viewer/{save-file-EvzaBEJN.mjs → save-file-QXKiPlST.mjs} +1 -1
  214. package/dist/web-components/viewer/{search-x1QL_bth.mjs → search-B_NePyas.mjs} +1 -1
  215. package/dist/web-components/viewer/styles-Bedyz7_l.mjs +1 -0
  216. package/dist/web-components/viewer/useControlsVisibility-Cu-jTDzs.mjs +1 -0
  217. package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +1 -0
  218. package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +29 -0
  219. package/dist/web-components/viewer/{vtt-C2G89SWH.mjs → vtt-CUn4h5JB.mjs} +1 -1
  220. package/dist/web-components/viewer-DN2Mo3vc.mjs +1 -0
  221. package/dist/web-components/{vtt-Dd0c7psH.mjs → vtt-C5M5WPSG.mjs} +1 -1
  222. package/package.json +1 -1
  223. package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +0 -1
  224. package/dist/web-components/Cue-CUGmPS3k.mjs +0 -1
  225. package/dist/web-components/Document-D-8nalCX.mjs +0 -1
  226. package/dist/web-components/LightboxView-C4OASmkg.mjs +0 -1
  227. package/dist/web-components/LoadedMap-WATGNLxl.mjs +0 -1
  228. package/dist/web-components/Panel-BvDpCn6K.mjs +0 -1
  229. package/dist/web-components/PanelPart-Bd4lSUrP.mjs +0 -1
  230. package/dist/web-components/Scene-DrOM9YlD.mjs +0 -1
  231. package/dist/web-components/SceneView-DA7Yg20p.mjs +0 -1
  232. package/dist/web-components/Timeline-BfdN3lIv.mjs +0 -1
  233. package/dist/web-components/Transport-DaIhfZqC.mjs +0 -1
  234. package/dist/web-components/index-FJEpXukG.mjs +0 -1
  235. package/dist/web-components/items-BPPrqbeh.mjs +0 -1
  236. package/dist/web-components/label-DauFa5sg.mjs +0 -1
  237. package/dist/web-components/logo-DWPxaZaG.mjs +0 -1
  238. package/dist/web-components/part-CekFWrtz.mjs +0 -1
  239. package/dist/web-components/styles-DkkVOSUQ.mjs +0 -1
  240. package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +0 -1
  241. package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +0 -1
  242. package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +0 -1
  243. package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +0 -1
  244. package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +0 -1
  245. package/dist/web-components/viewer/Document-BsryuYJ1.mjs +0 -1
  246. package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +0 -1
  247. package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +0 -1
  248. package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +0 -1
  249. package/dist/web-components/viewer/styles-I7_LWFGj.mjs +0 -1
  250. package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +0 -1
  251. package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +0 -1
  252. package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +0 -29
  253. package/dist/web-components/viewer-Br44EEba.mjs +0 -1
@@ -24,6 +24,8 @@ function Default({
24
24
  panel = true,
25
25
  defaultPanelOpen,
26
26
  panelLayout = "accordion",
27
+ panelSections,
28
+ panelLabels,
27
29
  download = true,
28
30
  languages = true,
29
31
  items = "slider",
@@ -43,6 +45,7 @@ function Default({
43
45
  beside: useWideEnough(panes, BESIDE_REM),
44
46
  defaultOpen: defaultPanelOpen ?? true,
45
47
  followFocus: useFollowFocus(),
48
+ sections: panelSections,
46
49
  body: () => {
47
50
  var _a;
48
51
  return (_a = panes.current) == null ? void 0 : _a.querySelector(
@@ -112,6 +115,8 @@ function Default({
112
115
  pane,
113
116
  className: "clover-template-default-panel",
114
117
  layout: panelLayout,
118
+ sections: panelSections,
119
+ labels: panelLabels,
115
120
  download,
116
121
  languages,
117
122
  headingLevel: header ? below(headingLevel) : headingLevel
@@ -27,6 +27,8 @@ function Document({
27
27
  singleItem = false,
28
28
  defaultPanelOpen = false,
29
29
  panelLayout = "accordion",
30
+ panelSections,
31
+ panelLabels,
30
32
  download = true,
31
33
  languages = true,
32
34
  headingLevel = 2,
@@ -52,6 +54,8 @@ function Document({
52
54
  singleItem,
53
55
  defaultPanelOpen,
54
56
  panelLayout,
57
+ panelSections,
58
+ panelLabels,
55
59
  download,
56
60
  languages,
57
61
  headingLevel,
@@ -74,6 +78,8 @@ function DocumentLayout({
74
78
  headingLevel = 2,
75
79
  storageKey,
76
80
  panelLayout,
81
+ panelSections,
82
+ panelLabels,
77
83
  collapseControls,
78
84
  title
79
85
  }) {
@@ -101,7 +107,8 @@ function DocumentLayout({
101
107
  id: `${id}-panel`,
102
108
  beside: useWideEnough(panes, BESIDE_REM + (showSidebar ? SIDEBAR_REM : 0)),
103
109
  defaultOpen: Boolean(defaultPanelOpen),
104
- followFocus
110
+ followFocus,
111
+ sections: panelSections
105
112
  });
106
113
  const reach = (event) => {
107
114
  var _a, _b;
@@ -244,6 +251,8 @@ function DocumentLayout({
244
251
  pane: panel,
245
252
  className: "clover-template-document-panel",
246
253
  layout: panelLayout,
254
+ sections: panelSections,
255
+ labels: panelLabels,
247
256
  headingLevel: below(headingLevel),
248
257
  download: false,
249
258
  languages
@@ -25,6 +25,8 @@ function Gallery({
25
25
  panel = true,
26
26
  defaultPanelOpen = true,
27
27
  panelLayout = "accordion",
28
+ panelSections,
29
+ panelLabels,
28
30
  download = true,
29
31
  languages = true,
30
32
  storageKey = "clover-template-gallery",
@@ -76,6 +78,8 @@ function Gallery({
76
78
  panel,
77
79
  defaultPanelOpen,
78
80
  panelLayout,
81
+ panelSections,
82
+ panelLabels,
79
83
  download,
80
84
  languages,
81
85
  storageKey,
@@ -310,8 +310,21 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
310
310
  }) => React.ReactNode;
311
311
  as?: React.ElementType;
312
312
  }
313
+ /**
314
+ * A section `Panel` draws by itself, from what the Root's resource holds. `sections`
315
+ * chooses among them; each still shows only where there is data for it.
316
+ */
317
+ export type PanelSection = "about" | "targets" | "collection" | "contents" | "search" | "map" | "transcript" | "annotations";
313
318
  /** How the sections are laid out. */
314
319
  export type SectionsLayout = "tabs" | "accordion";
320
+ /**
321
+ * What a page calls a section, in place of Clover's own word for it: its words, taken to
322
+ * be in the page's language, or its words by language tag, one of which the tab carries
323
+ * as its `lang` where it is not the page's (WCAG 3.1.2).
324
+ */
325
+ export type PanelSectionLabel = string | Readonly<Record<string, string>>;
326
+ /** A label for any of the default sections, by its value. */
327
+ export type PanelSectionLabels = Partial<Record<PanelSection, PanelSectionLabel>>;
315
328
  /** How an information panel lays out its sections. */
316
329
  export type PanelLayout = SectionsLayout;
317
330
  export type DefaultProps = Omit<RootProps, "children"> & {
@@ -335,6 +348,19 @@ export type DefaultProps = Omit<RootProps, "children"> & {
335
348
  * stacked boxes each opened by its heading, or `"tabs"`.
336
349
  */
337
350
  panelLayout?: PanelLayout;
351
+ /**
352
+ * The panel's sections, from Clover's own: with
353
+ * `["contents", "search", "transcript", "annotations"]` it has those four, each still
354
+ * only where the resource has data for it, and no panel at all where it has none of
355
+ * them. Default: every section.
356
+ */
357
+ panelSections?: readonly PanelSection[];
358
+ /**
359
+ * What a panel section's tab or heading says, in place of Clover's own word for it:
360
+ * `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
361
+ * Panel's `labels`).
362
+ */
363
+ panelLabels?: PanelSectionLabels;
338
364
  /** The downloads, from a Download button beside the panel's About heading. Default `true`. */
339
365
  download?: boolean;
340
366
  /**
@@ -380,7 +406,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
380
406
  * uncovered: a click there, Escape or the panel's close button puts it away. Size it with
381
407
  * `--clover-body-height`.
382
408
  */
383
- export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, languages, items, singleItem, storageKey, fill, collapseControls, ...root }: DefaultProps): React.JSX.Element;
409
+ export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, items, singleItem, storageKey, fill, collapseControls, ...root }: DefaultProps): React.JSX.Element;
384
410
  export type DocumentProps = Omit<RootProps, "children"> & {
385
411
  /**
386
412
  * Whether the page thumbnails start shown beside the page. Default `true`. On a phone,
@@ -402,6 +428,19 @@ export type DocumentProps = Omit<RootProps, "children"> & {
402
428
  * Default's), stacked boxes each opened by its heading, or `"tabs"`.
403
429
  */
404
430
  panelLayout?: PanelLayout;
431
+ /**
432
+ * The panel's sections, from Clover's own: with
433
+ * `["contents", "search", "transcript", "annotations"]` it has those four, each still
434
+ * only where the resource has data for it, and no panel at all where it has none of
435
+ * them. Default: every section.
436
+ */
437
+ panelSections?: readonly PanelSection[];
438
+ /**
439
+ * What a panel section's tab or heading says, in place of Clover's own word for it:
440
+ * `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
441
+ * Panel's `labels`).
442
+ */
443
+ panelLabels?: PanelSectionLabels;
405
444
  /** The downloads in the toolbar, as links: the page's and the Manifest's `rendering`. Default `true`. */
406
445
  download?: boolean;
407
446
  /**
@@ -436,7 +475,7 @@ export type DocumentProps = Omit<RootProps, "children"> & {
436
475
  * where there is room for both, and slides out over the page where there is not. Size
437
476
  * it with `--clover-template-document-height`.
438
477
  */
439
- export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, download, languages, headingLevel, storageKey, collapseControls, ...root }: DocumentProps): React.JSX.Element;
478
+ export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, headingLevel, storageKey, collapseControls, ...root }: DocumentProps): React.JSX.Element;
440
479
  export type GalleryProps = Omit<RootProps, "children"> & {
441
480
  /** The size of a grid cell. Default `10rem`, through `--clover-items-size`. */
442
481
  size?: string;
@@ -483,6 +522,19 @@ export type GalleryProps = Omit<RootProps, "children"> & {
483
522
  defaultPanelOpen?: boolean;
484
523
  /** How the panel lays out its sections: `"accordion"` (the default) or `"tabs"`. */
485
524
  panelLayout?: PanelLayout;
525
+ /**
526
+ * The panel's sections, from Clover's own: with
527
+ * `["contents", "search", "transcript", "annotations"]` it has those four, each still
528
+ * only where the resource has data for it, and no panel at all where it has none of
529
+ * them. Default: every section.
530
+ */
531
+ panelSections?: readonly PanelSection[];
532
+ /**
533
+ * What a panel section's tab or heading says, in place of Clover's own word for it:
534
+ * `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
535
+ * Panel's `labels`).
536
+ */
537
+ panelLabels?: PanelSectionLabels;
486
538
  /** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
487
539
  download?: boolean;
488
540
  /**
@@ -514,7 +566,7 @@ export type GalleryProps = Omit<RootProps, "children"> & {
514
566
  * shows that Manifest in the lightbox. Escape, the close button, or a press outside
515
567
  * closes it, and focus returns to the cell.
516
568
  */
517
- export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, download, languages, storageKey, headingLevel, collapseControls, style, ...root }: GalleryProps): React.JSX.Element;
569
+ export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, storageKey, headingLevel, collapseControls, style, ...root }: GalleryProps): React.JSX.Element;
518
570
  export interface LightboxProps {
519
571
  open: boolean;
520
572
  onClose: () => void;
@@ -534,6 +586,19 @@ export interface LightboxProps {
534
586
  defaultPanelOpen?: boolean;
535
587
  /** The panel's sections as stacked boxes (`"accordion"`, the default) or tabs. */
536
588
  panelLayout?: PanelLayout;
589
+ /**
590
+ * The panel's sections, from Clover's own: with
591
+ * `["contents", "search", "transcript", "annotations"]` it has those four, each still
592
+ * only where the resource has data for it, and no panel at all where it has none of
593
+ * them. Default: every section.
594
+ */
595
+ panelSections?: readonly PanelSection[];
596
+ /**
597
+ * What a panel section's tab or heading says, in place of Clover's own word for it:
598
+ * `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
599
+ * Panel's `labels`).
600
+ */
601
+ panelLabels?: PanelSectionLabels;
537
602
  /** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
538
603
  download?: boolean;
539
604
  /** The languages to read the resource in, beside the panel's About heading. Default `true`. */
@@ -17,6 +17,8 @@ function LightboxView({
17
17
  panel = true,
18
18
  defaultPanelOpen = true,
19
19
  panelLayout = "accordion",
20
+ panelSections,
21
+ panelLabels,
20
22
  download = true,
21
23
  languages = true,
22
24
  storageKey,
@@ -52,6 +54,7 @@ function LightboxView({
52
54
  beside: useWideEnough(panes, BESIDE_REM),
53
55
  defaultOpen: defaultPanelOpen,
54
56
  followFocus: useFollowFocus(),
57
+ sections: panelSections,
55
58
  body: () => {
56
59
  var _a;
57
60
  return (_a = panes.current) == null ? void 0 : _a.querySelector(
@@ -104,6 +107,8 @@ function LightboxView({
104
107
  {
105
108
  pane,
106
109
  layout: panelLayout,
110
+ sections: panelSections,
111
+ labels: panelLabels,
107
112
  download,
108
113
  languages,
109
114
  headingLevel: (headingLevel ?? 3) + 1
@@ -5,6 +5,7 @@ import { preloadDrag } from "./useDragToClose.mjs";
5
5
  import { useDrawer } from "./useDrawer.mjs";
6
6
  import { PANEL_MIN } from "./useSlide.mjs";
7
7
  import { useSpineTop } from "./useSpine.mjs";
8
+ import { usePanelSections } from "../../components/Panel/sections.mjs";
8
9
  import { SplitHandle, SplitPane } from "../../components/Split/Split.mjs";
9
10
  import { PanelToggle } from "../../components/Panel/PanelToggle.mjs";
10
11
  function usePanelPane({
@@ -13,6 +14,7 @@ function usePanelPane({
13
14
  defaultOpen,
14
15
  followFocus,
15
16
  body,
17
+ sections,
16
18
  panel,
17
19
  load
18
20
  }) {
@@ -34,8 +36,9 @@ function usePanelPane({
34
36
  if (drawer.over) preloadDrag();
35
37
  };
36
38
  const toggle = /* @__PURE__ */ jsx(
37
- PanelToggle,
39
+ PaneToggle,
38
40
  {
41
+ sections,
39
42
  open: drawer.open,
40
43
  onOpenChange: (next) => next && !panel && load ? load().then(() => drawer.setOpen(true)) : drawer.setOpen(next),
41
44
  controls: id
@@ -58,12 +61,20 @@ function usePanelPane({
58
61
  }
59
62
  };
60
63
  }
64
+ function PaneToggle({
65
+ sections,
66
+ ...props
67
+ }) {
68
+ return usePanelSections(sections).length ? /* @__PURE__ */ jsx(PanelToggle, { ...props }) : null;
69
+ }
61
70
  function PanelPane({
62
71
  pane,
63
72
  className,
64
73
  ...panel
65
74
  }) {
66
75
  const { id, over, docked, Part } = pane;
76
+ const offered = usePanelSections(panel.sections);
77
+ if (!offered.length) return null;
67
78
  return /* @__PURE__ */ jsxs(Fragment, { children: [
68
79
  docked && /* @__PURE__ */ jsx(
69
80
  SplitHandle,
@@ -80,6 +91,7 @@ function PanelPane({
80
91
  id,
81
92
  "data-spine": over || void 0,
82
93
  name: "panel",
94
+ "data-about": offered.includes("about") || void 0,
83
95
  className: ["clover-template-panel clover-template-drawer", className].filter(Boolean).join(" "),
84
96
  size: "24rem",
85
97
  min: over ? void 0 : PANEL_MIN,
@@ -1 +1 @@
1
- import{Q as I,u as e,z as p,P as g,x as T,a as $,c as M,A as _,y as F,b as H,V as D,l as V}from"./shared-DkY2a89G.mjs";import{j as k}from"./classnames-DukgfdpI.mjs";import{u as G}from"./readingLanguages-BWOLZK2k.mjs";import{Thumbnail as B,Summary as O,Metadata as Q,RequiredStatement as U,Rights as W,Homepage as E,SeeAlso as J,Id as X}from"./Primitives-C6VJXxZD.mjs";import{u as Y}from"./downloads-EjJ6Hpip.mjs";import{P as Z}from"./Provider-DyB0wpeO.mjs";import{a as K,t as ee}from"./heading-Cjt0f-Eu.mjs";import{L as te}from"./Label-f07N5Fld.mjs";import{r as oe}from"./dates-DR3gfcON.mjs";import"./styles-DkkVOSUQ.mjs";const ae=p(()=>import("./LanguageChoice-B5VM21DV.mjs").then(o=>({default:o.LanguageChoice}))),re=I(false);function ne({part:o}){const r=G();return r?e(g,{fallback:null,children:e(ae,{...r,nameKey:"readingLanguage",part:o})}):null}const le=p(()=>import("./Download-Bku9Vptk.mjs").then(({DownloadGroups:o})=>({default:o}))),se=p(()=>import("./NavDate-BCCOyycx.mjs").then(o=>o.a).then(({NavDate:o})=>({default:o}))),ce=p(()=>import("./PartOfManifest-HLg-r00O.mjs"));function ue({languages:o=true,...r}){const n=T(re);return e(ie,{...r,download:!n&&r.download!==false,choice:n||!o?null:e(ne,{part:"clover-about"})})}function ie({choice:o,canvasSummary:r=false,headingLevel:n=3,download:C=true,thumbnail:y=true,label:b=true,className:q,...R}){const{t:x,langOf:L}=$(),f=Y(),a=M(t=>t.manifest,Object.is,"About"),P=_(null);F(()=>{const t=P.current,s=t==null?void 0:t.querySelector(".clover-about-head");if(!t||!s||typeof ResizeObserver>"u")return;const c=new Set,u=()=>{const A=s.querySelector(".clover-about-thumbnail"),h=s.querySelector(".clover-about-label");for(const v of[A,h])v&&!c.has(v)&&(c.add(v),d.observe(v));const i=t.style;if(!A){i.removeProperty("--clover-about-label-height"),i.removeProperty("--clover-about-thumbnail-width");return}const N=`${(h==null?void 0:h.offsetHeight)??0}px`,S=`${A.offsetWidth}px`;i.getPropertyValue("--clover-about-label-height")!==N&&i.setProperty("--clover-about-label-height",N),i.getPropertyValue("--clover-about-thumbnail-width")!==S&&i.setProperty("--clover-about-thumbnail-width",S)};let m=0;const d=new ResizeObserver(()=>{cancelAnimationFrame(m),m=requestAnimationFrame(u)});return d.observe(s),u(),()=>{cancelAnimationFrame(m),d.disconnect(),t.style.removeProperty("--clover-about-label-height"),t.style.removeProperty("--clover-about-thumbnail-width")}},[b,y,a]);const j=H(),z=()=>{var c,u;const t=P.current;(u=((c=t==null?void 0:t.closest(".clover-sections-item"))==null?void 0:c.querySelector(".clover-sections-button"))??t)==null||u.focus({preventScroll:true})};if(!a)return null;const l=(t,s,c)=>{if(!s)return null;const{as:u,title:m,group:d}=ee(n,`${j}-${t}`);return e("section",{className:"clover-about-section",...d,children:[e(u,{className:"clover-about-heading",...V(L(t)),...m,children:x(t)}),c]})},w=t=>Array.isArray(a[t])?a[t].length>0:!!a[t];return e("div",{ref:P,className:k("clover-about",q),tabIndex:-1,...R,children:[o,(y||b)&&e("div",{className:"clover-about-head",children:[y&&e(B,{className:"clover-about-thumbnail",size:256,alt:b?"":void 0}),b&&e(te,{as:K(n),className:"clover-about-label clover-title"})]}),r&&e(O,{of:"canvas",className:"clover-about-summary"}),D(a)&&a.partOf&&e(g,{fallback:null,children:e(ce,{manifest:a,headingLevel:n,onOpened:z})}),e(O,{className:"clover-about-summary"}),e(Q,{className:"clover-about-metadata"}),e(U,{className:"clover-about-metadata"}),l("aboutDate",oe(a.navDate),e(g,{fallback:null,children:e(se,{value:a.navDate,className:"clover-about-date"})})),l("aboutProvider",w("provider"),e(Z,{})),l("aboutRights",a.rights,e(W,{})),l("aboutHomepage",w("homepage"),e(E,{})),l("aboutSeeAlso",w("seeAlso"),e(J,{})),l("download",C&&f.page.length+f.all.length>0,e(g,{fallback:null,children:e(le,{page:f.page,all:f.all,headingLevel:n+1})})),l(D(a)?"aboutCanvas":"aboutManifest",a.id,e(X,{}))]})}const we=Object.freeze(Object.defineProperty({__proto__:null,About:ue},Symbol.toStringTag,{value:"Module"}));export{ue as A,re as I,we as a};
1
+ import{Q as I,u as e,z as p,P as g,x as T,a as $,c as M,A as _,y as F,b as H,W as D,l as k}from"./shared-DFAX0n3B.mjs";import{j as G}from"./classnames-DukgfdpI.mjs";import{u as V}from"./readingLanguages-FyVsSWJ8.mjs";import{Thumbnail as W,Summary as O,Metadata as B,RequiredStatement as Q,Rights as U,Homepage as E,SeeAlso as J,Id as X}from"./Primitives-c9sIz0oQ.mjs";import{u as Y}from"./downloads-CmAYeEIz.mjs";import{P as Z}from"./Provider-a3xY016W.mjs";import{a as K,t as ee}from"./heading-Cjt0f-Eu.mjs";import{L as te}from"./Label-BIjqJ-_T.mjs";import{r as oe}from"./dates-DR3gfcON.mjs";import"./styles-BwkYiCLC.mjs";const ae=p(()=>import("./LanguageChoice-DkSc-n6g.mjs").then(o=>({default:o.LanguageChoice}))),re=I(false);function ne({part:o}){const r=V();return r?e(g,{fallback:null,children:e(ae,{...r,nameKey:"readingLanguage",part:o})}):null}const le=p(()=>import("./Download-Ci_JUTVd.mjs").then(({DownloadGroups:o})=>({default:o}))),se=p(()=>import("./NavDate-CYNK0Qmp.mjs").then(o=>o.a).then(({NavDate:o})=>({default:o}))),ce=p(()=>import("./PartOfManifest-KUHUq-6q.mjs"));function ue({languages:o=true,...r}){const n=T(re);return e(ie,{...r,download:!n&&r.download!==false,choice:n||!o?null:e(ne,{part:"clover-about"})})}function ie({choice:o,canvasSummary:r=false,headingLevel:n=3,download:C=true,thumbnail:y=true,label:b=true,className:q,...R}){const{t:x,langOf:L}=$(),f=Y(),a=M(t=>t.manifest,Object.is,"About"),P=_(null);F(()=>{const t=P.current,s=t==null?void 0:t.querySelector(".clover-about-head");if(!t||!s||typeof ResizeObserver>"u")return;const c=new Set,u=()=>{const A=s.querySelector(".clover-about-thumbnail"),h=s.querySelector(".clover-about-label");for(const v of[A,h])v&&!c.has(v)&&(c.add(v),d.observe(v));const i=t.style;if(!A){i.removeProperty("--clover-about-label-height"),i.removeProperty("--clover-about-thumbnail-width");return}const N=`${(h==null?void 0:h.offsetHeight)??0}px`,S=`${A.offsetWidth}px`;i.getPropertyValue("--clover-about-label-height")!==N&&i.setProperty("--clover-about-label-height",N),i.getPropertyValue("--clover-about-thumbnail-width")!==S&&i.setProperty("--clover-about-thumbnail-width",S)};let m=0;const d=new ResizeObserver(()=>{cancelAnimationFrame(m),m=requestAnimationFrame(u)});return d.observe(s),u(),()=>{cancelAnimationFrame(m),d.disconnect(),t.style.removeProperty("--clover-about-label-height"),t.style.removeProperty("--clover-about-thumbnail-width")}},[b,y,a]);const j=H(),z=()=>{var c,u;const t=P.current;(u=((c=t==null?void 0:t.closest(".clover-sections-item"))==null?void 0:c.querySelector(".clover-sections-button"))??t)==null||u.focus({preventScroll:true})};if(!a)return null;const l=(t,s,c)=>{if(!s)return null;const{as:u,title:m,group:d}=ee(n,`${j}-${t}`);return e("section",{className:"clover-about-section",...d,children:[e(u,{className:"clover-about-heading",...k(L(t)),...m,children:x(t)}),c]})},w=t=>Array.isArray(a[t])?a[t].length>0:!!a[t];return e("div",{ref:P,className:G("clover-about",q),tabIndex:-1,...R,children:[o,(y||b)&&e("div",{className:"clover-about-head",children:[y&&e(W,{className:"clover-about-thumbnail",size:256,alt:b?"":void 0}),b&&e(te,{as:K(n),className:"clover-about-label clover-title"})]}),r&&e(O,{of:"canvas",className:"clover-about-summary"}),D(a)&&a.partOf&&e(g,{fallback:null,children:e(ce,{manifest:a,headingLevel:n,onOpened:z})}),e(O,{className:"clover-about-summary"}),e(B,{className:"clover-about-metadata"}),e(Q,{className:"clover-about-metadata"}),l("aboutDate",oe(a.navDate),e(g,{fallback:null,children:e(se,{value:a.navDate,className:"clover-about-date"})})),l("aboutProvider",w("provider"),e(Z,{})),l("aboutRights",a.rights,e(U,{})),l("aboutHomepage",w("homepage"),e(E,{})),l("aboutSeeAlso",w("seeAlso"),e(J,{})),l("download",C&&f.page.length+f.all.length>0,e(g,{fallback:null,children:e(le,{page:f.page,all:f.all,headingLevel:n+1})})),l(D(a)?"aboutCanvas":"aboutManifest",a.id,e(X,{}))]})}const we=Object.freeze(Object.defineProperty({__proto__:null,About:ue},Symbol.toStringTag,{value:"Module"}));export{ue as A,re as I,we as a};
@@ -1 +1 @@
1
- import{e as P,c as v,ag as _,T as E,G as O,A as R,y as T,u as f,k,d as q,Y as F}from"./shared-DkY2a89G.mjs";import{P as G,a as L}from"./Items-CudZ4Lnb.mjs";import{C as y}from"./CountMenu-Dnzb7lKo.mjs";import{a as B}from"./annotation-name-DbWjhgra.mjs";import{f as D,r as K}from"./fetchManifest-CwQC6cCh.mjs";import{u as V,L as Y}from"./ListEnd-M39M62Cl.mjs";function j({onSelect:o,forwardedRef:r,...c}){const{clover:l,language:e}=P("Items"),n=v(t=>t.manifest),s=v(t=>_(t.manifest,t.addedSets)),u=v(t=>t.annotationId),d=(s==null?void 0:s.pages)??z,m=(s==null?void 0:s.entries)??H,{loaded:A,more:N,reachNext:S}=V(d),x=E(()=>[...new Set(m.map(t=>O(t.annotation)).filter(t=>!!t&&t!==(n==null?void 0:n.id)))],[m,n==null?void 0:n.id]),C=Q(c.layout==="pager"?J:x),M=x.length>0,i=E(()=>{const t=d.length?new Set(d.slice(0,A).map(a=>a.id)):null;return m.filter(a=>!t||t.has(a.setId)).map(a=>{const g=O(a.annotation),p=g&&g!==(n==null?void 0:n.id)?C.get(g)??null:n;return W(a,p,e,M)})},[d,A,m,n,C,M,e]),b=Math.max((s==null?void 0:s.total)??0,i.length),I=R(null);if(T(()=>{const t=I.current;t===null||!i[t]||(I.current=null,l.selectAnnotation(i[t].id))},[l,i]),!i.length)return null;const h=i.findIndex(t=>t.id===u),w=(t,a)=>{o==null||o(t,a),l.selectAnnotation(t.id)};return c.layout==="pager"?f(G,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,g)=>{const p=h+a;if(!(p<0)){if(i[p])return w(i[p],g);N&&(I.current=p,S())}}},nameKey:"informationPanelTabsAnnotations",position:f(y,{position:h,total:b,list:a=>f(j,{layout:"list",forwardedRef:null,onSelect:a})})}):f(k,{children:[f(L,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&f(Y,{onReached:S})]})}const z=[],H=[],J=[];function Q(o){const{clover:r}=P("Items"),[c,l]=q(U);return T(()=>{if(!o.length)return;let e=true;for(const n of o)D(r,n).then(s=>{e&&s&&l(u=>u.has(n)?u:new Map(u).set(n,s))});return()=>{e=false}},[r,o]),c}const U=new Map;function W(o,r,c,l){const e=F(r,o.canvasId),n=B(o.bodies,c),s=n.text?{[n.lang??"none"]:[n.text]}:e==null?void 0:e.label,u=l?r==null?void 0:r.label:e==null?void 0:e.label,d=e&&o.target.rect?K(e,o.target.rect):void 0;return{id:o.id,label:s,summary:n.text?u:void 0,parts:[{id:o.id,type:"Canvas",label:s,resource:e??{id:o.canvasId},...d?{source:d}:{}}]}}export{j as default};
1
+ import{e as P,c as v,ag as _,T as E,G as O,A as R,y as T,u as f,k,d as q,Z as F}from"./shared-DFAX0n3B.mjs";import{P as G,a as L}from"./Items-Drd82_Jj.mjs";import{C as y}from"./CountMenu-Dx8D_RJZ.mjs";import{a as B}from"./annotation-name-Du2KAWoD.mjs";import{f as D,r as K}from"./fetchManifest-tQXcfFiz.mjs";import{u as V,L as Z}from"./ListEnd-pq-BgaDI.mjs";function j({onSelect:o,forwardedRef:r,...c}){const{clover:l,language:e}=P("Items"),n=v(t=>t.manifest),s=v(t=>_(t.manifest,t.addedSets)),u=v(t=>t.annotationId),d=(s==null?void 0:s.pages)??z,m=(s==null?void 0:s.entries)??H,{loaded:A,more:N,reachNext:S}=V(d),x=E(()=>[...new Set(m.map(t=>O(t.annotation)).filter(t=>!!t&&t!==(n==null?void 0:n.id)))],[m,n==null?void 0:n.id]),C=Q(c.layout==="pager"?J:x),M=x.length>0,i=E(()=>{const t=d.length?new Set(d.slice(0,A).map(a=>a.id)):null;return m.filter(a=>!t||t.has(a.setId)).map(a=>{const g=O(a.annotation),p=g&&g!==(n==null?void 0:n.id)?C.get(g)??null:n;return W(a,p,e,M)})},[d,A,m,n,C,M,e]),b=Math.max((s==null?void 0:s.total)??0,i.length),I=R(null);if(T(()=>{const t=I.current;t===null||!i[t]||(I.current=null,l.selectAnnotation(i[t].id))},[l,i]),!i.length)return null;const h=i.findIndex(t=>t.id===u),w=(t,a)=>{o==null||o(t,a),l.selectAnnotation(t.id)};return c.layout==="pager"?f(G,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,g)=>{const p=h+a;if(!(p<0)){if(i[p])return w(i[p],g);N&&(I.current=p,S())}}},nameKey:"informationPanelTabsAnnotations",position:f(y,{position:h,total:b,list:a=>f(j,{layout:"list",forwardedRef:null,onSelect:a})})}):f(k,{children:[f(L,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&f(Z,{onReached:S})]})}const z=[],H=[],J=[];function Q(o){const{clover:r}=P("Items"),[c,l]=q(U);return T(()=>{if(!o.length)return;let e=true;for(const n of o)D(r,n).then(s=>{e&&s&&l(u=>u.has(n)?u:new Map(u).set(n,s))});return()=>{e=false}},[r,o]),c}const U=new Map;function W(o,r,c,l){const e=F(r,o.canvasId),n=B(o.bodies,c),s=n.text?{[n.lang??"none"]:[n.text]}:e==null?void 0:e.label,u=l?r==null?void 0:r.label:e==null?void 0:e.label,d=e&&o.target.rect?K(e,o.target.rect):void 0;return{id:o.id,label:s,summary:n.text?u:void 0,parts:[{id:o.id,type:"Canvas",label:s,resource:e??{id:o.canvasId},...d?{source:d}:{}}]}}export{j as default};
@@ -1 +1 @@
1
- import{u as e,l as N}from"./shared-DkY2a89G.mjs";import{s as E}from"./Annotations-CLPEq7Ro.mjs";import H from"./ControlMenu-D1zkB0qX.mjs";import{C as T}from"./Cue-CUGmPS3k.mjs";import{H as $}from"./HideToggle-TEhY4TS4.mjs";import{u as w}from"./useContainerName-hKQjEt7a.mjs";import"./styles-DkkVOSUQ.mjs";const q=({id:m,triggerId:b,label:C,labelLang:y,annotations:d,hiddenPages:M=[],onPageVisibilityChange:g,selected:x,onSelect:v,onActivate:i,onClose:k})=>{const u=w(C,y),c=[];d.forEach((a,r)=>{var o,l;const t=c[c.length-1];t&&((o=t.page)==null?void 0:o.text)===((l=a.page)==null?void 0:l.text)?t.items.push(r):c.push({page:a.page,items:[r]})});const I=c.some(a=>!a.page);return e(H,{className:"clover-canvas-annotation-menu","data-testid":"clover-canvas-annotation-menu",id:m,onClose:k,triggerId:b,children:[I&&u.node,c.map((a,r)=>{const t=[...new Set(a.items.flatMap(s=>d[s].pageId??[]))],o=`${m}-page-${r}`,l=g&&t.length>0&&e($,{hidden:t.every(s=>M.includes(s)),onChange:s=>g(t,!s),of:a.page?o:void 0});return e("fieldset",{...a.page?{"aria-labelledby":o}:u.props,className:"clover-canvas-menu-group clover-annotations-set",children:[a.page?e("legend",{className:"clover-canvas-menu-legend clover-annotations-set-header",children:[e("span",{className:"clover-annotations-title",id:o,...N(a.page.lang),children:a.page.text}),l]}):l&&e("div",{className:"clover-annotations-set-header",children:l}),e("div",{className:"clover-annotations-list",children:a.items.map(s=>{const n=d[s],h=E(n),p=x===n.id,f="image"in n?n.image:void 0;return e("label",{className:"clover-canvas-menu-item clover-annotations-entry","data-selected":p,onMouseEnter:()=>i(n.id),onMouseLeave:()=>i(null),children:[e("input",{type:"radio",name:m,checked:p,onChange:()=>v(n),onClick:()=>p&&v(n),onFocus:()=>i(n.id),onBlur:()=>i(null)}),h!==void 0&&e(T,{start:h,className:"clover-annotations-time"}),e("span",{className:"clover-annotations-body clover-cue-text",children:[f&&e("img",{className:"clover-annotations-image",src:f,alt:"",loading:"lazy"}),e("span",{className:"clover-annotations-text",...N(n.label?n.lang:void 0),children:n.label??String(s+1)})]})]},n.id)})})]},r)})]})};export{q as default};
1
+ import{u as e,l as N}from"./shared-DFAX0n3B.mjs";import{s as E}from"./Annotations-BG8lPjk1.mjs";import H from"./ControlMenu-BjJsWnuZ.mjs";import{C as T}from"./Cue-xuo5dgKE.mjs";import{H as $}from"./HideToggle-0nlIo-f8.mjs";import{u as w}from"./useContainerName-_48Cdi0m.mjs";import"./styles-BwkYiCLC.mjs";const q=({id:m,triggerId:b,label:C,labelLang:y,annotations:d,hiddenPages:M=[],onPageVisibilityChange:g,selected:x,onSelect:v,onActivate:i,onClose:k})=>{const u=w(C,y),c=[];d.forEach((a,r)=>{var o,l;const t=c[c.length-1];t&&((o=t.page)==null?void 0:o.text)===((l=a.page)==null?void 0:l.text)?t.items.push(r):c.push({page:a.page,items:[r]})});const I=c.some(a=>!a.page);return e(H,{className:"clover-canvas-annotation-menu","data-testid":"clover-canvas-annotation-menu",id:m,onClose:k,triggerId:b,children:[I&&u.node,c.map((a,r)=>{const t=[...new Set(a.items.flatMap(s=>d[s].pageId??[]))],o=`${m}-page-${r}`,l=g&&t.length>0&&e($,{hidden:t.every(s=>M.includes(s)),onChange:s=>g(t,!s),of:a.page?o:void 0});return e("fieldset",{...a.page?{"aria-labelledby":o}:u.props,className:"clover-canvas-menu-group clover-annotations-set",children:[a.page?e("legend",{className:"clover-canvas-menu-legend clover-annotations-set-header",children:[e("span",{className:"clover-annotations-title",id:o,...N(a.page.lang),children:a.page.text}),l]}):l&&e("div",{className:"clover-annotations-set-header",children:l}),e("div",{className:"clover-annotations-list",children:a.items.map(s=>{const n=d[s],h=E(n),p=x===n.id,f="image"in n?n.image:void 0;return e("label",{className:"clover-canvas-menu-item clover-annotations-entry","data-selected":p,onMouseEnter:()=>i(n.id),onMouseLeave:()=>i(null),children:[e("input",{type:"radio",name:m,checked:p,onChange:()=>v(n),onClick:()=>p&&v(n),onFocus:()=>i(n.id),onBlur:()=>i(null)}),h!==void 0&&e(T,{start:h,className:"clover-annotations-time"}),e("span",{className:"clover-annotations-body clover-cue-text",children:[f&&e("img",{className:"clover-annotations-image",src:f,alt:"",loading:"lazy"}),e("span",{className:"clover-annotations-text",...N(n.label?n.lang:void 0),children:n.label??String(s+1)})]})]},n.id)})})]},r)})]})};export{q as default};
@@ -1 +1 @@
1
- import{T as i,a9 as qt,f as bt,d as C,aE as Gt,q as k,A as l,E as jt,y as z,_ as kt,u as zt}from"./shared-DkY2a89G.mjs";import{w as Dt,p as It,g as Ot,t as Jt,A as Ut}from"./Annotations-CLPEq7Ro.mjs";import{h as Xt}from"./layout-Djwu8f4R.mjs";const Yt=()=>import("./svg-shape-DLY3g7oq.mjs");function Zt(w){var S;const c=i(()=>!!(w!=null&&w.some(({annotation:o})=>{var p;return(p=qt(o==null?void 0:o.target))==null?void 0:p.svg})),[w]);return((S=bt(Yt,c))==null?void 0:S.readSvgShape)??null}const xt=[];function Et({given:w,annotations:c,scene:S,renderer:o,sceneVersion:p,drawn:E,media:I,mediaElement:g,showPlaceholder:F,canvasKey:D,openImages:tt,openMedia:et,host:nt,onModel:H,refind:_=0}){const{canvases:d,language:v,hiddenPages:rt,unlistedPages:yt,onPageVisibilityChange:ct,onAnnotationActive:ut,selectedAnnotation:st,animateAnnotations:ot=false,highlightedAnnotation:Ct,onAnnotationSelect:lt,onAnnotationLink:J}=w,[B,Ft]=C([]),[it,Ht]=C([]),L=rt!==void 0,U=i(()=>{var n;if(L)return xt;const t=new Map;for(const r of c){if(!r.pageId)continue;const f=!(Number((n=d==null?void 0:d[r.targetIndex])==null?void 0:n.duration)>0)&&Gt(r.annotation.motivation,qt(Array.isArray(r.annotation.target)?r.annotation.target[0]:r.annotation.target));t.set(r.pageId,(t.get(r.pageId)??true)&&f)}const e=[...t].filter(([,r])=>r).map(([r])=>r);return e.length?e:xt},[L,c,d]),_t=i(()=>{const t=U.filter(e=>!it.includes(e)&&!B.includes(e));return t.length?[...B,...t]:B},[B,it,U]),a=rt??_t,X=yt??U,N=k(t=>X.length?t.filter(e=>!e.pageId||!X.includes(e.pageId)):t,[X]),dt=i(()=>N(c).length,[c,N]),T=k(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),Q=l(ct);Q.current=ct;const R=k((t,e)=>{var n;(n=Q.current)==null||n.call(Q,t,e),!L&&(Ft(r=>{const s=r.filter(f=>!t.includes(f));return e?s:[...s,...t]}),Ht(r=>{const s=r.filter(f=>!t.includes(f));return e?[...s,...t]:s}))},[L]),gt=i(()=>Dt(T(c),d),[c,T,d]),O=i(()=>{if(!(!S||!d))return(t,e,n)=>{const r=d.findIndex(Wt=>Wt.id===e),s=r===-1?n:r,f=S.placements[s];return f?Xt(d[s],f,t):null}},[S,d]),W=Zt(c),P=i(()=>o&&p>0&&E?It(c,O??((t,e,n)=>o.itemRectToWorld(n,t)),W,v):[],[o,c,p,E,O,W,v]),x=i(()=>T(P),[P,T]),Y=i(()=>P.length||!O?P:It(c,O,W,v),[P,O,c,W,v]),[Bt,Lt]=C(null),[Nt,ft]=C(null),u=st!==void 0?st:Nt,A=l(null),h=l(ut);h.current=ut;const m=l(lt);m.current=lt;const Z=k(t=>{var e;Lt(t),(e=h.current)==null||e.call(h,t)},[]),$=l(ot);$.current=ot;const pt=l(false);pt.current=F;const V=l(g);V.current=g;const at=l(o);at.current=o;const q=l(null),Pt=l(a);Pt.current=a;const ht=l(R);ht.current=R;const K=k(t=>{var e,n,r;if(t.pageId&&Pt.current.includes(t.pageId)&&ht.current([t.pageId],true),ft(t.id),(e=h.current)==null||e.call(h,t.id),(n=m.current)==null||n.call(m,t.id),!pt.current){if("start"in t){const s=V.current;if(!s)return;q.current=t.id,jt(s,t.start);return}if(A.current=t.id,t.track){const s=V.current;s&&Ot(t,s)&&(q.current=t.id);return}(r=at.current)==null||r.fitAnnotation(t.world,!$.current)}},[]),mt=l(u);mt.current=u;const b=k(()=>{var t;return mt.current?(ft(null),A.current=null,(t=m.current)==null||t.call(m,null),true):false},[]),G=l(J);G.current=J;const wt=!!J,Qt=i(()=>wt?t=>{var e,n;(e=nt.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[wt,b,nt]),St=l(_);z(()=>{if(!u){A.current=null;return}if(St.current!==_&&(St.current=_,A.current=null),A.current===u)return;const t=r=>r.find(s=>s.id===u),e=t(x),n=e??t(P);if(n){if(A.current=n.id,n.track){!e&&g&&Ot(n,g);return}o==null||o.fitAnnotation(n.world,!$.current)}},[u,x,P,g,o,_]);const y=i(()=>I?Jt(c,v):[],[I,c,v]),j=i(()=>T(y),[y,T]),vt=i(()=>N(y.length?[...Y,...y]:Y),[Y,y,N]);z(()=>{if(!u){q.current=null;return}if(q.current===u||!g)return;const t=j.find(e=>e.id===u);t&&(q.current=t.id,g.currentTime=t.start)},[u,j,g]);const M=l(null),[Tt,Rt]=C(null);z(()=>{M.current=u??null},[u]),z(()=>{const t=M.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(M.current=null,!!F)){if(!I){tt(true);return}et(D),Rt(D)}},[u,c,F,I,D,tt,et]);const At=i(()=>({menu:vt,placed:x,timed:j,hiddenPages:a,setPagesVisible:R,listedCount:dt,comments:gt,selected:u??null,select:K,activate:Z,release:b,quietlyOpened:Tt}),[vt,x,j,a,R,dt,gt,u,K,Z,b,Tt]);return kt(()=>H(At),[At,H]),kt(()=>()=>H(null),[H]),o&&p>0&&!F?zt(Ut,{renderer:o,placed:x,sceneVersion:p,active:Bt??Ct??u,selected:u,onActivate:Z,onSelect:K,onFollow:Qt,media:I?g:void 0}):null}export{Et as AnnotationState};
1
+ import{T as i,a9 as qt,f as bt,d as C,aE as Gt,q as k,A as l,E as jt,y as z,_ as kt,u as zt}from"./shared-DFAX0n3B.mjs";import{w as Dt,p as It,g as Ot,t as Jt,A as Ut}from"./Annotations-BG8lPjk1.mjs";import{h as Xt}from"./layout-B29v2RKK.mjs";const Yt=()=>import("./svg-shape-DLY3g7oq.mjs");function Zt(w){var S;const c=i(()=>!!(w!=null&&w.some(({annotation:o})=>{var p;return(p=qt(o==null?void 0:o.target))==null?void 0:p.svg})),[w]);return((S=bt(Yt,c))==null?void 0:S.readSvgShape)??null}const xt=[];function Et({given:w,annotations:c,scene:S,renderer:o,sceneVersion:p,drawn:E,media:I,mediaElement:g,showPlaceholder:F,canvasKey:D,openImages:tt,openMedia:et,host:nt,onModel:H,refind:_=0}){const{canvases:d,language:v,hiddenPages:rt,unlistedPages:yt,onPageVisibilityChange:ct,onAnnotationActive:ut,selectedAnnotation:st,animateAnnotations:ot=false,highlightedAnnotation:Ct,onAnnotationSelect:lt,onAnnotationLink:J}=w,[B,Ft]=C([]),[it,Ht]=C([]),L=rt!==void 0,U=i(()=>{var n;if(L)return xt;const t=new Map;for(const r of c){if(!r.pageId)continue;const f=!(Number((n=d==null?void 0:d[r.targetIndex])==null?void 0:n.duration)>0)&&Gt(r.annotation.motivation,qt(Array.isArray(r.annotation.target)?r.annotation.target[0]:r.annotation.target));t.set(r.pageId,(t.get(r.pageId)??true)&&f)}const e=[...t].filter(([,r])=>r).map(([r])=>r);return e.length?e:xt},[L,c,d]),_t=i(()=>{const t=U.filter(e=>!it.includes(e)&&!B.includes(e));return t.length?[...B,...t]:B},[B,it,U]),a=rt??_t,X=yt??U,N=k(t=>X.length?t.filter(e=>!e.pageId||!X.includes(e.pageId)):t,[X]),dt=i(()=>N(c).length,[c,N]),T=k(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),Q=l(ct);Q.current=ct;const R=k((t,e)=>{var n;(n=Q.current)==null||n.call(Q,t,e),!L&&(Ft(r=>{const s=r.filter(f=>!t.includes(f));return e?s:[...s,...t]}),Ht(r=>{const s=r.filter(f=>!t.includes(f));return e?[...s,...t]:s}))},[L]),gt=i(()=>Dt(T(c),d),[c,T,d]),O=i(()=>{if(!(!S||!d))return(t,e,n)=>{const r=d.findIndex(Wt=>Wt.id===e),s=r===-1?n:r,f=S.placements[s];return f?Xt(d[s],f,t):null}},[S,d]),W=Zt(c),P=i(()=>o&&p>0&&E?It(c,O??((t,e,n)=>o.itemRectToWorld(n,t)),W,v):[],[o,c,p,E,O,W,v]),x=i(()=>T(P),[P,T]),Y=i(()=>P.length||!O?P:It(c,O,W,v),[P,O,c,W,v]),[Bt,Lt]=C(null),[Nt,ft]=C(null),u=st!==void 0?st:Nt,A=l(null),h=l(ut);h.current=ut;const m=l(lt);m.current=lt;const Z=k(t=>{var e;Lt(t),(e=h.current)==null||e.call(h,t)},[]),$=l(ot);$.current=ot;const pt=l(false);pt.current=F;const V=l(g);V.current=g;const at=l(o);at.current=o;const q=l(null),Pt=l(a);Pt.current=a;const ht=l(R);ht.current=R;const K=k(t=>{var e,n,r;if(t.pageId&&Pt.current.includes(t.pageId)&&ht.current([t.pageId],true),ft(t.id),(e=h.current)==null||e.call(h,t.id),(n=m.current)==null||n.call(m,t.id),!pt.current){if("start"in t){const s=V.current;if(!s)return;q.current=t.id,jt(s,t.start);return}if(A.current=t.id,t.track){const s=V.current;s&&Ot(t,s)&&(q.current=t.id);return}(r=at.current)==null||r.fitAnnotation(t.world,!$.current)}},[]),mt=l(u);mt.current=u;const b=k(()=>{var t;return mt.current?(ft(null),A.current=null,(t=m.current)==null||t.call(m,null),true):false},[]),G=l(J);G.current=J;const wt=!!J,Qt=i(()=>wt?t=>{var e,n;(e=nt.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[wt,b,nt]),St=l(_);z(()=>{if(!u){A.current=null;return}if(St.current!==_&&(St.current=_,A.current=null),A.current===u)return;const t=r=>r.find(s=>s.id===u),e=t(x),n=e??t(P);if(n){if(A.current=n.id,n.track){!e&&g&&Ot(n,g);return}o==null||o.fitAnnotation(n.world,!$.current)}},[u,x,P,g,o,_]);const y=i(()=>I?Jt(c,v):[],[I,c,v]),j=i(()=>T(y),[y,T]),vt=i(()=>N(y.length?[...Y,...y]:Y),[Y,y,N]);z(()=>{if(!u){q.current=null;return}if(q.current===u||!g)return;const t=j.find(e=>e.id===u);t&&(q.current=t.id,g.currentTime=t.start)},[u,j,g]);const M=l(null),[Tt,Rt]=C(null);z(()=>{M.current=u??null},[u]),z(()=>{const t=M.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(M.current=null,!!F)){if(!I){tt(true);return}et(D),Rt(D)}},[u,c,F,I,D,tt,et]);const At=i(()=>({menu:vt,placed:x,timed:j,hiddenPages:a,setPagesVisible:R,listedCount:dt,comments:gt,selected:u??null,select:K,activate:Z,release:b,quietlyOpened:Tt}),[vt,x,j,a,R,dt,gt,u,K,Z,b,Tt]);return kt(()=>H(At),[At,H]),kt(()=>()=>H(null),[H]),o&&p>0&&!F?zt(Ut,{renderer:o,placed:x,sceneVersion:p,active:Bt??Ct??u,selected:u,onActivate:Z,onSelect:K,onFollow:Qt,media:I?g:void 0}):null}export{Et as AnnotationState};
@@ -1 +1 @@
1
- var Q=Object.defineProperty;var tt=(t,o,e)=>o in t?Q(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var B=(t,o,e)=>tt(t,typeof o!="symbol"?o+"":o,e);import{a9 as q,aF as ot,aa as D,B as G,T as et,A as L,y as j,q as N,_ as nt,$ as st,u as I,k as it,aG as rt,t as at,d as W,l as ct,R as lt}from"./shared-DkY2a89G.mjs";import{a as ht}from"./annotation-name-DbWjhgra.mjs";import{r as ut}from"./link-0lUlTZlw.mjs";import{T as dt}from"./Tip-OCB88zwY.mjs";import{b as pt}from"./Camera-BPyLzZjP.mjs";import"./styles-DkkVOSUQ.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):ot.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ft=t=>K(t).map(o=>q(o)),gt=(t,o)=>Math.abs(t.end-o.start)<.001,H=(t,o,e)=>t+(o-t)*e;function vt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const i=o[n+1];return e.end===1/0&&i?{...e,end:i.start}:e})}function U(t,o){let e=0,n=t.length-1,i=-1;for(;e<=n;){const d=e+n>>1;t[d].start<=o?(i=d,e=d+1):n=d-1}const r=t[i];if(!r||o>=r.end)return null;const c=t[i+1];if(!c||!gt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[h,l]=[r.world,c.world];return{x:H(h.x,l.x,a),y:H(h.y,l.y,a),width:H(h.width,l.width,a),height:H(h.height,l.height,a)}}const Z=t=>t.overlays??(t.overlays=new wt(t.host));class wt{constructor(o){B(this,"container");B(this,"overlays",new Map);B(this,"view");const e=document.createElement("div");e.className="clover-canvas-overlays",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"clip",pointerEvents:"none"}),o.appendChild(e),this.container=e}add(o,e){return this.overlays.set(o,e),o.classList.add("clover-canvas-overlay"),Object.assign(o.style,{position:"absolute",top:"0",left:"0",pointerEvents:"auto"}),o.parentElement!==this.container&&this.container.appendChild(o),()=>{this.overlays.delete(o)}}move(o,e){this.overlays.has(o)&&(this.overlays.set(o,e),this.view&&this.position(...this.view,o))}position(o,e,n){this.view=[o,e];const i=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=h=>c?Math.round(h*c)/c:h;for(const[h,l]of this.overlays){if(n&&h!==n)continue;const d=pt(o,e,{x:l.x+l.width/2,y:l.y+l.height/2}),f=a(d.x-l.width*o.zoom/2),g=a(d.y-l.height*o.zoom/2),p=a(l.width*o.zoom),v=a(l.height*o.zoom);h.style.width=`${p}px`,h.style.height=`${v}px`,h.style.transform=`translate(${f}px, ${g}px)`+(i?` rotate(${i}deg)`:"");const{style:w,dataset:m}=h;if(r){w.setProperty("--clover-overlay-x",`${d.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+v}px`);const $=d.y>e.height/2?"above":"below";m.overlayRoom!==$&&(m.overlayRoom=$)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete m.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const mt=t=>"start"in t,St=t=>{var o,e;return mt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},xt=(t,o)=>!t.track||U(t.track,o)!==null;function $t(t,o){return xt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function yt(t,o,e){var r,c,a;const n=ft(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const i=[];for(const h of n){const l=G((a=h.t)==null?void 0:a.replace(/^npt:/,""));if(!h.rect||!l)continue;const{x:d,y:f,w:g,h:p}=h.rect,v=o({x:d,y:f,width:g,height:p},h.id,e);v&&i.push({start:l.start,end:l.end??1/0,world:v})}return i.length?vt(i):null}function X(t,o){const{text:e,lang:n}=at(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function Nt(t,o){var n;const e=[];for(const{annotation:i,pageLabel:r,pageId:c}of t){const a=q([i==null?void 0:i.target].flat()[0]),h=G((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!h||a.rect||a.point||a.svg)continue;const{text:l,lang:d}=Y(i,o);e.push({id:i.id,...l?{label:l}:{},...d?{lang:d}:{},...h,...X(r,o),...c?{pageId:c}:{}})}return e}const S=40;function qt(t,o,e=null,n){var r;const i=[];for(const{annotation:c,targetIndex:a,pageLabel:h,pageId:l,place:d}of t){const f=q(c==null?void 0:c.target);if(!f)continue;let g=null,p;const v=yt(c,o,a);if(v){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.rect){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.point){const{x:s,y:u}=f.point;g={x:s-S/2,y:u-S/2,width:S,height:S},p={kind:"point"}}else if(f.svg&&e){const s=e(f.svg);s&&(g=s.box,p={kind:"svg",svg:s})}if(!g)continue;const w=v?v[0].world:o(g,f.id,a);if(!w)continue;const{text:m,lang:$}=Y(c,n),P=ut(c),T=(r=D(c).find(s=>(s==null?void 0:s.type)==="Image"&&/^https?:\/\//i.test(s.id??"")))==null?void 0:r.id;i.push({id:c.id,label:m,...$?{lang:$}:{},world:w,...p?{shape:p}:{},...v?{track:v}:{},...P?{link:P}:{},...T?{image:T}:{},...X(h,n),...l?{pageId:l}:{},...d?{place:d}:{}})}return i}const V=({world:t})=>t.width*t.height,kt=(t,o)=>t.x>=o.x&&t.y>=o.y&&t.x+t.width<=o.x+o.width&&t.y+t.height<=o.y+o.height,y=t=>String(Math.round(t*1e3)/1e3||0);function bt(t,o){var g,p;const e=t.world,n=o.world;if(((g=o.shape)==null?void 0:g.kind)==="point"||n.x>=e.x+e.width||n.x+n.width<=e.x||n.y>=e.y+e.height||n.y+n.height<=e.y)return null;const[i,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],h=`${y(-i/10)} ${y(-r/10)} ${y(i*1.2)} ${y(r*1.2)}`,l=`M${y(-i/10)} ${y(-r/10)}h${y(i*1.2)}v${y(r*1.2)}h${y(-i*1.2)}Z`;let d;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:v,shapes:w}=o.shape.svg,m=w.map(({tag:$,attributes:P})=>`<${$} ${Object.entries(P).map(([T,s])=>`${T}="${s}"`).join(" ")}/>`).join("");d=`<mask id="m"><path fill="#fff" d="${l}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${v.x} ${v.y} ${Math.max(v.width,1)} ${Math.max(v.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${m}</g></svg></mask><path d="${l}" mask="url(#m)"/>`}else d=`<path fill-rule="evenodd" d="${l}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${h}" preserveAspectRatio="none">${d}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(f)}")`}const Kt=({renderer:t,placed:o,sceneVersion:e,active:n,selected:i,onActivate:r,onSelect:c,onFollow:a,media:h})=>{const l=et(()=>{const s=new Map;return[...o].sort((u,k)=>V(k)-V(u)).forEach((u,k)=>s.set(u,k)),s},[o]),d=o.find(s=>s.id===n),f=L(null);j(()=>{const s=o.find(u=>u.id===i&&u.track);i||(f.current=null),!(!s||!h||f.current===i)&&(f.current=i,$t(s,h))},[o,i,h]);const g=s=>{const u=l.get(s)??0;return d?s===d?o.length:u>(l.get(d)??0)&&!s.track&&!d.track&&kt(s.world,d.world)?o.length+1+u:u:u},p=L(new Map),v=L(new Map),w=L(new WeakMap),m=L({placed:o,current:d,depthOf:g});m.current={placed:o,current:d,depthOf:g};const $=N(s=>{const{placed:u,current:k,depthOf:R}=m.current,O=M=>v.current.get(M.id),x=k&&O(k)!==null?k:void 0,b=M=>{const A=p.current.get(M.id);if(!A)return;const C=O(M),F=x&&M!==x&&C!==null&&R(M)<u.length?bt({...M,world:C??M.world},{...x,world:O(x)??x.world}):null;(w.current.get(A)??"")!==(F??"")&&(w.current.set(A,F??""),F?A.style.setProperty("--clover-annotation-mask",F):A.style.removeProperty("--clover-annotation-mask"))};s&&s!==k?b(s):u.forEach(b)},[]);nt(()=>$());const P=N((s,u)=>{u?p.current.set(s,u):p.current.delete(s)},[]),T=N((s,u)=>{v.current.set(s.id,u),$(s)},[$]);return st(I(it,{children:o.map((s,u)=>I(Tt,{entry:s,name:s.label??String(u+1),lang:s.label?s.lang:void 0,depth:g(s),register:P,onMove:T,renderer:t,active:n===s.id,selected:i===s.id,onActivate:r,onSelect:c,onFollow:a,media:h},`${s.id}|${e}`))}),Z(t).container)};let Mt;const _=()=>Mt??(Mt=import("./panClearOfControls-Cn2ZXsZi.mjs")),Tt=({entry:t,name:o,lang:e,depth:n,register:i,onMove:r,renderer:c,active:a,selected:h,onActivate:l,onSelect:d,onFollow:f,media:g})=>{var A,C,F;const[p,v]=W(null),{id:w,place:m}=t,$=m&&`${m.index} / ${m.total}`,P=N(E=>{v(E),i(w,E)},[w,i]),{x:T,y:s,width:u,height:k}=t.world;j(()=>{if(!p)return;const E=Z(c).add(p,{x:T,y:s,width:u,height:k});return c.invalidate(),E},[p,c,T,s,u,k]);const R=Et(p,t.track,c,g,()=>l(null),E=>r(t,E)),{link:O}=t,x=O&&!O.canvasId&&!O.manifestId?O.id:void 0,b=O&&!x&&f?()=>f(t):void 0;return I(x?"a":"button",{ref:P,...x?{href:x,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!R,"data-active":a?"true":"false","data-shape":((A=t.shape)==null?void 0:A.kind)??"rect","data-track":t.track?"":void 0,"data-link":x||b?"true":void 0,"aria-label":$?`${o} ${$}`:o,"aria-current":h?"true":void 0,...ct(e),style:{"--clover-annotation-depth":n},onMouseEnter:()=>l(t.id),onMouseLeave:()=>l(null),onFocus:()=>{l(t.id),_()},onKeyUp:E=>{if(E.key!=="Tab")return;const z=E.currentTarget;_().then(({panClearOfControls:J})=>{document.activeElement===z&&J(c,z)})},onBlur:()=>l(null),onKeyDown:At,onClick:E=>{E.stopPropagation(),!x&&(b?b():d(t))},children:[((C=t.shape)==null?void 0:C.kind)==="point"&&I("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((F=t.shape)==null?void 0:F.kind)==="svg"&&I(Ot,{svg:t.shape.svg}),I(dt,{label:o,scrolls:true,image:t.image,after:$})]})};function Et(t,o,e,n,i,r){const c=!!o&&n!==void 0,[a,h]=W(()=>!c||(n?U(o,n.currentTime)!==null:false)),l=L(i);l.current=i;const d=L(r);return d.current=r,j(()=>{if(!o||n===void 0){h(true);return}if(!n){h(false);return}let f;const g=x=>{var A,C,F;const b=U(o,x);b&&t&&((A=e.overlays)==null||A.move(t,b)),d.current(b);const M=b!==null;if(M!==f){if(f=M,!M&&t){const E=t.matches(":hover");t.contains(document.activeElement)?(F=(C=e.overlays)==null?void 0:C.container.parentElement)==null||F.focus({preventScroll:true}):E&&l.current()}h(M)}},p=n,v=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,m=0;const $=(x,{mediaTime:b})=>{g(b),m=p.requestVideoFrameCallback($)},P=()=>{g(n.currentTime),w=requestAnimationFrame(P)},T=()=>{cancelAnimationFrame(w),m&&p.cancelVideoFrameCallback(m),w=m=0},s=()=>{T(),v()?m=p.requestVideoFrameCallback($):w=requestAnimationFrame(P)},u=()=>g(n.currentTime),k=()=>n.paused&&u(),R=()=>{T(),u()},O=[["play",s],["pause",R],["ended",R],["seeking",u],["seeked",u],["loadeddata",u],["timeupdate",k]];return O.forEach(([x,b])=>n.addEventListener(x,b)),u(),n.paused||s(),()=>{T(),O.forEach(([x,b])=>n.removeEventListener(x,b))}},[t,o,n,e]),a}const Ot=({svg:t})=>{const{x:o,y:e,width:n,height:i}=t.box,r=t.shapes.map(({tag:c,attributes:a},h)=>lt.createElement(c,{key:h,...a,vectorEffect:"non-scaling-stroke"}));return I("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(i,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[I("g",{children:r}),I("g",{children:r}),I("g",{children:r})]})};function Y(t,o){return ht(rt(t),o)}const Pt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function At(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Pt[t.key];if(!o||!e||t.altKey||t.ctrlKey||t.metaKey)return false;const n=e(o);return(n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)<1?false:(t.preventDefault(),o.scrollBy({top:n}),true)}function Ut(t,o){const e=new Map;for(const{annotation:n,targetIndex:i}of t??[]){const r=q([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!D(n).some(a=>typeof(a==null?void 0:a.value)=="string"||(a==null?void 0:a.type)==="Image"))continue;const c=(o==null?void 0:o.find(a=>a.id===r.id))??(r.id||o==null?void 0:o[i]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Kt as A,$t as g,qt as p,St as s,Nt as t,Ut as w};
1
+ var Q=Object.defineProperty;var tt=(t,o,e)=>o in t?Q(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var B=(t,o,e)=>tt(t,typeof o!="symbol"?o+"":o,e);import{a9 as q,aF as ot,aa as D,B as G,T as et,A as L,y as j,q as N,_ as nt,$ as st,u as I,k as it,aG as rt,t as at,d as W,l as ct,R as lt}from"./shared-DFAX0n3B.mjs";import{a as ht}from"./annotation-name-Du2KAWoD.mjs";import{r as ut}from"./link-Ct5PpHEY.mjs";import{T as dt}from"./Tip-nJSTYquc.mjs";import{b as pt}from"./Camera-DqT_1MgD.mjs";import"./styles-BwkYiCLC.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):ot.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ft=t=>K(t).map(o=>q(o)),gt=(t,o)=>Math.abs(t.end-o.start)<.001,H=(t,o,e)=>t+(o-t)*e;function vt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const i=o[n+1];return e.end===1/0&&i?{...e,end:i.start}:e})}function U(t,o){let e=0,n=t.length-1,i=-1;for(;e<=n;){const d=e+n>>1;t[d].start<=o?(i=d,e=d+1):n=d-1}const r=t[i];if(!r||o>=r.end)return null;const c=t[i+1];if(!c||!gt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[h,l]=[r.world,c.world];return{x:H(h.x,l.x,a),y:H(h.y,l.y,a),width:H(h.width,l.width,a),height:H(h.height,l.height,a)}}const Z=t=>t.overlays??(t.overlays=new wt(t.host));class wt{constructor(o){B(this,"container");B(this,"overlays",new Map);B(this,"view");const e=document.createElement("div");e.className="clover-canvas-overlays",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"clip",pointerEvents:"none"}),o.appendChild(e),this.container=e}add(o,e){return this.overlays.set(o,e),o.classList.add("clover-canvas-overlay"),Object.assign(o.style,{position:"absolute",top:"0",left:"0",pointerEvents:"auto"}),o.parentElement!==this.container&&this.container.appendChild(o),()=>{this.overlays.delete(o)}}move(o,e){this.overlays.has(o)&&(this.overlays.set(o,e),this.view&&this.position(...this.view,o))}position(o,e,n){this.view=[o,e];const i=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=h=>c?Math.round(h*c)/c:h;for(const[h,l]of this.overlays){if(n&&h!==n)continue;const d=pt(o,e,{x:l.x+l.width/2,y:l.y+l.height/2}),f=a(d.x-l.width*o.zoom/2),g=a(d.y-l.height*o.zoom/2),p=a(l.width*o.zoom),v=a(l.height*o.zoom);h.style.width=`${p}px`,h.style.height=`${v}px`,h.style.transform=`translate(${f}px, ${g}px)`+(i?` rotate(${i}deg)`:"");const{style:w,dataset:m}=h;if(r){w.setProperty("--clover-overlay-x",`${d.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+v}px`);const $=d.y>e.height/2?"above":"below";m.overlayRoom!==$&&(m.overlayRoom=$)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete m.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const mt=t=>"start"in t,St=t=>{var o,e;return mt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},xt=(t,o)=>!t.track||U(t.track,o)!==null;function $t(t,o){return xt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function yt(t,o,e){var r,c,a;const n=ft(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const i=[];for(const h of n){const l=G((a=h.t)==null?void 0:a.replace(/^npt:/,""));if(!h.rect||!l)continue;const{x:d,y:f,w:g,h:p}=h.rect,v=o({x:d,y:f,width:g,height:p},h.id,e);v&&i.push({start:l.start,end:l.end??1/0,world:v})}return i.length?vt(i):null}function X(t,o){const{text:e,lang:n}=at(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function Nt(t,o){var n;const e=[];for(const{annotation:i,pageLabel:r,pageId:c}of t){const a=q([i==null?void 0:i.target].flat()[0]),h=G((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!h||a.rect||a.point||a.svg)continue;const{text:l,lang:d}=Y(i,o);e.push({id:i.id,...l?{label:l}:{},...d?{lang:d}:{},...h,...X(r,o),...c?{pageId:c}:{}})}return e}const S=40;function qt(t,o,e=null,n){var r;const i=[];for(const{annotation:c,targetIndex:a,pageLabel:h,pageId:l,place:d}of t){const f=q(c==null?void 0:c.target);if(!f)continue;let g=null,p;const v=yt(c,o,a);if(v){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.rect){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.point){const{x:s,y:u}=f.point;g={x:s-S/2,y:u-S/2,width:S,height:S},p={kind:"point"}}else if(f.svg&&e){const s=e(f.svg);s&&(g=s.box,p={kind:"svg",svg:s})}if(!g)continue;const w=v?v[0].world:o(g,f.id,a);if(!w)continue;const{text:m,lang:$}=Y(c,n),P=ut(c),T=(r=D(c).find(s=>(s==null?void 0:s.type)==="Image"&&/^https?:\/\//i.test(s.id??"")))==null?void 0:r.id;i.push({id:c.id,label:m,...$?{lang:$}:{},world:w,...p?{shape:p}:{},...v?{track:v}:{},...P?{link:P}:{},...T?{image:T}:{},...X(h,n),...l?{pageId:l}:{},...d?{place:d}:{}})}return i}const V=({world:t})=>t.width*t.height,kt=(t,o)=>t.x>=o.x&&t.y>=o.y&&t.x+t.width<=o.x+o.width&&t.y+t.height<=o.y+o.height,y=t=>String(Math.round(t*1e3)/1e3||0);function bt(t,o){var g,p;const e=t.world,n=o.world;if(((g=o.shape)==null?void 0:g.kind)==="point"||n.x>=e.x+e.width||n.x+n.width<=e.x||n.y>=e.y+e.height||n.y+n.height<=e.y)return null;const[i,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],h=`${y(-i/10)} ${y(-r/10)} ${y(i*1.2)} ${y(r*1.2)}`,l=`M${y(-i/10)} ${y(-r/10)}h${y(i*1.2)}v${y(r*1.2)}h${y(-i*1.2)}Z`;let d;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:v,shapes:w}=o.shape.svg,m=w.map(({tag:$,attributes:P})=>`<${$} ${Object.entries(P).map(([T,s])=>`${T}="${s}"`).join(" ")}/>`).join("");d=`<mask id="m"><path fill="#fff" d="${l}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${v.x} ${v.y} ${Math.max(v.width,1)} ${Math.max(v.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${m}</g></svg></mask><path d="${l}" mask="url(#m)"/>`}else d=`<path fill-rule="evenodd" d="${l}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${h}" preserveAspectRatio="none">${d}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(f)}")`}const Kt=({renderer:t,placed:o,sceneVersion:e,active:n,selected:i,onActivate:r,onSelect:c,onFollow:a,media:h})=>{const l=et(()=>{const s=new Map;return[...o].sort((u,k)=>V(k)-V(u)).forEach((u,k)=>s.set(u,k)),s},[o]),d=o.find(s=>s.id===n),f=L(null);j(()=>{const s=o.find(u=>u.id===i&&u.track);i||(f.current=null),!(!s||!h||f.current===i)&&(f.current=i,$t(s,h))},[o,i,h]);const g=s=>{const u=l.get(s)??0;return d?s===d?o.length:u>(l.get(d)??0)&&!s.track&&!d.track&&kt(s.world,d.world)?o.length+1+u:u:u},p=L(new Map),v=L(new Map),w=L(new WeakMap),m=L({placed:o,current:d,depthOf:g});m.current={placed:o,current:d,depthOf:g};const $=N(s=>{const{placed:u,current:k,depthOf:R}=m.current,O=M=>v.current.get(M.id),x=k&&O(k)!==null?k:void 0,b=M=>{const A=p.current.get(M.id);if(!A)return;const C=O(M),F=x&&M!==x&&C!==null&&R(M)<u.length?bt({...M,world:C??M.world},{...x,world:O(x)??x.world}):null;(w.current.get(A)??"")!==(F??"")&&(w.current.set(A,F??""),F?A.style.setProperty("--clover-annotation-mask",F):A.style.removeProperty("--clover-annotation-mask"))};s&&s!==k?b(s):u.forEach(b)},[]);nt(()=>$());const P=N((s,u)=>{u?p.current.set(s,u):p.current.delete(s)},[]),T=N((s,u)=>{v.current.set(s.id,u),$(s)},[$]);return st(I(it,{children:o.map((s,u)=>I(Tt,{entry:s,name:s.label??String(u+1),lang:s.label?s.lang:void 0,depth:g(s),register:P,onMove:T,renderer:t,active:n===s.id,selected:i===s.id,onActivate:r,onSelect:c,onFollow:a,media:h},`${s.id}|${e}`))}),Z(t).container)};let Mt;const _=()=>Mt??(Mt=import("./panClearOfControls-Cn2ZXsZi.mjs")),Tt=({entry:t,name:o,lang:e,depth:n,register:i,onMove:r,renderer:c,active:a,selected:h,onActivate:l,onSelect:d,onFollow:f,media:g})=>{var A,C,F;const[p,v]=W(null),{id:w,place:m}=t,$=m&&`${m.index} / ${m.total}`,P=N(E=>{v(E),i(w,E)},[w,i]),{x:T,y:s,width:u,height:k}=t.world;j(()=>{if(!p)return;const E=Z(c).add(p,{x:T,y:s,width:u,height:k});return c.invalidate(),E},[p,c,T,s,u,k]);const R=Et(p,t.track,c,g,()=>l(null),E=>r(t,E)),{link:O}=t,x=O&&!O.canvasId&&!O.manifestId?O.id:void 0,b=O&&!x&&f?()=>f(t):void 0;return I(x?"a":"button",{ref:P,...x?{href:x,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!R,"data-active":a?"true":"false","data-shape":((A=t.shape)==null?void 0:A.kind)??"rect","data-track":t.track?"":void 0,"data-link":x||b?"true":void 0,"aria-label":$?`${o} ${$}`:o,"aria-current":h?"true":void 0,...ct(e),style:{"--clover-annotation-depth":n},onMouseEnter:()=>l(t.id),onMouseLeave:()=>l(null),onFocus:()=>{l(t.id),_()},onKeyUp:E=>{if(E.key!=="Tab")return;const z=E.currentTarget;_().then(({panClearOfControls:J})=>{document.activeElement===z&&J(c,z)})},onBlur:()=>l(null),onKeyDown:At,onClick:E=>{E.stopPropagation(),!x&&(b?b():d(t))},children:[((C=t.shape)==null?void 0:C.kind)==="point"&&I("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((F=t.shape)==null?void 0:F.kind)==="svg"&&I(Ot,{svg:t.shape.svg}),I(dt,{label:o,scrolls:true,image:t.image,after:$})]})};function Et(t,o,e,n,i,r){const c=!!o&&n!==void 0,[a,h]=W(()=>!c||(n?U(o,n.currentTime)!==null:false)),l=L(i);l.current=i;const d=L(r);return d.current=r,j(()=>{if(!o||n===void 0){h(true);return}if(!n){h(false);return}let f;const g=x=>{var A,C,F;const b=U(o,x);b&&t&&((A=e.overlays)==null||A.move(t,b)),d.current(b);const M=b!==null;if(M!==f){if(f=M,!M&&t){const E=t.matches(":hover");t.contains(document.activeElement)?(F=(C=e.overlays)==null?void 0:C.container.parentElement)==null||F.focus({preventScroll:true}):E&&l.current()}h(M)}},p=n,v=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,m=0;const $=(x,{mediaTime:b})=>{g(b),m=p.requestVideoFrameCallback($)},P=()=>{g(n.currentTime),w=requestAnimationFrame(P)},T=()=>{cancelAnimationFrame(w),m&&p.cancelVideoFrameCallback(m),w=m=0},s=()=>{T(),v()?m=p.requestVideoFrameCallback($):w=requestAnimationFrame(P)},u=()=>g(n.currentTime),k=()=>n.paused&&u(),R=()=>{T(),u()},O=[["play",s],["pause",R],["ended",R],["seeking",u],["seeked",u],["loadeddata",u],["timeupdate",k]];return O.forEach(([x,b])=>n.addEventListener(x,b)),u(),n.paused||s(),()=>{T(),O.forEach(([x,b])=>n.removeEventListener(x,b))}},[t,o,n,e]),a}const Ot=({svg:t})=>{const{x:o,y:e,width:n,height:i}=t.box,r=t.shapes.map(({tag:c,attributes:a},h)=>lt.createElement(c,{key:h,...a,vectorEffect:"non-scaling-stroke"}));return I("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(i,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[I("g",{children:r}),I("g",{children:r}),I("g",{children:r})]})};function Y(t,o){return ht(rt(t),o)}const Pt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function At(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Pt[t.key];if(!o||!e||t.altKey||t.ctrlKey||t.metaKey)return false;const n=e(o);return(n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)<1?false:(t.preventDefault(),o.scrollBy({top:n}),true)}function Ut(t,o){const e=new Map;for(const{annotation:n,targetIndex:i}of t??[]){const r=q([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!D(n).some(a=>typeof(a==null?void 0:a.value)=="string"||(a==null?void 0:a.type)==="Image"))continue;const c=(o==null?void 0:o.find(a=>a.id===r.id))??(r.id||o==null?void 0:o[i]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Kt as A,$t as g,qt as p,St as s,Nt as t,Ut as w};
@@ -1,2 +1,2 @@
1
- import{D as ct,a as Z,e as z,c as y,s as Lt,n as kt,o as Ct,R as lt,r as Nt,u as a,t as V,w as $t,B as rt,E as At,b as dt,F as ut,T as M,d as tt,A as Tt,y as X,l as B,G as Et,H as Ot,v as Mt,k as ot,f as Bt}from"./shared-DkY2a89G.mjs";import{E as qt}from"./EntryBodies-77vDudCb.mjs";import{u as yt,L as Pt}from"./ListEnd-M39M62Cl.mjs";import{a as Rt}from"./annotation-name-DbWjhgra.mjs";import{r as Vt,a as Ft}from"./link-0lUlTZlw.mjs";import{s as Ht}from"./show-link-DgLJzG7k.mjs";import{f as jt,r as Gt}from"./fetchManifest-CwQC6cCh.mjs";import{j as mt}from"./classnames-DukgfdpI.mjs";import{b as it,s as Kt}from"./bringIntoView-CQH5ZgMM.mjs";import{a as Y}from"./heading-Cjt0f-Eu.mjs";import{C as _t}from"./Cue-CUGmPS3k.mjs";import{E as zt}from"./EntryThumbnail-BxQWKW6e.mjs";import{H as ft}from"./HideToggle-TEhY4TS4.mjs";import{u as ht,s as _}from"./readingLanguages-BWOLZK2k.mjs";import{LanguageChoice as gt}from"./LanguageChoice-B5VM21DV.mjs";import"./styles-DkkVOSUQ.mjs";function vt(t){const s=t.bodies.filter(n=>{var u;return!n.image&&((u=n.value)==null?void 0:u.trim())}).map(n=>n.language).filter(n=>!!n&&n!=="none");return[...new Set(s)]}function pt(t){const s=t.map(vt),n=[...new Set(s.flat())];return n.length<2?[]:s.some(o=>o.length&&n.some(c=>!o.includes(c)))?n:[]}function bt(t,s){if(!s)return true;const n=vt(t);return!n.length||n.includes(s)}const Dt=[],xn=ct(function({scope:s="all",renderEntry:n,headingLevel:u=3,as:o="div",className:c,...m},l){const{t:r,langOf:f}=Z(),{clover:d,language:S}=z("Annotations"),L=y(e=>Lt(e.manifest,e.addedSets)),$=y(e=>kt(e.manifest,e.canvasId)),T=y(e=>Ct(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),p=y(e=>e.annotationId),A=lt.useSyncExternalStore(d.highlight.subscribe,d.highlight.get,d.highlight.get),g=e=>{const b=$t(L,e),I=b&&rt(b.target.t),P=d.media.get();I&&P&&$.some(F=>F.id===b.canvasId)&&At(P,I.start),d.selectAnnotation(e)},k=y(e=>s==="all"?Nt(e.manifest):Dt),w=yt(k),C=e=>e.entries.filter(b=>$.some(I=>I.id===b.canvasId)),N=L.map(e=>({set:e,entries:C(e)})).filter(({entries:e})=>e.length),E=Y(u),x={text:r("annotationsShow"),lang:f("annotationsShow")};return s==="all"?a(Xt,{ref:l,as:o,className:c,rest:m,sets:L,shown:$.map(e=>e.id),headingLevel:u,language:S,showLabel:x,hiddenSets:T,selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:e=>d.highlight.emit(e),onVisible:(e,b)=>e.forEach(I=>d.setSetVisible(I,b)),end:w.more&&a(Pt,{onReached:w.reachNext})}):N.length?a(o,{ref:l,className:mt("clover-annotations",c),...m,children:N.map(({set:e,entries:b})=>a(Ut,{set:e,entries:b,canvases:$,Heading:E,headingLevel:u,language:S,title:V(e.label,S),showLabel:x,hidden:T.includes(e.id),selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:I=>d.highlight.emit(I),onVisible:I=>d.setSetVisible(e.id,I)},e.id))}):null});function Ut({set:t,entries:s,canvases:n,Heading:u,headingLevel:o,title:c,language:m,showLabel:l,hidden:r,selected:f,highlighted:d,renderEntry:S,onSelect:L,onHighlight:$,onVisible:T}){const p=dt(),A=c.text?o+1:o,g=M(()=>pt(s),[s]),[k,w]=tt(),C=ht(),N=C?_(g,C.chosen):_(g,m,k),E=s.filter(x=>bt(x,N));return a("section",{className:"clover-annotations-set","aria-labelledby":c.text?`${p}-title`:void 0,"data-set":t.id,children:[a("div",{className:"clover-annotations-set-header",children:[c.text&&a(u,{className:"clover-annotations-title",id:`${p}-title`,...B(c.lang),children:c.text}),N&&!C&&a(gt,{languages:g,chosen:N,onChange:w,nameKey:"annotationsLanguage",part:"clover-annotations"}),a(ft,{hidden:r,onChange:x=>T(!x),of:c.text?`${p}-title`:void 0})]}),a("ol",{className:"clover-annotations-list",children:E.map((x,e)=>a(xt,{entry:x,canvas:n.find(b=>b.id===x.canvasId),index:e,headingLevel:A,language:m,showLabel:l,selected:x.id===f,highlighted:x.id===d,renderEntry:S,onSelect:L,onHighlight:$},x.id))})]})}function Wt(t,s,n){const u=new Map(s.map((c,m)=>[c.id,m])),o=new Map;for(const c of t){const m=V(c.label,n),l=m.text;let r=o.get(l);r||(r={title:m,setIds:[],byCanvas:new Map},o.set(l,r)),r.setIds.push(c.id);for(const f of c.entries){const d=r.byCanvas.get(f.canvasId)??[];d.push(f),r.byCanvas.set(f.canvasId,d)}}return[...o.entries()].map(([c,m])=>({key:c,title:m.title,setIds:m.setIds,canvases:Jt([...m.byCanvas.entries()],u).map(([l,r])=>{var f;return{canvasId:l,label:V((f=s.find(d=>d.id===l))==null?void 0:f.label,n),entries:r}})}))}function Jt(t,s){return t.every(([n])=>s.has(n))?t.sort(([n],[u])=>s.get(n)-s.get(u)):t}function Qt(t,s){const{clover:n,language:u}=z("Annotations"),o=M(()=>{const l=new Set;for(const r of t)for(const f of r.canvases){if(s.has(f.canvasId))continue;const d=Et(f.entries[0].annotation);d&&l.add(d)}return[...l]},[t,s]),[c,m]=tt([]);return X(()=>{let l=true;return Promise.all(o.map(r=>jt(n,r))).then(r=>l&&m(r.filter(f=>!!f))),()=>{l=false}},[n,o]),M(()=>{const l=new Map;for(const r of c){const{canvases:f}=ut(r),d=V(r.label,u);for(const S of f){const L=V(S.label,u);l.set(S.id,{canvas:S,label:f.length>1&&L.text?[d,L]:[d]})}}return{named:o.length>0,of:l}},[c,o,u])}const Xt=ct(function({as:s,className:n,rest:u,sets:o,shown:c,headingLevel:m,language:l,showLabel:r,hiddenSets:f,selected:d,highlighted:S,renderEntry:L,onSelect:$,onHighlight:T,onVisible:p,end:A},g){const k=dt(),w=y(i=>ut(i.manifest).canvases),C=M(()=>Wt(o,w,l),[o,w,l]),N=M(()=>new Map(w.map(i=>[i.id,i])),[w]),E=Qt(C,N),[x,e]=tt({}),b=ht(),I=y(i=>{var h;return(h=i.manifest)==null?void 0:h.label}),P=M(()=>V(I,l),[I,l]),F=w.length>1||E.named,G=Tt(null),nt=()=>{const i=G.current;if(!i||!i.getClientRects().length)return true;const h=Kt(i)??i;return h.matches(":hover")||h.contains(document.activeElement)},St=c.join(`
1
+ import{D as ct,a as Z,e as z,c as y,s as Lt,n as kt,o as Ct,R as lt,r as Nt,u as a,t as V,w as $t,B as rt,E as At,b as dt,F as ut,T as M,d as tt,A as Tt,y as X,l as B,G as Et,H as Ot,v as Mt,k as ot,f as Bt}from"./shared-DFAX0n3B.mjs";import{E as qt}from"./EntryBodies-C0ICfS2R.mjs";import{u as yt,L as Pt}from"./ListEnd-pq-BgaDI.mjs";import{a as Rt}from"./annotation-name-Du2KAWoD.mjs";import{r as Vt,a as Ft}from"./link-Ct5PpHEY.mjs";import{s as Ht}from"./show-link-DBaJj4s_.mjs";import{f as jt,r as Gt}from"./fetchManifest-tQXcfFiz.mjs";import{j as mt}from"./classnames-DukgfdpI.mjs";import{b as it,s as Kt}from"./bringIntoView-CQH5ZgMM.mjs";import{a as Y}from"./heading-Cjt0f-Eu.mjs";import{C as _t}from"./Cue-xuo5dgKE.mjs";import{E as zt}from"./EntryThumbnail-DxHhfRo_.mjs";import{H as ft}from"./HideToggle-0nlIo-f8.mjs";import{u as ht,s as _}from"./readingLanguages-FyVsSWJ8.mjs";import{LanguageChoice as gt}from"./LanguageChoice-DkSc-n6g.mjs";import"./styles-BwkYiCLC.mjs";function vt(t){const s=t.bodies.filter(n=>{var u;return!n.image&&((u=n.value)==null?void 0:u.trim())}).map(n=>n.language).filter(n=>!!n&&n!=="none");return[...new Set(s)]}function pt(t){const s=t.map(vt),n=[...new Set(s.flat())];return n.length<2?[]:s.some(o=>o.length&&n.some(c=>!o.includes(c)))?n:[]}function bt(t,s){if(!s)return true;const n=vt(t);return!n.length||n.includes(s)}const Dt=[],xn=ct(function({scope:s="all",renderEntry:n,headingLevel:u=3,as:o="div",className:c,...m},l){const{t:r,langOf:f}=Z(),{clover:d,language:S}=z("Annotations"),L=y(e=>Lt(e.manifest,e.addedSets)),$=y(e=>kt(e.manifest,e.canvasId)),T=y(e=>Ct(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),p=y(e=>e.annotationId),A=lt.useSyncExternalStore(d.highlight.subscribe,d.highlight.get,d.highlight.get),g=e=>{const b=$t(L,e),I=b&&rt(b.target.t),P=d.media.get();I&&P&&$.some(F=>F.id===b.canvasId)&&At(P,I.start),d.selectAnnotation(e)},k=y(e=>s==="all"?Nt(e.manifest):Dt),w=yt(k),C=e=>e.entries.filter(b=>$.some(I=>I.id===b.canvasId)),N=L.map(e=>({set:e,entries:C(e)})).filter(({entries:e})=>e.length),E=Y(u),x={text:r("annotationsShow"),lang:f("annotationsShow")};return s==="all"?a(Xt,{ref:l,as:o,className:c,rest:m,sets:L,shown:$.map(e=>e.id),headingLevel:u,language:S,showLabel:x,hiddenSets:T,selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:e=>d.highlight.emit(e),onVisible:(e,b)=>e.forEach(I=>d.setSetVisible(I,b)),end:w.more&&a(Pt,{onReached:w.reachNext})}):N.length?a(o,{ref:l,className:mt("clover-annotations",c),...m,children:N.map(({set:e,entries:b})=>a(Ut,{set:e,entries:b,canvases:$,Heading:E,headingLevel:u,language:S,title:V(e.label,S),showLabel:x,hidden:T.includes(e.id),selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:I=>d.highlight.emit(I),onVisible:I=>d.setSetVisible(e.id,I)},e.id))}):null});function Ut({set:t,entries:s,canvases:n,Heading:u,headingLevel:o,title:c,language:m,showLabel:l,hidden:r,selected:f,highlighted:d,renderEntry:S,onSelect:L,onHighlight:$,onVisible:T}){const p=dt(),A=c.text?o+1:o,g=M(()=>pt(s),[s]),[k,w]=tt(),C=ht(),N=C?_(g,C.chosen):_(g,m,k),E=s.filter(x=>bt(x,N));return a("section",{className:"clover-annotations-set","aria-labelledby":c.text?`${p}-title`:void 0,"data-set":t.id,children:[a("div",{className:"clover-annotations-set-header",children:[c.text&&a(u,{className:"clover-annotations-title",id:`${p}-title`,...B(c.lang),children:c.text}),N&&!C&&a(gt,{languages:g,chosen:N,onChange:w,nameKey:"annotationsLanguage",part:"clover-annotations"}),a(ft,{hidden:r,onChange:x=>T(!x),of:c.text?`${p}-title`:void 0})]}),a("ol",{className:"clover-annotations-list",children:E.map((x,e)=>a(xt,{entry:x,canvas:n.find(b=>b.id===x.canvasId),index:e,headingLevel:A,language:m,showLabel:l,selected:x.id===f,highlighted:x.id===d,renderEntry:S,onSelect:L,onHighlight:$},x.id))})]})}function Wt(t,s,n){const u=new Map(s.map((c,m)=>[c.id,m])),o=new Map;for(const c of t){const m=V(c.label,n),l=m.text;let r=o.get(l);r||(r={title:m,setIds:[],byCanvas:new Map},o.set(l,r)),r.setIds.push(c.id);for(const f of c.entries){const d=r.byCanvas.get(f.canvasId)??[];d.push(f),r.byCanvas.set(f.canvasId,d)}}return[...o.entries()].map(([c,m])=>({key:c,title:m.title,setIds:m.setIds,canvases:Jt([...m.byCanvas.entries()],u).map(([l,r])=>{var f;return{canvasId:l,label:V((f=s.find(d=>d.id===l))==null?void 0:f.label,n),entries:r}})}))}function Jt(t,s){return t.every(([n])=>s.has(n))?t.sort(([n],[u])=>s.get(n)-s.get(u)):t}function Qt(t,s){const{clover:n,language:u}=z("Annotations"),o=M(()=>{const l=new Set;for(const r of t)for(const f of r.canvases){if(s.has(f.canvasId))continue;const d=Et(f.entries[0].annotation);d&&l.add(d)}return[...l]},[t,s]),[c,m]=tt([]);return X(()=>{let l=true;return Promise.all(o.map(r=>jt(n,r))).then(r=>l&&m(r.filter(f=>!!f))),()=>{l=false}},[n,o]),M(()=>{const l=new Map;for(const r of c){const{canvases:f}=ut(r),d=V(r.label,u);for(const S of f){const L=V(S.label,u);l.set(S.id,{canvas:S,label:f.length>1&&L.text?[d,L]:[d]})}}return{named:o.length>0,of:l}},[c,o,u])}const Xt=ct(function({as:s,className:n,rest:u,sets:o,shown:c,headingLevel:m,language:l,showLabel:r,hiddenSets:f,selected:d,highlighted:S,renderEntry:L,onSelect:$,onHighlight:T,onVisible:p,end:A},g){const k=dt(),w=y(i=>ut(i.manifest).canvases),C=M(()=>Wt(o,w,l),[o,w,l]),N=M(()=>new Map(w.map(i=>[i.id,i])),[w]),E=Qt(C,N),[x,e]=tt({}),b=ht(),I=y(i=>{var h;return(h=i.manifest)==null?void 0:h.label}),P=M(()=>V(I,l),[I,l]),F=w.length>1||E.named,G=Tt(null),nt=()=>{const i=G.current;if(!i||!i.getClientRects().length)return true;const h=Kt(i)??i;return h.matches(":hover")||h.contains(document.activeElement)},St=c.join(`
2
2
  `);return X(()=>{const i=G.current;if(!i||!F||nt())return;const h=c.map(D=>i.querySelector(`[data-canvas="${CSS.escape(D)}"]`)).find(Boolean);if(!h)return;const q=h.closest(".clover-annotations-set"),H=(q==null?void 0:q.querySelector("[data-canvas]"))===h;it(H&&q?q:h,"start")},[St]),X(()=>{const i=G.current;if(!i||!d||nt())return;const h=i.querySelector(`[data-entry="${CSS.escape(d)}"]`);h&&it(h,"nearest")},[d]),C.length?a(s,{ref:i=>{G.current=i,typeof g=="function"?g(i):g&&(g.current=i)},className:mt("clover-annotations",n),"data-scope":"all",...u,children:[C.map((i,h)=>{const q=Y(m),H=i.title.text?m+1:m,D=Y(H),wt=i.setIds.every(v=>f.includes(v)),U=pt(i.canvases.flatMap(v=>v.entries)),W=b?_(U,b.chosen):_(U,l,x[i.key]);return a("section",{className:"clover-annotations-set","aria-labelledby":i.title.text?`${k}-${h}`:void 0,children:[a("div",{className:"clover-annotations-set-header",children:[i.title.text&&a(q,{className:"clover-annotations-title",id:`${k}-${h}`,...B(i.title.lang),children:i.title.text}),W&&!b&&a(gt,{languages:U,chosen:W,onChange:v=>e(J=>({...J,[i.key]:v})),nameKey:"annotationsLanguage",part:"clover-annotations"}),a(ft,{hidden:wt,onChange:v=>p(i.setIds,!v),of:i.title.text?`${k}-${h}`:void 0})]}),i.canvases.map((v,J)=>{var at;const et=v.entries.filter(O=>bt(O,W));if(!et.length)return null;const j=E.of.get(v.canvasId),R=j?j.label:E.named&&P.text?w.length>1&&v.label.text?[P,v.label]:[P]:[v.label],Q=F&&!!((at=R[0])!=null&&at.text),It=F&&c.includes(v.canvasId),st=`${k}-${h}-${J}`;return a("section",{className:"clover-annotations-canvas","data-canvas":v.canvasId,"aria-labelledby":Q?st:void 0,"aria-current":It?"true":void 0,children:[Q&&a(D,{className:"clover-annotations-canvas-label",id:st,...B(R.length===1?R[0].lang:void 0),children:R.length===1?R[0].text:R.map((O,K)=>a(lt.Fragment,{children:[K>0&&", ",a("span",{...B(O.lang),children:O.text})]},K))}),a("ol",{className:"clover-annotations-list",children:et.map((O,K)=>a(xt,{entry:O,canvas:N.get(v.canvasId)??(j==null?void 0:j.canvas),index:K,headingLevel:Q?H+1:H,language:l,showLabel:r,selected:O.id===d,highlighted:O.id===S,renderEntry:L,onSelect:$,onHighlight:T},O.id))})]},v.canvasId)})]},i.key)}),A]}):null});function Yt(t,s){const n=t.target.rect?void 0:t.target.svg,u=Bt(Zt,!!n);return M(()=>{var m,l;const o=n?(m=u==null?void 0:u.readSvgShape(n))==null?void 0:m.box:void 0,c=t.target.rect??(o?{x:o.x,y:o.y,w:o.width,h:o.height}:void 0);return!c||!s||t.bodies.some(r=>r.image)?null:Gt(s,c,(l=t.layer)==null?void 0:l.image)},[t,s,n,u])}const Zt=()=>import("./svg-shape-DLY3g7oq.mjs");function xt({entry:t,canvas:s,index:n,headingLevel:u,language:o,showLabel:c,selected:m,highlighted:l,renderEntry:r,onSelect:f,onHighlight:d}){const{hostLanguage:S,t:L,langOf:$}=Z(),T=nn(t,o),p=T.text?T:{text:String(n+1)},A=rt(t.target.t),g=A?{text:L("annotationsShowTime"),lang:$("annotationsShowTime")}:c,k=!g.lang&&!Ot(p.lang,S),w=p.text?`${g.text}: ${p.text}`:g.text,{clover:C}=z("Annotations"),N=Yt(t,s);return a("li",{className:"clover-annotations-entry","data-entry":t.id,"data-selected":m,"data-highlighted":l,onMouseEnter:()=>d(t.id),onMouseLeave:()=>d(null),onFocus:()=>d(t.id),onBlur:()=>d(null),onClick:E=>{E.target.closest("a, button")||f(t.id)},children:[A&&a(_t,{start:A.start,className:"clover-annotations-time"}),a(zt,{className:"clover-annotations-thumbnail",source:N,request:C.request}),a("div",{className:"clover-annotations-body clover-cue-text",children:[r?r(t):a(qt,{bodies:t.bodies,language:o,headingLevel:u}),a(tn,{annotation:t.annotation})]}),a("button",{type:"button",className:"clover-annotations-show","aria-pressed":m,"aria-label":k?w:void 0,style:Mt,onClick:()=>f(t.id),children:!k&&a(ot,{children:[a("span",{...B(g.lang),children:[g.text,p.text&&":"]}),p.text&&a(ot,{children:[" ",a("span",{...B(p.lang),children:p.text})]})]})})]})}function tn({annotation:t}){const{clover:s}=z("Annotations"),{t:n,langOf:u}=Z(),o=M(()=>Vt(t)??Ft(t),[t]);if(!o)return null;const c=n("annotationsOpenLink"),m=u("annotationsOpenLink");return!o.canvasId&&!o.manifestId?a("a",{className:"clover-annotations-link",href:o.id,target:"_blank",rel:"noopener noreferrer",...B(m),children:c}):a("button",{type:"button",className:"clover-annotations-link",...B(m),onClick:l=>{var f;const r=l.currentTarget.closest(".clover-root");Ht(s,o)&&((f=r==null?void 0:r.querySelector(".clover-canvas-viewport"))==null||f.focus({preventScroll:true}))},children:c})}function nn(t,s){const{text:n="",lang:u}=Rt(t.bodies,s);return{text:n.slice(0,120),...u?{lang:u}:{}}}export{xn as Annotations};
@@ -1 +1 @@
1
- import{e as g,j as h,T as k,p as B,m as T,c as j,u as e,P as p,z as v}from"./shared-DkY2a89G.mjs";import L from"./Connected-DMXG3imZ.mjs";import{r as R}from"./rendererSurface-BkbGDL_Z.mjs";import{j as w}from"./classnames-DukgfdpI.mjs";import{a as x}from"./hooks-BhtNDs_1.mjs";import{L as c}from"./Loading-YxuKrDAM.mjs";const z=v(()=>import("./Connected-pyd0EBD3.mjs")),N=v(()=>import("./Connected-CBQ6xyhr.mjs"));function F({className:f,style:y,renderers:C,collapseControls:b,onContentStateChange:S,children:r,...n}){var u;const l=g("Body");h(l.clover,S);const o=x(),m=k(()=>B(o),[o]),s=T(C??l.renderers,{canvases:o,bodies:m}),a=s==null?void 0:s.component,i=((u=o.find(({type:t})=>t==="Scene"||t==="Timeline"))==null?void 0:u.type)??"Canvas",d=j(t=>t.status==="loading");return e("div",{"aria-busy":d,className:w("clover-body",f),"data-renderer":a?"custom":i.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...y},children:[a?e(a,{canvases:o,bodies:m,children:r}):i==="Scene"?e(p,{fallback:e(c,{overlay:true}),children:e(N,{...n,children:r})}):i==="Timeline"?e(p,{fallback:e(c,{overlay:true}),children:e(z,{...n,children:r})}):e(L,{...n,collapseControls:b,surface:R,children:r}),d&&e(c,{overlay:true})]})}export{F as B};
1
+ import{e as g,j as h,T as k,p as B,m as T,c as j,u as e,P as p,z as v}from"./shared-DFAX0n3B.mjs";import L from"./Connected-sYBn_9MK.mjs";import{r as R}from"./rendererSurface-nh6-EfuZ.mjs";import{j as w}from"./classnames-DukgfdpI.mjs";import{a as x}from"./hooks-C4dJ5K_D.mjs";import{L as c}from"./Loading-CoJLSRkv.mjs";const z=v(()=>import("./Connected-CcbVqzmj.mjs")),N=v(()=>import("./Connected-DthCPaHl.mjs"));function F({className:f,style:y,renderers:C,collapseControls:b,onContentStateChange:S,children:r,...n}){var u;const l=g("Body");h(l.clover,S);const o=x(),m=k(()=>B(o),[o]),s=T(C??l.renderers,{canvases:o,bodies:m}),a=s==null?void 0:s.component,i=((u=o.find(({type:t})=>t==="Scene"||t==="Timeline"))==null?void 0:u.type)??"Canvas",d=j(t=>t.status==="loading");return e("div",{"aria-busy":d,className:w("clover-body",f),"data-renderer":a?"custom":i.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...y},children:[a?e(a,{canvases:o,bodies:m,children:r}):i==="Scene"?e(p,{fallback:e(c,{overlay:true}),children:e(N,{...n,children:r})}):i==="Timeline"?e(p,{fallback:e(c,{overlay:true}),children:e(z,{...n,children:r})}):e(L,{...n,collapseControls:b,surface:R,children:r}),d&&e(c,{overlay:true})]})}export{F as B};
@@ -1 +1 @@
1
- import{a as o,u as r,l}from"./shared-DkY2a89G.mjs";import{j as n}from"./classnames-DukgfdpI.mjs";function c({error:a,className:s}){const{t,langOf:e}=o();return r("div",{className:n("clover-status",s),"data-status":"error",role:"alert",children:[r("p",{...l(e("statusError")),children:t("statusError")}),r("p",{className:"clover-status-detail",lang:"en",children:a.message})]})}export{c as B};
1
+ import{a as o,u as r,l}from"./shared-DFAX0n3B.mjs";import{j as n}from"./classnames-DukgfdpI.mjs";function c({error:a,className:s}){const{t,langOf:e}=o();return r("div",{className:n("clover-status",s),"data-status":"error",role:"alert",children:[r("p",{...l(e("statusError")),children:t("statusError")}),r("p",{className:"clover-status-detail",lang:"en",children:a.message})]})}export{c as B};
@@ -1 +1 @@
1
- import{u as t,l as d}from"./shared-DkY2a89G.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-OCB88zwY.mjs";import"./styles-DkkVOSUQ.mjs";const y=({className:n,id:e,label:o,children:r,onClick:s,expanded:i,controls:p,shortcut:a,lang:l})=>{const c=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return t("button",{id:e,className:u("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":c,onClick:s,"aria-expanded":i,"aria-controls":p,"aria-label":o,"aria-keyshortcuts":a==null?void 0:a.keys,...d(l),type:"button",children:[t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:r}),t(v,{label:o,shortcut:a})]})};export{y as B};
1
+ import{u as t,l as d}from"./shared-DFAX0n3B.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-nJSTYquc.mjs";import"./styles-BwkYiCLC.mjs";const y=({className:n,id:e,label:o,children:r,onClick:s,expanded:i,controls:p,shortcut:a,lang:l})=>{const c=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return t("button",{id:e,className:u("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":c,onClick:s,"aria-expanded":i,"aria-controls":p,"aria-label":o,"aria-keyshortcuts":a==null?void 0:a.keys,...d(l),type:"button",children:[t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:r}),t(v,{label:o,shortcut:a})]})};export{y as B};
@@ -1 +1 @@
1
- import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-2Fj9nT06.mjs";function g(t,o){return c(h(o.width/2,o.height/2),a(t.rotation),u(t.zoom),h(-t.x,-t.y))}function m(t,o){return c(h(t.x,t.y),u(1/t.zoom),a(-t.rotation),h(-o.width/2,-o.height/2))}function M(t,o,n){return i(m(t,o),n)}function w(t,o,n){return i(g(t,o),n)}function C(t,o){return f(m(t,o),{x:0,y:0,width:o.width,height:o.height})}function N(t,o,n=0,r=0){const e=f(a(n),t),s=Math.max(1,o.width*(1-r*2)),y=Math.max(1,o.height*(1-r*2)),d=Math.min(s/Math.max(e.width,Number.EPSILON),y/Math.max(e.height,Number.EPSILON)),x=l(t);return{x:x.x,y:x.y,zoom:d,rotation:n}}function P(t,o,n,r,e){const s=i(c(u(1/n),a(-r)),{x:o.x-e.width/2,y:o.y-e.height/2});return{x:t.x-s.x,y:t.y-s.y}}function S(t,o){return t.x===o.x&&t.y===o.y&&t.zoom===o.zoom&&t.rotation===o.rotation}export{P as a,w as b,S as c,N as f,M as s,C as v,g as w};
1
+ import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-DxZASM9E.mjs";function g(t,o){return c(h(o.width/2,o.height/2),a(t.rotation),u(t.zoom),h(-t.x,-t.y))}function m(t,o){return c(h(t.x,t.y),u(1/t.zoom),a(-t.rotation),h(-o.width/2,-o.height/2))}function M(t,o,n){return i(m(t,o),n)}function w(t,o,n){return i(g(t,o),n)}function C(t,o){return f(m(t,o),{x:0,y:0,width:o.width,height:o.height})}function N(t,o,n=0,r=0){const e=f(a(n),t),s=Math.max(1,o.width*(1-r*2)),y=Math.max(1,o.height*(1-r*2)),d=Math.min(s/Math.max(e.width,Number.EPSILON),y/Math.max(e.height,Number.EPSILON)),x=l(t);return{x:x.x,y:x.y,zoom:d,rotation:n}}function P(t,o,n,r,e){const s=i(c(u(1/n),a(-r)),{x:o.x-e.width/2,y:o.y-e.height/2});return{x:t.x-s.x,y:t.y-s.y}}function S(t,o){return t.x===o.x&&t.y===o.y&&t.zoom===o.zoom&&t.rotation===o.rotation}export{P as a,w as b,S as c,N as f,M as s,C as v,g as w};
@@ -1 +1 @@
1
- var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-BkbGDL_Z.mjs";class c{constructor(t,s){i(this,"kind","canvas2d");i(this,"canvas");i(this,"ctx");i(this,"pixelRatio",1);i(this,"drawn",new Set);this.canvas=t,this.ctx=s}static create(t){let s=null;try{s=t.getContext("2d",{alpha:true})}catch{s=null}return!s||typeof s.drawImage!="function"?null:new c(t,s)}resize(t,s,a){this.pixelRatio=a;const e=Math.max(1,Math.round(t*a)),h=Math.max(1,Math.round(s*a));this.canvas.width!==e&&(this.canvas.width=e),this.canvas.height!==h&&(this.canvas.height=h)}begin(){const t=this.ctx;t.setTransform(1,0,0,1,0,0),t.globalAlpha=1,t.clearRect(0,0,this.canvas.width,this.canvas.height),t.imageSmoothingEnabled=true,t.imageSmoothingQuality="high"}draw(t){if(!d(t.source))return"skipped";const s=this.ctx,a=t.transform,e=this.pixelRatio,h=t.crop??{x:0,y:0,width:t.width,height:t.height},n=g(t,e);return s.setTransform(e*a.a,e*a.b,e*a.c,e*a.d,e*a.e,e*a.f),s.globalAlpha=t.opacity,s.drawImage(t.source,h.x,h.y,h.width,h.height,h.x,h.y,h.width+n.x,h.height+n.y),this.drawn.add(t.key),"drawn"}end(){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.globalAlpha=1}has(t){return this.drawn.has(t)}release(t){this.drawn.delete(t)}dispose(){this.drawn.clear(),this.canvas.width=0,this.canvas.height=0}}export{c as Canvas2DBackend};
1
+ var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-nh6-EfuZ.mjs";class c{constructor(t,s){i(this,"kind","canvas2d");i(this,"canvas");i(this,"ctx");i(this,"pixelRatio",1);i(this,"drawn",new Set);this.canvas=t,this.ctx=s}static create(t){let s=null;try{s=t.getContext("2d",{alpha:true})}catch{s=null}return!s||typeof s.drawImage!="function"?null:new c(t,s)}resize(t,s,a){this.pixelRatio=a;const e=Math.max(1,Math.round(t*a)),h=Math.max(1,Math.round(s*a));this.canvas.width!==e&&(this.canvas.width=e),this.canvas.height!==h&&(this.canvas.height=h)}begin(){const t=this.ctx;t.setTransform(1,0,0,1,0,0),t.globalAlpha=1,t.clearRect(0,0,this.canvas.width,this.canvas.height),t.imageSmoothingEnabled=true,t.imageSmoothingQuality="high"}draw(t){if(!d(t.source))return"skipped";const s=this.ctx,a=t.transform,e=this.pixelRatio,h=t.crop??{x:0,y:0,width:t.width,height:t.height},n=g(t,e);return s.setTransform(e*a.a,e*a.b,e*a.c,e*a.d,e*a.e,e*a.f),s.globalAlpha=t.opacity,s.drawImage(t.source,h.x,h.y,h.width,h.height,h.x,h.y,h.width+n.x,h.height+n.y),this.drawn.add(t.key),"drawn"}end(){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.globalAlpha=1}has(t){return this.drawn.has(t)}release(t){this.drawn.delete(t)}dispose(){this.drawn.clear(),this.canvas.width=0,this.canvas.height=0}}export{c as Canvas2DBackend};