@nulib/clover 4.0.0-beta.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/components/Annotations/Annotations.mjs +165 -204
- package/dist/components/Annotations/EntryBodies.mjs +28 -3
- package/dist/components/Annotations/languages.mjs +1 -17
- package/dist/components/Body/Body.mjs +16 -1
- package/dist/components/Body/BodyAlert.mjs +2 -1
- package/dist/components/Body/Caption.mjs +2 -1
- package/dist/components/Body/CaptionDetails.mjs +2 -1
- package/dist/components/Body/glyphs.mjs +24 -0
- package/dist/components/Canvas/AnnotationMenu.mjs +76 -60
- package/dist/components/Canvas/AnnotationState.mjs +9 -2
- package/dist/components/Canvas/Annotations.mjs +16 -7
- package/dist/components/Canvas/CanvasView.mjs +287 -42
- package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
- package/dist/components/Canvas/ChoiceMenu.mjs +51 -31
- package/dist/components/Canvas/Connected.mjs +38 -4
- package/dist/components/Canvas/ControlMenu.mjs +29 -8
- package/dist/components/Canvas/Controls.mjs +227 -48
- package/dist/components/Canvas/ControlsFade.mjs +16 -0
- package/dist/components/Canvas/FrameAnimation.mjs +568 -167
- package/dist/components/Canvas/ImageControls.mjs +209 -0
- package/dist/components/Canvas/LoadedCanvas.mjs +5 -3
- package/dist/components/Canvas/PlaceBox.mjs +74 -0
- package/dist/components/Canvas/Placeholder.mjs +46 -13
- package/dist/components/Canvas/RowFits.mjs +85 -0
- package/dist/components/Canvas/fromManifest.mjs +2 -1
- package/dist/components/Canvas/layout.mjs +132 -32
- package/dist/components/Canvas/media/MediaBody.mjs +130 -45
- package/dist/components/Canvas/media/Player.mjs +9 -78
- package/dist/components/Canvas/media/Transport.mjs +102 -78
- package/dist/components/Canvas/media/TransportButton.mjs +2 -1
- package/dist/components/Canvas/media/placeMenu.mjs +19 -0
- package/dist/components/Canvas/media/seekGaps.mjs +43 -0
- package/dist/components/Canvas/media/sequence.mjs +96 -0
- package/dist/components/Canvas/media/useMediaElement.mjs +22 -3
- package/dist/components/Canvas/panClearOfControls.mjs +1 -1
- package/dist/components/Collection/Collection.mjs +3 -2
- package/dist/components/CollectionSelect/CollectionSelect.mjs +5 -2
- package/dist/components/Contents/Contents.mjs +163 -34
- package/dist/components/Download/Download.mjs +34 -38
- package/dist/components/Download/downloads.mjs +40 -0
- package/dist/components/Items/AnnotationItems.mjs +165 -0
- package/dist/components/Items/CountMenu.mjs +90 -0
- package/dist/components/Items/Item.mjs +27 -19
- package/dist/components/Items/Items.mjs +93 -45
- package/dist/components/Items/Pager.mjs +39 -79
- package/dist/components/Items/PagerLayout.mjs +43 -0
- package/dist/components/Items/Position.mjs +103 -0
- package/dist/components/Items/StandaloneItems.mjs +12 -4
- package/dist/components/Items/TargetItems.mjs +202 -0
- package/dist/components/Items/masonry.mjs +35 -0
- package/dist/components/Label/Label.mjs +2 -1
- package/dist/components/Map/MapView.mjs +367 -57
- package/dist/components/Panel/About.mjs +61 -15
- package/dist/components/Panel/AboutActions.mjs +117 -0
- package/dist/components/Panel/Panel.mjs +58 -18
- package/dist/components/Panel/PartOfManifest.mjs +4 -3
- package/dist/components/Panel/ReadingLanguages.mjs +20 -0
- package/dist/components/Primitives/Primitives.mjs +18 -3
- package/dist/components/Provider/Provider.mjs +19 -5
- package/dist/components/Root/Announcer.mjs +3 -2
- package/dist/components/Root/Root.mjs +5 -2
- package/dist/components/Root/useRootState.mjs +16 -51
- package/dist/components/Scene/SceneView.mjs +36 -8
- package/dist/components/Scene/cloverEngine.mjs +2 -1
- package/dist/components/Search/Search.mjs +3 -2
- package/dist/components/Split/Split.mjs +4 -1
- package/dist/components/Status/Status.mjs +10 -2
- package/dist/components/Timeline/playerSurface.mjs +4 -1
- package/dist/components/Transcript/Transcript.mjs +42 -23
- package/dist/core/annotation-bodies.mjs +25 -5
- package/dist/core/annotation-collection.mjs +3 -2
- package/dist/core/annotation-name.mjs +12 -9
- package/dist/core/annotation-sets.mjs +139 -10
- package/dist/core/annotations-content.mjs +8 -1
- package/dist/core/annotations.mjs +8 -1
- package/dist/core/choice-key.mjs +5 -0
- package/dist/core/clover.mjs +112 -24
- package/dist/core/content-state-reader.mjs +33 -2
- package/dist/core/content-state.mjs +5 -3
- package/dist/core/dates-format.mjs +30 -0
- package/dist/core/dates.mjs +19 -0
- package/dist/core/geo.mjs +46 -5
- package/dist/core/image-layers.mjs +96 -0
- package/dist/core/items.mjs +4 -2
- package/dist/core/language-choice.mjs +30 -0
- package/dist/core/link.mjs +15 -1
- package/dist/core/load.mjs +4 -2
- package/dist/core/pages.mjs +20 -1
- package/dist/core/presentation.mjs +6 -4
- package/dist/core/range-regions.mjs +70 -0
- package/dist/core/ranges.mjs +52 -18
- package/dist/core/region.mjs +7 -2
- package/dist/core/sanitize.mjs +86 -1
- package/dist/core/save-file.mjs +33 -0
- package/dist/core/selectors.mjs +12 -0
- package/dist/core/upgrade.mjs +23 -0
- package/dist/core/value.mjs +11 -23
- package/dist/hooks/useFullscreenExit.mjs +26 -0
- package/dist/hooks/useHighContrast.mjs +27 -0
- package/dist/i18n/autonym.mjs +11 -0
- package/dist/i18n/config.mjs +3 -8
- package/dist/{core → i18n}/direction.mjs +5 -1
- package/dist/i18n/languages.mjs +44 -0
- 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/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/{ui → i18n}/useContainerName.mjs +5 -4
- package/dist/{react/language.mjs → i18n/useRootLanguage.mjs} +2 -2
- package/dist/index.d.mts +476 -78
- package/dist/index.mjs +6 -2
- package/dist/lib/fullscreen.mjs +6 -1
- package/dist/lib/gltf/load.mjs +26 -6
- package/dist/lib/renderer/CanvasRenderer.mjs +71 -36
- package/dist/lib/renderer/camera/Camera.mjs +1 -1
- package/dist/lib/renderer/math/affine.mjs +14 -0
- package/dist/lib/renderer/scene/planFrame.mjs +12 -12
- package/dist/lib/renderer/scene/regions.mjs +11 -1
- package/dist/lib/renderer/scene/sceneItem.mjs +72 -9
- package/dist/lib/time.mjs +10 -0
- package/dist/map/index.d.mts +26 -4
- package/dist/react/fetchManifest.mjs +19 -0
- package/dist/react/hooks.mjs +7 -1
- package/dist/react/readingLanguages.mjs +16 -0
- package/dist/react/useContentStateOutput.mjs +71 -0
- package/dist/react/usePagesReached.mjs +42 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +122 -135
- package/dist/templates/document/Document.mjs +45 -64
- package/dist/templates/document/Sheets.mjs +13 -5
- package/dist/templates/gallery/Gallery.mjs +90 -18
- package/dist/templates/index.d.mts +318 -18
- package/dist/templates/shared/Lightbox.mjs +161 -69
- package/dist/templates/shared/LightboxView.mjs +118 -0
- package/dist/templates/shared/PanelPane.mjs +104 -0
- package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
- package/dist/templates/shared/dragToClose.mjs +51 -8
- package/dist/templates/shared/givenAnnotations.mjs +13 -0
- package/dist/templates/shared/useDragToClose.mjs +6 -3
- package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
- package/dist/templates/shared/useSlide.mjs +6 -0
- package/dist/templates.css +1 -1
- package/dist/ui/BodyUnloadable.mjs +34 -0
- package/dist/ui/Button.mjs +2 -1
- package/dist/ui/Chevron.mjs +34 -0
- package/dist/ui/ControlCluster.mjs +15 -14
- package/dist/ui/EntryThumbnail.mjs +60 -0
- package/dist/ui/ExitFullscreen.mjs +2 -1
- package/dist/ui/FieldPill.mjs +5 -4
- package/dist/ui/HideToggle.mjs +2 -1
- package/dist/ui/LanguageChoice.mjs +45 -0
- package/dist/ui/ListEnd.mjs +29 -0
- package/dist/ui/Markup.mjs +27 -8
- package/dist/ui/NavDate.mjs +29 -0
- package/dist/ui/ReadMore.mjs +3 -2
- package/dist/ui/Sections.mjs +22 -31
- package/dist/ui/Steps.mjs +4 -3
- package/dist/ui/Tip.mjs +9 -4
- package/dist/ui/mediaIcons.mjs +35 -8
- package/dist/ui/useScrollTrack.mjs +2 -1
- package/dist/web-components/About-DvyvVUK5.mjs +1 -0
- package/dist/web-components/AnnotationItems-BpRcSrOM.mjs +1 -0
- package/dist/web-components/AnnotationMenu-BDPec3iI.mjs +1 -0
- package/dist/web-components/AnnotationState-Chs_37Kk.mjs +1 -0
- package/dist/web-components/Annotations-6E-oD_wg.mjs +2 -0
- package/dist/web-components/Annotations-CLPEq7Ro.mjs +1 -0
- package/dist/web-components/Body-Ct61yxI7.mjs +1 -0
- package/dist/web-components/BodyAlert-C_Qh3Up_.mjs +1 -0
- package/dist/web-components/Button-L8ZMy5lY.mjs +1 -0
- package/dist/web-components/{Camera-cdCqKMup.mjs → Camera-BPyLzZjP.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-CnLEHRs4.mjs → Canvas2DBackend-8wFavYdl.mjs} +1 -1
- package/dist/web-components/CanvasView-2Fj9nT06.mjs +2 -0
- package/dist/web-components/CaptionDetails-DuwS-grE.mjs +1 -0
- package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +1 -0
- package/dist/web-components/Chevron-Cyr_cc9X.mjs +1 -0
- package/dist/web-components/ChoiceMenu-ConzybVH.mjs +1 -0
- package/dist/web-components/Collection-CLayN8sv.mjs +1 -0
- package/dist/web-components/CollectionSelect-D2d8dGJ4.mjs +1 -0
- package/dist/web-components/Connected-CBQ6xyhr.mjs +1 -0
- package/dist/web-components/Connected-DMXG3imZ.mjs +1 -0
- package/dist/web-components/Connected-pyd0EBD3.mjs +1 -0
- package/dist/web-components/Contents-tCMXBYDK.mjs +1 -0
- package/dist/web-components/ControlMenu-D1zkB0qX.mjs +1 -0
- package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +1 -0
- package/dist/web-components/CountMenu-Dnzb7lKo.mjs +1 -0
- package/dist/web-components/Cue-CUGmPS3k.mjs +1 -0
- package/dist/web-components/Document-D-8nalCX.mjs +1 -0
- package/dist/web-components/{DomLayers-BD4QPbl6.mjs → DomLayers-BxPU05-D.mjs} +1 -1
- package/dist/web-components/Download-Bku9Vptk.mjs +1 -0
- package/dist/web-components/EntryBodies-77vDudCb.mjs +1 -0
- package/dist/web-components/EntryThumbnail-BxQWKW6e.mjs +1 -0
- package/dist/web-components/FieldPill-nFGsaru9.mjs +1 -0
- package/dist/web-components/FrameAnimation-BvKiSXcm.mjs +1 -0
- package/dist/web-components/Gallery-4Hd58afA.mjs +1 -0
- package/dist/web-components/HideToggle-TEhY4TS4.mjs +1 -0
- package/dist/web-components/ImageControls-CZO7WoPb.mjs +1 -0
- package/dist/web-components/Items-CudZ4Lnb.mjs +1 -0
- package/dist/web-components/Label-f07N5Fld.mjs +1 -0
- package/dist/web-components/LanguageChoice-B5VM21DV.mjs +1 -0
- package/dist/web-components/LightboxView-C4OASmkg.mjs +1 -0
- package/dist/web-components/ListEnd-M39M62Cl.mjs +1 -0
- package/dist/web-components/{Loaded-D5xmFRSo.mjs → Loaded-oGFyBuos.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-IvpSzPO6.mjs +1 -0
- package/dist/web-components/LoadedMap-WATGNLxl.mjs +1 -0
- package/dist/web-components/{Loading-CBKfwsML.mjs → Loading-YxuKrDAM.mjs} +1 -1
- package/dist/web-components/{Map-Bcgp_R8H.mjs → Map-Cw9j3gi3.mjs} +1 -1
- package/dist/web-components/MapView-3OxoCr5l.mjs +3 -0
- package/dist/web-components/Markup-DW75Jx3j.mjs +2 -0
- package/dist/web-components/MediaBody-CLtd0bf0.mjs +1 -0
- package/dist/web-components/MediaBody-JnKnoIqY.mjs +1 -0
- package/dist/web-components/NavDate-BCCOyycx.mjs +1 -0
- package/dist/web-components/{Navigator-BSJbEbuJ.mjs → Navigator-Bx4zS0Yr.mjs} +1 -1
- package/dist/web-components/Pager-B9GvQ64b.mjs +1 -0
- package/dist/web-components/PagerLayout-BF33VZL_.mjs +1 -0
- package/dist/web-components/Panel-BvDpCn6K.mjs +1 -0
- package/dist/web-components/PanelPart-Bd4lSUrP.mjs +1 -0
- package/dist/web-components/{PanelToggle-mUDw73zI.mjs → PanelToggle-bPcIULGZ.mjs} +1 -1
- package/dist/web-components/PartOfManifest-HLg-r00O.mjs +1 -0
- package/dist/web-components/{Pending-BPOQ2z1L.mjs → Pending-BxGjjnqq.mjs} +1 -1
- package/dist/web-components/PlaceBox-D-Zhe9-U.mjs +1 -0
- package/dist/web-components/Placeholder-DzY5hcbk.mjs +1 -0
- package/dist/web-components/Position-TYnzcm8e.mjs +1 -0
- package/dist/web-components/Primitives-C6VJXxZD.mjs +1 -0
- package/dist/web-components/Provider-DyB0wpeO.mjs +1 -0
- package/dist/web-components/ReadMore-De_0T7lc.mjs +1 -0
- package/dist/web-components/Root-Bt3NNBFb.mjs +1 -0
- package/dist/web-components/Scene-DrOM9YlD.mjs +1 -0
- package/dist/web-components/SceneView-DA7Yg20p.mjs +1 -0
- package/dist/web-components/Search-DgT8OPsK.mjs +1 -0
- package/dist/web-components/Sections-d1acn7qm.mjs +2 -0
- package/dist/web-components/StandaloneItems-DUb4YKCB.mjs +1 -0
- package/dist/web-components/Status-CcU3u6P4.mjs +1 -0
- package/dist/web-components/Steps-nlSCzbDQ.mjs +1 -0
- package/dist/web-components/TargetItems-BDJM3Ar-.mjs +1 -0
- package/dist/web-components/Timeline-BfdN3lIv.mjs +1 -0
- package/dist/web-components/Tip-OCB88zwY.mjs +1 -0
- package/dist/web-components/Transcript-bSA3cx_K.mjs +1 -0
- package/dist/web-components/Transport-DaIhfZqC.mjs +1 -0
- package/dist/web-components/Transport-DjOYI-fR.mjs +1 -0
- package/dist/web-components/annotation-collection-D8emkElk.mjs +1 -0
- package/dist/web-components/annotation-name-DbWjhgra.mjs +1 -0
- package/dist/web-components/annotations-content-Bg6aVAGC.mjs +1 -0
- package/dist/web-components/body-Ct8dmQdW.mjs +1 -0
- package/dist/web-components/canvas-goEZLqEd.mjs +1 -0
- package/dist/web-components/choice-key-BUNebLKe.mjs +1 -0
- package/dist/web-components/cloverEngine-Df7cMwOP.mjs +164 -0
- package/dist/web-components/content-state-reader-CNmBpG1L.mjs +1 -0
- package/dist/web-components/{controls-Dj2BybWb.mjs → controls-BZr16sYQ.mjs} +1 -1
- package/dist/web-components/custom-elements.json +260 -48
- package/dist/web-components/dates-DR3gfcON.mjs +1 -0
- package/dist/web-components/downloads-EjJ6Hpip.mjs +1 -0
- package/dist/web-components/dragToClose-X9NbZOhA.mjs +1 -0
- package/dist/web-components/{engine-BSt8LTso.mjs → engine-DMoc0tff.mjs} +1 -1
- package/dist/web-components/{engines-CC0OEsVE.mjs → engines-BmB81VXR.mjs} +1 -1
- package/dist/web-components/es-B1NvdYp-.mjs +1 -0
- package/dist/web-components/fetchManifest-CwQC6cCh.mjs +1 -0
- package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
- package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
- package/dist/web-components/fromManifest-DrAmY1lB.mjs +1 -0
- package/dist/web-components/glyphs-BFK_hvJJ.mjs +1 -0
- package/dist/web-components/hooks-BhtNDs_1.mjs +1 -0
- package/dist/web-components/image-layers-D2nQC4R-.mjs +1 -0
- package/dist/web-components/{imageService-dsdmcegU.mjs → imageService-iFElsopt.mjs} +1 -1
- package/dist/web-components/index-FJEpXukG.mjs +1 -0
- package/dist/web-components/index.d.mts +99 -14
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BPPrqbeh.mjs +1 -0
- package/dist/web-components/items-BnEnc5ot.mjs +1 -0
- package/dist/web-components/label-DauFa5sg.mjs +1 -0
- package/dist/web-components/layout-Djwu8f4R.mjs +1 -0
- package/dist/web-components/link-0lUlTZlw.mjs +1 -0
- package/dist/web-components/logo-DWPxaZaG.mjs +1 -0
- package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
- package/dist/web-components/models-BF2pqufA.mjs +1 -0
- package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
- package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
- package/dist/web-components/no-CEwZDBiR.mjs +1 -0
- package/dist/web-components/{nodes-B7JRwBgl.mjs → nodes-ChQRLDGU.mjs} +1 -1
- package/dist/web-components/{overlayImage-0OgQl1TL.mjs → overlayImage-MKrcgDep.mjs} +1 -1
- package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
- package/dist/web-components/{panel-CjXfre-g.mjs → panel-C13V6w6E.mjs} +1 -1
- package/dist/web-components/part-CekFWrtz.mjs +1 -0
- package/dist/web-components/playerSurface-DG1XipTq.mjs +1 -0
- package/dist/web-components/pointer-YQppt0at.mjs +1 -0
- package/dist/web-components/presentation-2-C-U79S_T.mjs +1 -0
- package/dist/web-components/{provider-C1wKfdjb.mjs → provider-DiUkZYiW.mjs} +1 -1
- package/dist/web-components/pt-CWR30SzS.mjs +1 -0
- package/dist/web-components/range-regions-CqGjyM76.mjs +1 -0
- package/dist/web-components/read-more-D8RJYdtQ.mjs +1 -0
- package/dist/web-components/readingLanguages-BWOLZK2k.mjs +1 -0
- package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +22 -0
- package/dist/web-components/{renderers-BMSWEFUR.mjs → renderers-LtRX5pT0.mjs} +1 -1
- package/dist/web-components/{resource-DLHocQ1C.mjs → resource-Cfydiy4m.mjs} +1 -1
- package/dist/web-components/sanitize-qIOeyIww.mjs +3 -0
- package/dist/web-components/save-file-dZyOpXgY.mjs +1 -0
- package/dist/web-components/search-BfUZJM3a.mjs +1 -0
- package/dist/web-components/sequence-C28xoNmD.mjs +1 -0
- package/dist/web-components/shared-DkY2a89G.mjs +1 -0
- package/dist/web-components/{show-link-CyzYE1eS.mjs → show-link-DgLJzG7k.mjs} +1 -1
- package/dist/web-components/{sizedImage-uv_NlE0l.mjs → sizedImage-NHzhcBYk.mjs} +1 -1
- package/dist/web-components/{split-CYuMjp89.mjs → split-CuFiKjin.mjs} +1 -1
- package/dist/web-components/{status-Ms5L0ghK.mjs → status-C3etlkhY.mjs} +1 -1
- package/dist/web-components/styles-DkkVOSUQ.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-DecrVnpj.mjs +1 -0
- package/dist/web-components/{tip-dWhupWSr.mjs → tip-D5YgaIWW.mjs} +1 -1
- package/dist/web-components/{toggle-BQTjR1I3.mjs → toggle-CZGB65VZ.mjs} +1 -1
- package/dist/web-components/upgrade-eNW0DPXq.mjs +1 -0
- package/dist/web-components/upgrader-BlbMUEH6.mjs +1 -0
- package/dist/web-components/useContainerName-hKQjEt7a.mjs +1 -0
- package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +1 -0
- package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +1 -0
- package/dist/web-components/useNearViewport-CDbHQUBk.mjs +1 -0
- package/dist/web-components/useScrollTrack-D9l_P3_B.mjs +1 -0
- package/dist/web-components/viewer/AnnotationItems-DtsnDXPM.mjs +1 -0
- package/dist/web-components/viewer/AnnotationMenu-C-Mz6CCn.mjs +1 -0
- package/dist/web-components/viewer/AnnotationState-5pim5K72.mjs +1 -0
- package/dist/web-components/viewer/Annotations-Cqn1TkzD.mjs +2 -0
- package/dist/web-components/viewer/Annotations-CxwN9FkB.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-CAmzJD5P.mjs → Canvas2DBackend-C-ZMSCak.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-CRD-gSZP.mjs +1 -0
- package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +1 -0
- package/dist/web-components/viewer/ChoiceMenu-ByGzQQx1.mjs +1 -0
- package/dist/web-components/viewer/Collection-m0GCcsfQ.mjs +1 -0
- package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +1 -0
- package/dist/web-components/viewer/Connected-Dvx7wtot.mjs +1 -0
- package/dist/web-components/viewer/Contents-CwDpfiJY.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-0-ie8kIZ.mjs +1 -0
- package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +1 -0
- package/dist/web-components/viewer/Document-BsryuYJ1.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-DRdQSEtN.mjs → DomLayers-hc0qARQc.mjs} +1 -1
- package/dist/web-components/viewer/Download-MO-1Rik4.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-g-OEwEsk.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-DcIDYATi.mjs +1 -0
- package/dist/web-components/viewer/FieldPill-B9S21lxw.mjs +1 -0
- package/dist/web-components/viewer/FrameAnimation-qI9cZPEs.mjs +1 -0
- package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +1 -0
- package/dist/web-components/viewer/HideToggle-D8wH49mq.mjs +1 -0
- package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-CRqsCBAp.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-D9Obxie4.mjs +1 -0
- package/dist/web-components/viewer/MapView-DQSwUzd7.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-D5ff6xy-.mjs +1 -0
- package/dist/web-components/viewer/NavDate-BnfDG57h.mjs +1 -0
- package/dist/web-components/viewer/{Navigator-CKwDgG2x.mjs → Navigator-BNwjmkXY.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-C8jraHqs.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +1 -0
- package/dist/web-components/viewer/PartOfManifest-DX7H0V4g.mjs +1 -0
- package/dist/web-components/viewer/PlaceBox-CCWfzsNU.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +1 -0
- package/dist/web-components/viewer/Search-CsdYzdq1.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-BfvBxbUm.mjs +1 -0
- package/dist/web-components/viewer/Steps-BH8ZApS4.mjs +1 -0
- package/dist/web-components/viewer/TargetItems-BebPFr-c.mjs +1 -0
- package/dist/web-components/viewer/Transcript-DXLv5WR9.mjs +1 -0
- package/dist/web-components/viewer/Transport-C-fh7Kx2.mjs +1 -0
- package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-Cjd8Dgyl.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +1 -0
- package/dist/web-components/viewer/annotations-content-BARXoAz-.mjs +1 -0
- package/dist/web-components/viewer/cloverEngine-CumnJPKO.mjs +164 -0
- package/dist/web-components/viewer/content-state-reader-DuvyLThu.mjs +1 -0
- package/dist/web-components/viewer/dragToClose-CFCxhUxn.mjs +1 -0
- package/dist/web-components/viewer/fetchManifest-qNB_KgxL.mjs +1 -0
- package/dist/web-components/viewer/{host-DlCltI_c.mjs → host-GTHX2fPK.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-DKOuaRTj.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/link-BlaM0tCa.mjs +1 -0
- package/dist/web-components/viewer/overlayImage-RVpv69R5.mjs +1 -0
- package/dist/web-components/viewer/range-regions-CIZiAHOp.mjs +1 -0
- package/dist/web-components/viewer/{renderers-C_wdmw9v.mjs → renderers-Dw1klwlx.mjs} +1 -1
- package/dist/web-components/viewer/save-file-EvzaBEJN.mjs +1 -0
- package/dist/web-components/viewer/{search-BHLyNxZ6.mjs → search-x1QL_bth.mjs} +1 -1
- package/dist/web-components/viewer/styles-I7_LWFGj.mjs +1 -0
- package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +1 -0
- package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +1 -0
- package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +29 -0
- package/dist/web-components/viewer/{vtt-XiS_-5Ao.mjs → vtt-C2G89SWH.mjs} +1 -1
- package/dist/web-components/viewer-Br44EEba.mjs +1 -0
- package/dist/web-components/{vtt-DYAOuQoK.mjs → vtt-Dd0c7psH.mjs} +1 -1
- package/package.json +8 -4
- package/dist/i18n/reader.mjs +0 -13
- package/dist/templates/shared/LightboxBody.mjs +0 -9
- package/dist/web-components/About-DbrFSVBm.mjs +0 -1
- package/dist/web-components/AnnotationMenu-EBjIQpQl.mjs +0 -1
- package/dist/web-components/AnnotationState-DQTaO6Gz.mjs +0 -1
- package/dist/web-components/Annotations-Cb9U7HJ_.mjs +0 -2
- package/dist/web-components/Annotations-Dl0SgHBS.mjs +0 -1
- package/dist/web-components/Body-DxSz3iST.mjs +0 -1
- package/dist/web-components/BodyAlert-C8EOXz24.mjs +0 -1
- package/dist/web-components/Button-uWgfvqsL.mjs +0 -1
- package/dist/web-components/CanvasView-BI3YzNdK.mjs +0 -1
- package/dist/web-components/CaptionDetails-B80ZhZ7v.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DCp7-co7.mjs +0 -1
- package/dist/web-components/Collection-B1Le2_TU.mjs +0 -1
- package/dist/web-components/CollectionSelect-BL_jQog-.mjs +0 -1
- package/dist/web-components/Connected-BxqaRL9o.mjs +0 -1
- package/dist/web-components/Connected-DCBI-j9H.mjs +0 -1
- package/dist/web-components/Connected-DkhfVWxd.mjs +0 -1
- package/dist/web-components/Contents-zYEGHLfe.mjs +0 -1
- package/dist/web-components/ControlMenu-CAHiLAtl.mjs +0 -1
- package/dist/web-components/Cue-BT2V9VAq.mjs +0 -1
- package/dist/web-components/Document-BdCjGnJN.mjs +0 -1
- package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +0 -1
- package/dist/web-components/Download-DqU-goFi.mjs +0 -1
- package/dist/web-components/EntryBodies-DXAQH0vR.mjs +0 -1
- package/dist/web-components/ErrorBoundary-chQaO-Up.mjs +0 -1
- package/dist/web-components/FieldPill-CyEssPVm.mjs +0 -1
- package/dist/web-components/FrameAnimation-Bb0pOoRl.mjs +0 -1
- package/dist/web-components/Gallery-BXU3TcT3.mjs +0 -1
- package/dist/web-components/HideToggle-BwMrOBMu.mjs +0 -1
- package/dist/web-components/Items-DRj1UEpC.mjs +0 -1
- package/dist/web-components/Label-D6aVJB9s.mjs +0 -1
- package/dist/web-components/LightboxBody-BzXQGMDn.mjs +0 -1
- package/dist/web-components/LoadedCanvas-DOjtxLSe.mjs +0 -1
- package/dist/web-components/LoadedMap-DouDS2lO.mjs +0 -1
- package/dist/web-components/MapView-CD5zkTs8.mjs +0 -1
- package/dist/web-components/Markup-C1hMA8wk.mjs +0 -2
- package/dist/web-components/MediaBody-B_Gii4we.mjs +0 -1
- package/dist/web-components/MediaBody-BfrKIPte.mjs +0 -1
- package/dist/web-components/Pager-Di_2hHM3.mjs +0 -1
- package/dist/web-components/Panel-DbsC8A9V.mjs +0 -1
- package/dist/web-components/PartOfManifest-7eOwURrF.mjs +0 -1
- package/dist/web-components/Primitives-XQO3m1wG.mjs +0 -1
- package/dist/web-components/Provider-B61118lU.mjs +0 -1
- package/dist/web-components/ReadMore-BJH-qqte.mjs +0 -1
- package/dist/web-components/Root-Dj277K6p.mjs +0 -1
- package/dist/web-components/Scene-BTWpLeec.mjs +0 -1
- package/dist/web-components/SceneView-BYo7WmPt.mjs +0 -1
- package/dist/web-components/Search-ZV8FFN4p.mjs +0 -1
- package/dist/web-components/Sections-ejwu1_Sm.mjs +0 -2
- package/dist/web-components/StandaloneItems-BYaiyCca.mjs +0 -1
- package/dist/web-components/Status-YbQK2KzY.mjs +0 -1
- package/dist/web-components/Timeline-ByyVSd7B.mjs +0 -1
- package/dist/web-components/Tip-IO11xX4x.mjs +0 -1
- package/dist/web-components/Transcript-D0gUxUoA.mjs +0 -1
- package/dist/web-components/annotation-collection-Csv7WIlm.mjs +0 -1
- package/dist/web-components/annotations-content-BS_OFz5Z.mjs +0 -1
- package/dist/web-components/body-CKjwwFep.mjs +0 -1
- package/dist/web-components/canvas-CIzpp-Uz.mjs +0 -1
- package/dist/web-components/cloverEngine-B4LinbSt.mjs +0 -164
- package/dist/web-components/content-state-reader-D1BkpICh.mjs +0 -1
- package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
- package/dist/web-components/es-BwMkoRod.mjs +0 -1
- package/dist/web-components/fi-gPFOn9RK.mjs +0 -1
- package/dist/web-components/fr-DUHmgdJo.mjs +0 -1
- package/dist/web-components/fromManifest-BhemHaoA.mjs +0 -1
- package/dist/web-components/glyphs-drROkef9.mjs +0 -1
- package/dist/web-components/hooks-BXzQSllm.mjs +0 -1
- package/dist/web-components/index-B7nZdqLg.mjs +0 -1
- package/dist/web-components/items-CB2Uk7ts.mjs +0 -1
- package/dist/web-components/items-jfQ5XzEj.mjs +0 -1
- package/dist/web-components/keep-fragments-B5nlv2ck.mjs +0 -1
- package/dist/web-components/label-Vbg_cMOJ.mjs +0 -1
- package/dist/web-components/layout-mMHI0lsj.mjs +0 -1
- package/dist/web-components/link-ZRnv5NFR.mjs +0 -1
- package/dist/web-components/logo-Boy6u4m2.mjs +0 -1
- package/dist/web-components/models-D1EE_CmH.mjs +0 -1
- package/dist/web-components/nb-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/nn-Dg2_HdZu.mjs +0 -1
- package/dist/web-components/no-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
- package/dist/web-components/part-cUiPs2-y.mjs +0 -1
- package/dist/web-components/playerSurface-CU5XxI1j.mjs +0 -1
- package/dist/web-components/pt-B3J80JgO.mjs +0 -1
- package/dist/web-components/read-more-DNHNtG-a.mjs +0 -1
- package/dist/web-components/rendererSurface-DhIlOjGT.mjs +0 -22
- package/dist/web-components/sanitize-Dc7nOsgO.mjs +0 -3
- package/dist/web-components/search-CLy2Wj01.mjs +0 -1
- package/dist/web-components/shared-YUjOSBKO.mjs +0 -1
- package/dist/web-components/styles-CyuM_fB1.mjs +0 -1
- package/dist/web-components/thumbnail-c2K_iQsD.mjs +0 -1
- package/dist/web-components/time-B9GZoYcm.mjs +0 -1
- package/dist/web-components/upgrader-XNxI-5jo.mjs +0 -1
- package/dist/web-components/useContainerName-BpJ3IWY0.mjs +0 -1
- package/dist/web-components/useNearViewport-CtLyYg9n.mjs +0 -1
- package/dist/web-components/useScrollTrack-WbG28FPD.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-ZKyBeyUU.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-DO33zokc.mjs +0 -1
- package/dist/web-components/viewer/Annotations-BOjhr5ks.mjs +0 -1
- package/dist/web-components/viewer/Annotations-DkLueFLK.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-DOJlUtOn.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-BDq6H34G.mjs +0 -1
- package/dist/web-components/viewer/Collection-By3puO0V.mjs +0 -1
- package/dist/web-components/viewer/Connected-DZNO2CPf.mjs +0 -1
- package/dist/web-components/viewer/Connected-ESg5y49m.mjs +0 -1
- package/dist/web-components/viewer/Contents-B_FqDwTW.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DdQl-dTf.mjs +0 -1
- package/dist/web-components/viewer/Cue-BTRHfiWQ.mjs +0 -1
- package/dist/web-components/viewer/Document-B9_PyD2w.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-CJuTRcTq.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-06uwrNwE.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-3dcDHf5q.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BYasTqZc.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-BxkNMX-T.mjs +0 -1
- package/dist/web-components/viewer/LightboxBody-CXMc1xOH.mjs +0 -1
- package/dist/web-components/viewer/MapView-DCerrRRV.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-BdkJcyGy.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-waF4KvHp.mjs +0 -1
- package/dist/web-components/viewer/PartOfManifest-DalHJFwC.mjs +0 -1
- package/dist/web-components/viewer/Search-Di_QQfDb.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-B9J6nnWn.mjs +0 -1
- package/dist/web-components/viewer/Transcript-aHOixfna.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-I2UkdobR.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-D-i4j9pD.mjs +0 -1
- package/dist/web-components/viewer/cloverEngine-CynoKdta.mjs +0 -164
- package/dist/web-components/viewer/content-state-reader-D7GIMcKK.mjs +0 -1
- package/dist/web-components/viewer/link-BX-wzj1u.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CHqn1fG8.mjs +0 -1
- package/dist/web-components/viewer/styles-BRCkEU3w.mjs +0 -1
- package/dist/web-components/viewer/viewer-ipqAA-xQ.mjs +0 -28
- package/dist/web-components/viewer-DEHIsIHd.mjs +0 -1
- /package/dist/{ui → i18n}/languageCode.mjs +0 -0
package/dist/ui/Sections.mjs
CHANGED
|
@@ -4,9 +4,11 @@ import { useRef, useState, useEffect, useLayoutEffect, createContext, useContext
|
|
|
4
4
|
import { useUniqueId } from "./useUniqueId.mjs";
|
|
5
5
|
import { titleTag } from "./heading.mjs";
|
|
6
6
|
import { Tip } from "./Tip.mjs";
|
|
7
|
-
import { useContainerName } from "
|
|
7
|
+
import { useContainerName } from "../i18n/useContainerName.mjs";
|
|
8
8
|
import { useScrollTrack } from "./useScrollTrack.mjs";
|
|
9
9
|
import { useCloverTranslation } from "../i18n/useCloverTranslation.mjs";
|
|
10
|
+
import { Chevron } from "./Chevron.mjs";
|
|
11
|
+
import { languageProps } from "../i18n/direction.mjs";
|
|
10
12
|
const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
11
13
|
const SectionActionsContext = createContext(null);
|
|
12
14
|
function useSectionActions() {
|
|
@@ -209,11 +211,11 @@ function Sections({
|
|
|
209
211
|
"button",
|
|
210
212
|
{
|
|
211
213
|
type: "button",
|
|
212
|
-
className: `clover-sections-scroll-${step}`,
|
|
214
|
+
className: `clover-steps-step clover-sections-scroll-${step}`,
|
|
213
215
|
"aria-hidden": "true",
|
|
214
216
|
tabIndex: -1,
|
|
215
217
|
hidden: !more,
|
|
216
|
-
|
|
218
|
+
...languageProps(langOf(key)),
|
|
217
219
|
onMouseDown: (event) => event.preventDefault(),
|
|
218
220
|
onClick: step === "prev" ? track.scrollPrev : track.scrollNext,
|
|
219
221
|
children: [
|
|
@@ -222,8 +224,8 @@ function Sections({
|
|
|
222
224
|
{
|
|
223
225
|
"aria-hidden": "true",
|
|
224
226
|
focusable: "false",
|
|
225
|
-
width: "
|
|
226
|
-
height: "
|
|
227
|
+
width: "12",
|
|
228
|
+
height: "12",
|
|
227
229
|
viewBox: "0 0 16 16",
|
|
228
230
|
children: /* @__PURE__ */ jsx(
|
|
229
231
|
"path",
|
|
@@ -271,28 +273,7 @@ function Sections({
|
|
|
271
273
|
onKeyDown: (event) => onKeyDown(event, index),
|
|
272
274
|
children: [
|
|
273
275
|
/* @__PURE__ */ jsx("span", { className: "clover-sections-label", children: item.label }),
|
|
274
|
-
!tabs &&
|
|
275
|
-
"svg",
|
|
276
|
-
{
|
|
277
|
-
"aria-hidden": "true",
|
|
278
|
-
focusable: "false",
|
|
279
|
-
width: "12",
|
|
280
|
-
height: "12",
|
|
281
|
-
viewBox: "0 0 12 12",
|
|
282
|
-
className: "clover-sections-chevron",
|
|
283
|
-
children: /* @__PURE__ */ jsx(
|
|
284
|
-
"path",
|
|
285
|
-
{
|
|
286
|
-
d: "M3 4.5l3 3 3-3",
|
|
287
|
-
fill: "none",
|
|
288
|
-
stroke: "currentColor",
|
|
289
|
-
strokeWidth: "1.5",
|
|
290
|
-
strokeLinecap: "round",
|
|
291
|
-
strokeLinejoin: "round"
|
|
292
|
-
}
|
|
293
|
-
)
|
|
294
|
-
}
|
|
295
|
-
)
|
|
276
|
+
!tabs && /* @__PURE__ */ jsx(Chevron, { open: isOpen, className: "clover-sections-chevron" })
|
|
296
277
|
]
|
|
297
278
|
},
|
|
298
279
|
item.value
|
|
@@ -358,6 +339,7 @@ function Sections({
|
|
|
358
339
|
tabs,
|
|
359
340
|
labelledBy: `${id}-button-${index}`,
|
|
360
341
|
hidden: !isOpen,
|
|
342
|
+
actions: item.actions,
|
|
361
343
|
children: mounted.current.has(item.value) ? item.content : null
|
|
362
344
|
}
|
|
363
345
|
)
|
|
@@ -377,34 +359,40 @@ function Panel({
|
|
|
377
359
|
tabs,
|
|
378
360
|
labelledBy,
|
|
379
361
|
hidden,
|
|
362
|
+
actions: own,
|
|
380
363
|
children
|
|
381
364
|
}) {
|
|
382
365
|
const [actions, setActions] = useState(null);
|
|
366
|
+
const shown = !hidden || Boolean(own);
|
|
383
367
|
useIsomorphicLayoutEffect(() => {
|
|
384
368
|
const section = actions == null ? void 0 : actions.parentElement;
|
|
385
|
-
if (
|
|
369
|
+
if (!shown || !actions || !section || typeof ResizeObserver === "undefined")
|
|
386
370
|
return;
|
|
387
371
|
const observer = new ResizeObserver(() => {
|
|
388
372
|
const width = actions.offsetWidth;
|
|
389
373
|
if (width) {
|
|
390
374
|
section.style.setProperty("--clover-sections-actions", `${width}px`);
|
|
375
|
+
section.setAttribute("data-actions", "");
|
|
391
376
|
} else {
|
|
392
377
|
section.style.removeProperty("--clover-sections-actions");
|
|
378
|
+
section.removeAttribute("data-actions");
|
|
393
379
|
}
|
|
394
380
|
});
|
|
395
381
|
observer.observe(actions);
|
|
396
382
|
return () => {
|
|
397
383
|
observer.disconnect();
|
|
398
384
|
section.style.removeProperty("--clover-sections-actions");
|
|
385
|
+
section.removeAttribute("data-actions");
|
|
399
386
|
};
|
|
400
|
-
}, [actions,
|
|
387
|
+
}, [actions, shown]);
|
|
401
388
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
402
389
|
!tabs && /* @__PURE__ */ jsx(
|
|
403
390
|
"div",
|
|
404
391
|
{
|
|
405
392
|
ref: setActions,
|
|
406
393
|
className: "clover-sections-actions",
|
|
407
|
-
hidden
|
|
394
|
+
hidden: !shown,
|
|
395
|
+
children: own
|
|
408
396
|
}
|
|
409
397
|
),
|
|
410
398
|
/* @__PURE__ */ jsx(
|
|
@@ -416,7 +404,10 @@ function Panel({
|
|
|
416
404
|
tabIndex: tabs ? 0 : void 0,
|
|
417
405
|
className: "clover-sections-panel",
|
|
418
406
|
hidden,
|
|
419
|
-
children: /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ jsxs(SectionActionsContext.Provider, { value: tabs ? null : actions, children: [
|
|
408
|
+
tabs && own,
|
|
409
|
+
children
|
|
410
|
+
] })
|
|
420
411
|
}
|
|
421
412
|
)
|
|
422
413
|
] });
|
package/dist/ui/Steps.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { useCloverTranslation } from "../i18n/useCloverTranslation.mjs";
|
|
|
4
4
|
import { join } from "../lib/classnames.mjs";
|
|
5
5
|
import { Tip } from "./Tip.mjs";
|
|
6
6
|
import { visuallyHidden } from "./visuallyHidden.mjs";
|
|
7
|
+
import { languageProps } from "../i18n/direction.mjs";
|
|
7
8
|
function Steps({
|
|
8
9
|
steps,
|
|
9
10
|
sentence,
|
|
@@ -15,7 +16,7 @@ function Steps({
|
|
|
15
16
|
const current = position + 1;
|
|
16
17
|
return /* @__PURE__ */ jsxs("div", { className: join("clover-steps", className), children: [
|
|
17
18
|
/* @__PURE__ */ jsxs("span", { "aria-live": "polite", className: "clover-steps-position", children: [
|
|
18
|
-
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": sentence ? "true" : void 0, children: [
|
|
19
20
|
current > 0 ? current : "–",
|
|
20
21
|
" / ",
|
|
21
22
|
total
|
|
@@ -25,7 +26,7 @@ function Steps({
|
|
|
25
26
|
" / ",
|
|
26
27
|
total
|
|
27
28
|
] }),
|
|
28
|
-
current > 0 && /* @__PURE__ */ jsx("span", { style: visuallyHidden,
|
|
29
|
+
sentence && current > 0 && /* @__PURE__ */ jsx("span", { style: visuallyHidden, ...languageProps(langOf(sentence)), children: t(sentence, { index: current, total }) })
|
|
29
30
|
] }),
|
|
30
31
|
/* @__PURE__ */ jsx(Step, { steps, step: "previous" }),
|
|
31
32
|
/* @__PURE__ */ jsx(Step, { steps, step: "next" })
|
|
@@ -45,7 +46,7 @@ function Step({
|
|
|
45
46
|
type: "button",
|
|
46
47
|
className: "clover-steps-step",
|
|
47
48
|
"data-step": step,
|
|
48
|
-
|
|
49
|
+
...languageProps(langOf(key)),
|
|
49
50
|
"aria-disabled": !available || void 0,
|
|
50
51
|
tabIndex: available ? void 0 : -1,
|
|
51
52
|
onClick: () => {
|
package/dist/ui/Tip.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useEffect } from "react";
|
|
4
4
|
import { useCloverTranslation } from "../i18n/useCloverTranslation.mjs";
|
|
5
|
+
import { languageProps } from "../i18n/direction.mjs";
|
|
5
6
|
const SHORTCUTS = {
|
|
6
7
|
zoomIn: { keys: "Plus", glyph: "+" },
|
|
7
8
|
zoomOut: { keys: "-", glyph: "−" },
|
|
@@ -33,7 +34,9 @@ function Tip({
|
|
|
33
34
|
lang,
|
|
34
35
|
shortcut,
|
|
35
36
|
scrolls = false,
|
|
36
|
-
image
|
|
37
|
+
image,
|
|
38
|
+
lead,
|
|
39
|
+
after
|
|
37
40
|
}) {
|
|
38
41
|
const { t } = useCloverTranslation();
|
|
39
42
|
const ref = useRef(null);
|
|
@@ -42,14 +45,14 @@ function Tip({
|
|
|
42
45
|
useEffect(() => {
|
|
43
46
|
const tip = ref.current;
|
|
44
47
|
if (tip && isShown(tip)) keepInside(tip);
|
|
45
|
-
}, [text]);
|
|
48
|
+
}, [text, lead]);
|
|
46
49
|
return /* @__PURE__ */ jsxs(
|
|
47
50
|
"span",
|
|
48
51
|
{
|
|
49
52
|
ref,
|
|
50
53
|
className: "clover-tip",
|
|
51
54
|
"aria-hidden": "true",
|
|
52
|
-
lang,
|
|
55
|
+
...languageProps(lang),
|
|
53
56
|
...scrolls && {
|
|
54
57
|
tabIndex: -1,
|
|
55
58
|
onMouseDown: (event) => {
|
|
@@ -72,7 +75,9 @@ function Tip({
|
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
),
|
|
75
|
-
|
|
78
|
+
lead && /* @__PURE__ */ jsx("span", { className: "clover-tip-lead", children: lead }),
|
|
79
|
+
text,
|
|
80
|
+
after != null && after !== false && /* @__PURE__ */ jsx("span", { className: "clover-tip-after", children: after })
|
|
76
81
|
]
|
|
77
82
|
}
|
|
78
83
|
);
|
package/dist/ui/mediaIcons.mjs
CHANGED
|
@@ -75,27 +75,54 @@ const CaptionsIcon = ({ on = false }) => /* @__PURE__ */ jsxs("svg", { ...svgPro
|
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] });
|
|
78
|
-
const
|
|
78
|
+
const Frame = () => /* @__PURE__ */ jsx(
|
|
79
|
+
"rect",
|
|
80
|
+
{
|
|
81
|
+
x: "40",
|
|
82
|
+
y: "104",
|
|
83
|
+
width: "432",
|
|
84
|
+
height: "304",
|
|
85
|
+
rx: "56",
|
|
86
|
+
fill: "none",
|
|
87
|
+
stroke: "currentColor",
|
|
88
|
+
strokeWidth: "36"
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
const FillIcon = () => /* @__PURE__ */ jsxs("svg", { ...svgProps, children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Frame, {}),
|
|
79
93
|
/* @__PURE__ */ jsx(
|
|
80
94
|
"path",
|
|
81
95
|
{
|
|
82
|
-
d: "
|
|
96
|
+
d: "M204 208l-48 48 48 48M308 208l48 48-48 48",
|
|
83
97
|
fill: "none",
|
|
84
98
|
stroke: "currentColor",
|
|
85
99
|
strokeLinecap: "round",
|
|
86
|
-
|
|
100
|
+
strokeLinejoin: "round",
|
|
101
|
+
strokeWidth: "36"
|
|
87
102
|
}
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */ jsx(
|
|
103
|
+
)
|
|
104
|
+
] });
|
|
105
|
+
const FitIcon = () => /* @__PURE__ */ jsxs("svg", { ...svgProps, children: [
|
|
106
|
+
/* @__PURE__ */ jsx(Frame, {}),
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
"path",
|
|
109
|
+
{
|
|
110
|
+
d: "M140 208l48 48-48 48M372 208l-48 48 48 48",
|
|
111
|
+
fill: "none",
|
|
112
|
+
stroke: "currentColor",
|
|
113
|
+
strokeLinecap: "round",
|
|
114
|
+
strokeLinejoin: "round",
|
|
115
|
+
strokeWidth: "36"
|
|
116
|
+
}
|
|
117
|
+
)
|
|
92
118
|
] });
|
|
93
119
|
const FullScreenIcon = () => /* @__PURE__ */ jsx("svg", { ...svgProps, children: /* @__PURE__ */ jsx(ZoomFullScreen, {}) });
|
|
94
120
|
const ExitFullScreenIcon = () => /* @__PURE__ */ jsx("svg", { ...svgProps, children: /* @__PURE__ */ jsx(ZoomExitFullScreen, {}) });
|
|
95
121
|
export {
|
|
96
122
|
CaptionsIcon,
|
|
97
|
-
ChaptersIcon,
|
|
98
123
|
ExitFullScreenIcon,
|
|
124
|
+
FillIcon,
|
|
125
|
+
FitIcon,
|
|
99
126
|
FullScreenIcon,
|
|
100
127
|
PauseIcon,
|
|
101
128
|
PlayIcon,
|
|
@@ -64,7 +64,7 @@ function useScrollTrack({
|
|
|
64
64
|
const slide = viewport == null ? void 0 : viewport.querySelector(
|
|
65
65
|
`[data-track-index="${index}"]`
|
|
66
66
|
);
|
|
67
|
-
if (!viewport || !slide) return;
|
|
67
|
+
if (!viewport || !slide) return false;
|
|
68
68
|
const box = viewport.getBoundingClientRect();
|
|
69
69
|
const rect = slide.getBoundingClientRect();
|
|
70
70
|
const rtl = getComputedStyle(viewport).direction === "rtl";
|
|
@@ -72,6 +72,7 @@ function useScrollTrack({
|
|
|
72
72
|
alignment.current === "center" ? rect.left + rect.width / 2 - (box.left + box.width / 2) : rtl ? rect.right - box.right : rect.left - box.left,
|
|
73
73
|
instant
|
|
74
74
|
);
|
|
75
|
+
return true;
|
|
75
76
|
},
|
|
76
77
|
[viewport, scrollAlong]
|
|
77
78
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as I,u as e,z as p,P as g,x as T,a as $,c as M,A as _,y as F,b as H,V as D,l as V}from"./shared-DkY2a89G.mjs";import{j as k}from"./classnames-DukgfdpI.mjs";import{u as G}from"./readingLanguages-BWOLZK2k.mjs";import{Thumbnail as B,Summary as O,Metadata as Q,RequiredStatement as U,Rights as W,Homepage as E,SeeAlso as J,Id as X}from"./Primitives-C6VJXxZD.mjs";import{u as Y}from"./downloads-EjJ6Hpip.mjs";import{P as Z}from"./Provider-DyB0wpeO.mjs";import{a as K,t as ee}from"./heading-Cjt0f-Eu.mjs";import{L as te}from"./Label-f07N5Fld.mjs";import{r as oe}from"./dates-DR3gfcON.mjs";import"./styles-DkkVOSUQ.mjs";const ae=p(()=>import("./LanguageChoice-B5VM21DV.mjs").then(o=>({default:o.LanguageChoice}))),re=I(false);function ne({part:o}){const r=G();return r?e(g,{fallback:null,children:e(ae,{...r,nameKey:"readingLanguage",part:o})}):null}const le=p(()=>import("./Download-Bku9Vptk.mjs").then(({DownloadGroups:o})=>({default:o}))),se=p(()=>import("./NavDate-BCCOyycx.mjs").then(o=>o.a).then(({NavDate:o})=>({default:o}))),ce=p(()=>import("./PartOfManifest-HLg-r00O.mjs"));function ue({languages:o=true,...r}){const n=T(re);return e(ie,{...r,download:!n&&r.download!==false,choice:n||!o?null:e(ne,{part:"clover-about"})})}function ie({choice:o,canvasSummary:r=false,headingLevel:n=3,download:C=true,thumbnail:y=true,label:b=true,className:q,...R}){const{t:x,langOf:L}=$(),f=Y(),a=M(t=>t.manifest,Object.is,"About"),P=_(null);F(()=>{const t=P.current,s=t==null?void 0:t.querySelector(".clover-about-head");if(!t||!s||typeof ResizeObserver>"u")return;const c=new Set,u=()=>{const A=s.querySelector(".clover-about-thumbnail"),h=s.querySelector(".clover-about-label");for(const v of[A,h])v&&!c.has(v)&&(c.add(v),d.observe(v));const i=t.style;if(!A){i.removeProperty("--clover-about-label-height"),i.removeProperty("--clover-about-thumbnail-width");return}const N=`${(h==null?void 0:h.offsetHeight)??0}px`,S=`${A.offsetWidth}px`;i.getPropertyValue("--clover-about-label-height")!==N&&i.setProperty("--clover-about-label-height",N),i.getPropertyValue("--clover-about-thumbnail-width")!==S&&i.setProperty("--clover-about-thumbnail-width",S)};let m=0;const d=new ResizeObserver(()=>{cancelAnimationFrame(m),m=requestAnimationFrame(u)});return d.observe(s),u(),()=>{cancelAnimationFrame(m),d.disconnect(),t.style.removeProperty("--clover-about-label-height"),t.style.removeProperty("--clover-about-thumbnail-width")}},[b,y,a]);const j=H(),z=()=>{var c,u;const t=P.current;(u=((c=t==null?void 0:t.closest(".clover-sections-item"))==null?void 0:c.querySelector(".clover-sections-button"))??t)==null||u.focus({preventScroll:true})};if(!a)return null;const l=(t,s,c)=>{if(!s)return null;const{as:u,title:m,group:d}=ee(n,`${j}-${t}`);return e("section",{className:"clover-about-section",...d,children:[e(u,{className:"clover-about-heading",...V(L(t)),...m,children:x(t)}),c]})},w=t=>Array.isArray(a[t])?a[t].length>0:!!a[t];return e("div",{ref:P,className:k("clover-about",q),tabIndex:-1,...R,children:[o,(y||b)&&e("div",{className:"clover-about-head",children:[y&&e(B,{className:"clover-about-thumbnail",size:256,alt:b?"":void 0}),b&&e(te,{as:K(n),className:"clover-about-label clover-title"})]}),r&&e(O,{of:"canvas",className:"clover-about-summary"}),D(a)&&a.partOf&&e(g,{fallback:null,children:e(ce,{manifest:a,headingLevel:n,onOpened:z})}),e(O,{className:"clover-about-summary"}),e(Q,{className:"clover-about-metadata"}),e(U,{className:"clover-about-metadata"}),l("aboutDate",oe(a.navDate),e(g,{fallback:null,children:e(se,{value:a.navDate,className:"clover-about-date"})})),l("aboutProvider",w("provider"),e(Z,{})),l("aboutRights",a.rights,e(W,{})),l("aboutHomepage",w("homepage"),e(E,{})),l("aboutSeeAlso",w("seeAlso"),e(J,{})),l("download",C&&f.page.length+f.all.length>0,e(g,{fallback:null,children:e(le,{page:f.page,all:f.all,headingLevel:n+1})})),l(D(a)?"aboutCanvas":"aboutManifest",a.id,e(X,{}))]})}const we=Object.freeze(Object.defineProperty({__proto__:null,About:ue},Symbol.toStringTag,{value:"Module"}));export{ue as A,re as I,we as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as P,c as v,ag as _,T as E,G as O,A as R,y as T,u as f,k,d as q,Y as F}from"./shared-DkY2a89G.mjs";import{P as G,a as L}from"./Items-CudZ4Lnb.mjs";import{C as y}from"./CountMenu-Dnzb7lKo.mjs";import{a as B}from"./annotation-name-DbWjhgra.mjs";import{f as D,r as K}from"./fetchManifest-CwQC6cCh.mjs";import{u as V,L as Y}from"./ListEnd-M39M62Cl.mjs";function j({onSelect:o,forwardedRef:r,...c}){const{clover:l,language:e}=P("Items"),n=v(t=>t.manifest),s=v(t=>_(t.manifest,t.addedSets)),u=v(t=>t.annotationId),d=(s==null?void 0:s.pages)??z,m=(s==null?void 0:s.entries)??H,{loaded:A,more:N,reachNext:S}=V(d),x=E(()=>[...new Set(m.map(t=>O(t.annotation)).filter(t=>!!t&&t!==(n==null?void 0:n.id)))],[m,n==null?void 0:n.id]),C=Q(c.layout==="pager"?J:x),M=x.length>0,i=E(()=>{const t=d.length?new Set(d.slice(0,A).map(a=>a.id)):null;return m.filter(a=>!t||t.has(a.setId)).map(a=>{const g=O(a.annotation),p=g&&g!==(n==null?void 0:n.id)?C.get(g)??null:n;return W(a,p,e,M)})},[d,A,m,n,C,M,e]),b=Math.max((s==null?void 0:s.total)??0,i.length),I=R(null);if(T(()=>{const t=I.current;t===null||!i[t]||(I.current=null,l.selectAnnotation(i[t].id))},[l,i]),!i.length)return null;const h=i.findIndex(t=>t.id===u),w=(t,a)=>{o==null||o(t,a),l.selectAnnotation(t.id)};return c.layout==="pager"?f(G,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,g)=>{const p=h+a;if(!(p<0)){if(i[p])return w(i[p],g);N&&(I.current=p,S())}}},nameKey:"informationPanelTabsAnnotations",position:f(y,{position:h,total:b,list:a=>f(j,{layout:"list",forwardedRef:null,onSelect:a})})}):f(k,{children:[f(L,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&f(Y,{onReached:S})]})}const z=[],H=[],J=[];function Q(o){const{clover:r}=P("Items"),[c,l]=q(U);return T(()=>{if(!o.length)return;let e=true;for(const n of o)D(r,n).then(s=>{e&&s&&l(u=>u.has(n)?u:new Map(u).set(n,s))});return()=>{e=false}},[r,o]),c}const U=new Map;function W(o,r,c,l){const e=F(r,o.canvasId),n=B(o.bodies,c),s=n.text?{[n.lang??"none"]:[n.text]}:e==null?void 0:e.label,u=l?r==null?void 0:r.label:e==null?void 0:e.label,d=e&&o.target.rect?K(e,o.target.rect):void 0;return{id:o.id,label:s,summary:n.text?u:void 0,parts:[{id:o.id,type:"Canvas",label:s,resource:e??{id:o.canvasId},...d?{source:d}:{}}]}}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e,l as N}from"./shared-DkY2a89G.mjs";import{s as E}from"./Annotations-CLPEq7Ro.mjs";import H from"./ControlMenu-D1zkB0qX.mjs";import{C as T}from"./Cue-CUGmPS3k.mjs";import{H as $}from"./HideToggle-TEhY4TS4.mjs";import{u as w}from"./useContainerName-hKQjEt7a.mjs";import"./styles-DkkVOSUQ.mjs";const q=({id:m,triggerId:b,label:C,labelLang:y,annotations:d,hiddenPages:M=[],onPageVisibilityChange:g,selected:x,onSelect:v,onActivate:i,onClose:k})=>{const u=w(C,y),c=[];d.forEach((a,r)=>{var o,l;const t=c[c.length-1];t&&((o=t.page)==null?void 0:o.text)===((l=a.page)==null?void 0:l.text)?t.items.push(r):c.push({page:a.page,items:[r]})});const I=c.some(a=>!a.page);return e(H,{className:"clover-canvas-annotation-menu","data-testid":"clover-canvas-annotation-menu",id:m,onClose:k,triggerId:b,children:[I&&u.node,c.map((a,r)=>{const t=[...new Set(a.items.flatMap(s=>d[s].pageId??[]))],o=`${m}-page-${r}`,l=g&&t.length>0&&e($,{hidden:t.every(s=>M.includes(s)),onChange:s=>g(t,!s),of:a.page?o:void 0});return e("fieldset",{...a.page?{"aria-labelledby":o}:u.props,className:"clover-canvas-menu-group clover-annotations-set",children:[a.page?e("legend",{className:"clover-canvas-menu-legend clover-annotations-set-header",children:[e("span",{className:"clover-annotations-title",id:o,...N(a.page.lang),children:a.page.text}),l]}):l&&e("div",{className:"clover-annotations-set-header",children:l}),e("div",{className:"clover-annotations-list",children:a.items.map(s=>{const n=d[s],h=E(n),p=x===n.id,f="image"in n?n.image:void 0;return e("label",{className:"clover-canvas-menu-item clover-annotations-entry","data-selected":p,onMouseEnter:()=>i(n.id),onMouseLeave:()=>i(null),children:[e("input",{type:"radio",name:m,checked:p,onChange:()=>v(n),onClick:()=>p&&v(n),onFocus:()=>i(n.id),onBlur:()=>i(null)}),h!==void 0&&e(T,{start:h,className:"clover-annotations-time"}),e("span",{className:"clover-annotations-body clover-cue-text",children:[f&&e("img",{className:"clover-annotations-image",src:f,alt:"",loading:"lazy"}),e("span",{className:"clover-annotations-text",...N(n.label?n.lang:void 0),children:n.label??String(s+1)})]})]},n.id)})})]},r)})]})};export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as i,a9 as qt,f as bt,d as C,aE as Gt,q as k,A as l,E as jt,y as z,_ as kt,u as zt}from"./shared-DkY2a89G.mjs";import{w as Dt,p as It,g as Ot,t as Jt,A as Ut}from"./Annotations-CLPEq7Ro.mjs";import{h as Xt}from"./layout-Djwu8f4R.mjs";const Yt=()=>import("./svg-shape-DLY3g7oq.mjs");function Zt(w){var S;const c=i(()=>!!(w!=null&&w.some(({annotation:o})=>{var p;return(p=qt(o==null?void 0:o.target))==null?void 0:p.svg})),[w]);return((S=bt(Yt,c))==null?void 0:S.readSvgShape)??null}const xt=[];function Et({given:w,annotations:c,scene:S,renderer:o,sceneVersion:p,drawn:E,media:I,mediaElement:g,showPlaceholder:F,canvasKey:D,openImages:tt,openMedia:et,host:nt,onModel:H,refind:_=0}){const{canvases:d,language:v,hiddenPages:rt,unlistedPages:yt,onPageVisibilityChange:ct,onAnnotationActive:ut,selectedAnnotation:st,animateAnnotations:ot=false,highlightedAnnotation:Ct,onAnnotationSelect:lt,onAnnotationLink:J}=w,[B,Ft]=C([]),[it,Ht]=C([]),L=rt!==void 0,U=i(()=>{var n;if(L)return xt;const t=new Map;for(const r of c){if(!r.pageId)continue;const f=!(Number((n=d==null?void 0:d[r.targetIndex])==null?void 0:n.duration)>0)&&Gt(r.annotation.motivation,qt(Array.isArray(r.annotation.target)?r.annotation.target[0]:r.annotation.target));t.set(r.pageId,(t.get(r.pageId)??true)&&f)}const e=[...t].filter(([,r])=>r).map(([r])=>r);return e.length?e:xt},[L,c,d]),_t=i(()=>{const t=U.filter(e=>!it.includes(e)&&!B.includes(e));return t.length?[...B,...t]:B},[B,it,U]),a=rt??_t,X=yt??U,N=k(t=>X.length?t.filter(e=>!e.pageId||!X.includes(e.pageId)):t,[X]),dt=i(()=>N(c).length,[c,N]),T=k(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),Q=l(ct);Q.current=ct;const R=k((t,e)=>{var n;(n=Q.current)==null||n.call(Q,t,e),!L&&(Ft(r=>{const s=r.filter(f=>!t.includes(f));return e?s:[...s,...t]}),Ht(r=>{const s=r.filter(f=>!t.includes(f));return e?[...s,...t]:s}))},[L]),gt=i(()=>Dt(T(c),d),[c,T,d]),O=i(()=>{if(!(!S||!d))return(t,e,n)=>{const r=d.findIndex(Wt=>Wt.id===e),s=r===-1?n:r,f=S.placements[s];return f?Xt(d[s],f,t):null}},[S,d]),W=Zt(c),P=i(()=>o&&p>0&&E?It(c,O??((t,e,n)=>o.itemRectToWorld(n,t)),W,v):[],[o,c,p,E,O,W,v]),x=i(()=>T(P),[P,T]),Y=i(()=>P.length||!O?P:It(c,O,W,v),[P,O,c,W,v]),[Bt,Lt]=C(null),[Nt,ft]=C(null),u=st!==void 0?st:Nt,A=l(null),h=l(ut);h.current=ut;const m=l(lt);m.current=lt;const Z=k(t=>{var e;Lt(t),(e=h.current)==null||e.call(h,t)},[]),$=l(ot);$.current=ot;const pt=l(false);pt.current=F;const V=l(g);V.current=g;const at=l(o);at.current=o;const q=l(null),Pt=l(a);Pt.current=a;const ht=l(R);ht.current=R;const K=k(t=>{var e,n,r;if(t.pageId&&Pt.current.includes(t.pageId)&&ht.current([t.pageId],true),ft(t.id),(e=h.current)==null||e.call(h,t.id),(n=m.current)==null||n.call(m,t.id),!pt.current){if("start"in t){const s=V.current;if(!s)return;q.current=t.id,jt(s,t.start);return}if(A.current=t.id,t.track){const s=V.current;s&&Ot(t,s)&&(q.current=t.id);return}(r=at.current)==null||r.fitAnnotation(t.world,!$.current)}},[]),mt=l(u);mt.current=u;const b=k(()=>{var t;return mt.current?(ft(null),A.current=null,(t=m.current)==null||t.call(m,null),true):false},[]),G=l(J);G.current=J;const wt=!!J,Qt=i(()=>wt?t=>{var e,n;(e=nt.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[wt,b,nt]),St=l(_);z(()=>{if(!u){A.current=null;return}if(St.current!==_&&(St.current=_,A.current=null),A.current===u)return;const t=r=>r.find(s=>s.id===u),e=t(x),n=e??t(P);if(n){if(A.current=n.id,n.track){!e&&g&&Ot(n,g);return}o==null||o.fitAnnotation(n.world,!$.current)}},[u,x,P,g,o,_]);const y=i(()=>I?Jt(c,v):[],[I,c,v]),j=i(()=>T(y),[y,T]),vt=i(()=>N(y.length?[...Y,...y]:Y),[Y,y,N]);z(()=>{if(!u){q.current=null;return}if(q.current===u||!g)return;const t=j.find(e=>e.id===u);t&&(q.current=t.id,g.currentTime=t.start)},[u,j,g]);const M=l(null),[Tt,Rt]=C(null);z(()=>{M.current=u??null},[u]),z(()=>{const t=M.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(M.current=null,!!F)){if(!I){tt(true);return}et(D),Rt(D)}},[u,c,F,I,D,tt,et]);const At=i(()=>({menu:vt,placed:x,timed:j,hiddenPages:a,setPagesVisible:R,listedCount:dt,comments:gt,selected:u??null,select:K,activate:Z,release:b,quietlyOpened:Tt}),[vt,x,j,a,R,dt,gt,u,K,Z,b,Tt]);return kt(()=>H(At),[At,H]),kt(()=>()=>H(null),[H]),o&&p>0&&!F?zt(Ut,{renderer:o,placed:x,sceneVersion:p,active:Bt??Ct??u,selected:u,onActivate:Z,onSelect:K,onFollow:Qt,media:I?g:void 0}):null}export{Et as AnnotationState};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{D as ct,a as Z,e as z,c as y,s as Lt,n as kt,o as Ct,R as lt,r as Nt,u as a,t as V,w as $t,B as rt,E as At,b as dt,F as ut,T as M,d as tt,A as Tt,y as X,l as B,G as Et,H as Ot,v as Mt,k as ot,f as Bt}from"./shared-DkY2a89G.mjs";import{E as qt}from"./EntryBodies-77vDudCb.mjs";import{u as yt,L as Pt}from"./ListEnd-M39M62Cl.mjs";import{a as Rt}from"./annotation-name-DbWjhgra.mjs";import{r as Vt,a as Ft}from"./link-0lUlTZlw.mjs";import{s as Ht}from"./show-link-DgLJzG7k.mjs";import{f as jt,r as Gt}from"./fetchManifest-CwQC6cCh.mjs";import{j as mt}from"./classnames-DukgfdpI.mjs";import{b as it,s as Kt}from"./bringIntoView-CQH5ZgMM.mjs";import{a as Y}from"./heading-Cjt0f-Eu.mjs";import{C as _t}from"./Cue-CUGmPS3k.mjs";import{E as zt}from"./EntryThumbnail-BxQWKW6e.mjs";import{H as ft}from"./HideToggle-TEhY4TS4.mjs";import{u as ht,s as _}from"./readingLanguages-BWOLZK2k.mjs";import{LanguageChoice as gt}from"./LanguageChoice-B5VM21DV.mjs";import"./styles-DkkVOSUQ.mjs";function vt(t){const s=t.bodies.filter(n=>{var u;return!n.image&&((u=n.value)==null?void 0:u.trim())}).map(n=>n.language).filter(n=>!!n&&n!=="none");return[...new Set(s)]}function pt(t){const s=t.map(vt),n=[...new Set(s.flat())];return n.length<2?[]:s.some(o=>o.length&&n.some(c=>!o.includes(c)))?n:[]}function bt(t,s){if(!s)return true;const n=vt(t);return!n.length||n.includes(s)}const Dt=[],xn=ct(function({scope:s="all",renderEntry:n,headingLevel:u=3,as:o="div",className:c,...m},l){const{t:r,langOf:f}=Z(),{clover:d,language:S}=z("Annotations"),L=y(e=>Lt(e.manifest,e.addedSets)),$=y(e=>kt(e.manifest,e.canvasId)),T=y(e=>Ct(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),p=y(e=>e.annotationId),A=lt.useSyncExternalStore(d.highlight.subscribe,d.highlight.get,d.highlight.get),g=e=>{const b=$t(L,e),I=b&&rt(b.target.t),P=d.media.get();I&&P&&$.some(F=>F.id===b.canvasId)&&At(P,I.start),d.selectAnnotation(e)},k=y(e=>s==="all"?Nt(e.manifest):Dt),w=yt(k),C=e=>e.entries.filter(b=>$.some(I=>I.id===b.canvasId)),N=L.map(e=>({set:e,entries:C(e)})).filter(({entries:e})=>e.length),E=Y(u),x={text:r("annotationsShow"),lang:f("annotationsShow")};return s==="all"?a(Xt,{ref:l,as:o,className:c,rest:m,sets:L,shown:$.map(e=>e.id),headingLevel:u,language:S,showLabel:x,hiddenSets:T,selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:e=>d.highlight.emit(e),onVisible:(e,b)=>e.forEach(I=>d.setSetVisible(I,b)),end:w.more&&a(Pt,{onReached:w.reachNext})}):N.length?a(o,{ref:l,className:mt("clover-annotations",c),...m,children:N.map(({set:e,entries:b})=>a(Ut,{set:e,entries:b,canvases:$,Heading:E,headingLevel:u,language:S,title:V(e.label,S),showLabel:x,hidden:T.includes(e.id),selected:p,highlighted:A,renderEntry:n,onSelect:g,onHighlight:I=>d.highlight.emit(I),onVisible:I=>d.setSetVisible(e.id,I)},e.id))}):null});function Ut({set:t,entries:s,canvases:n,Heading:u,headingLevel:o,title:c,language:m,showLabel:l,hidden:r,selected:f,highlighted:d,renderEntry:S,onSelect:L,onHighlight:$,onVisible:T}){const p=dt(),A=c.text?o+1:o,g=M(()=>pt(s),[s]),[k,w]=tt(),C=ht(),N=C?_(g,C.chosen):_(g,m,k),E=s.filter(x=>bt(x,N));return a("section",{className:"clover-annotations-set","aria-labelledby":c.text?`${p}-title`:void 0,"data-set":t.id,children:[a("div",{className:"clover-annotations-set-header",children:[c.text&&a(u,{className:"clover-annotations-title",id:`${p}-title`,...B(c.lang),children:c.text}),N&&!C&&a(gt,{languages:g,chosen:N,onChange:w,nameKey:"annotationsLanguage",part:"clover-annotations"}),a(ft,{hidden:r,onChange:x=>T(!x),of:c.text?`${p}-title`:void 0})]}),a("ol",{className:"clover-annotations-list",children:E.map((x,e)=>a(xt,{entry:x,canvas:n.find(b=>b.id===x.canvasId),index:e,headingLevel:A,language:m,showLabel:l,selected:x.id===f,highlighted:x.id===d,renderEntry:S,onSelect:L,onHighlight:$},x.id))})]})}function Wt(t,s,n){const u=new Map(s.map((c,m)=>[c.id,m])),o=new Map;for(const c of t){const m=V(c.label,n),l=m.text;let r=o.get(l);r||(r={title:m,setIds:[],byCanvas:new Map},o.set(l,r)),r.setIds.push(c.id);for(const f of c.entries){const d=r.byCanvas.get(f.canvasId)??[];d.push(f),r.byCanvas.set(f.canvasId,d)}}return[...o.entries()].map(([c,m])=>({key:c,title:m.title,setIds:m.setIds,canvases:Jt([...m.byCanvas.entries()],u).map(([l,r])=>{var f;return{canvasId:l,label:V((f=s.find(d=>d.id===l))==null?void 0:f.label,n),entries:r}})}))}function Jt(t,s){return t.every(([n])=>s.has(n))?t.sort(([n],[u])=>s.get(n)-s.get(u)):t}function Qt(t,s){const{clover:n,language:u}=z("Annotations"),o=M(()=>{const l=new Set;for(const r of t)for(const f of r.canvases){if(s.has(f.canvasId))continue;const d=Et(f.entries[0].annotation);d&&l.add(d)}return[...l]},[t,s]),[c,m]=tt([]);return X(()=>{let l=true;return Promise.all(o.map(r=>jt(n,r))).then(r=>l&&m(r.filter(f=>!!f))),()=>{l=false}},[n,o]),M(()=>{const l=new Map;for(const r of c){const{canvases:f}=ut(r),d=V(r.label,u);for(const S of f){const L=V(S.label,u);l.set(S.id,{canvas:S,label:f.length>1&&L.text?[d,L]:[d]})}}return{named:o.length>0,of:l}},[c,o,u])}const Xt=ct(function({as:s,className:n,rest:u,sets:o,shown:c,headingLevel:m,language:l,showLabel:r,hiddenSets:f,selected:d,highlighted:S,renderEntry:L,onSelect:$,onHighlight:T,onVisible:p,end:A},g){const k=dt(),w=y(i=>ut(i.manifest).canvases),C=M(()=>Wt(o,w,l),[o,w,l]),N=M(()=>new Map(w.map(i=>[i.id,i])),[w]),E=Qt(C,N),[x,e]=tt({}),b=ht(),I=y(i=>{var h;return(h=i.manifest)==null?void 0:h.label}),P=M(()=>V(I,l),[I,l]),F=w.length>1||E.named,G=Tt(null),nt=()=>{const i=G.current;if(!i||!i.getClientRects().length)return true;const h=Kt(i)??i;return h.matches(":hover")||h.contains(document.activeElement)},St=c.join(`
|
|
2
|
+
`);return X(()=>{const i=G.current;if(!i||!F||nt())return;const h=c.map(D=>i.querySelector(`[data-canvas="${CSS.escape(D)}"]`)).find(Boolean);if(!h)return;const q=h.closest(".clover-annotations-set"),H=(q==null?void 0:q.querySelector("[data-canvas]"))===h;it(H&&q?q:h,"start")},[St]),X(()=>{const i=G.current;if(!i||!d||nt())return;const h=i.querySelector(`[data-entry="${CSS.escape(d)}"]`);h&&it(h,"nearest")},[d]),C.length?a(s,{ref:i=>{G.current=i,typeof g=="function"?g(i):g&&(g.current=i)},className:mt("clover-annotations",n),"data-scope":"all",...u,children:[C.map((i,h)=>{const q=Y(m),H=i.title.text?m+1:m,D=Y(H),wt=i.setIds.every(v=>f.includes(v)),U=pt(i.canvases.flatMap(v=>v.entries)),W=b?_(U,b.chosen):_(U,l,x[i.key]);return a("section",{className:"clover-annotations-set","aria-labelledby":i.title.text?`${k}-${h}`:void 0,children:[a("div",{className:"clover-annotations-set-header",children:[i.title.text&&a(q,{className:"clover-annotations-title",id:`${k}-${h}`,...B(i.title.lang),children:i.title.text}),W&&!b&&a(gt,{languages:U,chosen:W,onChange:v=>e(J=>({...J,[i.key]:v})),nameKey:"annotationsLanguage",part:"clover-annotations"}),a(ft,{hidden:wt,onChange:v=>p(i.setIds,!v),of:i.title.text?`${k}-${h}`:void 0})]}),i.canvases.map((v,J)=>{var at;const et=v.entries.filter(O=>bt(O,W));if(!et.length)return null;const j=E.of.get(v.canvasId),R=j?j.label:E.named&&P.text?w.length>1&&v.label.text?[P,v.label]:[P]:[v.label],Q=F&&!!((at=R[0])!=null&&at.text),It=F&&c.includes(v.canvasId),st=`${k}-${h}-${J}`;return a("section",{className:"clover-annotations-canvas","data-canvas":v.canvasId,"aria-labelledby":Q?st:void 0,"aria-current":It?"true":void 0,children:[Q&&a(D,{className:"clover-annotations-canvas-label",id:st,...B(R.length===1?R[0].lang:void 0),children:R.length===1?R[0].text:R.map((O,K)=>a(lt.Fragment,{children:[K>0&&", ",a("span",{...B(O.lang),children:O.text})]},K))}),a("ol",{className:"clover-annotations-list",children:et.map((O,K)=>a(xt,{entry:O,canvas:N.get(v.canvasId)??(j==null?void 0:j.canvas),index:K,headingLevel:Q?H+1:H,language:l,showLabel:r,selected:O.id===d,highlighted:O.id===S,renderEntry:L,onSelect:$,onHighlight:T},O.id))})]},v.canvasId)})]},i.key)}),A]}):null});function Yt(t,s){const n=t.target.rect?void 0:t.target.svg,u=Bt(Zt,!!n);return M(()=>{var m,l;const o=n?(m=u==null?void 0:u.readSvgShape(n))==null?void 0:m.box:void 0,c=t.target.rect??(o?{x:o.x,y:o.y,w:o.width,h:o.height}:void 0);return!c||!s||t.bodies.some(r=>r.image)?null:Gt(s,c,(l=t.layer)==null?void 0:l.image)},[t,s,n,u])}const Zt=()=>import("./svg-shape-DLY3g7oq.mjs");function xt({entry:t,canvas:s,index:n,headingLevel:u,language:o,showLabel:c,selected:m,highlighted:l,renderEntry:r,onSelect:f,onHighlight:d}){const{hostLanguage:S,t:L,langOf:$}=Z(),T=nn(t,o),p=T.text?T:{text:String(n+1)},A=rt(t.target.t),g=A?{text:L("annotationsShowTime"),lang:$("annotationsShowTime")}:c,k=!g.lang&&!Ot(p.lang,S),w=p.text?`${g.text}: ${p.text}`:g.text,{clover:C}=z("Annotations"),N=Yt(t,s);return a("li",{className:"clover-annotations-entry","data-entry":t.id,"data-selected":m,"data-highlighted":l,onMouseEnter:()=>d(t.id),onMouseLeave:()=>d(null),onFocus:()=>d(t.id),onBlur:()=>d(null),onClick:E=>{E.target.closest("a, button")||f(t.id)},children:[A&&a(_t,{start:A.start,className:"clover-annotations-time"}),a(zt,{className:"clover-annotations-thumbnail",source:N,request:C.request}),a("div",{className:"clover-annotations-body clover-cue-text",children:[r?r(t):a(qt,{bodies:t.bodies,language:o,headingLevel:u}),a(tn,{annotation:t.annotation})]}),a("button",{type:"button",className:"clover-annotations-show","aria-pressed":m,"aria-label":k?w:void 0,style:Mt,onClick:()=>f(t.id),children:!k&&a(ot,{children:[a("span",{...B(g.lang),children:[g.text,p.text&&":"]}),p.text&&a(ot,{children:[" ",a("span",{...B(p.lang),children:p.text})]})]})})]})}function tn({annotation:t}){const{clover:s}=z("Annotations"),{t:n,langOf:u}=Z(),o=M(()=>Vt(t)??Ft(t),[t]);if(!o)return null;const c=n("annotationsOpenLink"),m=u("annotationsOpenLink");return!o.canvasId&&!o.manifestId?a("a",{className:"clover-annotations-link",href:o.id,target:"_blank",rel:"noopener noreferrer",...B(m),children:c}):a("button",{type:"button",className:"clover-annotations-link",...B(m),onClick:l=>{var f;const r=l.currentTarget.closest(".clover-root");Ht(s,o)&&((f=r==null?void 0:r.querySelector(".clover-canvas-viewport"))==null||f.focus({preventScroll:true}))},children:c})}function nn(t,s){const{text:n="",lang:u}=Rt(t.bodies,s);return{text:n.slice(0,120),...u?{lang:u}:{}}}export{xn as Annotations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Q=Object.defineProperty;var tt=(t,o,e)=>o in t?Q(t,o,{enumerable:true,configurable:true,writable:true,value:e}):t[o]=e;var B=(t,o,e)=>tt(t,typeof o!="symbol"?o+"":o,e);import{a9 as q,aF as ot,aa as D,B as G,T as et,A as L,y as j,q as N,_ as nt,$ as st,u as I,k as it,aG as rt,t as at,d as W,l as ct,R as lt}from"./shared-DkY2a89G.mjs";import{a as ht}from"./annotation-name-DbWjhgra.mjs";import{r as ut}from"./link-0lUlTZlw.mjs";import{T as dt}from"./Tip-OCB88zwY.mjs";import{b as pt}from"./Camera-BPyLzZjP.mjs";import"./styles-DkkVOSUQ.mjs";const K=t=>Array.isArray(t)?t.flatMap(K):ot.includes(t==null?void 0:t.type)?K(t.items??[]):t==null?[]:[t],ft=t=>K(t).map(o=>q(o)),gt=(t,o)=>Math.abs(t.end-o.start)<.001,H=(t,o,e)=>t+(o-t)*e;function vt(t){const o=[...t].sort((e,n)=>e.start-n.start);return o.map((e,n)=>{const i=o[n+1];return e.end===1/0&&i?{...e,end:i.start}:e})}function U(t,o){let e=0,n=t.length-1,i=-1;for(;e<=n;){const d=e+n>>1;t[d].start<=o?(i=d,e=d+1):n=d-1}const r=t[i];if(!r||o>=r.end)return null;const c=t[i+1];if(!c||!gt(r,c)||!Number.isFinite(r.end))return r.world;const a=(o-r.start)/(r.end-r.start||1),[h,l]=[r.world,c.world];return{x:H(h.x,l.x,a),y:H(h.y,l.y,a),width:H(h.width,l.width,a),height:H(h.height,l.height,a)}}const Z=t=>t.overlays??(t.overlays=new wt(t.host));class wt{constructor(o){B(this,"container");B(this,"overlays",new Map);B(this,"view");const e=document.createElement("div");e.className="clover-canvas-overlays",Object.assign(e.style,{position:"absolute",inset:"0",overflow:"clip",pointerEvents:"none"}),o.appendChild(e),this.container=e}add(o,e){return this.overlays.set(o,e),o.classList.add("clover-canvas-overlay"),Object.assign(o.style,{position:"absolute",top:"0",left:"0",pointerEvents:"auto"}),o.parentElement!==this.container&&this.container.appendChild(o),()=>{this.overlays.delete(o)}}move(o,e){this.overlays.has(o)&&(this.overlays.set(o,e),this.view&&this.position(...this.view,o))}position(o,e,n){this.view=[o,e];const i=o.rotation*180/Math.PI,r=Math.cos(o.rotation)>.9999,c=r?window.devicePixelRatio||1:0,a=h=>c?Math.round(h*c)/c:h;for(const[h,l]of this.overlays){if(n&&h!==n)continue;const d=pt(o,e,{x:l.x+l.width/2,y:l.y+l.height/2}),f=a(d.x-l.width*o.zoom/2),g=a(d.y-l.height*o.zoom/2),p=a(l.width*o.zoom),v=a(l.height*o.zoom);h.style.width=`${p}px`,h.style.height=`${v}px`,h.style.transform=`translate(${f}px, ${g}px)`+(i?` rotate(${i}deg)`:"");const{style:w,dataset:m}=h;if(r){w.setProperty("--clover-overlay-x",`${d.x}px`),w.setProperty("--clover-overlay-top",`${g}px`),w.setProperty("--clover-overlay-bottom",`${g+v}px`);const $=d.y>e.height/2?"above":"below";m.overlayRoom!==$&&(m.overlayRoom=$)}else w.removeProperty("--clover-overlay-x"),w.removeProperty("--clover-overlay-top"),w.removeProperty("--clover-overlay-bottom"),delete m.overlayRoom}}dispose(){this.overlays.clear(),this.container.remove()}}const mt=t=>"start"in t,St=t=>{var o,e;return mt(t)?t.start:(e=(o=t.track)==null?void 0:o[0])==null?void 0:e.start},xt=(t,o)=>!t.track||U(t.track,o)!==null;function $t(t,o){return xt(t,o.currentTime)?false:(o.currentTime=t.track[0].start,true)}function yt(t,o,e){var r,c,a;const n=ft(t==null?void 0:t.target);if(!((r=n[0])!=null&&r.rect)||!((c=n[0])!=null&&c.t))return null;const i=[];for(const h of n){const l=G((a=h.t)==null?void 0:a.replace(/^npt:/,""));if(!h.rect||!l)continue;const{x:d,y:f,w:g,h:p}=h.rect,v=o({x:d,y:f,width:g,height:p},h.id,e);v&&i.push({start:l.start,end:l.end??1/0,world:v})}return i.length?vt(i):null}function X(t,o){const{text:e,lang:n}=at(t,o);return e?{page:{text:e,...n?{lang:n}:{}}}:{}}function Nt(t,o){var n;const e=[];for(const{annotation:i,pageLabel:r,pageId:c}of t){const a=q([i==null?void 0:i.target].flat()[0]),h=G((n=a==null?void 0:a.t)==null?void 0:n.replace(/^npt:/,""));if(!h||a.rect||a.point||a.svg)continue;const{text:l,lang:d}=Y(i,o);e.push({id:i.id,...l?{label:l}:{},...d?{lang:d}:{},...h,...X(r,o),...c?{pageId:c}:{}})}return e}const S=40;function qt(t,o,e=null,n){var r;const i=[];for(const{annotation:c,targetIndex:a,pageLabel:h,pageId:l,place:d}of t){const f=q(c==null?void 0:c.target);if(!f)continue;let g=null,p;const v=yt(c,o,a);if(v){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.rect){const{x:s,y:u,w:k,h:R}=f.rect;g={x:s,y:u,width:k,height:R}}else if(f.point){const{x:s,y:u}=f.point;g={x:s-S/2,y:u-S/2,width:S,height:S},p={kind:"point"}}else if(f.svg&&e){const s=e(f.svg);s&&(g=s.box,p={kind:"svg",svg:s})}if(!g)continue;const w=v?v[0].world:o(g,f.id,a);if(!w)continue;const{text:m,lang:$}=Y(c,n),P=ut(c),T=(r=D(c).find(s=>(s==null?void 0:s.type)==="Image"&&/^https?:\/\//i.test(s.id??"")))==null?void 0:r.id;i.push({id:c.id,label:m,...$?{lang:$}:{},world:w,...p?{shape:p}:{},...v?{track:v}:{},...P?{link:P}:{},...T?{image:T}:{},...X(h,n),...l?{pageId:l}:{},...d?{place:d}:{}})}return i}const V=({world:t})=>t.width*t.height,kt=(t,o)=>t.x>=o.x&&t.y>=o.y&&t.x+t.width<=o.x+o.width&&t.y+t.height<=o.y+o.height,y=t=>String(Math.round(t*1e3)/1e3||0);function bt(t,o){var g,p;const e=t.world,n=o.world;if(((g=o.shape)==null?void 0:g.kind)==="point"||n.x>=e.x+e.width||n.x+n.width<=e.x||n.y>=e.y+e.height||n.y+n.height<=e.y)return null;const[i,r]=[e.width,e.height],[c,a]=[n.x-e.x,n.y-e.y],h=`${y(-i/10)} ${y(-r/10)} ${y(i*1.2)} ${y(r*1.2)}`,l=`M${y(-i/10)} ${y(-r/10)}h${y(i*1.2)}v${y(r*1.2)}h${y(-i*1.2)}Z`;let d;if(((p=o.shape)==null?void 0:p.kind)==="svg"){const{box:v,shapes:w}=o.shape.svg,m=w.map(({tag:$,attributes:P})=>`<${$} ${Object.entries(P).map(([T,s])=>`${T}="${s}"`).join(" ")}/>`).join("");d=`<mask id="m"><path fill="#fff" d="${l}"/><svg x="${y(c)}" y="${y(a)}" width="${y(n.width)}" height="${y(n.height)}" viewBox="${v.x} ${v.y} ${Math.max(v.width,1)} ${Math.max(v.height,1)}" preserveAspectRatio="none" overflow="visible"><g fill="#000">${m}</g></svg></mask><path d="${l}" mask="url(#m)"/>`}else d=`<path fill-rule="evenodd" d="${l}M${y(c)} ${y(a)}h${y(n.width)}v${y(n.height)}h${y(-n.width)}Z"/>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${h}" preserveAspectRatio="none">${d}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(f)}")`}const Kt=({renderer:t,placed:o,sceneVersion:e,active:n,selected:i,onActivate:r,onSelect:c,onFollow:a,media:h})=>{const l=et(()=>{const s=new Map;return[...o].sort((u,k)=>V(k)-V(u)).forEach((u,k)=>s.set(u,k)),s},[o]),d=o.find(s=>s.id===n),f=L(null);j(()=>{const s=o.find(u=>u.id===i&&u.track);i||(f.current=null),!(!s||!h||f.current===i)&&(f.current=i,$t(s,h))},[o,i,h]);const g=s=>{const u=l.get(s)??0;return d?s===d?o.length:u>(l.get(d)??0)&&!s.track&&!d.track&&kt(s.world,d.world)?o.length+1+u:u:u},p=L(new Map),v=L(new Map),w=L(new WeakMap),m=L({placed:o,current:d,depthOf:g});m.current={placed:o,current:d,depthOf:g};const $=N(s=>{const{placed:u,current:k,depthOf:R}=m.current,O=M=>v.current.get(M.id),x=k&&O(k)!==null?k:void 0,b=M=>{const A=p.current.get(M.id);if(!A)return;const C=O(M),F=x&&M!==x&&C!==null&&R(M)<u.length?bt({...M,world:C??M.world},{...x,world:O(x)??x.world}):null;(w.current.get(A)??"")!==(F??"")&&(w.current.set(A,F??""),F?A.style.setProperty("--clover-annotation-mask",F):A.style.removeProperty("--clover-annotation-mask"))};s&&s!==k?b(s):u.forEach(b)},[]);nt(()=>$());const P=N((s,u)=>{u?p.current.set(s,u):p.current.delete(s)},[]),T=N((s,u)=>{v.current.set(s.id,u),$(s)},[$]);return st(I(it,{children:o.map((s,u)=>I(Tt,{entry:s,name:s.label??String(u+1),lang:s.label?s.lang:void 0,depth:g(s),register:P,onMove:T,renderer:t,active:n===s.id,selected:i===s.id,onActivate:r,onSelect:c,onFollow:a,media:h},`${s.id}|${e}`))}),Z(t).container)};let Mt;const _=()=>Mt??(Mt=import("./panClearOfControls-Cn2ZXsZi.mjs")),Tt=({entry:t,name:o,lang:e,depth:n,register:i,onMove:r,renderer:c,active:a,selected:h,onActivate:l,onSelect:d,onFollow:f,media:g})=>{var A,C,F;const[p,v]=W(null),{id:w,place:m}=t,$=m&&`${m.index} / ${m.total}`,P=N(E=>{v(E),i(w,E)},[w,i]),{x:T,y:s,width:u,height:k}=t.world;j(()=>{if(!p)return;const E=Z(c).add(p,{x:T,y:s,width:u,height:k});return c.invalidate(),E},[p,c,T,s,u,k]);const R=Et(p,t.track,c,g,()=>l(null),E=>r(t,E)),{link:O}=t,x=O&&!O.canvasId&&!O.manifestId?O.id:void 0,b=O&&!x&&f?()=>f(t):void 0;return I(x?"a":"button",{ref:P,...x?{href:x,target:"_blank",rel:"noopener noreferrer"}:{type:"button"},id:t.id,className:"clover-canvas-annotation",hidden:!R,"data-active":a?"true":"false","data-shape":((A=t.shape)==null?void 0:A.kind)??"rect","data-track":t.track?"":void 0,"data-link":x||b?"true":void 0,"aria-label":$?`${o} ${$}`:o,"aria-current":h?"true":void 0,...ct(e),style:{"--clover-annotation-depth":n},onMouseEnter:()=>l(t.id),onMouseLeave:()=>l(null),onFocus:()=>{l(t.id),_()},onKeyUp:E=>{if(E.key!=="Tab")return;const z=E.currentTarget;_().then(({panClearOfControls:J})=>{document.activeElement===z&&J(c,z)})},onBlur:()=>l(null),onKeyDown:At,onClick:E=>{E.stopPropagation(),!x&&(b?b():d(t))},children:[((C=t.shape)==null?void 0:C.kind)==="point"&&I("span",{className:"clover-canvas-annotation-point","aria-hidden":"true"}),((F=t.shape)==null?void 0:F.kind)==="svg"&&I(Ot,{svg:t.shape.svg}),I(dt,{label:o,scrolls:true,image:t.image,after:$})]})};function Et(t,o,e,n,i,r){const c=!!o&&n!==void 0,[a,h]=W(()=>!c||(n?U(o,n.currentTime)!==null:false)),l=L(i);l.current=i;const d=L(r);return d.current=r,j(()=>{if(!o||n===void 0){h(true);return}if(!n){h(false);return}let f;const g=x=>{var A,C,F;const b=U(o,x);b&&t&&((A=e.overlays)==null||A.move(t,b)),d.current(b);const M=b!==null;if(M!==f){if(f=M,!M&&t){const E=t.matches(":hover");t.contains(document.activeElement)?(F=(C=e.overlays)==null?void 0:C.container.parentElement)==null||F.focus({preventScroll:true}):E&&l.current()}h(M)}},p=n,v=()=>typeof p.requestVideoFrameCallback=="function"&&p.videoWidth>0;let w=0,m=0;const $=(x,{mediaTime:b})=>{g(b),m=p.requestVideoFrameCallback($)},P=()=>{g(n.currentTime),w=requestAnimationFrame(P)},T=()=>{cancelAnimationFrame(w),m&&p.cancelVideoFrameCallback(m),w=m=0},s=()=>{T(),v()?m=p.requestVideoFrameCallback($):w=requestAnimationFrame(P)},u=()=>g(n.currentTime),k=()=>n.paused&&u(),R=()=>{T(),u()},O=[["play",s],["pause",R],["ended",R],["seeking",u],["seeked",u],["loadeddata",u],["timeupdate",k]];return O.forEach(([x,b])=>n.addEventListener(x,b)),u(),n.paused||s(),()=>{T(),O.forEach(([x,b])=>n.removeEventListener(x,b))}},[t,o,n,e]),a}const Ot=({svg:t})=>{const{x:o,y:e,width:n,height:i}=t.box,r=t.shapes.map(({tag:c,attributes:a},h)=>lt.createElement(c,{key:h,...a,vectorEffect:"non-scaling-stroke"}));return I("svg",{className:"clover-canvas-annotation-shape",viewBox:`${o} ${e} ${Math.max(n,1)} ${Math.max(i,1)}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:[I("g",{children:r}),I("g",{children:r}),I("g",{children:r})]})};function Y(t,o){return ht(rt(t),o)}const Pt={ArrowDown:()=>32,ArrowUp:()=>-32,PageDown:t=>t.clientHeight-32,PageUp:t=>32-t.clientHeight,End:t=>t.scrollHeight,Home:t=>-t.scrollHeight};function At(t){const o=t.currentTarget.querySelector(":scope > .clover-tip"),e=Pt[t.key];if(!o||!e||t.altKey||t.ctrlKey||t.metaKey)return false;const n=e(o);return(n>0?o.scrollHeight-o.clientHeight-o.scrollTop:o.scrollTop)<1?false:(t.preventDefault(),o.scrollBy({top:n}),true)}function Ut(t,o){const e=new Map;for(const{annotation:n,targetIndex:i}of t??[]){const r=q([n==null?void 0:n.target].flat()[0]);if(r.rect||r.point||r.svg||r.t||!D(n).some(a=>typeof(a==null?void 0:a.value)=="string"||(a==null?void 0:a.type)==="Image"))continue;const c=(o==null?void 0:o.find(a=>a.id===r.id))??(r.id||o==null?void 0:o[i]);c&&e.set(c.id,[...e.get(c.id)??[],n])}return e}export{Kt as A,$t as g,qt as p,St as s,Nt as t,Ut as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as g,j as h,T as k,p as B,m as T,c as j,u as e,P as p,z as v}from"./shared-DkY2a89G.mjs";import L from"./Connected-DMXG3imZ.mjs";import{r as R}from"./rendererSurface-BkbGDL_Z.mjs";import{j as w}from"./classnames-DukgfdpI.mjs";import{a as x}from"./hooks-BhtNDs_1.mjs";import{L as c}from"./Loading-YxuKrDAM.mjs";const z=v(()=>import("./Connected-pyd0EBD3.mjs")),N=v(()=>import("./Connected-CBQ6xyhr.mjs"));function F({className:f,style:y,renderers:C,collapseControls:b,onContentStateChange:S,children:r,...n}){var u;const l=g("Body");h(l.clover,S);const o=x(),m=k(()=>B(o),[o]),s=T(C??l.renderers,{canvases:o,bodies:m}),a=s==null?void 0:s.component,i=((u=o.find(({type:t})=>t==="Scene"||t==="Timeline"))==null?void 0:u.type)??"Canvas",d=j(t=>t.status==="loading");return e("div",{"aria-busy":d,className:w("clover-body",f),"data-renderer":a?"custom":i.toLowerCase(),style:{position:"relative",height:"var(--clover-body-height, 60vh)",...y},children:[a?e(a,{canvases:o,bodies:m,children:r}):i==="Scene"?e(p,{fallback:e(c,{overlay:true}),children:e(N,{...n,children:r})}):i==="Timeline"?e(p,{fallback:e(c,{overlay:true}),children:e(z,{...n,children:r})}):e(L,{...n,collapseControls:b,surface:R,children:r}),d&&e(c,{overlay:true})]})}export{F as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,u as r,l}from"./shared-DkY2a89G.mjs";import{j as n}from"./classnames-DukgfdpI.mjs";function c({error:a,className:s}){const{t,langOf:e}=o();return r("div",{className:n("clover-status",s),"data-status":"error",role:"alert",children:[r("p",{...l(e("statusError")),children:t("statusError")}),r("p",{className:"clover-status-detail",lang:"en",children:a.message})]})}export{c as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as t,l as d}from"./shared-DkY2a89G.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-OCB88zwY.mjs";import"./styles-DkkVOSUQ.mjs";const y=({className:n,id:e,label:o,children:r,onClick:s,expanded:i,controls:p,shortcut:a,lang:l})=>{const c=e.split("-")[0].replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");return t("button",{id:e,className:u("clover-canvas-button",n),"data-testid":"clover-canvas-button","data-button":c,onClick:s,"aria-expanded":i,"aria-controls":p,"aria-label":o,"aria-keyshortcuts":a==null?void 0:a.keys,...d(l),type:"button",children:[t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true","data-testid":"clover-canvas-button-svg",focusable:"false",width:"16",height:"16",viewBox:"0 0 512 512",children:r}),t(v,{label:o,shortcut:a})]})};export{y as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as f,r as l,b as i,c,g as a,s as u,t as h}from"./CanvasView-2Fj9nT06.mjs";function g(t,o){return c(h(o.width/2,o.height/2),a(t.rotation),u(t.zoom),h(-t.x,-t.y))}function m(t,o){return c(h(t.x,t.y),u(1/t.zoom),a(-t.rotation),h(-o.width/2,-o.height/2))}function M(t,o,n){return i(m(t,o),n)}function w(t,o,n){return i(g(t,o),n)}function C(t,o){return f(m(t,o),{x:0,y:0,width:o.width,height:o.height})}function N(t,o,n=0,r=0){const e=f(a(n),t),s=Math.max(1,o.width*(1-r*2)),y=Math.max(1,o.height*(1-r*2)),d=Math.min(s/Math.max(e.width,Number.EPSILON),y/Math.max(e.height,Number.EPSILON)),x=l(t);return{x:x.x,y:x.y,zoom:d,rotation:n}}function P(t,o,n,r,e){const s=i(c(u(1/n),a(-r)),{x:o.x-e.width/2,y:o.y-e.height/2});return{x:t.x-s.x,y:t.y-s.y}}function S(t,o){return t.x===o.x&&t.y===o.y&&t.zoom===o.zoom&&t.rotation===o.rotation}export{P as a,w as b,S as c,N as f,M as s,C as v,g as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-
|
|
1
|
+
var l=Object.defineProperty;var o=(r,t,s)=>t in r?l(r,t,{enumerable:true,configurable:true,writable:true,value:s}):r[t]=s;var i=(r,t,s)=>o(r,typeof t!="symbol"?t+"":t,s);import{h as d,b as g}from"./rendererSurface-BkbGDL_Z.mjs";class c{constructor(t,s){i(this,"kind","canvas2d");i(this,"canvas");i(this,"ctx");i(this,"pixelRatio",1);i(this,"drawn",new Set);this.canvas=t,this.ctx=s}static create(t){let s=null;try{s=t.getContext("2d",{alpha:true})}catch{s=null}return!s||typeof s.drawImage!="function"?null:new c(t,s)}resize(t,s,a){this.pixelRatio=a;const e=Math.max(1,Math.round(t*a)),h=Math.max(1,Math.round(s*a));this.canvas.width!==e&&(this.canvas.width=e),this.canvas.height!==h&&(this.canvas.height=h)}begin(){const t=this.ctx;t.setTransform(1,0,0,1,0,0),t.globalAlpha=1,t.clearRect(0,0,this.canvas.width,this.canvas.height),t.imageSmoothingEnabled=true,t.imageSmoothingQuality="high"}draw(t){if(!d(t.source))return"skipped";const s=this.ctx,a=t.transform,e=this.pixelRatio,h=t.crop??{x:0,y:0,width:t.width,height:t.height},n=g(t,e);return s.setTransform(e*a.a,e*a.b,e*a.c,e*a.d,e*a.e,e*a.f),s.globalAlpha=t.opacity,s.drawImage(t.source,h.x,h.y,h.width,h.height,h.x,h.y,h.width+n.x,h.height+n.y),this.drawn.add(t.key),"drawn"}end(){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.globalAlpha=1}has(t){return this.drawn.has(t)}release(t){this.drawn.delete(t)}dispose(){this.drawn.clear(),this.canvas.width=0,this.canvas.height=0}}export{c as Canvas2DBackend};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as C,_ as Zt,a as On,d as m,q as ve,y as V,t as Je,f as Xe,u as l,R as _t,k as Jn,a2 as Xn,b as Qn,T as L,a3 as eo,a4 as to,a5 as no,P as Me,z as De,v as oo,l as vn,a6 as ao,a7 as so}from"./shared-DkY2a89G.mjs";import{u as lo,d as Mn,r as io,C as ro,Z as co,e as uo,t as fo,f as ho,g as go,R as bn,h as mo,j as po,E as yo,k as vo,l as bo,m as Co,n as wo,o as xo,B as Io,p as ko,q as Oo}from"./pointer-YQppt0at.mjs";import{P as Mo,a as Bo,I as Po,b as So}from"./glyphs-BFK_hvJJ.mjs";import{B as kt}from"./Button-L8ZMy5lY.mjs";import{S as Z,f as Eo}from"./Tip-OCB88zwY.mjs";import{f as Ro,s as Fo,b as Cn,d as To,p as $o,e as Lo,g as wn,h as zo,i as Ao}from"./layout-Djwu8f4R.mjs";import{u as Do,a as No,h as Vo}from"./useNearViewport-CDbHQUBk.mjs";import{L as Ko}from"./Loading-YxuKrDAM.mjs";import{j as qo}from"./classnames-DukgfdpI.mjs";import{u as Ho}from"./useContainerName-hKQjEt7a.mjs";import{b as jo}from"./imageService-iFElsopt.mjs";import"./styles-DkkVOSUQ.mjs";function Wo(e,n,s){return e.reduce((o,u)=>o+u+s,-s)<=n}function Zo(e,n,s){const o=e.ownerDocument,u=d=>d instanceof HTMLElement&&e.contains(d)&&!d.closest("[hidden]"),a=[o.getElementById(n),o.getElementById(s),...Array.from(e.querySelectorAll("button"))].find(u);a==null||a.focus()}function _o({cluster:e,ids:n,more:s,fits:o,onFits:u}){const a=C(o);a.current=o;const d=C(u);d.current=u;const p=C(new Map),z=C(n);z.current=n;const K=C(null),w=n.join(" ");return Zt(()=>{const B=e.ownerDocument,P=()=>{var be;const _=z.current,A=getComputedStyle(e),J=parseFloat(A.columnGap)||0;let q=e.clientWidth-(parseFloat(A.paddingLeft)||0)-(parseFloat(A.paddingRight)||0),y=0;for(const I of _){const Ce=(be=B.getElementById(I))==null?void 0:be.offsetWidth;Ce&&p.current.set(I,Ce),y=Math.max(y,p.current.get(I)??0)}for(const I of Array.from(e.children))!(I instanceof HTMLElement)||_.includes(I.id)||I.id===s||I.classList.contains("clover-canvas-more")||!I.offsetWidth||getComputedStyle(I).position==="absolute"||(q-=I.offsetWidth+J);const re=Wo(_.map(I=>p.current.get(I)??y),q,J);if(re===a.current)return;const ne=B.activeElement;K.current=ne instanceof HTMLElement&&e.contains(ne)?ne.id:null,a.current=re,d.current(re)};P();const te=new ResizeObserver(()=>P());te.observe(e);const f=new MutationObserver(()=>P());return f.observe(e,{childList:true}),()=>{te.disconnect(),f.disconnect()}},[e,w,s]),Zt(()=>{const B=K.current;if(K.current=null,B===null)return;const P=e.ownerDocument.activeElement;(!P||!e.contains(P)||P.closest("[hidden]"))&&Zo(e,B,s)},[o,e,s]),null}const Uo=()=>import("./AnnotationMenu-BDPec3iI.mjs"),Yo=()=>import("./ChaptersMenu-Bj2EqtVJ.mjs"),Go=()=>import("./ChoiceMenu-ConzybVH.mjs"),Jo=()=>import("./ImageControls-CZO7WoPb.mjs"),xn=2,Xo=new Set(["zoomIn","zoomOut","rotateRight","rotateLeft","reset","fullPage"]),Qo=({renderer:e,instance:n,config:s,controlButtons:o,placeholder:u,placeholderIsMore:a=false,choices:d=[],selections:p={},onSelect:z,annotations:K=[],chapters:w=[],mediaElement:B=null,onChapter:P,request:te,hiddenPages:f,onPageVisibilityChange:_,selectedAnnotation:A=null,onAnnotationSelect:J,onAnnotationActivate:q,captionId:y,captionOpen:re=false,onCaptionToggle:ne,placeId:be,placeOpen:I=false,onPlaceToggle:Ce,language:Qe,fit:Be=true,more:X="auto",children:Mt})=>{var ft,ht,Oe,_e;const{t:E,langOf:R}=On(),[Ne,Pe]=m(false),[Q,oe]=m(false),ce=`annotations-${n}`,et=`${ce}-menu`,Ve=E("informationPanelTabsAnnotations"),Ke=R("informationPanelTabsAnnotations"),ue=ve(i=>{var h;oe(false),q==null||q(null),i&&((h=document.getElementById(ce))==null||h.focus())},[ce,q]),qe=s.annotations&&K.length>0&&J,[de,Bt]=m(false),ee=`chapters-${n}`,tt=`${ee}-menu`,we=w.length>0&&!!P,fe=C(false),nt=C(null);V(()=>{const i=()=>{var h;fe.current=((h=document.activeElement)==null?void 0:h.id)===ee};return document.addEventListener("focusin",i),()=>document.removeEventListener("focusin",i)},[ee]);const O=ve(()=>{var h,ge;if(!fe.current)return;fe.current=false;const i=document.activeElement;i&&i!==document.body||(ge=(h=nt.current)==null?void 0:h.querySelector('.clover-canvas-transport :is([data-button="play"], [data-button="pause"])'))==null||ge.focus()},[]);V(()=>{we||O()},[we,O]),V(()=>()=>O(),[O]);const xe=ve(i=>{var h;Bt(false),i&&((h=document.getElementById(ee))==null||h.focus())},[ee]),U=s.information&&y&&ne,ot=s.map&&be&&Ce,D=`choice-${n}`,Y=d.length===1?Je(d[0].label,Qe):null,at=(Y==null?void 0:Y.text)||E("canvasChoice"),x=Y!=null&&Y.text?Y.lang:R("canvasChoice"),Se=`${D}-menu`,he=(ft=Xe(Uo,!!qe))==null?void 0:ft.default,He=(ht=Xe(Yo,we))==null?void 0:ht.default,st=(Oe=Xe(Go,d.length>0&&!!z))==null?void 0:Oe.default,lt=ve(i=>{var h;Pe(false),i&&((h=document.getElementById(D))==null||h.focus())},[D]),it=lo(),[H,Ee]=m(null);V(()=>{nt.current=(H==null?void 0:H.closest(".clover-canvas"))??null},[H]);const Re=Mn(H),[ae,Ie]=m(false),rt=i=>l(kt,{className:i,id:ce,label:Ve,lang:Ke,onClick:()=>oe(h=>!h),expanded:Q,controls:et,children:l(So,{})},"annotations"),ct=(()=>{const i=[],h=e;return s.zoom&&h&&i.push({key:"zoomIn",id:`zoomIn-${n}`,shortcut:Z.zoomIn,label:E("imageZoomIn"),lang:R("imageZoomIn"),glyph:l(co,{}),onClick:()=>h.zoomBy(xn)},{key:"zoomOut",id:`zoomOut-${n}`,shortcut:Z.zoomOut,label:E("imageZoomOut"),lang:R("imageZoomOut"),glyph:l(uo,{}),onClick:()=>h.zoomBy(1/xn)}),s.fullPage&&it&&i.push({key:"fullPage",id:`fullPage-${n}`,label:E(Re?"imageExitFullScreen":"imageFullScreen"),lang:R(Re?"imageExitFullScreen":"imageFullScreen"),glyph:Re?l(ho,{}):l(go,{}),onClick:ge=>void fo(ge.currentTarget)}),s.rotation&&h&&i.push({key:"rotateRight",id:`rotateRight-${n}`,shortcut:Z.rotateRight,label:E("imageRotateRight"),lang:R("imageRotateRight"),glyph:l(bn,{}),onClick:()=>h.rotateBy(90)},{key:"rotateLeft",id:`rotateLeft-${n}`,shortcut:Z.rotateLeft,label:E("imageRotateLeft"),lang:R("imageRotateLeft"),glyph:l(bn,{}),onClick:()=>h.rotateBy(-90)}),s.reset&&h&&i.push({key:"reset",id:`reset-${n}`,shortcut:Z.reset,label:E("imageResetZoom"),lang:R("imageResetZoom"),glyph:l(mo,{}),onClick:()=>h.home()}),d.length&&i.push({key:"choice",id:D,label:at,lang:x,glyph:l(po,{}),onClick:()=>Pe(ge=>!ge),expanded:Ne,controls:Se}),i})(),G=[...ct.filter(i=>i.key!=="fullPage"),...ct.filter(i=>i.key==="fullPage")].map(i=>({id:i.id,view:Xo.has(i.key),node:io(i,o)})),je=[ot&&{id:`place-${n}`,view:false,node:l(kt,{id:`place-${n}`,label:E("mapLabel"),lang:R("mapLabel"),onClick:Ce,expanded:I,controls:be,children:l(Mo,{})},"place")},we&&{id:ee,view:false,node:l(kt,{id:ee,label:E("playerChapters"),lang:R("playerChapters"),onClick:()=>Bt(i=>!i),expanded:de,controls:tt,children:l(Bo,{})},"chapters")},qe&&{id:ce,view:false,node:rt()},U&&{id:`information-${n}`,view:false,node:l(kt,{id:`information-${n}`,label:E("informationPanelTabsAbout"),lang:R("informationPanelTabsAbout"),onClick:ne,expanded:re,controls:y,children:l(Po,{})},"information")},!!u&&{id:`placeholder-${n}`,view:false,node:l(_t.Fragment,{children:u},"placeholder")}].filter(i=>!!i),ut=je.filter(i=>i.id===`placeholder-${n}`),T=[...G.filter(i=>i.view),...ut],We=[...G.filter(i=>!i.view),...je.filter(i=>!ut.includes(i))],se=[...T,...We],[Fe,St]=m(true),Ze=X==="always"||a,M=(_e=Xe(Jo,Be&&(Ze||!Fe)&&se.some(i=>i.view)))==null?void 0:_e.ImageControls,N=Fe&&!Ze||!M?[]:se.filter(i=>i.view),ke=a&&N.length>0;V(()=>{N.length||Ie(false)},[N.length]);const dt=i=>i.filter(h=>!N.includes(h)&&!(ke&&h.id===`placeholder-${n}`)).map(({node:h})=>h);return l(Jn,{children:[l(ro,{fit:Be,clusterRef:Ee,children:[dt(T),M&&N.length>0&&l(M,{instance:n,open:ke||ae,onOpenChange:Ie,toggle:ke?u:void 0,children:N.map(({node:i})=>i)}),dt(We),Mt]}),Be&&!Ze&&H&&l(_o,{cluster:H,ids:se.map(({id:i})=>i),more:`more-${n}`,fits:Fe,onFits:St}),He&&de&&we&&l(He,{id:tt,triggerId:ee,label:E("playerChapters"),labelLang:R("playerChapters"),chapters:w,element:B,onChapter:P,request:te,onClose:xe}),he&&Q&&qe&&l(he,{id:et,triggerId:ce,label:Ve,labelLang:Ke,annotations:K,hiddenPages:f,onPageVisibilityChange:_,selected:A,onSelect:J,onActivate:i=>q==null?void 0:q(i),onClose:ue}),st&&Ne&&d.length>0&&z&&l(st,{id:Se,triggerId:D,label:at,labelLang:x,language:Qe,choices:d,selections:p,onSelect:z,onClose:lt})]})},ea=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});function Ta(e,n){return{a:1,b:0,c:0,d:1,e,f:n}}function $a(e,n=e){return{a:e,b:0,c:0,d:n,e:0,f:0}}function La(e){const n=Math.cos(e),s=Math.sin(e);return{a:n,b:s,c:-s,d:n,e:0,f:0}}function ta(e,n){return{a:e.a*n.a+e.c*n.b,b:e.b*n.a+e.d*n.b,c:e.a*n.c+e.c*n.d,d:e.b*n.c+e.d*n.d,e:e.a*n.e+e.c*n.f+e.e,f:e.b*n.e+e.d*n.f+e.f}}function za(...e){return e.reduce((n,s)=>ta(n,s),ea)}function Aa(e){const n=e.a*e.d-e.b*e.c;if(!n||!Number.isFinite(n))return null;const s=1/n;return{a:e.d*s,b:-e.b*s,c:-e.c*s,d:e.a*s,e:(e.c*e.f-e.d*e.e)*s,f:(e.b*e.e-e.a*e.f)*s}}function Ot(e,n){return{x:e.a*n.x+e.c*n.y+e.e,y:e.b*n.x+e.d*n.y+e.f}}function Da(e){return`matrix(${[e.a,e.b,e.c,e.d,e.e,e.f].map(na).join(",")})`}function Na(e,n,s,o=new Float32Array(9)){const u=2/n,a=-2/s;return o[0]=e.a*u,o[1]=e.b*a,o[2]=0,o[3]=e.c*u,o[4]=e.d*a,o[5]=0,o[6]=e.e*u-1,o[7]=e.f*a+1,o[8]=1,o}function na(e){const n=Math.round(e*1e6)/1e6;return Object.is(n,-0)?"0":String(n)}function Va(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function oa(e){if(!e.length)return null;let n=1/0,s=1/0,o=-1/0,u=-1/0;for(const a of e)n=Math.min(n,a.x),s=Math.min(s,a.y),o=Math.max(o,a.x+a.width),u=Math.max(u,a.y+a.height);return{x:n,y:s,width:o-n,height:u-s}}function Ka(e,n){return e.x<n.x+n.width&&n.x<e.x+e.width&&e.y<n.y+n.height&&n.y<e.y+e.height}function qa(e,n){const s=[Ot(e,{x:n.x,y:n.y}),Ot(e,{x:n.x+n.width,y:n.y}),Ot(e,{x:n.x,y:n.y+n.height}),Ot(e,{x:n.x+n.width,y:n.y+n.height})],o=s.map(p=>p.x),u=s.map(p=>p.y),a=Math.min(...o),d=Math.min(...u);return{x:a,y:d,width:Math.max(...o)-a,height:Math.max(...u)-d}}function Ha(e,n,s){return Math.min(Math.max(e,n),s)}const Wt=e=>!!(e&&"overlays"in e),aa=De(()=>import("./MediaBody-CLtd0bf0.mjs")),sa=()=>import("./AnnotationState-Chs_37Kk.mjs"),la=new Map,ia={menu:[],placed:[],timed:[],hiddenPages:[],setPagesVisible:()=>{},listedCount:0,comments:la,selected:null,select:()=>{},activate:()=>{},release:()=>false,quietlyOpened:null},ra=De(()=>import("./FrameAnimation-BvKiSXcm.mjs")),In=De(()=>import("./PlaceBox-D-Zhe9-U.mjs")),ca=De(()=>import("./Placeholder-DzY5hcbk.mjs")),ua=De(()=>import("./ControlsFade-BNXVTL_Q.mjs")),da=()=>true,fa=De(()=>import("./Placeholder-DzY5hcbk.mjs").then(({PlaceholderToggle:e})=>({default:e}))),kn={zoom:true,fullPage:true,rotation:true,reset:true,annotations:true,information:true,map:true},ha={zoom:false,fullPage:false,rotation:false,reset:false,annotations:false,information:false,map:false},ga={description:"canvasKeysImage",keys:["ArrowLeft ArrowRight ArrowUp ArrowDown",Z.zoomIn.keys,Z.zoomOut.keys,Z.reset.keys,Z.rotateRight.keys,Z.rotateLeft.keys].join(" ")},ma={description:"canvasKeysMedia",keys:[Z.play.keys,"J L",Z.mute.keys].join(" ")},pa={description:"canvasKeysAnnotations",keys:"Escape"},ja=e=>{var s;return!!((s=e.canvases)!=null&&s.length)||Bn(e.body,e.src).length>0?l(yo,{children:l(ya,{...e})}):null},ya=e=>{var cn,un,dn,fn,hn,gn;const{surface:n,manifestId:s,canvases:o,viewingDirection:u,body:a,src:d,isTiledImage:p=false,label:z,partOf:K,language:w,highContrast:B,instanceId:P,className:te,options:f,navigator:_=false,controls:A=true,collapseControls:J="auto",controlButtons:q,annotations:y,onReady:re,onViewportChange:ne,onContentStateChange:be,onMediaElement:I,onCaptionChange:Ce,caption:Qe,onEnded:Be,chapters:X,highlightedChapter:Mt,onChapterHighlight:E,placeholder:R=true,children:Ne}=e,{t:Pe}=On(),Q=C(null),[oe,ce]=m(null),et=vo(oe),Ve=Mn(oe),Ke=bo(oe),ue=Xn(ce),qe=Do(B),de=!!n.controlsVisibility,ee=(n.controlsVisibility??da)(de?oe:null,f==null?void 0:f.hideDelay,Q),[tt,we]=m(false),fe=No(oe),nt=Qn(),[O]=m(()=>P??`clover-canvas-${nt}`),xe=C(null),[U,ot]=m(null),D=Wt(U)?U:null,[Y,at]=m(null),x=A===false?null:A===true?kn:{...kn,...A},[Se,he]=m("loading"),[He,st]=m(false),[lt,it]=m(0),H=C(re),Ee=C(ne),Re=C(f);H.current=re,Ee.current=ne,Re.current=f;const ae=eo(u),Ie=L(()=>Ro(o??[]),[o]),rt=L(()=>Fo(Ie),[Ie]),[Pt,ct]=m({}),G=L(()=>({...rt,...Pt}),[rt,Pt]),je=(t,r)=>ct(g=>({...g,[t]:r})),ut=L(()=>y==null?void 0:y.filter(t=>!t.layer||(G[t.layer.key]??0)===t.layer.item),[y,G]),T=(cn=y==null?void 0:y.find(t=>t.layer&&t.annotation.id===e.selectedAnnotation))==null?void 0:cn.layer;V(()=>{T&&(G[T.key]??0)!==T.item&&je(T.key,T.item)},[T==null?void 0:T.key,T==null?void 0:T.item,e.selectedAnnotation]);const We=!!(x!=null&&x.information),se=!!(y!=null&&y.length),Fe=Xe(sa,se),[St,Ze]=m(null),M=se&&St||ia,N=L(()=>{var g,k;const t=(g=y==null?void 0:y.find($=>$.annotation.id===M.selected))==null?void 0:g.annotation,r=(Array.isArray(t==null?void 0:t.body)?t==null?void 0:t.body:[t==null?void 0:t.body]).find($=>($==null?void 0:$.type)==="Feature");return t&&r?{id:String(t.id),feature:r,name:((k=r.properties)==null?void 0:k.label)??t.label}:null},[y,M.selected]),ke=N?`${N.id}:${e.refind??0}`:null,[dt,ft]=m(null),ht=ke!==null&&dt!==ke,Oe=L(()=>{var $,Ae;const t=(o??[]).map(W=>W.navPlace).filter(Boolean),r=t.length?t:e.navPlace?[e.navPlace]:[];if(!r.length)return null;const g=r.flatMap(W=>(W==null?void 0:W.type)==="FeatureCollection"?W.features??[]:(W==null?void 0:W.type)==="Feature"?[W]:[]);if(!g.length)return null;const k=g.length===1?(Ae=($=g[0])==null?void 0:$.properties)==null?void 0:Ae.label:void 0;return{feature:{type:"FeatureCollection",features:g},name:k??e.label}},[o,e.navPlace,e.label]),_e=`place-box-${O}`,[i,h]=m(false),[ge,Sn]=m(false),gt=C(M);gt.current=M;const mt=ve(()=>gt.current.release(),[]),{comments:Et,listedCount:Ut}=M,Te=L(()=>We?(o??[]).filter(t=>Co(t)||Et.has(t.id)):[],[o,We,Et]),Rt=`caption-${O}`,[En,Yt]=m(false),Ft=En&&Te.length>0,Gt=ve(t=>{var r;Yt(false),t&&((r=document.getElementById(`information-${O}`))==null||r.focus())},[O]),j=L(()=>(o??[]).find(t=>Cn(t).length)??null,[o]),Rn=j?Cn(j):ba,F=L(()=>o!=null&&o.length?To(o,ae,G,{standIns:o.length>1}):null,[o,ae,G]),Fn=L(()=>Bn(a,d,p),[a,d,p]),c=(F==null?void 0:F.media[0])??null,Jt=!de&&(c==null?void 0:c.kind)==="video",Tn=de||Jt,$n=de?ee:tt,Ln=L(()=>{if(o!=null&&o.length)return $o(o,G);const t=(Array.isArray(a)?a:a?[a]:[])[0];return typeof(t==null?void 0:t.type)=="string"?t.type.toLowerCase():d?"image":void 0},[o,G,a,d]),[S,zn]=m(null),pt=C(I);pt.current=I;const An=ve(t=>{var r;zn(t),(r=pt.current)==null||r.call(pt,t)},[]),me=F?F.images:Fn,pe=!!c&&(o==null?void 0:o.length)===1,ye=pe&&(c==null?void 0:c.kind)==="audio",Dn=pe&&(c==null?void 0:c.kind)==="video",$e=(o==null?void 0:o.length)===1&&!c&&!j&&me.length===0,yt=!pe&&!$e&&((un=f==null?void 0:f.gestures)==null?void 0:un.navigable)!==false,le=o?`${s??""}
|
|
2
|
+
${o.map(t=>t.id).join("|")}`:null,Le=L(()=>{if(!o||!R)return[];const t=o.flatMap(r=>{const g=Lo(r),k=Je(r.label,w);return g?[{...g,alt:k.text,lang:k.lang}]:[]});return ae==="right-to-left"||ae==="bottom-to-top"?t.reverse():t},[o,ae,R,w]),[Nn,Xt]=m(false),[Vn,Qt]=m(null),v=!ye&&Le.length>0&&(c?Vn!==le:!Nn),en=(t,{annotations:r=false,fullPage:g=false}={})=>({...t,zoom:false,rotation:false,reset:false,fullPage:g&&t.fullPage,annotations:r&&t.annotations}),Ue=$e&&Ve,tn=_t.Children.count(Ne)>0,Tt=Le.length>0&&!ye&&!c,Ye=x?v?Te.length||tn||Ut||c&&(X!=null&&X.length)?en(x,{annotations:true}):null:pe||$e?Ie.length||Te.length||tn||Ut||c&&(X!=null&&X.length)||Ue&&x.fullPage?en(x,{annotations:true,fullPage:Ue}):null:x:null,$t=_&&!v&&(c?c.kind==="audio"&&!pe&&me.length>0:true),[Lt,Kn]=m(null),ze=c?Lt??c.placement:null,[vt,qn]=m(Ca),zt=L(()=>{const t=(c==null?void 0:c.kind)==="video"&&S&&ze?[...me,{id:c.id,placement:ze,width:ze.width,height:ze.height,media:{element:S}}]:me;return vt.length?[...t,...vt]:t},[me,c,S,ze,vt]),nn=pe&&(c==null?void 0:c.kind)==="video"&&Lt?Lt:F?oa(F.placements):null,Hn=JSON.stringify([me,nn,zt.length!==me.length&&[c==null?void 0:c.id,ze],vt.map(t=>t.id)]),bt=C(null),At=C(false),Dt=()=>{c?Qt(v?le:null):Xt(v),v||mt()},Ct=C(null),jn=t=>{if(S&&!v){S.currentTime=t;return}Ct.current=t,v&&Dt()};V(()=>{!S||Ct.current===null||(S.currentTime=Ct.current,Ct.current=null)},[S]);const Nt=Array.isArray(a)?a[0]:a,b=[z,(dn=o==null?void 0:o[0])==null?void 0:dn.label,Nt==null?void 0:Nt.label].map(t=>Je(t,w)).find(t=>t.text),Wn=L(()=>{const t=Je(K,w);return t.text&&t.text!==(b==null?void 0:b.text)?t:void 0},[K,w,b==null?void 0:b.text]),on=Ho((b==null?void 0:b.text)||Pe("canvasImage"),b?b.lang:ue.langOf("canvasImage"),false,ue.hostLanguage),wt=v?[]:[...yt?[ga]:[],...c?[ma]:[],...se?[pa]:[]],an=`keys-${O}`,Zn=yt&&!v&&!ue.langOf("canvasRoleDescription")?Pe("canvasRoleDescription"):void 0,Vt=!!Ye&&Te.length>0,_n=Vt&&Te.map((t,r)=>Je(t.label,w).text?wo(Rt,r):null).filter(Boolean).join(" ")||void 0,sn=C({canvases:o,scene:F,canvasKey:le});sn.current={canvases:o,scene:F,canvasKey:le};const xt=C(null),Kt=ve(()=>{const{canvases:t,scene:r,canvasKey:g}=sn.current;xt.current=t&&r&&bt.current===g?{key:g,canvases:t,placements:r.placements}:null},[]),Un=!o||((fn=xt.current)==null?void 0:fn.key)===le,Ge=to(()=>{const t=xt.current,r=xe.current;if(!t||s==="loading")return null;const g=S&&S.currentTime>0?S.currentTime:null,k=!g&&r&&Wt(r)?Pn(r.getBounds(),t.canvases,t.placements):null,$=t.canvases.find(Ae=>Ae.id===(k==null?void 0:k.canvasId))??t.canvases[0];return $?so({manifestId:s,canvasId:$.id,type:$.type,region:k&&{x:k.rect.x,y:k.rect.y,w:k.rect.width,h:k.rect.height},time:g}):null},be);V(()=>no(S,Ge),[S,Ge]),V(()=>{const t=Q.current;if(!t)return;const r=n(t,Re.current),g=Wt(r)?r:null;xe.current=r,ot(r),r.setDismiss(mt);const k=r.on("open",()=>{var ie;Ht(false),Kt(),Ge(),he("ready"),it(It=>It+1),g&&((ie=H.current)==null||ie.call(H,va(g,()=>xt.current,It=>{var pn,yn;const mn=gt.current.placed.find(jt=>jt.id===It);return mn?(gt.current.select(mn),(yn=Array.from(((pn=g.overlays)==null?void 0:pn.container.querySelectorAll("[id]"))??[]).find(jt=>jt.id===It))==null||yn.focus({preventScroll:true}),true):false})))}),$=r.on("change",()=>{Ht(false),Kt(),Ge(),he("ready"),it(ie=>ie+1)}),Ae=r.on("error",()=>{r.isOpen||he("error")}),W=r.on("unloadable",ie=>st(!!ie)),Gn=r.on("viewport",()=>{var ie;g&&((ie=Ee.current)==null||ie.call(Ee,g.getBounds())),Ge()});return()=>{k(),$(),Ae(),W(),Gn(),r.dispose(),xe.current=null,ot(null)}},[P,n,mt,Kt]),V(()=>{if(!(!D||!Y))return D.attachNavigator(Y)},[D,Y]),V(()=>{if(!(!U||!$e))return U.setGestures({navigable:false}),()=>U.setGestures({})},[U,$e]);const qt=C(false);V(()=>{var r;if(Ue)return;const t=!document.activeElement||document.activeElement===document.body;qt.current&&t&&((r=Q.current)==null||r.focus()),qt.current=false},[Ue]),V(()=>{const t=xe.current;if(v&&(At.current=true),!t||!fe||v)return;const r=bt.current!==null&&bt.current!==le;(!t.isOpen||r)&&he("loading");const g=pe||At.current&&t.isOpen||r;bt.current=le,At.current=false,t.setImages(zt,{world:nn??void 0,fit:g})},[Hn,P,S,fe,v]);const ln=C(s),[Yn,Ht]=m(false);Zt(()=>{var t;s!==ln.current&&(ln.current=s,(t=xe.current)==null||t.clear(),Ht(true),he("loading"))},[s]);const rn=Se==="loading"&&zt.length>0&&fe&&!v;return l(ao.Provider,{value:ue.hostLanguage,children:l("figure",{"aria-labelledby":_n,className:qo("clover-canvas",te),"data-testid":"clover-canvas","data-status":Se,...Vo(qe),"data-unloadable":He||void 0,"data-has-navigator":$t,"data-fullscreen":et,"data-exit":Ke||void 0,"data-controls":Tn?$n?"visible":"hidden":void 0,"data-media":Ln,"data-recording":c?"":void 0,"data-player":ye?"":void 0,"data-animated":j?"":void 0,"data-navigable":yt,"data-placeholder":Le.length&&!ye?v:void 0,ref:ue.ref,onFocus:t=>{qt.current=Ue&&t.target.id===`fullPage-${O}`},onKeyDown:t=>{if(t.key==="Escape"&&Ft&&!t.defaultPrevented){t.preventDefault(),Gt(false);return}if(t.key==="Escape"&&!t.defaultPrevented&&!t.currentTarget.querySelector(".clover-canvas-menu")&&mt()){t.preventDefault();return}Eo(t,Q.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[(Ye||$t)&&c&&l("div",{className:"clover-canvas-scrim","aria-hidden":"true"}),Jt&&l(Me,{fallback:null,children:l(ua,{element:oe,hideDelay:f==null?void 0:f.hideDelay,picture:Q,onChange:we})}),l(xo,{hidden:!Ke}),U&&(Ye||Tt)&&l(Qo,{renderer:D,instance:O,config:Ye??ha,controlButtons:q,placeholderIsMore:Tt&&!c,chapters:c?X:void 0,mediaElement:S,onChapter:jn,request:f==null?void 0:f.request,placeholder:Tt&&l(Me,{fallback:null,children:l(fa,{instance:O,media:!!c,active:v,onToggle:Dt,more:!!x&&(x.zoom||x.rotation||x.reset||x.fullPage)})}),fit:!de,more:J,choices:v?[]:Ie,selections:G,onSelect:je,annotations:M.menu,hiddenPages:M.hiddenPages,onPageVisibilityChange:M.setPagesVisible,selectedAnnotation:M.selected,onAnnotationSelect:M.select,onAnnotationActivate:M.activate,captionId:Vt?Rt:void 0,captionOpen:Ft,onCaptionToggle:()=>Yt(t=>!t),placeId:Oe?_e:void 0,placeOpen:i,onPlaceToggle:()=>{Sn(true),h(t=>!t)},language:w,children:Ye&&Ne}),$t&&l("div",{ref:at,className:"clover-canvas-navigator","data-testid":"clover-canvas-navigator","aria-hidden":"true"}),l("div",{ref:Q,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1},"data-testid":"clover-canvas-viewport",role:se?"group":"img","aria-roledescription":Zn,...on.props,"aria-describedby":wt.length?an:void 0,"aria-keyshortcuts":wt.map(({keys:t})=>t).join(" ")||void 0,"aria-busy":rn,tabIndex:0}),on.node,wt.length>0&&l("span",{id:an,style:oo,children:wt.map(({description:t},r)=>l(_t.Fragment,{children:[r>0&&" ",l("span",{...vn(ue.langOf(t)),children:Pe(t)})]},t))}),l(Io,{kind:"image",shown:He&&!v}),$e&&!v&&(b==null?void 0:b.text)&&l(ko,{text:b.text,lang:b.lang||void 0}),(c==null?void 0:c.kind)==="audio"&&!ye&&me.length===0&&!v&&(b==null?void 0:b.text)&&l("p",{className:"clover-canvas-sound-label","aria-hidden":"true",...vn(b.lang||void 0),children:b.text}),Le.length>0&&!ye&&l(Me,{fallback:null,children:l(ca,{instance:O,stills:Le,vertical:ae==="top-to-bottom"||ae==="bottom-to-top",media:!!c,active:v,lingering:Se==="loading"&&!Yn,onToggle:Dt,request:f==null?void 0:f.request})}),U&&c&&fe&&!v&&l(Me,{fallback:null,children:l(aa,{media:c,request:f==null?void 0:f.request,fillable:Dn,surface:U,instance:O,onElement:An,onFit:Kn,onCaptionChange:Ce,caption:Qe,navigable:yt,fullscreen:pe&&!!(x!=null&&x.fullPage),isFullscreen:Ve,onEnded:Be,chapters:X,highlightedChapter:Mt,onChapterHighlight:E,autoPlay:!ye&&Le.length>0&&M.quietlyOpened!==le,language:w,notes:M.timed,player:ye&&o?{canvas:o[0],title:b,partOf:Wn}:void 0})}),D&&j&&(F==null?void 0:F.frames[wn(j)])&&!v&&l(Me,{fallback:null,children:l(ra,{renderer:D,frames:Rn,byFrame:F.frames[wn(j)],animationKey:j.id,sceneVersion:lt,autoplay:(hn=f==null?void 0:f.animation)==null?void 0:hn.autoplay,loop:(gn=f==null?void 0:f.animation)==null?void 0:gn.loop,onEnded:Be,language:w,duration:Number(j.duration),canvas:j,place:F.placements[o.indexOf(j)],onItems:qn},j.id)}),Fe&&se&&y&&l(Fe.AnnotationState,{given:e,annotations:ut??y,scene:F,renderer:D,sceneVersion:lt,drawn:Un,media:c,mediaElement:S,showPlaceholder:v,canvasKey:le,openImages:Xt,openMedia:Qt,host:Q,onModel:Ze,refind:e.refind??0}),rn&&l(Ko,{overlay:true}),N&&l(Me,{fallback:null,children:l(In,{id:`place-of-${O}`,open:ht,onClose:t=>{var r;ft(ke),t&&((r=document.getElementById(N.id))==null||r.focus())},feature:N.feature,name:N.name,language:w})}),Oe&&ge&&l(Me,{fallback:null,children:l(In,{id:_e,open:i,onClose:t=>{var r;h(false),t&&((r=document.getElementById(`place-${O}`))==null||r.focus())},feature:Oe.feature,name:Oe.name,language:w})}),Vt&&l(Oo,{id:Rt,canvases:Te,comments:Et,open:Ft,onClose:Gt,language:w})]})})};function va(e,n,s){return{fitCanvasRect(o,u,a){const d=n(),p=(d==null?void 0:d.canvases.findIndex(z=>z.id===o))??-1;return!d||p===-1?false:(e.fitBounds(zo(d.canvases[p],d.placements[p],u),a),true)},getCanvasRegion(){const o=n();return o?Pn(e.getBounds(),o.canvases,o.placements):null},get backendKind(){return e.backendKind},get atHome(){return e.isAtHome},fitBounds:(o,u)=>e.fitBounds(o,u),fitItemRect:(o,u,a)=>e.fitItemRect(o,u,a),itemRectToWorld:(o,u)=>e.itemRectToWorld(o,u),getBounds:()=>e.getBounds(),getHomeBounds:()=>e.getHomeBounds(),getCamera:()=>e.getCamera(),home:o=>e.home(o),zoomBy:(o,u,a)=>e.zoomBy(o,u,a),panBy:(o,u,a)=>e.panBy(o,u,a),setRotation:(o,u)=>e.setRotation(o,u),getRotation:()=>e.getRotation(),rotateBy:o=>e.rotateBy(o),worldToScreenPoint:o=>e.worldToScreenPoint(o),screenToWorldPoint:o=>e.screenToWorldPoint(o),on:(o,u)=>e.on(o,u),zoomToAnnotation:s}}const ba=[],Ca=[];function Bn(e,n,s=false){const o=Array.isArray(e)?e:e?[e]:[];return o.length?o.map((a,d)=>{const p=jo(a.service);return!p&&!a.id?null:{id:`${d}:${a.id??p}|${a.region??""}`,service:p,url:a.id,width:a.width,height:a.height,region:a.region}}).filter(a=>a!==null):(Array.isArray(n)?n:n?[n]:[]).filter(Boolean).map((a,d)=>({id:`${d}:${a}`,...s?{service:a}:{url:a}}))}function Pn(e,n,s){let o=null;if(s.forEach((B,P)=>{const te=Math.max(e.x,B.x),f=Math.max(e.y,B.y),_=Math.min(e.x+e.width,B.x+B.width)-te,A=Math.min(e.y+e.height,B.y+B.height)-f;if(_<=0||A<=0)return;const J=_*A;(!o||J>o.area)&&(o={index:P,area:J,clip:{x:te,y:f,width:_,height:A}})}),!o)return null;const{index:u,clip:a}=o,d=n[u],p=s[u],z=Ao(d),K=z.width/p.width,w=z.height/p.height;return{canvasId:d.id,rect:{x:Math.round((a.x-p.x)*K),y:Math.round((a.y-p.y)*w),width:Math.round(a.width*K),height:Math.round(a.height*w)}}}export{ja as C,Na as a,Ot as b,za as c,qa as d,Ka as e,Ha as f,La as g,Wt as h,Aa as i,Da as j,Va as r,$a as s,Ta as t,oa as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,u as a,t as d,l as p,aG as v,k as m}from"./shared-DkY2a89G.mjs";import{M as f,a as h}from"./Markup-DW75Jx3j.mjs";import{R as u}from"./ReadMore-De_0T7lc.mjs";import{E as b}from"./EntryBodies-77vDudCb.mjs";const T=({summary:s,metadata:n,comments:o,language:r})=>{const{t,langOf:l}=c();return a(m,{children:[d(s,r).text&&a(u,{children:a(f,{as:"p",markup:s,language:r,className:"clover-summary clover-canvas-caption-summary"})}),a(h,{metadata:n,language:r,className:"clover-metadata clover-canvas-caption-metadata"}),o!=null&&o.length?a("div",{className:"clover-canvas-caption-annotations",children:[a("p",{className:"clover-canvas-caption-annotations-label",...p(l("informationPanelTabsAnnotations")),children:t("informationPanelTabsAnnotations")}),a("ul",{children:o.map((i,e)=>a("li",{children:a(b,{bodies:v(i),language:r})},i.id??e))})]}):null]})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k,y,A as N,u as t,ai as T,l as L}from"./shared-DkY2a89G.mjs";import b from"./ControlMenu-D1zkB0qX.mjs";import{c as C,a as D}from"./Transport-DjOYI-fR.mjs";import{u as P}from"./useContainerName-hKQjEt7a.mjs";import{E as w}from"./EntryThumbnail-BxQWKW6e.mjs";const z=({id:c,triggerId:p,label:v,labelLang:f,chapters:s,element:e,onChapter:g,request:E,onClose:n})=>{const i=P(v,f),[h,u]=k(()=>(e==null?void 0:e.currentTime)??0);y(()=>{if(!e)return;const r=()=>u(e.currentTime);return r(),e.addEventListener("timeupdate",r),e.addEventListener("seeked",r),()=>{e.removeEventListener("timeupdate",r),e.removeEventListener("seeked",r)}},[e]);const m=C(s,h),o=N(false),d=r=>{g(s[r].start),u(s[r].start)};return t(b,{"data-testid":"clover-canvas-chapters",id:c,onClose:n,triggerId:p,children:[t("fieldset",{className:"clover-canvas-menu-group",...i.props,children:s.map((r,a)=>t("label",{className:"clover-canvas-menu-item clover-canvas-chapters-item",onPointerDown:()=>{o.current=true},children:[t("input",{type:"radio",name:c,checked:a===m,onChange:()=>d(a),onClick:()=>{o.current&&n(true)},onKeyDown:l=>{o.current=false,l.key==="Enter"&&(l.preventDefault(),d(a),n(true))}}),t("span",{className:"clover-cue-time",children:T(r.start)})," ",t("span",{className:"clover-cue-text",...L(r.lang||void 0),children:r.label}),a===m&&t(w,{source:D(r),request:E,large:true})]},r.id??a))}),i.node]})};export{z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as o}from"./shared-DkY2a89G.mjs";import{j as i}from"./classnames-DukgfdpI.mjs";import"./styles-DkkVOSUQ.mjs";function s({open:e=false,className:r}){return o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",className:i("clover-chevron",r),"data-open":e||void 0,children:o("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}export{s as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as r,u as a,l as v}from"./shared-DkY2a89G.mjs";import x from"./ControlMenu-D1zkB0qX.mjs";import{m as C}from"./layout-Djwu8f4R.mjs";import{u as z}from"./useContainerName-hKQjEt7a.mjs";import"./styles-DkkVOSUQ.mjs";const P=({id:m,triggerId:u,label:b,labelLang:g,choices:i,selections:h,onSelect:y,onClose:f,language:s})=>{const d=z(b,g),N=i.some(e=>!r(e.label,s).text);return a(x,{"data-testid":"clover-canvas-choice",id:m,onClose:f,triggerId:u,children:[N&&d.node,i.map((e,k)=>{const t=r(e.label,s);return a("fieldset",{...t.text?{}:d.props,className:"clover-canvas-menu-group",children:[t.text&&a("legend",{className:"clover-canvas-menu-legend",...v(t.lang),children:t.text}),e.items.map((l,n)=>{const o=r(l.label,s),c=o.text||(l.image?"":String(n+1)),p=!C(l);return a("label",{className:"clover-canvas-menu-item","data-disabled":p||void 0,children:[a("input",{type:"radio",name:`${m}-${k}`,"aria-label":c?void 0:String(n+1),checked:(h[e.key]??0)===n,disabled:p,onChange:()=>y(e.key,n)}),l.image&&a("img",{alt:"",className:"clover-canvas-menu-image",decoding:"async",loading:"lazy",src:l.image}),c&&a("span",{...v(o.text?o.lang:void 0),children:c})]},n)})]},e.key)})]})};export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as N,e as $,a as j,b as A,c as u,I as H,y as S,u as o,l as T}from"./shared-DkY2a89G.mjs";import{I as q}from"./Items-CudZ4Lnb.mjs";import{L as w}from"./Label-f07N5Fld.mjs";import{Summary as x,Id as D,Homepage as L}from"./Primitives-C6VJXxZD.mjs";import{j as O}from"./classnames-DukgfdpI.mjs";import{t as p}from"./heading-Cjt0f-Eu.mjs";import"./styles-DkkVOSUQ.mjs";const J=N(function({headingLevel:r=3,className:v,...b},d){const{clover:n}=$("Collection"),{t:f,langOf:g}=j(),i=A(),a=u(e=>e.collection),l=u(e=>H(e.manifest));S(()=>{!a&&(l!=null&&l.id)&&n.openCollection(l.id)},[n,a,l]);const t=a??l;if(!t)return null;const s=t.homepage,c=p(r,`${i}-label`),m=(e,C)=>{const{as:h,title:y,group:I}=p(r,`${i}-${e}`);return o("section",{className:"clover-about-section",...I,children:[o(h,{className:"clover-about-heading",...T(g(e)),...y,children:f(e)}),C]})};return o("div",{ref:d,className:O("clover-about clover-collection",v),...t.label?c.group:null,...b,children:[o(w,{as:c.as,label:t.label,className:"clover-collection-title clover-title",...c.title}),o(x,{value:t.summary,className:"clover-about-summary"}),o(q,{of:"members",layout:"list"}),Array.isArray(s)&&s.length>0&&m("aboutHomepage",o(L,{value:s})),m("aboutCollection",o(D,{value:t.id}))]})});export{J as Collection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as C,a as k,e as I,c as v,b as K,d as L,y as w,A as b,t as h,u as r,l as S}from"./shared-DkY2a89G.mjs";import{i as N}from"./items-BnEnc5ot.mjs";import{j as U}from"./classnames-DukgfdpI.mjs";import"./styles-DkkVOSUQ.mjs";const j=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),B=100,z=C(function({onChange:s,className:y,...A},E){const{t:P,langOf:D}=k(),{clover:T,language:u}=I("CollectionSelect"),t=v(e=>e.collection),n=v(e=>{var l;return((l=e.manifest)==null?void 0:l.id)??""}),f=K(),[c,i]=L(null);w(()=>i(null),[n,t]);const d=b(-1/0),o=b(null);w(()=>{o.current=null},[n,t]);const p=e=>{!e||e===n||e===o.current||(o.current=e,s==null||s(e),T.goToManifest(e).finally(()=>{o.current===e&&(o.current=null)}))},m=()=>c===null||c===n||c===o.current?false:(i(null),true),g=N(t);if(g.length<2)return null;const a=h(t==null?void 0:t.label,u);return r("div",{ref:E,className:U("clover-collection-select",y),...A,children:[r("label",{htmlFor:`${f}-select`,className:"clover-collection-select-label",...S(a.text?a.lang:D("collectionLabel")),children:a.text||P("collectionLabel")}),r("select",{id:`${f}-select`,className:"clover-collection-select-control",value:c??n,onKeyDown:e=>{const{key:l}=e;l==="Enter"?p(c):l==="Escape"?m()&&e.preventDefault():(j.has(l)||l.length===1&&!e.ctrlKey&&!e.metaKey)&&(d.current=performance.now())},onBlur:m,onChange:e=>{const l=e.target.value;i(l),performance.now()-d.current>B&&p(l)},children:g.map(e=>{const l=h(e.label,u);return r("option",{value:e.id,...S(l.text?l.lang:void 0),children:l.text||e.id},e.id)})})]})});export{z as CollectionSelect};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as v,c as u,y as S,T as b,u as C}from"./shared-DkY2a89G.mjs";import{S as q}from"./SceneView-DA7Yg20p.mjs";import{a as w,e as x}from"./hooks-BhtNDs_1.mjs";function M({label:i,language:d,options:t,...f}){const r=v("Scene"),{clover:a}=r,e=w().find(n=>n.type==="Scene"),s=x(),g=u(n=>{var o;return n.status==="loading"?"loading":((o=n.manifest)==null?void 0:o.id)??""}),c=u(n=>n.target);S(()=>{c&&e&&c.canvasId===e.id&&a.consumeTarget()},[c,e,a]);const l=(t==null?void 0:t.request)??a.request,m=b(()=>({...t,request:l}),[t,l]);return e?C(q,{...f,scene:e,manifestId:g,label:i??e.label??(s==null?void 0:s.label),language:d??r.language,options:m}):null}export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as ve,C as q,c as h,A as l,d as me,y as O,T as R,N as be,q as f,am as d,u as Se,an as we,ao as Ae,ap as Ie,o as Ce}from"./shared-DkY2a89G.mjs";import{C as Le}from"./CanvasView-2Fj9nT06.mjs";import{u as ke,a as xe}from"./fromManifest-DrAmY1lB.mjs";import{j as z,k as ye}from"./layout-Djwu8f4R.mjs";import{s as Pe}from"./show-link-DgLJzG7k.mjs";import{a as qe,d as Oe,e as Re,f as Te}from"./hooks-BhtNDs_1.mjs";const Ue=({options:i,onReady:T,onViewportChange:v,onMediaElement:m,onCaptionChange:A,caption:j,onEnded:b,placeholder:F=true,label:G,partOf:J,language:Q,annotations:I,chapters:W,...p})=>{const C=ve("Canvas"),{clover:t}=C,X=q(t.captions.subscribe,t.captions.get,t.captions.get),Y=j??X,B=Q??C.language,c=qe(),{direction:Z}=Oe(),n=Re(),o=Te(),_=h(e=>{var a;return e.status==="loading"?"loading":((a=e.manifest)==null?void 0:a.id)??""}),S=h(e=>e.target),D=h(e=>we(e.manifest,e.addedSets,e.search.set,e.regions)),E=h(e=>Ie(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),ee=h(e=>Ce(e.manifest,e.addedSets,e.hiddenSets,e.shownSets)),L=h(e=>e.annotationId),H=l(L);H.current=L;const[te,ae]=me(0);O(()=>t.found.subscribe(e=>{e&&e===H.current&&ae(a=>a+1)}),[t]);const ne=q(t.highlight.subscribe,t.highlight.get,t.highlight.get),se=q(t.chapter.subscribe,t.chapter.get,t.chapter.get),u=c.map(e=>e.id).join("|"),ce=R(()=>{if(I)return I;const e=c.map(a=>a.id);return D.flatMap(a=>a.entries.filter(s=>e.includes(s.canvasId)).map(s=>({annotation:s.annotation,targetIndex:e.indexOf(s.canvasId),pageId:a.id,...a.label?{pageLabel:a.label}:{},...s.place?{place:s.place}:{},...s.layer?{layer:{key:s.layer.key,item:s.layer.item}}:{}})))},[I,D,c]),ie=S?(e=>!!e&&c.some(a=>a.id===e))(S.canvasId):false,M=l(null);ie&&(M.current=u);const oe=F&&M.current!==u,k=l(null),x=l(null),y=R(()=>c.some(e=>z(e).length>0),[c]),g=y?c.find(e=>z(e).length>0):void 0,re=ke(n,g,B,Ae),K=l(y);K.current=y;const P=j===void 0?C.language:void 0,le=g==null?void 0:g.id;O(()=>{if(!P||!g)return;const e=ye(g).find(a=>a.language&&be(a.language,P));e&&t.captions.get()!==e.id&&t.captions.emit(e.id)},[P,le,t]);const r=f(()=>{const e=t.store.get().target;!e||!t.store.get().canvasId||xe(e,k.current,x.current,K.current)&&t.consumeTarget()},[t]),N=l(u);O(()=>{N.current!==u&&(N.current=u,x.current=null),S&&r()},[S,u,r]);const w=l(T);w.current=T;const de=f(e=>{var a;k.current=e,e.on("change",r),r(),(a=w.current)==null||a.call(w,e)},[r]),ue=f(e=>{var s;const a=(s=k.current)==null?void 0:s.getCanvasRegion();t.viewport.emit(a?{canvasId:a.canvasId,region:{x:a.rect.x,y:a.rect.y,w:a.rect.width,h:a.rect.height}}:null),v==null||v(e)},[t,v]),ge=f(e=>{x.current=e,t.media.emit(e),e&&r(),m==null||m(e)},[t,r,m]),he=f(()=>{b==null||b(),(d(n,"auto-advance")||d(o,"auto-advance"))&&t.next({autoplay:true,wrap:d(n,"repeat")})},[t,n,o,b]),fe=f(e=>void Pe(t,e),[t]),U=(i==null?void 0:i.request)??t.request,V=d(o,"auto-advance")||d(n,"auto-advance"),$=d(o,"repeat")||d(n,"repeat"),pe=R(()=>({...i,request:U,animation:(i==null?void 0:i.animation)??{autoplay:V,loop:$}}),[i,U,V,$]);return c.length?Se(Le,{...p,manifestId:_,navPlace:n==null?void 0:n.navPlace,canvases:c,viewingDirection:Z,language:B,label:G??(o==null?void 0:o.label)??(n==null?void 0:n.label),partOf:J??(n==null?void 0:n.label),options:pe,placeholder:oe,onReady:de,onViewportChange:ue,onMediaElement:ge,caption:Y,onCaptionChange:e=>{t.captions.emit((e==null?void 0:e.id)??null),A==null||A(e)},onEnded:he,annotations:ce,hiddenPages:ee,unlistedPages:E,onPageVisibilityChange:(e,a)=>e.forEach(s=>t.setSetVisible(s,a)),chapters:W??re,highlightedChapter:se,onChapterHighlight:e=>t.chapter.emit(e),selectedAnnotation:L,refind:te,highlightedAnnotation:ne,onAnnotationSelect:e=>t.selectAnnotation(e),onAnnotationLink:p.onAnnotationLink??fe,onAnnotationActive:e=>{var a;t.highlight.emit(e),(a=p.onAnnotationActive)==null||a.call(p,e)}}):null};export{Ue as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as o}from"./shared-DkY2a89G.mjs";import{p as a}from"./playerSurface-DG1XipTq.mjs";import n from"./Connected-DMXG3imZ.mjs";import{j as t}from"./classnames-DukgfdpI.mjs";import{a as m}from"./hooks-BhtNDs_1.mjs";function v({className:e,...r}){return m().some(i=>i.type==="Timeline")?o(n,{...r,className:t("clover-timeline",e),navigator:false,surface:a}):null}export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as W,a as X,e as Y,c as $,J as Z,C as O,d as N,b as _,T as tt,A as et,y as B,u as o,t as rt,l as k,k as st,v as nt,K as j,E as at,L as A}from"./shared-DkY2a89G.mjs";import{imageSource as it}from"./thumbnail-DecrVnpj.mjs";import{j as ot}from"./classnames-DukgfdpI.mjs";import{C as ct}from"./Chevron-Cyr_cc9X.mjs";import{E as lt}from"./EntryThumbnail-BxQWKW6e.mjs";import{S as ut}from"./Steps-nlSCzbDQ.mjs";import{C as dt}from"./Cue-CUGmPS3k.mjs";import{u as mt}from"./useContainerName-hKQjEt7a.mjs";import"./styles-DkkVOSUQ.mjs";const Nt=W(function({as:d="nav",className:n,...u},h){const{t:p,langOf:c}=X(),{clover:s,language:F}=Y("Contents"),x=mt(p("informationPanelTabsContents"),c("informationPanelTabsContents"),u["aria-label"]!==void 0||u["aria-labelledby"]!==void 0),f=$(e=>Z(e.manifest)),T=$(e=>e.canvasId),z=$(e=>e.annotationId),S=O(s.media.subscribe,s.media.get,s.media.get),[D,w]=N(null),v=gt(f,T,S,D),H=O(s.chapter.subscribe,s.chapter.get,s.chapter.get),J=_(),C=tt(()=>pt(f,v),[f,v]),[K,L]=N(()=>new Map),M=et(new Set);B(()=>{const e=[...C].filter(r=>!M.current.has(r));M.current=C,L(r=>{if(!e.some(t=>r.has(t)))return r;const i=new Map(r);return e.forEach(t=>i.delete(t)),i})},[C]);const[b,U]=N();if(!f.length)return null;const G=e=>K.get(e.id)??C.has(e.id),P=(e,r)=>{var m,l;const i=(m=e.parts)==null?void 0:m[r];if(!i)return;U({node:e.id,index:r}),w(e.id);const t=A(e.id,r);i.region&&((l=s.store.get().regions)!=null&&l.entries.some(a=>a.id===t))?s.selectAnnotation(t):s.goTo(i.canvasId,i.region?{region:i.region}:{})},Q=e=>{if(e.canvasId){if(w(e.id),e.parts){P(e,0);return}if(e.canvasId===T&&e.time&&S){at(S,e.time.start);return}s.goTo(e.canvasId,{...e.time?{time:e.time.start,autoplay:true}:{},...e.region?{region:e.region}:{}})}},R=(e,r)=>{var l;const i=r.findIndex((a,y)=>!!a.region&&A(e.id,y)===z),t=(b==null?void 0:b.node)===e.id&&((l=r[b.index])==null?void 0:l.canvasId)===T?b.index:-1,m=i>=0?i:t>=0?t:r.findIndex(a=>a.canvasId===T);return{position:m,total:r.length,step:a=>P(e,m+a)}},q=(e,r,i=false)=>o("ol",{className:"clover-contents-list",id:r,hidden:i,children:e.map((t,m)=>{const l=rt(t.label,F),a=r?`${r}-${m}`:`${J}-${m}`,y=t.children.length>0,I=y&&G(t),E=t.id===v?it(t.thumbnail):null;return o("li",{className:"clover-contents-item",children:[o("div",{className:"clover-contents-row","data-current":t.id===v?"true":void 0,children:[o("button",{type:"button",id:`${a}-entry`,className:"clover-contents-button","data-trail":C.has(t.id)?"true":void 0,"aria-current":t.id===v?"true":void 0,"data-highlighted":t.id===H?"true":void 0,disabled:!t.canvasId,onMouseEnter:()=>s.chapter.emit(t.id),onMouseLeave:()=>s.chapter.emit(null),onFocus:()=>s.chapter.emit(t.id),onBlur:()=>s.chapter.emit(null),"data-timed":t.time?"true":void 0,"data-pictured":E?"true":void 0,...k(l.text&&!t.time&&!E?l.lang:void 0),onClick:()=>Q(t),children:t.time||E?o(st,{children:[t.time&&o(dt,{start:t.time.start,className:"clover-contents-time"}),o("span",{className:"clover-cue-text",...k(l.text?l.lang:void 0),children:l.text||t.id}),o(lt,{source:E,request:s.request,large:true})]}):l.text||t.id}),t.id===v&&t.parts&&t.parts.length>1&&o(ut,{className:"clover-contents-steps",steps:R(t,t.parts)}),y&&o("button",{type:"button",className:"clover-contents-toggle","aria-expanded":I,"aria-controls":`${a}-list`,"aria-labelledby":`${a}-toggle ${a}-entry`,onClick:()=>L(V=>new Map(V).set(t.id,!I)),children:[o("span",{id:`${a}-toggle`,style:nt,...k(c("contentsSectionsIn")),children:p("contentsSectionsIn")}),o(ct,{open:I,className:"clover-contents-chevron"})]})]}),y&&q(t.children,`${a}-list`,!I)]},t.id)})});return o(d,{ref:h,...x.props,className:ot("clover-contents",n),...u,children:[x.node,q(f)]})});function pt(g,d){const n=new Set;if(!d)return n;const u=(h,p)=>h.some(c=>c.id===d?(p.forEach(s=>n.add(s)),true):u(c.children,[...p,c.id]));return u(g,[]),n}function gt(g,d,n,u){const[h,p]=N(()=>j(g,d,void 0,u));return B(()=>{const c=()=>p(j(g,d,n==null?void 0:n.currentTime,u));if(c(),!!n)return n.addEventListener("timeupdate",c),n.addEventListener("seeked",c),()=>{n.removeEventListener("timeupdate",c),n.removeEventListener("seeked",c)}},[g,d,n,u]),h}export{Nt as Contents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as w,ac as b,_ as h,y as T,u as k}from"./shared-DkY2a89G.mjs";import{j as x}from"./classnames-DukgfdpI.mjs";import"./styles-DkkVOSUQ.mjs";const L=({id:a,triggerId:c,onClose:n,"data-testid":s,className:y,holds:e,inside:l=false,children:g})=>{const u=w(null);return b(true,()=>n(false)),h(()=>{const t=u.current;t&&l&&S(t)},[l]),T(()=>{const t=u.current,i=(t==null?void 0:t.querySelector('input[type="radio"]:checked'))??(t==null?void 0:t.querySelector('input[type="radio"]:not(:disabled)'))??(t==null?void 0:t.querySelector("input"))??(t==null?void 0:t.querySelector('[role="option"][tabindex="0"]')),f=i==null?void 0:i.closest('label, [role="option"]');if(t&&f){const o=f.offsetTop+f.offsetHeight;o>t.scrollTop+t.clientHeight&&(t.scrollTop=o-t.clientHeight),f.offsetTop<t.scrollTop&&(t.scrollTop=f.offsetTop)}i==null||i.focus({preventScroll:true});const v=o=>{var d,p,m;const r=o.target;(d=u.current)!=null&&d.contains(r)||(p=document.getElementById(c))!=null&&p.contains(r)||r&&((m=e==null?void 0:e())!=null&&m.contains(r))||n(false)},E=o=>{var p,m;if(o.key!=="Escape")return;const r=document.activeElement,d=!!((p=u.current)!=null&&p.contains(r)||(m=document.getElementById(c))!=null&&m.contains(r));d&&o.preventDefault(),n(d)};return document.addEventListener("pointerdown",v),document.addEventListener("keydown",E,true),()=>{document.removeEventListener("pointerdown",v),document.removeEventListener("keydown",E,true)}},[c,n,e]),k("div",{className:x("clover-canvas-menu",y),"data-testid":s,id:a,ref:u,children:g})};function S(a){const c=a.getBoundingClientRect();let n=0,s=document.documentElement.clientWidth;for(let e=a.parentElement;e;e=e.parentElement){if(getComputedStyle(e).overflowX==="visible")continue;const l=e.getBoundingClientRect();n=Math.max(n,l.left),s=Math.min(s,l.right);break}const y=Math.max(n-c.left,Math.min(0,s-c.right));y&&(a.style.translate=`${y}px 0`)}export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as l}from"./shared-DkY2a89G.mjs";import{u}from"./useControlsVisibility-DPg8uAkW.mjs";function f({element:i,hideDelay:r,picture:s,onChange:o}){const t=u(i,r,s);return l(()=>o(t),[t,o]),null}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as m,d as g,A as v,q as u,u as e,P as f,z as b}from"./shared-DkY2a89G.mjs";const k=b(()=>import("./ControlMenu-D1zkB0qX.mjs"));function N({position:c,total:l,list:p}){const n=`${m().replace(/:/g,"")}-count`,s=`${n}-menu`,[r,t]=g(false),a=v(null),h=u(()=>{var o;return(o=a.current)==null?void 0:o.closest(".clover-pager")},[]),i=u(o=>{var d;t(false),o&&((d=document.getElementById(n))==null||d.focus())},[n]);return e("span",{className:"clover-pager-count",ref:a,children:[e("button",{type:"button",id:n,className:"clover-pager-count-button","aria-controls":r?s:void 0,"aria-expanded":r,onClick:()=>t(!r),children:[e("span",{className:"clover-pager-position","aria-live":"polite",children:[e("span",{children:[c>=0?c+1:"\u2013"," / ",l]}),e("span",{className:"clover-pager-room","aria-hidden":"true",hidden:true,children:[l," / ",l]})]}),e("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 12 12",children:e("path",{d:"M3 4.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),r&&e(f,{fallback:null,children:e(k,{id:s,triggerId:n,onClose:i,holds:h,inside:true,className:"clover-pager-menu",children:e("div",{className:"clover-collection clover-pager-list",children:p(()=>i(true))})})})]})}export{N as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as i,ai as m}from"./shared-DkY2a89G.mjs";import{j as o}from"./classnames-DukgfdpI.mjs";import"./styles-DkkVOSUQ.mjs";function s({start:r,className:e}){return i("span",{className:o("clover-cue-time",e),children:m(r)})}export{s as C};
|