@nulib/clover 4.0.0-beta.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (523) hide show
  1. package/README.md +7 -7
  2. package/dist/components/Annotations/Annotations.mjs +165 -204
  3. package/dist/components/Annotations/EntryBodies.mjs +28 -3
  4. package/dist/components/Annotations/languages.mjs +1 -17
  5. package/dist/components/Body/Body.mjs +16 -1
  6. package/dist/components/Body/BodyAlert.mjs +2 -1
  7. package/dist/components/Body/Caption.mjs +2 -1
  8. package/dist/components/Body/CaptionDetails.mjs +2 -1
  9. package/dist/components/Body/glyphs.mjs +24 -0
  10. package/dist/components/Canvas/AnnotationMenu.mjs +76 -60
  11. package/dist/components/Canvas/AnnotationState.mjs +9 -2
  12. package/dist/components/Canvas/Annotations.mjs +16 -7
  13. package/dist/components/Canvas/CanvasView.mjs +287 -42
  14. package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
  15. package/dist/components/Canvas/ChoiceMenu.mjs +51 -31
  16. package/dist/components/Canvas/Connected.mjs +38 -4
  17. package/dist/components/Canvas/ControlMenu.mjs +29 -8
  18. package/dist/components/Canvas/Controls.mjs +227 -48
  19. package/dist/components/Canvas/ControlsFade.mjs +16 -0
  20. package/dist/components/Canvas/FrameAnimation.mjs +568 -167
  21. package/dist/components/Canvas/ImageControls.mjs +209 -0
  22. package/dist/components/Canvas/LoadedCanvas.mjs +5 -3
  23. package/dist/components/Canvas/PlaceBox.mjs +74 -0
  24. package/dist/components/Canvas/Placeholder.mjs +46 -13
  25. package/dist/components/Canvas/RowFits.mjs +85 -0
  26. package/dist/components/Canvas/fromManifest.mjs +2 -1
  27. package/dist/components/Canvas/layout.mjs +132 -32
  28. package/dist/components/Canvas/media/MediaBody.mjs +130 -45
  29. package/dist/components/Canvas/media/Player.mjs +9 -78
  30. package/dist/components/Canvas/media/Transport.mjs +102 -78
  31. package/dist/components/Canvas/media/TransportButton.mjs +2 -1
  32. package/dist/components/Canvas/media/placeMenu.mjs +19 -0
  33. package/dist/components/Canvas/media/seekGaps.mjs +43 -0
  34. package/dist/components/Canvas/media/sequence.mjs +96 -0
  35. package/dist/components/Canvas/media/useMediaElement.mjs +22 -3
  36. package/dist/components/Canvas/panClearOfControls.mjs +1 -1
  37. package/dist/components/Collection/Collection.mjs +3 -2
  38. package/dist/components/CollectionSelect/CollectionSelect.mjs +5 -2
  39. package/dist/components/Contents/Contents.mjs +163 -34
  40. package/dist/components/Download/Download.mjs +34 -38
  41. package/dist/components/Download/downloads.mjs +40 -0
  42. package/dist/components/Items/AnnotationItems.mjs +165 -0
  43. package/dist/components/Items/CountMenu.mjs +90 -0
  44. package/dist/components/Items/Item.mjs +27 -19
  45. package/dist/components/Items/Items.mjs +93 -45
  46. package/dist/components/Items/Pager.mjs +39 -79
  47. package/dist/components/Items/PagerLayout.mjs +43 -0
  48. package/dist/components/Items/Position.mjs +103 -0
  49. package/dist/components/Items/StandaloneItems.mjs +12 -4
  50. package/dist/components/Items/TargetItems.mjs +202 -0
  51. package/dist/components/Items/masonry.mjs +35 -0
  52. package/dist/components/Label/Label.mjs +2 -1
  53. package/dist/components/Map/MapView.mjs +367 -57
  54. package/dist/components/Panel/About.mjs +61 -15
  55. package/dist/components/Panel/AboutActions.mjs +117 -0
  56. package/dist/components/Panel/Panel.mjs +58 -18
  57. package/dist/components/Panel/PartOfManifest.mjs +4 -3
  58. package/dist/components/Panel/ReadingLanguages.mjs +20 -0
  59. package/dist/components/Primitives/Primitives.mjs +18 -3
  60. package/dist/components/Provider/Provider.mjs +19 -5
  61. package/dist/components/Root/Announcer.mjs +3 -2
  62. package/dist/components/Root/Root.mjs +5 -2
  63. package/dist/components/Root/useRootState.mjs +16 -51
  64. package/dist/components/Scene/SceneView.mjs +36 -8
  65. package/dist/components/Scene/cloverEngine.mjs +2 -1
  66. package/dist/components/Search/Search.mjs +3 -2
  67. package/dist/components/Split/Split.mjs +4 -1
  68. package/dist/components/Status/Status.mjs +10 -2
  69. package/dist/components/Timeline/playerSurface.mjs +4 -1
  70. package/dist/components/Transcript/Transcript.mjs +42 -23
  71. package/dist/core/annotation-bodies.mjs +25 -5
  72. package/dist/core/annotation-collection.mjs +3 -2
  73. package/dist/core/annotation-name.mjs +12 -9
  74. package/dist/core/annotation-sets.mjs +139 -10
  75. package/dist/core/annotations-content.mjs +8 -1
  76. package/dist/core/annotations.mjs +8 -1
  77. package/dist/core/choice-key.mjs +5 -0
  78. package/dist/core/clover.mjs +112 -24
  79. package/dist/core/content-state-reader.mjs +33 -2
  80. package/dist/core/content-state.mjs +5 -3
  81. package/dist/core/dates-format.mjs +30 -0
  82. package/dist/core/dates.mjs +19 -0
  83. package/dist/core/geo.mjs +46 -5
  84. package/dist/core/image-layers.mjs +96 -0
  85. package/dist/core/items.mjs +4 -2
  86. package/dist/core/language-choice.mjs +30 -0
  87. package/dist/core/link.mjs +15 -1
  88. package/dist/core/load.mjs +4 -2
  89. package/dist/core/pages.mjs +20 -1
  90. package/dist/core/presentation.mjs +6 -4
  91. package/dist/core/range-regions.mjs +70 -0
  92. package/dist/core/ranges.mjs +52 -18
  93. package/dist/core/region.mjs +7 -2
  94. package/dist/core/sanitize.mjs +86 -1
  95. package/dist/core/save-file.mjs +33 -0
  96. package/dist/core/selectors.mjs +12 -0
  97. package/dist/core/upgrade.mjs +23 -0
  98. package/dist/core/value.mjs +11 -23
  99. package/dist/hooks/useFullscreenExit.mjs +26 -0
  100. package/dist/hooks/useHighContrast.mjs +27 -0
  101. package/dist/i18n/autonym.mjs +11 -0
  102. package/dist/i18n/config.mjs +3 -8
  103. package/dist/{core → i18n}/direction.mjs +5 -1
  104. package/dist/i18n/languages.mjs +44 -0
  105. package/dist/i18n/locales/en.json.mjs +1 -1
  106. package/dist/i18n/locales/es.json.mjs +1 -1
  107. package/dist/i18n/locales/fi.json.mjs +1 -1
  108. package/dist/i18n/locales/fr.json.mjs +1 -1
  109. package/dist/i18n/locales/nb.json.mjs +1 -1
  110. package/dist/i18n/locales/nn.json.mjs +1 -1
  111. package/dist/i18n/locales/no.json.mjs +1 -1
  112. package/dist/i18n/locales/pt.json.mjs +1 -1
  113. package/dist/{ui → i18n}/useContainerName.mjs +5 -4
  114. package/dist/{react/language.mjs → i18n/useRootLanguage.mjs} +2 -2
  115. package/dist/index.d.mts +476 -78
  116. package/dist/index.mjs +6 -2
  117. package/dist/lib/fullscreen.mjs +6 -1
  118. package/dist/lib/gltf/load.mjs +26 -6
  119. package/dist/lib/renderer/CanvasRenderer.mjs +71 -36
  120. package/dist/lib/renderer/camera/Camera.mjs +1 -1
  121. package/dist/lib/renderer/math/affine.mjs +14 -0
  122. package/dist/lib/renderer/scene/planFrame.mjs +12 -12
  123. package/dist/lib/renderer/scene/regions.mjs +11 -1
  124. package/dist/lib/renderer/scene/sceneItem.mjs +72 -9
  125. package/dist/lib/time.mjs +10 -0
  126. package/dist/map/index.d.mts +26 -4
  127. package/dist/react/fetchManifest.mjs +19 -0
  128. package/dist/react/hooks.mjs +7 -1
  129. package/dist/react/readingLanguages.mjs +16 -0
  130. package/dist/react/useContentStateOutput.mjs +71 -0
  131. package/dist/react/usePagesReached.mjs +42 -0
  132. package/dist/styles.css +1 -1
  133. package/dist/templates/default/Default.mjs +122 -135
  134. package/dist/templates/document/Document.mjs +45 -64
  135. package/dist/templates/document/Sheets.mjs +13 -5
  136. package/dist/templates/gallery/Gallery.mjs +90 -18
  137. package/dist/templates/index.d.mts +318 -18
  138. package/dist/templates/shared/Lightbox.mjs +161 -69
  139. package/dist/templates/shared/LightboxView.mjs +118 -0
  140. package/dist/templates/shared/PanelPane.mjs +104 -0
  141. package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
  142. package/dist/templates/shared/dragToClose.mjs +51 -8
  143. package/dist/templates/shared/givenAnnotations.mjs +13 -0
  144. package/dist/templates/shared/useDragToClose.mjs +6 -3
  145. package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
  146. package/dist/templates/shared/useSlide.mjs +6 -0
  147. package/dist/templates.css +1 -1
  148. package/dist/ui/BodyUnloadable.mjs +34 -0
  149. package/dist/ui/Button.mjs +2 -1
  150. package/dist/ui/Chevron.mjs +34 -0
  151. package/dist/ui/ControlCluster.mjs +15 -14
  152. package/dist/ui/EntryThumbnail.mjs +60 -0
  153. package/dist/ui/ExitFullscreen.mjs +2 -1
  154. package/dist/ui/FieldPill.mjs +5 -4
  155. package/dist/ui/HideToggle.mjs +2 -1
  156. package/dist/ui/LanguageChoice.mjs +45 -0
  157. package/dist/ui/ListEnd.mjs +29 -0
  158. package/dist/ui/Markup.mjs +27 -8
  159. package/dist/ui/NavDate.mjs +29 -0
  160. package/dist/ui/ReadMore.mjs +3 -2
  161. package/dist/ui/Sections.mjs +22 -31
  162. package/dist/ui/Steps.mjs +4 -3
  163. package/dist/ui/Tip.mjs +9 -4
  164. package/dist/ui/mediaIcons.mjs +35 -8
  165. package/dist/ui/useScrollTrack.mjs +2 -1
  166. package/dist/web-components/About-DvyvVUK5.mjs +1 -0
  167. package/dist/web-components/AnnotationItems-BpRcSrOM.mjs +1 -0
  168. package/dist/web-components/AnnotationMenu-BDPec3iI.mjs +1 -0
  169. package/dist/web-components/AnnotationState-Chs_37Kk.mjs +1 -0
  170. package/dist/web-components/Annotations-6E-oD_wg.mjs +2 -0
  171. package/dist/web-components/Annotations-CLPEq7Ro.mjs +1 -0
  172. package/dist/web-components/Body-Ct61yxI7.mjs +1 -0
  173. package/dist/web-components/BodyAlert-C_Qh3Up_.mjs +1 -0
  174. package/dist/web-components/Button-L8ZMy5lY.mjs +1 -0
  175. package/dist/web-components/{Camera-cdCqKMup.mjs → Camera-BPyLzZjP.mjs} +1 -1
  176. package/dist/web-components/{Canvas2DBackend-CnLEHRs4.mjs → Canvas2DBackend-8wFavYdl.mjs} +1 -1
  177. package/dist/web-components/CanvasView-2Fj9nT06.mjs +2 -0
  178. package/dist/web-components/CaptionDetails-DuwS-grE.mjs +1 -0
  179. package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +1 -0
  180. package/dist/web-components/Chevron-Cyr_cc9X.mjs +1 -0
  181. package/dist/web-components/ChoiceMenu-ConzybVH.mjs +1 -0
  182. package/dist/web-components/Collection-CLayN8sv.mjs +1 -0
  183. package/dist/web-components/CollectionSelect-D2d8dGJ4.mjs +1 -0
  184. package/dist/web-components/Connected-CBQ6xyhr.mjs +1 -0
  185. package/dist/web-components/Connected-DMXG3imZ.mjs +1 -0
  186. package/dist/web-components/Connected-pyd0EBD3.mjs +1 -0
  187. package/dist/web-components/Contents-tCMXBYDK.mjs +1 -0
  188. package/dist/web-components/ControlMenu-D1zkB0qX.mjs +1 -0
  189. package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +1 -0
  190. package/dist/web-components/CountMenu-Dnzb7lKo.mjs +1 -0
  191. package/dist/web-components/Cue-CUGmPS3k.mjs +1 -0
  192. package/dist/web-components/Document-D-8nalCX.mjs +1 -0
  193. package/dist/web-components/{DomLayers-BD4QPbl6.mjs → DomLayers-BxPU05-D.mjs} +1 -1
  194. package/dist/web-components/Download-Bku9Vptk.mjs +1 -0
  195. package/dist/web-components/EntryBodies-77vDudCb.mjs +1 -0
  196. package/dist/web-components/EntryThumbnail-BxQWKW6e.mjs +1 -0
  197. package/dist/web-components/FieldPill-nFGsaru9.mjs +1 -0
  198. package/dist/web-components/FrameAnimation-BvKiSXcm.mjs +1 -0
  199. package/dist/web-components/Gallery-4Hd58afA.mjs +1 -0
  200. package/dist/web-components/HideToggle-TEhY4TS4.mjs +1 -0
  201. package/dist/web-components/ImageControls-CZO7WoPb.mjs +1 -0
  202. package/dist/web-components/Items-CudZ4Lnb.mjs +1 -0
  203. package/dist/web-components/Label-f07N5Fld.mjs +1 -0
  204. package/dist/web-components/LanguageChoice-B5VM21DV.mjs +1 -0
  205. package/dist/web-components/LightboxView-C4OASmkg.mjs +1 -0
  206. package/dist/web-components/ListEnd-M39M62Cl.mjs +1 -0
  207. package/dist/web-components/{Loaded-D5xmFRSo.mjs → Loaded-oGFyBuos.mjs} +1 -1
  208. package/dist/web-components/LoadedCanvas-IvpSzPO6.mjs +1 -0
  209. package/dist/web-components/LoadedMap-WATGNLxl.mjs +1 -0
  210. package/dist/web-components/{Loading-CBKfwsML.mjs → Loading-YxuKrDAM.mjs} +1 -1
  211. package/dist/web-components/{Map-Bcgp_R8H.mjs → Map-Cw9j3gi3.mjs} +1 -1
  212. package/dist/web-components/MapView-3OxoCr5l.mjs +3 -0
  213. package/dist/web-components/Markup-DW75Jx3j.mjs +2 -0
  214. package/dist/web-components/MediaBody-CLtd0bf0.mjs +1 -0
  215. package/dist/web-components/MediaBody-JnKnoIqY.mjs +1 -0
  216. package/dist/web-components/NavDate-BCCOyycx.mjs +1 -0
  217. package/dist/web-components/{Navigator-BSJbEbuJ.mjs → Navigator-Bx4zS0Yr.mjs} +1 -1
  218. package/dist/web-components/Pager-B9GvQ64b.mjs +1 -0
  219. package/dist/web-components/PagerLayout-BF33VZL_.mjs +1 -0
  220. package/dist/web-components/Panel-BvDpCn6K.mjs +1 -0
  221. package/dist/web-components/PanelPart-Bd4lSUrP.mjs +1 -0
  222. package/dist/web-components/{PanelToggle-mUDw73zI.mjs → PanelToggle-bPcIULGZ.mjs} +1 -1
  223. package/dist/web-components/PartOfManifest-HLg-r00O.mjs +1 -0
  224. package/dist/web-components/{Pending-BPOQ2z1L.mjs → Pending-BxGjjnqq.mjs} +1 -1
  225. package/dist/web-components/PlaceBox-D-Zhe9-U.mjs +1 -0
  226. package/dist/web-components/Placeholder-DzY5hcbk.mjs +1 -0
  227. package/dist/web-components/Position-TYnzcm8e.mjs +1 -0
  228. package/dist/web-components/Primitives-C6VJXxZD.mjs +1 -0
  229. package/dist/web-components/Provider-DyB0wpeO.mjs +1 -0
  230. package/dist/web-components/ReadMore-De_0T7lc.mjs +1 -0
  231. package/dist/web-components/Root-Bt3NNBFb.mjs +1 -0
  232. package/dist/web-components/Scene-DrOM9YlD.mjs +1 -0
  233. package/dist/web-components/SceneView-DA7Yg20p.mjs +1 -0
  234. package/dist/web-components/Search-DgT8OPsK.mjs +1 -0
  235. package/dist/web-components/Sections-d1acn7qm.mjs +2 -0
  236. package/dist/web-components/StandaloneItems-DUb4YKCB.mjs +1 -0
  237. package/dist/web-components/Status-CcU3u6P4.mjs +1 -0
  238. package/dist/web-components/Steps-nlSCzbDQ.mjs +1 -0
  239. package/dist/web-components/TargetItems-BDJM3Ar-.mjs +1 -0
  240. package/dist/web-components/Timeline-BfdN3lIv.mjs +1 -0
  241. package/dist/web-components/Tip-OCB88zwY.mjs +1 -0
  242. package/dist/web-components/Transcript-bSA3cx_K.mjs +1 -0
  243. package/dist/web-components/Transport-DaIhfZqC.mjs +1 -0
  244. package/dist/web-components/Transport-DjOYI-fR.mjs +1 -0
  245. package/dist/web-components/annotation-collection-D8emkElk.mjs +1 -0
  246. package/dist/web-components/annotation-name-DbWjhgra.mjs +1 -0
  247. package/dist/web-components/annotations-content-Bg6aVAGC.mjs +1 -0
  248. package/dist/web-components/body-Ct8dmQdW.mjs +1 -0
  249. package/dist/web-components/canvas-goEZLqEd.mjs +1 -0
  250. package/dist/web-components/choice-key-BUNebLKe.mjs +1 -0
  251. package/dist/web-components/cloverEngine-Df7cMwOP.mjs +164 -0
  252. package/dist/web-components/content-state-reader-CNmBpG1L.mjs +1 -0
  253. package/dist/web-components/{controls-Dj2BybWb.mjs → controls-BZr16sYQ.mjs} +1 -1
  254. package/dist/web-components/custom-elements.json +260 -48
  255. package/dist/web-components/dates-DR3gfcON.mjs +1 -0
  256. package/dist/web-components/downloads-EjJ6Hpip.mjs +1 -0
  257. package/dist/web-components/dragToClose-X9NbZOhA.mjs +1 -0
  258. package/dist/web-components/{engine-BSt8LTso.mjs → engine-DMoc0tff.mjs} +1 -1
  259. package/dist/web-components/{engines-CC0OEsVE.mjs → engines-BmB81VXR.mjs} +1 -1
  260. package/dist/web-components/es-B1NvdYp-.mjs +1 -0
  261. package/dist/web-components/fetchManifest-CwQC6cCh.mjs +1 -0
  262. package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
  263. package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
  264. package/dist/web-components/fromManifest-DrAmY1lB.mjs +1 -0
  265. package/dist/web-components/glyphs-BFK_hvJJ.mjs +1 -0
  266. package/dist/web-components/hooks-BhtNDs_1.mjs +1 -0
  267. package/dist/web-components/image-layers-D2nQC4R-.mjs +1 -0
  268. package/dist/web-components/{imageService-dsdmcegU.mjs → imageService-iFElsopt.mjs} +1 -1
  269. package/dist/web-components/index-FJEpXukG.mjs +1 -0
  270. package/dist/web-components/index.d.mts +99 -14
  271. package/dist/web-components/index.mjs +1 -1
  272. package/dist/web-components/items-BPPrqbeh.mjs +1 -0
  273. package/dist/web-components/items-BnEnc5ot.mjs +1 -0
  274. package/dist/web-components/label-DauFa5sg.mjs +1 -0
  275. package/dist/web-components/layout-Djwu8f4R.mjs +1 -0
  276. package/dist/web-components/link-0lUlTZlw.mjs +1 -0
  277. package/dist/web-components/logo-DWPxaZaG.mjs +1 -0
  278. package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
  279. package/dist/web-components/models-BF2pqufA.mjs +1 -0
  280. package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
  281. package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
  282. package/dist/web-components/no-CEwZDBiR.mjs +1 -0
  283. package/dist/web-components/{nodes-B7JRwBgl.mjs → nodes-ChQRLDGU.mjs} +1 -1
  284. package/dist/web-components/{overlayImage-0OgQl1TL.mjs → overlayImage-MKrcgDep.mjs} +1 -1
  285. package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
  286. package/dist/web-components/{panel-CjXfre-g.mjs → panel-C13V6w6E.mjs} +1 -1
  287. package/dist/web-components/part-CekFWrtz.mjs +1 -0
  288. package/dist/web-components/playerSurface-DG1XipTq.mjs +1 -0
  289. package/dist/web-components/pointer-YQppt0at.mjs +1 -0
  290. package/dist/web-components/presentation-2-C-U79S_T.mjs +1 -0
  291. package/dist/web-components/{provider-C1wKfdjb.mjs → provider-DiUkZYiW.mjs} +1 -1
  292. package/dist/web-components/pt-CWR30SzS.mjs +1 -0
  293. package/dist/web-components/range-regions-CqGjyM76.mjs +1 -0
  294. package/dist/web-components/read-more-D8RJYdtQ.mjs +1 -0
  295. package/dist/web-components/readingLanguages-BWOLZK2k.mjs +1 -0
  296. package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +22 -0
  297. package/dist/web-components/{renderers-BMSWEFUR.mjs → renderers-LtRX5pT0.mjs} +1 -1
  298. package/dist/web-components/{resource-DLHocQ1C.mjs → resource-Cfydiy4m.mjs} +1 -1
  299. package/dist/web-components/sanitize-qIOeyIww.mjs +3 -0
  300. package/dist/web-components/save-file-dZyOpXgY.mjs +1 -0
  301. package/dist/web-components/search-BfUZJM3a.mjs +1 -0
  302. package/dist/web-components/sequence-C28xoNmD.mjs +1 -0
  303. package/dist/web-components/shared-DkY2a89G.mjs +1 -0
  304. package/dist/web-components/{show-link-CyzYE1eS.mjs → show-link-DgLJzG7k.mjs} +1 -1
  305. package/dist/web-components/{sizedImage-uv_NlE0l.mjs → sizedImage-NHzhcBYk.mjs} +1 -1
  306. package/dist/web-components/{split-CYuMjp89.mjs → split-CuFiKjin.mjs} +1 -1
  307. package/dist/web-components/{status-Ms5L0ghK.mjs → status-C3etlkhY.mjs} +1 -1
  308. package/dist/web-components/styles-DkkVOSUQ.mjs +1 -0
  309. package/dist/web-components/three.mjs +1 -1
  310. package/dist/web-components/thumbnail-DecrVnpj.mjs +1 -0
  311. package/dist/web-components/{tip-dWhupWSr.mjs → tip-D5YgaIWW.mjs} +1 -1
  312. package/dist/web-components/{toggle-BQTjR1I3.mjs → toggle-CZGB65VZ.mjs} +1 -1
  313. package/dist/web-components/upgrade-eNW0DPXq.mjs +1 -0
  314. package/dist/web-components/upgrader-BlbMUEH6.mjs +1 -0
  315. package/dist/web-components/useContainerName-hKQjEt7a.mjs +1 -0
  316. package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +1 -0
  317. package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +1 -0
  318. package/dist/web-components/useNearViewport-CDbHQUBk.mjs +1 -0
  319. package/dist/web-components/useScrollTrack-D9l_P3_B.mjs +1 -0
  320. package/dist/web-components/viewer/AnnotationItems-DtsnDXPM.mjs +1 -0
  321. package/dist/web-components/viewer/AnnotationMenu-C-Mz6CCn.mjs +1 -0
  322. package/dist/web-components/viewer/AnnotationState-5pim5K72.mjs +1 -0
  323. package/dist/web-components/viewer/Annotations-Cqn1TkzD.mjs +2 -0
  324. package/dist/web-components/viewer/Annotations-CxwN9FkB.mjs +1 -0
  325. package/dist/web-components/viewer/{Canvas2DBackend-CAmzJD5P.mjs → Canvas2DBackend-C-ZMSCak.mjs} +1 -1
  326. package/dist/web-components/viewer/CaptionDetails-CRD-gSZP.mjs +1 -0
  327. package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +1 -0
  328. package/dist/web-components/viewer/ChoiceMenu-ByGzQQx1.mjs +1 -0
  329. package/dist/web-components/viewer/Collection-m0GCcsfQ.mjs +1 -0
  330. package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +1 -0
  331. package/dist/web-components/viewer/Connected-Dvx7wtot.mjs +1 -0
  332. package/dist/web-components/viewer/Contents-CwDpfiJY.mjs +1 -0
  333. package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +1 -0
  334. package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +1 -0
  335. package/dist/web-components/viewer/CountMenu-0-ie8kIZ.mjs +1 -0
  336. package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +1 -0
  337. package/dist/web-components/viewer/Document-BsryuYJ1.mjs +1 -0
  338. package/dist/web-components/viewer/{DomLayers-DRdQSEtN.mjs → DomLayers-hc0qARQc.mjs} +1 -1
  339. package/dist/web-components/viewer/Download-MO-1Rik4.mjs +1 -0
  340. package/dist/web-components/viewer/EntryBodies-g-OEwEsk.mjs +1 -0
  341. package/dist/web-components/viewer/EntryThumbnail-DcIDYATi.mjs +1 -0
  342. package/dist/web-components/viewer/FieldPill-B9S21lxw.mjs +1 -0
  343. package/dist/web-components/viewer/FrameAnimation-qI9cZPEs.mjs +1 -0
  344. package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +1 -0
  345. package/dist/web-components/viewer/HideToggle-D8wH49mq.mjs +1 -0
  346. package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +1 -0
  347. package/dist/web-components/viewer/LanguageChoice-CRqsCBAp.mjs +1 -0
  348. package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +1 -0
  349. package/dist/web-components/viewer/ListEnd-D9Obxie4.mjs +1 -0
  350. package/dist/web-components/viewer/MapView-DQSwUzd7.mjs +3 -0
  351. package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +1 -0
  352. package/dist/web-components/viewer/MediaBody-D5ff6xy-.mjs +1 -0
  353. package/dist/web-components/viewer/NavDate-BnfDG57h.mjs +1 -0
  354. package/dist/web-components/viewer/{Navigator-CKwDgG2x.mjs → Navigator-BNwjmkXY.mjs} +1 -1
  355. package/dist/web-components/viewer/PagerLayout-C8jraHqs.mjs +1 -0
  356. package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +1 -0
  357. package/dist/web-components/viewer/PartOfManifest-DX7H0V4g.mjs +1 -0
  358. package/dist/web-components/viewer/PlaceBox-CCWfzsNU.mjs +1 -0
  359. package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +1 -0
  360. package/dist/web-components/viewer/Search-CsdYzdq1.mjs +1 -0
  361. package/dist/web-components/viewer/StandaloneItems-BfvBxbUm.mjs +1 -0
  362. package/dist/web-components/viewer/Steps-BH8ZApS4.mjs +1 -0
  363. package/dist/web-components/viewer/TargetItems-BebPFr-c.mjs +1 -0
  364. package/dist/web-components/viewer/Transcript-DXLv5WR9.mjs +1 -0
  365. package/dist/web-components/viewer/Transport-C-fh7Kx2.mjs +1 -0
  366. package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +1 -0
  367. package/dist/web-components/viewer/annotation-collection-Cjd8Dgyl.mjs +1 -0
  368. package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +1 -0
  369. package/dist/web-components/viewer/annotations-content-BARXoAz-.mjs +1 -0
  370. package/dist/web-components/viewer/cloverEngine-CumnJPKO.mjs +164 -0
  371. package/dist/web-components/viewer/content-state-reader-DuvyLThu.mjs +1 -0
  372. package/dist/web-components/viewer/dragToClose-CFCxhUxn.mjs +1 -0
  373. package/dist/web-components/viewer/fetchManifest-qNB_KgxL.mjs +1 -0
  374. package/dist/web-components/viewer/{host-DlCltI_c.mjs → host-GTHX2fPK.mjs} +1 -1
  375. package/dist/web-components/viewer/image-layers-DKOuaRTj.mjs +1 -0
  376. package/dist/web-components/viewer/index.mjs +1 -1
  377. package/dist/web-components/viewer/link-BlaM0tCa.mjs +1 -0
  378. package/dist/web-components/viewer/overlayImage-RVpv69R5.mjs +1 -0
  379. package/dist/web-components/viewer/range-regions-CIZiAHOp.mjs +1 -0
  380. package/dist/web-components/viewer/{renderers-C_wdmw9v.mjs → renderers-Dw1klwlx.mjs} +1 -1
  381. package/dist/web-components/viewer/save-file-EvzaBEJN.mjs +1 -0
  382. package/dist/web-components/viewer/{search-BHLyNxZ6.mjs → search-x1QL_bth.mjs} +1 -1
  383. package/dist/web-components/viewer/styles-I7_LWFGj.mjs +1 -0
  384. package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +1 -0
  385. package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +1 -0
  386. package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +29 -0
  387. package/dist/web-components/viewer/{vtt-XiS_-5Ao.mjs → vtt-C2G89SWH.mjs} +1 -1
  388. package/dist/web-components/viewer-Br44EEba.mjs +1 -0
  389. package/dist/web-components/{vtt-DYAOuQoK.mjs → vtt-Dd0c7psH.mjs} +1 -1
  390. package/package.json +8 -4
  391. package/dist/i18n/reader.mjs +0 -13
  392. package/dist/templates/shared/LightboxBody.mjs +0 -9
  393. package/dist/web-components/About-DbrFSVBm.mjs +0 -1
  394. package/dist/web-components/AnnotationMenu-EBjIQpQl.mjs +0 -1
  395. package/dist/web-components/AnnotationState-DQTaO6Gz.mjs +0 -1
  396. package/dist/web-components/Annotations-Cb9U7HJ_.mjs +0 -2
  397. package/dist/web-components/Annotations-Dl0SgHBS.mjs +0 -1
  398. package/dist/web-components/Body-DxSz3iST.mjs +0 -1
  399. package/dist/web-components/BodyAlert-C8EOXz24.mjs +0 -1
  400. package/dist/web-components/Button-uWgfvqsL.mjs +0 -1
  401. package/dist/web-components/CanvasView-BI3YzNdK.mjs +0 -1
  402. package/dist/web-components/CaptionDetails-B80ZhZ7v.mjs +0 -1
  403. package/dist/web-components/ChoiceMenu-DCp7-co7.mjs +0 -1
  404. package/dist/web-components/Collection-B1Le2_TU.mjs +0 -1
  405. package/dist/web-components/CollectionSelect-BL_jQog-.mjs +0 -1
  406. package/dist/web-components/Connected-BxqaRL9o.mjs +0 -1
  407. package/dist/web-components/Connected-DCBI-j9H.mjs +0 -1
  408. package/dist/web-components/Connected-DkhfVWxd.mjs +0 -1
  409. package/dist/web-components/Contents-zYEGHLfe.mjs +0 -1
  410. package/dist/web-components/ControlMenu-CAHiLAtl.mjs +0 -1
  411. package/dist/web-components/Cue-BT2V9VAq.mjs +0 -1
  412. package/dist/web-components/Document-BdCjGnJN.mjs +0 -1
  413. package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +0 -1
  414. package/dist/web-components/Download-DqU-goFi.mjs +0 -1
  415. package/dist/web-components/EntryBodies-DXAQH0vR.mjs +0 -1
  416. package/dist/web-components/ErrorBoundary-chQaO-Up.mjs +0 -1
  417. package/dist/web-components/FieldPill-CyEssPVm.mjs +0 -1
  418. package/dist/web-components/FrameAnimation-Bb0pOoRl.mjs +0 -1
  419. package/dist/web-components/Gallery-BXU3TcT3.mjs +0 -1
  420. package/dist/web-components/HideToggle-BwMrOBMu.mjs +0 -1
  421. package/dist/web-components/Items-DRj1UEpC.mjs +0 -1
  422. package/dist/web-components/Label-D6aVJB9s.mjs +0 -1
  423. package/dist/web-components/LightboxBody-BzXQGMDn.mjs +0 -1
  424. package/dist/web-components/LoadedCanvas-DOjtxLSe.mjs +0 -1
  425. package/dist/web-components/LoadedMap-DouDS2lO.mjs +0 -1
  426. package/dist/web-components/MapView-CD5zkTs8.mjs +0 -1
  427. package/dist/web-components/Markup-C1hMA8wk.mjs +0 -2
  428. package/dist/web-components/MediaBody-B_Gii4we.mjs +0 -1
  429. package/dist/web-components/MediaBody-BfrKIPte.mjs +0 -1
  430. package/dist/web-components/Pager-Di_2hHM3.mjs +0 -1
  431. package/dist/web-components/Panel-DbsC8A9V.mjs +0 -1
  432. package/dist/web-components/PartOfManifest-7eOwURrF.mjs +0 -1
  433. package/dist/web-components/Primitives-XQO3m1wG.mjs +0 -1
  434. package/dist/web-components/Provider-B61118lU.mjs +0 -1
  435. package/dist/web-components/ReadMore-BJH-qqte.mjs +0 -1
  436. package/dist/web-components/Root-Dj277K6p.mjs +0 -1
  437. package/dist/web-components/Scene-BTWpLeec.mjs +0 -1
  438. package/dist/web-components/SceneView-BYo7WmPt.mjs +0 -1
  439. package/dist/web-components/Search-ZV8FFN4p.mjs +0 -1
  440. package/dist/web-components/Sections-ejwu1_Sm.mjs +0 -2
  441. package/dist/web-components/StandaloneItems-BYaiyCca.mjs +0 -1
  442. package/dist/web-components/Status-YbQK2KzY.mjs +0 -1
  443. package/dist/web-components/Timeline-ByyVSd7B.mjs +0 -1
  444. package/dist/web-components/Tip-IO11xX4x.mjs +0 -1
  445. package/dist/web-components/Transcript-D0gUxUoA.mjs +0 -1
  446. package/dist/web-components/annotation-collection-Csv7WIlm.mjs +0 -1
  447. package/dist/web-components/annotations-content-BS_OFz5Z.mjs +0 -1
  448. package/dist/web-components/body-CKjwwFep.mjs +0 -1
  449. package/dist/web-components/canvas-CIzpp-Uz.mjs +0 -1
  450. package/dist/web-components/cloverEngine-B4LinbSt.mjs +0 -164
  451. package/dist/web-components/content-state-reader-D1BkpICh.mjs +0 -1
  452. package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
  453. package/dist/web-components/es-BwMkoRod.mjs +0 -1
  454. package/dist/web-components/fi-gPFOn9RK.mjs +0 -1
  455. package/dist/web-components/fr-DUHmgdJo.mjs +0 -1
  456. package/dist/web-components/fromManifest-BhemHaoA.mjs +0 -1
  457. package/dist/web-components/glyphs-drROkef9.mjs +0 -1
  458. package/dist/web-components/hooks-BXzQSllm.mjs +0 -1
  459. package/dist/web-components/index-B7nZdqLg.mjs +0 -1
  460. package/dist/web-components/items-CB2Uk7ts.mjs +0 -1
  461. package/dist/web-components/items-jfQ5XzEj.mjs +0 -1
  462. package/dist/web-components/keep-fragments-B5nlv2ck.mjs +0 -1
  463. package/dist/web-components/label-Vbg_cMOJ.mjs +0 -1
  464. package/dist/web-components/layout-mMHI0lsj.mjs +0 -1
  465. package/dist/web-components/link-ZRnv5NFR.mjs +0 -1
  466. package/dist/web-components/logo-Boy6u4m2.mjs +0 -1
  467. package/dist/web-components/models-D1EE_CmH.mjs +0 -1
  468. package/dist/web-components/nb-BSvnQ6jd.mjs +0 -1
  469. package/dist/web-components/nn-Dg2_HdZu.mjs +0 -1
  470. package/dist/web-components/no-BSvnQ6jd.mjs +0 -1
  471. package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
  472. package/dist/web-components/part-cUiPs2-y.mjs +0 -1
  473. package/dist/web-components/playerSurface-CU5XxI1j.mjs +0 -1
  474. package/dist/web-components/pt-B3J80JgO.mjs +0 -1
  475. package/dist/web-components/read-more-DNHNtG-a.mjs +0 -1
  476. package/dist/web-components/rendererSurface-DhIlOjGT.mjs +0 -22
  477. package/dist/web-components/sanitize-Dc7nOsgO.mjs +0 -3
  478. package/dist/web-components/search-CLy2Wj01.mjs +0 -1
  479. package/dist/web-components/shared-YUjOSBKO.mjs +0 -1
  480. package/dist/web-components/styles-CyuM_fB1.mjs +0 -1
  481. package/dist/web-components/thumbnail-c2K_iQsD.mjs +0 -1
  482. package/dist/web-components/time-B9GZoYcm.mjs +0 -1
  483. package/dist/web-components/upgrader-XNxI-5jo.mjs +0 -1
  484. package/dist/web-components/useContainerName-BpJ3IWY0.mjs +0 -1
  485. package/dist/web-components/useNearViewport-CtLyYg9n.mjs +0 -1
  486. package/dist/web-components/useScrollTrack-WbG28FPD.mjs +0 -1
  487. package/dist/web-components/viewer/AnnotationMenu-ZKyBeyUU.mjs +0 -1
  488. package/dist/web-components/viewer/AnnotationState-DO33zokc.mjs +0 -1
  489. package/dist/web-components/viewer/Annotations-BOjhr5ks.mjs +0 -1
  490. package/dist/web-components/viewer/Annotations-DkLueFLK.mjs +0 -2
  491. package/dist/web-components/viewer/CaptionDetails-DOJlUtOn.mjs +0 -1
  492. package/dist/web-components/viewer/ChoiceMenu-BDq6H34G.mjs +0 -1
  493. package/dist/web-components/viewer/Collection-By3puO0V.mjs +0 -1
  494. package/dist/web-components/viewer/Connected-DZNO2CPf.mjs +0 -1
  495. package/dist/web-components/viewer/Connected-ESg5y49m.mjs +0 -1
  496. package/dist/web-components/viewer/Contents-B_FqDwTW.mjs +0 -1
  497. package/dist/web-components/viewer/ControlMenu-DdQl-dTf.mjs +0 -1
  498. package/dist/web-components/viewer/Cue-BTRHfiWQ.mjs +0 -1
  499. package/dist/web-components/viewer/Document-B9_PyD2w.mjs +0 -1
  500. package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +0 -1
  501. package/dist/web-components/viewer/EntryBodies-CJuTRcTq.mjs +0 -1
  502. package/dist/web-components/viewer/FieldPill-06uwrNwE.mjs +0 -1
  503. package/dist/web-components/viewer/FrameAnimation-3dcDHf5q.mjs +0 -1
  504. package/dist/web-components/viewer/Gallery-BYasTqZc.mjs +0 -1
  505. package/dist/web-components/viewer/HideToggle-BxkNMX-T.mjs +0 -1
  506. package/dist/web-components/viewer/LightboxBody-CXMc1xOH.mjs +0 -1
  507. package/dist/web-components/viewer/MapView-DCerrRRV.mjs +0 -1
  508. package/dist/web-components/viewer/MediaBody-BdkJcyGy.mjs +0 -1
  509. package/dist/web-components/viewer/MediaBody-waF4KvHp.mjs +0 -1
  510. package/dist/web-components/viewer/PartOfManifest-DalHJFwC.mjs +0 -1
  511. package/dist/web-components/viewer/Search-Di_QQfDb.mjs +0 -1
  512. package/dist/web-components/viewer/StandaloneItems-B9J6nnWn.mjs +0 -1
  513. package/dist/web-components/viewer/Transcript-aHOixfna.mjs +0 -1
  514. package/dist/web-components/viewer/annotation-collection-I2UkdobR.mjs +0 -1
  515. package/dist/web-components/viewer/annotations-content-D-i4j9pD.mjs +0 -1
  516. package/dist/web-components/viewer/cloverEngine-CynoKdta.mjs +0 -164
  517. package/dist/web-components/viewer/content-state-reader-D7GIMcKK.mjs +0 -1
  518. package/dist/web-components/viewer/link-BX-wzj1u.mjs +0 -1
  519. package/dist/web-components/viewer/overlayImage-CHqn1fG8.mjs +0 -1
  520. package/dist/web-components/viewer/styles-BRCkEU3w.mjs +0 -1
  521. package/dist/web-components/viewer/viewer-ipqAA-xQ.mjs +0 -28
  522. package/dist/web-components/viewer-DEHIsIHd.mjs +0 -1
  523. /package/dist/{ui → i18n}/languageCode.mjs +0 -0
