@nulib/clover 4.4.1 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/README.md +4 -3
  2. package/dist/components/Annotations/Annotations.mjs +11 -5
  3. package/dist/components/Body/Caption.mjs +1 -1
  4. package/dist/components/Canvas/AnnotationMenu.mjs +16 -2
  5. package/dist/components/Canvas/AnnotationState.mjs +27 -23
  6. package/dist/components/Canvas/ControlMenu.mjs +9 -0
  7. package/dist/components/Canvas/PlaceBox.mjs +8 -0
  8. package/dist/components/Canvas/media/Transport.mjs +32 -18
  9. package/dist/components/Items/CountMenu.mjs +13 -1
  10. package/dist/components/Items/Items.mjs +24 -7
  11. package/dist/components/Items/PagerLayout.mjs +1 -0
  12. package/dist/components/Map/MapView.mjs +31 -19
  13. package/dist/components/Panel/About.mjs +16 -5
  14. package/dist/components/Panel/AboutActions.mjs +10 -16
  15. package/dist/components/Panel/LanguageToggle.mjs +69 -0
  16. package/dist/components/Panel/Panel.mjs +9 -1
  17. package/dist/components/Panel/ReadingLanguages.mjs +2 -16
  18. package/dist/components/Panel/sections.mjs +6 -1
  19. package/dist/components/Root/useRootState.mjs +43 -4
  20. package/dist/components/Search/Search.mjs +10 -7
  21. package/dist/components/Transcript/Transcript.mjs +42 -33
  22. package/dist/core/image-service-content.mjs +108 -0
  23. package/dist/core/load.mjs +38 -1
  24. package/dist/core/value.mjs +1 -1
  25. package/dist/i18n/config.mjs +88 -14
  26. package/dist/i18n/direction.mjs +2 -2
  27. package/dist/i18n/languages.mjs +42 -8
  28. package/dist/i18n/locales/index.mjs +4 -1
  29. package/dist/i18n/locales/ja.json.mjs +5 -0
  30. package/dist/i18n/locales/zh-Hans.json.mjs +5 -0
  31. package/dist/i18n/locales/zh-Hant.json.mjs +5 -0
  32. package/dist/index.d.mts +109 -24
  33. package/dist/lib/renderer/CanvasRenderer.mjs +20 -5
  34. package/dist/map/index.d.mts +3 -2
  35. package/dist/react/readingLanguages.mjs +15 -2
  36. package/dist/styles/core.css +1 -1
  37. package/dist/styles/default.css +1 -1
  38. package/dist/styles/items.css +1 -1
  39. package/dist/styles/map.css +1 -1
  40. package/dist/styles/media.css +1 -1
  41. package/dist/styles/panel.css +1 -1
  42. package/dist/styles.css +1 -1
  43. package/dist/templates/default/Default.mjs +3 -0
  44. package/dist/templates/document/Document.mjs +6 -1
  45. package/dist/templates/gallery/Gallery.mjs +2 -0
  46. package/dist/templates/index.d.mts +56 -11
  47. package/dist/templates/shared/LightboxView.mjs +3 -0
  48. package/dist/templates/shared/useDrawer.mjs +14 -2
  49. package/dist/ui/ErrorBoundary.mjs +19 -5
  50. package/dist/ui/FieldPill.mjs +2 -0
  51. package/dist/ui/GlobeGlyph.mjs +26 -0
  52. package/dist/ui/LanguageChoice.mjs +87 -20
  53. package/dist/ui/LanguageMenu.mjs +94 -0
  54. package/dist/ui/Sections.mjs +18 -5
  55. package/dist/ui/Tip.mjs +4 -2
  56. package/dist/ui/sheets/map.mjs +1 -1
  57. package/dist/ui/sheets/media.mjs +1 -1
  58. package/dist/ui/useScrollTrack.mjs +34 -19
  59. package/dist/web-components/About-BklM8JA9.mjs +1 -0
  60. package/dist/web-components/AnnotationItems-4mbvOrhN.mjs +1 -0
  61. package/dist/web-components/AnnotationMenu-DtMaxXf5.mjs +1 -0
  62. package/dist/web-components/AnnotationState-BuEpq99k.mjs +1 -0
  63. package/dist/web-components/Annotations-Dyg-RAdd.mjs +2 -0
  64. package/dist/web-components/{Annotations-oXpa3fvs.mjs → Annotations-oPabBO7j.mjs} +1 -1
  65. package/dist/web-components/{Body-BNLhtQi3.mjs → Body-CD7AtOPv.mjs} +1 -1
  66. package/dist/web-components/{BodyAlert-B0AblEtp.mjs → BodyAlert-DzW4__bK.mjs} +1 -1
  67. package/dist/web-components/{Button-0dU8Owcz.mjs → Button-1To2Pwuz.mjs} +1 -1
  68. package/dist/web-components/{Camera-BS8iIH74.mjs → Camera-B82ZMekU.mjs} +1 -1
  69. package/dist/web-components/{Canvas2DBackend-U4BLi8EN.mjs → Canvas2DBackend-Ds-qoQ0W.mjs} +1 -1
  70. package/dist/web-components/CanvasView-B4fnYim4.mjs +2 -0
  71. package/dist/web-components/{CaptionDetails-CtRzBSwh.mjs → CaptionDetails-TTAEPH02.mjs} +1 -1
  72. package/dist/web-components/{ChaptersMenu-DJRfJSwC.mjs → ChaptersMenu-DhbAktrS.mjs} +1 -1
  73. package/dist/web-components/{Chevron-BJFhP5wm.mjs → Chevron-Br3zRRMX.mjs} +1 -1
  74. package/dist/web-components/{ChoiceMenu-Cfjnk3NG.mjs → ChoiceMenu-B4_doj7b.mjs} +1 -1
  75. package/dist/web-components/{Collection-C2ji8AVd.mjs → Collection-DrMfq53r.mjs} +1 -1
  76. package/dist/web-components/{CollectionSelect-CSTSqjG3.mjs → CollectionSelect-PP7IEcwu.mjs} +1 -1
  77. package/dist/web-components/{Connected-B42WdjMx.mjs → Connected-BOPNEv3j.mjs} +1 -1
  78. package/dist/web-components/{Connected-D2y_qBDh.mjs → Connected-BguZSgy4.mjs} +1 -1
  79. package/dist/web-components/{Connected-C-Ars8eC.mjs → Connected-CN94wOYw.mjs} +1 -1
  80. package/dist/web-components/{Contents-BLbU9Qvc.mjs → Contents-Dn7MutL9.mjs} +1 -1
  81. package/dist/web-components/ControlMenu-DlP3JsqV.mjs +1 -0
  82. package/dist/web-components/ControlsFade-Cuh5Mqe7.mjs +1 -0
  83. package/dist/web-components/CountMenu-Aoott7Hu.mjs +1 -0
  84. package/dist/web-components/Cue-BAj92VWz.mjs +1 -0
  85. package/dist/web-components/Document-BjTWX_7P.mjs +1 -0
  86. package/dist/web-components/{DomLayers-DDRNVemT.mjs → DomLayers-GnBlZ7yI.mjs} +1 -1
  87. package/dist/web-components/{Download-VPFf23Kw.mjs → Download-C1RNBLdn.mjs} +1 -1
  88. package/dist/web-components/{EntryBodies-CKgmBQCk.mjs → EntryBodies-BG4F8uub.mjs} +1 -1
  89. package/dist/web-components/{EntryThumbnail-CgukpUtr.mjs → EntryThumbnail-BJPQwkQw.mjs} +1 -1
  90. package/dist/web-components/FieldPill-CgMPW9BB.mjs +1 -0
  91. package/dist/web-components/{FrameAnimation-C2EFrQl0.mjs → FrameAnimation-DWd0yBuN.mjs} +1 -1
  92. package/dist/web-components/Gallery-DpJqgaft.mjs +1 -0
  93. package/dist/web-components/GlobeGlyph-CLM28n1E.mjs +1 -0
  94. package/dist/web-components/{HideToggle-HVrk9D6t.mjs → HideToggle-C4mW4-CK.mjs} +1 -1
  95. package/dist/web-components/{ImageControls-BsGWsB_S.mjs → ImageControls-B36Hng03.mjs} +1 -1
  96. package/dist/web-components/Items-BApzELFW.mjs +1 -0
  97. package/dist/web-components/Label-CRTQApU-.mjs +1 -0
  98. package/dist/web-components/LanguageChoice-B1941Wuu.mjs +1 -0
  99. package/dist/web-components/LanguageMenu-yWDzK3U0.mjs +1 -0
  100. package/dist/web-components/LightboxView-BLHI5EIj.mjs +1 -0
  101. package/dist/web-components/{ListEnd-BPSaqeEg.mjs → ListEnd-CIiLZZzc.mjs} +1 -1
  102. package/dist/web-components/{Loaded-vg9q9y73.mjs → Loaded-X_Pr53fq.mjs} +1 -1
  103. package/dist/web-components/{LoadedCanvas-BtNg_QnI.mjs → LoadedCanvas-1Bi6-QtF.mjs} +1 -1
  104. package/dist/web-components/LoadedMap-58bpxj_6.mjs +1 -0
  105. package/dist/web-components/{Loading-DnCFXiNy.mjs → Loading-CyoVEwax.mjs} +1 -1
  106. package/dist/web-components/{Map-CIGzy4XB.mjs → Map-2oeDIJzq.mjs} +1 -1
  107. package/dist/web-components/MapView-DX3ZLqmp.mjs +3 -0
  108. package/dist/web-components/{Markup-Csh1bNkq.mjs → Markup-B2GbrisO.mjs} +1 -1
  109. package/dist/web-components/{MediaBody-CRJFBpMk.mjs → MediaBody-DZ9JgkKF.mjs} +1 -1
  110. package/dist/web-components/{MediaBody-CeEWPIDp.mjs → MediaBody-eFAZIyGv.mjs} +1 -1
  111. package/dist/web-components/{NavDate-qoFXy3Ou.mjs → NavDate-BwV4kPl-.mjs} +1 -1
  112. package/dist/web-components/{Navigator-9n2yLQdc.mjs → Navigator-CTrfNuwj.mjs} +1 -1
  113. package/dist/web-components/{Pager-4rZjWBna.mjs → Pager-BGjj90LQ.mjs} +1 -1
  114. package/dist/web-components/PagerLayout-Ce7zW_yB.mjs +1 -0
  115. package/dist/web-components/Panel-77xi6y2C.mjs +1 -0
  116. package/dist/web-components/PanelPart-Cm9VykIu.mjs +1 -0
  117. package/dist/web-components/{PanelToggle-0K2YTp6k.mjs → PanelToggle-Cj_FjIgS.mjs} +1 -1
  118. package/dist/web-components/{PartOfManifest-ZUGZW86B.mjs → PartOfManifest-B0RwR4iy.mjs} +1 -1
  119. package/dist/web-components/{Pending-lpHOVvqE.mjs → Pending-s7yYnZzR.mjs} +1 -1
  120. package/dist/web-components/PlaceBox-pt7Vmrs1.mjs +1 -0
  121. package/dist/web-components/{Placeholder-ChFeaw7a.mjs → Placeholder-BK-eqSCl.mjs} +1 -1
  122. package/dist/web-components/{Position-C2Hm7tJZ.mjs → Position-CKsSKMgZ.mjs} +1 -1
  123. package/dist/web-components/Primitives-T7usOLie.mjs +1 -0
  124. package/dist/web-components/Provider-B2k1G-E0.mjs +1 -0
  125. package/dist/web-components/{ReadMore-DsthjUIZ.mjs → ReadMore-Cs2t9xkI.mjs} +1 -1
  126. package/dist/web-components/Root-D942bSXu.mjs +1 -0
  127. package/dist/web-components/Scene-Cwzisn4E.mjs +1 -0
  128. package/dist/web-components/SceneView-_CNm8cGL.mjs +1 -0
  129. package/dist/web-components/Search-u43mfzT8.mjs +1 -0
  130. package/dist/web-components/Sections-CPU5bGvk.mjs +2 -0
  131. package/dist/web-components/{SeekMarks-DNHLgUaX.mjs → SeekMarks-CnqVS-ym.mjs} +1 -1
  132. package/dist/web-components/StandaloneItems-D9Og9pdI.mjs +1 -0
  133. package/dist/web-components/{Status-DLZANUzF.mjs → Status-Cxev3WuC.mjs} +1 -1
  134. package/dist/web-components/{Steps-BigQvWNW.mjs → Steps-l7_NsIBr.mjs} +1 -1
  135. package/dist/web-components/{TargetItems-DzNzoEeh.mjs → TargetItems-nP3Oa9hh.mjs} +1 -1
  136. package/dist/web-components/Timeline-C1g1MXp5.mjs +1 -0
  137. package/dist/web-components/{Tip-CoSRaKjm.mjs → Tip-D2pR3HW4.mjs} +1 -1
  138. package/dist/web-components/Transcript-D_a9jio-.mjs +1 -0
  139. package/dist/web-components/Transport-CowDRPK7.mjs +1 -0
  140. package/dist/web-components/Transport-uqpqUIKE.mjs +1 -0
  141. package/dist/web-components/{annotation-collection-DwJ2R8tG.mjs → annotation-collection-d6JyHnML.mjs} +1 -1
  142. package/dist/web-components/{annotation-name-2rUtUYsN.mjs → annotation-name-BWTrB9nK.mjs} +1 -1
  143. package/dist/web-components/{annotations-content-fTNYRgN_.mjs → annotations-content-Bomfao_5.mjs} +1 -1
  144. package/dist/web-components/{body-qFClz6nF.mjs → body-Dfn0GJa2.mjs} +1 -1
  145. package/dist/web-components/{canvas-DqmG6v1g.mjs → canvas-DHIn2DIV.mjs} +1 -1
  146. package/dist/web-components/{cloverEngine-BBfVDNbE.mjs → cloverEngine-DDVOcZTv.mjs} +1 -1
  147. package/dist/web-components/{content-state-reader-DYXL5lFa.mjs → content-state-reader-CyNkhTZY.mjs} +1 -1
  148. package/dist/web-components/{controlGlyphs-DqZmaT9n.mjs → controlGlyphs-Dymy1PkA.mjs} +1 -1
  149. package/dist/web-components/{controls-BvC6zo32.mjs → controls-CIkf2UoE.mjs} +1 -1
  150. package/dist/web-components/custom-elements.json +35 -3
  151. package/dist/web-components/downloads-DCsDCcA8.mjs +1 -0
  152. package/dist/web-components/{dragToClose-wFiErDub.mjs → dragToClose-BKcu5guw.mjs} +1 -1
  153. package/dist/web-components/{engine-B0W3FXuQ.mjs → engine-BhdQsvOB.mjs} +1 -1
  154. package/dist/web-components/{engines-DVRUnyFv.mjs → engines-pnfVMoUH.mjs} +1 -1
  155. package/dist/web-components/{fetchManifest-f8gYlPDK.mjs → fetchManifest-QmVIeaHo.mjs} +1 -1
  156. package/dist/web-components/{fromManifest-BmpOsc5g.mjs → fromManifest-CvXwGGRI.mjs} +1 -1
  157. package/dist/web-components/{glyphs-oAgi4Au0.mjs → glyphs-BAh9Lia0.mjs} +1 -1
  158. package/dist/web-components/hooks-CTqjdpYl.mjs +1 -0
  159. package/dist/web-components/{image-layers-CndzdWOW.mjs → image-layers-Dp2qOSA5.mjs} +1 -1
  160. package/dist/web-components/image-service-content-B5ICMeIO.mjs +1 -0
  161. package/dist/web-components/{imageService-DTp1mc0F.mjs → imageService-XKWMYAcG.mjs} +1 -1
  162. package/dist/web-components/index-BuoWCrun.mjs +1 -0
  163. package/dist/web-components/index.mjs +1 -1
  164. package/dist/web-components/items-8ZEJCxWU.mjs +1 -0
  165. package/dist/web-components/items-DjpIYUxD.mjs +1 -0
  166. package/dist/web-components/ja-Cg1enUhM.mjs +1 -0
  167. package/dist/web-components/label-BWHRHAY2.mjs +1 -0
  168. package/dist/web-components/layout-B3HyDCsP.mjs +1 -0
  169. package/dist/web-components/{link-CEfxl5hU.mjs → link-Mnt5GrKM.mjs} +1 -1
  170. package/dist/web-components/logo-YR9jXUE4.mjs +1 -0
  171. package/dist/web-components/{models-B-kri8Ov.mjs → models-NfaX6B8u.mjs} +1 -1
  172. package/dist/web-components/{nodes-BKoxD-el.mjs → nodes-CRrc5Svn.mjs} +1 -1
  173. package/dist/web-components/{overlayImage-Dp8CjA_L.mjs → overlayImage-D7Knsh4X.mjs} +1 -1
  174. package/dist/web-components/{panel-ldBDfuIV.mjs → panel-DUMFdAc8.mjs} +1 -1
  175. package/dist/web-components/part-C_V28rvN.mjs +1 -0
  176. package/dist/web-components/{playerSurface-CLWTmyt1.mjs → playerSurface-CF5g-4Po.mjs} +1 -1
  177. package/dist/web-components/pointer-PJLHbbSD.mjs +1 -0
  178. package/dist/web-components/{provider-D24Pm3a1.mjs → provider-b4id5kCa.mjs} +1 -1
  179. package/dist/web-components/{range-regions-9vY5ikPm.mjs → range-regions-DCY76ydS.mjs} +1 -1
  180. package/dist/web-components/{read-more-CoOeWZOF.mjs → read-more-UM90-AEc.mjs} +1 -1
  181. package/dist/web-components/readingLanguages-Qdn21-7Q.mjs +1 -0
  182. package/dist/web-components/rendererSurface-PZlq-wa_.mjs +22 -0
  183. package/dist/web-components/{renderers-BXcv_AqV.mjs → renderers-DIHonXTq.mjs} +1 -1
  184. package/dist/web-components/resource-BlU2Ese6.mjs +1 -0
  185. package/dist/web-components/{save-file-Dj3MRR7Y.mjs → save-file-GI0ekTmd.mjs} +1 -1
  186. package/dist/web-components/{search-C9OyY1qk.mjs → search-CHjjiXkB.mjs} +1 -1
  187. package/dist/web-components/shared-DgJ0bXca.mjs +1 -0
  188. package/dist/web-components/{show-link-4mlfdoeo.mjs → show-link-BlLkTYtm.mjs} +1 -1
  189. package/dist/web-components/{sizedImage-COfCkv_8.mjs → sizedImage-BoGT1x5n.mjs} +1 -1
  190. package/dist/web-components/{split-Ci426kxC.mjs → split-OO6-WiG3.mjs} +1 -1
  191. package/dist/web-components/{status-CzasXLV8.mjs → status-CSenPCO4.mjs} +1 -1
  192. package/dist/web-components/styles-Bvw9LFU7.mjs +1 -0
  193. package/dist/web-components/three.mjs +1 -1
  194. package/dist/web-components/{thumbnail-ByuoouMG.mjs → thumbnail-DYJHCrW_.mjs} +1 -1
  195. package/dist/web-components/{tip-CQEGLOst.mjs → tip-Dr1mfd4o.mjs} +1 -1
  196. package/dist/web-components/{toggle-Dro_EmUU.mjs → toggle-86lqpaU9.mjs} +1 -1
  197. package/dist/web-components/{useContainerName-CUP-TlA5.mjs → useContainerName-BfNL6p3O.mjs} +1 -1
  198. package/dist/web-components/{useControlsVisibility-DeI3NHWp.mjs → useControlsVisibility-C3LCnrb7.mjs} +1 -1
  199. package/dist/web-components/useNearViewport-Dk5q1rzk.mjs +1 -0
  200. package/dist/web-components/useScrollTrack-B_yYmQDS.mjs +1 -0
  201. package/dist/web-components/viewer/{AnnotationItems-ByWBkMRd.mjs → AnnotationItems-BbPnS9EE.mjs} +1 -1
  202. package/dist/web-components/viewer/AnnotationMenu-BGv-HimF.mjs +1 -0
  203. package/dist/web-components/viewer/AnnotationState-uRm7bEwg.mjs +1 -0
  204. package/dist/web-components/viewer/{Annotations-CJRF_IwO.mjs → Annotations-_2PMmUfu.mjs} +1 -1
  205. package/dist/web-components/viewer/Annotations-reaO1ILe.mjs +2 -0
  206. package/dist/web-components/viewer/{Canvas2DBackend-DPDF0a8D.mjs → Canvas2DBackend-Dru1ImJh.mjs} +1 -1
  207. package/dist/web-components/viewer/CaptionDetails-3OlEaKmX.mjs +1 -0
  208. package/dist/web-components/viewer/{ChaptersMenu-D7b9t6bm.mjs → ChaptersMenu-kchuXDZy.mjs} +1 -1
  209. package/dist/web-components/viewer/{ChoiceMenu-f2774ZaY.mjs → ChoiceMenu-C8pEoSC6.mjs} +1 -1
  210. package/dist/web-components/viewer/{Collection-D1E6A8es.mjs → Collection-B4LN_80C.mjs} +1 -1
  211. package/dist/web-components/viewer/{Connected-BLeqNIOf.mjs → Connected-80hCJuhg.mjs} +1 -1
  212. package/dist/web-components/viewer/{Connected-DfqFYcTn.mjs → Connected-CzPY2rgu.mjs} +1 -1
  213. package/dist/web-components/viewer/{Contents-DvmP8OGy.mjs → Contents-D4jw_lGe.mjs} +1 -1
  214. package/dist/web-components/viewer/ControlMenu-C3Jh10iR.mjs +1 -0
  215. package/dist/web-components/viewer/ControlsFade-BKkJ95B5.mjs +1 -0
  216. package/dist/web-components/viewer/CountMenu-Blz1oHgs.mjs +1 -0
  217. package/dist/web-components/viewer/Cue-BnC9XuZp.mjs +1 -0
  218. package/dist/web-components/viewer/Document-BG0F97nL.mjs +1 -0
  219. package/dist/web-components/viewer/{DomLayers-CD56oMcR.mjs → DomLayers-BL6vNcmI.mjs} +1 -1
  220. package/dist/web-components/viewer/{Download-DAOzY3Nu.mjs → Download-B0BD_SzR.mjs} +1 -1
  221. package/dist/web-components/viewer/{EntryBodies-0A0uyEwC.mjs → EntryBodies-Cbmr-Eg4.mjs} +1 -1
  222. package/dist/web-components/viewer/{EntryThumbnail-fBaBZJGd.mjs → EntryThumbnail-DAdEyIuL.mjs} +1 -1
  223. package/dist/web-components/viewer/FieldPill-DNL96sDW.mjs +1 -0
  224. package/dist/web-components/viewer/{FrameAnimation-kba5V4Vk.mjs → FrameAnimation-BO3QVSUw.mjs} +1 -1
  225. package/dist/web-components/viewer/Gallery-DN7ajF4i.mjs +1 -0
  226. package/dist/web-components/viewer/GlobeGlyph-B-Wd0AkW.mjs +1 -0
  227. package/dist/web-components/viewer/{HideToggle-D8c_7URN.mjs → HideToggle-DH0u1wFC.mjs} +1 -1
  228. package/dist/web-components/viewer/{ImageControls-C_C0LSj7.mjs → ImageControls-Lz-ESk1X.mjs} +1 -1
  229. package/dist/web-components/viewer/LanguageChoice-BkQkSsPE.mjs +1 -0
  230. package/dist/web-components/viewer/LanguageMenu-gIJHQiBc.mjs +1 -0
  231. package/dist/web-components/viewer/LightboxView-D066VR5m.mjs +1 -0
  232. package/dist/web-components/viewer/{ListEnd-B2hnHrcl.mjs → ListEnd-D4nNouKZ.mjs} +1 -1
  233. package/dist/web-components/viewer/{MapView-Cr3RiB1K.mjs → MapView-C_8iciAK.mjs} +3 -3
  234. package/dist/web-components/viewer/{MediaBody-4ZFKNnr3.mjs → MediaBody-BgBDbfHg.mjs} +1 -1
  235. package/dist/web-components/viewer/{MediaBody-xjpo27Vw.mjs → MediaBody-D4hiLqhm.mjs} +1 -1
  236. package/dist/web-components/viewer/{NavDate-Dz5eW2XY.mjs → NavDate-BMVT6UwB.mjs} +1 -1
  237. package/dist/web-components/viewer/{Navigator-DNZcaADs.mjs → Navigator-DbBBbDZn.mjs} +1 -1
  238. package/dist/web-components/viewer/PagerLayout-D771pC5E.mjs +1 -0
  239. package/dist/web-components/viewer/PanelPart-2H7jd6PS.mjs +1 -0
  240. package/dist/web-components/viewer/{PartOfManifest-BHpVLJOn.mjs → PartOfManifest-BMaH_tsn.mjs} +1 -1
  241. package/dist/web-components/viewer/PlaceBox-OytRM9_s.mjs +1 -0
  242. package/dist/web-components/viewer/{Placeholder-CLITKdu6.mjs → Placeholder-BWuq47Sw.mjs} +1 -1
  243. package/dist/web-components/viewer/Search-Bmz7mUbA.mjs +1 -0
  244. package/dist/web-components/viewer/{SeekMarks-B8cuyVgz.mjs → SeekMarks-CAsMUj2N.mjs} +1 -1
  245. package/dist/web-components/viewer/{StandaloneItems-Cu0aBqAo.mjs → StandaloneItems-BCHhR9sF.mjs} +1 -1
  246. package/dist/web-components/viewer/{Steps-DqszSHcR.mjs → Steps-BDT2W9QN.mjs} +1 -1
  247. package/dist/web-components/viewer/{TargetItems-DN8ebfbK.mjs → TargetItems-CkZbD8GE.mjs} +1 -1
  248. package/dist/web-components/viewer/Transcript-BbFXEJSc.mjs +1 -0
  249. package/dist/web-components/viewer/Transport-CI5UkA3K.mjs +1 -0
  250. package/dist/web-components/viewer/Transport-PgBpf33S.mjs +1 -0
  251. package/dist/web-components/viewer/{annotation-collection-Drwfws4R.mjs → annotation-collection-l4zuf56A.mjs} +1 -1
  252. package/dist/web-components/viewer/{annotation-name-Bp2GHdpi.mjs → annotation-name-CRl0w7NR.mjs} +1 -1
  253. package/dist/web-components/viewer/annotations-content-CYjPRTZn.mjs +1 -0
  254. package/dist/web-components/viewer/{cloverEngine-BmUppb5Y.mjs → cloverEngine-2b_guC4P.mjs} +2 -2
  255. package/dist/web-components/viewer/{content-state-reader-B9u1vc3t.mjs → content-state-reader-Cm-rvusT.mjs} +1 -1
  256. package/dist/web-components/viewer/{dragToClose-C9KwbQpA.mjs → dragToClose-DXXIWV62.mjs} +1 -1
  257. package/dist/web-components/viewer/{fetchManifest-gl9fyg7D.mjs → fetchManifest-DorkDXGC.mjs} +1 -1
  258. package/dist/web-components/viewer/{host-D3tVEhAD.mjs → host-DscGC2S0.mjs} +1 -1
  259. package/dist/web-components/viewer/{image-layers-DSehEFmU.mjs → image-layers-CZ9-efD2.mjs} +1 -1
  260. package/dist/web-components/viewer/image-service-content-C60w8IZm.mjs +1 -0
  261. package/dist/web-components/viewer/index.mjs +1 -1
  262. package/dist/web-components/viewer/{link-BYKFtAno.mjs → link-CysSctMX.mjs} +1 -1
  263. package/dist/web-components/viewer/overlayImage-CwPnVnIi.mjs +1 -0
  264. package/dist/web-components/viewer/{range-regions-CEM4sQKi.mjs → range-regions-C7ZBtSyb.mjs} +1 -1
  265. package/dist/web-components/viewer/{renderers-BiDrFLxn.mjs → renderers-D4wJiQYv.mjs} +1 -1
  266. package/dist/web-components/viewer/{save-file-CzYUFJNg.mjs → save-file-uqsNOVPU.mjs} +1 -1
  267. package/dist/web-components/viewer/{search-Dr6AQ3Lb.mjs → search-CWuD5EZA.mjs} +1 -1
  268. package/dist/web-components/viewer/styles-BjjJM8OS.mjs +1 -0
  269. package/dist/web-components/viewer/{useControlsVisibility-CP5m7oBd.mjs → useControlsVisibility-KTxa_3yJ.mjs} +1 -1
  270. package/dist/web-components/viewer/viewer-C3d_TgAI.mjs +29 -0
  271. package/dist/web-components/viewer/{vtt-CDqR3lHn.mjs → vtt-DqtJ20x0.mjs} +1 -1
  272. package/dist/web-components/viewer-BoyWG64n.mjs +1 -0
  273. package/dist/web-components/{vtt-DHZRkZ_P.mjs → vtt-BNuRzGap.mjs} +1 -1
  274. package/dist/web-components/zh-Hans-DnYm6PWu.mjs +1 -0
  275. package/dist/web-components/zh-Hant-DsxnuLPZ.mjs +1 -0
  276. package/package.json +1 -1
  277. package/dist/web-components/About-DgBOPS3N.mjs +0 -1
  278. package/dist/web-components/AnnotationItems-CBEb7Cew.mjs +0 -1
  279. package/dist/web-components/AnnotationMenu-DiQyu45i.mjs +0 -1
  280. package/dist/web-components/AnnotationState-DemGGP7N.mjs +0 -1
  281. package/dist/web-components/Annotations-CDVyd69_.mjs +0 -2
  282. package/dist/web-components/CanvasView-DeM04pm-.mjs +0 -2
  283. package/dist/web-components/ControlMenu-CJtszzgx.mjs +0 -1
  284. package/dist/web-components/ControlsFade-Pye8AyCz.mjs +0 -1
  285. package/dist/web-components/CountMenu-3-t8974M.mjs +0 -1
  286. package/dist/web-components/Cue-eTms5gbr.mjs +0 -1
  287. package/dist/web-components/Document-CkKoLQ51.mjs +0 -1
  288. package/dist/web-components/FieldPill-M9u0eLtz.mjs +0 -1
  289. package/dist/web-components/Gallery-mqXXjGtK.mjs +0 -1
  290. package/dist/web-components/Items-BoFm0Hlx.mjs +0 -1
  291. package/dist/web-components/Label-GTBsGDCC.mjs +0 -1
  292. package/dist/web-components/LanguageChoice-BEiskuVG.mjs +0 -1
  293. package/dist/web-components/LightboxView-Daz0RCee.mjs +0 -1
  294. package/dist/web-components/LoadedMap-D9Z3zl12.mjs +0 -1
  295. package/dist/web-components/MapView-CExlNO5E.mjs +0 -3
  296. package/dist/web-components/PagerLayout-l6UNSoQ1.mjs +0 -1
  297. package/dist/web-components/Panel-ikILE92M.mjs +0 -1
  298. package/dist/web-components/PanelPart-VPAwSoQZ.mjs +0 -1
  299. package/dist/web-components/PlaceBox-D73C--SU.mjs +0 -1
  300. package/dist/web-components/Primitives-CBRreXtS.mjs +0 -1
  301. package/dist/web-components/Provider-HPVBNZPr.mjs +0 -1
  302. package/dist/web-components/Root-BJwk-F1e.mjs +0 -1
  303. package/dist/web-components/Scene-DC7ofvsK.mjs +0 -1
  304. package/dist/web-components/SceneView-C53yZtMZ.mjs +0 -1
  305. package/dist/web-components/Search-Cd0xLU3y.mjs +0 -1
  306. package/dist/web-components/Sections-Cf3JDxnz.mjs +0 -2
  307. package/dist/web-components/StandaloneItems-DEchYe7Y.mjs +0 -1
  308. package/dist/web-components/Timeline--uq4-_TD.mjs +0 -1
  309. package/dist/web-components/Transcript-Dex719tP.mjs +0 -1
  310. package/dist/web-components/Transport-BV0Rg5Ym.mjs +0 -1
  311. package/dist/web-components/Transport-CHkvmPbN.mjs +0 -1
  312. package/dist/web-components/downloads-CFz0RnMz.mjs +0 -1
  313. package/dist/web-components/hooks-uer3ZRx7.mjs +0 -1
  314. package/dist/web-components/index-BkADsP3U.mjs +0 -1
  315. package/dist/web-components/items-BWG13qDG.mjs +0 -1
  316. package/dist/web-components/items-SD92pRMN.mjs +0 -1
  317. package/dist/web-components/label-Bw9SwLh8.mjs +0 -1
  318. package/dist/web-components/layout-DrVnUBcm.mjs +0 -1
  319. package/dist/web-components/logo-Dzr2M4F7.mjs +0 -1
  320. package/dist/web-components/part-dr-d1XPo.mjs +0 -1
  321. package/dist/web-components/pointer-IZcH8rZy.mjs +0 -1
  322. package/dist/web-components/readingLanguages-Bd4MD2DP.mjs +0 -1
  323. package/dist/web-components/rendererSurface-Ox625xUL.mjs +0 -22
  324. package/dist/web-components/resource-DmK-8hJ-.mjs +0 -1
  325. package/dist/web-components/shared-BmkV0s_d.mjs +0 -1
  326. package/dist/web-components/styles-On1ck1Ob.mjs +0 -1
  327. package/dist/web-components/useNearViewport-yyUYq47j.mjs +0 -1
  328. package/dist/web-components/useScrollTrack-CcFLYR4o.mjs +0 -1
  329. package/dist/web-components/viewer/AnnotationMenu-C-9tbH4G.mjs +0 -1
  330. package/dist/web-components/viewer/AnnotationState-CV4g-WUB.mjs +0 -1
  331. package/dist/web-components/viewer/Annotations-t1K8U5Kp.mjs +0 -2
  332. package/dist/web-components/viewer/CaptionDetails-xzvdqP5N.mjs +0 -1
  333. package/dist/web-components/viewer/ControlMenu-DIfN3xYJ.mjs +0 -1
  334. package/dist/web-components/viewer/ControlsFade-sckPhZ4x.mjs +0 -1
  335. package/dist/web-components/viewer/CountMenu-BQVCtVfu.mjs +0 -1
  336. package/dist/web-components/viewer/Cue-DQ8q-fgb.mjs +0 -1
  337. package/dist/web-components/viewer/Document-B-nJpfDh.mjs +0 -1
  338. package/dist/web-components/viewer/FieldPill-BQcDb4xM.mjs +0 -1
  339. package/dist/web-components/viewer/Gallery-_0dEBq2w.mjs +0 -1
  340. package/dist/web-components/viewer/LanguageChoice-0UWQ5V-y.mjs +0 -1
  341. package/dist/web-components/viewer/LightboxView-Dnlf7m8l.mjs +0 -1
  342. package/dist/web-components/viewer/PagerLayout-PYWFPFSJ.mjs +0 -1
  343. package/dist/web-components/viewer/PanelPart-Bd0JqUwF.mjs +0 -1
  344. package/dist/web-components/viewer/PlaceBox-Bh9V3RLS.mjs +0 -1
  345. package/dist/web-components/viewer/Search-C0B5Jh9V.mjs +0 -1
  346. package/dist/web-components/viewer/Transcript-D3mKmdQY.mjs +0 -1
  347. package/dist/web-components/viewer/Transport-9f_lhebG.mjs +0 -1
  348. package/dist/web-components/viewer/Transport-BudReE7Y.mjs +0 -1
  349. package/dist/web-components/viewer/annotations-content-Ci-orrao.mjs +0 -1
  350. package/dist/web-components/viewer/overlayImage-CdgpMutd.mjs +0 -1
  351. package/dist/web-components/viewer/styles-DvZTMHkr.mjs +0 -1
  352. package/dist/web-components/viewer/viewer-DaG51iO3.mjs +0 -29
  353. package/dist/web-components/viewer-DeAUI9Fi.mjs +0 -1
