@nulib/clover 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Canvas/CanvasView.mjs +37 -4
  3. package/dist/components/Canvas/ChaptersMenu.mjs +6 -1
  4. package/dist/components/Canvas/ControlMenu.mjs +9 -2
  5. package/dist/components/Canvas/Controls.mjs +17 -4
  6. package/dist/components/Canvas/FrameAnimation.mjs +3 -0
  7. package/dist/components/Canvas/ImageControls.mjs +8 -3
  8. package/dist/components/Canvas/Placeholder.mjs +5 -2
  9. package/dist/components/Canvas/RowFits.mjs +3 -1
  10. package/dist/components/Canvas/media/MediaBody.mjs +41 -10
  11. package/dist/components/Canvas/media/Player.mjs +3 -0
  12. package/dist/components/Canvas/media/SeekMarks.mjs +236 -0
  13. package/dist/components/Canvas/media/Transport.mjs +29 -3
  14. package/dist/components/Canvas/media/useMediaElement.mjs +54 -19
  15. package/dist/components/Items/masonry.mjs +2 -0
  16. package/dist/components/Map/MapView.mjs +42 -2
  17. package/dist/components/Map/maplibre-sheet.mjs +5 -0
  18. package/dist/components/Map/sheet.mjs +19 -0
  19. package/dist/components/Map/worker.mjs +28 -1
  20. package/dist/components/Scene/SceneView.mjs +3 -0
  21. package/dist/core/content-state.mjs +1 -11
  22. package/dist/core/load.mjs +9 -1
  23. package/dist/core/presentation.mjs +4 -5
  24. package/dist/core/sanitize.mjs +15 -3
  25. package/dist/core/svg-shape.mjs +2 -1
  26. package/dist/core/thumbnail.mjs +15 -4
  27. package/dist/core/trusted.mjs +26 -0
  28. package/dist/core/vtt.mjs +20 -9
  29. package/dist/index.d.mts +200 -1
  30. package/dist/index.mjs +11 -0
  31. package/dist/lib/renderer/CanvasRenderer.mjs +48 -7
  32. package/dist/lib/renderer/camera/CameraAnimator.mjs +39 -20
  33. package/dist/lib/renderer/input/GestureController.mjs +15 -5
  34. package/dist/map/index.d.mts +6 -1
  35. package/dist/styles/collection-select.css +1 -0
  36. package/dist/styles/core.css +1 -0
  37. package/dist/styles/default.css +1 -0
  38. package/dist/styles/items.css +1 -0
  39. package/dist/styles/map.css +1 -0
  40. package/dist/styles/media.css +1 -0
  41. package/dist/styles/panel.css +1 -0
  42. package/dist/styles/scene.css +1 -0
  43. package/dist/styles/split.css +1 -0
  44. package/dist/styles.css +1 -1
  45. package/dist/templates/default/Default.mjs +2 -0
  46. package/dist/templates/document/Document.mjs +12 -2
  47. package/dist/templates/document/Sheets.mjs +2 -0
  48. package/dist/templates/gallery/Gallery.mjs +3 -1
  49. package/dist/templates/index.d.mts +102 -6
  50. package/dist/templates/shared/Lightbox.mjs +50 -3
  51. package/dist/templates/shared/LightboxView.mjs +3 -1
  52. package/dist/templates.css +1 -1
  53. package/dist/ui/Button.mjs +3 -1
  54. package/dist/ui/ControlCluster.mjs +6 -3
  55. package/dist/ui/Markup.mjs +8 -7
  56. package/dist/ui/Tip.mjs +6 -1
  57. package/dist/ui/adoptSheet.mjs +19 -0
  58. package/dist/ui/sheets/map.mjs +5 -0
  59. package/dist/ui/sheets/media.mjs +5 -0
  60. package/dist/ui/sheets/scene.mjs +5 -0
  61. package/dist/web-components/{About-D1TBGGPL.mjs → About-j3O9cA3r.mjs} +1 -1
  62. package/dist/web-components/{AnnotationItems-DTacmRA9.mjs → AnnotationItems-U0WmWGOh.mjs} +1 -1
  63. package/dist/web-components/{AnnotationMenu-DYc9ekWS.mjs → AnnotationMenu-C1fAWWYy.mjs} +1 -1
  64. package/dist/web-components/{AnnotationState--5ghW0C2.mjs → AnnotationState-C9UhGpsr.mjs} +1 -1
  65. package/dist/web-components/{Annotations-Bvc_FmJ5.mjs → Annotations-BtJ4IVmy.mjs} +2 -2
  66. package/dist/web-components/{Annotations-BG8lPjk1.mjs → Annotations-YcFbQRJx.mjs} +1 -1
  67. package/dist/web-components/{Body-QQ1DmnbP.mjs → Body-Ccxmucbr.mjs} +1 -1
  68. package/dist/web-components/{BodyAlert-A4xRjOKr.mjs → BodyAlert-BBSStCpI.mjs} +1 -1
  69. package/dist/web-components/Button-Bphsp8rv.mjs +1 -0
  70. package/dist/web-components/{Camera-DqT_1MgD.mjs → Camera-DSk-YFpW.mjs} +1 -1
  71. package/dist/web-components/{Canvas2DBackend-TZtR3zHf.mjs → Canvas2DBackend-CYAJ-W6-.mjs} +1 -1
  72. package/dist/web-components/CanvasView-BAJ6OYvn.mjs +2 -0
  73. package/dist/web-components/{CaptionDetails-DMRWmtaY.mjs → CaptionDetails-Dg9Y11o_.mjs} +1 -1
  74. package/dist/web-components/ChaptersMenu-i4bFwR8c.mjs +1 -0
  75. package/dist/web-components/{Chevron-DFGbSGPI.mjs → Chevron-BnlK9F4K.mjs} +1 -1
  76. package/dist/web-components/{ChoiceMenu-C80kdxvq.mjs → ChoiceMenu-YXA7Ku8M.mjs} +1 -1
  77. package/dist/web-components/{Collection-B4CxBsFL.mjs → Collection-DgSFQbN-.mjs} +1 -1
  78. package/dist/web-components/{CollectionSelect-DO8YO2p7.mjs → CollectionSelect-PUcTh3Uv.mjs} +1 -1
  79. package/dist/web-components/{Connected-sYBn_9MK.mjs → Connected-B_caNIrW.mjs} +1 -1
  80. package/dist/web-components/{Connected-CcbVqzmj.mjs → Connected-XhRc6yaA.mjs} +1 -1
  81. package/dist/web-components/{Connected-DthCPaHl.mjs → Connected-YgL5BWf5.mjs} +1 -1
  82. package/dist/web-components/{Contents-AVPYYXht.mjs → Contents-CoC4TK6G.mjs} +1 -1
  83. package/dist/web-components/ControlMenu-CYfLg3Ok.mjs +1 -0
  84. package/dist/web-components/ControlsFade-BcGL7yUH.mjs +1 -0
  85. package/dist/web-components/CountMenu-C7XawAoa.mjs +1 -0
  86. package/dist/web-components/Cue-DZJ5TBKU.mjs +1 -0
  87. package/dist/web-components/Document-DZDYR2Tk.mjs +1 -0
  88. package/dist/web-components/{DomLayers-DlRapZ1u.mjs → DomLayers-Bbrulm6v.mjs} +1 -1
  89. package/dist/web-components/{Download-Ci_JUTVd.mjs → Download-CfRPt74Y.mjs} +1 -1
  90. package/dist/web-components/{EntryBodies-C0ICfS2R.mjs → EntryBodies-Bz8hyAUW.mjs} +1 -1
  91. package/dist/web-components/{EntryThumbnail-DxHhfRo_.mjs → EntryThumbnail-R9h0AXcu.mjs} +1 -1
  92. package/dist/web-components/{FieldPill-CVfeeafm.mjs → FieldPill-DFIdy-hn.mjs} +1 -1
  93. package/dist/web-components/{FrameAnimation-AZpVvu0R.mjs → FrameAnimation-DFDuFwwt.mjs} +1 -1
  94. package/dist/web-components/Gallery-BrYWLufL.mjs +1 -0
  95. package/dist/web-components/{HideToggle-0nlIo-f8.mjs → HideToggle-geO9QfFR.mjs} +1 -1
  96. package/dist/web-components/ImageControls-B9PhCHqi.mjs +1 -0
  97. package/dist/web-components/{Items-Drd82_Jj.mjs → Items-C7wjylgH.mjs} +1 -1
  98. package/dist/web-components/{Label-BIjqJ-_T.mjs → Label-S7o8PlWU.mjs} +1 -1
  99. package/dist/web-components/{LanguageChoice-DkSc-n6g.mjs → LanguageChoice-URJJAdah.mjs} +1 -1
  100. package/dist/web-components/LightboxView-65ROPr0_.mjs +1 -0
  101. package/dist/web-components/{ListEnd-pq-BgaDI.mjs → ListEnd-B0wGr87o.mjs} +1 -1
  102. package/dist/web-components/{Loaded-CSO5NFhm.mjs → Loaded-Do53YvYw.mjs} +1 -1
  103. package/dist/web-components/{LoadedCanvas-DK6xMmM1.mjs → LoadedCanvas-BrtGPpSm.mjs} +1 -1
  104. package/dist/web-components/LoadedMap-C06TIgvf.mjs +1 -0
  105. package/dist/web-components/{Loading-CoJLSRkv.mjs → Loading-Du3wn1EM.mjs} +1 -1
  106. package/dist/web-components/{Map-BEVtD52O.mjs → Map-B6LVO0gx.mjs} +1 -1
  107. package/dist/web-components/MapView-CzV3y5iI.mjs +3 -0
  108. package/dist/web-components/Markup-DACv7sRg.mjs +2 -0
  109. package/dist/web-components/MediaBody-CcuO5IZT.mjs +1 -0
  110. package/dist/web-components/MediaBody-DGd2uFfK.mjs +1 -0
  111. package/dist/web-components/{NavDate-CYNK0Qmp.mjs → NavDate-DRKmjc54.mjs} +1 -1
  112. package/dist/web-components/{Navigator-DrYPepzN.mjs → Navigator-CA8zB6CU.mjs} +1 -1
  113. package/dist/web-components/{Pager-CN4lHURv.mjs → Pager-DWp6u3iv.mjs} +1 -1
  114. package/dist/web-components/{PagerLayout-DeqnSQcF.mjs → PagerLayout-DHRpcI8x.mjs} +1 -1
  115. package/dist/web-components/{Panel-CFYUlXup.mjs → Panel-CzUDNn8M.mjs} +1 -1
  116. package/dist/web-components/PanelPart-DKb9dXm6.mjs +1 -0
  117. package/dist/web-components/{PanelToggle-9ud55NNI.mjs → PanelToggle-D5sx5FP9.mjs} +1 -1
  118. package/dist/web-components/{PartOfManifest-KUHUq-6q.mjs → PartOfManifest-Ct-I8Ofm.mjs} +1 -1
  119. package/dist/web-components/{Pending-mcmdyZPA.mjs → Pending-f1heQNo7.mjs} +1 -1
  120. package/dist/web-components/{PlaceBox-DX4ZLDat.mjs → PlaceBox-_an9ya_W.mjs} +1 -1
  121. package/dist/web-components/Placeholder-D4-VCxeD.mjs +1 -0
  122. package/dist/web-components/{Position-DO5qg5Sp.mjs → Position-DA4rzRiy.mjs} +1 -1
  123. package/dist/web-components/{Primitives-c9sIz0oQ.mjs → Primitives-DU_VhdO2.mjs} +1 -1
  124. package/dist/web-components/{Provider-a3xY016W.mjs → Provider-Dl_t_qEC.mjs} +1 -1
  125. package/dist/web-components/{ReadMore-D_WmmKEP.mjs → ReadMore-BpA8Dex8.mjs} +1 -1
  126. package/dist/web-components/Root-DixSZV9Y.mjs +1 -0
  127. package/dist/web-components/Scene-CSaXgBNr.mjs +1 -0
  128. package/dist/web-components/SceneView-BJNlboix.mjs +1 -0
  129. package/dist/web-components/{Search-BgxEW1UT.mjs → Search-CvpKzlYP.mjs} +1 -1
  130. package/dist/web-components/{Sections-DZVrhoAC.mjs → Sections-BhfcUyaf.mjs} +1 -1
  131. package/dist/web-components/SeekMarks-BfOrFnvQ.mjs +1 -0
  132. package/dist/web-components/{StandaloneItems-6cSw7nbF.mjs → StandaloneItems-CoiceHd8.mjs} +1 -1
  133. package/dist/web-components/{Status-DHTzuTkh.mjs → Status-B4327UOL.mjs} +1 -1
  134. package/dist/web-components/{Steps-Dkpy9KiJ.mjs → Steps-ACdXJZrV.mjs} +1 -1
  135. package/dist/web-components/TargetItems-D1bLKA_B.mjs +1 -0
  136. package/dist/web-components/Timeline-DY8LpnOG.mjs +1 -0
  137. package/dist/web-components/Tip-BatwzZZo.mjs +1 -0
  138. package/dist/web-components/{Transcript-WvFFAJQM.mjs → Transcript-B1nh9UJK.mjs} +1 -1
  139. package/dist/web-components/Transport-BsjGGbFJ.mjs +1 -0
  140. package/dist/web-components/Transport-DKb3XTMA.mjs +1 -0
  141. package/dist/web-components/{annotation-collection-BkC3nBPA.mjs → annotation-collection-CtxYL-V3.mjs} +1 -1
  142. package/dist/web-components/{annotation-name-Du2KAWoD.mjs → annotation-name-KQ4wAi8-.mjs} +1 -1
  143. package/dist/web-components/{annotations-content-CEzAS-P2.mjs → annotations-content-XVgQ5me7.mjs} +1 -1
  144. package/dist/web-components/{body-DPlfbLt3.mjs → body-CbYkzpmQ.mjs} +1 -1
  145. package/dist/web-components/{canvas-BUwBftJW.mjs → canvas-Du31_Dru.mjs} +1 -1
  146. package/dist/web-components/{cloverEngine-UNw5K4Xg.mjs → cloverEngine-CuRCXZNZ.mjs} +1 -1
  147. package/dist/web-components/{content-state-reader-GgQF2MvJ.mjs → content-state-reader-DLlBY4Ox.mjs} +1 -1
  148. package/dist/web-components/controlGlyphs-ClH59vLg.mjs +1 -0
  149. package/dist/web-components/{controls-CC9G5LxK.mjs → controls-smixEi0i.mjs} +1 -1
  150. package/dist/web-components/custom-elements.json +10 -2
  151. package/dist/web-components/{downloads-CmAYeEIz.mjs → downloads-BqkNwsM0.mjs} +1 -1
  152. package/dist/web-components/{dragToClose-DK-eM097.mjs → dragToClose-2joCF413.mjs} +1 -1
  153. package/dist/web-components/{engine-Dok0z8WP.mjs → engine-DNTgJBST.mjs} +1 -1
  154. package/dist/web-components/{engines-BD2IfwQF.mjs → engines-BpFZX2dO.mjs} +1 -1
  155. package/dist/web-components/{fetchManifest-tQXcfFiz.mjs → fetchManifest-B-poGgag.mjs} +1 -1
  156. package/dist/web-components/{fromManifest-BwQdeAuL.mjs → fromManifest-Dw3BwjHM.mjs} +1 -1
  157. package/dist/web-components/{glyphs-dp_HK3Ja.mjs → glyphs-VoJVEqLE.mjs} +1 -1
  158. package/dist/web-components/hooks-Syt1XLVX.mjs +1 -0
  159. package/dist/web-components/{image-layers-xcBsiad9.mjs → image-layers-ryUJ_0bq.mjs} +1 -1
  160. package/dist/web-components/{imageService-4sFnmAFX.mjs → imageService-DBU_Xks1.mjs} +1 -1
  161. package/dist/web-components/index-DGXCFoHu.mjs +1 -0
  162. package/dist/web-components/index.d.mts +4 -2
  163. package/dist/web-components/index.mjs +1 -1
  164. package/dist/web-components/{items-BUmOy2QY.mjs → items-BQPvL5D6.mjs} +1 -1
  165. package/dist/web-components/items-TIbaHoB8.mjs +1 -0
  166. package/dist/web-components/label-Bd-QYEXn.mjs +1 -0
  167. package/dist/web-components/{layout-B29v2RKK.mjs → layout-MzMKFa5I.mjs} +1 -1
  168. package/dist/web-components/{link-Ct5PpHEY.mjs → link-BUQQE9P2.mjs} +1 -1
  169. package/dist/web-components/logo-Cn820OoX.mjs +1 -0
  170. package/dist/web-components/maplibre-sheet-CfiZ6JFk.mjs +1 -0
  171. package/dist/web-components/masonry-BZCdA3bV.mjs +1 -0
  172. package/dist/web-components/{models-BXcT4ijX.mjs → models-wl-5vW2i.mjs} +1 -1
  173. package/dist/web-components/{nodes-BleXuYE6.mjs → nodes-CmOpA3s7.mjs} +1 -1
  174. package/dist/web-components/{overlayImage-BJtfot4Y.mjs → overlayImage-tb9-Md51.mjs} +1 -1
  175. package/dist/web-components/{panel-BxxV_JkD.mjs → panel-BPVyAugu.mjs} +1 -1
  176. package/dist/web-components/part-DeZI8Hmp.mjs +1 -0
  177. package/dist/web-components/{playerSurface-BXNLaFk0.mjs → playerSurface-BxxMV-va.mjs} +1 -1
  178. package/dist/web-components/pointer-BqgxBJ82.mjs +1 -0
  179. package/dist/web-components/{provider-CPp0Sgr_.mjs → provider-B9oAQG-u.mjs} +1 -1
  180. package/dist/web-components/{range-regions-DAaOu0IS.mjs → range-regions-BFB1374L.mjs} +1 -1
  181. package/dist/web-components/{read-more-lcqGslUd.mjs → read-more-oWPk0OLi.mjs} +1 -1
  182. package/dist/web-components/{readingLanguages-FyVsSWJ8.mjs → readingLanguages-BigCi6rZ.mjs} +1 -1
  183. package/dist/web-components/rendererSurface-B_OOhxzA.mjs +22 -0
  184. package/dist/web-components/{renderers-BFS7hFVU.mjs → renderers-CBupZj8Z.mjs} +1 -1
  185. package/dist/web-components/{resource-Bufu7lAr.mjs → resource-B6uUsU6D.mjs} +1 -1
  186. package/dist/web-components/{sanitize-qIOeyIww.mjs → sanitize-BedC_UE5.mjs} +3 -3
  187. package/dist/web-components/{save-file-CoknKOPz.mjs → save-file-BaIrLp1V.mjs} +1 -1
  188. package/dist/web-components/{search-5ocrsYmT.mjs → search-DaGpvTki.mjs} +1 -1
  189. package/dist/web-components/shared-D2RadIoz.mjs +1 -0
  190. package/dist/web-components/{show-link-DBaJj4s_.mjs → show-link-Cxylys81.mjs} +1 -1
  191. package/dist/web-components/{sizedImage-jnOGcIIZ.mjs → sizedImage-DchqGFdt.mjs} +1 -1
  192. package/dist/web-components/{split-P6J0qqf5.mjs → split-oaEIep3T.mjs} +1 -1
  193. package/dist/web-components/{status-honoOMNx.mjs → status-CfCgO5OB.mjs} +1 -1
  194. package/dist/web-components/styles-DZIDbHxL.mjs +1 -0
  195. package/dist/web-components/svg-shape-D1K-WNrY.mjs +1 -0
  196. package/dist/web-components/three.mjs +1 -1
  197. package/dist/web-components/thumbnail-D83GaQ8C.mjs +1 -0
  198. package/dist/web-components/{tip-BhNI83aT.mjs → tip-CMEBtCil.mjs} +1 -1
  199. package/dist/web-components/{toggle-CJKdi5KH.mjs → toggle-3NncfBSZ.mjs} +1 -1
  200. package/dist/web-components/trusted-Bvpx307M.mjs +1 -0
  201. package/dist/web-components/{useContainerName-_48Cdi0m.mjs → useContainerName-fp0-n_9x.mjs} +1 -1
  202. package/dist/web-components/{useControlsVisibility-CieBxGnK.mjs → useControlsVisibility-BYZlgiAt.mjs} +1 -1
  203. package/dist/web-components/useLazyPanelPane-DXYGGS7f.mjs +1 -0
  204. package/dist/web-components/{useNearViewport-B34ebmIW.mjs → useNearViewport-DMqMdvue.mjs} +1 -1
  205. package/dist/web-components/{useScrollTrack-DgRGFeP5.mjs → useScrollTrack-BHuPAWxB.mjs} +1 -1
  206. package/dist/web-components/viewer/{AnnotationItems-BNA_92Dv.mjs → AnnotationItems-B5Vs0dYi.mjs} +1 -1
  207. package/dist/web-components/viewer/{AnnotationMenu-BIQYVR4N.mjs → AnnotationMenu-BO18q_Ze.mjs} +1 -1
  208. package/dist/web-components/viewer/{AnnotationState-BbwQqA1U.mjs → AnnotationState-ZPmnCpbZ.mjs} +1 -1
  209. package/dist/web-components/viewer/{Annotations-P4XzAlNc.mjs → Annotations-C46kSUA6.mjs} +1 -1
  210. package/dist/web-components/viewer/{Annotations-CZzOZAFP.mjs → Annotations-DEKa_9xz.mjs} +2 -2
  211. package/dist/web-components/viewer/{Canvas2DBackend-DFfCzyjL.mjs → Canvas2DBackend-DHSI3dKr.mjs} +1 -1
  212. package/dist/web-components/viewer/{CaptionDetails-DPtE-RQQ.mjs → CaptionDetails-BVCqV9NT.mjs} +1 -1
  213. package/dist/web-components/viewer/ChaptersMenu-CIwIM2Pb.mjs +1 -0
  214. package/dist/web-components/viewer/{ChoiceMenu-GkqyTQRQ.mjs → ChoiceMenu-Ww7lcPnq.mjs} +1 -1
  215. package/dist/web-components/viewer/{Collection-DjY_6qa6.mjs → Collection-DCYM9eE6.mjs} +1 -1
  216. package/dist/web-components/viewer/{Connected-D5T-mtiy.mjs → Connected-Bbk8M5rE.mjs} +1 -1
  217. package/dist/web-components/viewer/{Connected-DIOuI3Mv.mjs → Connected-DAOMKtJR.mjs} +1 -1
  218. package/dist/web-components/viewer/{Contents-DV-VxXuf.mjs → Contents-BnRBx3rc.mjs} +1 -1
  219. package/dist/web-components/viewer/ControlMenu-Co6yBttc.mjs +1 -0
  220. package/dist/web-components/viewer/ControlsFade-pOQ5VQ5i.mjs +1 -0
  221. package/dist/web-components/viewer/CountMenu-lu21fO_7.mjs +1 -0
  222. package/dist/web-components/viewer/Cue-oaiVO9ZO.mjs +1 -0
  223. package/dist/web-components/viewer/Document-ByBRhL68.mjs +1 -0
  224. package/dist/web-components/viewer/{DomLayers-BCwCxPDU.mjs → DomLayers-BjxGaZkt.mjs} +1 -1
  225. package/dist/web-components/viewer/{Download-CL4IClAD.mjs → Download-DhMD4AJt.mjs} +1 -1
  226. package/dist/web-components/viewer/{EntryBodies-e40y47bl.mjs → EntryBodies-DL5UolEz.mjs} +1 -1
  227. package/dist/web-components/viewer/{EntryThumbnail-B_dP3w4o.mjs → EntryThumbnail-CJisDcni.mjs} +1 -1
  228. package/dist/web-components/viewer/{FieldPill-Hse1cDBE.mjs → FieldPill-DAk6zxxD.mjs} +1 -1
  229. package/dist/web-components/viewer/{FrameAnimation-CE218DCr.mjs → FrameAnimation-DGMuFNdW.mjs} +1 -1
  230. package/dist/web-components/viewer/Gallery-CbHhyWlF.mjs +1 -0
  231. package/dist/web-components/viewer/{HideToggle-CYoqe_ez.mjs → HideToggle-C6B9B2Bo.mjs} +1 -1
  232. package/dist/web-components/viewer/ImageControls-BDx7C1q5.mjs +1 -0
  233. package/dist/web-components/viewer/{LanguageChoice-BmO-322r.mjs → LanguageChoice-BM9xZr_D.mjs} +1 -1
  234. package/dist/web-components/viewer/LightboxView-RrioB0CN.mjs +1 -0
  235. package/dist/web-components/viewer/{ListEnd-DX1jsvJk.mjs → ListEnd-8vdKw6Py.mjs} +1 -1
  236. package/dist/web-components/viewer/MapView-G3yj-Bjd.mjs +3 -0
  237. package/dist/web-components/viewer/MediaBody-BokgnTO-.mjs +1 -0
  238. package/dist/web-components/viewer/MediaBody-DPOcyiYH.mjs +1 -0
  239. package/dist/web-components/viewer/{NavDate-BZgeaMG9.mjs → NavDate-B6rCV-Cd.mjs} +1 -1
  240. package/dist/web-components/viewer/{Navigator-Co76p-1n.mjs → Navigator-CjgUcgKY.mjs} +1 -1
  241. package/dist/web-components/viewer/{PagerLayout-tUkN1-FV.mjs → PagerLayout-LZmC6VpV.mjs} +1 -1
  242. package/dist/web-components/viewer/PanelPart-Cw1G5W4b.mjs +1 -0
  243. package/dist/web-components/viewer/{PartOfManifest-DXnbEPzS.mjs → PartOfManifest-B0TYADTv.mjs} +1 -1
  244. package/dist/web-components/viewer/{PlaceBox-xrJ4CGdN.mjs → PlaceBox-Cjdjg-_9.mjs} +1 -1
  245. package/dist/web-components/viewer/Placeholder-MYLjXbiF.mjs +1 -0
  246. package/dist/web-components/viewer/{Search-DTg1cHZ3.mjs → Search-CyRrBHsr.mjs} +1 -1
  247. package/dist/web-components/viewer/SeekMarks-1WSjARP5.mjs +1 -0
  248. package/dist/web-components/viewer/{StandaloneItems-BpBEQG8i.mjs → StandaloneItems-CQrzTSPC.mjs} +1 -1
  249. package/dist/web-components/viewer/{Steps-SpwMQdCL.mjs → Steps-Bd42-eq7.mjs} +1 -1
  250. package/dist/web-components/viewer/TargetItems-BpmZEVMS.mjs +1 -0
  251. package/dist/web-components/viewer/{Transcript-rTAhuXCF.mjs → Transcript-CE4BsnWd.mjs} +1 -1
  252. package/dist/web-components/viewer/Transport-1ROUkfsf.mjs +1 -0
  253. package/dist/web-components/viewer/Transport-g0_Cjy0f.mjs +1 -0
  254. package/dist/web-components/viewer/{annotation-collection-B7pZiLVk.mjs → annotation-collection-vM0aeJgP.mjs} +1 -1
  255. package/dist/web-components/viewer/annotation-name-kjUrGbhg.mjs +1 -0
  256. package/dist/web-components/viewer/{annotations-content-9AtLlPNn.mjs → annotations-content-CysDLy4t.mjs} +1 -1
  257. package/dist/web-components/viewer/{cloverEngine-jRrYLrWa.mjs → cloverEngine-S8GEd-YZ.mjs} +1 -1
  258. package/dist/web-components/viewer/{content-state-reader-CPvkju6Q.mjs → content-state-reader-BTZKS9Hq.mjs} +1 -1
  259. package/dist/web-components/viewer/{dragToClose-Co9kGk9q.mjs → dragToClose-Bt4QtVSO.mjs} +1 -1
  260. package/dist/web-components/viewer/{fetchManifest-D7N9WhhF.mjs → fetchManifest-D4aIqcDV.mjs} +1 -1
  261. package/dist/web-components/viewer/{host-DMD9LE4H.mjs → host-ClJe-BX1.mjs} +1 -1
  262. package/dist/web-components/viewer/{image-layers-x_shzPvu.mjs → image-layers-DGa5HJt8.mjs} +1 -1
  263. package/dist/web-components/viewer/index.mjs +1 -1
  264. package/dist/web-components/viewer/{link-DikPGzNO.mjs → link-CU71f0wU.mjs} +1 -1
  265. package/dist/web-components/viewer/{overlayImage-33kKKB0T.mjs → overlayImage-D9GHzMmm.mjs} +1 -1
  266. package/dist/web-components/viewer/{range-regions-TH6WWGTT.mjs → range-regions-CiceyEuu.mjs} +1 -1
  267. package/dist/web-components/viewer/{renderers-BxePmixF.mjs → renderers-2BgvLkI0.mjs} +1 -1
  268. package/dist/web-components/viewer/{save-file-QXKiPlST.mjs → save-file-BW7D7oYG.mjs} +1 -1
  269. package/dist/web-components/viewer/{search-B_NePyas.mjs → search-DBMO82DV.mjs} +1 -1
  270. package/dist/web-components/viewer/styles-DogZyfVz.mjs +1 -0
  271. package/dist/web-components/viewer/{useControlsVisibility-Cu-jTDzs.mjs → useControlsVisibility-DSSIzst5.mjs} +1 -1
  272. package/dist/web-components/viewer/useLazyPanelPane-_6IY7cV5.mjs +1 -0
  273. package/dist/web-components/viewer/viewer-ClQD1LNQ.mjs +29 -0
  274. package/dist/web-components/viewer/vtt-Dk5bwDVQ.mjs +5 -0
  275. package/dist/web-components/viewer-DLfZQmZs.mjs +1 -0
  276. package/dist/web-components/vtt-9Ui3h60h.mjs +5 -0
  277. package/dist/web-components/worker-C9aVbya_.mjs +1 -0
  278. package/package.json +2 -1
  279. package/dist/web-components/Button-Cx6VE_UW.mjs +0 -1
  280. package/dist/web-components/CanvasView-DxZASM9E.mjs +0 -2
  281. package/dist/web-components/ChaptersMenu-BAZVVDrK.mjs +0 -1
  282. package/dist/web-components/ControlMenu-BjJsWnuZ.mjs +0 -1
  283. package/dist/web-components/ControlsFade-C-6WhSxB.mjs +0 -1
  284. package/dist/web-components/CountMenu-Dx8D_RJZ.mjs +0 -1
  285. package/dist/web-components/Cue-xuo5dgKE.mjs +0 -1
  286. package/dist/web-components/Document-BWdafeEi.mjs +0 -1
  287. package/dist/web-components/Gallery-C2PTJmvN.mjs +0 -1
  288. package/dist/web-components/ImageControls-tKVAMpaj.mjs +0 -1
  289. package/dist/web-components/LightboxView-Cuqx2H1m.mjs +0 -1
  290. package/dist/web-components/LoadedMap-DmPH-LKY.mjs +0 -1
  291. package/dist/web-components/MapView-DHJcn9gW.mjs +0 -3
  292. package/dist/web-components/Markup-Hm6bWOjm.mjs +0 -2
  293. package/dist/web-components/MediaBody-BpgNtpKZ.mjs +0 -1
  294. package/dist/web-components/MediaBody-Co23JjUJ.mjs +0 -1
  295. package/dist/web-components/PanelPart-CpUIRbxr.mjs +0 -1
  296. package/dist/web-components/Placeholder-0hE8q-SY.mjs +0 -1
  297. package/dist/web-components/Root-CU1o0wje.mjs +0 -1
  298. package/dist/web-components/Scene-CboEeptc.mjs +0 -1
  299. package/dist/web-components/SceneView-hcc78jQT.mjs +0 -1
  300. package/dist/web-components/TargetItems-CyOI9_Z4.mjs +0 -1
  301. package/dist/web-components/Timeline-B9tD3Rar.mjs +0 -1
  302. package/dist/web-components/Tip-nJSTYquc.mjs +0 -1
  303. package/dist/web-components/Transport-FxLp_bdW.mjs +0 -1
  304. package/dist/web-components/Transport-VUxSEIQO.mjs +0 -1
  305. package/dist/web-components/hooks-C4dJ5K_D.mjs +0 -1
  306. package/dist/web-components/index-DspT4wUm.mjs +0 -1
  307. package/dist/web-components/items-CWMI53aN.mjs +0 -1
  308. package/dist/web-components/label-BGjL7I4b.mjs +0 -1
  309. package/dist/web-components/logo-BFstM-0a.mjs +0 -1
  310. package/dist/web-components/masonry-0QfzOgbB.mjs +0 -1
  311. package/dist/web-components/part-D4gjnYmT.mjs +0 -1
  312. package/dist/web-components/pointer-CJELU3gI.mjs +0 -1
  313. package/dist/web-components/rendererSurface-nh6-EfuZ.mjs +0 -22
  314. package/dist/web-components/shared-DFAX0n3B.mjs +0 -1
  315. package/dist/web-components/styles-BwkYiCLC.mjs +0 -1
  316. package/dist/web-components/svg-shape-DLY3g7oq.mjs +0 -1
  317. package/dist/web-components/thumbnail-EbURh-UM.mjs +0 -1
  318. package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +0 -1
  319. package/dist/web-components/viewer/ChaptersMenu-D6Jmujag.mjs +0 -1
  320. package/dist/web-components/viewer/ControlMenu-BsEpff6N.mjs +0 -1
  321. package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +0 -1
  322. package/dist/web-components/viewer/CountMenu-DCmA6HdK.mjs +0 -1
  323. package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +0 -1
  324. package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +0 -1
  325. package/dist/web-components/viewer/Gallery-F2sVj4ph.mjs +0 -1
  326. package/dist/web-components/viewer/ImageControls-C2G4x2Es.mjs +0 -1
  327. package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +0 -1
  328. package/dist/web-components/viewer/MapView-Df0wZjCh.mjs +0 -3
  329. package/dist/web-components/viewer/MediaBody-CataNonO.mjs +0 -1
  330. package/dist/web-components/viewer/MediaBody-SkIgrEMj.mjs +0 -1
  331. package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +0 -1
  332. package/dist/web-components/viewer/Placeholder-B1AcizHL.mjs +0 -1
  333. package/dist/web-components/viewer/TargetItems-B6Icep5k.mjs +0 -1
  334. package/dist/web-components/viewer/Transport-vKIDALE-.mjs +0 -1
  335. package/dist/web-components/viewer/Transport-z_kdVisw.mjs +0 -1
  336. package/dist/web-components/viewer/annotation-name-BKj1O9lA.mjs +0 -1
  337. package/dist/web-components/viewer/styles-Bedyz7_l.mjs +0 -1
  338. package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +0 -1
  339. package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +0 -29
  340. package/dist/web-components/viewer/vtt-CUn4h5JB.mjs +0 -5
  341. package/dist/web-components/viewer-DN2Mo3vc.mjs +0 -1
  342. package/dist/web-components/vtt-C5M5WPSG.mjs +0 -5
  343. package/dist/web-components/worker-CjXN0dku.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{a as Se,A as h,d as R,_ as J,T as Ee,u as e,P as Ce,z as we,ah as B,l as w,ab as Pe,y as Fe,k as ie}from"./shared-D2RadIoz.mjs";import{u as Ie,g as Oe,a as Me,b as de,l as $e,s as Be,T as D,P as Re,c as Ve,V as Ae,d as Ke,C as xe,F as De,e as Le,E as ze,f as Ue,p as _e}from"./Transport-BsjGGbFJ.mjs";import{imageSource as je}from"./thumbnail-D83GaQ8C.mjs";import{u as qe,P as Xe,E as Ze}from"./EntryThumbnail-R9h0AXcu.mjs";import{j as Ge}from"./classnames-DukgfdpI.mjs";import{l as pe}from"./languageCode-cCpiU0b0.mjs";import{T as fe,S as me}from"./Tip-BatwzZZo.mjs";import{u as Je}from"./useContainerName-fp0-n_9x.mjs";import{u as Qe,t as We}from"./pointer-BqgxBJ82.mjs";import"./styles-DZIDbHxL.mjs";const Ye=we(()=>import("./SeekMarks-BfOrFnvQ.mjs").then(({SeekMarks:r})=>({default:r}))),He=".clover-canvas-transport-marks",en=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:je(r==null?void 0:r.thumbnail);function ve(r,i){var g;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const m=(g=r[f])==null?void 0:g.end;return m!==void 0&&i>=m?-1:f}let G;function nn(){if(G===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,G=r.volume===.5}return G}function tn({id:r,label:i,labelLang:f,button:m,icon:g,active:P,current:k,options:F,selected:V,onSelect:c,request:L,asMenu:I=false}){const[d,p]=R(false),T=h(null),O=h(null),M=h(null),$=h(false),y=Je(i,f),N=F.some(a=>pe(a.language));Pe(d,()=>p(false));const A=()=>{var a;p(false),(a=O.current)==null||a.focus()};return Fe(()=>{if(!d)return;const a=o=>{var s,t,S;if(o instanceof KeyboardEvent){if(o.key!=="Escape")return;(s=T.current)!=null&&s.contains(document.activeElement)&&(o.preventDefault(),(t=O.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(o.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),J(()=>{const a=M.current,o=T.current,s=o==null?void 0:o.closest(".clover-canvas-transport"),t=o==null?void 0:o.closest(".clover-canvas-media");if(!d||!a||!o||!s||!t)return;const S=()=>_e(a,o,s,t);S();const b=new ResizeObserver(S);return b.observe(t),b.observe(s),b.observe(a),()=>b.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var s;const o=a.relatedTarget;d&&o instanceof Node&&!((s=T.current)!=null&&s.contains(o))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":m,onClick:()=>p(a=>!a),ref:O,type:"button",children:[g,e(fe,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&y.node,d&&e("fieldset",{...y.props,className:Ge("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:M,children:F.map((a,o)=>{const s=pe(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===o,name:r,onChange:()=>c(o),onClick:()=>{$.current&&A()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(o),A())},type:"radio"}),a.time&&e(ie,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(s?e(ie,{children:[e("span",{className:"clover-canvas-transport-code",children:s})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===o&&e(Ze,{source:a.thumbnail,request:L,large:true})]},o)})})]})}const rn=r=>r.querySelector(":scope > .clover-tip"),an=r=>{try{return r.matches(":focus-visible")}catch{return false}},gn=({instance:r,controller:i,kind:f,captions:m,activeCaption:g,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:L=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:O,onMarkSelect:M,onMarkActivate:$})=>{var oe,se;const{t:y,langOf:N}=Se(),A=Qe()||f==="video",a=h(null);Ie(a);const{paused:o,currentTime:s,duration:t,buffered:S,muted:b,volume:z}=i,E=ve(c,s),[U,ge]=R(-1),[Q,ye]=R(0),W=h(-1),_=n=>{var l;W.current!==n&&(W.current=n,ge(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Y,H]=R(false),[K,j]=R(false),v=K?U:Y?E:-1,ee=(K||Y)&&t>0,be=qe(en(c[v]),Xe,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===L),ne=h(null);J(()=>{const n=ne.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&v>=0?rn(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[v]);const x=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},he=o?"playerPlay":"playerPause",te={label:y("playerCaptionsOff"),lang:N("playerCaptionsOff")},ke=b?"playerUnmute":"playerMute",Te=F?"imageExitFullScreen":"imageFullScreen",re=t?s/t*100:0,X=Ee(()=>{const n=Oe(c,t);return n.length?Me(n):void 0},[c,t]),Ne=t?S/t*100:0,Z=k&&A,C=h(null),ae=h(null);return J(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())},[m.length,c.length,Z]),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ne,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(He)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Be(n.currentTarget,n.clientX)*t;j(true),ye(Math.floor(u)),_(ve(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:ee?{"--clover-transport-preview":de(v>=0?x(v).left+x(v).width/2:(K?Q:s)/t*100)}:void 0,children:[M&&T.length>0&&e(Ce,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:O,onSelect:M,onActivate:$})}),e("input",{"aria-label":y("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(s)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>H(an(n.currentTarget)),onBlur:()=>H(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${re}%`,"--clover-transport-loaded":`${Ne}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":re/100}},type:"range",value:s}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:de(x(q).left),width:$e(x(q).width)}}),ee&&e(fe,{lead:B(K?Q:s),label:((oe=c[v])==null?void 0:oe.label)??"",lang:(se=c[v])==null?void 0:se.lang,image:v>=0?be:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(D,{words:he,button:o?"play":"pause",shortcut:me.play,onClick:i.toggle,buttonRef:ae,children:o?e(Re,{}):e(Ve,{})}),e(D,{words:ke,button:"mute",shortcut:me.mute,onClick:i.toggleMute,children:b||z===0?e(Ae,{}):e(Ke,{})}),nn()&&e("input",{"aria-label":y("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(b?0:z)*100}%`},type:"range",value:b?0:z}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{"aria-label":y("playerCurrentTime"),...w(N("playerCurrentTime")),children:B(s)}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{"aria-label":y("playerDuration"),...w(N("playerDuration")),children:B(t)})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(m.length>0||Z||p)&&e("div",{className:"clover-canvas-transport-end",children:[m.length>0&&e(tn,{id:`${r}-captions`,label:y("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(xe,{on:g>=0}),active:g>=0,current:m[g]??te,options:[te,...m],selected:g+1,onSelect:n=>P(n-1)}),p&&e(D,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(De,{}):e(Le,{})}),Z&&e(D,{words:Te,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(ze,{}):e(Ue,{})})]})]})]})};export{gn as T,en as a,ve as c};
