@nulib/clover 4.5.9 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Canvas/CanvasView.mjs +37 -4
- package/dist/components/Canvas/Connected.mjs +6 -2
- package/dist/components/Canvas/FrameAnimation.mjs +4 -48
- package/dist/components/Canvas/LoadedCanvas.mjs +26 -6
- package/dist/components/Canvas/Placeholder.mjs +1 -1
- package/dist/components/Canvas/media/Player.mjs +2 -2
- package/dist/components/CollectionSelect/CollectionSelect.mjs +6 -4
- package/dist/components/Items/Items.mjs +33 -7
- package/dist/components/Items/Position.mjs +2 -5
- package/dist/components/Items/StandaloneItems.mjs +6 -0
- package/dist/components/Items/vertical/ItemsVertical.mjs +8 -0
- package/dist/components/Map/MapView.mjs +2 -8
- package/dist/components/Root/useRootState.mjs +15 -14
- package/dist/components/Scene/Loaded.mjs +5 -1
- package/dist/core/clover.mjs +38 -10
- package/dist/core/geo.mjs +5 -4
- package/dist/core/request.mjs +7 -0
- package/dist/core/save-file.mjs +5 -2
- package/dist/core/selectors.mjs +16 -2
- package/dist/core/vtt.mjs +6 -4
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/it.json.mjs +1 -1
- package/dist/i18n/locales/ja.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hans.json.mjs +1 -1
- package/dist/i18n/locales/zh-Hant.json.mjs +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/lib/gltf/load.mjs +5 -2
- package/dist/lib/renderer/CanvasRenderer.mjs +183 -45
- package/dist/lib/renderer/backends/webgl2/shaders.mjs +2 -1
- package/dist/lib/renderer/io/TileCache.mjs +1 -1
- package/dist/lib/renderer/io/decode.mjs +2 -1
- package/dist/lib/renderer/scene/planFrame.mjs +17 -0
- package/dist/lib/renderer/scene/sceneItem.mjs +9 -4
- package/dist/lib/renderer/sources/imageService.mjs +2 -1
- package/dist/lib/renderer/sources/tilePyramid.mjs +14 -3
- package/dist/map/index.d.mts +2 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/items-vertical.css +1 -0
- package/dist/styles/items.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/EntryThumbnail.mjs +6 -3
- package/dist/ui/Loading.mjs +9 -0
- package/dist/ui/loadingPass.mjs +52 -0
- package/dist/ui/sheets/items-vertical.mjs +5 -0
- package/dist/web-components/About-I4h1cfup.mjs +1 -0
- package/dist/web-components/AnnotationItems-BfQm1YRD.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-CkTdOVgU.mjs → AnnotationMenu-guk9SbaL.mjs} +1 -1
- package/dist/web-components/{AnnotationState-DMgUWawu.mjs → AnnotationState-BX7xh-bd.mjs} +1 -1
- package/dist/web-components/{Annotations-DZX4QhcQ.mjs → Annotations-BJrje3Ey.mjs} +1 -1
- package/dist/web-components/{Annotations-CEshACVg.mjs → Annotations-DBxLDLDf.mjs} +1 -1
- package/dist/web-components/{Body-CLEco7_N.mjs → Body-CQuiRv9p.mjs} +1 -1
- package/dist/web-components/{BodyAlert-BP4r3Cd6.mjs → BodyAlert-DF9rnG5o.mjs} +1 -1
- package/dist/web-components/{Button-JqNjqiWi.mjs → Button-qhI73GCI.mjs} +1 -1
- package/dist/web-components/{Camera-Ccshr6VH.mjs → Camera-D2MnETlC.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-B6073uEb.mjs → Canvas2DBackend-kJpOk_Pb.mjs} +1 -1
- package/dist/web-components/CanvasView-B752g1bm.mjs +2 -0
- package/dist/web-components/{CaptionDetails-Cg-Qs1Vo.mjs → CaptionDetails-Cl3fLJfr.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-CB4zdVOh.mjs +1 -0
- package/dist/web-components/{Chevron-h5qzcEcw.mjs → Chevron-CT1ntI6B.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-DJzv0hit.mjs → ChoiceMenu-DoXMSLjk.mjs} +1 -1
- package/dist/web-components/{Collection-DdgyAL7y.mjs → Collection-B8ipKdPl.mjs} +1 -1
- package/dist/web-components/CollectionSelect-C0Tunk6c.mjs +1 -0
- package/dist/web-components/{Connected-Bfk00vQd.mjs → Connected-DaP_DgGw.mjs} +1 -1
- package/dist/web-components/{Connected-XzGCGV5F.mjs → Connected-L47VwCva.mjs} +1 -1
- package/dist/web-components/Connected-shq2_tc-.mjs +1 -0
- package/dist/web-components/{Contents-RRatJCsY.mjs → Contents-_u13TaBJ.mjs} +1 -1
- package/dist/web-components/{ControlMenu-CbGB6ddJ.mjs → ControlMenu-BW39OjKC.mjs} +1 -1
- package/dist/web-components/ControlsFade-LFHufW32.mjs +1 -0
- package/dist/web-components/{CountMenu-sy7-np4i.mjs → CountMenu-CQ7ThPWJ.mjs} +1 -1
- package/dist/web-components/Cue-B1IlY4Ae.mjs +1 -0
- package/dist/web-components/{Document-CeqDB3XD.mjs → Document-BChOw20c.mjs} +1 -1
- package/dist/web-components/{DomLayers-taxnJRum.mjs → DomLayers-BIFA6J56.mjs} +1 -1
- package/dist/web-components/{Download-Car7CU2u.mjs → Download-BfZJVu-O.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BtpwwwYE.mjs → EntryBodies-Bld2RXeE.mjs} +1 -1
- package/dist/web-components/EntryThumbnail-C5df3CaH.mjs +1 -0
- package/dist/web-components/{FieldPill-cf9eBuE6.mjs → FieldPill-Dx--yBoK.mjs} +1 -1
- package/dist/web-components/FrameAnimation-CpniJMTK.mjs +1 -0
- package/dist/web-components/{Gallery-QK3ww9Sn.mjs → Gallery-CkaSdVAP.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-D3XRo_IQ.mjs → GlobeGlyph-CCi1sZgm.mjs} +1 -1
- package/dist/web-components/{HideToggle-BdulLE7z.mjs → HideToggle-nvJtMFOZ.mjs} +1 -1
- package/dist/web-components/{ImageControls-CiL_D1jJ.mjs → ImageControls-Df-M7F2R.mjs} +1 -1
- package/dist/web-components/Items-BsKByN_b.mjs +1 -0
- package/dist/web-components/ItemsVertical-Dmhm1DBy.mjs +1 -0
- package/dist/web-components/Label-DElSTYS5.mjs +1 -0
- package/dist/web-components/{LanguageChoice-CPvKeMS_.mjs → LanguageChoice-t55qbd8x.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-DEoDIxlR.mjs → LanguageMenu-BlFBWRSO.mjs} +1 -1
- package/dist/web-components/{LightboxView-D42ogB9b.mjs → LightboxView-BhPao9ao.mjs} +1 -1
- package/dist/web-components/{ListEnd-1VWK96re.mjs → ListEnd-KSoUQrsM.mjs} +1 -1
- package/dist/web-components/Loaded-uGqT3xyD.mjs +1 -0
- package/dist/web-components/LoadedCanvas-fqjWHH0H.mjs +3 -0
- package/dist/web-components/LoadedMap-BpRHQPoU.mjs +1 -0
- package/dist/web-components/Loading-DSaV1vxb.mjs +1 -0
- package/dist/web-components/{Map-1SoA6_NY.mjs → Map-CUY8HEgh.mjs} +1 -1
- package/dist/web-components/MapView-DIVMYZZ1.mjs +3 -0
- package/dist/web-components/{Markup-CGp-sAk0.mjs → Markup-DzUsOaNC.mjs} +1 -1
- package/dist/web-components/{MediaBody-nPvqRq1E.mjs → MediaBody-CJELKAWJ.mjs} +1 -1
- package/dist/web-components/{MediaBody-BCwNSKUW.mjs → MediaBody-CN2ZTxK0.mjs} +1 -1
- package/dist/web-components/{NavDate-BQjEV2AU.mjs → NavDate-CD3sFxZJ.mjs} +1 -1
- package/dist/web-components/{Navigator-BVKUD0-V.mjs → Navigator-CVDhe8R_.mjs} +1 -1
- package/dist/web-components/{Pager-Ccdj43ZQ.mjs → Pager-BmZaB--9.mjs} +1 -1
- package/dist/web-components/PagerLayout-DhIz3hKA.mjs +1 -0
- package/dist/web-components/{Panel-xCi9RT4Z.mjs → Panel-CdJyJVBh.mjs} +1 -1
- package/dist/web-components/PanelPart-m2QWHh_4.mjs +1 -0
- package/dist/web-components/{PanelToggle-CSRKyPCu.mjs → PanelToggle-BqVj7sX0.mjs} +1 -1
- package/dist/web-components/PartOfManifest-Dgw1shMM.mjs +1 -0
- package/dist/web-components/{Pending-Dagi9Hhc.mjs → Pending-CDXsIk5O.mjs} +1 -1
- package/dist/web-components/{PlaceBox-C4_JBM6I.mjs → PlaceBox-DNnl9coD.mjs} +1 -1
- package/dist/web-components/Placeholder-D8Sabput.mjs +1 -0
- package/dist/web-components/Position-oFMJoo4P.mjs +1 -0
- package/dist/web-components/{Primitives-C2f-ZV1J.mjs → Primitives-BdXIEpYW.mjs} +1 -1
- package/dist/web-components/{Provider-DQ5Gz-Bh.mjs → Provider-DWIlPOzR.mjs} +1 -1
- package/dist/web-components/{ReadMore-D4zZ4ZJ5.mjs → ReadMore-f34RbHMm.mjs} +1 -1
- package/dist/web-components/Root-CEtLCE4Y.mjs +1 -0
- package/dist/web-components/Scene-BJE8miZL.mjs +1 -0
- package/dist/web-components/{SceneView-BgjiTjRe.mjs → SceneView-D635_fRV.mjs} +1 -1
- package/dist/web-components/{Search-DGAEkL-h.mjs → Search-219u7M8o.mjs} +1 -1
- package/dist/web-components/{Sections-CPCPWIFr.mjs → Sections-C3fPhGNx.mjs} +1 -1
- package/dist/web-components/{SeekMarks-DemiDpFP.mjs → SeekMarks-Ds8v3SaW.mjs} +1 -1
- package/dist/web-components/StandaloneItems-Mdh-k3w9.mjs +1 -0
- package/dist/web-components/{Status-BYnM-ITS.mjs → Status-CEkhPlDF.mjs} +1 -1
- package/dist/web-components/{Steps-DByLc8pX.mjs → Steps-BoNd47eB.mjs} +1 -1
- package/dist/web-components/{TargetItems-BDt6OXh8.mjs → TargetItems-dFjJs-VP.mjs} +1 -1
- package/dist/web-components/Timeline-DPdS6bYG.mjs +1 -0
- package/dist/web-components/{Tip-h4Abk6aH.mjs → Tip-mcI7IRQh.mjs} +1 -1
- package/dist/web-components/{Transcript-CfOhWPdJ.mjs → Transcript-5wVgmZmU.mjs} +1 -1
- package/dist/web-components/{Transport-Xwq6Cpn3.mjs → Transport-DYjd2GnA.mjs} +1 -1
- package/dist/web-components/{Transport-B58M-XIa.mjs → Transport-DdNRlSa0.mjs} +1 -1
- package/dist/web-components/{annotation-collection-BH66kiGL.mjs → annotation-collection-C3UpNV1K.mjs} +1 -1
- package/dist/web-components/{annotation-name-Biu7-abB.mjs → annotation-name-DhMF4ZHj.mjs} +1 -1
- package/dist/web-components/{annotations-content-tLJ5sUiC.mjs → annotations-content-CuWJZr4t.mjs} +1 -1
- package/dist/web-components/{body-BIieugrZ.mjs → body-Bym9Uvav.mjs} +1 -1
- package/dist/web-components/canvas-BIXBggVo.mjs +1 -0
- package/dist/web-components/{viewer/cloverEngine-Cd4MoqAY.mjs → cloverEngine-BEdb3g52.mjs} +3 -3
- package/dist/web-components/{content-state-reader-DtRv0vnr.mjs → content-state-reader-BGZEChSM.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-QLLc8cpa.mjs → controlGlyphs-DMQCxKaT.mjs} +1 -1
- package/dist/web-components/{controls-DuLb0zYy.mjs → controls-B1pIwRgH.mjs} +1 -1
- package/dist/web-components/{downloads-DUWW30ai.mjs → downloads-DwzBIS-9.mjs} +1 -1
- package/dist/web-components/{dragToClose-DAS5OWSl.mjs → dragToClose-BYUJ9qgo.mjs} +1 -1
- package/dist/web-components/{engine-DaDzKDum.mjs → engine-DUv-Syum.mjs} +1 -1
- package/dist/web-components/{engines-DGQYmjhi.mjs → engines-BzM_oBU_.mjs} +1 -1
- package/dist/web-components/{es-Bn4XnLxy.mjs → es-Bx-zZBfZ.mjs} +1 -1
- package/dist/web-components/{fetchManifest-CDLkWDgP.mjs → fetchManifest-Cp7c8vs5.mjs} +1 -1
- package/dist/web-components/{fi-CjAXeLqH.mjs → fi-DsP1FhBy.mjs} +1 -1
- package/dist/web-components/{follow-content-Rav98zXa.mjs → follow-content-CmXq05TW.mjs} +1 -1
- package/dist/web-components/{fr-CeFhkxoi.mjs → fr-BuL_F9Jq.mjs} +1 -1
- package/dist/web-components/{fromManifest-B8AlKP6a.mjs → fromManifest-DbgwTeBo.mjs} +1 -1
- package/dist/web-components/{glyphs-BzZKC9_8.mjs → glyphs-atKuagcd.mjs} +1 -1
- package/dist/web-components/{hooks-BGorrvz7.mjs → hooks-DhTYPPVG.mjs} +1 -1
- package/dist/web-components/image-layers-CoBPhMZw.mjs +1 -0
- package/dist/web-components/{image-service-content-BGBge-Nu.mjs → image-service-content-CL_EZugL.mjs} +1 -1
- package/dist/web-components/imageService-BoQQvo1U.mjs +1 -0
- package/dist/web-components/{index-GH8QRDv1.mjs → index-Ciz5x8Tt.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{it-DxtfVek2.mjs → it-DH3EtrgI.mjs} +1 -1
- package/dist/web-components/{items-CtOmANs8.mjs → items-CjtUJjSU.mjs} +1 -1
- package/dist/web-components/items-DiQ3K5TV.mjs +1 -0
- package/dist/web-components/{ja-rsicBgWR.mjs → ja-BEHbDotv.mjs} +1 -1
- package/dist/web-components/label-CKgFcOzZ.mjs +1 -0
- package/dist/web-components/{layout-BmDYodJC.mjs → layout-zjkkOHIj.mjs} +1 -1
- package/dist/web-components/{link-CQUMZL8-.mjs → link-CrNaByf-.mjs} +1 -1
- package/dist/web-components/logo-C2xm9WAL.mjs +1 -0
- package/dist/web-components/{models-BbiJP5tM.mjs → models-BFKa5v_H.mjs} +1 -1
- package/dist/web-components/{no-BkyI1fhp.mjs → nb-Bdfn_mZs.mjs} +1 -1
- package/dist/web-components/{nn-n_xM6AGl.mjs → nn-BCWbSuK0.mjs} +1 -1
- package/dist/web-components/{nb-BkyI1fhp.mjs → no-Bdfn_mZs.mjs} +1 -1
- package/dist/web-components/{nodes-DARyEM2G.mjs → nodes-BDyXzQhk.mjs} +1 -1
- package/dist/web-components/{overlayImage-F-EX6YpI.mjs → overlayImage-BGxovfPN.mjs} +1 -1
- package/dist/web-components/{panel-COE-wxFK.mjs → panel-rEGhe5fL.mjs} +1 -1
- package/dist/web-components/part-PF-s_vD-.mjs +1 -0
- package/dist/web-components/{playerSurface-BAK0g9ik.mjs → playerSurface-BthXi9l2.mjs} +1 -1
- package/dist/web-components/{pointer-DnJMax9Y.mjs → pointer-C22ufJ5w.mjs} +1 -1
- package/dist/web-components/{provider-B9I7nScH.mjs → provider-B2C3eH9p.mjs} +1 -1
- package/dist/web-components/{pt-COchUT7D.mjs → pt-Da5El49z.mjs} +1 -1
- package/dist/web-components/{range-regions-DEnDbiy7.mjs → range-regions-Ytq4QkMX.mjs} +1 -1
- package/dist/web-components/{read-more-DkDjZsOx.mjs → read-more-B7LHzF4-.mjs} +1 -1
- package/dist/web-components/{readingLanguages-DZxj1se7.mjs → readingLanguages-B20n_dkw.mjs} +1 -1
- package/dist/web-components/rendererSurface-BfZP5clN.mjs +22 -0
- package/dist/web-components/{renderers-17347cy8.mjs → renderers-C569MeQB.mjs} +1 -1
- package/dist/web-components/{resource-CtPBxzcn.mjs → resource-C5cMic8z.mjs} +1 -1
- package/dist/web-components/save-file-DsYdCZpi.mjs +1 -0
- package/dist/web-components/{search-CE2oKdT4.mjs → search-kJ_71fbN.mjs} +1 -1
- package/dist/web-components/shared-ByrLMUQa.mjs +1 -0
- package/dist/web-components/{show-link-DuRktUta.mjs → show-link-BqrJDDMV.mjs} +1 -1
- package/dist/web-components/{sizedImage-DAaoYkRy.mjs → sizedImage-CyCf0GtL.mjs} +1 -1
- package/dist/web-components/{split-BP3eTM8x.mjs → split-BZRKCI3g.mjs} +1 -1
- package/dist/web-components/{status-CpVNchw2.mjs → status-CwO2mygB.mjs} +1 -1
- package/dist/web-components/styles-BOXm_R8o.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-BcediRH4.mjs → thumbnail-Np4ftjUo.mjs} +1 -1
- package/dist/web-components/{tip-BRNRex1D.mjs → tip-CNyxI6xd.mjs} +1 -1
- package/dist/web-components/{toggle-hREejXk6.mjs → toggle-lop2se80.mjs} +1 -1
- package/dist/web-components/{useContainerName-DeDFbnAs.mjs → useContainerName-DR_6TyDU.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-BYHbIHGH.mjs → useControlsVisibility-Dig_1-0T.mjs} +1 -1
- package/dist/web-components/{useNearViewport-BgvHaTUu.mjs → useNearViewport-B_kjW0WB.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-B7zWqV5x.mjs → useScrollTrack-6BV6IizZ.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-CDMYXEJY.mjs → AnnotationItems-BDFH_6F_.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-R-IJnoJr.mjs → AnnotationMenu-BHCrJoNx.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-CvRSbJoR.mjs → AnnotationState-BV0fzlj8.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-CX2kTFir.mjs → Annotations-BhA_Bbyj.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-D-vxlAH-.mjs → Annotations-DEqkGlE1.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-CRyXTdaF.mjs → Canvas2DBackend-Bq_bo1mL.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-D6Gd_EGS.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-B84VO_Mr.mjs → ChaptersMenu-DE2TFesS.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-CDG8LFjh.mjs → ChoiceMenu-BVlpPUhr.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-BE7-wcaT.mjs → Collection-DIgmeOCD.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-BgYoWJ9x.mjs → Connected-7TgFouaR.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-CDglyxHQ.mjs → Connected-D9dz_v1p.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-YlFDgYna.mjs → Contents-ROI1iuuR.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-CwOThPXI.mjs → ControlMenu-CZlN7x0D.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-QEgqI3wY.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-Bio1pBA5.mjs → CountMenu-CCEH_rEu.mjs} +1 -1
- package/dist/web-components/viewer/Cue-CLbO9g2X.mjs +1 -0
- package/dist/web-components/viewer/{Document-D3QFxaMG.mjs → Document-8ADB98RM.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-DqluSP_z.mjs → DomLayers-BXPbPq1a.mjs} +1 -1
- package/dist/web-components/viewer/{Download-COC-nK6_.mjs → Download-YfjzAcAF.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-UbloKBFE.mjs → EntryBodies-B2DBmUYl.mjs} +1 -1
- package/dist/web-components/viewer/EntryThumbnail-B2cRaP5D.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-D9c-u2aG.mjs → FieldPill-C7o8586T.mjs} +1 -1
- package/dist/web-components/viewer/FrameAnimation-CytZC2Lx.mjs +1 -0
- package/dist/web-components/viewer/{Gallery-ByCLq8nD.mjs → Gallery-CQma5dBZ.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-KKxBlsfc.mjs → GlobeGlyph-UxhwZJy1.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-BNnJlKG3.mjs → HideToggle-DZMCACLG.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-BCz88aeX.mjs → ImageControls-fzFWqFVh.mjs} +1 -1
- package/dist/web-components/viewer/ItemsVertical-BftsRVJP.mjs +1 -0
- package/dist/web-components/viewer/{LanguageChoice-DSERkWEF.mjs → LanguageChoice-B8F2WhUM.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-Cv7bWG0F.mjs → LanguageMenu-BIpATvd4.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-ClQSmYRQ.mjs → LightboxView-D-6yYXCc.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-B6VtWReK.mjs → ListEnd-DhrDIRKM.mjs} +1 -1
- package/dist/web-components/viewer/MapView-XFUp4DVX.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-Cshfh_3F.mjs → MediaBody-C3fVbzuD.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CvXptO7l.mjs → MediaBody-D-1SNnW2.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-l4WnJ7Ph.mjs → NavDate-B47wyKdc.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-DilJ4hOg.mjs → Navigator-BqNBxE5l.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-ZMGl6Hso.mjs → PagerLayout-DKdFxLZ1.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-CuddftmQ.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-Ci8XArjU.mjs → PartOfManifest-DF40jLNB.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-DIKp5Qgf.mjs → PlaceBox-Bi1inmQv.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-BFtTc4a5.mjs → Placeholder-BhAzmG0d.mjs} +1 -1
- package/dist/web-components/viewer/{Search-CffzBngs.mjs → Search-CTkCx-SZ.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-BEujwiot.mjs → SeekMarks-8NvVfr4F.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-P1ygiZtX.mjs +1 -0
- package/dist/web-components/viewer/{Steps-MQSxvD8B.mjs → Steps-DwqiM7sH.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BdAvyfvp.mjs → TargetItems-B873PbFR.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-DR4SbDcf.mjs → Transcript-D7cFMWGk.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-e9YUnvid.mjs → Transport-DPURF464.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-CWkJ1XOL.mjs → Transport-TvkdinN-.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-BmIgw-9-.mjs → annotation-collection-BwY8uYqa.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-BcZahQW_.mjs → annotation-name-DQMCd2DB.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-BsCUZUiG.mjs → annotations-content-q11OcPdT.mjs} +1 -1
- package/dist/web-components/{cloverEngine-qypryrZ2.mjs → viewer/cloverEngine-K2HNl3W1.mjs} +3 -3
- package/dist/web-components/viewer/{content-state-reader-CZzZVuIS.mjs → content-state-reader-BhDMcVmC.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-DwFUE5k_.mjs → dragToClose-BFhEkxmf.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest--iK6wT8O.mjs → fetchManifest-aJRqlL7Q.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-CEoIPewi.mjs → follow-content-Cy0flRSN.mjs} +1 -1
- package/dist/web-components/viewer/{host-B9_p4Vyw.mjs → host-C4OSSUrc.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-TE9lUAo8.mjs → image-layers-BmOyugIr.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-BghMNjSP.mjs → image-service-content-BuqFuXBZ.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BDYoIIG6.mjs → link-BtdcvLLg.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-BOilakHT.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-BD5RPgtX.mjs → range-regions-S1HcVfpb.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-BGTNG2ao.mjs → renderers-CetbXlHH.mjs} +1 -1
- package/dist/web-components/viewer/save-file-BohgaD35.mjs +1 -0
- package/dist/web-components/viewer/{search-BFTaFcIE.mjs → search-C0ZHXQW-.mjs} +1 -1
- package/dist/web-components/viewer/styles-XRfyRUPf.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CdHbUJ_5.mjs → useControlsVisibility-CmA6PMfv.mjs} +1 -1
- package/dist/web-components/viewer/viewer-BXbkj7DJ.mjs +29 -0
- package/dist/web-components/viewer/vtt-BIJk7HEl.mjs +5 -0
- package/dist/web-components/{viewer-PeMy2VzH.mjs → viewer-f_6tefcG.mjs} +1 -1
- package/dist/web-components/vtt-BRwnCWbJ.mjs +5 -0
- package/dist/web-components/{zh-Hans-Bfn3LUnq.mjs → zh-Hans-BhTHTZXT.mjs} +1 -1
- package/dist/web-components/{zh-Hant-DzmK541A.mjs → zh-Hant-_CJAOTzC.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/About-CGMm1-_m.mjs +0 -1
- package/dist/web-components/AnnotationItems-D5YRBYo7.mjs +0 -1
- package/dist/web-components/CanvasView-BCyHQxwA.mjs +0 -2
- package/dist/web-components/ChaptersMenu-BlH2m--N.mjs +0 -1
- package/dist/web-components/CollectionSelect-CI-gJrdr.mjs +0 -1
- package/dist/web-components/Connected-Dz38Bzpd.mjs +0 -1
- package/dist/web-components/ControlsFade-BPl7QLD-.mjs +0 -1
- package/dist/web-components/Cue-BtLDY60I.mjs +0 -1
- package/dist/web-components/EntryThumbnail-BsvULLOE.mjs +0 -1
- package/dist/web-components/FrameAnimation-HthNp8Wy.mjs +0 -1
- package/dist/web-components/Items-Ch80infd.mjs +0 -1
- package/dist/web-components/Label-Bo3CK-L6.mjs +0 -1
- package/dist/web-components/Loaded-1HMGKert.mjs +0 -1
- package/dist/web-components/LoadedCanvas-CDXDAq7C.mjs +0 -1
- package/dist/web-components/LoadedMap-CKE1VBTk.mjs +0 -1
- package/dist/web-components/Loading-DJ1DTuTP.mjs +0 -1
- package/dist/web-components/MapView-Bh4hjBql.mjs +0 -3
- package/dist/web-components/PagerLayout-DwHzuFi9.mjs +0 -1
- package/dist/web-components/PanelPart-BZDTLVZL.mjs +0 -1
- package/dist/web-components/PartOfManifest-VSzd2d_m.mjs +0 -1
- package/dist/web-components/Placeholder-BLHxv7em.mjs +0 -1
- package/dist/web-components/Position-SN6EMJW-.mjs +0 -1
- package/dist/web-components/Root-ijCOCdMK.mjs +0 -1
- package/dist/web-components/Scene-BnuKH1Ht.mjs +0 -1
- package/dist/web-components/StandaloneItems-DSTZPmPt.mjs +0 -1
- package/dist/web-components/Timeline-DtE58r-z.mjs +0 -1
- package/dist/web-components/canvas-Cni09Q09.mjs +0 -1
- package/dist/web-components/image-layers-DPZluciF.mjs +0 -1
- package/dist/web-components/imageService-DygjhKL0.mjs +0 -1
- package/dist/web-components/items-BSsoG42S.mjs +0 -1
- package/dist/web-components/label-WSQUfpL6.mjs +0 -1
- package/dist/web-components/logo-QdGDNl77.mjs +0 -1
- package/dist/web-components/part-CLteOpEJ.mjs +0 -1
- package/dist/web-components/rendererSurface-DKU6SaHP.mjs +0 -22
- package/dist/web-components/save-file-BF9IHyiG.mjs +0 -1
- package/dist/web-components/shared-BzLnvFn3.mjs +0 -1
- package/dist/web-components/styles-DbqlZvMR.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-CpfNg-6d.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-JiHTC1PR.mjs +0 -1
- package/dist/web-components/viewer/Cue-Dtgk1XOR.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-DftAANer.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-DljklLUX.mjs +0 -1
- package/dist/web-components/viewer/MapView-4SX7XTs-.mjs +0 -3
- package/dist/web-components/viewer/PanelPart-BiYn_NxJ.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-t0PWVVTU.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-B43PyGj2.mjs +0 -1
- package/dist/web-components/viewer/save-file-B9oonwkE.mjs +0 -1
- package/dist/web-components/viewer/styles-nU97HodU.mjs +0 -1
- package/dist/web-components/viewer/viewer-xpsvi-tg.mjs +0 -29
- package/dist/web-components/viewer/vtt-CDmiwLtu.mjs +0 -5
- package/dist/web-components/vtt-DRrShcvI.mjs +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as s,
|
|
1
|
+
import{u as s,U as k,t as y,a1 as x,d as A,y as T,l as R,V as j,a2 as C}from"./shared-ByrLMUQa.mjs";import{thumbnailSource as V,resolveThumbnail as _}from"./thumbnail-Np4ftjUo.mjs";import{t as S}from"./text-BTAkxEfQ.mjs";import{j as c}from"./classnames-DukgfdpI.mjs";import{M as O,a as q}from"./Markup-DzUsOaNC.mjs";import{R as w}from"./ReadMore-f34RbHMm.mjs";import{u as H,r as L}from"./resource-C5cMic8z.mjs";function u(t,a,r){const l=H(),n=x(i=>{var o;return(o=L(i,t))==null?void 0:o[a]},void 0);return r!==void 0?r:l?l[a]:n}const f=()=>{var t;return(t=k())==null?void 0:t.language};function G({of:t="manifest",as:a="p",value:r,className:l,...n}){const i=u(t,"summary",r),o=f();return y(i,o).text?s(w,{children:s(O,{as:a,markup:i,language:o,className:c("clover-summary",l),...n})}):null}function J({value:t,format:a,headingLevel:r,as:l="span",className:n,...i}){const o=f();return s(O,{as:l,markup:t,format:a,headingLevel:r,language:o,className:c("clover-value",n),...i})}function K({of:t="manifest",value:a,className:r,renderValue:l,...n}){const i=u(t,"metadata",a),o=f();return s(q,{metadata:i,language:o,renderValue:l,className:c("clover-metadata",r),...n})}function Q({of:t="manifest",value:a,className:r,...l}){const n=u(t,"requiredStatement",a),i=f();return s(q,{metadata:n?[n]:null,language:i,className:c("clover-required-statement",r),...l})}function W({of:t="manifest",value:a,className:r,...l}){const n=u(t,"rights",a);return n?s("a",{href:n,className:c("clover-rights",r),...l,children:n}):null}function X({of:t="manifest",value:a,className:r,...l}){const n=u(t,"id",a);return n?s("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:c("clover-id",r),...l,children:n}):null}function p({property:t,className:a,of:r="manifest",value:l,...n}){const i=j(u(r,t,l)),o=f(),d=i.filter(e=>e==null?void 0:e.id);return d.length?s("ul",{className:a,...n,children:d.map(e=>{const m=y(e.label,o);return s("li",{children:[s("a",{href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:C(e),...R(m.text?m.lang:void 0),children:m.text?S(m.text):e.id}),e.format&&s("span",{className:"clover-link-format",children:[" (",e.format,")"]})]},e.id)})}):null}const Y=({className:t,...a})=>s(p,{property:"homepage",className:c("clover-homepage",t),...a}),Z=({className:t,...a})=>s(p,{property:"rendering",className:c("clover-rendering",t),...a}),$=({className:t,...a})=>s(p,{property:"seeAlso",className:c("clover-see-also",t),...a}),tt=({className:t,...a})=>s(p,{property:"partOf",className:c("clover-part-of",t),...a});function et({of:t="manifest",value:a,size:r=400,className:l,...n}){var b;const i=x(g=>L(g,t),null),o=a??i,d=f(),e=o?V(o):null,m=(e==null?void 0:e.src)??(e==null?void 0:e.service)??(e==null?void 0:e.fallback),[N,v]=A(e==null?void 0:e.src),M=(b=k())==null?void 0:b.clover.request;if(T(()=>{if(!e)return v(void 0);if(e.src)return v(e.src);let g=true;return _(e,r,M).then(P=>g&&v(P)),()=>{g=false}},[m,r]),!N)return null;const h=y(o==null?void 0:o.label,d);return s("img",{src:N,alt:S(h.text),...R(n.alt===void 0&&h.text?h.lang:void 0),width:r,loading:"lazy",decoding:"async",className:c("clover-thumbnail",l),...n})}export{Y as Homepage,X as Id,K as Metadata,tt as PartOf,Z as Rendering,Q as RequiredStatement,W as Rights,$ as SeeAlso,G as Summary,et as Thumbnail,J as Value};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,
|
|
1
|
+
import{a as k,a1 as x,U as P,V as v,u as l,l as B,k as w,t as O,x as I,Q as q,d as N,q as y,y as z,_ as R,a2 as S,A as T}from"./shared-ByrLMUQa.mjs";import{t as _}from"./text-BTAkxEfQ.mjs";import{j}from"./classnames-DukgfdpI.mjs";import{L as $}from"./Label-DElSTYS5.mjs";import{u as F,r as A,P as M}from"./resource-C5cMic8z.mjs";import"./styles-BOXm_R8o.mjs";const Q=typeof window>"u"?z:R,C=q(null),U=o=>{var e;return!!((e=o.textContent)!=null&&e.trim())||o.querySelector("img, svg, picture, video, canvas, object")!==null},V=o=>!!o&&typeof o=="object"&&["label","logo","homepage"].some(e=>v(o[e]).length>0),L=o=>!!o&&typeof o.id=="string",W=o=>{const e=v(o.homepage).find(L);return e?{id:e.id,hrefLang:S(e)}:void 0},D=(o,e)=>{var s;if(!o)return null;for(const n of[o.label,(s=v(o.homepage).find(t=>t==null?void 0:t.label))==null?void 0:s.label]){const t=O(n,e);if(t.text)return{text:_(t.text),lang:t.lang}}return null};function eo({of:o="manifest",value:e,link:s=true,children:n,className:t,...d}){var f;const c=x(u=>{var p;return(p=A(u,o))==null?void 0:p.provider},void 0),g=(f=P())==null?void 0:f.language,r=v(e!==void 0?e:c).filter(V);return r.length?l("ul",{className:j("clover-provider",t),...d,children:r.map((u,p)=>{const m=s?W(u):void 0,i=!!O(u.label,g).text;return l(G,{agent:u,homepage:m,children:n??l(w,{children:[l(H,{alt:i?"":void 0}),l($,{className:"clover-provider-label"})]})},u.id??p)})}):null}function G({agent:o,homepage:e,children:s}){const n=T(null),[t,d]=N(null),c=y(()=>{n.current&&!U(n.current)&&d(o)},[o]);return t===o?null:l("li",{className:"clover-provider-agent",children:l(M.Provider,{value:o,children:l(C.Provider,{value:c,children:e?l("a",{ref:n,href:e.id,target:"_blank",rel:"noopener noreferrer",hrefLang:e.hrefLang,className:"clover-provider-link",children:s}):l("span",{ref:n,className:"clover-provider-content",children:s})})})})}function H({of:o="manifest",value:e,alt:s,className:n,...t}){var m;const{t:d,langOf:c}=k(),g=F(),r=x(i=>{var a;return(a=A(i,o))==null?void 0:a.provider},void 0),f=(m=P())==null?void 0:m.language,p=(e!==void 0?v(e):g?[g]:v(r)).flatMap(i=>{if(!i||typeof i!="object")return[];const a=i;if(a.type!=="Agent"&&L(a)&&!a.logo)return[{image:a,agent:null}];const b=v(a.logo).find(L);return b?[{image:b,agent:a}]:[]});return p.length?l(w,{children:p.map(({image:i,agent:a},b)=>{const h=D(a,f);return l(J,{src:i.id,alt:s??(h==null?void 0:h.text)??d("logo"),...B(s!==void 0?void 0:h?h.lang:c("logo")),width:i.width,height:i.height,loading:"lazy",decoding:"async",className:j("clover-logo",n),...t},`${i.id}-${b}`)})}):null}function J({alt:o,onError:e,...s}){const n=I(C),[t,d]=N(false),c=y(()=>d(true),[]);Q(()=>{t&&(n==null||n())},[t,n]);const g=y(r=>{var f;r!=null&&r.complete&&!r.naturalWidth&&((f=r.decode)==null||f.call(r).catch(c))},[c]);return t?null:l("img",{ref:g,alt:o,onError:r=>{e==null||e(r),c()},...s})}export{H as L,eo as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p,y as h,_ as R,a as L,
|
|
1
|
+
import{d as p,y as h,_ as R,a as L,a7 as M,A as O,b as w,R as v,u as g,l as E}from"./shared-ByrLMUQa.mjs";const F=typeof window>"u"?h:R;function I({children:s}){const{t:r}=L(),u=M(),i=O(null),m=w(),c=v.Children.only(s),e=c.props.id??m,{open:t,cut:a,toggle:o}=A(i);return g("div",{className:"clover-read-more",children:[v.cloneElement(c,{ref:i,id:e,"data-read-more":t?"open":""}),(a||t)&&g("button",{type:"button",className:"clover-read-more-button","aria-expanded":t,"aria-controls":e,onClick:o,ref:u.ref,...E(u.langOf(t?"readLess":"readMore")),children:r(t?"readLess":"readMore")})]})}function A(s){const[r,u]=p(false),[i,m]=p(false),c=()=>{const e=s.current;e&&!r&&m(e.scrollHeight>e.clientHeight+1)};return F(c),h(()=>{var l,f;const e=s.current;if(!e)return;let t=0;const a=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(c)},o=typeof ResizeObserver>"u"?null:new ResizeObserver(a);o==null||o.observe(e);const n=typeof MutationObserver>"u"?null:new MutationObserver(a);return n==null||n.observe(document.head,{childList:true,subtree:true,characterData:true}),n==null||n.observe(document.documentElement,{attributes:true,attributeFilter:["style","class"]}),n==null||n.observe(e,{attributes:true,attributeFilter:["style"]}),(f=(l=document.fonts)==null?void 0:l.addEventListener)==null||f.call(l,"loadingdone",a),()=>{var d,b;cancelAnimationFrame(t),o==null||o.disconnect(),n==null||n.disconnect(),(b=(d=document.fonts)==null?void 0:d.removeEventListener)==null||b.call(d,"loadingdone",a)}},[r,s.current]),{open:r,cut:i,toggle:()=>u(e=>!e)}}export{I as R,A as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as v,ap as d,a7 as h,a8 as f,u as a,ad as m,ac as p,aq as C,ar as R}from"./shared-ByrLMUQa.mjs";import{j as x}from"./classnames-DukgfdpI.mjs";const H=v(function({as:s="div",className:r,children:n,highContrast:c,...u},g){const[o,l,t]=d(u),e=h(g,t.lang),i=f(c);return a(R.Provider,{value:o,children:a(m.Provider,{value:e.hostLanguage,children:a(s,{ref:e.ref,className:x("clover-root",r),"data-status":l,...p(i),...t,children:[n,a(C,{clover:o.clover,language:o.language})]})})})});export{H as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as r,u as e,z as o,P as t}from"./shared-ByrLMUQa.mjs";import{S as a}from"./SceneView-D635_fRV.mjs";import{C as i}from"./Pending-CDXsIk5O.mjs";const l=o(()=>import("./Connected-L47VwCva.mjs")),f=o(()=>import("./Loaded-uGqT3xyD.mjs"));function s(n){const c=r();return n.iiifContent!==void 0&&n.scene===void 0?e(t,{fallback:e(i,{}),children:e(f,{...n})}):n.scene?e(a,{...n}):c?e(t,{fallback:e(i,{}),children:e(l,{...n})}):null}export{s as Scene,s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r,A as m,y as F,R as ze,a as Ve,a8 as We,ax as Ge,d as ee,a5 as Xe,a6 as Je,b as Qe,ay as et,q as z,T as tt,t as Se,aa as rt,l as ot,v as nt,ab as at}from"./shared-BzLnvFn3.mjs";import{i as ct,T as st,r as he,E as it,e as lt,f as ut,u as dt,d as vt,h as ft,g as pt,j as ht,C as gt,B as mt,l as bt,t as wt}from"./pointer-DnJMax9Y.mjs";import{s as yt,a as xt,h as kt,t as Ot,z as Lt,b as Ct}from"./models-BbiJP5tM.mjs";import{B as Rt}from"./BodyAlert-BP4r3Cd6.mjs";import{I as It}from"./glyphs-BzZKC9_8.mjs";import{u as St}from"./useControlsVisibility-BYHbIHGH.mjs";import{u as Mt}from"./useNearViewport-BgvHaTUu.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-JqNjqiWi.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-QLLc8cpa.mjs";import{L as Kt}from"./Loading-DJ1DTuTP.mjs";import{S as A,f as Bt}from"./Tip-h4Abk6aH.mjs";import{u as Me}from"./useContainerName-DeDFbnAs.mjs";import{e as Ht}from"./engines-DGQYmjhi.mjs";import"./styles-DbqlZvMR.mjs";import{a as Ut}from"./index-GH8QRDv1.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!ct(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<st)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(it,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=Je(a),i=m(null),ae=lt(y),P=ut(y),W=dt(),G=St(y,p==null?void 0:p.hideDelay,i),U=Mt(y),T=`clover-scene-${Qe()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=yt(t),be=xt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,et(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Ke=vt(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?kt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>Ot(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const K=z(e=>Q((n,c)=>Lt(n,e,c)),[Q]),Be=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ct(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:K})},[I.state,x,K]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":K(ne);break;case"-":case"_":K(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=tt(()=>k!=null&&k.information&&ft(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?pt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),B=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[B("zoomIn","imageZoomIn",r(Tt,{}),()=>K(ne),A.zoomIn),B("zoomOut","imageZoomOut",r(Dt,{}),()=>K(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void wt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:B("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:B("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:B("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:B("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:B("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Ke),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(at.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...rt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Bt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ht,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(gt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(It,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:K,span:Be,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:nt,...ot(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(mt,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Rt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Kt,{overlay:true}),_.length>0&&r(bt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
|
|
1
|
+
import{u as r,A as m,y as F,R as ze,a as Ve,aa as We,aA as Ge,d as ee,a7 as Xe,a8 as Je,b as Qe,aB as et,q as z,T as tt,t as Se,ac as rt,l as ot,v as nt,ad as at}from"./shared-ByrLMUQa.mjs";import{i as ct,T as st,r as he,E as it,e as lt,f as ut,u as dt,d as vt,h as ft,g as pt,j as ht,C as gt,B as mt,l as bt,t as wt}from"./pointer-C22ufJ5w.mjs";import{s as yt,a as xt,h as kt,t as Ot,z as Lt,b as Ct}from"./models-BFKa5v_H.mjs";import{B as Rt}from"./BodyAlert-DF9rnG5o.mjs";import{I as It}from"./glyphs-atKuagcd.mjs";import{u as St}from"./useControlsVisibility-Dig_1-0T.mjs";import{u as Mt}from"./useNearViewport-B_kjW0WB.mjs";import{j as At}from"./classnames-DukgfdpI.mjs";import{c as Et,r as Ft}from"./contexts-ByL3eA_T.mjs";import{B as Pt}from"./Button-qhI73GCI.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-DMQCxKaT.mjs";import{L as Bt}from"./Loading-DSaV1vxb.mjs";import{S as A,f as Kt}from"./Tip-mcI7IRQh.mjs";import{u as Me}from"./useContainerName-DR_6TyDU.mjs";import{e as Ht}from"./engines-BzM_oBU_.mjs";import"./styles-BOXm_R8o.mjs";import{a as Ut}from"./index-Ciz5x8Tt.mjs";const Ae=2*Math.PI,qt=.01,Zt=t=>t.deltaMode===1?t.deltaY*16:t.deltaMode===2?t.deltaY*400:t.deltaY;function Te(t,u,d=()=>t.clientHeight){const a=new Map;let v=0,f=false,l={x:0,y:0};const p=()=>{const[o,g]=[...a.values()];return o&&g?Math.hypot(o.x-g.x,o.y-g.y):0},b=o=>{if(!(o.pointerType==="mouse"&&o.button!==0)&&!ct(o.target,t)){a.set(o.pointerId,{x:o.clientX,y:o.clientY});try{t.setPointerCapture(o.pointerId)}catch{}a.size===1&&(f=false,l={x:o.clientX,y:o.clientY}),a.size===2&&(v=p())}},L=o=>{const g=a.get(o.pointerId);if(!g)return;const y={x:o.clientX,y:o.clientY};if(a.set(o.pointerId,y),a.size===2){const s=p();v>0&&s>0&&u.zoom(s/v),v=s;return}if(!f){if(Math.hypot(y.x-l.x,y.y-l.y)<st)return;f=true}const E=d()||1;u.turn(-(y.x-g.x)/E*Ae,-(y.y-g.y)/E*Ae)},C=o=>{a.delete(o.pointerId),v=a.size===2?p():0},R=o=>{o.ctrlKey&&(o.preventDefault(),u.zoom(Math.exp(-Zt(o)*qt)))};return t.addEventListener("pointerdown",b),t.addEventListener("pointermove",L),t.addEventListener("pointerup",C),t.addEventListener("pointercancel",C),t.addEventListener("wheel",R,{passive:false}),()=>{t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",L),t.removeEventListener("pointerup",C),t.removeEventListener("pointercancel",C),t.removeEventListener("wheel",R)}}const Ee={rotateUp:{place:"up",rate:[0,Math.PI/6]},rotateLeft:{place:"left",rate:[Math.PI/2,0]},rotateRight:{place:"right",rate:[-Math.PI/2,0]},rotateDown:{place:"down",rate:[0,-Math.PI/6]}},_t=400,te=({rotate:t})=>r("path",{fill:"none",strokeWidth:"64",strokeLinecap:"round",strokeLinejoin:"round",d:"M192 96l160 160-160 160",transform:`rotate(${t} 256 256)`}),H=236,j=t=>t.toFixed(1);function re(t,u,d,a){const[v,f]=d?[`256 ${j(256-u)}`,`256 ${j(256+u)}`]:[`${j(256-t)} 256`,`${j(256+t)} 256`];return`M${v}A${j(t)} ${j(u)} 0 0 ${a} ${f}`}function De({theta:t,phi:u}){const d=Math.PI/2-u,a=Math.max(1,H*Math.abs(Math.sin(d))),v=Math.max(1,H*Math.abs(Math.sin(t))),f=d>=0,l=Math.sin(2*t)<0;return{equator:{front:re(H,a,false,f?0:1),back:re(H,a,false,f?1:0)},meridian:{front:re(v,H,true,l?1:0),back:re(v,H,true,l?0:1)},x:256-H*Math.sin(t),y:256+(f?1:-1)*a*Math.cos(t),facing:Math.cos(t)>0}}function Fe(t,u){const[d,a,v,f,l]=(t==null?void 0:t.children)??[];if(!l)return;const{equator:p,meridian:b,x:L,y:C,facing:R}=De(u);d.setAttribute("d",p.front),a.setAttribute("d",p.back),v.setAttribute("d",b.front),f.setAttribute("d",b.back),l.setAttribute("cx",L.toFixed(1)),l.setAttribute("cy",C.toFixed(1)),l.setAttribute("fill",R?"currentColor":"none"),l.setAttribute("opacity",R?"1":String(ge))}const ge=.3,jt=ze.forwardRef(function(u,d){const a=De({theta:0,phi:75*Math.PI/180});return r("g",{ref:d,fill:"none",strokeWidth:"14",strokeLinecap:"round",children:[r("path",{d:a.equator.front}),r("path",{d:a.equator.back,strokeOpacity:ge}),r("path",{d:a.meridian.front}),r("path",{d:a.meridian.back,strokeOpacity:ge}),r("circle",{cx:a.x.toFixed(1),cy:a.y.toFixed(1),r:"34",fill:"currentColor"})]})});function Yt({controls:t,controlButtons:u,turn:d,zoom:a,span:v,indicator:f,name:l}){const p=m(null),b=m(false),L=m(d);L.current=d;const C=m(a);C.current=a;const R=m(null),o=!!(t.rotateUp||t.rotateLeft||t.rotateRight||t.rotateDown);F(()=>{const s=R.current;if(s)return Te(s,{turn:(w,i)=>L.current(w,i),zoom:w=>C.current(w)},v)},[v,o]);const g=s=>{const w=p.current;w&&(window.clearTimeout(w.timer),cancelAnimationFrame(w.frame),p.current=null,w.held&&s&&(b.current=true))};F(()=>()=>g(false),[]);const y=(s,w)=>{if(s.button>0)return;g(false),b.current=false;const[i,ae]=Ee[w].rate,P={timer:0,frame:0,held:false};P.timer=window.setTimeout(()=>{P.held=true;let W=performance.now();const G=U=>{const ce=Math.min(.1,Math.max(0,U-W)/1e3);W=U,L.current(i*ce,ae*ce),P.frame=requestAnimationFrame(G)};P.frame=requestAnimationFrame(G)},_t),p.current=P},E=s=>{const w=t[s];return w?r("span",{className:"clover-scene-rotate-cell","data-place":Ee[s].place,onPointerDown:i=>y(i,s),onPointerUp:()=>g(true),onPointerLeave:()=>g(false),onPointerCancel:()=>g(false),onKeyDown:i=>{i.repeat&&i.key==="Enter"&&i.preventDefault()},onClickCapture:i=>{b.current&&i.detail>0&&(i.stopPropagation(),i.preventDefault()),b.current=false},children:he(w,u)},s):null};return r("div",{className:"clover-scene-rotate",role:"group",...l.props,"data-testid":"clover-scene-rotate",children:[l.node,o&&r("span",{ref:R,className:"clover-scene-rotate-disc","aria-hidden":"true","data-testid":"clover-scene-rotate-disc",children:r("svg",{viewBox:"0 0 512 512",width:"16",height:"16",focusable:"false",children:r(jt,{ref:f})})}),E("rotateUp"),E("rotateLeft"),E("rotateRight"),E("rotateDown"),t.reset&&r("span",{className:"clover-scene-rotate-cell","data-place":"corner",children:he(t.reset,u)})]})}Ut(16,"components/Scene/Scene",'@layer clover{.clover-scene>.clover-scene-navigation{position:absolute;right:var(--clover-canvas-controls-inset);bottom:var(--clover-canvas-controls-inset);z-index:3;display:flex;align-items:flex-end;pointer-events:none;touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;opacity:var(--clover-controls-shown);translate:0 calc((1 - var(--clover-controls-shown)) * var(--clover-controls-tuck));transition:all var(--clover-controls-timing)}.clover-scene-navigation :is(button,.clover-scene-rotate-disc){pointer-events:var(--clover-controls-events)}@media (hover: hover){.clover-scene:has(>.clover-scene-navigation :is(button,.clover-scene-rotate-disc):hover){--clover-controls-shown: 1;--clover-controls-events: auto;--clover-controls-timing: var(--clover-controls-enter)}}.clover-scene:has(>.clover-scene-navigation)>.clover-canvas-viewport:before{position:absolute;inset:auto 0 0;height:calc(3 * var(--clover-control) + 2 * var(--clover-space-s) + 2 * var(--clover-canvas-controls-inset));background:linear-gradient(to top,#00000073,#0003 45%,#0000);opacity:var(--clover-controls-shown);transition:opacity var(--clover-controls-timing);pointer-events:none;content:""}.clover-scene>.clover-scene-navigation[data-compact]{--clover-control: max(1.5rem, 24px)}.clover-scene-tools{display:flex;gap:var(--clover-space-s);margin-inline-end:calc(-1 * var(--clover-control))}.clover-scene-rotate{position:relative;display:grid;grid-template-columns:repeat(3,var(--clover-control));grid-template-rows:repeat(3,var(--clover-control));gap:var(--clover-space-s);--clover-scene-rotate-rim: calc( .756 * var(--clover-control) + .874 * var(--clover-space-s) )}.clover-scene-rotate-disc{position:absolute;top:50%;left:50%;width:calc(2 * var(--clover-scene-rotate-rim));height:calc(2 * var(--clover-scene-rotate-rim));translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:50%;--clover-scene-ball: var(--clover-color-accent, #0065c3);background-color:var(--clover-scene-ball);background-image:radial-gradient(circle at 34% 30%,#ffffff24 0,#fff0 24%),radial-gradient(circle at 34% 30%,color-mix(in srgb,var(--clover-scene-ball) 84%,#fff) 0,var(--clover-scene-ball) 48%,color-mix(in srgb,var(--clover-scene-ball) 62%,#000) 100%);box-shadow:0 .236rem .618rem #00000038;color:var(--clover-color-control-glyph, #fff);cursor:grab;isolation:isolate;transition:scale .2s ease}:where([data-high-contrast]) .clover-scene-rotate-disc{--clover-scene-ball: var(--clover-accent-fill);transition:none}:where([data-high-contrast]) .clover-scene-rotate-disc:hover{outline:var(--clover-accent-ring-hover);outline-offset:1px}:where([data-high-contrast]) .clover-scene-rotate-disc:active{outline:var(--clover-accent-ring);outline-offset:1px}.clover-scene-rotate-disc:active{cursor:grabbing}.clover-scene-rotate-disc:before{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,#fff 16%,transparent);opacity:0;transition:opacity .2s ease;content:""}.clover-scene-rotate-disc:is(:hover,:active):before,.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc:before,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc:before{opacity:1}.clover-scene-rotate-disc:is(:hover,:active),.clover-scene-rotate:has(:focus-visible) .clover-scene-rotate-disc,.clover-scene-navigation[data-turning] .clover-scene-rotate-disc{scale:1.06}@media (prefers-reduced-motion: reduce){.clover-scene-rotate-disc{transition:none}}@media (forced-colors: active){.clover-scene-rotate-disc{border:1px solid CanvasText}}.clover-scene-rotate-disc svg{width:100%;height:100%;fill:currentColor;stroke:currentColor;-webkit-mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%);mask-image:radial-gradient(circle closest-side,#000 45%,transparent 90%)}.clover-scene-rotate-cell{position:relative;z-index:1;display:flex}.clover-scene-rotate-cell[data-place=up]{grid-area:1 / 2}.clover-scene-rotate-cell[data-place=left]{grid-area:2 / 1}.clover-scene-rotate-cell[data-place=corner]{grid-area:3 / 3}.clover-scene-rotate-cell[data-place=right]{grid-area:2 / 3}.clover-scene-rotate-cell[data-place=down]{grid-area:3 / 2}.clover-scene .clover-scene-navigation .clover-scene-rotate-cell:not([data-place=corner]) button.clover-canvas-button svg{scale:none;rotate:none}.clover-scene>.clover-scene-error{position:absolute;inset:auto var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);z-index:2;background-color:var(--clover-color-secondary, #fff);border-radius:var(--clover-radius, 3px)}}');const Pe={zoom:true,fullPage:true,rotation:true,reset:true,information:true},Y=Math.PI/4,oe=Math.PI/12,Vt=Y/2,ne=1.5,Wt=["ArrowLeft ArrowRight ArrowUp ArrowDown",A.rotateRight.keys,A.rotateLeft.keys,A.zoomIn.keys,A.zoomOut.keys,A.reset.keys].join(" ");function pr(t){return t.scene?r(it,{children:r(Gt,{...t,scene:t.scene})}):null}function Gt({scene:t,label:u,language:d,highContrast:a,className:v,controls:f=true,controlButtons:l,options:p,manifestId:b,engine:L="clover",onContentStateChange:C,children:R}){const{t:o}=Ve(),g=We(()=>b==="loading"?null:Ge({manifestId:b,canvasId:t.id,type:"Scene"}),C);F(()=>g(),[t.id,b,g]);const[y,E]=ee(null),s=Xe(E),w=Je(a),i=m(null),ae=lt(y),P=ut(y),W=dt(),G=St(y,p==null?void 0:p.hideDelay,i),U=Mt(y),T=`clover-scene-${Qe()}`,k=f===false?null:f===true?Pe:{...Pe,...f},me=yt(t),be=xt(t),we=p==null?void 0:p.request,ye=JSON.stringify([t.id,me,et(we),L]),xe=b==="loading",[I,D]=ee({state:"waiting"}),N=m(null),se=m(null),M=m(null),h=m(null),$=m(0),[Ne,$e]=ee(0),X=m({hiddenSince:null,release:()=>{}}),J=m(false),ie=m(null),le=m(null),Be=vt(y),q=z(()=>{$.current||!N.current||($.current=requestAnimationFrame(()=>{var e;$.current=0,h.current&&((e=N.current)==null||e.draw(h.current),Fe(le.current,h.current))}))},[]),Z=z(()=>{const e=i.current,n=e&&e.clientHeight?e.clientWidth/e.clientHeight:1;return se.current?kt(se.current,n):null},[]),Q=z(e=>{!h.current||!M.current||(h.current=e(h.current,M.current),q())},[q]),ue=m(0),x=z((e,n)=>{Q(O=>Ot(O,e,n));const c=ie.current;c&&(c.setAttribute("data-turning",""),window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>c.removeAttribute("data-turning"),400))},[Q]);F(()=>()=>window.clearTimeout(ue.current),[]);const B=z(e=>Q((n,c)=>Lt(n,e,c)),[Q]),Ke=z(()=>{var e;return((e=i.current)==null?void 0:e.clientHeight)??0},[]),ke=z(()=>{M.current=Z(),h.current=M.current,q()},[Z,q]);F(()=>{const e=i.current;if(!e||!U)return;if(xe){D({state:"loading"});return}let n=true,c=null;const O=()=>{cancelAnimationFrame($.current),$.current=0,c==null||c.dispose(),c=null,N.current=null,Ft(X.current)};return X.current.release=()=>{O(),J.current=true,n&&D({state:"waiting"})},J.current=false,Et(X.current)?(D({state:"loading"}),Ht(L)().then(({createEngine:S})=>{if(n)return c=S(e,{onLost:()=>{O(),n&&D({state:"error",error:new Error("The browser took back the 3D view's graphics.")})}}),N.current=c,c.load(me,we).then(Ye=>{n&&(se.current=Ye,M.current=Z(),h.current??(h.current=M.current),D({state:"ready"}),q())})}).catch(S=>{n&&(O(),D({state:"error",error:S instanceof Error?S:new Error(String(S)),load:true}))}),()=>{n=false,O()}):(J.current=true,D({state:"waiting"}),()=>{n=false})},[ye,xe,U,Ne,Z,q]),F(()=>{h.current=null},[ye]),F(()=>{const e=i.current;if(!e||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{X.current.hiddenSince=c!=null&&c.isIntersecting?null:performance.now(),c!=null&&c.isIntersecting&&J.current&&$e(O=>O+1)});return n.observe(e),()=>n.disconnect()},[]),F(()=>{const e=i.current;if(!e||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>{var S;const c=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;if((S=ie.current)==null||S.toggleAttribute("data-compact",e.clientWidth<32*c||e.clientHeight<24*c),!N.current)return;N.current.resize();const O=h.current&&M.current&&Ct(h.current,M.current);M.current=Z(),O&&(h.current=M.current),cancelAnimationFrame($.current),$.current=0,h.current&&(N.current.draw(h.current),Fe(le.current,h.current))});return n.observe(e),()=>n.disconnect()},[Z]),F(()=>{const e=i.current;if(!(!e||I.state!=="ready"))return Te(e,{turn:x,zoom:B})},[I.state,x,B]);const He=e=>{if(e.target!==e.currentTarget||e.altKey||e.metaKey||e.ctrlKey)return;const n=e.shiftKey?Y:Vt,c=e.shiftKey?2*oe:oe;switch(e.key){case"ArrowLeft":x(n,0);break;case"ArrowRight":x(-n,0);break;case"ArrowUp":x(0,c);break;case"ArrowDown":x(0,-c);break;case"r":x(-Y,0);break;case"R":x(Y,0);break;case"+":case"=":B(ne);break;case"-":case"_":B(1/ne);break;case"0":ke();break;default:return}e.preventDefault()},de=`caption-${T}`,_=tt(()=>k!=null&&k.information&&ft(t)?[t]:[],[k==null?void 0:k.information,t]),[Ue,Oe]=ee(false),ve=Ue&&_.length>0,Le=z(e=>{var n;Oe(false),e&&((n=document.getElementById(`information-${T}`))==null||n.focus())},[T]),qe=_.length&&Se(t.label,d).text?pt(de,0):void 0,V=[u,t.label].map(e=>Se(e,d)).find(e=>e.text),Ce=Me((V==null?void 0:V.text)||o("sceneModel"),V?V.lang:s.langOf("sceneModel"),false,s.hostLanguage),Re=`keys-${T}`,Ze=s.langOf("sceneRoleDescription")?void 0:o("sceneRoleDescription"),K=(e,n,c,O,S)=>({key:e,id:`${e}-${T}`,label:o(n),lang:s.langOf(n),glyph:c,onClick:O,...S?{shortcut:S}:{}}),_e=e=>k?[...k.zoom?[K("zoomIn","imageZoomIn",r(Tt,{}),()=>B(ne),A.zoomIn),K("zoomOut","imageZoomOut",r(Dt,{}),()=>B(1/ne),A.zoomOut)]:[],...k.fullPage&&W?[{key:"fullPage",id:`fullPage-${T}`,label:o(e?"imageExitFullScreen":"imageFullScreen"),lang:s.langOf(e?"imageExitFullScreen":"imageFullScreen"),glyph:e?r(Nt,{}):r($t,{}),onClick:n=>void wt(n.currentTarget)}]:[]]:[],je=Me(o("sceneRotate"),s.langOf("sceneRotate"),false,s.hostLanguage),fe=k?{...k.rotation&&{rotateUp:K("rotateUp","sceneRotateUp",r(te,{rotate:-90}),()=>x(0,oe)),rotateLeft:K("rotateLeft","imageRotateLeft",r(te,{rotate:180}),()=>x(Y,0),A.rotateLeft),rotateRight:K("rotateRight","imageRotateRight",r(te,{rotate:0}),()=>x(-Y,0),A.rotateRight),rotateDown:K("rotateDown","sceneRotateDown",r(te,{rotate:90}),()=>x(0,-oe))},...k.reset&&{reset:K("reset","sceneResetView",r(zt,{}),ke,A.reset)}}:{},pe=_e(Be),Ie=I.state==="loading"||I.state==="waiting"&&U;return r(at.Provider,{value:s.hostLanguage,children:r("figure",{"aria-labelledby":qe,className:At("clover-canvas","clover-scene",v),"data-testid":"clover-scene",...rt(w),"data-status":I.state==="ready"?"ready":I.state==="error"?"error":"loading","data-fullscreen":ae,"data-exit":P||void 0,"data-controls":G?"visible":"hidden","data-navigable":"true",ref:s.ref,onKeyDown:e=>{if(e.key==="Escape"&&ve&&!e.defaultPrevented){e.preventDefault(),Le(false);return}Kt(e,i.current)},style:{position:"relative",width:"100%",height:"100%",margin:0,overflow:"hidden",isolation:"isolate"},children:[r(ht,{hidden:!P}),(_.length>0||ze.Children.count(R)>0)&&r(gt,{children:[_.length>0&&r(Pt,{id:`information-${T}`,label:o("informationPanelTabsAbout"),lang:s.langOf("informationPanelTabsAbout"),onClick:()=>Oe(e=>!e),expanded:ve,controls:de,children:r(It,{})}),R]}),(pe.length>0||Object.keys(fe).length>0)&&r("div",{ref:ie,className:"clover-scene-navigation",children:[pe.length>0&&r("div",{className:"clover-scene-tools",children:pe.map(e=>he(e,l))}),Object.keys(fe).length>0&&r(Yt,{controls:fe,controlButtons:l,turn:x,zoom:B,span:Ke,indicator:le,name:je})]}),r("div",{ref:i,className:"clover-canvas-viewport",style:{position:"absolute",inset:0,overflow:"hidden",zIndex:-1,...be?{backgroundColor:be}:{}},"data-testid":"clover-scene-viewport",role:"img","aria-roledescription":Ze,...Ce.props,"aria-describedby":Re,"aria-keyshortcuts":Wt,"aria-busy":Ie,tabIndex:0,onKeyDown:He}),Ce.node,r("span",{id:Re,style:nt,...ot(s.langOf("sceneKeys")),children:o("sceneKeys")}),r(mt,{kind:"model",shown:I.state==="error"&&!!I.load}),I.state==="error"&&!I.load&&r(Rt,{error:I.error,className:"clover-scene-error"}),Ie&&r(Bt,{overlay:true}),_.length>0&&r(bt,{id:de,canvases:_,open:ve,onClose:Le,language:d})]})})}export{pr as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as se,a as ne,e as re,c as v,
|
|
1
|
+
import{D as se,a as ne,e as re,c as v,O as ce,F as oe,C as ae,b as ie,d as j,y as h,A as d,u as a,l as D,t as le}from"./shared-ByrLMUQa.mjs";import{j as ue}from"./classnames-DukgfdpI.mjs";import{b as he,s as de}from"./bringIntoView-CQH5ZgMM.mjs";import{a as fe}from"./heading-Cjt0f-Eu.mjs";import{u as ve}from"./Sections-C3fPhGNx.mjs";import{F as ge}from"./FieldPill-Dx--yBoK.mjs";import"./styles-BOXm_R8o.mjs";const C=40,Ne=se(function({headingLevel:K=3,sticky:y=false,size:L="large",as:T="div",className:U,...k},B){const{t:V,langOf:G}=ne(),{clover:r,language:J}=re("Search"),b=v(e=>{var s;return((s=ce(e.manifest))==null?void 0:s.id)??null}),t=v(e=>e.search),Q=v(e=>oe(e.manifest).canvases),i=v(e=>e.annotationId),$=v(e=>e.canvasId),W=ae(r.highlight.subscribe,r.highlight.get,r.highlight.get),I=ie(),[P,S]=j(t.query);h(()=>S(t.query),[t.query]);const l=d(null),g=ve(),R=d(0),q=d(false),w=d(null);h(()=>{if(t.status!=="ready"||!t.set||w.current===t.set||(w.current=t.set,t.hits.some(c=>i&&c.entryIds.includes(i))))return;const n=t.hits.find(c=>c.canvasId===$)??t.hits[0];n&&r.selectAnnotation(n.entryIds[0])},[r,t.status,t.set,t.hits,i,$]),h(()=>{var c;const e=(c=l.current)==null?void 0:c.closest(".clover-content-search-field"),s=e==null?void 0:e.parentElement;if(!y||!e||!s||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>s.style.setProperty("--clover-content-search-field",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),s.style.removeProperty("--clover-content-search-field")}},[y,b]),h(()=>{var s,n;if(!q.current)return;q.current=false;const e=(n=(s=l.current)==null?void 0:s.closest(".clover-content-search"))==null?void 0:n.querySelector('.clover-content-search-hit[aria-current="true"]');e&&he(e,"nearest")},[i]);const[z,X]=j({set:null,count:C}),A=z.set===t.set?z.count:C,x=()=>X({set:t.set,count:A+C}),E=d(null),F=i?t.hits.findIndex(e=>e.entryIds.includes(i)):-1,N=typeof IntersectionObserver<"u",u=N?Math.min(t.hits.length,Math.max(A,F+1)):t.hits.length,M=d(x);if(M.current=x,h(()=>{const e=E.current;if(!e||!N||u>=t.hits.length)return;const s=new IntersectionObserver(n=>{n.some(c=>c.isIntersecting)&&M.current()},{root:de(e),rootMargin:"0px 0px 400px 0px"});return s.observe(e),()=>s.disconnect()},[N,u,t.hits.length]),h(()=>{!g||g===R.current||!l.current||(R.current=g,l.current.focus())},[g,b]),!b)return null;const H={position:F,total:t.hits.length,step:e=>{const s=t.hits[H.position+e];s&&(q.current=true,r.selectAnnotation(s.entryIds[0]))}},m=[];t.hits.slice(0,u).forEach((e,s)=>{const n=m[m.length-1];(n==null?void 0:n.canvasId)===e.canvasId?n.hits.push({hit:e,index:s}):m.push({canvasId:e.canvasId,hits:[{hit:e,index:s}]})});const Y=fe(K),f=t.hits.length,p=t.status==="loading"?"contentSearchLoading":t.status==="error"?"contentSearchError":t.status==="ready"?f===0?"contentSearchResultsNone":f===1?"contentSearchResult":"contentSearchResults":null,Z=p?V(p,{count:f}):"",_=t.status==="ready"?H:null,ee=a("p",{className:"clover-content-search-status",role:"status","data-status":t.status,...D(p?G(p):void 0),children:Z});return a(T,{ref:B,className:ue("clover-content-search",U),"data-status":t.status,"data-sticky":y||void 0,...k,children:[a("div",{className:"clover-content-search-field",children:a(ge,{ref:l,id:`${I}-query`,value:P,onChange:e=>{S(e),!e&&t.query&&r.search("")},onSubmit:()=>void r.search(P),onClear:()=>{var e;S(""),t.query&&r.search(""),(e=l.current)==null||e.focus()},results:_,size:L,classes:{form:"clover-content-search-form",query:"clover-content-search-query",clear:"clover-content-search-clear",submit:"clover-content-search-submit"}})}),ee,m.map(({canvasId:e,hits:s},n)=>{const c=Q.find(o=>o.id===e),O=le(c==null?void 0:c.label,J);return a("section",{className:"clover-content-search-group","aria-labelledby":`${I}-${n}`,children:[a(Y,{id:`${I}-${n}`,className:"clover-content-search-canvas",...D(O.text?O.lang:void 0),children:O.text||e}),a("ol",{className:"clover-content-search-hits",children:s.map(({hit:o,index:te})=>a("li",{children:a("button",{type:"button",className:"clover-content-search-hit","aria-current":i&&o.entryIds.includes(i)?"true":void 0,"data-highlighted":o.entryIds.includes(W??""),onClick:()=>r.selectAnnotation(o.entryIds[0]),onPointerEnter:()=>r.highlight.emit(o.entryIds[0]),onPointerLeave:()=>r.highlight.emit(null),onFocus:()=>{r.highlight.emit(o.entryIds[0]),u<f&&te>=u-5&&x()},onBlur:()=>r.highlight.emit(null),children:[o.before,a("mark",{children:o.match}),o.after]})},o.id))})]},`${e}-${n}`)}),u<f&&a("div",{ref:E,className:"clover-content-search-more","aria-hidden":"true"})]})});export{Ne as Search};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as ue,A as B,a as de,d as Z,y as R,_ as fe,u,Q as V,l as pe,k as ve,x as ee}from"./shared-
|
|
1
|
+
import{b as ue,A as B,a as de,d as Z,y as R,_ as fe,u,Q as V,l as pe,k as ve,x as ee}from"./shared-ByrLMUQa.mjs";import{a as he}from"./heading-Cjt0f-Eu.mjs";import{T as ge}from"./Tip-mcI7IRQh.mjs";import{u as me}from"./useContainerName-DR_6TyDU.mjs";import{u as be}from"./useScrollTrack-6BV6IizZ.mjs";import{C as ye}from"./Chevron-CT1ntI6B.mjs";import"./styles-BOXm_R8o.mjs";const te=typeof window>"u"?R:fe,ne=V(null);function $e(){return ee(ne)}const oe=V(0);function Ie(){return ee(oe)}function Re({items:o,layout:s="tabs",value:A,onValueChange:E,label:S,labelLang:T,headingLevel:h=3}){var X,_;const g=ue(),k=me(S??"",T,S===void 0),f=B([]),c=s==="tabs",{t:F,langOf:re}=de(),m=be({dragFree:true,itemCount:o.length}),p=o.some(e=>e.value===A)?A:((X=o[0])==null?void 0:X.value)??null,j=B(new Set);p&&j.current.add(p);const D=B(null),[K,se]=Z({value:null,count:0});R(()=>{var i;if(c||!p||D.current!==p)return;D.current=null;const e=o.findIndex(d=>d.value===p),n=document.getElementById(`${g}-panel-${e}`),t=(i=f.current[e])==null?void 0:i.parentElement;if(!n||!t)return;const r=t.getBoundingClientRect().bottom-n.getBoundingClientRect().top;if(r<=0)return;const l=H(n);l&&(l.scrollTop-=r)},[p,c,o,g]);const ce=e=>{var N,$,y,I;const n=o.findIndex(O=>O.value===p),t=document.getElementById(`${g}-panel-${n}`),r=e.target;if(!t||r===t||!t.contains(r)||!xe(r))return;const l=($=(N=f.current[n])==null?void 0:N.parentElement)==null?void 0:$.getBoundingClientRect(),i=n+1<o.length?(I=(y=f.current[n+1])==null?void 0:y.parentElement)==null?void 0:I.getBoundingClientRect():void 0;if(!l)return;const d=r.getBoundingClientRect(),b=d.top<l.bottom?Math.floor(d.top-l.bottom):i&&d.bottom>i.top?Math.ceil(Math.min(d.bottom-i.top,d.top-l.bottom)):0,v=b?H(t):null;v&&(v.scrollTop+=b)},P=B(null),L=o.map(e=>e.value).join(`
|
|
2
2
|
`),W=B(false);W.current=!!((_=P.current)!=null&&_.contains(P.current.ownerDocument.activeElement)),R(()=>{var l;const e=P.current;if(!e||!W.current)return;const{activeElement:n,body:t}=e.ownerDocument;if(n&&n!==t)return;const r=o.findIndex(i=>i.value===p);(l=f.current[r])==null||l.focus()},[L]),te(()=>{const e=P.current;if(c||!e||typeof ResizeObserver>"u")return;const n=[...e.querySelectorAll(":scope > .clover-sections-item")],t=n.map(a=>a.firstElementChild),r=t[0],l=t[t.length-1],i=new Map,d=a=>(a&&i.get(a))??0,b=document.scrollingElement;let v=null,N=0;const $=()=>{const a=t.reduce((z,M)=>z+d(M),0);let C=0;n.forEach((z,M)=>{z.style.setProperty("--clover-sections-before",`${C}px`),C+=d(t[M]),z.style.setProperty("--clover-sections-after",`${a-C}px`)}),e.style.setProperty("--clover-sections-total",`${a}px`);const w=r&&getComputedStyle(r);(w==null?void 0:w.position)==="sticky"&&l&&(N=parseFloat(w.top)+parseFloat(getComputedStyle(l).bottom)||0);const x=getComputedStyle(e),ie=parseFloat(x.lineHeight)||1.2*parseFloat(x.fontSize),G=(v==null?void 0:v.clientHeight)??0;G>0&&G-N-a<2*ie?e.dataset.stacks="off":delete e.dataset.stacks},y=new ResizeObserver(a=>{var C,w;for(const x of a)t.includes(x.target)&&i.set(x.target,((w=(C=x.borderBoxSize)==null?void 0:C[0])==null?void 0:w.blockSize)??x.target.getBoundingClientRect().height);$()}),I=()=>{const a=H(e);a!==v&&(v&&v!==b&&y.unobserve(v),a&&a!==b&&y.observe(a),v=a)},O=()=>{I(),$()};I();for(const a of t)a&&y.observe(a,{box:"border-box"});return window.addEventListener("resize",O),()=>{y.disconnect(),window.removeEventListener("resize",O);for(const a of n)a.style.removeProperty("--clover-sections-before"),a.style.removeProperty("--clover-sections-after");e.style.removeProperty("--clover-sections-total"),delete e.dataset.stacks}},[c,L,h]),R(()=>{if(c)return;const e=f.current.map(t=>t==null?void 0:t.parentElement).filter(t=>!!t),n=t=>{var d;if(t.ctrlKey)return;const r=t.currentTarget,l=J(r);if(!l||l===document.scrollingElement)return;t.preventDefault();const i=t.deltaMode===1?parseFloat(getComputedStyle(r).lineHeight)||16:t.deltaMode===2?l.clientHeight:1;(d=J(l)??document.scrollingElement)==null||d.scrollBy({left:t.deltaX*i,top:t.deltaY*i,behavior:"instant"})};for(const t of e)t.addEventListener("wheel",n,{passive:false});return()=>{for(const t of e)t.removeEventListener("wheel",n)}},[c,L]);const Y=e=>{e!==p&&(D.current=e,c||se(n=>({value:e,count:n.count+1})),E==null||E(e))},le=(e,n)=>{var d;const t=o.length-1,[r,l]=c?["ArrowLeft","ArrowRight"]:["ArrowUp","ArrowDown"],i=e.key===l?(n+1)%o.length:e.key===r?(n-1+o.length)%o.length:e.key==="Home"?0:e.key==="End"?t:null;i!==null&&(e.preventDefault(),(d=f.current[i])==null||d.focus(),c&&Y(o[i].value))},q=B(false);R(()=>{if(!c)return;const e=o.findIndex(v=>v.value===p),n=f.current[e],t=n==null?void 0:n.parentElement;if(!n||!t)return;const r=getComputedStyle(t),l=t.getBoundingClientRect(),i=n.getBoundingClientRect(),d=l.left+(parseFloat(r.scrollPaddingLeft)||0),b=l.right-(parseFloat(r.scrollPaddingRight)||0);(i.left<d-1||i.right>b+1)&&m.scrollToIndex(e,{instant:!q.current}),q.current=true},[p,c,o.length,m.scrollToIndex]);const U=e=>{const n=e==="prev"?m.canScrollPrev:m.canScrollNext,t=e==="prev"?"sectionsScrollBack":"sectionsScrollForward";return u("button",{type:"button",className:`clover-steps-step clover-sections-scroll-${e}`,"aria-hidden":"true",tabIndex:-1,hidden:!n,...pe(re(t)),onMouseDown:r=>r.preventDefault(),onClick:e==="prev"?m.scrollPrev:m.scrollNext,children:[u("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:u("path",{d:e==="next"?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),u(ge,{label:F(t)})]})},ae=he(h,"div"),Q=(e,n)=>{const t=e.value===p;return u("button",{ref:r=>{f.current[n]=r},type:"button",id:`${g}-button-${n}`,className:"clover-sections-button","data-value":e.value,"data-track-index":c?n:void 0,"aria-controls":`${g}-panel-${n}`,...c?{role:"tab","aria-selected":t,tabIndex:t?0:-1}:{"aria-expanded":t,"aria-disabled":t||void 0},onClick:()=>Y(e.value),onKeyDown:r=>le(r,n),children:[u("span",{className:"clover-sections-label",children:e.label}),!c&&u(ye,{open:t,className:"clover-sections-chevron"})]},e.value)};return u("div",{ref:P,className:"clover-sections","data-layout":s,onFocus:c?void 0:ce,style:c?void 0:{"--clover-sections-count":o.length},children:[c&&u("div",{className:"clover-sections-tabs","data-more":[m.canScrollPrev&&"start",m.canScrollNext&&"end"].filter(Boolean).join(" ")||void 0,children:u("div",{className:"clover-sections-row",children:[u("div",{role:"tablist",ref:m.ref,...k.props,className:"clover-sections-list",children:o.map(Q)}),U("prev"),U("next")]})}),c&&k.node,o.map((e,n)=>{const t=e.value===p;return u("section",{className:"clover-sections-item","data-value":e.value,"data-open":t,style:c?void 0:{"--clover-sections-index":n},children:[!c&&u(ae,{className:"clover-sections-heading",children:[Q(e,n),u("span",{className:"clover-sections-reach","aria-hidden":"true"})]}),u(oe.Provider,{value:K.value===e.value?K.count:0,children:u(we,{id:`${g}-panel-${n}`,tabs:c,labelledBy:`${g}-button-${n}`,hidden:!t,actions:e.actions,children:j.current.has(e.value)?e.content:null})})]},e.value)})]})}function we({id:o,tabs:s,labelledBy:A,hidden:E,actions:S,children:T}){const[h,g]=Z(null),k=!E||!!S;return te(()=>{const f=h==null?void 0:h.parentElement;if(!k||!h||!f||typeof ResizeObserver>"u")return;const c=new ResizeObserver(()=>{const F=h.offsetWidth;F?(f.style.setProperty("--clover-sections-actions",`${F}px`),f.setAttribute("data-actions","")):(f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions"))});return c.observe(h),()=>{c.disconnect(),f.style.removeProperty("--clover-sections-actions"),f.removeAttribute("data-actions")}},[h,k]),u(ve,{children:[!s&&u("div",{ref:g,className:"clover-sections-actions",hidden:!k,children:S}),u("div",{id:o,role:s?"tabpanel":"region","aria-labelledby":A,tabIndex:s?0:void 0,className:"clover-sections-panel",hidden:E,children:u(ne.Provider,{value:s?null:h,children:[s&&S,T]})})]})}function H(o){for(let s=o.parentElement;s&&s!==document.body;s=s.parentElement)if(/auto|scroll|hidden/.test(getComputedStyle(s).overflowY))return s;return document.scrollingElement}function J(o){for(let s=o.parentElement;s&&s!==document.body;s=s.parentElement)if(/auto|scroll/.test(getComputedStyle(s).overflowY)&&s.scrollHeight>s.clientHeight)return s;return document.scrollingElement}function xe(o){try{return o.matches(":focus-visible")}catch{return true}}export{Re as S,$e as a,Ie as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,A as C,d as B,_ as O,T as W,u as c,
|
|
1
|
+
import{a as A,A as C,d as B,_ as O,T as W,u as c,ao as q,l as P,k as _}from"./shared-ByrLMUQa.mjs";import{b as z}from"./Transport-DdNRlSa0.mjs";import{S as Y}from"./Steps-BoNd47eB.mjs";import{h as j}from"./Tip-mcI7IRQh.mjs";const H=12;function G(e,s,l,d){const f=i=>H/2+(l-H)*(i.start/s),h=[];for(const i of e){const m=h[h.length-1];(m?l>0?f(i)-f(m[0])<d:i.start===m[0].start:false)?m.push(i):h.push([i])}return h}const J={ArrowDown:e=>parseFloat(getComputedStyle(e).lineHeight)||16,ArrowUp:e=>-(parseFloat(getComputedStyle(e).lineHeight)||16),PageDown:e=>e.clientHeight,PageUp:e=>-e.clientHeight};function Q(e){const s=e.currentTarget.querySelector(".clover-canvas-transport-mark-words"),l=J[e.key];if(!s||!l||e.altKey||e.ctrlKey||e.metaKey)return false;const d=l(s);return(d>0?s.scrollHeight-s.clientHeight-s.scrollTop:s.scrollTop)<1?false:(e.preventDefault(),s.scrollBy({top:d}),true)}function et({marks:e,duration:s,selected:l,onSelect:d,onActivate:f}){const{t:h,langOf:i}=A(),m=C(null),[u,D]=B({width:0,target:0,from:0});O(()=>{const t=m.current;if(!t)return;const n=t.closest(".clover-canvas-media"),r=()=>{const p=t.querySelector(".clover-canvas-transport-mark"),g={width:t.clientWidth,target:(p==null?void 0:p.offsetWidth)??0,from:n?t.getBoundingClientRect().left-n.getBoundingClientRect().left:0};D(v=>v.width===g.width&&v.target===g.target&&v.from===g.from?v:g)};r();const o=new ResizeObserver(r);return o.observe(t),n&&o.observe(n),()=>o.disconnect()},[]);const y=W(()=>G(e,s,u.width,u.target),[e,s,u]),[M,E]=B({}),K=t=>{const n=t.findIndex(r=>r.id===l);return n>=0?n:Math.min(M[t[0].id]??0,t.length-1)},[$,I]=B(null),[L,R]=B(null),k=t=>{R(t),f==null||f(t)},T=C([]),x=C(new Set);if(!e.length||!(s>0))return null;const b=(t,n)=>!!n&&t.some(r=>r.id===n),F=Math.max(0,y.findIndex(t=>b(t,$??l))),S=t=>{var r;const n=Math.min(y.length-1,Math.max(0,t));(r=T.current[n])==null||r.focus()},N=t=>z(t[0].start/s*100),U=t=>`${u.from+H/2+(u.width-H)*(t[0].start/s)}px`;return c(_,{children:[c("span",{className:"clover-canvas-transport-points","aria-hidden":"true",children:y.map(t=>c("span",{className:"clover-canvas-transport-mark-point","data-active":b(t,L)||b(t,l)?"true":void 0,style:{left:N(t)}},t[0].id))}),c("div",{ref:m,className:"clover-canvas-transport-marks",role:"toolbar","aria-label":h("informationPanelTabsAnnotations"),lang:i("informationPanelTabsAnnotations"),onKeyDown:t=>{const n=T.current.findIndex(o=>o===document.activeElement);if(n<0)return;const r=getComputedStyle(t.currentTarget).direction==="rtl"?-1:1;if(t.key==="ArrowRight")S(n+r);else if(t.key==="ArrowLeft")S(n-r);else if(t.key==="Home")S(0);else if(t.key==="End")S(y.length-1);else return;t.preventDefault()},children:y.map((t,n)=>{const r=K(t),o=t[r],p=q(o.start),g=t.length>1?` ${r+1} / ${t.length}`:"",v=a=>{E(w=>({...w,[t[0].id]:a})),k(t[a].id),d(t[a].id)};return c("div",{className:"clover-canvas-transport-mark-group",style:{left:N(t),...u.width>0&&{"--clover-mark-x":U(t)}},onPointerEnter:()=>{x.current.delete(t[0].id),k(o.id)},onPointerLeave:()=>k(null),onFocus:()=>{x.current.delete(t[0].id),I(o.id),k(o.id)},onBlur:a=>{a.currentTarget.contains(a.relatedTarget)||k(null)},onKeyDown:a=>{if(a.defaultPrevented||Q(a)||a.key!=="Escape"||x.current.has(t[0].id))return;a.preventDefault(),x.current.add(t[0].id);const w=T.current[n];w&&document.activeElement!==w&&w.focus(),j(a.currentTarget,"tipHidden",["pointerenter","focusin"])},children:[c("button",{ref:a=>{T.current[n]=a},type:"button",className:"clover-canvas-transport-mark",tabIndex:n===F?0:-1,"aria-label":`${p} ${o.label}${g}`,...P(o.lang),"aria-current":b(t,l)?"true":void 0,"data-active":b(t,l)?"true":void 0,onClick:()=>d(o.id)}),c("span",{className:"clover-tip clover-canvas-transport-mark-tip",children:[c("span",{className:"clover-canvas-transport-mark-words","aria-hidden":"true",...P(o.lang),children:[c("span",{className:"clover-tip-lead",children:p}),o.label]}),t.length>1&&c(Y,{steps:{position:r,total:t.length,step:a=>v(r+a)}})]})]},t[0].id)})})]})}export{et as SeekMarks,G as groupMarks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as f,A as I,y as P,aL as V,T as k,a9 as M,u as x,a2 as R}from"./shared-ByrLMUQa.mjs";import{s as T,P as j,a as q}from"./Items-BsKByN_b.mjs";import{b as z}from"./items-CjtUJjSU.mjs";function H({iiifContent:a,items:n,navigation:L,onSelect:r,request:u,header:A=true,forwardedRef:h,...c}){var w;const[s,d]=f(null),[y,l]=f(0),i=typeof a=="string"?a:a==null?void 0:a.id,m=I({iiifContent:a,request:u});m.current={iiifContent:a,request:u};const[F,v]=f(i);F!==i&&(v(i),d(null),l(0)),P(()=>{if(n||m.current.iiifContent===void 0)return;const t=new AbortController;return V(m.current.iiifContent,{request:m.current.request,signal:t.signal}).then(o=>{t.signal.aborted||d(o)}).catch(()=>{}),()=>t.abort()},[i,n]);const e=k(()=>z(n||s),[n,s]);if(!e.length)return null;const p=!n&&(s==null?void 0:s.type)==="Manifest",b=M(s==null?void 0:s.viewingDirection),O=L??(p?"id":"homepage");if(c.layout==="pager")return x(j,{...c,forwardedRef:h,steps:T(e,y,b,(t,o)=>{r==null||r(t,o),l(e.indexOf(t))})});const g=(w=s==null?void 0:s.homepage)==null?void 0:w[0],D=g==null?void 0:g.id;return x(q,{...c,forwardedRef:h,items:e,selected:O==="id"?y:-1,navigation:O,rtl:b==="right-to-left",request:u,showSummary:!p,heading:A&&s?{label:s.label,summary:s.summary,homepage:D,homepageLang:R(g)}:void 0,onActivate:(t,o)=>{r==null||r(t,o),l(e.indexOf(t))},followFocus:t=>l(e.indexOf(t))})}export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,u as s,v as c,l as d,k as m}from"./shared-
|
|
1
|
+
import{a as p,u as s,v as c,l as d,k as m}from"./shared-ByrLMUQa.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{c as f}from"./hooks-DhTYPPVG.mjs";import{L as h}from"./Loading-DSaV1vxb.mjs";function j({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{j as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,u as o,l as p,v as u}from"./shared-
|
|
1
|
+
import{a as c,u as o,l as p,v as u}from"./shared-ByrLMUQa.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-mcI7IRQh.mjs";import"./styles-BOXm_R8o.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p,c as m,
|
|
1
|
+
import{e as p,c as m,ak as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-ByrLMUQa.mjs";import{s as w,P as M,a as C}from"./Items-BsKByN_b.mjs";import{C as P}from"./CountMenu-CQ7ThPWJ.mjs";import{f as S,r as N}from"./fetchManifest-Cp7c8vs5.mjs";import{S as q}from"./Steps-BoNd47eB.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-BOXm_R8o.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=k(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>z(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function k(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function z(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as f,u as a,z as l,P as r}from"./shared-ByrLMUQa.mjs";import{C as m}from"./CanvasView-B752g1bm.mjs";import{p as t}from"./playerSurface-BthXi9l2.mjs";import{C as s}from"./Pending-CDXsIk5O.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-DaP_DgGw.mjs")),v=l(()=>import("./LoadedCanvas-fqjWHH0H.mjs"));function h({timeline:o,className:n,...e}){const c=f(),i=u("clover-timeline",n);return e.iiifContent!==void 0&&o===void 0?a(r,{fallback:a(s,{}),children:a(v,{...e,className:i,of:"Timeline",surface:t})}):o?a(m,{...e,className:i,canvases:[o],navigator:false,surface:t}):c?a(r,{fallback:a(s,{}),children:a(d,{...e,className:n})}):null}export{h as Timeline,h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k,A as L,y as S,u as f,l as w}from"./shared-
|
|
1
|
+
import{a as k,A as L,y as S,u as f,l as w}from"./shared-ByrLMUQa.mjs";import"./styles-BOXm_R8o.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function P({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function B(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let v=0;function E(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(v++===0&&(document.addEventListener("keydown",E,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--v||(document.removeEventListener("keydown",E,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function O(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,P as T,O as f,b as h,B as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as
|
|
1
|
+
import{D as we,a as Ie,e as Me,c as $e,n as Re,T as D,d as f,G as Ae,y as h,S as Fe,C as Pe,A as E,b as ze,u as s,t as Ge,k as ge,l as O,v as Ve,$ as He,E as Ke}from"./shared-ByrLMUQa.mjs";import{c as pe,a as me}from"./layout-zjkkOHIj.mjs";import{l as je,a as qe,p as De,b as Ue,c as Xe}from"./vtt-BRwnCWbJ.mjs";import{j as Be}from"./classnames-DukgfdpI.mjs";import{u as Je,c as Qe}from"./readingLanguages-B20n_dkw.mjs";import{G as We}from"./GlobeGlyph-CCi1sZgm.mjs";import{b as fe,s as Ye}from"./bringIntoView-CQH5ZgMM.mjs";import{C as Ze}from"./Cue-B1IlY4Ae.mjs";import{F as _e}from"./FieldPill-Dx--yBoK.mjs";import{l as et}from"./languageCode-cCpiU0b0.mjs";import{a as tt}from"./Sections-C3fPhGNx.mjs";import{T as st}from"./Tip-mcI7IRQh.mjs";import{u as nt}from"./useContainerName-DR_6TyDU.mjs";import"./styles-BOXm_R8o.mjs";const U=40,X=r=>r.toLocaleLowerCase();function rt(r,l){if(!l)return r;const v=X(r),m=[];let c=0;for(let g=v.indexOf(l);g>=0;g=v.indexOf(l,g+l.length))g>c&&m.push(r.slice(c,g)),m.push(s("mark",{children:r.slice(g,g+l.length)},g)),c=g+l.length;return c<r.length&&m.push(r.slice(c)),m}const I=r=>r.read==="cues"&&r.kind!=="transcript",xt=we(function({as:l="div",follow:v=true,find:m=true,sticky:c=false,size:g="large",className:he,...ve},be){const{t:M,langOf:$}=Ie(),{clover:i,language:R}=Me("Transcript"),x=$e(e=>Re(e.manifest,e.canvasId)).find(e=>pe(e).length>0||me(e).length>0),a=D(()=>x?[...pe(x).map(e=>({...e,read:"cues"})),...me(x).map(e=>({...e,read:"text"}))]:[],[x]),[B,A]=f(0),u=a[B]??a[0],b=Je(),F=D(()=>{const e=(b==null?void 0:b.chosen)??R;if(e)return e;const t=a.flatMap(n=>n.language&&n.language!=="none"?[n.language]:[]);return t.length>1?Ae(t):void 0},[b==null?void 0:b.chosen,R,a]);h(()=>{if(!F)return;const e=a.findIndex(n=>n.language&&n.language!=="none"&&Fe(n.language,F));if(e<0)return;A(e);const t=a[e];I(t)&&i.captions.get()!==t.id&&i.captions.emit(t.id)},[F,a,i]),h(()=>{const e=t=>{const n=a.findIndex(d=>I(d)&&d.id===t);n>=0&&A(n)};return e(i.captions.get()),i.captions.subscribe(e)},[i,a]);const[o,J]=f([]),[Ce,Q]=f([]),[W,Y]=f(null);h(()=>{if(J([]),Q([]),Y(null),!u)return;let e=true;return(u.read==="cues"?je(u.id,i.request).then(t=>e&&J(De(t))):qe(u.id,i.request).then(t=>e&&Q(Ue(t)))).catch(t=>{e&&Y(t instanceof Error?t:new Error(String(t)))}),()=>{e=false}},[u,i]);const C=Pe(i.media.subscribe,i.media.get,i.media.get),k=at(C,o),P=E(null);h(()=>{var t;if(!v||k<0||!C||C.paused)return;const e=(t=P.current)==null?void 0:t.children[k];e&&fe(e,"nearest")},[k,v,C]);const[Z,_]=f(""),p=X(Z.trim()),T=D(()=>p?o.flatMap((e,t)=>X(e.text).includes(p)?[t]:[]):[],[o,p]),[z,Te]=f({query:"",at:0}),N=z.query===p?z.at:0,G=E(null),V=E(false),[ee,xe]=f({cues:[],count:U}),te=ee.cues===o?ee.count:U,H=()=>xe({cues:o,count:te+U}),se=E(H);se.current=H;const K=typeof IntersectionObserver<"u",y=K?Math.min(o.length,Math.max(te,k+1,(T[N]??-1)+1)):o.length,ne=E(null);h(()=>{const e=ne.current;if(!e||!K||y>=o.length)return;const t=new IntersectionObserver(n=>{n.some(d=>d.isIntersecting)&&se.current()},{root:Ye(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[K,y,o.length]);const S=T[N];h(()=>{var t;if(S===void 0)return;const e=(t=P.current)==null?void 0:t.children[S];e&&fe(e,"nearest"),V.current=false},[S,p]);const Ne=o.length>0;h(()=>{var d;const e=(d=G.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!c||!e||!t||typeof ResizeObserver>"u")return;const n=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return n.observe(e),()=>{n.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[c,Ne,m]);const j=ze(),re=tt(),ae=a.every(I)?"playerCaptions":"transcriptLabel",ce=nt(M(ae),$(ae));if(!x||!u)return null;const ye=a.filter(e=>e.read==="text").length,oe=a.map(e=>{const t=et(e.language);return e.read==="cues"?t:ye>1&&t?`TXT ${t}`:"TXT"}),ke=oe.map(e=>e&&oe.filter(t=>t===e).length===1?e:void 0),ie=u.language&&u.language!=="none"?u.language:void 0,le=a.some(e=>e.read==="text"),Le=Qe(b,a.map(e=>e.language)),q=a.length>1&&(le||!Le)&&s(ge,{children:[ce.node,s("fieldset",{...ce.props,className:"clover-transcript-languages",children:[!le&&s("span",{className:"clover-languages-glyph","aria-hidden":"true",children:s(We,{})}),a.map((e,t)=>{const n=Ge(e.label,R),d=ke[t],Se=n.text||e.language||String(t+1);return s("label",{className:"clover-transcript-language",children:[s("input",{type:"radio",name:`${j}-language`,checked:t===B,onChange:()=>{A(t),I(e)&&i.captions.emit(e.id)}}),d&&s(ge,{children:[s("span",{className:"clover-transcript-code",children:d})," "]}),s("span",{style:d?Ve:void 0,...O(n.text?n.lang:void 0),children:Se}),d&&n.text&&s(st,{label:n.text,lang:n.lang})]},e.id)})]})]}),ue=(e,t=true)=>{if(C){t?Ke(C,e.start):C.currentTime=e.start;return}i.goTo(x.id,{time:e.start,...t&&{autoplay:true}})},de=e=>{const t=o[T[e]];t&&(V.current=true,Te({query:p,at:e}),ue(t,false))},Ee={position:T.length?N:-1,total:T.length,step:e=>de(N+e)},L=T.length,w=p?L===0?"contentSearchResultsNone":L===1?"contentSearchResult":"contentSearchResults":null,Oe=m&&u.read==="cues"&&o.length>0&&s("div",{className:"clover-transcript-find",children:[s(_e,{ref:G,id:`${j}-find`,value:Z,onChange:_,onSubmit:()=>{if(!L)return;const e=z.query===p&&V.current;de(e?(N+1)%L:N)},onClear:()=>{var e;_(""),(e=G.current)==null||e.focus()},results:p?Ee:null,size:g,classes:{form:"clover-transcript-find-field"}}),s("p",{className:"clover-transcript-find-status",role:"status",...O(w?$(w):void 0),children:w?M(w,{count:L}):""})]});return s(l,{ref:be,className:Be("clover-transcript",he),"data-sticky":c||void 0,...ve,children:[q&&(re?He(q,re):q),Oe,W?s("div",{className:"clover-status","data-status":"error",role:"alert",children:[s("p",{...O($("statusError")),children:M("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:W.message})]}):u.read==="text"?s("div",{className:"clover-transcript-body",...O(ie),children:Ce.map((e,t)=>s("p",{children:e},t))}):s("ol",{ref:P,className:"clover-transcript-cues",id:`${j}-cues`,...O(ie),children:o.slice(0,y).map((e,t)=>s("li",{className:"clover-transcript-cue","aria-current":t===k?"true":void 0,"data-match":p&&T.includes(t)?t===S?"current":"true":void 0,children:s("button",{type:"button",onClick:()=>ue(e),onFocus:()=>{y<o.length&&t>=y-5&&H()},children:[s(Ze,{start:e.start,className:"clover-transcript-time"}),s("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&s("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),rt(e.text,p)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&y<o.length&&s("div",{ref:ne,className:"clover-transcript-more","aria-hidden":"true"})]})});function at(r,l){const[v,m]=f(-1);return h(()=>{if(!r||!l.length){m(-1);return}const c=()=>m(Xe(l,r.currentTime));return c(),r.addEventListener("timeupdate",c),r.addEventListener("seeked",c),()=>{r.removeEventListener("timeupdate",c),r.removeEventListener("seeked",c)}},[r,l]),v}export{xt as Transcript};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ee,A as h,d as R,_ as G,T as Ce,u as e,P as we,z as Pe,
|
|
1
|
+
import{a as Ee,A as h,d as R,_ as G,T as Ce,u as e,P as we,z as Pe,ao as B,l as w,v as ie,ai as Fe,y as Ie,k as de}from"./shared-ByrLMUQa.mjs";import{u as Me,g as Oe,a as $e,b as pe,l as Be,s as Re,T as L,P as Ve,c as xe,V as Ae,d as Ke,C as De,F as Le,e as ze,E as Ue,f as _e,p as je}from"./Transport-DdNRlSa0.mjs";import{imageSource as qe}from"./thumbnail-Np4ftjUo.mjs";import{u as Xe,P as Ze,E as Ge}from"./EntryThumbnail-C5df3CaH.mjs";import{j as He}from"./classnames-DukgfdpI.mjs";import{l as ve}from"./languageCode-cCpiU0b0.mjs";import{T as ge,S as me}from"./Tip-mcI7IRQh.mjs";import{u as Je}from"./useContainerName-DR_6TyDU.mjs";import{u as Qe,t as We}from"./pointer-C22ufJ5w.mjs";import"./styles-BOXm_R8o.mjs";const Ye=Pe(()=>import("./SeekMarks-Ds8v3SaW.mjs").then(({SeekMarks:r})=>({default:r}))),en=".clover-canvas-transport-marks",nn=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:qe(r==null?void 0:r.thumbnail);function fe(r,i){var y;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const g=(y=r[f])==null?void 0:y.end;return g!==void 0&&i>=g?-1:f}let Z;function tn(){if(Z===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,Z=r.volume===.5}return Z}function rn({id:r,label:i,labelLang:f,button:g,icon:y,active:P,current:k,options:F,selected:V,onSelect:c,request:z,asMenu:I=false}){const[d,p]=R(false),T=h(null),M=h(null),O=h(null),$=h(false),b=Je(i,f),N=F.some(a=>ve(a.language));Fe(d,()=>p(false));const x=()=>{var a;p(false),(a=M.current)==null||a.focus()};return Ie(()=>{if(!d)return;const a=s=>{var o,t,S;if(s instanceof KeyboardEvent){if(s.key!=="Escape")return;(o=T.current)!=null&&o.contains(document.activeElement)&&(s.preventDefault(),(t=M.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(s.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),G(()=>{const a=O.current,s=T.current,o=s==null?void 0:s.closest(".clover-canvas-transport"),t=s==null?void 0:s.closest(".clover-canvas-media");if(!d||!a||!s||!o||!t)return;const S=()=>je(a,s,o,t);S();const v=new ResizeObserver(S);return v.observe(t),v.observe(o),v.observe(a),()=>v.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var o;const s=a.relatedTarget;d&&s instanceof Node&&!((o=T.current)!=null&&o.contains(s))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":g,onClick:()=>p(a=>!a),ref:M,type:"button",children:[y,e(ge,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&b.node,d&&e("fieldset",{...b.props,className:He("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:O,children:F.map((a,s)=>{const o=ve(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===s,name:r,onChange:()=>c(s),onClick:()=>{$.current&&x()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(s),x())},type:"radio"}),a.time&&e(de,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(o?e(de,{children:[e("span",{className:"clover-canvas-transport-code",children:o})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===s&&e(Ge,{source:a.thumbnail,request:z,large:true})]},s)})})]})}const an=r=>r.querySelector(":scope > .clover-tip"),sn=r=>{try{return r.matches(":focus-visible")}catch{return false}},yn=({instance:r,controller:i,kind:f,captions:g,activeCaption:y,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:z=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:M,onMarkSelect:O,onMarkActivate:$})=>{var se,oe;const{t:b,langOf:N}=Ee(),x=Qe()||f==="video",a=h(null);Me(a);const{paused:s,currentTime:o,duration:t,buffered:S,muted:v,volume:A}=i,E=fe(c,o),[U,ye]=R(-1),[H,be]=R(0),J=h(-1),_=n=>{var l;J.current!==n&&(J.current=n,ye(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Q,W]=R(false),[K,j]=R(false),m=K?U:Q?E:-1,Y=(K||Q)&&t>0,he=Xe(nn(c[m]),Ze,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===z),ee=h(null);G(()=>{const n=ee.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&m>=0?an(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[m]);const D=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},ke=s?"playerPlay":"playerPause",ne={label:b("playerCaptionsOff"),lang:N("playerCaptionsOff")},Te=v?"playerUnmute":"playerMute",Ne=F?"imageExitFullScreen":"imageFullScreen",te=t?o/t*100:0,X=Ce(()=>{const n=Oe(c,t);return n.length?$e(n):void 0},[c,t]),Se=t?S/t*100:0,re=k&&x,C=h(null),ae=h(null);return G(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())}),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ee,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(en)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Re(n.currentTarget,n.clientX)*t;j(true),be(Math.floor(u)),_(fe(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:Y?{"--clover-transport-preview":pe(m>=0?D(m).left+D(m).width/2:(K?H:o)/t*100)}:void 0,children:[O&&T.length>0&&e(we,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:M,onSelect:O,onActivate:$})}),e("input",{"aria-label":b("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(o)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>W(sn(n.currentTarget)),onBlur:()=>W(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${te}%`,"--clover-transport-loaded":`${Se}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":te/100}},type:"range",value:o}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:pe(D(q).left),width:Be(D(q).width)}}),Y&&e(ge,{lead:B(K?H:o),label:((se=c[m])==null?void 0:se.label)??"",lang:(oe=c[m])==null?void 0:oe.lang,image:m>=0?he:void 0},m)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(L,{words:ke,button:s?"play":"pause",shortcut:me.play,onClick:i.toggle,buttonRef:ae,children:s?e(Ve,{}):e(xe,{})}),e(L,{words:Te,button:"mute",shortcut:me.mute,onClick:i.toggleMute,children:v||A===0?e(Ae,{}):e(Ke,{})}),tn()&&e("input",{"aria-label":b("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(v?0:A)*100}%`},type:"range",value:v?0:A,"aria-valuetext":`${Math.round((v?0:A)*100)}%`}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{children:[e("span",{style:ie,...w(N("playerCurrentTime")),children:[b("playerCurrentTime")," "]}),B(o)]}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{children:[e("span",{style:ie,...w(N("playerDuration")),children:[b("playerDuration")," "]}),B(t)]})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(g.length>0||re||p)&&e("div",{className:"clover-canvas-transport-end",children:[g.length>0&&e(rn,{id:`${r}-captions`,label:b("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(De,{on:y>=0}),active:y>=0,current:g[y]??ne,options:[ne,...g],selected:y+1,onSelect:n=>P(n-1)}),p&&e(L,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(Le,{}):e(ze,{})}),re&&e(L,{words:Ne,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(Ue,{}):e(_e,{})})]})]})]})};export{yn as T,nn as a,fe as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,u as o,l as b,_ as m}from"./shared-BzLnvFn3.mjs";import{T as x}from"./Tip-h4Abk6aH.mjs";import{b as f,c as k}from"./controlGlyphs-QLLc8cpa.mjs";import{a as y}from"./index-GH8QRDv1.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:max(24px,var(--clover-space-l));height:max(24px,var(--clover-space-l));translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:max(24px,var(--clover-space-l));margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:max(24px,var(--clover-space-l));padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
|
|
1
|
+
import{a as g,u as o,l as b,_ as m}from"./shared-ByrLMUQa.mjs";import{T as x}from"./Tip-mcI7IRQh.mjs";import{b as f,c as k}from"./controlGlyphs-DMQCxKaT.mjs";import{a as y}from"./index-Ciz5x8Tt.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:max(24px,var(--clover-space-l));height:max(24px,var(--clover-space-l));translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:max(24px,var(--clover-space-l));margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:max(24px,var(--clover-space-l));padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{V as l,aG as g,aE as u,aH as y,aF as f}from"./shared-ByrLMUQa.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function b(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=u(e,s);d.length&&a.push({id:s,label:y(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{b as loadAnnotationSets};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,
|
|
1
|
+
import{t as d,Y as p}from"./shared-ByrLMUQa.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
|
package/dist/web-components/{annotations-content-tLJ5sUiC.mjs → annotations-content-CuWJZr4t.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadAnnotationSets as f}from"./annotation-collection-
|
|
1
|
+
import{loadAnnotationSets as f}from"./annotation-collection-C3UpNV1K.mjs";import{H as i,aI as l,ay as c}from"./shared-ByrLMUQa.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-
|
|
1
|
+
import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-ByrLMUQa.mjs";import{B as h}from"./Body-CQuiRv9p.mjs";import{u as y,P as L}from"./nodes-BDyXzQhk.mjs";import{Toggle as b}from"./toggle-lop2se80.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-ByrLMUQa.mjs";import{C as b}from"./CanvasView-B752g1bm.mjs";import{r as s}from"./rendererSurface-BfZP5clN.mjs";import{C as i}from"./Pending-CDXsIk5O.mjs";const h=c(()=>import("./Connected-shq2_tc-.mjs")),B=c(()=>import("./LoadedCanvas-fqjWHH0H.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function w({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{w as CanvasElement};
|