@nulib/clover 4.5.2 → 4.5.4
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/Annotations/Annotations.mjs +1 -1
- package/dist/components/Canvas/AnnotationState.mjs +1 -1
- package/dist/components/Canvas/CanvasView.mjs +4 -1
- package/dist/components/Canvas/Connected.mjs +3 -1
- package/dist/components/Canvas/layout.mjs +10 -3
- package/dist/components/Canvas/media/MediaBody.mjs +11 -1
- package/dist/components/Canvas/media/useCaptionTracks.mjs +3 -3
- package/dist/components/Panel/Panel.mjs +1 -1
- package/dist/components/Transcript/Transcript.mjs +12 -5
- package/dist/core/annotation-sets.mjs +5 -4
- package/dist/core/clover.mjs +2 -1
- package/dist/core/language-choice.mjs +1 -9
- package/dist/core/search-service.mjs +0 -2
- package/dist/core/search-set-id.mjs +5 -0
- package/dist/core/search.mjs +1 -1
- package/dist/i18n/languages.mjs +7 -0
- package/dist/index.d.mts +8 -4
- package/dist/index.mjs +2 -1
- package/dist/react/readingLanguages.mjs +2 -2
- package/dist/styles/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates.css +1 -1
- package/dist/web-components/{About-CQxtgS3v.mjs → About-DCeIMPXs.mjs} +1 -1
- package/dist/web-components/AnnotationItems-vokjqFpJ.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-Byf1nA-O.mjs → AnnotationMenu-n8wZulkI.mjs} +1 -1
- package/dist/web-components/AnnotationState-DJSkyiw0.mjs +1 -0
- package/dist/web-components/{Annotations-BznHfXJT.mjs → Annotations-CgPEcwft.mjs} +1 -1
- package/dist/web-components/{Annotations-0gzRTwNG.mjs → Annotations-D2Iy6k3X.mjs} +2 -2
- package/dist/web-components/{Body-Do9PiELy.mjs → Body-h5ykt3jO.mjs} +1 -1
- package/dist/web-components/{BodyAlert-CpsyVtYl.mjs → BodyAlert-COFJjxVV.mjs} +1 -1
- package/dist/web-components/{Button-DqfkGSl5.mjs → Button-CgTdpmNf.mjs} +1 -1
- package/dist/web-components/{Camera-bs3W3OK0.mjs → Camera-i2fafLIh.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-9VTWQiW6.mjs → Canvas2DBackend-C2AYDVCI.mjs} +1 -1
- package/dist/web-components/{CanvasView-m9ooNUhD.mjs → CanvasView-uvJ5kDYN.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-yyxvF-_h.mjs → CaptionDetails-m7amd8MS.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-DCyICayx.mjs → ChaptersMenu-6dDzuI0m.mjs} +1 -1
- package/dist/web-components/{Chevron-DpLzbCaE.mjs → Chevron-DVax9RTn.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-_z-WmYj6.mjs → ChoiceMenu-DH4n5jdL.mjs} +1 -1
- package/dist/web-components/Collection-CCjFTuVG.mjs +1 -0
- package/dist/web-components/{CollectionSelect-vO2qCVbK.mjs → CollectionSelect-0wNC970P.mjs} +1 -1
- package/dist/web-components/Connected-CGF0cSzv.mjs +1 -0
- package/dist/web-components/{Connected-wXkAqvjL.mjs → Connected-Cr4h-tHh.mjs} +1 -1
- package/dist/web-components/{Connected-DdmRznGj.mjs → Connected-CssvezHA.mjs} +1 -1
- package/dist/web-components/{Contents-Bfmghfq-.mjs → Contents-Cs7_X8jD.mjs} +1 -1
- package/dist/web-components/{ControlMenu-BaBwqPBx.mjs → ControlMenu-J-gMDza-.mjs} +1 -1
- package/dist/web-components/ControlsFade-BDjMo25i.mjs +1 -0
- package/dist/web-components/{CountMenu-mvPiRqfS.mjs → CountMenu--Z7rGivu.mjs} +1 -1
- package/dist/web-components/Cue-BzhK_KTz.mjs +1 -0
- package/dist/web-components/Document-D5r6QJ9F.mjs +1 -0
- package/dist/web-components/{DomLayers-B4wyEylP.mjs → DomLayers-6wCUT5ap.mjs} +1 -1
- package/dist/web-components/{Download-DPJ0jEM8.mjs → Download-Cff-mZmi.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BeD_WacH.mjs → EntryBodies-D2OorCCX.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-Cs_9m02f.mjs → EntryThumbnail-iY1cnsAP.mjs} +1 -1
- package/dist/web-components/{FieldPill-3OFVRLOg.mjs → FieldPill-Swznzuhd.mjs} +1 -1
- package/dist/web-components/FrameAnimation-CjHUil6t.mjs +1 -0
- package/dist/web-components/{Gallery-Bt8ZE7KN.mjs → Gallery-CCKnJzQY.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-BcR00ptO.mjs → GlobeGlyph-D_ZaGUO8.mjs} +1 -1
- package/dist/web-components/{HideToggle-CzoPlLH7.mjs → HideToggle-D_n5lwkp.mjs} +1 -1
- package/dist/web-components/{ImageControls-6aS0WiPB.mjs → ImageControls-Dk8F5lUA.mjs} +1 -1
- package/dist/web-components/{Items-Cylhcqm3.mjs → Items-CbO0GqAH.mjs} +1 -1
- package/dist/web-components/Label-jKQGRD5d.mjs +1 -0
- package/dist/web-components/{LanguageChoice-I2zbqR8s.mjs → LanguageChoice-e7MGPRCd.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-D7wMhxR_.mjs → LanguageMenu-BsWzKg__.mjs} +1 -1
- package/dist/web-components/{LightboxView-P-bt35KW.mjs → LightboxView-BjJ20ylQ.mjs} +1 -1
- package/dist/web-components/{ListEnd-Ch79vv6H.mjs → ListEnd-BXjH6six.mjs} +1 -1
- package/dist/web-components/{Loaded-nfW9JcE1.mjs → Loaded-CL-mpRHG.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-juLvz5vu.mjs +1 -0
- package/dist/web-components/LoadedMap-CowAds3f.mjs +1 -0
- package/dist/web-components/{Loading-27_CRfmr.mjs → Loading-DGPqbYw2.mjs} +1 -1
- package/dist/web-components/{Map-VBS7o7LM.mjs → Map-0ImX0W-q.mjs} +1 -1
- package/dist/web-components/MapView-B-etTZqp.mjs +3 -0
- package/dist/web-components/{Markup-zy52Xoel.mjs → Markup-D5v_pfK-.mjs} +1 -1
- package/dist/web-components/{MediaBody-CMOc8TAG.mjs → MediaBody-BBu6nfi8.mjs} +1 -1
- package/dist/web-components/MediaBody-CU6BHhYo.mjs +1 -0
- package/dist/web-components/{NavDate-Hjz-ZUV8.mjs → NavDate-CJkis3CR.mjs} +1 -1
- package/dist/web-components/{Navigator-B-vYs2Cu.mjs → Navigator-CHoyJlHU.mjs} +1 -1
- package/dist/web-components/{Pager-DtwQLNol.mjs → Pager-CObS0xYo.mjs} +1 -1
- package/dist/web-components/PagerLayout-DEwXb6TF.mjs +1 -0
- package/dist/web-components/{Panel-DrIRuV4y.mjs → Panel-CyP3eeQ5.mjs} +1 -1
- package/dist/web-components/PanelPart-DzeT8Atv.mjs +1 -0
- package/dist/web-components/{PanelToggle-CXt2QzGI.mjs → PanelToggle-CxkqIgxi.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-D5WYs-Kh.mjs → PartOfManifest-Cn_HgJ7I.mjs} +1 -1
- package/dist/web-components/{Pending-DRm1E_06.mjs → Pending-DI4VIePO.mjs} +1 -1
- package/dist/web-components/{PlaceBox-tTnsemz1.mjs → PlaceBox-CHl0X25c.mjs} +1 -1
- package/dist/web-components/{Placeholder-B8Y0k5OK.mjs → Placeholder-Cg3ByN0S.mjs} +1 -1
- package/dist/web-components/{Position-bBjejirV.mjs → Position-DMsgzBqP.mjs} +1 -1
- package/dist/web-components/Primitives-7dLlwNwr.mjs +1 -0
- package/dist/web-components/Provider-YGHeWGVP.mjs +1 -0
- package/dist/web-components/{ReadMore-EjrUmbD0.mjs → ReadMore-D80et8BG.mjs} +1 -1
- package/dist/web-components/Root-CUaKZDXj.mjs +1 -0
- package/dist/web-components/Scene-B9X0CUW5.mjs +1 -0
- package/dist/web-components/{SceneView-B38QNUQr.mjs → SceneView-CunAaAoN.mjs} +1 -1
- package/dist/web-components/{Search-D5f3L4Mi.mjs → Search-C3LFmKil.mjs} +1 -1
- package/dist/web-components/{Sections-kRJ1okE8.mjs → Sections-BT3WtluQ.mjs} +1 -1
- package/dist/web-components/{SeekMarks-DqKFHbLX.mjs → SeekMarks-DazilTox.mjs} +1 -1
- package/dist/web-components/StandaloneItems-8zvqQ2eQ.mjs +1 -0
- package/dist/web-components/{Status-CjtyBONJ.mjs → Status-CvunwdwM.mjs} +1 -1
- package/dist/web-components/{Steps-BEkT1NQg.mjs → Steps-Cw27EFcs.mjs} +1 -1
- package/dist/web-components/{TargetItems-Itkqt2Tb.mjs → TargetItems-_jmvEEEp.mjs} +1 -1
- package/dist/web-components/Timeline-CKGsgOW4.mjs +1 -0
- package/dist/web-components/{Tip-ByWHicZ5.mjs → Tip-DxvfQm-l.mjs} +1 -1
- package/dist/web-components/Transcript-C7pTS92q.mjs +1 -0
- package/dist/web-components/{Transport-C1bwJBQM.mjs → Transport-K0u9YhmA.mjs} +1 -1
- package/dist/web-components/{Transport-DXc48Ck8.mjs → Transport-hORVpyCc.mjs} +1 -1
- package/dist/web-components/{annotation-collection-x1YCBmx8.mjs → annotation-collection-y13MLLGX.mjs} +1 -1
- package/dist/web-components/{annotation-name-dLmSFXbG.mjs → annotation-name-U_Yiz_CP.mjs} +1 -1
- package/dist/web-components/{annotations-content-C0p3XB-1.mjs → annotations-content-B6PtnG5P.mjs} +1 -1
- package/dist/web-components/{body-DhIi0tSa.mjs → body-Eiq36Gou.mjs} +1 -1
- package/dist/web-components/{canvas-BMBhMAO5.mjs → canvas-CDjBaQ75.mjs} +1 -1
- package/dist/web-components/{cloverEngine-CgwMyPTV.mjs → cloverEngine-65MawacL.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DYl2djp5.mjs → content-state-reader-CY-uQUXA.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-CAs5NitM.mjs → controlGlyphs-BI3qUN6D.mjs} +1 -1
- package/dist/web-components/{controls-BFETnZ7b.mjs → controls-Cc5LuT8p.mjs} +1 -1
- package/dist/web-components/{downloads-Dxku671h.mjs → downloads-Pq5Aedpe.mjs} +1 -1
- package/dist/web-components/{dragToClose-BJ07Mayh.mjs → dragToClose-DBlTMmyC.mjs} +1 -1
- package/dist/web-components/{engine-zjivMDZQ.mjs → engine-BHQWLVxn.mjs} +1 -1
- package/dist/web-components/{engines-DdvyIGhW.mjs → engines-BnPu5Ggs.mjs} +1 -1
- package/dist/web-components/{fetchManifest-J64cuwEZ.mjs → fetchManifest-BKGaZzDw.mjs} +1 -1
- package/dist/web-components/{fromManifest-BByCRrb9.mjs → fromManifest-qxJrEfn6.mjs} +1 -1
- package/dist/web-components/{glyphs-3j_wsdG0.mjs → glyphs-PlEEwLrB.mjs} +1 -1
- package/dist/web-components/{hooks-uHKfYuKB.mjs → hooks--n9dMuHb.mjs} +1 -1
- package/dist/web-components/image-layers-BLqN0BKU.mjs +1 -0
- package/dist/web-components/{image-service-content-BzLp6nth.mjs → image-service-content-DHDgPYBV.mjs} +1 -1
- package/dist/web-components/{imageService-BIVE0K1I.mjs → imageService-DfXP25SW.mjs} +1 -1
- package/dist/web-components/{index-CjNkvvfl.mjs → index-BjpZQ9J-.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{items-DDv9RUBA.mjs → items-BwKkJEOS.mjs} +1 -1
- package/dist/web-components/items-Hk3_LJmo.mjs +1 -0
- package/dist/web-components/label-CGhzU3ki.mjs +1 -0
- package/dist/web-components/layout-DbMbjpx4.mjs +1 -0
- package/dist/web-components/{link-BiM9KdpG.mjs → link-BIc77IY3.mjs} +1 -1
- package/dist/web-components/logo-BV7vGA6L.mjs +1 -0
- package/dist/web-components/{models-CObUKgMl.mjs → models-BXBEOLKe.mjs} +1 -1
- package/dist/web-components/{nodes-BJ4P1NTa.mjs → nodes-BWN5jzoG.mjs} +1 -1
- package/dist/web-components/{overlayImage-lYLaIThc.mjs → overlayImage-jvgcflf8.mjs} +1 -1
- package/dist/web-components/{panel-CoYAVlbj.mjs → panel-BW39vvfB.mjs} +1 -1
- package/dist/web-components/part-C9K_lQE1.mjs +1 -0
- package/dist/web-components/{playerSurface-DuHYLLBb.mjs → playerSurface-PBbBGoj5.mjs} +1 -1
- package/dist/web-components/{pointer--iHWeLVV.mjs → pointer-DsqyiOIC.mjs} +1 -1
- package/dist/web-components/{provider-DcsevgMJ.mjs → provider-Dg6Gi5Ft.mjs} +1 -1
- package/dist/web-components/{range-regions-Bnyl9SWk.mjs → range-regions-BmSXWBAS.mjs} +1 -1
- package/dist/web-components/{read-more-C9PqroD1.mjs → read-more-BstyFDUC.mjs} +1 -1
- package/dist/web-components/readingLanguages-BY2NUfQE.mjs +1 -0
- package/dist/web-components/{rendererSurface-BAvGJcFy.mjs → rendererSurface-AGFetq7k.mjs} +2 -2
- package/dist/web-components/{renderers-DGfMWk93.mjs → renderers-BjtPgVnV.mjs} +1 -1
- package/dist/web-components/{resource-Dt6dILeb.mjs → resource-i359_a15.mjs} +1 -1
- package/dist/web-components/{save-file-DzI4VfDl.mjs → save-file-nlQm0Sup.mjs} +1 -1
- package/dist/web-components/{search-DLXYDW3B.mjs → search-BPTt1eUz.mjs} +1 -1
- package/dist/web-components/shared-Cqxks7jF.mjs +1 -0
- package/dist/web-components/{show-link-DRW4U86r.mjs → show-link-DwefC5LJ.mjs} +1 -1
- package/dist/web-components/{sizedImage-Bb488in6.mjs → sizedImage-BBoqi5ZU.mjs} +1 -1
- package/dist/web-components/{split-BSvilwgY.mjs → split-DqzkMVr3.mjs} +1 -1
- package/dist/web-components/{status-DCylOE_H.mjs → status-BSpwZ8rO.mjs} +1 -1
- package/dist/web-components/{styles-Cm1KSkd5.mjs → styles-C9QeBpjd.mjs} +1 -1
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-IWjwr85c.mjs → thumbnail-Ckf6EotT.mjs} +1 -1
- package/dist/web-components/{tip-XxruPb74.mjs → tip-DTTyG5KI.mjs} +1 -1
- package/dist/web-components/{toggle-Bm06TZio.mjs → toggle-DAC1XODI.mjs} +1 -1
- package/dist/web-components/{useContainerName-jjktq7OB.mjs → useContainerName-D_XCWIWP.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-K1HUKs93.mjs → useControlsVisibility-CIjHTnaa.mjs} +1 -1
- package/dist/web-components/{useNearViewport-DpYbV4NQ.mjs → useNearViewport-B5E-oZb_.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-Cy6z-b7G.mjs → useScrollTrack-C2xSfGF6.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-BnihkLNH.mjs → AnnotationItems-B16qAKiN.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-Dha0gE5m.mjs → AnnotationMenu-DgJSq4fy.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-YuVCBM29.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-CW-BFATW.mjs → Annotations-Cq5fXZrj.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-DuWIPFH3.mjs → Annotations-DYkHWOeR.mjs} +2 -2
- package/dist/web-components/viewer/{Canvas2DBackend-mmhuXqdi.mjs → Canvas2DBackend-DvKFoHuh.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DA6_oiQF.mjs → CaptionDetails-DxTKPbOM.mjs} +1 -1
- package/dist/web-components/viewer/{ChaptersMenu-C2WL8jFt.mjs → ChaptersMenu-BC3qFrhN.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-QB_5keQb.mjs → ChoiceMenu-DXBx-fGv.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-D5a6WYZI.mjs → Collection-CeCEHMv-.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-Di1-LIOg.mjs → Connected-CEraiqd1.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-C1NtY97-.mjs → Connected-DakTdEny.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-BzTwcDZy.mjs → Contents-DOuB3pTB.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-CxmfQ8Cm.mjs → ControlMenu-CBb7ZoP6.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-WJ98Wqju.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-CgQWpBDd.mjs → CountMenu-WadMuI5T.mjs} +1 -1
- package/dist/web-components/viewer/Cue-BF5ZjVa8.mjs +1 -0
- package/dist/web-components/viewer/{Document-DId3Ww6w.mjs → Document-DfRQ7S0l.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-D6T0qkEm.mjs → DomLayers-uwjfbBsp.mjs} +1 -1
- package/dist/web-components/viewer/{Download-Cj4jZnPF.mjs → Download-C1nPhWlq.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-JslI0mKb.mjs → EntryBodies-EWZ8rnB_.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-CHc7jDuf.mjs → EntryThumbnail-BGpml8t4.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-CeO1-KpF.mjs → FieldPill-KWuDZTXX.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-CCXxhEGY.mjs → FrameAnimation-ChvHbIgp.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-CLw13i4w.mjs → Gallery-DAal6sgL.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-XyW874Xa.mjs → GlobeGlyph-ByDERN9z.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-CbduRY6y.mjs → HideToggle-C-gM8Mk8.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-BlpTLXbh.mjs → ImageControls-B2aR8D82.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-D26bb87S.mjs → LanguageChoice-CbcBytbo.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-ECLF6mSI.mjs → LanguageMenu-D_tV0uO9.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-CFvsyP57.mjs → LightboxView-C_Ofd0zk.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-BbZ0cF34.mjs → ListEnd-DN2oUjyx.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-DJ0uaPAX.mjs → MapView-C0qrLqaP.mjs} +2 -2
- package/dist/web-components/viewer/MediaBody-CfnBYVg-.mjs +1 -0
- package/dist/web-components/viewer/{MediaBody-BgBDbfHg.mjs → MediaBody-CnKOjrdE.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-1vpKxZK1.mjs → NavDate-NJcjaWOv.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-CSlUlVI-.mjs → Navigator-DRRodGLA.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-CeqR69iN.mjs → PagerLayout-Dgbs71Hu.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-BibD4mAY.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BBTld3mZ.mjs → PartOfManifest-f8ZMHngG.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-jyu7a0on.mjs → PlaceBox-CamClgeV.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-CedWZbsU.mjs → Placeholder-D7t4rsFp.mjs} +1 -1
- package/dist/web-components/viewer/{Search-D_hveAZH.mjs → Search-CednujgR.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-YIQFWYfI.mjs → SeekMarks-gvJ2UZoh.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-DcLGj-VV.mjs → StandaloneItems-DkquLq5p.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-BLXeVvHo.mjs → Steps-CFmYNpo3.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BNor7HFs.mjs → TargetItems-CfLAMuj8.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-_eA-Dm0M.mjs +1 -0
- package/dist/web-components/viewer/{Transport-DFssphP9.mjs → Transport-5jVVRct0.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-C_pFOBzJ.mjs → Transport-B4K4XAF-.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-BLtyEjru.mjs → annotation-collection-DBuApZiI.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-mRcTA1c1.mjs → annotation-name-C-CMfd6g.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-DBQgx1j7.mjs → annotations-content-D8UWdcFt.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-BF_4X8lm.mjs → cloverEngine-CKfaQ-Wc.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-Bmd-lwNd.mjs → content-state-reader-BvfAdXET.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-aeU6bjg0.mjs → dragToClose-DDJ3XwRu.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D3mfpSBh.mjs → fetchManifest-pVcLruTs.mjs} +1 -1
- package/dist/web-components/viewer/{host-DKJIdeDV.mjs → host-BbYrtAtM.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-CwutsuDL.mjs → image-layers-D0QWXFeZ.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-DUG6BXnh.mjs → image-service-content-ClTuuZ5p.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BUSPRbyE.mjs → link-CE5biAiK.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-D8N9rwQF.mjs → overlayImage-ykHbPvnH.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-D4lx-cRg.mjs → range-regions-DD-NwcwE.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-CFKRycnu.mjs → renderers-N8qGiR4Q.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-D8fcn3qy.mjs → save-file-Bczd1gGN.mjs} +1 -1
- package/dist/web-components/viewer/{search-CXoMviyv.mjs → search--UfJW1mN.mjs} +1 -1
- package/dist/web-components/viewer/{styles-BjjJM8OS.mjs → styles-LW5XsRcK.mjs} +1 -1
- package/dist/web-components/viewer/{useControlsVisibility-nGLR8EFY.mjs → useControlsVisibility-B1Ag1zm_.mjs} +1 -1
- package/dist/web-components/viewer/viewer-DL8dyfj_.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CMfIBDAL.mjs → vtt-U7j7H25c.mjs} +1 -1
- package/dist/web-components/{viewer-FSKFHjRd.mjs → viewer-CkXVnqu5.mjs} +1 -1
- package/dist/web-components/{vtt-COiqtr-4.mjs → vtt-Di31JcWg.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/AnnotationItems-CcK8lOdr.mjs +0 -1
- package/dist/web-components/AnnotationState-idcYZf3N.mjs +0 -1
- package/dist/web-components/Collection-Kwdu1S-6.mjs +0 -1
- package/dist/web-components/Connected-1kdGMIWC.mjs +0 -1
- package/dist/web-components/ControlsFade-BJe8pU1f.mjs +0 -1
- package/dist/web-components/Cue-DKACn0J1.mjs +0 -1
- package/dist/web-components/Document-CPD-9KDe.mjs +0 -1
- package/dist/web-components/FrameAnimation-2B6rRU4W.mjs +0 -1
- package/dist/web-components/Label-DHHchol3.mjs +0 -1
- package/dist/web-components/LoadedCanvas-Bfrvk-Yt.mjs +0 -1
- package/dist/web-components/LoadedMap-BaakosFd.mjs +0 -1
- package/dist/web-components/MapView-D-RJ69f2.mjs +0 -3
- package/dist/web-components/MediaBody-Bh8301OV.mjs +0 -1
- package/dist/web-components/PagerLayout-D10GPTRD.mjs +0 -1
- package/dist/web-components/PanelPart-xW94FuNJ.mjs +0 -1
- package/dist/web-components/Primitives-PRo4k-fb.mjs +0 -1
- package/dist/web-components/Provider-CrpDmnzZ.mjs +0 -1
- package/dist/web-components/Root-DK9ssTa2.mjs +0 -1
- package/dist/web-components/Scene-DYbvcQXW.mjs +0 -1
- package/dist/web-components/StandaloneItems-C2e9PPxg.mjs +0 -1
- package/dist/web-components/Timeline-g0fwghKo.mjs +0 -1
- package/dist/web-components/Transcript-CsQ9bYfS.mjs +0 -1
- package/dist/web-components/image-layers-BCWDCZEA.mjs +0 -1
- package/dist/web-components/items-Bc1JPQjI.mjs +0 -1
- package/dist/web-components/label-CS0CGhZ5.mjs +0 -1
- package/dist/web-components/layout-CdBuqKxn.mjs +0 -1
- package/dist/web-components/logo-CFz7_HVm.mjs +0 -1
- package/dist/web-components/part-cbvAb44O.mjs +0 -1
- package/dist/web-components/readingLanguages-BB0nHlI0.mjs +0 -1
- package/dist/web-components/shared-DJyYaNgB.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-fj1N93ri.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-BVpQ-3q7.mjs +0 -1
- package/dist/web-components/viewer/Cue-DuP2wssL.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-CSzkjuJn.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-BCQo2YZ-.mjs +0 -1
- package/dist/web-components/viewer/Transcript-Crl3zPhV.mjs +0 -1
- package/dist/web-components/viewer/viewer-4EayGlH3.mjs +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r,A as m,y as F,R as ze,a as Ve,a7 as We,aw as Ge,d as ee,a4 as Xe,a5 as Je,b as Qe,ax as et,q as z,T as tt,t as Se,a9 as rt,l as ot,v as nt,aa as at}from"./shared-DJyYaNgB.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--iHWeLVV.mjs";import{s as yt,a as xt,h as kt,t as Ot,z as Lt,b as Ct}from"./models-CObUKgMl.mjs";import{B as Rt}from"./BodyAlert-CpsyVtYl.mjs";import{I as It}from"./glyphs-3j_wsdG0.mjs";import{u as St}from"./useControlsVisibility-K1HUKs93.mjs";import{u as Mt}from"./useNearViewport-DpYbV4NQ.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-DqfkGSl5.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-CAs5NitM.mjs";import{L as Kt}from"./Loading-27_CRfmr.mjs";import{S as A,f as Bt}from"./Tip-ByWHicZ5.mjs";import{u as Me}from"./useContainerName-jjktq7OB.mjs";import{e as Ht}from"./engines-DdvyIGhW.mjs";import"./styles-Cm1KSkd5.mjs";import{a as Ut}from"./index-CjNkvvfl.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,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-Cqxks7jF.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-DsqyiOIC.mjs";import{s as yt,a as xt,h as kt,t as Ot,z as Lt,b as Ct}from"./models-BXBEOLKe.mjs";import{B as Rt}from"./BodyAlert-COFJjxVV.mjs";import{I as It}from"./glyphs-PlEEwLrB.mjs";import{u as St}from"./useControlsVisibility-CIjHTnaa.mjs";import{u as Mt}from"./useNearViewport-B5E-oZb_.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-CgTdpmNf.mjs";import{d as zt,Z as Tt,a as Dt,b as Nt,c as $t}from"./controlGlyphs-BI3qUN6D.mjs";import{L as Kt}from"./Loading-DGPqbYw2.mjs";import{S as A,f as Bt}from"./Tip-DxvfQm-l.mjs";import{u as Me}from"./useContainerName-D_XCWIWP.mjs";import{e as Ht}from"./engines-BnPu5Ggs.mjs";import"./styles-C9QeBpjd.mjs";import{a as Ut}from"./index-BjpZQ9J-.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 +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,N 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-Cqxks7jF.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-BT3WtluQ.mjs";import{F as ge}from"./FieldPill-Swznzuhd.mjs";import"./styles-C9QeBpjd.mjs";const O=40,xe=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:O}),A=z.set===t.set?z.count:O,N=()=>X({set:t.set,count:A+O}),E=d(null),F=i?t.hits.findIndex(e=>e.entryIds.includes(i)):-1,x=typeof IntersectionObserver<"u",u=x?Math.min(t.hits.length,Math.max(A,F+1)):t.hits.length,M=d(N);if(M.current=N,h(()=>{const e=E.current;if(!e||!x||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()},[x,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),C=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(C.text?C.lang:void 0),children:C.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&&N()},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{xe 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-Cqxks7jF.mjs";import{a as he}from"./heading-Cjt0f-Eu.mjs";import{T as ge}from"./Tip-DxvfQm-l.mjs";import{u as me}from"./useContainerName-D_XCWIWP.mjs";import{u as be}from"./useScrollTrack-C2xSfGF6.mjs";import{C as ye}from"./Chevron-DVax9RTn.mjs";import"./styles-C9QeBpjd.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,am as q,l as P,k as _}from"./shared-Cqxks7jF.mjs";import{b as z}from"./Transport-hORVpyCc.mjs";import{S as Y}from"./Steps-Cw27EFcs.mjs";import{h as j}from"./Tip-DxvfQm-l.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 b,A as D,y as L,aI as P,T as V,a7 as k,u as O,a1 as F}from"./shared-Cqxks7jF.mjs";import{s as M,P as R,a as T}from"./Items-CbO0GqAH.mjs";import{b as j}from"./items-BwKkJEOS.mjs";function E({iiifContent:a,items:e,navigation:w,onSelect:r,request:i,header:x=true,forwardedRef:g,...u}){var p;const[s,A]=b(null),[f,c]=b(0),I=typeof a=="string"?a:a==null?void 0:a.id,m=D({iiifContent:a,request:i});m.current={iiifContent:a,request:i},L(()=>{if(e||m.current.iiifContent===void 0)return;const t=new AbortController;return P(m.current.iiifContent,{request:m.current.request,signal:t.signal}).then(o=>{t.signal.aborted||A(o)}).catch(()=>{}),()=>t.abort()},[I,e]);const n=V(()=>j(e||s),[e,s]);if(!n.length)return null;const h=!e&&(s==null?void 0:s.type)==="Manifest",d=k(s==null?void 0:s.viewingDirection),y=w??(h?"id":"homepage");if(u.layout==="pager")return O(R,{...u,forwardedRef:g,steps:M(n,f,d,(t,o)=>{r==null||r(t,o),c(n.indexOf(t))})});const l=(p=s==null?void 0:s.homepage)==null?void 0:p[0],v=l==null?void 0:l.id;return O(T,{...u,forwardedRef:g,items:n,selected:y==="id"?f:-1,navigation:y,rtl:d==="right-to-left",request:i,showSummary:!h,heading:x&&s?{label:s.label,summary:s.summary,homepage:v,homepageLang:F(l)}:void 0,onActivate:(t,o)=>{r==null||r(t,o),c(n.indexOf(t))},followFocus:t=>c(n.indexOf(t))})}export{E 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-Cqxks7jF.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{b as f}from"./hooks--n9dMuHb.mjs";import{L as h}from"./Loading-DGPqbYw2.mjs";function b({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{b 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-Cqxks7jF.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-DxvfQm-l.mjs";import"./styles-C9QeBpjd.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,ai as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-Cqxks7jF.mjs";import{s as w,P as M,a as C}from"./Items-CbO0GqAH.mjs";import{C as P}from"./CountMenu--Z7rGivu.mjs";import{f as S,r as N}from"./fetchManifest-BKGaZzDw.mjs";import{S as q}from"./Steps-Cw27EFcs.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-C9QeBpjd.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=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(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 B(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{S as f,u as a,z as l,P as r}from"./shared-Cqxks7jF.mjs";import{C as m}from"./CanvasView-uvJ5kDYN.mjs";import{p as t}from"./playerSurface-PBbBGoj5.mjs";import{C as s}from"./Pending-DI4VIePO.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-Cr4h-tHh.mjs")),v=l(()=>import("./LoadedCanvas-juLvz5vu.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-Cqxks7jF.mjs";import"./styles-C9QeBpjd.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as Ie,a as Me,e as $e,c as we,n as Re,T as j,d as T,G as Se,y as f,O as Ee,C as Ae,A as O,b as Pe,u as n,t as ze,k as ue,l as $,v as Fe,$ as Ge,E as Ve}from"./shared-Cqxks7jF.mjs";import{c as de,a as ge}from"./layout-DbMbjpx4.mjs";import{l as He,a as Ke,p as je,b as qe,c as De}from"./vtt-Di31JcWg.mjs";import{j as Ue}from"./classnames-DukgfdpI.mjs";import{u as Xe,c as Be}from"./readingLanguages-BY2NUfQE.mjs";import{G as Je}from"./GlobeGlyph-D_ZaGUO8.mjs";import{b as pe,s as Qe}from"./bringIntoView-CQH5ZgMM.mjs";import{C as We}from"./Cue-BzhK_KTz.mjs";import{F as Ye}from"./FieldPill-Swznzuhd.mjs";import{l as Ze}from"./languageCode-cCpiU0b0.mjs";import{a as _e}from"./Sections-BT3WtluQ.mjs";import{T as et}from"./Tip-DxvfQm-l.mjs";import{u as tt}from"./useContainerName-D_XCWIWP.mjs";import"./styles-C9QeBpjd.mjs";const q=40,D=r=>r.toLocaleLowerCase();function nt(r,l){if(!l)return r;const h=D(r),m=[];let c=0;for(let g=h.indexOf(l);g>=0;g=h.indexOf(l,g+l.length))g>c&&m.push(r.slice(c,g)),m.push(n("mark",{children:r.slice(g,g+l.length)},g)),c=g+l.length;return c<r.length&&m.push(r.slice(c)),m}const w=r=>r.read==="cues"&&r.kind!=="transcript",Ct=Ie(function({as:l="div",follow:h=true,find:m=true,sticky:c=false,size:g="large",className:me,...fe},he){const{t:U,langOf:X}=Me(),{clover:i,language:R}=$e("Transcript"),x=we(e=>Re(e.manifest,e.canvasId)).find(e=>de(e).length>0||ge(e).length>0),a=j(()=>x?[...de(x).map(e=>({...e,read:"cues"})),...ge(x).map(e=>({...e,read:"text"}))]:[],[x]),[B,S]=T(0),u=a[B]??a[0],v=Xe(),E=j(()=>{const e=(v==null?void 0:v.chosen)??R;if(e)return e;const t=a.flatMap(s=>s.language&&s.language!=="none"?[s.language]:[]);return t.length>1?Se(t):void 0},[v==null?void 0:v.chosen,R,a]);f(()=>{if(!E)return;const e=a.findIndex(s=>s.language&&s.language!=="none"&&Ee(s.language,E));if(e<0)return;S(e);const t=a[e];w(t)&&i.captions.get()!==t.id&&i.captions.emit(t.id)},[E,a,i]),f(()=>{const e=t=>{const s=a.findIndex(d=>w(d)&&d.id===t);s>=0&&S(s)};return e(i.captions.get()),i.captions.subscribe(e)},[i,a]);const[o,J]=T([]),[ve,Q]=T([]);f(()=>{if(J([]),Q([]),!u)return;let e=true;return(u.read==="cues"?He(u.id,i.request).then(t=>e&&J(je(t))):Ke(u.id,i.request).then(t=>e&&Q(qe(t)))).catch(()=>{}),()=>{e=false}},[u,i]);const b=Ae(i.media.subscribe,i.media.get,i.media.get),k=st(b,o),A=O(null);f(()=>{var t;if(!h||k<0||!b||b.paused)return;const e=(t=A.current)==null?void 0:t.children[k];e&&pe(e,"nearest")},[k,h,b]);const[W,Y]=T(""),p=D(W.trim()),C=j(()=>p?o.flatMap((e,t)=>D(e.text).includes(p)?[t]:[]):[],[o,p]),[P,be]=T({query:"",at:0}),y=P.query===p?P.at:0,z=O(null),F=O(false),[Z,Ce]=T({cues:[],count:q}),_=Z.cues===o?Z.count:q,G=()=>Ce({cues:o,count:_+q}),ee=O(G);ee.current=G;const V=typeof IntersectionObserver<"u",N=V?Math.min(o.length,Math.max(_,k+1,(C[y]??-1)+1)):o.length,te=O(null);f(()=>{const e=te.current;if(!e||!V||N>=o.length)return;const t=new IntersectionObserver(s=>{s.some(d=>d.isIntersecting)&&ee.current()},{root:Qe(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,o.length]);const I=C[y];f(()=>{var t;if(I===void 0)return;const e=(t=A.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),F.current=false},[I,p]);const Te=o.length>0;f(()=>{var d;const e=(d=z.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 s=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return s.observe(e),()=>{s.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[c,Te,m]);const H=Pe(),ne=_e(),se=a.every(w)?"playerCaptions":"transcriptLabel",re=tt(U(se),X(se));if(!x||!u)return null;const xe=a.filter(e=>e.read==="text").length,ae=a.map(e=>{const t=Ze(e.language);return e.read==="cues"?t:xe>1&&t?`TXT ${t}`:"TXT"}),ye=ae.map(e=>e&&ae.filter(t=>t===e).length===1?e:void 0),ce=u.language&&u.language!=="none"?u.language:void 0,oe=a.some(e=>e.read==="text"),Ne=Be(v,a.map(e=>e.language)),K=a.length>1&&(oe||!Ne)&&n(ue,{children:[re.node,n("fieldset",{...re.props,className:"clover-transcript-languages",children:[!oe&&n("span",{className:"clover-languages-glyph","aria-hidden":"true",children:n(Je,{})}),a.map((e,t)=>{const s=ze(e.label,R),d=ye[t],Oe=s.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),w(e)&&i.captions.emit(e.id)}}),d&&n(ue,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Fe:void 0,...$(s.text?s.lang:void 0),children:Oe}),d&&s.text&&n(et,{label:s.text,lang:s.lang})]},e.id)})]})]}),ie=(e,t=true)=>{if(b){t?Ve(b,e.start):b.currentTime=e.start;return}i.goTo(x.id,{time:e.start,...t&&{autoplay:true}})},le=e=>{const t=o[C[e]];t&&(F.current=true,be({query:p,at:e}),ie(t,false))},ke={position:C.length?y:-1,total:C.length,step:e=>le(y+e)},L=C.length,M=p?L===0?"contentSearchResultsNone":L===1?"contentSearchResult":"contentSearchResults":null,Le=m&&u.read==="cues"&&o.length>0&&n("div",{className:"clover-transcript-find",children:[n(Ye,{ref:z,id:`${H}-find`,value:W,onChange:Y,onSubmit:()=>{if(!L)return;const e=P.query===p&&F.current;le(e?(y+1)%L:y)},onClear:()=>{var e;Y(""),(e=z.current)==null||e.focus()},results:p?ke:null,size:g,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...$(M?X(M):void 0),children:M?U(M,{count:L}):""})]});return n(l,{ref:he,className:Ue("clover-transcript",me),"data-sticky":c||void 0,...fe,children:[K&&(ne?Ge(K,ne):K),Le,u.read==="text"?n("div",{className:"clover-transcript-body",...$(ce),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:A,className:"clover-transcript-cues",id:`${H}-cues`,...$(ce),children:o.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===k?"true":void 0,"data-match":p&&C.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ie(e),onFocus:()=>{N<o.length&&t>=N-5&&G()},children:[n(We,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),nt(e.text,p)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<o.length&&n("div",{ref:te,className:"clover-transcript-more","aria-hidden":"true"})]})});function st(r,l){const[h,m]=T(-1);return f(()=>{if(!r||!l.length){m(-1);return}const c=()=>m(De(l,r.currentTime));return c(),r.addEventListener("timeupdate",c),r.addEventListener("seeked",c),()=>{r.removeEventListener("timeupdate",c),r.removeEventListener("seeked",c)}},[r,l]),h}export{Ct 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,am as B,l as w,v as ie,ag as Fe,y as Ie,k as de}from"./shared-Cqxks7jF.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-hORVpyCc.mjs";import{imageSource as qe}from"./thumbnail-Ckf6EotT.mjs";import{u as Xe,P as Ze,E as Ge}from"./EntryThumbnail-iY1cnsAP.mjs";import{j as He}from"./classnames-DukgfdpI.mjs";import{l as me}from"./languageCode-cCpiU0b0.mjs";import{T as ge,S as ve}from"./Tip-DxvfQm-l.mjs";import{u as Je}from"./useContainerName-D_XCWIWP.mjs";import{u as Qe,t as We}from"./pointer-DsqyiOIC.mjs";import"./styles-C9QeBpjd.mjs";const Ye=Pe(()=>import("./SeekMarks-DazilTox.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=>me(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 m=new ResizeObserver(S);return m.observe(t),m.observe(o),m.observe(a),()=>m.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=me(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:m,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),v=K?U:Q?E:-1,Y=(K||Q)&&t>0,he=Xe(nn(c[v]),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&&v>=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)}},[v]);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=m?"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(v>=0?D(v).left+D(v).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[v])==null?void 0:se.label)??"",lang:(oe=c[v])==null?void 0:oe.lang,image:v>=0?he:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(L,{words:ke,button:s?"play":"pause",shortcut:ve.play,onClick:i.toggle,buttonRef:ae,children:s?e(Ve,{}):e(xe,{})}),e(L,{words:Te,button:"mute",shortcut:ve.mute,onClick:i.toggleMute,children:m||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":`${(m?0:A)*100}%`},type:"range",value:m?0:A,"aria-valuetext":`${Math.round((m?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-DJyYaNgB.mjs";import{T as x}from"./Tip-ByWHicZ5.mjs";import{b as f,c as k}from"./controlGlyphs-CAs5NitM.mjs";import{a as y}from"./index-CjNkvvfl.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-Cqxks7jF.mjs";import{T as x}from"./Tip-DxvfQm-l.mjs";import{b as f,c as k}from"./controlGlyphs-BI3qUN6D.mjs";import{a as y}from"./index-BjpZQ9J-.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{U as l,aD as g,aB as u,aE as y,aC as f}from"./shared-Cqxks7jF.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,X as p}from"./shared-Cqxks7jF.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-C0p3XB-1.mjs → annotations-content-B6PtnG5P.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadAnnotationSets as f}from"./annotation-collection-
|
|
1
|
+
import{loadAnnotationSets as f}from"./annotation-collection-y13MLLGX.mjs";import{H as i,aF as l,av as c}from"./shared-Cqxks7jF.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-Cqxks7jF.mjs";import{B as h}from"./Body-h5ykt3jO.mjs";import{u as y,P as L}from"./nodes-BWN5jzoG.mjs";import{Toggle as b}from"./toggle-DAC1XODI.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-Cqxks7jF.mjs";import{C as b}from"./CanvasView-uvJ5kDYN.mjs";import{r as s}from"./rendererSurface-AGFetq7k.mjs";import{C as i}from"./Pending-DI4VIePO.mjs";const h=c(()=>import("./Connected-CGF0cSzv.mjs")),B=c(()=>import("./LoadedCanvas-juLvz5vu.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 g({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{g as CanvasElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ne,F as ae,i as se,M as ie}from"./models-
|
|
1
|
+
import{c as ne,F as ae,i as se,M as ie}from"./models-BXBEOLKe.mjs";import{ay as ce,a4 as ue}from"./shared-Cqxks7jF.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
|
|
2
2
|
layout(location = 0) in vec3 aPosition;
|
|
3
3
|
layout(location = 1) in vec3 aNormal;
|
|
4
4
|
layout(location = 2) in vec2 aUv;
|
package/dist/web-components/{content-state-reader-DYl2djp5.mjs → content-state-reader-CY-uQUXA.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{U as l,ad as g}from"./shared-Cqxks7jF.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),o=atob(n);try{return decodeURIComponent(o)}catch{const a=Uint8Array.from(o,s=>s.charCodeAt(0));return new TextDecoder().decode(a)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const o=n();if(o&&typeof o=="object")return o}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function h(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const o=typeof t.id=="string"?t.id:"content-state",a=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${o}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return a.length>1?{...n,targets:{id:o,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:a}}:n}function m(t,e){const n=g(t),o=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,a=o.type;if(a==="Manifest"||a==="Collection"){const c=a==="Manifest"?u(o):void 0;return c?{id:c.id,type:"Collection",manifestId:n.id}:{id:n.id,type:a}}const s=l(t.selector).find(c=>(c==null?void 0:c.type)==="PointSelector"&&c.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=l(o.partOf).find(c=>(c==null?void 0:c.id)&&(!c.type||c.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:a??"Canvas",target:d,...f}}export{I as decodeContentState,h as resolveContentState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as t,k as o}from"./shared-
|
|
1
|
+
import{u as t,k as o}from"./shared-Cqxks7jF.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),l=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),d=()=>t("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),h=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),t("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-
|
|
1
|
+
import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-Cqxks7jF.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as i,c as f,n as d,
|
|
1
|
+
import{e as i,c as f,n as d,U as u,t as g,a1 as h}from"./shared-Cqxks7jF.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
|