@@ -1 +1 @@
1
- import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-DFAX0n3B.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function x(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=y(e,s);d.length&&a.push({id:s,label:u(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{x as loadAnnotationSets};
1
+ import{S as l,az as g,ax as y,aA as u,ay as f}from"./shared-D2RadIoz.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function x(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=y(e,s);d.length&&a.push({id:s,label:u(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{x as loadAnnotationSets};
@@ -1 +1 @@
1
- import{t as d,V as p}from"./shared-DFAX0n3B.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
1
+ import{t as d,V as p}from"./shared-D2RadIoz.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
@@ -1 +1 @@
1
- import{loadAnnotationSets as f}from"./annotation-collection-BkC3nBPA.mjs";import{G as i,aB as l,ar as c}from"./shared-DFAX0n3B.mjs";async function y(n,a){const s={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:s})),r=o.flatMap(t=>t.entries),e=r.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??r.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
1
+ import{loadAnnotationSets as f}from"./annotation-collection-CtxYL-V3.mjs";import{G as i,aB as l,aq as c}from"./shared-D2RadIoz.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
@@ -1 +1 @@
1
- import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-DFAX0n3B.mjs";import{B as h}from"./Body-QQ1DmnbP.mjs";import{u as y,P as L}from"./nodes-BleXuYE6.mjs";import{Toggle as b}from"./toggle-CJKdi5KH.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
1
+ import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-D2RadIoz.mjs";import{B as h}from"./Body-Ccxmucbr.mjs";import{u as y,P as L}from"./nodes-CmOpA3s7.mjs";import{Toggle as b}from"./toggle-3NncfBSZ.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
@@ -1 +1 @@
1
- import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-DFAX0n3B.mjs";import{C as b}from"./CanvasView-DxZASM9E.mjs";import{r as s}from"./rendererSurface-nh6-EfuZ.mjs";import{C as i}from"./Pending-mcmdyZPA.mjs";const h=c(()=>import("./Connected-sYBn_9MK.mjs")),B=c(()=>import("./LoadedCanvas-DK6xMmM1.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
1
+ import{O as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-D2RadIoz.mjs";import{C as b}from"./CanvasView-BAJ6OYvn.mjs";import{r as s}from"./rendererSurface-B_OOhxzA.mjs";import{C as i}from"./Pending-f1heQNo7.mjs";const h=c(()=>import("./Connected-B_caNIrW.mjs")),B=c(()=>import("./LoadedCanvas-BrtGPpSm.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
@@ -1,4 +1,4 @@
1
- import{c as ne,F as ae,i as se,M as ie}from"./models-BXcT4ijX.mjs";import{au as ce,a1 as ue}from"./shared-DFAX0n3B.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
1
+ import{c as ne,F as ae,i as se,M as ie}from"./models-wl-5vW2i.mjs";import{au as ce,a1 as ue}from"./shared-D2RadIoz.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
2
2
  layout(location = 0) in vec3 aPosition;
3
3
  layout(location = 1) in vec3 aNormal;
4
4
  layout(location = 2) in vec2 aUv;
@@ -1 +1 @@
1
- import{S as l,a9 as g}from"./shared-DFAX0n3B.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),o=atob(n);try{return decodeURIComponent(o)}catch{const a=Uint8Array.from(o,s=>s.charCodeAt(0));return new TextDecoder().decode(a)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const o=n();if(o&&typeof o=="object")return o}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function h(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const o=typeof t.id=="string"?t.id:"content-state",a=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${o}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return a.length>1?{...n,targets:{id:o,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:a}}:n}function m(t,e){const n=g(t),o=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,a=o.type;if(a==="Manifest"||a==="Collection"){const c=a==="Manifest"?u(o):void 0;return c?{id:c.id,type:"Collection",manifestId:n.id}:{id:n.id,type:a}}const s=l(t.selector).find(c=>(c==null?void 0:c.type)==="PointSelector"&&c.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=l(o.partOf).find(c=>(c==null?void 0:c.id)&&(!c.type||c.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:a??"Canvas",target:d,...f}}export{I as decodeContentState,h as resolveContentState};
1
+ import{S as l,a8 as g}from"./shared-D2RadIoz.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),o=atob(n);try{return decodeURIComponent(o)}catch{const a=Uint8Array.from(o,s=>s.charCodeAt(0));return new TextDecoder().decode(a)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const o=n();if(o&&typeof o=="object")return o}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function h(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const o=typeof t.id=="string"?t.id:"content-state",a=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${o}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return a.length>1?{...n,targets:{id:o,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:a}}:n}function m(t,e){const n=g(t),o=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,a=o.type;if(a==="Manifest"||a==="Collection"){const c=a==="Manifest"?u(o):void 0;return c?{id:c.id,type:"Collection",manifestId:n.id}:{id:n.id,type:a}}const s=l(t.selector).find(c=>(c==null?void 0:c.type)==="PointSelector"&&c.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=l(o.partOf).find(c=>(c==null?void 0:c.id)&&(!c.type||c.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:a??"Canvas",target:d,...f}}export{I as decodeContentState,h as resolveContentState};
@@ -0,0 +1 @@
1
+ import{u as t,k as o}from"./shared-D2RadIoz.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("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"}),l=()=>t("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"}),d=()=>t("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"}),h=()=>t(o,{children:[t("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"}),t("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"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("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});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
@@ -1 +1 @@
1
- import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-DFAX0n3B.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
1
+ import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-D2RadIoz.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
@@ -272,6 +272,14 @@
272
272
  "text": "CloverRenderer[] | null"
273
273
  },
274
274
  "description": "Renderers of yours, for its Body: each claims views (canvasId, format or match) and draws one into a box of its own (render), returning what undoes it."
275
+ },
276
+ {
277
+ "kind": "field",
278
+ "name": "canvasOptions",
279
+ "type": {
280
+ "text": "CloverCanvasOptions | null"
281
+ },
282
+ "description": "Default, Document and Gallery: the Body's Canvas options (its gestures, zoom limits and motion), the Gallery's in its lightbox."
275
283
  }
