@nulib/clover 4.5.8 → 4.6.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 (308) hide show
  1. package/dist/components/Canvas/CanvasView.mjs +19 -0
  2. package/dist/components/Canvas/Connected.mjs +5 -1
  3. package/dist/components/Canvas/FrameAnimation.mjs +4 -48
  4. package/dist/components/Items/Items.mjs +31 -2
  5. package/dist/components/Items/vertical/ItemsVertical.mjs +8 -0
  6. package/dist/components/Transcript/Transcript.mjs +17 -2
  7. package/dist/core/request.mjs +7 -0
  8. package/dist/core/save-file.mjs +5 -2
  9. package/dist/core/selectors.mjs +9 -1
  10. package/dist/core/vtt.mjs +6 -4
  11. package/dist/i18n/locales/en.json.mjs +1 -1
  12. package/dist/i18n/locales/es.json.mjs +1 -1
  13. package/dist/i18n/locales/fi.json.mjs +1 -1
  14. package/dist/i18n/locales/fr.json.mjs +1 -1
  15. package/dist/i18n/locales/it.json.mjs +1 -1
  16. package/dist/i18n/locales/ja.json.mjs +1 -1
  17. package/dist/i18n/locales/nb.json.mjs +1 -1
  18. package/dist/i18n/locales/nn.json.mjs +1 -1
  19. package/dist/i18n/locales/no.json.mjs +1 -1
  20. package/dist/i18n/locales/pt.json.mjs +1 -1
  21. package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
  22. package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
  23. package/dist/lib/gltf/load.mjs +5 -2
  24. package/dist/lib/renderer/CanvasRenderer.mjs +179 -42
  25. package/dist/lib/renderer/backends/webgl2/shaders.mjs +2 -1
  26. package/dist/lib/renderer/io/TileCache.mjs +1 -1
  27. package/dist/lib/renderer/io/decode.mjs +2 -1
  28. package/dist/lib/renderer/scene/planFrame.mjs +17 -0
  29. package/dist/lib/renderer/scene/sceneItem.mjs +9 -4
  30. package/dist/lib/renderer/sources/imageService.mjs +2 -1
  31. package/dist/lib/renderer/sources/tilePyramid.mjs +14 -3
  32. package/dist/styles/core.css +1 -1
  33. package/dist/styles/items-vertical.css +1 -0
  34. package/dist/styles/items.css +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/ui/Loading.mjs +9 -0
  37. package/dist/ui/loadingPass.mjs +52 -0
  38. package/dist/ui/sheets/items-vertical.mjs +5 -0
  39. package/dist/web-components/{About-CVX3WjIM.mjs → About-Brbhm22a.mjs} +1 -1
  40. package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +1 -0
  41. package/dist/web-components/{AnnotationMenu-DS8hpHt_.mjs → AnnotationMenu-4PN2LNP-.mjs} +1 -1
  42. package/dist/web-components/{AnnotationState-C6XuLyjK.mjs → AnnotationState-3KHHmQhl.mjs} +1 -1
  43. package/dist/web-components/{Annotations-DZ0uCsSA.mjs → Annotations-BwKS6fG8.mjs} +1 -1
  44. package/dist/web-components/{Annotations-C6jdThgl.mjs → Annotations-CPUvoKJe.mjs} +1 -1
  45. package/dist/web-components/{Body-BSgaX-3F.mjs → Body-CTzmxY8R.mjs} +1 -1
  46. package/dist/web-components/{BodyAlert-B4aQaIUq.mjs → BodyAlert-CXOxbNBE.mjs} +1 -1
  47. package/dist/web-components/{Button-DjjrKoEn.mjs → Button-a59NBnOp.mjs} +1 -1
  48. package/dist/web-components/{Camera-BEeXRxzV.mjs → Camera-BlbXBgYZ.mjs} +1 -1
  49. package/dist/web-components/{Canvas2DBackend-nJRJutaS.mjs → Canvas2DBackend-DXCfms6g.mjs} +1 -1
  50. package/dist/web-components/CanvasView-CiP25Iqc.mjs +2 -0
  51. package/dist/web-components/{CaptionDetails-ljenvCyI.mjs → CaptionDetails-CCCTWTQP.mjs} +1 -1
  52. package/dist/web-components/{ChaptersMenu-DDgnLAtO.mjs → ChaptersMenu-Bne6N9cf.mjs} +1 -1
  53. package/dist/web-components/{Chevron-JoTeVk7K.mjs → Chevron-CH8yyEDi.mjs} +1 -1
  54. package/dist/web-components/{ChoiceMenu-82jUcgr6.mjs → ChoiceMenu-BQVTRzXj.mjs} +1 -1
  55. package/dist/web-components/{Collection-JI80uk-a.mjs → Collection-CbEMQWrO.mjs} +1 -1
  56. package/dist/web-components/{CollectionSelect-CxOlBjmO.mjs → CollectionSelect-BpvtCwSl.mjs} +1 -1
  57. package/dist/web-components/Connected-BWomgzfE.mjs +1 -0
  58. package/dist/web-components/{Connected-Bur9iAGb.mjs → Connected-C31vzWei.mjs} +1 -1
  59. package/dist/web-components/{Connected-DTYB8ubW.mjs → Connected-Dq0xux9o.mjs} +1 -1
  60. package/dist/web-components/{Contents-cwsn0zpJ.mjs → Contents-CGc6_Z5c.mjs} +1 -1
  61. package/dist/web-components/{ControlMenu-BBBRHutV.mjs → ControlMenu-ej-Kpb31.mjs} +1 -1
  62. package/dist/web-components/ControlsFade-CStkqANR.mjs +1 -0
  63. package/dist/web-components/{CountMenu-DFOUdzB0.mjs → CountMenu-D4M1roIh.mjs} +1 -1
  64. package/dist/web-components/Cue-BhXRUDe9.mjs +1 -0
  65. package/dist/web-components/{Document-CKJYtix1.mjs → Document-CPQELxSI.mjs} +1 -1
  66. package/dist/web-components/{DomLayers-vrvJUN5_.mjs → DomLayers-DwhkzPRS.mjs} +1 -1
  67. package/dist/web-components/{Download-CQX7fDub.mjs → Download-Dsei4KG3.mjs} +1 -1
  68. package/dist/web-components/{EntryBodies-BvHccb-L.mjs → EntryBodies-BI7V3B5i.mjs} +1 -1
  69. package/dist/web-components/{EntryThumbnail-YuRsScmh.mjs → EntryThumbnail-BnMLzy5M.mjs} +1 -1
  70. package/dist/web-components/{FieldPill-D8JBm03i.mjs → FieldPill-BOeOasUT.mjs} +1 -1
  71. package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +1 -0
  72. package/dist/web-components/{Gallery-BH4b0bkJ.mjs → Gallery-BDGDzt0R.mjs} +1 -1
  73. package/dist/web-components/{GlobeGlyph-DU4HgIlU.mjs → GlobeGlyph-9zKXX7B6.mjs} +1 -1
  74. package/dist/web-components/{HideToggle-C5GjtOeD.mjs → HideToggle-CmwFnHcZ.mjs} +1 -1
  75. package/dist/web-components/{ImageControls-D4NriMaR.mjs → ImageControls-CSHxdUD1.mjs} +1 -1
  76. package/dist/web-components/Items-DCRr750U.mjs +1 -0
  77. package/dist/web-components/ItemsVertical-BeIiJ37B.mjs +1 -0
  78. package/dist/web-components/{Label-AzCladKz.mjs → Label-CVfL9bMO.mjs} +1 -1
  79. package/dist/web-components/{LanguageChoice-BjOVXoTc.mjs → LanguageChoice-D_vEiQp9.mjs} +1 -1
  80. package/dist/web-components/{LanguageMenu-DYKPJWTQ.mjs → LanguageMenu-ycNvnbOB.mjs} +1 -1
  81. package/dist/web-components/{LightboxView-BTtyMjPN.mjs → LightboxView-CsOAsZ3f.mjs} +1 -1
  82. package/dist/web-components/{ListEnd-Dp2ZLTtS.mjs → ListEnd-B6tyeK1B.mjs} +1 -1
  83. package/dist/web-components/{Loaded-B_afJf30.mjs → Loaded-CSYg8oIR.mjs} +1 -1
  84. package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +1 -0
  85. package/dist/web-components/LoadedMap-jx7uEeDg.mjs +1 -0
  86. package/dist/web-components/Loading-CAkF1fBT.mjs +1 -0
  87. package/dist/web-components/{Map-Sr8lEkIx.mjs → Map-BDsBYSp5.mjs} +1 -1
  88. package/dist/web-components/{MapView-Cyuq8ZjK.mjs → MapView-DO23FSrT.mjs} +2 -2
  89. package/dist/web-components/{Markup-D_j5vPvk.mjs → Markup-COA2t_y1.mjs} +1 -1
  90. package/dist/web-components/{MediaBody-DRkphCAw.mjs → MediaBody-CNk9fFfN.mjs} +1 -1
  91. package/dist/web-components/{MediaBody-BFkIoL-g.mjs → MediaBody-XsEObuYV.mjs} +1 -1
  92. package/dist/web-components/{NavDate-DWIV5F6P.mjs → NavDate-1LLiZ8Vq.mjs} +1 -1
  93. package/dist/web-components/{Navigator-R3SCVscB.mjs → Navigator-t1y35uj8.mjs} +1 -1
  94. package/dist/web-components/{Pager-D6slnuet.mjs → Pager-35N8_3lH.mjs} +1 -1
  95. package/dist/web-components/PagerLayout-SNT5cl4D.mjs +1 -0
  96. package/dist/web-components/{Panel-CuGSpuMG.mjs → Panel-D16u98YB.mjs} +1 -1
  97. package/dist/web-components/PanelPart-DfjlK_hB.mjs +1 -0
  98. package/dist/web-components/{PanelToggle-DGi2sN1Y.mjs → PanelToggle-BcUVIbQw.mjs} +1 -1
  99. package/dist/web-components/{PartOfManifest-dHMlHOeZ.mjs → PartOfManifest-BYyflVQI.mjs} +1 -1
  100. package/dist/web-components/{Pending-DqTfvy6z.mjs → Pending-bIYd0PwB.mjs} +1 -1
  101. package/dist/web-components/PlaceBox-D-pLIX5w.mjs +1 -0
  102. package/dist/web-components/{Placeholder-D2xzRHzw.mjs → Placeholder-Mq1Iaasr.mjs} +1 -1
  103. package/dist/web-components/{Position-CZxedOcV.mjs → Position-Bh1Iq4d6.mjs} +1 -1
  104. package/dist/web-components/{Primitives-DjUlp4ln.mjs → Primitives-DP2uwwcU.mjs} +1 -1
  105. package/dist/web-components/{Provider-BhDLDrIb.mjs → Provider-BUDzNTyJ.mjs} +1 -1
  106. package/dist/web-components/{ReadMore-l-ljjCbA.mjs → ReadMore-B6qft77s.mjs} +1 -1
  107. package/dist/web-components/Root-J9v7nQ6o.mjs +1 -0
  108. package/dist/web-components/Scene-CdqC1O-B.mjs +1 -0
  109. package/dist/web-components/{SceneView-C-5ZBOMj.mjs → SceneView-DykQJepG.mjs} +1 -1
  110. package/dist/web-components/{Search-DvSuOWsf.mjs → Search-DEoFdx2g.mjs} +1 -1
  111. package/dist/web-components/{Sections-WeQ6ifoH.mjs → Sections-B6j9eFao.mjs} +1 -1
  112. package/dist/web-components/{SeekMarks-CnV7psCC.mjs → SeekMarks-C3ZDOMbt.mjs} +1 -1
  113. package/dist/web-components/StandaloneItems-CtxMB090.mjs +1 -0
  114. package/dist/web-components/{Status-CjAX4ZcY.mjs → Status-C49DxNaY.mjs} +1 -1
  115. package/dist/web-components/{Steps-WGighDCr.mjs → Steps-BTAJ3lc6.mjs} +1 -1
  116. package/dist/web-components/{TargetItems-CHK11XsC.mjs → TargetItems-BZFSWVs6.mjs} +1 -1
  117. package/dist/web-components/Timeline-D5oL1UyW.mjs +1 -0
  118. package/dist/web-components/{Tip-MXBlEQhp.mjs → Tip-Dv-gYN8n.mjs} +1 -1
  119. package/dist/web-components/Transcript-FmC6HR0-.mjs +1 -0
  120. package/dist/web-components/{Transport-DkJkLd_9.mjs → Transport-BKFLjI45.mjs} +1 -1
  121. package/dist/web-components/{Transport-B4jS-QyR.mjs → Transport-pRWbs9M3.mjs} +1 -1
  122. package/dist/web-components/{annotation-collection-DgDTaqZJ.mjs → annotation-collection-Dc-peX7w.mjs} +1 -1
  123. package/dist/web-components/{annotation-name-BQPsnye0.mjs → annotation-name-BhbhOgES.mjs} +1 -1
  124. package/dist/web-components/{annotations-content-C2Ard-Wu.mjs → annotations-content-BJSUCNd1.mjs} +1 -1
  125. package/dist/web-components/{body-CsDqGyS1.mjs → body-BEZ3sYcR.mjs} +1 -1
  126. package/dist/web-components/{canvas-DYIiw-An.mjs → canvas-CfnKZqTU.mjs} +1 -1
  127. package/dist/web-components/{viewer/cloverEngine-SxAYyRtz.mjs → cloverEngine-BstElW9l.mjs} +3 -3
  128. package/dist/web-components/{content-state-reader-W2X5SbX2.mjs → content-state-reader-DGOg8oAH.mjs} +1 -1
  129. package/dist/web-components/{controlGlyphs-DO8zuBuP.mjs → controlGlyphs-Lxfq7zz4.mjs} +1 -1
  130. package/dist/web-components/{controls-B-kceETo.mjs → controls-BibZpBh1.mjs} +1 -1
  131. package/dist/web-components/{downloads-b2ula2rS.mjs → downloads-cYib41PV.mjs} +1 -1
  132. package/dist/web-components/{dragToClose-CyySNxZo.mjs → dragToClose-BpzjNnPx.mjs} +1 -1
  133. package/dist/web-components/{engine-BO2NyZbt.mjs → engine-Cl755NaO.mjs} +1 -1
  134. package/dist/web-components/{engines-ByJdQYM6.mjs → engines-fZzYf1dz.mjs} +1 -1
  135. package/dist/web-components/{es-Bn4XnLxy.mjs → es-Bx-zZBfZ.mjs} +1 -1
  136. package/dist/web-components/{fetchManifest-BJPcndui.mjs → fetchManifest-D31pEPrb.mjs} +1 -1
  137. package/dist/web-components/{fi-CjAXeLqH.mjs → fi-DsP1FhBy.mjs} +1 -1
  138. package/dist/web-components/{follow-content-Bta7Cphz.mjs → follow-content-Byosc3Ev.mjs} +1 -1
  139. package/dist/web-components/{fr-CeFhkxoi.mjs → fr-BuL_F9Jq.mjs} +1 -1
  140. package/dist/web-components/{fromManifest-toVz2G-X.mjs → fromManifest-DqCyZd2Q.mjs} +1 -1
  141. package/dist/web-components/{glyphs-C9dkvLmy.mjs → glyphs-8fjIPAtZ.mjs} +1 -1
  142. package/dist/web-components/{hooks-C1S0JZNP.mjs → hooks-Bo5GjPGX.mjs} +1 -1
  143. package/dist/web-components/{image-layers-hf965hJE.mjs → image-layers-CFarmTfZ.mjs} +1 -1
  144. package/dist/web-components/{image-service-content-kG5TIiB7.mjs → image-service-content-bUFBZCr1.mjs} +1 -1
  145. package/dist/web-components/imageService-CCKieCxo.mjs +1 -0
  146. package/dist/web-components/{index-BqgqqnqN.mjs → index-DhlRi3H9.mjs} +1 -1
  147. package/dist/web-components/index.mjs +1 -1
  148. package/dist/web-components/{it-DxtfVek2.mjs → it-DH3EtrgI.mjs} +1 -1
  149. package/dist/web-components/items-BXd02UN6.mjs +1 -0
  150. package/dist/web-components/{items-DNfIV4vN.mjs → items-CKMFXz0W.mjs} +1 -1
  151. package/dist/web-components/{ja-rsicBgWR.mjs → ja-BEHbDotv.mjs} +1 -1
  152. package/dist/web-components/label-DcF-YCIN.mjs +1 -0
  153. package/dist/web-components/{layout--P98JuFG.mjs → layout-DQtgCOJJ.mjs} +1 -1
  154. package/dist/web-components/{link-p71HL3dn.mjs → link-q4quIuuD.mjs} +1 -1
  155. package/dist/web-components/logo-DWI0N9FL.mjs +1 -0
  156. package/dist/web-components/{models-BnyeBKu_.mjs → models-Dw-cADIz.mjs} +1 -1
  157. package/dist/web-components/{no-BkyI1fhp.mjs → nb-Bdfn_mZs.mjs} +1 -1
  158. package/dist/web-components/{nn-n_xM6AGl.mjs → nn-BCWbSuK0.mjs} +1 -1
  159. package/dist/web-components/{nb-BkyI1fhp.mjs → no-Bdfn_mZs.mjs} +1 -1
  160. package/dist/web-components/{nodes-DZbVJvjk.mjs → nodes-nZmQ93ib.mjs} +1 -1
  161. package/dist/web-components/{overlayImage-D6TfbX70.mjs → overlayImage-B-ybt0wn.mjs} +1 -1
  162. package/dist/web-components/{panel-COA5_tL_.mjs → panel-C27fOmhT.mjs} +1 -1
  163. package/dist/web-components/part-B9t8Qe9D.mjs +1 -0
  164. package/dist/web-components/{playerSurface-Uc4JAuxZ.mjs → playerSurface-BLzwC0Ux.mjs} +1 -1
  165. package/dist/web-components/{pointer-BPJduQ1u.mjs → pointer-BYZjBehK.mjs} +1 -1
  166. package/dist/web-components/{provider-B4tq-84F.mjs → provider-Cs6sFr4G.mjs} +1 -1
  167. package/dist/web-components/{pt-COchUT7D.mjs → pt-Da5El49z.mjs} +1 -1
  168. package/dist/web-components/{range-regions-92kmJCAy.mjs → range-regions-DssQTTra.mjs} +1 -1
  169. package/dist/web-components/{read-more-BnhdOE8Y.mjs → read-more-Cp9CLzyd.mjs} +1 -1
  170. package/dist/web-components/{readingLanguages-Bf_HW2UJ.mjs → readingLanguages-D97yt-4s.mjs} +1 -1
  171. package/dist/web-components/rendererSurface-BuBm8Th_.mjs +22 -0
  172. package/dist/web-components/{renderers-CX9SrgrB.mjs → renderers-BL-b8snn.mjs} +1 -1
  173. package/dist/web-components/{resource-DF5HkAfv.mjs → resource-DwKOZbOZ.mjs} +1 -1
  174. package/dist/web-components/save-file-CcfAgDXf.mjs +1 -0
  175. package/dist/web-components/{search-BvpD-NWY.mjs → search-C45Jd7QH.mjs} +1 -1
  176. package/dist/web-components/shared-D2pvbPvF.mjs +1 -0
  177. package/dist/web-components/{show-link-DRCdG8ae.mjs → show-link-D9bByIzf.mjs} +1 -1
  178. package/dist/web-components/{sizedImage-BtyysLax.mjs → sizedImage-BFAry04f.mjs} +1 -1
  179. package/dist/web-components/{split-DFthztSD.mjs → split-CDZiE4rz.mjs} +1 -1
  180. package/dist/web-components/{status-BZuOJ0UE.mjs → status-BtCciELI.mjs} +1 -1
  181. package/dist/web-components/styles-Bf3qmdsh.mjs +1 -0
  182. package/dist/web-components/three.mjs +1 -1
  183. package/dist/web-components/thumbnail-By5wfGlE.mjs +1 -0
  184. package/dist/web-components/{tip-ukHtKmqe.mjs → tip-_XUeFMj4.mjs} +1 -1
  185. package/dist/web-components/{toggle-DX4vFKqT.mjs → toggle-DkPNS5eL.mjs} +1 -1
  186. package/dist/web-components/{useContainerName-CM_MIZu9.mjs → useContainerName-BfU0IozO.mjs} +1 -1
  187. package/dist/web-components/{useControlsVisibility-DZFyrqAJ.mjs → useControlsVisibility-pU1JVIpK.mjs} +1 -1
  188. package/dist/web-components/{useNearViewport-DHvgWl-0.mjs → useNearViewport-D1kQt-tS.mjs} +1 -1
  189. package/dist/web-components/{useScrollTrack-B0Nx9ZZ7.mjs → useScrollTrack-cQfG_zk_.mjs} +1 -1
  190. package/dist/web-components/viewer/{AnnotationItems-CLssRyMA.mjs → AnnotationItems-UHFS1uDO.mjs} +1 -1
  191. package/dist/web-components/viewer/{AnnotationMenu-i4ieWtOL.mjs → AnnotationMenu-0Ru0csCz.mjs} +1 -1
  192. package/dist/web-components/viewer/{AnnotationState-BmDac4UI.mjs → AnnotationState-hEds2Tpa.mjs} +1 -1
  193. package/dist/web-components/viewer/{Annotations-CEwycZ2M.mjs → Annotations-Oprg7015.mjs} +1 -1
  194. package/dist/web-components/viewer/{Annotations-C-zxQ4wJ.mjs → Annotations-vzP6-fS4.mjs} +1 -1
  195. package/dist/web-components/viewer/{Canvas2DBackend-BFb2tuhl.mjs → Canvas2DBackend-3b5xEKac.mjs} +1 -1
  196. package/dist/web-components/viewer/CaptionDetails-DDIjm-rC.mjs +1 -0
  197. package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +1 -0
  198. package/dist/web-components/viewer/{ChoiceMenu-Ccv0BI0G.mjs → ChoiceMenu-COUDRKGM.mjs} +1 -1
  199. package/dist/web-components/viewer/{Collection-86-r4tY9.mjs → Collection-kWUradiW.mjs} +1 -1
  200. package/dist/web-components/viewer/{Connected-D_7Zs7Hq.mjs → Connected-B2TrgX9-.mjs} +1 -1
  201. package/dist/web-components/viewer/{Connected-DbLzPNdX.mjs → Connected-FiJKHEv9.mjs} +1 -1
  202. package/dist/web-components/viewer/{Contents-DUjhQjnI.mjs → Contents-DHyzbjco.mjs} +1 -1
  203. package/dist/web-components/viewer/{ControlMenu-CKcTiPrh.mjs → ControlMenu-DWi6tgKb.mjs} +1 -1
  204. package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +1 -0
  205. package/dist/web-components/viewer/{CountMenu-B1_cvbuR.mjs → CountMenu-BYU6T0Ou.mjs} +1 -1
  206. package/dist/web-components/viewer/Cue-Ct2isFl7.mjs +1 -0
  207. package/dist/web-components/viewer/{Document-BGRVcflJ.mjs → Document-BtN3vmsO.mjs} +1 -1
  208. package/dist/web-components/viewer/{DomLayers-wxV3sHPY.mjs → DomLayers-CEzVM7HQ.mjs} +1 -1
  209. package/dist/web-components/viewer/{Download-Cyfhran6.mjs → Download-5BsnDZLL.mjs} +1 -1
  210. package/dist/web-components/viewer/{EntryBodies-B2WCkj8y.mjs → EntryBodies-D9R-wouw.mjs} +1 -1
  211. package/dist/web-components/viewer/{EntryThumbnail-dUTxyqTj.mjs → EntryThumbnail-P6CmjmO9.mjs} +1 -1
  212. package/dist/web-components/viewer/{FieldPill-D8gW-r_p.mjs → FieldPill-CsyRt9Xh.mjs} +1 -1
  213. package/dist/web-components/viewer/FrameAnimation-f4RKtdpP.mjs +1 -0
  214. package/dist/web-components/viewer/{Gallery-OZ5ZiwmB.mjs → Gallery-DC4QY9lG.mjs} +1 -1
  215. package/dist/web-components/viewer/{GlobeGlyph-CXycpMBJ.mjs → GlobeGlyph-BwZm2Ffj.mjs} +1 -1
  216. package/dist/web-components/viewer/{HideToggle-BMddH3GA.mjs → HideToggle-BD6zlrz3.mjs} +1 -1
  217. package/dist/web-components/viewer/{ImageControls-Bu_6VlDO.mjs → ImageControls-Bw9a17cS.mjs} +1 -1
  218. package/dist/web-components/viewer/ItemsVertical-BftsRVJP.mjs +1 -0
  219. package/dist/web-components/viewer/{LanguageChoice-BUTtsHEi.mjs → LanguageChoice-CcDmpHnE.mjs} +1 -1
  220. package/dist/web-components/viewer/{LanguageMenu-DOYyHpdr.mjs → LanguageMenu-CRtM-mLy.mjs} +1 -1
  221. package/dist/web-components/viewer/{LightboxView-DP4_ElsL.mjs → LightboxView-DJoH23fL.mjs} +1 -1
  222. package/dist/web-components/viewer/{ListEnd-CEdhO0md.mjs → ListEnd-CSp0KGGZ.mjs} +1 -1
  223. package/dist/web-components/viewer/{MapView-qaaRmnM-.mjs → MapView-BO2ppZpW.mjs} +2 -2
  224. package/dist/web-components/viewer/{MediaBody-Cjl76Spk.mjs → MediaBody-CMddJWMF.mjs} +1 -1
  225. package/dist/web-components/viewer/{MediaBody-CvXptO7l.mjs → MediaBody-D-1SNnW2.mjs} +1 -1
  226. package/dist/web-components/viewer/{NavDate-OJND1QQD.mjs → NavDate-BJ_MF_t1.mjs} +1 -1
  227. package/dist/web-components/viewer/{Navigator-DRwnm5an.mjs → Navigator-Gt56cM6f.mjs} +1 -1
  228. package/dist/web-components/viewer/{PagerLayout-DN7ZEktF.mjs → PagerLayout-BMrlMLfO.mjs} +1 -1
  229. package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +1 -0
  230. package/dist/web-components/viewer/{PartOfManifest-3cK5il9_.mjs → PartOfManifest-BdZWbAQI.mjs} +1 -1
  231. package/dist/web-components/viewer/{PlaceBox-C9qj6wIy.mjs → PlaceBox-C27N2KG8.mjs} +1 -1
  232. package/dist/web-components/viewer/{Placeholder-DmX-oTRS.mjs → Placeholder-BX2y25Fo.mjs} +1 -1
  233. package/dist/web-components/viewer/{Search-DLRmliHy.mjs → Search-auUpOyeS.mjs} +1 -1
  234. package/dist/web-components/viewer/{SeekMarks-BsAVx2o9.mjs → SeekMarks-Bg0PLdp0.mjs} +1 -1
  235. package/dist/web-components/viewer/{StandaloneItems-BOXI-FO-.mjs → StandaloneItems-CBRWUCNf.mjs} +1 -1
  236. package/dist/web-components/viewer/{Steps-Dl85Vj2l.mjs → Steps-ABKs2V_m.mjs} +1 -1
  237. package/dist/web-components/viewer/{TargetItems-BVT2_Bey.mjs → TargetItems-BQVUKMAs.mjs} +1 -1
  238. package/dist/web-components/viewer/Transcript-DaShc1z-.mjs +1 -0
  239. package/dist/web-components/viewer/{Transport-DKUQM7Hn.mjs → Transport-6wRUIGiD.mjs} +1 -1
  240. package/dist/web-components/viewer/{Transport-Bu1B2DCX.mjs → Transport-ClkPaaOB.mjs} +1 -1
  241. package/dist/web-components/viewer/{annotation-collection-B7DNaCRe.mjs → annotation-collection-eyRpE2h4.mjs} +1 -1
  242. package/dist/web-components/viewer/{annotation-name-DCAh29x5.mjs → annotation-name-DdchUvJI.mjs} +1 -1
  243. package/dist/web-components/viewer/{annotations-content-BG992gjT.mjs → annotations-content-BZXlT3bR.mjs} +1 -1
  244. package/dist/web-components/{cloverEngine-BjfUbU7f.mjs → viewer/cloverEngine-CZWHXlyY.mjs} +3 -3
  245. package/dist/web-components/viewer/{content-state-reader-CRGjvYpM.mjs → content-state-reader-CDV0Igdx.mjs} +1 -1
  246. package/dist/web-components/viewer/{dragToClose-Di8WUOHC.mjs → dragToClose-CD-MJb-V.mjs} +1 -1
  247. package/dist/web-components/viewer/{fetchManifest-B3gCtveO.mjs → fetchManifest-C1IEIf45.mjs} +1 -1
  248. package/dist/web-components/viewer/{follow-content-2RmNmRMy.mjs → follow-content-IQqCbvbJ.mjs} +1 -1
  249. package/dist/web-components/viewer/{host-CM3zmrKp.mjs → host-BxQrzQnu.mjs} +1 -1
  250. package/dist/web-components/viewer/{image-layers-CmimeZYQ.mjs → image-layers-DurrQgfL.mjs} +1 -1
  251. package/dist/web-components/viewer/{image-service-content-DNYciFvo.mjs → image-service-content-ClAm_g0Y.mjs} +1 -1
  252. package/dist/web-components/viewer/index.mjs +1 -1
  253. package/dist/web-components/viewer/{link-CrW4CND2.mjs → link-Drdj-HcB.mjs} +1 -1
  254. package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +1 -0
  255. package/dist/web-components/viewer/{range-regions-DwMexshz.mjs → range-regions-a5eVBfJy.mjs} +1 -1
  256. package/dist/web-components/viewer/{renderers-Cs9Wbr3d.mjs → renderers-CdXzZ9As.mjs} +1 -1
  257. package/dist/web-components/viewer/save-file-B2UBQRXz.mjs +1 -0
  258. package/dist/web-components/viewer/{search-CI1xScP1.mjs → search-BBZKUiMB.mjs} +1 -1
  259. package/dist/web-components/viewer/styles-XRfyRUPf.mjs +1 -0
  260. package/dist/web-components/viewer/{useControlsVisibility-CCTZH1aT.mjs → useControlsVisibility-BfTACzo_.mjs} +1 -1
  261. package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +29 -0
  262. package/dist/web-components/viewer/vtt-CCkTp_f2.mjs +5 -0
  263. package/dist/web-components/{viewer-DD2bGSYe.mjs → viewer-D-AQ7mGw.mjs} +1 -1
  264. package/dist/web-components/vtt-BjXkNfI_.mjs +5 -0
  265. package/dist/web-components/{zh-Hans-Bfn3LUnq.mjs → zh-Hans-BhTHTZXT.mjs} +1 -1
  266. package/dist/web-components/{zh-Hant-DzmK541A.mjs → zh-Hant-_CJAOTzC.mjs} +1 -1
  267. package/package.json +1 -1
  268. package/dist/web-components/AnnotationItems-DKP8AOB9.mjs +0 -1
  269. package/dist/web-components/CanvasView-DK0lfyWR.mjs +0 -2
  270. package/dist/web-components/Connected-CC10s8oE.mjs +0 -1
  271. package/dist/web-components/ControlsFade-DNHDI2WA.mjs +0 -1
  272. package/dist/web-components/Cue-C2a4Pvi3.mjs +0 -1
  273. package/dist/web-components/FrameAnimation-DJRLNImC.mjs +0 -1
  274. package/dist/web-components/Items-V4WBXxYO.mjs +0 -1
  275. package/dist/web-components/LoadedCanvas-DisvEU6k.mjs +0 -1
  276. package/dist/web-components/LoadedMap-DCMWMk1e.mjs +0 -1
  277. package/dist/web-components/Loading-BXzghLiL.mjs +0 -1
  278. package/dist/web-components/PagerLayout-B-a-Bj7s.mjs +0 -1
  279. package/dist/web-components/PanelPart-C5T9XPgt.mjs +0 -1
  280. package/dist/web-components/PlaceBox-DW79A9P1.mjs +0 -1
  281. package/dist/web-components/Root-DdfxetNr.mjs +0 -1
  282. package/dist/web-components/Scene-CoKy2-jQ.mjs +0 -1
  283. package/dist/web-components/StandaloneItems-BrGYircX.mjs +0 -1
  284. package/dist/web-components/Timeline-CylMxHCg.mjs +0 -1
  285. package/dist/web-components/Transcript-BdmTrR_U.mjs +0 -1
  286. package/dist/web-components/imageService-DVoE9khh.mjs +0 -1
  287. package/dist/web-components/items-Di34gCGN.mjs +0 -1
  288. package/dist/web-components/label-Dt_ns3jW.mjs +0 -1
  289. package/dist/web-components/logo-QsMwaY8M.mjs +0 -1
  290. package/dist/web-components/part-DgEyWjer.mjs +0 -1
  291. package/dist/web-components/rendererSurface-BZa3x_Xh.mjs +0 -22
  292. package/dist/web-components/save-file-oScSwFhH.mjs +0 -1
  293. package/dist/web-components/shared-w6hjs-L1.mjs +0 -1
  294. package/dist/web-components/styles-BeCG47FS.mjs +0 -1
  295. package/dist/web-components/thumbnail-DhVhVkd8.mjs +0 -1
  296. package/dist/web-components/viewer/CaptionDetails-Et5z9c7X.mjs +0 -1
  297. package/dist/web-components/viewer/ChaptersMenu-CSFNWKY2.mjs +0 -1
  298. package/dist/web-components/viewer/ControlsFade-Bo9VWCLG.mjs +0 -1
  299. package/dist/web-components/viewer/Cue-DzOw4BLm.mjs +0 -1
  300. package/dist/web-components/viewer/FrameAnimation-ChG6Louz.mjs +0 -1
  301. package/dist/web-components/viewer/PanelPart-CF2Fw2b4.mjs +0 -1
  302. package/dist/web-components/viewer/Transcript-fRjfw6kB.mjs +0 -1
  303. package/dist/web-components/viewer/overlayImage-Bgl_ar2I.mjs +0 -1
  304. package/dist/web-components/viewer/save-file-CpREFWq3.mjs +0 -1
  305. package/dist/web-components/viewer/styles-nU97HodU.mjs +0 -1
  306. package/dist/web-components/viewer/viewer-BDXZbbZI.mjs +0 -29
  307. package/dist/web-components/viewer/vtt-DJjsoNz1.mjs +0 -5
  308. package/dist/web-components/vtt-D30pzLou.mjs +0 -5