@@ -1,4 +1,4 @@
1
- import{bi as h}from"./viewer-ipqAA-xQ.mjs";function p(e){const t=e.trim().split(":").map(Number);return t.some(Number.isNaN)?NaN:t.reduce((r,s)=>r*60+s,0)}const b={"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F","&quot;":'"',"&apos;":"'"};function N(e){return e.replace(/<[^>]*>/g,"").replace(/&(?:#(\d+)|#x([0-9a-f]+)|[a-z]+);/gi,(t,r,s)=>{if(!r&&!s)return b[t.toLowerCase()]??t;const o=r?parseInt(r,10):parseInt(s,16);return o>0&&o<=1114111?String.fromCodePoint(o):t})}function C(e){var s,o;const t=[],r=e.replace(/\r\n?/g,`
1
+ import{bJ as h}from"./viewer-DJrQuNs1.mjs";function p(e){const t=e.trim().split(":").map(Number);return t.some(Number.isNaN)?NaN:t.reduce((r,s)=>r*60+s,0)}const b={"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F","&quot;":'"',"&apos;":"'"};function N(e){return e.replace(/<[^>]*>/g,"").replace(/&(?:#(\d+)|#x([0-9a-f]+)|[a-z]+);/gi,(t,r,s)=>{if(!r&&!s)return b[t.toLowerCase()]??t;const o=r?parseInt(r,10):parseInt(s,16);return o>0&&o<=1114111?String.fromCodePoint(o):t})}function C(e){var s,o;const t=[],r=e.replace(/\r\n?/g,`
2
2
  `).split(/\n{2,}/);for(const n of r){const i=n.split(`
3
3
  `).filter(a=>a.length),c=i.findIndex(a=>a.includes("-->"));if(c===-1)continue;const[g,w]=i[c].split("-->"),f=p(g),l=p(w.trim().split(/\s+/)[0]);if(!Number.isFinite(f)||!Number.isFinite(l))continue;const u=i.slice(c+1).join(`
4
4
  `),d=(o=(s=/<v(?:\.[^\s>]+)*\s+([^>]+)>/.exec(u))==null?void 0:s[1])==null?void 0:o.trim(),x=N(u);t.push({start:f,end:l,text:x,...d?{voice:d}:{}})}return t.sort((n,i)=>n.start-i.start)}function D(e,t){let r=0,s=e.length-1,o=-1;for(;r<=s;){const n=r+s>>1;e[n].start<=t?(o=n,r=n+1):s=n-1}for(let n=o;n>=0;n--){if(e[n].end>t)return n;if(t-e[n].start>3600)break}return-1}function m(e,t,r,s){let o=e.get(t);return o||(o=h(r,t).then(n=>n.ok?s(n):Promise.reject(new Error(String(n.status)))).catch(n=>{throw e.delete(t),n}),e.set(t,o)),o}const T=new Map;function E(e,t){return m(T,e,t,r=>r.text())}const I=new Map;function F(e,t){return m(I,e,t,async r=>S(await r.arrayBuffer()))}const k="\u20AC\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\u017D\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\u017E\u0178";function S(e){try{return new TextDecoder("utf-8",{fatal:true}).decode(e)}catch{return new TextDecoder("windows-1252").decode(e).replace(/[\u0080-\u009f]/g,t=>k[t.charCodeAt(0)-128])}}function O(e){return e.replace(/\r\n?/g,`
@@ -0,0 +1 @@
1
+ import{D as q,A as P,d as A,y as z,q as R,T as K,u as a,Q as Z,x as V,a as ee,l as te,_ as j,k as U,b as ne,c as Q,R as oe,e as re,z as Y,f as le,g as se,P as ae}from"./shared-DkY2a89G.mjs";import{T as ce}from"./Tip-OCB88zwY.mjs";import{r as ie,w as ue,p as de,c as M,l as me,t as fe,n as pe,h as ve}from"./splitting-BnQUxxgH.mjs";import"./styles-DkkVOSUQ.mjs";import{P as ge}from"./PanelToggle-bPcIULGZ.mjs";import{t as he}from"./heading-Cjt0f-Eu.mjs";import{I as L}from"./Items-CudZ4Lnb.mjs";import{P as ye,L as be}from"./Provider-DyB0wpeO.mjs";import{S as Se}from"./Status-CcU3u6P4.mjs";import{B as we}from"./Body-Ct61yxI7.mjs";import{Position as Pe}from"./Position-TYnzcm8e.mjs";import{R as Ne}from"./Root-Bt3NNBFb.mjs";import{P as ze}from"./Panel-BvDpCn6K.mjs";import{u as Oe,a as Ee}from"./hooks-BhtNDs_1.mjs";import{L as T}from"./Label-f07N5Fld.mjs";const D=Z(null);function _(e,n){typeof e=="function"?e(n):e&&(e.current=n)}const xe=q(function({as:n="div",storageKey:t,className:r,style:l,children:c,...i},u){const o=P(null),S=P({}),[d,p]=A({});z(()=>p(ie(t)),[t]);const g=R((m,y)=>p(b=>{const w={...b};return y===void 0?delete w[m]:w[m]=Math.round(y),ue(t,w),w}),[t]),h=K(()=>({sizes:d,setSize:g,specs:S,element:o}),[d,g]);return a(D.Provider,{value:h,children:a(n,{ref:m=>{o.current=m,_(u,m)},className:["clover-split",r].filter(Boolean).join(" "),style:{display:"flex",...l},...i,children:c})})}),J=q(function({as:n="div",size:t,min:r,max:l,name:c,className:i,style:u,children:o,...S},d){const p=V(D),g=P(null),[h,m]=A(c??"");z(()=>{if(c)return m(c);const b=de(p==null?void 0:p.element.current);m(String(b.indexOf(g.current)))},[c,p]),p&&h&&(p.specs.current[h]={min:r,max:l,size:t});const y=p&&h?p.sizes[h]:void 0;return a(n,{ref:b=>{g.current=b,_(d,b)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":t!==void 0?"":void 0,style:{minWidth:M(r)??0,"--clover-split-size":y!==void 0?`${y}px`:M(t),"--clover-split-max":M(l),...u},...S,children:o})}),Fe=q(function({className:n,children:t,onPointerDown:r,onClick:l,onKeyDown:c,...i},u){const o=V(D),{t:S,langOf:d}=ee(),p=P(null),[g,h]=A(),m=R(()=>{const s=p.current,v=o==null?void 0:o.element.current;return!s||!v||!o?null:me(s,v,o.specs.current)},[o]),y=R(s=>{const v=m();if(!v||!o)return;const O=Math.min(v.max,Math.max(v.min,s));o.setSize(v.key,O),h({now:O,min:v.min,max:v.max})},[m,o]),b=R(()=>{const s=m();s&&h({now:s.sized.getBoundingClientRect().width,min:s.min,max:s.max})},[m]);z(()=>{const s=o==null?void 0:o.element.current;if(b(),!s||typeof ResizeObserver>"u")return;let v=0;const O=new ResizeObserver(()=>{cancelAnimationFrame(v),v=requestAnimationFrame(b)});return O.observe(s),()=>{cancelAnimationFrame(v),O.disconnect()}},[b,o,o==null?void 0:o.sizes]);const w=s=>{var v;return Math.round(s/(((v=o==null?void 0:o.element.current)==null?void 0:v.clientWidth)||1)*100)},E=()=>{var C,B;const s=m();if(!s||!o)return;const v=((C=o.element.current)==null?void 0:C.clientWidth)??0,O=fe((B=o.specs.current[s.key])==null?void 0:B.size,v),I=pe(s,O,o.sizes[s.key]);if(!I.own)return y(I.to);o.setSize(s.key,void 0),h({now:O,min:s.min,max:s.max})},x=P({limits:m,resize:y,step:E});x.current={limits:m,resize:y,step:E};const[N]=A(()=>ve(()=>p.current,()=>x.current));z(()=>()=>N.dispose(),[N]);const F=i["aria-label"]??S("splitHandle");return a("div",{ref:s=>{p.current=s,_(u,s)},role:"separator","aria-orientation":"vertical","aria-label":F,...te(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":g?w(g.now):void 0,"aria-valuemin":g?w(g.min):void 0,"aria-valuemax":g?w(g.max):void 0,tabIndex:0,className:["clover-split-handle",n].filter(Boolean).join(" "),onPointerDown:s=>{r==null||r(s),N.down(s)},onPointerMove:s=>N.move(s),onPointerUp:s=>N.up(s),onPointerCancel:s=>N.up(s),onClick:s=>{l==null||l(s),N.click(s)},onKeyDown:s=>{c==null||c(s),N.key(s)},...i,children:[t,a(ce,{label:F})]})});let Ae,k;const X=()=>Ae??(Ae=import("./dragToClose-X9NbZOhA.mjs").then(e=>k=e));function Be(){X()}function Ie(e,{enabled:n,side:t,onClose:r,scrim:l,alongside:c,exits:i=false}){const u=P({enabled:n,side:t,onClose:r,scrim:l,alongside:c,exits:i});u.current={enabled:n,side:t,onClose:r,scrim:l,alongside:c,exits:i},z(()=>{const o=e.current;if(!o||(k==null||k.reset(o,u),!n))return;let S=true,d;return X().then(p=>{S&&(d=p.attach(o,u))}),()=>{S=false,d==null||d()}},[e,n])}const Ce=240,Re="16rem",Te="14rem",ke=31;function Le(e){const[n,t]=A(e),[r,l]=A(e);return z(()=>{if(e){t(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>l(true)));return()=>cancelAnimationFrame(i)}l(false);const c=setTimeout(()=>t(false),Ce);return()=>clearTimeout(c)},[e]),{mounted:n,open:e&&r}}function Me(e){const n=t=>e.querySelector(t);return n('[role="tab"][aria-selected="true"]')??n('.clover-sections-button[aria-expanded="true"]')??n(".clover-sections-button")}const qe=typeof window>"u"?z:j;function je(e,n){const[t,r]=A();return qe(()=>{const l=e.current;if(!l)return;const c=()=>{const u=l.clientWidth;if(!u)return;const o=parseFloat(getComputedStyle(document.documentElement).fontSize);r(u>=n*(o||16))};if(c(),typeof ResizeObserver>"u")return;const i=new ResizeObserver(c);return i.observe(l),()=>i.disconnect()},[e,n]),t}const De=typeof window>"u"?z:j;function _e({id:e,beside:n,defaultOpen:t,side:r,focus:l=Me,slides:c=true,alongside:i,followFocus:u}){var $,W;const o=P(null),S=P(null),d=n===false,[p,g]=A(t),[h,m]=A(false),y=d?h:p,b=()=>document.querySelector(`button[aria-controls~="${e}"]`),w=()=>u(b),E=()=>{var f,H;(f=o.current)!=null&&f.contains(document.activeElement)&&((H=b())==null||H.focus(),w())},x=P(0),N=f=>{x.current=d&&f?3:0,x.current||w(),d&&m(f),g(f)},F=()=>{E(),N(false)},s=P(n),v=P(false);if(s.current===true&&n===false){const f=document.activeElement;v.current=!!(f&&(($=o.current)!=null&&$.contains(f)||(W=b())!=null&&W.contains(f)))}De(()=>{var f;v.current&&(v.current=false,(f=b())==null||f.focus(),w()),n===true&&m(false),s.current=n},[n]);const O=Le(c&&d&&y),I=c&&d,C=I?O.mounted:y,B=I?O.open:y;return z(()=>{if(!x.current||!o.current)return;x.current-=1;const f=l(o.current);f==null||f.focus({preventScroll:true}),f&&document.activeElement===f&&(x.current=0)}),Ie(o,{enabled:d&&B,side:r,onClose:F,scrim:S,alongside:i,exits:!c}),{pane:o,over:d,open:y,shown:C,opened:B,setOpen:N,close:F,onKeyDown:f=>{d&&y&&f.key==="Escape"&&!f.defaultPrevented&&(f.preventDefault(),F())},scrim:d&&C&&{ref:S,"data-open":B,"aria-hidden":true,onMouseDown:f=>f.preventDefault(),onClick:F}}}const $e=typeof window>"u"?z:j;function We(e,n,t){$e(()=>{const r=e.current,l=r==null?void 0:r.parentElement;if(!t||!r||!l)return;const c=()=>{const o=n();r.style.setProperty("--clover-template-spine-top",`${o?o.getBoundingClientRect().top-l.getBoundingClientRect().top:0}px`)};c();const i=new ResizeObserver(c);for(const o of Array.from(l.children))i.observe(o);const u=n();return u&&i.observe(u),()=>i.disconnect()},[e,t])}function He({id:e,beside:n,defaultOpen:t,followFocus:r,body:l,panel:c,load:i}){const u=_e({id:e,beside:n,defaultOpen:t,side:"end",followFocus:r}),o=!u.over&&u.open,S=P(null);We(S,()=>l==null?void 0:l(),o&&!!l);const d=g=>{var h,m;(m=(h=g.target).closest)!=null&&m.call(h,`[aria-controls~="${e}"]`)&&(c||i==null||i(),u.over&&Be())},p=a(ge,{open:u.open,onOpenChange:g=>g&&!c&&i?i().then(()=>u.setOpen(true)):u.setOpen(g),controls:e});return{...u,id:e,docked:o,spine:S,toggle:p,Part:c,splitProps:{"data-panel":u.over?"over":"beside",onKeyDown:u.onKeyDown,onPointerOver:d,onFocus:d}}}function Ge({pane:e,className:n,...t}){const{id:r,over:l,docked:c,Part:i}=e;return a(U,{children:[c&&a(Fe,{className:"clover-template-panel-handle","aria-controls":r}),c&&a("div",{ref:e.spine,className:"clover-template-spine",children:e.toggle}),a(J,{ref:e.pane,id:r,"data-spine":l||void 0,name:"panel",className:["clover-template-panel clover-template-drawer",n].filter(Boolean).join(" "),size:"24rem",min:l?void 0:Te,"data-open":e.opened,hidden:!e.shown,children:i&&a(i,{...t,onClose:l?e.close:void 0,closeOnEscape:l})}),e.scrim&&a("div",{className:"clover-template-scrim",...e.scrim})]})}const Ke=30;function Ve(){const e=P(0);return z(()=>()=>cancelAnimationFrame(e.current),[]),n=>{cancelAnimationFrame(e.current);let t=0;const r=()=>{const l=n();l&&Ue()?l.focus():++t<Ke&&(e.current=requestAnimationFrame(r))};e.current=requestAnimationFrame(r)}}function Ue(){const e=document.activeElement;return!e||e===document.body||!e.isConnected||e.closest("[hidden], [inert]")!==null}function Qe({className:e,header:n=true,headingLevel:t=2,panel:r=true,defaultPanelOpen:l,panelLayout:c="accordion",download:i=true,languages:u=true,items:o="slider",singleItem:S=false,storageKey:d="clover-template-default",fill:p=false,collapseControls:g,...h}){const m=P(null),y=ne().replace(/:/g,""),b=`${y}-panel`,w=he(t,`${y}-title`),E=He({id:b,beside:je(m,ke),defaultOpen:l??true,followFocus:Ve(),body:()=>{var F;return(F=m.current)==null?void 0:F.querySelector(".clover-template-default-body")},panel:ze}),x=E.over,N=r&&E.docked;return a(Ne,{className:["clover-template-default",e].filter(Boolean).join(" "),"data-fill":p||void 0,...n?w.group:null,...h,children:a(xe,{ref:m,className:"clover-template-default-panes clover-template-panes",storageKey:d||void 0,...r?E.splitProps:{"data-panel":"beside"},children:[a(J,{className:"clover-template-default-main",min:x?void 0:Re,children:[n&&a("header",{className:"clover-template-default-header",children:[a(Ye,{title:w}),a(L,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),a(ye,{className:"clover-template-default-provider",children:a(be,{})})]}),a(Se,{loading:false}),a(we,{className:"clover-template-default-body",collapseControls:g,children:r&&!N&&E.toggle}),a("div",{className:"clover-template-default-rail",children:[a("div",{className:"clover-template-default-rail-header",children:[a(Ze,{}),a(Pe,{})]}),o&&a(L,{layout:o,singleItem:S})]})]}),r&&a(Ge,{pane:E,className:"clover-template-default-panel",layout:c,download:i,languages:u,headingLevel:n?Xe(t):t})]})})}function Ye({title:e}){const n=Q(r=>{var l;return r.throughCollection?(l=r.collection)==null?void 0:l.label:void 0}),t=Oe();return Je(t==null?void 0:t.entries[0]),a(U,{children:[a(T,{as:e.as,className:"clover-template-default-title clover-template-title clover-title",...e.title}),n&&a("div",{className:"clover-template-default-collection-row",children:[a(T,{as:"p",label:n,className:"clover-template-default-collection"}),a(L,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),t&&a("div",{className:"clover-template-default-collection-row",children:[t.label&&a(T,{as:"p",label:t.label,className:"clover-template-default-collection"}),a(L,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Je(e){const{clover:n}=re(),t=Q(l=>{var c;return(c=l.manifest)==null?void 0:c.id}),r=P(null);z(()=>{if(!e||!t||r.current===t)return;r.current=t;const{annotationId:l,canvasId:c}=n.store.get();!l&&c===e.canvasId&&n.selectAnnotation(e.id)},[n,e,t])}const Xe=e=>e+1;function Ze(){const e=Ee();return a("p",{className:"clover-template-default-titles",children:e.map((n,t)=>a(oe.Fragment,{children:[t>0&&a("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),a(T,{label:n.label})]},n.id))})}const et=Y(()=>import("./Document-D-8nalCX.mjs").then(e=>({default:e.Document}))),tt=Y(()=>import("./Gallery-4Hd58afA.mjs").then(e=>({default:e.Gallery}))),G={default:Qe,document:et,gallery:tt},nt={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function ot({props:e}){const n=typeof e.template=="string"&&e.template in G?e.template:"default",t=Object.fromEntries(Object.entries(e).filter(([i])=>{var u;return i!=="template"&&(((u=nt[i])==null?void 0:u.includes(n))??true)})),r=le(se,!!e.renderers),l=K(()=>r==null?void 0:r.toRenderers(e.renderers),[r,e.renderers]);if(e.renderers&&!r)return null;t.renderers=l,typeof t.storageKey=="string"&&(t.storageKey=t.storageKey.trim().toLowerCase()==="false"?false:t.storageKey);const c=G[n];return a(ae,{fallback:null,children:a(c,{...t,iiifContent:e.iiifContent})})}const bt=Object.freeze(Object.defineProperty({__proto__:null,ViewerElement:ot},Symbol.toStringTag,{value:"Module"}));export{ke as B,Re as P,xe as S,_e as a,je as b,J as c,Fe as d,Ge as e,He as f,Ce as g,Be as p,Ve as u,bt as v};
@@ -1,4 +1,4 @@
1
- import{a1 as h}from"./shared-YUjOSBKO.mjs";function p(e){const t=e.trim().split(":").map(Number);return t.some(Number.isNaN)?NaN:t.reduce((r,s)=>r*60+s,0)}const N={"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F","&quot;":'"',"&apos;":"'"};function b(e){return e.replace(/<[^>]*>/g,"").replace(/&(?:#(\d+)|#x([0-9a-f]+)|[a-z]+);/gi,(t,r,s)=>{if(!r&&!s)return N[t.toLowerCase()]??t;const o=r?parseInt(r,10):parseInt(s,16);return o>0&&o<=1114111?String.fromCodePoint(o):t})}function C(e){var s,o;const t=[],r=e.replace(/\r\n?/g,`
1
+ import{a1 as h}from"./shared-DkY2a89G.mjs";function p(e){const t=e.trim().split(":").map(Number);return t.some(Number.isNaN)?NaN:t.reduce((r,s)=>r*60+s,0)}const N={"&amp;":"&","&lt;":"<","&gt;":">","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F","&quot;":'"',"&apos;":"'"};function b(e){return e.replace(/<[^>]*>/g,"").replace(/&(?:#(\d+)|#x([0-9a-f]+)|[a-z]+);/gi,(t,r,s)=>{if(!r&&!s)return N[t.toLowerCase()]??t;const o=r?parseInt(r,10):parseInt(s,16);return o>0&&o<=1114111?String.fromCodePoint(o):t})}function C(e){var s,o;const t=[],r=e.replace(/\r\n?/g,`
2
2
  `).split(/\n{2,}/);for(const n of r){const i=n.split(`
3
3
  `).filter(a=>a.length),c=i.findIndex(a=>a.includes("-->"));if(c===-1)continue;const[g,w]=i[c].split("-->"),f=p(g),l=p(w.trim().split(/\s+/)[0]);if(!Number.isFinite(f)||!Number.isFinite(l))continue;const u=i.slice(c+1).join(`
4
4
  `),d=(o=(s=/<v(?:\.[^\s>]+)*\s+([^>]+)>/.exec(u))==null?void 0:s[1])==null?void 0:o.trim(),x=b(u);t.push({start:f,end:l,text:x,...d?{voice:d}:{}})}return t.sort((n,i)=>n.start-i.start)}function D(e,t){let r=0,s=e.length-1,o=-1;for(;r<=s;){const n=r+s>>1;e[n].start<=t?(o=n,r=n+1):s=n-1}for(let n=o;n>=0;n--){if(e[n].end>t)return n;if(t-e[n].start>3600)break}return-1}function m(e,t,r,s){let o=e.get(t);return o||(o=h(r,t).then(n=>n.ok?s(n):Promise.reject(new Error(String(n.status)))).catch(n=>{throw e.delete(t),n}),e.set(t,o)),o}const T=new Map;function E(e,t){return m(T,e,t,r=>r.text())}const I=new Map;function F(e,t){return m(I,e,t,async r=>S(await r.arrayBuffer()))}const k="\u20AC\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\u017D\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\u017E\u0178";function S(e){try{return new TextDecoder("utf-8",{fatal:true}).decode(e)}catch{return new TextDecoder("windows-1252").decode(e).replace(/[\u0080-\u009f]/g,t=>k[t.charCodeAt(0)-128])}}function O(e){return e.replace(/\r\n?/g,`
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "map",
17
17
  "accessibility"
18
18
  ],
19
- "homepage": "https://nulib-ds.github.io/clover/",
19
+ "homepage": "https://clover.iiif.library.northwestern.edu/",
20
20
  "bugs": {
21
21
  "url": "https://github.com/nulib-ds/clover/issues"
22
22
  },
@@ -26,6 +26,11 @@
26
26
  "directory": "packages/clover"
27
27
  },
28
28
  "license": "MIT",
29
+ "author": {
30
+ "name": "Mat Jordan",
31
+ "email": "mat@northwestern.edu",
32
+ "url": "https://github.com/mathewjordan"
33
+ },
29
34
  "sideEffects": [
30
35
  "*.css",
31
36
  "./dist/web-components/**"
@@ -69,8 +74,7 @@
69
74
  "!dist/**/.vite"
70
75
  ],
71
76
  "publishConfig": {
72
- "access": "public",
73
- "tag": "beta"
77
+ "access": "public"
74
78
  },
75
79
  "scripts": {
76
80
  "prepublishOnly": "npm run build && npm run test:build",
@@ -109,5 +113,5 @@
109
113
  "preact": "^10.24.3",
110
114
  "three": "^0.186.1"
111
115
  },
112
- "version": "4.0.0-beta.1"
116
+ "version": "4.1.0"
113
117
  }
@@ -1,13 +0,0 @@
1
- "use client";
2
- function readerLanguages() {
3
- const found = [];
4
- if (typeof document !== "undefined")
5
- found.push(document.documentElement.lang);
6
- if (typeof navigator !== "undefined") {
7
- found.push(...navigator.languages ?? [], navigator.language);
8
- }
9
- return found.filter(Boolean);
10
- }
11
- export {
12
- readerLanguages
13
- };
@@ -1,9 +0,0 @@
1
- "use client";
2
- import { jsx } from "react/jsx-runtime";
3
- import { Body } from "../../components/Body/Body.mjs";
4
- function LightboxBody() {
5
- return /* @__PURE__ */ jsx(Body, { className: "clover-template-lightbox-body" });
6
- }
7
- export {
8
- LightboxBody as default
9
- };
@@ -1 +0,0 @@
1
- import{a as x,i as z,A as C,y as T,b as $,u as t,X as g,P as j,z as F}from"./shared-YUjOSBKO.mjs";import{j as H}from"./classnames-DukgfdpI.mjs";import{Thumbnail as I,Summary as y,Metadata as M,RequiredStatement as D,Rights as V,Homepage as B,SeeAlso as G,Id as L}from"./Primitives-XQO3m1wG.mjs";import{useDownloads as U,DownloadGroups as W}from"./Download-DqU-goFi.mjs";import{P as X}from"./Provider-B61118lU.mjs";import{a as E,t as J}from"./heading-Cjt0f-Eu.mjs";import{L as Q}from"./Label-D6aVJB9s.mjs";import"./styles-CyuM_fB1.mjs";const Y=F(()=>import("./PartOfManifest-7eOwURrF.mjs"));function re({canvasSummary:A=false,headingLevel:i=3,download:P=true,thumbnail:d=true,label:u=true,className:w,...N}){const{t:S,langOf:O}=x(),m=U(),o=z(e=>e.manifest,Object.is,"About"),v=C(null);T(()=>{const e=v.current,l=e==null?void 0:e.querySelector(".clover-about-thumbnail");if(!e||!l||typeof ResizeObserver>"u")return;const a=e.querySelector(".clover-about-label"),r=()=>{const h=`${(a==null?void 0:a.offsetHeight)??0}px`,p=`${l.offsetWidth}px`,b=e.style;b.getPropertyValue("--clover-about-label-height")!==h&&b.setProperty("--clover-about-label-height",h),b.getPropertyValue("--clover-about-thumbnail-width")!==p&&b.setProperty("--clover-about-thumbnail-width",p)};r();let n=0;const c=new ResizeObserver(()=>{cancelAnimationFrame(n),n=requestAnimationFrame(r)});return c.observe(l),a&&c.observe(a),()=>{cancelAnimationFrame(n),c.disconnect(),e.style.removeProperty("--clover-about-label-height"),e.style.removeProperty("--clover-about-thumbnail-width")}},[u,d,o]);const q=$(),R=()=>{var a,r;const e=v.current;(r=((a=e==null?void 0:e.closest(".clover-sections-item"))==null?void 0:a.querySelector(".clover-sections-button"))??e)==null||r.focus({preventScroll:true})};if(!o)return null;const s=(e,l,a)=>{if(!l)return null;const{as:r,title:n,group:c}=J(i,`${q}-${e}`);return t("section",{className:"clover-about-section",...c,children:[t(r,{className:"clover-about-heading",lang:O(e),...n,children:S(e)}),a]})},f=e=>Array.isArray(o[e])?o[e].length>0:!!o[e];return t("div",{ref:v,className:H("clover-about",w),tabIndex:-1,...N,children:[(d||u)&&t("div",{className:"clover-about-head",children:[d&&t(I,{className:"clover-about-thumbnail",size:256,alt:u?"":void 0}),u&&t(Q,{as:E(i),className:"clover-about-label"})]}),A&&t(y,{of:"canvas",className:"clover-about-summary"}),g(o)&&o.partOf&&t(j,{fallback:null,children:t(Y,{manifest:o,headingLevel:i,onOpened:R})}),t(y,{className:"clover-about-summary"}),t(M,{className:"clover-about-metadata"}),t(D,{className:"clover-about-metadata"}),s("aboutProvider",f("provider"),t(X,{})),s("aboutRights",o.rights,t(V,{})),s("aboutHomepage",f("homepage"),t(B,{})),s("aboutSeeAlso",f("seeAlso"),t(G,{})),s("download",P&&m.page.length+m.all.length>0,t(W,{page:m.page,all:m.all,headingLevel:i+1})),s(g(o)?"aboutCanvas":"aboutManifest",o.id,t(L,{}))]})}export{re as About};
@@ -1 +0,0 @@
1
- import{u as n,an as x}from"./shared-YUjOSBKO.mjs";import{s as I}from"./Annotations-Dl0SgHBS.mjs";import{C as E}from"./ControlMenu-CAHiLAtl.mjs";import{C as H}from"./Cue-BT2V9VAq.mjs";import{H as T}from"./HideToggle-BwMrOBMu.mjs";import{u as $}from"./useContainerName-BpJ3IWY0.mjs";import"./styles-CyuM_fB1.mjs";const j=({id:m,triggerId:f,label:N,labelLang:b,annotations:d,hiddenPages:C=[],onPageVisibilityChange:u,selected:y,onSelect:v,onActivate:i,onClose:M})=>{const g=$(N,b),r=[];d.forEach((e,c)=>{var o,l;const s=r[r.length-1];s&&((o=s.page)==null?void 0:o.text)===((l=e.page)==null?void 0:l.text)?s.items.push(c):r.push({page:e.page,items:[c]})});const k=r.some(e=>!e.page);return n(E,{className:"clover-canvas-annotation-menu","data-testid":"clover-canvas-annotation-menu",id:m,onClose:M,triggerId:f,children:[k&&g.node,r.map((e,c)=>{const s=[...new Set(e.items.flatMap(t=>d[t].pageId??[]))],o=`${m}-page-${c}`,l=u&&s.length>0&&n(T,{hidden:s.every(t=>C.includes(t)),onChange:t=>u(s,!t),of:e.page?o:void 0});return x("fieldset",{...e.page?{"aria-labelledby":o}:g.props,className:"clover-canvas-menu-group clover-annotations-set",key:c},e.page?n("legend",{className:"clover-canvas-menu-legend clover-annotations-set-header",children:[n("span",{className:"clover-annotations-title",id:o,lang:e.page.lang,children:e.page.text}),l]}):l&&n("div",{className:"clover-annotations-set-header",children:l}),n("div",{className:"clover-annotations-list",children:e.items.map(t=>{const a=d[t],h=I(a),p=y===a.id;return n("label",{className:"clover-canvas-menu-item clover-annotations-entry","data-selected":p,onMouseEnter:()=>i(a.id),onMouseLeave:()=>i(null),children:[n("input",{type:"radio",name:m,checked:p,onChange:()=>v(a),onClick:()=>p&&v(a),onFocus:()=>i(a.id),onBlur:()=>i(null)}),h!==void 0&&n(H,{start:h,className:"clover-annotations-time"}),n("span",{className:"clover-annotations-body clover-cue-text",lang:a.label?a.lang:void 0,children:a.label??String(t+1)})]},a.id)})}))})]})};export{j as default};
@@ -1 +0,0 @@
1
- import{T as l,n as Ot,c as Wt,d as C,ak as bt,q as k,A as i,y as j,_ as Tt,u as Gt}from"./shared-YUjOSBKO.mjs";import{w as Rt,p as kt,g as At,t as jt,A as zt}from"./Annotations-Dl0SgHBS.mjs";import{g as Dt}from"./layout-mMHI0lsj.mjs";import{p as Jt}from"./time-B9GZoYcm.mjs";const Ut=()=>import("./svg-shape-DLY3g7oq.mjs");function Xt(w){var S;const c=l(()=>!!(w!=null&&w.some(({annotation:o})=>{var p;return(p=Ot(o==null?void 0:o.target))==null?void 0:p.svg})),[w]);return((S=Wt(Ut,c))==null?void 0:S.readSvgShape)??null}const It=[];function Mt({given:w,annotations:c,scene:S,renderer:o,sceneVersion:p,drawn:M,media:A,mediaElement:g,showPlaceholder:F,canvasKey:z,openImages:E,openMedia:tt,host:et,onModel:H}){const{canvases:d,language:v,hiddenPages:nt,unlistedPages:xt,onPageVisibilityChange:rt,onAnnotationActive:ct,selectedAnnotation:ut,animateAnnotations:st=false,highlightedAnnotation:qt,onAnnotationSelect:ot,onAnnotationLink:D}=w,[_,yt]=C([]),[it,Ct]=C([]),B=nt!==void 0,J=l(()=>{var n;if(B)return It;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)&&bt(r.annotation.motivation,Ot(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:It},[B,c,d]),Ft=l(()=>{const t=J.filter(e=>!it.includes(e)&&!_.includes(e));return t.length?[..._,...t]:_},[_,it,J]),a=nt??Ft,U=xt??J,L=k(t=>U.length?t.filter(e=>!e.pageId||!U.includes(e.pageId)):t,[U]),lt=l(()=>L(c).length,[c,L]),T=k(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),N=i(rt);N.current=rt;const Q=k((t,e)=>{var n;(n=N.current)==null||n.call(N,t,e),!B&&(yt(r=>{const s=r.filter(f=>!t.includes(f));return e?s:[...s,...t]}),Ct(r=>{const s=r.filter(f=>!t.includes(f));return e?[...s,...t]:s}))},[B]),dt=l(()=>Rt(T(c),d),[c,T,d]),I=l(()=>{if(!(!S||!d))return(t,e,n)=>{const r=d.findIndex(Qt=>Qt.id===e),s=r===-1?n:r,f=S.placements[s];return f?Dt(d[s],f,t):null}},[S,d]),W=Xt(c),P=l(()=>o&&p>0&&M?kt(c,I??((t,e,n)=>o.itemRectToWorld(n,t)),W,v):[],[o,c,p,M,I,W,v]),O=l(()=>T(P),[P,T]),X=l(()=>P.length||!I?P:kt(c,I,W,v),[P,I,c,W,v]),[Ht,_t]=C(null),[Bt,gt]=C(null),u=ut!==void 0?ut:Bt,x=i(null),m=i(ct);m.current=ct;const h=i(ot);h.current=ot;const Y=k(t=>{var e;_t(t),(e=m.current)==null||e.call(m,t)},[]),Z=i(st);Z.current=st;const ft=i(false);ft.current=F;const $=i(g);$.current=g;const pt=i(o);pt.current=o;const q=i(null),at=i(a);at.current=a;const Pt=i(Q);Pt.current=Q;const V=k(t=>{var e,n,r;if(t.pageId&&at.current.includes(t.pageId)&&Pt.current([t.pageId],true),gt(t.id),(e=m.current)==null||e.call(m,t.id),(n=h.current)==null||n.call(h,t.id),!ft.current){if("start"in t){const s=$.current;if(!s)return;q.current=t.id,Jt(s,t.start);return}if(x.current=t.id,t.track){const s=$.current;s&&At(t,s)&&(q.current=t.id);return}(r=pt.current)==null||r.fitAnnotation(t.world,!Z.current)}},[]),mt=i(u);mt.current=u;const b=k(()=>{var t;return mt.current?(gt(null),x.current=null,(t=h.current)==null||t.call(h,null),true):false},[]),G=i(D);G.current=D;const ht=!!D,Lt=l(()=>ht?t=>{var e,n;(e=et.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[ht,b,et]);j(()=>{if(!u){x.current=null;return}if(x.current===u)return;const t=r=>r.find(s=>s.id===u),e=t(O),n=e??t(P);if(n){if(x.current=n.id,n.track){!e&&g&&At(n,g);return}o==null||o.fitAnnotation(n.world,!Z.current)}},[u,O,P,g,o]);const y=l(()=>A?jt(c,v):[],[A,c,v]),R=l(()=>T(y),[y,T]),wt=l(()=>L(y.length?[...X,...y]:X),[X,y,L]);j(()=>{if(!u){q.current=null;return}if(q.current===u||!g)return;const t=R.find(e=>e.id===u);t&&(q.current=t.id,g.currentTime=t.start)},[u,R,g]);const K=i(null),[St,Nt]=C(null);j(()=>{K.current=u??null},[u]),j(()=>{const t=K.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(K.current=null,!!F)){if(!A){E(true);return}tt(z),Nt(z)}},[u,c,F,A,z,E,tt]);const vt=l(()=>({menu:wt,placed:O,timed:R,hiddenPages:a,setPagesVisible:Q,listedCount:lt,comments:dt,selected:u??null,select:V,activate:Y,release:b,quietlyOpened:St}),[wt,O,R,a,Q,lt,dt,u,V,Y,b,St]);return Tt(()=>H(vt),[vt,H]),Tt(()=>()=>H(null),[H]),o&&p>0&&!F?Gt(zt,{renderer:o,placed:O,sceneVersion:p,active:Ht??qt??u,selected:u,onActivate:Y,onSelect:V,onFollow:Lt,media:A?g:void 0}):null}export{Mt as AnnotationState};
@@ -1,2 +0,0 @@
1
- import{j as z,m as Nt,n as Ct,o as O,D as lt,a as D,g as G,i as E,s as kt,r as yt,t as Lt,R as ct,y as F,u as c,w as Mt,B as rt,b as Y,E as dt,T as $,d as U,A as At,F as $t,v as ut,k as J,G as Tt,H as Ot}from"./shared-YUjOSBKO.mjs";import{E as qt}from"./EntryBodies-DXAQH0vR.mjs";import{a as Bt,r as Et}from"./link-ZRnv5NFR.mjs";import{s as Ht}from"./show-link-CyzYE1eS.mjs";import{f as Vt}from"./imageService-dsdmcegU.mjs";import{resolveThumbnail as jt}from"./thumbnail-c2K_iQsD.mjs";import{j as ft}from"./classnames-DukgfdpI.mjs";import{p as Ft}from"./time-B9GZoYcm.mjs";import{b as at,s as Pt}from"./bringIntoView-CQH5ZgMM.mjs";import{a as Q}from"./heading-Cjt0f-Eu.mjs";import{C as Rt}from"./Cue-BT2V9VAq.mjs";import{H as ht}from"./HideToggle-BwMrOBMu.mjs";import{l as zt}from"./languageCode-cCpiU0b0.mjs";import{T as Dt}from"./Tip-IO11xX4x.mjs";import{u as Gt}from"./useContainerName-BpJ3IWY0.mjs";import"./styles-CyuM_fB1.mjs";function Ut(t,e){for(const n of z(t==null?void 0:t.items))for(const o of z(n==null?void 0:n.items))if(Nt(o))for(const i of z(o==null?void 0:o.body)){if((i==null?void 0:i.type)!=="Image"||!i.width||!i.height)continue;const r=Vt(i.service);if(!r)continue;const l=Ct(z(o.target)[0]).rect??{x:0,y:0,w:t.width,h:t.height},a=(e.x-l.x)/l.w,u=(e.y-l.y)/l.h,h=Math.max(0,a),d=Math.max(0,u),v=Math.min(1,a+e.w/l.w)-h,x=Math.min(1,u+e.h/l.h)-d;if(v>0&&x>0)return{service:r,region:{x:h,y:d,width:v,height:x}}}return null}function mt(t){const e=t.bodies.filter(n=>{var o;return!n.image&&((o=n.value)==null?void 0:o.trim())}).map(n=>n.language).filter(n=>!!n&&n!=="none");return[...new Set(e)]}function gt(t){const e=t.map(mt),n=[...new Set(e.flat())];return n.length<2?[]:e.some(i=>i.length&&n.some(r=>!i.includes(r)))?n:[]}function vt(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=Object.fromEntries(t.map(i=>[i,[i]]));return O(o,e).lang??t[0]}function pt(t,e){if(!e)return true;const n=mt(t);return!n.length||n.includes(e)}function Wt(t){try{return new Intl.DisplayNames([t],{type:"language"}).of(t)??t}catch{return t}}const xn=lt(function({scope:e="all",renderEntry:n,headingLevel:o=3,as:i="div",className:r,...l},a){const{t:u,langOf:h}=D(),{clover:d,language:v}=G("Annotations"),x=E(s=>kt(s.manifest,s.addedSets)),k=E(s=>yt(s.manifest,s.canvasId)),M=E(s=>Lt(s.manifest,s.addedSets,s.hiddenSets,s.shownSets)),p=E(s=>s.annotationId),S=ct.useSyncExternalStore(d.highlight.subscribe,d.highlight.get,d.highlight.get),b=s=>{const N=Mt(x,s),w=N&&rt(N.target.t),q=d.media.get();w&&q&&k.some(H=>H.id===N.canvasId)&&Ft(q,w.start),d.selectAnnotation(s)};F(()=>{if(e==="all")return d.holdAllAnnotationPages()},[d,e]);const I=s=>s.entries.filter(N=>k.some(w=>w.id===N.canvasId)),y=x.map(s=>({set:s,entries:I(s)})).filter(({entries:s})=>s.length),C=Q(o),L={text:u("annotationsShow"),lang:h("annotationsShow")};return e==="all"?c(Xt,{ref:a,as:i,className:r,rest:l,sets:x,shown:k.map(s=>s.id),headingLevel:o,language:v,showLabel:L,hiddenSets:M,selected:p,highlighted:S,renderEntry:n,onSelect:b,onHighlight:s=>d.highlight.emit(s),onVisible:(s,N)=>s.forEach(w=>d.setSetVisible(w,N))}):y.length?c(i,{ref:a,className:ft("clover-annotations",r),...l,children:y.map(({set:s,entries:N})=>c(_t,{set:s,entries:N,canvases:k,Heading:C,headingLevel:o,language:v,title:O(s.label,v),showLabel:L,hidden:M.includes(s.id),selected:p,highlighted:S,renderEntry:n,onSelect:b,onHighlight:w=>d.highlight.emit(w),onVisible:w=>d.setSetVisible(s.id,w)},s.id))}):null});function _t({set:t,entries:e,canvases:n,Heading:o,headingLevel:i,title:r,language:l,showLabel:a,hidden:u,selected:h,highlighted:d,renderEntry:v,onSelect:x,onHighlight:k,onVisible:M}){const p=Y(),S=r.text?i+1:i,b=$(()=>gt(e),[e]),[I,y]=U(),C=vt(b,l,I),L=e.filter(s=>pt(s,C));return c("section",{className:"clover-annotations-set","aria-labelledby":r.text?`${p}-title`:void 0,"data-set":t.id,children:[c("div",{className:"clover-annotations-set-header",children:[r.text&&c(o,{className:"clover-annotations-title",id:`${p}-title`,lang:r.lang,children:r.text}),C&&c(bt,{languages:b,chosen:C,onChange:y}),c(ht,{hidden:u,onChange:s=>M(!s),of:r.text?`${p}-title`:void 0})]}),c("ol",{className:"clover-annotations-list",children:L.map((s,N)=>c(xt,{entry:s,canvas:n.find(w=>w.id===s.canvasId),index:N,headingLevel:S,language:l,showLabel:a,selected:s.id===h,highlighted:s.id===d,renderEntry:v,onSelect:x,onHighlight:k},s.id))})]})}function Kt(t,e,n){const o=new Map(e.map((r,l)=>[r.id,l])),i=new Map;for(const r of t){const l=O(r.label,n),a=l.text;let u=i.get(a);u||(u={title:l,setIds:[],byCanvas:new Map},i.set(a,u)),u.setIds.push(r.id);for(const h of r.entries){const d=u.byCanvas.get(h.canvasId)??[];d.push(h),u.byCanvas.set(h.canvasId,d)}}return[...i.entries()].map(([r,l])=>({key:r,title:l.title,setIds:l.setIds,canvases:Zt([...l.byCanvas.entries()],o).map(([a,u])=>{var h;return{canvasId:a,label:O((h=e.find(d=>d.id===a))==null?void 0:h.label,n),entries:u}})}))}function Zt(t,e){return t.every(([n])=>e.has(n))?t.sort(([n],[o])=>e.get(n)-e.get(o)):t}const it=new WeakMap;function Jt(t,e){let n=it.get(t);n||it.set(t,n=new Map);let o=n.get(e);return o||(o=Ot({id:e,type:"Manifest"},{request:t.request}).catch(()=>null),n.set(e,o)),o}function Qt(t,e){const{clover:n,language:o}=G("Annotations"),i=$(()=>{const a=new Set;for(const u of t)for(const h of u.canvases){if(e.has(h.canvasId))continue;const d=$t(h.entries[0].annotation);d&&a.add(d)}return[...a]},[t,e]),[r,l]=U([]);return F(()=>{let a=true;return Promise.all(i.map(u=>Jt(n,u))).then(u=>a&&l(u.filter(h=>!!h))),()=>{a=false}},[n,i]),$(()=>{const a=new Map;for(const u of r){const{canvases:h}=dt(u),d=O(u.label,o);for(const v of h){const x=O(v.label,o);a.set(v.id,{canvas:v,label:h.length>1&&x.text?[d,x]:[d]})}}return{named:i.length>0,of:a}},[r,i,o])}const Xt=lt(function({as:e,className:n,rest:o,sets:i,shown:r,headingLevel:l,language:a,showLabel:u,hiddenSets:h,selected:d,highlighted:v,renderEntry:x,onSelect:k,onHighlight:M,onVisible:p},S){const b=Y(),I=E(f=>dt(f.manifest).canvases),y=$(()=>Kt(i,I,a),[i,I,a]),C=$(()=>new Map(I.map(f=>[f.id,f])),[I]),L=Qt(y,C),[s,N]=U({}),w=E(f=>{var m;return(m=f.manifest)==null?void 0:m.label}),q=$(()=>O(w,a),[w,a]),H=I.length>1||L.named,P=At(null),tt=()=>{const f=P.current;if(!f||!f.getClientRects().length)return true;const m=Pt(f)??f;return m.matches(":hover")||m.contains(document.activeElement)},wt=r.join(`
2
- `);return F(()=>{const f=P.current;if(!f||!H||tt())return;const m=r.map(W=>f.querySelector(`[data-canvas="${CSS.escape(W)}"]`)).find(Boolean);if(!m)return;const T=m.closest(".clover-annotations-set"),V=(T==null?void 0:T.querySelector("[data-canvas]"))===m;at(V&&T?T:m,"start")},[wt]),F(()=>{const f=P.current;if(!f||!d||tt())return;const m=f.querySelector(`[data-entry="${CSS.escape(d)}"]`);m&&at(m,"nearest")},[d]),y.length?c(e,{ref:f=>{P.current=f,typeof S=="function"?S(f):S&&(S.current=f)},className:ft("clover-annotations",n),"data-scope":"all",...o,children:y.map((f,m)=>{const T=Q(l),V=f.title.text?l+1:l,W=Q(V),St=f.setIds.every(g=>h.includes(g)),nt=gt(f.canvases.flatMap(g=>g.entries)),_=vt(nt,a,s[f.key]);return c("section",{className:"clover-annotations-set","aria-labelledby":f.title.text?`${b}-${m}`:void 0,children:[c("div",{className:"clover-annotations-set-header",children:[f.title.text&&c(T,{className:"clover-annotations-title",id:`${b}-${m}`,lang:f.title.lang,children:f.title.text}),_&&c(bt,{languages:nt,chosen:_,onChange:g=>N(K=>({...K,[f.key]:g}))}),c(ht,{hidden:St,onChange:g=>p(f.setIds,!g),of:f.title.text?`${b}-${m}`:void 0})]}),f.canvases.map((g,K)=>{var ot;const et=g.entries.filter(A=>pt(A,_));if(!et.length)return null;const j=L.of.get(g.canvasId),B=j?j.label:L.named&&q.text?I.length>1&&g.label.text?[q,g.label]:[q]:[g.label],Z=H&&!!((ot=B[0])!=null&&ot.text),It=H&&r.includes(g.canvasId),st=`${b}-${m}-${K}`;return c("section",{className:"clover-annotations-canvas","data-canvas":g.canvasId,"aria-labelledby":Z?st:void 0,"aria-current":It?"true":void 0,children:[Z&&c(W,{className:"clover-annotations-canvas-label",id:st,lang:B.length===1?B[0].lang:void 0,children:B.length===1?B[0].text:B.map((A,R)=>c(ct.Fragment,{children:[R>0&&", ",c("span",{lang:A.lang,children:A.text})]},R))}),c("ol",{className:"clover-annotations-list",children:et.map((A,R)=>c(xt,{entry:A,canvas:C.get(g.canvasId)??(j==null?void 0:j.canvas),index:R,headingLevel:Z?V+1:V,language:a,showLabel:u,selected:A.id===d,highlighted:A.id===v,renderEntry:x,onSelect:k,onHighlight:M},A.id))})]},g.canvasId)})]},f.key)})}):null});function bt({languages:t,chosen:e,onChange:n}){const{t:o,langOf:i}=D(),r=Y(),l=Gt(o("annotationsLanguage"),i("annotationsLanguage"));return c(J,{children:[l.node,c("fieldset",{...l.props,className:"clover-annotations-languages",children:t.map(a=>{const u=Wt(a);return c("label",{className:"clover-annotations-language",children:[c("input",{type:"radio",name:`${r}-language`,checked:a===e,onChange:()=>n(a)}),c("span",{className:"clover-annotations-language-code",children:zt(a)})," ",c("span",{style:ut,lang:a,children:u}),c(Dt,{label:u,lang:a})]},a)})})]})}const X=52;function Yt(t,e){const{clover:n}=G("Annotations"),o=$(()=>{const l=t.target.rect;return!l||!e||t.bodies.some(a=>a.image)?null:Ut(e,l)},[t,e]),[i,r]=U();return F(()=>{if(r(void 0),!o)return;let l=true;return jt(o,X,n.request).then(a=>l&&r(a)),()=>{l=false}},[o,n]),i}function xt({entry:t,canvas:e,index:n,headingLevel:o,language:i,showLabel:r,selected:l,highlighted:a,renderEntry:u,onSelect:h,onHighlight:d}){const{hostLanguage:v,t:x,langOf:k}=D(),M=nn(t,i),p=M.text?M:{text:String(n+1)},S=rt(t.target.t),b=S?{text:x("annotationsShowTime"),lang:k("annotationsShowTime")}:r,I=!b.lang&&!Tt(p.lang,v),y=p.text?`${b.text}: ${p.text}`:b.text,C=Yt(t,e);return c("li",{className:"clover-annotations-entry","data-entry":t.id,"data-selected":l,"data-highlighted":a,onMouseEnter:()=>d(t.id),onMouseLeave:()=>d(null),onFocus:()=>d(t.id),onBlur:()=>d(null),onClick:L=>{L.target.closest("a, button")||h(t.id)},children:[S&&c(Rt,{start:S.start,className:"clover-annotations-time"}),C&&c("img",{className:"clover-annotations-thumbnail",src:C,alt:"",width:X/2,height:X/2,loading:"lazy",decoding:"async"}),c("div",{className:"clover-annotations-body clover-cue-text",children:[u?u(t):c(qt,{bodies:t.bodies,language:i,headingLevel:o}),c(tn,{annotation:t.annotation})]}),c("button",{type:"button",className:"clover-annotations-show","aria-pressed":l,"aria-label":I?y:void 0,style:ut,onClick:()=>h(t.id),children:!I&&c(J,{children:[c("span",{lang:b.lang,children:[b.text,p.text&&":"]}),p.text&&c(J,{children:[" ",c("span",{lang:p.lang,children:p.text})]})]})})]})}function tn({annotation:t}){const{clover:e}=G("Annotations"),{t:n,langOf:o}=D(),i=$(()=>Et(t),[t]);if(!i)return null;const r=n("annotationsOpenLink"),l=o("annotationsOpenLink");return!i.canvasId&&!i.manifestId?c("a",{className:"clover-annotations-link",href:i.id,target:"_blank",rel:"noopener noreferrer",lang:l,children:r}):c("button",{type:"button",className:"clover-annotations-link",lang:l,onClick:a=>{var h;const u=a.currentTarget.closest(".clover-root");Ht(e,i)&&((h=u==null?void 0:u.querySelector(".clover-canvas-viewport"))==null||h.focus({preventScroll:true}))},children:r})}function nn(t,e){const{text:n="",lang:o}=Bt(t.bodies,e);return{text:n.slice(0,120),...o?{lang:o}:{}}}export{xn as Annotations};
@@ -1 +0,0 @@
1
- var Y=Object.defineProperty;var J=(t,o,e)=>o in t?Y(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var L=(t,o,e)=>J(t,typeof o!="symbol"?o+"":o,e);import{n as N,al as Q,a3 as _,B as D,T as tt,A as F,y as j,q as S,_ as ot,$ as et,u as C,k as nt,am as st,o as it,d as W,R as rt}from"./shared-YUjOSBKO.mjs";import{r as at,a as ct}from"./link-ZRnv5NFR.mjs";import{T as lt}from"./Tip-IO11xX4x.mjs";import{b as ht}from"./Camera-cdCqKMup.mjs";import"./styles-CyuM_fB1.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):Q.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ut=t=>K(t).map(o=>N(o)),dt=(t,o)=>Math.abs(t.end-o.start)<.001,B=(t,o,e)=>t+(o-t)*e;function pt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const s=o[n+1];return e.end===1/0&&s?{...e,end:s.start}:e})}function U(t,o){let e=0,n=t.length-1,s=-1;for(;e<=n;){const l=e+n>>1;t[l].start<=o?(s=l,e=l+1):n=l-1}const r=t[s];if(!r||o>=r.end)return null;const c=t[s+1];if(!c||!dt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[u,h]=[r.world,c.world];return{x:B(u.x,h.x,a),y:B(u.y,h.y,a),width:B(u.width,h.width,a),height:B(u.height,h.height,a)}}const Z=t=>t.overlays??(t.overlays=new ft(t.host));class ft{constructor(o){L(this,"container");L(this,"overlays",new Map);L(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 s=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=u=>c?Math.round(u*c)/c:u;for(const[u,h]of this.overlays){if(n&&u!==n)continue;const l=ht(o,e,{x:h.x+h.width/2,y:h.y+h.height/2}),v=a(l.x-h.width*o.zoom/2),g=a(l.y-h.height*o.zoom/2),p=a(h.width*o.zoom),m=a(h.height*o.zoom);u.style.width=`${p}px`,u.style.height=`${m}px`,u.style.transform=`translate(${v}px, ${g}px)`+(s?` rotate(${s}deg)`:"");const{style:w,dataset:$}=u;if(r){w.setProperty("--clover-overlay-x",`${l.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+m}px`);const k=l.y>e.height/2?"above":"below";$.overlayRoom!==k&&($.overlayRoom=k)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete $.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const gt=t=>"start"in t,Ft=t=>{var o,e;return gt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},vt=(t,o)=>!t.track||U(t.track,o)!==null;function wt(t,o){return vt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function mt(t,o,e){var r,c,a;const n=ut(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const s=[];for(const u of n){const h=D((a=u.t)==null?void 0:a.replace(/^npt:/,""));if(!u.rect||!h)continue;const{x:l,y:v,w:g,h:p}=u.rect,m=o({x:l,y:v,width:g,height:p},u.id,e);m&&s.push({start:h.start,end:h.end??1/0,world:m})}return s.length?pt(s):null}function G(t,o){const{text:e,lang:n}=it(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function Lt(t,o){var n;const e=[];for(const{annotation:s,pageLabel:r,pageId:c}of t){const a=N([s==null?void 0:s.target].flat()[0]),u=D((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!u||a.rect||a.point||a.svg)continue;const{text:h,lang:l}=X(s,o);e.push({id:s.id,...h?{label:h}:{},...l?{lang:l}:{},...u,...G(r,o),...c?{pageId:c}:{}})}return e}const H=40;function Bt(t,o,e=null,n){var r;const s=[];for(const{annotation:c,targetIndex:a,pageLabel:u,pageId:h}of t){const l=N(c==null?void 0:c.target);if(!l)continue;let v=null,g;const p=mt(c,o,a);if(p){const{x:f,y:i,w:d,h:x}=l.rect;v={x:f,y:i,width:d,height:x}}else if(l.rect){const{x:f,y:i,w:d,h:x}=l.rect;v={x:f,y:i,width:d,height:x}}else if(l.point){const{x:f,y:i}=l.point;v={x:f-H/2,y:i-H/2,width:H,height:H},g={kind:"point"}}else if(l.svg&&e){const f=e(l.svg);f&&(v=f.box,g={kind:"svg",svg:f})}if(!v)continue;const m=p?p[0].world:o(v,l.id,a);if(!m)continue;const{text:w,lang:$}=X(c,n),k=at(c),O=(r=_(c).find(f=>(f==null?void 0:f.type)==="Image"&&/^https?:\/\//i.test(f.id??"")))==null?void 0:r.id;s.push({id:c.id,label:w,...$?{lang:$}:{},world:m,...g?{shape:g}:{},...p?{track:p}:{},...k?{link:k}:{},...O?{image:O}:{},...G(u,n),...h?{pageId:h}:{}})}return s}const z=({world:t})=>t.width*t.height,xt=(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 $t(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[s,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],u=`${y(-s/10)} ${y(-r/10)} ${y(s*1.2)} ${y(r*1.2)}`,h=`M${y(-s/10)} ${y(-r/10)}h${y(s*1.2)}v${y(r*1.2)}h${y(-s*1.2)}Z`;let l;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:m,shapes:w}=o.shape.svg,$=w.map(({tag:k,attributes:O})=>`<${k} ${Object.entries(O).map(([f,i])=>`${f}="${i}"`).join(" ")}/>`).join("");l=`<mask id="m"><path fill="#fff" d="${h}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${m.x} ${m.y} ${Math.max(m.width,1)} ${Math.max(m.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${$}</g></svg></mask><path d="${h}" mask="url(#m)"/>`}else l=`<path fill-rule="evenodd" d="${h}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${u}" preserveAspectRatio="none">${l}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(v)}")`}const Ht=({renderer:t,placed:o,sceneVersion:e,active:n,selected:s,onActivate:r,onSelect:c,onFollow:a,media:u})=>{const h=tt(()=>{const i=new Map;return[...o].sort((d,x)=>z(x)-z(d)).forEach((d,x)=>i.set(d,x)),i},[o]),l=o.find(i=>i.id===n),v=F(null);j(()=>{const i=o.find(d=>d.id===s&&d.track);s||(v.current=null),!(!i||!u||v.current===s)&&(v.current=s,wt(i,u))},[o,s,u]);const g=i=>{const d=h.get(i)??0;return l?i===l?o.length:d>(h.get(l)??0)&&!i.track&&!l.track&&xt(i.world,l.world)?o.length+1+d:d:d},p=F(new Map),m=F(new Map),w=F(new WeakMap),$=F({placed:o,current:l,depthOf:g});$.current={placed:o,current:l,depthOf:g};const k=S(i=>{const{placed:d,current:x,depthOf:P}=$.current,R=T=>m.current.get(T.id),E=x&&R(x)!==null?x:void 0,M=T=>{const A=p.current.get(T.id);if(!A)return;const b=R(T),I=E&&T!==E&&b!==null&&P(T)<d.length?$t({...T,world:b??T.world},{...E,world:R(E)??E.world}):null;(w.current.get(A)??"")!==(I??"")&&(w.current.set(A,I??""),I?A.style.setProperty("--clover-annotation-mask",I):A.style.removeProperty("--clover-annotation-mask"))};i&&i!==x?M(i):d.forEach(M)},[]);ot(()=>k());const O=S((i,d)=>{d?p.current.set(i,d):p.current.delete(i)},[]),f=S((i,d)=>{m.current.set(i.id,d),k(i)},[k]);return et(C(nt,{children:o.map((i,d)=>C(kt,{entry:i,name:i.label??String(d+1),lang:i.label?i.lang:void 0,depth:g(i),register:O,onMove:f,renderer:t,active:n===i.id,selected:s===i.id,onActivate:r,onSelect:c,onFollow:a,media:u},`${i.id}|${e}`))}),Z(t).container)};let yt;const V=()=>yt??(yt=import("./panClearOfControls-ac9uf-Qs.mjs")),kt=({entry:t,name:o,lang:e,depth:n,register:s,onMove:r,renderer:c,active:a,selected:u,onActivate:h,onSelect:l,onFollow:v,media:g})=>{var M,T,A;const[p,m]=W(null),{id:w}=t,$=S(b=>{m(b),s(w,b)},[w,s]),{x:k,y:O,width:f,height:i}=t.world;j(()=>{if(!p)return;const b=Z(c).add(p,{x:k,y:O,width:f,height:i});return c.invalidate(),b},[p,c,k,O,f,i]);const d=bt(p,t.track,c,g,()=>h(null),b=>r(t,b)),{link:x}=t,P=x&&!x.canvasId&&!x.manifestId?x.id:void 0,R=x&&!P&&v?()=>v(t):void 0;return C(P?"a":"button",{ref:$,...P?{href:P,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!d,"data-active":a?"true":"false","data-shape":((M=t.shape)==null?void 0:M.kind)??"rect","data-track":t.track?"":void 0,"data-link":P||R?"true":void 0,"aria-label":o,"aria-current":u?"true":void 0,lang:e,style:{"--clover-annotation-depth":n},onMouseEnter:()=>h(t.id),onMouseLeave:()=>h(null),onFocus:()=>{h(t.id),V()},onKeyUp:b=>{if(b.key!=="Tab")return;const I=b.currentTarget;V().then(({panClearOfControls:q})=>{document.activeElement===I&&q(c,I)})},onBlur:()=>h(null),onKeyDown:Et,onClick:b=>{b.stopPropagation(),!P&&(R?R():l(t))},children:[((T=t.shape)==null?void 0:T.kind)==="point"&&C("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((A=t.shape)==null?void 0:A.kind)==="svg"&&C(Mt,{svg:t.shape.svg}),C(lt,{label:o,scrolls:true,image:t.image})]})};function bt(t,o,e,n,s,r){const c=!!o&&n!==void 0,[a,u]=W(()=>!c||(n?U(o,n.currentTime)!==null:false)),h=F(s);h.current=s;const l=F(r);return l.current=r,j(()=>{if(!o||n===void 0){u(true);return}if(!n){u(false);return}let v;const g=E=>{var A,b,I;const M=U(o,E);M&&t&&((A=e.overlays)==null||A.move(t,M)),l.current(M);const T=M!==null;if(T!==v){if(v=T,!T&&t){const q=t.matches(":hover");t.contains(document.activeElement)?(I=(b=e.overlays)==null?void 0:b.container.parentElement)==null||I.focus({preventScroll:true}):q&&h.current()}u(T)}},p=n,m=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,$=0;const k=(E,{mediaTime:M})=>{g(M),$=p.requestVideoFrameCallback(k)},O=()=>{g(n.currentTime),w=requestAnimationFrame(O)},f=()=>{cancelAnimationFrame(w),$&&p.cancelVideoFrameCallback($),w=$=0},i=()=>{f(),m()?$=p.requestVideoFrameCallback(k):w=requestAnimationFrame(O)},d=()=>g(n.currentTime),x=()=>n.paused&&d(),P=()=>{f(),d()},R=[["play",i],["pause",P],["ended",P],["seeking",d],["seeked",d],["loadeddata",d],["timeupdate",x]];return R.forEach(([E,M])=>n.addEventListener(E,M)),d(),n.paused||i(),()=>{f(),R.forEach(([E,M])=>n.removeEventListener(E,M))}},[t,o,n,e]),a}const Mt=({svg:t})=>{const{x:o,y:e,width:n,height:s}=t.box,r=t.shapes.map(({tag:c,attributes:a},u)=>rt.createElement(c,{key:u,...a,vectorEffect:"non-scaling-stroke"}));return C("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(s,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[C("g",{children:r}),C("g",{children:r}),C("g",{children:r})]})};function X(t,o){return ct(st(t),o)}const Tt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function Et(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Tt[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 St(t,o){const e=new Map;for(const{annotation:n,targetIndex:s}of t??[]){const r=N([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!_(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[s]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Ht as A,wt as g,Bt as p,Ft as s,Lt as t,St as w};
@@ -1 +0,0 @@
1
- import{g as b,T as g,p as h,h as S,i as k,u as e,P as u,z as p}from"./shared-YUjOSBKO.mjs";import B from"./Connected-DCBI-j9H.mjs";import{r as T}from"./rendererSurface-DhIlOjGT.mjs";import{j as L}from"./classnames-DukgfdpI.mjs";import{u as j}from"./hooks-BXzQSllm.mjs";import{L as c}from"./Loading-CBKfwsML.mjs";const R=p(()=>import("./Connected-BxqaRL9o.mjs")),w=p(()=>import("./Connected-DkhfVWxd.mjs"));function A({className:v,style:f,renderers:y,children:r,...s}){var d;const C=b("Body"),o=j(),l=g(()=>h(o),[o]),t=S(y??C.renderers,{canvases:o,bodies:l}),a=t==null?void 0:t.component,i=((d=o.find(({type:n})=>n==="Scene"||n==="Timeline"))==null?void 0:d.type)??"Canvas",m=k(n=>n.status==="loading");return e("div",{"aria-busy":m,className:L("clover-body",v),"data-renderer":a?"custom":i.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...f},children:[a?e(a,{canvases:o,bodies:l,children:r}):i==="Scene"?e(u,{fallback:e(c,{overlay:true}),children:e(w,{...s,children:r})}):i==="Timeline"?e(u,{fallback:e(c,{overlay:true}),children:e(R,{...s,children:r})}):e(B,{...s,surface:T,children:r}),m&&e(c,{overlay:true})]})}export{A as B};
@@ -1 +0,0 @@
1
- import{a as o,u as r}from"./shared-YUjOSBKO.mjs";import{j as l}from"./classnames-DukgfdpI.mjs";function c({error:a,className:s}){const{t,langOf:e}=o();return r("div",{className:l("clover-status",s),"data-status":"error",role:"alert",children:[r("p",{lang:e("statusError"),children:t("statusError")}),r("p",{className:"clover-status-detail",lang:"en",children:a.message})]})}export{c as B};
@@ -1 +0,0 @@
1
- import{u as a}from"./shared-YUjOSBKO.mjs";import{j as d}from"./classnames-DukgfdpI.mjs";import{T as u}from"./Tip-IO11xX4x.mjs";import"./styles-CyuM_fB1.mjs";const f=({className:n,id:e,label:o,children:r,onClick:s,expanded:i,controls:p,shortcut:t,lang:l})=>{const c=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return a("button",{id:e,className:d("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":c,onClick:s,"aria-expanded":i,"aria-controls":p,"aria-label":o,"aria-keyshortcuts":t==null?void 0:t.keys,lang:l,type:"button",children:[a("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}),a(u,{label:o,shortcut:t})]})};export{f as B};
@@ -1 +0,0 @@
1
- import{a as Je,d as v,q as ae,o as he,c as Ye,u as l,k as Lt,y as Le,A as S,M as on,b as an,T as j,a2 as sn,R as Ot,_ as ln,v as rn,P as wt,z as Tt,N as cn}from"./shared-YUjOSBKO.mjs";import{u as dn,C as un,Z as hn,d as gn,t as fn,e as mn,f as pn,R as Mt,g as yn,h as vn,E as xn,j as Cn,k as bn,l as In,m as kn,n as On,o as wn}from"./ErrorBoundary-chQaO-Up.mjs";import{a as Mn,I as Sn,P as Rn,C as Bn,O as En,b as Pn}from"./glyphs-drROkef9.mjs";import{B as Ue}from"./Button-uWgfvqsL.mjs";import{S as R,f as Ln}from"./Tip-IO11xX4x.mjs";import{S as Tn,f as $n,b as St,d as zn,p as An,e as Rt,g as Fn,h as Nn}from"./layout-mMHI0lsj.mjs";import"./styles-CyuM_fB1.mjs";import{u as Kn}from"./useNearViewport-CtLyYg9n.mjs";import{L as Dn}from"./Loading-CBKfwsML.mjs";import{j as Vn}from"./classnames-DukgfdpI.mjs";import{u as Zn}from"./useContainerName-BpJ3IWY0.mjs";import{f as jn}from"./imageService-dsdmcegU.mjs";const _n=()=>import("./AnnotationMenu-EBjIQpQl.mjs"),qn=()=>import("./ChoiceMenu-DCp7-co7.mjs"),Bt=2,Hn=({renderer:e,instance:n,config:s,controlButtons:t,hasPlaceholder:i,choices:a=[],selections:u={},onSelect:h,annotations:B=[],hiddenPages:A,onPageVisibilityChange:f,selectedAnnotation:x=null,onAnnotationSelect:T,onAnnotationActivate:c,captionId:b,captionOpen:p=false,onCaptionToggle:V,language:E,children:ge})=>{var z,ee;const{t:k,langOf:w}=Je(),[fe,me]=v(false),[se,pe]=v(false),_=`annotations-${n}`,ye=`${_}-menu`,le=k("informationPanelTabsAnnotations"),ie=w("informationPanelTabsAnnotations"),re=ae(O=>{var g;pe(false),c==null||c(null),O&&((g=document.getElementById(_))==null||g.focus())},[_,c]),F=s.annotations&&B.length>0&&T,ce=s.information&&b&&V,q=`choice-${n}`,P=a.length===1?he(a[0].label,E):null,N=(P==null?void 0:P.text)||k("canvasChoice"),ve=P!=null&&P.text?P.lang:w("canvasChoice"),H=`${q}-menu`,xe=(z=Ye(_n,!!F))==null?void 0:z.default,$=(ee=Ye(qn,a.length>0&&!!h))==null?void 0:ee.default,Q=ae(O=>{var g;me(false),O&&((g=document.getElementById(q))==null||g.focus())},[q]),W=dn();return l(Lt,{children:[l(un,{controls:O=>{const g=[],M=e;return s.zoom&&M&&g.push({key:"zoomIn",id:`zoomIn-${n}`,shortcut:R.zoomIn,label:k("imageZoomIn"),lang:w("imageZoomIn"),glyph:l(hn,{}),onClick:()=>M.zoomBy(Bt)},{key:"zoomOut",id:`zoomOut-${n}`,shortcut:R.zoomOut,label:k("imageZoomOut"),lang:w("imageZoomOut"),glyph:l(gn,{}),onClick:()=>M.zoomBy(1/Bt)}),s.fullPage&&W&&g.push({key:"fullPage",id:`fullPage-${n}`,label:k(O?"imageExitFullScreen":"imageFullScreen"),lang:w(O?"imageExitFullScreen":"imageFullScreen"),glyph:O?l(mn,{}):l(pn,{}),onClick:K=>void fn(K.currentTarget)}),s.rotation&&M&&g.push({key:"rotateRight",id:`rotateRight-${n}`,shortcut:R.rotateRight,label:k("imageRotateRight"),lang:w("imageRotateRight"),glyph:l(Mt,{}),onClick:()=>M.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${n}`,shortcut:R.rotateLeft,label:k("imageRotateLeft"),lang:w("imageRotateLeft"),glyph:l(Mt,{}),onClick:()=>M.rotateBy(-90)}),s.reset&&M&&g.push({key:"reset",id:`reset-${n}`,shortcut:R.reset,label:k("imageResetZoom"),lang:w("imageResetZoom"),glyph:l(yn,{}),onClick:()=>M.home()}),a.length&&g.push({key:"choice",id:q,label:N,lang:ve,glyph:l(vn,{}),onClick:()=>me(K=>!K),expanded:fe,controls:H}),g},controlButtons:t,hasPlaceholder:i,children:[F&&l(Ue,{id:_,label:le,lang:ie,onClick:()=>pe(O=>!O),expanded:se,controls:ye,children:l(Mn,{})}),ce&&l(Ue,{id:`information-${n}`,label:k("informationPanelTabsAbout"),lang:w("informationPanelTabsAbout"),onClick:V,expanded:p,controls:b,children:l(Sn,{})}),ge]}),xe&&se&&F&&l(xe,{id:ye,triggerId:_,label:le,labelLang:ie,annotations:B,hiddenPages:A,onPageVisibilityChange:f,selected:x,onSelect:T,onActivate:O=>c==null?void 0:c(O),onClose:re}),$&&fe&&a.length>0&&h&&l($,{id:H,triggerId:q,label:N,labelLang:ve,language:E,choices:a,selections:u,onSelect:h,onClose:Q})]})};function Wn(e,n){const[s,t]=v(e.src),i=e.src??e.service??e.fallback;return Le(()=>{if(e.src)return t(e.src);let a=true;return import("./thumbnail-c2K_iQsD.mjs").then(({resolveThumbnail:u})=>u(e,Tn,n)).then(u=>a&&t(u)),()=>{a=false}},[i]),s}function Yn({still:e,request:n,style:s}){const t=Wn(e.source,n);return t?l("img",{alt:e.alt,lang:e.alt?e.lang:void 0,src:t,style:s}):l("span",{style:s})}const Un=({instance:e,stills:n,vertical:s,media:t,active:i,lingering:a,onToggle:u,request:h})=>{const{t:B,langOf:A}=Je(),f=t?i?"playerPlay":"playerClose":i?"imageViewerOpen":"imageViewerClose",x=n.map(({width:b,height:p})=>s?p/b:b/p),T=x.reduce((b,p)=>b+p,0),c=s?1/T:T;return l(Lt,{children:[l(Ue,{className:"clover-canvas-placeholder-toggle",id:`placeholder-${e}`,label:B(f),lang:A(f),onClick:u,children:t?i?l(Rn,{}):l(Bn,{}):i?l(En,{}):l(Pn,{})}),(i||a)&&l("div",{"aria-hidden":i?void 0:true,className:"clover-canvas-placeholder","data-lingering":!i,"data-media":t,"data-testid":"clover-canvas-placeholder","data-vertical":s,onClick:i?u:void 0,children:l("div",{className:"clover-canvas-placeholder-frame",style:{"--ratio":c},children:n.map((b,p)=>l(Yn,{still:b,request:h,style:{[s?"height":"width"]:`${x[p]/T*100}%`}},p))})})]})},Jn=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function wo(e,n){return{a:1,b:0,c:0,d:1,e,f:n}}function Mo(e,n=e){return{a:e,b:0,c:0,d:n,e:0,f:0}}function So(e){const n=Math.cos(e),s=Math.sin(e);return{a:n,b:s,c:-s,d:n,e:0,f:0}}function Xn(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 Ro(...e){return e.reduce((n,s)=>Xn(n,s),Jn)}function Pe(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 Bo(e){return`matrix(${[e.a,e.b,e.c,e.d,e.e,e.f].map(Gn).join(",")})`}function Eo(e,n,s,t=new Float32Array(9)){const i=2/n,a=-2/s;return t[0]=e.a*i,t[1]=e.b*a,t[2]=0,t[3]=e.c*i,t[4]=e.d*a,t[5]=0,t[6]=e.e*i-1,t[7]=e.f*a+1,t[8]=1,t}function Gn(e){const n=Math.round(e*1e6)/1e6;return Object.is(n,-0)?"0":String(n)}function Po(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Qn(e){if(!e.length)return null;let n=1/0,s=1/0,t=-1/0,i=-1/0;for(const a of e)n=Math.min(n,a.x),s=Math.min(s,a.y),t=Math.max(t,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:n,y:s,width:t-n,height:i-s}}function Lo(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 To(e,n){const s=[Pe(e,{x:n.x,y:n.y}),Pe(e,{x:n.x+n.width,y:n.y}),Pe(e,{x:n.x,y:n.y+n.height}),Pe(e,{x:n.x+n.width,y:n.y+n.height})],t=s.map(h=>h.x),i=s.map(h=>h.y),a=Math.min(...t),u=Math.min(...i);return{x:a,y:u,width:Math.max(...t)-a,height:Math.max(...i)-u}}function $o(e,n,s){return Math.min(Math.max(e,n),s)}const Et=e=>!!(e&&"overlays"in e),eo=Tt(()=>import("./MediaBody-B_Gii4we.mjs")),to=()=>import("./AnnotationState-DQTaO6Gz.mjs"),no=new Map,oo={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:no,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},ao=Tt(()=>import("./FrameAnimation-Bb0pOoRl.mjs")),Pt={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true},so={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",R.zoomIn.keys,R.zoomOut.keys,R.reset.keys,R.rotateRight.keys,R.rotateLeft.keys].join(" ")},lo={description:"canvasKeysMedia",keys:[R.play.keys,"J L",R.mute.keys].join(" ")},io={description:"canvasKeysAnnotations",keys:"Escape"},zo=e=>{var s;return!!((s=e.canvases)!=null&&s.length)||$t(e.body,e.src).length>0?l(xn,{children:l(ro,{...e})}):null},ro=e=>{var pt,yt,vt,xt,Ct;const{surface:n,manifestId:s,canvases:t,viewingDirection:i,body:a,src:u,isTiledImage:h=false,label:B,partOf:A,language:f,instanceId:x,className:T,options:c,navigator:b=false,controls:p=true,controlButtons:V,annotations:E,onReady:ge,onViewportChange:k,onMediaElement:w,onCaptionChange:fe,caption:me,onEnded:se,chapters:pe,highlightedChapter:_,onChapterHighlight:ye,placeholder:le=true,children:ie}=e,{t:re}=Je(),F=S(null),[ce,q]=v(null),P=Cn(ce),N=on(q),ve=bn(ce,c==null?void 0:c.hideDelay,F),H=Kn(ce),xe=an(),[$]=v(()=>x??`clover-canvas-${xe}`),Q=S(null),[W,Te]=v(null),z=Et(W)?W:null,[ee,O]=v(null),g=p===false?null:p===true?Pt:{...Pt,...p},[M,K]=v("loading"),[Xe,Ge]=v(0),Ce=S(ge),be=S(k),Qe=S(c);Ce.current=ge,be.current=k,Qe.current=c;const Y=sn(i),et=j(()=>$n(t??[]),[t]),[$e,zt]=v({}),At=(o,r)=>zt(C=>({...C,[o]:r})),tt=!!(g!=null&&g.information),de=!!(E!=null&&E.length),nt=Ye(to,de),[Ft,Nt]=v(null),L=de&&Ft||oo,Ie=S(L);Ie.current=L;const ke=ae(()=>Ie.current.release(),[]),{comments:ze,listedCount:ot}=L,te=j(()=>tt?(t??[]).filter(o=>In(o)||ze.has(o.id)):[],[t,tt,ze]),Ae=`caption-${$}`,[Kt,at]=v(false),Fe=Kt&&te.length>0,st=ae(o=>{var r;at(false),o&&((r=document.getElementById(`information-${$}`))==null||r.focus())},[$]),Z=j(()=>(t??[]).find(o=>St(o).length)??null,[t]),Dt=Z?St(Z):uo,I=j(()=>t!=null&&t.length?zn(t,Y,$e,{standIns:t.length>1}):null,[t,Y,$e]),Vt=j(()=>$t(a,u,h),[a,u,h]),d=(I==null?void 0:I.media[0])??null,[ue,Zt]=v(null),Oe=S(w);Oe.current=w;const jt=ae(o=>{var r;Zt(o),(r=Oe.current)==null||r.call(Oe,o)},[]),U=I?I.images:Vt,J=!!d&&(t==null?void 0:t.length)===1,X=J&&(d==null?void 0:d.kind)==="audio",we=!J&&((pt=c==null?void 0:c.gestures)==null?void 0:pt.navigable)!==false,D=(t==null?void 0:t.map(o=>o.id).join("|"))??null,ne=j(()=>{if(!t||!le)return[];const o=t.flatMap(r=>{const C=An(r),Be=he(r.label,f);return C?[{...C,alt:Be.text,lang:Be.lang}]:[]});return Y==="right-to-left"||Y==="bottom-to-top"?o.reverse():o},[t,Y,le,f]),[_t,lt]=v(false),[qt,it]=v(null),m=!X&&ne.length>0&&(d?qt!==D:!_t),rt=(o,{annotations:r=false}={})=>({...o,zoom:false,rotation:false,reset:false,fullPage:false,annotations:r&&o.annotations}),ct=Ot.Children.count(ie)>0,Me=g?m?te.length||ct||ot?rt(g,{annotations:true}):null:J?et.length||te.length||ct||ot?rt(g,{annotations:true}):null:g:null,Ne=b&&!m&&(d?d.kind==="audio"&&!J&&U.length>0:true),[Ke,Ht]=v(null),oe=d?Ke??d.placement:null,De=j(()=>(d==null?void 0:d.kind)==="video"&&ue&&oe?[...U,{id:d.id,placement:oe,width:oe.width,height:oe.height,media:{element:ue}}]:U,[U,d,ue,oe]),dt=J&&(d==null?void 0:d.kind)==="video"&&Ke?Ke:I?Qn(I.placements):null,Wt=JSON.stringify([U,dt,De.length!==U.length&&[d==null?void 0:d.id,oe]]),Se=S(null),Ve=S(false),Yt=()=>{d?it(m?D:null):lt(m),m||ke()},Ze=Array.isArray(a)?a[0]:a,y=[B,(yt=t==null?void 0:t[0])==null?void 0:yt.label,Ze==null?void 0:Ze.label].map(o=>he(o,f)).find(o=>o.text),Ut=j(()=>{const o=he(A,f);return o.text&&o.text!==(y==null?void 0:y.text)?o:void 0},[A,f,y==null?void 0:y.text]),ut=Zn((y==null?void 0:y.text)||re("canvasImage"),y?y.lang:N.langOf("canvasImage"),false,N.hostLanguage),Re=m?[]:[...we?[so]:[],...d?[lo]:[],...de?[io]:[]],ht=`keys-${$}`,Jt=we&&!m&&!N.langOf("canvasRoleDescription")?re("canvasRoleDescription"):void 0,je=!!Me&&te.length>0,Xt=je&&te.map((o,r)=>he(o.label,f).text?kn(Ae,r):null).filter(Boolean).join(" ")||void 0,gt=S({canvases:t,scene:I,canvasKey:D});gt.current={canvases:t,scene:I,canvasKey:D};const _e=S(null),qe=ae(()=>{const{canvases:o,scene:r,canvasKey:C}=gt.current;_e.current=o&&r&&Se.current===C?{key:C,canvases:o,placements:r.placements}:null},[]),Gt=!t||((vt=_e.current)==null?void 0:vt.key)===D;Le(()=>{const o=F.current;if(!o)return;const r=n(o,Qe.current),C=Et(r)?r:null;Q.current=r,Te(r),r.setDismiss(ke);const Be=r.on("open",()=>{var G;He(false),qe(),K("ready"),Ge(Ee=>Ee+1),C&&((G=Ce.current)==null||G.call(Ce,co(C,()=>_e.current,Ee=>{var It,kt;const bt=Ie.current.placed.find(We=>We.id===Ee);return bt?(Ie.current.select(bt),(kt=Array.from(((It=C.overlays)==null?void 0:It.container.querySelectorAll("[id]"))??[]).find(We=>We.id===Ee))==null||kt.focus({preventScroll:true}),true):false})))}),en=r.on("change",()=>{He(false),qe(),K("ready"),Ge(G=>G+1)}),tn=r.on("error",()=>{r.isOpen||K("error")}),nn=r.on("viewport",()=>{var G;C&&((G=be.current)==null||G.call(be,C.getBounds()))});return()=>{Be(),en(),tn(),nn(),r.dispose(),Q.current=null,Te(null)}},[x,n,ke,qe]),Le(()=>{if(!(!z||!ee))return z.attachNavigator(ee)},[z,ee]),Le(()=>{const o=Q.current;if(m&&(Ve.current=true),!o||!H||m)return;const r=Se.current!==null&&Se.current!==D;(!o.isOpen||r)&&K("loading");const C=J||Ve.current&&o.isOpen||r;Se.current=D,Ve.current=false,o.setImages(De,{world:dt??void 0,fit:C})},[Wt,x,ue,H,m]);const ft=S(s),[Qt,He]=v(false);ln(()=>{var o;s!==ft.current&&(ft.current=s,(o=Q.current)==null||o.clear(),He(true),K("loading"))},[s]);const mt=M==="loading"&&De.length>0&&H&&!m;return l(cn.Provider,{value:N.hostLanguage,children:l("figure",{"aria-labelledby":Xt,className:Vn("clover-canvas",T),"data-testid":"clover-canvas","data-status":M,"data-has-navigator":Ne,"data-fullscreen":P,"data-controls":ve?"visible":"hidden","data-media":d==null?void 0:d.kind,"data-player":X?"":void 0,"data-animated":Z?"":void 0,"data-navigable":we,"data-placeholder":ne.length&&!X?m:void 0,ref:N.ref,onKeyDown:o=>{if(o.key==="Escape"&&Fe&&!o.defaultPrevented){o.preventDefault(),st(false);return}if(o.key==="Escape"&&!o.defaultPrevented&&!o.currentTarget.querySelector(".clover-canvas-menu")&&ke()){o.preventDefault();return}Ln(o,F.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(Me||Ne)&&l("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),l(On,{hidden:!P}),W&&Me&&l(Hn,{renderer:z,instance:$,config:Me,controlButtons:V,hasPlaceholder:ne.length>0,choices:m?[]:et,selections:$e,onSelect:At,annotations:L.menu,hiddenPages:L.hiddenPages,onPageVisibilityChange:L.setPagesVisible,selectedAnnotation:L.selected,onAnnotationSelect:L.select,onAnnotationActivate:L.activate,captionId:je?Ae:void 0,captionOpen:Fe,onCaptionToggle:()=>at(o=>!o),language:f,children:ie}),Ne&&l("div",{ref:O,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),l("div",{ref:F,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:de?"group":"img","aria-roledescription":Jt,...ut.props,"aria-describedby":Re.length?ht:void 0,"aria-keyshortcuts":Re.map(({keys:o})=>o).join(" ")||void 0,"aria-busy":mt,tabIndex:0}),ut.node,Re.length>0&&l("span",{id:ht,style:rn,children:Re.map(({description:o},r)=>l(Ot.Fragment,{children:[r>0&&" ",l("span",{lang:N.langOf(o),children:re(o)})]},o))}),(d==null?void 0:d.kind)==="audio"&&!X&&U.length===0&&!m&&(y==null?void 0:y.text)&&l("p",{className:"clover-canvas-sound-label","aria-hidden":"true",lang:y.lang||void 0,children:y.text}),ne.length>0&&!X&&l(Un,{instance:$,stills:ne,vertical:Y==="top-to-bottom"||Y==="bottom-to-top",media:!!d,active:m,lingering:M==="loading"&&!Qt,onToggle:Yt,request:c==null?void 0:c.request}),W&&d&&H&&!m&&l(wt,{fallback:null,children:l(eo,{media:d,request:c==null?void 0:c.request,surface:W,instance:$,onElement:jt,onFit:Ht,onCaptionChange:fe,caption:me,navigable:we,fullscreen:J&&!!(g!=null&&g.fullPage),isFullscreen:P,onEnded:se,chapters:pe,highlightedChapter:_,onChapterHighlight:ye,autoPlay:!X&&ne.length>0&&L.quietlyOpened!==D,language:f,notes:L.timed,player:X&&t?{canvas:t[0],title:y,partOf:Ut}:void 0})}),z&&Z&&(I==null?void 0:I.frames[Rt(Z)])&&!m&&l(wt,{fallback:null,children:l(ao,{renderer:z,frames:Dt,byFrame:I.frames[Rt(Z)],animationKey:Z.id,sceneVersion:Xe,autoplay:(xt=c==null?void 0:c.animation)==null?void 0:xt.autoplay,loop:(Ct=c==null?void 0:c.animation)==null?void 0:Ct.loop,onEnded:se,language:f},Z.id)}),nt&&de&&E&&l(nt.AnnotationState,{given:e,annotations:E,scene:I,renderer:z,sceneVersion:Xe,drawn:Gt,media:d,mediaElement:ue,showPlaceholder:m,canvasKey:D,openImages:lt,openMedia:it,host:F,onModel:Nt}),mt&&l(Dn,{overlay:true}),je&&l(wn,{id:Ae,canvases:te,comments:ze,open:Fe,onClose:st,language:f})]})})};function co(e,n,s){return{fitCanvasRect(t,i,a){const u=n(),h=(u==null?void 0:u.canvases.findIndex(B=>B.id===t))??-1;return!u||h===-1?false:(e.fitBounds(Fn(u.canvases[h],u.placements[h],i),a),true)},getCanvasRegion(){const t=n();return t?ho(e.getBounds(),t.canvases,t.placements):null},get backendKind(){return e.backendKind},get atHome(){return e.isAtHome},fitBounds:(t,i)=>e.fitBounds(t,i),fitItemRect:(t,i,a)=>e.fitItemRect(t,i,a),itemRectToWorld:(t,i)=>e.itemRectToWorld(t,i),getBounds:()=>e.getBounds(),getHomeBounds:()=>e.getHomeBounds(),getCamera:()=>e.getCamera(),home:t=>e.home(t),zoomBy:(t,i,a)=>e.zoomBy(t,i,a),panBy:(t,i,a)=>e.panBy(t,i,a),setRotation:(t,i)=>e.setRotation(t,i),getRotation:()=>e.getRotation(),rotateBy:t=>e.rotateBy(t),worldToScreenPoint:t=>e.worldToScreenPoint(t),screenToWorldPoint:t=>e.screenToWorldPoint(t),on:(t,i)=>e.on(t,i),zoomToAnnotation:s}}const uo=[];function $t(e,n,s=false){const t=Array.isArray(e)?e:e?[e]:[];return t.length?t.map((a,u)=>{const h=jn(a.service);return!h&&!a.id?null:{id:`${u}:${a.id??h}|${a.region??""}`,service:h,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,u)=>({id:`${u}:${a}`,...s?{service:a}:{url:a}}))}function ho(e,n,s){let t=null;if(s.forEach((x,T)=>{const c=Math.max(e.x,x.x),b=Math.max(e.y,x.y),p=Math.min(e.x+e.width,x.x+x.width)-c,V=Math.min(e.y+e.height,x.y+x.height)-b;if(p<=0||V<=0)return;const E=p*V;(!t||E>t.area)&&(t={index:T,area:E,clip:{x:c,y:b,width:p,height:V}})}),!t)return null;const{index:i,clip:a}=t,u=n[i],h=s[i],B=Nn(u),A=B.width/h.width,f=B.height/h.height;return{canvasId:u.id,rect:{x:Math.round((a.x-h.x)*A),y:Math.round((a.y-h.y)*f),width:Math.round(a.width*A),height:Math.round(a.height*f)}}}export{zo as C,Eo as a,$o as b,Ro as c,Pe as d,To as e,Po as f,Bo as g,Lo as i,So as r,Mo as s,wo as t,Qn as u};
@@ -1 +0,0 @@
1
- import{a as c,u as a,o as d,am as p,k as v}from"./shared-YUjOSBKO.mjs";import{M as m,a as f}from"./Markup-C1hMA8wk.mjs";import{R as h}from"./ReadMore-BJH-qqte.mjs";import{E as u}from"./EntryBodies-DXAQH0vR.mjs";const T=({summary:i,metadata:s,comments:o,language:r})=>{const{t,langOf:l}=c();return a(v,{children:[d(i,r).text&&a(h,{children:a(m,{as:"p",markup:i,language:r,className:"clover-summary clover-canvas-caption-summary"})}),a(f,{metadata:s,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",lang:l("informationPanelTabsAnnotations"),children:t("informationPanelTabsAnnotations")}),a("ul",{children:o.map((n,e)=>a("li",{children:a(u,{bodies:p(n),language:r})},n.id??e))})]}):null]})};export{T as default};
@@ -1 +0,0 @@
1
- import{o as r,u as a,an as k}from"./shared-YUjOSBKO.mjs";import{C as N}from"./ControlMenu-CAHiLAtl.mjs";import{u as C}from"./useContainerName-BpJ3IWY0.mjs";import"./styles-CyuM_fB1.mjs";const $=({id:m,triggerId:v,label:g,labelLang:u,choices:i,selections:h,onSelect:p,onClose:b,language:s})=>{const d=C(g,u),y=i.some(e=>!r(e.label,s).text);return a(N,{"data-testid":"clover-canvas-choice",id:m,onClose:b,triggerId:v,children:[y&&d.node,i.map((e,f)=>{const l=r(e.label,s);return k("fieldset",{...l.text?{}:d.props,className:"clover-canvas-menu-group",key:e.key},l.text&&a("legend",{className:"clover-canvas-menu-legend",lang:l.lang,children:l.text}),e.items.map((t,n)=>{const c=r(t.label,s),o=c.text||(t.image?"":String(n+1));return a("label",{className:"clover-canvas-menu-item",children:[a("input",{type:"radio",name:`${m}-${f}`,"aria-label":o?void 0:String(n+1),checked:(h[e.key]??0)===n,onChange:()=>p(e.key,n)}),t.image&&a("img",{alt:"",className:"clover-canvas-menu-image",decoding:"async",loading:"lazy",src:t.image}),o&&a("span",{lang:c.text?c.lang:void 0,children:o})]},n)}))})]})};export{$ as default};
@@ -1 +0,0 @@
1
- import{D as N,g as $,a as j,b as A,i as u,I as H,y as S,u as o}from"./shared-YUjOSBKO.mjs";import{I as T}from"./Items-DRj1UEpC.mjs";import{L as q}from"./Label-D6aVJB9s.mjs";import{Summary as w,Id as x,Homepage as D}from"./Primitives-XQO3m1wG.mjs";import{j as L}from"./classnames-DukgfdpI.mjs";import{t as p}from"./heading-Cjt0f-Eu.mjs";import"./styles-CyuM_fB1.mjs";const J=N(function({headingLevel:r=3,className:b,...v},d){const{clover:n}=$("Collection"),{t:f,langOf:g}=j(),i=A(),a=u(l=>l.collection),e=u(l=>H(l.manifest));S(()=>{!a&&(e!=null&&e.id)&&n.openCollection(e.id)},[n,a,e]);const t=a??e;if(!t)return null;const s=t.homepage,c=p(r,`${i}-label`),m=(l,C)=>{const{as:h,title:y,group:I}=p(r,`${i}-${l}`);return o("section",{className:"clover-about-section",...I,children:[o(h,{className:"clover-about-heading",lang:g(l),...y,children:f(l)}),C]})};return o("div",{ref:d,className:L("clover-about clover-collection",b),...t.label?c.group:null,...v,children:[o(q,{as:c.as,label:t.label,className:"clover-collection-title",...c.title}),o(w,{value:t.summary,className:"clover-about-summary"}),o(T,{of:"members",layout:"list"}),Array.isArray(s)&&s.length>0&&m("aboutHomepage",o(D,{value:s})),m("aboutCollection",o(x,{value:t.id}))]})});export{J as Collection};
@@ -1 +0,0 @@
1
- import{D as T,a as C,g as k,i as v,b as I,d as K,y as w,A as b,o as h,u as r}from"./shared-YUjOSBKO.mjs";import{i as L}from"./items-CB2Uk7ts.mjs";import{j as N}from"./classnames-DukgfdpI.mjs";import"./styles-CyuM_fB1.mjs";const U=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),j=100,x=T(function({onChange:s,className:S,...y},A){const{t:E,langOf:D}=C(),{clover:P,language:u}=k("CollectionSelect"),t=v(e=>e.collection),n=v(e=>{var l;return((l=e.manifest)==null?void 0:l.id)??""}),f=I(),[c,i]=K(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),P.goToManifest(e).finally(()=>{o.current===e&&(o.current=null)}))},m=()=>c===null||c===n||c===o.current?false:(i(null),true),g=L(t);if(g.length<2)return null;const a=h(t==null?void 0:t.label,u);return r("div",{ref:A,className:N("clover-collection-select",S),...y,children:[r("label",{htmlFor:`${f}-select`,className:"clover-collection-select-label",lang:a.text?a.lang:D("collectionLabel"),children:a.text||E("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():(U.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>j&&p(l)},children:g.map(e=>{const l=h(e.label,u);return r("option",{value:e.id,lang:l.text?l.lang:void 0,children:l.text||e.id},e.id)})})]})});export{x as CollectionSelect};
@@ -1 +0,0 @@
1
- import{u as o}from"./shared-YUjOSBKO.mjs";import{p as a}from"./playerSurface-CU5XxI1j.mjs";import n from"./Connected-DCBI-j9H.mjs";import{j as t}from"./classnames-DukgfdpI.mjs";import{u as m}from"./hooks-BXzQSllm.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 +0,0 @@
1
- import{g as le,C as x,i as d,T as y,A as g,q as h,y as de,a9 as l,u as he,aa as ue,ab as ge,ac as pe,t as fe}from"./shared-YUjOSBKO.mjs";import{C as ve}from"./CanvasView-BI3YzNdK.mjs";import{u as me,a as be}from"./fromManifest-BhemHaoA.mjs";import{i as R}from"./layout-mMHI0lsj.mjs";import{s as Se}from"./show-link-CyzYE1eS.mjs";import{u as we,c as Ae,d as Ie,e as Ce}from"./hooks-BXzQSllm.mjs";const Te=({options:i,onReady:L,onViewportChange:p,onMediaElement:f,onCaptionChange:S,caption:j,onEnded:v,placeholder:K=true,label:U,partOf:V,language:$,annotations:w,chapters:z,...u})=>{const k=le("Canvas"),{clover:t}=k,F=x(t.captions.subscribe,t.captions.get,t.captions.get),G=j??F,q=$??k.language,s=we(),{direction:J}=Ae(),n=Ie(),o=Ce(),N=d(e=>{var a;return e.status==="loading"?"loading":((a=e.manifest)==null?void 0:a.id)??""}),m=d(e=>e.target),O=d(e=>ue(e.manifest,e.addedSets,e.search.set)),Q=d(e=>pe(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),W=d(e=>fe(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),X=d(e=>e.annotationId),Y=x(t.highlight.subscribe,t.highlight.get,t.highlight.get),Z=x(t.chapter.subscribe,t.chapter.get,t.chapter.get),A=s.map(e=>e.id).join("|"),_=y(()=>{if(w)return w;const e=s.map(a=>a.id);return O.flatMap(a=>a.entries.filter(c=>e.includes(c.canvasId)).map(c=>({annotation:c.annotation,targetIndex:e.indexOf(c.canvasId),pageId:a.id,...a.label?{pageLabel:a.label}:{}})))},[w,O,s]),E=m?(e=>!!e&&s.some(a=>a.id===e))(m.canvasId):false,P=g(null);E&&(P.current=A);const ee=K&&P.current!==A,I=g(null),T=g(null),C=y(()=>s.some(e=>R(e).length>0),[s]),te=C?s.find(e=>R(e).length>0):void 0,ae=me(n,te,q,ge),B=g(C);B.current=C;const r=h(()=>{const e=t.store.get().target;!e||!t.store.get().canvasId||be(e,I.current,T.current,B.current)&&t.consumeTarget()},[t]);de(()=>{m&&r()},[m,A,r]);const b=g(L);b.current=L;const ne=h(e=>{var a;I.current=e,e.on("change",r),r(),(a=b.current)==null||a.call(b,e)},[r]),se=h(e=>{var c;const a=(c=I.current)==null?void 0:c.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),p==null||p(e)},[t,p]),ce=h(e=>{T.current=e,t.media.emit(e),e&&r(),f==null||f(e)},[t,r,f]),ie=h(()=>{v==null||v(),(l(n,"auto-advance")||l(o,"auto-advance"))&&t.next({autoplay:true,wrap:l(n,"repeat")})},[t,n,o,v]),oe=h(e=>void Se(t,e),[t]),D=(i==null?void 0:i.request)??t.request,H=l(o,"auto-advance")||l(n,"auto-advance"),M=l(o,"repeat")||l(n,"repeat"),re=y(()=>({...i,request:D,animation:(i==null?void 0:i.animation)??{autoplay:H,loop:M}}),[i,D,H,M]);return s.length?he(ve,{...u,manifestId:N,canvases:s,viewingDirection:J,language:q,label:U??(o==null?void 0:o.label)??(n==null?void 0:n.label),partOf:V??(n==null?void 0:n.label),options:re,placeholder:ee,onReady:ne,onViewportChange:se,onMediaElement:ce,caption:G,onCaptionChange:e=>{t.captions.emit((e==null?void 0:e.id)??null),S==null||S(e)},onEnded:ie,annotations:_,hiddenPages:W,unlistedPages:Q,onPageVisibilityChange:(e,a)=>e.forEach(c=>t.setSetVisible(c,a)),chapters:z??ae,highlightedChapter:Z,onChapterHighlight:e=>t.chapter.emit(e),selectedAnnotation:X,highlightedAnnotation:Y,onAnnotationSelect:e=>t.selectAnnotation(e),onAnnotationLink:u.onAnnotationLink??oe,onAnnotationActive:e=>{var a;t.highlight.emit(e),(a=u.onAnnotationActive)==null||a.call(u,e)}}):null};export{Te as default};
@@ -1 +0,0 @@
1
- import{g as v,i as o,y as S,T as b,u as C}from"./shared-YUjOSBKO.mjs";import{S as q}from"./SceneView-BYo7WmPt.mjs";import{u as w,d as x}from"./hooks-BXzQSllm.mjs";function M({label:i,language:d,options:t,...f}){const r=v("Scene"),{clover:s}=r,e=w().find(n=>n.type==="Scene"),a=x(),g=o(n=>{var u;return n.status==="loading"?"loading":((u=n.manifest)==null?void 0:u.id)??""}),c=o(n=>n.target);S(()=>{c&&e&&c.canvasId===e.id&&s.consumeTarget()},[c,e,s]);const l=(t==null?void 0:t.request)??s.request,m=b(()=>({...t,request:l}),[t,l]);return e?C(q,{...f,scene:e,manifestId:g,label:i??e.label??(a==null?void 0:a.label),language:d??r.language,options:m}):null}export{M as default};
@@ -1 +0,0 @@
1
- import{D as L,a as k,g as y,i as g,S as I,C,u as n,o as j,k as F,d as M,y as O,U as b}from"./shared-YUjOSBKO.mjs";import{j as P}from"./classnames-DukgfdpI.mjs";import{p as S}from"./time-B9GZoYcm.mjs";import{C as z}from"./Cue-BT2V9VAq.mjs";import{u as B}from"./useContainerName-BpJ3IWY0.mjs";import"./styles-CyuM_fB1.mjs";const J=L(function({as:o="nav",className:r,...c},u){const{t:i,langOf:f}=k(),{clover:a,language:N}=y("Contents"),d=B(i("informationPanelTabsContents"),f("informationPanelTabsContents"),c["aria-label"]!==void 0||c["aria-labelledby"]!==void 0),m=g(e=>I(e.manifest)),h=g(e=>e.canvasId),v=C(a.media.subscribe,a.media.get,a.media.get),x=D(m,h,v),T=C(a.chapter.subscribe,a.chapter.get,a.chapter.get);if(!m.length)return null;const E=e=>{if(e.canvasId){if(e.canvasId===h&&e.time&&v){S(v,e.time.start);return}a.goTo(e.canvasId,{...e.time?{time:e.time.start}:{},...e.region?{region:e.region}:{}})}},p=e=>n("ol",{className:"clover-contents-list",children:e.map(t=>{const s=j(t.label,N);return n("li",{className:"clover-contents-item",children:[n("button",{type:"button",className:"clover-contents-button","aria-current":t.id===x?"true":void 0,"data-highlighted":t.id===T?"true":void 0,disabled:!t.canvasId,onMouseEnter:()=>a.chapter.emit(t.id),onMouseLeave:()=>a.chapter.emit(null),onFocus:()=>a.chapter.emit(t.id),onBlur:()=>a.chapter.emit(null),"data-timed":t.time?"true":void 0,lang:s.text&&!t.time?s.lang:void 0,onClick:()=>E(t),children:t.time?n(F,{children:[n(z,{start:t.time.start,className:"clover-contents-time"}),n("span",{className:"clover-cue-text",lang:s.text?s.lang:void 0,children:s.text||t.id})]}):s.text||t.id}),t.children.length>0&&p(t.children)]},t.id)})});return n(o,{ref:u,...d.props,className:P("clover-contents",r),...c,children:[d.node,p(m)]})});function D(l,o,r){const[c,u]=M(()=>b(l,o));return O(()=>{const i=()=>u(b(l,o,r==null?void 0:r.currentTime));if(i(),!!r)return r.addEventListener("timeupdate",i),r.addEventListener("seeked",i),()=>{r.removeEventListener("timeupdate",i),r.removeEventListener("seeked",i)}},[l,o,r]),c}export{J as Contents};
@@ -1 +0,0 @@
1
- import{A as E,a4 as w,y as T,u as h}from"./shared-YUjOSBKO.mjs";import{j as k}from"./classnames-DukgfdpI.mjs";import"./styles-CyuM_fB1.mjs";const g=({id:p,triggerId:l,onClose:i,"data-testid":m,className:v,children:y})=>{const a=E(null);return w(true,()=>i(false)),T(()=>{const e=a.current,o=(e==null?void 0:e.querySelector('input[type="radio"]:checked'))??(e==null?void 0:e.querySelector('input[type="radio"]:not(:disabled)'))??(e==null?void 0:e.querySelector("input")),n=o==null?void 0:o.closest("label");if(e&&n){const t=n.offsetTop+n.offsetHeight;t>e.scrollTop+e.clientHeight&&(e.scrollTop=t-e.clientHeight),n.offsetTop<e.scrollTop&&(e.scrollTop=n.offsetTop)}o==null||o.focus({preventScroll:true});const u=t=>{var c,s;const r=t.target;(c=a.current)!=null&&c.contains(r)||(s=document.getElementById(l))!=null&&s.contains(r)||i(false)},d=t=>{var s,f;if(t.key!=="Escape")return;const r=document.activeElement,c=!!((s=a.current)!=null&&s.contains(r)||(f=document.getElementById(l))!=null&&f.contains(r));c&&t.preventDefault(),i(c)};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",d,true),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",d,true)}},[l,i]),h("div",{className:k("clover-canvas-menu",v),"data-testid":m,id:p,ref:a,children:y})};export{g as C};
@@ -1 +0,0 @@
1
- import{u as o}from"./shared-YUjOSBKO.mjs";import{j as e}from"./classnames-DukgfdpI.mjs";import{f as i}from"./time-B9GZoYcm.mjs";import"./styles-CyuM_fB1.mjs";function p({start:r,className:m}){return o("span",{className:e("clover-cue-time",m),children:i(r)})}export{p as C};
@@ -1 +0,0 @@
1
- import{A as b,d as C,y as $,_ as te,g as oe,T as re,u as r,b as ne,v as le,k as se}from"./shared-YUjOSBKO.mjs";import{u as ie,p as de,a as ue,b as me,c as Z,S as pe,d as V,e as J}from"./viewer-DEHIsIHd.mjs";import{c as ve,b as ae,f as fe,g as he}from"./hooks-BXzQSllm.mjs";import{B as be}from"./Body-DxSz3iST.mjs";import{stillSource as ge,resolveThumbnail as we}from"./thumbnail-c2K_iQsD.mjs";import{a as ye}from"./index-B7nZdqLg.mjs";import{t as xe}from"./heading-Cjt0f-Eu.mjs";import{R as Se}from"./Root-Dj277K6p.mjs";import{Position as Ee}from"./Pager-Di_2hHM3.mjs";import{T as Te}from"./Tip-IO11xX4x.mjs";import{L as Le}from"./Label-D6aVJB9s.mjs";import{Download as Ne}from"./Download-DqU-goFi.mjs";import{P as ke,L as ze}from"./Provider-B61118lU.mjs";import{S as Ae}from"./Status-YbQK2KzY.mjs";import{I as De}from"./Items-DRj1UEpC.mjs";import{P as Oe}from"./PanelToggle-mUDw73zI.mjs";const Pe=typeof window>"u"?$:te;function Q({id:s,beside:i,defaultOpen:a,side:v,focus:u=de,slides:f=true,alongside:w,followFocus:y}){var t,l;const d=b(null),m=b(null),n=i===false,[A,T]=C(a),[B,k]=C(false),c=n?B:A,L=()=>document.querySelector(`button[aria-controls~="${s}"]`),h=()=>y(L),p=()=>{var o,g;(o=d.current)!=null&&o.contains(document.activeElement)&&((g=L())==null||g.focus(),h())},x=b(0),N=o=>{x.current=n&&o?3:0,x.current||h(),n&&k(o),T(o)},D=()=>{p(),N(false)},O=b(i),P=b(false);if(O.current===true&&i===false){const o=document.activeElement;P.current=!!(o&&((t=d.current)!=null&&t.contains(o)||(l=L())!=null&&l.contains(o)))}Pe(()=>{var o;P.current&&(P.current=false,(o=L())==null||o.focus(),h()),i===true&&k(false),O.current=i},[i]);const M=ie(f&&n&&c),q=f&&n,z=q?M.mounted:c,e=q?M.open:c;return $(()=>{if(!x.current||!d.current)return;x.current-=1;const o=u(d.current);o==null||o.focus({preventScroll:true}),o&&document.activeElement===o&&(x.current=0)}),ue(d,{enabled:n&&e,side:v,onClose:D,scrim:m,alongside:w,exits:!f}),{pane:d,over:n,open:c,shown:z,opened:e,setOpen:N,close:D,onKeyDown:o=>{n&&c&&o.key==="Escape"&&!o.defaultPrevented&&(o.preventDefault(),D())},scrim:n&&z&&{ref:m,"data-open":e,"aria-hidden":true,onMouseDown:o=>o.preventDefault(),onClick:D}}}const Me=1600,qe=200,X=.25,Ie=1500,Y=typeof window>"u"?$:te,ce=s=>{const i=Number(s==null?void 0:s.width),a=Number(s==null?void 0:s.height);return i>0&&a>0?i/a:16/9};function $e({children:s}){const{clover:i}=oe("Document"),a=ve(),v=ae(),u=b(null),f=b(null),w=b(null),y=a.direction==="right-to-left"||a.direction==="bottom-to-top",d=re(()=>a.views.map(e=>{var o;const t=e.map(g=>a.canvases[g]),l=y?[...t].reverse():t;return{key:t.map(g=>g.id).join("|"),first:(o=t[0])==null?void 0:o.id,canvases:l,ratio:l.reduce((g,F)=>g+ce(F),0)}}),[a,y]),m=Math.max(0,v.position),n=b({sheets:d,position:m});n.current={sheets:d,position:m};const A=b(null),T=b(null),B=b(0),k=b(()=>{}),c=b(false),L=e=>{var t;return(t=f.current)==null?void 0:t.children[e]},h=e=>{const t=u.current,l=L(e);return!t||!l||l===w.current?0:Math.min(l.offsetTop,t.scrollHeight-t.clientHeight)},p=()=>{const e=w.current,t=L(n.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 x(){const e=u.current;if(!e||e.hasAttribute("data-scrolling")||T.current!==null)return;const t=h(n.current.position);B.current=t,!(Math.abs(e.scrollTop-t)<=1)&&(c.current=true,e.scrollTop=t,requestAnimationFrame(()=>requestAnimationFrame(()=>c.current=false)))}Y(p),$(()=>{const e=new ResizeObserver(()=>{p(),x()});return f.current&&e.observe(f.current),u.current&&e.observe(u.current),()=>e.disconnect()},[]);const N=()=>{k.current();for(const[e,t]of[[u.current,"data-scrolling"],[w.current,"data-moved"]])e&&!e.hasAttribute(t)&&e.setAttribute(t,"")},D=()=>{const e=u.current,t=w.current;if(!e||!t)return;k.current(),B.current=e.scrollTop;const l=()=>{const H=t.querySelector(".clover-canvas");return!H||H.getAttribute("data-status")!=="loading"||H.getAttribute("data-placeholder")==="true"};let o=0;const g=new MutationObserver(()=>l()&&_()),F=setTimeout(()=>_(),Ie),W=()=>{cancelAnimationFrame(o),clearTimeout(F),g.disconnect()},_=()=>{W(),t.removeAttribute("data-moved"),e.removeAttribute("data-scrolling")};k.current=W,o=requestAnimationFrame(()=>{o=requestAnimationFrame(()=>{if(l())return _();g.observe(t,{attributes:true,subtree:true,attributeFilter:["data-status","data-placeholder"]})})})},O=(e,t=false)=>{var F;const l=u.current;if(!l)return;const o=h(e);if(Math.abs(l.scrollTop-o)<=1)return D();N(),T.current=e;const g=t||((F=window.matchMedia)==null?void 0:F.call(window,"(prefers-reduced-motion: reduce)").matches);l.scrollTo({top:o,behavior:g?"auto":"smooth"})},P=b(null);Y(()=>{const e=P.current!==d;if(P.current=d,z(false),A.current===m&&!e){A.current=null;return}A.current=null,O(m,e)},[m,d]),$(()=>{const e=u.current;if(!e)return;let t=0,l,o=false;const g=S=>{const I=n.current.sheets.length;if(I<2)return 0;let E=0;for(let G=0;G<I&&h(G)<=S+.5;G++)E=G;if(E>=I-1)return I-1;const U=h(E),R=(S-U)/Math.max(1,h(E+1)-U);return S>=B.current?R>X?E+1:E:R<1-X?E:E+1},F=()=>{if(t=0,T.current!==null)return;const S=g(e.scrollTop),{sheets:I,position:E}=n.current;S===E||!I[S]||(N(),z(false),A.current=S,i.goTo(I[S].first))},W=()=>{if(o)return;const{sheets:S,position:I}=n.current,E=e.scrollTop,U=T.current;T.current=null;const R=U!==null&&Math.abs(E-h(U))<=1?U:g(E);if(!S[R])return D();R!==I&&(N(),z(false),A.current=R,i.goTo(S[R].first)),O(R)},_=()=>{clearTimeout(l),l=setTimeout(W,qe)},H=()=>{c.current||(N(),_(),t||(t=requestAnimationFrame(F)))},K=S=>{T.current=null,(S.type==="touchstart"||S.type==="pointerdown"&&S.target===e)&&(o=true)},j=()=>{o&&(o=false,_())};return e.addEventListener("scroll",H,{passive:true}),e.addEventListener("wheel",K,{passive:true}),e.addEventListener("touchstart",K,{passive:true}),e.addEventListener("pointerdown",K),window.addEventListener("touchend",j),window.addEventListener("touchcancel",j),window.addEventListener("pointerup",j),()=>{cancelAnimationFrame(t),clearTimeout(l),k.current(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",K),e.removeEventListener("touchstart",K),e.removeEventListener("pointerdown",K),window.removeEventListener("touchend",j),window.removeEventListener("touchcancel",j),window.removeEventListener("pointerup",j)}},[i]);const[M,q]=C(null);function z(e){const t=u.current;!t||t.hasAttribute("data-zoomed")===e||(t.toggleAttribute("data-zoomed",e),e&&x())}return $(()=>{if(M)return M.on("viewport",()=>z(!M.atHome))},[M]),r("div",{ref:u,className:"clover-template-document-column",onKeyDown:e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey)){if(e.key==="PageDown"&&v.hasNext)v.next();else if(e.key==="PageUp"&&v.hasPrevious)v.previous();else return;e.preventDefault()}},children:r("div",{ref:f,className:"clover-template-document-sheets","data-single":d.length<2||void 0,children:[d.map((e,t)=>r("div",{"aria-hidden":"true",className:"clover-template-document-sheet","data-active":t===m||void 0,onClick:()=>t!==m&&i.goTo(e.first),style:{"--ratio":e.ratio},children:e.canvases.map(l=>r(Fe,{canvas:l},l.id))},e.key)),r("div",{ref:w,className:"clover-template-document-live",children:r(be,{className:"clover-template-document-body",onReady:q,children:s})})]})})}function Be(s){const[i,a]=C(()=>typeof IntersectionObserver>"u");return $(()=>{if(i||!s)return;const v=new IntersectionObserver(u=>{u.some(f=>f.isIntersecting)&&(a(true),v.disconnect())},{root:s.closest(".clover-template-document-column"),rootMargin:"100% 0px"});return v.observe(s),()=>v.disconnect()},[s,i]),i}function Fe({canvas:s}){const{clover:i}=oe("Document"),a=re(()=>ge(s),[s]),[v,u]=C(null),f=Be(v),[w,y]=C(a==null?void 0:a.src);$(()=>{if(!a||a.src)return y(a==null?void 0:a.src);if(!f)return;let m=true;return we(a,Me,i.request).then(n=>m&&y(n)),()=>{m=false}},[a,i,f]);const d={aspectRatio:String(ce(s))};return w?r("img",{alt:"",decoding:"async",loading:"lazy",src:w,style:d}):r("span",{ref:u,style:d})}ye(42,"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);overflow:hidden;background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.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;margin:0;font-size:var(--clover-text-l);line-height:1.25;font-weight:400;overflow-wrap:anywhere}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)}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:0}.clover-template-document-sidebar{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}.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-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-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]) .clover-canvas-viewport{touch-action:pan-y}.clover-template-document-panel{contain:size;overflow-y:auto;overscroll-behavior:contain;background-color:var(--clover-color-secondary, #fff)}.clover-template-document-panel[hidden]{display:none}.clover-template-document-scrim[data-for=sidebar]{z-index:2}.clover-template-document{--clover-grip: color-mix( in srgb, var(--clover-color-primary-muted, #26292b) 30%, transparent )}.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);background:linear-gradient(var(--clover-grip),var(--clover-grip)) no-repeat right var(--clover-space-2xs) center / 4px var(--clover-space-xl),var(--clover-color-secondary, #fff);touch-action:pan-y;box-shadow:var(--clover-space-s) 0 var(--clover-space-l) #0000001f}.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)}}");const Re=()=>import("./DocumentPanel-X_Rta0Wu.mjs");function st({className:s,defaultSidebarOpen:i,defaultPanelOpen:a=false,panelLayout:v="accordion",download:u=true,headingLevel:f=2,storageKey:w="clover-template-document",...y}){const d=xe(f,`${ne().replace(/:/g,"")}-title`);return r(Se,{className:["clover-template-document",s].filter(Boolean).join(" "),...d.group,...y,children:r(Ue,{title:d,defaultSidebarOpen:i,defaultPanelOpen:a,panelLayout:v,download:u,headingLevel:f,storageKey:w})})}const ee=s=>s+1,Ce="16rem",_e="14rem",He=31,Ke=9,je=40;function Ue({defaultSidebarOpen:s,defaultPanelOpen:i,download:a,headingLevel:v=2,storageKey:u,panelLayout:f,title:w}){const y=fe(),d=he(),m=d("templateSidebar"),n=ne().replace(/:/g,""),A=ae(),T=b(null),B=b(null),k=me(),c=Q({id:`${n}-sidebar`,beside:Z(T,je),defaultOpen:s??true,side:"start",focus:t=>t.querySelector('[role="option"][aria-selected="true"]'),slides:false,alongside:B,followFocus:k}),L=A.total>1,h=L&&c.open,p=Q({id:`${n}-panel`,beside:Z(T,He+(h?Ke:0)),defaultOpen:!!i,side:"end",followFocus:k}),x=p.over,[N,D]=C(),O=()=>Re().then(t=>D(()=>t.default));$(()=>{p.open&&O()},[p.open]);const P=t=>{var l,o;!N&&((o=(l=t.target).closest)!=null&&o.call(l,`[aria-controls~="${n}-panel"]`))&&O()},M=()=>{c.over&&c.close()},q=!x&&p.open,z=r(Oe,{open:p.open,onOpenChange:t=>t&&!N?O().then(()=>p.setOpen(true)):p.setOpen(t),controls:`${n}-panel`}),e=L&&r("button",{type:"button",className:"clover-template-document-sidebar-toggle","aria-expanded":c.open,"aria-controls":`${n}-sidebar`,lang:d("templateSidebarToggle"),onClick:()=>c.setOpen(!c.open),children:[r("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",fill:c.open?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r("rect",{x:"1.5",y:"2",width:"5.5",height:"4.5",rx:"1"}),r("rect",{x:"1.5",y:"9.5",width:"5.5",height:"4.5",rx:"1"}),r("path",{d:"M9.5 4.25h5M9.5 11.75h5",fill:"none"})]}),r("span",{style:le,children:y("templateSidebarToggle")}),r(Ee,{className:"clover-template-document-position"}),r(Te,{label:y("templateSidebarToggle")})]});return r(se,{children:[r("header",{className:"clover-template-document-toolbar",children:[r(Le,{as:w.as,className:"clover-template-document-title",...w.title}),a&&r(Ne,{headingLevel:ee(v)}),r(ke,{className:"clover-template-document-provider",children:r(ze,{})})]}),r(Ae,{loading:false}),r(pe,{ref:T,className:"clover-template-document-panes clover-template-panes","data-sidebar":h?"open":"closed","data-narrow":c.over||void 0,"data-panel":x?"over":"beside",storageKey:u||void 0,onKeyDown:t=>{p.onKeyDown(t),c.onKeyDown(t)},onPointerOver:P,onFocus:P,children:[r(V,{ref:c.pane,as:"aside",id:`${n}-sidebar`,name:"sidebar",className:"clover-template-document-sidebar","aria-label":m?void 0:y("templateSidebar"),"aria-labelledby":m?`${n}-sidebar-name`:void 0,size:"13rem",min:c.over?void 0:"8rem",max:"24rem",hidden:!h,children:[m&&r("span",{hidden:true,id:`${n}-sidebar-name`,lang:m,children:y("templateSidebar")}),r(De,{layout:"list","aria-label":m?void 0:y("templateSidebar"),thumbnailSize:320,onSelect:M})]}),h&&!c.over&&r(J,{"aria-controls":`${n}-sidebar`}),h&&r("div",{ref:B,className:"clover-template-document-spine","data-for":"sidebar",children:e}),r(V,{className:"clover-template-document-main",min:h&&!c.over||q?Ce:void 0,children:[L&&!c.open&&r("div",{className:"clover-template-document-sidebar-closed",children:e}),r($e,{children:!q&&z})]}),q&&r(J,{"aria-controls":`${n}-panel`}),q&&r("div",{className:"clover-template-document-spine",children:z}),r(V,{ref:p.pane,id:`${n}-panel`,"data-spine":x||void 0,name:"panel",className:"clover-template-document-panel clover-template-drawer",size:"24rem",min:x?void 0:_e,"data-open":p.opened,hidden:!p.shown,children:N&&r(N,{layout:f,headingLevel:ee(v),download:false,onClose:x?p.close:void 0,closeOnEscape:x})}),p.scrim&&r("div",{className:"clover-template-document-scrim clover-template-scrim",...p.scrim}),L&&c.scrim&&r("div",{className:"clover-template-document-scrim clover-template-scrim","data-for":"sidebar",...c.scrim})]})]})}export{st as Document};
@@ -1 +0,0 @@
1
- import{u as r}from"./shared-YUjOSBKO.mjs";import{P as t}from"./Panel-DbsC8A9V.mjs";function a(o){return r(t,{...o})}export{a as default};
@@ -1 +0,0 @@
1
- import{g as h,i as u,r as v,j as w,o as m,a as b,b as N,u as n}from"./shared-YUjOSBKO.mjs";import{j as C}from"./classnames-DukgfdpI.mjs";import{a as D}from"./heading-Cjt0f-Eu.mjs";import"./styles-CyuM_fB1.mjs";function p(l,d){const e=new Set,o=[];for(const r of l)for(const a of w(r==null?void 0:r.rendering)){const t=(a==null?void 0:a.id)??(a==null?void 0:a["@id"]);if(typeof t!="string"||e.has(t))continue;e.add(t);const c=m(a.label,d);o.push({id:t,label:c.text||a.format||t,lang:c.text?c.lang:void 0,format:a.format})}return o}function $(){const{language:l}=h("Download"),d=u(o=>o.manifest),e=u(o=>v(o.manifest,o.canvasId));return{page:p(e,l),all:p([d],l)}}function j({page:l,all:d,headingLevel:e=3}){const{t:o,langOf:r}=b(),a=N(),t=D(e),c=(i,f,g)=>f.length>0&&n("section",{className:"clover-download-group","aria-labelledby":`${a}-${g}`,children:[n(t,{className:"clover-download-title",id:`${a}-${g}`,lang:r(i),children:o(i)}),n("ul",{className:"clover-download-list",children:f.map(s=>n("li",{children:n("a",{className:"clover-download-link",href:s.id,target:"_blank",rel:"noopener noreferrer",lang:s.lang,children:[s.label,s.format&&s.format!==s.label&&n("span",{className:"clover-download-format",children:[" ","(",s.format,")"]})]})},s.id))})]});return n("div",{className:"clover-download-groups",children:[c("downloadPage",l,"page"),c("downloadAll",d,"all")]})}function S({className:l,headingLevel:d=3,...e}){const{page:o,all:r}=$();return!o.length&&!r.length?null:n("div",{...e,className:C("clover-download",l),children:n(j,{page:o,all:r,headingLevel:d})})}export{S as Download,j as DownloadGroups,$ as useDownloads};
@@ -1 +0,0 @@
1
- import{a as c,u as l,k as u,o as g}from"./shared-YUjOSBKO.mjs";import{M as f}from"./Markup-C1hMA8wk.mjs";const v=n=>n.some(e=>{var r;return(r=e.value)==null?void 0:r.trim()});function h({bodies:n,language:e,headingLevel:r}){const{t:s,langOf:i}=c(),m=a=>{if(v(n))return{text:""};const t=g(a.label,e);return t.text?t:{text:s("annotationsImage"),lang:i("annotationsImage")}};return l(u,{children:n.map((a,t)=>{if(!a.image)return l(f,{as:"div",markup:{[a.language??"none"]:[a.value??""]},format:a.format,headingLevel:r,language:e,className:"clover-annotations-text"},t);const o=m(a);return l("img",{src:a.image,alt:o.text,lang:o.text?o.lang:void 0,width:200,loading:"lazy",className:"clover-annotations-image"},t)})})}export{h as E};
@@ -1 +0,0 @@
1
- var K=Object.defineProperty;var J=(e,r,n)=>r in e?K(e,r,{enumerable:true,configurable:true,writable:true,value:n}):e[r]=n;var j=(e,r,n)=>J(e,typeof r!="symbol"?r+"":r,n);import{a as X,A as Q,d as T,a4 as ee,y as S,u as s,o as te,P as ne,z as re,k as $,_ as oe,C as se,R as ie}from"./shared-YUjOSBKO.mjs";import{C as ae}from"./glyphs-drROkef9.mjs";import{B as q}from"./Button-uWgfvqsL.mjs";import"./styles-CyuM_fB1.mjs";import{T as ce}from"./Tip-IO11xX4x.mjs";const le=re(()=>import("./CaptionDetails-B80ZhZ7v.mjs"));function Ne(e){var r;return!!e.summary||!!((r=e.metadata)!=null&&r.length)}const ue=(e,r)=>`${e}-label-${r}`,Oe=({id:e,canvases:r,comments:n,open:o,onClose:i,language:c})=>{const{t:u,langOf:a}=X(),l=Q(null),[h,v]=T(o);return o&&!h&&v(true),ee(o,()=>i(false)),S(()=>{var f;o&&((f=l.current)==null||f.focus())},[o]),s("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:e,onKeyDown:f=>{f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),i(true))},ref:l,tabIndex:-1,children:[s(q,{className:"clover-canvas-caption-close",id:`close-${e}`,label:u("commonClose"),lang:a("commonClose"),onClick:()=>i(true),children:s(ae,{})}),r.map((f,L)=>{const d=te(f.label,c);return s("section",{className:"clover-canvas-caption-canvas",children:[d.text&&s("p",{className:"clover-canvas-caption-label",id:ue(e,L),lang:d.lang,children:d.text}),h&&s(ne,{fallback:null,children:s(le,{summary:f.summary,metadata:f.metadata,comments:n==null?void 0:n.get(f.id),language:c})})]},f.id)})]})},We=()=>s("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),_e=()=>s("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Be=()=>s("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),Re=()=>s("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),Ye=()=>s("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),Ve=()=>s($,{children:[s("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),s("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),je=()=>s($,{children:[s("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),s("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),de=({children:e,label:r})=>s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e}),fe=112,pe=128;function he(e){oe(()=>{const r=e==null?void 0:e.closest(".clover-canvas");if(!e||!r)return;const n=(c=false)=>{let u=e.offsetWidth,a=0;for(const d of c?[]:Array.from(e.children))!(d instanceof HTMLElement)||!d.offsetParent||(u=Math.min(u,d.offsetLeft),a=Math.max(a,d.offsetTop+d.offsetHeight));const l={width:e.offsetWidth-u,height:a};for(const[d,E]of Object.entries(l)){const p=`--clover-canvas-controls-${d}`;a?r.style.setProperty(p,`${E}px`):r.style.removeProperty(p)}const h=e.offsetTop,v=r.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),f=r.clientHeight-2*h-l.height-((v==null?void 0:v.offsetHeight)??0),L=e.offsetLeft+u-h;a&&f<fe&&L>=pe?r.dataset.popups="beside":delete r.dataset.popups};n();const o=new ResizeObserver(()=>n());o.observe(e),o.observe(r);const i=new MutationObserver(()=>n());return i.observe(e,{childList:true}),i.observe(r,{childList:true}),()=>{o.disconnect(),i.disconnect(),n(true)}},[e])}const P=()=>{if(typeof document>"u")return null;const e=document;return e.fullscreenElement??e.webkitFullscreenElement??null},Z=()=>{if(typeof document>"u")return false;const e=document;return!!(e.fullscreenEnabled??e.webkitFullscreenEnabled)},ve=e=>e==null?void 0:e.closest(".clover-canvas"),me=(e,r)=>{if(typeof e.webkitEnterFullscreen!="function")return;const n=r.closest(".clover-canvas"),o=!e.isConnected&&!!n;if(o&&n){const c=e.getAttribute("style");e.style.cssText="position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:contain;pointer-events:none",n.prepend(e),e.addEventListener("webkitendfullscreen",()=>{e.remove(),c===null?e.removeAttribute("style"):e.setAttribute("style",c)},{once:true})}const i=()=>{var c;try{(c=e.webkitEnterFullscreen)==null||c.call(e)}catch{}};o?requestAnimationFrame(i):i()},Le=async(e,r)=>{var o,i,c,u;const n=ve(e);if(n)try{if(P()){const l=document;await(((o=l.exitFullscreen)==null?void 0:o.call(l))??((i=l.webkitExitFullscreen)==null?void 0:i.call(l)));return}if(!Z()){r&&e&&me(r,e);return}const a=n;await(((c=a.requestFullscreen)==null?void 0:c.call(a))??((u=a.webkitRequestFullscreen)==null?void 0:u.call(a)))}catch{}};function Ee(e){const[r,n]=T(false);return S(()=>{if(!e)return;const o=()=>{var i;return n(!!((i=P())!=null&&i.contains(e)))};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[e]),r}function ge({key:e,id:r,label:n,glyph:o,onClick:i,expanded:c,controls:u,shortcut:a,lang:l},h){const v=h==null?void 0:h[e];return v?s(v,{buttonProps:{id:r,type:"button","aria-label":n,...l&&{lang:l},...a&&{"aria-keyshortcuts":a.keys},onClick:i,...c!==void 0&&{"aria-expanded":c,"aria-controls":u}},icon:s(de,{label:n,children:o}),label:n,tip:s(ce,{label:n,shortcut:a})},e):s(q,{id:r,label:n,onClick:i,expanded:c,controls:u,shortcut:a,lang:l,children:o},e)}const ze=({controls:e,controlButtons:r,hasPlaceholder:n=false,children:o})=>{const[i,c]=T(null),u=Ee(i);return he(i),s("div",{className:"clover-canvas-controls","data-fullscreen":u,"data-has-placeholder":n,"data-testid":"clover-canvas-controls",ref:c,children:[e(u).map(a=>ge(a,r)),o]})},be=()=>()=>{};function Xe(){return se(be,Z)}const $e=({hidden:e})=>{const{t:r,langOf:n}=X(),o=r("imageExitFullScreen");return s("button",{"aria-label":o,lang:n("imageExitFullScreen"),className:"clover-canvas-exit-full-screen",hidden:e,onClick:i=>void Le(i.currentTarget),type:"button",children:[s("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:s("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),o]})},U=5,z=300,we=U*4;function ye(e,r=false){return e==="touch"||e==="pen"&&!r}function ke(e){return e.pointerType==="pen"&&e.buttons===0}function qe(e,r,n){for(let o=e;o&&o!==r;o=o.parentElement)if((n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(o).overflowY))return true;return false}function Me(e,r){var o;let n=e;for(;n&&n!==r;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const Ce=2e3,Te=1e3,Fe=1e3,xe=[":scope > .clover-canvas-controls > *",":scope > .clover-canvas-navigator",":scope > .clover-canvas-media > .clover-canvas-transport > *"].join(", ");function Ze(e,r=Ce,n){const[o,i]=T(false);return S(()=>{if(!e)return;const c=e.ownerDocument;let u,a=false,l=false,h=false,v=false,f=-1/0,L=null,d=false,E,p=null,m=null;const k=t=>{a=t,i(t)},D=()=>{h||k(false)},g=()=>{u&&clearTimeout(u),u=void 0},A=()=>{m&&clearTimeout(m.timer),m=null},b=t=>ye(t.pointerType,v),M=t=>{l=t.type==="keydown",!l&&(k(true),g(),Number.isFinite(r)&&(u=setTimeout(D,r)))},N=()=>{k(true),g(),u=setTimeout(D,Te)},O=t=>{A(),m={...t,timer:setTimeout(()=>{m=null,k(t.onPicture?!a:true)},z)}},W=t=>{if(ke(t)&&(v=true),!b(t))return M(t);(p==null?void 0:p.id)===t.pointerId&&Math.hypot(t.clientX-p.x,t.clientY-p.y)>U&&(p=null)},_=t=>{if(!b(t))return M(t);l=false,g(),p=t.isPrimary===false?null:{id:t.pointerId,x:t.clientX,y:t.clientY,target:t.target}},F=t=>{if(!b(t)||(p==null?void 0:p.id)!==t.pointerId)return;const{target:w}=p;if(p=null,t.type!=="pointerup"||Me(w,e))return;const C=n==null?void 0:n.current,I=!!(C&&w instanceof Node&&C.contains(w));if(I&&(m!=null&&m.onPicture)&&Math.hypot(t.clientX-m.x,t.clientY-m.y)<we){A();return}O({x:t.clientX,y:t.clientY,onPicture:I})},G=t=>{const w=n==null?void 0:n.current,C=t.target;return!w||!C||!w.contains(C)?false:Array.from(e.querySelectorAll(xe)).some(I=>{const y=I.getBoundingClientRect();return y.width>0&&y.height>0&&t.clientX>=y.left&&t.clientX<=y.right&&t.clientY>=y.top&&t.clientY<=y.bottom})},x=t=>{if(t.type==="pointerdown"){if(L!==null||(clearTimeout(E),d=false,!G(t)))return;L=t.pointerId,d=true,b(t)?(l=false,g()):M(t)}else if(t.pointerId!==L)return;t.stopPropagation(),t.preventDefault(),t.type==="pointercancel"?(L=null,d=false):t.type==="pointerup"&&(L=null,b(t)&&O({x:t.clientX,y:t.clientY,onPicture:false}),clearTimeout(E),E=setTimeout(()=>d=false,z))},B=t=>{d&&(d=false,t.stopPropagation(),t.preventDefault())},H=t=>{f=Date.now(),t.type==="pointerdown"&&(h=false)},R=()=>{Date.now()-f<Fe||(h=true,g(),k(true))},Y=t=>{b(t)||a&&N()},V=t=>{e.contains(t.relatedTarget)||(h=false,(a||l)&&N())};c.addEventListener("pointerdown",H,true),c.addEventListener("pointerup",H,true);for(const t of["pointerdown","pointermove","pointerup"])e.addEventListener(t,x,true);return e.addEventListener("pointercancel",x,true),e.addEventListener("click",B,true),e.addEventListener("pointermove",W),e.addEventListener("pointerdown",_),e.addEventListener("pointerup",F),e.addEventListener("pointercancel",F),e.addEventListener("pointerleave",Y),e.addEventListener("focusin",R),e.addEventListener("focusout",V),e.addEventListener("keydown",M),()=>{g(),A(),clearTimeout(E),c.removeEventListener("pointerdown",H,true),c.removeEventListener("pointerup",H,true);for(const t of["pointerdown","pointermove","pointerup"])e.removeEventListener(t,x,true);e.removeEventListener("pointercancel",x,true),e.removeEventListener("click",B,true),e.removeEventListener("pointermove",W),e.removeEventListener("pointerdown",_),e.removeEventListener("pointerup",F),e.removeEventListener("pointercancel",F),e.removeEventListener("pointerleave",Y),e.removeEventListener("focusin",R),e.removeEventListener("focusout",V),e.removeEventListener("keydown",M)}},[e,r,n]),o}function Ue(e){const[r,n]=T(false);return S(()=>{if(!e)return;const o=()=>n(P()===e);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[e]),r}class Ge extends ie.Component{constructor(){super(...arguments);j(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?s("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[s("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&s("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}export{ze as C,we as D,Ge as E,Ve as R,U as T,We as Z,ke as a,z as b,ye as c,_e as d,Re as e,Be as f,Ye as g,je as h,Me as i,Ue as j,Ze as k,Ne as l,ue as m,$e as n,Oe as o,Ee as p,ge as r,qe as s,Le as t,Xe as u};
@@ -1 +0,0 @@
1
- import{a as v,u as e,v as u,D as S}from"./shared-YUjOSBKO.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as f}from"./Tip-IO11xX4x.mjs";import"./styles-CyuM_fB1.mjs";function N({steps:t,sentence:l,className:r}){const{t:c,langOf:o}=v(),{position:a,total:n}=t;if(n<1)return null;const i=a+1;return e("div",{className:h("clover-steps",r),children:[e("span",{"aria-live":"polite",className:"clover-steps-position",children:[e("span",{"aria-hidden":"true",children:[i>0?i:"\u2013"," / ",n]}),e("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[n," / ",n]}),i>0&&e("span",{style:u,lang:o(l),children:c(l,{index:i,total:n})})]}),e(k,{steps:t,step:"previous"}),e(k,{steps:t,step:"next"})]})}function k({steps:t,step:l}){const{t:r,langOf:c}=v(),o=l==="next",a=o?t.position+1<t.total:t.position>0,n=o?"commonNext":"commonPrevious";return e("button",{type:"button",className:"clover-steps-step","data-step":l,lang:c(n),"aria-disabled":!a||void 0,tabIndex:a?void 0:-1,onClick:()=>{a&&t.step(o?1:-1)},children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:e("path",{d:o?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),e("span",{style:u,children:r(n)}),e(f,{label:r(n)})]})}const L=S(function({id:l,value:r,onChange:c,onSubmit:o,onClear:a,results:n,size:i="large",classes:p={}},y){const{t:s,langOf:d}=v(),b=s("commonSearch"),g=s("contentSearchClear");return e("form",{role:"search",className:h("clover-field-pill",p.form),"data-size":i,onSubmit:m=>{m.preventDefault(),o()},children:[e("label",{htmlFor:l,style:u,lang:d("informationPanelTabsSearch"),children:s("informationPanelTabsSearch")}),e("input",{ref:y,id:l,type:"search",className:h("clover-field-pill-query",p.query),value:r,placeholder:s("contentSearchPlaceholder"),lang:d("contentSearchPlaceholder"),onChange:m=>c(m.target.value)}),n&&(n.total?e(N,{steps:n,sentence:"contentSearchPosition"}):e("span",{className:"clover-field-pill-note","aria-hidden":"true",lang:d("contentSearchResultsNone"),children:s("contentSearchResultsNone")})),r&&e("button",{type:"button",className:h("clover-field-pill-clear",p.clear),lang:d("contentSearchClear"),onClick:a,children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:e("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),e("span",{style:u,children:g}),e(f,{label:g})]}),e("button",{type:"submit",className:h("clover-field-pill-submit",p.submit),lang:d("commonSearch"),children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:[e("circle",{cx:"7",cy:"7",r:"4.5",fill:"none",stroke:"currentColor",strokeWidth:"2"}),e("path",{d:"M10.5 10.5L14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),e("span",{style:u,children:b}),e(f,{label:b})]})]})});export{L as F};
@@ -1 +0,0 @@
1
- import{y as L,u as e,d as C,A as I,a as S,b as T,q as A,K as R,T as j}from"./shared-YUjOSBKO.mjs";import H from"./ChoiceMenu-DCp7-co7.mjs";import{r as O}from"./layout-mMHI0lsj.mjs";import{u as W,T as x,a as E,P as F}from"./MediaBody-BfrKIPte.mjs";import{imageSource as _,resolveThumbnail as $}from"./thumbnail-c2K_iQsD.mjs";import"./styles-CyuM_fB1.mjs";const q=50,D=128;function G(t,m){const[c,d]=C([]);return L(()=>{let l=true;return Promise.all(t.map(n=>{const{body:a}=n.annotation,i=O(Array.isArray(a)?a[0]:a),r=i&&_(i.body,i.region);return r?$(r,D,m):void 0})).then(n=>l&&d(n)),()=>{l=false}},[t,m]),c}function K(t,m,{autoplay:c=false,loop:d=false,isReady:l,onEnded:n}){const[a,i]=C(0),[r,o]=C(false),[h,s]=C(d),f=I(l);f.current=l;const g=I(n);return g.current=n,L(()=>{i(0),s(d);const u=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;o(c&&t.length>1&&!u)},[m]),L(()=>{if(!r||t.length<2)return;const u=t[Math.min(a,t.length-1)],M=Math.max(40,(u.end-u.start)*1e3);let k=setTimeout(function P(){var b;const y=a+1>=t.length;if(y&&!h){o(false),(b=g.current)==null||b.call(g);return}const w=y?0:a+1;if(f.current&&!f.current(w)){k=setTimeout(P,q);return}i(w)},M);return()=>clearTimeout(k)},[r,a,t,h]),{frame:a,playing:r,repeat:h,setFrame:i,setPlaying:o,setRepeat:s}}function U({frames:t,animation:m,language:c}){var B;const{t:d,langOf:l}=S(),{frame:n,playing:a,repeat:i,setFrame:r,setPlaying:o,setRepeat:h}=m,s=t.length-1,f=`${T().replace(/:/g,"")}-frames`,g=`${f}-menu`,[u,M]=C(false),k=I(null);W(k);const P=A(p=>{var v;M(false),p&&((v=document.getElementById(f))==null||v.focus())},[f]),y=G(t,(B=R())==null?void 0:B.clover.request),w=j(()=>({key:"frame",items:t.map((p,v)=>({label:p.annotation.label,id:p.annotation.id,image:y[v]}))}),[t,y]),b=d("framePosition",{index:n+1,total:t.length}),N=p=>{const v=Math.min(s,Math.max(0,n+p));v!==n&&(o(false),r(v))};return e("div",{className:"clover-canvas-transport","data-kind":"frames","data-testid":"clover-canvas-frames",children:[e("div",{className:"clover-canvas-transport-seek-area",children:e("input",{"aria-label":d("frameSeek"),"aria-valuetext":b,lang:l("frameSeek"),className:"clover-canvas-transport-seek",max:s,min:0,step:1,type:"range",value:n,onChange:p=>{o(false),r(Number(p.target.value))},style:{"--clover-transport-progress":`${s?n/s*100:0}%`}})}),e("div",{className:"clover-canvas-transport-bar",ref:k,children:[e(x,{words:"framePrevious",disabled:n===0,onClick:()=>N(-1),children:e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:e("path",{d:"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),e(x,{words:a?"playerPause":"playerPlay",button:a?"pause":"play",onClick:()=>{!a&&n===s&&r(0),o(!a)},children:a?e(E,{}):e(F,{})}),e(x,{words:"frameNext",disabled:n===s,onClick:()=>N(1),children:e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:e("path",{d:"M6 3l5 5-5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),e(x,{words:"frameRepeat",button:"repeat",pressed:i,onClick:()=>h(!i),children:e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:e("path",{d:"M3 7V6a2 2 0 0 1 2-2h7l-2-2M13 9v1a2 2 0 0 1-2 2H4l2 2",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}),e("span",{className:"clover-canvas-transport-frames",children:[e("button",{type:"button",id:f,className:"clover-canvas-transport-time","aria-controls":u?g:void 0,"aria-expanded":u,onClick:()=>{u||o(false),M(!u)},children:[e("span",{"aria-live":"off",lang:l("framePosition"),children:b}),e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",children:e("path",{d:"M3 7.5l3-3 3 3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),u&&e(H,{id:g,triggerId:f,label:d("frameSeek"),labelLang:l("frameSeek"),language:c,choices:[w],selections:{frame:n},onSelect:(p,v)=>{o(false),r(v)},onClose:P})]})]})]})}function Z({renderer:t,frames:m,byFrame:c,animationKey:d,sceneVersion:l,autoplay:n,loop:a,onEnded:i,language:r}){const o=K(m,d,{autoplay:n,loop:a,onEnded:i,isReady:h=>(c[h]??[]).every(s=>t.isReady(s))});return L(()=>{const h=new Set(c[o.frame]??[]);t.setHidden(c.flat().filter(s=>!h.has(s)))},[t,c,o.frame,l]),e("div",{className:"clover-canvas-media","data-kind":"frames",children:e(U,{frames:m,animation:o,language:r})})}export{U as FrameControls,Z as default,K as useAnimation};
@@ -1 +0,0 @@
1
- import{A as L,b,y as w,u as e,P as N,z as C,d as I}from"./shared-YUjOSBKO.mjs";import{a as u}from"./index-B7nZdqLg.mjs";import{f as S,g as z,h as B,e as O}from"./hooks-BXzQSllm.mjs";import{L as v}from"./Label-D6aVJB9s.mjs";import{t as x}from"./heading-Cjt0f-Eu.mjs";import{T}from"./Tip-IO11xX4x.mjs";import{I as y}from"./Items-DRj1UEpC.mjs";import{Summary as j}from"./Primitives-XQO3m1wG.mjs";import{S as M}from"./Status-YbQK2KzY.mjs";import{R as $}from"./Root-Dj277K6p.mjs";u(41,"templates/shared/Lightbox","@layer clover{.clover-template-lightbox{width:min(96vw,72rem);max-height:94vh;padding:0;border:0;border-radius:var(--clover-radius, 3px);background:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e);box-shadow:0 8px 40px #00000059}.clover-template-lightbox::backdrop{background:#0009}.clover-template-lightbox-content{display:flex;flex-direction:column;gap:var(--clover-space-m);padding:var(--clover-inset);--clover-body-height: min(70vh, 48rem)}.clover-template-lightbox-pending{height:var(--clover-body-height, 60vh);background-color:#0001}.clover-template-lightbox-header{display:flex;align-items:center;gap:var(--clover-space-m)}.clover-template-lightbox-title{flex:1 1 auto;min-width:0;margin:0;font-size:var(--clover-text-l);font-weight:700}button.clover-template-lightbox-close{display:inline-flex;align-items:center;justify-content:center;width:var(--clover-control);height:var(--clover-control);padding:0;border:0;border-radius:var(--clover-radius-pill, 2rem);background:var(--clover-color-secondary-muted, #f1f1f1);color:inherit;cursor:pointer}button.clover-template-lightbox-close:is(:hover,:focus-visible){background:var(--clover-color-accent, #0065c3);color:var(--clover-color-control-glyph, #fff)}}");const k=()=>import("./LightboxBody-BzXQGMDn.mjs"),A=C(k),f=()=>void k();function G({open:o,onClose:t,headingLevel:c=3,className:i}){var g;const n=S(),s=z(),r=L(null),a=b().replace(/:/g,""),m=`${a}-title`,d=`${a}-manifest`,p=B((g=O())==null?void 0:g.label).text?m:d;return w(()=>{var h;const l=r.current;l&&(o&&!l.open&&((h=l.showModal)==null||h.call(l)),!o&&l.open&&l.close())},[o]),e("dialog",{ref:r,className:["clover-template-lightbox",i].filter(Boolean).join(" "),"aria-labelledby":p,onClose:t,onClick:l=>{l.target===r.current&&t()},children:o&&e("div",{className:"clover-template-lightbox-content",children:[e("header",{className:"clover-template-lightbox-header",children:[e(v,{of:"canvas",as:x(c,m).as,id:m,className:"clover-template-lightbox-title"}),p===d&&e(v,{id:d,hidden:true}),e("button",{type:"button",className:"clover-template-lightbox-close","aria-label":n("commonClose"),lang:s("commonClose"),onClick:t,children:[e("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:e("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),e(T,{label:n("commonClose")})]})]}),e(N,{fallback:e("div",{className:"clover-template-lightbox-body clover-template-lightbox-pending","aria-busy":"true"}),children:e(A,{})}),e(y,{layout:"pager"})]})})}u(43,"templates/gallery/Gallery","@layer clover{.clover-template-gallery{display:flex;flex-direction:column;gap:var(--clover-space-m);color:var(--clover-color-primary, #1a1d1e)}.clover-template-gallery-header{display:flex;flex-direction:column;gap:var(--clover-space-2xs)}.clover-template-gallery-title{margin:0;font-size:var(--clover-text-l);line-height:1.25;font-weight:700}.clover-template-gallery-summary{margin:0}}");const P=o=>o+1;function V({className:o,size:t,headingLevel:c=2,style:i,...n}){const[s,r]=I(false),a=x(c,`${b().replace(/:/g,"")}-title`);return e($,{className:["clover-template-gallery",o].filter(Boolean).join(" "),style:t?{...i,"--clover-items-size":t}:i,onPointerOver:f,onFocus:f,...a.group,...n,children:[e("header",{className:"clover-template-gallery-header",children:[e(v,{as:a.as,className:"clover-template-gallery-title",...a.title}),e(j,{className:"clover-template-gallery-summary"})]}),e(M,{}),e(y,{layout:"grid",onSelect:()=>r(true)}),e(G,{open:s,onClose:()=>r(false),headingLevel:P(c)})]})}export{V as Gallery};
@@ -1 +0,0 @@
1
- import{a as c,b as d,u as e}from"./shared-YUjOSBKO.mjs";import{T as h}from"./Tip-IO11xX4x.mjs";import"./styles-CyuM_fB1.mjs";function k({hidden:t,onChange:s,of:n}){const{t:a,langOf:o}=c(),i=d(),r=n?"annotationsHideTip":"annotationsHide";return e("label",{className:"clover-hide",children:[e("input",{type:"checkbox",checked:t,"aria-labelledby":n?`${i} ${n}`:i,onChange:l=>s(l.target.checked)}),e("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false",fill:"none",stroke:"currentColor",strokeWidth:40,strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M32 256s80-144 224-144 224 144 224 144-80 144-224 144S32 256 32 256z"}),e("circle",{cx:256,cy:256,r:72}),t&&e("path",{d:"M80 80l352 352"})]}),e("span",{id:i,hidden:true,lang:o(r),children:a(r)}),e(h,{label:a("annotationsHideTip"),lang:o("annotationsHideTip")})]})}export{k as H};
@@ -1 +0,0 @@
1
- import{o as T,u as r,d as O,J as kt,A as C,y as B,q as ct,D as Nt,K as _,z as Mt,P as xt,i as H,L as Et,E as It,M as dt,N as ft,a as Lt,b as Ct,v as At}from"./shared-YUjOSBKO.mjs";import{thumbnailSource as Pt,resolveThumbnail as St}from"./thumbnail-c2K_iQsD.mjs";import{u as Tt,N as $t}from"./useNearViewport-CtLyYg9n.mjs";import{h as qt,T as Rt}from"./Tip-IO11xX4x.mjs";import{ItemsPager as Bt}from"./Pager-Di_2hHM3.mjs";import{i as Dt,a as Ht}from"./items-CB2Uk7ts.mjs";import{j as Ot}from"./classnames-DukgfdpI.mjs";import{u as Ft}from"./useContainerName-BpJ3IWY0.mjs";import{a as Vt}from"./heading-Cjt0f-Eu.mjs";import{u as Kt}from"./useScrollTrack-WbG28FPD.mjs";import"./styles-CyuM_fB1.mjs";const ut='.clover-items-item[role="option"], .clover-items-link',R=new Map;let g=null,M=null,U=0;function G(t){const e=R.get(t);if(!e)return;const o=t.clientHeight>0&&t.scrollHeight>t.clientHeight+1;o!==e.cut&&(e.cut=o,e.change(o))}function W(){cancelAnimationFrame(U),U=requestAnimationFrame(()=>R.forEach((t,e)=>G(e)))}function mt(t){var n,c;if(t.key!=="Escape")return;const e=new Set,o=(c=(n=document.activeElement)==null?void 0:n.closest)==null?void 0:c.call(n,ut);o&&e.add(o);try{document.querySelectorAll(`:is(${ut}):hover`).forEach(l=>e.add(l))}catch{}const s=[...e].filter(l=>l.dataset.fullHidden===void 0&&l.querySelector(".clover-items-label-full"));s.length&&(t.preventDefault(),t.stopPropagation(),s.forEach(l=>qt(l,"fullHidden",["pointerenter",l===o?"blur":"focus"])))}function jt(){var t,e;g=typeof ResizeObserver>"u"?null:new ResizeObserver(o=>o.forEach(s=>G(s.target))),M=typeof MutationObserver>"u"?null:new MutationObserver(W),M==null||M.observe(document.head,{childList:true,subtree:true,characterData:true}),M==null||M.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",W),document.addEventListener("keydown",mt,true)}function Ut(){var t,e,o;cancelAnimationFrame(U),(t=g==null?void 0:g.disconnect)==null||t.call(g),M==null||M.disconnect(),g=M=null,(o=(e=document.fonts)==null?void 0:e.removeEventListener)==null||o.call(e,"loadingdone",W),document.removeEventListener("keydown",mt,true)}function Wt(t,e){var o;return R.size||jt(),R.set(t,{change:e}),(o=g==null?void 0:g.observe)==null||o.call(g,t),G(t),()=>{var s;R.delete(t),(s=g==null?void 0:g.unobserve)==null||s.call(g,t),R.size||Ut()}}function _t(t){const e=Math.max(0,Math.round(t)),o=Math.floor(e/3600),s=Math.floor(e%3600/60),n=String(e%60).padStart(2,"0");return o?`${o}:${String(s).padStart(2,"0")}:${n}`:`${s}:${n}`}function Gt(t,e,o,s){const n=Pt(t.resource),[c,l]=O(n==null?void 0:n.src),m=(n==null?void 0:n.src)??(n==null?void 0:n.service)??(n==null?void 0:n.fallback);return B(()=>{if(!n)return l(void 0);if(n.src)return l(n.src);if(!s)return;let d=true;return St(n,e,o).then(u=>{d&&l(u)}),()=>{d=false}},[m,e,s]),{src:c,none:!n}}const Jt=()=>r("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",children:[r("path",{d:"M232 416a24 24 0 01-14.9-5.2L125.8 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.8l91.3-74.8A24 24 0 01256 120v272a24 24 0 01-24 24z"}),r("path",{d:"M336 176a112 112 0 010 160M384 128a176 176 0 010 256",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]});function Yt({part:t,size:e,request:o,alt:s,altLang:n}){const[c,l]=O(null),m=Tt(c,$t,c==null?void 0:c.closest('[data-layout="slider"] .clover-items-viewport')),{src:d,none:u}=Gt(t,e,o,m),[a,v]=O(false),{width:p,height:x}=t.resource??{},E=p&&x?p/x:1;return r("span",{ref:l,className:"clover-items-picture","data-loaded":a,"data-empty":d?void 0:true,style:d&&!(p&&x)?void 0:{"--clover-items-ratio":E},children:[!d&&u&&kt(t.media)&&r(Jt,{}),d&&r("img",{src:d,alt:s,lang:s?n:void 0,width:e,height:Math.round(e/E),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>v(true),onError:()=>v(true)}),t.duration?r("span",{className:"clover-items-duration",children:_t(t.duration)}):null]})}function zt({text:t,lang:e,first:o}){const s=C(null),[n,c]=O(false);return B(()=>{const l=s.current;if(!(!l||!t))return Wt(l,c)},[t]),r("span",{className:"clover-items-label","data-clamped":n||void 0,children:[!o&&" ",r("span",{ref:s,className:"clover-items-label-text",lang:t?e:void 0,children:t}),n&&r("span",{className:"clover-items-label-full",lang:e,"aria-hidden":"true",hidden:true,children:t})]})}function Qt({item:t,size:e,language:o,request:s,showSummary:n=false}){var d,u;const c=t.parts.map(a=>T(t.parts.length===1?t.label:a.label,o)),l=n?T(t.summary,o):null,m=c.some(a=>a.text);return r("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(u=(d=t.parts[0])==null?void 0:d.media)==null?void 0:u.toLowerCase(),style:{"--parts":t.parts.length},children:[r("span",{className:"clover-items-pictures",children:t.parts.map((a,v)=>{const p=c[v].text?{text:""}:T(a.label,o);return r(Yt,{part:a,size:e,request:s,alt:p.text,altLang:p.lang},a.id)})}),(m||(l==null?void 0:l.text))&&r("figcaption",{className:"clover-items-caption",children:[c.map((a,v)=>r(zt,{text:a.text,lang:a.lang,first:v===0},t.parts[v].id)),(l==null?void 0:l.text)&&r("span",{className:"clover-items-summary",lang:l.lang,children:l.text.replace(/<[^>]*>/g,"")})]})]})}function Xt(t,e,{orientation:o="both",rtl:s=false,onActivate:n,onMove:c}={}){const[l,m]=O(Math.max(0,e)),d=C([]),u=C(n);u.current=n;const a=C(c);a.current=c,B(()=>{e>=0&&m(e)},[e]);const v=Math.min(l,Math.max(0,t-1)),p=ct(h=>{var w;m(h),(w=d.current[h])==null||w.focus()},[]),x=ct((h,w)=>{var P,k;const $=s?"ArrowLeft":"ArrowRight",F=s?"ArrowRight":"ArrowLeft",A=o!=="vertical",I=o!=="horizontal";let y=null;if(A&&h.key===$||I&&h.key==="ArrowDown")y=Math.min(t-1,w+1);else if(A&&h.key===F||I&&h.key==="ArrowUp")y=Math.max(0,w-1);else if(h.key==="Home")y=0;else if(h.key==="End")y=t-1;else if(h.key==="Enter"||h.key===" "){(P=u.current)==null||P.call(u,w,h),h.preventDefault();return}y!==null&&(h.preventDefault(),p(y),y!==w&&((k=a.current)==null||k.call(a,y,h)))},[t,o,s,p]);return{focused:v,itemProps:h=>({ref:w=>{d.current[h]=w},tabIndex:h===v?0:-1,onKeyDown:w=>x(w,h),onFocus:()=>m(h)})}}const ve=Nt(function(e,o){return!_()||e.iiifContent!==void 0||e.items!==void 0?r(xt,{fallback:null,children:r(Zt,{...e,forwardedRef:o})}):r(te,{...e,forwardedRef:o})}),Zt=Mt(()=>import("./StandaloneItems-BYaiyCca.mjs"));function te({of:t="views",...e}){return t==="members"?r(ee,{...e}):r(oe,{...e})}function ee({onSelect:t,forwardedRef:e,...o}){const{clover:s,language:n}=_(),c=H(u=>u.collection),l=H(u=>{var a;return((a=u.manifest)==null?void 0:a.id)??null}),m=Dt(c);if(!m.length)return null;const d=(u,a)=>{t==null||t(u,a),s.goToManifest(u.id)};if(o.layout==="pager"){const u=m.findIndex(a=>a.id===l);return r(vt,{...o,forwardedRef:e,steps:ht(m,u,"left-to-right",d)})}return r(pt,{...o,forwardedRef:e,items:m,selected:m.findIndex(u=>u.id===l),navigation:"id",language:n,request:s.request,showSummary:true,onActivate:d})}function oe({onSelect:t,forwardedRef:e,...o}){const{clover:s,language:n}=_(),c=H(a=>a.manifest),l=H(a=>Et(a.manifest,a.canvasId)),m=H(a=>It(a.manifest).direction),d=Ht(c);if(d.length<2)return null;const u=a=>s.goTo(a.id);return o.layout==="pager"?r(vt,{...o,forwardedRef:e,steps:ht(d,l,m,u)}):r(pt,{...o,forwardedRef:e,items:d,selected:l,navigation:"id",rtl:m==="right-to-left",language:n,request:s.request,onActivate:(a,v)=>{t==null||t(a,v),s.goTo(a.id)},followFocus:u})}function ht(t,e,o,s){return{position:e,total:t.length,direction:o,step:(n,c)=>{const l=t[e+n];l&&s(l,c)}}}function vt({steps:t,forwardedRef:e,layout:o,thumbnailSize:s,renderItem:n,header:c,headingLevel:l,request:m,language:d,navigation:u,of:a,...v}){const p=dt(e,v.lang);return r(ft.Provider,{value:p.hostLanguage,children:r(Bt,{...v,steps:t,forwardedRef:p.ref,hostLanguage:p.hostLanguage})})}function pt({forwardedRef:t,items:e,selected:o,navigation:s,rtl:n=false,layout:c="slider",thumbnailSize:l=200,request:m,language:d,showSummary:u=false,heading:a,headingLevel:v=2,renderItem:p,onActivate:x,followFocus:E,as:h="section",className:w,"aria-label":$,...F}){var st;const{t:A}=Lt(),I=Ct(),y=dt(t,F.lang),{langOf:P}=y,k=c==="slider",V=s==="id",q=Kt({align:V?"center":"start",itemCount:e.length}),j=C(void 0);B(()=>()=>window.clearTimeout(j.current),[]);const gt=Xt(e.length,o,{orientation:c==="slider"?"horizontal":c==="list"?"vertical":"both",rtl:n,onActivate:(i,f)=>x(e[i],f),onMove:E?(i,f)=>{window.clearTimeout(j.current);const b=()=>E(e[i]);f.repeat?j.current=window.setTimeout(b,150):b()}:void 0}),D=C(null),J=C(false);J.current=!!((st=D.current)!=null&&st.contains(D.current.ownerDocument.activeElement)),B(()=>{var S;const i=D.current;if(!i||!J.current)return;const{activeElement:f,body:b}=i.ownerDocument;f&&f!==b||(S=i.querySelector(`[data-track-index="${Math.max(0,o)}"]`))==null||S.focus()},[e]);const Y=C(false);B(()=>{var b;if(o<0)return;const i=!Y.current;if(Y.current=true,k){q.scrollToIndex(o,{instant:i});return}const f=(b=D.current)==null?void 0:b.querySelector(`[data-track-index="${o}"]`);f&&ne(f,i)},[k,o]);const bt=Vt(v),N=a?T(a.label,d):null,L=a?T(a.summary,d):null,z=$===void 0&&!!(N!=null&&N.text),Q=Ft(A("itemsLabel"),P("itemsLabel"),$!==void 0||z,y.hostLanguage),X=z?{"aria-labelledby":`${I}-title`}:$!==void 0?{"aria-label":$}:Q.props,Z=(i,f)=>p?p(i,{selected:f}):r(Qt,{item:i,size:l,language:d,request:m,showSummary:u}),tt=i=>!(p||T(i.label,d).text||u&&T(i.summary,d).text),et=(i,f)=>tt(i)?A("canvasPosition",{index:f+1,total:e.length}):void 0,ot=i=>tt(i)?P("canvasPosition"):void 0,nt=k?{display:"flex",margin:0,padding:0,listStyle:"none"}:void 0,rt=k?{flex:"0 0 auto",scrollSnapAlign:V?"center":"start"}:void 0,K=V&&o>=0,at=i=>{const f=o+(i==="prev"?-1:1),b=K?f>=0&&f<e.length:i==="prev"?q.canScrollPrev:q.canScrollNext,S=K?i==="prev"?"commonPrevious":"commonNext":i==="prev"?"itemsScrollBack":"itemsScrollForward",lt=A(S),wt=yt=>{if(!b)return;if(!K)return(i==="prev"?q.scrollPrev:q.scrollNext)();const it=e[f];E?E(it):x(it,yt)};return r("button",{type:"button",className:`clover-items-scroll-${i}`,"aria-controls":K?void 0:`${I}-viewport`,lang:P(S),"aria-disabled":!b||void 0,tabIndex:b?void 0:-1,onClick:wt,children:[r("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:r("path",{d:i==="next"!==n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),r("span",{style:At,children:lt}),r(Rt,{label:lt})]})};return r(ft.Provider,{value:y.hostLanguage,children:r(h,{ref:y.ref,className:Ot("clover-items",w),"data-layout":c,"data-navigation":s,...F,children:[a&&((N==null?void 0:N.text)||(L==null?void 0:L.text))&&r("header",{className:"clover-items-header",children:[(N==null?void 0:N.text)&&r(bt,{className:"clover-items-title",id:`${I}-title`,lang:N.lang,children:N.text}),(L==null?void 0:L.text)&&r("p",{className:"clover-items-description",lang:L.lang,children:L.text.replace(/<[^>]*>/g,"")}),a.homepage&&r("a",{className:"clover-items-homepage",href:a.homepage,lang:P("commonViewAll"),children:A("commonViewAll")})]}),r("div",{className:"clover-items-frame",style:{position:"relative"},dir:n?"rtl":void 0,children:[k&&at("prev"),r("div",{id:`${I}-viewport`,className:"clover-items-viewport",ref:k?q.ref:void 0,children:V?r("div",{ref:D,role:"listbox",...X,"aria-orientation":k?"horizontal":"vertical",className:"clover-items-track",style:nt,children:e.map((i,f)=>{const b=f===o;return r("div",{id:`${I}-${f}`,role:"option","aria-selected":b,"aria-label":et(i,f),lang:ot(i),className:"clover-items-item","data-track-index":f,style:rt,...gt.itemProps(f),onClick:S=>x(i,S),children:Z(i,b)},i.id)})}):r("ul",{...X,className:"clover-items-track",style:nt,children:e.map((i,f)=>r("li",{className:"clover-items-item","data-track-index":f,style:rt,children:r("a",{className:"clover-items-link",href:i.href,"aria-label":et(i,f),lang:ot(i),draggable:false,onClick:b=>x(i,b),children:Z(i,false)})},i.id))})}),k&&at("next")]}),Q.node]})})}function ne(t,e){var l;let o=t.parentElement;for(;o&&o!==document.body;){const{overflowY:m}=getComputedStyle(o);if(/(auto|scroll)/.test(m)&&o.scrollHeight>o.clientHeight)break;o=o.parentElement}if(!o||o===document.body)return;const s=o.getBoundingClientRect(),n=t.getBoundingClientRect(),c=n.top<s.top?n.top-s.top:n.bottom>s.bottom?n.bottom-s.bottom:0;c&&((l=o.scrollBy)==null||l.call(o,{top:c,behavior:e?"auto":"smooth"}))}export{ve as I,vt as P,pt as a,ht as s};
@@ -1 +0,0 @@
1
- import{D as b,Y as d,K as g,o as x,u as C,Z as L}from"./shared-YUjOSBKO.mjs";import{t as j}from"./text-BTAkxEfQ.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{u as P}from"./resource-DLHocQ1C.mjs";const N=b(function({of:r="manifest",label:t,as:i="span",className:c,...m},u){var l;const f=d(a=>{var n,s;return r==="canvas"?(n=L(a.manifest,a.canvasId))==null?void 0:n.label:(s=a.manifest)==null?void 0:s.label},void 0),o=P(),p=(l=g())==null?void 0:l.language,{text:e,lang:v}=x(t??(o?o.label:f),p);return e?C(i,{ref:u,className:O("clover-label",c),lang:v,...m,children:j(e)}):null});export{N as L};
@@ -1 +0,0 @@
1
- import{u as o}from"./shared-YUjOSBKO.mjs";import{B as t}from"./Body-DxSz3iST.mjs";function a(){return o(t,{className:"clover-template-lightbox-body"})}export{a as default};
@@ -1 +0,0 @@
1
- import{d as x,y as $,ao as Z,A as b,q as P,c as _,u as p,ag as J}from"./shared-YUjOSBKO.mjs";import{C as R}from"./CanvasView-BI3YzNdK.mjs";import{a as k,u as y}from"./fromManifest-BhemHaoA.mjs";import{i as K}from"./layout-mMHI0lsj.mjs";import{C as M}from"./Pending-BPOQ2z1L.mjs";import{B as tt}from"./BodyAlert-C8EOXz24.mjs";import{loadAnnotationSets as nt}from"./annotation-collection-Csv7WIlm.mjs";const at=()=>import("./shared-YUjOSBKO.mjs").then(e=>e.ar);function ft({iiifContent:e,onAnnotationLink:d,onReady:f,onMediaElement:i,placeholder:A=true,of:l,...r}){var z,D,E,G;const[n,c]=x({state:"loading"}),v=(z=r.options)==null?void 0:z.request,B=typeof e=="string"?e:String((e==null?void 0:e.id)??""),[h,N]=x(null),o=(h==null?void 0:h.key)===B?h:null;$(()=>{let a=true;return c(s=>s.state==="ready"?{...s,next:true}:{state:"loading"}),(async()=>{var H;const s=await Z((o==null?void 0:o.manifestId)??e,{request:v}),m=(s.manifest.items??[]).filter(w=>l?w.type===l:w.type!=="Scene"),g=(o==null?void 0:o.canvasId)??((H=s.target)==null?void 0:H.canvasId),I=m.find(w=>w.id===g)??m[0];if(!I)throw new Error(`It has no ${l??"Canvas"} to show.`);a&&c({state:"ready",content:s,canvas:I})})().catch(s=>{a&&c({state:"error",error:s instanceof Error?s:new Error(String(s))})}),()=>{a=false}},[B,o==null?void 0:o.manifestId,o==null?void 0:o.canvasId,v,l]);const t=n.state==="ready"?n:null,[Q,V]=x([]),C=!!r.annotations;$(()=>{if(V(s=>s.length?[]:s),!t||C)return;let a=true;return st(t.canvas,t.content,v).then(s=>{a&&s.length&&V(s)}).catch(()=>{}),()=>{a=false}},[t==null?void 0:t.canvas,t==null?void 0:t.content,v,C]);const U=a=>{var g;if(!t)return;const{manifest:s}=t.content,m=(g=s.items)==null?void 0:g.find(I=>I.id===a.canvasId);m?c({...t,canvas:m}):a.manifestId&&a.manifestId!==s.id&&N({...a,key:B,manifestId:a.manifestId})},S=((D=t==null?void 0:t.content.target)==null?void 0:D.canvasId)===(t==null?void 0:t.canvas.id)&&!!((E=t==null?void 0:t.content.target)!=null&&E.region||((G=t==null?void 0:t.content.target)==null?void 0:G.time)!==void 0),L=b(null),F=b(null),T=b(null),O=b(null);O.current=(t==null?void 0:t.canvas)??null;const u=P(()=>{const a=L.current;if(!a||!O.current)return;const s=K(O.current).length>0;k(a,F.current,T.current,s)&&(L.current=null)},[]);$(()=>{L.current=S?(t==null?void 0:t.content.target)??null:null,u()},[t==null?void 0:t.content,t==null?void 0:t.canvas,S,u]);const W=P(a=>{F.current=a,a.on("change",u),u(),f==null||f(a)},[u,f]),X=P(a=>{T.current=a,a&&u(),i==null||i(a)},[u,i]),j=t&&K(t.canvas).length?t.canvas:void 0,q=_(at,!!j),Y=y(t==null?void 0:t.content.manifest,j,r.language,(q==null?void 0:q.chaptersOf)??null);return n.state==="ready"?p(R,{...r,manifestId:n.next?"loading":n.content.manifest.id,canvases:[n.canvas],label:r.label??n.canvas.label??n.content.manifest.label,partOf:r.partOf??n.content.manifest.label,annotations:r.annotations??Q,onAnnotationLink:d??U,chapters:r.chapters??Y,placeholder:A&&!S,onReady:W,onMediaElement:X}):n.state==="error"?p(M,{children:p(tt,{error:n.error})}):p(M,{})}async function st(e,d,f){const i=e.annotations??[],A=i.filter(n=>Array.isArray(n==null?void 0:n.items)),l=i.filter(n=>!Array.isArray(n==null?void 0:n.items));return[...A.map((n,c)=>({id:n.id??`annotations-${c}`,label:n.label,entries:J(n,n.id??`annotations-${c}`,e.id)})),...l.length?await nt(l,{request:f}):[],...d.annotation?[{id:"content-state",entries:J({items:[d.annotation]},"content-state")}]:[],...d.annotationSets??[]].flatMap(n=>n.entries.filter(c=>c.canvasId===e.id).map(c=>({annotation:c.annotation,targetIndex:0,pageId:n.id,...n.label?{pageLabel:n.label}:{}})))}export{ft as default};
@@ -1 +0,0 @@
1
- import{u as o}from"./shared-YUjOSBKO.mjs";import{ConnectedMap as l}from"./MapView-CD5zkTs8.mjs";import{R as p}from"./Root-Dj277K6p.mjs";function m({iiifContent:t,request:a,language:e,forwardedRef:n,...r}){return o(p,{iiifContent:t,request:a,language:e,annotationPages:"all",style:{display:"contents"},children:o(l,{...r,scope:"all",forwardedRef:n})})}export{m as default};