@@ -1 +1 @@
1
- import{u as e,k as o}from"./shared-BmkV0s_d.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-DgJ0bXca.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 s,T as o,e as i,ai as r,a1 as l,aj as f,ak as v,F as u,n as d,a as c,t as g}from"./shared-DgJ0bXca.mjs";function C(){const n=s(a=>a.status),e=s(a=>a.error);return o(()=>({status:n,error:e}),[n,e])}function S(){return s(n=>n.manifest)}function b(){return s(n=>u(n.manifest))}function p(){return s(n=>d(n.manifest,n.canvasId))}function z(){return s(n=>l(n.manifest,n.canvasId))}function A(){const{clover:n}=i("useNavigation"),e=s(t=>v(t.manifest,t.canvasId)),a=s(t=>u(t.manifest).views.length);return o(()=>r(n,e,a),[n,e,a])}function I(){return s(n=>f(n.manifest,n.addedSets))}function L(n){const{language:e}=i("useLocalized");return o(()=>g(n,e),[n,e])}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,a7 as L,a8 as $,ax as P}from"./shared-BmkV0s_d.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,ab as L,ac as $,aA as P}from"./shared-DgJ0bXca.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,m)=>{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:m,image:o.id}:void 0,b=P(n,l,t.id).map(p=>{const h=q(p.annotation,o),N=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)),M=`${t.id}#xywh=${N},${E},${S},${g}`;return{...p,canvasId:t.id,target:$(M),annotation:{...p.annotation,target:M},...A?{layer:A}:{}}});if(!b.length)continue;let x=c.get(l);x||(x={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,x)),x.entries.push(...b)}})})}))}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,m,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:m/100*s,w:n/100*e,h:l/100*s,width:e,height:s}:{x:o,y:m,w:n,h:l,width:e,height:s}}const w=$(f).rect;return w?{...w,width:e,height:s}:d}export{F as imageLayers};
@@ -0,0 +1 @@
1
+ import{p as c,i as d}from"./imageService-XKWMYAcG.mjs";import{aF as l}from"./shared-DgJ0bXca.mjs";function m(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??m(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function f(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:d(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function v(i,e){const t=c(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[f(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:f(t,n,m(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await l(h)}}export{m as fittedSize,v as imageServiceContent};
@@ -1 +1 @@
1
- import{a1 as j}from"./shared-BmkV0s_d.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{a3 as j}from"./shared-DgJ0bXca.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,F as p};
@@ -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 p=(e,t,o)=>U(e,typeof t!="symbol"?t+"":t,o);let x;function V(e){x=e}function Je(){return x}function H(e={}){return import("./shared-DgJ0bXca.mjs").then(t=>t.aM).then(t=>t.initCloverI18n(e))}const A=new Map,z=new Set;function Ke(e,t,o,n=false){if(!A.has(t)){A.set(t,{index:e,css:o,unlayered:n});for(const l of z)l.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){p(this,"injected",new Set);p(this,"unlayered",new Set);p(this,"nonce");p(this,"adopted",null);this.doc=t,this.nonce=B(t),z.add(this),A.forEach(({index:o,css:n,unlayered:l},a)=>this.place(a,o,n,l))}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,l=false){if(this.injected.has(t))return;if(this.injected.add(t),l&&this.unlayered.add(t),this.adopted)return this.adopt(o,t,n);const a=this.style(t,n);a.dataset.cloverIndex=String(o);const g=[...this.doc.head.querySelectorAll("style[data-clover-index]")],m=g.filter(u=>Number(u.dataset.cloverIndex)<o).at(-1),y=g.find(u=>Number(u.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 l=this.doc.defaultView??window,a=new l.CSSStyleSheet;a.replaceSync(this.unlayered.has(o)?W(n):n);const g=this.adopted,m=g.findIndex(r=>r.index>t);g.splice(m===-1?g.length:m,0,{index:t,sheet:a});const y=new Set(g.map(r=>r.sheet));this.doc.adoptedStyleSheets=[...g.map(r=>r.sheet),...this.doc.adoptedStyleSheets.filter(r=>!y.has(r))]}}const P=new WeakMap;function T(e){let t=P.get(e);return t||P.set(e,t=new F(e)),t}const q="@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 Q=null,k=null;const _=()=>Q??(Q=import("./shared-DgJ0bXca.mjs").then(e=>e.aN).then(e=>k=e)),J=e=>e.trim().toLowerCase()==="false";function K(e,{type:t,min:o},n){if(e===null)return;if(t==="string")return e;if(t==="boolean")return!J(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 l=e.trim().toLowerCase();if(t.includes(l))return l==="false"?false:l;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);p(this,"kind",e.kind)}static get observedAttributes(){return Object.keys(e.attributes)}connectedCallback(){T(this.ownerDocument).inject("elements",q)}}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??[],l=Object.entries(e.events??{});let a=null,g=null;const m=()=>g??(g=Promise.all([t().then(r=>a=r),_()]));class y extends HTMLElement{constructor(){super(...arguments);p(this,"kind",o);p(this,"needsRoot",!!e.needsRoot);p(this,"values",{});p(this,"kept",{});p(this,"props",{});p(this,"listeners",new Set);p(this,"warned",new Set);p(this,"handlers",Object.fromEntries(l.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,D)=>[b,h[D]])),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}])));p(this,"getProps",()=>this.props);p(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(),T(this.ownerDocument).inject("elements",q),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=K(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()))}}p(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(u){u==null?delete this.values[r]:this.values[r]=u,this.update()}});for(const[,r]of l){if(!r.keeps)continue;const u=r.keeps;Object.defineProperty(y.prototype,u,{configurable:true,enumerable:true,get(){return this.kept[u]??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"},"interface-languages":{prop:"interfaceLanguages",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"},side:{prop:"side",type:["start","end"]}},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}},pe={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:[]}}},le={tag:"clover-items",kind:"part",attributes:{layout:{prop:"layout",type:["slider","list","grid","masonry","pager"]},orientation:{prop:"orientation",type:["horizontal","vertical"]},secondary:{prop:"secondary",type:["summary","navDate","none"]},labels:{prop:"labels",type:"boolean"},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"]},ge={prop:"of",type:["manifest","canvas"]},N={prop:"value",type:"data"},d=(e,t={})=>({tag:e,kind:"part",attributes:{of:ge,value:N,...t},properties:["value"]}),ue=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:N,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},Le={tag:"clover-download",kind:"part",needsRoot:true,attributes:w},xe={tag:"clover-search",kind:"part",needsRoot:true,attributes:{...w,sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},ze={tag:"clover-contents",kind:"part",needsRoot:true,attributes:{}},Te={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"]}}},qe={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},Ne={tag:"clover-collection-select",kind:"part",needsRoot:true,attributes:{},events:{"clover-change":{prop:"onChange",detail:["manifestId"]}}},De={tag:"clover-about",kind:"part",needsRoot:true,attributes:{"canvas-summary":{prop:"canvasSummary",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"interface-languages":{prop:"interfaceLanguages",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"},zoom:{prop:"zoom",type:"number",min:0},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"},"interface-languages":{prop:"interfaceLanguages",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,pe,de,le,Ie,je,Pe,Ae,we,ue,he,ve,ye,be,Ce,fe,ke,me,Se,Ee,Oe,De,qe,Me,Ne,ze,xe,Te,Le,$e,X,ee,te,oe,ne,re,ae,ie,se,Ve,Ue],c=(e,t,o)=>()=>Promise.all([e(),import("./part-C_V28rvN.mjs")]).then(([n,{drawn:l}])=>l(n[t],o)),R=e=>()=>import("./split-OO6-WiG3.mjs").then(t=>t[e]),v=e=>c(()=>import("./Primitives-T7usOLie.mjs"),e),L=e=>c(()=>import("./Pager-BGjj90LQ.mjs"),e),We={"clover-viewer":()=>import("./viewer-BoyWG64n.mjs").then(e=>e.v).then(e=>e.ViewerElement),"clover-root":()=>import("./shared-DgJ0bXca.mjs").then(e=>e.aQ).then(e=>e.RootElement),"clover-label":()=>import("./label-BWHRHAY2.mjs").then(e=>e.LabelElement),"clover-body":()=>import("./body-Dfn0GJa2.mjs").then(e=>e.BodyElement),"clover-items":()=>import("./items-8ZEJCxWU.mjs").then(e=>e.ItemsElement),"clover-position":c(()=>import("./Position-CKsSKMgZ.mjs"),"Position"),"clover-previous":L("Previous"),"clover-next":L("Next"),"clover-status":()=>import("./status-CSenPCO4.mjs").then(e=>e.StatusElement),"clover-thumbnail":v("Thumbnail"),"clover-summary":v("Summary"),"clover-metadata":c(()=>import("./Primitives-T7usOLie.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-b4id5kCa.mjs").then(e=>e.ProviderElement),"clover-logo":()=>import("./logo-YR9jXUE4.mjs").then(e=>e.LogoElement),"clover-value":v("Value"),"clover-about":c(()=>import("./About-BklM8JA9.mjs").then(e=>e.a),"About"),"clover-annotations":c(()=>import("./Annotations-Dyg-RAdd.mjs"),"Annotations",["renderEntry"]),"clover-collection":c(()=>import("./Collection-DrMfq53r.mjs"),"Collection"),"clover-collection-select":c(()=>import("./CollectionSelect-PP7IEcwu.mjs"),"CollectionSelect"),"clover-contents":c(()=>import("./Contents-Dn7MutL9.mjs"),"Contents"),"clover-search":c(()=>import("./Search-u43mfzT8.mjs"),"Search"),"clover-transcript":c(()=>import("./Transcript-D_a9jio-.mjs"),"Transcript"),"clover-download":c(()=>import("./Download-C1RNBLdn.mjs"),"Download"),"clover-map":c(()=>import("./Map-2oeDIJzq.mjs"),"CloverMap"),"clover-panel":()=>import("./panel-DUMFdAc8.mjs").then(e=>e.PanelElement),"clover-panel-toggle":()=>import("./toggle-86lqpaU9.mjs").then(e=>e.PanelToggleElement),"clover-split":R("SplitElement"),"clover-split-pane":R("SplitPaneElement"),"clover-split-handle":R("SplitHandleElement"),"clover-canvas":()=>import("./canvas-DHIn2DIV.mjs").then(e=>e.CanvasElement),"clover-timeline":c(()=>import("./Timeline-C1g1MXp5.mjs"),"Timeline"),"clover-scene":c(()=>import("./Scene-Cwzisn4E.mjs"),"Scene"),"clover-tip":()=>import("./tip-Dr1mfd4o.mjs").then(e=>e.TipElement),"clover-read-more":()=>import("./read-more-UM90-AEc.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,Qe={mapWorkerUrl:Fe};Be(Qe);export{Ke as a,Be as d,Je as g,H as i};
@@ -1 +1 @@
1
- import{d as n,i as o}from"./index-BkADsP3U.mjs";export{n as defineCloverElements,o as initCloverI18n};
1
+ import{d as n,i as o}from"./index-BuoWCrun.mjs";export{n as defineCloverElements,o as initCloverI18n};
@@ -0,0 +1 @@
1
+ import{T as m,u as r}from"./shared-DgJ0bXca.mjs";import{I as o}from"./Items-BApzELFW.mjs";import{w as n}from"./nodes-CRrc5Svn.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{S as p,a0 as l,F as g,t as r,ag as v}from"./shared-DgJ0bXca.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
+ const a=JSON.parse('{"commonClose":"\u9589\u3058\u308B","commonNext":"\u6B21\u3078","commonPrevious":"\u524D\u3078","commonSearch":"\u691C\u7D22","commonViewAll":"\u3059\u3079\u3066\u8868\u793A","controlShortcut":"{{label}}\uFF08{{shortcut}}\uFF09","contentSearchLoading":"\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026","contentSearchPlaceholder":"\u691C\u7D22","contentSearchResultsNone":"\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093","contentSearchResult":"1 \u4EF6\u306E\u7D50\u679C","contentSearchResults":"{{count}} \u4EF6\u306E\u7D50\u679C","contentSearchError":"\u691C\u7D22\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002","contentSearchPosition":"{{total}} \u4EF6\u4E2D {{index}} \u4EF6\u76EE\u306E\u7D50\u679C","contentSearchClear":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2","canvasPosition":"{{total}} \u4EF6\u4E2D {{index}} \u4EF6\u76EE","canvasImage":"\u753B\u50CF","bodyUnloadableImage":"\u3053\u306E\u753B\u50CF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002","bodyUnloadableVideo":"\u3053\u306E\u52D5\u753B\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002","bodyUnloadableAudio":"\u3053\u306E\u97F3\u58F0\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002","bodyUnloadableModel":"\u3053\u306E\u30E2\u30C7\u30EB\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002","canvasRoleDescription":"\u30BA\u30FC\u30E0\u3067\u304D\u308B\u753B\u50CF","canvasKeysImage":"\u77E2\u5370\u30AD\u30FC\u3067\u79FB\u52D5\uFF08Shift \u3067\u5927\u304D\u304F\u79FB\u52D5\uFF09\u3001\u30D7\u30E9\u30B9\u3068\u30DE\u30A4\u30CA\u30B9\u3067\u30BA\u30FC\u30E0\u30010 \u3067\u8868\u793A\u3092\u30EA\u30BB\u30C3\u30C8\u3001R \u307E\u305F\u306F Shift+R \u3067\u56DE\u8EE2\u3057\u307E\u3059\u3002","canvasKeysMedia":"Space \u307E\u305F\u306F K \u3067\u518D\u751F\u30FB\u4E00\u6642\u505C\u6B62\u3001J \u307E\u305F\u306F L \u3067 10 \u79D2\u623B\u308B\u30FB\u9032\u3080\u3001M \u3067\u30DF\u30E5\u30FC\u30C8\u30FB\u30DF\u30E5\u30FC\u30C8\u89E3\u9664\u3057\u307E\u3059\u3002","canvasKeysAnnotations":"Escape \u30AD\u30FC\u3067\u9078\u629E\u3057\u305F\u6CE8\u91C8\u3092\u89E3\u9664\u3057\u307E\u3059\u3002","sceneModel":"3D \u30E2\u30C7\u30EB","sceneRoleDescription":"\u56DE\u8EE2\u3067\u304D\u308B 3D \u30E2\u30C7\u30EB","sceneKeys":"\u77E2\u5370\u30AD\u30FC\u3067\u30E2\u30C7\u30EB\u3092\u56DE\u8EE2\uFF08Shift \u3067\u5927\u304D\u304F\u56DE\u8EE2\uFF09\u3001\u30D7\u30E9\u30B9\u3068\u30DE\u30A4\u30CA\u30B9\u3067\u30BA\u30FC\u30E0\u30010 \u3067\u8868\u793A\u3092\u30EA\u30BB\u30C3\u30C8\u3001R \u307E\u305F\u306F Shift+R \u3067\u53F3\u307E\u305F\u306F\u5DE6\u306B\u56DE\u8EE2\u3057\u307E\u3059\u3002","sceneRotateUp":"\u4E0A\u306B\u56DE\u8EE2","sceneRotateDown":"\u4E0B\u306B\u56DE\u8EE2","sceneRotate":"\u56DE\u8EE2","sceneResetView":"\u8868\u793A\u3092\u30EA\u30BB\u30C3\u30C8","statusLoading":"\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026","statusError":"\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002","itemsLabel":"\u30A2\u30A4\u30C6\u30E0","download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","downloadPage":"\u3053\u306E\u30DA\u30FC\u30B8","downloadAll":"\u3059\u3079\u3066\u306E\u30DA\u30FC\u30B8","templateSidebar":"\u30A2\u30A4\u30C6\u30E0","templateSidebarToggle":"\u30A2\u30A4\u30C6\u30E0\u3092\u8868\u793A","templateBack":"\u623B\u308B","templateBackTo":"{{label}} \u306B\u623B\u308B","collectionLabel":"\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3","itemsScrollBack":"\u524D\u306E\u30A2\u30A4\u30C6\u30E0\u3092\u8868\u793A","itemsScrollForward":"\u3055\u3089\u306B\u30A2\u30A4\u30C6\u30E0\u3092\u8868\u793A","aboutRights":"\u6A29\u5229","aboutDate":"\u65E5\u4ED8","aboutHomepage":"\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8","aboutSeeAlso":"\u95A2\u9023\u60C5\u5831","aboutProvider":"\u63D0\u4F9B\u8005","logo":"\u30ED\u30B4","aboutManifest":"IIIF \u30DE\u30CB\u30D5\u30A7\u30B9\u30C8","aboutCanvas":"IIIF \u30AD\u30E3\u30F3\u30D0\u30B9","aboutPartOf":"\u6240\u5C5E\u5148","aboutOpenManifest":"\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5168\u4F53\u3092\u958B\u304F","aboutCollection":"IIIF \u30B3\u30EC\u30AF\u30B7\u30E7\u30F3","readingLanguage":"\u8A00\u8A9E","annotationsHide":"\u6CE8\u91C8\u3092\u975E\u8868\u793A","annotationsHideTip":"\u975E\u8868\u793A","readMore":"\u7D9A\u304D\u3092\u8AAD\u3080","readLess":"\u6298\u308A\u305F\u305F\u3080","annotationsShow":"\u753B\u50CF\u4E0A\u3067\u63A2\u3059","annotationsShowTime":"\u9332\u97F3\u5185\u3067\u63A2\u3059","annotationsImage":"\u753B\u50CF","annotationsLanguage":"\u8A00\u8A9E","annotationsOpenLink":"\u30EA\u30F3\u30AF\u3092\u958B\u304F","transcriptLabel":"\u6587\u5B57\u8D77\u3053\u3057","imageViewerOpen":"\u753B\u50CF\u30D3\u30E5\u30FC\u30A2\u3092\u958B\u304F","imageViewerClose":"\u753B\u50CF\u30D3\u30E5\u30FC\u30A2\u3092\u9589\u3058\u308B","canvasChoice":"\u9078\u629E\u80A2","canvasViewerControls":"\u30D3\u30E5\u30FC\u30A2\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB","canvasExpandControls":"\u30D3\u30E5\u30FC\u30A2\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u5C55\u958B","canvasCollapseControls":"\u30D3\u30E5\u30FC\u30A2\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u6298\u308A\u305F\u305F\u3080","canvasScrollBack":"\u524D\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A","canvasScrollForward":"\u3055\u3089\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A","imageFullScreen":"\u5168\u753B\u9762\u8868\u793A","imageExitFullScreen":"\u5168\u753B\u9762\u8868\u793A\u3092\u7D42\u4E86","imageResetZoom":"\u30BA\u30FC\u30E0\u3092\u30EA\u30BB\u30C3\u30C8","imageRotateLeft":"\u5DE6\u306B\u56DE\u8EE2","imageRotateRight":"\u53F3\u306B\u56DE\u8EE2","imageZoomIn":"\u62E1\u5927","imageZoomOut":"\u7E2E\u5C0F","informationPanelTabs":"\u60C5\u5831\u30D1\u30CD\u30EB","sectionsScrollBack":"\u524D\u306E\u30BF\u30D6\u3092\u8868\u793A","sectionsScrollForward":"\u3055\u3089\u306B\u30BF\u30D6\u3092\u8868\u793A","informationPanelClose":"\u60C5\u5831\u30D1\u30CD\u30EB\u3092\u9589\u3058\u308B","informationPanelTabsAbout":"\u6982\u8981","informationPanelTabsAnnotations":"\u6CE8\u91C8","informationPanelTabsSearch":"\u691C\u7D22","informationPanelTabsContents":"\u76EE\u6B21","contentsSectionsIn":"\u4E0B\u4F4D\u30BB\u30AF\u30B7\u30E7\u30F3\uFF1A","informationPanelTabsMap":"\u5730\u56F3","informationPanelTabsCollection":"\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3","informationPanelTabsTargets":"\u30D3\u30E5\u30FC","mapUnavailable":"\u5730\u56F3\u3092\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002","mapLabel":"\u5730\u56F3","mapAttribution":"\u5730\u56F3\u306E\u30AF\u30EC\u30B8\u30C3\u30C8","mapPlaceUntitled":"\u5834\u6240 {{number}}","mapOverlay":"\u30B8\u30AA\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u753B\u50CF","mapPlacesListed":"\u5730\u56F3\u306E\u5F8C\u306B\u4E00\u89A7\u8868\u793A\u3055\u308C\u308B\u5834\u6240\uFF1A{{count}} \u4EF6","informationPanelToggle":"\u8A73\u7D30\u60C5\u5831","playerPlay":"\u518D\u751F","playerPause":"\u4E00\u6642\u505C\u6B62","playerMute":"\u30DF\u30E5\u30FC\u30C8","playerUnmute":"\u30DF\u30E5\u30FC\u30C8\u89E3\u9664","playerVolume":"\u97F3\u91CF","playerSeek":"\u518D\u751F\u4F4D\u7F6E","playerCaptions":"\u5B57\u5E55","playerCaptionsOff":"\u30AA\u30D5","playerChapters":"\u30C1\u30E3\u30D7\u30BF\u30FC","playerFill":"\u67A0\u3044\u3063\u3071\u3044\u306B\u8868\u793A","playerFit":"\u67A0\u306B\u53CE\u3081\u308B","frameRepeat":"\u7E70\u308A\u8FD4\u3057","playerCurrentTime":"\u7D4C\u904E\u6642\u9593","playerDuration":"\u518D\u751F\u6642\u9593","splitHandle":"\u30D1\u30CD\u30EB\u306E\u30B5\u30A4\u30BA\u3092\u5909\u66F4"}');export{a as default};
@@ -0,0 +1 @@
1
+ import{u as e}from"./shared-DgJ0bXca.mjs";import{L as o}from"./Label-CRTQApU-.mjs";function n({props:r}){return e(o,{...r})}export{n as LabelElement};
@@ -0,0 +1 @@
1
+ import{ab as L,ac as j,S as p,ad as H,ae as E,B as G}from"./shared-DgJ0bXca.mjs";import{b as O}from"./imageService-XKWMYAcG.mjs";import{c as J}from"./choice-key-BUNebLKe.mjs";const Q=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,U=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Q.test(e)),X={width:1600,height:900};function tt(t,e){const o=new Array(t.length);if(!t.length)return o;const n=t.map(N),i=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="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;o[a]=i?{x:c,y:0,width:y,height:g}:{x:0,y:c,width:y,height:g},c+=i?y:g}return o}function N(t){var s,u;if(t.width&&t.height)return{width:t.width,height:t.height};const e=R(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const o=((s=k(t)[0])==null?void 0:s.body)??((u=D(t)[0])==null?void 0:u.body),n=Number(o==null?void 0:o.width),i=Number(o==null?void 0:o.height);return n>0&&i>0?{width:n,height:i}:X}function R(t){return t.accompanyingContainer??t.placeholderContainer}function et(t,e,o,n,i){return J(t.id,e.id,o,n,i)}function gt(t){const e=[];for(const o of t)W(o,(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&&e.push({key:i,canvasId:o.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 e}const F={};function ot(t){if(t.type!=="Video"&&!E(t.type)||!t.format||U(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",o=F[e]??(F[e]=document.createElement(e));return typeof o.canPlayType!="function"?true:o.canPlayType(t.format)!==""}function lt(t){const e={};for(const o of t){const n=o.items.findIndex(ot);n>0&&(e[o.key]=n)}return e}const V=new WeakMap,z=[];function nt(t){return H(t).some(e=>((e==null?void 0:e.type)==="Choice"?p(e.items):[e]).some(n=>(n==null?void 0:n.type)==="Video"||E(n==null?void 0:n.type)))}function it(t){var u;const e=V.get(t);if(e)return e;const o=[];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)&&o.push({annotation:c,start:h,end:Number.isFinite(f)?f:NaN})}if(o.every(r=>nt(r.annotation)))return V.set(t,z),z;o.sort((r,c)=>r.start-c.start);const n=Number(t.duration),i=Number.isFinite(n)&&n/o.length||.5;o.forEach((r,c)=>{var h;const a=(h=o[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=o.length>1?o:z;return V.set(t,s),s}const A=t=>`frame:${t.id}`;function W(t,e){(t.items??[]).forEach((o,n)=>{(o.items??[]).forEach((i,s)=>{L(i)&&H(i).forEach((u,r)=>e(u,et(t,i,n,s,r),i))})})}function k(t,e={},{allFrames:o=false}={}){const n=[];return M(t,e,(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}:{}})},o),n}function yt(t,e={}){for(const o of t){let n;if(M(o,e,i=>{n??(n=i.body.type)}),typeof n=="string")return n.toLowerCase()}}function D(t,e={}){const o=[];return M(t,e,(n,i,s,u)=>{const r=n.body.type;if(r!=="Video"&&!E(r))return;const c=G(u);o.push({kind:r==="Video"?"video":"audio",body:n.body,target:i,...c?{time:c}:{}})}),o}function rt(t){const e=t.filter(n=>n.time&&typeof n.body.id=="string"),o=new Set(e.map(n=>n.time.start));if(!(e.length<2||o.size!==e.length))return e.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,e,o,n=false){const i=t.width??0,s=t.height??0,u=it(t),r=Math.min(e[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,e[a]??0);if(!y)return;const g=h.target?j(h.target):void 0,b=g==null?void 0:g.rect;o(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(e=>e.kind!=="transcript")}function ct(t){const e=p(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function ut(t){const e=[],o=[...t.annotations??[],...t.items??[]];for(const n of o)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"||e.push({id:a,label:c.label,language:p(c.language)[0],kind:ct(i)})}}return e}function mt(t){const e=[],o=i=>{const s=i,u=s==null?void 0:s.id;if(typeof u!="string"||e.some(c=>c.id===u))return;const r=s==null?void 0:s.format;(r?r!=="text/plain":!/\.txt(\?|$)/i.test(u))||e.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(o)}return p(t.rendering).forEach(o),e}function B(t,e=0){if(!t||typeof t!="object")return null;const o=t;if(o.type==="Choice"){const n=p(o.items);return B(n[e]??n[0])}if(o.type==="SpecificResource"&&o.source){const n=typeof o.source=="string"?{id:o.source}:o.source,i=p(o.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 o.type!=="Image"&&o.type!=="Video"&&!E(o.type)?null:{body:o,region:typeof o.region=="string"?o.region:void 0}}function bt(t,e,o={},{standIns:n=true}={}){const i=tt(t,e),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,o),T=k(c,o,{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=o[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 e;return(e=ht(t))==null?void 0:e.source}const wt=1280;function ht(t){var c;const e=t.placeholderContainer;if(!e)return;const o=(c=k(e)[0])==null?void 0:c.body;if(!o)return;const n=O(o.service),i=typeof o.id=="string"?o.id:void 0,s=n?{service:n,fallback:i}:i?{src:i}:void 0;if(!s)return;const{width:u,height:r}=N(e);return{source:s,width:u,height:r}}function xt(t,e,o){const n=N(t),i=e.width/n.width,s=e.height/n.height;return{x:e.x+o.x*i,y:e.y+o.y*s,width:o.width*i,height:o.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,ot as m,yt as p,B as r,lt as s};
@@ -1 +1 @@
1
- import{S as n,a9 as p,a8 as c}from"./shared-BmkV0s_d.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,ad as p,ac as c}from"./shared-DgJ0bXca.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-DgJ0bXca.mjs";import{L as n}from"./Provider-B2k1G-E0.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};
@@ -1 +1 @@
1
- import{a7 as M,a9 as l,S as f}from"./shared-BmkV0s_d.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{ab as M,ad as l,S as f}from"./shared-DgJ0bXca.mjs";const d=45,m=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=d*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:m,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 b=["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?b.includes(n.format.toLowerCase()):/\.(glb|gltf)(\?|#|$)/i.test(n.src)}function O(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 S(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:S(s.target),transforms:r?O(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{d as F,b 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-BmkV0s_d.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-DgJ0bXca.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-DTp1mc0F.mjs";import{s as a}from"./sizedImage-COfCkv_8.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-XKWMYAcG.mjs";import{s as a}from"./sizedImage-BoGT1x5n.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-BmkV0s_d.mjs";import{T as y,P as S}from"./Panel-ikILE92M.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-BKoxD-el.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-DgJ0bXca.mjs";import{T as y,P as S}from"./Panel-77xi6y2C.mjs";import{u as b,M as C,C as w,s as A}from"./nodes-CRrc5Svn.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-DgJ0bXca.mjs";import{w as u}from"./nodes-CRrc5Svn.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-IZcH8rZy.mjs";import{u as S}from"./useControlsVisibility-DeI3NHWp.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-PJLHbbSD.mjs";import{u as S}from"./useControlsVisibility-C3LCnrb7.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 m,A as M,d as h,af as N,y as b,u as o,t as O,l as p,P as S,z as B,_ as I,q as P,C as H,R as A}from"./shared-DgJ0bXca.mjs";import{C as D}from"./glyphs-BAh9Lia0.mjs";import{B as w}from"./Button-1To2Pwuz.mjs";import"./styles-Bvw9LFU7.mjs";import{T as W}from"./Tip-D2pR3HW4.mjs";import{e as _}from"./controlGlyphs-Dymy1PkA.mjs";const q=B(()=>import("./CaptionDetails-TTAEPH02.mjs"));function oe(e){var t;return!!e.summary||!!((t=e.metadata)!=null&&t.length)}const U=(e,t)=>`${e}-label-${t}`,ae=({id:e,canvases:t,comments:n,open:s,onClose:r,language:a})=>{const{t:u,langOf:c}=m(),i=M(null),[f,v]=h(s);return s&&!f&&v(true),N(s,()=>r(false)),b(()=>{var l;s&&((l=i.current)==null||l.focus())},[s]),o("figcaption",{className:"clover-canvas-caption","data-open":s,"data-testid":"clover-canvas-caption",id:e,onKeyDown:l=>{l.key!=="Escape"||l.defaultPrevented||(l.preventDefault(),l.stopPropagation(),r(true))},ref:i,tabIndex:-1,children:[o(w,{className:"clover-canvas-caption-close",id:`close-${e}`,label:u("commonClose"),lang:c("commonClose"),onClick:()=>r(true),children:o(D,{})}),t.map((l,E)=>{const d=O(l.label,a);return o("section",{className:"clover-canvas-caption-canvas",children:[d.text&&o("p",{className:"clover-canvas-caption-label",id:U(e,E),...p(d.lang),children:d.text}),f&&o(S,{fallback:null,children:o(q,{summary:l.summary,metadata:l.metadata,comments:n==null?void 0:n.get(l.id),language:a})})]},l.id)})]})},z=112,$=128;function j(e){I(()=>{const t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=(a=false)=>{let u=e.offsetWidth,c=0;for(const d of a?[]:Array.from(e.children))!(d instanceof HTMLElement)||!d.offsetParent||(u=Math.min(u,d.offsetLeft),c=Math.max(c,d.offsetTop+d.offsetHeight));const i={width:e.offsetWidth-u,height:c};for(const[d,C]of Object.entries(i)){const y=`--clover-canvas-controls-${d}`;c?t.style.setProperty(y,`${C}px`):t.style.removeProperty(y)}const f=e.offsetTop,v=t.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),l=t.clientHeight-2*f-i.height-((v==null?void 0:v.offsetHeight)??0),E=e.offsetLeft+u-f;c&&l<z&&E>=$?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 g=()=>{if(typeof document>"u")return null;const e=document;return e.fullscreenElement??e.webkitFullscreenElement??null},F=()=>{if(typeof document>"u")return false;const e=document;return!!(e.fullscreenEnabled??e.webkitFullscreenEnabled)},k=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 a=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(),a===null?e.removeAttribute("style"):e.setAttribute("style",a)},{once:true})}const r=()=>{var a;try{(a=e.webkitEnterFullscreen)==null||a.call(e)}catch{}};s?requestAnimationFrame(r):r()},Y=async(e,t)=>{var s,r,a,u;const n=k(e);if(n)try{if(g()){const i=document;await(((s=i.exitFullscreen)==null?void 0:s.call(i))??((r=i.webkitExitFullscreen)==null?void 0:r.call(i)));return}if(!F()){t&&e&&K(t,e);return}const c=n;await(((a=c.requestFullscreen)==null?void 0:a.call(c))??((u=c.webkitRequestFullscreen)==null?void 0:u.call(c)))}catch{}};function R(e){const[t,n]=h(false);return b(()=>{if(!e)return;const s=()=>{var r;return n(!!((r=g())!=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 ce({key:e,id:t,label:n,glyph:s,onClick:r,expanded:a,controls:u,shortcut:c,lang:i,unavailable:f},v){const l=v==null?void 0:v[e];return l?o(l,{buttonProps:{id:t,type:"button","aria-label":n,...i&&{lang:i},...c&&{"aria-keyshortcuts":c.keys},onClick:f?void 0:r,...f&&{"aria-disabled":true},...a!==void 0&&{"aria-expanded":a,"aria-controls":u}},icon:o(_,{label:n,children:s}),label:n,tip:o(W,{label:n,shortcut:c})},e):o(w,{id:t,label:n,onClick:f?void 0:r,unavailable:f,expanded:a,controls:u,shortcut:c,lang:i,children:s},e)}const le=({fit:e=false,clusterRef:t,children:n})=>{const[s,r]=h(null),a=R(s);j(s);const u=P(c=>{r(c),t==null||t(c)},[t]);return o("div",{className:"clover-canvas-controls","data-fit":e||void 0,"data-fullscreen":a,"data-testid":"clover-canvas-controls",ref:u,children:n})},V=()=>()=>{};function ie(){return H(V,F)}const ue=({hidden:e})=>{const{t,langOf:n}=m(),s=t("imageExitFullScreen");return o("button",{"aria-label":s,...p(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:e,onClick:r=>void Y(r.currentTarget),type:"button",children:[o("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:o("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),s]})};function de(e){const[t,n]=h(false);return b(()=>{if(!e)return;const s=()=>n(g()===e);return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s)}},[e]),t}function fe(e){const[t,n]=h(false);return b(()=>{if(!e)return;const s=()=>{const r=g();n(r===e||!!r&&k(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 ve 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?o(G,{error:n}):this.props.children}}function G({error:e}){const{t,langOf:n}=m();return o("div",{className:"clover-canvas-error",role:"alert",children:[o("p",{className:"clover-canvas-error-headline","data-testid":"headline",...p(n("statusError")),children:t("statusError")}),e.message&&o("span",{className:"clover-canvas-error-body",lang:"en",children:e.message})]})}const J={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function he({kind:e,shown:t,room:n=false}){const{t:s,langOf:r}=m(),a=J[e];return o("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:t&&o("p",{...p(r(a)),children:s(a)})})}function pe({text:e,lang:t}){return o("div",{className:"clover-body-note","aria-hidden":"true",children:o("p",{...p(t),children:e})})}const Q=5,me=300,be=Q*4;function ge(e,t=false){return e==="touch"||e==="pen"&&!t}function Ee(e){return e.pointerType==="pen"&&e.buttons===0}function ye(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 Le(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,le as C,be as D,ve as E,Q as T,Ee as a,me as b,ge as c,R as d,de as e,fe as f,U as g,oe as h,Le as i,ue as j,pe as k,ae as l,ce as r,ye as s,Y as t,ie as u};
@@ -1 +1 @@
1
- import{u as r}from"./shared-BmkV0s_d.mjs";import{L as n,P as a}from"./Provider-HPVBNZPr.mjs";import{u as i}from"./nodes-BKoxD-el.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-DgJ0bXca.mjs";import{L as n,P as a}from"./Provider-B2k1G-E0.mjs";import{u as i}from"./nodes-CRrc5Svn.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,a8 as g,aw as v,L as b}from"./shared-BmkV0s_d.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,ay as l,ac as g,az as v,L as b}from"./shared-DgJ0bXca.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 +1 @@
1
- import{a as m,a2 as f,b,A as p,_ as n,u as v,l as g}from"./shared-BmkV0s_d.mjs";import{u as L}from"./ReadMore-DsthjUIZ.mjs";import{u as A}from"./nodes-BKoxD-el.mjs";const M=o=>[...o.children].find(r=>!r.classList.contains("clover-read-more-button"))??null;function k({hosted:o}){const r=o.element,e=A(r,()=>M(r),Object.is),{t:s}=m(),i=f(),a=b(),l=p(null);l.current=e;const{open:t,cut:c,toggle:d}=L(l);return n(()=>(r.classList.add("clover-read-more"),()=>r.classList.remove("clover-read-more")),[r]),n(()=>{if(!e)return;const u=e.id;return u||(e.id=a),()=>{u||e.removeAttribute("id"),e.removeAttribute("data-read-more")}},[e,a]),n(()=>{e==null||e.setAttribute("data-read-more",t?"open":"")},[e,t]),!e||!(c||t)?null:v("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e.id||a,onClick:d,ref:i.ref,...g(i.langOf(t?"readLess":"readMore")),children:s(t?"readLess":"readMore")})}export{k as ReadMoreElement};
1
+ import{a as m,a4 as f,b,A as p,_ as n,u as v,l as g}from"./shared-DgJ0bXca.mjs";import{u as L}from"./ReadMore-Cs2t9xkI.mjs";import{u as A}from"./nodes-CRrc5Svn.mjs";const M=o=>[...o.children].find(r=>!r.classList.contains("clover-read-more-button"))??null;function k({hosted:o}){const r=o.element,e=A(r,()=>M(r),Object.is),{t:s}=m(),i=f(),a=b(),l=p(null);l.current=e;const{open:t,cut:c,toggle:d}=L(l);return n(()=>(r.classList.add("clover-read-more"),()=>r.classList.remove("clover-read-more")),[r]),n(()=>{if(!e)return;const u=e.id;return u||(e.id=a),()=>{u||e.removeAttribute("id"),e.removeAttribute("data-read-more")}},[e,a]),n(()=>{e==null||e.setAttribute("data-read-more",t?"open":"")},[e,t]),!e||!(c||t)?null:v("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e.id||a,onClick:d,ref:i.ref,...g(i.langOf(t?"readLess":"readMore")),children:s(t?"readLess":"readMore")})}export{k as ReadMoreElement};
@@ -0,0 +1 @@
1
+ import{W as u,t as c,e as l,c as g,T as i,N as m}from"./shared-DgJ0bXca.mjs";function y(n,e,s){if(s&&n.includes(s))return s;if(!n.length)return;const a=u(n,e);return a==="none"?n[0]:a}const b=n=>n&&typeof n=="object"&&!Array.isArray(n)?Object.keys(n).filter(e=>e!=="none"&&e!=="@none"&&c({[e]:n[e]}).text):[];function f(n){if(!n)return[];const e=[...Array.isArray(n.metadata)?n.metadata:[],n.requiredStatement].filter(Boolean),a=[n.label,n.summary,...e.flatMap(t=>[t==null?void 0:t.label,t==null?void 0:t.value])].map(b).filter(t=>t.length>1);return[...new Set(a.flat())]}function A(){const{language:n,chooseLanguage:e,toggleDrawn:s}=l("About"),a=g(r=>r.manifest),t=i(()=>f(a),[a]),o=y(t,n);return o&&e?{languages:t,chosen:o,onChange:e,drawn:s??false}:null}function L(n,e){return n!=null&&n.drawn?e.every(s=>!!s&&s!=="none"&&n.languages.some(a=>m(a,s))):false}export{L as c,y as s,A as u};
@@ -0,0 +1,22 @@
1
+ var Et=Object.defineProperty;var kt=(n,t,e)=>t in n?Et(n,t,{enumerable:true,configurable:true,writable:true,value:e}):n[t]=e;var h=(n,t,e)=>kt(n,typeof t!="symbol"?t+"":t,e);import{c as Lt,r as $}from"./contexts-ByL3eA_T.mjs";import{c as k,s as L,t as _,a as _t,u as mt,i as Pt,b as pt,d as gt,e as It,r as At,f as A,g as St}from"./CanvasView-B4fnYim4.mjs";import{a as S,w as Rt,v as N,f as Bt,s as Q,b as j,c as Ot}from"./Camera-B82ZMekU.mjs";import{i as J,a as Ct,T as zt,b as tt,c as et,D as Ut,s as Dt}from"./pointer-PJLHbbSD.mjs";import{a2 as Wt,a3 as Ft}from"./shared-DgJ0bXca.mjs";import{a as Ht,i as it,f as Nt}from"./imageService-XKWMYAcG.mjs";function Zt(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement?n.complete&&n.naturalWidth>0:true}function Gt(n,t){if(!n.bleed)return{x:0,y:0};const e=n.transform,i=Math.hypot(e.a,e.b)*t,s=Math.hypot(e.c,e.d)*t;return{x:n.bleed.right&&i>0?1/i:0,y:n.bleed.bottom&&s>0?1/s:0}}const Xt=`#version 300 es
2
+ in vec2 a_position;
3
+ uniform mat3 u_matrix;
4
+ uniform vec4 u_crop;
5
+ out vec2 v_uv;
6
+
7
+ void main() {
8
+ vec3 clip = u_matrix * vec3(a_position, 1.0);
9
+ gl_Position = vec4(clip.xy, 0.0, 1.0);
10
+ v_uv = u_crop.xy + a_position * u_crop.zw;
11
+ }
12
+ `,Kt=`#version 300 es
13
+ precision highp float;
14
+ in vec2 v_uv;
15
+ uniform sampler2D u_texture;
16
+ uniform float u_opacity;
17
+ out vec4 outColor;
18
+
19
+ void main() {
20
+ outColor = texture(u_texture, v_uv) * u_opacity;
21
+ }
22
+ `;class R{constructor(t,e,i){h(this,"kind","webgl2");h(this,"canvas");h(this,"maxTextureSize");h(this,"gl");h(this,"program",null);h(this,"vao",null);h(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});h(this,"textures",new Map);h(this,"cssWidth",1);h(this,"cssHeight",1);h(this,"pixelRatio",1);h(this,"matrixScratch",new Float32Array(9));h(this,"isLost",false);h(this,"callbacks");h(this,"handleLost",()=>{var t2,e2;this.isLost=true,this.textures.clear(),(e2=(t2=this.callbacks).onLost)==null||e2.call(t2)});this.canvas=t,this.gl=e,this.callbacks=i,this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)||4096;const s=Vt(e,Xt,Kt);this.program=s,this.uniforms={matrix:e.getUniformLocation(s,"u_matrix"),crop:e.getUniformLocation(s,"u_crop"),opacity:e.getUniformLocation(s,"u_opacity"),texture:e.getUniformLocation(s,"u_texture")};const o=e.createVertexArray();e.bindVertexArray(o);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW);const a=e.getAttribLocation(s,"a_position");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,false,0,0),e.bindVertexArray(null),this.vao=o,e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,false),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),t.addEventListener("webglcontextlost",this.handleLost)}static create(t,e={}){let i=null;try{i=t.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{i=null}if(!i||typeof i.createShader!="function")return null;try{return new R(t,i,e)}catch{return null}}resize(t,e,i){this.cssWidth=Math.max(1,t),this.cssHeight=Math.max(1,e),this.pixelRatio=i;const s=Math.max(1,Math.round(t*i)),o=Math.max(1,Math.round(e*i));this.canvas.width!==s&&(this.canvas.width=s),this.canvas.height!==o&&(this.canvas.height=o)}begin(){if(this.isLost)return;const t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(this.program),t.bindVertexArray(this.vao),t.activeTexture(t.TEXTURE0),t.uniform1i(this.uniforms.texture,0)}draw(t){if(this.isLost||!Zt(t.source))return"skipped";const e=this.gl,i=this.upload(t);if(i==="tainted")return"tainted";if(!i)return"skipped";const s=t.crop??{x:0,y:0,width:t.width,height:t.height},o=Gt(t,this.pixelRatio),r=k(t.transform,_(s.x,s.y),L(s.width+o.x,s.height+o.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,_t(r,this.cssWidth,this.cssHeight,this.matrixScratch)),e.uniform4f(this.uniforms.crop,s.x/t.width,s.y/t.height,s.width/t.width,s.height/t.height),e.uniform1f(this.uniforms.opacity,t.opacity),e.bindTexture(e.TEXTURE_2D,i.texture),e.drawArrays(e.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(t){return!this.isLost&&this.textures.has(t)}release(t){const e=this.textures.get(t);e&&(this.isLost||this.gl.deleteTexture(e.texture),this.textures.delete(t))}dispose(){var t;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const e of[...this.textures.keys()])this.release(e);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(t=this.gl.getExtension("WEBGL_lose_context"))==null||t.loseContext(),this.isLost=true}upload(t){const e=this.gl,i=this.textures.get(t.key);if(i&&i.width===t.width&&i.height===t.height)return i;const s=(i==null?void 0:i.texture)??e.createTexture();if(!s)return null;e.bindTexture(e.TEXTURE_2D,s);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source)}catch(r){if(i||e.deleteTexture(s),qt(r))return"tainted";throw r}e.generateMipmap(e.TEXTURE_2D),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o={texture:s,width:t.width,height:t.height};return this.textures.set(t.key,o),o}}function Vt(n,t,e){const i=st(n,n.VERTEX_SHADER,t),s=st(n,n.FRAGMENT_SHADER,e),o=n.createProgram();if(!o)throw new Error("Could not create WebGL program");if(n.attachShader(o,i),n.attachShader(o,s),n.linkProgram(o),n.deleteShader(i),n.deleteShader(s),!n.getProgramParameter(o,n.LINK_STATUS)){const r=n.getProgramInfoLog(o);throw n.deleteProgram(o),new Error(`Could not link WebGL program: ${r}`)}return o}function st(n,t,e){const i=n.createShader(t);if(!i)throw new Error("Could not create WebGL shader");if(n.shaderSource(i,e),n.compileShader(i),!n.getShaderParameter(i,n.COMPILE_STATUS)){const s=n.getShaderInfoLog(i);throw n.deleteShader(i),new Error(`Could not compile WebGL shader: ${s}`)}return i}function qt(n){return typeof n=="object"&&n!==null&&n.name==="SecurityError"}const Yt=.09,$t=1e-4,nt=.05,Qt=1e-4;class jt{constructor(t,e=Yt,i){h(this,"current");h(this,"target",null);h(this,"timeConstant");h(this,"spring");h(this,"start");h(this,"elapsed",0);this.current={...t},this.start={...t},this.timeConstant=e,this.spring=i}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){const s=this.spring?this.spring.duration<=0:this.timeConstant===0;if(i||s){this.set(t.state);return}let o=t.anchor;if(o){const r=S(o.world,o.screen,t.state.zoom,t.state.rotation,e);Math.hypot(r.x-t.state.x,r.y-t.state.y)*t.state.zoom>nt&&(o=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...t.state},anchor:o}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const s=i.state;let o,r;if(this.spring){this.elapsed+=Math.max(t,0);const m=this.elapsed/this.spring.duration;if(m>=1)return this.current={...s},this.target=null,false;const c=this.spring.stiffness;o=this.start,r=(1-Math.exp(-c*m))/(1-Math.exp(-c))}else o=this.current,r=1-Math.exp(-Math.max(t,0)/this.timeConstant);const a=Math.exp(Math.log(o.zoom)+(Math.log(s.zoom)-Math.log(o.zoom))*r),d=o.rotation+(s.rotation-o.rotation)*r,l=i.anchor?S(i.anchor.world,i.anchor.screen,a,d,e):{x:o.x+(s.x-o.x)*r,y:o.y+(s.y-o.y)*r};return this.current={x:l.x,y:l.y,zoom:a,rotation:d},this.spring?true:Math.abs(Math.log(s.zoom/a))<$t&&Math.abs(s.rotation-d)<Qt&&Math.hypot(s.x-l.x,s.y-l.y)*a<nt?(this.current={...s},this.target=null,false):true}}const Z={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},z=2,ot=1.5,rt=.1,Jt=100,te=.002,ee=.01;class ie{constructor(t,e,i=Z){h(this,"pointers",new Map);h(this,"samples",[]);h(this,"down",null);h(this,"pinch",null);h(this,"lastTap",null);h(this,"lastPointerType","");h(this,"penHovers",false);h(this,"onPointerDown",t2=>{var i2,s;if(this.lastPointerType=t2.pointerType,t2.pointerType==="mouse"&&t2.button!==0||J(t2.target,this.element))return;(s=(i2=this.element).setPointerCapture)==null||s.call(i2,t2.pointerId);const e2=this.local(t2);this.pointers.set(t2.pointerId,e2),this.pointers.size===1?(this.down={x:e2.x,y:e2.y,t:t2.timeStamp,moved:false},this.samples=[{x:e2.x,y:e2.y,t:t2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});h(this,"onPointerMove",t2=>{var s;Ct(t2)&&(this.penHovers=true);const e2=this.pointers.get(t2.pointerId);if(!e2)return;const i2=this.local(t2);if(this.pointers.set(t2.pointerId,i2),this.pointers.size===1){const o=i2.x-e2.x,r=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>zt&&(this.down.moved=true),(s=this.down)!=null&&s.moved&&this.options.navigable&&this.target.panBy(o,r,!this.tracksPointer(t2.pointerType)),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-Jt;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const o=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(o.distance/this.pinch.distance,o.mid,false),this.target.panBy(o.mid.x-this.pinch.mid.x,o.mid.y-this.pinch.mid.y,false),this.pinch=o}});h(this,"onPointerUp",t2=>{var d,l,f,m,c,u;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(l=(d=this.element).releasePointerCapture)==null||l.call(d,t2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,t:t2.timeStamp}];return}if(this.pointers.size>0)return;const e2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!e2)return;const i2=this.local(t2);if(!e2.moved&&t2.type==="pointerup"&&t2.timeStamp-e2.t<tt){if((m=(f=this.target).dismiss)!=null&&m.call(f)){this.lastTap=null;return}if(et(t2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&t2.timeStamp-p.t<tt&&Math.hypot(i2.x-p.x,i2.y-p.y)<Ut?(this.lastTap=null,this.zoomIn(i2)):this.lastTap={x:i2.x,y:i2.y,t:t2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?t2.shiftKey?this.target.zoomBy(1/z,i2,true):this.zoomIn(i2):(u=(c=this.target).tap)==null||u.call(c,i2);return}if(!this.options.navigable||!this.tracksPointer(t2.pointerType))return;const o=this.samples[0],r=this.samples[this.samples.length-1],a=((r==null?void 0:r.t)??0)-((o==null?void 0:o.t)??0);if(o&&r&&a>0&&t2.timeStamp-r.t<50){const p=(r.x-o.x)/a*1e3,y=(r.y-o.y)/a*1e3,g=this.options.flickMomentum;g>0&&Math.hypot(p,y)>this.options.flickMinSpeed&&this.target.panBy(p*g,y*g,true)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||et(this.lastPointerType,this.penHovers)||J(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/z,this.local(t2),true):this.zoomIn(this.local(t2))))});h(this,"onWheel",t2=>{const e2=t2.ctrlKey;if(!this.options.navigable||!e2&&!this.options.scrollToZoom||!e2&&Dt(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=se(t2),s=e2?ee:te;this.target.zoomBy(Math.exp(-i2*s),this.local(t2),!e2)});h(this,"onKeyDown",t2=>{if(t2.target!==this.element||!this.options.navigable||t2.altKey||t2.metaKey||t2.ctrlKey)return;const e2=this.element.getBoundingClientRect(),i2=e2.width*rt*(t2.shiftKey?3:1),s=e2.height*rt*(t2.shiftKey?3:1);switch(t2.key){case"ArrowLeft":this.target.panBy(i2,0,true);break;case"ArrowRight":this.target.panBy(-i2,0,true);break;case"ArrowUp":this.target.panBy(0,s,true);break;case"ArrowDown":this.target.panBy(0,-s,true);break;case"+":case"=":this.target.zoomBy(ot,void 0,true);break;case"-":case"_":this.target.zoomBy(1/ot,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}t2.preventDefault()});this.element=t,this.target=e,this.options=i,t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),t.addEventListener("pointercancel",this.onPointerUp),t.addEventListener("dblclick",this.onDoubleClick),t.addEventListener("wheel",this.onWheel,{passive:false}),t.addEventListener("keydown",this.onKeyDown)}setOptions(t){this.options=t}dispose(){const t=this.element;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown)}local(t){const e=this.element.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}zoomIn(t){var e,i;(i=(e=this.target).atMaxZoom)!=null&&i.call(e)?this.target.home():this.target.zoomBy(z,t,true)}tracksPointer(t){return t==="touch"||this.options.flickEnabled}pinchState(){const[t,e]=[...this.pointers.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),mid:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}}function se(n){return n.deltaMode===1?n.deltaY*16:n.deltaMode===2?n.deltaY*400:n.deltaY}class wt extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const at=new Set;async function ne(n,t={}){const{signal:e,maxTextureSize:i,request:s}=t,o=Wt(s),r=re(n);if(typeof createImageBitmap!="function"||typeof fetch!="function")return U(n,{signal:e,cors:true,withCredentials:o});if(r&&at.has(r))return U(n,{signal:e,cors:false,withCredentials:o});let a;try{a=await Ft(s,n,{mode:"cors",signal:e})}catch(c){if(ae(c,e))throw c;const u=await U(n,{signal:e,cors:false,withCredentials:o});return r&&at.add(r),u}if(!a.ok)throw new wt(`Image request failed with ${a.status}`,n,a.status);const d=await a.blob();let l=await oe(d);const f=l.width,m=l.height;if(i&&(l.width>i||l.height>i)){const c=i/Math.max(l.width,l.height),u=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*c)),resizeHeight:Math.max(1,Math.floor(l.height*c)),resizeQuality:"high"});l.close(),l=u}if(e!=null&&e.aborted)throw l.close(),G();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:f,naturalHeight:m,opaque:false}}async function oe(n){const t={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(n,t)}catch(e){if(e instanceof TypeError)return createImageBitmap(n);throw e}}function U(n,{signal:t,cors:e,withCredentials:i}){return new Promise((s,o)=>{if(t!=null&&t.aborted){o(G());return}const r=new Image;r.decoding="async",e&&(r.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{r.onload=null,r.onerror=null,t==null||t.removeEventListener("abort",d)},d=()=>{a(),r.src="",o(G())};t==null||t.addEventListener("abort",d),r.onload=()=>{a();const l=()=>s({kind:"element",source:r,width:r.naturalWidth,height:r.naturalHeight,naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight,opaque:!e});typeof r.decode=="function"?r.decode().then(l,l):l()},r.onerror=()=>{a(),o(new wt("Image failed to load",n))},r.src=n})}function re(n){var t;try{return new URL(n,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function ae(n,t){return!!(t!=null&&t.aborted)||typeof n=="object"&&n!==null&&n.name==="AbortError"}function G(){const n=new Error("Aborted");return n.name="AbortError",n}function ht(n){n.kind==="bitmap"&&n.source.close()}const he=192*1024*1024,ce=6,le=2;class de{constructor(t){h(this,"entries",new Map);h(this,"inFlight",0);h(this,"frame",0);h(this,"bytes",0);h(this,"wanted",[]);h(this,"disposed",false);h(this,"budget");h(this,"maxInFlight");this.options=t,this.budget=t.byteBudget??he,this.maxInFlight=t.maxInFlight??ce}get(t){const e=this.entries.get(t);if((e==null?void 0:e.state)==="ready")return e.lastUsed=this.frame,e.image}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="ready"}failed(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(t,e){var s;const i=this.entries.get(t);(i==null?void 0:i.state)!=="ready"&&((s=i==null?void 0:i.controller)==null||s.abort(),this.entries.set(t,{url:t,state:"ready",image:e,bytes:D(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=D(e),this.flushWaiters(t))}prefetch(t){return Promise.all(t.map(e=>new Promise(i=>{const s=this.entries.get(e.url);if(s&&s.state!=="loading")return i();if(s){s.waiters.push(i);return}this.start({...e,priority:-1},i)}))).then(()=>{})}update(t){if(this.disposed)return;this.frame++;const e=new Set(t.map(i=>i.url));this.wanted=[...t].sort((i,s)=>i.priority-s.priority);for(const i of this.entries.values())i.state==="loading"&&!i.pinned&&!e.has(i.url)&&i.controller&&(i.controller.abort(),this.entries.delete(i.url),this.inFlight--);for(const i of this.wanted){const s=this.entries.get(i.url);s&&(s.lastUsed=this.frame)}this.pump(),this.evict(e)}dispose(){var t;this.disposed=true;for(const e of this.entries.values())(t=e.controller)==null||t.abort(),this.flushWaiters(e.url);this.entries.clear(),this.bytes=0}forEachReady(t){for(const e of this.entries.values())e.state==="ready"&&e.image&&t(e.url,e.image)}pump(){for(const t of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(t.url)||this.start(t)}}start(t,e){const i=new AbortController,s={url:t.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:i,pinned:!!e,waiters:e?[e]:[]};this.entries.set(t.url,s),this.inFlight++,this.attempt(s,t,i,t.url)}attempt(t,e,i,s){t.attempts++,this.options.load(s,i.signal).then(o=>{if(this.disposed||this.entries.get(t.url)!==t){ht(o);return}t.state="ready",t.image=o,t.bytes=D(o),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},o=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<le&&!ue(o,e)){this.attempt(t,e,i,e.fallbackUrl??e.url);return}t.state="failed",t.controller=void 0,t.pinned=false,this.settle(t)}})}settle(t){this.inFlight--,this.flushWaiters(t.url),this.options.onSettled(),this.pump()}flushWaiters(t){const e=this.entries.get(t);if(!e)return;const i=e.waiters;e.waiters=[],i.forEach(s=>s())}evict(t){if(this.bytes<=this.budget)return;const e=[...this.entries.values()].filter(i=>i.state==="ready"&&!t.has(i.url)).sort((i,s)=>i.lastUsed-s.lastUsed);for(const i of e){if(this.bytes<=this.budget)break;this.entries.delete(i.url),this.bytes-=i.bytes,i.image&&ht(i.image),this.options.onEvict(i.url)}}}function D(n){return n.width*n.height*4}function ue(n,t){if(t.fallbackUrl)return false;const e=n==null?void 0:n.status;return typeof e=="number"&&e>=400&&e<500&&e!==408&&e!==429}const fe=.1;class me{constructor(t,e=s=>requestAnimationFrame(s),i=s=>cancelAnimationFrame(s)){h(this,"handle",0);h(this,"last",0);h(this,"disposed",false);h(this,"frame",t2=>{if(this.handle=0,this.disposed)return;const e2=this.last?Math.min((t2-this.last)/1e3,fe):1/60;this.last=t2,this.tick(e2,t2)?this.invalidate():this.last=0});this.tick=t,this.raf=e,this.caf=i}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const pe=2*1024*1024;function ge(n,t,e=pe){const i=new Set;let s=e,o=false;return{get deferred(){return o},getTile(r){const a=n(r);if(!a||a.kind==="media"||a.opaque||i.has(r)||t(r))return a;const d=a.width*a.height*4;if(i.size>0&&d>s){o=true;return}return s-=d,i.add(r),a}}}function we(n){const t=/^(!)?(\d+(?:\.\d+)?)$/.exec((n==null?void 0:n.trim())??"");if(!t)return null;const e=Number(t[2]);if(e>360)return null;const i=e%360,s=!!t[1];return i||s?{degrees:i,mirror:s}:null}function ye(n,t,e){if(!n)return null;let i=n.trim().replace(/^xywh=/,""),s=false;i.startsWith("pct:")?(s=true,i=i.slice(4)):i.startsWith("pixel:")&&(i=i.slice(6));const o=i.split(",").map(Number);if(o.length!==4||o.some(p=>!Number.isFinite(p)))return null;let[r,a,d,l]=o;s&&(r=r/100*t,a=a/100*e,d=d/100*t,l=l/100*e);const f=Math.max(0,r),m=Math.max(0,a),c=Math.min(t,r+d),u=Math.min(e,a+l);return c<=f||u<=m?null:{x:f,y:m,width:c-f,height:u-m}}const W=512,xe=16e6;function yt(n,t,e){return{width:t,height:e,levels:[{scaleFactor:1,width:t,height:e,tileWidth:t,tileHeight:e,cols:1,rows:1}],tile:s=>({...s,url:n,region:{x:0,y:0,width:t,height:e}})}}function ve(n){const{width:t,height:e}=n,i=[],s=n.regionByPx&&n.sizeByW,o=(c,u,p)=>{const y=Math.ceil(t/c),g=Math.ceil(e/c);return{scaleFactor:c,width:y,height:g,tileWidth:u,tileHeight:p,cols:Math.ceil(y/u),rows:Math.ceil(g/p)}},r=(c,u)=>({scaleFactor:t/c,width:c,height:u,tileWidth:c,tileHeight:u,cols:1,rows:1,whole:true}),a=n.tiles[0];if(a)for(const c of a.scaleFactors)i.push(o(c,a.width,a.height));else if(s)for(let c=1;;c*=2){const u=o(c,W,W);if(i.push(u),u.cols===1&&u.rows===1)break}const d=Math.max(0,...i.map(c=>c.scaleFactor));for(const c of n.sizes){const u=t/c.width;be(n,c.width,c.height)&&u>d+1e-9&&i.push(r(c.width,c.height))}const l=i.reduce((c,u)=>!c||u.scaleFactor>c.scaleFactor?u:c,null);if(l&&l.cols*l.rows>1&&n.sizeByW){const c=Math.max(t,e)/W;i.push(r(Math.ceil(t/c),Math.ceil(e/c)))}(!i.length||!a&&!s&&t*e<=xe)&&(i.some(c=>c.scaleFactor===1)||i.push(r(t,e)));const f=Te(i).sort((c,u)=>u.scaleFactor-c.scaleFactor),m=Ht(n);return{width:t,height:e,levels:f,tile(c){const u=f[c.level],p=u.scaleFactor,y=u.cols===1&&u.rows===1;let g,v,b;if(y)g={x:0,y:0,width:t,height:e},v=u.width,b=u.height;else{const I=Math.round(c.col*u.tileWidth*p),M=Math.round(c.row*u.tileHeight*p);g={x:I,y:M,width:Math.min(Math.round(u.tileWidth*p),t-I),height:Math.min(Math.round(u.tileHeight*p),e-M)},v=Math.ceil(g.width/p),b=Math.ceil(g.height/p)}return{...c,region:g,url:it(n,g,v,b),fallbackUrl:m?it(n,g,v,b,m):void 0}}}}function be(n,t,e){return!(n.maxWidth&&t>n.maxWidth||n.maxHeight&&e>n.maxHeight||n.maxArea&&t*e>n.maxArea)}function Te(n){const t=new Map;for(const e of n){const i=`${e.width}x${e.height}`,s=t.get(i);(!s||s.cols*s.rows<e.cols*e.rows)&&t.set(i,e)}return[...t.values()]}function Me(n,t){const e=n.levels;for(let i=0;i<e.length;i++)if(e[i].scaleFactor<=t*(1+1e-6))return i;return e.length-1}function T(n,t,e){const i=n.levels[t],s=i.tileWidth*i.scaleFactor,o=i.tileHeight*i.scaleFactor,r=Math.max(0,e.x),a=Math.max(0,e.y),d=Math.min(n.width,e.x+e.width),l=Math.min(n.height,e.y+e.height);if(d<=r||l<=a)return[];const f=Math.max(0,Math.floor(r/s)),m=Math.min(i.cols-1,Math.floor((d-1e-9)/s)),c=Math.max(0,Math.floor(a/o)),u=Math.min(i.rows-1,Math.floor((l-1e-9)/o)),p=[];for(let y=c;y<=u;y++)for(let g=f;g<=m;g++)p.push({level:t,col:g,row:y});return p}async function Ee(n,t){if(n.media)return ke(n,n.media);let e=null,i=null;if(n.service)try{e=ve(await Nt(n.service,t.infoOptions))}catch(c){i=c}if(!e){if(!n.url)throw i??new Error("Image has no source");const c=await t.loadStatic(n.url);t.cache.seed(n.url,c),e=yt(n.url,c.naturalWidth,c.naturalHeight)}const s=n.width&&n.height&&n.width>0&&n.height>0?{width:n.width,height:n.height}:{width:e.width,height:e.height},o=ye(n.region,s.width,s.height)??{x:0,y:0,width:s.width,height:s.height},r=e.width/s.width,a=e.height/s.height,d={x:o.x*r,y:o.y*a,width:o.width*r,height:o.height*a},l=we(n.rotation),f=l?Le(d,l):void 0,m={id:n.id,spec:n,pyramid:e,size:s,clip:d,contentClip:o,rect:{x:0,y:0,width:o.width,height:o.height},...f?{turn:f}:{}};return await t.cache.prefetch(T(e,0,d).map(c=>{const u=e.tile(c);return{url:u.url,fallbackUrl:u.fallbackUrl}})),m}const xt="media:";function ke(n,t){var a,d;const e=n.width||((a=n.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=n.height||((d=n.placement)==null?void 0:d.height)||t.element.videoHeight||900,s=`${xt}${n.id}`,o={width:e,height:i},r={x:0,y:0,width:e,height:i};return{id:n.id,spec:n,pyramid:yt(s,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:o,clip:r,contentClip:r,rect:{...r}}}function Le(n,{degrees:t,mirror:e}){const i=t*Math.PI/180,s=f=>Math.abs(f)<1e-12?0:f,o=s(Math.cos(i)),r=s(Math.sin(i)),a=Math.abs(n.width*o)+Math.abs(n.height*r),d=Math.abs(n.width*r)+Math.abs(n.height*o),l=k(_(a/2,d/2),{a:o,b:r,c:-r,d:o,e:0,f:0},L(e?-1:1,1),_(-(n.x+n.width/2),-(n.y+n.height/2)));return{orient:l,unorient:Pt(l),width:a,height:d}}function vt(n){var t;return((t=n.turn)==null?void 0:t.orient)??_(-n.clip.x,-n.clip.y)}function _e(n,t){const{turn:e,clip:i}=n;if(!e)return{...t,x:i.x+t.x,y:i.y+t.y};const s=gt(e.unorient,t),o=Math.max(s.x,i.x),r=Math.max(s.y,i.y);return{x:o,y:r,width:Math.max(0,Math.min(s.x+s.width,i.x+i.width)-o),height:Math.max(0,Math.min(s.y+s.height,i.y+i.height)-r)}}function Pe(n,t){const{turn:e,clip:i}=n;return e?pt(e.unorient,t):{x:i.x+t.x,y:i.y+t.y}}function ct(n){const{turn:t,clip:e,contentClip:i}=n;return t?{width:t.width*i.width/e.width,height:t.height*i.height/e.height}:i}function Ie(n){if(!n.length)return null;if(n.every(i=>i.spec.placement)){for(const i of n)i.rect={...i.spec.placement};return mt(n.map(i=>i.rect))}const t=ct(n[0]).height;let e=0;for(const i of n){const s=ct(i),o=s.width*t/s.height;i.rect={x:e,y:0,width:o,height:t},e+=o}return{x:0,y:0,width:e,height:t}}function B(n){const t=n.turn??n.clip;return{x:n.rect.width/t.width,y:n.rect.height/t.height}}function Ae(n){const t=B(n);return k(_(n.rect.x,n.rect.y),L(t.x,t.y),vt(n))}function Se(n,t){var e,i;return n.service===t.service&&n.url===t.url&&n.width===t.width&&n.height===t.height&&n.region===t.region&&n.rotation===t.rotation&&((e=n.media)==null?void 0:e.element)===((i=t.media)==null?void 0:i.element)&&JSON.stringify(n.placement)===JSON.stringify(t.placement)}const Re=1e7,Be=15e6,Oe=2e7,Ce=2;function ze(n){const{items:t,camera:e,viewport:i,pixelRatio:s,getTile:o,destination:r}=n,a=Rt(e,i),d=[],l=[],f=[],m=(c,u,p)=>{const y=c.tile(u);l.push({url:y.url,fallbackUrl:y.fallbackUrl,priority:p})};for(const c of t){const{pyramid:u,clip:p,rect:y}=c,g=B(c);if(n.wantOverview)for(const w of T(u,0,p))m(u,w,Oe);const v=lt(c,e,i,s),b=r?lt(c,r,i,s):v;if(f.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const I=w=>x=>{const P=u.tile(x).region;return Math.hypot(P.x+P.width/2-w.x,P.y+P.height/2-w.y)};if(b){const w=I(b.center);for(const x of T(u,0,b.area))m(u,x,w(x)/1e3);if(b.target>0)for(const x of T(u,b.target,b.area))m(u,x,Re+w(x))}if(!v)continue;const{area:M,target:E}=v,K=I(v.center),O=T(u,0,M),V=E===0?[]:T(u,E,M);if(b!==v){for(const x of O)m(u,x,K(x)/1e3);const w=E-Ce;if(w>0)for(const x of T(u,w,M))m(u,x,Be+K(x))}if(c.spec.hidden)continue;const bt=(E===0?O:V).every(w=>o(u.tile(w).url)!==void 0)?[E]:Array.from({length:E+1},(w,x)=>x),Tt=k(a,_(y.x,y.y),L(g.x,g.y),vt(c));for(const w of bt){const x=w===0?O:w===E?V:T(u,w,M),P=u.levels[w].cols*u.levels[w].rows>1;for(const Mt of x){const C=u.tile(Mt),q=o(C.url);if(!q)continue;const Y=Ue(c,C.region,q,Tt,P);Y&&d.push({...Y,url:C.url})}}}return l.sort((c,u)=>c.priority-u.priority),{draws:d,wants:De(l),levels:f}}function lt(n,t,e,i){const{pyramid:s,rect:o}=n,r=N(t,e);if(!It(r,o))return null;const a=B(n),d=Math.max(r.x,o.x),l=Math.max(r.y,o.y),f=Math.min(r.x+r.width,o.x+o.width),m=Math.min(r.y+r.height,o.y+o.height),c=1/(a.x*t.zoom*i);return{area:_e(n,{x:(d-o.x)/a.x,y:(l-o.y)/a.y,width:(f-d)/a.x,height:(m-l)/a.y}),center:Pe(n,{x:(t.x-o.x)/a.x,y:(t.y-o.y)/a.y}),target:Me(s,c)}}function Ue(n,t,e,i,s){const{clip:o}=n,r=Math.max(t.x,o.x),a=Math.max(t.y,o.y),d=Math.min(t.x+t.width,o.x+o.width),l=Math.min(t.y+t.height,o.y+o.height);if(d<=r||l<=a)return null;const f=e.width/t.width,m=e.height/t.height,c=1e-6;return{item:n,image:e,transform:k(i,_(t.x,t.y),L(1/f,1/m)),crop:{x:(r-t.x)*f,y:(a-t.y)*m,width:(d-r)*f,height:(l-a)*m},bleed:{right:s&&d<o.x+o.width-c,bottom:s&&l<o.y+o.height-c}}}function De(n){const t=new Set;return n.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const We={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,upscale:true,animationTime:.09,animationDuration:void 0,springStiffness:6.5,constrainDuringPan:true,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},Fe=2,He=3,Ne=.1,F=1e-6,X={top:0,right:0,bottom:0,left:0};function dt(n,t="padding"){if(!n||typeof getComputedStyle!="function")return X;const e=getComputedStyle(n),i=s=>parseFloat(e.getPropertyValue(`${t}-${s}`))||0;return{top:i("top"),right:i("right"),bottom:i("bottom"),left:i("left")}}const Ze=(n,t)=>n.top===t.top&&n.right===t.right&&n.bottom===t.bottom&&n.left===t.left;let Ge;class Xe{constructor(t,e={}){h(this,"host");h(this,"overlays",null);h(this,"options");h(this,"backend",null);h(this,"backendPreference");h(this,"contextLosses",0);h(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});h(this,"visible",true);h(this,"dom",null);h(this,"domAsked",false);h(this,"pending",null);h(this,"camera");h(this,"loop");h(this,"gestures");h(this,"gestureOptions",{});h(this,"cache");h(this,"navigator",null);h(this,"navigatorAsked",0);h(this,"viewport",{width:1,height:1});h(this,"inset",X);h(this,"pixelRatio",1);h(this,"items",[]);h(this,"worldBounds",null);h(this,"contentVersion",0);h(this,"opaqueUrls",new Set);h(this,"mediaByKey",new Map);h(this,"detachMedia",[]);h(this,"opened",false);h(this,"atHome",true);h(this,"interacting",false);h(this,"lastEmitted",null);h(this,"generation",0);h(this,"listeners",new Map);h(this,"unloadable",false);h(this,"resizeObserver",null);h(this,"intersectionObserver",null);h(this,"releaseTimer",null);h(this,"dprQuery",null);h(this,"disposed",false);h(this,"dismisser",null);h(this,"tick",t2=>{var d,l;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i2=this.camera.current,s2=this.backend,o=ge(this.getTile,f=>s2?s2.has(f):true),r=ze({items:this.items,camera:i2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:o.getTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0}),a=r.wants.filter(f=>!f.url.startsWith(xt));return this.cache.update(a),r.draws.length?this.setUnloadable(false):a.length&&a.every(f=>this.cache.failed(f.url))&&this.setUnloadable(true),this.paint(r.draws),(d=this.overlays)==null||d.position(i2,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(f=>!f.spec.hidden),this.worldBounds,N(i2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!j(this.lastEmitted,i2))&&(this.lastEmitted={...i2},this.opened&&this.emit("viewport")),e2||o.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(t2));h(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});h(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=t,this.backendPreference=e.backend??"auto",this.options={...We,...H(e)},ft()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:i,springStiffness:s}=this.options;this.camera=new jt({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,i===void 0?void 0:{duration:i,stiffness:s}),this.loop=new me(this.tick),this.gestureOptions=H(e.gestures??{}),ft()&&(this.gestureOptions.flickMomentum=0),this.gestures=new ie(t,this,{...Z,...this.gestureOptions}),this.cache=new de({load:(o,r)=>this.loadTile(o,r),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:o=>{var r;return(r=this.backend)==null?void 0:r.release(o)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Ke(t),this.visible?this.acquireBackend():this.holder.hiddenSince=ut(),this.measure(),this.observe()}get backendKind(){var t;return((t=this.backend)==null?void 0:t.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>i==null?void 0:i.delete(e)}async setImages(t,{world:e,fit:i=false}={}){const s=++this.generation,o=new Map(this.items.map(f=>[f.id,f])),r=await Promise.allSettled(t.map(f=>{const m=o.get(f.id);return m&&Se(m.spec,f)?(m.spec=f,Promise.resolve(m)):Ee(f,{cache:this.cache,loadStatic:c=>this.loadTile(c),infoOptions:{request:this.options.request}})}));if(s!==this.generation||this.disposed)return;const a=r.filter(f=>f.status==="fulfilled").map(f=>f.value),d=r.filter(f=>f.status==="rejected").map(f=>f.reason);this.items=a,this.watchMedia(a);const l=Ie(a);if(this.worldBounds=e?l?mt([e,l]):e:l,this.contentVersion++,d.length&&this.emit("error",d),this.setUnloadable(t.length>0&&!a.length&&d.length>0),!this.worldBounds){this.invalidate();return}this.opened?i?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const s of this.items){const o=e.has(s.id);!!s.spec.hidden!==o&&(s.spec={...s.spec,hidden:o},i=true)}i&&this.invalidate()}isReady(t){const e=this.items.find(s=>s.id===t);if(!e)return false;if(e.spec.media)return true;const i=e.pyramid.levels[0];if(!i)return false;for(let s=0;s<i.rows;s++)for(let o=0;o<i.cols;o++)if(!this.getTile(e.pyramid.tile({level:0,col:o,row:s}).url))return false;return true}fitBounds(t,e=false,i=X){const s=this.fit(t,this.camera.destination.rotation,i);this.atHome=false,this.animateTo(this.constrain(s,{allowBeyondLimits:true}),e)}fit(t,e,{top:i,right:s,bottom:o,left:r},a=1/0){const{width:d,height:l}=this.viewport,f=Bt(t,{width:Math.max(1,d-r-s),height:Math.max(1,l-i-o)},e),m=Math.min(f.zoom,a);return{...S(At(t),{x:(d+r-s)/2,y:(l+i-o)/2},m,e,this.viewport),zoom:m,rotation:e}}fitItemRect(t,e,i=false){const s=this.itemRectToWorld(t,e);s&&this.fitAnnotation(s,i)}fitAnnotation(t,e=false){var o;const i=this.items[0];if(!i)return;const s=i.rect.width*Ne;this.fitBounds({x:t.x-s,y:t.y-s,width:t.width+s*2,height:t.height+s*2},e,dt((o=this.overlays)==null?void 0:o.container,"scroll-padding"))}getBounds(){return N(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var e;const t=((e=this.homeCamera())==null?void 0:e.zoom)??1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.closestZoom())}}closestZoom(){const t=this.items.length?Math.min(...this.items.map(e=>B(e).x)):1;return this.options.maxZoomPixelRatio/t}home(t=false){const e=this.homeCamera();if(!e)return;const i=this.atHome;this.atHome=true,this.animateTo(e,t),!i&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-F)}viewLimits(){const{zoom:t,x:e,y:i,rotation:s}=this.camera.destination,{min:o,max:r}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:t>=r*(1-F),atMin:t<=o*(1+F),atHome:this.atHome&&(!a||Math.abs(t/a.zoom-1)<.001&&Math.hypot(e-a.x,i-a.y)*t<.5&&Math.abs(s-a.rotation)<.001)}}zoomBy(t,e,i=true){const s=i?this.camera.destination:this.camera.current,o=e??{x:this.viewport.width/2,y:this.viewport.height/2},r=Q(s,this.viewport,o),{min:a,max:d}=this.getZoomLimits(),l=A(s.zoom*t,a,d),f=S(r,o,l,s.rotation,this.viewport),m=this.constrain({...s,...f,zoom:l});this.atHome=false,i?this.camera.animateTo({state:m,anchor:{world:r,screen:o}},this.viewport):this.camera.set(m),this.invalidate()}panBy(t,e,i=false){const s=i?this.camera.destination:this.camera.current,o=pt(k(L(1/s.zoom),St(-s.rotation)),{x:t,y:e}),r=this.constrain({...s,x:s.x-o.x,y:s.y-o.y});this.atHome=false,i?this.camera.animateTo({state:r},this.viewport):this.camera.set(r),this.invalidate()}panTo(t,e=false){const i=e?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...i,...t}),e)}rotateBy(t){const e=this.camera.destination;this.setRotation(e.rotation*180/Math.PI+t)}setRotation(t,e=false){const i=this.camera.destination,s=t*Math.PI/180;this.animateTo(this.constrain({...i,rotation:s}),e)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(t){this.emit("tap",t)}setDismiss(t){this.dismisser=t}dismiss(){var t;return((t=this.dismisser)==null?void 0:t.call(this))??false}setGestures(t){this.gestures.setOptions({...Z,...this.gestureOptions,...H(t)})}setInteracting(t){if(this.interacting=t,t){this.camera.stop();return}if(this.options.constrainDuringPan)return;const e=this.camera.destination,i=this.constrain(e);j(e,i)||this.animateTo(i,false)}worldToScreenPoint(t){return Ot(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return Q(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:s,clip:o}=i;if(i.turn)return gt(k(Ae(i),L(o.width/s.width,o.height/s.height)),e);const r=i.rect.width/s.width,a=i.rect.height/s.height;return{x:i.rect.x+(e.x-s.x)*r,y:i.rect.y+(e.y-s.y)*a,width:e.width*r,height:e.height*a}}attachNavigator(t){var o;(o=this.navigator)==null||o.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,s=false;return import("./Navigator-CTrfNuwj.mjs").then(r=>{s||this.disposed||e!==this.navigatorAsked||(i=new r.Navigator(t,(a,d)=>this.panTo(a,d)),this.navigator=i,this.invalidate())}),()=>{s=true,i==null||i.dispose(),i&&this.navigator===i&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var t,e,i,s,o,r,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(t=this.resizeObserver)==null||t.disconnect(),(e=this.intersectionObserver)==null||e.disconnect(),(s=(i=this.dprQuery)==null?void 0:i.removeEventListener)==null||s.call(i,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(o=this.navigator)==null||o.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(r=this.dom)==null||r.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(d=>d()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(t){this.detachMedia.forEach(e=>e()),this.detachMedia=[],this.mediaByKey.clear();for(const e of t){if(!e.media||e.media.kind!=="media")continue;const i=e.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(i,e.media);const s=e.media.source,o=()=>this.invalidate(),r=["play","seeked","loadeddata","resize"];r.forEach(a=>s.addEventListener(a,o)),this.detachMedia.push(()=>r.forEach(a=>s.removeEventListener(a,o)))}}paint(t){const e=this.backend,i=[],s=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const o of t){const{image:r}=o;if(!(r.kind==="media"||r.kind==="element"&&s&&(r.opaque||this.opaqueUrls.has(o.url)))&&e){if(e.draw({key:o.url,source:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1,bleed:o.bleed})!=="tainted"||r.kind==="bitmap")continue;this.opaqueUrls.add(o.url)}(r.kind==="element"||r.kind==="media")&&i.push({key:`${o.item.id}|${o.url}`,element:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-GnBlZ7yI.mjs").then(({DomLayers:o})=>{if(this.disposed)return;const r=new o(this.host);this.overlays&&this.host.insertBefore(r.container,this.overlays.container),this.dom=r,this.invalidate()}))}loadTile(t,e){return ne(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof R?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const t=2*Math.PI,e=Math.round(this.camera.destination.rotation/t)*t||0;return this.fit(this.worldBounds,e,this.inset,this.options.upscale?1/0:this.closestZoom())}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:s,max:o}=this.getZoomLimits(),r=e?A(t.zoom,s,Math.max(o,t.zoom)):A(t.zoom,s,o);return this.interacting&&!this.options.constrainDuringPan?{...t,zoom:r}:{...t,zoom:r,x:A(t.x,i.x,i.x+i.width),y:A(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var o,r;if(this.backend||this.pending||this.disposed)return;const e=document.createElement("canvas");e.className="clover-canvas-surface",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(e,((o=this.dom)==null?void 0:o.container)??((r=this.overlays)==null?void 0:r.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<He);let s=null;i&&(Lt(this.holder)||this.backendPreference==="webgl2")&&(s=R.create(e,{onLost:this.onContextLost}),s||$(this.holder)),s?this.install(s):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(Ge??(Ge=import("./Canvas2DBackend-Ds-qoQ0W.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const d=a.create(e);d?this.install(d):this.none(e)}))}none(t){t.remove(),this.host.dataset.backend="none"}install(t){this.backend=t,this.host.dataset.backend=t.kind,t.resize(this.viewport.width,this.viewport.height,this.pixelRatio),t.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",t.kind),this.invalidate()}releaseBackend(){var e;if($(this.holder),(e=this.pending)==null||e.remove(),this.pending=null,!this.backend)return;const t=this.backend.canvas;this.backend.dispose(),t.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(t=>{const e=t.some(i=>i.isIntersecting);this.setVisible(e)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(t){var e;if(this.visible=t,t){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(e=this.holder).hiddenSince??(e.hiddenSince=ut()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var d;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),s=Math.max(1,e.height),o=dt(this.host),r=Math.min(typeof window<"u"&&window.devicePixelRatio||1,Fe);if(i===this.viewport.width&&s===this.viewport.height&&r===this.pixelRatio&&Ze(o,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:s},this.inset=o,this.pixelRatio=r,(d=this.backend)==null||d.resize(i,s,r),this.opened){if(this.atHome)this.home(true);else{const l=this.camera.current,f=i/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*f}))}this.emit("viewport")}t?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var t,e,i,s;typeof window>"u"||typeof window.matchMedia!="function"||((e=(t=this.dprQuery)==null?void 0:t.removeEventListener)==null||e.call(t,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(s=(i=this.dprQuery).addEventListener)==null||s.call(i,"change",this.onPixelRatioChange))}setUnloadable(t){t!==this.unloadable&&(this.unloadable=t,this.emit("unloadable",t))}emit(t,e){var i;(i=this.listeners.get(t))==null||i.forEach(s=>s(e))}}const ut=()=>typeof performance<"u"?performance.now():Date.now();function Ke(n){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:t,left:e,width:i,height:s}=n.getBoundingClientRect();return t+s>=0&&e+i>=0&&t<=window.innerHeight&&e<=window.innerWidth}function ft(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function H(n){return Object.fromEntries(Object.entries(n).filter(([,t])=>t!==void 0))}const ii=(n,t)=>new Xe(n,t);export{Gt as b,Zt as h,ze as p,ii as r};
@@ -1 +1 @@
1
- import{u as c,A as l,x as u,aC as p,_ as d,k as m}from"./shared-BmkV0s_d.mjs";import"./styles-On1ck1Ob.mjs";const f=new WeakMap;function v(t){let n=f.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:r=>c(y,{...r,render:o})},f.set(t,n)}return n}function C(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(v)}function y({render:t,canvases:n,bodies:o,children:r}){const a=l(null),i=u(p);return d(()=>{const e=a.current;if(!e)return;const s=t(e,{canvases:n,bodies:o,clover:i});return()=>{typeof s=="function"&&s(),e.replaceChildren()}},[t,n,o,i]),c(m,{children:[c("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),r&&c("div",{className:"clover-canvas-controls",children:r})]})}export{C as toRenderers};
1
+ import{u as c,A as l,x as u,aG as p,_ as d,k as m}from"./shared-DgJ0bXca.mjs";import"./styles-Bvw9LFU7.mjs";const f=new WeakMap;function v(t){let n=f.get(t);if(!n){const{render:o}=t;n={canvasId:t.canvasId,format:t.format,match:t.match,component:r=>c(y,{...r,render:o})},f.set(t,n)}return n}function b(t){if(Array.isArray(t))return t.filter(n=>typeof n=="object"&&n!==null&&typeof n.render=="function").map(v)}function y({render:t,canvases:n,bodies:o,children:r}){const a=l(null),i=u(p);return d(()=>{const e=a.current;if(!e)return;const s=t(e,{canvases:n,bodies:o,clover:i});return()=>{typeof s=="function"&&s(),e.replaceChildren()}},[t,n,o,i]),c(m,{children:[c("div",{ref:a,className:"clover-body-renderer",style:{position:"absolute",inset:0}}),r&&c("div",{className:"clover-canvas-controls",children:r})]})}export{b as toRenderers};
@@ -0,0 +1 @@
1
+ import{x as n,a1 as o,Q as r}from"./shared-DgJ0bXca.mjs";const t=(s,a)=>a==="canvas"?o(s.manifest,s.canvasId):s.manifest,e=r(null),i=()=>n(e);export{e as P,t as r,i as u};
@@ -1 +1 @@
1
- import{a1 as a}from"./shared-BmkV0s_d.mjs";function c(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function i(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=c(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{c as fileName,i as saveFile};
1
+ import{a3 as a}from"./shared-DgJ0bXca.mjs";function c(t){try{const o=new URL(t).pathname.split("/").filter(Boolean).pop();return o?decodeURIComponent(o):"download"}catch{return"download"}}async function i(t,o){try{const r=await a(o,t,{referrerPolicy:"no-referrer"});if(!r.ok)return false;const n=URL.createObjectURL(await r.blob()),e=document.createElement("a");return e.href=n,e.download=c(t),document.body.append(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),true}catch{return false}}export{c as fileName,i as saveFile};
@@ -1 +1 @@
1
- import{ay as w,S as f,a8 as x,U as S}from"./shared-BmkV0s_d.mjs";const A=10;async function R(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await b(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function b(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<A&&!d.has(n);){d.add(n);const c=await w(s,n,o);i.push(c),n=$(c)}return E(i,t)}function T(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function $(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function E(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?T(a.on):f(a.target)[0],v=x(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?H(n,u):M(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function H(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function M(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{E as readResults,b as search,R as searchInto};
1
+ import{aB as w,S as f,ac as x,V as S}from"./shared-DgJ0bXca.mjs";const A=10;async function P(r,t,s,o,e){var n,d;const i=(n=r.get().manifest)==null?void 0:n.id;try{const{hits:c,set:u}=await b(t,s,{request:o,signal:e});if(e.aborted||((d=r.get().manifest)==null?void 0:d.id)!==i)return;r.set({search:{query:s,status:"ready",hits:c,set:u}})}catch{if(e.aborted)return;r.set({search:{query:s,status:"error",hits:[],set:null}})}}async function b(r,t,{request:s,signal:o}={}){const e=new URL(r.id);e.searchParams.set("q",t);const i=[];let n=e.toString();const d=new Set;for(;n&&i.length<A&&!d.has(n);){d.add(n);const c=await w(s,n,o);i.push(c),n=V(c)}return $(i,t)}function T(r){var e;const t=f(r)[0];if(typeof t=="string"||!t)return t;const s=t.full??t["@id"],o=(e=f(t.selector)[0])==null?void 0:e.value;return typeof o=="string"&&typeof s=="string"?`${s}#${o}`:s}function V(r){var o;const t=r.next??((o=r.within)==null?void 0:o.next),s=typeof t=="string"?t:(t==null?void 0:t.id)??(t==null?void 0:t["@id"]);return typeof s=="string"?s:null}function $(r,t){var e,i;const s=[],o=[];for(const n of r){const d=Array.isArray(n.resources),c=d?n.resources:f(n.items),u=new Map;for(const a of c){const p=a.id??a["@id"],m=d?T(a.on):f(a.target)[0],v=x(m);if(!p||!v.id)continue;const y=d?(e=a.resource)==null?void 0:e.chars:f(a.body).map(l=>l==null?void 0:l.value).find(l=>typeof l=="string"),I={id:p,setId:S,canvasId:v.id,target:v,motivation:["highlighting"],bodies:[{value:String(y??t)}],annotation:{id:p,type:"Annotation",motivation:["highlighting"],body:{type:"TextualBody",value:String(y??t)},target:m}};u.set(p,I),s.push(I)}const g=d?E(n,u):H(n,u),h=new Set(g.flatMap(a=>a.entryIds));o.push(...g);for(const a of u.values())h.has(a.id)||o.push({id:a.id,canvasId:a.canvasId,entryIds:[a.id],match:((i=a.bodies[0])==null?void 0:i.value)??t})}return{query:t,hits:o,set:{id:S,label:{none:[t]},source:"search",entries:s}}}function E(r,t){var o;const s=[];for(const e of f(r.hits)){const i=f(e.annotations).filter(n=>t.has(n));i.length&&s.push({id:i.join(" "),canvasId:t.get(i[0]).canvasId,entryIds:i,before:e.before,match:String(e.match??((o=t.get(i[0]).bodies[0])==null?void 0:o.value)??""),after:e.after})}return s}function H(r,t){var o,e;const s=[];for(const i of f(r.annotations))for(const n of f(i==null?void 0:i.items))if(f(n==null?void 0:n.motivation).includes("contextualizing"))for(const c of f(n.target)){const u=typeof(c==null?void 0:c.source)=="string"?c.source:(o=c==null?void 0:c.source)==null?void 0:o.id,g=u?t.get(u):void 0;if(!g)continue;const h=f(c.selector).find(a=>(a==null?void 0:a.type)==="TextQuoteSelector");s.push({id:`${n.id??u}#${u}`,canvasId:g.canvasId,entryIds:[g.id],before:h==null?void 0:h.prefix,match:String((h==null?void 0:h.exact)??((e=g.bodies[0])==null?void 0:e.value)??""),after:h==null?void 0:h.suffix})}return s}export{$ as readResults,b as search,P as searchInto};