276
284
  ],
277
285
  "events": [
@@ -550,7 +558,7 @@
550
558
  "type": {
551
559
  "text": "CloverControlButtons | null"
552
560
  },
553
- "description": "The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover."
561
+ "description": "The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. Where zoom in, zoom out or reset would do nothing, its props carry aria-disabled and no click handler: spread them."
554
562
  },
555
563
  {
556
564
  "kind": "field",
@@ -2286,7 +2294,7 @@
2286
2294
  "type": {
2287
2295
  "text": "CloverControlButtons | null"
2288
2296
  },
2289
- "description": "The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover."
2297
+ "description": "The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. Where zoom in, zoom out or reset would do nothing, its props carry aria-disabled and no click handler: spread them."
2290
2298
  },
2291
2299
  {
2292
2300
  "kind": "field",
@@ -1 +1 @@
1
- import{e as i,c as f,n as d,S as u,t as g,Y as h}from"./shared-DFAX0n3B.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
1
+ import{e as i,c as f,n as d,S as u,t as g,Y as h}from"./shared-D2RadIoz.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
@@ -1 +1 @@
1
- import{g as _}from"./viewer-DN2Mo3vc.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
1
+ import{g as _}from"./viewer-DLfZQmZs.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
@@ -1,4 +1,4 @@
1
- import{a0 as jc}from"./shared-DFAX0n3B.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-BXcT4ijX.mjs";/**
1
+ import{a0 as jc}from"./shared-D2RadIoz.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-wl-5vW2i.mjs";/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -1 +1 @@
1
- const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-UNw5K4Xg.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
1
+ const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-CuRCXZNZ.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
@@ -1 +1 @@
1
- import{S as h,a8 as m,a9 as x,ar as I}from"./shared-DFAX0n3B.mjs";import{b as S}from"./imageService-4sFnmAFX.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=S(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};
1
+ import{S as h,a7 as m,a8 as x,aq as I}from"./shared-D2RadIoz.mjs";import{b as q}from"./imageService-DBU_Xks1.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=q(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};
@@ -1 +1 @@
1
- import{T as f,t as d}from"./shared-DFAX0n3B.mjs";function c(e,u,n,o){return f(()=>((o==null?void 0:o(e??null,(u==null?void 0:u.id)??null,u==null?void 0:u.duration))??[]).map(t=>{const i=d(t.label,n);return{...t.id?{id:t.id}:{},label:i.text,lang:i.lang,start:t.start,end:t.end,...t.thumbnail?{thumbnail:t.thumbnail}:{}}}),[e,u,n,o])}function m(e,u,n,o){if(e.region){if(!u)return false;const{x:t,y:i,w:l,h:s}=e.region;if(!u.fitCanvasRect(e.canvasId,{x:t,y:i,width:l,height:s},true))return false}if(o&&(e.time!==void 0||e.autoplay)){if(!n)return false;const t=()=>{e.time!==void 0&&(n.currentTime=e.time),e.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?t():n.addEventListener("loadedmetadata",t,{once:true})}return true}export{m as a,c as u};
1
+ import{T as f,t as d}from"./shared-D2RadIoz.mjs";function c(e,u,n,o){return f(()=>((o==null?void 0:o(e??null,(u==null?void 0:u.id)??null,u==null?void 0:u.duration))??[]).map(t=>{const i=d(t.label,n);return{...t.id?{id:t.id}:{},label:i.text,lang:i.lang,start:t.start,end:t.end,...t.thumbnail?{thumbnail:t.thumbnail}:{}}}),[e,u,n,o])}function m(e,u,n,o){if(e.region){if(!u)return false;const{x:t,y:i,w:l,h:s}=e.region;if(!u.fitCanvasRect(e.canvasId,{x:t,y:i,width:l,height:s},true))return false}if(o&&(e.time!==void 0||e.autoplay)){if(!n)return false;const t=()=>{e.time!==void 0&&(n.currentTime=e.time),e.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?t():n.addEventListener("loadedmetadata",t,{once:true})}return true}export{m as a,c as u};
@@ -1 +1 @@
1
- import{u as e,k as o}from"./shared-DFAX0n3B.mjs";const t=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),c=()=>e(o,{children:[e("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),e("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),s=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),r=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),h=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),d=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),l=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{a as C,s as I,d as O,r as P,c as a,t as b,h as c,l as d};
1
+ import{u as e,k as o}from"./shared-D2RadIoz.mjs";const t=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),c=()=>e(o,{children:[e("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),e("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),s=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),r=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),h=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),d=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),l=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{a as C,s as I,d as O,r as P,c as a,t as b,h as c,l as d};
@@ -0,0 +1 @@
1
+ import{c as e,T as o,e as i,ae as r,Z as f,af as l,ag as v,F as u,n as g,a as c,t as d}from"./shared-D2RadIoz.mjs";function C(){const n=e(a=>a.status),s=e(a=>a.error);return o(()=>({status:n,error:s}),[n,s])}function S(){return e(n=>n.manifest)}function b(){return e(n=>u(n.manifest))}function p(){return e(n=>g(n.manifest,n.canvasId))}function z(){return e(n=>f(n.manifest,n.canvasId))}function A(){const{clover:n}=i("useNavigation"),s=e(t=>v(t.manifest,t.canvasId)),a=e(t=>u(t.manifest).views.length);return o(()=>r(n,s,a),[n,s,a])}function I(){return e(n=>l(n.manifest,n.addedSets))}function L(n){const{language:s}=i("useLocalized");return o(()=>d(n,s),[n,s])}function O(){return c().t}function T(){return c().langOf}export{p as a,C as b,A as c,b as d,S as e,z as f,O as g,T as h,L as i,I as u};
@@ -1 +1 @@
1
- import{F as I,S as u,a8 as L,a9 as $,ax as P}from"./shared-DFAX0n3B.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function F(t){const c=new Map;for(const e of I(t).canvases)k(e,c);return[...c.values()]}function k(t,c){u(t.items).forEach((e,s)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!L(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?u(r.items):[r]).forEach((o,x)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,A=w?{key:j(t.id,d.id,s,f,y),item:x,image:o.id}:void 0,M=P(n,l,t.id).map(p=>{const h=q(p.annotation,o),b=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),S=Math.round(h.w*(a.w/h.width)),g=Math.round(h.h*(a.h/h.height)),N=`${t.id}#xywh=${b},${E},${S},${g}`;return{...p,canvasId:t.id,target:$(N),annotation:{...p.annotation,target:N},...A?{layer:A}:{}}});if(!M.length)continue;let m=c.get(l);m||(m={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,m)),m.entries.push(...M)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,d={x:0,y:0,w:e,h:s,width:e,height:s},f=u(t==null?void 0:t.target)[0],r=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(r==null?void 0:r.region)=="string"?r.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,x,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:x/100*s,w:n/100*e,h:l/100*s,width:e,height:s}:{x:o,y:x,w:n,h:l,width:e,height:s}}const w=$(f).rect;return w?{...w,width:e,height:s}:d}export{F as imageLayers};
1
+ import{F as I,S as u,a7 as L,a8 as $,ax as P}from"./shared-D2RadIoz.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function F(t){const c=new Map;for(const e of I(t).canvases)k(e,c);return[...c.values()]}function k(t,c){u(t.items).forEach((e,s)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!L(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?u(r.items):[r]).forEach((o,x)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,A=w?{key:j(t.id,d.id,s,f,y),item:x,image:o.id}:void 0,M=P(n,l,t.id).map(p=>{const h=q(p.annotation,o),b=Math.round(a.x+h.x*(a.w/h.width)),E=Math.round(a.y+h.y*(a.h/h.height)),S=Math.round(h.w*(a.w/h.width)),g=Math.round(h.h*(a.h/h.height)),N=`${t.id}#xywh=${b},${E},${S},${g}`;return{...p,canvasId:t.id,target:$(N),annotation:{...p.annotation,target:N},...A?{layer:A}:{}}});if(!M.length)continue;let m=c.get(l);m||(m={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,m)),m.entries.push(...M)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,d={x:0,y:0,w:e,h:s,width:e,height:s},f=u(t==null?void 0:t.target)[0],r=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(r==null?void 0:r.region)=="string"?r.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,x,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:x/100*s,w:n/100*e,h:l/100*s,width:e,height:s}:{x:o,y:x,w:n,h:l,width:e,height:s}}const w=$(f).rect;return w?{...w,width:e,height:s}:d}export{F as imageLayers};
@@ -1 +1 @@
1
- import{a1 as j}from"./shared-DFAX0n3B.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,O as b,L as f,P as i};
1
+ import{a1 as j}from"./shared-D2RadIoz.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,O as b,L as f,P as i};
@@ -0,0 +1 @@
1
+ var $=Object.defineProperty;var U=(e,t,o)=>t in e?$(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var l=(e,t,o)=>U(e,typeof t!="symbol"?t+"":t,o);let L;function V(e){L=e}function Ke(){return L}function H(e={}){return import("./shared-D2RadIoz.mjs").then(t=>t.aI).then(t=>t.initCloverI18n(e))}const A=new Map,T=new Set;function Qe(e,t,o,n=false){if(!A.has(t)){A.set(t,{index:e,css:o,unlayered:n});for(const p of T)p.place(t,e,o,n)}}const W=e=>`@layer clover,maplibre;@layer maplibre{${e}}`;function B(e){var t,o;return((t=e.querySelector('meta[property="csp-nonce"]'))==null?void 0:t.nonce)||((o=e.querySelector("script[nonce]"))==null?void 0:o.nonce)||""}class F{constructor(t){l(this,"injected",new Set);l(this,"unlayered",new Set);l(this,"nonce");l(this,"adopted",null);this.doc=t,this.nonce=B(t),T.add(this),A.forEach(({index:o,css:n,unlayered:p},a)=>this.place(a,o,n,p))}inject(t,o){if(this.injected.has(t))return;if(this.injected.add(t),this.adopted)return this.adopt(-1,t,o);const n=this.style(t,o);this.doc.head.prepend(n),this.check(n)}place(t,o,n,p=false){if(this.injected.has(t))return;if(this.injected.add(t),p&&this.unlayered.add(t),this.adopted)return this.adopt(o,t,n);const a=this.style(t,n);a.dataset.cloverIndex=String(o);const u=[...this.doc.head.querySelectorAll("style[data-clover-index]")],m=u.filter(g=>Number(g.dataset.cloverIndex)<o).at(-1),y=u.find(g=>Number(g.dataset.cloverIndex)>o),r=this.doc.head.querySelectorAll("style[data-clover]");m?m.after(a):y?y.before(a):r.length?r[r.length-1].after(a):this.doc.head.prepend(a),this.check(a)}style(t,o){const n=this.doc.createElement("style");return n.dataset.clover=t,this.nonce&&(n.nonce=this.nonce),n.textContent=o,n}check(t){if(!(t.sheet||!("adoptedStyleSheets"in this.doc))){this.adopted=[];for(const o of this.doc.head.querySelectorAll("style[data-clover]"))this.adopt(Number(o.dataset.cloverIndex??-1),o.dataset.clover??"",o.textContent??""),o.remove()}}adopt(t,o,n){const p=this.doc.defaultView??window,a=new p.CSSStyleSheet;a.replaceSync(this.unlayered.has(o)?W(n):n);const u=this.adopted,m=u.findIndex(r=>r.index>t);u.splice(m===-1?u.length:m,0,{index:t,sheet:a});const y=new Set(u.map(r=>r.sheet));this.doc.adoptedStyleSheets=[...u.map(r=>r.sheet),...this.doc.adoptedStyleSheets.filter(r=>!y.has(r))]}}const P=new WeakMap;function q(e){let t=P.get(e);return t||P.set(e,t=new F(e)),t}const z="@layer clover{:is(clover-root,clover-items,clover-viewer,clover-panel,clover-read-more):not([hidden]){display:block}:is(clover-body,clover-canvas,clover-timeline,clover-scene):not([hidden]){display:block;height:var(--clover-body-height,60vh)}clover-split:not([hidden]){display:flex}:is(clover-label,clover-panel-toggle):not([hidden]){display:contents}clover-tab,clover-tip,clover-status>[slot]{display:none}}";let J=null,k=null;const _=()=>J??(J=import("./shared-D2RadIoz.mjs").then(e=>e.aJ).then(e=>k=e)),K=e=>e.trim().toLowerCase()==="false";function Q(e,{type:t,min:o},n){if(e===null)return;if(t==="string")return e;if(t==="boolean")return!K(e);if(t==="number"){const a=Number(e);if(e.trim()===""||!Number.isFinite(a)){n("is not a number");return}if(o!==void 0&&a<o){n(`is less than ${o}`);return}return a}if(t==="data"){const a=e.trim();if(!/^[[{"]/.test(a))return e;try{return JSON.parse(a)}catch{n("is not JSON");return}}const p=e.trim().toLowerCase();if(t.includes(p))return p==="false"?false:p;n(`is not ${t.join(", ")}`)}const G=(e,t)=>{const o=Object.keys(e);return o.length===Object.keys(t).length&&o.every(n=>Object.is(e[n],t[n]))};function Y(e){class t extends HTMLElement{constructor(){super(...arguments);l(this,"kind",e.kind)}static get observedAttributes(){return Object.keys(e.attributes)}connectedCallback(){q(this.ownerDocument).inject("elements",z)}}customElements.define(e.tag,t)}function Z(e,t){if(typeof customElements>"u"||customElements.get(e.tag))return;if(e.kind==="config"||!t)return Y(e);const o=e.kind,n=e.properties??[],p=Object.entries(e.events??{});let a=null,u=null;const m=()=>u??(u=Promise.all([t().then(r=>a=r),_()]));class y extends HTMLElement{constructor(){super(...arguments);l(this,"kind",o);l(this,"needsRoot",!!e.needsRoot);l(this,"values",{});l(this,"kept",{});l(this,"props",{});l(this,"listeners",new Set);l(this,"warned",new Set);l(this,"handlers",Object.fromEntries(p.map(([i,s])=>[s.prop,(...h)=>{var C;if(s.keeps&&(this.kept[s.keeps]=h[0]??null,h[0]==null))return true;const f=s.detail==="first"?h[0]:Object.fromEntries(s.detail.map((b,N)=>[b,h[N]])),S=new CustomEvent(i,{detail:f,bubbles:!s.keeps,composed:!s.keeps,cancelable:!!s.cancelable}),E=this.dispatchEvent(S);if(!E&&s.cancelable){const b=h[h.length-1];(C=b==null?void 0:b.preventDefault)==null||C.call(b)}return E}])));l(this,"getProps",()=>this.props);l(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}))}static get observedAttributes(){return Object.keys(e.attributes)}get element(){return this}get Component(){return a}connectedCallback(){for(const i of n){if(!Object.prototype.hasOwnProperty.call(this,i))continue;const s=this[i];delete this[i],s!=null&&(this.values[i]=s)}this.update(),this.warnOfAria(),q(this.ownerDocument).inject("elements",z),m().then(()=>{this.isConnected&&k.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||k==null||k.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!e.native)for(const i of["aria-label","aria-labelledby","role"])!this.hasAttribute(i)||this.warned.has(i)||(this.warned.add(i),console.warn(`<${e.tag}>: ${i} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const i={...this.handlers,...this.values};for(const[s,h]of Object.entries(e.attributes)){if(h.prop in this.values)continue;const f=this.getAttribute(s),S=Q(f,h,E=>{const C=`${s}=${f}`;this.warned.has(C)||(this.warned.add(C),console.warn(`<${e.tag}>: ${s}="${f}" ${E}; ignored.`))});S!==void 0&&(i[h.prop]=S)}G(i,this.props)||(this.props=i,this.listeners.forEach(s=>s()))}}l(y,"initCloverI18n",H);for(const r of n)Object.defineProperty(y.prototype,r,{configurable:true,enumerable:true,get(){return r in this.values?this.values[r]:this.getProps()[r]},set(g){g==null?delete this.values[r]:this.values[r]=g,this.update()}});for(const[,r]of p){if(!r.keeps)continue;const g=r.keeps;Object.defineProperty(y.prototype,g,{configurable:true,enumerable:true,get(){return this.kept[g]??null}})}customElements.define(e.tag,y)}const X={tag:"clover-panel",kind:"part",needsRoot:true,attributes:{layout:{prop:"layout",type:["tabs","accordion"]},value:{prop:"value",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},sections:{prop:"sections",type:"data"},labels:{prop:"labels",type:"data"},closable:{prop:"closable",type:"boolean"},"close-on-escape":{prop:"closeOnEscape",type:"boolean"},as:{prop:"as",type:["aside","div"]}},events:{"clover-value-change":{prop:"onValueChange",detail:["value"]},"clover-close":{prop:"onClose",detail:[],cancelable:true}}},ee={tag:"clover-tab",kind:"config",attributes:{value:{prop:"value",type:"string"},label:{prop:"label",type:"string"}},slots:["label"]},te={tag:"clover-panel-toggle",kind:"part",attributes:{controls:{prop:"controls",type:"string"}},events:{"clover-open-change":{prop:"onOpenChange",detail:["open"],cancelable:true}}},oe={tag:"clover-split",kind:"part",native:true,attributes:{"storage-key":{prop:"storageKey",type:"string"}}},ne={tag:"clover-split-pane",kind:"part",native:true,attributes:{size:{prop:"size",type:"string"},min:{prop:"min",type:"string"},max:{prop:"max",type:"string"},name:{prop:"name",type:"string"}}},re={tag:"clover-split-handle",kind:"part",native:true,attributes:{}},M={"clover-ready":{prop:"onReady",detail:["handle"],keeps:"handle"}},O={"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}},ae={tag:"clover-canvas",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},src:{prop:"src",type:"string"},tiled:{prop:"isTiledImage",type:"boolean"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"viewing-direction":{prop:"viewingDirection",type:["left-to-right","right-to-left","top-to-bottom","bottom-to-top"]},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["iiifContent","canvases","src","annotations","options","controlButtons","controls"],events:{...M,...O,"clover-annotation-select":{prop:"onAnnotationSelect",detail:["id"]},"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},ie={tag:"clover-timeline",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"}},properties:["iiifContent","timeline","annotations","options","controls"],events:{...O,"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},se={tag:"clover-scene",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},engine:{prop:"engine",type:["clover","three"]}},properties:["iiifContent","scene","options","controls"],events:{...O}},le={tag:"clover-body",kind:"part",needsRoot:true,attributes:{controls:{prop:"controls",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["controls","options","controlButtons","renderers"],events:{...M,...O,"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},pe={tag:"clover-items",kind:"part",attributes:{layout:{prop:"layout",type:["slider","list","grid","masonry","pager"]},secondary:{prop:"secondary",type:["summary","navDate","none"]},size:{prop:"size",type:["large","small"]},of:{prop:"of",type:["views","members","targets","annotations"]},navigation:{prop:"navigation",type:["id","homepage"]},"iiif-content":{prop:"iiifContent",type:"string"},header:{prop:"header",type:"boolean"},"heading-level":{prop:"headingLevel",type:"number",min:2},"thumbnail-size":{prop:"thumbnailSize",type:"number",min:1},"single-item":{prop:"singleItem",type:"boolean"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","items","request","renderItem"],events:{"clover-select":{prop:"onSelect",detail:["item"],cancelable:true}}},ce=["h1","h2","h3","h4","h5","h6","span","label","figcaption","p","strong","em","div"],de={tag:"clover-label",kind:"part",attributes:{of:{prop:"of",type:["manifest","canvas"]},as:{prop:"as",type:ce},label:{prop:"label",type:"data"}},properties:["label"]},ue={prop:"of",type:["manifest","canvas"]},D={prop:"value",type:"data"},d=(e,t={})=>({tag:e,kind:"part",attributes:{of:ue,value:D,...t},properties:["value"]}),ge=d("clover-summary",{as:{prop:"as",type:["p","div","span"]}}),he={...d("clover-metadata"),properties:["value","renderValue"]},ve=d("clover-required-statement"),ye=d("clover-rights"),me=d("clover-id"),be=d("clover-homepage"),fe=d("clover-rendering"),Ce=d("clover-see-also"),ke=d("clover-part-of"),we=d("clover-thumbnail",{size:{prop:"size",type:"number",min:1},alt:{prop:"alt",type:"string"}}),Se=d("clover-provider",{link:{prop:"link",type:["false"]}}),Ee=d("clover-logo",{alt:{prop:"alt",type:"string"}}),Oe={tag:"clover-value",kind:"part",attributes:{value:D,format:{prop:"format",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},as:{prop:"as",type:["span","p","div"]}},properties:["value"]},Re={tag:"clover-root",kind:"root",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"canvasId",type:"string"},"manifest-id":{prop:"manifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"annotation-pages":{prop:"annotationPages",type:["view","all"]},lang:{prop:"lang",type:"string"}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-ready":{prop:"onReady",detail:["clover"],keeps:"clover"},"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},w={"heading-level":{prop:"headingLevel",type:"number",min:1}},I={of:{prop:"of",type:["views","members","targets"]}},Ae={tag:"clover-status",kind:"part",needsRoot:true,attributes:{loading:{prop:"loading",type:["false"]}},slots:["loading","error"]},Ie={tag:"clover-position",kind:"part",needsRoot:true,attributes:{...I,as:{prop:"as",type:["span","p","div"]}}},Pe={tag:"clover-next",kind:"part",needsRoot:true,attributes:I},je={tag:"clover-previous",kind:"part",needsRoot:true,attributes:I},xe={tag:"clover-download",kind:"part",needsRoot:true,attributes:w},Le={tag:"clover-search",kind:"part",needsRoot:true,attributes:{...w,sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},Te={tag:"clover-contents",kind:"part",needsRoot:true,attributes:{}},qe={tag:"clover-transcript",kind:"part",needsRoot:true,attributes:{follow:{prop:"follow",type:"boolean"},find:{prop:"find",type:"boolean"},sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},ze={tag:"clover-annotations",kind:"part",needsRoot:true,attributes:{scope:{prop:"scope",type:["view","all"]},...w},properties:["renderEntry"]},Me={tag:"clover-collection",kind:"part",needsRoot:true,attributes:w},De={tag:"clover-collection-select",kind:"part",needsRoot:true,attributes:{},events:{"clover-change":{prop:"onChange",detail:["manifestId"]}}},Ne={tag:"clover-about",kind:"part",needsRoot:true,attributes:{"canvas-summary":{prop:"canvasSummary",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},thumbnail:{prop:"thumbnail",type:"boolean"},label:{prop:"label",type:"boolean"},...w}},$e={tag:"clover-map",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},overlay:{prop:"overlay",type:"boolean"},"overlay-opacity":{prop:"overlayOpacity",type:"number",min:0},"style-url":{prop:"styleUrl",type:"string"},"scroll-zoom":{prop:"scrollZoom",type:"boolean"},credits:{prop:"credits",type:"boolean"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","navPlace","georeferences","request"],events:{"clover-select":{prop:"onSelect",detail:["feature"]}}},Ue={tag:"clover-read-more",kind:"part",attributes:{}},Ve={tag:"clover-tip",kind:"part",attributes:{label:{prop:"label",type:"string"},lang:{prop:"lang",type:"string"},keys:{prop:"keys",type:"string"},glyph:{prop:"glyph",type:"string"}},properties:["shortcut"]},He={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","masonry","false"]},"single-item":{prop:"singleItem",type:"boolean"},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"panel-sections":{prop:"panelSections",type:"data"},"panel-labels":{prop:"panelLabels",type:"data"},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},"collapse-controls":{prop:"collapseControls",type:["auto","always"]},size:{prop:"size",type:"string"},height:{prop:"height",type:"string"},gap:{prop:"gap",type:"string"},secondary:{prop:"secondary",type:["summary","navDate","none"]},summary:{prop:"summary",type:"boolean"},"lightbox-items":{prop:"lightboxItems",type:["slider","pager"]}},properties:["iiifContent","annotations","request","renderers","canvasOptions"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},j=[He,Re,le,de,pe,Ie,je,Pe,Ae,we,ge,he,ve,ye,be,Ce,fe,ke,me,Se,Ee,Oe,Ne,ze,Me,De,Te,Le,qe,xe,$e,X,ee,te,oe,ne,re,ae,ie,se,Ve,Ue],c=(e,t,o)=>()=>Promise.all([e(),import("./part-DeZI8Hmp.mjs")]).then(([n,{drawn:p}])=>p(n[t],o)),R=e=>()=>import("./split-oaEIep3T.mjs").then(t=>t[e]),v=e=>c(()=>import("./Primitives-DU_VhdO2.mjs"),e),x=e=>c(()=>import("./Pager-DWp6u3iv.mjs"),e),We={"clover-viewer":()=>import("./viewer-DLfZQmZs.mjs").then(e=>e.v).then(e=>e.ViewerElement),"clover-root":()=>import("./shared-D2RadIoz.mjs").then(e=>e.aM).then(e=>e.RootElement),"clover-label":()=>import("./label-Bd-QYEXn.mjs").then(e=>e.LabelElement),"clover-body":()=>import("./body-CbYkzpmQ.mjs").then(e=>e.BodyElement),"clover-items":()=>import("./items-TIbaHoB8.mjs").then(e=>e.ItemsElement),"clover-position":c(()=>import("./Position-DA4rzRiy.mjs"),"Position"),"clover-previous":x("Previous"),"clover-next":x("Next"),"clover-status":()=>import("./status-CfCgO5OB.mjs").then(e=>e.StatusElement),"clover-thumbnail":v("Thumbnail"),"clover-summary":v("Summary"),"clover-metadata":c(()=>import("./Primitives-DU_VhdO2.mjs"),"Metadata",["renderValue"]),"clover-required-statement":v("RequiredStatement"),"clover-rights":v("Rights"),"clover-homepage":v("Homepage"),"clover-see-also":v("SeeAlso"),"clover-rendering":v("Rendering"),"clover-part-of":v("PartOf"),"clover-id":v("Id"),"clover-provider":()=>import("./provider-B9oAQG-u.mjs").then(e=>e.ProviderElement),"clover-logo":()=>import("./logo-Cn820OoX.mjs").then(e=>e.LogoElement),"clover-value":v("Value"),"clover-about":c(()=>import("./About-j3O9cA3r.mjs").then(e=>e.a),"About"),"clover-annotations":c(()=>import("./Annotations-BtJ4IVmy.mjs"),"Annotations",["renderEntry"]),"clover-collection":c(()=>import("./Collection-DgSFQbN-.mjs"),"Collection"),"clover-collection-select":c(()=>import("./CollectionSelect-PUcTh3Uv.mjs"),"CollectionSelect"),"clover-contents":c(()=>import("./Contents-CoC4TK6G.mjs"),"Contents"),"clover-search":c(()=>import("./Search-CvpKzlYP.mjs"),"Search"),"clover-transcript":c(()=>import("./Transcript-B1nh9UJK.mjs"),"Transcript"),"clover-download":c(()=>import("./Download-CfRPt74Y.mjs"),"Download"),"clover-map":c(()=>import("./Map-B6LVO0gx.mjs"),"CloverMap"),"clover-panel":()=>import("./panel-BPVyAugu.mjs").then(e=>e.PanelElement),"clover-panel-toggle":()=>import("./toggle-3NncfBSZ.mjs").then(e=>e.PanelToggleElement),"clover-split":R("SplitElement"),"clover-split-pane":R("SplitPaneElement"),"clover-split-handle":R("SplitHandleElement"),"clover-canvas":()=>import("./canvas-Du31_Dru.mjs").then(e=>e.CanvasElement),"clover-timeline":c(()=>import("./Timeline-DY8LpnOG.mjs"),"Timeline"),"clover-scene":c(()=>import("./Scene-CSaXgBNr.mjs"),"Scene"),"clover-tip":()=>import("./tip-CMEBtCil.mjs").then(e=>e.TipElement),"clover-read-more":()=>import("./read-more-oWPk0OLi.mjs").then(e=>e.ReadMoreElement)};function Be(e,t=j.map(({tag:o})=>o)){e.mapWorkerUrl&&V(e.mapWorkerUrl);for(const o of j)t.includes(o.tag)&&Z(o,We[o.tag])}const Fe=""+new URL("assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,Je={mapWorkerUrl:Fe};Be(Je);export{Qe as a,Be as d,Ke as g,H as i};
@@ -355,6 +355,8 @@ export interface CloverViewerElement extends HTMLElement {
355
355
  request: { credentials?: RequestCredentials; headers?: Record<string, string>; fetch?: typeof fetch } | null;
356
356
  /** Renderers of yours, for its Body: each claims views (canvasId, format or match) and draws one into a box of its own (render), returning what undoes it. */
357
357
  renderers: CloverRenderer[] | null;
358
+ /** Default, Document and Gallery: the Body's Canvas options (its gestures, zoom limits and motion), the Gallery's in its lightbox. */
359
+ canvasOptions: CloverCanvasOptions | null;
358
360
  }
