@nulib/clover 4.7.0 → 4.8.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.
- package/dist/base.css +1 -1
- package/dist/components/Body/glyphs.mjs +48 -0
- package/dist/components/Canvas/CanvasView.mjs +27 -6
- package/dist/components/Canvas/Controls.mjs +3 -2
- package/dist/components/Canvas/PlaceBox.mjs +40 -12
- package/dist/components/Label/Label.mjs +22 -2
- package/dist/components/Map/MapView.mjs +141 -40
- package/dist/components/Map/placePicture.mjs +16 -0
- package/dist/core/geo-detect.mjs +10 -4
- package/dist/core/geo.mjs +48 -11
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/index.d.mts +16 -2
- package/dist/map/index.d.mts +7 -1
- package/dist/spacing.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles/map.css +1 -1
- package/dist/styles/split.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +1 -0
- package/dist/ui/controlGlyphs.mjs +2 -2
- package/dist/ui/sheets/map.mjs +1 -1
- package/dist/web-components/About-BBhina2G.mjs +1 -0
- package/dist/web-components/{AnnotationItems-vwOrc2LC.mjs → AnnotationItems-ixjSW8yC.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-DEbZR6u5.mjs → AnnotationMenu-By2y_30w.mjs} +1 -1
- package/dist/web-components/{AnnotationState-CHI2fYVb.mjs → AnnotationState-B6FRNt_k.mjs} +1 -1
- package/dist/web-components/{Annotations-DelBDbuL.mjs → Annotations-Y5LoB9VS.mjs} +1 -1
- package/dist/web-components/{Annotations-DvLurCSg.mjs → Annotations-ulJZljFP.mjs} +1 -1
- package/dist/web-components/{Body-eYyY_zlC.mjs → Body-BKdgKqQH.mjs} +1 -1
- package/dist/web-components/{BodyAlert-DeoEp76n.mjs → BodyAlert-Bc8OjERW.mjs} +1 -1
- package/dist/web-components/{Button-M-Lskr_F.mjs → Button-Dh8tcsM0.mjs} +1 -1
- package/dist/web-components/{Camera-Z7dN1HO1.mjs → Camera-e5pZW5l9.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-BqkQkUat.mjs → Canvas2DBackend-CyJf0y1M.mjs} +1 -1
- package/dist/web-components/CanvasView-H-adU7o_.mjs +2 -0
- package/dist/web-components/{CaptionDetails-D9OrUqvi.mjs → CaptionDetails-F6h2wWBc.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-PjHy5-zS.mjs → ChaptersMenu-liO4U8ui.mjs} +1 -1
- package/dist/web-components/{Chevron-lIH5boXF.mjs → Chevron-BNo5Q2aq.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-Coknxzkh.mjs → ChoiceMenu-Cvy5dTot.mjs} +1 -1
- package/dist/web-components/{Collection-DfWwFkgY.mjs → Collection-DiFz-jee.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-CYa0N09G.mjs → CollectionSelect-C_g2Fe1a.mjs} +1 -1
- package/dist/web-components/{Connected-tpnive3y.mjs → Connected-CWghNEmk.mjs} +1 -1
- package/dist/web-components/{Connected-Dy4Fjp_-.mjs → Connected-D9KwnUYu.mjs} +1 -1
- package/dist/web-components/{Connected-CkrBE4v-.mjs → Connected-UFJ9HAdm.mjs} +1 -1
- package/dist/web-components/Contents-BNcywDyx.mjs +1 -0
- package/dist/web-components/{ControlMenu-DARWTFzU.mjs → ControlMenu-MLBcT_vr.mjs} +1 -1
- package/dist/web-components/ControlsFade-Bizly8sa.mjs +1 -0
- package/dist/web-components/{CountMenu-DNkuen7t.mjs → CountMenu-gdNdHeAS.mjs} +1 -1
- package/dist/web-components/Cue-D_qssa2V.mjs +1 -0
- package/dist/web-components/Document-yh-X-UO2.mjs +1 -0
- package/dist/web-components/{DomLayers-B0tKZUWz.mjs → DomLayers-Bd10mvx8.mjs} +1 -1
- package/dist/web-components/{Download-CVmsdUyH.mjs → Download-rt8mrS37.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BrGtXUx4.mjs → EntryBodies-qgESmAus.mjs} +1 -1
- package/dist/web-components/EntryThumbnail-aB6t0QY7.mjs +1 -0
- package/dist/web-components/{FieldPill-Dr-7bigM.mjs → FieldPill-JFwwrqWO.mjs} +1 -1
- package/dist/web-components/FrameAnimation-Ca1Pk7qj.mjs +1 -0
- package/dist/web-components/{Gallery-BI_p4a2m.mjs → Gallery-C1Ewonpl.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-Bo56m375.mjs → GlobeGlyph-vFbGlcLV.mjs} +1 -1
- package/dist/web-components/{HideToggle-COFq37Jg.mjs → HideToggle-4Lf9xVTa.mjs} +1 -1
- package/dist/web-components/{ImageControls-DQwLWsTL.mjs → ImageControls-Cp0A9tPX.mjs} +1 -1
- package/dist/web-components/Items-Doy0J7Ux.mjs +1 -0
- package/dist/web-components/{ItemsVertical-Dv3gKZJ2.mjs → ItemsVertical-zBM4RrGw.mjs} +1 -1
- package/dist/web-components/Label-DB3g0INN.mjs +1 -0
- package/dist/web-components/{LanguageChoice-DTNAjTpR.mjs → LanguageChoice-wwjVQRmA.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-DViT7hCI.mjs → LanguageMenu-kKZz7poC.mjs} +1 -1
- package/dist/web-components/{LightboxView-DUEAuXcS.mjs → LightboxView-ftwkLwrJ.mjs} +1 -1
- package/dist/web-components/{ListEnd-Ccc_v93N.mjs → ListEnd-Du_798h9.mjs} +1 -1
- package/dist/web-components/{Loaded-DlWNFC49.mjs → Loaded-ByZZ-qYa.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-BU03onyH.mjs → LoadedCanvas-BrMlbUZj.mjs} +1 -1
- package/dist/web-components/LoadedMap-kBEd97zG.mjs +1 -0
- package/dist/web-components/{Loading-1cRP8fn5.mjs → Loading-DTE24hmb.mjs} +1 -1
- package/dist/web-components/Map-BznyNYpR.mjs +1 -0
- package/dist/web-components/MapView-BnB09keO.mjs +3 -0
- package/dist/web-components/{Markup-23-Aibht.mjs → Markup-DpisaBAv.mjs} +1 -1
- package/dist/web-components/MediaBody-BciN7i_p.mjs +1 -0
- package/dist/web-components/{MediaBody-dXy6NIcq.mjs → MediaBody-GJYCIKKh.mjs} +1 -1
- package/dist/web-components/{NavDate-DT_7gQEE.mjs → NavDate-Bgz3c5GY.mjs} +1 -1
- package/dist/web-components/{Navigator-COqGN-K4.mjs → Navigator-kdzuaGZ3.mjs} +1 -1
- package/dist/web-components/{Pager-DY6QIfJo.mjs → Pager-CLTw7uPB.mjs} +1 -1
- package/dist/web-components/{PagerLayout-CXSF9P8N.mjs → PagerLayout-Ce7YXoX-.mjs} +1 -1
- package/dist/web-components/Panel-CUH9brlN.mjs +1 -0
- package/dist/web-components/PanelPart-DUT_EYSr.mjs +1 -0
- package/dist/web-components/{PanelToggle-D9JBD6t1.mjs → PanelToggle-DbiKKtrJ.mjs} +1 -1
- package/dist/web-components/PartOfManifest-Df1eY2K1.mjs +1 -0
- package/dist/web-components/{Pending-BsqpZMEF.mjs → Pending-DYk0BE3F.mjs} +1 -1
- package/dist/web-components/PlaceBox-O88VA7H8.mjs +1 -0
- package/dist/web-components/Placeholder-DmXW9CPP.mjs +1 -0
- package/dist/web-components/{Position-qHH_2RQA.mjs → Position-D7KEsDvf.mjs} +1 -1
- package/dist/web-components/Primitives-CNiASHFF.mjs +1 -0
- package/dist/web-components/Provider-DnJAJHRK.mjs +1 -0
- package/dist/web-components/{ReadMore-Trj9tAw5.mjs → ReadMore-UB3ZsYTS.mjs} +1 -1
- package/dist/web-components/{Root-DIfyZZ9O.mjs → Root-6ACRHIvO.mjs} +1 -1
- package/dist/web-components/Scene-BWWpIp5i.mjs +1 -0
- package/dist/web-components/{SceneView-B7Zrpafx.mjs → SceneView-BKtxkOM3.mjs} +1 -1
- package/dist/web-components/{Search-DhsZJhFF.mjs → Search-CryKgttq.mjs} +1 -1
- package/dist/web-components/{Sections-EpYlUFGL.mjs → Sections-BYdISeOX.mjs} +1 -1
- package/dist/web-components/{SeekMarks-C0NHUzE_.mjs → SeekMarks-DTazLy01.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-cmPpspAM.mjs → StandaloneItems-Bro9DLh-.mjs} +1 -1
- package/dist/web-components/{Status-BeDk5zEi.mjs → Status-BtQ3Lqc9.mjs} +1 -1
- package/dist/web-components/{Steps-BDB0OPKa.mjs → Steps-BlSuRZ-G.mjs} +1 -1
- package/dist/web-components/{TargetItems-DHcGeFqU.mjs → TargetItems-BJUccJfF.mjs} +1 -1
- package/dist/web-components/Timeline-BmgF1gai.mjs +1 -0
- package/dist/web-components/{Tip-PBxp-ONQ.mjs → Tip-B8n5Kjqv.mjs} +1 -1
- package/dist/web-components/{Transcript-DbhV6Vxo.mjs → Transcript-CwvckoND.mjs} +1 -1
- package/dist/web-components/Transport-Cm1pHOJa.mjs +1 -0
- package/dist/web-components/{Transport-wJNLFRXZ.mjs → Transport-DmXWNiJV.mjs} +1 -1
- package/dist/web-components/annotation-collection-CQ-BJLMc.mjs +1 -0
- package/dist/web-components/{annotation-name-DCHYfYjG.mjs → annotation-name-QYiS95M_.mjs} +1 -1
- package/dist/web-components/{annotations-content-CLVJE9-j.mjs → annotations-content-NdLfsk2q.mjs} +1 -1
- package/dist/web-components/{body-DY6_Kb7A.mjs → body-DHQxq2z0.mjs} +1 -1
- package/dist/web-components/{canvas-BsmSDfXr.mjs → canvas-Dbx-77OG.mjs} +1 -1
- package/dist/web-components/{cloverEngine-xAanVNmS.mjs → cloverEngine-Bh3k15LZ.mjs} +1 -1
- package/dist/web-components/{viewer/content-state-reader-CIVUq8ar.mjs → content-state-reader-BZSYqMJ7.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-LR_viOPR.mjs → controlGlyphs-3GULDog9.mjs} +1 -1
- package/dist/web-components/{controls-CSwaU0O6.mjs → controls-kvloQJj2.mjs} +1 -1
- package/dist/web-components/custom-elements.json +9 -1
- package/dist/web-components/downloads-D4s3htw7.mjs +1 -0
- package/dist/web-components/{dragToClose-BXoYlfWj.mjs → dragToClose-DrW90oMa.mjs} +1 -1
- package/dist/web-components/{engine-Codq0RYR.mjs → engine-BIWYzj9q.mjs} +1 -1
- package/dist/web-components/{engines-kj0OVyAK.mjs → engines-BmbSBhjU.mjs} +1 -1
- package/dist/web-components/{es-Czdt8By_.mjs → es-DRRI3WDi.mjs} +1 -1
- package/dist/web-components/fetchManifest-DXSuJeLM.mjs +1 -0
- package/dist/web-components/{fi-RWtClOWA.mjs → fi-BmlZ-U-4.mjs} +1 -1
- package/dist/web-components/follow-content-auD0I2Nd.mjs +1 -0
- package/dist/web-components/{fr-CFRY9P3c.mjs → fr-k93P7lwp.mjs} +1 -1
- package/dist/web-components/{fromManifest-Bzpc1R9t.mjs → fromManifest-CdeuDtuO.mjs} +1 -1
- package/dist/web-components/geo-detect-D5AXivx8.mjs +1 -0
- package/dist/web-components/glyphs-BVPhaq44.mjs +1 -0
- package/dist/web-components/{hooks-CAA2UpX_.mjs → hooks-C0LNj0ea.mjs} +1 -1
- package/dist/web-components/image-layers-DzwVP7WA.mjs +1 -0
- package/dist/web-components/{image-service-content-Rn8Tl4Hk.mjs → image-service-content-CZwoPXfe.mjs} +1 -1
- package/dist/web-components/{imageService-BBwzg9uY.mjs → imageService-BCrg9Uyo.mjs} +1 -1
- package/dist/web-components/{index-BujnlXi0.mjs → index-BA7fKawM.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-D_Hb0t9G.mjs → it-DEzCslib.mjs} +1 -1
- package/dist/web-components/items-BpimvRRq.mjs +1 -0
- package/dist/web-components/items-C7mdtSGR.mjs +1 -0
- package/dist/web-components/{ja-BoJ9dFmn.mjs → ja-BDKsn1vT.mjs} +1 -1
- package/dist/web-components/label-BQxfuivB.mjs +1 -0
- package/dist/web-components/layout-DSxI5Mzd.mjs +1 -0
- package/dist/web-components/link-DZAIqASM.mjs +1 -0
- package/dist/web-components/logo-CQokQEbF.mjs +1 -0
- package/dist/web-components/models-GZeNnoc0.mjs +1 -0
- package/dist/web-components/{no-B43QGinl.mjs → nb-Cyf1RkZ8.mjs} +1 -1
- package/dist/web-components/{nn-BmkkC79H.mjs → nn-CzczXFxL.mjs} +1 -1
- package/dist/web-components/{nb-B43QGinl.mjs → no-Cyf1RkZ8.mjs} +1 -1
- package/dist/web-components/{nodes-CDVV_37U.mjs → nodes-DgJ1Y0ql.mjs} +1 -1
- package/dist/web-components/overlayImage-CDpjGK3p.mjs +1 -0
- package/dist/web-components/{panel-DhzvJaxa.mjs → panel-D0ihN4Yg.mjs} +1 -1
- package/dist/web-components/part-CT8rMbqQ.mjs +1 -0
- package/dist/web-components/placePicture-DH51gowj.mjs +1 -0
- package/dist/web-components/{playerSurface-BxtfijMA.mjs → playerSurface-B4r18_Sh.mjs} +1 -1
- package/dist/web-components/{pointer-DWmL4uP7.mjs → pointer-ACmsWSTU.mjs} +1 -1
- package/dist/web-components/{provider-BziMOPSN.mjs → provider-BSqLpfoT.mjs} +1 -1
- package/dist/web-components/{pt-BbtIGupi.mjs → pt-Bx2G8tAe.mjs} +1 -1
- package/dist/web-components/range-regions-CFzuyC2x.mjs +1 -0
- package/dist/web-components/{read-more-DdhUDS2g.mjs → read-more-CT9mZ4NJ.mjs} +1 -1
- package/dist/web-components/{readingLanguages-CtdxDxbb.mjs → readingLanguages-Bm51Uo8l.mjs} +1 -1
- package/dist/web-components/{rendererSurface-B6BzhEeK.mjs → rendererSurface-C5m7KyMK.mjs} +2 -2
- package/dist/web-components/{renderers-BmoCXuIv.mjs → renderers-DqOPIccG.mjs} +1 -1
- package/dist/web-components/{resource-BjumsIsL.mjs → resource-CdnESvV9.mjs} +1 -1
- package/dist/web-components/{save-file-BCXU9sr5.mjs → save-file-12iPPQyl.mjs} +1 -1
- package/dist/web-components/search-BOcQWXXc.mjs +1 -0
- package/dist/web-components/shared-xNidXfMd.mjs +1 -0
- package/dist/web-components/{show-link-DG3TQzXI.mjs → show-link-CpmbC72n.mjs} +1 -1
- package/dist/web-components/{split-C_xPhLhD.mjs → split-crk5o-eb.mjs} +1 -1
- package/dist/web-components/{status-BesMKiXg.mjs → status-DoFsFCOb.mjs} +1 -1
- package/dist/web-components/styles-DN-wttmX.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-BxTYGSjc.mjs +1 -0
- package/dist/web-components/{tip-UheLXik6.mjs → tip-BdgOVBey.mjs} +1 -1
- package/dist/web-components/{toggle-Bl0NKbUx.mjs → toggle-CxlScMN7.mjs} +1 -1
- package/dist/web-components/{useContainerName-CDABwGvV.mjs → useContainerName-C7EZNnlj.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-Dpl7D0m0.mjs → useControlsVisibility-9PkGzYK3.mjs} +1 -1
- package/dist/web-components/{useNearViewport-C_3U4CAr.mjs → useNearViewport-C8Y9tbrm.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-QFtFpyV3.mjs → useScrollTrack-C0Ef5b-M.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-FXIoYk9T.mjs → AnnotationItems-C869mTYV.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-nlFTIjg6.mjs → AnnotationMenu-BdkH82NQ.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-Diacn0Xk.mjs → AnnotationState-CU298l_b.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-Bs94MQmn.mjs → Annotations-BY8QDb9l.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-CAmFWoUj.mjs → Annotations-IaKX8BQB.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-BztBm6yM.mjs → Canvas2DBackend-DuUL7Wn0.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-CnzK-9IJ.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-hOyR7aOL.mjs → ChaptersMenu-6Mu_YuaY.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-Dq4FBYhi.mjs → ChoiceMenu-9EZhHBEq.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-XZzrypzP.mjs → Collection-C_iaTy8f.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-nHyQM-64.mjs → Connected-CEfEDzWJ.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-BKk80iCZ.mjs → Connected-DSMZIn9R.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-0FL0Dr2p.mjs → Contents-fAlVCKr5.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-BRUWyNEi.mjs → ControlMenu-Chi1pBFc.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-DguyDuyM.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BxdPpin6.mjs → CountMenu-BCeHt01J.mjs} +1 -1
- package/dist/web-components/viewer/Cue-B2yHzH0v.mjs +1 -0
- package/dist/web-components/viewer/{Document-CN5l-m01.mjs → Document-DfTuEc9K.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-CvZPZjNg.mjs → DomLayers-kMBbOAxJ.mjs} +1 -1
- package/dist/web-components/viewer/{Download-B9UuJ9wY.mjs → Download-odx1XL-v.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-BNtItsOn.mjs → EntryBodies-DudDcNik.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-BQepnfmY.mjs → EntryThumbnail-B6QXKl4_.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-D0efaqWg.mjs → FieldPill-McMG7d8J.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-C5bLeZc9.mjs → FrameAnimation-nvSxSZXx.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-BuhT4BOj.mjs → Gallery-C1_u4G-E.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-B1Q5TIaT.mjs → GlobeGlyph-CCLt6oJP.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-Dh4AUuX3.mjs → HideToggle-Ce11kbAX.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-ClVI428k.mjs → ImageControls-D91KmrS3.mjs} +1 -1
- package/dist/web-components/viewer/{ItemsVertical-BRiKuRL-.mjs → ItemsVertical-FjomG7wy.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-BTUONm8l.mjs → LanguageChoice-DK0ITQY4.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-NDTTmazt.mjs → LanguageMenu-BAoT1XAX.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-DMTkdJB6.mjs → LightboxView-DOx6IfvN.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-D2sYRngp.mjs → ListEnd-CXsCFPMc.mjs} +1 -1
- package/dist/web-components/viewer/MapView-BsDJtLAk.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-qOIVDdNm.mjs → MediaBody-Cg4ARhwy.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CepsC09h.mjs → MediaBody-DsMNbnTU.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-Co0A4bkP.mjs → NavDate-rmVMLVIA.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Dyf2F7fU.mjs → Navigator-Dh-a5-GN.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-nnWJump4.mjs → PagerLayout-COLqXCRw.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-Dai61xLE.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-7z0GBIsk.mjs → PartOfManifest-D1iufWAj.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-CINvMgWh.mjs +1 -0
- package/dist/web-components/viewer/{Placeholder-DF1FFSpC.mjs → Placeholder-Biz7HHCE.mjs} +1 -1
- package/dist/web-components/viewer/{Search-BSK3yFqw.mjs → Search-FbVd9LpP.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-267Lxpeb.mjs → SeekMarks-Bd08UMXC.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-Cv4dGiJh.mjs → StandaloneItems-ByJy-Mo8.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-C1BHjJsE.mjs → Steps-BWbZzM2H.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-CBsfkmeg.mjs → TargetItems-DOtPfQtV.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-BBtNC39n.mjs → Transcript-DccBh_ne.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-DXFW6beP.mjs → Transport-Cb5zCNgN.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-BZB1ZAvP.mjs → Transport-DTPfFgtA.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-BcDJ7GZv.mjs → annotation-collection-_3io5Bjz.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-CPXHHlGo.mjs → annotation-name-DV96qLy_.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-Cb7_aoII.mjs → annotations-content-O8srMa2_.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CX9s9-Uu.mjs → cloverEngine-Dm0m8BNg.mjs} +1 -1
- package/dist/web-components/viewer/content-state-reader-DZhx2OxK.mjs +1 -0
- package/dist/web-components/viewer/{dragToClose-BGb6fAd6.mjs → dragToClose-BrUDwA_c.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D8zizfoi.mjs → fetchManifest-C7HrStJ2.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-BOcIhHhz.mjs → follow-content-DplyQT1g.mjs} +1 -1
- package/dist/web-components/viewer/{host-CNGrorb7.mjs → host-BqYiw4PF.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DGdl54CF.mjs → image-layers-BNSL4PGS.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-DpXbrUuI.mjs → image-service-content-Bs3jtvh5.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-CwQzXqUe.mjs → link-B-CqoY52.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-DtyovrNi.mjs → overlayImage-B9WbeUxW.mjs} +1 -1
- package/dist/web-components/viewer/placePicture-BrnrnHMa.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-iACwlawo.mjs → range-regions-BFWHKv3i.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-DUD0Xleg.mjs → renderers-D7gh2mXP.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-Z6klARC7.mjs → save-file-DImt0i6t.mjs} +1 -1
- package/dist/web-components/viewer/{search-TNACVRnK.mjs → search-D-pqH7Ys.mjs} +1 -1
- package/dist/web-components/viewer/styles-BvYBVDBK.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-C-Af-o1n.mjs → useControlsVisibility-Cehuan1d.mjs} +1 -1
- package/dist/web-components/viewer/viewer-D1qPD9xX.mjs +29 -0
- package/dist/web-components/viewer/{vtt-DLGuRf3w.mjs → vtt-DYzon3yt.mjs} +1 -1
- package/dist/web-components/{viewer-Br37L21l.mjs → viewer-KTpprzfJ.mjs} +1 -1
- package/dist/web-components/{vtt-DnFNzhne.mjs → vtt-VqUamaGu.mjs} +1 -1
- package/dist/web-components/{zh-Hans-BAFQ7Pft.mjs → zh-Hans-Dfs9s_bI.mjs} +1 -1
- package/dist/web-components/{zh-Hant-DS7iN4iO.mjs → zh-Hant-Dk8wlKuD.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/About-Cb0IP45J.mjs +0 -1
- package/dist/web-components/CanvasView-DC9Zf7Tn.mjs +0 -2
- package/dist/web-components/Contents-JgQb97do.mjs +0 -1
- package/dist/web-components/ControlsFade-DXN4_Kcr.mjs +0 -1
- package/dist/web-components/Cue-CcxumEor.mjs +0 -1
- package/dist/web-components/Document-74sHCl40.mjs +0 -1
- package/dist/web-components/EntryThumbnail-DZPp7vk8.mjs +0 -1
- package/dist/web-components/FrameAnimation-Dr4lStqa.mjs +0 -1
- package/dist/web-components/Items-Co-0SKPW.mjs +0 -1
- package/dist/web-components/Label-BGPmD5NF.mjs +0 -1
- package/dist/web-components/LoadedMap-Qernkf9V.mjs +0 -1
- package/dist/web-components/Map-DdcDYjzX.mjs +0 -1
- package/dist/web-components/MapView-BW4dD40Q.mjs +0 -3
- package/dist/web-components/MediaBody-C37X6xTP.mjs +0 -1
- package/dist/web-components/Panel-Dj_tQ89q.mjs +0 -1
- package/dist/web-components/PanelPart-BPWf5byV.mjs +0 -1
- package/dist/web-components/PartOfManifest-14dPnF-N.mjs +0 -1
- package/dist/web-components/PlaceBox-B_OXZC8S.mjs +0 -1
- package/dist/web-components/Placeholder-BBjY81nx.mjs +0 -1
- package/dist/web-components/Primitives-3boP2HT0.mjs +0 -1
- package/dist/web-components/Provider-laA0MWws.mjs +0 -1
- package/dist/web-components/Scene-DGLalXcX.mjs +0 -1
- package/dist/web-components/Timeline-DWhKhdYb.mjs +0 -1
- package/dist/web-components/Transport-BtIKsYml.mjs +0 -1
- package/dist/web-components/annotation-collection-DA_XNrVM.mjs +0 -1
- package/dist/web-components/content-state-reader-CHLSQAIO.mjs +0 -1
- package/dist/web-components/downloads-UWzv4fZU.mjs +0 -1
- package/dist/web-components/fetchManifest-Cw6_bmlS.mjs +0 -1
- package/dist/web-components/follow-content-DcFvV4qy.mjs +0 -1
- package/dist/web-components/glyphs-BuGNvvP-.mjs +0 -1
- package/dist/web-components/image-layers-DhYm73Ju.mjs +0 -1
- package/dist/web-components/items-CD8kE1Gd.mjs +0 -1
- package/dist/web-components/items-DjWXCG9C.mjs +0 -1
- package/dist/web-components/label-CssXf-do.mjs +0 -1
- package/dist/web-components/layout-CwH0NLMY.mjs +0 -1
- package/dist/web-components/link-Ujj3Xhp2.mjs +0 -1
- package/dist/web-components/logo-Bd8fSMYN.mjs +0 -1
- package/dist/web-components/models-CxmIV7Mb.mjs +0 -1
- package/dist/web-components/overlayImage-T6FKPFQJ.mjs +0 -1
- package/dist/web-components/part-D1ZpOfJ5.mjs +0 -1
- package/dist/web-components/range-regions-V0yKxXzo.mjs +0 -1
- package/dist/web-components/search-Bn5kscQv.mjs +0 -1
- package/dist/web-components/shared-pIVPxZLY.mjs +0 -1
- package/dist/web-components/sizedImage-CagzYSJ_.mjs +0 -1
- package/dist/web-components/styles-BU6g0i7W.mjs +0 -1
- package/dist/web-components/thumbnail-bCaBWTkt.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-lhSoA0rU.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-9CrQlxNq.mjs +0 -1
- package/dist/web-components/viewer/Cue-B75D4FgX.mjs +0 -1
- package/dist/web-components/viewer/MapView-WwJmyeZr.mjs +0 -3
- package/dist/web-components/viewer/PanelPart-D479R8OK.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Icavvsim.mjs +0 -1
- package/dist/web-components/viewer/styles-CLp9tx_B.mjs +0 -1
- package/dist/web-components/viewer/viewer-7dcL5wmD.mjs +0 -29
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var Iu=Object.defineProperty;var Lu=(t,e,n)=>e in t?Iu(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var L=(t,e,n)=>Lu(t,typeof e!="symbol"?e+"":e,n);import{s as tc}from"./styles-BvYBVDBK.mjs";function Pu(t={}){return Promise.resolve().then(()=>$d).then(e=>e.initCloverI18n(t))}const ec="@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 Au=null,Tn=null;const Ou=()=>Au??(Au=import("./host-BqYiw4PF.mjs").then(t=>Tn=t)),Nu=t=>t.trim().toLowerCase()==="false";function Ru(t,{type:e,min:n},o){if(t===null)return;if(e==="string")return t;if(e==="boolean")return!Nu(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 Bu=(t,e)=>{const n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(o=>Object.is(t[o],e[o]))};function $u(t){class e extends HTMLElement{constructor(){super(...arguments);L(this,"kind",t.kind)}static get observedAttributes(){return Object.keys(t.attributes)}connectedCallback(){tc(this.ownerDocument).inject("elements",ec)}}customElements.define(t.tag,e)}function Fu(t,e){if(typeof customElements>"u"||customElements.get(t.tag))return;if(t.kind==="config"||!e)return $u(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,m])=>[m.prop,(...h)=>{var y;if(m.keeps&&(this.kept[m.keeps]=h[0]??null,h[0]==null))return true;const p=m.detail==="first"?h[0]:Object.fromEntries(m.detail.map((S,x)=>[S,h[x]])),g=new CustomEvent(u,{detail:p,bubbles:!m.keeps,composed:!m.keeps,cancelable:!!m.cancelable}),v=this.dispatchEvent(g);if(!v&&m.cancelable){const S=h[h.length-1];(y=S==null?void 0:S.preventDefault)==null||y.call(S)}return v}])));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 m=this[u];delete this[u],m!=null&&(this.values[u]=m)}this.update(),this.warnOfAria(),tc(this.ownerDocument).inject("elements",ec),a().then(()=>{this.isConnected&&Tn.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||Tn==null||Tn.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[m,h]of Object.entries(t.attributes)){if(h.prop in this.values)continue;const p=this.getAttribute(m),g=Ru(p,h,v=>{const y=`${m}=${p}`;this.warned.has(y)||(this.warned.add(y),console.warn(`<${t.tag}>: ${m}="${p}" ${v}; ignored.`))});g!==void 0&&(u[h.prop]=g)}Bu(u,this.props)||(this.props=u,this.listeners.forEach(m=>m()))}}L(c,"initCloverI18n",Pu);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 Dn,ct,nc,ze,bi,oc,rc,sc,ss,Pr,Ar,ic,On={},ac=[],Du=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Hn=Array.isArray;function de(t,e){for(var n in e)t[n]=e[n];return t}function is(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ke(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?Dn.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 Pn(t,i,o,r,null)}function Pn(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??++nc,__i:-1,__u:0};return r==null&&ct.vnode!=null&&ct.vnode(s),s}function Hu(){return{current:null}}function St(t){return t.children}function fe(t,e){this.props=t,this.context=e}function un(t,e){if(e==null)return t.__?un(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"?un(t):null}function cc(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 cc(t)}}function Or(t){(!t.__d&&(t.__d=true)&&ze.push(t)&&!yo.__r++||bi!=ct.debounceRendering)&&((bi=ct.debounceRendering)||oc)(yo)}function yo(){for(var t,e,n,o,r,s,i,a=1;ze.length;)ze.length>a&&ze.sort(rc),t=ze.shift(),a=ze.length,t.__d&&(n=void 0,o=void 0,r=(o=(e=t).__v).__e,s=[],i=[],e.__P&&((n=de({},o)).__v=o.__v+1,ct.vnode&&ct.vnode(n),as(e.__P,n,o,e.__n,e.__P.namespaceURI,32&o.__u?[r]:null,s,r??un(o),!!(32&o.__u),i),n.__v=o.__v,n.__.__k[n.__i]=n,dc(s,n,i),o.__e=o.__=null,n.__e!=r&&cc(n)));yo.__r=0}function lc(t,e,n,o,r,s,i,a,c,l,d){var u,m,h,p,g,v,y,S=o&&o.__k||ac,x=e.length;for(c=zu(n,e,S,c,x),u=0;u<x;u++)(h=n.__k[u])!=null&&(m=h.__i==-1?On:S[h.__i]||On,h.__i=u,v=as(t,h,m,r,s,i,a,c,l,d),p=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&cs(m.ref,null,h),d.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),(y=!!(4&h.__u))||m.__k===h.__k?c=uc(h,c,t,y):typeof h.type=="function"&&v!==void 0?c=v:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function zu(t,e,n,o,r){var s,i,a,c,l,d=n.length,u=d,m=0;for(t.__k=new Array(r),s=0;s<r;s++)(i=e[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+m,(i=t.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Pn(null,i,null,null,null):Hn(i)?Pn(St,{children:i},null,null,null):i.constructor==null&&i.__b>0?Pn(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=Wu(i,n,c,u))!=-1&&(u--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(r>d?m--:r<d&&m++),typeof i.type!="function"&&(i.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,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=un(a)),hc(a,a));return o}function uc(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=uc(r[s],e,n,o));return e}t.__e!=e&&(o&&(e&&t.type&&!e.parentNode&&(e=un(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Se(t,e){return e=e||[],t==null||typeof t=="boolean"||(Hn(t)?t.some(function(n){Se(n,e)}):e.push(t)),e}function Wu(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 _i(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Du.test(e)?n:n+"px"}function lo(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||_i(t.style,e,"");if(n)for(e in n)o&&n[e]==o[e]||_i(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(sc,"$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=ss,t.addEventListener(e,s?Ar:Pr,s)):t.removeEventListener(e,s?Ar:Pr,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 wi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ss++;else if(e.t<n.u)return;return n(ct.event?ct.event(e):e)}}}function as(t,e,n,o,r,s,i,a,c,l){var d,u,m,h,p,g,v,y,S,x,b,M,w,B,O,V,X,U=e.type;if(e.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=e.__e=n.__e]),(d=ct.__b)&&d(e);t:if(typeof U=="function")try{if(y=e.props,S="prototype"in U&&U.prototype.render,x=(d=U.contextType)&&o[d.__c],b=d?x?x.props.value:d.__:o,n.__c?v=(u=e.__c=n.__c).__=u.__E:(S?e.__c=u=new U(y,b):(e.__c=u=new fe(y,b),u.constructor=U,u.render=ju),x&&x.sub(u),u.props=y,u.state||(u.state={}),u.context=b,u.__n=o,m=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=de({},u.__s)),de(u.__s,U.getDerivedStateFromProps(y,u.__s))),h=u.props,p=u.state,u.__v=e,m)S&&U.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&U.getDerivedStateFromProps==null&&y!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(y,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(y,u.__s,b)===false||e.__v==n.__v){for(e.__v!=n.__v&&(u.props=y,u.state=u.__s,u.__d=false),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(tt){tt&&(tt.__=e)}),M=0;M<u._sb.length;M++)u.__h.push(u._sb[M]);u._sb=[],u.__h.length&&i.push(u);break t}u.componentWillUpdate!=null&&u.componentWillUpdate(y,u.__s,b),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,p,g)})}if(u.context=b,u.props=y,u.__P=t,u.__e=false,w=ct.__r,B=0,S){for(u.state=u.__s,u.__d=false,w&&w(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,w&&w(e),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++B<25);u.state=u.__s,u.getChildContext!=null&&(o=de(de({},o),u.getChildContext())),S&&!m&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(h,p)),V=d,d!=null&&d.type===St&&d.key==null&&(V=fc(d.props.children)),a=lc(t,Hn(V)?V:[V],e,n,o,r,s,i,a,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&i.push(u),v&&(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(X=s.length;X--;)is(s[X]);Nr(e)}else e.__e=n.__e,e.__k=n.__k,tt.then||Nr(e);ct.__e(tt,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Uu(n.__e,e,n,o,r,s,i,c,l);return(d=ct.diffed)&&d(e),128&e.__u?void 0:a}function Nr(t){t&&t.__c&&(t.__c.__e=true),t&&t.__k&&t.__k.forEach(Nr)}function dc(t,e,n){for(var o=0;o<n.length;o++)cs(n[o],n[++o],n[++o]);ct.__c&&ct.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){ct.__e(s,r.__v)}})}function fc(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Hn(t)?t.map(fc):de({},t)}function Uu(t,e,n,o,r,s,i,a,c){var l,d,u,m,h,p,g,v=n.props,y=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(y);t=document.createElementNS(r,S,y.is&&y),a&&(ct.__m&&ct.__m(e,s),a=false),s=null}if(S==null)v===y||a&&t.data==y||(t.data=y);else{if(s=s&&Dn.call(t.childNodes),v=n.props||On,!a&&s!=null)for(v={},l=0;l<t.attributes.length;l++)v[(h=t.attributes[l]).name]=h.value;for(l in v)if(h=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=h;else if(!(l in y)){if(l=="value"&&"defaultValue"in y||l=="checked"&&"defaultChecked"in y)continue;lo(t,l,null,h,r)}}for(l in y)h=y[l],l=="children"?m=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?p=h:l=="checked"?g=h:a&&typeof h!="function"||v[l]===h||lo(t,l,h,v[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=""),lc(e.type=="template"?t.content:t,Hn(m)?m:[m],e,n,o,S=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,i,s?s[0]:n.__k&&un(n,0),a,c),s!=null)for(l=s.length;l--;)is(s[l]);a||(l="value",S=="progress"&&p==null?t.removeAttribute("value"):p!=null&&(p!==t[l]||S=="progress"&&!p||S=="option"&&p!=v[l])&&lo(t,l,p,v[l],r),l="checked",g!=null&&g!=t[l]&&lo(t,l,g,v[l],r))}return t}function cs(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){ct.__e(r,n)}}function hc(t,e,n){var o,r;if(ct.unmount&&ct.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||cs(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){ct.__e(s,e)}o.base=o.__P=null}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&hc(o[r],e,n||typeof t.type!="function");n||is(t.__e),t.__c=t.__=t.__e=void 0}function ju(t,e,n){return this.constructor(t,n)}function Nn(t,e,n){var o,r,s,i;e==document&&(e=document.documentElement),ct.__&&ct.__(t,e),r=(o=typeof n=="function")?null:n&&n.__k||e.__k,s=[],i=[],as(e,t=(!o&&n||e).__k=ke(St,null,[t]),r||On,On,e.namespaceURI,!o&&n?[n]:r?null:e.firstChild?Dn.call(e.childNodes):null,s,!o&&n?n:r?r.__e:e.firstChild,o,i),dc(s,t,i)}function pc(t,e){Nn(t,e,pc)}function Vu(t,e,n){var o,r,s,i,a=de({},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?Dn.call(arguments,2):n),Pn(t.type,a,o||t.key,r||t.ref,null)}function ge(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,Or(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"+ic++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,o){return n.children(o)}).contextType=e,e}Dn=ac.slice,ct={__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}},nc=0,fe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=de({},this.state),typeof t=="function"&&(t=t(de({},n),this.props)),t&&de(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Or(this))},fe.prototype.forceUpdate=function(t){this.__v&&(this.__e=true,t&&this.__h.push(t),Or(this))},fe.prototype.render=St,ze=[],oc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rc=function(t,e){return t.__v.__b-e.__v.__b},yo.__r=0,sc=/(PointerCapture)$|Capture$/i,ss=0,Pr=wi(false),Ar=wi(true),ic=0;var qu=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:--qu,__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 ct.vnode&&ct.vnode(l),l}var Oe,Et,cr,xi,dn=0,mc=[],It=ct,Si=It.__b,ki=It.__r,Ci=It.diffed,Ei=It.__c,Mi=It.unmount,Ti=It.__;function pn(t,e){It.__h&&It.__h(Et,t,dn||e),dn=0;var n=Et.__H||(Et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function z(t){return dn=1,ls(yc,t)}function ls(t,e,n){var o=pn(Oe++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):yc(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=Et,!Et.__f)){var r=function(a,c,l){if(!o.__c.__H)return true;var d=o.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,c,l);var u=o.__c.props!==a;return d.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(u=true)}}),s&&s.call(this,a,c,l)||u};Et.__f=true;var s=Et.shouldComponentUpdate,i=Et.componentWillUpdate;Et.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)},Et.shouldComponentUpdate=r}return o.__N||o.__}function D(t,e){var n=pn(Oe++,3);!It.__s&&ds(n.__H,e)&&(n.__=t,n.u=e,Et.__H.__h.push(n))}function Bt(t,e){var n=pn(Oe++,4);!It.__s&&ds(n.__H,e)&&(n.__=t,n.u=e,Et.__h.push(n))}function $(t){return dn=5,bt(function(){return{current:t}},[])}function gc(t,e,n){dn=6,Bt(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=pn(Oe++,7);return ds(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ut(t,e){return dn=8,bt(function(){return t},e)}function Vt(t){var e=Et.context[t.__c],n=pn(Oe++,9);return n.c=t,e?(n.__==null&&(n.__=true,e.sub(Et)),e.props.value):t.__}function vc(t,e){It.useDebugValue&&It.useDebugValue(e?e(t):t)}function us(){var t=pn(Oe++,11);if(!t.__){for(var e=Et.__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 Ku(){for(var t;t=mc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(po),t.__H.__h.forEach(Rr),t.__H.__h=[]}catch(e){t.__H.__h=[],It.__e(e,t.__v)}}It.__b=function(t){Et=null,Si&&Si(t)},It.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ti&&Ti(t,e)},It.__r=function(t){ki&&ki(t),Oe=0;var e=(Et=t.__c).__H;e&&(cr===Et?(e.__h=[],Et.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(po),e.__h.forEach(Rr),e.__h=[],Oe=0)),cr=Et},It.diffed=function(t){Ci&&Ci(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(mc.push(e)!==1&&xi===It.requestAnimationFrame||((xi=It.requestAnimationFrame)||Zu)(Ku)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),cr=Et=null},It.__c=function(t,e){e.some(function(n){try{n.__h.forEach(po),n.__h=n.__h.filter(function(o){return!o.__||Rr(o)})}catch(o){e.some(function(r){r.__h&&(r.__h=[])}),e=[],It.__e(o,n.__v)}}),Ei&&Ei(t,e)},It.unmount=function(t){Mi&&Mi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{po(o)}catch(r){e=r}}),n.__H=void 0,e&&It.__e(e,n.__v))};var Ii=typeof requestAnimationFrame=="function";function Zu(t){var e,n=function(){clearTimeout(o),Ii&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,35);Ii&&(e=requestAnimationFrame(n))}function po(t){var e=Et,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Et=e}function Rr(t){var e=Et;t.__c=t.__(),Et=e}function ds(t,e){return!t||t.length!==e.length||e.some(function(n,o){return n!==t[o]})}function yc(t,e){return typeof e=="function"?e(t):e}function bc(t,e){for(var n in e)t[n]=e[n];return t}function Br(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 oe(t,e){var n=e(),o=z({t:{__:n,u:e}}),r=o[0].t,s=o[1];return Bt(function(){r.__=n,r.u=e,lr(r)&&s({t:r})},[t,n,e]),D(function(){return lr(r)&&s({t:r}),t(function(){lr(r)&&s({t:r})})},[t]),n}function lr(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 _c(t){t()}function wc(t){return t}function xc(){return[false,_c]}var Sc=Bt;function $r(t,e){this.props=t,this.context=e}function Gu(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:Br(this.props,r)}function o(r){return this.shouldComponentUpdate=n,ke(t,r)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=true,o.__f=true,o.type=t,o}($r.prototype=new fe).isPureReactComponent=true,$r.prototype.shouldComponentUpdate=function(t,e){return Br(this.props,t)||Br(this.state,e)};var Li=ct.__b;ct.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Li&&Li(t)};var Xu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function le(t){function e(n){var o=bc({},n);return delete o.ref,t(o,n.ref||null)}return e.$$typeof=Xu,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:Se(Se(t).map(e))},Yu={map:Pi,forEach:Pi,count:function(t){return t?Se(t).length:0},only:function(t){var e=Se(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Se},Ju=ct.__e;ct.__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)}Ju(t,e,n,o)};var Ai=ct.unmount;function kc(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=bc({},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 kc(o,e,n)})),t}function Cc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(o){return Cc(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 Ct(){this.__u=0,this.o=null,this.__b=null}function Ec(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function _t(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 ke(n,s)}return r.displayName="Lazy",r.__f=true,r}function In(){this.i=null,this.l=null}ct.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ai&&Ai(t)},(Ct.prototype=new fe).__c=function(t,e){var n=e.__c,o=this;o.o==null&&(o.o=[]),o.o.push(n);var r=Ec(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]=Cc(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)},Ct.prototype.componentWillUnmount=function(){this.o=[]},Ct.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]=kc(this.__b,n,o.__O=o.__P)}this.__b=null}var r=e.__a&&ke(St,null,t.fallback);return r&&(r.__u&=-33),[ke(St,null,e.__a?null:t.children),r]};var Oi=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 Qu(t){return this.getChildContext=function(){return t.context},t.children}function td(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Nn(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)}}}Nn(ke(Qu,{context:e.context},t.__v),e.v)}function ed(t,e){var n=ke(td,{__v:t,h:e});return n.containerInfo=e,n}(In.prototype=new fe).__a=function(t){var e=this,n=Ec(e.__v),o=e.l.get(t);return o[0]++,function(r){var s=function(){e.props.revealOrder?(o.push(r),Oi(e,t,o)):r()};n?n(s):s()}},In.prototype.render=function(t){this.i=null,this.l=new Map;var e=Se(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},In.prototype.componentDidUpdate=In.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Oi(t,n,e)})};var Mc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nd=/^(?: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]/,od=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,rd=/[A-Z0-9]/g,sd=typeof document<"u",id=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ad(t,e,n){return e.__k==null&&(e.textContent=""),Nn(t,e),typeof n=="function"&&n(),t?t.__c:null}function cd(t,e,n){return pc(t,e),typeof n=="function"&&n(),t?t.__c:null}fe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(fe.prototype,t,{configurable:true,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:true,writable:true,value:e})}})});var Ni=ct.event;function ld(){}function ud(){return this.cancelBubble}function dd(){return this.defaultPrevented}ct.event=function(t){return Ni&&(t=Ni(t)),t.persist=ld,t.isPropagationStopped=ud,t.isDefaultPrevented=dd,t.nativeEvent=t};var fs,fd={enumerable:false,configurable:true,get:function(){return this.class}},Ri=ct.vnode;ct.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||sd&&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"||id(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":od.test(i)&&(i=c):c=i="oninput":s&&nd.test(i)?i=i.replace(rd,"-$&").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=Se(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=Se(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",fd)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),e.props=r}(t),t.$$typeof=Mc,Ri&&Ri(t)};var Bi=ct.__r;ct.__r=function(t){Bi&&Bi(t),fs=t.__c};var $i=ct.diffed;ct.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),fs=null};var hd={ReactCurrentDispatcher:{current:{readContext:function(t){return fs.__n[t.__c].props.value},useCallback:ut,useContext:Vt,useDebugValue:vc,useDeferredValue:wc,useEffect:D,useId:us,useImperativeHandle:gc,useInsertionEffect:Sc,useLayoutEffect:Bt,useMemo:bt,useReducer:ls,useRef:$,useState:z,useSyncExternalStore:oe,useTransition:xc}}};function pd(t){return ke.bind(null,t)}function Lo(t){return!!t&&t.$$typeof===Mc}function md(t){return Lo(t)&&t.type===St}function gd(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function vd(t){return Lo(t)?Vu.apply(null,arguments):t}function yd(t){return!!t.__k&&(Nn(null,t),true)}function bd(t){return t&&(t.base||t.nodeType===1&&t)||null}var _d=function(t,e){return t(e)},wd=function(t,e){return t(e)},xd=St,Sd=Lo,he={useState:z,useId:us,useReducer:ls,useEffect:D,useLayoutEffect:Bt,useInsertionEffect:Sc,useTransition:xc,useDeferredValue:wc,useSyncExternalStore:oe,startTransition:_c,useRef:$,useImperativeHandle:gc,useMemo:bt,useCallback:ut,useContext:Vt,useDebugValue:vc,version:"18.3.1",Children:Yu,render:ad,hydrate:cd,unmountComponentAtNode:yd,createPortal:ed,createElement:ke,createContext:ge,createFactory:pd,cloneElement:vd,createRef:Hu,Fragment:St,isValidElement:Lo,isElement:Sd,isFragment:md,isMemo:gd,findDOMNode:bd,Component:fe,PureComponent:$r,memo:Gu,forwardRef:le,flushSync:wd,unstable_batchedUpdates:_d,StrictMode:xd,Suspense:Ct,SuspenseList:In,lazy:_t,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:hd};function hs(t){const e=oe(Cd,Ed);return!!t||e}const ps=t=>t?{"data-high-contrast":""}:{},kd="(prefers-contrast: more)",Tc=()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(kd):null;function Cd(t){var n;const e=Tc();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 Ed=()=>{var t;return!!((t=Tc())!=null&&t.matches)},zn=ge(void 0),Mt=(...t)=>t.filter(Boolean).join(" "),Po=ge(null);function Re(){return Vt(Po)}function ue(t="This part"){const e=Vt(Po);if(!e)throw new Error(`${t} must be rendered inside <Clover.Root>.`);return e}function nt(t,e=Object.is,n){const{clover:o}=ue(n),r=$(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 oe(o.store.subscribe,s)}const Md={subscribe:()=>()=>{}};function Wn(t,e){const n=Vt(Po),o=n==null?void 0:n.clover.store,r=()=>o?t(o.get()):e;return oe(o?o.subscribe:Md.subscribe,r)}const Td=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","contentsSectionsTip":"Sections","informationPanelTabsMap":"Map","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Views","mapUnavailable":"The map could not be shown.","mapLabel":"Map","mapExpand":"Expand map","mapCollapse":"Collapse 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","playerCurrentTime":"Current time","playerDuration":"Duration","splitHandle":"Resize panels"}'),Ic={es:()=>import("../es-DRRI3WDi.mjs"),fi:()=>import("../fi-BmlZ-U-4.mjs"),fr:()=>import("../fr-k93P7lwp.mjs"),it:()=>import("../it-DEzCslib.mjs"),ja:()=>import("../ja-BDKsn1vT.mjs"),nb:()=>import("../nb-Cyf1RkZ8.mjs"),nn:()=>import("../nn-CzczXFxL.mjs"),no:()=>import("../no-Cyf1RkZ8.mjs"),pt:()=>import("../pt-Bx2G8tAe.mjs"),"zh-Hans":()=>import("../zh-Hans-Dfs9s_bI.mjs"),"zh-Hant":()=>import("../zh-Hant-Dk8wlKuD.mjs")};function ms(){return typeof navigator>"u"?[]:[...navigator.languages??[],navigator.language].filter(Boolean)}function Lc(){if(!(typeof document>"u"))return document.documentElement.lang||void 0}let Pc=()=>[];function Id(t){Pc=t}function Ld(){const[t,...e]=Pc();return[...new Set([t,...ms(),...e,Lc()].filter(n=>!!n))]}const bo=t=>t.split("-")[0];function gs(t,e){return bo(t).toLowerCase()===bo(e).toLowerCase()}function Fr(t){try{const{language:e,script:n}=new Intl.Locale(t).maximize();return n&&`${e}-${n}`}catch{return}}function Pd(t,e){const n=Fr(t);if(n)return e.find(o=>o!=="none"&&o!=="@none"&&Fr(o)===n)}const ur=t=>t.includes("-")?bo(t):null;function Ad(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=ur(t);if(r&&e.includes(r))return r;const s=Pd(t,e);if(s)return s;const i=n.find(c=>e.includes(c));if(i)return i;const a=e.findIndex(c=>ur(c)===t);if(a!==-1)return e[a];for(const c of n){const l=ur(c);if(l&&e.includes(l))return l}return o()}function vs(t,e){const[n,...o]=e?[e]:Ld();return Ad(n,t,o)??t[0]}function Ac(t,e,n){if(n&&t.includes(n))return n;if(!t.length)return;const o=vs(t,e);return o==="none"?t[0]:o}const _e="clover",ee={en:{[_e]:{...Td}}};let Ln=[],te,_o=[],Oc=[],ys=0;const Dr=new Set;function bs(){ys++,Dr.forEach(t=>t())}function Nc(t){return[t,Fr(t),bo(t)].filter(e=>!!e)}const Od=t=>t==="en"||Rc(t)||!!ee[t],Ne=t=>Nc(t).find(Od),Fi=new Map,Rc=t=>Object.prototype.hasOwnProperty.call(Ic,t);function Nd(t){let e=Fi.get(t);return e||(e=Ic[t]().then(({default:n})=>{var o;ee[t]={...ee[t],[_e]:{...n,...(o=ee[t])==null?void 0:o[_e]}},bs()},()=>{}),Fi.set(t,e)),e}function Hr(t){const e=t.find(n=>n==="en"||Rc(n));return e&&e!=="en"?Nd(e):Promise.resolve()}let uo=[],Di="",Rn="en";function Ao(){const t=Lc();return[...new Set([...Ln,...t?[t]:[]])]}function Ae(){const t=`${ys} ${typeof document<"u"?document.documentElement.lang:""} ${typeof navigator<"u"?navigator.languages:""}`;if(t===Di)return uo;Di=t;const e=Ao();return Rn=ms().map(Ne).find(Boolean)??e.map(Ne).find(Boolean)??"en",uo=[...new Set([te??Rn,...Oc,...e].filter(o=>!!o).flatMap(Nc).concat("en"))],Hr(uo),uo}function Rd(){return Ae(),[...new Set([Rn,...Ao().map(Ne),..._o.map(Ne)].filter(t=>!!t))]}Id(()=>(Ae(),[te,Rn,...Ao()]));function Oo(t,e){if(t)return gs(t,e||Lt.resolvedLanguage)?void 0:t}const Lt={get language(){return te??Ae().find(t=>ee[t])??"en"},get chosenLanguage(){return te},stringsFor(t){return Ne(t)},interfaceLanguages(){return{languages:Rd(),chosen:te&&Ne(te)||Rn}},chooseInterfaceLanguage(t){return te=t||void 0,_o=te?[...new Set([..._o,te])]:[],bs(),Hr(Ae())},get resolvedLanguage(){return Ae().find(t=>{var e;return Object.keys(((e=ee[t])==null?void 0:e[_e])??{}).length>0})??"en"},changeLanguage(t){return Lt.chooseInterfaceLanguage(t)},resolve(t,e,n=_e){var r,s;let o={text:t};for(const i of Ae()){const a=(s=(r=ee[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=_e){return Lt.resolve(t,e,n).text},langOf(t,e,n=_e){return Oo(Lt.resolve(t,void 0,n).lang,e)},ready(){return Hr(Ae())},subscribe(t){return Dr.add(t),()=>{Dr.delete(t)}},getSnapshot(){return ys}};typeof document<"u"&&Ae();function Bd(t={}){for(const[n,o]of Object.entries(t.resources??{}))for(const[r,s]of Object.entries(o??{}))ee[n]??(ee[n]={}),ee[n][r]={...ee[n][r],...s};t.fallbackLng!==void 0&&(Oc=t.fallbackLng===false?[]:[t.fallbackLng].flat());const e=Ln.join();if(t.languages!==void 0?Ln=[t.languages].flat().filter(Boolean):t.lng&&(Ln=[t.lng]),Ln.join()!==e){_o=[];const n=[...ms(),...Ao()].map(Ne);te&&!n.includes(Ne(te))&&(te=void 0)}return bs(),Lt}const $d=Object.freeze(Object.defineProperty({__proto__:null,CLOVER_I18N_NAMESPACE:_e,cloverI18n:Lt,initCloverI18n:Bd,langWithin:Oo},Symbol.toStringTag,{value:"Module"}));function Tt(t=_e,e){const n=oe(Lt.subscribe,Lt.getSnapshot,Lt.getSnapshot),o=Vt(zn),r=e??o,s=ut((a,c)=>Lt.t(a,c,t),[t,n]),i=ut(a=>Lt.langOf(a,r,t),[t,n,r]);return{t:s,langOf:i,hostLanguage:r,i18n:Lt}}function No(t,e){const n=Vt(zn),o=$(null),[r,s]=z(""),i=ut(d=>{o.current=d,typeof t=="function"?t(d):t&&(t.current=d)},[t]);D(()=>{var u,m;const d=(u=o.current)==null?void 0:u.parentElement;e!==void 0||n!==void 0||!d||s(((m=d.closest("[lang]"))==null?void 0:m.getAttribute("lang"))??"")});const c=e??n??r,{langOf:l}=Tt(void 0,c);return{ref:i,hostLanguage:c,langOf:l}}const W=t=>Array.isArray(t)?t:t==null?[]:[t],Fd=["left-to-right","right-to-left","top-to-bottom","bottom-to-top"];function _s(t){return Fd.includes(t)?t:"left-to-right"}const Dd=["individuals","paged","continuous","unordered"];function Hd(t){return W(t).find(n=>Dd.includes(n))??"individuals"}function zd(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 Wd(t,e){const n=t.findIndex(o=>o.includes(e));return n===-1?0:n}const Bc=["Independents","Composite","List"];function Ro(t){return W(t==null?void 0:t.body).flatMap(e=>Bc.includes(e==null?void 0:e.type)?W(e.items):[e])}function ws(t){const e=W(t==null?void 0:t.motivation);return!e.length||e.includes("painting")}function $c(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 fo(t){const e=t.indexOf("#");if(e>=0){const o=t.slice(0,e);return $c(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 zr=t=>{var e;return Array.isArray(t)?zr(t[0]):Bc.includes(t==null?void 0:t.type)?zr((e=t.items)==null?void 0:e[0]):t};function mn(t){return Ud(zr(t))}function Ud(t){var n;if(typeof t=="string")return fo(t);if(!t||typeof t!="object")return{id:""};if(t.type!=="SpecificResource"||t.source===void 0)return fo(t.id??"");const e=typeof t.source=="string"?fo(t.source):fo(((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=$c(e.id,String(r.value));if(s)return s}}return e}const Un=t=>t==="Audio"||t==="Sound",jd=t=>{const e=W(t);return e.length>0&&e.every(n=>n==="supplementing")},Vd=(t,e)=>jd(t)&&!!(e.rect||e.svg||e.point)&&!e.t,Hi=new WeakMap,qd={canvases:[],views:[],direction:"left-to-right"};function Rt(t){if(!t)return qd;let e=Hi.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:zd(n,Hd(t.behavior)),direction:_s(t.viewingDirection)},Hi.set(t,e)}return e}const zi=new WeakMap;function qe(t,e){if(!e)return null;const n=Rt(t);let o=zi.get(n);if(!o){o=new Map;for(const r of n.canvases)o.has(r.id)||o.set(r.id,r);zi.set(n,o)}return o.get(e)??null}function gn(t,e){const{canvases:n,views:o}=Rt(t),r=n.findIndex(s=>s.id===e);return r===-1?0:Wd(o,r)}const Wi=new WeakMap,Wr=[];function Ue(t,e){return t?Fc(t,gn(t,e)):Wr}function Kd(t,e){if(!t)return Wr;const n=gn(t,e)+1;return n<Rt(t).views.length?Fc(t,n):Wr}function Fc(t,e){let n=Wi.get(t);n||Wi.set(t,n=new Map);let o=n.get(e);if(!o){const r=Rt(t);o=(r.views[e]??[]).map(s=>r.canvases[s]),n.set(e,o)}return o}function Zd(t,e){var s,i;const{canvases:n,views:o}=Rt(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 Gd(t){const e=t==null?void 0:t.start;if(!e)return null;const n=mn(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},Xd=t=>[(t==null?void 0:t.partOf)??[]].flat().find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function Dc(t){var e;return((e=t.manifest)==null?void 0:e.id)??t.opening}function Yd(t,e,n,o){const r=t==null?void 0:t.items;if(!(r!=null&&r.length))return-1;if(!n)return e??-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 xt(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=vs(o,e),s=t[r];return{text:Array.isArray(s)?s.join(n):String(s),lang:r==="none"||r==="@none"?void 0:r}}const Jd=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/;function Bn(t){const e=t==null?void 0:t.language,n=(Array.isArray(e)?e:[e]).filter(o=>typeof o=="string"&&Jd.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},Qd=/^(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)$/,tf=/^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;function ef(t){if(!t)return;const[e,...n]=t.toLowerCase().split(/[-_]/),o=n.find(r=>/^[a-z]{4}$/.test(r));return(o?tf.test(o):Qd.test(e))?"rtl":void 0}function dt(t){return t?{lang:t,dir:ef(t)}:{}}function nf({clover:t,language:e}){const{t:n,langOf:o}=Tt(),[r,s]=z(null),i=$(n);return i.current=n,D(()=>{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 m=qe(c,l),h=xt(m==null?void 0:m.label,e),p=i.current("canvasPosition",{index:gn(c,l)+1,total:Rt(c).views.length});s({label:h.text,lang:h.lang,position:p})})},[t,e]),f("div",{className:"clover-announcer",role:"status","aria-live":"polite","aria-atomic":"true",style:je,children:[r!=null&&r.label?f(St,{children:[f("span",{...dt(r.lang),children:r.label}),","," "]}):null,r&&f("span",{...dt(o("canvasPosition")),children:r.position})]})}const of=t=>(t==null?void 0:t.format)==="text/vtt"||typeof(t==null?void 0:t.id)=="string"&&/\.vtt(\?|$)/i.test(t.id);function rf(t){const e=[];let n=0;const o=(r,s)=>{var a;if(!r||of(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 Ro(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 xs="content-search",sf="contents",Zy=(t,e)=>`${t}#region-${e+1}`,af=t=>W(t==null?void 0:t.motivation).includes("linking");function Hc(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=rf(r);if(!i.length&&!af(r))continue;const a=mn(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 cf=t=>Rt(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 lf(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 zc=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"])))),Ui=new WeakMap;function Wc(t){var n;if(!t)return[];let e=Ui.get(t);if(!e){const o=new Map;for(const r of Rt(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=zc(s)[0])==null?void 0:n.id;a={id:i,label:lf(s),source:"manifest",entries:[],...c?{collection:c}:{}},o.set(i,a)}a.entries.push(...Hc(s,i,r.id))}e=[...o.values()].filter(r=>r.entries.length),Ui.set(t,e)}return e}const ji=new WeakMap,Uc=[];function Gy(t){if(!t)return Uc;let e=ji.get(t);return e||(e=Rt(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)}))),ji.set(t,e)),e}const dr=new WeakMap,fr=new WeakMap;function jc(t,e=uf){var n;if(!fr.has(e)){const o=e.filter(s=>s.content),r=(n=o[0])==null?void 0:n.content;fr.set(e,r?{id:r.id,type:r.type,...r.label?{label:r.label}:{},pages:Uc,entries:o.flatMap(s=>s.entries)}:null)}return fr.get(e)??df(t)}const uf=[];function df(t){var r;if(!t)return null;if(dr.has(t))return dr.get(t);const e=Rt(t).canvases.flatMap(s=>W(s.annotations).flatMap(i=>zc(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=Wc(t);return{id:n,type:"AnnotationCollection",...i?{label:i}:{},...a>0?{total:a}:{},pages:s.map(({page:u,canvas:m})=>({id:String(u.id),canvasId:String(m.id),fetched:Array.isArray(u.items)})),entries:s.flatMap(({page:u})=>{var m;return((m=c.find(h=>h.id===u.id))==null?void 0:m.entries)??[]})}})():null;return dr.set(t,o),o}const Vi=new WeakMap,qi=[];function Ss(t,e){const n=Wc(t);if(!e.length)return n.length?n:qi;const o=t??qi;let r=Vi.get(o);r||Vi.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 Ki=new WeakMap;function Vc(t,e,n,o=null){const r=Ss(t,e),s=n!=null&&n.entries.length?n:null;if(!o&&!s)return r;let i=Ki.get(r);i||Ki.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 ff=t=>Number(t==null?void 0:t.duration)>0;function qc(t,e){return t.source==="search"||!t.entries.length?false:t.entries.every(n=>Vd(n.motivation,n.target)&&!ff(e(n.canvasId)))}const Zi=new WeakMap;function hf(t,e){const n=Ss(t,e);let o=Zi.get(n);if(!o){const r=n.filter(s=>!qc(s,i=>qe(t,i)??void 0));o=r.length===n.length?n:r,Zi.set(n,o)}return o}const Gi=new WeakMap;function ks(t,e,n,o){const r=Ss(t,e),s=Gi.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)&&qc(c,l=>qe(t,l)??void 0)).map(c=>c.id),a=i.length?[...n,...i]:n;return Gi.set(r,{hidden:n,shown:o,ids:a}),a}const Xi=new WeakMap,Yi=[xs,sf];function pf(t,e,n,o,r){if(!r)return Yi;const s=ks(t,e,n,o),i=Xi.get(s);if(i&&i.hidden===n)return i.ids;const a=[...Yi,...s.filter(c=>!n.includes(c))];return Xi.set(s,{hidden:n,ids:a}),a}function mf(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 hr(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 Kc(t){return btoa(encodeURIComponent(JSON.stringify(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Zc({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:Kc(a)}}const gf=Object.freeze(Object.defineProperty({__proto__:null,buildContentState:Zc,encodeContentState:Kc},Symbol.toStringTag,{value:"Module"})),vf=/iiif\.io\/api\/presentation\/4\/context\.json/;function Gc(t){const e=t==null?void 0:t["@context"];return(Array.isArray(e)?e:[e]).some(o=>typeof o=="string"&&vf.test(o))}let Ji=null,Qi=null;function Cs(){return Qi??(Qi=import("../upgrade-eNW0DPXq.mjs")),Ji??(Ji=import("../upgrader-BlbMUEH6.mjs").then(({upgradePresentation3To4:t})=>t)),Promise.all([Ji,Qi])}async function Ve(t){if(Gc(t))return t;const[e,{upgrade:n}]=await Cs();return await n(t,e)}function Es(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}})}function Ms(t){var e;(e=t.body)==null||e.cancel().catch(()=>{})}const yf=t=>(t==null?void 0:t.credentials)==="include",bf=t=>JSON.stringify([t==null?void 0:t.credentials,t==null?void 0:t.headers]);class _f extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="CloverRequestError"}}async function fn(t,e,n){const o=await Es(t,e,{signal:n,headers:{Accept:"application/ld+json, application/json"}});if(!o.ok)throw Ms(o),new _f(`${e} answered ${o.status}`,e,o.status);return o.json()}const wf=()=>import("./content-state-reader-DZhx2OxK.mjs");function xf(t){const e=t;return!e||typeof e!="object"?false:e.type==="Annotation"||e["@type"]==="oa:Annotation"||e.type==="SpecificResource"}const Xc=t=>!!t&&typeof t=="object"&&/ImageService[123]|iiif\.io\/api\/image/.test(JSON.stringify(["@context","type","@type","protocol"].map(e=>t[e])));async function Sf(t,e,n){try{return await fn(t,e,n)}catch(o){if(n!=null&&n.aborted||/\.json([?#]|$)/i.test(e))throw o;try{const r=await fn(t,`${e.replace(/\/+$/,"")}/info.json`,n);if(Xc(r))return r}catch{}throw o}}const kf=["summary","metadata","requiredStatement","rights","provider","homepage","seeAlso","rendering","thumbnail","navDate","partOf"];function Cf(t){const e={"@context":Mf,id:t.id,type:"Manifest",label:t.label??{none:[""]},items:[t]};for(const n of kf)t[n]!==void 0&&n!=="label"&&(e[n]=t[n]);return e}const ta=t=>{var e,n;return!!t&&((n=(e=t.items)==null?void 0:e[0])==null?void 0:n.id)===t.id},Yc=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`},Ef=/^(oa:)?Annotation(Page|Collection)$/;class pr extends Error{constructor(){super(...arguments);L(this,"name","CloverContentError")}}const Mf="http://iiif.io/api/presentation/4/context.json",Tf=t=>/^https?:\/\//i.test(t);async function Ur(t,{request:e,signal:n}){return Array.isArray(t.items)&&t.items.length>0||!t.id?t:await fn(e,t.id,n)}const If=50;async function Ts(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<If;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 fn(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 Jc(t,e={}){return Ve(await Ur(t,e))}async function Qc(t,e,n=0){for(const o of t.items??[]){if(o.type==="Manifest")return Ve(await Ur(o,e));if(o.type==="Collection"&&n<8){const r=await Ts(await Ve(await Ur(o,e)),e),s=await Qc(r,e,n+1);if(s)return s}}return null}async function Lf(t,{request:e,signal:n}={}){Cs();const o=typeof t=="string"?await fn(e,t.trim(),n):t,r=await Ve(o);return r.type==="Collection"?Ts(r,{request:e,signal:n}):r}async function tl(t,e={}){var i;const{request:n,signal:o}=e;Cs();let r=t;if(typeof t=="string"&&(r=Tf(t.trim())?await Sf(n,t.trim(),o):(await wf()).decodeContentState(t),!r))throw new pr("Unreadable iiifContent");if(xf(r)&&(e.follows??0)<2){const{follow:a}=await import("./follow-content-DplyQT1g.mjs");return a(r,e,tl)}if(Ef.test(String((r==null?void 0:r.type)??""))){const{annotationsContent:a}=await import("./annotations-content-O8srMa2_.mjs");return a(r,e)}if(Xc(r)){const{imageServiceContent:a}=await import("./image-service-content-Bs3jtvh5.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 Ts(s,e),c=e.manifestId,l=c?(a.items??[]).find(u=>u.id===c&&u.type==="Manifest"):void 0,d=l?await Jc(l,e):await Qc(a,e);if(!d)throw new pr("The Collection holds no Manifest");return{manifest:d,collection:a}}case"Canvas":case"Timeline":case"Scene":return{manifest:Cf(s),target:{canvasId:s.id}};default:throw new pr(`Cannot show a ${String(s.type??"resource without a type")}`)}}const el=t=>!!(t!=null&&t.id)&&t.type==="AnnotationPage"&&!t.items;function ea(t){const e=[];for(const n of t)for(const o of["items","annotations"])for(const r of n[o]??[])el(r)&&e.push([n.id,o,r.id]);return e}async function Pf(t,e,n,o){return Af(await fn(n,t,o),e)}async function Af(t,e="urn:clover:annotation-page"){var r;const n=t;return Gc(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 Of(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 Nf(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||!el(c)?c:(r=true,Of(o,c)));return r?{...i,[n]:a}:i});return r?{...t,items:s}:t}const na=/\/search\/([0-2])\//;function Is(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:na.test(s)?Number(na.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 nn(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 Bf(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 mo={query:"",status:"idle",hits:[],set:null},oa={status:"idle",error:null,manifest:null,opening:null,collection:null,throughCollection:false,canvasId:null,target:null,annotationId:null,hiddenSets:[],shownSets:[],addedSets:[],search:mo,regions:null,targets:null,targetIndex:null};function $f(t={}){const e=Rf(oa),n=nn(null),o=nn(null),r=nn(null),s=nn(null),i=nn(null),a=nn(null);let c=null,l=null,d=[],u=[],m=[],h=0,p=null,g=null,v=null;const y=(_,T)=>{!g||_===T||(g={...g,items:g.items.map(A=>A.manifestId===_&&A.manifestAs!==T?{...A,manifestAs:T}:A)})},S=_=>{var A;const T=(A=e.get().manifest)==null?void 0:A.id;return!!T&&(T===_.manifestId||T===_.manifestAs)},x=()=>d.length||u.length||m.length?[...d,...u,...m]:oa.addedSets;let b=t.request,M=null;const w=new Set;let B="view",O=0;const V=(_,T,A)=>{if(w.has(A))return;w.add(A);const N=M==null?void 0:M.signal;Pf(A,_,b,N).then(K=>{N!=null&&N.aborted||e.set(H=>H.manifest?{manifest:Nf(H.manifest,_,T,K)}:{})}).catch(()=>w.delete(A))},X=()=>{const{manifest:_,canvasId:T}=e.get();if(_)for(const[A,N,K]of ea(B==="all"||O>0?Rt(_).canvases:Ue(_,T)))V(A,N,K)};e.subscribe(X);const U=(_,T,A,N,K)=>{var $t,Gt,Ft;const{canvases:H}=Rt(_),I=ht=>!!ht&&H.some(zt=>zt.id===ht),F=Gd(_),Z=I(A==null?void 0:A.canvasId)?A:I(F==null?void 0:F.canvasId)?F:null,it=I(N.canvasId)?N.canvasId:(Z==null?void 0:Z.canvasId)??(I(N.defaultCanvasId)?N.defaultCanvasId:null)??(($t=H[0])==null?void 0:$t.id)??null,Q=K&&((Gt=hr(m,K))==null?void 0:Gt.canvasId)===it?K:null,yt=Z&&Q?{...Z,region:void 0}:Z,ft=++h;d=[],e.set({status:"ready",search:mo,regions:null,manifest:_,opening:null,collection:T,canvasId:it,target:yt&&yt.canvasId===it?yt:null,addedSets:x(),annotationId:Q,targets:g});const Ht=_==null?void 0:_.structures;Array.isArray(Ht)&&JSON.stringify(Ht).includes("xywh=")&&import("./range-regions-BFWHKv3i.mjs").then(({contentsSet:ht})=>{h===ft&&e.set({regions:ht(_)})}),cf(_)&&import("./image-layers-BNSL4PGS.mjs").then(({imageLayers:ht})=>{h===ft&&(d=ht(_),e.set({addedSets:x()}))}),it&&it!==N.canvasId&&((Ft=t.onCanvasChange)==null||Ft.call(t,it))},tt=(_,T)=>e.set(A=>{const N=A.hiddenSets.filter(H=>H!==_),K=A.shownSets.filter(H=>H!==_);return T?{hiddenSets:N,shownSets:[...K,_]}:{hiddenSets:[...N,_],shownSets:K}}),ot=(_,T)=>{var N,K,H;if(!_)return;if((N=t.isControlled)!=null&&N.call(t)){T&&e.set({target:T}),(K=t.onCanvasChange)==null||K.call(t,_);return}const A=e.get().canvasId!==_;e.set({canvasId:_,target:T}),A&&((H=t.onCanvasChange)==null||H.call(t,_))},mt=(_,T=false)=>{const{manifest:A}=e.get(),N=Zd(A,_);ot(N,N&&T?{canvasId:N,autoplay:T}:null)},E=()=>{const{manifest:_,canvasId:T}=e.get();return{at:gn(_,T),total:Rt(_).views.length}},k=(_,T)=>{M==null||M.abort(),l==null||l.abort();const A=new AbortController;return M=A,w.clear(),h++,d=[],T||(m=[],g=null),e.set({status:"loading",error:null,manifest:null,opening:_,canvasId:null,target:null,annotationId:null,search:mo,regions:null,addedSets:x(),...!T&&{collection:null,throughCollection:false,targets:null,targetIndex:null}}),A.signal},P=_=>e.set({status:"error",error:_ instanceof Error?_:new Error(String(_))});async function j(_,T={},A=false){var K;const N=k(A&&typeof _=="string"?_:null,A);try{const H=await tl(_,{request:b,signal:N,manifestId:T.manifestId??void 0});if(N.aborted)return;const I=H.annotation,F=I?Hc({items:[I]},`${I.id}#content-state`):[];m=F.length?[{id:`${I.id}#content-state`,source:"added",entries:F}]:H.annotationSets??[];const Z=p??((K=F[0])==null?void 0:K.id)??H.pick;p=null,e.set({throughCollection:!!H.collection}),g=H.targets??null,g&&y(g.items[0].manifestId,H.manifest.id),e.set({targetIndex:g?0:null}),U(H.manifest,H.collection??null,H.target,T,Z)}catch(H){N.aborted||P(H)}}const q=_=>{const{manifest:T,collection:A,opening:N,status:K}=e.get();return(T==null?void 0:T.id)===_||(A==null?void 0:A.id)===_||N===_&&K==="loading"},rt=_=>{var T;return(((T=e.get().collection)==null?void 0:T.items)??[]).find(A=>A.id===_)??{id:_,type:"Manifest"}},st=(_,T)=>{var A,N;if(p=T,(A=t.isManifestControlled)!=null&&A.call(t)){(N=t.onManifestChange)==null||N.call(t,_);return}gt({id:_,type:"Manifest"}).then(K=>{var H;return K&&((H=t.onManifestChange)==null?void 0:H.call(t,_))})},gt=async(_,T)=>{if(_.type==="Collection")return await j(_.id,{},true),e.get().status==="ready";const{collection:A}=e.get(),N=k(_.id,true),K=p;p=null;const H=K?hr(m,K):null,I=typeof T=="string"?{canvasId:T}:T??v;v=null;try{const F=await Jc(_,{request:b,signal:N});return N.aborted?false:(y(_.id,F.id),U(F,A,H?{canvasId:H.canvasId}:I??void 0,{},K),true)}catch(F){return N.aborted||P(F),false}};return{store:e,viewport:n,media:o,captions:r,highlight:s,chapter:i,found:a,get request(){return b},setRequest(_){b=_},load:j,async openCollection(_){var A;const T=e.get().manifest;if(!(!T||((A=e.get().collection)==null?void 0:A.id)===_))try{const N=await Lf(_,{request:b});if(N.type!=="Collection"||e.get().manifest!==T)return;e.set({collection:N})}catch{}},async goToManifest(_,T){var N,K,H;if(q(_))return;const A=rt(_);if(A.type!=="Collection"&&((N=t.isManifestControlled)!=null&&N.call(t))){(K=t.onManifestChange)==null||K.call(t,_);return}await gt(A,T)&&((H=t.onManifestChange)==null||H.call(t,e.get().manifest.id))},goToTarget(_){var N,K,H;const T=(N=e.get().targets)==null?void 0:N.items[_];if(!T)return;e.set({targetIndex:_});const A=T.canvasId?{canvasId:T.canvasId,...T.region&&{region:T.region},...T.time!==void 0&&{time:T.time}}:null;if(S(T)){A&&ot(A.canvasId,A);return}if((K=t.isManifestControlled)!=null&&K.call(t)){v=A,(H=t.onManifestChange)==null||H.call(t,T.manifestId);return}gt(rt(T.manifestId),A??void 0).then(I=>{var F;return I&&((F=t.onManifestChange)==null?void 0:F.call(t,T.manifestId))})},async syncManifest(_){!_||q(_)||e.get().status!=="ready"||await gt(rt(_))},goTo(_,T){ot(_,T?{...T,canvasId:_}:null)},next({autoplay:_=false,wrap:T=false}={}){const{at:A,total:N}=E();A+1<N?mt(A+1,_):T&&N>1&&mt(0,_)},previous(){const{at:_}=E();_>0&&mt(_-1)},first(){mt(0)},last(){mt(E().total-1)},consumeTarget(){e.set({target:null})},syncCanvas(_){_&&e.set({canvasId:_})},selectAnnotation(_){const{manifest:T,addedSets:A,canvasId:N,search:K,regions:H}=e.get(),I=hr(Vc(T,A,K.set,H),_);if(e.set({annotationId:I?_:null}),!I)return;a.emit(_);const{hiddenSets:F,shownSets:Z}=e.get();I.setId!==xs&&ks(T,A,F,Z).includes(I.setId)&&tt(I.setId,true);const it=Ue(T,N).some(ft=>ft.id===I.canvasId),Q=qe(T,I.canvasId)!==null;!it&&Q&&ot(I.canvasId,null);const yt=Q?void 0:mf(I.annotation);yt&&st(yt,I.id)},async search(_){l==null||l.abort();const T=Is(e.get().manifest),A=_.trim();if(!A||!T){l=null,e.set({search:mo,annotationId:null});return}const N=new AbortController;l=N,e.set(K=>({search:{...K.search,query:A,status:"loading"}}));try{const{searchInto:K}=await import("./search-D-pqH7Ys.mjs");await K(e,T,A,b,N.signal)}catch{e.set({search:{query:A,status:"error",hits:[],set:null}})}},setSetVisible(_,T){tt(_,T)},async loadAnnotations(_){if(c==null||c.abort(),!_){u=[],e.set({addedSets:x()});return}const T=new AbortController;c=T;try{const{loadAnnotationSets:A}=await import("./annotation-collection-_3io5Bjz.mjs"),N=await A(_,{request:b,signal:T.signal});if(T.signal.aborted)return;u=N,e.set({addedSets:x()})}catch{}},getContentState(){var it;const{manifest:_,canvasId:T}=e.get();if(!_||!T)return null;const A=n.get(),N=o.get(),K=N&&N.currentTime>0?N.currentTime:null,H=Ue(_,T),F=A&&H.some(Q=>Q.id===A.canvasId)&&!K?A:null,Z=(F==null?void 0:F.canvasId)??T;return Zc({manifestId:_.id,canvasId:Z,type:(it=H.find(Q=>Q.id===Z))==null?void 0:it.type,region:F==null?void 0:F.region,time:K})},setAnnotationPages(_){_!==B&&(B=_,X())},fetchAnnotationPages(_){const{manifest:T}=e.get();if(!T||!_.length)return;const A=new Set(_);for(const[N,K,H]of ea(Rt(T).canvases))A.has(H)&&V(N,K,H)},holdAllAnnotationPages(){O++,X();let _=true;return()=>{_&&O--,_=false}},dispose(){M==null||M.abort(),c==null||c.abort(),l==null||l.abort()}}}const Ff=100;function nl(t,e){const n=$({read:t,onChange:e});n.current={read:t,onChange:e};const o=$(void 0),r=$("");return D(()=>()=>{clearTimeout(o.current),o.current=void 0},[]),ut(()=>{!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))},Ff))},[])}function jr(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 ol(t,e){const n=nl(()=>t.getContentState(),e),o=!!e;D(()=>{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=jr(t.media.get(),n);const c=t.media.subscribe(l=>{a(),a=jr(l,n)});return n(),()=>{s(),i(),c(),a()}},[t,o,n])}function Ls(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(ws(o))for(let r of Ro(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 Df(t){return t.flatMap(e=>Ls(e).map(({body:n})=>n))}function Hf(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 zf(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]))}const ra=typeof window<"u"?Bt:D;function Wf({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:m,annotationPages:h="view",onContentStateChange:p,...g}){const v=e!==void 0,y=s!==void 0,S=$({controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a});S.current={controlled:v,manifestControlled:y,onCanvasChange:o,onStatusChange:r,onManifestChange:a};const[x]=z(()=>$f({request:l,onCanvasChange:F=>{var Z,it;return(it=(Z=S.current).onCanvasChange)==null?void 0:it.call(Z,F)},onManifestChange:F=>{var Z,it;return(it=(Z=S.current).onManifestChange)==null?void 0:it.call(Z,F)},isControlled:()=>S.current.controlled,isManifestControlled:()=>S.current.manifestControlled}));x.setRequest(l);const[b,M]=z(x.store.get().status);ra(()=>{let F=x.store.get().status;return x.store.subscribe(()=>{var Q,yt;const{status:Z,error:it}=x.store.get();Z!==F&&(F=Z,M(Z),(yt=(Q=S.current).onStatusChange)==null||yt.call(Q,Z,it))})},[x]);const w=$({});w.current={canvasId:e,defaultCanvasId:n,manifestId:s??i};const B=bf(l),O=$(t);O.current=t;const V=Vf(t);ra(()=>(x.load(O.current,w.current),()=>x.dispose()),[x,V,B]),D(()=>{v&&x.syncCanvas(e??null)},[x,v,e]);const X=$(m);X.current=m;const U=jf(m);D(()=>{x.loadAnnotations(X.current??null)},[x,U,B]),D(()=>{x.setAnnotationPages(h)},[x,h]),ol(x,p),D(()=>{y&&b==="ready"&&x.syncManifest(s??null)},[x,y,s,b]);const tt=Uf(x,F=>{var Z;return F.status==="ready"?((Z=F.manifest)==null?void 0:Z.id)??null:null});D(()=>{c&&tt&&x.search(c)},[x,c,tt]);const ot=$(u);zf(ot.current,u)||(ot.current=u);const mt=ot.current,[E,k]=z(),[P,j]=z(d);P!==d&&(j(d),k(void 0));const q=$(void 0),[rt,st]=z(V);rt!==V&&(st(V),k(void 0)),D(()=>()=>{const F=q.current;q.current=void 0,F&&Lt.chosenLanguage===F&&Lt.chooseInterfaceLanguage()},[V]);const gt=oe(Lt.subscribe,()=>Lt.chosenLanguage),_=E??d??gt,T=ut(F=>{k(F);const Z=Lt.stringsFor(F);q.current=Z,Z&&Lt.chooseInterfaceLanguage(Z)},[]),[A,N]=z(0),K=ut(()=>(N(F=>F+1),()=>N(F=>F-1)),[]),H=A>0;return[bt(()=>({clover:x,language:_,renderers:mt,chooseLanguage:T,toggleDrawn:H,drawsToggle:K}),[x,_,mt,T,H,K]),b,g]}function Uf(t,e){return oe(t.store.subscribe,()=>e(t.store.get()))}function jf(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 Vf(t){return typeof t=="string"?t:t.id??t["@id"]??t}const qf=le(function({as:e="div",className:n,children:o,highContrast:r,...s},i){const[a,c,l]=Wf(s),d=No(i,l.lang),u=hs(r);return f(Po.Provider,{value:a,children:f(zn.Provider,{value:d.hostLanguage,children:f(e,{ref:d.ref,className:Mt("clover-root",n),"data-status":c,...ps(u),...l,children:[o,f(nf,{clover:a.clover,language:a.language})]})})})}),Kf=()=>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"}),Zf=()=>f(St,{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"})]}),Gf=()=>f("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),Xf=()=>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"}),Xy=()=>f(St,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M232 72H72V440H440V280"}),f("rect",{stroke:"none",x:"144",y:"244",width:"124",height:"124",rx:"16"}),f("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M429.77 82.2L312 200M424 200H312V88"})]}),Yy=()=>f(St,{children:[f("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M232 72H72V440H440V280"}),f("rect",{stroke:"none",x:"144",y:"244",width:"124",height:"124",rx:"16"}),f("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M328 72h112v112M429.77 82.2L312 200"})]}),Jy=()=>f("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),rl=()=>f("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),Qy=()=>f(St,{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"})]}),tb=()=>f(St,{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"})]}),ne={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"}},Yf=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}=Tt(),c=$(null),l=n?a("controlShortcut",{label:t,shortcut:n.glyph}):t;return Qf(),D(()=>{const d=c.current;d&&Vr(d)&&wo(d)},[l,s]),f("span",{ref:c,className:"clover-tip","aria-hidden":"true",...dt(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&&Vr(d)&&wo(d)}}),s&&f("span",{className:"clover-tip-lead",children:s}),l,i!=null&&i!==false&&f("span",{className:"clover-tip-after",children:i})]})}function ho(t){const e=t.target instanceof Element&&Ps(t.target),n=e&&$n(e);n&&wo(n)}function eb(t){const e=$n(Ps(t));e&&Vr(e)&&wo(e)}function $n(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function Ps(t){const e=t.matches("input")?t.parentElement:null;return e&&$n(e)?e:t}const sl=(t,...e)=>e.some(n=>{try{return t.matches(n)}catch{return false}}),il=[":focus-visible",":has(> input:focus-visible)"];function Vr(t){const e=t.parentElement;return!!(e&&sl(e,":hover",...il))}function wo(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=Jf(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 Jf(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 sa=0;function ia(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&&Ps(n);o&&$n(o)&&e.add(o),e.forEach(r=>{if("tipHidden"in r.dataset)return;const s=$n(r);s&&r.getAttribute("aria-expanded")!=="true"&&(sl(r,...il)||getComputedStyle(s).visibility!=="hidden")&&t.preventDefault(),al(r,"tipHidden",["pointerenter","focusout"])})}function al(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 Qf(){D(()=>(sa++===0&&(document.addEventListener("keydown",ia,true),document.addEventListener("pointerenter",ho,true),document.addEventListener("focus",ho,true)),()=>{--sa||(document.removeEventListener("keydown",ia,true),document.removeEventListener("pointerenter",ho,true),document.removeEventListener("focus",ho,true))}),[])}function th(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||Yf.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 m=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return f("button",{id:e,className:Mt("clover-canvas-button",t),"data-testid":"clover-canvas-button","data-button":m,"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,...dt(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})]})},eh=ge("");function ve(){return Vt(eh)+us()}const mr=new Map;function nh(t,e){const n=ve(),o=$(e);o.current=e,D(()=>t?oh(n,o):void 0,[t,n])}function oh(t,e){for(const[n,o]of[...mr])n!==t&&o.current();return mr.set(t,e),()=>{mr.delete(t)}}const rh=_t(()=>import("./CaptionDetails-CnzK-9IJ.mjs"));function sh(t){var e;return!!t.summary||!!((e=t.metadata)!=null&&e.length)}const cl=(t,e)=>`${t}-label-${e}`,ih=({id:t,canvases:e,comments:n,open:o,onClose:r,language:s})=>{const{t:i,langOf:a}=Tt(),c=$(null),[l,d]=z(o);return o&&!l&&d(true),nh(o,()=>r(false)),D(()=>{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(rl,{})}),e.map((u,m)=>{const h=xt(u.label,s);return f("section",{className:"clover-canvas-caption-canvas",children:[h.text&&f("p",{className:"clover-canvas-caption-label",id:cl(t,m),...dt(h.lang),children:h.text}),l&&f(Ct,{fallback:null,children:f(rh,{summary:u.summary,metadata:u.metadata,comments:n==null?void 0:n.get(u.id),language:s})})]},u.id)})]})},ah=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),ch=()=>f("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),lh=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),uh=()=>f("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"40",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),dh=()=>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"}),aa=()=>f(St,{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"})]}),fh=()=>f(St,{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"})]}),hh=({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}),ph=112,mh=128;function gh(t){Bt(()=>{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,p]of Object.entries(c)){const g=`--clover-canvas-controls-${h}`;a?e.style.setProperty(g,`${p}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),m=t.offsetLeft+i-l;a&&u<ph&&m>=mh?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 Bo=()=>{if(typeof document>"u")return null;const t=document;return t.fullscreenElement??t.webkitFullscreenElement??null},ll=()=>{if(typeof document>"u")return false;const t=document;return!!(t.fullscreenEnabled??t.webkitFullscreenEnabled)},ul=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},vh=(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()},dl=async(t,e)=>{var o,r,s,i;const n=ul(t);if(n)try{if(Bo()){const c=document;await(((o=c.exitFullscreen)==null?void 0:o.call(c))??((r=c.webkitExitFullscreen)==null?void 0:r.call(c)));return}if(!ll()){e&&t&&vh(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 As(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>{var r;return n(!!((r=Bo())!=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 yh({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(hh,{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 bh=({fit:t=false,clusterRef:e,children:n})=>{const[o,r]=z(null),s=As(o);gh(o);const i=ut(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})},_h=()=>()=>{};function wh(){return oe(_h,ll)}const ca=new WeakMap;function rn(t,e){const[n,o]=z(()=>ca.get(t)??null);return D(()=>{if(!e||n)return;let r=true;return t().then(s=>{ca.set(t,s),r&&o(()=>s)},()=>{}),()=>{r=false}},[t,e,n]),n}function xh(t,e,n){return t.reduce((o,r)=>o+r+n,-n)<=e}function Sh(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 kh({cluster:t,ids:e,more:n,fits:o,settled:r,onFits:s}){const i=$(o);i.current=o;const a=$(s);a.current=s;const c=$(new Map),l=$(e);l.current=e;const d=$(null),u=e.join(" ");return Bt(()=>{const m=t.ownerDocument,h=()=>{var B;const v=l.current,y=getComputedStyle(t),S=parseFloat(y.columnGap)||0;let x=t.clientWidth-(parseFloat(y.paddingLeft)||0)-(parseFloat(y.paddingRight)||0),b=0;for(const O of v){const V=(B=m.getElementById(O))==null?void 0:B.offsetWidth;V&&c.current.set(O,V),b=Math.max(b,c.current.get(O)??0)}for(const O of Array.from(t.children))!(O instanceof HTMLElement)||v.includes(O.id)||O.id===n||O.classList.contains("clover-canvas-more")||!O.offsetWidth||getComputedStyle(O).position==="absolute"||(x-=O.offsetWidth+S);const M=xh(v.map(O=>c.current.get(O)??b),x,S);if(M===i.current)return;const w=m.activeElement;d.current=w instanceof HTMLElement&&t.contains(w)?w.id:null,i.current=M,a.current(M)};h();const p=new ResizeObserver(()=>h());p.observe(t);const g=new MutationObserver(()=>h());return g.observe(t,{childList:true}),()=>{p.disconnect(),g.disconnect()}},[t,u,n]),Bt(()=>{if(!r)return;const m=d.current;if(d.current=null,m===null)return;const h=t.ownerDocument.activeElement;(!h||!t.contains(h)||h.closest("[hidden]"))&&Sh(t,m,n)},[o,r,t,n]),null}const Ch=()=>import("./AnnotationMenu-BdkH82NQ.mjs"),Eh=()=>import("./ChaptersMenu-6Mu_YuaY.mjs"),Mh=()=>import("./ChoiceMenu-9EZhHBEq.mjs"),Th=()=>import("./ImageControls-D91KmrS3.mjs"),la=2,Ih=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),fl={atMax:false,atMin:false,atHome:false},Lh=({renderer:t,instance:e,config:n,controlButtons:o,limits:r=fl,placeholder:s,placeholderIsMore:i=false,choices:a=[],selections:c={},onSelect:l,annotations:d=[],chapters:u=[],mediaElement:m=null,onChapter:h,overStill:p,request:g,hiddenPages:v,onPageVisibilityChange:y,selectedAnnotation:S=null,onAnnotationSelect:x,onAnnotationActivate:b,captionId:M,captionOpen:w=false,onCaptionToggle:B,away:O=false,placeId:V,placeOpen:X=false,onPlaceToggle:U,language:tt,fit:ot=true,more:mt="auto",children:E})=>{var Yn,xn,Jn,Fe;const{t:k,langOf:P}=Tt(),[j,q]=z(false),[rt,st]=z(false),gt=`annotations-${e}`,_=`${gt}-menu`,T=k("informationPanelTabsAnnotations"),A=P("informationPanelTabsAnnotations"),N=ut(G=>{var vt;st(false),b==null||b(null),G&&((vt=document.getElementById(gt))==null||vt.focus())},[gt,b]),K=n.annotations&&d.length>0&&x,[H,I]=z(false),F=`chapters-${e}`,Z=`${F}-menu`,it=u.length>0&&!!h,Q=$(false),yt=$(null);D(()=>{const G=()=>{var vt;Q.current=((vt=document.activeElement)==null?void 0:vt.id)===F};return document.addEventListener("focusin",G),()=>document.removeEventListener("focusin",G)},[F]);const ft=ut(()=>{var vt,Ee;if(!Q.current)return;Q.current=false;const G=document.activeElement;G&&G!==document.body||(Ee=(vt=yt.current)==null?void 0:vt.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||Ee.focus()},[]);D(()=>{it||ft()},[it,ft]),D(()=>()=>ft(),[ft]);const Ht=ut(G=>{var vt;I(false),G&&((vt=document.getElementById(F))==null||vt.focus())},[F]),$t=n.information&&M&&B,Gt=n.map&&V&&U,Ft=`choice-${e}`,ht=a.length===1?xt(a[0].label,tt):null,zt=(ht==null?void 0:ht.text)||k("canvasChoice"),Y=ht!=null&&ht.text?ht.lang:P("canvasChoice"),lt=`${Ft}-menu`,kt=(Yn=rn(Ch,!!K))==null?void 0:Yn.default,R=(xn=rn(Eh,it))==null?void 0:xn.default,at=(Jn=rn(Mh,a.length>0&&!!l))==null?void 0:Jn.default,Nt=ut(G=>{var vt;q(false),G&&((vt=document.getElementById(Ft))==null||vt.focus())},[Ft]),yn=wh(),[Ut,Ze]=z(null);D(()=>{yt.current=(Ut==null?void 0:Ut.closest(".clover-canvas"))??null},[Ut]);const Ge=As(Ut),[re,Be]=z(false),Kn=G=>f(We,{className:G,id:gt,label:T,lang:A,onClick:()=>st(vt=>!vt),expanded:rt,controls:_,children:f(Kf,{})},"annotations"),Zn=(()=>{const G=[],vt=t;return n.zoom&&vt&&G.push({key:"zoomIn",id:`zoomIn-${e}`,shortcut:ne.zoomIn,label:k("imageZoomIn"),lang:P("imageZoomIn"),glyph:f(ah,{}),unavailable:r.atMax,onClick:()=>vt.zoomBy(la)},{key:"zoomOut",id:`zoomOut-${e}`,shortcut:ne.zoomOut,label:k("imageZoomOut"),lang:P("imageZoomOut"),glyph:f(ch,{}),unavailable:r.atMin,onClick:()=>vt.zoomBy(1/la)}),n.fullPage&&yn&&G.push({key:"fullPage",id:`fullPage-${e}`,label:k(Ge?"imageExitFullScreen":"imageFullScreen"),lang:P(Ge?"imageExitFullScreen":"imageFullScreen"),glyph:Ge?f(uh,{}):f(lh,{}),onClick:Ee=>void dl(Ee.currentTarget)}),n.rotation&&vt&&G.push({key:"rotateRight",id:`rotateRight-${e}`,shortcut:ne.rotateRight,label:k("imageRotateRight"),lang:P("imageRotateRight"),glyph:f(aa,{}),onClick:()=>vt.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${e}`,shortcut:ne.rotateLeft,label:k("imageRotateLeft"),lang:P("imageRotateLeft"),glyph:f(aa,{}),onClick:()=>vt.rotateBy(-90)}),n.reset&&vt&&G.push({key:"reset",id:`reset-${e}`,shortcut:ne.reset,label:k("imageResetZoom"),lang:P("imageResetZoom"),glyph:f(dh,{}),unavailable:r.atHome,onClick:()=>vt.home()}),a.length&&G.push({key:"choice",id:Ft,label:zt,lang:Y,glyph:f(fh,{}),onClick:()=>q(Ee=>!Ee),expanded:j,controls:lt}),G})().filter(G=>!O||G.key==="fullPage"),Xt=[...Zn.filter(G=>G.key!=="fullPage"),...Zn.filter(G=>G.key==="fullPage")].map(G=>({id:G.id,view:Ih.has(G.key),node:yh(G,o)})),bn=[Gt&&{id:`place-${e}`,view:false,node:f(We,{id:`place-${e}`,label:k("mapLabel"),lang:P("mapLabel"),onClick:U,expanded:X,controls:V,children:f(Xf,{})},"place")},it&&{id:F,view:false,node:f(We,{id:F,label:k("playerChapters"),lang:P("playerChapters"),onClick:()=>I(G=>!G),expanded:H,controls:Z,children:f(Zf,{})},"chapters")},K&&{id:gt,view:false,node:Kn()},$t&&{id:`information-${e}`,view:false,node:f(We,{id:`information-${e}`,label:k("informationPanelTabsAbout"),lang:P("informationPanelTabsAbout"),onClick:B,expanded:w,controls:M,children:f(Gf,{})},"information")},!!s&&{id:`placeholder-${e}`,view:false,node:f(he.Fragment,{children:s},"placeholder")}].filter(G=>!!G&&(!O||G.id===`place-${e}`||G.id===`information-${e}`)),Gn=bn.filter(G=>G.id===`placeholder-${e}`),qt=[...Xt.filter(G=>G.view),...Gn],_n=[...Xt.filter(G=>!G.view),...bn.filter(G=>!Gn.includes(G))],se=[...qt,..._n],[$e,Uo]=z(true),wn=mt==="always"||i,Pt=(Fe=rn(Th,ot&&(i||(wn||!$e)&&se.some(G=>G.view))))==null?void 0:Fe.ImageControls,Kt=$e&&!wn||!Pt?[]:se.filter(G=>G.view),Ce=i&&!!s&&!!Pt;D(()=>{Kt.length||Be(false)},[Kt.length]);const Xn=G=>G.filter(vt=>!Kt.includes(vt)&&!(Ce&&vt.id===`placeholder-${e}`)).map(({node:vt})=>vt);return f(St,{children:[f(bh,{fit:ot,clusterRef:Ze,children:[Xn(qt),Pt&&(Kt.length>0||Ce)&&f(Pt,{instance:e,open:Ce?Kt.length>0:re,onOpenChange:Be,toggle:Ce?s:void 0,children:Kt.map(({node:G})=>G)}),Xn(_n),E]}),ot&&!wn&&Ut&&f(kh,{cluster:Ut,ids:se.map(({id:G})=>G),more:`more-${e}`,fits:$e,settled:$e||Kt.length>0||!se.some(G=>G.view),onFits:Uo}),R&&H&&it&&f(R,{id:Z,triggerId:F,label:k("playerChapters"),labelLang:P("playerChapters"),chapters:u,element:m,onChapter:h,overStill:p,request:g,onClose:Ht}),kt&&rt&&K&&f(kt,{id:_,triggerId:gt,label:T,labelLang:A,annotations:d,hiddenPages:v,onPageVisibilityChange:y,selected:S,onSelect:x,onActivate:G=>b==null?void 0:b(G),onClose:N}),at&&j&&a.length>0&&l&&f(at,{id:lt,triggerId:Ft,label:zt,labelLang:Y,language:tt,choices:a,selections:c,onSelect:l,onClose:Nt})]})},Ph=["jpg","png","webp","gif"];class qr extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageServiceError"}}function Os(t){return t.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function $o(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 Os(a)}}function Ah(t,e){if(!t||typeof t!="object")throw new qr("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=Os(r??e??""),i=Number(n.width),a=Number(n.height);if(!s||!(i>0)||!(a>0))throw new qr("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=Nh(l),m=new Set([...Array.isArray(n.extraFeatures)?n.extraFeatures:[],...d.flatMap(S=>Array.isArray(S.supports)?S.supports:[])]),p=[...Array.isArray(n.preferredFormats)?n.preferredFormats:[]].map(S=>String(S).toLowerCase()).find(S=>Ph.includes(S))??"jpg",g=S=>{var b;const x=n[S]??((b=d.find(M=>M[S]!==void 0))==null?void 0:b[S]);return Number(x)>0?Number(x):void 0};let v=g("maxWidth"),y=g("maxHeight");return v&&!y&&(y=v),y&&!v&&(v=void 0),{id:s,version:o,level:u,width:i,height:a,tiles:Rh(n.tiles),sizes:Bh(n.sizes),maxWidth:v,maxHeight:y,maxArea:g("maxArea"),regionByPx:u>=1||m.has("regionByPx"),sizeByW:u>=1||m.has("sizeByW")||m.has("sizeByWh"),format:p,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 Nh(t){const e=t==null?void 0:t.match(/level([012])/);return e?Number(e[1]):0}function Rh(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 Bh(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 xo(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 $h(t){return t.version===2&&t.level===0?"native":void 0}const gr=new Map;function Ns(t,{request:e}={}){const n=Os(t),o=gr.get(n);if(o)return o;const r=`${n}/info.json`,s=Es(e,r,{headers:{Accept:"application/ld+json, application/json"}}).then(async i=>{if(!i.ok)throw Ms(i),new qr(`info.json request failed with ${i.status}`,r,i.status);return Ah(await i.json(),n)}).catch(i=>{throw gr.delete(n),i});return gr.set(n,s),s}function Fh(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 nb(t,e){var n;if(t.currentTime=e,!!t.paused)try{(n=t.play())==null||n.catch(()=>{})}catch{}}function Rs(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 Dh=(t,e,n,o,r)=>`${t}|${e??`${n}:${o}`}|${r}`,Hh=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,zh=(t,e)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(e&&Hh.test(e)),Wh={width:1600,height:900};function Uh(t,e){const n=new Array(t.length);if(!t.length)return n;const o=t.map(hn),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),m=d.width*u,h=d.height*u;n[l]=r?{x:c,y:0,width:m,height:h}:{x:0,y:c,width:m,height:h},c+=r?m:h}return n}function hn(t){var s,i;if(t.width&&t.height)return{width:t.width,height:t.height};const e=hl(t);if(e!=null&&e.width&&e.height)return{width:e.width,height:e.height};const n=((s=So(t)[0])==null?void 0:s.body)??((i=ko(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}:Wh}function hl(t){return t.accompanyingContainer??t.placeholderContainer}function jh(t,e,n,o,r){return Dh(t.id,e.id,n,o,r)}function Vh(t){const e=[];for(const n of t)pl(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 vr={};function ua(t){if(t.type!=="Video"&&!Un(t.type)||!t.format||zh(t.id,t.format)||typeof document>"u")return true;const e=t.type==="Video"?"video":"audio",n=vr[e]??(vr[e]=document.createElement(e));return typeof n.canPlayType!="function"?true:n.canPlayType(t.format)!==""}function qh(t,e){const n={};for(const o of t){const r=o.items.filter(ua),s=[...new Set(r.flatMap(c=>c.language??[]))],i=s.length>1?Ac(s,e):void 0,a=o.items.findIndex(c=>ua(c)&&(!i||c.language===i));a>0&&(n[o.key]=a)}return n}const yr=new WeakMap,br=[];function Kh(t){return Ro(t).some(e=>((e==null?void 0:e.type)==="Choice"?W(e.items):[e]).some(o=>(o==null?void 0:o.type)==="Video"||Un(o==null?void 0:o.type)))}function Kr(t){var i;const e=yr.get(t);if(e)return e;const n=[];for(const a of t.items??[])for(const c of a.items??[]){if(!ws(c))continue;const l=c.target?(i=mn(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=>Kh(a.annotation)))return yr.set(t,br),br;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:br;return yr.set(t,s),s}const Fn=t=>`frame:${t.id}`;function pl(t,e){(t.items??[]).forEach((n,o)=>{(n.items??[]).forEach((r,s)=>{ws(r)&&Ro(r).forEach((i,a)=>e(i,jh(t,r,o,s,a),r))})})}function So(t,e={},{allFrames:n=false}={}){const o=[];return Bs(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 Zh(t,e={}){for(const n of t){let o;if(Bs(n,e,r=>{o??(o=r.body.type)}),typeof o=="string")return o.toLowerCase()}}function ko(t,e={}){const n=[];return Bs(t,e,(o,r,s,i)=>{const a=o.body.type;if(a!=="Video"&&!Un(a))return;const c=Rs(i);n.push({kind:a==="Video"?"video":"audio",body:o.body,target:r,...c?{time:c}:{}})}),n}function Gh(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 Bs(t,e,n,o=false){const r=t.width??0,s=t.height??0,i=Kr(t),a=Math.min(e[Fn(t)]??0,Math.max(0,i.length-1));pl(t,(c,l,d)=>{const u=i.findIndex(g=>g.annotation===d);if(!o&&u>=0&&u!==a)return;const m=Zr(c,e[l]??0);if(!m)return;const h=d.target?mn(d.target):void 0,p=h==null?void 0:h.rect;n(m,p?{x:p.x,y:p.y,width:p.w,height:p.h}:{x:0,y:0,width:r||Number(m.body.width)||0,height:s||Number(m.body.height)||0},u,h==null?void 0:h.t)})}function ml(t){return gl(t).filter(e=>e.kind!=="transcript")}function Xh(t){const e=W(t.provides);return e.includes("closedCaptions")?"captions":e.includes("subtitles")||e.includes("translation")?"subtitles":e.includes("transcript")?"transcript":"captions"}function gl(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:Xh(r)})}}return e}function Yh(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 Zr(t,e=0){if(!t||typeof t!="object")return null;const n=t;if(n.type==="Choice"){const o=W(n.items);return Zr(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=Zr({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"&&!Un(n.type)?null:{body:n,region:typeof n.region=="string"?n.region:void 0}}function da(t,e,n={},{standIns:o=true}={}){const r=Uh(t,e),s=[],i=[],a={};return t.forEach((c,l)=>{const d=r[l],u=hn(c),m=d.width/u.width,h=d.height/u.height,p=b=>({x:d.x+b.x*m,y:d.y+b.y*h,width:b.width*m,height:b.height*h}),g=ko(c,n),v=So(c,n,{allFrames:true}).map(b=>({...b,canvas:c})),y=hl(c);if(o&&!v.length&&g.some(b=>b.kind==="audio")&&y){const b=hn(y);for(const M of So(y))v.push({...M,canvas:y,target:{x:M.target.x/b.width*u.width,y:M.target.y/b.height*u.height,width:M.target.width/b.width*u.width,height:M.target.height/b.height*u.height}})}const S=n[Fn(c)]??0;v.forEach(({body:b,target:M,region:w,rotation:B,frame:O,canvas:V},X)=>{var mt;const U=$o(b.service);if(!U&&!b.id)return;const tt=`${V.id}|${X}|${b.id??U}|${w??""}|${B??""}`,ot=!(U&&w);if(s.push({id:tt,service:U,url:b.id,width:ot&&Number(b.width)||void 0,height:ot&&Number(b.height)||void 0,region:w,...B?{rotation:B}:{},placement:p(M),...O!=null&&O!==S?{hidden:true}:{}}),O!=null){const E=a[mt=Fn(c)]??(a[mt]=[]);(E[O]??(E[O]=[])).push(tt)}});const[x]=g;if(x!=null&&x.body.id){const b=Gh(g),M=b?b[0]:void 0;i.push({id:`${c.id}|media|${x.body.id}`,kind:x.kind,src:(M==null?void 0:M.src)??x.body.id,format:M?M.format:x.body.format,placement:p(x.target),duration:b?Number(c.duration)||void 0:Number(x.body.duration??c.duration)||void 0,...b?{segments:b}:{},poster:Jh(c),captions:ml(c)})}}),{images:s,media:i,placements:r,frames:a}}function Jh(t){var e;return(e=Gr(t))==null?void 0:e.source}const ob=1280;function Gr(t){var c;const e=t.placeholderContainer;if(!e)return;const n=(c=So(e)[0])==null?void 0:c.body;if(!n)return;const o=$o(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}=hn(e);return{source:s,width:i,height:a}}function Qh(t,e,n){const o=hn(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 tp=({hidden:t})=>{const{t:e,langOf:n}=Tt(),o=e("imageExitFullScreen");return f("button",{"aria-label":o,...dt(n("imageExitFullScreen")),className:"clover-canvas-exit-full-screen",hidden:t,onClick:r=>void dl(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]})},vl="50%";function yl(t,e=vl,n=null){const[o,r]=z(()=>typeof IntersectionObserver>"u");return D(()=>{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 ep(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>n(Bo()===t);return o(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)}},[t]),e}function np(t){const[e,n]=z(false);return D(()=>{if(!t)return;const o=()=>{const r=Bo();n(r===t||!!r&&ul(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 op extends he.Component{constructor(){super(...arguments);L(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?f(rp,{error:n}):this.props.children}}function rp({error:t}){const{t:e,langOf:n}=Tt();return f("div",{className:"clover-canvas-error",role:"alert",children:[f("p",{className:"clover-canvas-error-headline","data-testid":"headline",...dt(n("statusError")),children:e("statusError")}),t.message&&f("span",{className:"clover-canvas-error-body",lang:"en",children:t.message})]})}const sp=250,fa=100,ip=330,_r=new WeakMap;let wr;const ha=(t,e)=>t.style.setProperty("--clover-loading-elapsed",`${Math.round(e)}ms`);function ap(t){var i;const e=t.closest(".clover-body")??t.parentElement,n=t.parentElement;if(!e||!n)return()=>{};const o=performance.now();let r=_r.get(e);if(!r){const a=wr,c=a&&o>=a.at&&o-a.at<fa&&!a.host.isConnected;r={start:c?a.start:o,marks:0},c&&(wr=void 0),_r.set(e,r)}clearTimeout(r.timer),(i=r.ghost)==null||i.remove(),r.ghost=void 0,r.marks++,ha(t,o-r.start);const s=r;return()=>{if(--s.marks)return;const a=performance.now(),c=a-s.start;wr={start:s.start,at:a,host:e};const l=t.firstElementChild,d=c>=sp&&n.isConnected&&l&&getComputedStyle(l).animationName.startsWith("clover-loading")?t.cloneNode(true):void 0;d&&(ha(d,c),n.appendChild(d)),s.ghost=d,s.timer=setTimeout(()=>{if(_r.delete(e),!d)return;const u=d.firstElementChild;u&&(u.style.transform=getComputedStyle(u).transform),d.dataset.done="",setTimeout(()=>d.remove(),ip)},fa)}}const cp=typeof window>"u"?D:Bt;function An({overlay:t=false,className:e}){const n=$(null);return cp(()=>{const o=n.current;return o?ap(o):void 0},[]),f("span",{ref:n,"aria-hidden":"true",className:Mt("clover-loading",e),"data-overlay":t||void 0,children:f("span",{})})}function lp(t,e=null){if(!t)return false;if(e!=null&&e.navPlace||t.navPlace)return true;for(const n of Rt(t).canvases){if(n.navPlace||bl(n))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.body).some(i=>(i==null?void 0:i.type)==="Feature"||(i==null?void 0:i.type)==="FeatureCollection"))return true}return false}function bl(t){return W(t==null?void 0:t.annotations).some(e=>W(e==null?void 0:e.items).some(n=>W(n==null?void 0:n.motivation).includes("georeferencing")))}const up={image:"bodyUnloadableImage",video:"bodyUnloadableVideo",audio:"bodyUnloadableAudio",model:"bodyUnloadableModel"};function dp({kind:t,shown:e,room:n=false}){const{t:o,langOf:r}=Tt(),s=up[t];return f("div",{className:"clover-body-unloadable","data-room":n||void 0,role:"status",children:e&&f("p",{...dt(r(s)),children:o(s)})})}function fp({text:t,lang:e}){return f("div",{className:"clover-body-note","aria-hidden":"true",children:f("p",{...dt(e),children:t})})}function Fo(t,e,n=false,o){const r=ve(),{hostLanguage:s}=Tt(void 0,o);if(n)return{props:{},node:null};const i=Oo(e,s);return i===void 0?{props:{"aria-label":t},node:null}:{props:{"aria-labelledby":r},node:f("span",{hidden:true,id:r,...dt(i),children:t})}}const hp=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function ce(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function pe(t,e=t){return{a:t,b:0,c:0,d:e,e:0,f:0}}function jn(t){const e=Math.cos(t),n=Math.sin(t);return{a:e,b:n,c:-n,d:e,e:0,f:0}}function pp(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 me(...t){return t.reduce((e,n)=>pp(e,n),hp)}function mp(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 we(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 rb(t){return`matrix(${[t.a,t.b,t.c,t.d,t.e,t.f].map(vp).join(",")})`}function gp(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 vp(t){const e=Math.round(t*1e6)/1e6;return Object.is(e,-0)?"0":String(e)}function _l(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function an(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 yp(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 Do(t,e){const n=[we(t,{x:e.x,y:e.y}),we(t,{x:e.x+e.width,y:e.y}),we(t,{x:e.x,y:e.y+e.height}),we(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 Mn(t,e,n){return Math.min(Math.max(t,e),n)}const xr=t=>!!(t&&"overlays"in t);let Xr;const bp=()=>Promise.resolve().then(()=>gf).then(t=>{Xr=t.buildContentState}),_p=_t(()=>import("./MediaBody-Cg4ARhwy.mjs")),wp=()=>import("./AnnotationState-CU298l_b.mjs"),xp=new Map,Sp={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:xp,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},kp=_t(()=>import("./FrameAnimation-nvSxSZXx.mjs")),Cp={feature:{type:"FeatureCollection",features:[]},canvases:void 0,name:void 0},pa=_t(()=>import("./PlaceBox-CINvMgWh.mjs")),Ep=_t(()=>import("./Placeholder-Biz7HHCE.mjs")),Mp=_t(()=>import("./ControlsFade-DguyDuyM.mjs")),Tp=()=>true,Ip=_t(()=>import("./Placeholder-Biz7HHCE.mjs").then(({PlaceholderToggle:t})=>({default:t}))),ma={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},Lp={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},Pp={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",ne.zoomIn.keys,ne.zoomOut.keys,ne.reset.keys,ne.rotateRight.keys,ne.rotateLeft.keys].join(" ")},Ap={description:"canvasKeysMedia",keys:[ne.play.keys,"J L",ne.mute.keys].join(" ")},Op={description:"canvasKeysAnnotations",keys:"Escape"},Np=t=>{var s;const e=!!((s=t.canvases)!=null&&s.length)||wl(t.body,t.src).length>0,[n,o]=z(false),r=e||n&&t.manifestId==="loading";return r!==n&&o(r),r?f(op,{children:f(Rp,{...t})}):null},Rp=t=>{var ui,di,fi,hi,pi,mi;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:m,className:h,options:p,navigator:g=false,controls:v=true,collapseControls:y="auto",controlButtons:S,annotations:x,onReady:b,onViewportChange:M,onContentStateChange:w,onMediaElement:B,onCaptionChange:O,caption:V,onEnded:X,chapters:U,highlightedChapter:tt,onChapterHighlight:ot,placeholder:mt=true,ahead:E,children:k}=t,{t:P}=Tt(),j=$(null),[q,rt]=z(null),st=ep(q),gt=As(q),_=np(q),T=No(rt),A=hs(u),N=!!e.controlsVisibility,H=(e.controlsVisibility??Tp)(N?q:null,p==null?void 0:p.hideDelay,j),[I,F]=z(false),Z=yl(q),it=ve(),[Q]=z(()=>m??`clover-canvas-${it}`),yt=$(null),[ft,Ht]=z(null),$t=xr(ft)?ft:null,[Gt,Ft]=z(null),ht=v===false?null:v===true?ma:{...ma,...v},[zt,Y]=z("loading"),[lt,kt]=z(false),[R,at]=z(0),[Nt,yn]=z(fl),Ut=$(b),Ze=$(M),Ge=$(p);Ut.current=b,Ze.current=M,Ge.current=p;const re=_s(r),Be=bt(()=>Vh(o??[]),[o]),Kn=bt(()=>qh(Be,d),[Be,d]),[Wo,Zn]=z({}),Xt=bt(()=>({...Kn,...Wo}),[Kn,Wo]),bn=(C,J)=>Zn(pt=>({...pt,[C]:J})),Gn=bt(()=>x==null?void 0:x.filter(C=>!C.layer||(Xt[C.layer.key]??0)===C.layer.item),[x,Xt]),qt=(ui=x==null?void 0:x.find(C=>C.layer&&C.annotation.id===t.selectedAnnotation))==null?void 0:ui.layer;D(()=>{qt&&(Xt[qt.key]??0)!==qt.item&&bn(qt.key,qt.item)},[qt==null?void 0:qt.key,qt==null?void 0:qt.item,t.selectedAnnotation]);const _n=!!(ht!=null&&ht.information),se=!!(x!=null&&x.length),$e=rn(wp,se),[Uo,wn]=z(null),Pt=se&&Uo||Sp,Kt=bt(()=>{var pt,Ot;const C=(pt=x==null?void 0:x.find(Yt=>Yt.annotation.id===Pt.selected))==null?void 0:pt.annotation,J=(Array.isArray(C==null?void 0:C.body)?C==null?void 0:C.body:[C==null?void 0:C.body]).find(Yt=>(Yt==null?void 0:Yt.type)==="Feature");return C&&J?{id:String(C.id),feature:J,name:((Ot=J.properties)==null?void 0:Ot.label)??C.label}:null},[x,Pt.selected]),Ce=Kt?`${Kt.id}:${t.refind??0}`:null,[Xn,Yn]=z(null),xn=Ce!==null&&Xn!==Ce,Jn=bt(()=>{var en,co;const C=(o??[]).map(Qt=>Qt.navPlace).filter(Boolean),pt=(C.length?C:t.navPlace?[t.navPlace]:[]).flatMap(Qt=>(Qt==null?void 0:Qt.type)==="FeatureCollection"?Qt.features??[]:(Qt==null?void 0:Qt.type)==="Feature"?[Qt]:[]),Ot=(o??[]).filter(bl);if(!pt.length&&!Ot.length)return null;const Yt=pt.length===1?(co=(en=pt[0])==null?void 0:en.properties)==null?void 0:co.label:void 0;return{feature:{type:"FeatureCollection",features:pt},canvases:Ot.length?Ot:void 0,name:Yt??t.label}},[o,t.navPlace,t.label]),Fe=`place-box-${Q}`,[G,vt]=z(false),[Ee,cu]=z(false),Sn=Jn??(G&&t.manifestId==="loading"?Cp:null),[Ks,jo]=z(null),Qn=Ks===Fe&&G||Ks===`place-of-${Q}`&&xn,Zs=C=>jo(J=>J===C?null:C),to=$(Pt);to.current=Pt;const eo=ut(()=>to.current.release(),[]),{comments:Vo,listedCount:Gs}=Pt,Xe=bt(()=>_n?(o??[]).filter(C=>sh(C)||Vo.has(C.id)):[],[o,_n,Vo]),qo=`caption-${Q}`,[lu,Xs]=z(false),Ko=lu&&Xe.length>0,Ys=ut(C=>{var J;Xs(false),C&&((J=document.getElementById(`information-${Q}`))==null||J.focus())},[Q]),Jt=bt(()=>(o??[]).find(C=>Kr(C).length)??null,[o]),uu=Jt?Kr(Jt):$p,jt=bt(()=>o!=null&&o.length?da(o,re,Xt,{standIns:o.length>1}):null,[o,re,Xt]),du=bt(()=>wl(s,i,a),[s,i,a]),et=(jt==null?void 0:jt.media[0])??null,Js=!N&&(et==null?void 0:et.kind)==="video",fu=N||Js,hu=N?H:I,pu=bt(()=>{if(o!=null&&o.length)return Zh(o,Xt);const C=(Array.isArray(s)?s:s?[s]:[])[0];return typeof(C==null?void 0:C.type)=="string"?C.type.toLowerCase():i?"image":void 0},[o,Xt,s,i]),[Wt,mu]=z(null),no=$(B);no.current=B;const gu=ut(C=>{var J;mu(C),(J=no.current)==null||J.call(no,C)},[]),Me=jt?jt.images:du,Te=!!et&&(o==null?void 0:o.length)===1,Ie=Te&&(et==null?void 0:et.kind)==="audio",vu=Te&&(et==null?void 0:et.kind)==="video",Ye=(o==null?void 0:o.length)===1&&!et&&!Jt&&Me.length===0,oo=!Te&&!Ye&&((di=p==null?void 0:p.gestures)==null?void 0:di.navigable)!==false,ie=o?`${n??""}
|
|
2
|
+
${o.map(C=>C.id).join("|")}`:null,Le=bt(()=>{if(!o||!mt)return[];const C=o.flatMap(J=>{const pt=Gr(J),Ot=xt(J.label,d);return pt?[{...pt,alt:Ot.text,lang:Ot.lang}]:[]});return re==="right-to-left"||re==="bottom-to-top"?C.reverse():C},[o,re,mt,d]),[Zo,Qs]=z(false),[yu,ti]=z(null),wt=!Ie&&Le.length>0&&(et?yu!==ie:!Zo),ei=p==null?void 0:p.request;D(()=>{if(wt){Promise.resolve().then(()=>bg);for(const{source:C}of Le)C.service&&Ns(C.service,{request:ei}).catch(()=>{})}},[wt,Le,ei]);const ro=bt(()=>{if(!(E!=null&&E.length)||mt&&!Zo&&E.some(pt=>Gr(pt)))return null;const C=da(E,re,Xt,{standIns:false});if(C.media.length)return null;const J=C.images.filter(pt=>pt.service&&!pt.hidden);return J.length?{images:J,world:an(C.placements)??void 0}:null},[E,re,Xt,mt,Zo]);D(()=>{var C;zt!=="ready"||wt||!ro||(C=ft==null?void 0:ft.prefetch)==null||C.call(ft,ro.images,{world:ro.world})},[ft,zt,wt,ro]);const ni=(C,{annotations:J=false,fullPage:pt=false}={})=>({...C,zoom:false,rotation:false,reset:false,fullPage:pt&&C.fullPage,annotations:J&&C.annotations}),kn=Ye&>,oi=he.Children.count(k)>0,Go=Le.length>0&&!Ie&&!et,Cn=ht?wt?Xe.length||oi||Gs||et&&(U!=null&&U.length)?ni(ht,{annotations:true}):null:Te||Ye?Be.length||Xe.length||oi||Gs||et&&(U!=null&&U.length)||kn&&ht.fullPage?ni(ht,{annotations:true,fullPage:kn}):null:ht:null,Xo=g&&!wt&&(et?et.kind==="audio"&&!Te&&Me.length>0:true),[Yo,bu]=z(null),Je=et?Yo??et.placement:null,[so,_u]=z(Fp),Jo=bt(()=>{const C=(et==null?void 0:et.kind)==="video"&&Wt&&Je?[...Me,{id:et.id,placement:Je,width:Je.width,height:Je.height,media:{element:Wt}}]:Me;return so.length?[...C,...so]:C},[Me,et,Wt,Je,so]),ri=Te&&(et==null?void 0:et.kind)==="video"&&Yo?Yo:jt?an(jt.placements):null,wu=JSON.stringify([Me,ri,Jo.length!==Me.length&&[et==null?void 0:et.id,Je],so.map(C=>C.id)]),Qe=$(null),Qo=$(false),tr=()=>{et?ti(wt?ie:null):Qs(wt),wt||eo()},io=$(null),xu=C=>{if(Wt&&!wt){Wt.currentTime=C;return}io.current=C,wt&&tr()};D(()=>{!Wt||io.current===null||(Wt.currentTime=io.current,io.current=null)},[Wt]);const er=Array.isArray(s)?s[0]:s,At=[c,(fi=o==null?void 0:o[0])==null?void 0:fi.label,er==null?void 0:er.label].map(C=>xt(C,d)).find(C=>C.text),Su=bt(()=>{const C=xt(l,d);return C.text&&C.text!==(At==null?void 0:At.text)?C:void 0},[l,d,At==null?void 0:At.text]),si=Fo((At==null?void 0:At.text)||P("canvasImage"),At?At.lang:T.langOf("canvasImage"),false,T.hostLanguage),ao=wt?[]:[...oo?[Pp]:[],...et?[Ap]:[],...se?[Op]:[]],ii=`keys-${Q}`,ku=oo&&!wt&&!T.langOf("canvasRoleDescription")?P("canvasRoleDescription"):void 0,nr=!!Cn&&Xe.length>0,Cu=nr&&Xe.map((C,J)=>xt(C.label,d).text?cl(qo,J):null).filter(Boolean).join(" ")||void 0,ai=$({canvases:o,scene:jt,canvasKey:ie});ai.current={canvases:o,scene:jt,canvasKey:ie};const En=$(null),or=ut(()=>{const{canvases:C,scene:J,canvasKey:pt}=ai.current;En.current=C&&J&&Qe.current===pt?{key:pt,canvases:C,placements:J.placements}:null},[]),Eu=!o||((hi=En.current)==null?void 0:hi.key)===ie,tn=nl(()=>{const C=En.current,J=yt.current;if(!C||n==="loading")return null;const pt=Wt&&Wt.currentTime>0?Wt.currentTime:null,Ot=!pt&&J&&xr(J)?xl(J.getBounds(),C.canvases,C.placements):null,Yt=C.canvases.find(en=>en.id===(Ot==null?void 0:Ot.canvasId))??C.canvases[0];return Yt?Xr?Xr({manifestId:n,canvasId:Yt.id,type:Yt.type,region:Ot&&{x:Ot.rect.x,y:Ot.rect.y,w:Ot.rect.width,h:Ot.rect.height},time:pt}):(bp().then(()=>tn()),null):null},w);D(()=>jr(Wt,tn),[Wt,tn]),D(()=>{const C=j.current;if(!C)return;const J=e(C,Ge.current),pt=xr(J)?J:null;yt.current=J,Ht(J),J.setDismiss(eo);const Ot=()=>{if(!pt)return;const Zt=pt.viewLimits();yn(ye=>ye.atMax===Zt.atMax&&ye.atMin===Zt.atMin&&ye.atHome===Zt.atHome?ye:Zt)},Yt=J.on("open",()=>{var Zt;Ot(),ir(false),or(),tn(),Y("ready"),at(ye=>ye+1),pt&&((Zt=Ut.current)==null||Zt.call(Ut,Bp(pt,()=>En.current,ye=>{var vi,yi;const gi=to.current.placed.find(ar=>ar.id===ye);return gi?(to.current.select(gi),(yi=Array.from(((vi=pt.overlays)==null?void 0:vi.container.querySelectorAll("[id]"))??[]).find(ar=>ar.id===ye))==null||yi.focus({preventScroll:true}),true):false})))}),en=J.on("change",()=>{Ot(),ir(false),or(),tn(),Y("ready"),at(Zt=>Zt+1)}),co=J.on("error",()=>{J.isOpen||Y("error")}),Qt=J.on("unloadable",Zt=>kt(!!Zt)),Tu=J.on("viewport",()=>{var Zt;Ot(),pt&&((Zt=Ze.current)==null||Zt.call(Ze,pt.getBounds())),tn()});return()=>{Yt(),en(),co(),Qt(),Tu(),J.dispose(),yt.current=null,Ht(null)}},[m,e,eo,or]),D(()=>{if(!(!$t||!Gt))return $t.attachNavigator(Gt)},[$t,Gt]),D(()=>{if(!(!ft||!Ye))return ft.setGestures({navigable:false}),()=>ft.setGestures({})},[ft,Ye]);const rr=$(false);D(()=>{var J;if(kn)return;const C=!document.activeElement||document.activeElement===document.body;rr.current&&C&&((J=j.current)==null||J.focus()),rr.current=false},[kn]);const sr=$(false);Bt(()=>{var C;Qe.current===null||Qe.current===ie||((C=yt.current)==null||C.clear(),En.current=null,sr.current=true,Y("loading"))},[ie]),D(()=>{const C=yt.current;if(wt&&(Qo.current=true),!C||!Z||wt)return;const J=sr.current||Qe.current!==null&&Qe.current!==ie;(!C.isOpen||J)&&Y("loading");const pt=Te||Qo.current&&C.isOpen||J;Qe.current=ie,Qo.current=false,sr.current=false,C.setImages(Jo,{world:ri??void 0,fit:pt})},[wu,m,Wt,Z,wt]);const ci=$(n),[Mu,ir]=z(false);Bt(()=>{var C;n!==ci.current&&(ci.current=n,(C=yt.current)==null||C.clear(),ir(true),Y("loading"))},[n]);const li=zt==="loading"&&(Jo.length>0||n==="loading")&&Z&&!wt;return f(zn.Provider,{value:T.hostLanguage,children:f("figure",{"aria-labelledby":Cu,className:Mt("clover-canvas",h),"data-testid":"clover-canvas","data-status":zt,...ps(A),"data-unloadable":lt||void 0,"data-has-navigator":Xo,"data-fullscreen":st,"data-exit":_||void 0,"data-controls":fu?hu?"visible":"hidden":void 0,"data-media":pu,"data-recording":et?"":void 0,"data-player":Ie?"":void 0,"data-animated":Jt?"":void 0,"data-navigable":oo,"data-place":Qn?"swapped":void 0,"data-placeholder":Le.length&&!Ie?wt:void 0,ref:T.ref,onFocus:C=>{rr.current=kn&&C.target.id===`fullPage-${Q}`},onKeyDown:C=>{if(C.key==="Escape"&&Ko&&!C.defaultPrevented){C.preventDefault(),Ys(false);return}if(C.key==="Escape"&&!C.defaultPrevented&&!C.currentTarget.querySelector(".clover-canvas-menu")&&eo()){C.preventDefault();return}th(C,j.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(Cn||Xo)&&et&&f("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),Js&&f(Ct,{fallback:null,children:f(Mp,{element:q,hideDelay:p==null?void 0:p.hideDelay,picture:j,onChange:F})}),f(tp,{hidden:!_}),ft&&(Cn||Go)&&f(Lh,{renderer:$t,instance:Q,config:Cn??Lp,controlButtons:S,limits:Nt,placeholderIsMore:Go&&!et,chapters:et?U:void 0,mediaElement:Wt,onChapter:xu,overStill:!!et&&wt,request:p==null?void 0:p.request,placeholder:Go&&f(Ct,{fallback:null,children:f(Ip,{instance:Q,media:!!et,active:wt,onToggle:tr,more:!!ht&&(ht.zoom||ht.rotation||ht.reset||ht.fullPage)})}),fit:!N,more:y,choices:wt?[]:Be,selections:Xt,onSelect:bn,annotations:Pt.menu,hiddenPages:Pt.hiddenPages,onPageVisibilityChange:Pt.setPagesVisible,selectedAnnotation:Pt.selected,onAnnotationSelect:Pt.select,onAnnotationActivate:Pt.activate,captionId:nr?qo:void 0,captionOpen:Ko,onCaptionToggle:()=>Xs(C=>!C),placeId:Sn?Fe:void 0,placeOpen:G,away:Qn,onPlaceToggle:()=>{cu(true),vt(C=>!C)},language:d,children:Cn&&k}),Xo&&f("div",{ref:Ft,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),f("div",{ref:j,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:se?"group":"img","aria-roledescription":ku,...si.props,"aria-describedby":ao.length?ii:void 0,"aria-keyshortcuts":ao.map(({keys:C})=>C).join(" ")||void 0,"aria-busy":li,tabIndex:0}),si.node,ao.length>0&&f("span",{id:ii,style:je,children:ao.map(({description:C},J)=>f(he.Fragment,{children:[J>0&&" ",f("span",{...dt(T.langOf(C)),children:P(C)})]},C))}),f(dp,{kind:"image",shown:lt&&!wt}),Ye&&!wt&&(At==null?void 0:At.text)&&f(fp,{text:At.text,lang:At.lang||void 0}),(et==null?void 0:et.kind)==="audio"&&!Ie&&Me.length===0&&!wt&&(At==null?void 0:At.text)&&f("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...dt(At.lang||void 0),children:At.text}),Le.length>0&&!Ie&&f(Ct,{fallback:null,children:f(Ep,{instance:Q,stills:Le,vertical:re==="top-to-bottom"||re==="bottom-to-top",media:!!et,active:wt,lingering:zt==="loading"&&!Mu,onToggle:tr,request:p==null?void 0:p.request})}),ft&&et&&Z&&!wt&&f(Ct,{fallback:null,children:f(_p,{media:et,request:p==null?void 0:p.request,fillable:vu,surface:ft,instance:Q,onElement:gu,onFit:bu,onCaptionChange:O,caption:V,navigable:oo,fullscreen:Te&&!!(ht!=null&&ht.fullPage),isFullscreen:gt,onEnded:X,chapters:U,highlightedChapter:tt,onChapterHighlight:ot,autoPlay:!Ie&&Le.length>0&&Pt.quietlyOpened!==ie,language:d,notes:Pt.timed,marked:Pt.placed,selectedAnnotation:Pt.selected,onAnnotationSelect:se?Pt.select:void 0,onAnnotationActivate:Pt.activate,player:Ie&&o?{canvas:o[0],title:At,partOf:Su}:void 0})}),$t&&Jt&&(jt==null?void 0:jt.frames[Fn(Jt)])&&!wt&&f(Ct,{fallback:null,children:f(kp,{renderer:$t,frames:uu,byFrame:jt.frames[Fn(Jt)],animationKey:Jt.id,sceneVersion:R,autoplay:(pi=p==null?void 0:p.animation)==null?void 0:pi.autoplay,loop:(mi=p==null?void 0:p.animation)==null?void 0:mi.loop,onEnded:X,language:d,duration:Number(Jt.duration),canvas:Jt,place:jt.placements[o.indexOf(Jt)],onItems:_u},Jt.id)}),$e&&se&&x&&f($e.AnnotationState,{given:t,annotations:Gn??x,scene:jt,renderer:$t,sceneVersion:R,drawn:Eu,media:et,mediaElement:Wt,showPlaceholder:wt,canvasKey:ie,openImages:Qs,openMedia:ti,host:j,onModel:wn,refind:t.refind??0}),li&&f(An,{overlay:true}),Kt&&f(Ct,{fallback:null,children:f(pa,{id:`place-of-${Q}`,open:xn,swapped:Qn,onSwap:()=>Zs(`place-of-${Q}`),onClose:C=>{var J;jo(null),Yn(Ce),C&&((J=document.getElementById(Kt.id))==null||J.focus())},feature:Kt.feature,name:Kt.name,language:d})}),Sn&&Ee&&f(Ct,{fallback:null,children:f(pa,{id:Fe,open:G,swapped:Qn,onSwap:()=>Zs(Fe),onClose:C=>{var J;jo(null),vt(false),C&&((J=document.getElementById(`place-${Q}`))==null||J.focus())},feature:Sn.feature,canvases:Sn.canvases,owner:o==null?void 0:o[0],name:Sn.name,language:d})}),nr&&f(ih,{id:qo,canvases:Xe,comments:Vo,open:Ko,onClose:Ys,language:d})]})})};function Bp(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(Qh(i.canvases[a],i.placements[a],r),s),true)},getCanvasRegion(){const o=e();return o?xl(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 $p=[],Fp=[];function wl(t,e,n=false){const o=Array.isArray(t)?t:t?[t]:[];return o.length?o.map((s,i)=>{const a=$o(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 xl(t,e,n){let o=null;if(n.forEach((u,m)=>{const h=Math.max(t.x,u.x),p=Math.max(t.y,u.y),g=Math.min(t.x+t.width,u.x+u.width)-h,v=Math.min(t.y+t.height,u.y+u.height)-p;if(g<=0||v<=0)return;const y=g*v;(!o||y>o.area)&&(o={index:m,area:y,clip:{x:h,y:p,width:g,height:v}})}),!o)return null;const{index:r,clip:s}=o,i=e[r],a=n[r],c=hn(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 Dp(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=xt(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 Hp(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 zp(t,e){const n=t.store.get().manifest;if(e.canvasId&&Rt(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 Sl(t){if(typeof t=="string")return ga(t);const e=t;return(e==null?void 0:e.type)==="SpecificResource"?e:typeof(e==null?void 0:e.id)=="string"?ga(e.id):e}const ga=t=>t.replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1");function kl(t){const e=W(t.thumbnail)[0];return e&&typeof e=="object"?{thumbnail:e}:{}}const va=new WeakMap,ya=[];function Wp(t,e,n){if(!t||!e)return ya;let o=va.get(t);o||va.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 m of W(d.items)){if((m==null?void 0:m.type)==="Range"){c(m);continue}if(!u)continue;const h=mn(Sl(m));if(h.id.split("#")[0]!==e)continue;const p=Rs(h.t);p&&i.push({...d.id?{id:d.id}:{},label:d.label,...p,...kl(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 m;return{...d,end:d.end??((m=i[u+1])==null?void 0:m.start)??n}}):ya;return o.set(r,l),l}const ba=new WeakMap,_a=[];function Up(t){if(!t)return _a;const e=ba.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,x;if(!c||o.has(c.id??c))return[];o.add(c.id??c);const l=[],d=[],u=[];let m;for(const b of W(c.items))if((b==null?void 0:b.type)==="Range"){const M=r(b);l.push(...M),M.forEach(w=>d.push(...w.canvasIds))}else{const M=mn(Sl(b));if(!M.id)continue;m??(m=M),d.push(M.id),u.push(M)}const h=W(c.behavior);if(h.includes("no-nav"))return l;const p=m??void 0,g={id:c.id??`range-${o.size}`,label:c.label,canvasId:(p==null?void 0:p.id)??((S=l[0])==null?void 0:S.canvasId),canvasIds:[...new Set(d)],...h.includes("sequence")?{sequence:true}:{},...kl(c),children:l},v=Rs(p==null?void 0:p.t);return v?g.time=v:!p&&((x=l[0])!=null&&x.time)&&(g.time=l[0].time),p!=null&&p.rect&&(g.region=p.rect),(h.includes("sequence")&&u.length>1&&!u.some(b=>b.t)||jp(u,n))&&(g.parts=u.map(b=>({canvasId:b.id,...b.rect?{region:b.rect}:{}}))),[g]},s=W(t.structures).flatMap(r),i=s.length===1&&s[0].children.length?s[0].children:s,a=i.length?i:_a;return ba.set(t,a),a}function jp(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 sb(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 m=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 p={id:l.id,depth:d,...l.sequence?{sequence:true}:{}};i(r,l,d)&&(r=p),m&&i(s,l,d)&&(s=p)}l.children.forEach(h=>a(h,d+1,m))};t.forEach(l=>a(l,0,false));const c=s??r;return c?c.id:null}function Vp(){const t=nt(n=>n.status),e=nt(n=>n.error);return bt(()=>({status:t,error:e}),[t,e])}function qp(){return nt(t=>t.manifest)}function $s(){return nt(t=>Rt(t.manifest))}function Fs(){return nt(t=>Ue(t.manifest,t.canvasId))}function Kp(){return nt(t=>qe(t.manifest,t.canvasId))}function Zp(){const{clover:t}=ue("useNavigation"),e=nt(o=>gn(o.manifest,o.canvasId)),n=nt(o=>Rt(o.manifest).views.length);return bt(()=>Bf(t,e,n),[t,e,n])}function Gp(){return nt(t=>jc(t.manifest,t.addedSets))}function ib(t){const{language:e}=ue("useLocalized");return bt(()=>xt(t,e),[t,e])}function ab(){return Tt().t}function cb(){return Tt().langOf}const Xp=({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:m,...h})=>{const p=ue("Canvas"),{clover:g}=p,v=oe(g.captions.subscribe,g.captions.get,g.captions.get),y=s??v,S=d??p.language,x=Fs(),b=nt(R=>Kd(R.manifest,R.canvasId)),{direction:M}=$s(),w=qp(),B=Kp(),O=nt(R=>{var at;return R.status==="loading"?"loading":((at=R.manifest)==null?void 0:at.id)??""}),V=nt(R=>R.target),X=nt(R=>Vc(R.manifest,R.addedSets,R.search.set,R.regions)),U=nt(R=>pf(R.manifest,R.addedSets,R.hiddenSets,R.shownSets,!!Is(R.manifest))),tt=nt(R=>ks(R.manifest,R.addedSets,R.hiddenSets,R.shownSets)),ot=nt(R=>R.annotationId),mt=$(ot);mt.current=ot;const[E,k]=z(0);D(()=>g.found.subscribe(R=>{R&&R===mt.current&&k(at=>at+1)}),[g]);const P=oe(g.highlight.subscribe,g.highlight.get,g.highlight.get),j=oe(g.chapter.subscribe,g.chapter.get,g.chapter.get),q=x.map(R=>R.id).join("|"),rt=bt(()=>{if(u)return u;const R=x.map(at=>at.id);return X.flatMap(at=>at.entries.filter(Nt=>R.includes(Nt.canvasId)).map(Nt=>({annotation:Nt.annotation,targetIndex:R.indexOf(Nt.canvasId),pageId:at.id,...at.label?{pageLabel:at.label}:{},...Nt.place?{place:Nt.place}:{},...Nt.layer?{layer:{key:Nt.layer.key,item:Nt.layer.item}}:{}})))},[u,X,x]),gt=V?(R=>!!R&&x.some(at=>at.id===R))(V.canvasId):false,_=$(null);gt&&(_.current=q);const T=a&&_.current!==q,A=$(null),N=$(null),K=bt(()=>x.some(R=>ko(R).length>0),[x]),H=K?x.find(R=>ko(R).length>0):void 0,I=Dp(w,H,S,Wp),F=$(K);F.current=K;const Z=s===void 0?p.language:void 0,it=H==null?void 0:H.id;D(()=>{if(!Z||!H)return;const R=ml(H).find(at=>at.language&&gs(at.language,Z));R&&g.captions.get()!==R.id&&g.captions.emit(R.id)},[Z,it,g]);const Q=ut(()=>{const R=g.store.get().target;!R||!g.store.get().canvasId||Hp(R,A.current,N.current,F.current)&&g.consumeTarget()},[g]),yt=$(q);D(()=>{yt.current!==q&&(yt.current=q,N.current=null),V&&Q()},[V,q,Q]);const ft=$(e);ft.current=e;const Ht=ut(R=>{var at;A.current=R,R.on("change",Q),Q(),(at=ft.current)==null||at.call(ft,R)},[Q]),$t=ut(R=>{var Nt;const at=(Nt=A.current)==null?void 0:Nt.getCanvasRegion();g.viewport.emit(at?{canvasId:at.canvasId,region:{x:at.rect.x,y:at.rect.y,w:at.rect.width,h:at.rect.height}}:null),n==null||n(R)},[g,n]),Gt=ut(R=>{N.current=R,g.media.emit(R),R&&Q(),o==null||o(R)},[g,Q,o]),Ft=ut(()=>{i==null||i(),(De(w,"auto-advance")||De(B,"auto-advance"))&&g.next({autoplay:true,wrap:De(w,"repeat")})},[g,w,B,i]),ht=ut(R=>void zp(g,R),[g]),zt=(t==null?void 0:t.request)??g.request,Y=De(B,"auto-advance")||De(w,"auto-advance"),lt=De(B,"repeat")||De(w,"repeat"),kt=bt(()=>({...t,request:zt,animation:(t==null?void 0:t.animation)??{autoplay:Y,loop:lt}}),[t,zt,Y,lt]);return!x.length&&O!=="loading"?null:f(Np,{...h,manifestId:O,navPlace:w==null?void 0:w.navPlace,canvases:x,ahead:b,viewingDirection:M,language:S,label:c??(B==null?void 0:B.label)??(w==null?void 0:w.label),partOf:l??(w==null?void 0:w.label),options:kt,placeholder:T,onReady:Ht,onViewportChange:$t,onMediaElement:Gt,caption:y,onCaptionChange:R=>{g.captions.emit((R==null?void 0:R.id)??null),r==null||r(R)},onEnded:Ft,annotations:rt,hiddenPages:tt,unlistedPages:U,onPageVisibilityChange:(R,at)=>R.forEach(Nt=>g.setSetVisible(Nt,at)),chapters:m??I,highlightedChapter:j,onChapterHighlight:R=>g.chapter.emit(R),selectedAnnotation:ot,refind:E,highlightedAnnotation:P,onAnnotationSelect:R=>g.selectAnnotation(R),onAnnotationLink:h.onAnnotationLink??ht,onAnnotationActive:R=>{var at;g.highlight.emit(R),(at=h.onAnnotationActive)==null||at.call(h,R)}})},Yp=6,on=new Set;function Jp(t){if(on.has(t))return true;for(;on.size>=Yp;){let e;for(const n of on)n.hiddenSince!==null&&(!e||n.hiddenSince<e.hiddenSince)&&(e=n);if(!e)return false;on.delete(e),e.release()}return on.add(t),true}function wa(t){on.delete(t)}function Qp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement?t.complete&&t.naturalWidth>0:true}function tm(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 em=`#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
|
+
`,nm=-.5,om=`#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, ${nm.toFixed(1)}) * u_opacity;
|
|
22
|
+
}
|
|
23
|
+
`;class Co{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=rm(n,em,om);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 Co(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||!Qp(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=tm(e,this.pixelRatio),i=me(e.transform,ce(r.x,r.y),pe(r.width+s.x,r.height+s.y));return n.uniformMatrix3fv(this.uniforms.matrix,false,gp(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),sm(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 rm(t,e,n){const o=xa(t,t.VERTEX_SHADER,e),r=xa(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 xa(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 sm(t){return typeof t=="object"&&t!==null&&t.name==="SecurityError"}function Cl(t,e){return me(ce(e.width/2,e.height/2),jn(t.rotation),pe(t.zoom),ce(-t.x,-t.y))}function El(t,e){return me(ce(t.x,t.y),pe(1/t.zoom),jn(-t.rotation),ce(-e.width/2,-e.height/2))}function Sa(t,e,n){return we(El(t,e),n)}function im(t,e,n){return we(Cl(t,e),n)}function Yr(t,e){return Do(El(t,e),{x:0,y:0,width:e.width,height:e.height})}function am(t,e,n=0,o=0){const r=Do(jn(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=_l(t);return{x:c.x,y:c.y,zoom:a,rotation:n}}function Eo(t,e,n,o,r){const s=we(me(pe(1/n),jn(-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 ka(t,e){return t.x===e.x&&t.y===e.y&&t.zoom===e.zoom&&t.rotation===e.rotation}const cm=.09,lm=1e-4,Ca=.05,um=1e-4;class dm{constructor(e,n=cm,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=Eo(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>Ca&&(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 m=this.spring.stiffness;s=this.start,i=(1-Math.exp(-m*u))/(1-Math.exp(-m))}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?Eo(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))<lm&&Math.abs(r.rotation-c)<um&&Math.hypot(r.x-l.x,r.y-l.y)*a<Ca?(this.current={...r},this.target=null,false):true}}const Ml=5,Ea=300,fm=Ml*4;function Ma(t,e=false){return t==="touch"||t==="pen"&&!e}function hm(t){return t.pointerType==="pen"&&t.buttons===0}function pm(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 Ta(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 Jr={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true,flickEnabled:true,flickMinSpeed:200,flickMomentum:.25},Sr=2,Ia=1.5,La=.1,mm=100,gm=.002,vm=.01;class ym{constructor(e,n,o=Jr){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||Ta(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;hm(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)>Ml&&(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-mm;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,m,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[p]=this.pointers.values();this.samples=[{...p,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<Ea){if((u=(d=this.target).dismiss)!=null&&u.call(d)){this.lastTap=null;return}if(Ma(e2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&e2.timeStamp-p.t<Ea&&Math.hypot(o2.x-p.x,o2.y-p.y)<fm?(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/Sr,o2,true):this.zoomIn(o2):(h=(m=this.target).tap)==null||h.call(m,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 p=(i.x-s.x)/a*1e3,g=(i.y-s.y)/a*1e3,v=this.options.flickMomentum;v>0&&Math.hypot(p,g)>this.options.flickMinSpeed&&this.target.panBy(p*v,g*v,true)}});L(this,"onDoubleClick",e2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||Ma(this.lastPointerType,this.penHovers)||Ta(e2.target,this.element)||(e2.shiftKey?this.target.zoomBy(1/Sr,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&&pm(e2.target,this.element,e2.deltaY))return;e2.preventDefault();const o2=bm(e2),r=n2?vm:gm;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(Ia,void 0,true);break;case"-":case"_":this.target.zoomBy(1/Ia,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(Sr,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 bm(t){return t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY}class Tl extends Error{constructor(e,n,o){super(e),this.url=n,this.status=o,this.name="ImageLoadError"}}const Pa=new Set;async function _m(t,e={}){const{signal:n,maxTextureSize:o,request:r}=e,s=yf(r),i=xm(t);if(typeof createImageBitmap!="function"||typeof fetch!="function")return kr(t,{signal:n,cors:true,withCredentials:s});if(i&&Pa.has(i))return kr(t,{signal:n,cors:false,withCredentials:s});let a;try{a=await Es(r,t,{mode:"cors",signal:n})}catch(m){if(Sm(m,n))throw m;const h=await kr(t,{signal:n,cors:false,withCredentials:s});return i&&Pa.add(i),h}if(!a.ok)throw Ms(a),new Tl(`Image request failed with ${a.status}`,t,a.status);const c=await a.blob();let l=await wm(c);const d=l.width,u=l.height;if(o&&(l.width>o||l.height>o)){const m=o/Math.max(l.width,l.height),h=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*m)),resizeHeight:Math.max(1,Math.floor(l.height*m)),resizeQuality:"high"});l.close(),l=h}if(n!=null&&n.aborted)throw l.close(),Qr();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:d,naturalHeight:u,opaque:false}}async function wm(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 kr(t,{signal:e,cors:n,withCredentials:o}){return new Promise((r,s)=>{if(e!=null&&e.aborted){s(Qr());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(Qr())};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 Tl("Image failed to load",t))},i.src=t})}function xm(t){var e;try{return new URL(t,(e=globalThis.location)==null?void 0:e.href).origin}catch{return null}}function Sm(t,e){return!!(e!=null&&e.aborted)||typeof t=="object"&&t!==null&&t.name==="AbortError"}function Qr(){const t=new Error("Aborted");return t.name="AbortError",t}function Aa(t){t.kind==="bitmap"&&t.source.close()}const km=192*1024*1024,Cm=16,Em=2;class Mm{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??km,this.maxInFlight=e.maxInFlight??Cm}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:Cr(n),lastUsed:this.frame,attempts:0,pinned:false,waiters:(o==null?void 0:o.waiters)??[]}),this.bytes+=Cr(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){Aa(s);return}e.state="ready",e.image=s,e.bytes=Cr(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<Em&&!Tm(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&&Aa(o.image),this.options.onEvict(o.url)}}}function Cr(t){return t.width*t.height*4}function Tm(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 Im=.1;class Lm{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,Im):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 Pm=2*1024*1024;function Am(t,e,n=Pm){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 Om(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 Nm(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(p=>!Number.isFinite(p)))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),m=Math.min(e,i+c),h=Math.min(n,a+l);return m<=d||h<=u?null:{x:d,y:u,width:m-d,height:h-u}}const Er=512,Rm=1024,Bm=16e6;function Il(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 $m(t,e=Rm){const{width:n,height:o}=t,r=[],s=t.regionByPx&&t.sizeByW,i=(h,p,g)=>{const v=Math.ceil(n/h),y=Math.ceil(o/h);return{scaleFactor:h,width:v,height:y,tileWidth:p,tileHeight:g,cols:Math.ceil(v/p),rows:Math.ceil(y/g)}},a=(h,p)=>({scaleFactor:n/h,width:h,height:p,tileWidth:h,tileHeight:p,cols:1,rows:1,whole:true}),c=t.tiles[0];if(c){const{width:h,height:p}=s?Fm(t,c,e):c;for(const g of c.scaleFactors)r.push(i(g,h,p))}else if(s){let h=Math.max(Er,e);for(;h>Er&&!ts(t,h,h);)h/=2;for(let p=1;;p*=2){const g=i(p,h,h);if(r.push(g),g.cols===1&&g.rows===1)break}}const l=Math.max(0,...r.map(h=>h.scaleFactor));for(const h of t.sizes){const p=n/h.width;ts(t,h.width,h.height)&&p>l+1e-9&&r.push(a(h.width,h.height))}const d=r.reduce((h,p)=>!h||p.scaleFactor>h.scaleFactor?p:h,null);if(d&&d.cols*d.rows>1&&t.sizeByW){const h=Math.max(n,o)/Er;r.push(a(Math.ceil(n/h),Math.ceil(o/h)))}(!r.length||!c&&!s&&n*o<=Bm)&&(r.some(h=>h.scaleFactor===1)||r.push(a(n,o)));const u=Dm(r).sort((h,p)=>p.scaleFactor-h.scaleFactor),m=$h(t);return{width:n,height:o,levels:u,tile(h){const p=u[h.level],g=p.scaleFactor,v=p.cols===1&&p.rows===1;let y,S,x;if(v)y={x:0,y:0,width:n,height:o},S=p.width,x=p.height;else{const b=Math.round(h.col*p.tileWidth*g),M=Math.round(h.row*p.tileHeight*g);y={x:b,y:M,width:Math.min(Math.round(p.tileWidth*g),n-b),height:Math.min(Math.round(p.tileHeight*g),o-M)},S=Math.ceil(y.width/g),x=Math.ceil(y.height/g)}return{...h,region:y,url:xo(t,y,S,x),fallbackUrl:m?xo(t,y,S,x,m):void 0}}}}function Fm(t,e,n){let o=Math.max(1,Math.floor(n/Math.max(e.width,e.height)));for(;o>1&&!ts(t,e.width*o,e.height*o);)o--;return{width:e.width*o,height:e.height*o}}function ts(t,e,n){return!(t.maxWidth&&e>t.maxWidth||t.maxHeight&&n>t.maxHeight||t.maxArea&&e*n>t.maxArea)}function Dm(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 Hm(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 be(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)),m=Math.max(0,Math.floor(a/s)),h=Math.min(o.rows-1,Math.floor((l-1e-9)/s)),p=[];for(let g=m;g<=h;g++)for(let v=d;v<=u;v++)p.push({level:e,col:v,row:g});return p}async function Oa(t,e){if(t.media)return Wm(t,t.media);let n=null,o=null;if(t.service)try{n=$m(await Ns(t.service,e.infoOptions))}catch(m){o=m}if(!n){if(!t.url)throw o??new Error("Image has no source");const m=await e.loadStatic(t.url);e.cache.seed(t.url,m),n=Il(t.url,m.naturalWidth,m.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=Nm(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=Om(t.rotation),d=l?Um(c,l):void 0;return{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}:{}}}function zm(t,e){if(t.media)return Promise.resolve();const{pyramid:n,clip:o}=t;return e.prefetch(be(n,0,o).map(r=>{const s=n.tile(r);return{url:s.url,fallbackUrl:s.fallbackUrl}}))}const Ll="media:";function Wm(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=`${Ll}${t.id}`,s={width:n,height:o},i={x:0,y:0,width:n,height:o};return{id:t.id,spec:t,pyramid:Il(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 Um(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=me(ce(a/2,c/2),{a:s,b:i,c:-i,d:s,e:0,f:0},pe(n?-1:1,1),ce(-(t.x+t.width/2),-(t.y+t.height/2)));return{orient:l,unorient:mp(l),width:a,height:c}}function Pl(t){var e;return((e=t.turn)==null?void 0:e.orient)??ce(-t.clip.x,-t.clip.y)}function jm(t,e){const{turn:n,clip:o}=t;if(!n)return{...e,x:o.x+e.x,y:o.y+e.y};const r=Do(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 Vm(t,e){const{turn:n,clip:o}=t;return n?we(n.unorient,e):{x:o.x+e.x,y:o.y+e.y}}function Na(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 Ra(t){if(!t.length)return null;if(t.every(o=>o.spec.placement)){for(const o of t)o.rect={...o.spec.placement};return an(t.map(o=>o.rect))}const e=Na(t[0]).height;let n=0;for(const o of t){const r=Na(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 Ho(t){const e=t.turn??t.clip;return{x:t.rect.width/e.width,y:t.rect.height/e.height}}function qm(t){const e=Ho(t);return me(ce(t.rect.x,t.rect.y),pe(e.x,e.y),Pl(t))}function Km(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 Zm=5e6,Al=1e7,Gm=15e6,Xm=2e7,Ba=2;function $a(t){const{items:e,camera:n,viewport:o,pixelRatio:r,getTile:s,destination:i}=t,a=t.has??(h=>s(h)!==void 0),c=Cl(n,o),l=[],d=[],u=[],m=(h,p,g)=>{const v=h.tile(p);d.push({url:v.url,fallbackUrl:v.fallbackUrl,priority:g})};for(const h of e){const{pyramid:p,clip:g,rect:v}=h,y=Ho(h);if(t.wantOverview)for(const E of be(p,0,g))m(p,E,Xm);const S=Fa(h,n,o,r),x=i?Fa(h,i,o,r):S;if(u.push((S==null?void 0:S.target)??-1),!S&&!x)continue;const b=E=>k=>{const P=p.tile(k).region;return Math.hypot(P.x+P.width/2-E.x,P.y+P.height/2-E.y)};if(x){const E=b(x.center);for(const k of be(p,0,x.area))m(p,k,E(k)/1e3);if(x.target>0)for(const k of be(p,x.target,x.area))m(p,k,Al+E(k))}if(!S)continue;const{area:M,target:w}=S,B=b(S.center),O=be(p,0,M),V=w===0?[]:be(p,w,M);if(x!==S){for(const k of O)m(p,k,B(k)/1e3);const E=w-Ba;if(E>0)for(const k of be(p,E,M))m(p,k,Gm+B(k))}const X=w-Ba;if(x===S&&X>0){const E=new Set;for(const k of V){const P=p.tile(k);if(!a(P.url))for(const j of be(p,X,P.region)){const q=`${j.col},${j.row}`;E.has(q)||(E.add(q),m(p,j,Zm+B(j)))}}}if(h.spec.hidden)continue;const ot=(w===0?O:V).every(E=>s(p.tile(E).url)!==void 0)?[w]:Array.from({length:w+1},(E,k)=>k),mt=me(c,ce(v.x,v.y),pe(y.x,y.y),Pl(h));for(const E of ot){const k=E===0?O:E===w?V:be(p,E,M),P=p.levels[E].cols*p.levels[E].rows>1;for(const j of k){const q=p.tile(j),rt=s(q.url);if(!rt)continue;const st=Ym(h,q.region,rt,mt,P);st&&l.push({...st,url:q.url})}}}return d.sort((h,p)=>h.priority-p.priority),{draws:l,wants:Jm(d),levels:u}}function Fa(t,e,n,o){const{pyramid:r,rect:s}=t,i=Yr(e,n);if(!yp(i,s))return null;const a=Ho(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),m=1/(a.x*e.zoom*o);return{area:jm(t,{x:(c-s.x)/a.x,y:(l-s.y)/a.y,width:(d-c)/a.x,height:(u-l)/a.y}),center:Vm(t,{x:(e.x-s.x)/a.x,y:(e.y-s.y)/a.y}),target:Hm(r,m)}}function Ym(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,m=1e-6;return{item:t,image:n,transform:me(o,ce(e.x,e.y),pe(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-m,bottom:r&&l<s.y+s.height-m}}}function Jm(t){const e=new Set;return t.filter(n=>e.has(n.url)?false:(e.add(n.url),true))}const Qm={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:16,releaseAfterMs:2e3},tg=2,eg=3,ng=.1,Mr=1e-6,Da=1e8,og=6,es={top:0,right:0,bottom:0,left:0};function Ha(t,e="padding"){if(!t||typeof getComputedStyle!="function")return es;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 rg=(t,e)=>t.top===e.top&&t.right===e.right&&t.bottom===e.bottom&&t.left===e.left;let sg;class ig{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",es);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,"landing",[]);L(this,"ahead",null);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=Am(this.getTile,d=>r2?r2.has(d):true),i=$a({items:this.items,camera:o2,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:s.getTile,has:this.hasTile,wantOverview:!!this.navigator,destination:n2?this.camera.destination:void 0}),a=(this.landing.length?[...this.landing,...i.wants]:i.wants).filter(d=>!d.url.startsWith(Ll));if(this.cache.update(a),this.ahead&&!n2&&!this.cache.pending){const d=this.ahead;this.ahead=null,this.readAhead(d)}return 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,Yr(o2,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!ka(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,"hasTile",e2=>this.mediaByKey.has(e2)||this.cache.has(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={...Qm,...Tr(n)},Wa()&&(this.options.animationTime=0,this.options.animationDuration!==void 0&&(this.options.animationDuration=0));const{animationDuration:o,springStiffness:r}=this.options;this.camera=new dm({x:0,y:0,zoom:1,rotation:0},this.options.animationTime,o===void 0?void 0:{duration:o,stiffness:r}),this.loop=new Lm(this.tick),this.gestureOptions=Tr(n.gestures??{}),Wa()&&(this.gestureOptions.flickMomentum=0),this.gestures=new ym(e,this,{...Jr,...this.gestureOptions}),this.cache=new Mm({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=ag(e),this.visible?this.acquireBackend():this.holder.hiddenSince=za(),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=()=>r!==this.generation||this.disposed,i=new Map(this.items.map(v=>[v.id,v]));this.landing=[],this.ahead=null;const a=this.prepareContext(),c=[],l=e.map(v=>{const y=i.get(v.id);if(y&&Km(y.spec,v))return y.spec=v,{item:Promise.resolve(y),ready:Promise.resolve()};let S,x,b;const M=new Promise((B,O)=>{S=B,x=O}),w=new Promise(B=>b=B);return c.push(()=>Oa(v,a).then(B=>(S(B),zm(B,this.cache)),x).then(b,b)),{item:M,ready:w}}),d=()=>{var v;return(v=c.shift())==null?void 0:v().then(d)};for(let v=0;v<og;v++)d();const u=e.flatMap(v=>v.placement?[v.placement]:[]);let m=false;if(!this.items.length&&e.length>1&&u.length===e.length){const v=an(n?[n,...u]:u),y=[];l.forEach(({item:S,ready:x},b)=>{Promise.all([S,x]).then(([M])=>{s()||(y[b]=M,this.place(y.filter(Boolean),v,o,!m,false),m=true)},()=>{})})}const h=await Promise.allSettled(l.map(({item:v})=>v));if(s()||(this.landing=this.landingWants(h.flatMap(v=>v.status==="fulfilled"?[v.value]:[]),n,o||!this.opened),this.invalidate(),await Promise.all(l.map(({ready:v})=>v)),s()))return;this.landing=[];const p=h.filter(v=>v.status==="fulfilled").map(v=>v.value),g=h.filter(v=>v.status==="rejected").map(v=>v.reason);g.length&&this.emit("error",g),this.setUnloadable(e.length>0&&!p.length&&g.length>0),this.place(p,n,o,!m,true)}place(e,n,o,r,s){this.items=e,this.watchMedia(e);const i=Ra(e);this.worldBounds=n?i?an([n,i]):n:i,this.contentVersion++,this.worldBounds&&(this.opened?r?(o?this.home(true):this.camera.set(this.constrain(this.camera.current)),this.emit("change")):s&&this.emit("change"):(this.opened=true,this.home(true),this.emit("open"))),this.invalidate()}prefetch(e,{world:n}={}){const o=e.filter(r=>!r.media);this.ahead=o.length?{images:o,world:n}:null,this.ahead&&this.invalidate()}async readAhead({images:e,world:n}){const o=this.generation,r=this.prepareContext(),s=(await Promise.allSettled(e.map(a=>Oa(a,r)))).flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(!s.length||o!==this.generation||this.disposed)return;const i=this.landingWants(s,n,true).filter(a=>a.priority<Al-Da);await this.cache.prefetch(i)}prepareContext(){return{cache:this.cache,loadStatic:e=>this.loadTile(e),infoOptions:{request:this.options.request}}}clear(){this.setUnloadable(false),this.generation++,this.landing=[],this.ahead=null,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=es){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=am(e,{width:Math.max(1,c-i-r),height:Math.max(1,l-o-s)},n),u=Math.min(d.zoom,a);return{...Eo(_l(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*ng;this.fitBounds({x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2},n,Ha((s=this.overlays)==null?void 0:s.container,"scroll-padding"))}getBounds(){return Yr(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(e=this.items){const n=e.length?Math.min(...e.map(o=>Ho(o).x)):1;return this.options.maxZoomPixelRatio/n}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-Mr)}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-Mr),atMin:e<=s*(1+Mr),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=Sa(r,this.viewport,s),{min:a,max:c}=this.getZoomLimits(),l=Mn(r.zoom*e,a,c),d=Eo(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=we(me(pe(1/r.zoom),jn(-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({...Jr,...this.gestureOptions,...Tr(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);ka(n,o)||this.animateTo(o,false)}worldToScreenPoint(e){return im(this.camera.current,this.viewport,e)}screenToWorldPoint(e){return Sa(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 Do(me(qm(o),pe(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-Dh-a5-GN.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)}landingWants(e,n,o){const r=e.map(l=>({...l,rect:{...l.rect}})),s=Ra(r),i=n?s?an([n,s]):n:s;if(!i)return[];const a=o?this.homeCamera(i,r):this.camera.destination;if(!a)return[];const{wants:c}=$a({items:r,camera:a,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:l=>this.cache.get(l)});return c.map(l=>({...l,priority:l.priority-Da}))}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-kMBbOAxJ.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 _m(e,{signal:n,request:this.options.request,maxTextureSize:this.backend instanceof Co?this.backend.maxTextureSize:void 0})}animateTo(e,n){this.camera.animateTo({state:e},this.viewport,n),this.invalidate()}homeCamera(e=this.worldBounds,n=this.items){if(!e)return null;const o=2*Math.PI,r=Math.round(this.camera.destination.rotation/o)*o||0;return this.fit(e,r,this.inset,this.options.upscale?1/0:this.closestZoom(n))}constrain(e,{allowBeyondLimits:n=false}={}){const o=this.worldBounds;if(!o)return e;const{min:r,max:s}=this.getZoomLimits(),i=n?Mn(e.zoom,r,Math.max(s,e.zoom)):Mn(e.zoom,r,s);return this.interacting&&!this.options.constrainDuringPan?{...e,zoom:i}:{...e,zoom:i,x:Mn(e.x,o.x,o.x+o.width),y:Mn(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<eg);let r=null;o&&(Jp(this.holder)||this.backendPreference==="webgl2")&&(r=Co.create(n,{onLost:this.onContextLost}),r||wa(this.holder)),r?this.install(r):this.backendPreference==="webgl2"?this.none(n):(this.pending=n,(sg??(sg=import("./Canvas2DBackend-DuUL7Wn0.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(wa(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=za()),!(!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=Ha(this.host),i=Math.min(typeof window<"u"&&window.devicePixelRatio||1,tg);if(o===this.viewport.width&&r===this.viewport.height&&i===this.pixelRatio&&rg(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 za=()=>typeof performance<"u"?performance.now():Date.now();function ag(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 Wa(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Tr(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}const cg=(t,e)=>new ig(t,e),lg=_t(()=>import("./Connected-CEfEDzWJ.mjs")),ug=_t(()=>import("./Connected-DSMZIn9R.mjs").then(t=>t.C));function dg({className:t,style:e,renderers:n,collapseControls:o,onContentStateChange:r,children:s,...i}){var p;const a=ue("Body");ol(a.clover,r);const c=Fs(),l=bt(()=>Df(c),[c]),d=Hf(n??a.renderers,{canvases:c,bodies:l}),u=d==null?void 0:d.component,m=((p=c.find(({type:g})=>g==="Scene"||g==="Timeline"))==null?void 0:p.type)??"Canvas",h=nt(g=>g.status==="loading");return f("div",{"aria-busy":h,className:Mt("clover-body",t),"data-renderer":u?"custom":m.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...e},children:[u?f(u,{canvases:c,bodies:l,children:s}):m==="Scene"?f(Ct,{fallback:f(An,{overlay:true}),children:f(ug,{...i,children:s})}):m==="Timeline"?f(Ct,{fallback:f(An,{overlay:true}),children:f(lg,{...i,children:s})}):f(Xp,{...i,collapseControls:o,surface:cg,children:s}),h&&f(An,{overlay:true})]})}const fg={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function Vn(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 fg[n.toLowerCase()]??e})}const hg=t=>/<[a-z!/]|&(#x?[0-9a-f]+|[a-z]+);/i.test(t);function pg(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 mg(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 zo=(t,e)=>e==="canvas"?qe(t.manifest,t.canvasId):t.manifest,Ol=ge(null),Ds=()=>Vt(Ol),cn=le(function({of:e="manifest",label:n,as:o="span",keep:r=false,className:s,...i},a){var h;const c=Wn(p=>{var g,v;return e==="canvas"?(g=qe(p.manifest,p.canvasId))==null?void 0:g.label:(v=p.manifest)==null?void 0:v.label},void 0),l=Ds(),d=(h=Re())==null?void 0:h.language,{text:u,lang:m}=xt(n??(l?l.label:c),d);return u?f(o,{ref:a,className:Mt("clover-label",s),...dt(m),...i,children:Vn(u)}):r?f(o,{ref:a,className:Mt("clover-label",s),"data-empty":"",...i,"aria-hidden":"true",children:"\xA0"}):null});function gg(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)))),xo(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 xo(t,i,l.width,l.height)}function ln(t){var e;return(e=Ls(t).find(({body:n})=>n.type==="Image"||n.id&&!n.type))==null?void 0:e.body}function vg(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 xe(t,e="full",n=false){if(!t)return null;const o=$o(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 Hs(t){const e=t;return e?xe(W(e.thumbnail)[0],"full",true)??xe(ln(e))??xe(ln(e.placeholderContainer))??xe(ln(e.accompanyingContainer)):null}function yg(t){const e=t;return e?xe(ln(e))??xe(ln(e.placeholderContainer))??xe(ln(e.accompanyingContainer))??xe(W(e.thumbnail)[0],"full",true):null}async function zs(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 Ns(t.service,{request:n}),s=typeof t.region=="string"?vg(t.region,r):t.region;return s===null?t.fallback:gg(r,e,s)??t.fallback}catch{return t.fallback}}const bg=Object.freeze(Object.defineProperty({__proto__:null,imageSource:xe,resolveThumbnail:zs,stillSource:yg,thumbnailSource:Hs},Symbol.toStringTag,{value:"Module"})),Ua='.clover-items-item[role="option"], .clover-items-link',sn=new Map;let Dt=null,ae=null,ns=0;function Ws(t){const e=sn.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 os(){cancelAnimationFrame(ns),ns=requestAnimationFrame(()=>sn.forEach((t,e)=>Ws(e)))}function Nl(t){var r,s;if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set,n=(s=(r=document.activeElement)==null?void 0:r.closest)==null?void 0:s.call(r,Ua);n&&e.add(n);try{document.querySelectorAll(`:is(${Ua}):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=>al(i,"fullHidden",["pointerenter",i===n?"blur":"focus"])))}function _g(){var t,e;Dt=typeof ResizeObserver>"u"?null:new ResizeObserver(n=>n.forEach(o=>Ws(o.target))),ae=typeof MutationObserver>"u"?null:new MutationObserver(os),ae==null||ae.observe(document.head,{childList:true,subtree:true,characterData:true}),ae==null||ae.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),(e=(t=document.fonts)==null?void 0:t.addEventListener)==null||e.call(t,"loadingdone",os),document.addEventListener("keydown",Nl,true)}function wg(){var t,e,n;cancelAnimationFrame(ns),(t=Dt==null?void 0:Dt.disconnect)==null||t.call(Dt),ae==null||ae.disconnect(),Dt=ae=null,(n=(e=document.fonts)==null?void 0:e.removeEventListener)==null||n.call(e,"loadingdone",os),document.removeEventListener("keydown",Nl,true)}function xg(t,e){var n;return sn.size||_g(),sn.set(t,{change:e}),(n=Dt==null?void 0:Dt.observe)==null||n.call(Dt,t),Ws(t),()=>{var o;sn.delete(t),(o=Dt==null?void 0:Dt.unobserve)==null||o.call(Dt,t),sn.size||wg()}}const Sg=/^(-?\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?)?/;function Rl(t,e){if(typeof t!="string")return null;const n=Sg.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 kg=_t(()=>import("./NavDate-rmVMLVIA.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t})));function Cg(t,e,n,o){const r=t.source!==void 0?t.source:Hs(t.resource),[s,i]=z(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 D(()=>{if(!r)return i(void 0);if(r.src)return i(r.src);if(!o)return;let c=true;return zs(r,e,n).then(l=>{c&&i(l)}),()=>{c=false}},[a,e,o]),{src:s,none:!r}}const Eg=()=>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 Mg({part:t,size:e,request:n,alt:o,altLang:r}){const[s,i]=z(null),a=yl(s,vl,s==null?void 0:s.closest('[data-layout="slider"] .clover-items-viewport')),{src:c,none:l}=Cg(t,e,n,a),[d,u]=z(false),{width:m,height:h}=t.resource??{},p=m&&h?m/h:1;return f("span",{ref:i,className:"clover-items-picture","data-loaded":d,"data-empty":c?void 0:true,style:c&&!(m&&h)?void 0:{"--clover-items-ratio":p},children:[!c&&l&&Un(t.media)&&f(Eg,{}),c&&f("img",{src:c,alt:o,...dt(o?r:void 0),width:e,height:Math.round(e/p),loading:"lazy",decoding:"async",draggable:false,onLoad:()=>u(true),onError:()=>u(true)}),t.duration?f("span",{className:"clover-items-duration",children:Fh(t.duration)}):null]})}function Tg({text:t,lang:e,first:n}){const o=$(null),[r,s]=z(false);return D(()=>{const i=o.current;if(!(!i||!t))return xg(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",...dt(t?e:void 0),children:t}),r&&f("span",{className:"clover-items-label-full",...dt(e),"aria-hidden":"true",hidden:true,children:t})]})}function Ig({item:t,size:e,language:n,request:o,showSummary:r=false,secondary:s="summary",labels:i=true}){var u,m;const a=t.parts.map(h=>xt(t.parts.length===1?t.label:h.label,n)),c=r&&s==="summary"?xt(t.summary,n):null,l=r&&s==="navDate"?Rl(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":(m=(u=t.parts[0])==null?void 0:u.media)==null?void 0:m.toLowerCase(),style:{"--parts":t.parts.length},children:[f("span",{className:"clover-items-pictures",children:t.parts.map((h,p)=>{const g=a[p].text?{text:""}:xt(h.label,n);return f(Mg,{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,p)=>f(Tg,{text:h.text,lang:h.lang,first:p===0},t.parts[p].id)),l&&f(Ct,{fallback:null,children:f(kg,{value:t.navDate,className:"clover-items-date"})}),(c==null?void 0:c.text)&&f("span",{className:"clover-items-summary",...dt(c.lang),children:c.text.replace(/<[^>]*>/g,"")})]})]})}function Lg(t){var e;return(e=Ls(t).find(({body:n})=>n.type))==null?void 0:e.body.type}function Bl(t){const e=Lg(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 ja=new WeakMap;function $l(t){if(!t)return[];let e=ja.get(t);if(!e){const{canvases:n,views:o}=Rt(t);e=o.map(r=>{const s=r.map(i=>Bl(n[i]));return{id:s[0].id,parts:s,label:s.length===1?s[0].label:{none:[s.map(i=>xt(i.label).text).filter(Boolean).join(" \u2013 ")]}}}),ja.set(t,e)}return e}const Va=new WeakMap;function Mo(t){if(!t)return[];let e=Va.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:[Bl(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,...Bn(W(n.homepage)[0])?{hrefLang:Bn(W(n.homepage)[0])}:{}}}),Va.set(t,e)),e}function lb(t){return t?Array.isArray(t)?Mo({items:t}):t.type==="Collection"?Mo(t):$l(t):[]}function Fl(t){const e=Math.max(1,Math.round(t));return e<=6?`h${e}`:null}const Us=(t,e="p")=>Fl(t)??e;function Dl(t,e,n="p"){const o=Fl(t);return o?{as:o,title:{},group:{}}:{as:n,title:{id:e},group:{role:"group","aria-labelledby":e}}}function Pg(t,e,{orientation:n="both",rtl:o=false,upward:r=false,onActivate:s,onMove:i}={}){const[a,c]=z(Math.max(0,e)),l=$([]),d=$(s);d.current=s;const u=$(i);u.current=i,D(()=>{e>=0&&c(e)},[e]);const m=Math.min(a,Math.max(0,t-1)),h=ut(v=>{var y;c(v),(y=l.current[v])==null||y.focus()},[]),p=ut((v,y)=>{var V,X;const S=o?"ArrowLeft":"ArrowRight",x=o?"ArrowRight":"ArrowLeft",b=r?"ArrowUp":"ArrowDown",M=r?"ArrowDown":"ArrowUp",w=n!=="vertical",B=n!=="horizontal";let O=null;if(w&&v.key===S||B&&v.key===b)O=Math.min(t-1,y+1);else if(w&&v.key===x||B&&v.key===M)O=Math.max(0,y-1);else if(v.key==="Home")O=0;else if(v.key==="End")O=t-1;else if(v.key==="Enter"||v.key===" "){(V=d.current)==null||V.call(d,y,v),v.preventDefault();return}O!==null&&(v.preventDefault(),h(O),O!==y&&((X=u.current)==null||X.call(u,O,v)))},[t,n,o,r,h]);return{focused:m,itemProps:v=>({ref:y=>{l.current[v]=y},tabIndex:v===m?0:-1,onKeyDown:y=>p(y,v),onFocus:()=>c(v)})}}const Ag=5,Og=()=>{var t;return typeof window<"u"&&!!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)};function Hl({align:t="start",dragFree:e=false,itemCount:n=0,axis:o="x",upward:r=false}={}){const s=o==="y",[i,a]=z(null),[c,l]=z(false),[d,u]=z(false),m=$(t);m.current=t;const h=e?"none":`${o} mandatory`,p=ut(()=>{if(!i)return;const b=Math.abs(s?i.scrollTop:i.scrollLeft),M=s?i.scrollHeight-i.clientHeight:i.scrollWidth-i.clientWidth;l(r?b<M-1:b>1),u(r?b>1:b<M-1)},[i,s,r]);D(()=>{if(!i)return;const b=i.style;b.overflowX=s?"hidden":"auto",b.overflowY=s?"auto":"hidden",b.scrollSnapType=h,b.setProperty("--clover-track-align",t),b.overscrollBehaviorX=s?"":"contain"},[i,h,t,s]),D(()=>{if(!i)return;let b=0;const M=()=>{cancelAnimationFrame(b),b=requestAnimationFrame(p)};p(),i.addEventListener("scroll",M,{passive:true});const w=typeof ResizeObserver<"u"?new ResizeObserver(M):null;return w==null||w.observe(i),i.firstElementChild&&(w==null||w.observe(i.firstElementChild)),()=>{cancelAnimationFrame(b),i.removeEventListener("scroll",M),w==null||w.disconnect()}},[i,p,n]);const g=ut((b,M=false)=>{if(!i||!b)return;const w=M||Og()?"auto":"smooth";i.scrollBy({[s?"top":"left"]:b,behavior:w})},[i,s]),v=ut((b,{instant:M=false}={})=>{const w=i==null?void 0:i.querySelector(`[data-track-index="${b}"]`);if(!i||!w)return false;const B=i.getBoundingClientRect(),O=w.getBoundingClientRect(),V=getComputedStyle(i).direction==="rtl";return s?(g(m.current==="center"?O.top+O.height/2-(B.top+B.height/2):O.top-B.top,M),true):(g(m.current==="center"?O.left+O.width/2-(B.left+B.width/2):V?O.right-B.right:O.left-B.left,M),true)},[i,g,s]),y=ut(b=>{if(!i)return;const M=s?r:getComputedStyle(i).direction==="rtl",w=s?i.clientHeight:i.clientWidth;g(b*w*.9*(M?-1:1))},[i,g,s,r]),S=ut(()=>y(1),[y]),x=ut(()=>y(-1),[y]);return D(()=>{if(!i)return;let b=null,M=false;const w=X=>{X.pointerType!=="mouse"||X.button!==0||(b={x:s?X.clientY:X.clientX,scroll:s?i.scrollTop:i.scrollLeft},M=false)},B=X=>{var tt;if(!b)return;const U=(s?X.clientY:X.clientX)-b.x;!M&&Math.abs(U)<Ag||(M||(M=true,(tt=i.setPointerCapture)==null||tt.call(i,X.pointerId),i.style.scrollSnapType="none",i.dataset.dragging="true"),s?i.scrollTop=b.scroll-U:i.scrollLeft=b.scroll-U)},O=X=>{var U;b&&(b=null,M&&((U=i.releasePointerCapture)==null||U.call(i,X.pointerId),delete i.dataset.dragging,i.style.scrollSnapType=h))},V=X=>{M&&(M=false,X.preventDefault(),X.stopPropagation())};return i.addEventListener("pointerdown",w),i.addEventListener("pointermove",B),i.addEventListener("pointerup",O),i.addEventListener("pointercancel",O),i.addEventListener("click",V,true),()=>{i.removeEventListener("pointerdown",w),i.removeEventListener("pointermove",B),i.removeEventListener("pointerup",O),i.removeEventListener("pointercancel",O),i.removeEventListener("click",V,true)}},[i,h,s]),{ref:a,canScrollPrev:c,canScrollNext:d,scrollPrev:x,scrollNext:S,scrollToIndex:v,measure:p}}const To=le(function(e,n){return!Re()||e.iiifContent!==void 0||e.items!==void 0?f(Ct,{fallback:null,children:f(Ng,{...e,forwardedRef:n})}):f(Rg,{...e,forwardedRef:n})}),Ng=_t(()=>import("./StandaloneItems-ByJy-Mo8.mjs"));function Rg({of:t="views",...e}){return t==="targets"?f($g,{...e}):t==="annotations"?f(Dg,{...e}):t==="members"?f(zl,{...e}):f(Hg,{...e})}const Bg=_t(()=>import("./TargetItems-DOtPfQtV.mjs"));function $g(t){return nt(n=>{var o;return(((o=n.targets)==null?void 0:o.items.length)??0)>1})?f(Ct,{fallback:null,children:f(Bg,{...t})}):null}const Fg=_t(()=>import("./AnnotationItems-C869mTYV.mjs"));function Dg(t){return nt(n=>!!jc(n.manifest,n.addedSets))?f(Ct,{fallback:null,children:f(Fg,{...t})}):null}function zl({onSelect:t,forwardedRef:e,...n}){const{clover:o,language:r}=Re(),s=nt(d=>d.collection),i=nt(Dc),a=Mo(s),c=_s(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(Ul,{...n,forwardedRef:e,steps:Wl(a,d,c,l),nameKey:"informationPanelTabsCollection",position:f(Wg,{position:d,total:a.length,list:u=>f(zl,{layout:"list",forwardedRef:null,onSelect:u})})})}return f(jl,{...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 Hg({onSelect:t,forwardedRef:e,singleItem:n=false,...o}){const{clover:r,language:s}=Re(),i=nt(u=>u.manifest),a=nt(u=>gn(u.manifest,u.canvasId)),c=nt(u=>Rt(u.manifest).direction),l=$l(i);if(l.length<(n?1:2))return null;const d=u=>r.goTo(u.id);return o.layout==="pager"?f(Ul,{...o,forwardedRef:e,steps:Wl(l,a,c,d)}):f(jl,{...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,m)=>{t==null||t(u,m),r.goTo(u.id)},followFocus:d})}function Wl(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 zg=_t(()=>import("./PagerLayout-COLqXCRw.mjs")),Wg=_t(()=>import("./PagerLayout-COLqXCRw.mjs").then(({CountMenu:t})=>({default:t})));function Ul(t){return f(Ct,{fallback:null,children:f(zg,{...t})})}let Io,Ug;const qa=()=>Ug??(Ug=import("./ItemsVertical-FjomG7wy.mjs").then(()=>Io=true,()=>Io=false));function jl(t){const e=(t.layout??"slider")==="slider"&&t.orientation==="vertical"&&Io===void 0,[,n]=z();return D(()=>{if(!e)return;let o=true;return qa().then(r=>o&&n(r)),()=>{o=false}},[e]),e?(typeof document<"u"&&qa(),null):f(jg,{...t,orientation:Io===false?"horizontal":t.orientation})}function jg({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:m="summary",labels:h=true,heading:p,headingLevel:g=2,renderItem:v,onActivate:y,followFocus:S,as:x="section",className:b,"aria-label":M,size:w,singleItem:B,highContrast:O,...V}){var zt;const{t:X}=Tt(),U=ve(),tt=No(t,V.lang),{langOf:ot}=tt,mt=hs(O),E=i==="slider",k=E&&a==="vertical",P=k&&s,j=o==="id",q=$(null),rt=i==="masonry";D(()=>{const Y=q.current;if(!rt||!Y)return;let lt,kt=true;return import("../masonry-BZCdA3bV.mjs").then(({attachMasonry:R})=>{kt&&(lt=R(Y))}),()=>{kt=false,lt==null||lt()}},[rt]);const st=Hl({align:j?"center":"start",itemCount:e.length,axis:k?"y":"x",upward:P}),gt=$(void 0);D(()=>()=>window.clearTimeout(gt.current),[]);const _=Pg(e.length,n,{orientation:k?"vertical":i==="slider"?"horizontal":i==="list"?"vertical":"both",rtl:r,upward:P,onActivate:(Y,lt)=>y(e[Y],lt),onMove:S?(Y,lt)=>{window.clearTimeout(gt.current);const kt=()=>S(e[Y]);lt.repeat?gt.current=window.setTimeout(kt,150):kt()}:void 0}),T=$(null),A=$(false);A.current=!!((zt=T.current)!=null&&zt.contains(T.current.ownerDocument.activeElement)),D(()=>{var R;const Y=T.current;if(!Y||!A.current)return;const{activeElement:lt,body:kt}=Y.ownerDocument;lt&<!==kt||(R=Y.querySelector(`[data-track-index="${Math.max(0,n)}"]`))==null||R.focus()},[e]);const N=$(false);D(()=>{var kt;if(n<0)return;const Y=!N.current;if(E){st.scrollToIndex(n,{instant:Y})&&(N.current=true);return}N.current=true;const lt=(kt=T.current)==null?void 0:kt.querySelector(`[data-track-index="${n}"]`);lt&&Vg(lt,Y)},[E,n,st.scrollToIndex]);const K=Us(g),H=p?xt(p.label,d):null,I=p?xt(p.summary,d):null,F=M===void 0&&!!(H!=null&&H.text),Z=Fo(X("itemsLabel"),ot("itemsLabel"),M!==void 0||F,tt.hostLanguage),it=F?{"aria-labelledby":`${U}-title`}:M!==void 0?{"aria-label":M}:Z.props,Q=(Y,lt)=>v?v(Y,{selected:lt}):f(Ig,{item:Y,size:c,language:d,request:l,showSummary:u,secondary:m,labels:h}),yt=Y=>!(v||xt(Y.label,d).text||u&&m==="summary"&&xt(Y.summary,d).text),ft=(Y,lt)=>yt(Y)?X("canvasPosition",{index:lt+1,total:e.length}):void 0,Ht=Y=>yt(Y)?ot("canvasPosition"):void 0,$t=E?{display:"flex",flexDirection:P?"column-reverse":k?"column":void 0,margin:0,padding:0,listStyle:"none"}:void 0,Gt=E?{flex:"0 0 auto",scrollSnapAlign:j?"center":"start"}:void 0,Ft=j&&n>=0,ht=Y=>{const lt=n+(Y==="prev"?-1:1),kt=Ft?lt>=0&<<e.length:Y==="prev"?st.canScrollPrev:st.canScrollNext,R=Ft?Y==="prev"?"commonPrevious":"commonNext":Y==="prev"?"itemsScrollBack":"itemsScrollForward",at=X(R),Nt=yn=>{if(!kt)return;if(!Ft)return(Y==="prev"?st.scrollPrev:st.scrollNext)();const Ut=e[lt];S?S(Ut):y(Ut,yn)};return f("button",{type:"button",className:`clover-items-scroll-${Y}`,"aria-controls":Ft?void 0:`${U}-viewport`,...dt(ot(R)),"aria-disabled":!kt||void 0,tabIndex:kt?void 0:-1,onClick:Nt,children:[f("svg",{"aria-hidden":"true",focusable:"false",width:"16",height:"16",viewBox:"0 0 16 16",children:f("path",{d:k?Y==="next"!==P?"M3 6l5 5 5-5":"M3 10l5-5 5 5":Y==="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(zn.Provider,{value:tt.hostLanguage,children:f(x,{ref:tt.ref,className:Mt("clover-items",b),"data-layout":i,"data-orientation":k?"vertical":void 0,"data-upward":P||void 0,"data-navigation":o,...ps(mt),...V,children:[p&&((H==null?void 0:H.text)||(I==null?void 0:I.text))&&f("header",{className:"clover-items-header",children:[(H==null?void 0:H.text)&&f(K,{className:"clover-items-title clover-title",id:`${U}-title`,...dt(H.lang),children:H.text}),(I==null?void 0:I.text)&&f("p",{className:"clover-items-description",...dt(I.lang),children:I.text.replace(/<[^>]*>/g,"")}),p.homepage&&f("a",{className:"clover-items-homepage",href:p.homepage,hrefLang:p.homepageLang,...dt(ot("commonViewAll")),children:X("commonViewAll")})]}),f("div",{className:"clover-items-frame",style:{position:"relative"},dir:r?"rtl":void 0,children:[E&&ht("prev"),f("div",{id:`${U}-viewport`,className:"clover-items-viewport",ref:E?st.ref:q,children:j?f("div",{ref:T,role:"listbox",...it,"aria-orientation":k?"vertical":E?"horizontal":i==="list"?"vertical":void 0,className:"clover-items-track",style:$t,children:e.map((Y,lt)=>{const kt=lt===n;return f("div",{id:`${U}-${lt}`,role:"option","aria-selected":kt,"aria-label":ft(Y,lt),...dt(Ht(Y)),className:"clover-items-item","data-track-index":lt,style:Gt,..._.itemProps(lt),onClick:R=>y(Y,R),children:Q(Y,kt)},Y.id)})}):f("ul",{...it,className:"clover-items-track",style:$t,children:e.map((Y,lt)=>f("li",{className:"clover-items-item","data-track-index":lt,style:Gt,children:f("a",{className:"clover-items-link",href:Y.href,hrefLang:Y.hrefLang,"aria-label":ft(Y,lt),...dt(Ht(Y)),draggable:false,onClick:kt=>y(Y,kt),children:Q(Y,false)})},Y.id))})}),E&&ht("next")]}),Z.node]})})}function Vg(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 qg(t,e){const{clover:n}=ue(e),o=Zp(),{direction:r}=$s(),s=nt(l=>l.collection),i=nt(Dc),a=nt(l=>{var d;return((d=l.targets)==null?void 0:d.items.length)??0}),c=nt(l=>Yd(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=Mo(s),d=l.findIndex(u=>u.id===i);return{position:d,total:l.length,direction:"left-to-right",step:u=>{const m=l[d+u];m&&n.goToManifest(m.id)}}}return{position:o.position,total:o.total,direction:r,step:l=>l<0?o.previous():o.next()}}const Kg=le(function({steps:e,as:n="span",className:o,...r},s){const{t:i,langOf:a}=Tt(),{position:c,total:l}=e;if(l<2||c<0)return null;const d=c+1;return f(n,{ref:s,className:Mt("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,...dt(a("canvasPosition")),children:i("canvasPosition",{index:d,total:l})})]})}),Zg=le(function({of:e="views",...n},o){const r=qg(e,"Position");return f(Kg,{ref:o,...n,steps:r})});function Gg({className:t,loading:e,error:n}){const{t:o,langOf:r}=Tt(),{status:s,error:i}=Vp(),a=s==="loading",c=e!==void 0&&e!==false;return f(St,{children:[f("p",{className:Mt("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(An,{})),a&&!c&&f("span",{style:je,...dt(r("statusLoading")),children:o("statusLoading")})]}),s==="error"&&i&&f("div",{className:Mt("clover-status",t),"data-status":s,role:"alert",children:n?n(i):f(St,{children:[f("p",{...dt(r("statusError")),children:o("statusError")}),f("p",{className:"clover-status-detail",lang:"en",children:i.message})]})})]})}function Xg(t,e=false,n=3){const o=e||hg(t),r=e?`${n}
|
|
28
|
+
${t}`:t,[s,i]=z(null);return D(()=>{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,m=c(u,{markdown:!!d});a&&i({for:r,html:m,inner:l(m)})}),()=>{a=false}},[t,r,o,e,n]),o&&(s==null?void 0:s.for)===r?s:null}const Yg=new Set(["p","span","h1","h2","h3","h4","h5","h6","a","b","i","em","strong","small","sub","sup","label"]),Vl=le(function({as:e="span",markup:n,language:o,format:r,headingLevel:s,...i},a){const{text:c,lang:l}=xt(n,o),d=dt(l),u=pg(r,c),m=u==="markdown",h=Xg(u==="plain"?"":c,m,s),p=(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((v,y)=>f(he.Fragment,{children:[y>0&&f("br",{}),v]},y))});const g=typeof e=="string"&&Yg.has(e)&&p&&/<(p|ul|ol|div)[\s>]/i.test(p)?"div":e;return h?f(g,{ref:a,...i,...d,dangerouslySetInnerHTML:{__html:h.inner}}):f(e,{ref:a,...i,...d,children:m?mg(c):Vn(c)})}),ql=({metadata:t,language:e,renderValue:n,...o})=>t!=null&&t.length?f("dl",{...o,children:t.map((r,s)=>{const i=xt(r.label,e),a=n==null?void 0:n(r);return f("div",{"data-label":xt(r.label,"none").text.replace(/\s+/g,"-").toLowerCase(),children:[f("dt",{...dt(i.lang),children:i.text}),a!==void 0?f("dd",{children:a}):f(Vl,{as:"dd",markup:r.value,language:e})]},s)})}):null,Jg=typeof window>"u"?D:Bt;function Qg({children:t}){const{t:e}=Tt(),n=No(),o=$(null),r=ve(),s=he.Children.only(t),i=s.props.id??r,{open:a,cut:c,toggle:l}=tv(o);return f("div",{className:"clover-read-more",children:[he.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,...dt(n.langOf(a?"readLess":"readMore")),children:e(a?"readLess":"readMore")})]})}function tv(t){const[e,n]=z(false),[o,r]=z(false),s=()=>{const i=t.current;i&&!e&&r(i.scrollHeight>i.clientHeight+1)};return Jg(s),D(()=>{var u,m;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"]}),(m=(u=document.fonts)==null?void 0:u.addEventListener)==null||m.call(u,"loadingdone",c),()=>{var h,p;cancelAnimationFrame(a),l==null||l.disconnect(),d==null||d.disconnect(),(p=(h=document.fonts)==null?void 0:h.removeEventListener)==null||p.call(h,"loadingdone",c)}},[e,t.current]),{open:e,cut:o,toggle:()=>n(i=>!i)}}function vn(t,e,n){const o=Ds(),r=Wn(s=>{var i;return(i=zo(s,t))==null?void 0:i[e]},void 0);return n!==void 0?n:o?o[e]:r}const qn=()=>{var t;return(t=Re())==null?void 0:t.language};function Ka({of:t="manifest",as:e="p",value:n,className:o,...r}){const s=vn(t,"summary",n),i=qn();return xt(s,i).text?f(Qg,{children:f(Vl,{as:e,markup:s,language:i,className:Mt("clover-summary",o),...r})}):null}function ev({of:t="manifest",value:e,className:n,renderValue:o,...r}){const s=vn(t,"metadata",e),i=qn();return f(ql,{metadata:s,language:i,renderValue:o,className:Mt("clover-metadata",n),...r})}function nv({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"requiredStatement",e),s=qn();return f(ql,{metadata:r?[r]:null,language:s,className:Mt("clover-required-statement",n),...o})}function ov({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"rights",e);return r?f("a",{href:r,className:Mt("clover-rights",n),...o,children:r}):null}function rv({of:t="manifest",value:e,className:n,...o}){const r=vn(t,"id",e);return r?f("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:Mt("clover-id",n),...o,children:r}):null}function Kl({property:t,className:e,of:n="manifest",value:o,...r}){const s=W(vn(n,t,o)),i=qn(),a=s.filter(c=>c==null?void 0:c.id);return a.length?f("ul",{className:e,...r,children:a.map(c=>{const l=xt(c.label,i);return f("li",{children:[f("a",{href:c.id,target:"_blank",rel:"noopener noreferrer",hrefLang:Bn(c),...dt(l.text?l.lang:void 0),children:l.text?Vn(l.text):c.id}),c.format&&f("span",{className:"clover-link-format",children:[" (",c.format,")"]})]},c.id)})}):null}const sv=({className:t,...e})=>f(Kl,{property:"homepage",className:Mt("clover-homepage",t),...e}),iv=({className:t,...e})=>f(Kl,{property:"seeAlso",className:Mt("clover-see-also",t),...e});function av({of:t="manifest",value:e,size:n=400,className:o,...r}){var p;const s=Wn(g=>zo(g,t),null),i=e??s,a=qn(),c=i?Hs(i):null,l=(c==null?void 0:c.src)??(c==null?void 0:c.service)??(c==null?void 0:c.fallback),[d,u]=z(c==null?void 0:c.src),m=(p=Re())==null?void 0:p.clover.request;if(D(()=>{if(!c)return u(void 0);if(c.src)return u(c.src);let g=true;return zs(c,n,m).then(v=>g&&u(v)),()=>{g=false}},[l,n]),!d)return null;const h=xt(i==null?void 0:i.label,a);return f("img",{src:d,alt:Vn(h.text),...dt(r.alt===void 0&&h.text?h.lang:void 0),width:n,loading:"lazy",decoding:"async",className:Mt("clover-thumbnail",o),...r})}const cv=typeof window>"u"?D:Bt,Zl=ge(null),lv=t=>{var e;return!!((e=t.textContent)!=null&&e.trim())||t.querySelector("img, svg, picture, video, canvas, object")!==null},uv=t=>!!t&&typeof t=="object"&&["label","logo","homepage"].some(e=>W(t[e]).length>0),rs=t=>!!t&&typeof t.id=="string",dv=t=>{const e=W(t.homepage).find(rs);return e?{id:e.id,hrefLang:Bn(e)}:void 0},fv=(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=xt(o,e);if(r.text)return{text:Vn(r.text),lang:r.lang}}return null};function Gl({of:t="manifest",value:e,link:n=true,children:o,className:r,...s}){var l;const i=Wn(d=>{var u;return(u=zo(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(uv);return c.length?f("ul",{className:Mt("clover-provider",r),...s,children:c.map((d,u)=>{const m=n?dv(d):void 0,h=!!xt(d.label,a).text;return f(hv,{agent:d,homepage:m,children:o??f(St,{children:[f(Xl,{alt:h?"":void 0}),f(cn,{className:"clover-provider-label"})]})},d.id??u)})}):null}function hv({agent:t,homepage:e,children:n}){const o=$(null),[r,s]=z(null),i=ut(()=>{o.current&&!lv(o.current)&&s(t)},[t]);return r===t?null:f("li",{className:"clover-provider-agent",children:f(Ol.Provider,{value:t,children:f(Zl.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 Xl({of:t="manifest",value:e,alt:n,className:o,...r}){var m;const{t:s,langOf:i}=Tt(),a=Ds(),c=Wn(h=>{var p;return(p=zo(h,t))==null?void 0:p.provider},void 0),l=(m=Re())==null?void 0:m.language,u=(e!==void 0?W(e):a?[a]:W(c)).flatMap(h=>{if(!h||typeof h!="object")return[];const p=h;if(p.type!=="Agent"&&rs(p)&&!p.logo)return[{image:p,agent:null}];const g=W(p.logo).find(rs);return g?[{image:g,agent:p}]:[]});return u.length?f(St,{children:u.map(({image:h,agent:p},g)=>{const v=fv(p,l);return f(pv,{src:h.id,alt:n??(v==null?void 0:v.text)??s("logo"),...dt(n!==void 0?void 0:v?v.lang:i("logo")),width:h.width,height:h.height,loading:"lazy",decoding:"async",className:Mt("clover-logo",o),...r},`${h.id}-${g}`)})}):null}function pv({alt:t,onError:e,...n}){const o=Vt(Zl),[r,s]=z(false),i=ut(()=>s(true),[]);cv(()=>{r&&(o==null||o())},[r,o]);const a=ut(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 mv=t=>t&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).filter(e=>e!=="none"&&e!=="@none"&&xt({[e]:t[e]}).text):[];function gv(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(mv).filter(r=>r.length>1);return[...new Set(o.flat())]}function vv(){const{language:t,chooseLanguage:e,toggleDrawn:n}=ue("About"),o=nt(i=>i.manifest),r=bt(()=>gv(o),[o]),s=Ac(r,t);return s&&e?{languages:r,chosen:s,onChange:e,drawn:n??false}:null}function ub(t,e){return t!=null&&t.drawn?e.every(n=>!!n&&n!=="none"&&t.languages.some(o=>gs(o,n))):false}const yv=_t(()=>import("./LanguageChoice-DK0ITQY4.mjs").then(t=>t.b).then(t=>({default:t.LanguageChoice}))),bv=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},_v=t=>void Lt.chooseInterfaceLanguage(t);function wv(){Tt();const{languages:t,chosen:e}=Lt.interfaceLanguages();return t.length>1?{languages:t,chosen:e}:null}function Yl({values:t=true,interfaceLanguages:e=true}={}){const n=vv(),o=wv(),r=t?(n==null?void 0:n.languages)??[]:[],s=u=>r.some(m=>m===u||Lt.stringsFor(m)===u),i=[...r,...(e?(o==null?void 0:o.languages)??[]:[]).filter(u=>!s(u))];if(i.length<2)return null;const a=Lt.chosenLanguage,c=a&&Lt.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):_v(u)}}function Jl({values:t,interfaceLanguages:e}){const n=Yl({values:t,interfaceLanguages:e}),{drawsToggle:o}=ue("About"),r=!!n;return D(()=>r?o==null?void 0:o():void 0,[r,o]),n?f(Ct,{fallback:null,children:f(yv,{...n,nameKey:"readingLanguage",part:"clover-about",fit:bv})}):null}const Ql=ge(false);function Za(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=xt(s.label,e);o.push({id:i,label:a.text||s.format||i,lang:a.text?a.lang:void 0,format:s.format,hrefLang:Bn(s)})}return o}function tu(){const{language:t}=ue("Download"),e=nt(o=>o.manifest),n=nt(o=>Ue(o.manifest,o.canvasId));return{page:Za(n,t),all:Za([e],t)}}const xv=_t(()=>import("./Download-odx1XL-v.mjs").then(({DownloadGroups:t})=>({default:t}))),Sv=_t(()=>import("./NavDate-rmVMLVIA.mjs").then(t=>t.a).then(({NavDate:t})=>({default:t}))),kv=_t(()=>import("./PartOfManifest-D1iufWAj.mjs"));function Cv({languages:t=true,interfaceLanguages:e=true,...n}){const o=Vt(Ql);return f(Ev,{...n,download:!o&&n.download!==false,choice:o?null:f(Jl,{values:t,interfaceLanguages:e})})}function Ev({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}=Tt(),d=tu(),u=nt(y=>y.manifest,Object.is,"About"),m=$(null);D(()=>{const y=m.current,S=y==null?void 0:y.querySelector(".clover-about-head");if(!y||!S||typeof ResizeObserver>"u")return;const x=new Set,b=()=>{const B=S.querySelector(".clover-about-thumbnail"),O=S.querySelector(".clover-about-label");for(const tt of[B,O])tt&&!x.has(tt)&&(x.add(tt),w.observe(tt));const V=y.style;if(!B){V.removeProperty("--clover-about-label-height"),V.removeProperty("--clover-about-thumbnail-width");return}const X=`${(O==null?void 0:O.offsetHeight)??0}px`,U=`${B.offsetWidth}px`;V.getPropertyValue("--clover-about-label-height")!==X&&V.setProperty("--clover-about-label-height",X),V.getPropertyValue("--clover-about-thumbnail-width")!==U&&V.setProperty("--clover-about-thumbnail-width",U)};let M=0;const w=new ResizeObserver(()=>{cancelAnimationFrame(M),M=requestAnimationFrame(b)});return w.observe(S),b(),()=>{cancelAnimationFrame(M),w.disconnect(),y.style.removeProperty("--clover-about-label-height"),y.style.removeProperty("--clover-about-thumbnail-width")}},[s,r,u]);const h=ve(),p=()=>{var x,b;const y=m.current;(b=((x=y==null?void 0:y.closest(".clover-sections-item"))==null?void 0:x.querySelector(".clover-sections-button"))??y)==null||b.focus({preventScroll:true})};if(!u)return null;const g=(y,S,x)=>{if(!S)return null;const{as:b,title:M,group:w}=Dl(n,`${h}-${y}`);return f("section",{className:"clover-about-section",...w,children:[f(b,{className:"clover-about-heading",...dt(l(y)),...M,children:c(y)}),x]})},v=y=>Array.isArray(u[y])?u[y].length>0:!!u[y];return f("div",{ref:m,className:Mt("clover-about",i),tabIndex:-1,...a,children:[t,(r||s)&&f("div",{className:"clover-about-head",children:[r&&f(av,{className:"clover-about-thumbnail",size:256,alt:s?"":void 0}),s&&f(cn,{as:Us(n),className:"clover-about-label clover-title"})]}),e&&f(Ka,{of:"canvas",className:"clover-about-summary"}),ta(u)&&u.partOf&&f(Ct,{fallback:null,children:f(kv,{manifest:u,headingLevel:n,onOpened:p})}),f(Ka,{className:"clover-about-summary"}),f(ev,{className:"clover-about-metadata"}),f(nv,{className:"clover-about-metadata"}),g("aboutDate",Rl(u.navDate),f(Ct,{fallback:null,children:f(Sv,{value:u.navDate,className:"clover-about-date"})})),g("aboutProvider",v("provider"),f(Gl,{})),g("aboutRights",u.rights,f(ov,{})),g("aboutHomepage",v("homepage"),f(sv,{})),g("aboutSeeAlso",v("seeAlso"),f(iv,{})),g("download",o&&d.page.length+d.all.length>0,f(Ct,{fallback:null,children:f(xv,{page:d.page,all:d.all,headingLevel:n+1})})),g(ta(u)?"aboutCanvas":"aboutManifest",!Yc(u)&&u.id,f(rv,{}))]})}const Mv=_t(()=>import("./ControlMenu-Chi1pBFc.mjs")),Tv=_t(()=>import("./Download-odx1XL-v.mjs").then(({DownloadGroups:t})=>({default:t})));function Iv({languages:t=true,interfaceLanguages:e=true,download:n=true}){const o=Yl({values:t,interfaceLanguages:e}),{page:r,all:s}=tu(),i=n&&r.length+s.length>0;return!o&&!i?null:f("div",{className:"clover-about-actions",children:[i&&f(Lv,{page:r,all:s}),o&&f(Jl,{values:t,interfaceLanguages:e})]})}function Lv({page:t,all:e}){const{t:n,langOf:o}=Tt(),[r,s]=z(false),a=`${ve()}-download`,c=ut(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"),...dt(o("download")),"aria-expanded":r,"aria-controls":r?`${a}-menu`:void 0,onClick:()=>s(l=>!l),children:[f(Pv,{}),f(Ke,{label:n("download")})]}),r&&f(Ct,{fallback:null,children:f(Mv,{id:`${a}-menu`,triggerId:a,onClose:c,className:"clover-about-download-menu",children:f(Tv,{page:t,all:e,inPopover:true})})})]})}function Pv(){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"})})}const Av=["about","targets","collection","contents","search","map","transcript","annotations"],Pe={about:t=>{var e,n;return!Yc(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||!!Xd(t.manifest)},contents:t=>Up(t.manifest).length>0,search:t=>!!Is(t.manifest),map:t=>lp(t.manifest,t.collection),transcript:t=>Ue(t.manifest,t.canvasId).some(e=>gl(e).length>0||Yh(e).length>0),annotations:t=>hf(t.manifest,t.addedSets).length>0},Ov=(t,e)=>{const n=Array.isArray(e)?new Set(e):void 0;return Av.filter(o=>t[o]&&(!n||n.has(o)))};function js(t){const e={about:nt(Pe.about),targets:nt(Pe.targets),collection:nt(Pe.collection),contents:nt(Pe.contents),search:nt(Pe.search),map:nt(Pe.map),transcript:nt(Pe.transcript),annotations:nt(Pe.annotations)};return Ov(e,t)}function Nv({open:t=false,className:e}){return f("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:Mt("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 eu=typeof window>"u"?D:Bt,nu=ge(null);function db(){return Vt(nu)}const ou=ge(0);function fb(){return Vt(ou)}function Rv({items:t,layout:e="tabs",value:n,onValueChange:o,label:r,labelLang:s,headingLevel:i=3}){var ot,mt;const a=ve(),c=Fo(r??"",s,r===void 0),l=$([]),d=e==="tabs",{t:u,langOf:m}=Tt(),h=Hl({dragFree:true,itemCount:t.length}),p=t.some(E=>E.value===n)?n:((ot=t[0])==null?void 0:ot.value)??null,g=$(new Set);p&&g.current.add(p);const v=$(null),[y,S]=z({value:null,count:0});D(()=>{var rt;if(d||!p||v.current!==p)return;v.current=null;const E=t.findIndex(st=>st.value===p),k=document.getElementById(`${a}-panel-${E}`),P=(rt=l.current[E])==null?void 0:rt.parentElement;if(!k||!P)return;const j=P.getBoundingClientRect().bottom-k.getBoundingClientRect().top;if(j<=0)return;const q=Ir(k);q&&(q.scrollTop-=j)},[p,d,t,a]);const x=E=>{var T,A,N,K;const k=t.findIndex(H=>H.value===p),P=document.getElementById(`${a}-panel-${k}`),j=E.target;if(!P||j===P||!P.contains(j)||!$v(j))return;const q=(A=(T=l.current[k])==null?void 0:T.parentElement)==null?void 0:A.getBoundingClientRect(),rt=k+1<t.length?(K=(N=l.current[k+1])==null?void 0:N.parentElement)==null?void 0:K.getBoundingClientRect():void 0;if(!q)return;const st=j.getBoundingClientRect(),gt=st.top<q.bottom?Math.floor(st.top-q.bottom):rt&&st.bottom>rt.top?Math.ceil(Math.min(st.bottom-rt.top,st.top-q.bottom)):0,_=gt?Ir(P):null;_&&(_.scrollTop+=gt)},b=$(null),M=t.map(E=>E.value).join(`
|
|
29
|
+
`),w=$(false);w.current=!!((mt=b.current)!=null&&mt.contains(b.current.ownerDocument.activeElement)),D(()=>{var q;const E=b.current;if(!E||!w.current)return;const{activeElement:k,body:P}=E.ownerDocument;if(k&&k!==P)return;const j=t.findIndex(rt=>rt.value===p);(q=l.current[j])==null||q.focus()},[M]),eu(()=>{const E=b.current;if(d||!E||typeof ResizeObserver>"u")return;const k=[...E.querySelectorAll(":scope > .clover-sections-item")],P=k.map(I=>I.firstElementChild),j=P[0],q=P[P.length-1],rt=new Map,st=I=>(I&&rt.get(I))??0,gt=document.scrollingElement;let _=null,T=0;const A=()=>{const I=P.reduce((ft,Ht)=>ft+st(Ht),0);let F=0;k.forEach((ft,Ht)=>{ft.style.setProperty("--clover-sections-before",`${F}px`),F+=st(P[Ht]),ft.style.setProperty("--clover-sections-after",`${I-F}px`)}),E.style.setProperty("--clover-sections-total",`${I}px`);const Z=j&&getComputedStyle(j);(Z==null?void 0:Z.position)==="sticky"&&q&&(T=parseFloat(Z.top)+parseFloat(getComputedStyle(q).bottom)||0);const it=getComputedStyle(E),Q=parseFloat(it.lineHeight)||1.2*parseFloat(it.fontSize),yt=(_==null?void 0:_.clientHeight)??0;yt>0&&yt-T-I<2*Q?E.dataset.stacks="off":delete E.dataset.stacks},N=new ResizeObserver(I=>{var F,Z;for(const it of I)P.includes(it.target)&&rt.set(it.target,((Z=(F=it.borderBoxSize)==null?void 0:F[0])==null?void 0:Z.blockSize)??it.target.getBoundingClientRect().height);A()}),K=()=>{const I=Ir(E);I!==_&&(_&&_!==gt&&N.unobserve(_),I&&I!==gt&&N.observe(I),_=I)},H=()=>{K(),A()};K();for(const I of P)I&&N.observe(I,{box:"border-box"});return window.addEventListener("resize",H),()=>{N.disconnect(),window.removeEventListener("resize",H);for(const I of k)I.style.removeProperty("--clover-sections-before"),I.style.removeProperty("--clover-sections-after");E.style.removeProperty("--clover-sections-total"),delete E.dataset.stacks}},[d,M,i]),D(()=>{if(d)return;const E=l.current.map(P=>P==null?void 0:P.parentElement).filter(P=>!!P),k=P=>{var st;if(P.ctrlKey)return;const j=P.currentTarget,q=Ga(j);if(!q||q===document.scrollingElement)return;P.preventDefault();const rt=P.deltaMode===1?parseFloat(getComputedStyle(j).lineHeight)||16:P.deltaMode===2?q.clientHeight:1;(st=Ga(q)??document.scrollingElement)==null||st.scrollBy({left:P.deltaX*rt,top:P.deltaY*rt,behavior:"instant"})};for(const P of E)P.addEventListener("wheel",k,{passive:false});return()=>{for(const P of E)P.removeEventListener("wheel",k)}},[d,M]);const B=E=>{E!==p&&(v.current=E,d||S(k=>({value:E,count:k.count+1})),o==null||o(E))},O=(E,k)=>{var st;const P=t.length-1,[j,q]=d?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],rt=E.key===q?(k+1)%t.length:E.key===j?(k-1+t.length)%t.length:E.key==="Home"?0:E.key==="End"?P:null;rt!==null&&(E.preventDefault(),(st=l.current[rt])==null||st.focus(),d&&B(t[rt].value))},V=$(false);D(()=>{if(!d)return;const E=t.findIndex(_=>_.value===p),k=l.current[E],P=k==null?void 0:k.parentElement;if(!k||!P)return;const j=getComputedStyle(P),q=P.getBoundingClientRect(),rt=k.getBoundingClientRect(),st=q.left+(parseFloat(j.scrollPaddingLeft)||0),gt=q.right-(parseFloat(j.scrollPaddingRight)||0);(rt.left<st-1||rt.right>gt+1)&&h.scrollToIndex(E,{instant:!V.current}),V.current=true},[p,d,t.length,h.scrollToIndex]);const X=E=>{const k=E==="prev"?h.canScrollPrev:h.canScrollNext,P=E==="prev"?"sectionsScrollBack":"sectionsScrollForward";return f("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${E}`,"aria-hidden":"true",tabIndex:-1,hidden:!k,...dt(m(P)),onMouseDown:j=>j.preventDefault(),onClick:E==="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:E==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f(Ke,{label:u(P)})]})},U=Us(i,"div"),tt=(E,k)=>{const P=E.value===p;return f("button",{ref:j=>{l.current[k]=j},type:"button",id:`${a}-button-${k}`,className:"clover-sections-button","data-value":E.value,"data-track-index":d?k:void 0,"aria-controls":`${a}-panel-${k}`,...d?{role:"tab","aria-selected":P,tabIndex:P?0:-1}:{"aria-expanded":P,"aria-disabled":P||void 0},onClick:()=>B(E.value),onKeyDown:j=>O(j,k),children:[f("span",{className:"clover-sections-label",children:E.label}),!d&&f(Nv,{open:P,className:"clover-sections-chevron"})]},E.value)};return f("div",{ref:b,className:"clover-sections","data-layout":e,onFocus:d?void 0:x,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)}),X("prev"),X("next")]})}),d&&c.node,t.map((E,k)=>{const P=E.value===p;return f("section",{className:"clover-sections-item","data-value":E.value,"data-open":P,style:d?void 0:{"--clover-sections-index":k},children:[!d&&f(U,{className:"clover-sections-heading",children:[tt(E,k),f("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),f(ou.Provider,{value:y.value===E.value?y.count:0,children:f(Bv,{id:`${a}-panel-${k}`,tabs:d,labelledBy:`${a}-button-${k}`,hidden:!P,actions:E.actions,children:g.current.has(E.value)?E.content:null})})]},E.value)})]})}function Bv({id:t,tabs:e,labelledBy:n,hidden:o,actions:r,children:s}){const[i,a]=z(null),c=!o||!!r;return eu(()=>{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(St,{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(nu.Provider,{value:e?null:i,children:[e&&r,s]})})]})}function Ir(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 Ga(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 $v(t){try{return t.matches(":focus-visible")}catch{return true}}const Fv=_t(()=>import("./MapView-BsDJtLAk.mjs").then(t=>t.M).then(t=>({default:t.RootMap}))),Dv=_t(()=>import("./Collection-C_iaTy8f.mjs").then(t=>({default:t.Collection}))),Hv=_t(()=>import("./TargetItems-DOtPfQtV.mjs").then(t=>({default:t.TargetsSection}))),zv=_t(()=>import("./Contents-fAlVCKr5.mjs").then(t=>({default:t.Contents}))),Wv=_t(()=>import("./Search-FbVd9LpP.mjs").then(t=>({default:t.Search}))),Uv=_t(()=>import("./Transcript-DccBh_ne.mjs").then(t=>({default:t.Transcript}))),jv=_t(()=>import("./Annotations-BY8QDb9l.mjs").then(t=>({default:t.Annotations}))),He=t=>f(Ct,{fallback:null,children:t}),Vv=()=>null,qv=le(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:m,labels:h,className:p,children:g,onKeyDown:v,...y},S){var H;const{clover:x}=ue("Panel"),b=$(null),{t:M,langOf:w,hostLanguage:B,i18n:O}=Tt(),V=Fo(M("informationPanelTabs"),w("informationPanelTabs"),!!(y["aria-label"]||y["aria-labelledby"])||!(["aside","section","nav"].includes(c)||y.role)),X=I=>{const F=w(I);return F?f("span",{...dt(F),children:M(I)}):M(I)},U=(I,F)=>{const Z=h==null?void 0:h[I];if(Z===void 0)return X(F);if(typeof Z=="string")return Z;const it=Object.keys(Z),Q=vs(it,O.language);if(!Q)return X(F);const yt=Oo(Q,B);return yt?f("span",{...dt(yt),children:Z[Q]}):Z[Q]},tt=js(m),ot=I=>tt.includes(I),mt=he.Children.toArray(g).filter(I=>he.isValidElement(I)&&I.type===Vv),E=e==="accordion"?a+1:a,k=d||u||l?f(Iv,{languages:d,interfaceLanguages:u,download:l}):void 0,P=mt.length?mt.map(({props:I})=>({value:I.value,label:I.label,content:I.children,...I.value==="about"&&{actions:k}})):[...ot("about")?[{value:"about",label:U("about","informationPanelTabsAbout"),content:f(Cv,{headingLevel:E,download:l}),actions:k}]:[],...ot("targets")?[{value:"targets",label:U("targets","informationPanelTabsTargets"),content:He(f(Hv,{headingLevel:E}))}]:[],...ot("collection")?[{value:"collection",label:U("collection","informationPanelTabsCollection"),content:He(f(Dv,{headingLevel:E}))}]:[],...ot("contents")?[{value:"contents",label:U("contents","informationPanelTabsContents"),content:He(f(zv,{}))}]:[],...ot("search")?[{value:"search",label:U("search","informationPanelTabsSearch"),content:He(f(Wv,{headingLevel:E,sticky:true,size:"small"}))}]:[],...ot("map")?[{value:"map",label:U("map","informationPanelTabsMap"),content:He(f(Fv,{}))}]:[],...ot("transcript")?[{value:"transcript",label:U("transcript","transcriptLabel"),content:He(f(Uv,{sticky:true,size:"small"}))}]:[],...ot("annotations")?[{value:"annotations",label:U("annotations","informationPanelTabsAnnotations"),content:He(f(jv,{headingLevel:E}))}]:[]],j=nt(I=>I.search.query),q=P.some(I=>I.value==="search"),[rt,st]=z(()=>j&&q?"search":o??null),gt=$(j&&q?j:"");D(()=>{q&&(j&&j!==gt.current&&n===void 0&&st("search"),gt.current=j)},[j,q,n]);const _=nt(I=>{var F;return I.annotationId&&((F=I.regions)!=null&&F.entries.some(Z=>Z.id===I.annotationId))?I.annotationId:null}),T=P.some(I=>I.value==="contents");D(()=>{_&&T&&n===void 0&&st("contents")},[_,T,n]);const A=n!==void 0?n:rt,N=(P.some(I=>I.value===A)?A:(H=P[0])==null?void 0:H.value)==="search";if(D(()=>{q&&x.setSetVisible(xs,N)},[x,q,N]),!P.length)return null;const K=()=>{var F;const I=b.current;I!=null&&I.contains(document.activeElement)&&((F=Kv(I))==null||F.focus()),s==null||s()};return f(c,{ref:I=>{b.current=I,typeof S=="function"?S(I):S&&(S.current=I)},className:Mt("clover-panel",p),"data-layout":e,"data-closable":s?"":void 0,"data-floating":i?"":void 0,...V.props,onKeyDown:I=>{v==null||v(I),i&&s&&I.key==="Escape"&&!I.defaultPrevented&&(I.preventDefault(),K())},...y,children:[V.node,s&&f("button",{type:"button",className:"clover-panel-close","aria-label":M("informationPanelClose"),...dt(w("informationPanelClose")),onClick:K,children:[f("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 512 512",fill:"none",stroke:"currentColor",children:f(rl,{})}),f(Ke,{label:M("informationPanelClose")})]}),f(Ql.Provider,{value:P.some(I=>I.value==="about"),children:f(Rv,{items:P,layout:e,value:n!==void 0?n:rt,onValueChange:I=>{n===void 0&&st(I),r==null||r(I)},label:M("informationPanelTabs"),labelLang:w("informationPanelTabs"),headingLevel:a})})]})});function Kv(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 Zv=1,Gv=4,Xv=8,Yv=500,Jv=4,Xa=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"],ru=()=>typeof document>"u"?16:parseFloat(getComputedStyle(document.documentElement).fontSize)||16;function go(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*ru():t.endsWith("%")?n/100*e:n}const Lr=t=>typeof t=="number"?`${t}px`:t,Qv=t=>{if(!t||typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(t)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}},ty=(t,e)=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},ey=t=>t?Array.from(t.children).filter(e=>e.classList.contains("clover-split-pane")):[];function ny(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 oy(t,e,n){const{sized:o,other:r}=ny(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=go(a.min,s)??0,u=o.getBoundingClientRect().width+((r==null?void 0:r.getBoundingClientRect().width)??0)-(go(c.min,s)??0),m=Math.max(l,Math.min(go(a.max,s)??u,u)),h=o.getBoundingClientRect().left>=t.getBoundingClientRect().left-1;return{sized:o,key:i,min:l,max:m,after:h}}function ry(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 sy(t,e){const n=e.sized.getBoundingClientRect().width,o=Zv*ru()*(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 Ya(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 iy(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=()=>{Xa.forEach(g=>l.removeEventListener(g,m,true)),l.removeEventListener("pointermove",h,true),clearTimeout(p),s=null},m=g=>{if(!c.contains(g.target)){if(g.type==="pointerdown"&&d(g))return u();g.preventDefault(),g.stopPropagation()}},h=g=>d(g)&&u();Xa.forEach(g=>l.addEventListener(g,m,true)),l.addEventListener("pointermove",h,true);const p=setTimeout(u,Yv);s=u};return{down(a){var d;if(o=false,r=null,a.defaultPrevented||a.button!==0||Ya(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"?Xv:Gv,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*Jv}:null,n=null,delete a.currentTarget.dataset.dragging},click(a){const c=o,l=r;o=false,r=null,!(a.defaultPrevented||c||Ya(a))&&(e().step(),l&&i(l))},key(a){if(a.defaultPrevented)return;const c=e().limits();if(!c)return;const l=sy(a,c);l!==void 0&&(e().resize(l),a.preventDefault())},dispose(){s==null||s()}}}const Vs=ge(null);function qs(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ay=le(function({as:e="div",storageKey:n,className:o,style:r,children:s,...i},a){const c=$(null),l=$({}),[d,u]=z({});D(()=>u(Qv(n)),[n]);const m=ut((p,g)=>u(v=>{const y={...v};return g===void 0?delete y[p]:y[p]=Math.round(g),ty(n,y),y}),[n]),h=bt(()=>({sizes:d,setSize:m,specs:l,element:c}),[d,m]);return f(Vs.Provider,{value:h,children:f(e,{ref:p=>{c.current=p,qs(a,p)},className:["clover-split",o].filter(Boolean).join(" "),style:{display:"flex",...r},...i,children:s})})}),su=le(function({as:e="div",size:n,min:o,max:r,name:s,className:i,style:a,children:c,...l},d){const u=Vt(Vs),m=$(null),[h,p]=z(s??"");D(()=>{if(s)return p(s);const v=ey(u==null?void 0:u.element.current);p(String(v.indexOf(m.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:v=>{m.current=v,qs(d,v)},className:["clover-split-pane",i].filter(Boolean).join(" "),"data-split-key":h||void 0,"data-sized":n!==void 0?"":void 0,style:{minWidth:Lr(o)??0,"--clover-split-size":g!==void 0?`${g}px`:Lr(n),"--clover-split-max":Lr(r),...a},...l,children:c})}),cy=le(function({className:e,children:n,onPointerDown:o,onClick:r,onKeyDown:s,...i},a){const c=Vt(Vs),{t:l,langOf:d}=Tt(),u=$(null),[m,h]=z(),p=ut(()=>{const w=u.current,B=c==null?void 0:c.element.current;return!w||!B||!c?null:oy(w,B,c.specs.current)},[c]),g=ut(w=>{const B=p();if(!B||!c)return;const O=Math.min(B.max,Math.max(B.min,w));c.setSize(B.key,O),h({now:O,min:B.min,max:B.max})},[p,c]),v=ut(()=>{const w=p();w&&h({now:w.sized.getBoundingClientRect().width,min:w.min,max:w.max})},[p]);D(()=>{const w=c==null?void 0:c.element.current;if(v(),!w||typeof ResizeObserver>"u")return;let B=0;const O=new ResizeObserver(()=>{cancelAnimationFrame(B),B=requestAnimationFrame(v)});return O.observe(w),()=>{cancelAnimationFrame(B),O.disconnect()}},[v,c,c==null?void 0:c.sizes]);const y=w=>{var B;return Math.round(w/(((B=c==null?void 0:c.element.current)==null?void 0:B.clientWidth)||1)*100)},S=()=>{var X,U;const w=p();if(!w||!c)return;const B=((X=c.element.current)==null?void 0:X.clientWidth)??0,O=go((U=c.specs.current[w.key])==null?void 0:U.size,B),V=ry(w,O,c.sizes[w.key]);if(!V.own)return g(V.to);c.setSize(w.key,void 0),h({now:O,min:w.min,max:w.max})},x=$({limits:p,resize:g,step:S});x.current={limits:p,resize:g,step:S};const[b]=z(()=>iy(()=>u.current,()=>x.current));D(()=>()=>b.dispose(),[b]);const M=i["aria-label"]??l("splitHandle");return f("div",{ref:w=>{u.current=w,qs(a,w)},role:"separator","aria-orientation":"vertical","aria-label":M,...dt(i["aria-label"]===void 0?d("splitHandle"):void 0),"aria-valuenow":m?y(m.now):void 0,"aria-valuemin":m?y(m.min):void 0,"aria-valuemax":m?y(m.max):void 0,tabIndex:0,className:["clover-split-handle",e].filter(Boolean).join(" "),onPointerDown:w=>{o==null||o(w),b.down(w)},onPointerMove:w=>b.move(w),onPointerUp:w=>b.up(w),onPointerCancel:w=>b.up(w),onClick:w=>{r==null||r(w),b.click(w)},onKeyDown:w=>{s==null||s(w),b.key(w)},...i,children:[n,f(Ke,{label:M})]})});let iu;function ly(t){iu=t}function hb(){return iu}function uy({open:t,onOpenChange:e,controls:n,side:o}){const{t:r,langOf:s}=Tt(),i=ve().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(St,{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 dy,vo;const au=()=>dy??(dy=import("./dragToClose-BrUDwA_c.mjs").then(t=>vo=t));function fy(){au()}function hy(t,{enabled:e,side:n,onClose:o,scrim:r,alongside:s,exits:i=false}){const a=$({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},D(()=>{const c=t.current;if(!c||(vo==null||vo.reset(c,a),!e))return;let l=true,d;return au().then(u=>{l&&(d=u.attach(c,a))}),()=>{l=false,d==null||d()}},[t,e])}const py=240,my="16rem",gy="14rem",vy=31;function yy(t){const[e,n]=z(t),[o,r]=z(t);return D(()=>{if(t){n(true);const i=requestAnimationFrame(()=>requestAnimationFrame(()=>r(true)));return()=>cancelAnimationFrame(i)}r(false);const s=setTimeout(()=>n(false),py);return()=>clearTimeout(s)},[t]),{mounted:e,open:t&&o}}function by(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 _y=typeof window>"u"?D:Bt;function wy(t,e){const[n,o]=z();return _y(()=>{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 Ja=typeof window>"u"?D:Bt;function xy({id:t,beside:e,defaultOpen:n,side:o,focus:r=by,slides:s=true,alongside:i,followFocus:a}){var mt,E;const c=$(null),l=$(null),d=$(null),u=e===false,[m,h]=z(n),[p,g]=z(false),v=u?p:m,y=()=>document.querySelector(`button[aria-controls~="${t}"]`),S=()=>a(y),x=()=>{var k,P,j;(k=c.current)!=null&&k.contains(document.activeElement)&&((P=d.current)==null||P.removeAttribute("inert"),(j=y())==null||j.focus(),S())},b=$(0),M=k=>{b.current=u&&k?3:0,b.current||S(),u&&g(k),h(k)},w=()=>{x(),M(false)},B=$(e),O=$(false);if(B.current===true&&e===false){const k=document.activeElement;O.current=!!(k&&((mt=c.current)!=null&&mt.contains(k)||(E=y())!=null&&E.contains(k)))}Ja(()=>{var k;O.current&&(O.current=false,(k=y())==null||k.focus(),S()),e===true&&g(false),B.current=e},[e]);const V=yy(s&&u&&v),X=s&&u,U=X?V.mounted:v,tt=X?V.open:v,ot=u&&tt;return Ja(()=>{const k=d.current;if(k)return ot?k.setAttribute("inert",""):k.removeAttribute("inert"),()=>k.removeAttribute("inert")},[ot]),D(()=>{if(!b.current||!c.current)return;b.current-=1;const k=r(c.current);k==null||k.focus({preventScroll:true}),k&&document.activeElement===k&&(b.current=0)}),hy(c,{enabled:u&&tt,side:o,onClose:w,scrim:l,alongside:i,exits:!s}),{pane:c,main:d,over:u,open:v,shown:U,opened:tt,setOpen:M,close:w,onKeyDown:k=>{u&&v&&k.key==="Escape"&&!k.defaultPrevented&&(k.preventDefault(),w())},scrim:u&&U&&{ref:l,"data-open":tt,"aria-hidden":true,onMouseDown:k=>k.preventDefault(),onClick:w}}}const Sy=typeof window>"u"?D:Bt;function ky(t,e,n){Sy(()=>{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 Cy=()=>import("./PanelPart-Dai61xLE.mjs");function Ey({id:t,beside:e,defaultOpen:n,side:o="end",followFocus:r,body:s,sections:i,panel:a}){const c=xy({id:t,beside:e,defaultOpen:n,side:o,followFocus:r}),l=!c.over&&c.open,d=$(null),[u,m]=z(),h=a??u,p=()=>Cy().then(y=>m(()=>y.default));D(()=>{c.open&&!h&&p()},[c.open]),ky(d,()=>s==null?void 0:s(),l&&!!s);const g=y=>{var S,x;(x=(S=y.target).closest)!=null&&x.call(S,`[aria-controls~="${t}"]`)&&(h||p(),c.over&&fy())},v=f(My,{sections:i,open:c.open,onOpenChange:y=>y&&!h?p().then(()=>c.setOpen(true)):c.setOpen(y),controls:t,side:o});return{...c,id:t,side:o,docked:l,spine:d,toggle:v,Part:h,splitProps:{"data-panel":c.over?"over":"beside",onKeyDown:c.onKeyDown,onPointerOver:g,onFocus:g}}}function My({sections:t,...e}){return js(t).length?f(uy,{...e}):null}function Ty({pane:t,className:e,...n}){const{id:o,over:r,docked:s,side:i,Part:a}=t,c=js(n.sections);if(!c.length)return null;const l=s&&f(St,{children:[f(cy,{className:"clover-template-panel-handle","aria-controls":o}),f("div",{ref:t.spine,className:"clover-template-spine",children:t.toggle})]});return f(St,{children:[i==="end"&&l,f(su,{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:gy,"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 Iy=30;function Ly(){const t=$(0);return D(()=>()=>cancelAnimationFrame(t.current),[]),e=>{cancelAnimationFrame(t.current);let n=0;const o=()=>{const r=e();r&&Py()?r.focus():++n<Iy&&(t.current=requestAnimationFrame(o))};t.current=requestAnimationFrame(o)}}function Py(){const t=document.activeElement;return!t||t===document.body||!t.isConnected||t.closest("[hidden], [inert]")!==null}function Ay({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:m=false,storageKey:h="clover-template-default",fill:p=false,collapseControls:g,canvasOptions:v,...y}){const S=$(null),x=ve().replace(/:/g,""),b=`${x}-panel`,M=Dl(n,`${x}-title`),w=Ey({id:b,beside:wy(S,vy),defaultOpen:r??true,followFocus:Ly(),sections:i,body:()=>{var V;return(V=S.current)==null?void 0:V.querySelector(".clover-template-default-body")},panel:qv}),B=w.over,O=o&&w.docked;return f(qf,{className:["clover-template-default",t].filter(Boolean).join(" "),"data-fill":p||void 0,...e?M.group:null,...y,children:f(ay,{ref:S,className:"clover-template-default-panes clover-template-panes",storageKey:h||void 0,...o?w.splitProps:{"data-panel":"beside"},children:[f(su,{ref:w.main,className:"clover-template-default-main",min:B?void 0:my,children:[e&&f("header",{className:"clover-template-default-header",children:[f(Oy,{title:M}),f(To,{of:"targets",layout:"pager",size:"small",className:"clover-template-default-pager"}),f(Gl,{className:"clover-template-default-provider",children:f(Xl,{})})]}),f(Gg,{loading:false}),f(Ry,{items:u,singleItem:m,body:f(dg,{className:"clover-template-default-body",collapseControls:g,options:v,children:o&&!O&&w.toggle},"body")})]}),o&&f(Ty,{pane:w,className:"clover-template-default-panel",layout:s,sections:i,labels:a,download:c,languages:l,interfaceLanguages:d,headingLevel:e?By(n):n})]})})}function Oy({title:t}){const e=nt(o=>{var r;return o.throughCollection?(r=o.collection)==null?void 0:r.label:void 0}),n=Gp();return Ny(n==null?void 0:n.entries[0]),f(St,{children:[f(cn,{as:t.as,className:"clover-template-default-title clover-template-title clover-title",keep:true,...t.title}),e&&f("div",{className:"clover-template-default-collection-row",children:[f(cn,{as:"p",label:e,className:"clover-template-default-collection"}),f(To,{of:"members",layout:"pager",size:"small",className:"clover-template-default-pager"})]}),n&&f("div",{className:"clover-template-default-collection-row",children:[n.label&&f(cn,{as:"p",label:n.label,className:"clover-template-default-collection"}),f(To,{of:"annotations",layout:"pager",size:"small",className:"clover-template-default-pager"})]})]})}function Ny(t){const{clover:e}=ue(),n=nt(r=>{var s;return(s=r.manifest)==null?void 0:s.id}),o=$(null);D(()=>{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 Ry({body:t,items:e,singleItem:n}){const{direction:o}=$s(),r=e==="slider"&&(o==="top-to-bottom"||o==="bottom-to-top"),s=f("div",{className:"clover-template-default-rail-header",children:[f($y,{}),f(Zg,{})]},"header"),i=e&&f(To,{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 By=t=>t+1;function $y(){const t=Fs();return f("p",{className:"clover-template-default-titles",children:t.map((e,n)=>f(he.Fragment,{children:[n>0&&f("span",{className:"clover-template-default-titles-dot","aria-hidden":"true",children:"\xB7"}),f(cn,{label:e.label})]},e.id))})}const Fy=()=>import("./renderers-D7gh2mXP.mjs"),Dy=_t(()=>import("./Document-DfTuEc9K.mjs").then(t=>({default:t.Document}))),Hy=_t(()=>import("./Gallery-C1_u4G-E.mjs").then(t=>({default:t.Gallery}))),Qa={default:Ay,document:Dy,gallery:Hy},zy={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 Wy({props:t}){const e=typeof t.template=="string"&&t.template in Qa?t.template:"default",n=Object.fromEntries(Object.entries(t).filter(([i])=>{var a;return i!=="template"&&(((a=zy[i])==null?void 0:a.includes(e))??true)})),o=rn(Fy,!!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=Qa[e];return f(Ct,{fallback:null,children:f(s,{...n,iiifContent:t.iiifContent})})}const Uy=""+new URL("../assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,jy={mapWorkerUrl:Uy},Vy={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"}}};ly(jy.mapWorkerUrl);Fu(Vy,()=>Promise.resolve(Wy));export{ed as $,$ as A,dg as B,oe as C,ay as D,su as E,To as F,cy as G,my as H,eh as I,Ty as J,fy as K,cn as L,Gu as M,nt as N,Gp as O,Zg as P,ib as Q,qf as R,Gg as S,bt as T,qp as U,Ct as V,_t as W,Ka as X,ge as Y,Vt as Z,Bt as _,ue as a,dl as a$,qv as a0,Lf as a1,lb as a2,_s as a3,Wl as a4,Ul as a5,Bn as a6,jl as a7,Yd as a8,xt as a9,he as aA,yh as aB,op as aC,nl as aD,Zc as aE,ep as aF,np as aG,wh as aH,yl as aI,bf as aJ,As as aK,Jp as aL,wa as aM,sh as aN,cl as aO,ne as aP,dh as aQ,tp as aR,bh as aS,We as aT,Gf as aU,dp as aV,An as aW,ih as aX,th as aY,ah as aZ,ch as a_,Us as aa,dt as ab,Rt as ac,jc as ad,mf as ae,qe as af,Tt as ag,Fo as ah,Mt as ai,Kg as aj,le as ak,qg as al,No as am,hs as an,ps as ao,zn as ap,hm as aq,Ma as ar,Ea as as,Ml as at,Fs as au,Xp as av,Ta as aw,ws as ax,Ro as ay,W as az,yd as b,Ah as b$,uh as b0,lh as b1,Xd as b2,rv as b3,sv as b4,Up as b5,xe as b6,Nv as b7,sb as b8,nb as b9,sf as bA,Sl as bB,Dh as bC,Hc as bD,fn as bE,xs as bF,pr as bG,Vn as bH,pg as bI,mg as bJ,vs as bK,fm as bL,Re as bM,Wn as bN,Dc as bO,hb as bP,Rl as bQ,Lt as bR,ef as bS,yf as bT,Fh as bU,Es as bV,Ms as bW,Vl as bX,nh as bY,Af as bZ,lf as b_,Zy as ba,Is as bb,fb as bc,Ue as bd,gl as be,Yh as bf,vv as bg,Ac as bh,gs as bi,db as bj,ub as bk,hf as bl,ks as bm,Gy as bn,hr as bo,Rs as bp,Oo as bq,rn as br,zp as bs,Wc as bt,$o as bu,mn as bv,Jc as bw,py as bx,tu as by,ta as bz,$s as c,Ve as c0,xo as c1,Hs as c2,ob as c3,zh as c4,xr as c5,Vd as c6,Qh as c7,Bc as c8,im as c9,bg as cA,rf as ca,hn as cb,Un as cc,Zr as cd,ua as ce,Yy as cf,Xy as cg,rl as ch,Jy as ci,Qy as cj,tb as ck,am as cl,$a as cm,Sa as cn,Qp as co,tm as cp,rb as cq,me as cr,ce as cs,Qg as ct,ql as cu,eb as cv,Ns as cw,gg as cx,al as cy,Pu as cz,Zp as d,z as e,ve as f,ab as g,cb as h,Ly as i,xy as j,St as k,wy as l,Ey as m,ad as n,vy as o,Ke as p,ut as q,zs as r,yg as s,Dl as t,f as u,je as v,Gl as w,fe as x,D as y,Xl as z};
|