@nulib/clover 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Canvas/CanvasView.mjs +37 -4
  3. package/dist/components/Canvas/ChaptersMenu.mjs +6 -1
  4. package/dist/components/Canvas/ControlMenu.mjs +9 -2
  5. package/dist/components/Canvas/Controls.mjs +17 -4
  6. package/dist/components/Canvas/FrameAnimation.mjs +3 -0
  7. package/dist/components/Canvas/ImageControls.mjs +8 -3
  8. package/dist/components/Canvas/Placeholder.mjs +5 -2
  9. package/dist/components/Canvas/RowFits.mjs +3 -1
  10. package/dist/components/Canvas/media/MediaBody.mjs +41 -10
  11. package/dist/components/Canvas/media/Player.mjs +3 -0
  12. package/dist/components/Canvas/media/SeekMarks.mjs +236 -0
  13. package/dist/components/Canvas/media/Transport.mjs +29 -3
  14. package/dist/components/Canvas/media/useMediaElement.mjs +54 -19
  15. package/dist/components/Items/masonry.mjs +2 -0
  16. package/dist/components/Map/MapView.mjs +42 -2
  17. package/dist/components/Map/maplibre-sheet.mjs +5 -0
  18. package/dist/components/Map/sheet.mjs +19 -0
  19. package/dist/components/Map/worker.mjs +28 -1
  20. package/dist/components/Scene/SceneView.mjs +3 -0
  21. package/dist/core/content-state.mjs +1 -11
  22. package/dist/core/load.mjs +9 -1
  23. package/dist/core/presentation.mjs +4 -5
  24. package/dist/core/sanitize.mjs +15 -3
  25. package/dist/core/svg-shape.mjs +2 -1
  26. package/dist/core/thumbnail.mjs +15 -4
  27. package/dist/core/trusted.mjs +26 -0
  28. package/dist/core/vtt.mjs +20 -9
  29. package/dist/index.d.mts +200 -1
  30. package/dist/index.mjs +11 -0
  31. package/dist/lib/renderer/CanvasRenderer.mjs +48 -7
  32. package/dist/lib/renderer/camera/CameraAnimator.mjs +39 -20
  33. package/dist/lib/renderer/input/GestureController.mjs +15 -5
  34. package/dist/map/index.d.mts +6 -1
  35. package/dist/styles/collection-select.css +1 -0
  36. package/dist/styles/core.css +1 -0
  37. package/dist/styles/default.css +1 -0
  38. package/dist/styles/items.css +1 -0
  39. package/dist/styles/map.css +1 -0
  40. package/dist/styles/media.css +1 -0
  41. package/dist/styles/panel.css +1 -0
  42. package/dist/styles/scene.css +1 -0
  43. package/dist/styles/split.css +1 -0
  44. package/dist/styles.css +1 -1
  45. package/dist/templates/default/Default.mjs +2 -0
  46. package/dist/templates/document/Document.mjs +12 -2
  47. package/dist/templates/document/Sheets.mjs +2 -0
  48. package/dist/templates/gallery/Gallery.mjs +3 -1
  49. package/dist/templates/index.d.mts +102 -6
  50. package/dist/templates/shared/Lightbox.mjs +50 -3
  51. package/dist/templates/shared/LightboxView.mjs +3 -1
  52. package/dist/templates.css +1 -1
  53. package/dist/ui/Button.mjs +3 -1
  54. package/dist/ui/ControlCluster.mjs +6 -3
  55. package/dist/ui/Markup.mjs +8 -7
  56. package/dist/ui/Tip.mjs +6 -1
  57. package/dist/ui/adoptSheet.mjs +19 -0
  58. package/dist/ui/sheets/map.mjs +5 -0
  59. package/dist/ui/sheets/media.mjs +5 -0
  60. package/dist/ui/sheets/scene.mjs +5 -0
  61. package/dist/web-components/{About-D1TBGGPL.mjs → About-j3O9cA3r.mjs} +1 -1
  62. package/dist/web-components/{AnnotationItems-DTacmRA9.mjs → AnnotationItems-U0WmWGOh.mjs} +1 -1
  63. package/dist/web-components/{AnnotationMenu-DYc9ekWS.mjs → AnnotationMenu-C1fAWWYy.mjs} +1 -1
  64. package/dist/web-components/{AnnotationState--5ghW0C2.mjs → AnnotationState-C9UhGpsr.mjs} +1 -1
  65. package/dist/web-components/{Annotations-Bvc_FmJ5.mjs → Annotations-BtJ4IVmy.mjs} +2 -2
  66. package/dist/web-components/{Annotations-BG8lPjk1.mjs → Annotations-YcFbQRJx.mjs} +1 -1
  67. package/dist/web-components/{Body-QQ1DmnbP.mjs → Body-Ccxmucbr.mjs} +1 -1
  68. package/dist/web-components/{BodyAlert-A4xRjOKr.mjs → BodyAlert-BBSStCpI.mjs} +1 -1
  69. package/dist/web-components/Button-Bphsp8rv.mjs +1 -0
  70. package/dist/web-components/{Camera-DqT_1MgD.mjs → Camera-DSk-YFpW.mjs} +1 -1
  71. package/dist/web-components/{Canvas2DBackend-TZtR3zHf.mjs → Canvas2DBackend-CYAJ-W6-.mjs} +1 -1
  72. package/dist/web-components/CanvasView-BAJ6OYvn.mjs +2 -0
  73. package/dist/web-components/{CaptionDetails-DMRWmtaY.mjs → CaptionDetails-Dg9Y11o_.mjs} +1 -1
  74. package/dist/web-components/ChaptersMenu-i4bFwR8c.mjs +1 -0
  75. package/dist/web-components/{Chevron-DFGbSGPI.mjs → Chevron-BnlK9F4K.mjs} +1 -1
  76. package/dist/web-components/{ChoiceMenu-C80kdxvq.mjs → ChoiceMenu-YXA7Ku8M.mjs} +1 -1
  77. package/dist/web-components/{Collection-B4CxBsFL.mjs → Collection-DgSFQbN-.mjs} +1 -1
  78. package/dist/web-components/{CollectionSelect-DO8YO2p7.mjs → CollectionSelect-PUcTh3Uv.mjs} +1 -1
  79. package/dist/web-components/{Connected-sYBn_9MK.mjs → Connected-B_caNIrW.mjs} +1 -1
  80. package/dist/web-components/{Connected-CcbVqzmj.mjs → Connected-XhRc6yaA.mjs} +1 -1
  81. package/dist/web-components/{Connected-DthCPaHl.mjs → Connected-YgL5BWf5.mjs} +1 -1
  82. package/dist/web-components/{Contents-AVPYYXht.mjs → Contents-CoC4TK6G.mjs} +1 -1
  83. package/dist/web-components/ControlMenu-CYfLg3Ok.mjs +1 -0
  84. package/dist/web-components/ControlsFade-BcGL7yUH.mjs +1 -0
  85. package/dist/web-components/CountMenu-C7XawAoa.mjs +1 -0
  86. package/dist/web-components/Cue-DZJ5TBKU.mjs +1 -0
  87. package/dist/web-components/Document-DZDYR2Tk.mjs +1 -0
  88. package/dist/web-components/{DomLayers-DlRapZ1u.mjs → DomLayers-Bbrulm6v.mjs} +1 -1
  89. package/dist/web-components/{Download-Ci_JUTVd.mjs → Download-CfRPt74Y.mjs} +1 -1
  90. package/dist/web-components/{EntryBodies-C0ICfS2R.mjs → EntryBodies-Bz8hyAUW.mjs} +1 -1
  91. package/dist/web-components/{EntryThumbnail-DxHhfRo_.mjs → EntryThumbnail-R9h0AXcu.mjs} +1 -1
  92. package/dist/web-components/{FieldPill-CVfeeafm.mjs → FieldPill-DFIdy-hn.mjs} +1 -1
  93. package/dist/web-components/{FrameAnimation-AZpVvu0R.mjs → FrameAnimation-DFDuFwwt.mjs} +1 -1
  94. package/dist/web-components/Gallery-BrYWLufL.mjs +1 -0
  95. package/dist/web-components/{HideToggle-0nlIo-f8.mjs → HideToggle-geO9QfFR.mjs} +1 -1
  96. package/dist/web-components/ImageControls-B9PhCHqi.mjs +1 -0
  97. package/dist/web-components/{Items-Drd82_Jj.mjs → Items-C7wjylgH.mjs} +1 -1
  98. package/dist/web-components/{Label-BIjqJ-_T.mjs → Label-S7o8PlWU.mjs} +1 -1
  99. package/dist/web-components/{LanguageChoice-DkSc-n6g.mjs → LanguageChoice-URJJAdah.mjs} +1 -1
  100. package/dist/web-components/LightboxView-65ROPr0_.mjs +1 -0
  101. package/dist/web-components/{ListEnd-pq-BgaDI.mjs → ListEnd-B0wGr87o.mjs} +1 -1
  102. package/dist/web-components/{Loaded-CSO5NFhm.mjs → Loaded-Do53YvYw.mjs} +1 -1
  103. package/dist/web-components/{LoadedCanvas-DK6xMmM1.mjs → LoadedCanvas-BrtGPpSm.mjs} +1 -1
  104. package/dist/web-components/LoadedMap-C06TIgvf.mjs +1 -0
  105. package/dist/web-components/{Loading-CoJLSRkv.mjs → Loading-Du3wn1EM.mjs} +1 -1
  106. package/dist/web-components/{Map-BEVtD52O.mjs → Map-B6LVO0gx.mjs} +1 -1
  107. package/dist/web-components/MapView-CzV3y5iI.mjs +3 -0
  108. package/dist/web-components/Markup-DACv7sRg.mjs +2 -0
  109. package/dist/web-components/MediaBody-CcuO5IZT.mjs +1 -0
  110. package/dist/web-components/MediaBody-DGd2uFfK.mjs +1 -0
  111. package/dist/web-components/{NavDate-CYNK0Qmp.mjs → NavDate-DRKmjc54.mjs} +1 -1
  112. package/dist/web-components/{Navigator-DrYPepzN.mjs → Navigator-CA8zB6CU.mjs} +1 -1
  113. package/dist/web-components/{Pager-CN4lHURv.mjs → Pager-DWp6u3iv.mjs} +1 -1
  114. package/dist/web-components/{PagerLayout-DeqnSQcF.mjs → PagerLayout-DHRpcI8x.mjs} +1 -1
  115. package/dist/web-components/{Panel-CFYUlXup.mjs → Panel-CzUDNn8M.mjs} +1 -1
  116. package/dist/web-components/PanelPart-DKb9dXm6.mjs +1 -0
  117. package/dist/web-components/{PanelToggle-9ud55NNI.mjs → PanelToggle-D5sx5FP9.mjs} +1 -1
  118. package/dist/web-components/{PartOfManifest-KUHUq-6q.mjs → PartOfManifest-Ct-I8Ofm.mjs} +1 -1
  119. package/dist/web-components/{Pending-mcmdyZPA.mjs → Pending-f1heQNo7.mjs} +1 -1
  120. package/dist/web-components/{PlaceBox-DX4ZLDat.mjs → PlaceBox-_an9ya_W.mjs} +1 -1
  121. package/dist/web-components/Placeholder-D4-VCxeD.mjs +1 -0
  122. package/dist/web-components/{Position-DO5qg5Sp.mjs → Position-DA4rzRiy.mjs} +1 -1
  123. package/dist/web-components/{Primitives-c9sIz0oQ.mjs → Primitives-DU_VhdO2.mjs} +1 -1
  124. package/dist/web-components/{Provider-a3xY016W.mjs → Provider-Dl_t_qEC.mjs} +1 -1
  125. package/dist/web-components/{ReadMore-D_WmmKEP.mjs → ReadMore-BpA8Dex8.mjs} +1 -1
  126. package/dist/web-components/Root-DixSZV9Y.mjs +1 -0
  127. package/dist/web-components/Scene-CSaXgBNr.mjs +1 -0
  128. package/dist/web-components/SceneView-BJNlboix.mjs +1 -0
  129. package/dist/web-components/{Search-BgxEW1UT.mjs → Search-CvpKzlYP.mjs} +1 -1
  130. package/dist/web-components/{Sections-DZVrhoAC.mjs → Sections-BhfcUyaf.mjs} +1 -1
  131. package/dist/web-components/SeekMarks-BfOrFnvQ.mjs +1 -0
  132. package/dist/web-components/{StandaloneItems-6cSw7nbF.mjs → StandaloneItems-CoiceHd8.mjs} +1 -1
  133. package/dist/web-components/{Status-DHTzuTkh.mjs → Status-B4327UOL.mjs} +1 -1
  134. package/dist/web-components/{Steps-Dkpy9KiJ.mjs → Steps-ACdXJZrV.mjs} +1 -1
  135. package/dist/web-components/TargetItems-D1bLKA_B.mjs +1 -0
  136. package/dist/web-components/Timeline-DY8LpnOG.mjs +1 -0
  137. package/dist/web-components/Tip-BatwzZZo.mjs +1 -0
  138. package/dist/web-components/{Transcript-WvFFAJQM.mjs → Transcript-B1nh9UJK.mjs} +1 -1
  139. package/dist/web-components/Transport-BsjGGbFJ.mjs +1 -0
  140. package/dist/web-components/Transport-DKb3XTMA.mjs +1 -0
  141. package/dist/web-components/{annotation-collection-BkC3nBPA.mjs → annotation-collection-CtxYL-V3.mjs} +1 -1
  142. package/dist/web-components/{annotation-name-Du2KAWoD.mjs → annotation-name-KQ4wAi8-.mjs} +1 -1
  143. package/dist/web-components/{annotations-content-CEzAS-P2.mjs → annotations-content-XVgQ5me7.mjs} +1 -1
  144. package/dist/web-components/{body-DPlfbLt3.mjs → body-CbYkzpmQ.mjs} +1 -1
  145. package/dist/web-components/{canvas-BUwBftJW.mjs → canvas-Du31_Dru.mjs} +1 -1
  146. package/dist/web-components/{cloverEngine-UNw5K4Xg.mjs → cloverEngine-CuRCXZNZ.mjs} +1 -1
  147. package/dist/web-components/{content-state-reader-GgQF2MvJ.mjs → content-state-reader-DLlBY4Ox.mjs} +1 -1
  148. package/dist/web-components/controlGlyphs-ClH59vLg.mjs +1 -0
  149. package/dist/web-components/{controls-CC9G5LxK.mjs → controls-smixEi0i.mjs} +1 -1
  150. package/dist/web-components/custom-elements.json +10 -2
  151. package/dist/web-components/{downloads-CmAYeEIz.mjs → downloads-BqkNwsM0.mjs} +1 -1
  152. package/dist/web-components/{dragToClose-DK-eM097.mjs → dragToClose-2joCF413.mjs} +1 -1
  153. package/dist/web-components/{engine-Dok0z8WP.mjs → engine-DNTgJBST.mjs} +1 -1
  154. package/dist/web-components/{engines-BD2IfwQF.mjs → engines-BpFZX2dO.mjs} +1 -1
  155. package/dist/web-components/{fetchManifest-tQXcfFiz.mjs → fetchManifest-B-poGgag.mjs} +1 -1
  156. package/dist/web-components/{fromManifest-BwQdeAuL.mjs → fromManifest-Dw3BwjHM.mjs} +1 -1
  157. package/dist/web-components/{glyphs-dp_HK3Ja.mjs → glyphs-VoJVEqLE.mjs} +1 -1
  158. package/dist/web-components/hooks-Syt1XLVX.mjs +1 -0
  159. package/dist/web-components/{image-layers-xcBsiad9.mjs → image-layers-ryUJ_0bq.mjs} +1 -1
  160. package/dist/web-components/{imageService-4sFnmAFX.mjs → imageService-DBU_Xks1.mjs} +1 -1
  161. package/dist/web-components/index-DGXCFoHu.mjs +1 -0
  162. package/dist/web-components/index.d.mts +4 -2
  163. package/dist/web-components/index.mjs +1 -1
  164. package/dist/web-components/{items-BUmOy2QY.mjs → items-BQPvL5D6.mjs} +1 -1
  165. package/dist/web-components/items-TIbaHoB8.mjs +1 -0
  166. package/dist/web-components/label-Bd-QYEXn.mjs +1 -0
  167. package/dist/web-components/{layout-B29v2RKK.mjs → layout-MzMKFa5I.mjs} +1 -1
  168. package/dist/web-components/{link-Ct5PpHEY.mjs → link-BUQQE9P2.mjs} +1 -1
  169. package/dist/web-components/logo-Cn820OoX.mjs +1 -0
  170. package/dist/web-components/maplibre-sheet-CfiZ6JFk.mjs +1 -0
  171. package/dist/web-components/masonry-BZCdA3bV.mjs +1 -0
  172. package/dist/web-components/{models-BXcT4ijX.mjs → models-wl-5vW2i.mjs} +1 -1
  173. package/dist/web-components/{nodes-BleXuYE6.mjs → nodes-CmOpA3s7.mjs} +1 -1
  174. package/dist/web-components/{overlayImage-BJtfot4Y.mjs → overlayImage-tb9-Md51.mjs} +1 -1
  175. package/dist/web-components/{panel-BxxV_JkD.mjs → panel-BPVyAugu.mjs} +1 -1
  176. package/dist/web-components/part-DeZI8Hmp.mjs +1 -0
  177. package/dist/web-components/{playerSurface-BXNLaFk0.mjs → playerSurface-BxxMV-va.mjs} +1 -1
  178. package/dist/web-components/pointer-BqgxBJ82.mjs +1 -0
  179. package/dist/web-components/{provider-CPp0Sgr_.mjs → provider-B9oAQG-u.mjs} +1 -1
  180. package/dist/web-components/{range-regions-DAaOu0IS.mjs → range-regions-BFB1374L.mjs} +1 -1
  181. package/dist/web-components/{read-more-lcqGslUd.mjs → read-more-oWPk0OLi.mjs} +1 -1
  182. package/dist/web-components/{readingLanguages-FyVsSWJ8.mjs → readingLanguages-BigCi6rZ.mjs} +1 -1
  183. package/dist/web-components/rendererSurface-B_OOhxzA.mjs +22 -0
  184. package/dist/web-components/{renderers-BFS7hFVU.mjs → renderers-CBupZj8Z.mjs} +1 -1
  185. package/dist/web-components/{resource-Bufu7lAr.mjs → resource-B6uUsU6D.mjs} +1 -1
  186. package/dist/web-components/{sanitize-qIOeyIww.mjs → sanitize-BedC_UE5.mjs} +3 -3
  187. package/dist/web-components/{save-file-CoknKOPz.mjs → save-file-BaIrLp1V.mjs} +1 -1
  188. package/dist/web-components/{search-5ocrsYmT.mjs → search-DaGpvTki.mjs} +1 -1
  189. package/dist/web-components/shared-D2RadIoz.mjs +1 -0
  190. package/dist/web-components/{show-link-DBaJj4s_.mjs → show-link-Cxylys81.mjs} +1 -1
  191. package/dist/web-components/{sizedImage-jnOGcIIZ.mjs → sizedImage-DchqGFdt.mjs} +1 -1
  192. package/dist/web-components/{split-P6J0qqf5.mjs → split-oaEIep3T.mjs} +1 -1
  193. package/dist/web-components/{status-honoOMNx.mjs → status-CfCgO5OB.mjs} +1 -1
  194. package/dist/web-components/styles-DZIDbHxL.mjs +1 -0
  195. package/dist/web-components/svg-shape-D1K-WNrY.mjs +1 -0
  196. package/dist/web-components/three.mjs +1 -1
  197. package/dist/web-components/thumbnail-D83GaQ8C.mjs +1 -0
  198. package/dist/web-components/{tip-BhNI83aT.mjs → tip-CMEBtCil.mjs} +1 -1
  199. package/dist/web-components/{toggle-CJKdi5KH.mjs → toggle-3NncfBSZ.mjs} +1 -1
  200. package/dist/web-components/trusted-Bvpx307M.mjs +1 -0
  201. package/dist/web-components/{useContainerName-_48Cdi0m.mjs → useContainerName-fp0-n_9x.mjs} +1 -1
  202. package/dist/web-components/{useControlsVisibility-CieBxGnK.mjs → useControlsVisibility-BYZlgiAt.mjs} +1 -1
  203. package/dist/web-components/useLazyPanelPane-DXYGGS7f.mjs +1 -0
  204. package/dist/web-components/{useNearViewport-B34ebmIW.mjs → useNearViewport-DMqMdvue.mjs} +1 -1
  205. package/dist/web-components/{useScrollTrack-DgRGFeP5.mjs → useScrollTrack-BHuPAWxB.mjs} +1 -1
  206. package/dist/web-components/viewer/{AnnotationItems-BNA_92Dv.mjs → AnnotationItems-B5Vs0dYi.mjs} +1 -1
  207. package/dist/web-components/viewer/{AnnotationMenu-BIQYVR4N.mjs → AnnotationMenu-BO18q_Ze.mjs} +1 -1
  208. package/dist/web-components/viewer/{AnnotationState-BbwQqA1U.mjs → AnnotationState-ZPmnCpbZ.mjs} +1 -1
  209. package/dist/web-components/viewer/{Annotations-P4XzAlNc.mjs → Annotations-C46kSUA6.mjs} +1 -1
  210. package/dist/web-components/viewer/{Annotations-CZzOZAFP.mjs → Annotations-DEKa_9xz.mjs} +2 -2
  211. package/dist/web-components/viewer/{Canvas2DBackend-DFfCzyjL.mjs → Canvas2DBackend-DHSI3dKr.mjs} +1 -1
  212. package/dist/web-components/viewer/{CaptionDetails-DPtE-RQQ.mjs → CaptionDetails-BVCqV9NT.mjs} +1 -1
  213. package/dist/web-components/viewer/ChaptersMenu-CIwIM2Pb.mjs +1 -0
  214. package/dist/web-components/viewer/{ChoiceMenu-GkqyTQRQ.mjs → ChoiceMenu-Ww7lcPnq.mjs} +1 -1
  215. package/dist/web-components/viewer/{Collection-DjY_6qa6.mjs → Collection-DCYM9eE6.mjs} +1 -1
  216. package/dist/web-components/viewer/{Connected-D5T-mtiy.mjs → Connected-Bbk8M5rE.mjs} +1 -1
  217. package/dist/web-components/viewer/{Connected-DIOuI3Mv.mjs → Connected-DAOMKtJR.mjs} +1 -1
  218. package/dist/web-components/viewer/{Contents-DV-VxXuf.mjs → Contents-BnRBx3rc.mjs} +1 -1
  219. package/dist/web-components/viewer/ControlMenu-Co6yBttc.mjs +1 -0
  220. package/dist/web-components/viewer/ControlsFade-pOQ5VQ5i.mjs +1 -0
  221. package/dist/web-components/viewer/CountMenu-lu21fO_7.mjs +1 -0
  222. package/dist/web-components/viewer/Cue-oaiVO9ZO.mjs +1 -0
  223. package/dist/web-components/viewer/Document-ByBRhL68.mjs +1 -0
  224. package/dist/web-components/viewer/{DomLayers-BCwCxPDU.mjs → DomLayers-BjxGaZkt.mjs} +1 -1
  225. package/dist/web-components/viewer/{Download-CL4IClAD.mjs → Download-DhMD4AJt.mjs} +1 -1
  226. package/dist/web-components/viewer/{EntryBodies-e40y47bl.mjs → EntryBodies-DL5UolEz.mjs} +1 -1
  227. package/dist/web-components/viewer/{EntryThumbnail-B_dP3w4o.mjs → EntryThumbnail-CJisDcni.mjs} +1 -1
  228. package/dist/web-components/viewer/{FieldPill-Hse1cDBE.mjs → FieldPill-DAk6zxxD.mjs} +1 -1
  229. package/dist/web-components/viewer/{FrameAnimation-CE218DCr.mjs → FrameAnimation-DGMuFNdW.mjs} +1 -1
  230. package/dist/web-components/viewer/Gallery-CbHhyWlF.mjs +1 -0
  231. package/dist/web-components/viewer/{HideToggle-CYoqe_ez.mjs → HideToggle-C6B9B2Bo.mjs} +1 -1
  232. package/dist/web-components/viewer/ImageControls-BDx7C1q5.mjs +1 -0
  233. package/dist/web-components/viewer/{LanguageChoice-BmO-322r.mjs → LanguageChoice-BM9xZr_D.mjs} +1 -1
  234. package/dist/web-components/viewer/LightboxView-RrioB0CN.mjs +1 -0
  235. package/dist/web-components/viewer/{ListEnd-DX1jsvJk.mjs → ListEnd-8vdKw6Py.mjs} +1 -1
  236. package/dist/web-components/viewer/MapView-G3yj-Bjd.mjs +3 -0
  237. package/dist/web-components/viewer/MediaBody-BokgnTO-.mjs +1 -0
  238. package/dist/web-components/viewer/MediaBody-DPOcyiYH.mjs +1 -0
  239. package/dist/web-components/viewer/{NavDate-BZgeaMG9.mjs → NavDate-B6rCV-Cd.mjs} +1 -1
  240. package/dist/web-components/viewer/{Navigator-Co76p-1n.mjs → Navigator-CjgUcgKY.mjs} +1 -1
  241. package/dist/web-components/viewer/{PagerLayout-tUkN1-FV.mjs → PagerLayout-LZmC6VpV.mjs} +1 -1
  242. package/dist/web-components/viewer/PanelPart-Cw1G5W4b.mjs +1 -0
  243. package/dist/web-components/viewer/{PartOfManifest-DXnbEPzS.mjs → PartOfManifest-B0TYADTv.mjs} +1 -1
  244. package/dist/web-components/viewer/{PlaceBox-xrJ4CGdN.mjs → PlaceBox-Cjdjg-_9.mjs} +1 -1
  245. package/dist/web-components/viewer/Placeholder-MYLjXbiF.mjs +1 -0
  246. package/dist/web-components/viewer/{Search-DTg1cHZ3.mjs → Search-CyRrBHsr.mjs} +1 -1
  247. package/dist/web-components/viewer/SeekMarks-1WSjARP5.mjs +1 -0
  248. package/dist/web-components/viewer/{StandaloneItems-BpBEQG8i.mjs → StandaloneItems-CQrzTSPC.mjs} +1 -1
  249. package/dist/web-components/viewer/{Steps-SpwMQdCL.mjs → Steps-Bd42-eq7.mjs} +1 -1
  250. package/dist/web-components/viewer/TargetItems-BpmZEVMS.mjs +1 -0
  251. package/dist/web-components/viewer/{Transcript-rTAhuXCF.mjs → Transcript-CE4BsnWd.mjs} +1 -1
  252. package/dist/web-components/viewer/Transport-1ROUkfsf.mjs +1 -0
  253. package/dist/web-components/viewer/Transport-g0_Cjy0f.mjs +1 -0
  254. package/dist/web-components/viewer/{annotation-collection-B7pZiLVk.mjs → annotation-collection-vM0aeJgP.mjs} +1 -1
  255. package/dist/web-components/viewer/annotation-name-kjUrGbhg.mjs +1 -0
  256. package/dist/web-components/viewer/{annotations-content-9AtLlPNn.mjs → annotations-content-CysDLy4t.mjs} +1 -1
  257. package/dist/web-components/viewer/{cloverEngine-jRrYLrWa.mjs → cloverEngine-S8GEd-YZ.mjs} +1 -1
  258. package/dist/web-components/viewer/{content-state-reader-CPvkju6Q.mjs → content-state-reader-BTZKS9Hq.mjs} +1 -1
  259. package/dist/web-components/viewer/{dragToClose-Co9kGk9q.mjs → dragToClose-Bt4QtVSO.mjs} +1 -1
  260. package/dist/web-components/viewer/{fetchManifest-D7N9WhhF.mjs → fetchManifest-D4aIqcDV.mjs} +1 -1
  261. package/dist/web-components/viewer/{host-DMD9LE4H.mjs → host-ClJe-BX1.mjs} +1 -1
  262. package/dist/web-components/viewer/{image-layers-x_shzPvu.mjs → image-layers-DGa5HJt8.mjs} +1 -1
  263. package/dist/web-components/viewer/index.mjs +1 -1
  264. package/dist/web-components/viewer/{link-DikPGzNO.mjs → link-CU71f0wU.mjs} +1 -1
  265. package/dist/web-components/viewer/{overlayImage-33kKKB0T.mjs → overlayImage-D9GHzMmm.mjs} +1 -1
  266. package/dist/web-components/viewer/{range-regions-TH6WWGTT.mjs → range-regions-CiceyEuu.mjs} +1 -1
  267. package/dist/web-components/viewer/{renderers-BxePmixF.mjs → renderers-2BgvLkI0.mjs} +1 -1
  268. package/dist/web-components/viewer/{save-file-QXKiPlST.mjs → save-file-BW7D7oYG.mjs} +1 -1
  269. package/dist/web-components/viewer/{search-B_NePyas.mjs → search-DBMO82DV.mjs} +1 -1
  270. package/dist/web-components/viewer/styles-DogZyfVz.mjs +1 -0
  271. package/dist/web-components/viewer/{useControlsVisibility-Cu-jTDzs.mjs → useControlsVisibility-DSSIzst5.mjs} +1 -1
  272. package/dist/web-components/viewer/useLazyPanelPane-_6IY7cV5.mjs +1 -0
  273. package/dist/web-components/viewer/viewer-ClQD1LNQ.mjs +29 -0
  274. package/dist/web-components/viewer/vtt-Dk5bwDVQ.mjs +5 -0
  275. package/dist/web-components/viewer-DLfZQmZs.mjs +1 -0
  276. package/dist/web-components/vtt-9Ui3h60h.mjs +5 -0
  277. package/dist/web-components/worker-C9aVbya_.mjs +1 -0
  278. package/package.json +2 -1
  279. package/dist/web-components/Button-Cx6VE_UW.mjs +0 -1
  280. package/dist/web-components/CanvasView-DxZASM9E.mjs +0 -2
  281. package/dist/web-components/ChaptersMenu-BAZVVDrK.mjs +0 -1
  282. package/dist/web-components/ControlMenu-BjJsWnuZ.mjs +0 -1
  283. package/dist/web-components/ControlsFade-C-6WhSxB.mjs +0 -1
  284. package/dist/web-components/CountMenu-Dx8D_RJZ.mjs +0 -1
  285. package/dist/web-components/Cue-xuo5dgKE.mjs +0 -1
  286. package/dist/web-components/Document-BWdafeEi.mjs +0 -1
  287. package/dist/web-components/Gallery-C2PTJmvN.mjs +0 -1
  288. package/dist/web-components/ImageControls-tKVAMpaj.mjs +0 -1
  289. package/dist/web-components/LightboxView-Cuqx2H1m.mjs +0 -1
  290. package/dist/web-components/LoadedMap-DmPH-LKY.mjs +0 -1
  291. package/dist/web-components/MapView-DHJcn9gW.mjs +0 -3
  292. package/dist/web-components/Markup-Hm6bWOjm.mjs +0 -2
  293. package/dist/web-components/MediaBody-BpgNtpKZ.mjs +0 -1
  294. package/dist/web-components/MediaBody-Co23JjUJ.mjs +0 -1
  295. package/dist/web-components/PanelPart-CpUIRbxr.mjs +0 -1
  296. package/dist/web-components/Placeholder-0hE8q-SY.mjs +0 -1
  297. package/dist/web-components/Root-CU1o0wje.mjs +0 -1
  298. package/dist/web-components/Scene-CboEeptc.mjs +0 -1
  299. package/dist/web-components/SceneView-hcc78jQT.mjs +0 -1
  300. package/dist/web-components/TargetItems-CyOI9_Z4.mjs +0 -1
  301. package/dist/web-components/Timeline-B9tD3Rar.mjs +0 -1
  302. package/dist/web-components/Tip-nJSTYquc.mjs +0 -1
  303. package/dist/web-components/Transport-FxLp_bdW.mjs +0 -1
  304. package/dist/web-components/Transport-VUxSEIQO.mjs +0 -1
  305. package/dist/web-components/hooks-C4dJ5K_D.mjs +0 -1
  306. package/dist/web-components/index-DspT4wUm.mjs +0 -1
  307. package/dist/web-components/items-CWMI53aN.mjs +0 -1
  308. package/dist/web-components/label-BGjL7I4b.mjs +0 -1
  309. package/dist/web-components/logo-BFstM-0a.mjs +0 -1
  310. package/dist/web-components/masonry-0QfzOgbB.mjs +0 -1
  311. package/dist/web-components/part-D4gjnYmT.mjs +0 -1
  312. package/dist/web-components/pointer-CJELU3gI.mjs +0 -1
  313. package/dist/web-components/rendererSurface-nh6-EfuZ.mjs +0 -22
  314. package/dist/web-components/shared-DFAX0n3B.mjs +0 -1
  315. package/dist/web-components/styles-BwkYiCLC.mjs +0 -1
  316. package/dist/web-components/svg-shape-DLY3g7oq.mjs +0 -1
  317. package/dist/web-components/thumbnail-EbURh-UM.mjs +0 -1
  318. package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +0 -1
  319. package/dist/web-components/viewer/ChaptersMenu-D6Jmujag.mjs +0 -1
  320. package/dist/web-components/viewer/ControlMenu-BsEpff6N.mjs +0 -1
  321. package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +0 -1
  322. package/dist/web-components/viewer/CountMenu-DCmA6HdK.mjs +0 -1
  323. package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +0 -1
  324. package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +0 -1
  325. package/dist/web-components/viewer/Gallery-F2sVj4ph.mjs +0 -1
  326. package/dist/web-components/viewer/ImageControls-C2G4x2Es.mjs +0 -1
  327. package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +0 -1
  328. package/dist/web-components/viewer/MapView-Df0wZjCh.mjs +0 -3
  329. package/dist/web-components/viewer/MediaBody-CataNonO.mjs +0 -1
  330. package/dist/web-components/viewer/MediaBody-SkIgrEMj.mjs +0 -1
  331. package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +0 -1
  332. package/dist/web-components/viewer/Placeholder-B1AcizHL.mjs +0 -1
  333. package/dist/web-components/viewer/TargetItems-B6Icep5k.mjs +0 -1
  334. package/dist/web-components/viewer/Transport-vKIDALE-.mjs +0 -1
  335. package/dist/web-components/viewer/Transport-z_kdVisw.mjs +0 -1
  336. package/dist/web-components/viewer/annotation-name-BKj1O9lA.mjs +0 -1
  337. package/dist/web-components/viewer/styles-Bedyz7_l.mjs +0 -1
  338. package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +0 -1
  339. package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +0 -29
  340. package/dist/web-components/viewer/vtt-CUn4h5JB.mjs +0 -5
  341. package/dist/web-components/viewer-DN2Mo3vc.mjs +0 -1
  342. package/dist/web-components/vtt-C5M5WPSG.mjs +0 -5
  343. package/dist/web-components/worker-CjXN0dku.mjs +0 -1
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const __clover_sheet_scene = '@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}';
3
+ export {
4
+ __clover_sheet_scene as default
5
+ };
@@ -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,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
+ 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-D2RadIoz.mjs";import{j as G}from"./classnames-DukgfdpI.mjs";import{u as V}from"./readingLanguages-BigCi6rZ.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-DU_VhdO2.mjs";import{u as Y}from"./downloads-BqkNwsM0.mjs";import{P as Z}from"./Provider-Dl_t_qEC.mjs";import{a as K,t as ee}from"./heading-Cjt0f-Eu.mjs";import{L as te}from"./Label-S7o8PlWU.mjs";import{r as oe}from"./dates-DR3gfcON.mjs";import"./styles-DZIDbHxL.mjs";const ae=p(()=>import("./LanguageChoice-URJJAdah.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-CfRPt74Y.mjs").then(({DownloadGroups:o})=>({default:o}))),se=p(()=>import("./NavDate-DRKmjc54.mjs").then(o=>o.a).then(({NavDate:o})=>({default:o}))),ce=p(()=>import("./PartOfManifest-Ct-I8Ofm.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,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
+ import{e as P,c as v,af as _,T as E,G as O,A as R,y as T,u as p,k,d as q,Z as F}from"./shared-D2RadIoz.mjs";import{P as G,a as L}from"./Items-C7wjylgH.mjs";import{C as y}from"./CountMenu-C7XawAoa.mjs";import{a as B}from"./annotation-name-KQ4wAi8-.mjs";import{f as D,r as K}from"./fetchManifest-B-poGgag.mjs";import{u as V,L as Z}from"./ListEnd-B0wGr87o.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),f=g&&g!==(n==null?void 0:n.id)?C.get(g)??null:n;return W(a,f,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"?p(G,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,g)=>{const f=h+a;if(!(f<0)){if(i[f])return w(i[f],g);N&&(I.current=f,S())}}},nameKey:"informationPanelTabsAnnotations",position:p(y,{position:h,total:b,list:a=>p(j,{layout:"list",forwardedRef:null,onSelect:a})})}):p(k,{children:[p(L,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&p(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-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
+ import{u as e,l as N}from"./shared-D2RadIoz.mjs";import{s as E}from"./Annotations-YcFbQRJx.mjs";import H from"./ControlMenu-CYfLg3Ok.mjs";import{C as T}from"./Cue-DZJ5TBKU.mjs";import{H as $}from"./HideToggle-geO9QfFR.mjs";import{u as w}from"./useContainerName-fp0-n_9x.mjs";import"./styles-DZIDbHxL.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-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
+ import{T as i,a8 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-D2RadIoz.mjs";import{w as Dt,p as It,g as Ot,t as Jt,A as Ut}from"./Annotations-YcFbQRJx.mjs";import{h as Xt}from"./layout-MzMKFa5I.mjs";const Yt=()=>import("./svg-shape-D1K-WNrY.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,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-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
- `);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
+ 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-D2RadIoz.mjs";import{E as qt}from"./EntryBodies-Bz8hyAUW.mjs";import{u as yt,L as Pt}from"./ListEnd-B0wGr87o.mjs";import{a as Rt}from"./annotation-name-KQ4wAi8-.mjs";import{r as Vt,a as Ft}from"./link-BUQQE9P2.mjs";import{s as Ht}from"./show-link-Cxylys81.mjs";import{f as jt,r as Gt}from"./fetchManifest-B-poGgag.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-DZJ5TBKU.mjs";import{E as zt}from"./EntryThumbnail-R9h0AXcu.mjs";import{H as ft}from"./HideToggle-geO9QfFR.mjs";import{u as ht,s as _}from"./readingLanguages-BigCi6rZ.mjs";import{LanguageChoice as gt}from"./LanguageChoice-URJJAdah.mjs";import"./styles-DZIDbHxL.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
+ `);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-D1K-WNrY.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
- 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
+ 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{a8 as q,aF as ot,a9 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-D2RadIoz.mjs";import{a as ht}from"./annotation-name-KQ4wAi8-.mjs";import{r as ut}from"./link-BUQQE9P2.mjs";import{T as dt}from"./Tip-BatwzZZo.mjs";import{c as pt}from"./Camera-DSk-YFpW.mjs";import"./styles-DZIDbHxL.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 +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-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
+ 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-D2RadIoz.mjs";import L from"./Connected-B_caNIrW.mjs";import{r as R}from"./rendererSurface-B_OOhxzA.mjs";import{j as w}from"./classnames-DukgfdpI.mjs";import{a as x}from"./hooks-Syt1XLVX.mjs";import{L as c}from"./Loading-Du3wn1EM.mjs";const z=v(()=>import("./Connected-XhRc6yaA.mjs")),N=v(()=>import("./Connected-YgL5BWf5.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-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
+ import{a as o,u as r,l}from"./shared-D2RadIoz.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};
@@ -0,0 +1 @@
1
+ import{u as t,l as u}from"./shared-D2RadIoz.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{T as b}from"./Tip-BatwzZZo.mjs";import"./styles-DZIDbHxL.mjs";const x=({className:n,id:e,label:o,children:r,onClick:s,expanded:i,controls:l,shortcut:a,lang:p,unavailable:d})=>{const c=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return t("button",{id:e,className:v("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":c,onClick:s,"aria-disabled":d||void 0,"aria-expanded":i,"aria-controls":l,"aria-label":o,"aria-keyshortcuts":a==null?void 0:a.keys,...u(p),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(b,{label:o,shortcut:a})]})};export{x 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-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
+ import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-BAJ6OYvn.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,S as b,w 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-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};
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-B_OOhxzA.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};
@@ -0,0 +1,2 @@
1
+ import{A as I,_ as Ut,a as Pn,d as p,q as be,y as V,t as Qe,f as et,u as i,R as Yt,k as oo,a2 as ao,b as so,T as N,a3 as lo,a4 as io,a5 as ro,P as Se,z as Ve,v as co,l as xn,a6 as uo}from"./shared-D2RadIoz.mjs";import{u as fo,d as En,r as ho,C as go,t as mo,E as po,e as yo,f as vo,h as bo,g as Co,j as wo,B as xo,k as Io,l as Mo}from"./pointer-BqgxBJ82.mjs";import{P as ko,a as Oo,I as Bo,b as So}from"./glyphs-VoJVEqLE.mjs";import{B as kt}from"./Button-Bphsp8rv.mjs";import{Z as Po,a as Eo,b as Ro,c as Fo,R as In,d as Lo,C as To}from"./controlGlyphs-ClH59vLg.mjs";import{S as U,f as $o}from"./Tip-BatwzZZo.mjs";import{f as zo,s as Ao,b as Mn,d as No,p as Vo,e as Do,g as kn,h as Ko,i as Ho}from"./layout-MzMKFa5I.mjs";import{u as qo,a as jo,h as _o}from"./useNearViewport-DMqMdvue.mjs";import{L as Wo}from"./Loading-Du3wn1EM.mjs";import{j as Zo}from"./classnames-DukgfdpI.mjs";import{u as Uo}from"./useContainerName-fp0-n_9x.mjs";import{b as Yo,f as Go}from"./imageService-DBU_Xks1.mjs";import"./styles-DZIDbHxL.mjs";function Jo(e,n,s){return e.reduce((o,u)=>o+u+s,-s)<=n}function Xo(e,n,s){const o=e.ownerDocument,u=f=>f instanceof HTMLElement&&e.contains(f)&&!f.closest("[hidden]"),a=[o.getElementById(n),o.getElementById(s),...Array.from(e.querySelectorAll("button"))].find(u);a==null||a.focus()}function Qo({cluster:e,ids:n,more:s,fits:o,settled:u,onFits:a}){const f=I(o);f.current=o;const m=I(a);m.current=a;const q=I(new Map),j=I(n);j.current=n;const b=I(null),D=n.join(" ");return Ut(()=>{const K=e.ownerDocument,E=()=>{var ue;const H=j.current,Q=getComputedStyle(e),Pe=parseFloat(Q.columnGap)||0;let C=e.clientWidth-(parseFloat(Q.paddingLeft)||0)-(parseFloat(Q.paddingRight)||0),F=0;for(const k of H){const Ee=(ue=K.getElementById(k))==null?void 0:ue.offsetWidth;Ee&&q.current.set(k,Ee),F=Math.max(F,q.current.get(k)??0)}for(const k of Array.from(e.children))!(k instanceof HTMLElement)||H.includes(k.id)||k.id===s||k.classList.contains("clover-canvas-more")||!k.offsetWidth||getComputedStyle(k).position==="absolute"||(C-=k.offsetWidth+Pe);const ne=Jo(H.map(k=>q.current.get(k)??F),C,Pe);if(ne===f.current)return;const Ce=K.activeElement;b.current=Ce instanceof HTMLElement&&e.contains(Ce)?Ce.id:null,f.current=ne,m.current(ne)};E();const d=new ResizeObserver(()=>E());d.observe(e);const X=new MutationObserver(()=>E());return X.observe(e,{childList:true}),()=>{d.disconnect(),X.disconnect()}},[e,D,s]),Ut(()=>{if(!u)return;const K=b.current;if(b.current=null,K===null)return;const E=e.ownerDocument.activeElement;(!E||!e.contains(E)||E.closest("[hidden]"))&&Xo(e,K,s)},[o,u,e,s]),null}const ea=()=>import("./AnnotationMenu-C1fAWWYy.mjs"),ta=()=>import("./ChaptersMenu-i4bFwR8c.mjs"),na=()=>import("./ChoiceMenu-YXA7Ku8M.mjs"),oa=()=>import("./ImageControls-B9PhCHqi.mjs"),On=2,aa=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),Rn={atMax:false,atMin:false,atHome:false},sa=({renderer:e,instance:n,config:s,controlButtons:o,limits:u=Rn,placeholder:a,placeholderIsMore:f=false,choices:m=[],selections:q={},onSelect:j,annotations:b=[],chapters:D=[],mediaElement:K=null,onChapter:E,overStill:d,request:X,hiddenPages:H,onPageVisibilityChange:Q,selectedAnnotation:Pe=null,onAnnotationSelect:C,onAnnotationActivate:F,captionId:ne,captionOpen:Ce=false,onCaptionToggle:ue,placeId:k,placeOpen:Ee=false,onPlaceToggle:De,language:Y,fit:Ke=true,more:Bt="auto",children:tt})=>{var gt,mt,Be,Ge;const{t:O,langOf:B}=Pn(),[ee,oe]=p(false),[nt,ot]=p(false),ae=`annotations-${n}`,He=`${ae}-menu`,se=O("informationPanelTabsAnnotations"),at=B("informationPanelTabsAnnotations"),we=be(l=>{var h;ot(false),F==null||F(null),l&&((h=document.getElementById(ae))==null||h.focus())},[ae,F]),st=s.annotations&&b.length>0&&C,[lt,it]=p(false),te=`chapters-${n}`,xe=`${te}-menu`,Ie=D.length>0&&!!E,S=I(false),de=I(null);V(()=>{const l=()=>{var h;S.current=((h=document.activeElement)==null?void 0:h.id)===te};return document.addEventListener("focusin",l),()=>document.removeEventListener("focusin",l)},[te]);const L=be(()=>{var h,ge;if(!S.current)return;S.current=false;const l=document.activeElement;l&&l!==document.body||(ge=(h=de.current)==null?void 0:h.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||ge.focus()},[]);V(()=>{Ie||L()},[Ie,L]),V(()=>()=>L(),[L]);const rt=be(l=>{var h;it(false),l&&((h=document.getElementById(te))==null||h.focus())},[te]),le=s.information&&ne&&ue,qe=s.map&&k&&De,Me=`choice-${n}`,v=m.length===1?Qe(m[0].label,Y):null,Re=(v==null?void 0:v.text)||O("canvasChoice"),fe=v!=null&&v.text?v.lang:B("canvasChoice"),je=`${Me}-menu`,ct=(gt=et(ea,!!st))==null?void 0:gt.default,_e=(mt=et(ta,Ie))==null?void 0:mt.default,We=(Be=et(na,m.length>0&&!!j))==null?void 0:Be.default,St=be(l=>{var h;oe(false),l&&((h=document.getElementById(Me))==null||h.focus())},[Me]),Pt=fo(),[_,Fe]=p(null);V(()=>{de.current=(_==null?void 0:_.closest(".clover-canvas"))??null},[_]);const Le=En(_),[ie,ke]=p(false),ut=l=>i(kt,{className:l,id:ae,label:se,lang:at,onClick:()=>ot(h=>!h),expanded:nt,controls:He,children:i(So,{})},"annotations"),dt=(()=>{const l=[],h=e;return s.zoom&&h&&l.push({key:"zoomIn",id:`zoomIn-${n}`,shortcut:U.zoomIn,label:O("imageZoomIn"),lang:B("imageZoomIn"),glyph:i(Po,{}),unavailable:u.atMax,onClick:()=>h.zoomBy(On)},{key:"zoomOut",id:`zoomOut-${n}`,shortcut:U.zoomOut,label:O("imageZoomOut"),lang:B("imageZoomOut"),glyph:i(Eo,{}),unavailable:u.atMin,onClick:()=>h.zoomBy(1/On)}),s.fullPage&&Pt&&l.push({key:"fullPage",id:`fullPage-${n}`,label:O(Le?"imageExitFullScreen":"imageFullScreen"),lang:B(Le?"imageExitFullScreen":"imageFullScreen"),glyph:Le?i(Ro,{}):i(Fo,{}),onClick:ge=>void mo(ge.currentTarget)}),s.rotation&&h&&l.push({key:"rotateRight",id:`rotateRight-${n}`,shortcut:U.rotateRight,label:O("imageRotateRight"),lang:B("imageRotateRight"),glyph:i(In,{}),onClick:()=>h.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${n}`,shortcut:U.rotateLeft,label:O("imageRotateLeft"),lang:B("imageRotateLeft"),glyph:i(In,{}),onClick:()=>h.rotateBy(-90)}),s.reset&&h&&l.push({key:"reset",id:`reset-${n}`,shortcut:U.reset,label:O("imageResetZoom"),lang:B("imageResetZoom"),glyph:i(Lo,{}),unavailable:u.atHome,onClick:()=>h.home()}),m.length&&l.push({key:"choice",id:Me,label:Re,lang:fe,glyph:i(To,{}),onClick:()=>oe(ge=>!ge),expanded:ee,controls:je}),l})(),G=[...dt.filter(l=>l.key!=="fullPage"),...dt.filter(l=>l.key==="fullPage")].map(l=>({id:l.id,view:aa.has(l.key),node:ho(l,o)})),Ze=[qe&&{id:`place-${n}`,view:false,node:i(kt,{id:`place-${n}`,label:O("mapLabel"),lang:B("mapLabel"),onClick:De,expanded:Ee,controls:k,children:i(ko,{})},"place")},Ie&&{id:te,view:false,node:i(kt,{id:te,label:O("playerChapters"),lang:B("playerChapters"),onClick:()=>it(l=>!l),expanded:lt,controls:xe,children:i(Oo,{})},"chapters")},st&&{id:ae,view:false,node:ut()},le&&{id:`information-${n}`,view:false,node:i(kt,{id:`information-${n}`,label:O("informationPanelTabsAbout"),lang:B("informationPanelTabsAbout"),onClick:ue,expanded:Ce,controls:ne,children:i(Bo,{})},"information")},!!a&&{id:`placeholder-${n}`,view:false,node:i(Yt.Fragment,{children:a},"placeholder")}].filter(l=>!!l),ft=Ze.filter(l=>l.id===`placeholder-${n}`),T=[...G.filter(l=>l.view),...ft],Ue=[...G.filter(l=>!l.view),...Ze.filter(l=>!ft.includes(l))],J=[...T,...Ue],[Oe,Rt]=p(true),Ye=Bt==="always"||f,w=(Ge=et(oa,Ke&&(f||(Ye||!Oe)&&J.some(l=>l.view))))==null?void 0:Ge.ImageControls,$=Oe&&!Ye||!w?[]:J.filter(l=>l.view),he=f&&!!a&&!!w;V(()=>{$.length||ke(false)},[$.length]);const ht=l=>l.filter(h=>!$.includes(h)&&!(he&&h.id===`placeholder-${n}`)).map(({node:h})=>h);return i(oo,{children:[i(go,{fit:Ke,clusterRef:Fe,children:[ht(T),w&&($.length>0||he)&&i(w,{instance:n,open:he?$.length>0:ie,onOpenChange:ke,toggle:he?a:void 0,children:$.map(({node:l})=>l)}),ht(Ue),tt]}),Ke&&!Ye&&_&&i(Qo,{cluster:_,ids:J.map(({id:l})=>l),more:`more-${n}`,fits:Oe,settled:Oe||$.length>0||!J.some(l=>l.view),onFits:Rt}),_e&&lt&&Ie&&i(_e,{id:xe,triggerId:te,label:O("playerChapters"),labelLang:B("playerChapters"),chapters:D,element:K,onChapter:E,overStill:d,request:X,onClose:rt}),ct&&nt&&st&&i(ct,{id:He,triggerId:ae,label:se,labelLang:at,annotations:b,hiddenPages:H,onPageVisibilityChange:Q,selected:Pe,onSelect:C,onActivate:l=>F==null?void 0:F(l),onClose:we}),We&&ee&&m.length>0&&j&&i(We,{id:je,triggerId:Me,label:Re,labelLang:fe,language:Y,choices:m,selections:q,onSelect:j,onClose:St})]})},la=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function Ka(e,n){return{a:1,b:0,c:0,d:1,e,f:n}}function Ha(e,n=e){return{a:e,b:0,c:0,d:n,e:0,f:0}}function qa(e){const n=Math.cos(e),s=Math.sin(e);return{a:n,b:s,c:-s,d:n,e:0,f:0}}function ia(e,n){return{a:e.a*n.a+e.c*n.b,b:e.b*n.a+e.d*n.b,c:e.a*n.c+e.c*n.d,d:e.b*n.c+e.d*n.d,e:e.a*n.e+e.c*n.f+e.e,f:e.b*n.e+e.d*n.f+e.f}}function ja(...e){return e.reduce((n,s)=>ia(n,s),la)}function _a(e){const n=e.a*e.d-e.b*e.c;if(!n||!Number.isFinite(n))return null;const s=1/n;return{a:e.d*s,b:-e.b*s,c:-e.c*s,d:e.a*s,e:(e.c*e.f-e.d*e.e)*s,f:(e.b*e.e-e.a*e.f)*s}}function Ot(e,n){return{x:e.a*n.x+e.c*n.y+e.e,y:e.b*n.x+e.d*n.y+e.f}}function Wa(e){return`matrix(${[e.a,e.b,e.c,e.d,e.e,e.f].map(ra).join(",")})`}function Za(e,n,s,o=new Float32Array(9)){const u=2/n,a=-2/s;return o[0]=e.a*u,o[1]=e.b*a,o[2]=0,o[3]=e.c*u,o[4]=e.d*a,o[5]=0,o[6]=e.e*u-1,o[7]=e.f*a+1,o[8]=1,o}function ra(e){const n=Math.round(e*1e6)/1e6;return Object.is(n,-0)?"0":String(n)}function Ua(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function ca(e){if(!e.length)return null;let n=1/0,s=1/0,o=-1/0,u=-1/0;for(const a of e)n=Math.min(n,a.x),s=Math.min(s,a.y),o=Math.max(o,a.x+a.width),u=Math.max(u,a.y+a.height);return{x:n,y:s,width:o-n,height:u-s}}function Ya(e,n){return e.x<n.x+n.width&&n.x<e.x+e.width&&e.y<n.y+n.height&&n.y<e.y+e.height}function Ga(e,n){const s=[Ot(e,{x:n.x,y:n.y}),Ot(e,{x:n.x+n.width,y:n.y}),Ot(e,{x:n.x,y:n.y+n.height}),Ot(e,{x:n.x+n.width,y:n.y+n.height})],o=s.map(m=>m.x),u=s.map(m=>m.y),a=Math.min(...o),f=Math.min(...u);return{x:a,y:f,width:Math.max(...o)-a,height:Math.max(...u)-f}}function Ja(e,n,s){return Math.min(Math.max(e,n),s)}const Zt=e=>!!(e&&"overlays"in e);let Gt;const ua=()=>import("./shared-D2RadIoz.mjs").then(e=>e.aK).then(e=>{Gt=e.buildContentState}),da=Ve(()=>import("./MediaBody-DGd2uFfK.mjs")),fa=()=>import("./AnnotationState-C9UhGpsr.mjs"),ha=new Map,ga={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:ha,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},ma=Ve(()=>import("./FrameAnimation-DFDuFwwt.mjs")),Bn=Ve(()=>import("./PlaceBox-_an9ya_W.mjs")),pa=Ve(()=>import("./Placeholder-D4-VCxeD.mjs")),ya=Ve(()=>import("./ControlsFade-BcGL7yUH.mjs")),va=()=>true,ba=Ve(()=>import("./Placeholder-D4-VCxeD.mjs").then(({PlaceholderToggle:e})=>({default:e}))),Sn={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Ca={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},wa={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",U.zoomIn.keys,U.zoomOut.keys,U.reset.keys,U.rotateRight.keys,U.rotateLeft.keys].join(" ")},xa={description:"canvasKeysMedia",keys:[U.play.keys,"J L",U.mute.keys].join(" ")},Ia={description:"canvasKeysAnnotations",keys:"Escape"},Xa=e=>{var s;return!!((s=e.canvases)!=null&&s.length)||Fn(e.body,e.src).length>0?i(po,{children:i(Ma,{...e})}):null},Ma=e=>{var hn,gn,mn,pn,yn,vn;const{surface:n,manifestId:s,canvases:o,viewingDirection:u,body:a,src:f,isTiledImage:m=false,label:q,partOf:j,language:b,highContrast:D,instanceId:K,className:E,options:d,navigator:X=false,controls:H=true,collapseControls:Q="auto",controlButtons:Pe,annotations:C,onReady:F,onViewportChange:ne,onContentStateChange:Ce,onMediaElement:ue,onCaptionChange:k,caption:Ee,onEnded:De,chapters:Y,highlightedChapter:Ke,onChapterHighlight:Bt,placeholder:tt=true,children:O}=e,{t:B}=Pn(),ee=I(null),[oe,nt]=p(null),ot=yo(oe),ae=En(oe),He=vo(oe),se=ao(nt),at=qo(D),we=!!n.controlsVisibility,lt=(n.controlsVisibility??va)(we?oe:null,d==null?void 0:d.hideDelay,ee),[it,te]=p(false),xe=jo(oe),Ie=so(),[S]=p(()=>K??`clover-canvas-${Ie}`),de=I(null),[L,rt]=p(null),le=Zt(L)?L:null,[qe,Me]=p(null),v=H===false?null:H===true?Sn:{...Sn,...H},[Re,fe]=p("loading"),[je,ct]=p(false),[_e,We]=p(0),[St,Pt]=p(Rn),_=I(F),Fe=I(ne),Le=I(d);_.current=F,Fe.current=ne,Le.current=d;const ie=lo(u),ke=N(()=>zo(o??[]),[o]),ut=N(()=>Ao(ke),[ke]),[Et,dt]=p({}),G=N(()=>({...ut,...Et}),[ut,Et]),Ze=(t,r)=>dt(g=>({...g,[t]:r})),ft=N(()=>C==null?void 0:C.filter(t=>!t.layer||(G[t.layer.key]??0)===t.layer.item),[C,G]),T=(hn=C==null?void 0:C.find(t=>t.layer&&t.annotation.id===e.selectedAnnotation))==null?void 0:hn.layer;V(()=>{T&&(G[T.key]??0)!==T.item&&Ze(T.key,T.item)},[T==null?void 0:T.key,T==null?void 0:T.item,e.selectedAnnotation]);const Ue=!!(v!=null&&v.information),J=!!(C!=null&&C.length),Oe=et(fa,J),[Rt,Ye]=p(null),w=J&&Rt||ga,$=N(()=>{var g,M;const t=(g=C==null?void 0:C.find(z=>z.annotation.id===w.selected))==null?void 0:g.annotation,r=(Array.isArray(t==null?void 0:t.body)?t==null?void 0:t.body:[t==null?void 0:t.body]).find(z=>(z==null?void 0:z.type)==="Feature");return t&&r?{id:String(t.id),feature:r,name:((M=r.properties)==null?void 0:M.label)??t.label}:null},[C,w.selected]),he=$?`${$.id}:${e.refind??0}`:null,[ht,gt]=p(null),mt=he!==null&&ht!==he,Be=N(()=>{var z,Ne;const t=(o??[]).map(Z=>Z.navPlace).filter(Boolean),r=t.length?t:e.navPlace?[e.navPlace]:[];if(!r.length)return null;const g=r.flatMap(Z=>(Z==null?void 0:Z.type)==="FeatureCollection"?Z.features??[]:(Z==null?void 0:Z.type)==="Feature"?[Z]:[]);if(!g.length)return null;const M=g.length===1?(Ne=(z=g[0])==null?void 0:z.properties)==null?void 0:Ne.label:void 0;return{feature:{type:"FeatureCollection",features:g},name:M??e.label}},[o,e.navPlace,e.label]),Ge=`place-box-${S}`,[l,h]=p(false),[ge,Tn]=p(false),pt=I(w);pt.current=w;const yt=be(()=>pt.current.release(),[]),{comments:Ft,listedCount:Jt}=w,Te=N(()=>Ue?(o??[]).filter(t=>bo(t)||Ft.has(t.id)):[],[o,Ue,Ft]),Lt=`caption-${S}`,[$n,Xt]=p(false),Tt=$n&&Te.length>0,Qt=be(t=>{var r;Xt(false),t&&((r=document.getElementById(`information-${S}`))==null||r.focus())},[S]),W=N(()=>(o??[]).find(t=>Mn(t).length)??null,[o]),zn=W?Mn(W):Oa,R=N(()=>o!=null&&o.length?No(o,ie,G,{standIns:o.length>1}):null,[o,ie,G]),An=N(()=>Fn(a,f,m),[a,f,m]),c=(R==null?void 0:R.media[0])??null,en=!we&&(c==null?void 0:c.kind)==="video",Nn=we||en,Vn=we?lt:it,Dn=N(()=>{if(o!=null&&o.length)return Vo(o,G);const t=(Array.isArray(a)?a:a?[a]:[])[0];return typeof(t==null?void 0:t.type)=="string"?t.type.toLowerCase():f?"image":void 0},[o,G,a,f]),[P,Kn]=p(null),vt=I(ue);vt.current=ue;const Hn=be(t=>{var r;Kn(t),(r=vt.current)==null||r.call(vt,t)},[]),me=R?R.images:An,pe=!!c&&(o==null?void 0:o.length)===1,ye=pe&&(c==null?void 0:c.kind)==="audio",qn=pe&&(c==null?void 0:c.kind)==="video",$e=(o==null?void 0:o.length)===1&&!c&&!W&&me.length===0,bt=!pe&&!$e&&((gn=d==null?void 0:d.gestures)==null?void 0:gn.navigable)!==false,re=o?`${s??""}
2
+ ${o.map(t=>t.id).join("|")}`:null,ve=N(()=>{if(!o||!tt)return[];const t=o.flatMap(r=>{const g=Do(r),M=Qe(r.label,b);return g?[{...g,alt:M.text,lang:M.lang}]:[]});return ie==="right-to-left"||ie==="bottom-to-top"?t.reverse():t},[o,ie,tt,b]),[jn,tn]=p(false),[_n,nn]=p(null),y=!ye&&ve.length>0&&(c?_n!==re:!jn),on=d==null?void 0:d.request;V(()=>{if(y){import("./thumbnail-D83GaQ8C.mjs");for(const{source:t}of ve)t.service&&Go(t.service,{request:on}).catch(()=>{})}},[y,ve,on]);const an=(t,{annotations:r=false,fullPage:g=false}={})=>({...t,zoom:false,rotation:false,reset:false,fullPage:g&&t.fullPage,annotations:r&&t.annotations}),Je=$e&&ae,sn=Yt.Children.count(O)>0,$t=ve.length>0&&!ye&&!c,Xe=v?y?Te.length||sn||Jt||c&&(Y!=null&&Y.length)?an(v,{annotations:true}):null:pe||$e?ke.length||Te.length||sn||Jt||c&&(Y!=null&&Y.length)||Je&&v.fullPage?an(v,{annotations:true,fullPage:Je}):null:v:null,zt=X&&!y&&(c?c.kind==="audio"&&!pe&&me.length>0:true),[At,Wn]=p(null),ze=c?At??c.placement:null,[Ct,Zn]=p(Ba),Nt=N(()=>{const t=(c==null?void 0:c.kind)==="video"&&P&&ze?[...me,{id:c.id,placement:ze,width:ze.width,height:ze.height,media:{element:P}}]:me;return Ct.length?[...t,...Ct]:t},[me,c,P,ze,Ct]),ln=pe&&(c==null?void 0:c.kind)==="video"&&At?At:R?ca(R.placements):null,Un=JSON.stringify([me,ln,Nt.length!==me.length&&[c==null?void 0:c.id,ze],Ct.map(t=>t.id)]),wt=I(null),Vt=I(false),Dt=()=>{c?nn(y?re:null):tn(y),y||yt()},xt=I(null),Yn=t=>{if(P&&!y){P.currentTime=t;return}xt.current=t,y&&Dt()};V(()=>{!P||xt.current===null||(P.currentTime=xt.current,xt.current=null)},[P]);const Kt=Array.isArray(a)?a[0]:a,x=[q,(mn=o==null?void 0:o[0])==null?void 0:mn.label,Kt==null?void 0:Kt.label].map(t=>Qe(t,b)).find(t=>t.text),Gn=N(()=>{const t=Qe(j,b);return t.text&&t.text!==(x==null?void 0:x.text)?t:void 0},[j,b,x==null?void 0:x.text]),rn=Uo((x==null?void 0:x.text)||B("canvasImage"),x?x.lang:se.langOf("canvasImage"),false,se.hostLanguage),It=y?[]:[...bt?[wa]:[],...c?[xa]:[],...J?[Ia]:[]],cn=`keys-${S}`,Jn=bt&&!y&&!se.langOf("canvasRoleDescription")?B("canvasRoleDescription"):void 0,Ht=!!Xe&&Te.length>0,Xn=Ht&&Te.map((t,r)=>Qe(t.label,b).text?Co(Lt,r):null).filter(Boolean).join(" ")||void 0,un=I({canvases:o,scene:R,canvasKey:re});un.current={canvases:o,scene:R,canvasKey:re};const Mt=I(null),qt=be(()=>{const{canvases:t,scene:r,canvasKey:g}=un.current;Mt.current=t&&r&&wt.current===g?{key:g,canvases:t,placements:r.placements}:null},[]),Qn=!o||((pn=Mt.current)==null?void 0:pn.key)===re,Ae=io(()=>{const t=Mt.current,r=de.current;if(!t||s==="loading")return null;const g=P&&P.currentTime>0?P.currentTime:null,M=!g&&r&&Zt(r)?Ln(r.getBounds(),t.canvases,t.placements):null,z=t.canvases.find(Ne=>Ne.id===(M==null?void 0:M.canvasId))??t.canvases[0];return z?Gt?Gt({manifestId:s,canvasId:z.id,type:z.type,region:M&&{x:M.rect.x,y:M.rect.y,w:M.rect.width,h:M.rect.height},time:g}):(ua().then(()=>Ae()),null):null},Ce);V(()=>ro(P,Ae),[P,Ae]),V(()=>{const t=ee.current;if(!t)return;const r=n(t,Le.current),g=Zt(r)?r:null;de.current=r,rt(r),r.setDismiss(yt);const M=()=>{if(!g)return;const A=g.viewLimits();Pt(ce=>ce.atMax===A.atMax&&ce.atMin===A.atMin&&ce.atHome===A.atHome?ce:A)},z=r.on("open",()=>{var A;M(),_t(false),qt(),Ae(),fe("ready"),We(ce=>ce+1),g&&((A=_.current)==null||A.call(_,ka(g,()=>Mt.current,ce=>{var Cn,wn;const bn=pt.current.placed.find(Wt=>Wt.id===ce);return bn?(pt.current.select(bn),(wn=Array.from(((Cn=g.overlays)==null?void 0:Cn.container.querySelectorAll("[id]"))??[]).find(Wt=>Wt.id===ce))==null||wn.focus({preventScroll:true}),true):false})))}),Ne=r.on("change",()=>{M(),_t(false),qt(),Ae(),fe("ready"),We(A=>A+1)}),Z=r.on("error",()=>{r.isOpen||fe("error")}),to=r.on("unloadable",A=>ct(!!A)),no=r.on("viewport",()=>{var A;M(),g&&((A=Fe.current)==null||A.call(Fe,g.getBounds())),Ae()});return()=>{z(),Ne(),Z(),to(),no(),r.dispose(),de.current=null,rt(null)}},[K,n,yt,qt]),V(()=>{if(!(!le||!qe))return le.attachNavigator(qe)},[le,qe]),V(()=>{if(!(!L||!$e))return L.setGestures({navigable:false}),()=>L.setGestures({})},[L,$e]);const jt=I(false);V(()=>{var r;if(Je)return;const t=!document.activeElement||document.activeElement===document.body;jt.current&&t&&((r=ee.current)==null||r.focus()),jt.current=false},[Je]),V(()=>{const t=de.current;if(y&&(Vt.current=true),!t||!xe||y)return;const r=wt.current!==null&&wt.current!==re;(!t.isOpen||r)&&fe("loading");const g=pe||Vt.current&&t.isOpen||r;wt.current=re,Vt.current=false,t.setImages(Nt,{world:ln??void 0,fit:g})},[Un,K,P,xe,y]);const dn=I(s),[eo,_t]=p(false);Ut(()=>{var t;s!==dn.current&&(dn.current=s,(t=de.current)==null||t.clear(),_t(true),fe("loading"))},[s]);const fn=Re==="loading"&&Nt.length>0&&xe&&!y;return i(uo.Provider,{value:se.hostLanguage,children:i("figure",{"aria-labelledby":Xn,className:Zo("clover-canvas",E),"data-testid":"clover-canvas","data-status":Re,..._o(at),"data-unloadable":je||void 0,"data-has-navigator":zt,"data-fullscreen":ot,"data-exit":He||void 0,"data-controls":Nn?Vn?"visible":"hidden":void 0,"data-media":Dn,"data-recording":c?"":void 0,"data-player":ye?"":void 0,"data-animated":W?"":void 0,"data-navigable":bt,"data-placeholder":ve.length&&!ye?y:void 0,ref:se.ref,onFocus:t=>{jt.current=Je&&t.target.id===`fullPage-${S}`},onKeyDown:t=>{if(t.key==="Escape"&&Tt&&!t.defaultPrevented){t.preventDefault(),Qt(false);return}if(t.key==="Escape"&&!t.defaultPrevented&&!t.currentTarget.querySelector(".clover-canvas-menu")&&yt()){t.preventDefault();return}$o(t,ee.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(Xe||zt)&&c&&i("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),en&&i(Se,{fallback:null,children:i(ya,{element:oe,hideDelay:d==null?void 0:d.hideDelay,picture:ee,onChange:te})}),i(wo,{hidden:!He}),L&&(Xe||$t)&&i(sa,{renderer:le,instance:S,config:Xe??Ca,controlButtons:Pe,limits:St,placeholderIsMore:$t&&!c,chapters:c?Y:void 0,mediaElement:P,onChapter:Yn,overStill:!!c&&y,request:d==null?void 0:d.request,placeholder:$t&&i(Se,{fallback:null,children:i(ba,{instance:S,media:!!c,active:y,onToggle:Dt,more:!!v&&(v.zoom||v.rotation||v.reset||v.fullPage)})}),fit:!we,more:Q,choices:y?[]:ke,selections:G,onSelect:Ze,annotations:w.menu,hiddenPages:w.hiddenPages,onPageVisibilityChange:w.setPagesVisible,selectedAnnotation:w.selected,onAnnotationSelect:w.select,onAnnotationActivate:w.activate,captionId:Ht?Lt:void 0,captionOpen:Tt,onCaptionToggle:()=>Xt(t=>!t),placeId:Be?Ge:void 0,placeOpen:l,onPlaceToggle:()=>{Tn(true),h(t=>!t)},language:b,children:Xe&&O}),zt&&i("div",{ref:Me,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),i("div",{ref:ee,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:J?"group":"img","aria-roledescription":Jn,...rn.props,"aria-describedby":It.length?cn:void 0,"aria-keyshortcuts":It.map(({keys:t})=>t).join(" ")||void 0,"aria-busy":fn,tabIndex:0}),rn.node,It.length>0&&i("span",{id:cn,style:co,children:It.map(({description:t},r)=>i(Yt.Fragment,{children:[r>0&&" ",i("span",{...xn(se.langOf(t)),children:B(t)})]},t))}),i(xo,{kind:"image",shown:je&&!y}),$e&&!y&&(x==null?void 0:x.text)&&i(Io,{text:x.text,lang:x.lang||void 0}),(c==null?void 0:c.kind)==="audio"&&!ye&&me.length===0&&!y&&(x==null?void 0:x.text)&&i("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...xn(x.lang||void 0),children:x.text}),ve.length>0&&!ye&&i(Se,{fallback:null,children:i(pa,{instance:S,stills:ve,vertical:ie==="top-to-bottom"||ie==="bottom-to-top",media:!!c,active:y,lingering:Re==="loading"&&!eo,onToggle:Dt,request:d==null?void 0:d.request})}),L&&c&&xe&&!y&&i(Se,{fallback:null,children:i(da,{media:c,request:d==null?void 0:d.request,fillable:qn,surface:L,instance:S,onElement:Hn,onFit:Wn,onCaptionChange:k,caption:Ee,navigable:bt,fullscreen:pe&&!!(v!=null&&v.fullPage),isFullscreen:ae,onEnded:De,chapters:Y,highlightedChapter:Ke,onChapterHighlight:Bt,autoPlay:!ye&&ve.length>0&&w.quietlyOpened!==re,language:b,notes:w.timed,marked:w.placed,selectedAnnotation:w.selected,onAnnotationSelect:J?w.select:void 0,onAnnotationActivate:w.activate,player:ye&&o?{canvas:o[0],title:x,partOf:Gn}:void 0})}),le&&W&&(R==null?void 0:R.frames[kn(W)])&&!y&&i(Se,{fallback:null,children:i(ma,{renderer:le,frames:zn,byFrame:R.frames[kn(W)],animationKey:W.id,sceneVersion:_e,autoplay:(yn=d==null?void 0:d.animation)==null?void 0:yn.autoplay,loop:(vn=d==null?void 0:d.animation)==null?void 0:vn.loop,onEnded:De,language:b,duration:Number(W.duration),canvas:W,place:R.placements[o.indexOf(W)],onItems:Zn},W.id)}),Oe&&J&&C&&i(Oe.AnnotationState,{given:e,annotations:ft??C,scene:R,renderer:le,sceneVersion:_e,drawn:Qn,media:c,mediaElement:P,showPlaceholder:y,canvasKey:re,openImages:tn,openMedia:nn,host:ee,onModel:Ye,refind:e.refind??0}),fn&&i(Wo,{overlay:true}),$&&i(Se,{fallback:null,children:i(Bn,{id:`place-of-${S}`,open:mt,onClose:t=>{var r;gt(he),t&&((r=document.getElementById($.id))==null||r.focus())},feature:$.feature,name:$.name,language:b})}),Be&&ge&&i(Se,{fallback:null,children:i(Bn,{id:Ge,open:l,onClose:t=>{var r;h(false),t&&((r=document.getElementById(`place-${S}`))==null||r.focus())},feature:Be.feature,name:Be.name,language:b})}),Ht&&i(Mo,{id:Lt,canvases:Te,comments:Ft,open:Tt,onClose:Qt,language:b})]})})};function ka(e,n,s){return{fitCanvasRect(o,u,a){const f=n(),m=(f==null?void 0:f.canvases.findIndex(q=>q.id===o))??-1;return!f||m===-1?false:(e.fitBounds(Ko(f.canvases[m],f.placements[m],u),a),true)},getCanvasRegion(){const o=n();return o?Ln(e.getBounds(),o.canvases,o.placements):null},get backendKind(){return e.backendKind},get atHome(){return e.isAtHome},fitBounds:(o,u)=>e.fitBounds(o,u),fitItemRect:(o,u,a)=>e.fitItemRect(o,u,a),itemRectToWorld:(o,u)=>e.itemRectToWorld(o,u),getBounds:()=>e.getBounds(),getHomeBounds:()=>e.getHomeBounds(),getCamera:()=>e.getCamera(),home:o=>e.home(o),zoomBy:(o,u,a)=>e.zoomBy(o,u,a),panBy:(o,u,a)=>e.panBy(o,u,a),setRotation:(o,u)=>e.setRotation(o,u),getRotation:()=>e.getRotation(),rotateBy:o=>e.rotateBy(o),worldToScreenPoint:o=>e.worldToScreenPoint(o),screenToWorldPoint:o=>e.screenToWorldPoint(o),on:(o,u)=>e.on(o,u),zoomToAnnotation:s}}const Oa=[],Ba=[];function Fn(e,n,s=false){const o=Array.isArray(e)?e:e?[e]:[];return o.length?o.map((a,f)=>{const m=Yo(a.service);return!m&&!a.id?null:{id:`${f}:${a.id??m}|${a.region??""}`,service:m,url:a.id,width:a.width,height:a.height,region:a.region}}).filter(a=>a!==null):(Array.isArray(n)?n:n?[n]:[]).filter(Boolean).map((a,f)=>({id:`${f}:${a}`,...s?{service:a}:{url:a}}))}function Ln(e,n,s){let o=null;if(s.forEach((D,K)=>{const E=Math.max(e.x,D.x),d=Math.max(e.y,D.y),X=Math.min(e.x+e.width,D.x+D.width)-E,H=Math.min(e.y+e.height,D.y+D.height)-d;if(X<=0||H<=0)return;const Q=X*H;(!o||Q>o.area)&&(o={index:K,area:Q,clip:{x:E,y:d,width:X,height:H}})}),!o)return null;const{index:u,clip:a}=o,f=n[u],m=s[u],q=Ho(f),j=q.width/m.width,b=q.height/m.height;return{canvasId:f.id,rect:{x:Math.round((a.x-m.x)*j),y:Math.round((a.y-m.y)*b),width:Math.round(a.width*j),height:Math.round(a.height*b)}}}export{Xa as C,Za as a,Ot as b,ja as c,Ga as d,Ya as e,Ja as f,qa as g,Zt as h,_a as i,Wa as j,Ua as r,Ha as s,Ka as t,ca as u};
@@ -1 +1 @@
1
- import{a as c,u as a,t as d,l as p,aG as v,k as m}from"./shared-DFAX0n3B.mjs";import{M as f,a as h}from"./Markup-Hm6bWOjm.mjs";import{R as u}from"./ReadMore-D_WmmKEP.mjs";import{E as b}from"./EntryBodies-C0ICfS2R.mjs";const T=({summary:s,metadata:n,comments:o,language:r})=>{const{t,langOf:l}=c();return a(m,{children:[d(s,r).text&&a(u,{children:a(f,{as:"p",markup:s,language:r,className:"clover-summary clover-canvas-caption-summary"})}),a(h,{metadata:n,language:r,className:"clover-metadata clover-canvas-caption-metadata"}),o!=null&&o.length?a("div",{className:"clover-canvas-caption-annotations",children:[a("p",{className:"clover-canvas-caption-annotations-label",...p(l("informationPanelTabsAnnotations")),children:t("informationPanelTabsAnnotations")}),a("ul",{children:o.map((i,e)=>a("li",{children:a(b,{bodies:v(i),language:r})},i.id??e))})]}):null]})};export{T as default};
1
+ import{a as c,u as a,t as d,l as p,aG as v,k as m}from"./shared-D2RadIoz.mjs";import{M as f,a as h}from"./Markup-DACv7sRg.mjs";import{R as u}from"./ReadMore-BpA8Dex8.mjs";import{E as b}from"./EntryBodies-Bz8hyAUW.mjs";const T=({summary:s,metadata:n,comments:o,language:r})=>{const{t,langOf:l}=c();return a(m,{children:[d(s,r).text&&a(u,{children:a(f,{as:"p",markup:s,language:r,className:"clover-summary clover-canvas-caption-summary"})}),a(h,{metadata:n,language:r,className:"clover-metadata clover-canvas-caption-metadata"}),o!=null&&o.length?a("div",{className:"clover-canvas-caption-annotations",children:[a("p",{className:"clover-canvas-caption-annotations-label",...p(l("informationPanelTabsAnnotations")),children:t("informationPanelTabsAnnotations")}),a("ul",{children:o.map((i,e)=>a("li",{children:a(b,{bodies:v(i),language:r})},i.id??e))})]}):null]})};export{T as default};
@@ -0,0 +1 @@
1
+ import{d as y,y as N,A as T,u as t,ah as L,l as b}from"./shared-D2RadIoz.mjs";import C from"./ControlMenu-CYfLg3Ok.mjs";import{c as D,a as P}from"./Transport-DKb3XTMA.mjs";import{u as w}from"./useContainerName-fp0-n_9x.mjs";import{E as A}from"./EntryThumbnail-R9h0AXcu.mjs";const B=({id:u,triggerId:p,label:v,labelLang:f,chapters:s,element:e,onChapter:g,overStill:E=false,request:h,onClose:o})=>{const i=w(v,f),[k,c]=y(()=>(e==null?void 0:e.currentTime)??0);N(()=>{if(!e)return;const r=()=>c(e.currentTime);return r(),e.addEventListener("timeupdate",r),e.addEventListener("seeked",r),()=>{e.removeEventListener("timeupdate",r),e.removeEventListener("seeked",r)}},[e]);const m=D(s,k),n=T(false),l=r=>{g(s[r].start),c(s[r].start)};return t(C,{"data-testid":"clover-canvas-chapters",id:u,onClose:o,triggerId:p,children:[t("fieldset",{className:"clover-canvas-menu-group",...i.props,children:s.map((r,a)=>t("label",{className:"clover-canvas-menu-item clover-canvas-chapters-item",onPointerDown:()=>{n.current=true},children:[t("input",{type:"radio",name:u,checked:a===m,onChange:()=>{E&&!n.current?c(s[a].start):l(a)},onClick:()=>{n.current&&o(true)},onKeyDown:d=>{n.current=false,d.key==="Enter"&&(d.preventDefault(),l(a),o(true))}}),t("span",{className:"clover-cue-time",children:L(r.start)})," ",t("span",{className:"clover-cue-text",...b(r.lang||void 0),children:r.label}),a===m&&t(A,{source:P(r),request:h,large:true})]},r.id??a))}),i.node]})};export{B as default};
@@ -1 +1 @@
1
- import{u as o}from"./shared-DFAX0n3B.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-BwkYiCLC.mjs";function s({open:e=false,className:r}){return o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:i("clover-chevron",r),"data-open":e||void 0,children:o("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export{s as C};
1
+ import{u as o}from"./shared-D2RadIoz.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-DZIDbHxL.mjs";function s({open:e=false,className:r}){return o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:i("clover-chevron",r),"data-open":e||void 0,children:o("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export{s as C};
@@ -1 +1 @@
1
- import{t as r,u as a,l as v}from"./shared-DFAX0n3B.mjs";import x from"./ControlMenu-BjJsWnuZ.mjs";import{m as C}from"./layout-B29v2RKK.mjs";import{u as z}from"./useContainerName-_48Cdi0m.mjs";import"./styles-BwkYiCLC.mjs";const P=({id:m,triggerId:u,label:b,labelLang:g,choices:i,selections:h,onSelect:y,onClose:f,language:s})=>{const d=z(b,g),N=i.some(e=>!r(e.label,s).text);return a(x,{"data-testid":"clover-canvas-choice",id:m,onClose:f,triggerId:u,children:[N&&d.node,i.map((e,k)=>{const t=r(e.label,s);return a("fieldset",{...t.text?{}:d.props,className:"clover-canvas-menu-group",children:[t.text&&a("legend",{className:"clover-canvas-menu-legend",...v(t.lang),children:t.text}),e.items.map((l,n)=>{const o=r(l.label,s),c=o.text||(l.image?"":String(n+1)),p=!C(l);return a("label",{className:"clover-canvas-menu-item","data-disabled":p||void 0,children:[a("input",{type:"radio",name:`${m}-${k}`,"aria-label":c?void 0:String(n+1),checked:(h[e.key]??0)===n,disabled:p,onChange:()=>y(e.key,n)}),l.image&&a("img",{alt:"",className:"clover-canvas-menu-image",decoding:"async",loading:"lazy",src:l.image}),c&&a("span",{...v(o.text?o.lang:void 0),children:c})]},n)})]},e.key)})]})};export{P as default};
1
+ import{t as r,u as a,l as v}from"./shared-D2RadIoz.mjs";import x from"./ControlMenu-CYfLg3Ok.mjs";import{m as C}from"./layout-MzMKFa5I.mjs";import{u as z}from"./useContainerName-fp0-n_9x.mjs";import"./styles-DZIDbHxL.mjs";const P=({id:m,triggerId:u,label:b,labelLang:g,choices:i,selections:h,onSelect:y,onClose:f,language:s})=>{const d=z(b,g),N=i.some(e=>!r(e.label,s).text);return a(x,{"data-testid":"clover-canvas-choice",id:m,onClose:f,triggerId:u,children:[N&&d.node,i.map((e,k)=>{const t=r(e.label,s);return a("fieldset",{...t.text?{}:d.props,className:"clover-canvas-menu-group",children:[t.text&&a("legend",{className:"clover-canvas-menu-legend",...v(t.lang),children:t.text}),e.items.map((l,n)=>{const o=r(l.label,s),c=o.text||(l.image?"":String(n+1)),p=!C(l);return a("label",{className:"clover-canvas-menu-item","data-disabled":p||void 0,children:[a("input",{type:"radio",name:`${m}-${k}`,"aria-label":c?void 0:String(n+1),checked:(h[e.key]??0)===n,disabled:p,onChange:()=>y(e.key,n)}),l.image&&a("img",{alt:"",className:"clover-canvas-menu-image",decoding:"async",loading:"lazy",src:l.image}),c&&a("span",{...v(o.text?o.lang:void 0),children:c})]},n)})]},e.key)})]})};export{P as default};
@@ -1 +1 @@
1
- import{D as N,e as $,a as j,b as A,c as u,I as H,y as S,u as o,l as T}from"./shared-DFAX0n3B.mjs";import{I as q}from"./Items-Drd82_Jj.mjs";import{L as w}from"./Label-BIjqJ-_T.mjs";import{Summary as x,Id as D,Homepage as L}from"./Primitives-c9sIz0oQ.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{t as p}from"./heading-Cjt0f-Eu.mjs";import"./styles-BwkYiCLC.mjs";const J=N(function({headingLevel:r=3,className:v,...b},d){const{clover:n}=$("Collection"),{t:f,langOf:g}=j(),i=A(),a=u(e=>e.collection),l=u(e=>H(e.manifest));S(()=>{!a&&(l!=null&&l.id)&&n.openCollection(l.id)},[n,a,l]);const t=a??l;if(!t)return null;const s=t.homepage,c=p(r,`${i}-label`),m=(e,C)=>{const{as:h,title:y,group:I}=p(r,`${i}-${e}`);return o("section",{className:"clover-about-section",...I,children:[o(h,{className:"clover-about-heading",...T(g(e)),...y,children:f(e)}),C]})};return o("div",{ref:d,className:O("clover-about clover-collection",v),...t.label?c.group:null,...b,children:[o(w,{as:c.as,label:t.label,className:"clover-collection-title clover-title",...c.title}),o(x,{value:t.summary,className:"clover-about-summary"}),o(q,{of:"members",layout:"list"}),Array.isArray(s)&&s.length>0&&m("aboutHomepage",o(L,{value:s})),m("aboutCollection",o(D,{value:t.id}))]})});export{J as Collection};
1
+ import{D as N,e as $,a as j,b as A,c as u,I as H,y as S,u as o,l as T}from"./shared-D2RadIoz.mjs";import{I as q}from"./Items-C7wjylgH.mjs";import{L as w}from"./Label-S7o8PlWU.mjs";import{Summary as x,Id as D,Homepage as L}from"./Primitives-DU_VhdO2.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{t as p}from"./heading-Cjt0f-Eu.mjs";import"./styles-DZIDbHxL.mjs";const J=N(function({headingLevel:r=3,className:v,...b},d){const{clover:n}=$("Collection"),{t:f,langOf:g}=j(),i=A(),a=u(e=>e.collection),l=u(e=>H(e.manifest));S(()=>{!a&&(l!=null&&l.id)&&n.openCollection(l.id)},[n,a,l]);const t=a??l;if(!t)return null;const s=t.homepage,c=p(r,`${i}-label`),m=(e,C)=>{const{as:h,title:y,group:I}=p(r,`${i}-${e}`);return o("section",{className:"clover-about-section",...I,children:[o(h,{className:"clover-about-heading",...T(g(e)),...y,children:f(e)}),C]})};return o("div",{ref:d,className:O("clover-about clover-collection",v),...t.label?c.group:null,...b,children:[o(w,{as:c.as,label:t.label,className:"clover-collection-title clover-title",...c.title}),o(x,{value:t.summary,className:"clover-about-summary"}),o(q,{of:"members",layout:"list"}),Array.isArray(s)&&s.length>0&&m("aboutHomepage",o(L,{value:s})),m("aboutCollection",o(D,{value:t.id}))]})});export{J as Collection};
@@ -1 +1 @@
1
- import{D as C,a as k,e as I,c as v,b as K,d as L,y as w,A as b,t as h,u as r,l as S}from"./shared-DFAX0n3B.mjs";import{i as N}from"./items-BUmOy2QY.mjs";import{j as U}from"./classnames-DukgfdpI.mjs";import"./styles-BwkYiCLC.mjs";const j=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),B=100,z=C(function({onChange:s,className:y,...A},E){const{t:P,langOf:D}=k(),{clover:T,language:u}=I("CollectionSelect"),t=v(e=>e.collection),n=v(e=>{var l;return((l=e.manifest)==null?void 0:l.id)??""}),f=K(),[c,i]=L(null);w(()=>i(null),[n,t]);const d=b(-1/0),o=b(null);w(()=>{o.current=null},[n,t]);const p=e=>{!e||e===n||e===o.current||(o.current=e,s==null||s(e),T.goToManifest(e).finally(()=>{o.current===e&&(o.current=null)}))},m=()=>c===null||c===n||c===o.current?false:(i(null),true),g=N(t);if(g.length<2)return null;const a=h(t==null?void 0:t.label,u);return r("div",{ref:E,className:U("clover-collection-select",y),...A,children:[r("label",{htmlFor:`${f}-select`,className:"clover-collection-select-label",...S(a.text?a.lang:D("collectionLabel")),children:a.text||P("collectionLabel")}),r("select",{id:`${f}-select`,className:"clover-collection-select-control",value:c??n,onKeyDown:e=>{const{key:l}=e;l==="Enter"?p(c):l==="Escape"?m()&&e.preventDefault():(j.has(l)||l.length===1&&!e.ctrlKey&&!e.metaKey)&&(d.current=performance.now())},onBlur:m,onChange:e=>{const l=e.target.value;i(l),performance.now()-d.current>B&&p(l)},children:g.map(e=>{const l=h(e.label,u);return r("option",{value:e.id,...S(l.text?l.lang:void 0),children:l.text||e.id},e.id)})})]})});export{z as CollectionSelect};
1
+ import{D as C,a as k,e as I,c as v,b as K,d as L,y as w,A as b,t as h,u as r,l as S}from"./shared-D2RadIoz.mjs";import{i as N}from"./items-BQPvL5D6.mjs";import{j as U}from"./classnames-DukgfdpI.mjs";import"./styles-DZIDbHxL.mjs";const j=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),B=100,z=C(function({onChange:s,className:y,...A},E){const{t:P,langOf:D}=k(),{clover:T,language:u}=I("CollectionSelect"),t=v(e=>e.collection),n=v(e=>{var l;return((l=e.manifest)==null?void 0:l.id)??""}),f=K(),[c,i]=L(null);w(()=>i(null),[n,t]);const d=b(-1/0),o=b(null);w(()=>{o.current=null},[n,t]);const p=e=>{!e||e===n||e===o.current||(o.current=e,s==null||s(e),T.goToManifest(e).finally(()=>{o.current===e&&(o.current=null)}))},m=()=>c===null||c===n||c===o.current?false:(i(null),true),g=N(t);if(g.length<2)return null;const a=h(t==null?void 0:t.label,u);return r("div",{ref:E,className:U("clover-collection-select",y),...A,children:[r("label",{htmlFor:`${f}-select`,className:"clover-collection-select-label",...S(a.text?a.lang:D("collectionLabel")),children:a.text||P("collectionLabel")}),r("select",{id:`${f}-select`,className:"clover-collection-select-control",value:c??n,onKeyDown:e=>{const{key:l}=e;l==="Enter"?p(c):l==="Escape"?m()&&e.preventDefault():(j.has(l)||l.length===1&&!e.ctrlKey&&!e.metaKey)&&(d.current=performance.now())},onBlur:m,onChange:e=>{const l=e.target.value;i(l),performance.now()-d.current>B&&p(l)},children:g.map(e=>{const l=h(e.label,u);return r("option",{value:e.id,...S(l.text?l.lang:void 0),children:l.text||e.id},e.id)})})]})});export{z as CollectionSelect};
@@ -1 +1 @@
1
- import{e as ve,C as q,c as h,A as l,d as me,y as O,T as R,N as be,q as f,am as d,u as Se,an as we,ao as Ae,ap as Ie,o as Ce}from"./shared-DFAX0n3B.mjs";import{C as Le}from"./CanvasView-DxZASM9E.mjs";import{u as ke,a as xe}from"./fromManifest-BwQdeAuL.mjs";import{j as z,k as ye}from"./layout-B29v2RKK.mjs";import{s as Pe}from"./show-link-DBaJj4s_.mjs";import{a as qe,d as Oe,e as Re,f as Te}from"./hooks-C4dJ5K_D.mjs";const Ue=({options:i,onReady:T,onViewportChange:v,onMediaElement:m,onCaptionChange:A,caption:j,onEnded:b,placeholder:F=true,label:G,partOf:J,language:Q,annotations:I,chapters:W,...p})=>{const C=ve("Canvas"),{clover:t}=C,X=q(t.captions.subscribe,t.captions.get,t.captions.get),Y=j??X,B=Q??C.language,c=qe(),{direction:Z}=Oe(),n=Re(),o=Te(),_=h(e=>{var a;return e.status==="loading"?"loading":((a=e.manifest)==null?void 0:a.id)??""}),S=h(e=>e.target),D=h(e=>we(e.manifest,e.addedSets,e.search.set,e.regions)),E=h(e=>Ie(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),ee=h(e=>Ce(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),L=h(e=>e.annotationId),H=l(L);H.current=L;const[te,ae]=me(0);O(()=>t.found.subscribe(e=>{e&&e===H.current&&ae(a=>a+1)}),[t]);const ne=q(t.highlight.subscribe,t.highlight.get,t.highlight.get),se=q(t.chapter.subscribe,t.chapter.get,t.chapter.get),u=c.map(e=>e.id).join("|"),ce=R(()=>{if(I)return I;const e=c.map(a=>a.id);return D.flatMap(a=>a.entries.filter(s=>e.includes(s.canvasId)).map(s=>({annotation:s.annotation,targetIndex:e.indexOf(s.canvasId),pageId:a.id,...a.label?{pageLabel:a.label}:{},...s.place?{place:s.place}:{},...s.layer?{layer:{key:s.layer.key,item:s.layer.item}}:{}})))},[I,D,c]),ie=S?(e=>!!e&&c.some(a=>a.id===e))(S.canvasId):false,M=l(null);ie&&(M.current=u);const oe=F&&M.current!==u,k=l(null),x=l(null),y=R(()=>c.some(e=>z(e).length>0),[c]),g=y?c.find(e=>z(e).length>0):void 0,re=ke(n,g,B,Ae),K=l(y);K.current=y;const P=j===void 0?C.language:void 0,le=g==null?void 0:g.id;O(()=>{if(!P||!g)return;const e=ye(g).find(a=>a.language&&be(a.language,P));e&&t.captions.get()!==e.id&&t.captions.emit(e.id)},[P,le,t]);const r=f(()=>{const e=t.store.get().target;!e||!t.store.get().canvasId||xe(e,k.current,x.current,K.current)&&t.consumeTarget()},[t]),N=l(u);O(()=>{N.current!==u&&(N.current=u,x.current=null),S&&r()},[S,u,r]);const w=l(T);w.current=T;const de=f(e=>{var a;k.current=e,e.on("change",r),r(),(a=w.current)==null||a.call(w,e)},[r]),ue=f(e=>{var s;const a=(s=k.current)==null?void 0:s.getCanvasRegion();t.viewport.emit(a?{canvasId:a.canvasId,region:{x:a.rect.x,y:a.rect.y,w:a.rect.width,h:a.rect.height}}:null),v==null||v(e)},[t,v]),ge=f(e=>{x.current=e,t.media.emit(e),e&&r(),m==null||m(e)},[t,r,m]),he=f(()=>{b==null||b(),(d(n,"auto-advance")||d(o,"auto-advance"))&&t.next({autoplay:true,wrap:d(n,"repeat")})},[t,n,o,b]),fe=f(e=>void Pe(t,e),[t]),U=(i==null?void 0:i.request)??t.request,V=d(o,"auto-advance")||d(n,"auto-advance"),$=d(o,"repeat")||d(n,"repeat"),pe=R(()=>({...i,request:U,animation:(i==null?void 0:i.animation)??{autoplay:V,loop:$}}),[i,U,V,$]);return c.length?Se(Le,{...p,manifestId:_,navPlace:n==null?void 0:n.navPlace,canvases:c,viewingDirection:Z,language:B,label:G??(o==null?void 0:o.label)??(n==null?void 0:n.label),partOf:J??(n==null?void 0:n.label),options:pe,placeholder:oe,onReady:de,onViewportChange:ue,onMediaElement:ge,caption:Y,onCaptionChange:e=>{t.captions.emit((e==null?void 0:e.id)??null),A==null||A(e)},onEnded:he,annotations:ce,hiddenPages:ee,unlistedPages:E,onPageVisibilityChange:(e,a)=>e.forEach(s=>t.setSetVisible(s,a)),chapters:W??re,highlightedChapter:se,onChapterHighlight:e=>t.chapter.emit(e),selectedAnnotation:L,refind:te,highlightedAnnotation:ne,onAnnotationSelect:e=>t.selectAnnotation(e),onAnnotationLink:p.onAnnotationLink??fe,onAnnotationActive:e=>{var a;t.highlight.emit(e),(a=p.onAnnotationActive)==null||a.call(p,e)}}):null};export{Ue as default};
1
+ import{e as ve,C as q,c as h,A as l,d as me,y as O,T as R,N as be,q as f,al as d,u as Se,am as we,an as Ae,ao as Ie,o as Ce}from"./shared-D2RadIoz.mjs";import{C as Le}from"./CanvasView-BAJ6OYvn.mjs";import{u as ke,a as xe}from"./fromManifest-Dw3BwjHM.mjs";import{j as z,k as ye}from"./layout-MzMKFa5I.mjs";import{s as Pe}from"./show-link-Cxylys81.mjs";import{a as qe,d as Oe,e as Re,f as Te}from"./hooks-Syt1XLVX.mjs";const Ue=({options:i,onReady:T,onViewportChange:v,onMediaElement:m,onCaptionChange:A,caption:j,onEnded:b,placeholder:F=true,label:G,partOf:J,language:Q,annotations:I,chapters:W,...p})=>{const C=ve("Canvas"),{clover:t}=C,X=q(t.captions.subscribe,t.captions.get,t.captions.get),Y=j??X,B=Q??C.language,c=qe(),{direction:Z}=Oe(),n=Re(),o=Te(),_=h(e=>{var a;return e.status==="loading"?"loading":((a=e.manifest)==null?void 0:a.id)??""}),S=h(e=>e.target),D=h(e=>we(e.manifest,e.addedSets,e.search.set,e.regions)),E=h(e=>Ie(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),ee=h(e=>Ce(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),L=h(e=>e.annotationId),H=l(L);H.current=L;const[te,ae]=me(0);O(()=>t.found.subscribe(e=>{e&&e===H.current&&ae(a=>a+1)}),[t]);const ne=q(t.highlight.subscribe,t.highlight.get,t.highlight.get),se=q(t.chapter.subscribe,t.chapter.get,t.chapter.get),u=c.map(e=>e.id).join("|"),ce=R(()=>{if(I)return I;const e=c.map(a=>a.id);return D.flatMap(a=>a.entries.filter(s=>e.includes(s.canvasId)).map(s=>({annotation:s.annotation,targetIndex:e.indexOf(s.canvasId),pageId:a.id,...a.label?{pageLabel:a.label}:{},...s.place?{place:s.place}:{},...s.layer?{layer:{key:s.layer.key,item:s.layer.item}}:{}})))},[I,D,c]),ie=S?(e=>!!e&&c.some(a=>a.id===e))(S.canvasId):false,M=l(null);ie&&(M.current=u);const oe=F&&M.current!==u,k=l(null),x=l(null),y=R(()=>c.some(e=>z(e).length>0),[c]),g=y?c.find(e=>z(e).length>0):void 0,re=ke(n,g,B,Ae),K=l(y);K.current=y;const P=j===void 0?C.language:void 0,le=g==null?void 0:g.id;O(()=>{if(!P||!g)return;const e=ye(g).find(a=>a.language&&be(a.language,P));e&&t.captions.get()!==e.id&&t.captions.emit(e.id)},[P,le,t]);const r=f(()=>{const e=t.store.get().target;!e||!t.store.get().canvasId||xe(e,k.current,x.current,K.current)&&t.consumeTarget()},[t]),N=l(u);O(()=>{N.current!==u&&(N.current=u,x.current=null),S&&r()},[S,u,r]);const w=l(T);w.current=T;const de=f(e=>{var a;k.current=e,e.on("change",r),r(),(a=w.current)==null||a.call(w,e)},[r]),ue=f(e=>{var s;const a=(s=k.current)==null?void 0:s.getCanvasRegion();t.viewport.emit(a?{canvasId:a.canvasId,region:{x:a.rect.x,y:a.rect.y,w:a.rect.width,h:a.rect.height}}:null),v==null||v(e)},[t,v]),ge=f(e=>{x.current=e,t.media.emit(e),e&&r(),m==null||m(e)},[t,r,m]),he=f(()=>{b==null||b(),(d(n,"auto-advance")||d(o,"auto-advance"))&&t.next({autoplay:true,wrap:d(n,"repeat")})},[t,n,o,b]),fe=f(e=>void Pe(t,e),[t]),U=(i==null?void 0:i.request)??t.request,V=d(o,"auto-advance")||d(n,"auto-advance"),$=d(o,"repeat")||d(n,"repeat"),pe=R(()=>({...i,request:U,animation:(i==null?void 0:i.animation)??{autoplay:V,loop:$}}),[i,U,V,$]);return c.length?Se(Le,{...p,manifestId:_,navPlace:n==null?void 0:n.navPlace,canvases:c,viewingDirection:Z,language:B,label:G??(o==null?void 0:o.label)??(n==null?void 0:n.label),partOf:J??(n==null?void 0:n.label),options:pe,placeholder:oe,onReady:de,onViewportChange:ue,onMediaElement:ge,caption:Y,onCaptionChange:e=>{t.captions.emit((e==null?void 0:e.id)??null),A==null||A(e)},onEnded:he,annotations:ce,hiddenPages:ee,unlistedPages:E,onPageVisibilityChange:(e,a)=>e.forEach(s=>t.setSetVisible(s,a)),chapters:W??re,highlightedChapter:se,onChapterHighlight:e=>t.chapter.emit(e),selectedAnnotation:L,refind:te,highlightedAnnotation:ne,onAnnotationSelect:e=>t.selectAnnotation(e),onAnnotationLink:p.onAnnotationLink??fe,onAnnotationActive:e=>{var a;t.highlight.emit(e),(a=p.onAnnotationActive)==null||a.call(p,e)}}):null};export{Ue as default};
@@ -1 +1 @@
1
- import{u as o}from"./shared-DFAX0n3B.mjs";import{p as a}from"./playerSurface-BXNLaFk0.mjs";import n from"./Connected-sYBn_9MK.mjs";import{j as t}from"./classnames-DukgfdpI.mjs";import{a as m}from"./hooks-C4dJ5K_D.mjs";function v({className:e,...r}){return m().some(i=>i.type==="Timeline")?o(n,{...r,className:t("clover-timeline",e),navigator:false,surface:a}):null}export{v as default};
1
+ import{u as o}from"./shared-D2RadIoz.mjs";import{p as a}from"./playerSurface-BxxMV-va.mjs";import n from"./Connected-B_caNIrW.mjs";import{j as t}from"./classnames-DukgfdpI.mjs";import{a as m}from"./hooks-Syt1XLVX.mjs";function v({className:e,...r}){return m().some(i=>i.type==="Timeline")?o(n,{...r,className:t("clover-timeline",e),navigator:false,surface:a}):null}export{v as default};
@@ -1 +1 @@
1
- import{e as v,c as u,y as S,T as b,u as C}from"./shared-DFAX0n3B.mjs";import{S as q}from"./SceneView-hcc78jQT.mjs";import{a as w,e as x}from"./hooks-C4dJ5K_D.mjs";function M({label:i,language:d,options:t,...f}){const r=v("Scene"),{clover:a}=r,e=w().find(n=>n.type==="Scene"),s=x(),g=u(n=>{var o;return n.status==="loading"?"loading":((o=n.manifest)==null?void 0:o.id)??""}),c=u(n=>n.target);S(()=>{c&&e&&c.canvasId===e.id&&a.consumeTarget()},[c,e,a]);const l=(t==null?void 0:t.request)??a.request,m=b(()=>({...t,request:l}),[t,l]);return e?C(q,{...f,scene:e,manifestId:g,label:i??e.label??(s==null?void 0:s.label),language:d??r.language,options:m}):null}export{M as default};
1
+ import{e as v,c as u,y as S,T as b,u as C}from"./shared-D2RadIoz.mjs";import{S as q}from"./SceneView-BJNlboix.mjs";import{a as w,e as x}from"./hooks-Syt1XLVX.mjs";function M({label:i,language:d,options:t,...f}){const r=v("Scene"),{clover:a}=r,e=w().find(n=>n.type==="Scene"),s=x(),g=u(n=>{var o;return n.status==="loading"?"loading":((o=n.manifest)==null?void 0:o.id)??""}),c=u(n=>n.target);S(()=>{c&&e&&c.canvasId===e.id&&a.consumeTarget()},[c,e,a]);const l=(t==null?void 0:t.request)??a.request,m=b(()=>({...t,request:l}),[t,l]);return e?C(q,{...f,scene:e,manifestId:g,label:i??e.label??(s==null?void 0:s.label),language:d??r.language,options:m}):null}export{M as default};
@@ -1 +1 @@
1
- import{D as W,a as X,e as Y,c as $,J as Z,C as O,d as N,b as _,T as tt,A as et,y as B,u as o,t as rt,l as k,k as st,v as nt,K as j,E as at,L as A}from"./shared-DFAX0n3B.mjs";import{imageSource as it}from"./thumbnail-EbURh-UM.mjs";import{j as ot}from"./classnames-DukgfdpI.mjs";import{C as ct}from"./Chevron-DFGbSGPI.mjs";import{E as lt}from"./EntryThumbnail-DxHhfRo_.mjs";import{S as ut}from"./Steps-Dkpy9KiJ.mjs";import{C as dt}from"./Cue-xuo5dgKE.mjs";import{u as mt}from"./useContainerName-_48Cdi0m.mjs";import"./styles-BwkYiCLC.mjs";const Nt=W(function({as:d="nav",className:n,...u},h){const{t:p,langOf:c}=X(),{clover:s,language:F}=Y("Contents"),x=mt(p("informationPanelTabsContents"),c("informationPanelTabsContents"),u["aria-label"]!==void 0||u["aria-labelledby"]!==void 0),f=$(e=>Z(e.manifest)),T=$(e=>e.canvasId),z=$(e=>e.annotationId),S=O(s.media.subscribe,s.media.get,s.media.get),[D,w]=N(null),v=gt(f,T,S,D),H=O(s.chapter.subscribe,s.chapter.get,s.chapter.get),J=_(),C=tt(()=>pt(f,v),[f,v]),[K,L]=N(()=>new Map),M=et(new Set);B(()=>{const e=[...C].filter(r=>!M.current.has(r));M.current=C,L(r=>{if(!e.some(t=>r.has(t)))return r;const i=new Map(r);return e.forEach(t=>i.delete(t)),i})},[C]);const[b,U]=N();if(!f.length)return null;const G=e=>K.get(e.id)??C.has(e.id),P=(e,r)=>{var m,l;const i=(m=e.parts)==null?void 0:m[r];if(!i)return;U({node:e.id,index:r}),w(e.id);const t=A(e.id,r);i.region&&((l=s.store.get().regions)!=null&&l.entries.some(a=>a.id===t))?s.selectAnnotation(t):s.goTo(i.canvasId,i.region?{region:i.region}:{})},Q=e=>{if(e.canvasId){if(w(e.id),e.parts){P(e,0);return}if(e.canvasId===T&&e.time&&S){at(S,e.time.start);return}s.goTo(e.canvasId,{...e.time?{time:e.time.start,autoplay:true}:{},...e.region?{region:e.region}:{}})}},R=(e,r)=>{var l;const i=r.findIndex((a,y)=>!!a.region&&A(e.id,y)===z),t=(b==null?void 0:b.node)===e.id&&((l=r[b.index])==null?void 0:l.canvasId)===T?b.index:-1,m=i>=0?i:t>=0?t:r.findIndex(a=>a.canvasId===T);return{position:m,total:r.length,step:a=>P(e,m+a)}},q=(e,r,i=false)=>o("ol",{className:"clover-contents-list",id:r,hidden:i,children:e.map((t,m)=>{const l=rt(t.label,F),a=r?`${r}-${m}`:`${J}-${m}`,y=t.children.length>0,I=y&&G(t),E=t.id===v?it(t.thumbnail):null;return o("li",{className:"clover-contents-item",children:[o("div",{className:"clover-contents-row","data-current":t.id===v?"true":void 0,children:[o("button",{type:"button",id:`${a}-entry`,className:"clover-contents-button","data-trail":C.has(t.id)?"true":void 0,"aria-current":t.id===v?"true":void 0,"data-highlighted":t.id===H?"true":void 0,disabled:!t.canvasId,onMouseEnter:()=>s.chapter.emit(t.id),onMouseLeave:()=>s.chapter.emit(null),onFocus:()=>s.chapter.emit(t.id),onBlur:()=>s.chapter.emit(null),"data-timed":t.time?"true":void 0,"data-pictured":E?"true":void 0,...k(l.text&&!t.time&&!E?l.lang:void 0),onClick:()=>Q(t),children:t.time||E?o(st,{children:[t.time&&o(dt,{start:t.time.start,className:"clover-contents-time"}),o("span",{className:"clover-cue-text",...k(l.text?l.lang:void 0),children:l.text||t.id}),o(lt,{source:E,request:s.request,large:true})]}):l.text||t.id}),t.id===v&&t.parts&&t.parts.length>1&&o(ut,{className:"clover-contents-steps",steps:R(t,t.parts)}),y&&o("button",{type:"button",className:"clover-contents-toggle","aria-expanded":I,"aria-controls":`${a}-list`,"aria-labelledby":`${a}-toggle ${a}-entry`,onClick:()=>L(V=>new Map(V).set(t.id,!I)),children:[o("span",{id:`${a}-toggle`,style:nt,...k(c("contentsSectionsIn")),children:p("contentsSectionsIn")}),o(ct,{open:I,className:"clover-contents-chevron"})]})]}),y&&q(t.children,`${a}-list`,!I)]},t.id)})});return o(d,{ref:h,...x.props,className:ot("clover-contents",n),...u,children:[x.node,q(f)]})});function pt(g,d){const n=new Set;if(!d)return n;const u=(h,p)=>h.some(c=>c.id===d?(p.forEach(s=>n.add(s)),true):u(c.children,[...p,c.id]));return u(g,[]),n}function gt(g,d,n,u){const[h,p]=N(()=>j(g,d,void 0,u));return B(()=>{const c=()=>p(j(g,d,n==null?void 0:n.currentTime,u));if(c(),!!n)return n.addEventListener("timeupdate",c),n.addEventListener("seeked",c),()=>{n.removeEventListener("timeupdate",c),n.removeEventListener("seeked",c)}},[g,d,n,u]),h}export{Nt as Contents};
1
+ import{D as W,a as X,e as Y,c as $,J as Z,C as O,d as N,b as _,T as tt,A as et,y as B,u as o,t as rt,l as k,k as st,v as nt,K as j,E as at,L as A}from"./shared-D2RadIoz.mjs";import{imageSource as it}from"./thumbnail-D83GaQ8C.mjs";import{j as ot}from"./classnames-DukgfdpI.mjs";import{C as ct}from"./Chevron-BnlK9F4K.mjs";import{E as lt}from"./EntryThumbnail-R9h0AXcu.mjs";import{S as ut}from"./Steps-ACdXJZrV.mjs";import{C as dt}from"./Cue-DZJ5TBKU.mjs";import{u as mt}from"./useContainerName-fp0-n_9x.mjs";import"./styles-DZIDbHxL.mjs";const Nt=W(function({as:d="nav",className:n,...u},h){const{t:p,langOf:c}=X(),{clover:s,language:F}=Y("Contents"),x=mt(p("informationPanelTabsContents"),c("informationPanelTabsContents"),u["aria-label"]!==void 0||u["aria-labelledby"]!==void 0),f=$(e=>Z(e.manifest)),T=$(e=>e.canvasId),z=$(e=>e.annotationId),S=O(s.media.subscribe,s.media.get,s.media.get),[D,w]=N(null),v=gt(f,T,S,D),H=O(s.chapter.subscribe,s.chapter.get,s.chapter.get),J=_(),C=tt(()=>pt(f,v),[f,v]),[K,L]=N(()=>new Map),M=et(new Set);B(()=>{const e=[...C].filter(r=>!M.current.has(r));M.current=C,L(r=>{if(!e.some(t=>r.has(t)))return r;const i=new Map(r);return e.forEach(t=>i.delete(t)),i})},[C]);const[b,U]=N();if(!f.length)return null;const G=e=>K.get(e.id)??C.has(e.id),P=(e,r)=>{var m,l;const i=(m=e.parts)==null?void 0:m[r];if(!i)return;U({node:e.id,index:r}),w(e.id);const t=A(e.id,r);i.region&&((l=s.store.get().regions)!=null&&l.entries.some(a=>a.id===t))?s.selectAnnotation(t):s.goTo(i.canvasId,i.region?{region:i.region}:{})},Q=e=>{if(e.canvasId){if(w(e.id),e.parts){P(e,0);return}if(e.canvasId===T&&e.time&&S){at(S,e.time.start);return}s.goTo(e.canvasId,{...e.time?{time:e.time.start,autoplay:true}:{},...e.region?{region:e.region}:{}})}},R=(e,r)=>{var l;const i=r.findIndex((a,y)=>!!a.region&&A(e.id,y)===z),t=(b==null?void 0:b.node)===e.id&&((l=r[b.index])==null?void 0:l.canvasId)===T?b.index:-1,m=i>=0?i:t>=0?t:r.findIndex(a=>a.canvasId===T);return{position:m,total:r.length,step:a=>P(e,m+a)}},q=(e,r,i=false)=>o("ol",{className:"clover-contents-list",id:r,hidden:i,children:e.map((t,m)=>{const l=rt(t.label,F),a=r?`${r}-${m}`:`${J}-${m}`,y=t.children.length>0,I=y&&G(t),E=t.id===v?it(t.thumbnail):null;return o("li",{className:"clover-contents-item",children:[o("div",{className:"clover-contents-row","data-current":t.id===v?"true":void 0,children:[o("button",{type:"button",id:`${a}-entry`,className:"clover-contents-button","data-trail":C.has(t.id)?"true":void 0,"aria-current":t.id===v?"true":void 0,"data-highlighted":t.id===H?"true":void 0,disabled:!t.canvasId,onMouseEnter:()=>s.chapter.emit(t.id),onMouseLeave:()=>s.chapter.emit(null),onFocus:()=>s.chapter.emit(t.id),onBlur:()=>s.chapter.emit(null),"data-timed":t.time?"true":void 0,"data-pictured":E?"true":void 0,...k(l.text&&!t.time&&!E?l.lang:void 0),onClick:()=>Q(t),children:t.time||E?o(st,{children:[t.time&&o(dt,{start:t.time.start,className:"clover-contents-time"}),o("span",{className:"clover-cue-text",...k(l.text?l.lang:void 0),children:l.text||t.id}),o(lt,{source:E,request:s.request,large:true})]}):l.text||t.id}),t.id===v&&t.parts&&t.parts.length>1&&o(ut,{className:"clover-contents-steps",steps:R(t,t.parts)}),y&&o("button",{type:"button",className:"clover-contents-toggle","aria-expanded":I,"aria-controls":`${a}-list`,"aria-labelledby":`${a}-toggle ${a}-entry`,onClick:()=>L(V=>new Map(V).set(t.id,!I)),children:[o("span",{id:`${a}-toggle`,style:nt,...k(c("contentsSectionsIn")),children:p("contentsSectionsIn")}),o(ct,{open:I,className:"clover-contents-chevron"})]})]}),y&&q(t.children,`${a}-list`,!I)]},t.id)})});return o(d,{ref:h,...x.props,className:ot("clover-contents",n),...u,children:[x.node,q(f)]})});function pt(g,d){const n=new Set;if(!d)return n;const u=(h,p)=>h.some(c=>c.id===d?(p.forEach(s=>n.add(s)),true):u(c.children,[...p,c.id]));return u(g,[]),n}function gt(g,d,n,u){const[h,p]=N(()=>j(g,d,void 0,u));return B(()=>{const c=()=>p(j(g,d,n==null?void 0:n.currentTime,u));if(c(),!!n)return n.addEventListener("timeupdate",c),n.addEventListener("seeked",c),()=>{n.removeEventListener("timeupdate",c),n.removeEventListener("seeked",c)}},[g,d,n,u]),h}export{Nt as Contents};
@@ -0,0 +1 @@
1
+ import{A as h,ab as k,_ as T,y as x,u as S}from"./shared-D2RadIoz.mjs";import{j as B}from"./classnames-DukgfdpI.mjs";import"./styles-DZIDbHxL.mjs";const H=({id:a,triggerId:c,onClose:n,"data-testid":s,className:p,holds:e,inside:l=false,children:w})=>{const u=h(null);return k(true,()=>n(false)),T(()=>{const t=u.current;t&&l&&L(t)},[l]),x(()=>{const t=u.current,i=(t==null?void 0:t.querySelector('input[type="radio"]:checked'))??(t==null?void 0:t.querySelector('input[type="radio"]:not(:disabled)'))??(t==null?void 0:t.querySelector("input"))??(t==null?void 0:t.querySelector('[role="option"][tabindex="0"]')),d=i==null?void 0:i.closest('label, [role="option"]');if(t&&d){const o=d.offsetTop+d.offsetHeight;o>t.scrollTop+t.clientHeight&&(t.scrollTop=o-t.clientHeight),d.offsetTop<t.scrollTop&&(t.scrollTop=d.offsetTop)}i==null||i.focus({preventScroll:true});const v=o=>{var y,m,f;const r=o.target;(y=u.current)!=null&&y.contains(r)||(m=document.getElementById(c))!=null&&m.contains(r)||r&&((f=e==null?void 0:e())!=null&&f.contains(r))||n(false)},E=o=>{var f,g;if(o.key!=="Escape")return;const r=document.activeElement;if(!!((f=u.current)!=null&&f.contains(r)||(g=document.getElementById(c))!=null&&g.contains(r))){o.preventDefault(),n(true);return}const m=b=>{b===o&&!o.defaultPrevented&&n(false)};document.addEventListener("keydown",m,{once:true})};return document.addEventListener("pointerdown",v),document.addEventListener("keydown",E,true),()=>{document.removeEventListener("pointerdown",v),document.removeEventListener("keydown",E,true)}},[c,n,e]),S("div",{className:B("clover-canvas-menu",p),"data-testid":s,id:a,ref:u,children:w})};function L(a){const c=a.getBoundingClientRect();let n=0,s=document.documentElement.clientWidth;for(let e=a.parentElement;e;e=e.parentElement){if(getComputedStyle(e).overflowX==="visible")continue;const l=e.getBoundingClientRect();n=Math.max(n,l.left),s=Math.min(s,l.right);break}const p=Math.max(n-c.left,Math.min(0,s-c.right));p&&(a.style.translate=`${p}px 0`)}export{H as default};
@@ -0,0 +1 @@
1
+ import{y as l}from"./shared-D2RadIoz.mjs";import{u}from"./useControlsVisibility-BYZlgiAt.mjs";function f({element:i,hideDelay:r,picture:s,onChange:o}){const t=u(i,r,s);return l(()=>o(t),[t,o]),null}export{f as default};
@@ -0,0 +1 @@
1
+ import{b as m,d as g,A as v,q as u,u as e,P as f,z as b}from"./shared-D2RadIoz.mjs";import"./styles-DZIDbHxL.mjs";const k=b(()=>import("./ControlMenu-CYfLg3Ok.mjs"));function I({position:c,total:l,list:p}){const n=`${m().replace(/:/g,"")}-count`,t=`${n}-menu`,[r,s]=g(false),a=v(null),h=u(()=>{var o;return(o=a.current)==null?void 0:o.closest(".clover-pager")},[]),i=u(o=>{var d;s(false),o&&((d=document.getElementById(n))==null||d.focus())},[n]);return e("span",{className:"clover-pager-count",ref:a,children:[e("button",{type:"button",id:n,className:"clover-pager-count-button","aria-controls":r?t:void 0,"aria-expanded":r,onClick:()=>s(!r),children:[e("span",{className:"clover-pager-position","aria-live":"polite",children:[e("span",{children:[c>=0?c+1:"\u2013"," / ",l]}),e("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]})]}),e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",children:e("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),r&&e(f,{fallback:null,children:e(k,{id:t,triggerId:n,onClose:i,holds:h,inside:true,className:"clover-pager-menu",children:e("div",{className:"clover-collection clover-pager-list",children:p(()=>i(true))})})})]})}export{I as C};
@@ -0,0 +1 @@
1
+ import{u as m,ah as o}from"./shared-D2RadIoz.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-DZIDbHxL.mjs";function s({start:r,className:e}){return m("span",{className:i("clover-cue-time",e),children:o(r)})}export{s as C};
@@ -0,0 +1 @@
1
+ import{e as te,A as S,T as oe,y as K,_ as le,d as Z,u as o,b as re,v as ce,k as ie}from"./shared-D2RadIoz.mjs";import{u as se,a as de,b as J,B as me,S as ue,c as Q,d as ve,P as pe,e as he,p as fe}from"./viewer-DLfZQmZs.mjs";import{u as be}from"./useLazyPanelPane-DXYGGS7f.mjs";import{d as ge,c as ne,g as we,h as ye}from"./hooks-Syt1XLVX.mjs";import{B as xe}from"./Body-Ccxmucbr.mjs";import{stillSource as Se,resolveThumbnail as Ee}from"./thumbnail-D83GaQ8C.mjs";import{a as Le}from"./index-DGXCFoHu.mjs";import{t as Te}from"./heading-Cjt0f-Eu.mjs";import{R as ke}from"./Root-DixSZV9Y.mjs";import{Position as Ne}from"./Position-DA4rzRiy.mjs";import{T as ze}from"./Tip-BatwzZZo.mjs";import{L as Ae}from"./Label-S7o8PlWU.mjs";import{Download as Pe}from"./Download-CfRPt74Y.mjs";import{P as De,L as Me}from"./Provider-Dl_t_qEC.mjs";import{S as qe}from"./Status-B4327UOL.mjs";import{I as Oe}from"./Items-C7wjylgH.mjs";const Be=1600,Fe=200,X=.25,Re=1500,Y=typeof window>"u"?K:le,ae=r=>{const s=Number(r==null?void 0:r.width),a=Number(r==null?void 0:r.height);return s>0&&a>0?s/a:void 0};function Ie({collapseControls:r,canvasOptions:s,children:a}){const{clover:u}=te("Document"),p=ge(),d=ne(),c=S(null),E=S(null),h=S(null),T=p.direction==="right-to-left"||p.direction==="bottom-to-top",v=oe(()=>p.views.map(e=>{var N;const t=e.map(x=>p.canvases[x]),n=T?[...t].reverse():t,i=n.map(ae);return{key:t.map(x=>x.id).join("|"),first:(N=t[0])==null?void 0:N.id,canvases:n,ratio:i.every(Boolean)?i.reduce((x,R)=>x+R,0):void 0}}),[p,T]),f=Math.max(0,d.position),L=S({sheets:v,position:f});L.current={sheets:v,position:f};const b=S(null),y=S(null),z=S(0),g=S(()=>{}),C=S(false),O=e=>{var t;return(t=E.current)==null?void 0:t.children[e]},A=e=>{const t=c.current,n=O(e);return!t||!n||n===h.current?0:Math.min(n.offsetTop,t.scrollHeight-t.clientHeight)},U=()=>{const e=h.current,t=O(L.current.position);if(e){if(!t||t===e){e.style.top="0px",e.style.height="100%";return}e.style.top=`${t.offsetTop}px`,e.style.height=`${t.offsetHeight}px`}};function l(){const e=c.current;if(!e||e.hasAttribute("data-scrolling")||y.current!==null)return;const t=A(L.current.position);z.current=t,!(Math.abs(e.scrollTop-t)<=1)&&(C.current=true,e.scrollTop=t,requestAnimationFrame(()=>requestAnimationFrame(()=>C.current=false)))}Y(U),K(()=>{const e=new ResizeObserver(()=>{U(),l()});return E.current&&e.observe(E.current),c.current&&e.observe(c.current),()=>e.disconnect()},[]);const P=()=>{g.current();for(const[e,t]of[[c.current,"data-scrolling"],[h.current,"data-moved"]])e&&!e.hasAttribute(t)&&e.setAttribute(t,"")},D=()=>{const e=c.current,t=h.current;if(!e||!t)return;g.current(),z.current=e.scrollTop;const n=()=>{const $=t.querySelector(".clover-canvas");return!$||$.getAttribute("data-status")!=="loading"||$.getAttribute("data-placeholder")==="true"};let i=0;const N=new MutationObserver(()=>n()&&I()),x=setTimeout(()=>I(),Re),R=()=>{cancelAnimationFrame(i),clearTimeout(x),N.disconnect()},I=()=>{R(),t.removeAttribute("data-moved"),e.removeAttribute("data-scrolling")};g.current=R,i=requestAnimationFrame(()=>{i=requestAnimationFrame(()=>{if(n())return I();N.observe(t,{attributes:true,subtree:true,attributeFilter:["data-status","data-placeholder"]})})})},k=(e,t=false)=>{var x;const n=c.current;if(!n)return;const i=A(e);if(Math.abs(n.scrollTop-i)<=1)return D();P(),y.current=e;const N=t||((x=window.matchMedia)==null?void 0:x.call(window,"(prefers-reduced-motion: reduce)").matches);n.scrollTo({top:i,behavior:N?"auto":"smooth"})},W=S(null);Y(()=>{const e=W.current!==v;if(W.current=v,F(false),b.current===f&&!e){b.current=null;return}b.current=null,k(f,e)},[f,v]),K(()=>{const e=c.current;if(!e)return;let t=0,n,i=false;const N=m=>{const M=L.current.sheets.length;if(M<2)return 0;let w=0;for(let V=0;V<M&&A(V)<=m+.5;V++)w=V;if(w>=M-1)return M-1;const j=A(w),q=(m-j)/Math.max(1,A(w+1)-j);return m>=z.current?q>X?w+1:w:q<1-X?w:w+1},x=()=>{if(t=0,y.current!==null)return;const m=N(e.scrollTop),{sheets:M,position:w}=L.current;m===w||!M[m]||(P(),F(false),b.current=m,u.goTo(M[m].first))},R=()=>{if(i)return;const{sheets:m,position:M}=L.current,w=e.scrollTop,j=y.current;y.current=null;const q=j!==null&&Math.abs(w-A(j))<=1?j:N(w);if(!m[q])return D();q!==M&&(P(),F(false),b.current=q,u.goTo(m[q].first)),k(q)},I=()=>{clearTimeout(n),n=setTimeout(R,Fe)},$=()=>{C.current||(P(),I(),t||(t=requestAnimationFrame(x)))},H=m=>{y.current=null,(m.type==="touchstart"||m.type==="pointerdown"&&m.target===e)&&(i=true)},_=()=>{i&&(i=false,I())};return e.addEventListener("scroll",$,{passive:true}),e.addEventListener("wheel",H,{passive:true}),e.addEventListener("touchstart",H,{passive:true}),e.addEventListener("pointerdown",H),window.addEventListener("touchend",_),window.addEventListener("touchcancel",_),window.addEventListener("pointerup",_),()=>{cancelAnimationFrame(t),clearTimeout(n),g.current(),e.removeEventListener("scroll",$),e.removeEventListener("wheel",H),e.removeEventListener("touchstart",H),e.removeEventListener("pointerdown",H),window.removeEventListener("touchend",_),window.removeEventListener("touchcancel",_),window.removeEventListener("pointerup",_)}},[u]);const[B,G]=Z(null);function F(e){const t=c.current;!t||t.hasAttribute("data-zoomed")===e||(t.toggleAttribute("data-zoomed",e),e&&l())}return K(()=>{if(B)return B.on("viewport",()=>F(!B.atHome))},[B]),o("div",{ref:c,className:"clover-template-document-column",onKeyDown:e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey)){if(e.key==="PageDown"&&d.hasNext)d.next();else if(e.key==="PageUp"&&d.hasPrevious)d.previous();else return;e.preventDefault()}},children:o("div",{ref:E,className:"clover-template-document-sheets","data-single":v.length<2||void 0,children:[v.map((e,t)=>o("div",{"aria-hidden":"true",className:"clover-template-document-sheet","data-active":t===f||void 0,"data-fill":e.ratio===void 0||void 0,onClick:()=>t!==f&&u.goTo(e.first),style:e.ratio===void 0?void 0:{"--ratio":e.ratio},children:e.canvases.map(n=>o(He,{canvas:n},n.id))},e.key)),o("div",{ref:h,className:"clover-template-document-live",children:o(xe,{className:"clover-template-document-body",collapseControls:r,options:s,onReady:G,children:a})})]})})}function $e(r){const[s,a]=Z(()=>typeof IntersectionObserver>"u");return K(()=>{if(s||!r)return;const u=new IntersectionObserver(p=>{p.some(d=>d.isIntersecting)&&(a(true),u.disconnect())},{root:r.closest(".clover-template-document-column"),rootMargin:"100% 0px"});return u.observe(r),()=>u.disconnect()},[r,s]),s}function He({canvas:r}){const{clover:s}=te("Document"),a=oe(()=>Se(r),[r]),[u,p]=Z(null),d=$e(u),[c,E]=Z(a==null?void 0:a.src);K(()=>{if(!a||a.src)return E(a==null?void 0:a.src);if(!d)return;let v=true;return Ee(a,Be,s.request).then(f=>v&&E(f)),()=>{v=false}},[a,s,d]);const h=ae(r),T=h?{aspectRatio:String(h)}:void 0;return c?o("img",{alt:"",decoding:"async",loading:"lazy",src:c,style:T}):o("span",{ref:p,style:T})}Le(47,"templates/document/Document","@layer clover{.clover-template-document{--clover-template-document-height: min(85vh, 56rem);display:flex;flex-direction:column;height:var(--clover-template-document-height);min-height:min-content;overflow:hidden;background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}@supports (height: 1svh){.clover-template-document{--clover-template-document-height: min(85svh, 56rem)}}.clover-template-document-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-s);padding:var(--clover-space-m) var(--clover-inset);border-bottom:1px solid var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-provider{max-width:100%;margin-inline-start:auto}.clover-template-document-toolbar .clover-download-groups{flex-direction:row;flex-wrap:wrap;column-gap:var(--clover-space-m)}.clover-template-document-toolbar .clover-download-group{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--clover-space-s)}.clover-template-document-toolbar .clover-download-title{margin:0}.clover-template-document-toolbar .clover-download-list{display:flex;flex-wrap:wrap;column-gap:var(--clover-space-s)}.clover-template-document-title{flex:1 1 6rem;min-width:0}button.clover-template-document-sidebar-toggle{display:inline-flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:var(--clover-control);padding-block:0;padding-inline:var(--clover-space-s) calc(var(--clover-space-xs) + var(--clover-space-3xs));border:0;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-color-control, #1a1d1e);color:var(--clover-color-control-glyph, #fff);cursor:pointer;transition:var(--clover-transition, all .2s cubic-bezier(.16, 1, .3, 1))}button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) button.clover-template-document-sidebar-toggle:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-template-document-sidebar-toggle:focus-visible{outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:2px}.clover-template-document-sidebar-toggle .clover-template-document-position{color:inherit;font-size:var(--clover-text-xs);white-space:nowrap}.clover-template-document-sidebar-toggle .clover-template-document-position>.clover-pager-room[hidden]{display:none}.clover-template-document-panes{position:relative;flex:1 1 auto;min-height:16rem}.clover-template-document-panes:is([data-panel=over],[data-narrow])>.clover-template-document-main{isolation:isolate}.clover-template-document-sidebar{contain:size;overflow-y:auto;overscroll-behavior:contain;padding:var(--clover-inset);scroll-padding-top:calc(2 * var(--clover-inset) + var(--clover-control));background-color:var(--clover-color-secondary, #fff)}.clover-template-document-sidebar-closed{position:absolute;top:var(--clover-inset);inset-inline-start:var(--clover-inset);z-index:3}@media (width < 31rem){.clover-template-document-toolbar,.clover-template-document-sidebar-closed,.clover-template-document-spine{--clover-inset: var(--clover-space-m)}}.clover-template-document-sidebar[hidden]{display:none}.clover-template-document-sidebar+.clover-split-handle:before{inset-inline-start:0;inset-inline-end:calc(3px - var(--clover-space-l))}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-figure{grid-template-columns:repeat(var(--parts, 1),minmax(0,1fr));gap:var(--clover-space-xs) 0}.clover-template-document-sidebar .clover-items[data-layout] :is(.clover-items-pictures,.clover-items-caption){grid-column:1 / -1;grid-template-columns:subgrid}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-label{contain:inline-size}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture[data-empty],.clover-template-document-sidebar .clover-items[data-layout] .clover-items-picture img{width:100%;height:auto;max-height:20rem;aspect-ratio:var(--clover-items-ratio, auto);object-fit:contain}.clover-template-document-sidebar .clover-items[data-layout] .clover-items-caption{font-size:var(--clover-text-s)}.clover-template-document-main{position:relative;overflow:hidden;background-color:var(--clover-color-secondary-muted, #e6e8eb)}.clover-template-document-column{position:absolute;inset:0;overflow-x:hidden;overflow-y:auto;container-type:size}.clover-template-document-sheets{position:relative}.clover-template-document-sheet{--clover-template-document-tease: calc(2 * var(--clover-inset));display:flex;justify-content:center;box-sizing:border-box;height:min(100cqh - var(--clover-template-document-tease),(100cqw - 2 * var(--clover-inset)) / var(--ratio) + 2 * var(--clover-inset));padding:var(--clover-inset);transition:opacity .2s ease,height .24s cubic-bezier(.16,1,.3,1)}.clover-template-document-sheet[data-fill]{height:calc(100cqh - var(--clover-template-document-tease))}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]{height:100cqh}.clover-template-document-column[data-zoomed] .clover-template-document-sheet[data-active]>*{visibility:hidden}.clover-template-document-column[data-zoomed] .clover-template-document-sheet:not([data-active]){--clover-template-document-muted: 0;pointer-events:none}.clover-template-document-sheet:not([data-active]){--clover-template-document-muted: .618;cursor:pointer;opacity:var(--clover-template-document-muted)}.clover-template-document-sheet:not([data-active]):hover{--clover-template-document-muted: .809}@media (prefers-reduced-motion: reduce){.clover-template-document-sheet{transition:none}}.clover-template-document-sheets[data-single]>.clover-template-document-sheet{--clover-template-document-tease: 0px}.clover-template-document-sheet>*{display:block;height:100%;min-width:0}.clover-template-document-sheet[data-fill]>*{object-fit:contain}.clover-template-document-live{--clover-body-height: 100%;position:absolute;inset-inline:0;top:0;height:100%;transition:opacity .16s ease}.clover-template-document-body .clover-canvas{--clover-canvas-inset: var(--clover-inset);background-color:transparent}.clover-template-document-live[data-moved]:not(:focus-within){opacity:0;pointer-events:none}.clover-template-document-column[data-scrolling] .clover-template-document-live:not(:focus-within) .clover-canvas-controls>*{--clover-controls-shown: 0;--clover-controls-events: none}.clover-template-document-column:not([data-zoomed]) :not(.clover-scene)>.clover-canvas-viewport{touch-action:pan-y}.clover-template-document-scrim[data-for=sidebar]{z-index:2}.clover-template-document-panes[data-narrow]{--clover-template-sidebar-width: min(14rem, 80%)}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar{position:absolute;inset-block:0;inset-inline-start:0;z-index:3;width:var(--clover-template-sidebar-width);border-inline-end:1px solid var(--clover-color-secondary-muted, #e6e8eb);--clover-template-inner: right;--clover-template-toward: 1}.clover-template-document-panes[data-narrow]>.clover-template-document-sidebar:dir(rtl){--clover-template-inner: left;--clover-template-toward: -1}.clover-template-document-spine{position:relative;z-index:4;flex:none;width:0}.clover-template-document-spine>*{position:absolute;top:var(--clover-inset);inset-inline-start:-1.5px;translate:-50%}.clover-template-document-spine:dir(rtl)>*{translate:50%}.clover-template-document-spine[data-for=sidebar]>*{inset-inline:auto calc(1.5px - var(--clover-control) / 2);translate:none}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]{inset-inline-start:var(--clover-template-sidebar-width)}.clover-template-document-panes[data-narrow]>.clover-template-document-spine[data-for=sidebar]>*{inset-inline-end:calc(var(--clover-control) / -2)}}");function lt({className:r,defaultSidebarOpen:s,singleItem:a=false,defaultPanelOpen:u=false,panelLayout:p="accordion",panelSections:d,panelLabels:c,download:E=true,languages:h=true,headingLevel:T=2,storageKey:v="clover-template-document",collapseControls:f,canvasOptions:L,...b}){const y=Te(T,`${re().replace(/:/g,"")}-title`);return o(ke,{className:["clover-template-document",r].filter(Boolean).join(" "),...y.group,...b,children:o(Ke,{title:y,defaultSidebarOpen:s,singleItem:a,defaultPanelOpen:u,panelLayout:p,panelSections:d,panelLabels:c,download:E,languages:h,headingLevel:T,storageKey:v,collapseControls:f,canvasOptions:L})})}const ee=r=>r+1,_e=9,je=40;function Ke({defaultSidebarOpen:r,singleItem:s,defaultPanelOpen:a,download:u,languages:p,headingLevel:d=2,storageKey:c,panelLayout:E,panelSections:h,panelLabels:T,collapseControls:v,canvasOptions:f,title:L}){const b=we(),y=ye(),z=y("templateSidebar"),g=re().replace(/:/g,""),C=ne(),O=S(null),A=S(null),U=se(),l=de({id:`${g}-sidebar`,beside:J(O,je),defaultOpen:r??true,side:"start",focus:t=>t.querySelector('[role="option"][aria-selected="true"]'),slides:false,alongside:A,followFocus:U}),P=C.total>(s?0:1),D=P&&l.open,k=be({id:`${g}-panel`,beside:J(O,me+(D?_e:0)),defaultOpen:!!a,followFocus:U,sections:h}),W=t=>{var n,i;l.over&&((i=(n=t.target).closest)!=null&&i.call(n,`[aria-controls~="${g}-sidebar"]`))&&fe()},B=()=>{l.over&&l.close()},G=k.docked,F=k.toggle,e=P&&o("button",{type:"button",className:"clover-template-document-sidebar-toggle","aria-expanded":l.open,"aria-controls":`${g}-sidebar`,lang:y("templateSidebarToggle"),onClick:()=>l.setOpen(!l.open),children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",fill:l.open?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[o("rect",{x:"1.5",y:"2",width:"5.5",height:"4.5",rx:"1"}),o("rect",{x:"1.5",y:"9.5",width:"5.5",height:"4.5",rx:"1"}),o("path",{d:"M9.5 4.25h5M9.5 11.75h5",fill:"none"})]}),o("span",{style:ce,children:b("templateSidebarToggle")}),o(Ne,{className:"clover-template-document-position"}),o(ze,{label:b("templateSidebarToggle")})]});return o(ie,{children:[o("header",{className:"clover-template-document-toolbar",children:[o(Ae,{as:L.as,className:"clover-template-document-title clover-template-title clover-title",...L.title}),u&&o(Pe,{headingLevel:ee(d)}),o(De,{className:"clover-template-document-provider",children:o(Me,{})})]}),o(qe,{loading:false}),o(ue,{ref:O,className:"clover-template-document-panes clover-template-panes","data-sidebar":D?"open":"closed","data-narrow":l.over||void 0,"data-panel":k.splitProps["data-panel"],storageKey:c||void 0,onKeyDown:t=>{k.onKeyDown(t),l.onKeyDown(t)},onPointerOver:t=>{k.splitProps.onPointerOver(t),W(t)},onFocus:t=>{k.splitProps.onFocus(t),W(t)},children:[o(Q,{ref:l.pane,as:"aside",id:`${g}-sidebar`,name:"sidebar",className:["clover-template-document-sidebar",l.over&&"clover-template-float"].filter(Boolean).join(" "),"aria-label":z?void 0:b("templateSidebar"),"aria-labelledby":z?`${g}-sidebar-name`:void 0,size:"13rem",min:l.over?void 0:"8rem",max:"24rem",hidden:!D,children:[z&&o("span",{hidden:true,id:`${g}-sidebar-name`,lang:z,children:b("templateSidebar")}),o(Oe,{layout:"list",singleItem:s,"aria-label":z?void 0:b("templateSidebar"),thumbnailSize:320,onSelect:B})]}),D&&!l.over&&o(ve,{"aria-controls":`${g}-sidebar`}),D&&o("div",{ref:A,className:"clover-template-document-spine","data-for":"sidebar",children:e}),o(Q,{className:"clover-template-document-main",min:D&&!l.over||G?pe:void 0,children:[P&&!l.open&&o("div",{className:"clover-template-document-sidebar-closed",children:e}),o(Ie,{collapseControls:v,canvasOptions:f,children:!G&&F})]}),o(he,{pane:k,className:"clover-template-document-panel",layout:E,sections:h,labels:T,headingLevel:ee(d),download:false,languages:p}),P&&l.scrim&&o("div",{className:"clover-template-document-scrim clover-template-scrim","data-for":"sidebar",...l.scrim})]})]})}export{lt as Document};
@@ -1 +1 @@
1
- var c=Object.defineProperty;var h=(o,t,e)=>t in o?c(o,t,{enumerable:true,configurable:true,writable:true,value:e}):o[t]=e;var l=(o,t,e)=>h(o,typeof t!="symbol"?t+"":t,e);import{j as d,c as p,t as x}from"./CanvasView-DxZASM9E.mjs";class f{constructor(t){l(this,"container");l(this,"boxes",new Map);const e=document.createElement("div");e.className="clover-canvas-dom-layer",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"hidden",pointerEvents:"none"}),t.appendChild(e),this.container=e}sync(t){const e=new Set;t.forEach((s,i)=>{e.add(s.key);const a=this.boxFor(s),n=s.crop??{x:0,y:0,width:s.width,height:s.height};a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.transform=d(p(s.transform,x(n.x,n.y))),a.style.opacity=String(s.opacity),a.style.zIndex=String(i);const r=s.element;r.style.width=`${s.width}px`,r.style.height=`${s.height}px`,r.style.transform=`translate(${-n.x}px, ${-n.y}px)`});for(const[s,i]of this.boxes)e.has(s)||(i.remove(),this.boxes.delete(s))}dispose(){this.boxes.clear(),this.container.remove()}boxFor(t){let e=this.boxes.get(t.key);return e&&e.firstChild!==t.element&&(e.remove(),e=void 0),e||(e=document.createElement("div"),e.className="clover-canvas-dom-item",e.dataset.key=t.key,Object.assign(e.style,{position:"absolute",top:"0",left:"0",overflow:"hidden",transformOrigin:"0 0"}),t.element.classList.add("clover-canvas-dom-media"),Object.assign(t.element.style,{position:"absolute",top:"0",left:"0",maxWidth:"none",maxHeight:"none",transformOrigin:"0 0"}),e.appendChild(t.element),this.container.appendChild(e),this.boxes.set(t.key,e)),e}}export{f as DomLayers};
1
+ var c=Object.defineProperty;var h=(o,t,e)=>t in o?c(o,t,{enumerable:true,configurable:true,writable:true,value:e}):o[t]=e;var l=(o,t,e)=>h(o,typeof t!="symbol"?t+"":t,e);import{j as d,c as p,t as x}from"./CanvasView-BAJ6OYvn.mjs";class f{constructor(t){l(this,"container");l(this,"boxes",new Map);const e=document.createElement("div");e.className="clover-canvas-dom-layer",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"hidden",pointerEvents:"none"}),t.appendChild(e),this.container=e}sync(t){const e=new Set;t.forEach((s,i)=>{e.add(s.key);const a=this.boxFor(s),n=s.crop??{x:0,y:0,width:s.width,height:s.height};a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.transform=d(p(s.transform,x(n.x,n.y))),a.style.opacity=String(s.opacity),a.style.zIndex=String(i);const r=s.element;r.style.width=`${s.width}px`,r.style.height=`${s.height}px`,r.style.transform=`translate(${-n.x}px, ${-n.y}px)`});for(const[s,i]of this.boxes)e.has(s)||(i.remove(),this.boxes.delete(s))}dispose(){this.boxes.clear(),this.container.remove()}boxFor(t){let e=this.boxes.get(t.key);return e&&e.firstChild!==t.element&&(e.remove(),e=void 0),e||(e=document.createElement("div"),e.className="clover-canvas-dom-item",e.dataset.key=t.key,Object.assign(e.style,{position:"absolute",top:"0",left:"0",overflow:"hidden",transformOrigin:"0 0"}),t.element.classList.add("clover-canvas-dom-media"),Object.assign(t.element.style,{position:"absolute",top:"0",left:"0",maxWidth:"none",maxHeight:"none",transformOrigin:"0 0"}),e.appendChild(t.element),this.container.appendChild(e),this.boxes.set(t.key,e)),e}}export{f as DomLayers};
@@ -1 +1 @@
1
- import{a as N,e as D,b as y,u as l,l as h}from"./shared-DFAX0n3B.mjs";import{j as $}from"./classnames-DukgfdpI.mjs";import{a as k}from"./heading-Cjt0f-Eu.mjs";import{u as C}from"./downloads-CmAYeEIz.mjs";import"./styles-BwkYiCLC.mjs";const g=new Set,p=a=>{var n;try{return new URL(a,(n=globalThis.location)==null?void 0:n.href).origin}catch{return a}};function K(a,n){import("./save-file-CoknKOPz.mjs").then(({saveFile:r})=>r(a,n)).then(r=>{r||(g.add(p(a)),window.open(a,"_blank","noopener,noreferrer"))})}function L({page:a,all:n,headingLevel:r=3,inPopover:e=false}){const{t:s,langOf:w}=N(),{clover:m}=D("Download"),c=y(),b=e?"span":k(r),v=e?"div":"section",t=(i,f,u)=>f.length>0&&l(v,{className:"clover-download-group",role:e?"group":void 0,"aria-labelledby":`${c}-${u}`,children:[l(b,{className:"clover-download-title",id:`${c}-${u}`,...h(w(i)),children:s(i)}),l("ul",{className:"clover-download-list",children:f.map(o=>l("li",{children:l("a",{className:"clover-download-link",href:o.id,target:"_blank",rel:"noopener noreferrer",download:"",hrefLang:o.hrefLang,...h(o.lang),onClick:d=>{d.button!==0||d.metaKey||d.ctrlKey||d.shiftKey||d.altKey||g.has(p(o.id))||(d.preventDefault(),K(o.id,m.request))},children:[o.label,o.format&&o.format!==o.label&&l("span",{className:"clover-download-format",children:[" ","(",o.format,")"]})]})},o.id))})]});return l("div",{className:"clover-download-groups",children:[t("downloadPage",a,"page"),t("downloadAll",n,"all")]})}function U({className:a,headingLevel:n=3,...r}){const{page:e,all:s}=C();return!e.length&&!s.length?null:l("div",{...r,className:$("clover-download",a),children:l(L,{page:e,all:s,headingLevel:n})})}export{U as Download,L as DownloadGroups,C as useDownloads};
1
+ import{a as N,e as D,b as y,u as l,l as h}from"./shared-D2RadIoz.mjs";import{j as $}from"./classnames-DukgfdpI.mjs";import{a as k}from"./heading-Cjt0f-Eu.mjs";import{u as C}from"./downloads-BqkNwsM0.mjs";import"./styles-DZIDbHxL.mjs";const g=new Set,p=a=>{var n;try{return new URL(a,(n=globalThis.location)==null?void 0:n.href).origin}catch{return a}};function K(a,n){import("./save-file-BaIrLp1V.mjs").then(({saveFile:r})=>r(a,n)).then(r=>{r||(g.add(p(a)),window.open(a,"_blank","noopener,noreferrer"))})}function L({page:a,all:n,headingLevel:r=3,inPopover:e=false}){const{t:s,langOf:w}=N(),{clover:m}=D("Download"),c=y(),b=e?"span":k(r),v=e?"div":"section",t=(i,f,u)=>f.length>0&&l(v,{className:"clover-download-group",role:e?"group":void 0,"aria-labelledby":`${c}-${u}`,children:[l(b,{className:"clover-download-title",id:`${c}-${u}`,...h(w(i)),children:s(i)}),l("ul",{className:"clover-download-list",children:f.map(o=>l("li",{children:l("a",{className:"clover-download-link",href:o.id,target:"_blank",rel:"noopener noreferrer",download:"",hrefLang:o.hrefLang,...h(o.lang),onClick:d=>{d.button!==0||d.metaKey||d.ctrlKey||d.shiftKey||d.altKey||g.has(p(o.id))||(d.preventDefault(),K(o.id,m.request))},children:[o.label,o.format&&o.format!==o.label&&l("span",{className:"clover-download-format",children:[" ","(",o.format,")"]})]})},o.id))})]});return l("div",{className:"clover-download-groups",children:[t("downloadPage",a,"page"),t("downloadAll",n,"all")]})}function U({className:a,headingLevel:n=3,...r}){const{page:e,all:s}=C();return!e.length&&!s.length?null:l("div",{...r,className:$("clover-download",a),children:l(L,{page:e,all:s,headingLevel:n})})}export{U as Download,L as DownloadGroups,C as useDownloads};
@@ -1 +1 @@
1
- import{a as u,u as r,l as h,k as p,t as v}from"./shared-DFAX0n3B.mjs";import{b as g}from"./annotation-name-Du2KAWoD.mjs";import{M as m}from"./Markup-Hm6bWOjm.mjs";const x=o=>o.some(n=>{var e;return(e=n.value)==null?void 0:e.trim()}),w=(o,n)=>{const e=new Map;for(const t of o)t.choice!==void 0&&e.set(t.choice,[...e.get(t.choice)??[],t]);if(!e.size)return o;const i=new Set([...e.values()].map(t=>g(t,n)));return o.filter(t=>t.choice===void 0||i.has(t))};function M({bodies:o,language:n,headingLevel:e}){const{t:i,langOf:t}=u(),l=w(o,n),f=a=>{if(x(l))return{text:""};const s=v(a.label,n);return s.text?s:{text:i("annotationsImage"),lang:t("annotationsImage")}};return r(p,{children:l.map((a,s)=>{if(a.place)return r(m,{as:"div",markup:a.label,language:n,className:"clover-annotations-text"},s);if(!a.image)return r(m,{as:"div",markup:{[a.language??"none"]:[a.value??""]},format:a.format,headingLevel:e,language:n,className:"clover-annotations-text"},s);const c=f(a);return r("img",{src:a.image,alt:c.text,...h(c.text?c.lang:void 0),width:200,loading:"lazy",className:"clover-annotations-image"},s)})})}export{M as E};
1
+ import{a as u,u as r,l as h,k as p,t as v}from"./shared-D2RadIoz.mjs";import{b as g}from"./annotation-name-KQ4wAi8-.mjs";import{M as m}from"./Markup-DACv7sRg.mjs";const x=o=>o.some(n=>{var e;return(e=n.value)==null?void 0:e.trim()}),w=(o,n)=>{const e=new Map;for(const t of o)t.choice!==void 0&&e.set(t.choice,[...e.get(t.choice)??[],t]);if(!e.size)return o;const i=new Set([...e.values()].map(t=>g(t,n)));return o.filter(t=>t.choice===void 0||i.has(t))};function M({bodies:o,language:n,headingLevel:e}){const{t:i,langOf:t}=u(),l=w(o,n),f=a=>{if(x(l))return{text:""};const s=v(a.label,n);return s.text?s:{text:i("annotationsImage"),lang:t("annotationsImage")}};return r(p,{children:l.map((a,s)=>{if(a.place)return r(m,{as:"div",markup:a.label,language:n,className:"clover-annotations-text"},s);if(!a.image)return r(m,{as:"div",markup:{[a.language??"none"]:[a.value??""]},format:a.format,headingLevel:e,language:n,className:"clover-annotations-text"},s);const c=f(a);return r("img",{src:a.image,alt:c.text,...h(c.text?c.lang:void 0),width:200,loading:"lazy",className:"clover-annotations-image"},s)})})}export{M as E};