@@ -1,29 +0,0 @@
1
- var Ql=Object.defineProperty;var tu=(t,e,n)=>e in t?Ql(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var L=(t,e,n)=>tu(t,typeof e!="symbol"?e+"":e,n);import{s as Ma}from"./styles-nU97HodU.mjs";function eu(t={}){return Promise.resolve().then(()=>ad).then(e=>e.initCloverI18n(t))}const Ta="@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 nu=null,xn=null;const ou=()=>nu??(nu=import("./host-CM3zmrKp.mjs").then(t=>xn=t)),ru=t=>t.trim().toLowerCase()==="false";function su(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!ru(t);if(e==="number"){const s=Number(t);if(t.trim()===""||!Number.isFinite(s)){o("is not a number");return}if(n!==void 0&&s<n){o(`is less than ${n}`);return}return s}if(e==="data"){const s=t.trim();if(!/^[[{"]/.test(s))return t;try{return JSON.parse(s)}catch{o("is not JSON");return}}const r=t.trim().toLowerCase();if(e.includes(r))return r==="false"?false:r;o(`is not ${e.join(", ")}`)}const iu=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function au(t){class e extends HTMLElement{constructor(){super(...arguments);L(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){Ma(this.ownerDocument).inject("elements",Ta)}}customElements.define(t.tag,e)}function cu(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return au(t);const n=t.kind,o=t.properties??[],r=Object.entries(t.events??{});let s=null,i=null;const a=()=>i??(i=Promise.all([e().then(l=>s=l),ou()]));class c extends HTMLElement{constructor(){super(...arguments);L(this,"kind",n);L(this,"needsRoot",!!t.needsRoot);L(this,"values",{});L(this,"kept",{});L(this,"props",{});L(this,"listeners",new Set);L(this,"warned",new Set);L(this,"handlers",Object.fromEntries(r.map(([u,p])=>[p.prop,(...h)=>{var v;if(p.keeps&&(this.kept[p.keeps]=h[0]??null,h[0]==null))return true;const m=p.detail==="first"?h[0]:Object.fromEntries(p.detail.map((S,k)=>[S,h[k]])),g=new CustomEvent(u,{detail:m,bubbles:!p.keeps,composed:!p.keeps,cancelable:!!p.cancelable}),b=this.dispatchEvent(g);if(!b&&p.cancelable){const S=h[h.length-1];(v=S==null?void 0:S.preventDefault)==null||v.call(S)}return b}])));L(this,"getProps",()=>this.props);L(this,"subscribe",u=>(this.listeners.add(u),()=>{this.listeners.delete(u)}))}static get observedAttributes(){return Object.keys(t.attributes)}get element(){return this}get Component(){return s}connectedCallback(){for(const u of o){if(!Object.prototype.hasOwnProperty.call(this,u))continue;const p=this[u];delete this[u],p!=null&&(this.values[u]=p)}this.update(),this.warnOfAria(),Ma(this.ownerDocument).inject("elements",Ta),a().then(()=>{this.isConnected&&xn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||xn==null||xn.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!t.native)for(const u of["aria-label","aria-labelledby","role"])!this.hasAttribute(u)||this.warned.has(u)||(this.warned.add(u),console.warn(`<${t.tag}>: ${u} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const u={...this.handlers,...this.values};for(const[p,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const m=this.getAttribute(p),g=su(m,h,b=>{const v=`${p}=${m}`;this.warned.has(v)||(this.warned.add(v),console.warn(`<${t.tag}>: ${p}="${m}" ${b}; ignored.`))});g!==void 0&&(u[h.prop]=g)}iu(u,this.props)||(this.props=u,this.listeners.forEach(p=>p()))}}L(c,"initCloverI18n",eu);for(const l of o)Object.defineProperty(c.prototype,l,{configurable:true,enumerable:true,get(){return l in this.values?this.values[l]:this.getProps()[l]},set(d){d==null?delete this.values[l]:this.values[l]=d,this.update()}});for(const[,l]of r){if(!l.keeps)continue;const d=l.keeps;Object.defineProperty(c.prototype,d,{configurable:true,enumerable:true,get(){return this.kept[d]??null}})}customElements.define(t.tag,c)}var An,at,Ia,He,ni,La,Pa,Aa,jr,yr,br,Oa,Mn={},Na=[],lu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,On=Array.isArray;function ce(t,e){for(var n in e)t[n]=e[n];return t}function Vr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Se(t,e,n){var o,r,s,i={};for(s in e)s=="key"?o=e[s]:s=="ref"?r=e[s]:i[s]=e[s];if(arguments.length>2&&(i.children=arguments.length>3?An.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)i[s]===void 0&&(i[s]=t.defaultProps[s]);return Cn(t,i,o,r,null)}function Cn(t,e,n,o,r){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Ia,__i:-1,__u:0};return r==null&&at.vnode!=null&&at.vnode(s),s}function uu(){return{current:null}}function kt(t){return t.children}function le(t,e){this.props=t,this.context=e}function an(t,e){if(e==null)return t.__?an(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?an(t):null}function Ra(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Ra(t)}}function _r(t){(!t.__d&&(t.__d=true)&&He.push(t)&&!lo.__r++||ni!=at.debounceRendering)&&((ni=at.debounceRendering)||La)(lo)}function lo(){for(var t,e,n,o,r,s,i,a=1;He.length;)He.length>a&&He.sort(Pa),t=He.shift(),a=He.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=ce({},o)).__v=o.__v+1,at.vnode&&at.vnode(n),qr(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??an(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,Fa(s,n,i),o.__e=o.__=null,n.__e!=r&&Ra(n)));lo.__r=0}function Ba(t,e,n,o,r,s,i,a,c,l,d){var u,p,h,m,g,b,v,S=o&&o.__k||Na,k=e.length;for(c=du(n,e,S,c,k),u=0;u<k;u++)(h=n.__k[u])!=null&&(p=h.__i==-1?Mn:S[h.__i]||Mn,h.__i=u,b=qr(t,h,p,r,s,i,a,c,l,d),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Kr(p.ref,null,h),d.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),(v=!!(4&h.__u))||p.__k===h.__k?c=$a(h,c,t,v):typeof h.type=="function"&&b!==void 0?c=b:m&&(c=m.nextSibling),h.__u&=-7);return n.__e=g,c}function du(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,p=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+p,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Cn(null,i,null,null,null):On(i)?Cn(kt,{children:i},null,null,null):i.constructor==null&&i.__b>0?Cn(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,a=null,(l=i.__i=fu(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?p--:r<d&&p++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,i.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<d;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==o&&(o=an(a)),za(a,a));return o}function $a(t,e,n,o){var r,s;if(typeof t.type=="function"){for(r=t.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=t,e=$a(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=an(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function xe(t,e){return e=e||[],t==null||typeof t=="boolean"||(On(t)?t.some(function(n){xe(n,e)}):e.push(t)),e}function fu(t,e,n,o){var r,s,i,a=t.key,c=t.type,l=e[n],d=l!=null&&(2&l.__u)==0;if(l===null&&t.key==null||d&&a==l.key&&c==l.type)return n;if(o>(d?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[i=r>=0?r--:s++])!=null&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function oi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||lu.test(e)?n:n+"px"}function no(t,e,n,o,r){var s,i;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||oi(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||oi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Aa,"$1")),i=e.toLowerCase(),e=i in t||e=="onFocusOut"||e=="onFocusIn"?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?o?n.u=o.u:(n.u=jr,t.addEventListener(e,s?br:yr,s)):t.removeEventListener(e,s?br:yr,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===false&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ri(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=jr++;else if(e.t<n.u)return;return n(at.event?at.event(e):e)}}}function qr(t,e,n,o,r,s,i,a,c,l){var d,u,p,h,m,g,b,v,S,k,y,w,x,$,O,Y,K,U=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=at.__b)&&d(e);t:if(typeof U=="function")try{if(v=e.props,S="prototype"in U&&U.prototype.render,k=(d=U.contextType)&&o[d.__c],y=d?k?k.props.value:d.__:o,n.__c?b=(u=e.__c=n.__c).__=u.__E:(S?e.__c=u=new U(v,y):(e.__c=u=new le(v,y),u.constructor=U,u.render=pu),k&&k.sub(u),u.props=v,u.state||(u.state={}),u.context=y,u.__n=o,p=u.__d=true,u.__h=[],u._sb=[]),S&&u.__s==null&&(u.__s=u.state),S&&U.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ce({},u.__s)),ce(u.__s,U.getDerivedStateFromProps(v,u.__s))),h=u.props,m=u.state,u.__v=e,p)S&&U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&U.getDerivedStateFromProps==null&&v!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,y),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,y)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=v,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(tt){tt&&(tt.__=e)}),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,y),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,m,g)})}if(u.context=y,u.props=v,u.__P=t,u.__e=false,x=at.__r,$=0,S){for(u.state=u.__s,u.__d=false,x&&x(e),d=u.render(u.props,u.state,u.context),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[]}else do u.__d=false,x&&x(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++$<25);u.state=u.__s,u.getChildContext!=null&&(o=ce(ce({},o),u.getChildContext())),S&&!p&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(h,m)),Y=d,d!=null&&d.type===kt&&d.key==null&&(Y=Da(d.props.children)),a=Ba(t,On(Y)?Y:[Y],e,n,o,r,s,i,a,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&i.push(u),b&&(u.__E=u.__=null)}catch(tt){if(e.__v=null,c||s!=null)if(tt.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(K=s.length;K--;)Vr(s[K]);wr(e)}else e.__e=n.__e,e.__k=n.__k,tt.then||wr(e);at.__e(tt,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=hu(n.__e,e,n,o,r,s,i,c,l);return(d=at.diffed)&&d(e),128&e.__u?void 0:a}function wr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(wr)}function Fa(t,e,n){for(var o=0;o<n.length;o++)Kr(n[o],n[++o],n[++o]);at.__c&&at.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){at.__e(s,r.__v)}})}function Da(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:On(t)?t.map(Da):ce({},t)}function hu(t,e,n,o,r,s,i,a,c){var l,d,u,p,h,m,g,b=n.props,v=e.props,S=e.type;if(S=="svg"?r="http://www.w3.org/2000/svg":S=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(S==null)return document.createTextNode(v);t=document.createElementNS(r,S,v.is&&v),a&&(at.__m&&at.__m(e,s),a=false),s=null}if(S==null)b===v||a&&t.data==v||(t.data=v);else{if(s=s&&An.call(t.childNodes),b=n.props||Mn,!a&&s!=null)for(b={},l=0;l<t.attributes.length;l++)b[(h=t.attributes[l]).name]=h.value;for(l in b)if(h=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in v)){if(l=="value"&&"defaultValue"in v||l=="checked"&&"defaultChecked"in v)continue;no(t,l,null,h,r)}}for(l in v)h=v[l],l=="children"?p=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?m=h:l=="checked"?g=h:a&&typeof h!="function"||b[l]===h||no(t,l,h,b[l],r);if(d)a||u&&(d.__html==u.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(u&&(t.innerHTML=""),Ba(e.type=="template"?t.content:t,On(p)?p:[p],e,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&an(n,0),a,c),s!=null)for(l=s.length;l--;)Vr(s[l]);a||(l="value",S=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||S=="progress"&&!m||S=="option"&&m!=b[l])&&no(t,l,m,b[l],r),l="checked",g!=null&&g!=t[l]&&no(t,l,g,b[l],r))}return t}function Kr(t,e,n){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(r){at.__e(r,n)}}function za(t,e,n){var o,r;if(at.unmount&&at.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||Kr(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){at.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&za(o[r],e,n||typeof t.type!="function");n||Vr(t.__e),t.__c=t.__=t.__e=void 0}function pu(t,e,n){return this.constructor(t,n)}function Tn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),at.__&&at.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],qr(e,t=(!o&&n||e).__k=Se(kt,null,[t]),r||Mn,Mn,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?An.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),Fa(s,t,i)}function Ha(t,e){Tn(t,e,Ha)}function mu(t,e,n){var o,r,s,i,a=ce({},t.props);for(s in t.type&&t.type.defaultProps&&(i=t.type.defaultProps),e)s=="key"?o=e[s]:s=="ref"?r=e[s]:a[s]=e[s]===void 0&&i!=null?i[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?An.call(arguments,2):n),Cn(t.type,a,o||t.key,r||t.ref,null)}function he(t){function e(n){var o,r;return this.getChildContext||(o=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&o.forEach(function(i){i.__e=true,_r(i)})},this.sub=function(s){o.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.delete(s),i&&i.call(s)}}),n.children}return e.__c="__cC"+Oa++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}An=Na.slice,at={__e:function(t,e,n,o){for(var r,s,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,o||{}),i=r.__d),i)return r.__E=r}catch(a){t=a}throw t}},Ia=0,le.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ce({},this.state),typeof t=="function"&&(t=t(ce({},n),this.props)),t&&ce(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),_r(this))},le.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),_r(this))},le.prototype.render=kt,He=[],La=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pa=function(t,e){return t.__v.__b-e.__v.__b},lo.__r=0,Aa=/(PointerCapture)$|Capture$/i,jr=0,yr=ri(false),br=ri(true),Oa=0;var gu=0;function f(t,e,n,o,r,s){e||(e={});var i,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?i=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gu,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(i=t.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return at.vnode&&at.vnode(l),l}var Oe,St,Yo,si,cn=0,Wa=[],Et=at,ii=Et.__b,ai=Et.__r,ci=Et.diffed,li=Et.__c,ui=Et.unmount,di=Et.__;function dn(t,e){Et.__h&&Et.__h(St,t,cn||e),cn=0;var n=St.__H||(St.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function H(t){return cn=1,Zr(Va,t)}function Zr(t,e,n){var o=dn(Oe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):Va(void 0,e),function(a){var c=o.__N?o.__N[0]:o.__[0],l=o.t(c,a);c!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=St,!St.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};St.__f=true;var s=St.shouldComponentUpdate,i=St.componentWillUpdate;St.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,r(a,c,l),s=d}i&&i.call(this,a,c,l)},St.shouldComponentUpdate=r}return o.__N||o.__}function F(t,e){var n=dn(Oe++,3);!Et.__s&&Xr(n.__H,e)&&(n.__=t,n.u=e,St.__H.__h.push(n))}function Wt(t,e){var n=dn(Oe++,4);!Et.__s&&Xr(n.__H,e)&&(n.__=t,n.u=e,St.__h.push(n))}function B(t){return cn=5,bt(function(){return{current:t}},[])}function Ua(t,e,n){cn=6,Wt(function(){if(typeof t=="function"){var o=t(e());return function(){t(null),o&&typeof o=="function"&&o()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function bt(t,e){var n=dn(Oe++,7);return Xr(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function lt(t,e){return cn=8,bt(function(){return t},e)}function Ut(t){var e=St.context[t.__c],n=dn(Oe++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(St)),e.props.value):t.__}function ja(t,e){Et.useDebugValue&&Et.useDebugValue(e?e(t):t)}function Gr(){var t=dn(Oe++,11);if(!t.__){for(var e=St.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function vu(){for(var t;t=Wa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(io),t.__H.__h.forEach(xr),t.__H.__h=[]}catch(e){t.__H.__h=[],Et.__e(e,t.__v)}}Et.__b=function(t){St=null,ii&&ii(t)},Et.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),di&&di(t,e)},Et.__r=function(t){ai&&ai(t),Oe=0;var e=(St=t.__c).__H;e&&(Yo===St?(e.__h=[],St.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(io),e.__h.forEach(xr),e.__h=[],Oe=0)),Yo=St},Et.diffed=function(t){ci&&ci(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Wa.push(e)!==1&&si===Et.requestAnimationFrame||((si=Et.requestAnimationFrame)||yu)(vu)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Yo=St=null},Et.__c=function(t,e){e.some(function(n){try{n.__h.forEach(io),n.__h=n.__h.filter(function(o){return!o.__||xr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],Et.__e(o,n.__v)}}),li&&li(t,e)},Et.unmount=function(t){ui&&ui(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{io(o)}catch(r){e=r}}),n.__H=void 0,e&&Et.__e(e,n.__v))};var fi=typeof requestAnimationFrame=="function";function yu(t){var e,n=function(){clearTimeout(o),fi&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);fi&&(e=requestAnimationFrame(n))}function io(t){var e=St,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),St=e}function xr(t){var e=St;t.__c=t.__(),St=e}function Xr(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function Va(t,e){return typeof e=="function"?e(t):e}function qa(t,e){for(var n in e)t[n]=e[n];return t}function Sr(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return true;for(var o in e)if(o!=="__source"&&t[o]!==e[o])return true;return false}function ee(t,e){var n=e(),o=H({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Wt(function(){r.__=n,r.u=e,Jo(r)&&s({t:r})},[t,n,e]),F(function(){return Jo(r)&&s({t:r}),t(function(){Jo(r)&&s({t:r})})},[t]),n}function Jo(t){var e,n,o=t.u,r=t.__;try{var s=o();return!((e=r)===(n=s)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return true}}function Ka(t){t()}function Za(t){return t}function Ga(){return[false,Ka]}var Xa=Wt;function kr(t,e){this.props=t,this.context=e}function bu(t,e){function n(r){var s=this.props.ref,i=s==r.ref;return!i&&s&&(s.call?s(null):s.current=null),e?!e(this.props,r)||!i:Sr(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Se(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}(kr.prototype=new le).isPureReactComponent=true,kr.prototype.shouldComponentUpdate=function(t,e){return Sr(this.props,t)||Sr(this.state,e)};var hi=at.__b;at.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),hi&&hi(t)};var _u=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ie(t){function e(n){var o=qa({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=_u,e.render=t,e.prototype.isReactComponent=e.__f=true,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var pi=function(t,e){return t==null?null:xe(xe(t).map(e))},wu={map:pi,forEach:pi,count:function(t){return t?xe(t).length:0},only:function(t){var e=xe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:xe},xu=at.__e;at.__e=function(t,e,n,o){if(t.then){for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}xu(t,e,n,o)};var mi=at.unmount;function Ya(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),t.__c.__H=null),(t=qa({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=true,t.__c=null),t.__k=t.__k&&t.__k.map(function(o){return Ya(o,e,n)})),t}function Ja(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Ja(o,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=true,t.__c.__P=n)),t}function xt(){this.__u=0,this.o=null,this.__b=null}function Qa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function gt(t){var e,n,o;function r(s){if(e||(e=t()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw e;return Se(n,s)}return r.displayName="Lazy",r.__f=true,r}function Sn(){this.i=null,this.l=null}at.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),mi&&mi(t)},(xt.prototype=new le).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Qa(o.__v),s=false,i=function(){s||(s=true,n.__R=null,r?r(a):a())};n.__R=i;var a=function(){if(!--o.__u){if(o.state.__a){var c=o.state.__a;o.__v.__k[0]=Ja(c,c.__c.__P,c.__c.__O)}var l;for(o.setState({__a:o.__b=null});l=o.o.pop();)l.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(i,i)},xt.prototype.componentWillUnmount=function(){this.o=[]},xt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ya(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&Se(kt,null,t.fallback);return r&&(r.__u&=-33),[Se(kt,null,e.__a?null:t.children),r]};var gi=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Su(t){return this.getChildContext=function(){return t.context},t.children}function ku(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Tn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var o=e.__v;o!==null&&!o.__m&&o.__!==null;)o=o.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return true},insertBefore:function(r,s){this.childNodes.push(r),e.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}}Tn(Se(Su,{context:e.context},t.__v),e.v)}function Cu(t,e){var n=Se(ku,{__v:t,h:e});return n.containerInfo=e,n}(Sn.prototype=new le).__a=function(t){var e=this,n=Qa(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),gi(e,t,o)):r()};n?n(s):s()}},Sn.prototype.render=function(t){this.i=null,this.l=new Map;var e=xe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Sn.prototype.componentDidUpdate=Sn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){gi(t,n,e)})};var tc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Eu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Mu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Tu=/[A-Z0-9]/g,Iu=typeof document<"u",Lu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Pu(t,e,n){return e.__k==null&&(e.textContent=""),Tn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Au(t,e,n){return Ha(t,e),typeof n=="function"&&n(),t?t.__c:null}le.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(le.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var vi=at.event;function Ou(){}function Nu(){return this.cancelBubble}function Ru(){return this.defaultPrevented}at.event=function(t){return vi&&(t=vi(t)),t.persist=Ou,t.isPropagationStopped=Nu,t.isDefaultPrevented=Ru,t.nativeEvent=t};var Yr,Bu={enumerable:false,configurable:true,get:function(){return this.class}},yi=at.vnode;at.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,o=e.type,r={},s=o.indexOf("-")===-1;for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||Iu&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===true?a="":c==="translate"&&a==="no"?a=false:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?i="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||Lu(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Mu.test(i)&&(i=c):c=i="oninput":s&&Eu.test(i)?i=i.replace(Tu,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=a}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=xe(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=xe(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Bu)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=tc,yi&&yi(t)};var bi=at.__r;at.__r=function(t){bi&&bi(t),Yr=t.__c};var _i=at.diffed;at.diffed=function(t){_i&&_i(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Yr=null};var $u={ReactCurrentDispatcher:{current:{readContext:function(t){return Yr.__n[t.__c].props.value},useCallback:lt,useContext:Ut,useDebugValue:ja,useDeferredValue:Za,useEffect:F,useId:Gr,useImperativeHandle:Ua,useInsertionEffect:Xa,useLayoutEffect:Wt,useMemo:bt,useReducer:Zr,useRef:B,useState:H,useSyncExternalStore:ee,useTransition:Ga}}};function Fu(t){return Se.bind(null,t)}function wo(t){return!!t&&t.$$typeof===tc}function Du(t){return wo(t)&&t.type===kt}function zu(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Hu(t){return wo(t)?mu.apply(null,arguments):t}function Wu(t){return!!t.__k&&(Tn(null,t),true)}function Uu(t){return t&&(t.base||t.nodeType===1&&t)||null}var ju=function(t,e){return t(e)},Vu=function(t,e){return t(e)},qu=kt,Ku=wo,ue={useState:H,useId:Gr,useReducer:Zr,useEffect:F,useLayoutEffect:Wt,useInsertionEffect:Xa,useTransition:Ga,useDeferredValue:Za,useSyncExternalStore:ee,startTransition:Ka,useRef:B,useImperativeHandle:Ua,useMemo:bt,useCallback:lt,useContext:Ut,useDebugValue:ja,version:"18.3.1",Children:wu,render:Pu,hydrate:Au,unmountComponentAtNode:Wu,createPortal:Cu,createElement:Se,createContext:he,createFactory:Fu,cloneElement:Hu,createRef:uu,Fragment:kt,isValidElement:wo,isElement:Ku,isFragment:Du,isMemo:zu,findDOMNode:Uu,Component:le,PureComponent:kr,memo:bu,forwardRef:ie,flushSync:Vu,unstable_batchedUpdates:ju,StrictMode:qu,Suspense:xt,SuspenseList:Sn,lazy:gt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$u};function Jr(t){const e=ee(Gu,Xu);return!!t||e}const Qr=t=>t?{"data-high-contrast":""}:{},Zu="(prefers-contrast: more)",ec=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Zu):null;function Gu(t){var n;const e=ec();return(n=e==null?void 0:e.addEventListener)==null||n.call(e,"change",t),()=>{var o;return(o=e==null?void 0:e.removeEventListener)==null?void 0:o.call(e,"change",t)}}const Xu=()=>{var t;return!!((t=ec())!=null&&t.matches)},Nn=he(void 0),Tt=(...t)=>t.filter(Boolean).join(" "),xo=he(null);function Re(){return Ut(xo)}function ae(t="This part"){const e=Ut(xo);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function it(t,e=Object.is,n){const{clover:o}=ae(n),r=B(null),s=()=>{const i=t(o.store.get());return r.current&&e(r.current.value,i)?r.current.value:(r.current={value:i},i)};return ee(o.store.subscribe,s)}const Yu={subscribe:()=>()=>{}};function Rn(t,e){const n=Ut(xo),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return ee(o?o.subscribe:Yu.subscribe,r)}const Ju=JSON.parse('{"commonClose":"Close","commonNext":"Next","commonPrevious":"Previous","commonSearch":"Search","commonViewAll":"View all","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Loading...","contentSearchPlaceholder":"Search","contentSearchResultsNone":"No results","contentSearchResult":"1 result","contentSearchResults":"{{count}} results","contentSearchError":"The search could not be completed.","contentSearchPosition":"Result {{index}} of {{total}}","contentSearchClear":"Clear search","canvasPosition":"Item {{index}} of {{total}}","canvasImage":"Image","bodyUnloadableImage":"This image could not be loaded.","bodyUnloadableVideo":"This video could not be loaded.","bodyUnloadableAudio":"This audio could not be loaded.","bodyUnloadableModel":"This model could not be loaded.","canvasRoleDescription":"zoomable image","canvasKeysImage":"Use the arrow keys to pan, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate.","canvasKeysMedia":"Press Space or K to play or pause, J or L to skip ten seconds back or forward, and M to mute or unmute.","canvasKeysAnnotations":"Press Escape to clear the selected annotation.","sceneModel":"3D model","sceneRoleDescription":"rotatable 3D model","sceneKeys":"Use the arrow keys to rotate the model, with Shift for larger steps, plus and minus to zoom, 0 to reset the view, and R or Shift+R to rotate it right or left.","sceneRotateUp":"Rotate up","sceneRotateDown":"Rotate down","sceneRotate":"Rotate","sceneResetView":"Reset view","statusLoading":"Loading\u2026","statusError":"This could not be loaded.","itemsLabel":"Items","download":"Download","downloadPage":"This page","downloadAll":"All pages","templateSidebar":"Items","templateSidebarToggle":"Show items","templateBack":"Back","templateBackTo":"Back to {{label}}","collectionLabel":"Collection","itemsScrollBack":"Show previous items","itemsScrollForward":"Show more items","aboutRights":"Rights","aboutDate":"Date","aboutHomepage":"Homepage","aboutSeeAlso":"See also","aboutProvider":"Provider","logo":"Logo","aboutManifest":"IIIF Manifest","aboutCanvas":"IIIF Canvas","aboutPartOf":"Part of","aboutOpenManifest":"Open the full Manifest","aboutCollection":"IIIF Collection","readingLanguage":"Language","annotationsHide":"Hide annotations","annotationsHideTip":"Hide","readMore":"Read more","readLess":"Read less","annotationsShow":"Find on the image","annotationsShowTime":"Find in the recording","annotationsImage":"Image","annotationsLanguage":"Language","annotationsOpenLink":"Open","transcriptLabel":"Transcript","imageViewerOpen":"Open image viewer","imageViewerClose":"Close image viewer","canvasChoice":"Choice","canvasViewerControls":"Viewer controls","canvasExpandControls":"Expand viewer controls","canvasCollapseControls":"Collapse viewer controls","canvasScrollBack":"Show previous controls","canvasScrollForward":"Show more controls","imageFullScreen":"Full screen","imageExitFullScreen":"Exit full screen","imageResetZoom":"Reset zoom","imageRotateLeft":"Rotate left","imageRotateRight":"Rotate right","imageZoomIn":"Zoom in","imageZoomOut":"Zoom out","informationPanelTabs":"Information panel","sectionsScrollBack":"Show previous tabs","sectionsScrollForward":"Show more tabs","informationPanelClose":"Close information panel","informationPanelTabsAbout":"About","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Search","informationPanelTabsContents":"Contents","contentsSectionsIn":"Sections in","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapAttribution":"Map credits","mapPlaceUntitled":"Place {{number}}","mapOverlay":"Georeferenced image","mapPlacesListed":"Places listed after the map: {{count}}","informationPanelToggle":"More information","playerPlay":"Play","playerPause":"Pause","playerMute":"Mute","playerUnmute":"Unmute","playerVolume":"Volume","playerSeek":"Seek","playerCaptions":"Captions","playerCaptionsOff":"Off","playerChapters":"Chapters","playerFill":"Fill frame","playerFit":"Fit to frame","frameRepeat":"Repeat","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),nc={es:()=>import("../es-Bn4XnLxy.mjs"),fi:()=>import("../fi-CjAXeLqH.mjs"),fr:()=>import("../fr-CeFhkxoi.mjs"),it:()=>import("../it-DxtfVek2.mjs"),ja:()=>import("../ja-rsicBgWR.mjs"),nb:()=>import("../nb-BkyI1fhp.mjs"),nn:()=>import("../nn-n_xM6AGl.mjs"),no:()=>import("../no-BkyI1fhp.mjs"),pt:()=>import("../pt-COchUT7D.mjs"),"zh-Hans":()=>import("../zh-Hans-Bfn3LUnq.mjs"),"zh-Hant":()=>import("../zh-Hant-DzmK541A.mjs")};function ts(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function oc(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let rc=()=>[];function Qu(t){rc=t}function td(){const[t,...e]=rc();return[...new Set([t,...ts(),...e,oc()].filter(n=>!!n))]}const uo=t=>t.split("-")[0];function es(t,e){return uo(t).toLowerCase()===uo(e).toLowerCase()}function Cr(t){try{const{language:e,script:n}=new Intl.Locale(t).maximize();return n&&`${e}-${n}`}catch{return}}function ed(t,e){const n=Cr(t);if(n)return e.find(o=>o!=="none"&&o!=="@none"&&Cr(o)===n)}const Qo=t=>t.includes("-")?uo(t):null;function nd(t,e,n=[]){if(!e.length)return;if(e.length===1)return e[0];const o=()=>e.includes("none")?"none":e.includes("@none")?"@none":e[0];if(!t)return e.includes("none")?"none":e[0];if(e.includes(t))return t;const r=Qo(t);if(r&&e.includes(r))return r;const s=ed(t,e);if(s)return s;const i=n.find(c=>e.includes(c));if(i)return i;const a=e.findIndex(c=>Qo(c)===t);if(a!==-1)return e[a];for(const c of n){const l=Qo(c);if(l&&e.includes(l))return l}return o()}function ns(t,e){const[n,...o]=e?[e]:td();return nd(n,t,o)??t[0]}function sc(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=ns(t,e);return o==="none"?t[0]:o}const be="clover",Qt={en:{[be]:{...Ju}}};let kn=[],Jt,fo=[],ic=[],os=0;const Er=new Set;function rs(){os++,Er.forEach(t=>t())}function ac(t){return[t,Cr(t),uo(t)].filter(e=>!!e)}const od=t=>t==="en"||cc(t)||!!Qt[t],Ne=t=>ac(t).find(od),wi=new Map,cc=t=>Object.prototype.hasOwnProperty.call(nc,t);function rd(t){let e=wi.get(t);return e||(e=nc[t]().then(({default:n})=>{var o;Qt[t]={...Qt[t],[be]:{...n,...(o=Qt[t])==null?void 0:o[be]}},rs()},()=>{}),wi.set(t,e)),e}function Mr(t){const e=t.find(n=>n==="en"||cc(n));return e&&e!=="en"?rd(e):Promise.resolve()}let oo=[],xi="",In="en";function So(){const t=oc();return[...new Set([...kn,...t?[t]:[]])]}function Ae(){const t=`${os} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===xi)return oo;xi=t;const e=So();return In=ts().map(Ne).find(Boolean)??e.map(Ne).find(Boolean)??"en",oo=[...new Set([Jt??In,...ic,...e].filter(o=>!!o).flatMap(ac).concat("en"))],Mr(oo),oo}function sd(){return Ae(),[...new Set([In,...So().map(Ne),...fo.map(Ne)].filter(t=>!!t))]}Qu(()=>(Ae(),[Jt,In,...So()]));function ko(t,e){if(t)return es(t,e||Mt.resolvedLanguage)?void 0:t}const Mt={get language(){return Jt??Ae().find(t=>Qt[t])??"en"},get chosenLanguage(){return Jt},stringsFor(t){return Ne(t)},interfaceLanguages(){return{languages:sd(),chosen:Jt&&Ne(Jt)||In}},chooseInterfaceLanguage(t){return Jt=t||void 0,fo=Jt?[...new Set([...fo,Jt])]:[],rs(),Mr(Ae())},get resolvedLanguage(){return Ae().find(t=>{var e;return Object.keys(((e=Qt[t])==null?void 0:e[be])??{}).length>0})??"en"},changeLanguage(t){return Mt.chooseInterfaceLanguage(t)},resolve(t,e,n=be){var r,s;let o={text:t};for(const i of Ae()){const a=(s=(r=Qt[i])==null?void 0:r[n])==null?void 0:s[t];if(a!==void 0){o={text:a,lang:i};break}}return e?{...o,text:o.text.replace(/\{\{(\w+)\}\}/g,(i,a)=>a in e?String(e[a]):i)}:o},t(t,e,n=be){return Mt.resolve(t,e,n).text},langOf(t,e,n=be){return ko(Mt.resolve(t,void 0,n).lang,e)},ready(){return Mr(Ae())},subscribe(t){return Er.add(t),()=>{Er.delete(t)}},getSnapshot(){return os}};typeof document<"u"&&Ae();function id(t={}){for(const[n,o]of Object.entries(t.resources??{}))for(const[r,s]of Object.entries(o??{}))Qt[n]??(Qt[n]={}),Qt[n][r]={...Qt[n][r],...s};t.fallbackLng!==void 0&&(ic=t.fallbackLng===false?[]:[t.fallbackLng].flat());const e=kn.join();if(t.languages!==void 0?kn=[t.languages].flat().filter(Boolean):t.lng&&(kn=[t.lng]),kn.join()!==e){fo=[];const n=[...ts(),...So()].map(Ne);Jt&&!n.includes(Ne(Jt))&&(Jt=void 0)}return rs(),Mt}const ad=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:be,cloverI18n:Mt,initCloverI18n:id,langWithin:ko},Symbol.toStringTag,{value:"Module"}));function Ct(t=be,e){const n=ee(Mt.subscribe,Mt.getSnapshot,Mt.getSnapshot),o=Ut(Nn),r=e??o,s=lt((a,c)=>Mt.t(a,c,t),[t,n]),i=lt(a=>Mt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Mt}}function Co(t,e){const n=Ut(Nn),o=B(null),[r,s]=H(""),i=lt(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);F(()=>{var u,p;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((p=d.closest("[lang]"))==null?void 0:p.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Ct(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const W=t=>Array.isArray(t)?t:t==null?[]:[t],cd=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function ss(t){return cd.includes(t)?t:"left-to-right"}const ld=["individuals","paged","continuous","unordered"];function ud(t){return W(t).find(n=>ld.includes(n))??"individuals"}function dd(t,e){if(!t.length)return[];if(e==="continuous")return[t.map((a,c)=>c)];if(e!=="paged")return t.map((a,c)=>[c]);const n=[];let o=[],r=0,s=false;const i=()=>{o.length&&n.push(o),o=[]};return t.forEach((a,c)=>{const l=W(a.behavior);if(l.includes("non-paged")){c===r&&r++,i(),n.push([c]);return}if(c===r||l.includes("facing-pages")){o.length&&(s=true),i(),n.push([c]);return}if(o.push(c),s){i(),s=false;return}o.length>1&&i()}),i(),n}function fd(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const lc=["Independents","Composite","List"];function Eo(t){return W(t==null?void 0:t.body).flatMap(e=>lc.includes(e==null?void 0:e.type)?W(e.items):[e])}function is(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function uc(t,e){const n=/(?:^|[#&])t=([^&]+)/.exec(e),o=n&&{t:n[1]},r=/(?:^|[#&])xywh=(?:pixel:)?([^&]+)/.exec(e);if(r){const[s,i,a,c]=r[1].split(",").map(Number);if([s,i,a,c].every(Number.isFinite))return{id:t,rect:{x:s,y:i,w:a,h:c},...o}}return o&&{id:t,...o}}function ro(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return uc(o,t.slice(e))??{id:o}}const n=t.indexOf("&t=");return n>=0?{id:t.slice(0,n),t:t.slice(n+3)}:{id:t}}const Tr=t=>{var e;return Array.isArray(t)?Tr(t[0]):lc.includes(t==null?void 0:t.type)?Tr((e=t.items)==null?void 0:e[0]):t};function fn(t){return hd(Tr(t))}function hd(t){var n;if(typeof t=="string")return ro(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return ro(t.id??"");const e=typeof t.source=="string"?ro(t.source):ro(((n=t.source)==null?void 0:n.id)??"");for(const o of W(t.selector)){const r=o;if((r==null?void 0:r.type)==="PointSelector"){const[s,i,a]=[r.x,r.y,r.instant??r.t].map(Number),c=Number.isFinite(s)&&Number.isFinite(i);return{id:e.id,...c?{point:{x:s,y:i}}:{},...Number.isFinite(a)?{t:String(a)}:{}}}if((r==null?void 0:r.type)==="SvgSelector"&&r.value)return{id:e.id,svg:String(r.value)};if((r==null?void 0:r.type)==="FragmentSelector"&&r.value){const s=uc(e.id,String(r.value));if(s)return s}}return e}const Bn=t=>t==="Audio"||t==="Sound",pd=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},md=(t,e)=>pd(t)&&!!(e.rect||e.svg||e.point)&&!e.t,Si=new WeakMap,gd={canvases:[],views:[],direction:"left-to-right"};function Bt(t){if(!t)return gd;let e=Si.get(t);if(!e){const n=(t.items??[]).filter(o=>(o==null?void 0:o.type)==="Canvas"||(o==null?void 0:o.type)==="Timeline"||(o==null?void 0:o.type)==="Scene");e={canvases:n,views:dd(n,ud(t.behavior)),direction:ss(t.viewingDirection)},Si.set(t,e)}return e}const ki=new WeakMap;function qe(t,e){if(!e)return null;const n=Bt(t);let o=ki.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);ki.set(n,o)}return o.get(e)??null}function $n(t,e){const{canvases:n,views:o}=Bt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:fd(o,r)}const Ci=new WeakMap,vd=[];function Ue(t,e){if(!t)return vd;const n=$n(t,e);let o=Ci.get(t);o||Ci.set(t,o=new Map);let r=o.get(n);if(!r){const s=Bt(t);r=(s.views[n]??[]).map(i=>s.canvases[i]),o.set(n,r)}return r}function yd(t,e){var s,i;const{canvases:n,views:o}=Bt(t),r=(s=o[e])==null?void 0:s[0];return r===void 0?null:((i=n[r])==null?void 0:i.id)??null}function bd(t){const e=t==null?void 0:t.start;if(!e)return null;const n=fn(e);if(!n.id)return null;const o={canvasId:n.id};n.rect&&(o.region=n.rect);const r=n.t?Number(n.t.split(",")[0]):NaN;return Number.isFinite(r)&&(o.time=r),o}const De=(t,e)=>{const n=t==null?void 0:t.behavior;return Array.isArray(n)?n.includes(e):n===e},_d=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function wd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length)||!n)return-1;const s=Ue(n,o),i=a=>{const c=r[a];return((c==null?void 0:c.manifestId)===n.id||(c==null?void 0:c.manifestAs)===n.id)&&(!c.canvasId||s.some(l=>l.id===c.canvasId))};return e!==null&&i(e)?e:r.findIndex((a,c)=>i(c))}function _t(t,e,n=", "){if(!t)return{text:""};if(typeof t=="string")return{text:t};const o=Object.keys(t).filter(a=>{var c;return(c=t[a])==null?void 0:c.length});if(!o.length)return{text:""};const r=ns(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const xd=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Ln(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&xd.test(o));return n.length===1?n[0]:void 0}const je={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},Sd=/^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi|ota|prs|azb|pnb|bal|glk|mzn|lrc|khw|nqo|rhg|jrb|jpr|sam|arz|ary|apc|acm|ajp|aeb|ars)$/,kd=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function Cd(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?kd.test(o):Sd.test(e))?"rtl":void 0}function ut(t){return t?{lang:t,dir:Cd(t)}:{}}function Ed({clover:t,language:e}){const{t:n,langOf:o}=Ct(),[r,s]=H(null),i=B(n);return i.current=n,F(()=>{let a=null;return t.store.subscribe(()=>{const{manifest:c,canvasId:l,status:d}=t.store.get();if(d!=="ready"||l===a)return;const u=a===null;if(a=l,u)return;const p=qe(c,l),h=_t(p==null?void 0:p.label,e),m=i.current("canvasPosition",{index:$n(c,l)+1,total:Bt(c).views.length});s({label:h.text,lang:h.lang,position:m})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:je,children:[r!=null&&r.label?f(kt,{children:[f("span",{...ut(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...ut(o("canvasPosition")),children:r.position})]})}const Md=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function Td(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||Md(r))return;if(r.type==="SpecificResource"){r.source&&typeof r.source=="object"&&o(r.source,s);return}const i=s===void 0?{}:{choice:s};if(r.type==="TextualBody"||typeof r.value=="string")e.push({value:String(r.value??""),format:r.format,language:W(r.language)[0],...i});else if(r.type==="Image"&&r.id){const c=r.label??t.label;e.push({image:r.id,format:r.format,...c?{label:c}:{},...i})}else if(r.type==="Feature"){const c=((a=r.properties)==null?void 0:a.label)??t.label;c&&typeof c=="object"&&e.push({label:c,place:true,...i})}};for(const r of Eo(t))if((r==null?void 0:r.type)!=="Choice")o(r);else{const s=n++;for(const i of W(r.items))o(i,s)}return e}const as="content-search",Id="contents",fy=(t,e)=>`${t}#region-${e+1}`,Ld=t=>W(t==null?void 0:t.motivation).includes("linking");function dc(t,e,n){const o=[];for(const r of W(t==null?void 0:t.items)){const s=W(r==null?void 0:r.motivation);if(s.includes("painting"))continue;const i=Td(r);if(!i.length&&!Ld(r))continue;const a=fn(W(r.target)[0]),c=a.id||n;!c||!r.id||o.push({id:r.id,setId:e,canvasId:c,target:a,motivation:s,bodies:i,annotation:r})}return o}const Pd=t=>Bt(t).canvases.some(e=>W(e.items).some(n=>W(n==null?void 0:n.items).some(o=>W(o==null?void 0:o.body).some(r=>[r,...W(r==null?void 0:r.items)].some(s=>W(s==null?void 0:s.annotations).length>0)))));function Ad(t,e){for(const n of[t,e])if(n!=null&&n.label)return n.label;for(const n of[t,e]){const o=W(n==null?void 0:n.partOf).find(r=>/AnnotationCollection/.test(String((r==null?void 0:r.type)??(r==null?void 0:r["@type"])))&&r.label);if(o)return o.label}}const fc=t=>W(t==null?void 0:t.partOf).filter(e=>(e==null?void 0:e.id)&&/AnnotationCollection/.test(String((e==null?void 0:e.type)??(e==null?void 0:e["@type"])))),Ei=new WeakMap;function hc(t){var n;if(!t)return[];let e=Ei.get(t);if(!e){const o=new Map;for(const r of Bt(t).canvases)for(const s of W(r.annotations)){if(!Array.isArray(s==null?void 0:s.items))continue;const i=s.id??`${r.id}#annotations`;let a=o.get(i);if(!a){const c=(n=fc(s)[0])==null?void 0:n.id;a={id:i,label:Ad(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...dc(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Ei.set(t,e)}return e}const Mi=new WeakMap,pc=[];function hy(t){if(!t)return pc;let e=Mi.get(t);return e||(e=Bt(t).canvases.flatMap(n=>W(n.annotations).filter(o=>o==null?void 0:o.id).map(o=>({id:String(o.id),canvasId:String(n.id),fetched:Array.isArray(o.items)}))),Mi.set(t,e)),e}const tr=new WeakMap,er=new WeakMap;function mc(t,e=Od){var n;if(!er.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;er.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:pc,entries:o.flatMap(s=>s.entries)}:null)}return er.get(e)??Nd(t)}const Od=[];function Nd(t){var r;if(!t)return null;if(tr.has(t))return tr.get(t);const e=Bt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>fc(i).map(a=>({part:a,page:i,canvas:s})))),n=(r=e[0])==null?void 0:r.part.id,o=n?(()=>{var l,d;const s=e.filter(({part:u})=>u.id===n),i=(l=s.find(({part:u})=>u.label))==null?void 0:l.part.label,a=Number((d=s.find(({part:u})=>u.total))==null?void 0:d.part.total),c=hc(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:p})=>({id:String(u.id),canvasId:String(p.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var p;return((p=c.find(h=>h.id===u.id))==null?void 0:p.entries)??[]})}})():null;return tr.set(t,o),o}const Ti=new WeakMap,Ii=[];function cs(t,e){const n=hc(t);if(!e.length)return n.length?n:Ii;const o=t??Ii;let r=Ti.get(o);r||Ti.set(o,r=new Map);let s=r.get(e);if(!s){const i=new Set(n.map(a=>a.id));s=[...n,...e.filter(a=>!i.has(a.id)&&!!i.add(a.id))],r.set(e,s)}return s}const Li=new WeakMap;function gc(t,e,n,o=null){const r=cs(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Li.get(r);i||Li.set(r,i=new Map);let a=i.get(o);a||i.set(o,a=new Map);let c=a.get(s);return c||(c=[...r,...o?[o]:[],...s?[s]:[]],a.set(s,c)),c}const Rd=t=>Number(t==null?void 0:t.duration)>0;function vc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>md(n.motivation,n.target)&&!Rd(e(n.canvasId)))}const Pi=new WeakMap;function Bd(t,e){const n=cs(t,e);let o=Pi.get(n);if(!o){const r=n.filter(s=>!vc(s,i=>qe(t,i)??void 0));o=r.length===n.length?n:r,Pi.set(n,o)}return o}const Ai=new WeakMap;function ls(t,e,n,o){const r=cs(t,e),s=Ai.get(r);if(s&&s.hidden===n&&s.shown===o)return s.ids;const i=r.filter(c=>!n.includes(c.id)&&!o.includes(c.id)&&vc(c,l=>qe(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Ai.set(r,{hidden:n,shown:o,ids:a}),a}const Oi=new WeakMap,Ni=[as,Id];function $d(t,e,n,o,r){if(!r)return Ni;const s=ls(t,e,n,o),i=Oi.get(s);if(i&&i.hidden===n)return i.ids;const a=[...Ni,...s.filter(c=>!n.includes(c))];return Oi.set(s,{hidden:n,ids:a}),a}function Fd(t){for(const e of W(t==null?void 0:t.target)){const n=(e==null?void 0:e.type)==="SpecificResource"?e.source:e,o=W(n==null?void 0:n.partOf).find(r=>(r==null?void 0:r.id)&&(!r.type||r.type==="Manifest"));if(o)return o.id}}function nr(t,e){if(!e)return null;for(const n of t){const o=n.entries.find(r=>r.id===e);if(o)return o}return null}function yc(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function bc({manifestId:t,canvasId:e,type:n="Canvas",region:o,time:r}){const s={id:e,type:n,...t&&t!==e?{partOf:[{id:t,type:"Manifest"}]}:{}},i=r!=null&&r>0?`t=${Math.round(r*100)/100}`:o?`xywh=${[o.x,o.y,o.w,o.h].map(Math.round).join(",")}`:null,a={"@context":`http://iiif.io/api/presentation/${n==="Canvas"?3:4}/context.json`,id:`${e}#content-state`,type:"Annotation",motivation:["contentState"],target:i?{type:"SpecificResource",source:s,selector:{type:"FragmentSelector",value:i}}:s};return{json:a,encoded:yc(a)}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:bc,encodeContentState:yc},Symbol.toStringTag,{value:"Module"})),zd=/iiif\.io\/api\/presentation\/4\/context\.json/;function _c(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&zd.test(o))}let Ri=null,Bi=null;function us(){return Bi??(Bi=import("../upgrade-eNW0DPXq.mjs")),Ri??(Ri=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([Ri,Bi])}async function Ve(t){if(_c(t))return t;const[e,{upgrade:n}]=await us();return await n(t,e)}function ds(t,e,n={}){return((t==null?void 0:t.fetch)??globalThis.fetch)(e,{credentials:(t==null?void 0:t.credentials)??"same-origin",...n,headers:{...n.headers,...t==null?void 0:t.headers}})}const Hd=t=>(t==null?void 0:t.credentials)==="include",Wd=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class Ud extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function ln(t,e,n){const o=await ds(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw new Ud(`${e} answered ${o.status}`,e,o.status);return o.json()}const jd=()=>import("./content-state-reader-CRGjvYpM.mjs");function Vd(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"||e["@type"]==="oa:Annotation"||e.type==="SpecificResource"}const wc=t=>!!t&&typeof t=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(e=>t[e])));async function qd(t,e,n){try{return await ln(t,e,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(e))throw o;try{const r=await ln(t,`${e.replace(/\/+$/,"")}/info.json`,n);if(wc(r))return r}catch{}throw o}}const Kd=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function Zd(t){const e={"@context":Xd,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of Kd)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const $i=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},xc=t=>{var e,n;return!!t&&((e=t.items)==null?void 0:e.length)===1&&((n=t.items[0])==null?void 0:n.id)===`${t.id}/canvas`},Gd=/^(oa:)?Annotation(Page|Collection)$/;class or extends Error{constructor(){super(...arguments);L(this,"name","CloverContentError")}}const Xd="http://iiif.io/api/presentation/4/context.json",Yd=t=>/^https?:\/\//i.test(t);async function Ir(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await ln(e,t.id,n)}const Jd=50;async function fs(t,e){const n=t;if(Array.isArray(n.items)&&n.items.length||!n.first)return t;const o=[],r=new Set;let s=n.first;for(let i=0;s&&i<Jd;i++){const a=typeof s=="string"?{id:s}:s;if(r.has(a.id??a))break;r.add(a.id??a);const c=a.items?a:await ln(e.request,a.id,e.signal),l=await Ve({"@context":c["@context"]??n["@context"],...c,type:"Collection"});o.push(...l.items??[]),s=c.next}return{...n,items:o}}async function Sc(t,e={}){return Ve(await Ir(t,e))}async function kc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Ve(await Ir(o,e));if(o.type==="Collection"&&n<8){const r=await fs(await Ve(await Ir(o,e)),e),s=await kc(r,e,n+1);if(s)return s}}return null}async function Qd(t,{request:e,signal:n}={}){us();const o=typeof t=="string"?await ln(e,t.trim(),n):t,r=await Ve(o);return r.type==="Collection"?fs(r,{request:e,signal:n}):r}async function Cc(t,e={}){var i;const{request:n,signal:o}=e;us();let r=t;if(typeof t=="string"&&(r=Yd(t.trim())?await qd(n,t.trim(),o):(await jd()).decodeContentState(t),!r))throw new or("Unreadable iiifContent");if(Vd(r)&&(e.follows??0)<2){const{follow:a}=await import("./follow-content-2RmNmRMy.mjs");return a(r,e,Cc)}if(Gd.test(String((r==null?void 0:r.type)??""))){const{annotationsContent:a}=await import("./annotations-content-BG992gjT.mjs");return a(r,e)}if(wc(r)){const{imageServiceContent:a}=await import("./image-service-content-DNYciFvo.mjs");return a(r,typeof t=="string"?t.trim():void 0)}const s=await Ve(r);switch((i=o==null?void 0:o.throwIfAborted)==null||i.call(o),s.type){case"Manifest":return{manifest:s};case"Collection":{const a=await fs(s,e),c=e.manifestId,l=c?(a.items??[]).find(u=>u.id===c&&u.type==="Manifest"):void 0,d=l?await Sc(l,e):await kc(a,e);if(!d)throw new or("The Collection holds no Manifest");return{manifest:d,collection:a}}case"Canvas":case"Timeline":case"Scene":return{manifest:Zd(s),target:{canvasId:s.id}};default:throw new or(`Cannot show a ${String(s.type??"resource without a type")}`)}}const Ec=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function Fi(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])Ec(r)&&e.push([n.id,o,r.id]);return e}async function tf(t,e,n,o){return ef(await ln(n,t,o),e)}async function ef(t,e="urn:clover:annotation-page"){var r;const n=t;return _c(n)?n:((r=(await Ve({"@context":n["@context"]??"http://iiif.io/api/presentation/3/context.json",id:e,type:"Canvas",items:[{...n,"@context":void 0}]})).items)==null?void 0:r[0])??n}function nf(t,e){const n=t,o=e,r=c=>Array.isArray(c)?c:c?[c]:[],s=r(n.partOf),i=r(o.partOf),a=[...s.map(c=>({...i.find(l=>l.id&&l.id===c.id),...c})),...i.filter(c=>!s.some(l=>l.id===c.id))];return{...t,...n.label===void 0&&o.label!==void 0&&{label:o.label},...a.length&&{partOf:a}}}function of(t,e,n,o){let r=false;const s=(t.items??[]).map(i=>{if(i.id!==e||!Array.isArray(i[n]))return i;const a=i[n].map(c=>c.id!==o.id||!Ec(c)?c:(r=true,nf(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}const Di=/\/search\/([0-2])\//;function hs(t){if(!t)return null;let e=null;for(const n of W(t.service)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string")continue;const r=String(n.type??n["@type"]??""),s=[n.profile,n["@context"]].flat().map(a=>String(a??"")).join(" "),i=r==="SearchService2"?2:r==="SearchService1"?1:Di.test(s)?Number(Di.exec(s)[1])>=2?2:1:null;if(i===2)return{id:o,version:i};i===1&&(e??(e={id:o,version:i}))}return e}function rf(t){let e=t;const n=new Set;return{get:()=>e,set(o){const r=typeof o=="function"?o(e):o;Object.keys(r).some(i=>!Object.is(r[i],e[i]))&&(e={...e,...r},n.forEach(i=>i()))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function tn(t){let e=t;const n=new Set;return{get:()=>e,emit(o){e=o,n.forEach(r=>r(o))},subscribe(o){return n.add(o),()=>n.delete(o)}}}function sf(t,e,n){return{position:e,total:n,hasPrevious:e>0,hasNext:e+1<n,previous:()=>t.previous(),next:()=>t.next(),first:()=>t.first(),last:()=>t.last(),goTo:o=>t.goTo(o)}}const Lr={query:"",status:"idle",hits:[],set:null},zi={status:"idle",error:null,manifest:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:Lr,regions:null,targets:null,targetIndex:null};function af(t={}){const e=rf(zi),n=tn(null),o=tn(null),r=tn(null),s=tn(null),i=tn(null),a=tn(null);let c=null,l=null,d=[],u=[],p=[],h=0,m=null,g=null,b=null;const v=(_,I)=>{!g||_===I||(g={...g,items:g.items.map(P=>P.manifestId===_&&P.manifestAs!==I?{...P,manifestAs:I}:P)})},S=_=>{var P;const I=(P=e.get().manifest)==null?void 0:P.id;return!!I&&(I===_.manifestId||I===_.manifestAs)},k=()=>d.length||u.length||p.length?[...d,...u,...p]:zi.addedSets;let y=t.request,w=null;const x=new Set;let $="view",O=0;const Y=(_,I,P)=>{if(x.has(P))return;x.add(P);const R=w==null?void 0:w.signal;tf(P,_,y,R).then(z=>{R!=null&&R.aborted||e.set(V=>V.manifest?{manifest:of(V.manifest,_,I,z)}:{})}).catch(()=>x.delete(P))},K=()=>{const{manifest:_,canvasId:I}=e.get();if(_)for(const[P,R,z]of Fi($==="all"||O>0?Bt(_).canvases:Ue(_,I)))Y(P,R,z)};e.subscribe(K);const U=(_,I,P,R,z)=>{var Gt,zt,pt;const{canvases:V}=Bt(_),C=Rt=>!!Rt&&V.some(Ft=>Ft.id===Rt),D=bd(_),q=C(P==null?void 0:P.canvasId)?P:C(D==null?void 0:D.canvasId)?D:null,G=C(R.canvasId)?R.canvasId:(q==null?void 0:q.canvasId)??(C(R.defaultCanvasId)?R.defaultCanvasId:null)??((Gt=V[0])==null?void 0:Gt.id)??null;l==null||l.abort();const ht=z&&((zt=nr(p,z))==null?void 0:zt.canvasId)===G?z:null,dt=q&&ht?{...q,region:void 0}:q,Nt=++h;d=[],e.set({status:"ready",search:Lr,regions:null,manifest:_,collection:I,canvasId:G,target:dt&&dt.canvasId===G?dt:null,addedSets:k(),annotationId:ht,targets:g});const Pt=_==null?void 0:_.structures;Array.isArray(Pt)&&JSON.stringify(Pt).includes("xywh=")&&import("./range-regions-DwMexshz.mjs").then(({contentsSet:Rt})=>{h===Nt&&e.set({regions:Rt(_)})}),Pd(_)&&import("./image-layers-CmimeZYQ.mjs").then(({imageLayers:Rt})=>{h===Nt&&(d=Rt(_),e.set({addedSets:k()}))}),G&&G!==R.canvasId&&((pt=t.onCanvasChange)==null||pt.call(t,G))},tt=(_,I)=>e.set(P=>{const R=P.hiddenSets.filter(V=>V!==_),z=P.shownSets.filter(V=>V!==_);return I?{hiddenSets:R,shownSets:[...z,_]}:{hiddenSets:[...R,_],shownSets:z}}),Z=(_,I)=>{var R,z,V;if(!_)return;if((R=t.isControlled)!=null&&R.call(t)){I&&e.set({target:I}),(z=t.onCanvasChange)==null||z.call(t,_);return}const P=e.get().canvasId!==_;e.set({canvasId:_,target:I}),P&&((V=t.onCanvasChange)==null||V.call(t,_))},ot=(_,I=false)=>{const{manifest:P}=e.get(),R=yd(P,_);Z(R,R&&I?{canvasId:R,autoplay:I}:null)},M=()=>{const{manifest:_,canvasId:I}=e.get();return{at:$n(_,I),total:Bt(_).views.length}},T=()=>{w==null||w.abort();const _=new AbortController;return w=_,x.clear(),e.set({status:"loading",error:null,annotationId:null}),_.signal},N=_=>e.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function j(_,I={}){var R;const P=T();try{const z=await Cc(_,{request:y,signal:P,manifestId:I.manifestId??void 0});if(P.aborted)return;const V=z.annotation,C=V?dc({items:[V]},`${V.id}#content-state`):[];p=C.length?[{id:`${V.id}#content-state`,source:"added",entries:C}]:z.annotationSets??[];const D=m??((R=C[0])==null?void 0:R.id)??z.pick;m=null,e.set({throughCollection:!!z.collection}),g=z.targets??null,g&&v(g.items[0].manifestId,z.manifest.id),e.set({targetIndex:g?0:null}),U(z.manifest,z.collection??null,z.target,I,D)}catch(z){P.aborted||N(z)}}const et=_=>{const{manifest:I,collection:P}=e.get();return(I==null?void 0:I.id)===_||(P==null?void 0:P.id)===_},ct=_=>{var I;return(((I=e.get().collection)==null?void 0:I.items)??[]).find(P=>P.id===_)??{id:_,type:"Manifest"}},rt=(_,I)=>{var P,R;if(m=I,(P=t.isManifestControlled)!=null&&P.call(t)){(R=t.onManifestChange)==null||R.call(t,_);return}vt({id:_,type:"Manifest"}).then(z=>{var V;return z&&((V=t.onManifestChange)==null?void 0:V.call(t,_))})},vt=async(_,I)=>{if(_.type==="Collection")return await j(_.id),e.get().status==="ready";const{collection:P}=e.get(),R=T(),z=m;m=null;const V=z?nr(p,z):null,C=typeof I=="string"?{canvasId:I}:I??b;b=null;try{const D=await Sc(_,{request:y,signal:R});return R.aborted?false:(v(_.id,D.id),U(D,P,V?{canvasId:V.canvasId}:C??void 0,{},z),true)}catch(D){return R.aborted||N(D),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return y},setRequest(_){y=_},load:j,async openCollection(_){var P;const I=e.get().manifest;if(!(!I||((P=e.get().collection)==null?void 0:P.id)===_))try{const R=await Qd(_,{request:y});if(R.type!=="Collection"||e.get().manifest!==I)return;e.set({collection:R})}catch{}},async goToManifest(_,I){var R,z,V;if(et(_))return;const P=ct(_);if(P.type!=="Collection"&&((R=t.isManifestControlled)!=null&&R.call(t))){(z=t.onManifestChange)==null||z.call(t,_);return}await vt(P,I)&&((V=t.onManifestChange)==null||V.call(t,e.get().manifest.id))},goToTarget(_){var R,z,V;const I=(R=e.get().targets)==null?void 0:R.items[_];if(!I)return;e.set({targetIndex:_});const P=I.canvasId?{canvasId:I.canvasId,...I.region&&{region:I.region},...I.time!==void 0&&{time:I.time}}:null;if(S(I)){P&&Z(P.canvasId,P);return}if((z=t.isManifestControlled)!=null&&z.call(t)){b=P,(V=t.onManifestChange)==null||V.call(t,I.manifestId);return}vt(ct(I.manifestId),P??void 0).then(C=>{var D;return C&&((D=t.onManifestChange)==null?void 0:D.call(t,I.manifestId))})},async syncManifest(_){!_||et(_)||e.get().status!=="ready"||await vt(ct(_))},goTo(_,I){Z(_,I?{...I,canvasId:_}:null)},next({autoplay:_=false,wrap:I=false}={}){const{at:P,total:R}=M();P+1<R?ot(P+1,_):I&&R>1&&ot(0,_)},previous(){const{at:_}=M();_>0&&ot(_-1)},first(){ot(0)},last(){ot(M().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(_){_&&e.set({canvasId:_})},selectAnnotation(_){const{manifest:I,addedSets:P,canvasId:R,search:z,regions:V}=e.get(),C=nr(gc(I,P,z.set,V),_);if(e.set({annotationId:C?_:null}),!C)return;a.emit(_);const{hiddenSets:D,shownSets:q}=e.get();C.setId!==as&&ls(I,P,D,q).includes(C.setId)&&tt(C.setId,true);const G=Ue(I,R).some(Nt=>Nt.id===C.canvasId),ht=qe(I,C.canvasId)!==null;!G&&ht&&Z(C.canvasId,null);const dt=ht?void 0:Fd(C.annotation);dt&&rt(dt,C.id)},async search(_){l==null||l.abort();const I=hs(e.get().manifest),P=_.trim();if(!P||!I){l=null,e.set({search:Lr,annotationId:null});return}const R=new AbortController;l=R,e.set(z=>({search:{...z.search,query:P,status:"loading"}}));try{const{searchInto:z}=await import("./search-CI1xScP1.mjs");await z(e,I,P,y,R.signal)}catch{e.set({search:{query:P,status:"error",hits:[],set:null}})}},setSetVisible(_,I){tt(_,I)},async loadAnnotations(_){if(c==null||c.abort(),!_){u=[],e.set({addedSets:k()});return}const I=new AbortController;c=I;try{const{loadAnnotationSets:P}=await import("./annotation-collection-B7DNaCRe.mjs"),R=await P(_,{request:y,signal:I.signal});if(I.signal.aborted)return;u=R,e.set({addedSets:k()})}catch{}},getContentState(){var G;const{manifest:_,canvasId:I}=e.get();if(!_||!I)return null;const P=n.get(),R=o.get(),z=R&&R.currentTime>0?R.currentTime:null,V=Ue(_,I),D=P&&V.some(ht=>ht.id===P.canvasId)&&!z?P:null,q=(D==null?void 0:D.canvasId)??I;return bc({manifestId:_.id,canvasId:q,type:(G=V.find(ht=>ht.id===q))==null?void 0:G.type,region:D==null?void 0:D.region,time:z})},setAnnotationPages(_){_!==$&&($=_,K())},fetchAnnotationPages(_){const{manifest:I}=e.get();if(!I||!_.length)return;const P=new Set(_);for(const[R,z,V]of Fi(Bt(I).canvases))P.has(V)&&Y(R,z,V)},holdAllAnnotationPages(){O++,K();let _=true;return()=>{_&&O--,_=false}},dispose(){w==null||w.abort(),c==null||c.abort(),l==null||l.abort()}}}const cf=100;function Mc(t,e){const n=B({read:t,onChange:e});n.current={read:t,onChange:e};const o=B(void 0),r=B("");return F(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),lt(()=>{!n.current.onChange||o.current!==void 0||(o.current=setTimeout(()=>{var i,a;o.current=void 0;const s=n.current.read();!s||s.encoded===r.current||(r.current=s.encoded,(a=(i=n.current).onChange)==null||a.call(i,s))},cf))},[])}function Pr(t,e){return t==null||t.addEventListener("pause",e),t==null||t.addEventListener("seeked",e),()=>{t==null||t.removeEventListener("pause",e),t==null||t.removeEventListener("seeked",e)}}function Tc(t,e){const n=Mc(()=>t.getContentState(),e),o=!!e;F(()=>{if(!o)return;let r=t.store.get().canvasId;const s=t.store.subscribe(()=>{const l=t.store.get().canvasId;l!==r&&(r=l,n())}),i=t.viewport.subscribe(n);let a=Pr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=Pr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function ps(t){const e=[];for(const n of W(t==null?void 0:t.items))for(const o of W(n==null?void 0:n.items))if(is(o))for(let r of Eo(o))(r==null?void 0:r.type)==="Choice"&&(r=W(r.items)[0]),(r==null?void 0:r.type)==="SpecificResource"&&(r=typeof r.source=="string"?{id:r.source}:r.source),r&&e.push({body:r,annotation:o});return e}function lf(t){return t.flatMap(e=>ps(e).map(({body:n})=>n))}function uf(t,e){if(!(t!=null&&t.length)||!e.canvases.length)return null;const n=e.canvases.map(r=>r.id),o=e.bodies.map(r=>r==null?void 0:r.format).filter(Boolean);return t.find(r=>{var s,i,a;return((s=r.canvasId)==null?void 0:s.some(c=>n.includes(c)))||((i=r.format)==null?void 0:i.some(c=>o.includes(c)))||!!((a=r.match)!=null&&a.call(r,e))})??null}function df(t,e){return t===e?true:!t||!e||t.length!==e.length?false:t.every((n,o)=>n.component===e[o].component&&n.match===e[o].match&&JSON.stringify([n.canvasId,n.format])===JSON.stringify([e[o].canvasId,e[o].format]))}function ff({iiifContent:t,canvasId:e,defaultCanvasId:n,onCanvasChange:o,onStatusChange:r,manifestId:s,defaultManifestId:i,onManifestChange:a,searchQuery:c,request:l,language:d,renderers:u,annotations:p,annotationPages:h="view",onContentStateChange:m,...g}){const b=e!==void 0,v=s!==void 0,S=B({controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a});S.current={controlled:b,manifestControlled:v,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[k]=H(()=>af({request:l,onCanvasChange:D=>{var q,G;return(G=(q=S.current).onCanvasChange)==null?void 0:G.call(q,D)},onManifestChange:D=>{var q,G;return(G=(q=S.current).onManifestChange)==null?void 0:G.call(q,D)},isControlled:()=>S.current.controlled,isManifestControlled:()=>S.current.manifestControlled}));k.setRequest(l);const y=B({});y.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const w=Wd(l),x=B(t);x.current=t;const $=mf(t);F(()=>(k.load(x.current,y.current),()=>k.dispose()),[k,$,w]),F(()=>{b&&k.syncCanvas(e??null)},[k,b,e]);const[O,Y]=H(k.store.get().status);F(()=>{let D=k.store.get().status;return k.store.subscribe(()=>{var ht,dt;const{status:q,error:G}=k.store.get();q!==D&&(D=q,Y(q),(dt=(ht=S.current).onStatusChange)==null||dt.call(ht,q,G))})},[k]);const K=B(p);K.current=p;const U=pf(p);F(()=>{k.loadAnnotations(K.current??null)},[k,U,w]),F(()=>{k.setAnnotationPages(h)},[k,h]),Tc(k,m),F(()=>{v&&O==="ready"&&k.syncManifest(s??null)},[k,v,s,O]);const tt=hf(k,D=>{var q;return D.status==="ready"?((q=D.manifest)==null?void 0:q.id)??null:null});F(()=>{c&&tt&&k.search(c)},[k,c,tt]);const Z=B(u);df(Z.current,u)||(Z.current=u);const ot=Z.current,[M,T]=H(),[N,j]=H(d);N!==d&&(j(d),T(void 0));const et=B(void 0),[ct,rt]=H($);ct!==$&&(rt($),T(void 0)),F(()=>()=>{const D=et.current;et.current=void 0,D&&Mt.chosenLanguage===D&&Mt.chooseInterfaceLanguage()},[$]);const vt=ee(Mt.subscribe,()=>Mt.chosenLanguage),_=M??d??vt,I=lt(D=>{T(D);const q=Mt.stringsFor(D);et.current=q,q&&Mt.chooseInterfaceLanguage(q)},[]),[P,R]=H(0),z=lt(()=>(R(D=>D+1),()=>R(D=>D-1)),[]),V=P>0;return[bt(()=>({clover:k,language:_,renderers:ot,chooseLanguage:I,toggleDrawn:V,drawsToggle:z}),[k,_,ot,I,V,z]),O,g]}function hf(t,e){return ee(t.store.subscribe,()=>e(t.store.get()))}function pf(t){const e=Array.isArray(t)?t:t?[t]:[];return JSON.stringify(e.map(n=>typeof n=="string"?n:(n==null?void 0:n.id)??"object"))}function mf(t){return typeof t=="string"?t:t.id??t["@id"]??t}const gf=ie(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=ff(s),d=Co(i,l.lang),u=Jr(r);return f(xo.Provider,{value:a,children:f(Nn.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:Tt("clover-root",n),"data-status":c,...Qr(u),...l,children:[o,f(Ed,{clover:a.clover,language:a.language})]})})})}),vf=()=>f("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"}),yf=()=>f(kt,{children:[f("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),f("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),f("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),bf=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),_f=()=>f("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"}),py=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),Ic=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),my=()=>f(kt,{children:[f("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"}),f("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"})]}),gy=()=>f(kt,{children:[f("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"}),f("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"})]}),te={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},wf=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function Ke({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:s,after:i}){const{t:a}=Ct(),c=B(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Sf(),F(()=>{const d=c.current;d&&Ar(d)&&ho(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...ut(e),...o&&{tabIndex:-1,onMouseDown:d=>{var u;d.preventDefault(),(u=d.currentTarget.parentElement)==null||u.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const d=c.current;d&&Ar(d)&&ho(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function so(t){const e=t.target instanceof Element&&ms(t.target),n=e&&Mo(e);n&&ho(n)}function vy(t){const e=Mo(ms(t));e&&Ar(e)&&ho(e)}function Mo(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function ms(t){const e=t.matches("input")?t.parentElement:null;return e&&Mo(e)?e:t}function Ar(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function ho(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=xf(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,s=n.right-o,i=e.getBoundingClientRect();let a=t.getBoundingClientRect();const c=a.right<=i.left?a.right-r:a.left>=i.right?s-a.left:s-r;a.width>c&&(t.style.setProperty("--clover-tip-room",`${Math.max(c,0)}px`),a=t.getBoundingClientRect());const l=a.left<r?r-a.left:a.right>s?s-a.right:0;l&&t.style.setProperty("--clover-tip-shift",`${l}px`)}function xf(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:s,overflowX:i}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const a=i||s;if(!a||a==="visible")continue;const c=o.getBoundingClientRect();e=Math.max(e,c.left+o.clientLeft),n=Math.min(n,c.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let Hi=0;function Wi(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&ms(n);o&&Mo(o)&&e.add(o),e.forEach(r=>Lc(r,"tipHidden",["pointerenter","focusout"]))}function Lc(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function Sf(){F(()=>(Hi++===0&&(document.addEventListener("keydown",Wi,true),document.addEventListener("pointerenter",so,true),document.addEventListener("focus",so,true)),()=>{--Hi||(document.removeEventListener("keydown",Wi,true),document.removeEventListener("pointerenter",so,true),document.removeEventListener("focus",so,true))}),[])}function kf(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||wf.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}const We=({className:t,id:e,label:n,children:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l,side:d})=>{const p=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Tt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":p,"data-side":d,onClick:r,"aria-disabled":l||void 0,"aria-expanded":s,"aria-controls":i,"aria-label":n,"aria-keyshortcuts":a==null?void 0:a.keys,...ut(c),type:"button",children:[f("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:o}),f(Ke,{label:n,shortcut:a})]})},Cf=he("");function pe(){return Ut(Cf)+Gr()}const rr=new Map;function Ef(t,e){const n=pe(),o=B(e);o.current=e,F(()=>t?Mf(n,o):void 0,[t,n])}function Mf(t,e){for(const[n,o]of[...rr])n!==t&&o.current();return rr.set(t,e),()=>{rr.delete(t)}}const Tf=gt(()=>import("./CaptionDetails-Et5z9c7X.mjs"));function If(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const Pc=(t,e)=>`${t}-label-${e}`,Lf=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Ct(),c=B(null),[l,d]=H(o);return o&&!l&&d(true),Ef(o,()=>r(false)),F(()=>{var u;o&&((u=c.current)==null||u.focus())},[o]),f("figcaption",{className:"clover-canvas-caption","data-open":o,"data-testid":"clover-canvas-caption",id:t,onKeyDown:u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),u.stopPropagation(),r(true))},ref:c,tabIndex:-1,children:[f(We,{className:"clover-canvas-caption-close",id:`close-${t}`,label:i("commonClose"),lang:a("commonClose"),onClick:()=>r(true),children:f(Ic,{})}),e.map((u,p)=>{const h=_t(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:Pc(t,p),...ut(h.lang),children:h.text}),l&&f(xt,{fallback:null,children:f(Tf,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},Pf=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),Af=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),Of=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),Nf=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),Rf=()=>f("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),Ui=()=>f(kt,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),f("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),Bf=()=>f(kt,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),f("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),$f=({children:t,label:e})=>f("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":e,children:t}),Ff=112,Df=128;function zf(t){Wt(()=>{const e=t==null?void 0:t.closest(".clover-canvas");if(!t||!e)return;const n=(s=false)=>{let i=t.offsetWidth,a=0;for(const h of s?[]:Array.from(t.children))!(h instanceof HTMLElement)||!h.offsetParent||(i=Math.min(i,h.offsetLeft),a=Math.max(a,h.offsetTop+h.offsetHeight));const c={width:t.offsetWidth-i,height:a};for(const[h,m]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;a?e.style.setProperty(g,`${m}px`):e.style.removeProperty(g)}const l=t.offsetTop,d=e.querySelector(":scope > .clover-canvas-media > .clover-canvas-transport"),u=e.clientHeight-2*l-c.height-((d==null?void 0:d.offsetHeight)??0),p=t.offsetLeft+i-l;a&&u<Ff&&p>=Df?e.dataset.popups="beside":delete e.dataset.popups};n();const o=new ResizeObserver(()=>n());o.observe(t),o.observe(e);const r=new MutationObserver(()=>n());return r.observe(t,{childList:true}),r.observe(e,{childList:true}),()=>{o.disconnect(),r.disconnect(),n(true)}},[t])}const To=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},Ac=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},Oc=t=>{const e=t==null?void 0:t.closest(".clover-root"),n=t==null?void 0:t.closest("dialog");return e&&!(n&&e.contains(n))?e:(t==null?void 0:t.closest(".clover-canvas"))??null},Hf=(t,e)=>{if(typeof t.webkitEnterFullscreen!="function")return;const n=e.closest(".clover-canvas"),o=!t.isConnected&&!!n;if(o&&n){const s=t.getAttribute("style");t.style.cssText="position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:contain;pointer-events:none",n.prepend(t),t.addEventListener("webkitendfullscreen",()=>{t.remove(),s===null?t.removeAttribute("style"):t.setAttribute("style",s)},{once:true})}const r=()=>{var s;try{(s=t.webkitEnterFullscreen)==null||s.call(t)}catch{}};o?requestAnimationFrame(r):r()},Nc=async(t,e)=>{var o,r,s,i;const n=Oc(t);if(n)try{if(To()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!Ac()){e&&t&&Hf(e,t);return}const a=n;await(((s=a.requestFullscreen)==null?void 0:s.call(a))??((i=a.webkitRequestFullscreen)==null?void 0:i.call(a)))}catch{}};function gs(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=To())!=null&&r.contains(t)))};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Wf({key:t,id:e,label:n,glyph:o,onClick:r,expanded:s,controls:i,shortcut:a,lang:c,unavailable:l},d){const u=d==null?void 0:d[t];return u?f(u,{buttonProps:{id:e,type:"button","aria-label":n,...c&&{lang:c},...a&&{"aria-keyshortcuts":a.keys},onClick:l?void 0:r,...l&&{"aria-disabled":true},...s!==void 0&&{"aria-expanded":s,"aria-controls":i}},icon:f($f,{label:n,children:o}),label:n,tip:f(Ke,{label:n,shortcut:a})},t):f(We,{id:e,label:n,onClick:l?void 0:r,unavailable:l,expanded:s,controls:i,shortcut:a,lang:c,children:o},t)}const Uf=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=H(null),s=gs(o);zf(o);const i=lt(a=>{r(a),e==null||e(a)},[e]);return f("div",{className:"clover-canvas-controls","data-fit":t||void 0,"data-fullscreen":s,"data-testid":"clover-canvas-controls",ref:i,children:n})},jf=()=>()=>{};function Vf(){return ee(jf,Ac)}const ji=new WeakMap;function nn(t,e){const[n,o]=H(()=>ji.get(t)??null);return F(()=>{if(!e||n)return;let r=true;return t().then(s=>{ji.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function qf(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function Kf(t,e,n){const o=t.ownerDocument,r=i=>i instanceof HTMLElement&&t.contains(i)&&!i.closest("[hidden]"),s=[o.getElementById(e),o.getElementById(n),...Array.from(t.querySelectorAll("button"))].find(r);s==null||s.focus()}function Zf({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=B(o);i.current=o;const a=B(s);a.current=s;const c=B(new Map),l=B(e);l.current=e;const d=B(null),u=e.join(" ");return Wt(()=>{const p=t.ownerDocument,h=()=>{var $;const b=l.current,v=getComputedStyle(t),S=parseFloat(v.columnGap)||0;let k=t.clientWidth-(parseFloat(v.paddingLeft)||0)-(parseFloat(v.paddingRight)||0),y=0;for(const O of b){const Y=($=p.getElementById(O))==null?void 0:$.offsetWidth;Y&&c.current.set(O,Y),y=Math.max(y,c.current.get(O)??0)}for(const O of Array.from(t.children))!(O instanceof HTMLElement)||b.includes(O.id)||O.id===n||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(k-=O.offsetWidth+S);const w=qf(b.map(O=>c.current.get(O)??y),k,S);if(w===i.current)return;const x=p.activeElement;d.current=x instanceof HTMLElement&&t.contains(x)?x.id:null,i.current=w,a.current(w)};h();const m=new ResizeObserver(()=>h());m.observe(t);const g=new MutationObserver(()=>h());return g.observe(t,{childList:true}),()=>{m.disconnect(),g.disconnect()}},[t,u,n]),Wt(()=>{if(!r)return;const p=d.current;if(d.current=null,p===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&Kf(t,p,n)},[o,r,t,n]),null}const Gf=()=>import("./AnnotationMenu-i4ieWtOL.mjs"),Xf=()=>import("./ChaptersMenu-CSFNWKY2.mjs"),Yf=()=>import("./ChoiceMenu-Ccv0BI0G.mjs"),Jf=()=>import("./ImageControls-Bu_6VlDO.mjs"),Vi=2,Qf=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),Rc={atMax:false,atMin:false,atHome:false},th=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=Rc,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:p=null,onChapter:h,overStill:m,request:g,hiddenPages:b,onPageVisibilityChange:v,selectedAnnotation:S=null,onAnnotationSelect:k,onAnnotationActivate:y,captionId:w,captionOpen:x=false,onCaptionToggle:$,placeId:O,placeOpen:Y=false,onPlaceToggle:K,language:U,fit:tt=true,more:Z="auto",children:ot})=>{var Vn,qn,Fe,yn;const{t:M,langOf:T}=Ct(),[N,j]=H(false),[et,ct]=H(false),rt=`annotations-${e}`,vt=`${rt}-menu`,_=M("informationPanelTabsAnnotations"),I=T("informationPanelTabsAnnotations"),P=lt(X=>{var mt;ct(false),y==null||y(null),X&&((mt=document.getElementById(rt))==null||mt.focus())},[rt,y]),R=n.annotations&&d.length>0&&k,[z,V]=H(false),C=`chapters-${e}`,D=`${C}-menu`,q=u.length>0&&!!h,G=B(false),ht=B(null);F(()=>{const X=()=>{var mt;G.current=((mt=document.activeElement)==null?void 0:mt.id)===C};return document.addEventListener("focusin",X),()=>document.removeEventListener("focusin",X)},[C]);const dt=lt(()=>{var mt,Ce;if(!G.current)return;G.current=false;const X=document.activeElement;X&&X!==document.body||(Ce=(mt=ht.current)==null?void 0:mt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||Ce.focus()},[]);F(()=>{q||dt()},[q,dt]),F(()=>()=>dt(),[dt]);const Nt=lt(X=>{var mt;V(false),X&&((mt=document.getElementById(C))==null||mt.focus())},[C]),Pt=n.information&&w&&$,Gt=n.map&&O&&K,zt=`choice-${e}`,pt=a.length===1?_t(a[0].label,U):null,Rt=(pt==null?void 0:pt.text)||M("canvasChoice"),Ft=pt!=null&&pt.text?pt.lang:T("canvasChoice"),J=`${zt}-menu`,ft=(Vn=nn(Gf,!!R))==null?void 0:Vn.default,A=(qn=nn(Xf,q))==null?void 0:qn.default,nt=(Fe=nn(Yf,a.length>0&&!!l))==null?void 0:Fe.default,At=lt(X=>{var mt;j(false),X&&((mt=document.getElementById(zt))==null||mt.focus())},[zt]),pn=Vf(),[jt,me]=H(null);F(()=>{ht.current=(jt==null?void 0:jt.closest(".clover-canvas"))??null},[jt]);const Ze=gs(jt),[ge,Be]=H(false),Hn=X=>f(We,{className:X,id:rt,label:_,lang:I,onClick:()=>ct(mt=>!mt),expanded:et,controls:vt,children:f(vf,{})},"annotations"),Wn=(()=>{const X=[],mt=t;return n.zoom&&mt&&X.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:te.zoomIn,label:M("imageZoomIn"),lang:T("imageZoomIn"),glyph:f(Pf,{}),unavailable:r.atMax,onClick:()=>mt.zoomBy(Vi)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:te.zoomOut,label:M("imageZoomOut"),lang:T("imageZoomOut"),glyph:f(Af,{}),unavailable:r.atMin,onClick:()=>mt.zoomBy(1/Vi)}),n.fullPage&&pn&&X.push({key:"fullPage",id:`fullPage-${e}`,label:M(Ze?"imageExitFullScreen":"imageFullScreen"),lang:T(Ze?"imageExitFullScreen":"imageFullScreen"),glyph:Ze?f(Nf,{}):f(Of,{}),onClick:Ce=>void Nc(Ce.currentTarget)}),n.rotation&&mt&&X.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:te.rotateRight,label:M("imageRotateRight"),lang:T("imageRotateRight"),glyph:f(Ui,{}),onClick:()=>mt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:te.rotateLeft,label:M("imageRotateLeft"),lang:T("imageRotateLeft"),glyph:f(Ui,{}),onClick:()=>mt.rotateBy(-90)}),n.reset&&mt&&X.push({key:"reset",id:`reset-${e}`,shortcut:te.reset,label:M("imageResetZoom"),lang:T("imageResetZoom"),glyph:f(Rf,{}),unavailable:r.atHome,onClick:()=>mt.home()}),a.length&&X.push({key:"choice",id:zt,label:Rt,lang:Ft,glyph:f(Bf,{}),onClick:()=>j(Ce=>!Ce),expanded:N,controls:J}),X})(),ne=[...Wn.filter(X=>X.key!=="fullPage"),...Wn.filter(X=>X.key==="fullPage")].map(X=>({id:X.id,view:Qf.has(X.key),node:Wf(X,o)})),mn=[Gt&&{id:`place-${e}`,view:false,node:f(We,{id:`place-${e}`,label:M("mapLabel"),lang:T("mapLabel"),onClick:K,expanded:Y,controls:O,children:f(_f,{})},"place")},q&&{id:C,view:false,node:f(We,{id:C,label:M("playerChapters"),lang:T("playerChapters"),onClick:()=>V(X=>!X),expanded:z,controls:D,children:f(yf,{})},"chapters")},R&&{id:rt,view:false,node:Hn()},Pt&&{id:`information-${e}`,view:false,node:f(We,{id:`information-${e}`,label:M("informationPanelTabsAbout"),lang:T("informationPanelTabsAbout"),onClick:$,expanded:x,controls:w,children:f(bf,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(ue.Fragment,{children:s},"placeholder")}].filter(X=>!!X),Un=mn.filter(X=>X.id===`placeholder-${e}`),Vt=[...ne.filter(X=>X.view),...Un],gn=[...ne.filter(X=>!X.view),...mn.filter(X=>!Un.includes(X))],oe=[...Vt,...gn],[$e,Ro]=H(true),vn=Z==="always"||i,It=(yn=nn(Jf,tt&&(i||(vn||!$e)&&oe.some(X=>X.view))))==null?void 0:yn.ImageControls,qt=$e&&!vn||!It?[]:oe.filter(X=>X.view),ke=i&&!!s&&!!It;F(()=>{qt.length||Be(false)},[qt.length]);const jn=X=>X.filter(mt=>!qt.includes(mt)&&!(ke&&mt.id===`placeholder-${e}`)).map(({node:mt})=>mt);return f(kt,{children:[f(Uf,{fit:tt,clusterRef:me,children:[jn(Vt),It&&(qt.length>0||ke)&&f(It,{instance:e,open:ke?qt.length>0:ge,onOpenChange:Be,toggle:ke?s:void 0,children:qt.map(({node:X})=>X)}),jn(gn),ot]}),tt&&!vn&&jt&&f(Zf,{cluster:jt,ids:oe.map(({id:X})=>X),more:`more-${e}`,fits:$e,settled:$e||qt.length>0||!oe.some(X=>X.view),onFits:Ro}),A&&z&&q&&f(A,{id:D,triggerId:C,label:M("playerChapters"),labelLang:T("playerChapters"),chapters:u,element:p,onChapter:h,overStill:m,request:g,onClose:Nt}),ft&&et&&R&&f(ft,{id:vt,triggerId:rt,label:_,labelLang:I,annotations:d,hiddenPages:b,onPageVisibilityChange:v,selected:S,onSelect:k,onActivate:X=>y==null?void 0:y(X),onClose:P}),nt&&N&&a.length>0&&l&&f(nt,{id:J,triggerId:zt,label:Rt,labelLang:Ft,language:U,choices:a,selections:c,onSelect:l,onClose:At})]})},eh=["jpg","png","webp","gif"];class Or extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function vs(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function Io(t){const e=Array.isArray(t)?t:t?[t]:[];for(const n of e){if(!n||typeof n!="object")continue;const o=n,r=String(o.type??o["@type"]??""),s=JSON.stringify(o.profile??""),i=/ImageService/i.test(r)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!r&&!o.profile,a=o["@id"]??o.id;if(i&&typeof a=="string")return vs(a)}}function nh(t,e){if(!t||typeof t!="object")throw new Or("info.json is not an object",e??"");const n=t,o=oh(n),r=o===3?n.id??n["@id"]:n["@id"]??n.id,s=vs(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new Or("info.json is missing id, width or height",e??s);const c=Array.isArray(n.profile)?n.profile:[n.profile],l=c.find(S=>typeof S=="string"),d=c.filter(S=>!!S&&typeof S=="object"),u=rh(l),p=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(S=>Array.isArray(S.supports)?S.supports:[])]),m=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(S=>String(S).toLowerCase()).find(S=>eh.includes(S))??"jpg",g=S=>{var y;const k=n[S]??((y=d.find(w=>w[S]!==void 0))==null?void 0:y[S]);return Number(k)>0?Number(k):void 0};let b=g("maxWidth"),v=g("maxHeight");return b&&!v&&(v=b),v&&!b&&(b=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:sh(n.tiles),sizes:ih(n.sizes),maxWidth:b,maxHeight:v,maxArea:g("maxArea"),regionByPx:u>=1||p.has("regionByPx"),sizeByW:u>=1||p.has("sizeByW")||p.has("sizeByWh"),format:m,quality:"default"}}function oh(t){const e=[].concat(t["@context"]??[]).map(String);return e.some(n=>n.includes("/image/3"))?3:e.some(n=>n.includes("/image/2"))?2:t.type==="ImageService3"?3:t["@id"]?2:3}function rh(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function sh(t){return Array.isArray(t)?t.map(e=>{const n=Number(e==null?void 0:e.width),o=Number((e==null?void 0:e.height)??(e==null?void 0:e.width)),r=(Array.isArray(e==null?void 0:e.scaleFactors)?e.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,i)=>s-i);return{width:n,height:o,scaleFactors:r}}).filter(e=>e.width>0&&e.height>0&&e.scaleFactors.length):[]}function ih(t){return Array.isArray(t)?t.map(e=>({width:Number(e==null?void 0:e.width),height:Number(e==null?void 0:e.height)})).filter(e=>e.width>0&&e.height>0).sort((e,n)=>e.width-n.width):[]}function po(t,e,n,o,r=t.quality){const s=e.x===0&&e.y===0&&e.width===t.width&&e.height===t.height,i=s?"full":`${e.x},${e.y},${e.width},${e.height}`,a=s&&n===t.width&&o===t.height;let c;return t.version===3?c=a?"max":`${n},${o}`:c=a?"full":`${n},`,`${t.id}/${i}/${c}/0/${r}.${t.format}`}function ah(t){return t.version===2&&t.level===0?"native":void 0}const sr=new Map;function ys(t,{request:e}={}){const n=vs(t),o=sr.get(n);if(o)return o;const r=`${n}/info.json`,s=ds(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw new Or(`info.json request failed with ${i.status}`,r,i.status);return nh(await i.json(),n)}).catch(i=>{throw sr.delete(n),i});return sr.set(n,s),s}function ch(t){const e=Math.max(0,Math.floor(t||0)),n=Math.floor(e/3600),o=Math.floor(e%3600/60),r=String(e%60).padStart(2,"0");return n?`${n}:${String(o).padStart(2,"0")}:${r}`:`${o}:${r}`}function yy(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function bs(t){if(!t)return;const[e,n]=t.split(","),o=Number(e);if(e===""||Number.isNaN(o))return;if(n===void 0||n==="")return{start:o};const r=Number(n);return Number.isNaN(r)?{start:o}:{start:o,end:r}}const lh=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,uh=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,dh=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&uh.test(e)),fh={width:1600,height:900};function hh(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(un),r=e==="left-to-right"||e==="right-to-left",s=e==="right-to-left"||e==="bottom-to-top",i=r?o[0].height:o[0].width,a=t.map((l,d)=>d);s&&a.reverse();let c=0;for(const l of a){const d=o[l],u=i/(r?d.height:d.width),p=d.width*u,h=d.height*u;n[l]=r?{x:c,y:0,width:p,height:h}:{x:0,y:c,width:p,height:h},c+=r?p:h}return n}function un(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=Bc(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=mo(t)[0])==null?void 0:s.body)??((i=go(t)[0])==null?void 0:i.body),o=Number(n==null?void 0:n.width),r=Number(n==null?void 0:n.height);return o>0&&r>0?{width:o,height:r}:fh}function Bc(t){return t.accompanyingContainer??t.placeholderContainer}function ph(t,e,n,o,r){return lh(t.id,e.id,n,o,r)}function mh(t){const e=[];for(const n of t)$c(n,(o,r)=>{const s=o;if((s==null?void 0:s.type)!=="Choice")return;const i=W(s.items).filter(a=>!!a&&typeof a=="object");i.length>1&&e.push({key:r,canvasId:n.id,label:s.label,items:i.map(a=>({label:a.label,id:a.id,...typeof a.type=="string"?{type:a.type}:{},...typeof a.format=="string"?{format:a.format}:{},...typeof W(a.language)[0]=="string"?{language:W(a.language)[0]}:{}}))})});return e}const ir={};function qi(t){if(t.type!=="Video"&&!Bn(t.type)||!t.format||dh(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=ir[e]??(ir[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function gh(t,e){const n={};for(const o of t){const r=o.items.filter(qi),s=[...new Set(r.flatMap(c=>c.language??[]))],i=s.length>1?sc(s,e):void 0,a=o.items.findIndex(c=>qi(c)&&(!i||c.language===i));a>0&&(n[o.key]=a)}return n}const ar=new WeakMap,cr=[];function vh(t){return Eo(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Bn(o==null?void 0:o.type)))}function Nr(t){var i;const e=ar.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!is(c))continue;const l=c.target?(i=fn(c.target))==null?void 0:i.t:void 0;if(!l)continue;const[d,u]=l.split(",").map(Number);Number.isFinite(d)&&n.push({annotation:c,start:d,end:Number.isFinite(u)?u:NaN})}if(n.every(a=>vh(a.annotation)))return ar.set(t,cr),cr;n.sort((a,c)=>a.start-c.start);const o=Number(t.duration),r=Number.isFinite(o)&&o/n.length||.5;n.forEach((a,c)=>{var d;const l=(d=n[c+1])==null?void 0:d.start;a.end>a.start||(l!=null?a.end=l>a.start?l:a.start+r:Number.isFinite(o)&&o>a.start?a.end=o:a.end>a.start||(a.end=a.start+r))});const s=n.length>1?n:cr;return ar.set(t,s),s}const Pn=t=>`frame:${t.id}`;function $c(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{is(r)&&Eo(r).forEach((i,a)=>e(i,ph(t,r,o,s,a),r))})})}function mo(t,e={},{allFrames:n=false}={}){const o=[];return _s(t,e,(r,s,i)=>{r.body.type==="Image"&&o.push({body:r.body,region:r.region,...r.rotation?{rotation:r.rotation}:{},target:s,...i>=0?{frame:i}:{}})},n),o}function yh(t,e={}){for(const n of t){let o;if(_s(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function go(t,e={}){const n=[];return _s(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Bn(a))return;const c=bs(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function bh(t){const e=t.filter(o=>o.time&&typeof o.body.id=="string"),n=new Set(e.map(o=>o.time.start));if(!(e.length<2||n.size!==e.length))return e.sort((o,r)=>o.time.start-r.time.start).map(o=>{const r=Number(o.body.duration)||(o.time.end!==void 0?o.time.end-o.time.start:void 0);return{src:o.body.id,...o.body.format?{format:o.body.format}:{},start:o.time.start,...r?{duration:r}:{}}})}function _s(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Nr(t),a=Math.min(e[Pn(t)]??0,Math.max(0,i.length-1));$c(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const p=Rr(c,e[l]??0);if(!p)return;const h=d.target?fn(d.target):void 0,m=h==null?void 0:h.rect;n(p,m?{x:m.x,y:m.y,width:m.w,height:m.h}:{x:0,y:0,width:r||Number(p.body.width)||0,height:s||Number(p.body.height)||0},u,h==null?void 0:h.t)})}function Fc(t){return Dc(t).filter(e=>e.kind!=="transcript")}function _h(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function Dc(t){const e=[],n=[...t.annotations??[],...t.items??[]];for(const o of n)for(const r of o.items??[])if(W(r.motivation).includes("supplementing"))for(const s of W(r.body)){const i=s,a=(i==null?void 0:i.type)==="Choice"?W(i.items):[i];for(const c of a){const l=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof l=="string"&&/\.vtt(\?|$)/i.test(l))||typeof l!="string"||e.push({id:l,label:c.label,language:W(c.language)[0],kind:_h(r)})}}return e}function wh(t){const e=[],n=r=>{const s=r,i=s==null?void 0:s.id;if(typeof i!="string"||e.some(c=>c.id===i))return;const a=s==null?void 0:s.format;(a?a!=="text/plain":!/\.txt(\?|$)/i.test(i))||e.push({id:i,label:s==null?void 0:s.label,language:W(s==null?void 0:s.language)[0]})},o=[...t.annotations??[],...t.items??[]];for(const r of o)for(const s of r.items??[])if(W(s.motivation).includes("supplementing"))for(const i of W(s.body)){const a=i;((a==null?void 0:a.type)==="Choice"?W(a.items):[a]).forEach(n)}return W(t.rendering).forEach(n),e}function Rr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Rr(o[e]??o[0])}if(n.type==="SpecificResource"&&n.source){const o=typeof n.source=="string"?{id:n.source}:n.source,r=W(n.selector).find(a=>(a==null?void 0:a.type)==="ImageApiSelector"),s=Rr({type:"Image",...o});if(!s)return null;const i=(r==null?void 0:r.rotation)!=null?String(r.rotation):void 0;return{...s,region:(r==null?void 0:r.region)||s.region,...i?{rotation:i}:{}}}return n.type!=="Image"&&n.type!=="Video"&&!Bn(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function xh(t,e,n={},{standIns:o=true}={}){const r=hh(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=un(c),p=d.width/u.width,h=d.height/u.height,m=y=>({x:d.x+y.x*p,y:d.y+y.y*h,width:y.width*p,height:y.height*h}),g=go(c,n),b=mo(c,n,{allFrames:true}).map(y=>({...y,canvas:c})),v=Bc(c);if(o&&!b.length&&g.some(y=>y.kind==="audio")&&v){const y=un(v);for(const w of mo(v))b.push({...w,canvas:v,target:{x:w.target.x/y.width*u.width,y:w.target.y/y.height*u.height,width:w.target.width/y.width*u.width,height:w.target.height/y.height*u.height}})}const S=n[Pn(c)]??0;b.forEach(({body:y,target:w,region:x,rotation:$,frame:O,canvas:Y},K)=>{var ot;const U=Io(y.service);if(!U&&!y.id)return;const tt=`${Y.id}|${K}|${y.id??U}|${x??""}|${$??""}`,Z=!(U&&x);if(s.push({id:tt,service:U,url:y.id,width:Z&&Number(y.width)||void 0,height:Z&&Number(y.height)||void 0,region:x,...$?{rotation:$}:{},placement:m(w),...O!=null&&O!==S?{hidden:true}:{}}),O!=null){const M=a[ot=Pn(c)]??(a[ot]=[]);(M[O]??(M[O]=[])).push(tt)}});const[k]=g;if(k!=null&&k.body.id){const y=bh(g),w=y?y[0]:void 0;i.push({id:`${c.id}|media|${k.body.id}`,kind:k.kind,src:(w==null?void 0:w.src)??k.body.id,format:w?w.format:k.body.format,placement:m(k.target),duration:y?Number(c.duration)||void 0:Number(k.body.duration??c.duration)||void 0,...y?{segments:y}:{},poster:Sh(c),captions:Fc(c)})}}),{images:s,media:i,placements:r,frames:a}}function Sh(t){var e;return(e=zc(t))==null?void 0:e.source}const by=1280;function zc(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=mo(e)[0])==null?void 0:c.body;if(!n)return;const o=Io(n.service),r=typeof n.id=="string"?n.id:void 0,s=o?{service:o,fallback:r}:r?{src:r}:void 0;if(!s)return;const{width:i,height:a}=un(e);return{source:s,width:i,height:a}}function kh(t,e,n){const o=un(t),r=e.width/o.width,s=e.height/o.height;return{x:e.x+n.x*r,y:e.y+n.y*s,width:n.width*r,height:n.height*s}}const Ch=({hidden:t})=>{const{t:e,langOf:n}=Ct(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...ut(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void Nc(r.currentTarget),type:"button",children:[f("svg",{viewBox:"0 0 512 512",width:"20",height:"20","aria-hidden":"true",focusable:"false",children:f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"45",d:"M244 400L100 256l144-144M120 256h292"})}),o]})},Hc="50%";function Wc(t,e=Hc,n=null){const[o,r]=H(()=>typeof IntersectionObserver>"u");return F(()=>{if(o||!t)return;const s=new IntersectionObserver(i=>{i.some(a=>a.isIntersecting)&&(r(true),s.disconnect())},{root:n,rootMargin:e});return s.observe(t),()=>s.disconnect()},[t,o,e,n]),o}function Eh(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>n(To()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function Mh(t){const[e,n]=H(false);return F(()=>{if(!t)return;const o=()=>{const r=To();n(r===t||!!r&&Oc(t)===r&&(r==null?void 0:r.querySelector(".clover-canvas"))===t)};return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}class Th extends ue.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(Ih,{error:n}):this.props.children}}function Ih({error:t}){const{t:e,langOf:n}=Ct();return f("div",{className:"clover-canvas-error",role:"alert",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",...ut(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}function En({overlay:t=false,className:e}){return f("span",{"aria-hidden":"true",className:Tt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}const Lh={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function Ph({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Ct(),s=Lh[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...ut(r(s)),children:o(s)})})}function Ah({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...ut(e),children:t})})}function Lo(t,e,n=false,o){const r=pe(),{hostLanguage:s}=Ct(void 0,o);if(n)return{props:{},node:null};const i=ko(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...ut(i),children:t})}}const Oh=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function se(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function de(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function Fn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function Nh(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function fe(...t){return t.reduce((e,n)=>Nh(e,n),Oh)}function Rh(t){const e=t.a*t.d-t.b*t.c;if(!e||!Number.isFinite(e))return null;const n=1/e;return{a:t.d*n,b:-t.b*n,c:-t.c*n,d:t.a*n,e:(t.c*t.f-t.d*t.e)*n,f:(t.b*t.e-t.a*t.f)*n}}function _e(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function _y(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map($h).join(",")})`}function Bh(t,e,n,o=new Float32Array(9)){const r=2/e,s=-2/n;return o[0]=t.a*r,o[1]=t.b*s,o[2]=0,o[3]=t.c*r,o[4]=t.d*s,o[5]=0,o[6]=t.e*r-1,o[7]=t.f*s+1,o[8]=1,o}function $h(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function Uc(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function ws(t){if(!t.length)return null;let e=1/0,n=1/0,o=-1/0,r=-1/0;for(const s of t)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x+s.width),r=Math.max(r,s.y+s.height);return{x:e,y:n,width:o-e,height:r-n}}function Fh(t,e){return t.x<e.x+e.width&&e.x<t.x+t.width&&t.y<e.y+e.height&&e.y<t.y+t.height}function Po(t,e){const n=[_e(t,{x:e.x,y:e.y}),_e(t,{x:e.x+e.width,y:e.y}),_e(t,{x:e.x,y:e.y+e.height}),_e(t,{x:e.x+e.width,y:e.y+e.height})],o=n.map(a=>a.x),r=n.map(a=>a.y),s=Math.min(...o),i=Math.min(...r);return{x:s,y:i,width:Math.max(...o)-s,height:Math.max(...r)-i}}function wn(t,e,n){return Math.min(Math.max(t,e),n)}const lr=t=>!!(t&&"overlays"in t);let Br;const Dh=()=>Promise.resolve().then(()=>Dd).then(t=>{Br=t.buildContentState}),zh=gt(()=>import("./MediaBody-Cjl76Spk.mjs")),Hh=()=>import("./AnnotationState-BmDac4UI.mjs"),Wh=new Map,Uh={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:Wh,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},jh=gt(()=>import("./FrameAnimation-ChG6Louz.mjs")),Ki=gt(()=>import("./PlaceBox-C9qj6wIy.mjs")),Vh=gt(()=>import("./Placeholder-DmX-oTRS.mjs")),qh=gt(()=>import("./ControlsFade-Bo9VWCLG.mjs")),Kh=()=>true,Zh=gt(()=>import("./Placeholder-DmX-oTRS.mjs").then(({PlaceholderToggle:t})=>({default:t}))),Zi={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Gh={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Xh={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",te.zoomIn.keys,te.zoomOut.keys,te.reset.keys,te.rotateRight.keys,te.rotateLeft.keys].join(" ")},Yh={description:"canvasKeysMedia",keys:[te.play.keys,"J L",te.mute.keys].join(" ")},Jh={description:"canvasKeysAnnotations",keys:"Escape"},Qh=t=>{var n;return!!((n=t.canvases)!=null&&n.length)||jc(t.body,t.src).length>0?f(Th,{children:f(tp,{...t})}):null},tp=t=>{var Ks,Zs,Gs,Xs,Ys,Js;const{surface:e,manifestId:n,canvases:o,viewingDirection:r,body:s,src:i,isTiledImage:a=false,label:c,partOf:l,language:d,highContrast:u,instanceId:p,className:h,options:m,navigator:g=false,controls:b=true,collapseControls:v="auto",controlButtons:S,annotations:k,onReady:y,onViewportChange:w,onContentStateChange:x,onMediaElement:$,onCaptionChange:O,caption:Y,onEnded:K,chapters:U,highlightedChapter:tt,onChapterHighlight:Z,placeholder:ot=true,children:M}=t,{t:T}=Ct(),N=B(null),[j,et]=H(null),ct=Eh(j),rt=gs(j),vt=Mh(j),_=Co(et),I=Jr(u),P=!!e.controlsVisibility,z=(e.controlsVisibility??Kh)(P?j:null,m==null?void 0:m.hideDelay,N),[V,C]=H(false),D=Wc(j),q=pe(),[G]=H(()=>p??`clover-canvas-${q}`),ht=B(null),[dt,Nt]=H(null),Pt=lr(dt)?dt:null,[Gt,zt]=H(null),pt=b===false?null:b===true?Zi:{...Zi,...b},[Rt,Ft]=H("loading"),[J,ft]=H(false),[A,nt]=H(0),[At,pn]=H(Rc),jt=B(y),me=B(w),Ze=B(m);jt.current=y,me.current=w,Ze.current=m;const ge=ss(r),Be=bt(()=>mh(o??[]),[o]),Hn=bt(()=>gh(Be,d),[Be,d]),[No,Wn]=H({}),ne=bt(()=>({...Hn,...No}),[Hn,No]),mn=(E,Q)=>Wn(yt=>({...yt,[E]:Q})),Un=bt(()=>k==null?void 0:k.filter(E=>!E.layer||(ne[E.layer.key]??0)===E.layer.item),[k,ne]),Vt=(Ks=k==null?void 0:k.find(E=>E.layer&&E.annotation.id===t.selectedAnnotation))==null?void 0:Ks.layer;F(()=>{Vt&&(ne[Vt.key]??0)!==Vt.item&&mn(Vt.key,Vt.item)},[Vt==null?void 0:Vt.key,Vt==null?void 0:Vt.item,t.selectedAnnotation]);const gn=!!(pt!=null&&pt.information),oe=!!(k!=null&&k.length),$e=nn(Hh,oe),[Ro,vn]=H(null),It=oe&&Ro||Uh,qt=bt(()=>{var yt,Ot;const E=(yt=k==null?void 0:k.find(Kt=>Kt.annotation.id===It.selected))==null?void 0:yt.annotation,Q=(Array.isArray(E==null?void 0:E.body)?E==null?void 0:E.body:[E==null?void 0:E.body]).find(Kt=>(Kt==null?void 0:Kt.type)==="Feature");return E&&Q?{id:String(E.id),feature:Q,name:((Ot=Q.properties)==null?void 0:Ot.label)??E.label}:null},[k,It.selected]),ke=qt?`${qt.id}:${t.refind??0}`:null,[jn,Vn]=H(null),qn=ke!==null&&jn!==ke,Fe=bt(()=>{var Kt,Qe;const E=(o??[]).map(Yt=>Yt.navPlace).filter(Boolean),Q=E.length?E:t.navPlace?[t.navPlace]:[];if(!Q.length)return null;const yt=Q.flatMap(Yt=>(Yt==null?void 0:Yt.type)==="FeatureCollection"?Yt.features??[]:(Yt==null?void 0:Yt.type)==="Feature"?[Yt]:[]);if(!yt.length)return null;const Ot=yt.length===1?(Qe=(Kt=yt[0])==null?void 0:Kt.properties)==null?void 0:Qe.label:void 0;return{feature:{type:"FeatureCollection",features:yt},name:Ot??t.label}},[o,t.navPlace,t.label]),yn=`place-box-${G}`,[X,mt]=H(false),[Ce,Ll]=H(false),Kn=B(It);Kn.current=It;const Zn=lt(()=>Kn.current.release(),[]),{comments:Bo,listedCount:As}=It,Ge=bt(()=>gn?(o??[]).filter(E=>If(E)||Bo.has(E.id)):[],[o,gn,Bo]),$o=`caption-${G}`,[Pl,Os]=H(false),Fo=Pl&&Ge.length>0,Ns=lt(E=>{var Q;Os(false),E&&((Q=document.getElementById(`information-${G}`))==null||Q.focus())},[G]),Xt=bt(()=>(o??[]).find(E=>Nr(E).length)??null,[o]),Al=Xt?Nr(Xt):np,Ht=bt(()=>o!=null&&o.length?xh(o,ge,ne,{standIns:o.length>1}):null,[o,ge,ne]),Ol=bt(()=>jc(s,i,a),[s,i,a]),st=(Ht==null?void 0:Ht.media[0])??null,Rs=!P&&(st==null?void 0:st.kind)==="video",Nl=P||Rs,Rl=P?z:V,Bl=bt(()=>{if(o!=null&&o.length)return yh(o,ne);const E=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(E==null?void 0:E.type)=="string"?E.type.toLowerCase():i?"image":void 0},[o,ne,s,i]),[Dt,$l]=H(null),Gn=B($);Gn.current=$;const Fl=lt(E=>{var Q;$l(E),(Q=Gn.current)==null||Q.call(Gn,E)},[]),Ee=Ht?Ht.images:Ol,Me=!!st&&(o==null?void 0:o.length)===1,Te=Me&&(st==null?void 0:st.kind)==="audio",Dl=Me&&(st==null?void 0:st.kind)==="video",Xe=(o==null?void 0:o.length)===1&&!st&&!Xt&&Ee.length===0,Xn=!Me&&!Xe&&((Zs=m==null?void 0:m.gestures)==null?void 0:Zs.navigable)!==false,ve=o?`${n??""}
2
- ${o.map(E=>E.id).join("|")}`:null,Ie=bt(()=>{if(!o||!ot)return[];const E=o.flatMap(Q=>{const yt=zc(Q),Ot=_t(Q.label,d);return yt?[{...yt,alt:Ot.text,lang:Ot.lang}]:[]});return ge==="right-to-left"||ge==="bottom-to-top"?E.reverse():E},[o,ge,ot,d]),[zl,Bs]=H(false),[Hl,$s]=H(null),wt=!Te&&Ie.length>0&&(st?Hl!==ve:!zl),Fs=m==null?void 0:m.request;F(()=>{if(wt){Promise.resolve().then(()=>Fm);for(const{source:E}of Ie)E.service&&ys(E.service,{request:Fs}).catch(()=>{})}},[wt,Ie,Fs]);const Ds=(E,{annotations:Q=false,fullPage:yt=false}={})=>({...E,zoom:false,rotation:false,reset:false,fullPage:yt&&E.fullPage,annotations:Q&&E.annotations}),bn=Xe&&rt,zs=ue.Children.count(M)>0,Do=Ie.length>0&&!Te&&!st,_n=pt?wt?Ge.length||zs||As||st&&(U!=null&&U.length)?Ds(pt,{annotations:true}):null:Me||Xe?Be.length||Ge.length||zs||As||st&&(U!=null&&U.length)||bn&&pt.fullPage?Ds(pt,{annotations:true,fullPage:bn}):null:pt:null,zo=g&&!wt&&(st?st.kind==="audio"&&!Me&&Ee.length>0:true),[Ho,Wl]=H(null),Ye=st?Ho??st.placement:null,[Yn,Ul]=H(op),Wo=bt(()=>{const E=(st==null?void 0:st.kind)==="video"&&Dt&&Ye?[...Ee,{id:st.id,placement:Ye,width:Ye.width,height:Ye.height,media:{element:Dt}}]:Ee;return Yn.length?[...E,...Yn]:E},[Ee,st,Dt,Ye,Yn]),Hs=Me&&(st==null?void 0:st.kind)==="video"&&Ho?Ho:Ht?ws(Ht.placements):null,jl=JSON.stringify([Ee,Hs,Wo.length!==Ee.length&&[st==null?void 0:st.id,Ye],Yn.map(E=>E.id)]),Jn=B(null),Uo=B(false),jo=()=>{st?$s(wt?ve:null):Bs(wt),wt||Zn()},Qn=B(null),Vl=E=>{if(Dt&&!wt){Dt.currentTime=E;return}Qn.current=E,wt&&jo()};F(()=>{!Dt||Qn.current===null||(Dt.currentTime=Qn.current,Qn.current=null)},[Dt]);const Vo=Array.isArray(s)?s[0]:s,Lt=[c,(Gs=o==null?void 0:o[0])==null?void 0:Gs.label,Vo==null?void 0:Vo.label].map(E=>_t(E,d)).find(E=>E.text),ql=bt(()=>{const E=_t(l,d);return E.text&&E.text!==(Lt==null?void 0:Lt.text)?E:void 0},[l,d,Lt==null?void 0:Lt.text]),Ws=Lo((Lt==null?void 0:Lt.text)||T("canvasImage"),Lt?Lt.lang:_.langOf("canvasImage"),false,_.hostLanguage),to=wt?[]:[...Xn?[Xh]:[],...st?[Yh]:[],...oe?[Jh]:[]],Us=`keys-${G}`,Kl=Xn&&!wt&&!_.langOf("canvasRoleDescription")?T("canvasRoleDescription"):void 0,qo=!!_n&&Ge.length>0,Zl=qo&&Ge.map((E,Q)=>_t(E.label,d).text?Pc($o,Q):null).filter(Boolean).join(" ")||void 0,js=B({canvases:o,scene:Ht,canvasKey:ve});js.current={canvases:o,scene:Ht,canvasKey:ve};const eo=B(null),Ko=lt(()=>{const{canvases:E,scene:Q,canvasKey:yt}=js.current;eo.current=E&&Q&&Jn.current===yt?{key:yt,canvases:E,placements:Q.placements}:null},[]),Gl=!o||((Xs=eo.current)==null?void 0:Xs.key)===ve,Je=Mc(()=>{const E=eo.current,Q=ht.current;if(!E||n==="loading")return null;const yt=Dt&&Dt.currentTime>0?Dt.currentTime:null,Ot=!yt&&Q&&lr(Q)?Vc(Q.getBounds(),E.canvases,E.placements):null,Kt=E.canvases.find(Qe=>Qe.id===(Ot==null?void 0:Ot.canvasId))??E.canvases[0];return Kt?Br?Br({manifestId:n,canvasId:Kt.id,type:Kt.type,region:Ot&&{x:Ot.rect.x,y:Ot.rect.y,w:Ot.rect.width,h:Ot.rect.height},time:yt}):(Dh().then(()=>Je()),null):null},x);F(()=>Pr(Dt,Je),[Dt,Je]),F(()=>{const E=N.current;if(!E)return;const Q=e(E,Ze.current),yt=lr(Q)?Q:null;ht.current=Q,Nt(Q),Q.setDismiss(Zn);const Ot=()=>{if(!yt)return;const Zt=yt.viewLimits();pn(ye=>ye.atMax===Zt.atMax&&ye.atMin===Zt.atMin&&ye.atHome===Zt.atHome?ye:Zt)},Kt=Q.on("open",()=>{var Zt;Ot(),Go(false),Ko(),Je(),Ft("ready"),nt(ye=>ye+1),yt&&((Zt=jt.current)==null||Zt.call(jt,ep(yt,()=>eo.current,ye=>{var ti,ei;const Qs=Kn.current.placed.find(Xo=>Xo.id===ye);return Qs?(Kn.current.select(Qs),(ei=Array.from(((ti=yt.overlays)==null?void 0:ti.container.querySelectorAll("[id]"))??[]).find(Xo=>Xo.id===ye))==null||ei.focus({preventScroll:true}),true):false})))}),Qe=Q.on("change",()=>{Ot(),Go(false),Ko(),Je(),Ft("ready"),nt(Zt=>Zt+1)}),Yt=Q.on("error",()=>{Q.isOpen||Ft("error")}),Yl=Q.on("unloadable",Zt=>ft(!!Zt)),Jl=Q.on("viewport",()=>{var Zt;Ot(),yt&&((Zt=me.current)==null||Zt.call(me,yt.getBounds())),Je()});return()=>{Kt(),Qe(),Yt(),Yl(),Jl(),Q.dispose(),ht.current=null,Nt(null)}},[p,e,Zn,Ko]),F(()=>{if(!(!Pt||!Gt))return Pt.attachNavigator(Gt)},[Pt,Gt]),F(()=>{if(!(!dt||!Xe))return dt.setGestures({navigable:false}),()=>dt.setGestures({})},[dt,Xe]);const Zo=B(false);F(()=>{var Q;if(bn)return;const E=!document.activeElement||document.activeElement===document.body;Zo.current&&E&&((Q=N.current)==null||Q.focus()),Zo.current=false},[bn]),F(()=>{const E=ht.current;if(wt&&(Uo.current=true),!E||!D||wt)return;const Q=Jn.current!==null&&Jn.current!==ve;(!E.isOpen||Q)&&Ft("loading");const yt=Me||Uo.current&&E.isOpen||Q;Jn.current=ve,Uo.current=false,E.setImages(Wo,{world:Hs??void 0,fit:yt})},[jl,p,Dt,D,wt]);const Vs=B(n),[Xl,Go]=H(false);Wt(()=>{var E;n!==Vs.current&&(Vs.current=n,(E=ht.current)==null||E.clear(),Go(true),Ft("loading"))},[n]);const qs=Rt==="loading"&&Wo.length>0&&D&&!wt;return f(Nn.Provider,{value:_.hostLanguage,children:f("figure",{"aria-labelledby":Zl,className:Tt("clover-canvas",h),"data-testid":"clover-canvas","data-status":Rt,...Qr(I),"data-unloadable":J||void 0,"data-has-navigator":zo,"data-fullscreen":ct,"data-exit":vt||void 0,"data-controls":Nl?Rl?"visible":"hidden":void 0,"data-media":Bl,"data-recording":st?"":void 0,"data-player":Te?"":void 0,"data-animated":Xt?"":void 0,"data-navigable":Xn,"data-placeholder":Ie.length&&!Te?wt:void 0,ref:_.ref,onFocus:E=>{Zo.current=bn&&E.target.id===`fullPage-${G}`},onKeyDown:E=>{if(E.key==="Escape"&&Fo&&!E.defaultPrevented){E.preventDefault(),Ns(false);return}if(E.key==="Escape"&&!E.defaultPrevented&&!E.currentTarget.querySelector(".clover-canvas-menu")&&Zn()){E.preventDefault();return}kf(E,N.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(_n||zo)&&st&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),Rs&&f(xt,{fallback:null,children:f(qh,{element:j,hideDelay:m==null?void 0:m.hideDelay,picture:N,onChange:C})}),f(Ch,{hidden:!vt}),dt&&(_n||Do)&&f(th,{renderer:Pt,instance:G,config:_n??Gh,controlButtons:S,limits:At,placeholderIsMore:Do&&!st,chapters:st?U:void 0,mediaElement:Dt,onChapter:Vl,overStill:!!st&&wt,request:m==null?void 0:m.request,placeholder:Do&&f(xt,{fallback:null,children:f(Zh,{instance:G,media:!!st,active:wt,onToggle:jo,more:!!pt&&(pt.zoom||pt.rotation||pt.reset||pt.fullPage)})}),fit:!P,more:v,choices:wt?[]:Be,selections:ne,onSelect:mn,annotations:It.menu,hiddenPages:It.hiddenPages,onPageVisibilityChange:It.setPagesVisible,selectedAnnotation:It.selected,onAnnotationSelect:It.select,onAnnotationActivate:It.activate,captionId:qo?$o:void 0,captionOpen:Fo,onCaptionToggle:()=>Os(E=>!E),placeId:Fe?yn:void 0,placeOpen:X,onPlaceToggle:()=>{Ll(true),mt(E=>!E)},language:d,children:_n&&M}),zo&&f("div",{ref:zt,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:N,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:oe?"group":"img","aria-roledescription":Kl,...Ws.props,"aria-describedby":to.length?Us:void 0,"aria-keyshortcuts":to.map(({keys:E})=>E).join(" ")||void 0,"aria-busy":qs,tabIndex:0}),Ws.node,to.length>0&&f("span",{id:Us,style:je,children:to.map(({description:E},Q)=>f(ue.Fragment,{children:[Q>0&&" ",f("span",{...ut(_.langOf(E)),children:T(E)})]},E))}),f(Ph,{kind:"image",shown:J&&!wt}),Xe&&!wt&&(Lt==null?void 0:Lt.text)&&f(Ah,{text:Lt.text,lang:Lt.lang||void 0}),(st==null?void 0:st.kind)==="audio"&&!Te&&Ee.length===0&&!wt&&(Lt==null?void 0:Lt.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...ut(Lt.lang||void 0),children:Lt.text}),Ie.length>0&&!Te&&f(xt,{fallback:null,children:f(Vh,{instance:G,stills:Ie,vertical:ge==="top-to-bottom"||ge==="bottom-to-top",media:!!st,active:wt,lingering:Rt==="loading"&&!Xl,onToggle:jo,request:m==null?void 0:m.request})}),dt&&st&&D&&!wt&&f(xt,{fallback:null,children:f(zh,{media:st,request:m==null?void 0:m.request,fillable:Dl,surface:dt,instance:G,onElement:Fl,onFit:Wl,onCaptionChange:O,caption:Y,navigable:Xn,fullscreen:Me&&!!(pt!=null&&pt.fullPage),isFullscreen:rt,onEnded:K,chapters:U,highlightedChapter:tt,onChapterHighlight:Z,autoPlay:!Te&&Ie.length>0&&It.quietlyOpened!==ve,language:d,notes:It.timed,marked:It.placed,selectedAnnotation:It.selected,onAnnotationSelect:oe?It.select:void 0,onAnnotationActivate:It.activate,player:Te&&o?{canvas:o[0],title:Lt,partOf:ql}:void 0})}),Pt&&Xt&&(Ht==null?void 0:Ht.frames[Pn(Xt)])&&!wt&&f(xt,{fallback:null,children:f(jh,{renderer:Pt,frames:Al,byFrame:Ht.frames[Pn(Xt)],animationKey:Xt.id,sceneVersion:A,autoplay:(Ys=m==null?void 0:m.animation)==null?void 0:Ys.autoplay,loop:(Js=m==null?void 0:m.animation)==null?void 0:Js.loop,onEnded:K,language:d,duration:Number(Xt.duration),canvas:Xt,place:Ht.placements[o.indexOf(Xt)],onItems:Ul},Xt.id)}),$e&&oe&&k&&f($e.AnnotationState,{given:t,annotations:Un??k,scene:Ht,renderer:Pt,sceneVersion:A,drawn:Gl,media:st,mediaElement:Dt,showPlaceholder:wt,canvasKey:ve,openImages:Bs,openMedia:$s,host:N,onModel:vn,refind:t.refind??0}),qs&&f(En,{overlay:true}),qt&&f(xt,{fallback:null,children:f(Ki,{id:`place-of-${G}`,open:qn,onClose:E=>{var Q;Vn(ke),E&&((Q=document.getElementById(qt.id))==null||Q.focus())},feature:qt.feature,name:qt.name,language:d})}),Fe&&Ce&&f(xt,{fallback:null,children:f(Ki,{id:yn,open:X,onClose:E=>{var Q;mt(false),E&&((Q=document.getElementById(`place-${G}`))==null||Q.focus())},feature:Fe.feature,name:Fe.name,language:d})}),qo&&f(Lf,{id:$o,canvases:Ge,comments:Bo,open:Fo,onClose:Ns,language:d})]})})};function ep(t,e,n){return{fitCanvasRect(o,r,s){const i=e(),a=(i==null?void 0:i.canvases.findIndex(c=>c.id===o))??-1;return!i||a===-1?false:(t.fitBounds(kh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?Vc(t.getBounds(),o.canvases,o.placements):null},get backendKind(){return t.backendKind},get atHome(){return t.isAtHome},fitBounds:(o,r)=>t.fitBounds(o,r),fitItemRect:(o,r,s)=>t.fitItemRect(o,r,s),itemRectToWorld:(o,r)=>t.itemRectToWorld(o,r),getBounds:()=>t.getBounds(),getHomeBounds:()=>t.getHomeBounds(),getCamera:()=>t.getCamera(),home:o=>t.home(o),zoomBy:(o,r,s)=>t.zoomBy(o,r,s),panBy:(o,r,s)=>t.panBy(o,r,s),setRotation:(o,r)=>t.setRotation(o,r),getRotation:()=>t.getRotation(),rotateBy:o=>t.rotateBy(o),worldToScreenPoint:o=>t.worldToScreenPoint(o),screenToWorldPoint:o=>t.screenToWorldPoint(o),on:(o,r)=>t.on(o,r),zoomToAnnotation:n}}const np=[],op=[];function jc(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=Io(s.service);return!a&&!s.id?null:{id:`${i}:${s.id??a}|${s.region??""}`,service:a,url:s.id,width:s.width,height:s.height,region:s.region}}).filter(s=>s!==null):(Array.isArray(e)?e:e?[e]:[]).filter(Boolean).map((s,i)=>({id:`${i}:${s}`,...n?{service:s}:{url:s}}))}function Vc(t,e,n){let o=null;if(n.forEach((u,p)=>{const h=Math.max(t.x,u.x),m=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-h,b=Math.min(t.y+t.height,u.y+u.height)-m;if(g<=0||b<=0)return;const v=g*b;(!o||v>o.area)&&(o={index:p,area:v,clip:{x:h,y:m,width:g,height:b}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=un(i),l=c.width/a.width,d=c.height/a.height;return{canvasId:i.id,rect:{x:Math.round((s.x-a.x)*l),y:Math.round((s.y-a.y)*d),width:Math.round(s.width*l),height:Math.round(s.height*d)}}}function rp(t,e,n,o){return bt(()=>((o==null?void 0:o(t??null,(e==null?void 0:e.id)??null,e==null?void 0:e.duration))??[]).map(r=>{const s=_t(r.label,n);return{...r.id?{id:r.id}:{},label:s.text,lang:s.lang,start:r.start,end:r.end,...r.thumbnail?{thumbnail:r.thumbnail}:{}}}),[t,e,n,o])}function sp(t,e,n,o){if(t.region){if(!e)return false;const{x:r,y:s,w:i,h:a}=t.region;if(!e.fitCanvasRect(t.canvasId,{x:r,y:s,width:i,height:a},true))return false}if(o&&(t.time!==void 0||t.autoplay)){if(!n)return false;const r=()=>{t.time!==void 0&&(n.currentTime=t.time),t.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?r():n.addEventListener("loadedmetadata",r,{once:true})}return true}function ip(t,e){const n=t.store.get().manifest;if(e.canvasId&&Bt(n).canvases.some(r=>r.id===e.canvasId))t.goTo(e.canvasId);else if(e.manifestId&&e.manifestId!==(n==null?void 0:n.id))t.goToManifest(e.manifestId,e.canvasId);else return false;return true}function qc(t){if(typeof t=="string")return Gi(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?Gi(e.id):e}const Gi=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function Kc(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const Xi=new WeakMap,Yi=[];function ap(t,e,n){if(!t||!e)return Yi;let o=Xi.get(t);o||Xi.set(t,o=new Map);const r=`${e}|${n??""}`,s=o.get(r);if(s)return s;const i=[],a=new Set,c=d=>{if(!d||a.has(d.id??d))return;a.add(d.id??d);const u=!W(d.behavior).includes("no-nav");for(const p of W(d.items)){if((p==null?void 0:p.type)==="Range"){c(p);continue}if(!u)continue;const h=fn(qc(p));if(h.id.split("#")[0]!==e)continue;const m=bs(h.t);m&&i.push({...d.id?{id:d.id}:{},label:d.label,...m,...Kc(d)})}};for(const d of W(t.structures))c(d);i.sort((d,u)=>d.start-u.start);const l=i.length?i.map((d,u)=>{var p;return{...d,end:d.end??((p=i[u+1])==null?void 0:p.start)??n}}):Yi;return o.set(r,l),l}const Ji=new WeakMap,Qi=[];function cp(t){if(!t)return Qi;const e=Ji.get(t);if(e)return e;const n=new Map(W(t.items).map((c,l)=>[c==null?void 0:c.id,l])),o=new Set,r=c=>{var S,k;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let p;for(const y of W(c.items))if((y==null?void 0:y.type)==="Range"){const w=r(y);l.push(...w),w.forEach(x=>d.push(...x.canvasIds))}else{const w=fn(qc(y));if(!w.id)continue;p??(p=w),d.push(w.id),u.push(w)}const h=W(c.behavior);if(h.includes("no-nav"))return l;const m=p??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(m==null?void 0:m.id)??((S=l[0])==null?void 0:S.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...Kc(c),children:l},b=bs(m==null?void 0:m.t);return b?g.time=b:!m&&((k=l[0])!=null&&k.time)&&(g.time=l[0].time),m!=null&&m.rect&&(g.region=m.rect),(h.includes("sequence")&&u.length>1&&!u.some(y=>y.t)||lp(u,n))&&(g.parts=u.map(y=>({canvasId:y.id,...y.rect?{region:y.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:Qi;return Ji.set(t,a),a}function lp(t,e){return!t.length||t.some(n=>n.t)?false:t.some(n=>n.rect)?true:t.some((n,o)=>o>0&&e.get(n.id)!==(e.get(t[o-1].id)??NaN)+1)}function wy(t,e,n,o){let r=null,s=null;const i=(l,d,u)=>!l||u>l.depth||u===l.depth&&!(l.sequence&&d.sequence),a=(l,d,u)=>{const p=u||l.id===o;if(e&&l.canvasIds.includes(e)&&(!l.time||n!==void 0&&n>=l.time.start&&(l.time.end===void 0||n<l.time.end))){const m={id:l.id,depth:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=m),p&&i(s,l,d)&&(s=m)}l.children.forEach(h=>a(h,d+1,p))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function up(){const t=it(n=>n.status),e=it(n=>n.error);return bt(()=>({status:t,error:e}),[t,e])}function dp(){return it(t=>t.manifest)}function xs(){return it(t=>Bt(t.manifest))}function Ss(){return it(t=>Ue(t.manifest,t.canvasId))}function fp(){return it(t=>qe(t.manifest,t.canvasId))}function hp(){const{clover:t}=ae("useNavigation"),e=it(o=>$n(o.manifest,o.canvasId)),n=it(o=>Bt(o.manifest).views.length);return bt(()=>sf(t,e,n),[t,e,n])}function pp(){return it(t=>mc(t.manifest,t.addedSets))}function xy(t){const{language:e}=ae("useLocalized");return bt(()=>_t(t,e),[t,e])}function Sy(){return Ct().t}function ky(){return Ct().langOf}const mp=({options:t,onReady:e,onViewportChange:n,onMediaElement:o,onCaptionChange:r,caption:s,onEnded:i,placeholder:a=true,label:c,partOf:l,language:d,annotations:u,chapters:p,...h})=>{const m=ae("Canvas"),{clover:g}=m,b=ee(g.captions.subscribe,g.captions.get,g.captions.get),v=s??b,S=d??m.language,k=Ss(),{direction:y}=xs(),w=dp(),x=fp(),$=it(A=>{var nt;return A.status==="loading"?"loading":((nt=A.manifest)==null?void 0:nt.id)??""}),O=it(A=>A.target),Y=it(A=>gc(A.manifest,A.addedSets,A.search.set,A.regions)),K=it(A=>$d(A.manifest,A.addedSets,A.hiddenSets,A.shownSets,!!hs(A.manifest))),U=it(A=>ls(A.manifest,A.addedSets,A.hiddenSets,A.shownSets)),tt=it(A=>A.annotationId),Z=B(tt);Z.current=tt;const[ot,M]=H(0);F(()=>g.found.subscribe(A=>{A&&A===Z.current&&M(nt=>nt+1)}),[g]);const T=ee(g.highlight.subscribe,g.highlight.get,g.highlight.get),N=ee(g.chapter.subscribe,g.chapter.get,g.chapter.get),j=k.map(A=>A.id).join("|"),et=bt(()=>{if(u)return u;const A=k.map(nt=>nt.id);return Y.flatMap(nt=>nt.entries.filter(At=>A.includes(At.canvasId)).map(At=>({annotation:At.annotation,targetIndex:A.indexOf(At.canvasId),pageId:nt.id,...nt.label?{pageLabel:nt.label}:{},...At.place?{place:At.place}:{},...At.layer?{layer:{key:At.layer.key,item:At.layer.item}}:{}})))},[u,Y,k]),rt=O?(A=>!!A&&k.some(nt=>nt.id===A))(O.canvasId):false,vt=B(null);rt&&(vt.current=j);const _=a&&vt.current!==j,I=B(null),P=B(null),R=bt(()=>k.some(A=>go(A).length>0),[k]),z=R?k.find(A=>go(A).length>0):void 0,V=rp(w,z,S,ap),C=B(R);C.current=R;const D=s===void 0?m.language:void 0,q=z==null?void 0:z.id;F(()=>{if(!D||!z)return;const A=Fc(z).find(nt=>nt.language&&es(nt.language,D));A&&g.captions.get()!==A.id&&g.captions.emit(A.id)},[D,q,g]);const G=lt(()=>{const A=g.store.get().target;!A||!g.store.get().canvasId||sp(A,I.current,P.current,C.current)&&g.consumeTarget()},[g]),ht=B(j);F(()=>{ht.current!==j&&(ht.current=j,P.current=null),O&&G()},[O,j,G]);const dt=B(e);dt.current=e;const Nt=lt(A=>{var nt;I.current=A,A.on("change",G),G(),(nt=dt.current)==null||nt.call(dt,A)},[G]),Pt=lt(A=>{var At;const nt=(At=I.current)==null?void 0:At.getCanvasRegion();g.viewport.emit(nt?{canvasId:nt.canvasId,region:{x:nt.rect.x,y:nt.rect.y,w:nt.rect.width,h:nt.rect.height}}:null),n==null||n(A)},[g,n]),Gt=lt(A=>{P.current=A,g.media.emit(A),A&&G(),o==null||o(A)},[g,G,o]),zt=lt(()=>{i==null||i(),(De(w,"auto-advance")||De(x,"auto-advance"))&&g.next({autoplay:true,wrap:De(w,"repeat")})},[g,w,x,i]),pt=lt(A=>void ip(g,A),[g]),Rt=(t==null?void 0:t.request)??g.request,Ft=De(x,"auto-advance")||De(w,"auto-advance"),J=De(x,"repeat")||De(w,"repeat"),ft=bt(()=>({...t,request:Rt,animation:(t==null?void 0:t.animation)??{autoplay:Ft,loop:J}}),[t,Rt,Ft,J]);return k.length?f(Qh,{...h,manifestId:$,navPlace:w==null?void 0:w.navPlace,canvases:k,viewingDirection:y,language:S,label:c??(x==null?void 0:x.label)??(w==null?void 0:w.label),partOf:l??(w==null?void 0:w.label),options:ft,placeholder:_,onReady:Nt,onViewportChange:Pt,onMediaElement:Gt,caption:v,onCaptionChange:A=>{g.captions.emit((A==null?void 0:A.id)??null),r==null||r(A)},onEnded:zt,annotations:et,hiddenPages:U,unlistedPages:K,onPageVisibilityChange:(A,nt)=>A.forEach(At=>g.setSetVisible(At,nt)),chapters:p??V,highlightedChapter:N,onChapterHighlight:A=>g.chapter.emit(A),selectedAnnotation:tt,refind:ot,highlightedAnnotation:T,onAnnotationSelect:A=>g.selectAnnotation(A),onAnnotationLink:h.onAnnotationLink??pt,onAnnotationActive:A=>{var nt;g.highlight.emit(A),(nt=h.onAnnotationActive)==null||nt.call(h,A)}}):null},gp=6,en=new Set;function vp(t){if(en.has(t))return true;for(;en.size>=gp;){let e;for(const n of en)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;en.delete(e),e.release()}return en.add(t),true}function ta(t){en.delete(t)}function yp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function bp(t,e){if(!t.bleed)return{x:0,y:0};const n=t.transform,o=Math.hypot(n.a,n.b)*e,r=Math.hypot(n.c,n.d)*e;return{x:t.bleed.right&&o>0?1/o:0,y:t.bleed.bottom&&r>0?1/r:0}}const _p=`#version 300 es
3
- in vec2 a_position;
4
- uniform mat3 u_matrix;
5
- uniform vec4 u_crop;
6
- out vec2 v_uv;
7
-
8
- void main() {
9
- vec3 clip = u_matrix * vec3(a_position, 1.0);
10
- gl_Position = vec4(clip.xy, 0.0, 1.0);
11
- v_uv = u_crop.xy + a_position * u_crop.zw;
12
- }
13
- `,wp=`#version 300 es
14
- precision highp float;
15
- in vec2 v_uv;
16
- uniform sampler2D u_texture;
17
- uniform float u_opacity;
18
- out vec4 outColor;
19
-
20
- void main() {
21
- outColor = texture(u_texture, v_uv) * u_opacity;
22
- }
23
- `;class vo{constructor(e,n,o){L(this,"kind","webgl2");L(this,"canvas");L(this,"maxTextureSize");L(this,"gl");L(this,"program",null);L(this,"vao",null);L(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});L(this,"textures",new Map);L(this,"cssWidth",1);L(this,"cssHeight",1);L(this,"pixelRatio",1);L(this,"matrixScratch",new Float32Array(9));L(this,"isLost",false);L(this,"callbacks");L(this,"handleLost",()=>{var e2,n2;this.isLost=true,this.textures.clear(),(n2=(e2=this.callbacks).onLost)==null||n2.call(e2)});this.canvas=e,this.gl=n,this.callbacks=o,this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE)||4096;const r=xp(n,_p,wp);this.program=r,this.uniforms={matrix:n.getUniformLocation(r,"u_matrix"),crop:n.getUniformLocation(r,"u_crop"),opacity:n.getUniformLocation(r,"u_opacity"),texture:n.getUniformLocation(r,"u_texture")};const s=n.createVertexArray();n.bindVertexArray(s);const i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),n.STATIC_DRAW);const a=n.getAttribLocation(r,"a_position");n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,false,0,0),n.bindVertexArray(null),this.vao=s,n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL),e.addEventListener("webglcontextlost",this.handleLost)}static create(e,n={}){let o=null;try{o=e.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{o=null}if(!o||typeof o.createShader!="function")return null;try{return new vo(e,o,n)}catch{return null}}resize(e,n,o){this.cssWidth=Math.max(1,e),this.cssHeight=Math.max(1,n),this.pixelRatio=o;const r=Math.max(1,Math.round(e*o)),s=Math.max(1,Math.round(n*o));this.canvas.width!==r&&(this.canvas.width=r),this.canvas.height!==s&&(this.canvas.height=s)}begin(){if(this.isLost)return;const e=this.gl;e.viewport(0,0,this.canvas.width,this.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(this.program),e.bindVertexArray(this.vao),e.activeTexture(e.TEXTURE0),e.uniform1i(this.uniforms.texture,0)}draw(e){if(this.isLost||!yp(e.source))return"skipped";const n=this.gl,o=this.upload(e);if(o==="tainted")return"tainted";if(!o)return"skipped";const r=e.crop??{x:0,y:0,width:e.width,height:e.height},s=bp(e,this.pixelRatio),i=fe(e.transform,se(r.x,r.y),de(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,Bh(i,this.cssWidth,this.cssHeight,this.matrixScratch)),n.uniform4f(this.uniforms.crop,r.x/e.width,r.y/e.height,r.width/e.width,r.height/e.height),n.uniform1f(this.uniforms.opacity,e.opacity),n.bindTexture(n.TEXTURE_2D,o.texture),n.drawArrays(n.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(e){return!this.isLost&&this.textures.has(e)}release(e){const n=this.textures.get(e);n&&(this.isLost||this.gl.deleteTexture(n.texture),this.textures.delete(e))}dispose(){var e;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const n of[...this.textures.keys()])this.release(n);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(e=this.gl.getExtension("WEBGL_lose_context"))==null||e.loseContext(),this.isLost=true}upload(e){const n=this.gl,o=this.textures.get(e.key);if(o&&o.width===e.width&&o.height===e.height)return o;const r=(o==null?void 0:o.texture)??n.createTexture();if(!r)return null;n.bindTexture(n.TEXTURE_2D,r);try{n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e.source)}catch(i){if(o||n.deleteTexture(r),Sp(i))return"tainted";throw i}n.generateMipmap(n.TEXTURE_2D),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR_MIPMAP_LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);const s={texture:r,width:e.width,height:e.height};return this.textures.set(e.key,s),s}}function xp(t,e,n){const o=ea(t,t.VERTEX_SHADER,e),r=ea(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(!s)throw new Error("Could not create WebGL program");if(t.attachShader(s,o),t.attachShader(s,r),t.linkProgram(s),t.deleteShader(o),t.deleteShader(r),!t.getProgramParameter(s,t.LINK_STATUS)){const i=t.getProgramInfoLog(s);throw t.deleteProgram(s),new Error(`Could not link WebGL program: ${i}`)}return s}function ea(t,e,n){const o=t.createShader(e);if(!o)throw new Error("Could not create WebGL shader");if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const r=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error(`Could not compile WebGL shader: ${r}`)}return o}function Sp(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Zc(t,e){return fe(se(e.width/2,e.height/2),Fn(t.rotation),de(t.zoom),se(-t.x,-t.y))}function Gc(t,e){return fe(se(t.x,t.y),de(1/t.zoom),Fn(-t.rotation),se(-e.width/2,-e.height/2))}function na(t,e,n){return _e(Gc(t,e),n)}function kp(t,e,n){return _e(Zc(t,e),n)}function $r(t,e){return Po(Gc(t,e),{x:0,y:0,width:e.width,height:e.height})}function Cp(t,e,n=0,o=0){const r=Po(Fn(n),t),s=Math.max(1,e.width*(1-o*2)),i=Math.max(1,e.height*(1-o*2)),a=Math.min(s/Math.max(r.width,Number.EPSILON),i/Math.max(r.height,Number.EPSILON)),c=Uc(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function yo(t,e,n,o,r){const s=_e(fe(de(1/n),Fn(-o)),{x:e.x-r.width/2,y:e.y-r.height/2});return{x:t.x-s.x,y:t.y-s.y}}function oa(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const Ep=.09,Mp=1e-4,ra=.05,Tp=1e-4;class Ip{constructor(e,n=Ep,o){L(this,"current");L(this,"target",null);L(this,"timeConstant");L(this,"spring");L(this,"start");L(this,"elapsed",0);this.current={...e},this.start={...e},this.timeConstant=n,this.spring=o}get destination(){return this.target?{...this.target.state}:{...this.current}}set(e){this.current={...e},this.target=null}animateTo(e,n,o=false){const r=this.spring?this.spring.duration<=0:this.timeConstant===0;if(o||r){this.set(e.state);return}let s=e.anchor;if(s){const i=yo(s.world,s.screen,e.state.zoom,e.state.rotation,n);Math.hypot(i.x-e.state.x,i.y-e.state.y)*e.state.zoom>ra&&(s=void 0)}this.start={...this.current},this.elapsed=0,this.target={state:{...e.state},anchor:s}}stop(){this.target=null}step(e,n){const o=this.target;if(!o)return false;const r=o.state;let s,i;if(this.spring){this.elapsed+=Math.max(e,0);const u=this.elapsed/this.spring.duration;if(u>=1)return this.current={...r},this.target=null,false;const p=this.spring.stiffness;s=this.start,i=(1-Math.exp(-p*u))/(1-Math.exp(-p))}else s=this.current,i=1-Math.exp(-Math.max(e,0)/this.timeConstant);const a=Math.exp(Math.log(s.zoom)+(Math.log(r.zoom)-Math.log(s.zoom))*i),c=s.rotation+(r.rotation-s.rotation)*i,l=o.anchor?yo(o.anchor.world,o.anchor.screen,a,c,n):{x:s.x+(r.x-s.x)*i,y:s.y+(r.y-s.y)*i};return this.current={x:l.x,y:l.y,zoom:a,rotation:c},this.spring?true:Math.abs(Math.log(r.zoom/a))<Mp&&Math.abs(r.rotation-c)<Tp&&Math.hypot(r.x-l.x,r.y-l.y)*a<ra?(this.current={...r},this.target=null,false):true}}const Xc=5,sa=300,Lp=Xc*4;function ia(t,e=false){return t==="touch"||t==="pen"&&!e}function Pp(t){return t.pointerType==="pen"&&t.buttons===0}function Ap(t,e,n){for(let o=t;o&&o!==e;o=o.parentElement)if((n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)>=1&&/auto|scroll/.test(getComputedStyle(o).overflowY))return true;return false}function aa(t,e){var o;let n=t;for(;n&&n!==e;){if(n instanceof HTMLButtonElement||n instanceof HTMLAnchorElement||n instanceof HTMLInputElement||n instanceof HTMLLabelElement||n instanceof HTMLSelectElement||((o=n.dataset)==null?void 0:o.cloverCanvasInteractive)!==void 0)return true;n=n.parentElement}return false}const Fr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},ur=2,ca=1.5,la=.1,Op=100,Np=.002,Rp=.01;class Bp{constructor(e,n,o=Fr){L(this,"pointers",new Map);L(this,"samples",[]);L(this,"down",null);L(this,"pinch",null);L(this,"lastTap",null);L(this,"lastPointerType","");L(this,"penHovers",false);L(this,"onPointerDown",e2=>{var o2,r;if(this.lastPointerType=e2.pointerType,e2.pointerType==="mouse"&&e2.button!==0||aa(e2.target,this.element))return;(r=(o2=this.element).setPointerCapture)==null||r.call(o2,e2.pointerId);const n2=this.local(e2);this.pointers.set(e2.pointerId,n2),this.pointers.size===1?(this.down={x:n2.x,y:n2.y,t:e2.timeStamp,moved:false},this.samples=[{x:n2.x,y:n2.y,t:e2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});L(this,"onPointerMove",e2=>{var r;Pp(e2)&&(this.penHovers=true);const n2=this.pointers.get(e2.pointerId);if(!n2)return;const o2=this.local(e2);if(this.pointers.set(e2.pointerId,o2),this.pointers.size===1){const s=o2.x-n2.x,i=o2.y-n2.y;this.down&&Math.hypot(o2.x-this.down.x,o2.y-this.down.y)>Xc&&(this.down.moved=true),(r=this.down)!=null&&r.moved&&this.options.navigable&&this.target.panBy(s,i,!this.tracksPointer(e2.pointerType)),this.samples.push({x:o2.x,y:o2.y,t:e2.timeStamp});const a=e2.timeStamp-Op;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 s=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(s.distance/this.pinch.distance,s.mid,false),this.target.panBy(s.mid.x-this.pinch.mid.x,s.mid.y-this.pinch.mid.y,false),this.pinch=s}});L(this,"onPointerUp",e2=>{var c,l,d,u,p,h;if(!this.pointers.has(e2.pointerId))return;if(this.pointers.delete(e2.pointerId),(l=(c=this.element).releasePointerCapture)==null||l.call(c,e2.pointerId),this.pointers.size===1){this.pinch=null;const[m]=this.pointers.values();this.samples=[{...m,t:e2.timeStamp}];return}if(this.pointers.size>0)return;const n2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!n2)return;const o2=this.local(e2);if(!n2.moved&&e2.type==="pointerup"&&e2.timeStamp-n2.t<sa){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(ia(e2.pointerType,this.penHovers)){const m=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&m&&e2.timeStamp-m.t<sa&&Math.hypot(o2.x-m.x,o2.y-m.y)<Lp?(this.lastTap=null,this.zoomIn(o2)):this.lastTap={x:o2.x,y:o2.y,t:e2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?e2.shiftKey?this.target.zoomBy(1/ur,o2,true):this.zoomIn(o2):(h=(p=this.target).tap)==null||h.call(p,o2);return}if(!this.options.navigable||!this.tracksPointer(e2.pointerType))return;const s=this.samples[0],i=this.samples[this.samples.length-1],a=((i==null?void 0:i.t)??0)-((s==null?void 0:s.t)??0);if(s&&i&&a>0&&e2.timeStamp-i.t<50){const m=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,b=this.options.flickMomentum;b>0&&Math.hypot(m,g)>this.options.flickMinSpeed&&this.target.panBy(m*b,g*b,true)}});L(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||ia(this.lastPointerType,this.penHovers)||aa(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/ur,this.local(e2),true):this.zoomIn(this.local(e2))))});L(this,"onWheel",e2=>{const n2=e2.ctrlKey;if(!this.options.navigable||!n2&&!this.options.scrollToZoom||!n2&&Ap(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=$p(e2),r=n2?Rp:Np;this.target.zoomBy(Math.exp(-o2*r),this.local(e2),!n2)});L(this,"onKeyDown",e2=>{if(e2.target!==this.element||!this.options.navigable||e2.altKey||e2.metaKey||e2.ctrlKey)return;const n2=this.element.getBoundingClientRect(),o2=n2.width*la*(e2.shiftKey?3:1),r=n2.height*la*(e2.shiftKey?3:1);switch(e2.key){case"ArrowLeft":this.target.panBy(o2,0,true);break;case"ArrowRight":this.target.panBy(-o2,0,true);break;case"ArrowUp":this.target.panBy(0,r,true);break;case"ArrowDown":this.target.panBy(0,-r,true);break;case"+":case"=":this.target.zoomBy(ca,void 0,true);break;case"-":case"_":this.target.zoomBy(1/ca,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}e2.preventDefault()});this.element=e,this.target=n,this.options=o,e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("dblclick",this.onDoubleClick),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("keydown",this.onKeyDown)}setOptions(e){this.options=e}dispose(){const e=this.element;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("dblclick",this.onDoubleClick),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown)}local(e){const n=this.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}zoomIn(e){var n,o;(o=(n=this.target).atMaxZoom)!=null&&o.call(n)?this.target.home():this.target.zoomBy(ur,e,true)}tracksPointer(e){return e==="touch"||this.options.flickEnabled}pinchState(){const[e,n]=[...this.pointers.values()];return{distance:Math.hypot(n.x-e.x,n.y-e.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}}function $p(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class Yc extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const ua=new Set;async function Fp(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=Hd(r),i=zp(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return dr(t,{signal:n,cors:true,withCredentials:s});if(i&&ua.has(i))return dr(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await ds(r,t,{mode:"cors",signal:n})}catch(p){if(Hp(p,n))throw p;const h=await dr(t,{signal:n,cors:false,withCredentials:s});return i&&ua.add(i),h}if(!a.ok)throw new Yc(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await Dp(c);const d=l.width,u=l.height;if(o&&(l.width>o||l.height>o)){const p=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*p)),resizeHeight:Math.max(1,Math.floor(l.height*p)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),Dr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:d,naturalHeight:u,opaque:false}}async function Dp(t){const e={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(t,e)}catch(n){if(n instanceof TypeError)return createImageBitmap(t);throw n}}function dr(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Dr());return}const i=new Image;i.decoding="async",n&&(i.crossOrigin=o?"use-credentials":"anonymous");const a=()=>{i.onload=null,i.onerror=null,e==null||e.removeEventListener("abort",c)},c=()=>{a(),i.src="",s(Dr())};e==null||e.addEventListener("abort",c),i.onload=()=>{a();const l=()=>r({kind:"element",source:i,width:i.naturalWidth,height:i.naturalHeight,naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,opaque:!n});typeof i.decode=="function"?i.decode().then(l,l):l()},i.onerror=()=>{a(),s(new Yc("Image failed to load",t))},i.src=t})}function zp(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function Hp(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Dr(){const t=new Error("Aborted");return t.name="AbortError",t}function da(t){t.kind==="bitmap"&&t.source.close()}const Wp=192*1024*1024,Up=6,jp=2;class Vp{constructor(e){L(this,"entries",new Map);L(this,"inFlight",0);L(this,"frame",0);L(this,"bytes",0);L(this,"wanted",[]);L(this,"disposed",false);L(this,"budget");L(this,"maxInFlight");this.options=e,this.budget=e.byteBudget??Wp,this.maxInFlight=e.maxInFlight??Up}get(e){const n=this.entries.get(e);if((n==null?void 0:n.state)==="ready")return n.lastUsed=this.frame,n.image}has(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="ready"}failed(e){var n;return((n=this.entries.get(e))==null?void 0:n.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(e,n){var r;const o=this.entries.get(e);(o==null?void 0:o.state)!=="ready"&&((r=o==null?void 0:o.controller)==null||r.abort(),this.entries.set(e,{url:e,state:"ready",image:n,bytes:fr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=fr(n),this.flushWaiters(e))}prefetch(e){return Promise.all(e.map(n=>new Promise(o=>{const r=this.entries.get(n.url);if(r&&r.state!=="loading")return o();if(r){r.waiters.push(o);return}this.start({...n,priority:-1},o)}))).then(()=>{})}update(e){if(this.disposed)return;this.frame++;const n=new Set(e.map(o=>o.url));this.wanted=[...e].sort((o,r)=>o.priority-r.priority);for(const o of this.entries.values())o.state==="loading"&&!o.pinned&&!n.has(o.url)&&o.controller&&(o.controller.abort(),this.entries.delete(o.url),this.inFlight--);for(const o of this.wanted){const r=this.entries.get(o.url);r&&(r.lastUsed=this.frame)}this.pump(),this.evict(n)}dispose(){var e;this.disposed=true;for(const n of this.entries.values())(e=n.controller)==null||e.abort(),this.flushWaiters(n.url);this.entries.clear(),this.bytes=0}forEachReady(e){for(const n of this.entries.values())n.state==="ready"&&n.image&&e(n.url,n.image)}pump(){for(const e of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(e.url)||this.start(e)}}start(e,n){const o=new AbortController,r={url:e.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:o,pinned:!!n,waiters:n?[n]:[]};this.entries.set(e.url,r),this.inFlight++,this.attempt(r,e,o,e.url)}attempt(e,n,o,r){e.attempts++,this.options.load(r,o.signal).then(s=>{if(this.disposed||this.entries.get(e.url)!==e){da(s);return}e.state="ready",e.image=s,e.bytes=fr(s),e.controller=void 0,e.pinned=false,this.bytes+=e.bytes,this.settle(e)},s=>{if(!(o.signal.aborted||this.disposed)&&this.entries.get(e.url)===e){if(e.attempts<jp&&!qp(s,n)){this.attempt(e,n,o,n.fallbackUrl??n.url);return}e.state="failed",e.controller=void 0,e.pinned=false,this.settle(e)}})}settle(e){this.inFlight--,this.flushWaiters(e.url),this.options.onSettled(),this.pump()}flushWaiters(e){const n=this.entries.get(e);if(!n)return;const o=n.waiters;n.waiters=[],o.forEach(r=>r())}evict(e){if(this.bytes<=this.budget)return;const n=[...this.entries.values()].filter(o=>o.state==="ready"&&!e.has(o.url)).sort((o,r)=>o.lastUsed-r.lastUsed);for(const o of n){if(this.bytes<=this.budget)break;this.entries.delete(o.url),this.bytes-=o.bytes,o.image&&da(o.image),this.options.onEvict(o.url)}}}function fr(t){return t.width*t.height*4}function qp(t,e){if(e.fallbackUrl)return false;const n=t==null?void 0:t.status;return typeof n=="number"&&n>=400&&n<500&&n!==408&&n!==429}const Kp=.1;class Zp{constructor(e,n=r=>requestAnimationFrame(r),o=r=>cancelAnimationFrame(r)){L(this,"handle",0);L(this,"last",0);L(this,"disposed",false);L(this,"frame",e2=>{if(this.handle=0,this.disposed)return;const n2=this.last?Math.min((e2-this.last)/1e3,Kp):1/60;this.last=e2,this.tick(n2,e2)?this.invalidate():this.last=0});this.tick=e,this.raf=n,this.caf=o}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 Gp=2*1024*1024;function Xp(t,e,n=Gp){const o=new Set;let r=n,s=false;return{get deferred(){return s},getTile(i){const a=t(i);if(!a||a.kind==="media"||a.opaque||o.has(i)||e(i))return a;const c=a.width*a.height*4;if(o.size>0&&c>r){s=true;return}return r-=c,o.add(i),a}}}function Yp(t){const e=/^(!)?(\d+(?:\.\d+)?)$/.exec((t==null?void 0:t.trim())??"");if(!e)return null;const n=Number(e[2]);if(n>360)return null;const o=n%360,r=!!e[1];return o||r?{degrees:o,mirror:r}:null}function Jp(t,e,n){if(!t)return null;let o=t.trim().replace(/^xywh=/,""),r=false;o.startsWith("pct:")?(r=true,o=o.slice(4)):o.startsWith("pixel:")&&(o=o.slice(6));const s=o.split(",").map(Number);if(s.length!==4||s.some(m=>!Number.isFinite(m)))return null;let[i,a,c,l]=s;r&&(i=i/100*e,a=a/100*n,c=c/100*e,l=l/100*n);const d=Math.max(0,i),u=Math.max(0,a),p=Math.min(e,i+c),h=Math.min(n,a+l);return p<=d||h<=u?null:{x:d,y:u,width:p-d,height:h-u}}const hr=512,Qp=16e6;function Jc(t,e,n){return{width:e,height:n,levels:[{scaleFactor:1,width:e,height:n,tileWidth:e,tileHeight:n,cols:1,rows:1}],tile:r=>({...r,url:t,region:{x:0,y:0,width:e,height:n}})}}function tm(t){const{width:e,height:n}=t,o=[],r=t.regionByPx&&t.sizeByW,s=(p,h,m)=>{const g=Math.ceil(e/p),b=Math.ceil(n/p);return{scaleFactor:p,width:g,height:b,tileWidth:h,tileHeight:m,cols:Math.ceil(g/h),rows:Math.ceil(b/m)}},i=(p,h)=>({scaleFactor:e/p,width:p,height:h,tileWidth:p,tileHeight:h,cols:1,rows:1,whole:true}),a=t.tiles[0];if(a)for(const p of a.scaleFactors)o.push(s(p,a.width,a.height));else if(r)for(let p=1;;p*=2){const h=s(p,hr,hr);if(o.push(h),h.cols===1&&h.rows===1)break}const c=Math.max(0,...o.map(p=>p.scaleFactor));for(const p of t.sizes){const h=e/p.width;em(t,p.width,p.height)&&h>c+1e-9&&o.push(i(p.width,p.height))}const l=o.reduce((p,h)=>!p||h.scaleFactor>p.scaleFactor?h:p,null);if(l&&l.cols*l.rows>1&&t.sizeByW){const p=Math.max(e,n)/hr;o.push(i(Math.ceil(e/p),Math.ceil(n/p)))}(!o.length||!a&&!r&&e*n<=Qp)&&(o.some(p=>p.scaleFactor===1)||o.push(i(e,n)));const d=nm(o).sort((p,h)=>h.scaleFactor-p.scaleFactor),u=ah(t);return{width:e,height:n,levels:d,tile(p){const h=d[p.level],m=h.scaleFactor,g=h.cols===1&&h.rows===1;let b,v,S;if(g)b={x:0,y:0,width:e,height:n},v=h.width,S=h.height;else{const k=Math.round(p.col*h.tileWidth*m),y=Math.round(p.row*h.tileHeight*m);b={x:k,y,width:Math.min(Math.round(h.tileWidth*m),e-k),height:Math.min(Math.round(h.tileHeight*m),n-y)},v=Math.ceil(b.width/m),S=Math.ceil(b.height/m)}return{...p,region:b,url:po(t,b,v,S),fallbackUrl:u?po(t,b,v,S,u):void 0}}}}function em(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function nm(t){const e=new Map;for(const n of t){const o=`${n.width}x${n.height}`,r=e.get(o);(!r||r.cols*r.rows<n.cols*n.rows)&&e.set(o,n)}return[...e.values()]}function om(t,e){const n=t.levels;for(let o=0;o<n.length;o++)if(n[o].scaleFactor<=e*(1+1e-6))return o;return n.length-1}function Pe(t,e,n){const o=t.levels[e],r=o.tileWidth*o.scaleFactor,s=o.tileHeight*o.scaleFactor,i=Math.max(0,n.x),a=Math.max(0,n.y),c=Math.min(t.width,n.x+n.width),l=Math.min(t.height,n.y+n.height);if(c<=i||l<=a)return[];const d=Math.max(0,Math.floor(i/r)),u=Math.min(o.cols-1,Math.floor((c-1e-9)/r)),p=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),m=[];for(let g=p;g<=h;g++)for(let b=d;b<=u;b++)m.push({level:e,col:b,row:g});return m}async function rm(t,e){if(t.media)return sm(t,t.media);let n=null,o=null;if(t.service)try{n=tm(await ys(t.service,e.infoOptions))}catch(p){o=p}if(!n){if(!t.url)throw o??new Error("Image has no source");const p=await e.loadStatic(t.url);e.cache.seed(t.url,p),n=Jc(t.url,p.naturalWidth,p.naturalHeight)}const r=t.width&&t.height&&t.width>0&&t.height>0?{width:t.width,height:t.height}:{width:n.width,height:n.height},s=Jp(t.region,r.width,r.height)??{x:0,y:0,width:r.width,height:r.height},i=n.width/r.width,a=n.height/r.height,c={x:s.x*i,y:s.y*a,width:s.width*i,height:s.height*a},l=Yp(t.rotation),d=l?im(c,l):void 0,u={id:t.id,spec:t,pyramid:n,size:r,clip:c,contentClip:s,rect:{x:0,y:0,width:s.width,height:s.height},...d?{turn:d}:{}};return await e.cache.prefetch(Pe(n,0,c).map(p=>{const h=n.tile(p);return{url:h.url,fallbackUrl:h.fallbackUrl}})),u}const Qc="media:";function sm(t,e){var a,c;const n=t.width||((a=t.placement)==null?void 0:a.width)||e.element.videoWidth||1600,o=t.height||((c=t.placement)==null?void 0:c.height)||e.element.videoHeight||900,r=`${Qc}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Jc(r,n,o),media:{kind:"media",source:e.element,width:n,height:o,naturalWidth:n,naturalHeight:o},size:s,clip:i,contentClip:i,rect:{...i}}}function im(t,{degrees:e,mirror:n}){const o=e*Math.PI/180,r=d=>Math.abs(d)<1e-12?0:d,s=r(Math.cos(o)),i=r(Math.sin(o)),a=Math.abs(t.width*s)+Math.abs(t.height*i),c=Math.abs(t.width*i)+Math.abs(t.height*s),l=fe(se(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},de(n?-1:1,1),se(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:Rh(l),width:a,height:c}}function tl(t){var e;return((e=t.turn)==null?void 0:e.orient)??se(-t.clip.x,-t.clip.y)}function am(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Po(n.unorient,e),s=Math.max(r.x,o.x),i=Math.max(r.y,o.y);return{x:s,y:i,width:Math.max(0,Math.min(r.x+r.width,o.x+o.width)-s),height:Math.max(0,Math.min(r.y+r.height,o.y+o.height)-i)}}function cm(t,e){const{turn:n,clip:o}=t;return n?_e(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function fa(t){const{turn:e,clip:n,contentClip:o}=t;return e?{width:e.width*o.width/n.width,height:e.height*o.height/n.height}:o}function lm(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return ws(t.map(o=>o.rect))}const e=fa(t[0]).height;let n=0;for(const o of t){const r=fa(o),s=r.width*e/r.height;o.rect={x:n,y:0,width:s,height:e},n+=s}return{x:0,y:0,width:n,height:e}}function Ao(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function um(t){const e=Ao(t);return fe(se(t.rect.x,t.rect.y),de(e.x,e.y),tl(t))}function dm(t,e){var n,o;return t.service===e.service&&t.url===e.url&&t.width===e.width&&t.height===e.height&&t.region===e.region&&t.rotation===e.rotation&&((n=t.media)==null?void 0:n.element)===((o=e.media)==null?void 0:o.element)&&JSON.stringify(t.placement)===JSON.stringify(e.placement)}const fm=1e7,hm=15e6,pm=2e7,mm=2;function gm(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=Zc(n,o),c=[],l=[],d=[],u=(p,h,m)=>{const g=p.tile(h);l.push({url:g.url,fallbackUrl:g.fallbackUrl,priority:m})};for(const p of e){const{pyramid:h,clip:m,rect:g}=p,b=Ao(p);if(t.wantOverview)for(const Z of Pe(h,0,m))u(h,Z,pm);const v=ha(p,n,o,r),S=i?ha(p,i,o,r):v;if(d.push((v==null?void 0:v.target)??-1),!v&&!S)continue;const k=Z=>ot=>{const M=h.tile(ot).region;return Math.hypot(M.x+M.width/2-Z.x,M.y+M.height/2-Z.y)};if(S){const Z=k(S.center);for(const ot of Pe(h,0,S.area))u(h,ot,Z(ot)/1e3);if(S.target>0)for(const ot of Pe(h,S.target,S.area))u(h,ot,fm+Z(ot))}if(!v)continue;const{area:y,target:w}=v,x=k(v.center),$=Pe(h,0,y),O=w===0?[]:Pe(h,w,y);if(S!==v){for(const ot of $)u(h,ot,x(ot)/1e3);const Z=w-mm;if(Z>0)for(const ot of Pe(h,Z,y))u(h,ot,hm+x(ot))}if(p.spec.hidden)continue;const U=(w===0?$:O).every(Z=>s(h.tile(Z).url)!==void 0)?[w]:Array.from({length:w+1},(Z,ot)=>ot),tt=fe(a,se(g.x,g.y),de(b.x,b.y),tl(p));for(const Z of U){const ot=Z===0?$:Z===w?O:Pe(h,Z,y),M=h.levels[Z].cols*h.levels[Z].rows>1;for(const T of ot){const N=h.tile(T),j=s(N.url);if(!j)continue;const et=vm(p,N.region,j,tt,M);et&&c.push({...et,url:N.url})}}}return l.sort((p,h)=>p.priority-h.priority),{draws:c,wants:ym(l),levels:d}}function ha(t,e,n,o){const{pyramid:r,rect:s}=t,i=$r(e,n);if(!Fh(i,s))return null;const a=Ao(t),c=Math.max(i.x,s.x),l=Math.max(i.y,s.y),d=Math.min(i.x+i.width,s.x+s.width),u=Math.min(i.y+i.height,s.y+s.height),p=1/(a.x*e.zoom*o);return{area:am(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:cm(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:om(r,p)}}function vm(t,e,n,o,r){const{clip:s}=t,i=Math.max(e.x,s.x),a=Math.max(e.y,s.y),c=Math.min(e.x+e.width,s.x+s.width),l=Math.min(e.y+e.height,s.y+s.height);if(c<=i||l<=a)return null;const d=n.width/e.width,u=n.height/e.height,p=1e-6;return{item:t,image:n,transform:fe(o,se(e.x,e.y),de(1/d,1/u)),crop:{x:(i-e.x)*d,y:(a-e.y)*u,width:(c-i)*d,height:(l-a)*u},bleed:{right:r&&c<s.x+s.width-p,bottom:r&&l<s.y+s.height-p}}}function ym(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const bm={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},_m=2,wm=3,xm=.1,pr=1e-6,zr={top:0,right:0,bottom:0,left:0};function pa(t,e="padding"){if(!t||typeof getComputedStyle!="function")return zr;const n=getComputedStyle(t),o=r=>parseFloat(n.getPropertyValue(`${e}-${r}`))||0;return{top:o("top"),right:o("right"),bottom:o("bottom"),left:o("left")}}const Sm=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let km;class Cm{constructor(e,n={}){L(this,"host");L(this,"overlays",null);L(this,"options");L(this,"backend",null);L(this,"backendPreference");L(this,"contextLosses",0);L(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});L(this,"visible",true);L(this,"dom",null);L(this,"domAsked",false);L(this,"pending",null);L(this,"camera");L(this,"loop");L(this,"gestures");L(this,"gestureOptions",{});L(this,"cache");L(this,"navigator",null);L(this,"navigatorAsked",0);L(this,"viewport",{width:1,height:1});L(this,"inset",zr);L(this,"pixelRatio",1);L(this,"items",[]);L(this,"worldBounds",null);L(this,"contentVersion",0);L(this,"opaqueUrls",new Set);L(this,"mediaByKey",new Map);L(this,"detachMedia",[]);L(this,"opened",false);L(this,"atHome",true);L(this,"interacting",false);L(this,"lastEmitted",null);L(this,"generation",0);L(this,"listeners",new Map);L(this,"unloadable",false);L(this,"resizeObserver",null);L(this,"intersectionObserver",null);L(this,"releaseTimer",null);L(this,"dprQuery",null);L(this,"disposed",false);L(this,"dismisser",null);L(this,"tick",e2=>{var c,l;if(this.disposed)return false;const n2=this.camera.step(e2,this.viewport),o2=this.camera.current,r2=this.backend,s=Xp(this.getTile,d=>r2?r2.has(d):true),i=gm({items:this.items,camera:o2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=i.wants.filter(d=>!d.url.startsWith(Qc));return this.cache.update(a),i.draws.length?this.setUnloadable(false):a.length&&a.every(d=>this.cache.failed(d.url))&&this.setUnloadable(true),this.paint(i.draws),(c=this.overlays)==null||c.position(o2,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(d=>!d.spec.hidden),this.worldBounds,$r(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!oa(this.lastEmitted,o2))&&(this.lastEmitted={...o2},this.opened&&this.emit("viewport")),n2||s.deferred});L(this,"getTile",e2=>this.mediaByKey.get(e2)??this.cache.get(e2));L(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});L(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=e,this.backendPreference=n.backend??"auto",this.options={...bm,...mr(n)},ga()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new Ip({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new Zp(this.tick),this.gestureOptions=mr(n.gestures??{}),ga()&&(this.gestureOptions.flickMomentum=0),this.gestures=new Bp(e,this,{...Fr,...this.gestureOptions}),this.cache=new Vp({load:(s,i)=>this.loadTile(s,i),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:s=>{var i;return(i=this.backend)==null?void 0:i.release(s)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Em(e),this.visible?this.acquireBackend():this.holder.hiddenSince=ma(),this.measure(),this.observe()}get backendKind(){var e;return((e=this.backend)==null?void 0:e.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>o==null?void 0:o.delete(n)}async setImages(e,{world:n,fit:o=false}={}){const r=++this.generation,s=new Map(this.items.map(d=>[d.id,d])),i=await Promise.allSettled(e.map(d=>{const u=s.get(d.id);return u&&dm(u.spec,d)?(u.spec=d,Promise.resolve(u)):rm(d,{cache:this.cache,loadStatic:p=>this.loadTile(p),infoOptions:{request:this.options.request}})}));if(r!==this.generation||this.disposed)return;const a=i.filter(d=>d.status==="fulfilled").map(d=>d.value),c=i.filter(d=>d.status==="rejected").map(d=>d.reason);this.items=a,this.watchMedia(a);const l=lm(a);if(this.worldBounds=n?l?ws([n,l]):n:l,this.contentVersion++,c.length&&this.emit("error",c),this.setUnloadable(e.length>0&&!a.length&&c.length>0),!this.worldBounds){this.invalidate();return}this.opened?o?(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(e){const n=new Set(e);let o=false;for(const r of this.items){const s=n.has(r.id);!!r.spec.hidden!==s&&(r.spec={...r.spec,hidden:s},o=true)}o&&this.invalidate()}isReady(e){const n=this.items.find(r=>r.id===e);if(!n)return false;if(n.spec.media)return true;const o=n.pyramid.levels[0];if(!o)return false;for(let r=0;r<o.rows;r++)for(let s=0;s<o.cols;s++)if(!this.getTile(n.pyramid.tile({level:0,col:s,row:r}).url))return false;return true}fitBounds(e,n=false,o=zr){const r=this.fit(e,this.camera.destination.rotation,o);this.atHome=false,this.animateTo(this.constrain(r,{allowBeyondLimits:true}),n)}fit(e,n,{top:o,right:r,bottom:s,left:i},a=1/0){const{width:c,height:l}=this.viewport,d=Cp(e,{width:Math.max(1,c-i-r),height:Math.max(1,l-o-s)},n),u=Math.min(d.zoom,a);return{...yo(Uc(e),{x:(c+i-r)/2,y:(l+o-s)/2},u,n,this.viewport),zoom:u,rotation:n}}fitItemRect(e,n,o=false){const r=this.itemRectToWorld(e,n);r&&this.fitAnnotation(r,o)}fitAnnotation(e,n=false){var s;const o=this.items[0];if(!o)return;const r=o.rect.width*xm;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,pa((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return $r(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var n;const e=((n=this.homeCamera())==null?void 0:n.zoom)??1;return{home:e,min:e*this.options.minZoomImageRatio,max:Math.max(e,this.closestZoom())}}closestZoom(){const e=this.items.length?Math.min(...this.items.map(n=>Ao(n).x)):1;return this.options.maxZoomPixelRatio/e}home(e=false){const n=this.homeCamera();if(!n)return;const o=this.atHome;this.atHome=true,this.animateTo(n,e),!o&&this.opened&&this.emit("viewport")}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-pr)}viewLimits(){const{zoom:e,x:n,y:o,rotation:r}=this.camera.destination,{min:s,max:i}=this.getZoomLimits(),a=this.atHome?this.homeCamera():null;return{atMax:e>=i*(1-pr),atMin:e<=s*(1+pr),atHome:this.atHome&&(!a||Math.abs(e/a.zoom-1)<.001&&Math.hypot(n-a.x,o-a.y)*e<.5&&Math.abs(r-a.rotation)<.001)}}zoomBy(e,n,o=true){const r=o?this.camera.destination:this.camera.current,s=n??{x:this.viewport.width/2,y:this.viewport.height/2},i=na(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=wn(r.zoom*e,a,c),d=yo(i,s,l,r.rotation,this.viewport),u=this.constrain({...r,...d,zoom:l});this.atHome=false,o?this.camera.animateTo({state:u,anchor:{world:i,screen:s}},this.viewport):this.camera.set(u),this.invalidate()}panBy(e,n,o=false){const r=o?this.camera.destination:this.camera.current,s=_e(fe(de(1/r.zoom),Fn(-r.rotation)),{x:e,y:n}),i=this.constrain({...r,x:r.x-s.x,y:r.y-s.y});this.atHome=false,o?this.camera.animateTo({state:i},this.viewport):this.camera.set(i),this.invalidate()}panTo(e,n=false){const o=n?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...o,...e}),n)}rotateBy(e){const n=this.camera.destination;this.setRotation(n.rotation*180/Math.PI+e)}setRotation(e,n=false){const o=this.camera.destination,r=e*Math.PI/180;this.animateTo(this.constrain({...o,rotation:r}),n)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(e){this.emit("tap",e)}setDismiss(e){this.dismisser=e}dismiss(){var e;return((e=this.dismisser)==null?void 0:e.call(this))??false}setGestures(e){this.gestures.setOptions({...Fr,...this.gestureOptions,...mr(e)})}setInteracting(e){if(this.interacting=e,e){this.camera.stop();return}if(this.options.constrainDuringPan)return;const n=this.camera.destination,o=this.constrain(n);oa(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return kp(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return na(this.camera.current,this.viewport,e)}itemRectToWorld(e,n){const o=this.items[e];if(!o)return null;const{contentClip:r,clip:s}=o;if(o.turn)return Po(fe(um(o),de(s.width/r.width,s.height/r.height)),n);const i=o.rect.width/r.width,a=o.rect.height/r.height;return{x:o.rect.x+(n.x-r.x)*i,y:o.rect.y+(n.y-r.y)*a,width:n.width*i,height:n.height*a}}attachNavigator(e){var s;(s=this.navigator)==null||s.dispose(),this.navigator=null;const n=++this.navigatorAsked;let o=null,r=false;return import("./Navigator-DRwnm5an.mjs").then(i=>{r||this.disposed||n!==this.navigatorAsked||(o=new i.Navigator(e,(a,c)=>this.panTo(a,c)),this.navigator=o,this.invalidate())}),()=>{r=true,o==null||o.dispose(),o&&this.navigator===o&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var e,n,o,r,s,i,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(e=this.resizeObserver)==null||e.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),(r=(o=this.dprQuery)==null?void 0:o.removeEventListener)==null||r.call(o,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(s=this.navigator)==null||s.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(i=this.dom)==null||i.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(c=>c()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(e){this.detachMedia.forEach(n=>n()),this.detachMedia=[],this.mediaByKey.clear();for(const n of e){if(!n.media||n.media.kind!=="media")continue;const o=n.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(o,n.media);const r=n.media.source,s=()=>this.invalidate(),i=["play","seeked","loadeddata","resize"];i.forEach(a=>r.addEventListener(a,s)),this.detachMedia.push(()=>i.forEach(a=>r.removeEventListener(a,s)))}}paint(e){const n=this.backend,o=[],r=(n==null?void 0:n.kind)==="webgl2";n==null||n.begin();for(const s of e){const{image:i}=s;if(!(i.kind==="media"||i.kind==="element"&&r&&(i.opaque||this.opaqueUrls.has(s.url)))&&n){if(n.draw({key:s.url,source:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1,bleed:s.bleed})!=="tainted"||i.kind==="bitmap")continue;this.opaqueUrls.add(s.url)}(i.kind==="element"||i.kind==="media")&&o.push({key:`${s.item.id}|${s.url}`,element:i.source,width:i.width,height:i.height,transform:s.transform,crop:s.crop,opacity:1})}n==null||n.end(),this.dom?this.dom.sync(o):o.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-wxV3sHPY.mjs").then(({DomLayers:s})=>{if(this.disposed)return;const i=new s(this.host);this.overlays&&this.host.insertBefore(i.container,this.overlays.container),this.dom=i,this.invalidate()}))}loadTile(e,n){return Fp(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof vo?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const e=2*Math.PI,n=Math.round(this.camera.destination.rotation/e)*e||0;return this.fit(this.worldBounds,n,this.inset,this.options.upscale?1/0:this.closestZoom())}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?wn(e.zoom,r,Math.max(s,e.zoom)):wn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:wn(e.x,o.x,o.x+o.width),y:wn(e.y,o.y,o.y+o.height)}}acquireBackend(e=true){var s,i;if(this.backend||this.pending||this.disposed)return;const n=document.createElement("canvas");n.className="clover-canvas-surface",n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(n,((s=this.dom)==null?void 0:s.container)??((i=this.overlays)==null?void 0:i.container)??null);const o=e&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<wm);let r=null;o&&(vp(this.holder)||this.backendPreference==="webgl2")&&(r=vo.create(n,{onLost:this.onContextLost}),r||ta(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(km??(km=import("./Canvas2DBackend-BFb2tuhl.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==n)return;this.pending=null;const c=a.create(n);c?this.install(c):this.none(n)}))}none(e){e.remove(),this.host.dataset.backend="none"}install(e){this.backend=e,this.host.dataset.backend=e.kind,e.resize(this.viewport.width,this.viewport.height,this.pixelRatio),e.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",e.kind),this.invalidate()}releaseBackend(){var n;if(ta(this.holder),(n=this.pending)==null||n.remove(),this.pending=null,!this.backend)return;const e=this.backend.canvas;this.backend.dispose(),e.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(e=>{const n=e.some(o=>o.isIntersecting);this.setVisible(n)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(e){var n;if(this.visible=e,e){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(n=this.holder).hiddenSince??(n.hiddenSince=ma()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(e=false){var c;const n=this.host.getBoundingClientRect(),o=Math.max(1,n.width),r=Math.max(1,n.height),s=pa(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,_m);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&Sm(s,this.inset))return;const a=this.viewport;if(this.viewport={width:o,height:r},this.inset=s,this.pixelRatio=i,(c=this.backend)==null||c.resize(o,r,i),this.opened){if(this.atHome)this.home(true);else{const l=this.camera.current,d=o/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*d}))}this.emit("viewport")}e?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var e,n,o,r;typeof window>"u"||typeof window.matchMedia!="function"||((n=(e=this.dprQuery)==null?void 0:e.removeEventListener)==null||n.call(e,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(r=(o=this.dprQuery).addEventListener)==null||r.call(o,"change",this.onPixelRatioChange))}setUnloadable(e){e!==this.unloadable&&(this.unloadable=e,this.emit("unloadable",e))}emit(e,n){var o;(o=this.listeners.get(e))==null||o.forEach(r=>r(n))}}const ma=()=>typeof performance<"u"?performance.now():Date.now();function Em(t){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:e,left:n,width:o,height:r}=t.getBoundingClientRect();return e+r>=0&&n+o>=0&&e<=window.innerHeight&&n<=window.innerWidth}function ga(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function mr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const Mm=(t,e)=>new Cm(t,e),Tm=gt(()=>import("./Connected-DbLzPNdX.mjs")),Im=gt(()=>import("./Connected-D_7Zs7Hq.mjs").then(t=>t.C));function Lm({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var m;const a=ae("Body");Tc(a.clover,r);const c=Ss(),l=bt(()=>lf(c),[c]),d=uf(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,p=((m=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:m.type)??"Canvas",h=it(g=>g.status==="loading");return f("div",{"aria-busy":h,className:Tt("clover-body",t),"data-renderer":u?"custom":p.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):p==="Scene"?f(xt,{fallback:f(En,{overlay:true}),children:f(Im,{...i,children:s})}):p==="Timeline"?f(xt,{fallback:f(En,{overlay:true}),children:f(Tm,{...i,children:s})}):f(mp,{...i,collapseControls:o,surface:Mm,children:s}),h&&f(En,{overlay:true})]})}const Pm={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Dn(t){return t.replace(/<br\s*\/?>/gi,`
24
- `).replace(/<[^>]*>/g,"").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(e,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return o>0&&o<=1114111?String.fromCodePoint(o):e}return Pm[n.toLowerCase()]??e})}const Am=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function Om(t,e=""){const n=t==null?void 0:t.split(";")[0].trim().toLowerCase();if(n)return n==="text/html"?"html":n==="text/markdown"?"markdown":"plain";const o=e.trim();return o.startsWith("<")&&o.endsWith(">")?"html":"plain"}function Nm(t){return t.replace(/\r\n?/g,`
25
- `).replace(/^\[\^[^\]]+\]:[ \t]*/gm,"").replace(/\[\^[^\]]+\]/g,"").replace(/^#{1,6}[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/gm,"$1").replace(/^[ \t]*(?:[-*+]|\d+[.)])[ \t]+/gm,"").replace(/\[([^\]]+)\]\((?:https?:\/\/|mailto:)[^\s)]+\)/g,"$1").replace(/\*\*([^*]+)\*\*|__([^_]+)__/g,(e,n,o)=>n??o).replace(/\*([^*\s][^*]*)\*|_([^_\s][^_]*)_/g,(e,n,o)=>n??o).replace(/\\\n/g,`
26
- `).replace(/\n\s*\n/g,`
27
- `).trim()}const Oo=(t,e)=>e==="canvas"?qe(t.manifest,t.canvasId):t.manifest,el=he(null),ks=()=>Ut(el),rn=ie(function({of:e="manifest",label:n,as:o="span",className:r,...s},i){var p;const a=Rn(h=>{var m,g;return e==="canvas"?(m=qe(h.manifest,h.canvasId))==null?void 0:m.label:(g=h.manifest)==null?void 0:g.label},void 0),c=ks(),l=(p=Re())==null?void 0:p.language,{text:d,lang:u}=_t(n??(c?c.label:a),l);return d?f(o,{ref:i,className:Tt("clover-label",r),...ut(u),...s,children:Dn(d)}):null});function Rm(t,e,n){const o=(d,u)=>Math.min(Math.max(Math.round(d),0),u),r=n?o(n.x*t.width,t.width-1):0,s=n?o(n.y*t.height,t.height-1):0,i={x:r,y:s,width:n?Math.max(1,o(n.width*t.width,t.width-r)):t.width,height:n?Math.max(1,o(n.height*t.height,t.height-s)):t.height},a=i.width===t.width&&i.height===t.height;if(!a&&!t.regionByPx)return null;if(t.sizeByW){let d=Math.min(1,e/Math.max(i.width,i.height));return t.maxWidth&&(d=Math.min(d,t.maxWidth/i.width)),t.maxHeight&&(d=Math.min(d,t.maxHeight/i.height)),t.maxArea&&(d=Math.min(d,Math.sqrt(t.maxArea/(i.width*i.height)))),po(t,i,Math.max(1,Math.floor(i.width*d)),Math.max(1,Math.floor(i.height*d)))}if(!a)return null;const c=[...t.sizes].sort((d,u)=>d.width-u.width),l=c.find(d=>Math.max(d.width,d.height)>=e)??c.at(-1)??{width:t.width,height:t.height};return po(t,i,l.width,l.height)}function sn(t){var e;return(e=ps(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function Bm(t,{width:e,height:n}){if(t==="full")return{x:0,y:0,width:1,height:1};const o=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(t);if(!o)return null;const[r,s,i,a]=o.slice(2).map(Number),[c,l]=o[1]?[100,100]:[e,n];return{x:r/c,y:s/l,width:i/c,height:a/l}}function we(t,e="full",n=false){if(!t)return null;const o=Io(t.service);if(o){if(e!=="full")return{service:o,region:e,fallback:t.id};const{width:r,height:s}=t;return n&&t.id&&r>0&&s>0?{service:o,fallback:t.id,fallbackSize:{width:r,height:s}}:{service:o,fallback:t.id}}return t.id?{src:t.id}:null}function Cs(t){const e=t;return e?we(W(e.thumbnail)[0],"full",true)??we(sn(e))??we(sn(e.placeholderContainer))??we(sn(e.accompanyingContainer)):null}function $m(t){const e=t;return e?we(sn(e))??we(sn(e.placeholderContainer))??we(sn(e.accompanyingContainer))??we(W(e.thumbnail)[0],"full",true):null}async function Es(t,e=200,n){if(t.src)return t.src;if(!t.service)return t.fallback;const o=t.fallbackSize;if(o&&t.fallback&&t.region===void 0){const r=Math.max(o.width,o.height);if(r>=e&&r<=e*2)return t.fallback}try{const r=await ys(t.service,{request:n}),s=typeof t.region=="string"?Bm(t.region,r):t.region;return s===null?t.fallback:Rm(r,e,s)??t.fallback}catch{return t.fallback}}const Fm=Object.freeze(Object.defineProperty({__proto__:null,imageSource:we,resolveThumbnail:Es,stillSource:$m,thumbnailSource:Cs},Symbol.toStringTag,{value:"Module"})),va='.clover-items-item[role="option"], .clover-items-link',on=new Map;let $t=null,re=null,Hr=0;function Ms(t){const e=on.get(t);if(!e)return;const n=t.clientHeight>0&&t.scrollHeight>t.clientHeight+1;n!==e.cut&&(e.cut=n,e.change(n))}function Wr(){cancelAnimationFrame(Hr),Hr=requestAnimationFrame(()=>on.forEach((t,e)=>Ms(e)))}function nl(t){var r,s;if(t.key!=="Escape")return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,va);n&&e.add(n);try{document.querySelectorAll(`:is(${va}):hover`).forEach(i=>e.add(i))}catch{}const o=[...e].filter(i=>i.dataset.fullHidden===void 0&&i.querySelector(".clover-items-label-full"));o.length&&(t.preventDefault(),t.stopPropagation(),o.forEach(i=>Lc(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function Dm(){var t,e;$t=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>Ms(o.target))),re=typeof MutationObserver>"u"?null:new MutationObserver(Wr),re==null||re.observe(document.head,{childList:true,subtree:true,characterData:true}),re==null||re.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",Wr),document.addEventListener("keydown",nl,true)}function zm(){var t,e,n;cancelAnimationFrame(Hr),(t=$t==null?void 0:$t.disconnect)==null||t.call($t),re==null||re.disconnect(),$t=re=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",Wr),document.removeEventListener("keydown",nl,true)}function Hm(t,e){var n;return on.size||Dm(),on.set(t,{change:e}),(n=$t==null?void 0:$t.observe)==null||n.call($t,t),Ms(t),()=>{var o;on.delete(t),(o=$t==null?void 0:$t.unobserve)==null||o.call($t,t),on.size||zm()}}const Wm=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function ol(t,e){if(typeof t!="string")return null;const n=Wm.exec(t.trim());if(!n)return null;const[o,r,s,i=0,a=0,c=0]=n.slice(1,7).map(u=>u===void 0?void 0:Number(u)),l=new Date(Date.UTC(2e3,r-1,s,i,a,c));if(l.setUTCFullYear(o),l.getUTCMonth()!==r-1||l.getUTCDate()!==s)return null;const d=!i&&!a&&!c&&!Number(n[7]??0);return{at:l,precision:e??(d?s!==1?"day":r!==1?"month":"year":"time")}}const Um=gt(()=>import("./NavDate-OJND1QQD.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function jm(t,e,n,o){const r=t.source!==void 0?t.source:Cs(t.resource),[s,i]=H(r==null?void 0:r.src),a=(r==null?void 0:r.src)??(r==null?void 0:r.service)??(r==null?void 0:r.fallback);return F(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return Es(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const Vm=()=>f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",children:[f("path",{d:"M232 416a24 24 0 01-14.9-5.2L125.8 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.8l91.3-74.8A24 24 0 01256 120v272a24 24 0 01-24 24z"}),f("path",{d:"M336 176a112 112 0 010 160M384 128a176 176 0 010 256",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]});function qm({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=H(null),a=Wc(s,Hc,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=jm(t,e,n,a),[d,u]=H(false),{width:p,height:h}=t.resource??{},m=p&&h?p/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(p&&h)?void 0:{"--clover-items-ratio":m},children:[!c&&l&&Bn(t.media)&&f(Vm,{}),c&&f("img",{src:c,alt:o,...ut(o?r:void 0),width:e,height:Math.round(e/m),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>u(true),onError:()=>u(true)}),t.duration?f("span",{className:"clover-items-duration",children:ch(t.duration)}):null]})}function Km({text:t,lang:e,first:n}){const o=B(null),[r,s]=H(false);return F(()=>{const i=o.current;if(!(!i||!t))return Hm(i,s)},[t]),f("span",{className:"clover-items-label","data-clamped":r||void 0,children:[!n&&" ",f("span",{ref:o,className:"clover-items-label-text",...ut(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...ut(e),"aria-hidden":"true",hidden:true,children:t})]})}function Zm({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,p;const a=t.parts.map(h=>_t(t.parts.length===1?t.label:h.label,n)),c=r&&s==="summary"?_t(t.summary,n):null,l=r&&s==="navDate"?ol(t.navDate):null,d=a.some(h=>h.text);return f("figure",{role:"none",className:"clover-items-figure","data-parts":t.parts.length,"data-media":(p=(u=t.parts[0])==null?void 0:u.media)==null?void 0:p.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,m)=>{const g=a[m].text?{text:""}:_t(h.label,n);return f(qm,{part:h,size:e,request:o,alt:g.text,altLang:g.lang},h.id)})}),(d||l||(c==null?void 0:c.text))&&f("figcaption",{className:"clover-items-caption",style:i?void 0:je,children:[a.map((h,m)=>f(Km,{text:h.text,lang:h.lang,first:m===0},t.parts[m].id)),l&&f(xt,{fallback:null,children:f(Um,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...ut(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function Gm(t){var e;return(e=ps(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function rl(t){const e=Gm(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:e}}const ya=new WeakMap;function sl(t){if(!t)return[];let e=ya.get(t);if(!e){const{canvases:n,views:o}=Bt(t);e=o.map(r=>{const s=r.map(i=>rl(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>_t(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),ya.set(t,e)}return e}const ba=new WeakMap;function bo(t){if(!t)return[];let e=ba.get(t);return e||(e=W(t.items).filter(n=>n==null?void 0:n.id).map(n=>{var o;return{id:n.id,parts:[rl(n)],label:n.label,summary:n.summary,...typeof n.navDate=="string"?{navDate:n.navDate}:{},href:((o=W(n.homepage)[0])==null?void 0:o.id)??n.id,...Ln(W(n.homepage)[0])?{hrefLang:Ln(W(n.homepage)[0])}:{}}}),ba.set(t,e)),e}function Cy(t){return t?Array.isArray(t)?bo({items:t}):t.type==="Collection"?bo(t):sl(t):[]}function il(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const Ts=(t,e="p")=>il(t)??e;function al(t,e,n="p"){const o=il(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Xm(t,e,{orientation:n="both",rtl:o=false,upward:r=false,onActivate:s,onMove:i}={}){const[a,c]=H(Math.max(0,e)),l=B([]),d=B(s);d.current=s;const u=B(i);u.current=i,F(()=>{e>=0&&c(e)},[e]);const p=Math.min(a,Math.max(0,t-1)),h=lt(b=>{var v;c(b),(v=l.current[b])==null||v.focus()},[]),m=lt((b,v)=>{var Y,K;const S=o?"ArrowLeft":"ArrowRight",k=o?"ArrowRight":"ArrowLeft",y=r?"ArrowUp":"ArrowDown",w=r?"ArrowDown":"ArrowUp",x=n!=="vertical",$=n!=="horizontal";let O=null;if(x&&b.key===S||$&&b.key===y)O=Math.min(t-1,v+1);else if(x&&b.key===k||$&&b.key===w)O=Math.max(0,v-1);else if(b.key==="Home")O=0;else if(b.key==="End")O=t-1;else if(b.key==="Enter"||b.key===" "){(Y=d.current)==null||Y.call(d,v,b),b.preventDefault();return}O!==null&&(b.preventDefault(),h(O),O!==v&&((K=u.current)==null||K.call(u,O,b)))},[t,n,o,r,h]);return{focused:p,itemProps:b=>({ref:v=>{l.current[b]=v},tabIndex:b===p?0:-1,onKeyDown:v=>m(v,b),onFocus:()=>c(b)})}}const Ym=5,Jm=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function cl({align:t="start",dragFree:e=false,itemCount:n=0,axis:o="x",upward:r=false}={}){const s=o==="y",[i,a]=H(null),[c,l]=H(false),[d,u]=H(false),p=B(t);p.current=t;const h=e?"none":`${o} mandatory`,m=lt(()=>{if(!i)return;const y=Math.abs(s?i.scrollTop:i.scrollLeft),w=s?i.scrollHeight-i.clientHeight:i.scrollWidth-i.clientWidth;l(r?y<w-1:y>1),u(r?y>1:y<w-1)},[i,s,r]);F(()=>{if(!i)return;const y=i.style;y.overflowX=s?"hidden":"auto",y.overflowY=s?"auto":"hidden",y.scrollSnapType=h,y.setProperty("--clover-track-align",t),y.overscrollBehaviorX=s?"":"contain"},[i,h,t,s]),F(()=>{if(!i)return;let y=0;const w=()=>{cancelAnimationFrame(y),y=requestAnimationFrame(m)};m(),i.addEventListener("scroll",w,{passive:true});const x=typeof ResizeObserver<"u"?new ResizeObserver(w):null;return x==null||x.observe(i),i.firstElementChild&&(x==null||x.observe(i.firstElementChild)),()=>{cancelAnimationFrame(y),i.removeEventListener("scroll",w),x==null||x.disconnect()}},[i,m,n]);const g=lt((y,w=false)=>{if(!i||!y)return;const x=w||Jm()?"auto":"smooth";i.scrollBy({[s?"top":"left"]:y,behavior:x})},[i,s]),b=lt((y,{instant:w=false}={})=>{const x=i==null?void 0:i.querySelector(`[data-track-index="${y}"]`);if(!i||!x)return false;const $=i.getBoundingClientRect(),O=x.getBoundingClientRect(),Y=getComputedStyle(i).direction==="rtl";return s?(g(p.current==="center"?O.top+O.height/2-($.top+$.height/2):O.top-$.top,w),true):(g(p.current==="center"?O.left+O.width/2-($.left+$.width/2):Y?O.right-$.right:O.left-$.left,w),true)},[i,g,s]),v=lt(y=>{if(!i)return;const w=s?r:getComputedStyle(i).direction==="rtl",x=s?i.clientHeight:i.clientWidth;g(y*x*.9*(w?-1:1))},[i,g,s,r]),S=lt(()=>v(1),[v]),k=lt(()=>v(-1),[v]);return F(()=>{if(!i)return;let y=null,w=false;const x=K=>{K.pointerType!=="mouse"||K.button!==0||(y={x:s?K.clientY:K.clientX,scroll:s?i.scrollTop:i.scrollLeft},w=false)},$=K=>{var tt;if(!y)return;const U=(s?K.clientY:K.clientX)-y.x;!w&&Math.abs(U)<Ym||(w||(w=true,(tt=i.setPointerCapture)==null||tt.call(i,K.pointerId),i.style.scrollSnapType="none",i.dataset.dragging="true"),s?i.scrollTop=y.scroll-U:i.scrollLeft=y.scroll-U)},O=K=>{var U;y&&(y=null,w&&((U=i.releasePointerCapture)==null||U.call(i,K.pointerId),delete i.dataset.dragging,i.style.scrollSnapType=h))},Y=K=>{w&&(w=false,K.preventDefault(),K.stopPropagation())};return i.addEventListener("pointerdown",x),i.addEventListener("pointermove",$),i.addEventListener("pointerup",O),i.addEventListener("pointercancel",O),i.addEventListener("click",Y,true),()=>{i.removeEventListener("pointerdown",x),i.removeEventListener("pointermove",$),i.removeEventListener("pointerup",O),i.removeEventListener("pointercancel",O),i.removeEventListener("click",Y,true)}},[i,h,s]),{ref:a,canScrollPrev:c,canScrollNext:d,scrollPrev:k,scrollNext:S,scrollToIndex:b,measure:m}}const _o=ie(function(e,n){return!Re()||e.iiifContent!==void 0||e.items!==void 0?f(xt,{fallback:null,children:f(Qm,{...e,forwardedRef:n})}):f(tg,{...e,forwardedRef:n})}),Qm=gt(()=>import("./StandaloneItems-BOXI-FO-.mjs"));function tg({of:t="views",...e}){return t==="targets"?f(ng,{...e}):t==="annotations"?f(rg,{...e}):t==="members"?f(ll,{...e}):f(sg,{...e})}const eg=gt(()=>import("./TargetItems-BVT2_Bey.mjs"));function ng(t){return it(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(xt,{fallback:null,children:f(eg,{...t})}):null}const og=gt(()=>import("./AnnotationItems-CLssRyMA.mjs"));function rg(t){return it(n=>!!mc(n.manifest,n.addedSets))?f(xt,{fallback:null,children:f(og,{...t})}):null}function ll({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Re(),s=it(d=>d.collection),i=it(d=>{var u;return((u=d.manifest)==null?void 0:u.id)??null}),a=bo(s),c=ss(s==null?void 0:s.viewingDirection);if(!a.length)return null;const l=(d,u)=>{t==null||t(d,u),o.goToManifest(d.id)};if(n.layout==="pager"){const d=a.findIndex(u=>u.id===i);return f(dl,{...n,forwardedRef:e,steps:ul(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(ag,{position:d,total:a.length,list:u=>f(ll,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(fl,{...n,forwardedRef:e,items:a,selected:a.findIndex(d=>d.id===i),navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:r,request:o.request,showSummary:true,onActivate:l})}function sg({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Re(),i=it(u=>u.manifest),a=it(u=>$n(u.manifest,u.canvasId)),c=it(u=>Bt(u.manifest).direction),l=sl(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(dl,{...o,forwardedRef:e,steps:ul(l,a,c,d)}):f(fl,{...o,forwardedRef:e,items:l,selected:a,navigation:"id",rtl:c==="right-to-left",upward:c==="bottom-to-top",language:s,request:r.request,onActivate:(u,p)=>{t==null||t(u,p),r.goTo(u.id)},followFocus:d})}function ul(t,e,n,o){return{position:e,total:t.length,direction:n,step:(r,s)=>{const i=t[e+r];i&&o(i,s)}}}const ig=gt(()=>import("./PagerLayout-DN7ZEktF.mjs")),ag=gt(()=>import("./PagerLayout-DN7ZEktF.mjs").then(({CountMenu:t})=>({default:t})));function dl(t){return f(xt,{fallback:null,children:f(ig,{...t})})}function fl({forwardedRef:t,items:e,selected:n,navigation:o,rtl:r=false,upward:s=false,layout:i="slider",orientation:a="horizontal",thumbnailSize:c=200,request:l,language:d,showSummary:u=false,secondary:p="summary",labels:h=true,heading:m,headingLevel:g=2,renderItem:b,onActivate:v,followFocus:S,as:k="section",className:y,"aria-label":w,size:x,singleItem:$,highContrast:O,...Y}){var Ft;const{t:K}=Ct(),U=pe(),tt=Co(t,Y.lang),{langOf:Z}=tt,ot=Jr(O),M=i==="slider",T=M&&a==="vertical",N=T&&s,j=o==="id",et=B(null),ct=i==="masonry";F(()=>{const J=et.current;if(!ct||!J)return;let ft,A=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:nt})=>{A&&(ft=nt(J))}),()=>{A=false,ft==null||ft()}},[ct]);const rt=cl({align:j?"center":"start",itemCount:e.length,axis:T?"y":"x",upward:N}),vt=B(void 0);F(()=>()=>window.clearTimeout(vt.current),[]);const _=Xm(e.length,n,{orientation:T?"vertical":i==="slider"?"horizontal":i==="list"?"vertical":"both",rtl:r,upward:N,onActivate:(J,ft)=>v(e[J],ft),onMove:S?(J,ft)=>{window.clearTimeout(vt.current);const A=()=>S(e[J]);ft.repeat?vt.current=window.setTimeout(A,150):A()}:void 0}),I=B(null),P=B(false);P.current=!!((Ft=I.current)!=null&&Ft.contains(I.current.ownerDocument.activeElement)),F(()=>{var nt;const J=I.current;if(!J||!P.current)return;const{activeElement:ft,body:A}=J.ownerDocument;ft&&ft!==A||(nt=J.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||nt.focus()},[e]);const R=B(false);F(()=>{var A;if(n<0)return;const J=!R.current;if(M){rt.scrollToIndex(n,{instant:J})&&(R.current=true);return}R.current=true;const ft=(A=I.current)==null?void 0:A.querySelector(`[data-track-index="${n}"]`);ft&&cg(ft,J)},[M,n,rt.scrollToIndex]);const z=Ts(g),V=m?_t(m.label,d):null,C=m?_t(m.summary,d):null,D=w===void 0&&!!(V!=null&&V.text),q=Lo(K("itemsLabel"),Z("itemsLabel"),w!==void 0||D,tt.hostLanguage),G=D?{"aria-labelledby":`${U}-title`}:w!==void 0?{"aria-label":w}:q.props,ht=(J,ft)=>b?b(J,{selected:ft}):f(Zm,{item:J,size:c,language:d,request:l,showSummary:u,secondary:p,labels:h}),dt=J=>!(b||_t(J.label,d).text||u&&p==="summary"&&_t(J.summary,d).text),Nt=(J,ft)=>dt(J)?K("canvasPosition",{index:ft+1,total:e.length}):void 0,Pt=J=>dt(J)?Z("canvasPosition"):void 0,Gt=M?{display:"flex",flexDirection:N?"column-reverse":T?"column":void 0,margin:0,padding:0,listStyle:"none"}:void 0,zt=M?{flex:"0 0 auto",scrollSnapAlign:j?"center":"start"}:void 0,pt=j&&n>=0,Rt=J=>{const ft=n+(J==="prev"?-1:1),A=pt?ft>=0&&ft<e.length:J==="prev"?rt.canScrollPrev:rt.canScrollNext,nt=pt?J==="prev"?"commonPrevious":"commonNext":J==="prev"?"itemsScrollBack":"itemsScrollForward",At=K(nt),pn=jt=>{if(!A)return;if(!pt)return(J==="prev"?rt.scrollPrev:rt.scrollNext)();const me=e[ft];S?S(me):v(me,jt)};return f("button",{type:"button",className:`clover-items-scroll-${J}`,"aria-controls":pt?void 0:`${U}-viewport`,...ut(Z(nt)),"aria-disabled":!A||void 0,tabIndex:A?void 0:-1,onClick:pn,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:T?J==="next"!==N?"M3 6l5 5 5-5":"M3 10l5-5 5 5":J==="next"!==r?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("span",{style:je,children:At}),f(Ke,{label:At})]})};return f(Nn.Provider,{value:tt.hostLanguage,children:f(k,{ref:tt.ref,className:Tt("clover-items",y),"data-layout":i,"data-orientation":T?"vertical":void 0,"data-upward":N||void 0,"data-navigation":o,...Qr(ot),...Y,children:[m&&((V==null?void 0:V.text)||(C==null?void 0:C.text))&&f("header",{className:"clover-items-header",children:[(V==null?void 0:V.text)&&f(z,{className:"clover-items-title clover-title",id:`${U}-title`,...ut(V.lang),children:V.text}),(C==null?void 0:C.text)&&f("p",{className:"clover-items-description",...ut(C.lang),children:C.text.replace(/<[^>]*>/g,"")}),m.homepage&&f("a",{className:"clover-items-homepage",href:m.homepage,hrefLang:m.homepageLang,...ut(Z("commonViewAll")),children:K("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[M&&Rt("prev"),f("div",{id:`${U}-viewport`,className:"clover-items-viewport",ref:M?rt.ref:et,children:j?f("div",{ref:I,role:"listbox",...G,"aria-orientation":T?"vertical":M?"horizontal":i==="list"?"vertical":void 0,className:"clover-items-track",style:Gt,children:e.map((J,ft)=>{const A=ft===n;return f("div",{id:`${U}-${ft}`,role:"option","aria-selected":A,"aria-label":Nt(J,ft),...ut(Pt(J)),className:"clover-items-item","data-track-index":ft,style:zt,..._.itemProps(ft),onClick:nt=>v(J,nt),children:ht(J,A)},J.id)})}):f("ul",{...G,className:"clover-items-track",style:Gt,children:e.map((J,ft)=>f("li",{className:"clover-items-item","data-track-index":ft,style:zt,children:f("a",{className:"clover-items-link",href:J.href,hrefLang:J.hrefLang,"aria-label":Nt(J,ft),...ut(Pt(J)),draggable:false,onClick:A=>v(J,A),children:ht(J,false)})},J.id))})}),M&&Rt("next")]}),q.node]})})}function cg(t,e){var i,a;let n=t.parentElement;for(;n&&n!==document.body;){const{overflowY:c}=getComputedStyle(n);if(/(auto|scroll)/.test(c)&&n.scrollHeight>n.clientHeight)break;n=n.parentElement}if(!n||n===document.body)return;const o=n.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top<o.top?r.top-o.top:r.bottom>o.bottom?r.bottom-o.bottom:0;if(s){const c=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-reduced-motion: reduce)").matches;(a=n.scrollBy)==null||a.call(n,{top:s,behavior:e||c?"auto":"smooth"})}}function lg(t,e){const{clover:n}=ae(e),o=hp(),{direction:r}=xs(),s=it(l=>l.collection),i=it(l=>{var d;return((d=l.manifest)==null?void 0:d.id)??null}),a=it(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=it(l=>wd(l.targets,l.targetIndex,l.manifest,l.canvasId));if(t==="targets")return{position:c,total:a,direction:"left-to-right",step:l=>{const d=c+l;d>=0&&d<a&&n.goToTarget(d)}};if(t==="members"){const l=bo(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const p=l[d+u];p&&n.goToManifest(p.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const ug=ie(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Ct(),{position:c,total:l}=e;if(l<2||c<0)return null;const d=c+1;return f(n,{ref:s,className:Tt("clover-pager-position",o),...r,children:[f("span",{"aria-hidden":"true",children:[d," / ",l]}),f("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]}),f("span",{style:je,...ut(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),dg=ie(function({of:e="views",...n},o){const r=lg(e,"Position");return f(ug,{ref:o,...n,steps:r})});function fg({className:t,loading:e,error:n}){const{t:o,langOf:r}=Ct(),{status:s,error:i}=up(),a=s==="loading",c=e!==void 0&&e!==false;return f(kt,{children:[f("p",{className:Tt("clover-status",t),"data-status":a?s:void 0,role:"status",style:a&&e!==false?void 0:je,children:[a&&(c?e:e===void 0&&f(En,{})),a&&!c&&f("span",{style:je,...ut(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Tt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(kt,{children:[f("p",{...ut(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function hg(t,e=false,n=3){const o=e||Am(t),r=e?`${n}
28
- ${t}`:t,[s,i]=H(null);return F(()=>{if(!o)return;let a=true;return Promise.all([import("./sanitize-DETRcc_c.mjs"),e?import("../markdown-CCYJwzFn.mjs"):null]).then(([{sanitizeHTML:c,trusted:l},d])=>{const u=d?d.markdownToHtml(t,{headingLevel:n}):t,p=c(u,{markdown:!!d});a&&i({for:r,html:p,inner:l(p)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const pg=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),hl=ie(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=_t(n,o),d=ut(l),u=Om(r,c),p=u==="markdown",h=hg(u==="plain"?"":c,p,s),m=(h==null?void 0:h.html)??null;if(!c)return null;if(u==="plain")return f(e,{ref:a,...i,...d,children:c.split(/\r?\n/).map((b,v)=>f(ue.Fragment,{children:[v>0&&f("br",{}),b]},v))});const g=typeof e=="string"&&pg.has(e)&&m&&/<(p|ul|ol|div)[\s>]/i.test(m)?"div":e;return h?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:h.inner}}):f(e,{ref:a,...i,...d,children:p?Nm(c):Dn(c)})}),pl=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=_t(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":_t(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...ut(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(hl,{as:"dd",markup:r.value,language:e})]},s)})}):null,mg=typeof window>"u"?F:Wt;function gg({children:t}){const{t:e}=Ct(),n=Co(),o=B(null),r=pe(),s=ue.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=vg(o);return f("div",{className:"clover-read-more",children:[ue.cloneElement(s,{ref:o,id:i,"data-read-more":a?"open":""}),(c||a)&&f("button",{type:"button",className:"clover-read-more-button","aria-expanded":a,"aria-controls":i,onClick:l,ref:n.ref,...ut(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function vg(t){const[e,n]=H(false),[o,r]=H(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return mg(s),F(()=>{var u,p;const i=t.current;if(!i)return;let a=0;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(s)},l=typeof ResizeObserver>"u"?null:new ResizeObserver(c);l==null||l.observe(i);const d=typeof MutationObserver>"u"?null:new MutationObserver(c);return d==null||d.observe(document.head,{childList:true,subtree:true,characterData:true}),d==null||d.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),d==null||d.observe(i,{attributes:true,attributeFilter:["style"]}),(p=(u=document.fonts)==null?void 0:u.addEventListener)==null||p.call(u,"loadingdone",c),()=>{var h,m;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(m=(h=document.fonts)==null?void 0:h.removeEventListener)==null||m.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function hn(t,e,n){const o=ks(),r=Rn(s=>{var i;return(i=Oo(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const zn=()=>{var t;return(t=Re())==null?void 0:t.language};function _a({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=hn(t,"summary",n),i=zn();return _t(s,i).text?f(gg,{children:f(hl,{as:e,markup:s,language:i,className:Tt("clover-summary",o),...r})}):null}function yg({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=hn(t,"metadata",e),i=zn();return f(pl,{metadata:s,language:i,renderValue:o,className:Tt("clover-metadata",n),...r})}function bg({of:t="manifest",value:e,className:n,...o}){const r=hn(t,"requiredStatement",e),s=zn();return f(pl,{metadata:r?[r]:null,language:s,className:Tt("clover-required-statement",n),...o})}function _g({of:t="manifest",value:e,className:n,...o}){const r=hn(t,"rights",e);return r?f("a",{href:r,className:Tt("clover-rights",n),...o,children:r}):null}function wg({of:t="manifest",value:e,className:n,...o}){const r=hn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Tt("clover-id",n),...o,children:r}):null}function ml({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(hn(n,t,o)),i=zn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=_t(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:Ln(c),...ut(l.text?l.lang:void 0),children:l.text?Dn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const xg=({className:t,...e})=>f(ml,{property:"homepage",className:Tt("clover-homepage",t),...e}),Sg=({className:t,...e})=>f(ml,{property:"seeAlso",className:Tt("clover-see-also",t),...e});function kg({of:t="manifest",value:e,size:n=400,className:o,...r}){var m;const s=Rn(g=>Oo(g,t),null),i=e??s,a=zn(),c=i?Cs(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=H(c==null?void 0:c.src),p=(m=Re())==null?void 0:m.clover.request;if(F(()=>{if(!c)return u(void 0);if(c.src)return u(c.src);let g=true;return Es(c,n,p).then(b=>g&&u(b)),()=>{g=false}},[l,n]),!d)return null;const h=_t(i==null?void 0:i.label,a);return f("img",{src:d,alt:Dn(h.text),...ut(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Tt("clover-thumbnail",o),...r})}const Cg=typeof window>"u"?F:Wt,gl=he(null),Eg=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},Mg=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>W(t[e]).length>0),Ur=t=>!!t&&typeof t.id=="string",Tg=t=>{const e=W(t.homepage).find(Ur);return e?{id:e.id,hrefLang:Ln(e)}:void 0},Ig=(t,e)=>{var n;if(!t)return null;for(const o of[t.label,(n=W(t.homepage).find(r=>r==null?void 0:r.label))==null?void 0:n.label]){const r=_t(o,e);if(r.text)return{text:Dn(r.text),lang:r.lang}}return null};function vl({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Rn(d=>{var u;return(u=Oo(d,t))==null?void 0:u.provider},void 0),a=(l=Re())==null?void 0:l.language,c=W(e!==void 0?e:i).filter(Mg);return c.length?f("ul",{className:Tt("clover-provider",r),...s,children:c.map((d,u)=>{const p=n?Tg(d):void 0,h=!!_t(d.label,a).text;return f(Lg,{agent:d,homepage:p,children:o??f(kt,{children:[f(yl,{alt:h?"":void 0}),f(rn,{className:"clover-provider-label"})]})},d.id??u)})}):null}function Lg({agent:t,homepage:e,children:n}){const o=B(null),[r,s]=H(null),i=lt(()=>{o.current&&!Eg(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(el.Provider,{value:t,children:f(gl.Provider,{value:i,children:e?f("a",{ref:o,href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:e.hrefLang,className:"clover-provider-link",children:n}):f("span",{ref:o,className:"clover-provider-content",children:n})})})})}function yl({of:t="manifest",value:e,alt:n,className:o,...r}){var p;const{t:s,langOf:i}=Ct(),a=ks(),c=Rn(h=>{var m;return(m=Oo(h,t))==null?void 0:m.provider},void 0),l=(p=Re())==null?void 0:p.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const m=h;if(m.type!=="Agent"&&Ur(m)&&!m.logo)return[{image:m,agent:null}];const g=W(m.logo).find(Ur);return g?[{image:g,agent:m}]:[]});return u.length?f(kt,{children:u.map(({image:h,agent:m},g)=>{const b=Ig(m,l);return f(Pg,{src:h.id,alt:n??(b==null?void 0:b.text)??s("logo"),...ut(n!==void 0?void 0:b?b.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:Tt("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function Pg({alt:t,onError:e,...n}){const o=Ut(gl),[r,s]=H(false),i=lt(()=>s(true),[]);Cg(()=>{r&&(o==null||o())},[r,o]);const a=lt(c=>{var l;c!=null&&c.complete&&!c.naturalWidth&&((l=c.decode)==null||l.call(c).catch(i))},[i]);return r?null:f("img",{ref:a,alt:t,onError:c=>{e==null||e(c),i()},...n})}const Ag=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&_t({[e]:t[e]}).text):[];function Og(t){if(!t)return[];const e=[...Array.isArray(t.metadata)?t.metadata:[],t.requiredStatement].filter(Boolean),o=[t.label,t.summary,...e.flatMap(r=>[r==null?void 0:r.label,r==null?void 0:r.value])].map(Ag).filter(r=>r.length>1);return[...new Set(o.flat())]}function Ng(){const{language:t,chooseLanguage:e,toggleDrawn:n}=ae("About"),o=it(i=>i.manifest),r=bt(()=>Og(o),[o]),s=sc(r,t);return s&&e?{languages:r,chosen:s,onChange:e,drawn:n??false}:null}function Ey(t,e){return t!=null&&t.drawn?e.every(n=>!!n&&n!=="none"&&t.languages.some(o=>es(o,n))):false}const Rg=gt(()=>import("./LanguageChoice-BUTtsHEi.mjs").then(t=>t.b).then(t=>({default:t.LanguageChoice}))),Bg=t=>{var o;const e=t.closest(".clover-sections-actions"),n=(o=e==null?void 0:e.closest(".clover-sections-item"))==null?void 0:o.querySelector(".clover-sections-heading .clover-sections-label");return e&&n?{box:e,label:n}:null},$g=t=>void Mt.chooseInterfaceLanguage(t);function Fg(){Ct();const{languages:t,chosen:e}=Mt.interfaceLanguages();return t.length>1?{languages:t,chosen:e}:null}function bl({values:t=true,interfaceLanguages:e=true}={}){const n=Ng(),o=Fg(),r=t?(n==null?void 0:n.languages)??[]:[],s=u=>r.some(p=>p===u||Mt.stringsFor(p)===u),i=[...r,...(e?(o==null?void 0:o.languages)??[]:[]).filter(u=>!s(u))];if(i.length<2)return null;const a=Mt.chosenLanguage,c=a&&Mt.stringsFor(a),l=c&&i.includes(c)&&!s(c)?c:t&&n?n.chosen:(o==null?void 0:o.chosen)??i[0];return{languages:i,chosen:l,onChange:u=>r.includes(u)&&n?n.onChange(u):$g(u)}}function _l({values:t,interfaceLanguages:e}){const n=bl({values:t,interfaceLanguages:e}),{drawsToggle:o}=ae("About"),r=!!n;return F(()=>r?o==null?void 0:o():void 0,[r,o]),n?f(xt,{fallback:null,children:f(Rg,{...n,nameKey:"readingLanguage",part:"clover-about",fit:Bg})}):null}const wl=he(false);function wa(t,e){const n=new Set,o=[];for(const r of t)for(const s of W(r==null?void 0:r.rendering)){const i=(s==null?void 0:s.id)??(s==null?void 0:s["@id"]);if(typeof i!="string"||n.has(i))continue;n.add(i);const a=_t(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:Ln(s)})}return o}function xl(){const{language:t}=ae("Download"),e=it(o=>o.manifest),n=it(o=>Ue(o.manifest,o.canvasId));return{page:wa(n,t),all:wa([e],t)}}const Dg=gt(()=>import("./Download-Cyfhran6.mjs").then(({DownloadGroups:t})=>({default:t}))),zg=gt(()=>import("./NavDate-OJND1QQD.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),Hg=gt(()=>import("./PartOfManifest-3cK5il9_.mjs"));function Wg({languages:t=true,interfaceLanguages:e=true,...n}){const o=Ut(wl);return f(Ug,{...n,download:!o&&n.download!==false,choice:o?null:f(_l,{values:t,interfaceLanguages:e})})}function Ug({choice:t,canvasSummary:e=false,headingLevel:n=3,download:o=true,thumbnail:r=true,label:s=true,className:i,...a}){const{t:c,langOf:l}=Ct(),d=xl(),u=it(v=>v.manifest,Object.is,"About"),p=B(null);F(()=>{const v=p.current,S=v==null?void 0:v.querySelector(".clover-about-head");if(!v||!S||typeof ResizeObserver>"u")return;const k=new Set,y=()=>{const $=S.querySelector(".clover-about-thumbnail"),O=S.querySelector(".clover-about-label");for(const tt of[$,O])tt&&!k.has(tt)&&(k.add(tt),x.observe(tt));const Y=v.style;if(!$){Y.removeProperty("--clover-about-label-height"),Y.removeProperty("--clover-about-thumbnail-width");return}const K=`${(O==null?void 0:O.offsetHeight)??0}px`,U=`${$.offsetWidth}px`;Y.getPropertyValue("--clover-about-label-height")!==K&&Y.setProperty("--clover-about-label-height",K),Y.getPropertyValue("--clover-about-thumbnail-width")!==U&&Y.setProperty("--clover-about-thumbnail-width",U)};let w=0;const x=new ResizeObserver(()=>{cancelAnimationFrame(w),w=requestAnimationFrame(y)});return x.observe(S),y(),()=>{cancelAnimationFrame(w),x.disconnect(),v.style.removeProperty("--clover-about-label-height"),v.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const h=pe(),m=()=>{var k,y;const v=p.current;(y=((k=v==null?void 0:v.closest(".clover-sections-item"))==null?void 0:k.querySelector(".clover-sections-button"))??v)==null||y.focus({preventScroll:true})};if(!u)return null;const g=(v,S,k)=>{if(!S)return null;const{as:y,title:w,group:x}=al(n,`${h}-${v}`);return f("section",{className:"clover-about-section",...x,children:[f(y,{className:"clover-about-heading",...ut(l(v)),...w,children:c(v)}),k]})},b=v=>Array.isArray(u[v])?u[v].length>0:!!u[v];return f("div",{ref:p,className:Tt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(kg,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(rn,{as:Ts(n),className:"clover-about-label clover-title"})]}),e&&f(_a,{of:"canvas",className:"clover-about-summary"}),$i(u)&&u.partOf&&f(xt,{fallback:null,children:f(Hg,{manifest:u,headingLevel:n,onOpened:m})}),f(_a,{className:"clover-about-summary"}),f(yg,{className:"clover-about-metadata"}),f(bg,{className:"clover-about-metadata"}),g("aboutDate",ol(u.navDate),f(xt,{fallback:null,children:f(zg,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",b("provider"),f(vl,{})),g("aboutRights",u.rights,f(_g,{})),g("aboutHomepage",b("homepage"),f(xg,{})),g("aboutSeeAlso",b("seeAlso"),f(Sg,{})),g("download",o&&d.page.length+d.all.length>0,f(xt,{fallback:null,children:f(Dg,{page:d.page,all:d.all,headingLevel:n+1})})),g($i(u)?"aboutCanvas":"aboutManifest",!xc(u)&&u.id,f(wg,{}))]})}const jg=gt(()=>import("./ControlMenu-CKcTiPrh.mjs")),Vg=gt(()=>import("./Download-Cyfhran6.mjs").then(({DownloadGroups:t})=>({default:t})));function qg({languages:t=true,interfaceLanguages:e=true,download:n=true}){const o=bl({values:t,interfaceLanguages:e}),{page:r,all:s}=xl(),i=n&&r.length+s.length>0;return!o&&!i?null:f("div",{className:"clover-about-actions",children:[i&&f(Kg,{page:r,all:s}),o&&f(_l,{values:t,interfaceLanguages:e})]})}function Kg({page:t,all:e}){const{t:n,langOf:o}=Ct(),[r,s]=H(false),a=`${pe()}-download`,c=lt(l=>{var d;s(false),l&&((d=document.getElementById(a))==null||d.focus())},[a]);return f("span",{className:"clover-about-download",onBlur:l=>{const d=l.relatedTarget;r&&d&&!l.currentTarget.contains(d)&&s(false)},children:[f("button",{type:"button",id:a,className:"clover-about-download-button","aria-label":n("download"),...ut(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Zg,{}),f(Ke,{label:n("download")})]}),r&&f(xt,{fallback:null,children:f(jg,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(Vg,{page:t,all:e,inPopover:true})})})]})}function Zg(){return f("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false",fill:"none",stroke:"currentColor",strokeWidth:"56",strokeLinecap:"round",strokeLinejoin:"round",children:f("path",{d:"M256 64v272M160 240l96 96 96-96M80 352v48a48 48 0 0 0 48 48h256a48 48 0 0 0 48-48v-48"})})}function Gg(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Bt(t).canvases){if(n.navPlace)return true;for(const o of W(n.annotations))for(const r of W(o==null?void 0:o.items))if(r!=null&&r.navPlace||W(r==null?void 0:r.motivation).includes("georeferencing")||W(r==null?void 0:r.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}const Xg=["about","targets","collection","contents","search","map","transcript","annotations"],Le={about:t=>{var e,n;return!xc(t.manifest)||!!((e=t.manifest)!=null&&e.rights||(n=t.manifest)!=null&&n.requiredStatement)},targets:t=>{var e;return(((e=t.targets)==null?void 0:e.items.length)??0)>1},collection:t=>{var e,n;return(((n=(e=t.collection)==null?void 0:e.items)==null?void 0:n.length)??0)>0||!!_d(t.manifest)},contents:t=>cp(t.manifest).length>0,search:t=>!!hs(t.manifest),map:t=>Gg(t.manifest,t.collection),transcript:t=>Ue(t.manifest,t.canvasId).some(e=>Dc(e).length>0||wh(e).length>0),annotations:t=>Bd(t.manifest,t.addedSets).length>0},Yg=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Xg.filter(o=>t[o]&&(!n||n.has(o)))};function Is(t){const e={about:it(Le.about),targets:it(Le.targets),collection:it(Le.collection),contents:it(Le.contents),search:it(Le.search),map:it(Le.map),transcript:it(Le.transcript),annotations:it(Le.annotations)};return Yg(e,t)}function Jg({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Tt("clover-chevron",e),"data-open":t||void 0,children:f("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Sl=typeof window>"u"?F:Wt,kl=he(null);function My(){return Ut(kl)}const Cl=he(0);function Ty(){return Ut(Cl)}function Qg({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var Z,ot;const a=pe(),c=Lo(r??"",s,r===void 0),l=B([]),d=e==="tabs",{t:u,langOf:p}=Ct(),h=cl({dragFree:true,itemCount:t.length}),m=t.some(M=>M.value===n)?n:((Z=t[0])==null?void 0:Z.value)??null,g=B(new Set);m&&g.current.add(m);const b=B(null),[v,S]=H({value:null,count:0});F(()=>{var ct;if(d||!m||b.current!==m)return;b.current=null;const M=t.findIndex(rt=>rt.value===m),T=document.getElementById(`${a}-panel-${M}`),N=(ct=l.current[M])==null?void 0:ct.parentElement;if(!T||!N)return;const j=N.getBoundingClientRect().bottom-T.getBoundingClientRect().top;if(j<=0)return;const et=gr(T);et&&(et.scrollTop-=j)},[m,d,t,a]);const k=M=>{var I,P,R,z;const T=t.findIndex(V=>V.value===m),N=document.getElementById(`${a}-panel-${T}`),j=M.target;if(!N||j===N||!N.contains(j)||!ev(j))return;const et=(P=(I=l.current[T])==null?void 0:I.parentElement)==null?void 0:P.getBoundingClientRect(),ct=T+1<t.length?(z=(R=l.current[T+1])==null?void 0:R.parentElement)==null?void 0:z.getBoundingClientRect():void 0;if(!et)return;const rt=j.getBoundingClientRect(),vt=rt.top<et.bottom?Math.floor(rt.top-et.bottom):ct&&rt.bottom>ct.top?Math.ceil(Math.min(rt.bottom-ct.top,rt.top-et.bottom)):0,_=vt?gr(N):null;_&&(_.scrollTop+=vt)},y=B(null),w=t.map(M=>M.value).join(`
29
- `),x=B(false);x.current=!!((ot=y.current)!=null&&ot.contains(y.current.ownerDocument.activeElement)),F(()=>{var et;const M=y.current;if(!M||!x.current)return;const{activeElement:T,body:N}=M.ownerDocument;if(T&&T!==N)return;const j=t.findIndex(ct=>ct.value===m);(et=l.current[j])==null||et.focus()},[w]),Sl(()=>{const M=y.current;if(d||!M||typeof ResizeObserver>"u")return;const T=[...M.querySelectorAll(":scope > .clover-sections-item")],N=T.map(C=>C.firstElementChild),j=N[0],et=N[N.length-1],ct=new Map,rt=C=>(C&&ct.get(C))??0,vt=document.scrollingElement;let _=null,I=0;const P=()=>{const C=N.reduce((Nt,Pt)=>Nt+rt(Pt),0);let D=0;T.forEach((Nt,Pt)=>{Nt.style.setProperty("--clover-sections-before",`${D}px`),D+=rt(N[Pt]),Nt.style.setProperty("--clover-sections-after",`${C-D}px`)}),M.style.setProperty("--clover-sections-total",`${C}px`);const q=j&&getComputedStyle(j);(q==null?void 0:q.position)==="sticky"&&et&&(I=parseFloat(q.top)+parseFloat(getComputedStyle(et).bottom)||0);const G=getComputedStyle(M),ht=parseFloat(G.lineHeight)||1.2*parseFloat(G.fontSize),dt=(_==null?void 0:_.clientHeight)??0;dt>0&&dt-I-C<2*ht?M.dataset.stacks="off":delete M.dataset.stacks},R=new ResizeObserver(C=>{var D,q;for(const G of C)N.includes(G.target)&&ct.set(G.target,((q=(D=G.borderBoxSize)==null?void 0:D[0])==null?void 0:q.blockSize)??G.target.getBoundingClientRect().height);P()}),z=()=>{const C=gr(M);C!==_&&(_&&_!==vt&&R.unobserve(_),C&&C!==vt&&R.observe(C),_=C)},V=()=>{z(),P()};z();for(const C of N)C&&R.observe(C,{box:"border-box"});return window.addEventListener("resize",V),()=>{R.disconnect(),window.removeEventListener("resize",V);for(const C of T)C.style.removeProperty("--clover-sections-before"),C.style.removeProperty("--clover-sections-after");M.style.removeProperty("--clover-sections-total"),delete M.dataset.stacks}},[d,w,i]),F(()=>{if(d)return;const M=l.current.map(N=>N==null?void 0:N.parentElement).filter(N=>!!N),T=N=>{var rt;if(N.ctrlKey)return;const j=N.currentTarget,et=xa(j);if(!et||et===document.scrollingElement)return;N.preventDefault();const ct=N.deltaMode===1?parseFloat(getComputedStyle(j).lineHeight)||16:N.deltaMode===2?et.clientHeight:1;(rt=xa(et)??document.scrollingElement)==null||rt.scrollBy({left:N.deltaX*ct,top:N.deltaY*ct,behavior:"instant"})};for(const N of M)N.addEventListener("wheel",T,{passive:false});return()=>{for(const N of M)N.removeEventListener("wheel",T)}},[d,w]);const $=M=>{M!==m&&(b.current=M,d||S(T=>({value:M,count:T.count+1})),o==null||o(M))},O=(M,T)=>{var rt;const N=t.length-1,[j,et]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],ct=M.key===et?(T+1)%t.length:M.key===j?(T-1+t.length)%t.length:M.key==="Home"?0:M.key==="End"?N:null;ct!==null&&(M.preventDefault(),(rt=l.current[ct])==null||rt.focus(),d&&$(t[ct].value))},Y=B(false);F(()=>{if(!d)return;const M=t.findIndex(_=>_.value===m),T=l.current[M],N=T==null?void 0:T.parentElement;if(!T||!N)return;const j=getComputedStyle(N),et=N.getBoundingClientRect(),ct=T.getBoundingClientRect(),rt=et.left+(parseFloat(j.scrollPaddingLeft)||0),vt=et.right-(parseFloat(j.scrollPaddingRight)||0);(ct.left<rt-1||ct.right>vt+1)&&h.scrollToIndex(M,{instant:!Y.current}),Y.current=true},[m,d,t.length,h.scrollToIndex]);const K=M=>{const T=M==="prev"?h.canScrollPrev:h.canScrollNext,N=M==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${M}`,"aria-hidden":"true",tabIndex:-1,hidden:!T,...ut(p(N)),onMouseDown:j=>j.preventDefault(),onClick:M==="prev"?h.scrollPrev:h.scrollNext,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:f("path",{d:M==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ke,{label:u(N)})]})},U=Ts(i,"div"),tt=(M,T)=>{const N=M.value===m;return f("button",{ref:j=>{l.current[T]=j},type:"button",id:`${a}-button-${T}`,className:"clover-sections-button","data-value":M.value,"data-track-index":d?T:void 0,"aria-controls":`${a}-panel-${T}`,...d?{role:"tab","aria-selected":N,tabIndex:N?0:-1}:{"aria-expanded":N,"aria-disabled":N||void 0},onClick:()=>$(M.value),onKeyDown:j=>O(j,T),children:[f("span",{className:"clover-sections-label",children:M.label}),!d&&f(Jg,{open:N,className:"clover-sections-chevron"})]},M.value)};return f("div",{ref:y,className:"clover-sections","data-layout":e,onFocus:d?void 0:k,style:d?void 0:{"--clover-sections-count":t.length},children:[d&&f("div",{className:"clover-sections-tabs","data-more":[h.canScrollPrev&&"start",h.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:f("div",{className:"clover-sections-row",children:[f("div",{role:"tablist",ref:h.ref,...c.props,className:"clover-sections-list",children:t.map(tt)}),K("prev"),K("next")]})}),d&&c.node,t.map((M,T)=>{const N=M.value===m;return f("section",{className:"clover-sections-item","data-value":M.value,"data-open":N,style:d?void 0:{"--clover-sections-index":T},children:[!d&&f(U,{className:"clover-sections-heading",children:[tt(M,T),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(Cl.Provider,{value:v.value===M.value?v.count:0,children:f(tv,{id:`${a}-panel-${T}`,tabs:d,labelledBy:`${a}-button-${T}`,hidden:!N,actions:M.actions,children:g.current.has(M.value)?M.content:null})})]},M.value)})]})}function tv({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=H(null),c=!o||!!r;return Sl(()=>{const l=i==null?void 0:i.parentElement;if(!c||!i||!l||typeof ResizeObserver>"u")return;const d=new ResizeObserver(()=>{const u=i.offsetWidth;u?(l.style.setProperty("--clover-sections-actions",`${u}px`),l.setAttribute("data-actions","")):(l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions"))});return d.observe(i),()=>{d.disconnect(),l.style.removeProperty("--clover-sections-actions"),l.removeAttribute("data-actions")}},[i,c]),f(kt,{children:[!e&&f("div",{ref:a,className:"clover-sections-actions",hidden:!c,children:r}),f("div",{id:t,role:e?"tabpanel":"region","aria-labelledby":n,tabIndex:e?0:void 0,className:"clover-sections-panel",hidden:o,children:f(kl.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function gr(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(e).overflowY))return e;return document.scrollingElement}function xa(t){for(let e=t.parentElement;e&&e!==document.body;e=e.parentElement)if(/auto|scroll/.test(getComputedStyle(e).overflowY)&&e.scrollHeight>e.clientHeight)return e;return document.scrollingElement}function ev(t){try{return t.matches(":focus-visible")}catch{return true}}const nv=gt(()=>import("./MapView-qaaRmnM-.mjs").then(t=>({default:t.RootMap}))),ov=gt(()=>import("./Collection-86-r4tY9.mjs").then(t=>({default:t.Collection}))),rv=gt(()=>import("./TargetItems-BVT2_Bey.mjs").then(t=>({default:t.TargetsSection}))),sv=gt(()=>import("./Contents-DUjhQjnI.mjs").then(t=>({default:t.Contents}))),iv=gt(()=>import("./Search-DLRmliHy.mjs").then(t=>({default:t.Search}))),av=gt(()=>import("./Transcript-fRjfw6kB.mjs").then(t=>({default:t.Transcript}))),cv=gt(()=>import("./Annotations-C-zxQ4wJ.mjs").then(t=>({default:t.Annotations}))),ze=t=>f(xt,{fallback:null,children:t}),lv=()=>null,uv=ie(function({layout:e="tabs",value:n,defaultValue:o,onValueChange:r,onClose:s,closeOnEscape:i=false,headingLevel:a=3,as:c="aside",download:l=true,languages:d=true,interfaceLanguages:u=true,sections:p,labels:h,className:m,children:g,onKeyDown:b,...v},S){var V;const{clover:k}=ae("Panel"),y=B(null),{t:w,langOf:x,hostLanguage:$,i18n:O}=Ct(),Y=Lo(w("informationPanelTabs"),x("informationPanelTabs"),!!(v["aria-label"]||v["aria-labelledby"])||!(["aside","section","nav"].includes(c)||v.role)),K=C=>{const D=x(C);return D?f("span",{...ut(D),children:w(C)}):w(C)},U=(C,D)=>{const q=h==null?void 0:h[C];if(q===void 0)return K(D);if(typeof q=="string")return q;const G=Object.keys(q),ht=ns(G,O.language);if(!ht)return K(D);const dt=ko(ht,$);return dt?f("span",{...ut(dt),children:q[ht]}):q[ht]},tt=Is(p),Z=C=>tt.includes(C),ot=ue.Children.toArray(g).filter(C=>ue.isValidElement(C)&&C.type===lv),M=e==="accordion"?a+1:a,T=d||u||l?f(qg,{languages:d,interfaceLanguages:u,download:l}):void 0,N=ot.length?ot.map(({props:C})=>({value:C.value,label:C.label,content:C.children,...C.value==="about"&&{actions:T}})):[...Z("about")?[{value:"about",label:U("about","informationPanelTabsAbout"),content:f(Wg,{headingLevel:M,download:l}),actions:T}]:[],...Z("targets")?[{value:"targets",label:U("targets","informationPanelTabsTargets"),content:ze(f(rv,{headingLevel:M}))}]:[],...Z("collection")?[{value:"collection",label:U("collection","informationPanelTabsCollection"),content:ze(f(ov,{headingLevel:M}))}]:[],...Z("contents")?[{value:"contents",label:U("contents","informationPanelTabsContents"),content:ze(f(sv,{}))}]:[],...Z("search")?[{value:"search",label:U("search","informationPanelTabsSearch"),content:ze(f(iv,{headingLevel:M,sticky:true,size:"small"}))}]:[],...Z("map")?[{value:"map",label:U("map","informationPanelTabsMap"),content:ze(f(nv,{}))}]:[],...Z("transcript")?[{value:"transcript",label:U("transcript","transcriptLabel"),content:ze(f(av,{sticky:true,size:"small"}))}]:[],...Z("annotations")?[{value:"annotations",label:U("annotations","informationPanelTabsAnnotations"),content:ze(f(cv,{headingLevel:M}))}]:[]],j=it(C=>C.search.query),et=N.some(C=>C.value==="search"),[ct,rt]=H(()=>j&&et?"search":o??null),vt=B(j&&et?j:"");F(()=>{et&&(j&&j!==vt.current&&n===void 0&&rt("search"),vt.current=j)},[j,et,n]);const _=it(C=>{var D;return C.annotationId&&((D=C.regions)!=null&&D.entries.some(q=>q.id===C.annotationId))?C.annotationId:null}),I=N.some(C=>C.value==="contents");F(()=>{_&&I&&n===void 0&&rt("contents")},[_,I,n]);const P=n!==void 0?n:ct,R=(N.some(C=>C.value===P)?P:(V=N[0])==null?void 0:V.value)==="search";if(F(()=>{et&&k.setSetVisible(as,R)},[k,et,R]),!N.length)return null;const z=()=>{var D;const C=y.current;C!=null&&C.contains(document.activeElement)&&((D=dv(C))==null||D.focus()),s==null||s()};return f(c,{ref:C=>{y.current=C,typeof S=="function"?S(C):S&&(S.current=C)},className:Tt("clover-panel",m),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...Y.props,onKeyDown:C=>{b==null||b(C),i&&s&&C.key==="Escape"&&!C.defaultPrevented&&(C.preventDefault(),z())},...v,children:[Y.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":w("informationPanelClose"),...ut(x("informationPanelClose")),onClick:z,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(Ic,{})}),f(Ke,{label:w("informationPanelClose")})]}),f(wl.Provider,{value:N.some(C=>C.value==="about"),children:f(Qg,{items:N,layout:e,value:n!==void 0?n:ct,onValueChange:C=>{n===void 0&&rt(C),r==null||r(C)},label:w("informationPanelTabs"),labelLang:x("informationPanelTabs"),headingLevel:a})})]})});function dv(t){for(let e=t;e&&e!==document.body;e=e.parentElement){if(!e.id)continue;const n=document.querySelector(`[aria-controls~="${e.id.replace(/["\\]/g,"\\$&")}"]`);if(n)return n}return null}const fv=1,hv=4,pv=8,mv=500,gv=4,Sa=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],El=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function ao(t,e){if(t===void 0)return;if(typeof t=="number")return t;const n=parseFloat(t);if(!Number.isNaN(n))return t.endsWith("rem")?n*El():t.endsWith("%")?n/100*e:n}const vr=t=>typeof t=="number"?`${t}px`:t,vv=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},yv=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},bv=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function _v(t){const e=i=>{let a=t[i];for(;a&&!a.classList.contains("clover-split-pane");)a=a[i];return a},n=e("previousElementSibling"),o=e("nextElementSibling"),r=o!=null&&o.hasAttribute("data-sized")?o:n!=null&&n.hasAttribute("data-sized")?n:null;return{sized:r,other:r===o?n:o}}function wv(t,e,n){const{sized:o,other:r}=_v(t);if(!o)return null;const s=e.clientWidth,i=o.dataset.splitKey??"",a=n[i]??{},c=n[(r==null?void 0:r.dataset.splitKey)??""]??{},l=ao(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(ao(c.min,s)??0),p=Math.max(l,Math.min(ao(a.max,s)??u,u)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:p,after:h}}function xv(t,e,n){const o=e!==void 0&&e>t.min+1&&e<t.max-1?[t.min,e,t.max]:[t.min,t.max],r=n??e??t.sized.getBoundingClientRect().width,s=o.find(i=>i>r+1)??o[0];return{to:s,own:e!==void 0&&Math.abs(s-e)<=1}}function Sv(t,e){const n=e.sized.getBoundingClientRect().width,o=fv*El()*(t.shiftKey?4:1),r=e.after?"ArrowLeft":"ArrowRight",s=e.after?"ArrowRight":"ArrowLeft";if(t.key===r)return n+o;if(t.key===s)return n-o;if(t.key==="Home")return e.min;if(t.key==="End")return e.max}function ka(t){var n,o,r;const e=(o=(n=t.target)==null?void 0:n.closest)==null?void 0:o.call(n,".clover-tip");return!!(e&&((r=t.currentTarget)!=null&&r.contains(e)))}function kv(t,e){let n=null,o=false,r=null,s=null;const i=a=>{s==null||s();const c=t(),l=c==null?void 0:c.ownerDocument.defaultView;if(!c||!l)return;const d=g=>Math.hypot(g.clientX-a.x,g.clientY-a.y)>a.reach,u=()=>{Sa.forEach(g=>l.removeEventListener(g,p,true)),l.removeEventListener("pointermove",h,true),clearTimeout(m),s=null},p=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},h=g=>d(g)&&u();Sa.forEach(g=>l.addEventListener(g,p,true)),l.addEventListener("pointermove",h,true);const m=setTimeout(u,mv);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||ka(a))return;const c=e().limits();if(!c)return;a.preventDefault(),n={found:c,x:a.clientX,from:c.sized.getBoundingClientRect().width,slop:a.pointerType==="touch"?pv:hv,moved:false};const l=a.currentTarget;l.dataset.dragging="",(d=l.setPointerCapture)==null||d.call(l,a.pointerId)},move(a){const c=n;if(!c)return;const l=a.clientX-c.x;!c.moved&&Math.abs(l)<c.slop||(c.moved=true,e().resize(c.from+(c.found.after?-l:l)))},up(a){const c=n;o=(c==null?void 0:c.moved)??false,r=c&&!c.moved&&a.type==="pointerup"?{x:a.clientX,y:a.clientY,reach:c.slop*gv}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||ka(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=Sv(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const Ls=he(null);function Ps(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Cv=ie(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=B(null),l=B({}),[d,u]=H({});F(()=>u(vv(n)),[n]);const p=lt((m,g)=>u(b=>{const v={...b};return g===void 0?delete v[m]:v[m]=Math.round(g),yv(n,v),v}),[n]),h=bt(()=>({sizes:d,setSize:p,specs:l,element:c}),[d,p]);return f(Ls.Provider,{value:h,children:f(e,{ref:m=>{c.current=m,Ps(a,m)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),Ml=ie(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=Ut(Ls),p=B(null),[h,m]=H(s??"");F(()=>{if(s)return m(s);const b=bv(u==null?void 0:u.element.current);m(String(b.indexOf(p.current)))},[s,u]),u&&h&&(u.specs.current[h]={min:o,max:r,size:n});const g=u&&h?u.sizes[h]:void 0;return f(e,{ref:b=>{p.current=b,Ps(d,b)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:vr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:vr(n),"--clover-split-max":vr(r),...a},...l,children:c})}),Ev=ie(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=Ut(Ls),{t:l,langOf:d}=Ct(),u=B(null),[p,h]=H(),m=lt(()=>{const x=u.current,$=c==null?void 0:c.element.current;return!x||!$||!c?null:wv(x,$,c.specs.current)},[c]),g=lt(x=>{const $=m();if(!$||!c)return;const O=Math.min($.max,Math.max($.min,x));c.setSize($.key,O),h({now:O,min:$.min,max:$.max})},[m,c]),b=lt(()=>{const x=m();x&&h({now:x.sized.getBoundingClientRect().width,min:x.min,max:x.max})},[m]);F(()=>{const x=c==null?void 0:c.element.current;if(b(),!x||typeof ResizeObserver>"u")return;let $=0;const O=new ResizeObserver(()=>{cancelAnimationFrame($),$=requestAnimationFrame(b)});return O.observe(x),()=>{cancelAnimationFrame($),O.disconnect()}},[b,c,c==null?void 0:c.sizes]);const v=x=>{var $;return Math.round(x/((($=c==null?void 0:c.element.current)==null?void 0:$.clientWidth)||1)*100)},S=()=>{var K,U;const x=m();if(!x||!c)return;const $=((K=c.element.current)==null?void 0:K.clientWidth)??0,O=ao((U=c.specs.current[x.key])==null?void 0:U.size,$),Y=xv(x,O,c.sizes[x.key]);if(!Y.own)return g(Y.to);c.setSize(x.key,void 0),h({now:O,min:x.min,max:x.max})},k=B({limits:m,resize:g,step:S});k.current={limits:m,resize:g,step:S};const[y]=H(()=>kv(()=>u.current,()=>k.current));F(()=>()=>y.dispose(),[y]);const w=i["aria-label"]??l("splitHandle");return f("div",{ref:x=>{u.current=x,Ps(a,x)},role:"separator","aria-orientation":"vertical","aria-label":w,...ut(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":p?v(p.now):void 0,"aria-valuemin":p?v(p.min):void 0,"aria-valuemax":p?v(p.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:x=>{o==null||o(x),y.down(x)},onPointerMove:x=>y.move(x),onPointerUp:x=>y.up(x),onPointerCancel:x=>y.up(x),onClick:x=>{r==null||r(x),y.click(x)},onKeyDown:x=>{s==null||s(x),y.key(x)},...i,children:[n,f(Ke,{label:w})]})});let Tl;function Mv(t){Tl=t}function Iy(){return Tl}function Tv({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Ct(),i=pe().replace(/:/g,"");return f(We,{id:`panel-${i}`,label:r("informationPanelToggle"),lang:s("informationPanelToggle"),expanded:t,controls:n,side:o==="start"?o:void 0,onClick:()=>e(!t),children:f(kt,{children:[f("rect",{x:"64",y:"96",width:"384",height:"320",rx:"40",fill:"none",strokeWidth:"36"}),f("path",{d:"M320 96v320",fill:"none",strokeWidth:"36"}),t&&f("path",{d:"M320 96h88a40 40 0 0 1 40 40v240a40 40 0 0 1-40 40h-88z"})]})})}let Iv,co;const Il=()=>Iv??(Iv=import("./dragToClose-Di8WUOHC.mjs").then(t=>co=t));function Lv(){Il()}function Pv(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=B({enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i});a.current={enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i},F(()=>{const c=t.current;if(!c||(co==null||co.reset(c,a),!e))return;let l=true,d;return Il().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const Av=240,Ov="16rem",Nv="14rem",Rv=31;function Bv(t){const[e,n]=H(t),[o,r]=H(t);return F(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),Av);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function $v(t){const e=n=>t.querySelector(n);return e('[role="tab"][aria-selected="true"]')??e('.clover-sections-button[aria-expanded="true"]')??e(".clover-sections-button")}const Fv=typeof window>"u"?F:Wt;function Dv(t,e){const[n,o]=H();return Fv(()=>{const r=t.current;if(!r)return;const s=()=>{const a=r.clientWidth;if(!a)return;const c=parseFloat(getComputedStyle(document.documentElement).fontSize);o(a>=e*(c||16))};if(s(),typeof ResizeObserver>"u")return;const i=new ResizeObserver(s);return i.observe(r),()=>i.disconnect()},[t,e]),n}const Ca=typeof window>"u"?F:Wt;function zv({id:t,beside:e,defaultOpen:n,side:o,focus:r=$v,slides:s=true,alongside:i,followFocus:a}){var ot,M;const c=B(null),l=B(null),d=B(null),u=e===false,[p,h]=H(n),[m,g]=H(false),b=u?m:p,v=()=>document.querySelector(`button[aria-controls~="${t}"]`),S=()=>a(v),k=()=>{var T,N,j;(T=c.current)!=null&&T.contains(document.activeElement)&&((N=d.current)==null||N.removeAttribute("inert"),(j=v())==null||j.focus(),S())},y=B(0),w=T=>{y.current=u&&T?3:0,y.current||S(),u&&g(T),h(T)},x=()=>{k(),w(false)},$=B(e),O=B(false);if($.current===true&&e===false){const T=document.activeElement;O.current=!!(T&&((ot=c.current)!=null&&ot.contains(T)||(M=v())!=null&&M.contains(T)))}Ca(()=>{var T;O.current&&(O.current=false,(T=v())==null||T.focus(),S()),e===true&&g(false),$.current=e},[e]);const Y=Bv(s&&u&&b),K=s&&u,U=K?Y.mounted:b,tt=K?Y.open:b,Z=u&&tt;return Ca(()=>{const T=d.current;if(T)return Z?T.setAttribute("inert",""):T.removeAttribute("inert"),()=>T.removeAttribute("inert")},[Z]),F(()=>{if(!y.current||!c.current)return;y.current-=1;const T=r(c.current);T==null||T.focus({preventScroll:true}),T&&document.activeElement===T&&(y.current=0)}),Pv(c,{enabled:u&&tt,side:o,onClose:x,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:b,shown:U,opened:tt,setOpen:w,close:x,onKeyDown:T=>{u&&b&&T.key==="Escape"&&!T.defaultPrevented&&(T.preventDefault(),x())},scrim:u&&U&&{ref:l,"data-open":tt,"aria-hidden":true,onMouseDown:T=>T.preventDefault(),onClick:x}}}const Hv=typeof window>"u"?F:Wt;function Wv(t,e,n){Hv(()=>{const o=t.current,r=o==null?void 0:o.parentElement;if(!n||!o||!r)return;const s=()=>{const c=e();o.style.setProperty("--clover-template-spine-top",`${c?c.getBoundingClientRect().top-r.getBoundingClientRect().top:0}px`)};s();const i=new ResizeObserver(s);for(const c of Array.from(r.children))i.observe(c);const a=e();return a&&i.observe(a),()=>i.disconnect()},[t,n])}const Uv=()=>import("./PanelPart-CF2Fw2b4.mjs");function jv({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=zv({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=B(null),[u,p]=H(),h=a??u,m=()=>Uv().then(v=>p(()=>v.default));F(()=>{c.open&&!h&&m()},[c.open]),Wv(d,()=>s==null?void 0:s(),l&&!!s);const g=v=>{var S,k;(k=(S=v.target).closest)!=null&&k.call(S,`[aria-controls~="${t}"]`)&&(h||m(),c.over&&Lv())},b=f(Vv,{sections:i,open:c.open,onOpenChange:v=>v&&!h?m().then(()=>c.setOpen(true)):c.setOpen(v),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:b,Part:h,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function Vv({sections:t,...e}){return Is(t).length?f(Tv,{...e}):null}function qv({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=Is(n.sections);if(!c.length)return null;const l=s&&f(kt,{children:[f(Ev,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(kt,{children:[i==="end"&&l,f(Ml,{ref:t.pane,id:o,"data-spine":r||void 0,"data-side":i,name:"panel","data-about":c.includes("about")||void 0,className:["clover-template-panel clover-template-drawer",e].filter(Boolean).join(" "),size:"24rem",min:r?void 0:Nv,"data-open":t.opened,hidden:!t.shown,children:a&&f(a,{...n,onClose:r?t.close:void 0,closeOnEscape:r})}),i==="start"&&l,t.scrim&&f("div",{className:"clover-template-scrim",...t.scrim})]})}const Kv=30;function Zv(){const t=B(0);return F(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Gv()?r.focus():++n<Kv&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Gv(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Xv({className:t,header:e=true,headingLevel:n=2,panel:o=true,defaultPanelOpen:r,panelLayout:s="accordion",panelSections:i,panelLabels:a,download:c=true,languages:l=true,interfaceLanguages:d=true,items:u="slider",singleItem:p=false,storageKey:h="clover-template-default",fill:m=false,collapseControls:g,canvasOptions:b,...v}){const S=B(null),k=pe().replace(/:/g,""),y=`${k}-panel`,w=al(n,`${k}-title`),x=jv({id:y,beside:Dv(S,Rv),defaultOpen:r??true,followFocus:Zv(),sections:i,body:()=>{var Y;return(Y=S.current)==null?void 0:Y.querySelector(".clover-template-default-body")},panel:uv}),$=x.over,O=o&&x.docked;return f(gf,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":m||void 0,...e?w.group:null,...v,children:f(Cv,{ref:S,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?x.splitProps:{"data-panel":"beside"},children:[f(Ml,{ref:x.main,className:"clover-template-default-main",min:$?void 0:Ov,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Yv,{title:w}),f(_o,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(vl,{className:"clover-template-default-provider",children:f(yl,{})})]}),f(fg,{loading:false}),f(Qv,{items:u,singleItem:p,body:f(Lm,{className:"clover-template-default-body",collapseControls:g,options:b,children:o&&!O&&x.toggle},"body")})]}),o&&f(qv,{pane:x,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,interfaceLanguages:d,headingLevel:e?ty(n):n})]})})}function Yv({title:t}){const e=it(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=pp();return Jv(n==null?void 0:n.entries[0]),f(kt,{children:[f(rn,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(rn,{as:"p",label:e,className:"clover-template-default-collection"}),f(_o,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(rn,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(_o,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Jv(t){const{clover:e}=ae(),n=it(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=B(null);F(()=>{if(!t||!n||o.current===n)return;o.current=n;const{annotationId:r,canvasId:s}=e.store.get();!r&&s===t.canvasId&&e.selectAnnotation(t.id)},[e,t,n])}function Qv({body:t,items:e,singleItem:n}){const{direction:o}=xs(),r=e==="slider"&&(o==="top-to-bottom"||o==="bottom-to-top"),s=f("div",{className:"clover-template-default-rail-header",children:[f(ey,{}),f(dg,{})]},"header"),i=e&&f(_o,{layout:e,orientation:r?"vertical":void 0,singleItem:n});return f("div",{className:"clover-template-default-views","data-orientation":r?"vertical":void 0,children:r?[f("div",{className:"clover-template-default-rail","data-orientation":"vertical",children:i},"rail"),t,s]:[t,f("div",{className:"clover-template-default-rail",children:[s,i]},"rail")]})}const ty=t=>t+1;function ey(){const t=Ss();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(ue.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(rn,{label:e.label})]},e.id))})}const ny=()=>import("./renderers-Cs9Wbr3d.mjs"),oy=gt(()=>import("./Document-BGRVcflJ.mjs").then(t=>({default:t.Document}))),ry=gt(()=>import("./Gallery-OZ5ZiwmB.mjs").then(t=>({default:t.Gallery}))),Ea={default:Xv,document:oy,gallery:ry},sy={header:["default"],panel:["default","gallery"],items:["default","gallery"],singleItem:["default","document"],fill:["default"],defaultPanelOpen:["default","document","gallery"],panelLayout:["default","document","gallery"],panelSections:["default","document","gallery"],panelLabels:["default","document","gallery"],download:["default","document","gallery"],languages:["default","document","gallery"],storageKey:["default","document","gallery"],defaultSidebarOpen:["document"],size:["gallery"],height:["gallery"],gap:["gallery"],secondary:["gallery"],summary:["gallery"],lightboxItems:["gallery"]};function iy({props:t}){const e=typeof t.template=="string"&&t.template in Ea?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=sy[i])==null?void 0:a.includes(e))??true)})),o=nn(ny,!!t.renderers),r=bt(()=>o==null?void 0:o.toRenderers(t.renderers),[o,t.renderers]);if(t.renderers&&!o)return null;n.renderers=r,typeof n.storageKey=="string"&&(n.storageKey=n.storageKey.trim().toLowerCase()==="false"?false:n.storageKey);const s=Ea[e];return f(xt,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const ay=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,cy={mapWorkerUrl:ay},ly={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"}}};Mv(cy.mapWorkerUrl);cu(ly,()=>Promise.resolve(iy));export{Cu as $,B as A,Lm as B,ee as C,Cv as D,Ml as E,_o as F,Ev as G,Ov as H,Cf as I,qv as J,Lv as K,rn as L,bu as M,it as N,pp as O,dg as P,xy as Q,gf as R,fg as S,bt as T,dp as U,xt as V,gt as W,_a as X,he as Y,Ut as Z,Wt as _,ae as a,Nc as a$,uv as a0,Qd as a1,Cy as a2,ss as a3,ul as a4,dl as a5,Ln as a6,fl as a7,wd as a8,_t as a9,ue as aA,Wf as aB,Th as aC,Mc as aD,bc as aE,Eh as aF,Mh as aG,Vf as aH,Wc as aI,Wd as aJ,gs as aK,vp as aL,ta as aM,If as aN,Pc as aO,te as aP,Rf as aQ,Ch as aR,Uf as aS,We as aT,bf as aU,Ph as aV,En as aW,Lf as aX,kf as aY,Pf as aZ,Af as a_,Ts as aa,ut as ab,Bt as ac,mc as ad,Fd as ae,qe as af,Ct as ag,Lo as ah,Tt as ai,ug as aj,ie as ak,lg as al,Co as am,Jr as an,Qr as ao,Nn as ap,Pp as aq,ia as ar,sa as as,Xc as at,Ss as au,mp as av,aa as aw,is as ax,Eo as ay,W as az,Wu as b,po as b$,Nf as b0,Of as b1,_d as b2,wg as b3,xg as b4,cp as b5,we as b6,Jg as b7,wy as b8,yy as b9,Id as bA,qc as bB,lh as bC,dc as bD,ln as bE,as as bF,or as bG,ef as bH,Ad as bI,Dn as bJ,Om as bK,Nm as bL,ns as bM,Lp as bN,Re as bO,Rn as bP,Iy as bQ,ol as bR,Mt as bS,Cd as bT,Hd as bU,ch as bV,ds as bW,hl as bX,Ef as bY,nh as bZ,Ve as b_,fy as ba,hs as bb,Ty as bc,Ue as bd,Dc as be,wh as bf,Ng as bg,sc as bh,es as bi,My as bj,Ey as bk,Bd as bl,ls as bm,hy as bn,nr as bo,bs as bp,ko as bq,nn as br,ip as bs,hc as bt,Io as bu,fn as bv,Sc as bw,Av as bx,xl as by,$i as bz,xs as c,Cs as c0,by as c1,dh as c2,lr as c3,md as c4,kh as c5,lc as c6,kp as c7,Td as c8,un as c9,Bn as ca,Rr as cb,qi as cc,Ic as cd,py as ce,my as cf,gy as cg,Cp as ch,gm as ci,na as cj,yp as ck,bp as cl,_y as cm,fe as cn,se as co,gg as cp,pl as cq,vy as cr,ys as cs,Rm as ct,Lc as cu,eu as cv,Fm as cw,hp as d,H as e,pe as f,Sy as g,ky as h,Zv as i,zv as j,kt as k,Dv as l,jv as m,Pu as n,Rv as o,Ke as p,lt as q,Es as r,$m as s,al as t,f as u,je as v,vl as w,le as x,F as y,yl as z};