359
361
 
360
362
  /** The root of a layout of your own: it loads what it is given, holds the current view, and gives every part inside it the same state. The page's markup inside it stays as written. */
@@ -379,7 +381,7 @@ export interface CloverBodyElement extends HTMLElement {
379
381
  controls: boolean | { zoom?: boolean; fullPage?: boolean; rotation?: boolean; reset?: boolean; annotations?: boolean; information?: boolean; map?: boolean; [option: string]: unknown } | null;
380
382
  /** The Canvas's options: the request it loads with (credentials, headers, a fetch of your own), its gestures and more. */
381
383
  options: { request?: { credentials?: RequestCredentials; headers?: Record<string, string>; fetch?: typeof fetch }; [key: string]: unknown } | null;
382
- /** The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. */
384
+ /** The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. Where zoom in, zoom out or reset would do nothing, its props carry aria-disabled and no click handler: spread them. */
383
385
  controlButtons: CloverControlButtons | null;
384
386
  /** Renderers of yours for this Body only, in place of the root's: each claims views (canvasId, format or match) and draws one into a box of its own (render). */
385
387
  renderers: CloverRenderer[] | null;
@@ -583,7 +585,7 @@ export interface CloverCanvasElement extends HTMLElement {
583
585
  annotations: Array<{ id: string; target: string; label?: string; [key: string]: unknown }> | null;
584
586
  /** The Canvas's options: the request it loads with (credentials, headers, a fetch of your own), its gestures and more. */
585
587
  options: { request?: { credentials?: RequestCredentials; headers?: Record<string, string>; fetch?: typeof fetch }; [key: string]: unknown } | null;
586
- /** The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. */
588
+ /** The Body's controls, each replaced by a button you make: a function given the control's name, label and Clover's icon, returning the button. Clover keeps it named, keyed and in its state, presses the control with it, and adds its popover. Where zoom in, zoom out or reset would do nothing, its props carry aria-disabled and no click handler: spread them. */
587
589
  controlButtons: CloverControlButtons | null;
588
590
  /** Which of the Body's controls it shows, as Canvas's controls takes it: false for none, or some ({ rotation: false }), in place of the attribute. */
589
591
  controls: boolean | { zoom?: boolean; fullPage?: boolean; rotation?: boolean; reset?: boolean; annotations?: boolean; information?: boolean; map?: boolean; [option: string]: unknown } | null;
@@ -1 +1 @@
1
- import{d as n,i as o}from"./index-DspT4wUm.mjs";export{n as defineCloverElements,o as initCloverI18n};
1
+ import{d as n,i as o}from"./index-DGXCFoHu.mjs";export{n as defineCloverElements,o as initCloverI18n};
@@ -1 +1 @@
1
- import{S as p,Y as l,F as g,t as r,ad as v}from"./shared-DFAX0n3B.mjs";function h(t){var i;return(i=v(t).find(({body:a})=>a.type))==null?void 0:i.body.type}function y(t){const i=h(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:i}}const d=new WeakMap;function w(t){if(!t)return[];let i=d.get(t);if(!i){const{canvases:a,views:e}=g(t);i=e.map(u=>{const n=u.map(s=>y(a[s]));return{id:n[0].id,parts:n,label:n.length===1?n[0].label:{none:[n.map(s=>r(s.label).text).filter(Boolean).join(" \u2013 ")]}}}),d.set(t,i)}return i}const f=new WeakMap;function o(t){if(!t)return[];let i=f.get(t);return i||(i=p(t.items).filter(a=>a==null?void 0:a.id).map(a=>{var e;return{id:a.id,parts:[y(a)],label:a.label,summary:a.summary,...typeof a.navDate=="string"?{navDate:a.navDate}:{},href:((e=p(a.homepage)[0])==null?void 0:e.id)??a.id,...l(p(a.homepage)[0])?{hrefLang:l(p(a.homepage)[0])}:{}}}),f.set(t,i)),i}function A(t){return t?Array.isArray(t)?o({items:t}):t.type==="Collection"?o(t):w(t):[]}export{w as a,A as b,o as i};
1
+ import{S as p,Y as l,F as g,t as r,ac as v}from"./shared-D2RadIoz.mjs";function h(t){var i;return(i=v(t).find(({body:a})=>a.type))==null?void 0:i.body.type}function y(t){const i=h(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:i}}const f=new WeakMap;function w(t){if(!t)return[];let i=f.get(t);if(!i){const{canvases:a,views:e}=g(t);i=e.map(u=>{const n=u.map(s=>y(a[s]));return{id:n[0].id,parts:n,label:n.length===1?n[0].label:{none:[n.map(s=>r(s.label).text).filter(Boolean).join(" \u2013 ")]}}}),f.set(t,i)}return i}const d=new WeakMap;function o(t){if(!t)return[];let i=d.get(t);return i||(i=p(t.items).filter(a=>a==null?void 0:a.id).map(a=>{var e;return{id:a.id,parts:[y(a)],label:a.label,summary:a.summary,...typeof a.navDate=="string"?{navDate:a.navDate}:{},href:((e=p(a.homepage)[0])==null?void 0:e.id)??a.id,...l(p(a.homepage)[0])?{hrefLang:l(p(a.homepage)[0])}:{}}}),d.set(t,i)),i}function A(t){return t?Array.isArray(t)?o({items:t}):t.type==="Collection"?o(t):w(t):[]}export{w as a,A as b,o as i};
@@ -0,0 +1 @@
1
+ import{T as m,u as r}from"./shared-D2RadIoz.mjs";import{I as o}from"./Items-C7wjylgH.mjs";import{w as n}from"./nodes-CmOpA3s7.mjs";function I({props:t}){const e=m(()=>n(t,["renderItem"]),[t]);return r(o,{...e})}export{I as ItemsElement};
@@ -0,0 +1 @@
1
+ import{u as e}from"./shared-D2RadIoz.mjs";import{L as o}from"./Label-S7o8PlWU.mjs";function n({props:r}){return e(o,{...r})}export{n as LabelElement};
@@ -1 +1 @@
1
- import{a8 as L,a9 as j,S as p,aa as H,ab as E,B as G}from"./shared-DFAX0n3B.mjs";import{b as O}from"./imageService-4sFnmAFX.mjs";import{c as J}from"./choice-key-BUNebLKe.mjs";const Q=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,U=(t,o)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(o&&Q.test(o)),X={width:1600,height:900};function tt(t,o){const e=new Array(t.length);if(!t.length)return e;const n=t.map(N),i=o==="left-to-right"||o==="right-to-left",s=o==="right-to-left"||o==="bottom-to-top",u=i?n[0].height:n[0].width,r=t.map((a,h)=>h);s&&r.reverse();let c=0;for(const a of r){const h=n[a],f=u/(i?h.height:h.width),y=h.width*f,g=h.height*f;e[a]=i?{x:c,y:0,width:y,height:g}:{x:0,y:c,width:y,height:g},c+=i?y:g}return e}function N(t){var s,u;if(t.width&&t.height)return{width:t.width,height:t.height};const o=R(t);if(o!=null&&o.width&&o.height)return{width:o.width,height:o.height};const e=((s=k(t)[0])==null?void 0:s.body)??((u=D(t)[0])==null?void 0:u.body),n=Number(e==null?void 0:e.width),i=Number(e==null?void 0:e.height);return n>0&&i>0?{width:n,height:i}:X}function R(t){return t.accompanyingContainer??t.placeholderContainer}function ot(t,o,e,n,i){return J(t.id,o.id,e,n,i)}function gt(t){const o=[];for(const e of t)W(e,(n,i)=>{const s=n;if((s==null?void 0:s.type)!=="Choice")return;const u=p(s.items).filter(r=>!!r&&typeof r=="object");u.length>1&&o.push({key:i,canvasId:e.id,label:s.label,items:u.map(r=>({label:r.label,id:r.id,...typeof r.type=="string"?{type:r.type}:{},...typeof r.format=="string"?{format:r.format}:{}}))})});return o}const F={};function et(t){if(t.type!=="Video"&&!E(t.type)||!t.format||U(t.id,t.format)||typeof document>"u")return true;const o=t.type==="Video"?"video":"audio",e=F[o]??(F[o]=document.createElement(o));return typeof e.canPlayType!="function"?true:e.canPlayType(t.format)!==""}function lt(t){const o={};for(const e of t){const n=e.items.findIndex(et);n>0&&(o[e.key]=n)}return o}const V=new WeakMap,z=[];function nt(t){return H(t).some(o=>((o==null?void 0:o.type)==="Choice"?p(o.items):[o]).some(n=>(n==null?void 0:n.type)==="Video"||E(n==null?void 0:n.type)))}function it(t){var u;const o=V.get(t);if(o)return o;const e=[];for(const r of t.items??[])for(const c of r.items??[]){if(!L(c))continue;const a=c.target?(u=j(c.target))==null?void 0:u.t:void 0;if(!a)continue;const[h,f]=a.split(",").map(Number);Number.isFinite(h)&&e.push({annotation:c,start:h,end:Number.isFinite(f)?f:NaN})}if(e.every(r=>nt(r.annotation)))return V.set(t,z),z;e.sort((r,c)=>r.start-c.start);const n=Number(t.duration),i=Number.isFinite(n)&&n/e.length||.5;e.forEach((r,c)=>{var h;const a=(h=e[c+1])==null?void 0:h.start;r.end>r.start||(a!=null?r.end=a>r.start?a:r.start+i:Number.isFinite(n)&&n>r.start?r.end=n:r.end>r.start||(r.end=r.start+i))});const s=e.length>1?e:z;return V.set(t,s),s}const A=t=>`frame:${t.id}`;function W(t,o){(t.items??[]).forEach((e,n)=>{(e.items??[]).forEach((i,s)=>{L(i)&&H(i).forEach((u,r)=>o(u,ot(t,i,n,s,r),i))})})}function k(t,o={},{allFrames:e=false}={}){const n=[];return M(t,o,(i,s,u)=>{i.body.type==="Image"&&n.push({body:i.body,region:i.region,...i.rotation?{rotation:i.rotation}:{},target:s,...u>=0?{frame:u}:{}})},e),n}function yt(t,o={}){for(const e of t){let n;if(M(e,o,i=>{n??(n=i.body.type)}),typeof n=="string")return n.toLowerCase()}}function D(t,o={}){const e=[];return M(t,o,(n,i,s,u)=>{const r=n.body.type;if(r!=="Video"&&!E(r))return;const c=G(u);e.push({kind:r==="Video"?"video":"audio",body:n.body,target:i,...c?{time:c}:{}})}),e}function rt(t){const o=t.filter(n=>n.time&&typeof n.body.id=="string"),e=new Set(o.map(n=>n.time.start));if(!(o.length<2||e.size!==o.length))return o.sort((n,i)=>n.time.start-i.time.start).map(n=>{const i=Number(n.body.duration)||(n.time.end!==void 0?n.time.end-n.time.start:void 0);return{src:n.body.id,...n.body.format?{format:n.body.format}:{},start:n.time.start,...i?{duration:i}:{}}})}function M(t,o,e,n=false){const i=t.width??0,s=t.height??0,u=it(t),r=Math.min(o[A(t)]??0,Math.max(0,u.length-1));W(t,(c,a,h)=>{const f=u.findIndex(x=>x.annotation===h);if(!n&&f>=0&&f!==r)return;const y=B(c,o[a]??0);if(!y)return;const g=h.target?j(h.target):void 0,b=g==null?void 0:g.rect;e(y,b?{x:b.x,y:b.y,width:b.w,height:b.h}:{x:0,y:0,width:i||Number(y.body.width)||0,height:s||Number(y.body.height)||0},f,g==null?void 0:g.t)})}function st(t){return ut(t).filter(o=>o.kind!=="transcript")}function ct(t){const o=p(t.provides);return o.includes("closedCaptions")?"captions":o.includes("subtitles")||o.includes("translation")?"subtitles":o.includes("transcript")?"transcript":"captions"}function ut(t){const o=[],e=[...t.annotations??[],...t.items??[]];for(const n of e)for(const i of n.items??[])if(p(i.motivation).includes("supplementing"))for(const s of p(i.body)){const u=s,r=(u==null?void 0:u.type)==="Choice"?p(u.items):[u];for(const c of r){const a=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof a=="string"&&/\.vtt(\?|$)/i.test(a))||typeof a!="string"||o.push({id:a,label:c.label,language:p(c.language)[0],kind:ct(i)})}}return o}function mt(t){const o=[],e=i=>{const s=i,u=s==null?void 0:s.id;if(typeof u!="string"||o.some(c=>c.id===u))return;const r=s==null?void 0:s.format;(r?r!=="text/plain":!/\.txt(\?|$)/i.test(u))||o.push({id:u,label:s==null?void 0:s.label,language:p(s==null?void 0:s.language)[0]})},n=[...t.annotations??[],...t.items??[]];for(const i of n)for(const s of i.items??[])if(p(s.motivation).includes("supplementing"))for(const u of p(s.body)){const r=u;((r==null?void 0:r.type)==="Choice"?p(r.items):[r]).forEach(e)}return p(t.rendering).forEach(e),o}function B(t,o=0){if(!t||typeof t!="object")return null;const e=t;if(e.type==="Choice"){const n=p(e.items);return B(n[o]??n[0])}if(e.type==="SpecificResource"&&e.source){const n=typeof e.source=="string"?{id:e.source}:e.source,i=p(e.selector).find(r=>(r==null?void 0:r.type)==="ImageApiSelector"),s=B({type:"Image",...n});if(!s)return null;const u=(i==null?void 0:i.rotation)!=null?String(i.rotation):void 0;return{...s,region:(i==null?void 0:i.region)||s.region,...u?{rotation:u}:{}}}return e.type!=="Image"&&e.type!=="Video"&&!E(e.type)?null:{body:e,region:typeof e.region=="string"?e.region:void 0}}function bt(t,o,e={},{standIns:n=true}={}){const i=tt(t,o),s=[],u=[],r={};return t.forEach((c,a)=>{const h=i[a],f=N(c),y=h.width/f.width,g=h.height/f.height,b=d=>({x:h.x+d.x*y,y:h.y+d.y*g,width:d.width*y,height:d.height*g}),x=D(c,e),T=k(c,e,{allFrames:true}).map(d=>({...d,canvas:c})),S=R(c);if(n&&!T.length&&x.some(d=>d.kind==="audio")&&S){const d=N(S);for(const l of k(S))T.push({...l,canvas:S,target:{x:l.target.x/d.width*f.width,y:l.target.y/d.height*f.height,width:l.target.width/d.width*f.width,height:l.target.height/d.height*f.height}})}const Y=e[A(c)]??0;T.forEach(({body:d,target:l,region:I,rotation:$,frame:w,canvas:Z},q)=>{var K;const C=O(d.service);if(!C&&!d.id)return;const _=`${Z.id}|${q}|${d.id??C}|${I??""}|${$??""}`,P=!(C&&I);if(s.push({id:_,service:C,url:d.id,width:P&&Number(d.width)||void 0,height:P&&Number(d.height)||void 0,region:I,...$?{rotation:$}:{},placement:b(l),...w!=null&&w!==Y?{hidden:true}:{}}),w!=null){const v=r[K=A(c)]??(r[K]=[]);(v[w]??(v[w]=[])).push(_)}});const[m]=x;if(m!=null&&m.body.id){const d=rt(x),l=d?d[0]:void 0;u.push({id:`${c.id}|media|${m.body.id}`,kind:m.kind,src:(l==null?void 0:l.src)??m.body.id,format:l?l.format:m.body.format,placement:b(m.target),duration:d?Number(c.duration)||void 0:Number(m.body.duration??c.duration)||void 0,...d?{segments:d}:{},poster:dt(c),captions:st(c)})}}),{images:s,media:u,placements:i,frames:r}}function dt(t){var o;return(o=ht(t))==null?void 0:o.source}const wt=1280;function ht(t){var c;const o=t.placeholderContainer;if(!o)return;const e=(c=k(o)[0])==null?void 0:c.body;if(!e)return;const n=O(e.service),i=typeof e.id=="string"?e.id:void 0,s=n?{service:n,fallback:i}:i?{src:i}:void 0;if(!s)return;const{width:u,height:r}=N(o);return{source:s,width:u,height:r}}function xt(t,o,e){const n=N(t),i=o.width/n.width,s=o.height/n.height;return{x:o.x+e.x*i,y:o.y+e.y*s,width:e.width*i,height:e.height*s}}export{wt as S,mt as a,it as b,ut as c,bt as d,ht as e,gt as f,A as g,xt as h,N as i,D as j,st as k,U as l,et as m,yt as p,B as r,lt as s};
1
+ import{a7 as L,a8 as j,S as p,a9 as H,aa as E,B as G}from"./shared-D2RadIoz.mjs";import{b as O}from"./imageService-DBU_Xks1.mjs";import{c as J}from"./choice-key-BUNebLKe.mjs";const Q=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,U=(t,o)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(o&&Q.test(o)),X={width:1600,height:900};function tt(t,o){const e=new Array(t.length);if(!t.length)return e;const n=t.map(N),i=o==="left-to-right"||o==="right-to-left",s=o==="right-to-left"||o==="bottom-to-top",u=i?n[0].height:n[0].width,r=t.map((a,h)=>h);s&&r.reverse();let c=0;for(const a of r){const h=n[a],f=u/(i?h.height:h.width),y=h.width*f,g=h.height*f;e[a]=i?{x:c,y:0,width:y,height:g}:{x:0,y:c,width:y,height:g},c+=i?y:g}return e}function N(t){var s,u;if(t.width&&t.height)return{width:t.width,height:t.height};const o=R(t);if(o!=null&&o.width&&o.height)return{width:o.width,height:o.height};const e=((s=k(t)[0])==null?void 0:s.body)??((u=D(t)[0])==null?void 0:u.body),n=Number(e==null?void 0:e.width),i=Number(e==null?void 0:e.height);return n>0&&i>0?{width:n,height:i}:X}function R(t){return t.accompanyingContainer??t.placeholderContainer}function ot(t,o,e,n,i){return J(t.id,o.id,e,n,i)}function gt(t){const o=[];for(const e of t)W(e,(n,i)=>{const s=n;if((s==null?void 0:s.type)!=="Choice")return;const u=p(s.items).filter(r=>!!r&&typeof r=="object");u.length>1&&o.push({key:i,canvasId:e.id,label:s.label,items:u.map(r=>({label:r.label,id:r.id,...typeof r.type=="string"?{type:r.type}:{},...typeof r.format=="string"?{format:r.format}:{}}))})});return o}const F={};function et(t){if(t.type!=="Video"&&!E(t.type)||!t.format||U(t.id,t.format)||typeof document>"u")return true;const o=t.type==="Video"?"video":"audio",e=F[o]??(F[o]=document.createElement(o));return typeof e.canPlayType!="function"?true:e.canPlayType(t.format)!==""}function lt(t){const o={};for(const e of t){const n=e.items.findIndex(et);n>0&&(o[e.key]=n)}return o}const V=new WeakMap,z=[];function nt(t){return H(t).some(o=>((o==null?void 0:o.type)==="Choice"?p(o.items):[o]).some(n=>(n==null?void 0:n.type)==="Video"||E(n==null?void 0:n.type)))}function it(t){var u;const o=V.get(t);if(o)return o;const e=[];for(const r of t.items??[])for(const c of r.items??[]){if(!L(c))continue;const a=c.target?(u=j(c.target))==null?void 0:u.t:void 0;if(!a)continue;const[h,f]=a.split(",").map(Number);Number.isFinite(h)&&e.push({annotation:c,start:h,end:Number.isFinite(f)?f:NaN})}if(e.every(r=>nt(r.annotation)))return V.set(t,z),z;e.sort((r,c)=>r.start-c.start);const n=Number(t.duration),i=Number.isFinite(n)&&n/e.length||.5;e.forEach((r,c)=>{var h;const a=(h=e[c+1])==null?void 0:h.start;r.end>r.start||(a!=null?r.end=a>r.start?a:r.start+i:Number.isFinite(n)&&n>r.start?r.end=n:r.end>r.start||(r.end=r.start+i))});const s=e.length>1?e:z;return V.set(t,s),s}const A=t=>`frame:${t.id}`;function W(t,o){(t.items??[]).forEach((e,n)=>{(e.items??[]).forEach((i,s)=>{L(i)&&H(i).forEach((u,r)=>o(u,ot(t,i,n,s,r),i))})})}function k(t,o={},{allFrames:e=false}={}){const n=[];return M(t,o,(i,s,u)=>{i.body.type==="Image"&&n.push({body:i.body,region:i.region,...i.rotation?{rotation:i.rotation}:{},target:s,...u>=0?{frame:u}:{}})},e),n}function yt(t,o={}){for(const e of t){let n;if(M(e,o,i=>{n??(n=i.body.type)}),typeof n=="string")return n.toLowerCase()}}function D(t,o={}){const e=[];return M(t,o,(n,i,s,u)=>{const r=n.body.type;if(r!=="Video"&&!E(r))return;const c=G(u);e.push({kind:r==="Video"?"video":"audio",body:n.body,target:i,...c?{time:c}:{}})}),e}function rt(t){const o=t.filter(n=>n.time&&typeof n.body.id=="string"),e=new Set(o.map(n=>n.time.start));if(!(o.length<2||e.size!==o.length))return o.sort((n,i)=>n.time.start-i.time.start).map(n=>{const i=Number(n.body.duration)||(n.time.end!==void 0?n.time.end-n.time.start:void 0);return{src:n.body.id,...n.body.format?{format:n.body.format}:{},start:n.time.start,...i?{duration:i}:{}}})}function M(t,o,e,n=false){const i=t.width??0,s=t.height??0,u=it(t),r=Math.min(o[A(t)]??0,Math.max(0,u.length-1));W(t,(c,a,h)=>{const f=u.findIndex(x=>x.annotation===h);if(!n&&f>=0&&f!==r)return;const y=B(c,o[a]??0);if(!y)return;const g=h.target?j(h.target):void 0,b=g==null?void 0:g.rect;e(y,b?{x:b.x,y:b.y,width:b.w,height:b.h}:{x:0,y:0,width:i||Number(y.body.width)||0,height:s||Number(y.body.height)||0},f,g==null?void 0:g.t)})}function st(t){return ut(t).filter(o=>o.kind!=="transcript")}function ct(t){const o=p(t.provides);return o.includes("closedCaptions")?"captions":o.includes("subtitles")||o.includes("translation")?"subtitles":o.includes("transcript")?"transcript":"captions"}function ut(t){const o=[],e=[...t.annotations??[],...t.items??[]];for(const n of e)for(const i of n.items??[])if(p(i.motivation).includes("supplementing"))for(const s of p(i.body)){const u=s,r=(u==null?void 0:u.type)==="Choice"?p(u.items):[u];for(const c of r){const a=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof a=="string"&&/\.vtt(\?|$)/i.test(a))||typeof a!="string"||o.push({id:a,label:c.label,language:p(c.language)[0],kind:ct(i)})}}return o}function mt(t){const o=[],e=i=>{const s=i,u=s==null?void 0:s.id;if(typeof u!="string"||o.some(c=>c.id===u))return;const r=s==null?void 0:s.format;(r?r!=="text/plain":!/\.txt(\?|$)/i.test(u))||o.push({id:u,label:s==null?void 0:s.label,language:p(s==null?void 0:s.language)[0]})},n=[...t.annotations??[],...t.items??[]];for(const i of n)for(const s of i.items??[])if(p(s.motivation).includes("supplementing"))for(const u of p(s.body)){const r=u;((r==null?void 0:r.type)==="Choice"?p(r.items):[r]).forEach(e)}return p(t.rendering).forEach(e),o}function B(t,o=0){if(!t||typeof t!="object")return null;const e=t;if(e.type==="Choice"){const n=p(e.items);return B(n[o]??n[0])}if(e.type==="SpecificResource"&&e.source){const n=typeof e.source=="string"?{id:e.source}:e.source,i=p(e.selector).find(r=>(r==null?void 0:r.type)==="ImageApiSelector"),s=B({type:"Image",...n});if(!s)return null;const u=(i==null?void 0:i.rotation)!=null?String(i.rotation):void 0;return{...s,region:(i==null?void 0:i.region)||s.region,...u?{rotation:u}:{}}}return e.type!=="Image"&&e.type!=="Video"&&!E(e.type)?null:{body:e,region:typeof e.region=="string"?e.region:void 0}}function bt(t,o,e={},{standIns:n=true}={}){const i=tt(t,o),s=[],u=[],r={};return t.forEach((c,a)=>{const h=i[a],f=N(c),y=h.width/f.width,g=h.height/f.height,b=d=>({x:h.x+d.x*y,y:h.y+d.y*g,width:d.width*y,height:d.height*g}),x=D(c,e),T=k(c,e,{allFrames:true}).map(d=>({...d,canvas:c})),S=R(c);if(n&&!T.length&&x.some(d=>d.kind==="audio")&&S){const d=N(S);for(const l of k(S))T.push({...l,canvas:S,target:{x:l.target.x/d.width*f.width,y:l.target.y/d.height*f.height,width:l.target.width/d.width*f.width,height:l.target.height/d.height*f.height}})}const Y=e[A(c)]??0;T.forEach(({body:d,target:l,region:I,rotation:$,frame:w,canvas:Z},q)=>{var K;const C=O(d.service);if(!C&&!d.id)return;const _=`${Z.id}|${q}|${d.id??C}|${I??""}|${$??""}`,P=!(C&&I);if(s.push({id:_,service:C,url:d.id,width:P&&Number(d.width)||void 0,height:P&&Number(d.height)||void 0,region:I,...$?{rotation:$}:{},placement:b(l),...w!=null&&w!==Y?{hidden:true}:{}}),w!=null){const v=r[K=A(c)]??(r[K]=[]);(v[w]??(v[w]=[])).push(_)}});const[m]=x;if(m!=null&&m.body.id){const d=rt(x),l=d?d[0]:void 0;u.push({id:`${c.id}|media|${m.body.id}`,kind:m.kind,src:(l==null?void 0:l.src)??m.body.id,format:l?l.format:m.body.format,placement:b(m.target),duration:d?Number(c.duration)||void 0:Number(m.body.duration??c.duration)||void 0,...d?{segments:d}:{},poster:dt(c),captions:st(c)})}}),{images:s,media:u,placements:i,frames:r}}function dt(t){var o;return(o=ht(t))==null?void 0:o.source}const wt=1280;function ht(t){var c;const o=t.placeholderContainer;if(!o)return;const e=(c=k(o)[0])==null?void 0:c.body;if(!e)return;const n=O(e.service),i=typeof e.id=="string"?e.id:void 0,s=n?{service:n,fallback:i}:i?{src:i}:void 0;if(!s)return;const{width:u,height:r}=N(o);return{source:s,width:u,height:r}}function xt(t,o,e){const n=N(t),i=o.width/n.width,s=o.height/n.height;return{x:o.x+e.x*i,y:o.y+e.y*s,width:e.width*i,height:e.height*s}}export{wt as S,mt as a,it as b,ut as c,bt as d,ht as e,gt as f,A as g,xt as h,N as i,D as j,st as k,U as l,et as m,yt as p,B as r,lt as s};
@@ -1 +1 @@
1
- import{S as n,aa as p,a9 as c}from"./shared-DFAX0n3B.mjs";function g(r){if(n(r==null?void 0:r.motivation).includes("linking"))for(const i of p(r)){if((i==null?void 0:i.type)==="TextualBody"||typeof(i==null?void 0:i.value)=="string")continue;const t=(i==null?void 0:i.type)==="SpecificResource"?i.source:i,e=typeof t=="string"?t:t==null?void 0:t.id;if(!(typeof e!="string"||!e)){if((t==null?void 0:t.type)==="Canvas"){const f=n(t.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),u=c(e).id;return{id:e,canvasId:u,...f?{manifestId:f.id}:{}}}if((t==null?void 0:t.type)==="Manifest"||(t==null?void 0:t.type)==="Collection")return{id:e,manifestId:e};if(/^https?:\/\//i.test(e))return{id:e}}}}function o(r){const i=n(r==null?void 0:r.motivation);if(!(!i.includes("tagging")&&!i.includes("identifying")))for(const t of p(r)){if((t==null?void 0:t.type)==="TextualBody"||typeof(t==null?void 0:t.value)=="string")continue;const e=(t==null?void 0:t.type)==="SpecificResource"?t.source:t,f=typeof e=="string"?e:e==null?void 0:e.id;if(typeof f=="string"&&/^https?:\/\//i.test(f))return{id:f}}}export{o as a,g as r};
1
+ import{S as n,a9 as p,a8 as c}from"./shared-D2RadIoz.mjs";function g(r){if(n(r==null?void 0:r.motivation).includes("linking"))for(const i of p(r)){if((i==null?void 0:i.type)==="TextualBody"||typeof(i==null?void 0:i.value)=="string")continue;const t=(i==null?void 0:i.type)==="SpecificResource"?i.source:i,e=typeof t=="string"?t:t==null?void 0:t.id;if(!(typeof e!="string"||!e)){if((t==null?void 0:t.type)==="Canvas"){const f=n(t.partOf).find(s=>(s==null?void 0:s.id)&&(!s.type||s.type==="Manifest")),u=c(e).id;return{id:e,canvasId:u,...f?{manifestId:f.id}:{}}}if((t==null?void 0:t.type)==="Manifest"||(t==null?void 0:t.type)==="Collection")return{id:e,manifestId:e};if(/^https?:\/\//i.test(e))return{id:e}}}}function o(r){const i=n(r==null?void 0:r.motivation);if(!(!i.includes("tagging")&&!i.includes("identifying")))for(const t of p(r)){if((t==null?void 0:t.type)==="TextualBody"||typeof(t==null?void 0:t.value)=="string")continue;const e=(t==null?void 0:t.type)==="SpecificResource"?t.source:t,f=typeof e=="string"?e:e==null?void 0:e.id;if(typeof f=="string"&&/^https?:\/\//i.test(f))return{id:f}}}export{o as a,g as r};
@@ -0,0 +1 @@
1
+ import{u as t}from"./shared-D2RadIoz.mjs";import{L as n}from"./Provider-Dl_t_qEC.mjs";function i({hosted:o,props:r}){var e;return((e=o.element.parentElement)==null?void 0:e.localName)==="clover-provider"?null:t(n,{...r})}export{i as LogoElement};
@@ -0,0 +1 @@
1
+ const o=void 0;export{o as css};
@@ -0,0 +1 @@
1
+ function h(r){r.dataset.masonry="";const o=()=>Array.from(r.querySelectorAll(".clover-items-track > .clover-items-item")),a=e=>{const n=e.parentElement;if(!n)return;const l=getComputedStyle(n),d=parseFloat(l.gridAutoRows)||1,i=parseFloat(l.columnGap)||0,u=e.getBoundingClientRect().height;e.style.gridRowEnd=`span ${Math.max(1,Math.ceil((u+i)/d))}`},t=typeof ResizeObserver>"u"?null:new ResizeObserver(e=>e.forEach(n=>a(n.target))),s=()=>o().forEach(e=>{t==null||t.observe(e),a(e)}),c=new MutationObserver(s);return c.observe(r,{childList:true,subtree:true}),s(),()=>{c.disconnect(),t==null||t.disconnect(),o().forEach(e=>e.style.removeProperty("grid-row-end")),delete r.dataset.masonry}}export{h as attachMasonry};
@@ -1 +1 @@
1
- import{a8 as M,aa as l,S as f}from"./shared-DFAX0n3B.mjs";const m=45,d=75*Math.PI/180,h=5*Math.PI/180,p=Math.PI-h,y=1.1,g=.35,I=4;function P(n,a=1){const t=m*Math.PI/180,o=2*Math.atan(Math.tan(t/2)*a),s=Math.min(t,o);return Math.max(n,1e-6)/Math.sin(s/2)*y}function x(n,a=1){return{theta:0,phi:d,distance:P(n.radius,a)}}function E(n,a,t){return{...n,theta:n.theta+a,phi:Math.min(p,Math.max(h,n.phi+t))}}function R(n,a,t){const o=n.distance/a;return{...n,distance:Math.min(t.distance*I,Math.max(t.distance*g,o))}}function z(n,a){const{theta:t,phi:o,distance:s}=n;return[a[0]+s*Math.sin(o)*Math.sin(t),a[1]+s*Math.cos(o),a[2]+s*Math.sin(o)*Math.cos(t)]}function A(n,a){const t=(s,i)=>Math.abs(s-i)<1e-6,o=(n.theta-a.theta)%(2*Math.PI);return(t(o,0)||t(Math.abs(o),2*Math.PI))&&t(n.phi,a.phi)&&t(n.distance,a.distance)}const O=["model/gltf-binary","model/gltf+json"],c=(n,a)=>{const t=Number(n);return Number.isFinite(t)?t:a};function F(n){return n.format?O.includes(n.format.toLowerCase()):/\.(glb|gltf)(\?|#|$)/i.test(n.src)}function S(n){return f(n.transform).flatMap(a=>{const t=a,o=(t==null?void 0:t.type)==="ScaleTransform"?"scale":(t==null?void 0:t.type)==="RotateTransform"?"rotate":(t==null?void 0:t.type)==="TranslateTransform"?"translate":null;if(!o||!t)return[];const s=o==="scale"?1:0;return[{type:o,x:c(t.x,s),y:c(t.y,s),z:c(t.z,s)}]})}function b(n){for(const a of f(n)){const t=a;if((t==null?void 0:t.type)!=="SpecificResource")continue;const o=f(t.selector).find(s=>(s==null?void 0:s.type)==="PointSelector");if(o)return[c(o.x,0),c(o.y,0),c(o.z,0)]}return[0,0,0]}const u=new WeakMap;function _(n){const a=u.get(n);if(a)return a;const t=[];for(const o of n.items??[])for(const s of(o==null?void 0:o.items)??[])if(M(s))for(let i of l(s)){(i==null?void 0:i.type)==="Choice"&&(i=f(i.items)[0]);const r=(i==null?void 0:i.type)==="SpecificResource"?i:null,e=r?typeof r.source=="string"?{id:r.source,type:"Model"}:r.source:i;(e==null?void 0:e.type)!=="Model"||typeof e.id!="string"||t.push({id:String(s.id??e.id),src:e.id,...typeof e.format=="string"?{format:e.format}:{},...e.label?{label:e.label}:{},position:b(s.target),transforms:r?S(r):[]})}return u.set(n,t),t}function w(n){const a=n.backgroundColor;return typeof a=="string"&&/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(a)?a:void 0}export{m as F,O as M,w as a,A as b,z as c,x as h,F as i,_ as s,E as t,R as z};
1
+ import{a7 as M,a9 as l,S as f}from"./shared-D2RadIoz.mjs";const m=45,d=75*Math.PI/180,h=5*Math.PI/180,p=Math.PI-h,y=1.1,g=.35,I=4;function P(n,a=1){const t=m*Math.PI/180,o=2*Math.atan(Math.tan(t/2)*a),s=Math.min(t,o);return Math.max(n,1e-6)/Math.sin(s/2)*y}function x(n,a=1){return{theta:0,phi:d,distance:P(n.radius,a)}}function E(n,a,t){return{...n,theta:n.theta+a,phi:Math.min(p,Math.max(h,n.phi+t))}}function R(n,a,t){const o=n.distance/a;return{...n,distance:Math.min(t.distance*I,Math.max(t.distance*g,o))}}function z(n,a){const{theta:t,phi:o,distance:s}=n;return[a[0]+s*Math.sin(o)*Math.sin(t),a[1]+s*Math.cos(o),a[2]+s*Math.sin(o)*Math.cos(t)]}function A(n,a){const t=(s,i)=>Math.abs(s-i)<1e-6,o=(n.theta-a.theta)%(2*Math.PI);return(t(o,0)||t(Math.abs(o),2*Math.PI))&&t(n.phi,a.phi)&&t(n.distance,a.distance)}const O=["model/gltf-binary","model/gltf+json"],c=(n,a)=>{const t=Number(n);return Number.isFinite(t)?t:a};function F(n){return n.format?O.includes(n.format.toLowerCase()):/\.(glb|gltf)(\?|#|$)/i.test(n.src)}function S(n){return f(n.transform).flatMap(a=>{const t=a,o=(t==null?void 0:t.type)==="ScaleTransform"?"scale":(t==null?void 0:t.type)==="RotateTransform"?"rotate":(t==null?void 0:t.type)==="TranslateTransform"?"translate":null;if(!o||!t)return[];const s=o==="scale"?1:0;return[{type:o,x:c(t.x,s),y:c(t.y,s),z:c(t.z,s)}]})}function b(n){for(const a of f(n)){const t=a;if((t==null?void 0:t.type)!=="SpecificResource")continue;const o=f(t.selector).find(s=>(s==null?void 0:s.type)==="PointSelector");if(o)return[c(o.x,0),c(o.y,0),c(o.z,0)]}return[0,0,0]}const u=new WeakMap;function _(n){const a=u.get(n);if(a)return a;const t=[];for(const o of n.items??[])for(const s of(o==null?void 0:o.items)??[])if(M(s))for(let i of l(s)){(i==null?void 0:i.type)==="Choice"&&(i=f(i.items)[0]);const r=(i==null?void 0:i.type)==="SpecificResource"?i:null,e=r?typeof r.source=="string"?{id:r.source,type:"Model"}:r.source:i;(e==null?void 0:e.type)!=="Model"||typeof e.id!="string"||t.push({id:String(s.id??e.id),src:e.id,...typeof e.format=="string"?{format:e.format}:{},...e.label?{label:e.label}:{},position:b(s.target),transforms:r?S(r):[]})}return u.set(n,t),t}function w(n){const a=n.backgroundColor;return typeof a=="string"&&/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(a)?a:void 0}export{m as F,O as M,w as a,A as b,z as c,x as h,F as i,_ as s,E as t,R as z};
@@ -1 +1 @@
1
- import{A as i,q as f,C as p,_ as l,u as a}from"./shared-DFAX0n3B.mjs";const b={childList:true,subtree:true,attributes:true,attributeFilter:["value","label","slot","controls"]};function h(t,e,n){const r=i(null),o=f(s=>{const u=new MutationObserver(s);return u.observe(t,b),()=>u.disconnect()},[t]);return p(o,()=>{const s=e();return r.current&&n(r.current.value,s)?r.current.value:(r.current={value:s},s)})}const v=(t,e)=>[...t.children].find(n=>n.getAttribute("slot")===e)??null;function y(t,e){return h(t,()=>v(t,e),Object.is)}function C({of:t}){const e=i(null);return l(()=>{const n=e.current;if(!n)return;const r=()=>n.replaceChildren(...[...t.childNodes].map(c=>c.cloneNode(true)));r();const o=new MutationObserver(r);return o.observe(t,{childList:true,subtree:true,characterData:true,attributes:true}),()=>o.disconnect()},[t]),a("span",{ref:e,style:{display:"contents"}})}function M({from:t,stays:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;const o=()=>{for(const s of[...t.childNodes])e(s)||r.append(s)};o();const c=new MutationObserver(o);return c.observe(t,{childList:true}),()=>{c.disconnect(),t.append(...r.childNodes)}},[t,e]),a("div",{ref:n,style:{display:"contents"}})}function O({from:t,picks:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;let o=[];const c=()=>{const u=[...t.childNodes].filter(e);u.length&&(o=o.filter(d=>d.parentNode===r.parentNode),(o.at(-1)??r).after(...u),o.push(...u))};c();const s=new MutationObserver(c);return s.observe(t,{childList:true}),()=>{s.disconnect();for(const u of o)u.parentNode===r.parentNode&&t.append(u)}},[t,e]),a("span",{ref:n,hidden:true})}function N({value:t}){const e=i(null);return l(()=>{var n;(n=e.current)==null||n.replaceChildren(t instanceof Node?t:String(t))},[t]),a("span",{ref:e,style:{display:"contents"}})}function g(t,e){let n=t;for(const r of e){const o=t[r];typeof o=="function"&&(n={...n,[r]:(...c)=>{const s=o(...c);return s==null?s:a(N,{value:s})}})}return n}export{C,M,O as P,y as a,v as s,h as u,g as w};
1
+ import{A as i,q as f,C as p,_ as l,u as a}from"./shared-D2RadIoz.mjs";const b={childList:true,subtree:true,attributes:true,attributeFilter:["value","label","slot","controls"]};function h(t,e,n){const r=i(null),o=f(s=>{const u=new MutationObserver(s);return u.observe(t,b),()=>u.disconnect()},[t]);return p(o,()=>{const s=e();return r.current&&n(r.current.value,s)?r.current.value:(r.current={value:s},s)})}const v=(t,e)=>[...t.children].find(n=>n.getAttribute("slot")===e)??null;function y(t,e){return h(t,()=>v(t,e),Object.is)}function C({of:t}){const e=i(null);return l(()=>{const n=e.current;if(!n)return;const r=()=>n.replaceChildren(...[...t.childNodes].map(c=>c.cloneNode(true)));r();const o=new MutationObserver(r);return o.observe(t,{childList:true,subtree:true,characterData:true,attributes:true}),()=>o.disconnect()},[t]),a("span",{ref:e,style:{display:"contents"}})}function M({from:t,stays:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;const o=()=>{for(const s of[...t.childNodes])e(s)||r.append(s)};o();const c=new MutationObserver(o);return c.observe(t,{childList:true}),()=>{c.disconnect(),t.append(...r.childNodes)}},[t,e]),a("div",{ref:n,style:{display:"contents"}})}function O({from:t,picks:e}){const n=i(null);return l(()=>{const r=n.current;if(!r)return;let o=[];const c=()=>{const u=[...t.childNodes].filter(e);u.length&&(o=o.filter(d=>d.parentNode===r.parentNode),(o.at(-1)??r).after(...u),o.push(...u))};c();const s=new MutationObserver(c);return s.observe(t,{childList:true}),()=>{s.disconnect();for(const u of o)u.parentNode===r.parentNode&&t.append(u)}},[t,e]),a("span",{ref:n,hidden:true})}function N({value:t}){const e=i(null);return l(()=>{var n;(n=e.current)==null||n.replaceChildren(t instanceof Node?t:String(t))},[t]),a("span",{ref:e,style:{display:"contents"}})}function g(t,e){let n=t;for(const r of e){const o=t[r];typeof o=="function"&&(n={...n,[r]:(...c)=>{const s=o(...c);return s==null?s:a(N,{value:s})}})}return n}export{C,M,O as P,y as a,v as s,h as u,g as w};
@@ -1 +1 @@
1
- import{b as c,f as s}from"./imageService-4sFnmAFX.mjs";import{s as a}from"./sizedImage-jnOGcIIZ.mjs";async function l(r,o,i){const t=typeof r.id=="string"?r.id:void 0,e=c(r.service);if(!e)return t;try{const n=await s(e,{request:i});return a(n,o)??t}catch{return t}}export{l as overlayImageUrl};
1
+ import{b as c,f as s}from"./imageService-DBU_Xks1.mjs";import{s as a}from"./sizedImage-DchqGFdt.mjs";async function l(r,o,i){const t=typeof r.id=="string"?r.id:void 0,e=c(r.service);if(!e)return t;try{const n=await s(e,{request:i});return a(n,o)??t}catch{return t}}export{l as overlayImageUrl};
@@ -1 +1 @@
1
- import{d as v,A as g,y as p,u as s}from"./shared-DFAX0n3B.mjs";import{T as y,P as S}from"./Panel-CFYUlXup.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-BleXuYE6.mjs";const k=l=>[...l.children].filter(t=>t.localName==="clover-tab").map((t,e)=>{const n=t.getAttribute("value")||String(e);return{element:t,value:n,label:t.getAttribute("label")||n,labelSlot:A(t,"label")}}),E=(l,t)=>l.length===t.length&&l.every((e,n)=>e.element===t[n].element&&e.value===t[n].value&&e.label===t[n].label&&e.labelSlot===t[n].labelSlot),M=l=>l instanceof Element&&l.getAttribute("slot")==="label",a=new WeakMap;let O=0;const P=l=>(a.has(l)||a.set(l,++O),a.get(l));function T(l){const t=l.ownerDocument;for(let e=l;e&&e!==t.body;e=e.parentElement){if(!e.id)continue;const n=e.id.replace(/["\\]/g,"\\$&");if(t.querySelector(`[aria-controls~="${n}"]`)){e.hidden=true;return}}l.hidden=true}function q({hosted:l,props:t}){const e=l.element,n=b(e,()=>k(e),E),{value:r,closable:i,onValueChange:m,onClose:f,...d}=t,[h,c]=v(r),u=g(r);return p(()=>{r!==u.current&&(u.current=r,r&&c(r))},[r]),s(S,{...d,value:h,onValueChange:o=>{c(o),m(o)},onClose:i?()=>{f()&&T(e)}:void 0,children:n.length?n.map(o=>s(y,{value:o.value,label:o.labelSlot?s(w,{of:o.labelSlot}):o.label,children:s(C,{from:o.element,stays:M})},P(o.element))):null})}export{q as PanelElement};
1
+ import{d as v,A as g,y as p,u as s}from"./shared-D2RadIoz.mjs";import{T as y,P as S}from"./Panel-CzUDNn8M.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-CmOpA3s7.mjs";const k=l=>[...l.children].filter(t=>t.localName==="clover-tab").map((t,e)=>{const n=t.getAttribute("value")||String(e);return{element:t,value:n,label:t.getAttribute("label")||n,labelSlot:A(t,"label")}}),E=(l,t)=>l.length===t.length&&l.every((e,n)=>e.element===t[n].element&&e.value===t[n].value&&e.label===t[n].label&&e.labelSlot===t[n].labelSlot),M=l=>l instanceof Element&&l.getAttribute("slot")==="label",a=new WeakMap;let O=0;const P=l=>(a.has(l)||a.set(l,++O),a.get(l));function T(l){const t=l.ownerDocument;for(let e=l;e&&e!==t.body;e=e.parentElement){if(!e.id)continue;const n=e.id.replace(/["\\]/g,"\\$&");if(t.querySelector(`[aria-controls~="${n}"]`)){e.hidden=true;return}}l.hidden=true}function q({hosted:l,props:t}){const e=l.element,n=b(e,()=>k(e),E),{value:r,closable:i,onValueChange:m,onClose:f,...d}=t,[h,c]=v(r),u=g(r);return p(()=>{r!==u.current&&(u.current=r,r&&c(r))},[r]),s(S,{...d,value:h,onValueChange:o=>{c(o),m(o)},onClose:i?()=>{f()&&T(e)}:void 0,children:n.length?n.map(o=>s(y,{value:o.value,label:o.labelSlot?s(w,{of:o.labelSlot}):o.label,children:s(C,{from:o.element,stays:M})},P(o.element))):null})}export{q as PanelElement};
@@ -0,0 +1 @@
1
+ import{T as i,u as e}from"./shared-D2RadIoz.mjs";import{w as u}from"./nodes-CmOpA3s7.mjs";function a(r,t=[]){return function({props:n}){const o=i(()=>u(n,t),[n]);return e(r,{...o})}}export{a as drawn};
@@ -1 +1 @@
1
- import{a as w,c as E,b,T as v}from"./pointer-CJELU3gI.mjs";import{u as S}from"./useControlsVisibility-CieBxGnK.mjs";const M=i=>{const s=new Map,p=e=>{var t;return(t=s.get(e))==null?void 0:t.forEach(r=>r())};let l=false,o=null,n=null,u=false,a=null;const d=e=>{w(e)&&(u=true)},m=e=>{a=e.isPrimary&&e.button===0&&(e.target===i||e.target===n)?{x:e.clientX,y:e.clientY,t:e.timeStamp,direct:E(e.pointerType,u)}:null},f=e=>{const t=a;a=null,!(!t||e.timeStamp-t.t>=b||Math.hypot(e.clientX-t.x,e.clientY-t.y)>v)&&!(o!=null&&o())&&!t.direct&&p("tap")},c=e=>{e!==n&&(n==null||n.remove(),n=e,n&&(Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",objectFit:"contain"}),n.classList.add("clover-canvas-dom-media"),i.append(n)))};return i.addEventListener("pointermove",d),i.addEventListener("pointerdown",m),i.addEventListener("pointerup",f),{host:i,get isOpen(){return l},on(e,t){const r=s.get(e)??new Set;return s.set(e,r.add(t)),()=>r.delete(t)},async setImages(e,{world:t}={}){var g,y;const r=(y=(g=e.find(L=>L.media))==null?void 0:g.media)==null?void 0:y.element;c(r instanceof HTMLVideoElement?r:null),!(!t&&!e.length)&&(p(l?"change":"open"),l=true)},clear:()=>c(null),setDismiss(e){o=e},setGestures(){},dispose(){c(null),s.clear(),i.removeEventListener("pointermove",d),i.removeEventListener("pointerdown",m),i.removeEventListener("pointerup",f)}}};M.controlsVisibility=S;export{M as p};
1
+ import{a as w,c as E,b,T as v}from"./pointer-BqgxBJ82.mjs";import{u as S}from"./useControlsVisibility-BYZlgiAt.mjs";const M=i=>{const s=new Map,p=e=>{var t;return(t=s.get(e))==null?void 0:t.forEach(r=>r())};let l=false,o=null,n=null,u=false,a=null;const d=e=>{w(e)&&(u=true)},m=e=>{a=e.isPrimary&&e.button===0&&(e.target===i||e.target===n)?{x:e.clientX,y:e.clientY,t:e.timeStamp,direct:E(e.pointerType,u)}:null},f=e=>{const t=a;a=null,!(!t||e.timeStamp-t.t>=b||Math.hypot(e.clientX-t.x,e.clientY-t.y)>v)&&!(o!=null&&o())&&!t.direct&&p("tap")},c=e=>{e!==n&&(n==null||n.remove(),n=e,n&&(Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",objectFit:"contain"}),n.classList.add("clover-canvas-dom-media"),i.append(n)))};return i.addEventListener("pointermove",d),i.addEventListener("pointerdown",m),i.addEventListener("pointerup",f),{host:i,get isOpen(){return l},on(e,t){const r=s.get(e)??new Set;return s.set(e,r.add(t)),()=>r.delete(t)},async setImages(e,{world:t}={}){var g,y;const r=(y=(g=e.find(L=>L.media))==null?void 0:g.media)==null?void 0:y.element;c(r instanceof HTMLVideoElement?r:null),!(!t&&!e.length)&&(p(l?"change":"open"),l=true)},clear:()=>c(null),setDismiss(e){o=e},setGestures(){},dispose(){c(null),s.clear(),i.removeEventListener("pointermove",d),i.removeEventListener("pointerdown",m),i.removeEventListener("pointerup",f)}}};M.controlsVisibility=S;export{M as p};
@@ -0,0 +1 @@
1
+ var T=Object.defineProperty;var x=(e,t,n)=>t in e?T(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n;var L=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);import{a as E,A as M,d as v,ab as N,y as m,u as c,t as S,l as p,P as O,z as B,_ as I,q as H,C as P,R as A}from"./shared-D2RadIoz.mjs";import{C as D}from"./glyphs-VoJVEqLE.mjs";import{B as w}from"./Button-Bphsp8rv.mjs";import"./styles-DZIDbHxL.mjs";import{T as W}from"./Tip-BatwzZZo.mjs";import{e as _}from"./controlGlyphs-ClH59vLg.mjs";const q=B(()=>import("./CaptionDetails-Dg9Y11o_.mjs"));function re(e){var t;return!!e.summary||!!((t=e.metadata)!=null&&t.length)}const U=(e,t)=>`${e}-label-${t}`,oe=({id:e,canvases:t,comments:n,open:s,onClose:r,language:o})=>{const{t:u,langOf:a}=E(),i=M(null),[f,h]=v(s);return s&&!f&&h(true),N(s,()=>r(false)),m(()=>{var l;s&&((l=i.current)==null||l.focus())},[s]),c("figcaption",{className:"clover-canvas-caption","data-open":s,"data-testid":"clover-canvas-caption",id:e,onKeyDown:l=>{l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),r(true))},ref:i,tabIndex:-1,children:[c(w,{className:"clover-canvas-caption-close",id:`close-${e}`,label:u("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:c(D,{})}),t.map((l,g)=>{const d=S(l.label,o);return c("section",{className:"clover-canvas-caption-canvas",children:[d.text&&c("p",{className:"clover-canvas-caption-label",id:U(e,g),...p(d.lang),children:d.text}),f&&c(O,{fallback:null,children:c(q,{summary:l.summary,metadata:l.metadata,comments:n==null?void 0:n.get(l.id),language:o})})]},l.id)})]})},$=112,z=128;function j(e){I(()=>{const t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=(o=false)=>{let u=e.offsetWidth,a=0;for(const d of o?[]:Array.from(e.children))!(d instanceof HTMLElement)||!d.offsetParent||(u=Math.min(u,d.offsetLeft),a=Math.max(a,d.offsetTop+d.offsetHeight));const i={width:e.offsetWidth-u,height:a};for(const[d,C]of Object.entries(i)){const y=`--clover-canvas-controls-${d}`;a?t.style.setProperty(y,`${C}px`):t.style.removeProperty(y)}const f=e.offsetTop,h=t.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),l=t.clientHeight-2*f-i.height-((h==null?void 0:h.offsetHeight)??0),g=e.offsetLeft+u-f;a&&l<$&&g>=z?t.dataset.popups="beside":delete t.dataset.popups};n();const s=new ResizeObserver(()=>n());s.observe(e),s.observe(t);const r=new MutationObserver(()=>n());return r.observe(e,{childList:true}),r.observe(t,{childList:true}),()=>{s.disconnect(),r.disconnect(),n(true)}},[e])}const b=()=>{if(typeof document>"u")return null;const e=document;return e.fullscreenElement??e.webkitFullscreenElement??null},k=()=>{if(typeof document>"u")return false;const e=document;return!!(e.fullscreenEnabled??e.webkitFullscreenEnabled)},F=e=>{const t=e==null?void 0:e.closest(".clover-root"),n=e==null?void 0:e.closest("dialog");return t&&!(n&&t.contains(n))?t:(e==null?void 0:e.closest(".clover-canvas"))??null},K=(e,t)=>{if(typeof e.webkitEnterFullscreen!="function")return;const n=t.closest(".clover-canvas"),s=!e.isConnected&&!!n;if(s&&n){const o=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(),o===null?e.removeAttribute("style"):e.setAttribute("style",o)},{once:true})}const r=()=>{var o;try{(o=e.webkitEnterFullscreen)==null||o.call(e)}catch{}};s?requestAnimationFrame(r):r()},Y=async(e,t)=>{var s,r,o,u;const n=F(e);if(n)try{if(b()){const i=document;await(((s=i.exitFullscreen)==null?void 0:s.call(i))??((r=i.webkitExitFullscreen)==null?void 0:r.call(i)));return}if(!k()){t&&e&&K(t,e);return}const a=n;await(((o=a.requestFullscreen)==null?void 0:o.call(a))??((u=a.webkitRequestFullscreen)==null?void 0:u.call(a)))}catch{}};function R(e){const[t,n]=v(false);return m(()=>{if(!e)return;const s=()=>{var r;return n(!!((r=b())!=null&&r.contains(e)))};return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}function ae({key:e,id:t,label:n,glyph:s,onClick:r,expanded:o,controls:u,shortcut:a,lang:i,unavailable:f},h){const l=h==null?void 0:h[e];return l?c(l,{buttonProps:{id:t,type:"button","aria-label":n,...i&&{lang:i},...a&&{"aria-keyshortcuts":a.keys},onClick:f?void 0:r,...f&&{"aria-disabled":true},...o!==void 0&&{"aria-expanded":o,"aria-controls":u}},icon:c(_,{label:n,children:s}),label:n,tip:c(W,{label:n,shortcut:a})},e):c(w,{id:t,label:n,onClick:f?void 0:r,unavailable:f,expanded:o,controls:u,shortcut:a,lang:i,children:s},e)}const ce=({fit:e=false,clusterRef:t,children:n})=>{const[s,r]=v(null),o=R(s);j(s);const u=H(a=>{r(a),t==null||t(a)},[t]);return c("div",{className:"clover-canvas-controls","data-fit":e||void 0,"data-fullscreen":o,"data-testid":"clover-canvas-controls",ref:u,children:n})},V=()=>()=>{};function le(){return P(V,k)}const ie=({hidden:e})=>{const{t,langOf:n}=E(),s=t("imageExitFullScreen");return c("button",{"aria-label":s,...p(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:e,onClick:r=>void Y(r.currentTarget),type:"button",children:[c("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:c("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),s]})};function ue(e){const[t,n]=v(false);return m(()=>{if(!e)return;const s=()=>n(b()===e);return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}function de(e){const[t,n]=v(false);return m(()=>{if(!e)return;const s=()=>{const r=b();n(r===e||!!r&&F(e)===r&&(r==null?void 0:r.querySelector(".clover-canvas"))===e)};return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}class fe extends A.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?c("div",{className:"clover-canvas-error",role:"alert",lang:"en",children:[c("p",{className:"clover-canvas-error-headline","data-testid":"headline",children:"Something went wrong"}),n.message&&c("span",{className:"clover-canvas-error-body",children:`Error message: ${n.message}`})]}):this.props.children}}const G={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function he({kind:e,shown:t,room:n=false}){const{t:s,langOf:r}=E(),o=G[e];return c("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:t&&c("p",{...p(r(o)),children:s(o)})})}function ve({text:e,lang:t}){return c("div",{className:"clover-body-note","aria-hidden":"true",children:c("p",{...p(t),children:e})})}const J=5,me=300,pe=J*4;function be(e,t=false){return e==="touch"||e==="pen"&&!t}function ge(e){return e.pointerType==="pen"&&e.buttons===0}function Ee(e,t,n){for(let s=e;s&&s!==t;s=s.parentElement)if((n>0?s.scrollHeight-s.clientHeight-s.scrollTop:s.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(s).overflowY))return true;return false}function ye(e,t){var s;let n=e;for(;n&&n!==t;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((s=n.dataset)==null?void 0:s.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}export{he as B,ce as C,pe as D,fe as E,J as T,ge as a,me as b,be as c,R as d,ue as e,de as f,U as g,re as h,ye as i,ie as j,ve as k,oe as l,ae as r,Ee as s,Y as t,le as u};
@@ -1 +1 @@
1
- import{u as r}from"./shared-DFAX0n3B.mjs";import{L as n,P as a}from"./Provider-a3xY016W.mjs";import{u as i}from"./nodes-BleXuYE6.mjs";const s=t=>[...t.children].filter(e=>e.localName==="clover-logo").map(e=>({element:e,alt:e.getAttribute("alt")??void 0})),c=(t,e)=>t.length===e.length&&t.every((l,o)=>l.element===e[o].element&&l.alt===e[o].alt);function u({hosted:t,props:e}){const l=i(t.element,()=>s(t.element),c);return r(a,{...e,children:l.length?l.map((o,m)=>r(n,{alt:o.alt},m)):void 0})}export{u as ProviderElement};
1
+ import{u as r}from"./shared-D2RadIoz.mjs";import{L as n,P as a}from"./Provider-Dl_t_qEC.mjs";import{u as i}from"./nodes-CmOpA3s7.mjs";const s=t=>[...t.children].filter(e=>e.localName==="clover-logo").map(e=>({element:e,alt:e.getAttribute("alt")??void 0})),c=(t,e)=>t.length===e.length&&t.every((l,o)=>l.element===e[o].element&&l.alt===e[o].alt);function u({hosted:t,props:e}){const l=i(t.element,()=>s(t.element),c);return r(a,{...e,children:l.length?l.map((o,m)=>r(n,{alt:o.alt},m)):void 0})}export{u as ProviderElement};
@@ -1 +1 @@
1
- import{S as c,av as l,a9 as g,aw as v,L as b}from"./shared-DFAX0n3B.mjs";const A=t=>t&&typeof t=="object"?Object.entries(t).flatMap(([i,r])=>c(r).filter(s=>typeof s=="string").map(s=>({value:s,...i!=="none"?{language:i}:{}}))):typeof t=="string"?[{value:t}]:[],a=new WeakMap;function j(t){if(!t)return null;if(a.has(t))return a.get(t);const i=[],r=new Set,s=n=>{if(!n||r.has(n.id??n))return;r.add(n.id??n);const w=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=A(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let x=0;for(const o of c(n.items)){if((o==null?void 0:o.type)==="Range"){s(o);continue}const e=g(v(o));if(!e.id)continue;const f=x++;if(!w||!e.rect)continue;const{x:S,y:T,w:I,h:$}=e.rect,u=b(n.id,f);i.push({id:u,setId:l,canvasId:e.id,target:{id:e.id,rect:e.rect},motivation:["highlighting"],bodies:d,...h>1?{place:{index:f+1,total:h}}:{},annotation:{id:u,type:"Annotation",motivation:["highlighting"],...d.length&&{body:d.map(({value:E,language:y})=>({type:"TextualBody",value:E,...y?{language:y}:{}}))},target:`${e.id}#xywh=${S},${T},${I},${$}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};
1
+ import{S as c,av as l,a8 as g,aw as v,L as b}from"./shared-D2RadIoz.mjs";const A=t=>t&&typeof t=="object"?Object.entries(t).flatMap(([i,r])=>c(r).filter(s=>typeof s=="string").map(s=>({value:s,...i!=="none"?{language:i}:{}}))):typeof t=="string"?[{value:t}]:[],a=new WeakMap;function j(t){if(!t)return null;if(a.has(t))return a.get(t);const i=[],r=new Set,s=n=>{if(!n||r.has(n.id??n))return;r.add(n.id??n);const w=typeof n.id=="string"&&!c(n.behavior).includes("no-nav"),d=A(n.label),h=c(n.items).filter(o=>(o==null?void 0:o.type)!=="Range"&&g(v(o)).id).length;let x=0;for(const o of c(n.items)){if((o==null?void 0:o.type)==="Range"){s(o);continue}const e=g(v(o));if(!e.id)continue;const f=x++;if(!w||!e.rect)continue;const{x:S,y:T,w:I,h:$}=e.rect,u=b(n.id,f);i.push({id:u,setId:l,canvasId:e.id,target:{id:e.id,rect:e.rect},motivation:["highlighting"],bodies:d,...h>1?{place:{index:f+1,total:h}}:{},annotation:{id:u,type:"Annotation",motivation:["highlighting"],...d.length&&{body:d.map(({value:E,language:y})=>({type:"TextualBody",value:E,...y?{language:y}:{}}))},target:`${e.id}#xywh=${S},${T},${I},${$}`}})}};c(t.structures).forEach(s);const p=i.length?{id:l,source:"contents",entries:i}:null;return a.set(t,p),p}export{j as contentsSet};