@nulib/clover 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Body/Body.mjs +16 -1
- package/dist/components/Body/glyphs.mjs +15 -0
- package/dist/components/Body/useControlsVisibility.mjs +35 -13
- package/dist/components/Canvas/CanvasView.mjs +116 -12
- package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
- package/dist/components/Canvas/ControlMenu.mjs +23 -4
- package/dist/components/Canvas/Controls.mjs +223 -60
- package/dist/components/Canvas/ControlsFade.mjs +16 -0
- package/dist/components/Canvas/ImageControls.mjs +209 -0
- package/dist/components/Canvas/Placeholder.mjs +44 -12
- package/dist/components/Canvas/RowFits.mjs +85 -0
- package/dist/components/Canvas/layout.mjs +11 -0
- package/dist/components/Canvas/media/MediaBody.mjs +105 -46
- package/dist/components/Canvas/media/Player.mjs +0 -55
- package/dist/components/Canvas/media/Transport.mjs +14 -23
- package/dist/components/Canvas/panClearOfControls.mjs +1 -1
- package/dist/components/Collection/Collection.mjs +1 -1
- package/dist/components/Items/CountMenu.mjs +1 -0
- package/dist/components/Items/Item.mjs +4 -3
- package/dist/components/Items/Items.mjs +30 -10
- package/dist/components/Items/PagerLayout.mjs +2 -0
- package/dist/components/Items/TargetItems.mjs +1 -1
- package/dist/components/Items/masonry.mjs +35 -0
- package/dist/components/Panel/About.mjs +25 -8
- package/dist/components/Panel/Panel.mjs +47 -59
- package/dist/components/Panel/sections.mjs +62 -0
- package/dist/components/Root/useRootState.mjs +2 -49
- package/dist/components/Scene/SceneView.mjs +13 -2
- package/dist/components/Scene/cloverEngine.mjs +2 -1
- package/dist/components/Timeline/playerSurface.mjs +2 -0
- package/dist/core/clover.mjs +7 -4
- package/dist/core/content-state.mjs +5 -3
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/index.d.mts +178 -56
- package/dist/index.mjs +2 -0
- package/dist/lib/gltf/load.mjs +26 -6
- package/dist/lib/pointer.mjs +1 -1
- package/dist/lib/renderer/CanvasRenderer.mjs +44 -32
- package/dist/lib/renderer/camera/Camera.mjs +1 -1
- package/dist/react/useContentStateOutput.mjs +71 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +42 -128
- package/dist/templates/document/Document.mjs +51 -65
- package/dist/templates/document/Sheets.mjs +13 -5
- package/dist/templates/gallery/Gallery.mjs +94 -18
- package/dist/templates/index.d.mts +364 -17
- package/dist/templates/shared/Lightbox.mjs +161 -69
- package/dist/templates/shared/LightboxView.mjs +123 -0
- package/dist/templates/shared/PanelPane.mjs +116 -0
- package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
- package/dist/templates/shared/dragToClose.mjs +51 -8
- package/dist/templates/shared/givenAnnotations.mjs +13 -0
- package/dist/templates/shared/useDragToClose.mjs +6 -3
- package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
- package/dist/templates/shared/useSlide.mjs +6 -0
- package/dist/templates.css +1 -1
- package/dist/ui/ControlCluster.mjs +15 -17
- package/dist/ui/Sections.mjs +3 -3
- package/dist/ui/mediaIcons.mjs +35 -8
- package/dist/ui/useScrollTrack.mjs +2 -1
- package/dist/web-components/About-D1TBGGPL.mjs +1 -0
- package/dist/web-components/AnnotationItems-DTacmRA9.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-BCwwwfbb.mjs → AnnotationMenu-DYc9ekWS.mjs} +1 -1
- package/dist/web-components/{AnnotationState-CavxnAAq.mjs → AnnotationState--5ghW0C2.mjs} +1 -1
- package/dist/web-components/{Annotations-rBmeI5sR.mjs → Annotations-BG8lPjk1.mjs} +1 -1
- package/dist/web-components/{Annotations-DDjSrBL5.mjs → Annotations-Bvc_FmJ5.mjs} +1 -1
- package/dist/web-components/Body-QQ1DmnbP.mjs +1 -0
- package/dist/web-components/{BodyAlert-COKp19lq.mjs → BodyAlert-A4xRjOKr.mjs} +1 -1
- package/dist/web-components/{Button-DLFYqtz9.mjs → Button-Cx6VE_UW.mjs} +1 -1
- package/dist/web-components/{Camera-Cp5ma-6C.mjs → Camera-DqT_1MgD.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-3PToh87Z.mjs → Canvas2DBackend-TZtR3zHf.mjs} +1 -1
- package/dist/web-components/CanvasView-DxZASM9E.mjs +2 -0
- package/dist/web-components/CaptionDetails-DMRWmtaY.mjs +1 -0
- package/dist/web-components/ChaptersMenu-BAZVVDrK.mjs +1 -0
- package/dist/web-components/{Chevron-r-_hUPn8.mjs → Chevron-DFGbSGPI.mjs} +1 -1
- package/dist/web-components/ChoiceMenu-C80kdxvq.mjs +1 -0
- package/dist/web-components/Collection-B4CxBsFL.mjs +1 -0
- package/dist/web-components/{CollectionSelect-CBWUbqQi.mjs → CollectionSelect-DO8YO2p7.mjs} +1 -1
- package/dist/web-components/{Connected-BnpxYeJN.mjs → Connected-CcbVqzmj.mjs} +1 -1
- package/dist/web-components/{Connected-B2d6EoFl.mjs → Connected-DthCPaHl.mjs} +1 -1
- package/dist/web-components/{Connected-BSRM9FJY.mjs → Connected-sYBn_9MK.mjs} +1 -1
- package/dist/web-components/{Contents-D7FPxSH-.mjs → Contents-AVPYYXht.mjs} +1 -1
- package/dist/web-components/ControlMenu-BjJsWnuZ.mjs +1 -0
- package/dist/web-components/ControlsFade-C-6WhSxB.mjs +1 -0
- package/dist/web-components/{CountMenu-DyTp_J4k.mjs → CountMenu-Dx8D_RJZ.mjs} +1 -1
- package/dist/web-components/Cue-xuo5dgKE.mjs +1 -0
- package/dist/web-components/Document-BWdafeEi.mjs +1 -0
- package/dist/web-components/{DomLayers-CTGub6wo.mjs → DomLayers-DlRapZ1u.mjs} +1 -1
- package/dist/web-components/{Download-BOYNIb7C.mjs → Download-Ci_JUTVd.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bfd2Z42z.mjs → EntryBodies-C0ICfS2R.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-DQE8ajI9.mjs → EntryThumbnail-DxHhfRo_.mjs} +1 -1
- package/dist/web-components/{FieldPill-D5DNJWLy.mjs → FieldPill-CVfeeafm.mjs} +1 -1
- package/dist/web-components/FrameAnimation-AZpVvu0R.mjs +1 -0
- package/dist/web-components/Gallery-C2PTJmvN.mjs +1 -0
- package/dist/web-components/{HideToggle-DL911R1Z.mjs → HideToggle-0nlIo-f8.mjs} +1 -1
- package/dist/web-components/ImageControls-tKVAMpaj.mjs +1 -0
- package/dist/web-components/Items-Drd82_Jj.mjs +1 -0
- package/dist/web-components/Label-BIjqJ-_T.mjs +1 -0
- package/dist/web-components/{LanguageChoice-DT1UPiDn.mjs → LanguageChoice-DkSc-n6g.mjs} +1 -1
- package/dist/web-components/LightboxView-Cuqx2H1m.mjs +1 -0
- package/dist/web-components/ListEnd-pq-BgaDI.mjs +1 -0
- package/dist/web-components/{Loaded-BWfEBJyg.mjs → Loaded-CSO5NFhm.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-DK6xMmM1.mjs +1 -0
- package/dist/web-components/LoadedMap-DmPH-LKY.mjs +1 -0
- package/dist/web-components/{Loading-zw74TdAz.mjs → Loading-CoJLSRkv.mjs} +1 -1
- package/dist/web-components/{Map--dJhk0_0.mjs → Map-BEVtD52O.mjs} +1 -1
- package/dist/web-components/MapView-DHJcn9gW.mjs +3 -0
- package/dist/web-components/Markup-Hm6bWOjm.mjs +2 -0
- package/dist/web-components/MediaBody-BpgNtpKZ.mjs +1 -0
- package/dist/web-components/MediaBody-Co23JjUJ.mjs +1 -0
- package/dist/web-components/{NavDate-BQHuyLOC.mjs → NavDate-CYNK0Qmp.mjs} +1 -1
- package/dist/web-components/{Navigator-B3U21_ti.mjs → Navigator-DrYPepzN.mjs} +1 -1
- package/dist/web-components/{Pager-DnJknq92.mjs → Pager-CN4lHURv.mjs} +1 -1
- package/dist/web-components/PagerLayout-DeqnSQcF.mjs +1 -0
- package/dist/web-components/Panel-CFYUlXup.mjs +1 -0
- package/dist/web-components/PanelPart-CpUIRbxr.mjs +1 -0
- package/dist/web-components/{PanelToggle-CFtWIeWv.mjs → PanelToggle-9ud55NNI.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-F87jIrf9.mjs → PartOfManifest-KUHUq-6q.mjs} +1 -1
- package/dist/web-components/{Pending-CYAQajKu.mjs → Pending-mcmdyZPA.mjs} +1 -1
- package/dist/web-components/PlaceBox-DX4ZLDat.mjs +1 -0
- package/dist/web-components/Placeholder-0hE8q-SY.mjs +1 -0
- package/dist/web-components/{Position-BkWBRBfW.mjs → Position-DO5qg5Sp.mjs} +1 -1
- package/dist/web-components/{Primitives-BmODPlnK.mjs → Primitives-c9sIz0oQ.mjs} +1 -1
- package/dist/web-components/Provider-a3xY016W.mjs +1 -0
- package/dist/web-components/{ReadMore-BwGFsLS2.mjs → ReadMore-D_WmmKEP.mjs} +1 -1
- package/dist/web-components/Root-CU1o0wje.mjs +1 -0
- package/dist/web-components/Scene-CboEeptc.mjs +1 -0
- package/dist/web-components/SceneView-hcc78jQT.mjs +1 -0
- package/dist/web-components/{Search-CbmK9vLp.mjs → Search-BgxEW1UT.mjs} +1 -1
- package/dist/web-components/{Sections-Dy5_pkyQ.mjs → Sections-DZVrhoAC.mjs} +2 -2
- package/dist/web-components/{StandaloneItems-BmUnBp0H.mjs → StandaloneItems-6cSw7nbF.mjs} +1 -1
- package/dist/web-components/{Status-Dww3Pyf4.mjs → Status-DHTzuTkh.mjs} +1 -1
- package/dist/web-components/{Steps-o_UprQfZ.mjs → Steps-Dkpy9KiJ.mjs} +1 -1
- package/dist/web-components/{TargetItems-BBOGDubv.mjs → TargetItems-CyOI9_Z4.mjs} +1 -1
- package/dist/web-components/Timeline-B9tD3Rar.mjs +1 -0
- package/dist/web-components/{Tip-BbexILXs.mjs → Tip-nJSTYquc.mjs} +1 -1
- package/dist/web-components/{Transcript-ZVXM3ZDA.mjs → Transcript-WvFFAJQM.mjs} +1 -1
- package/dist/web-components/Transport-FxLp_bdW.mjs +1 -0
- package/dist/web-components/Transport-VUxSEIQO.mjs +1 -0
- package/dist/web-components/{annotation-collection-7SS1ELcO.mjs → annotation-collection-BkC3nBPA.mjs} +1 -1
- package/dist/web-components/{annotation-name-CYkZopdd.mjs → annotation-name-Du2KAWoD.mjs} +1 -1
- package/dist/web-components/{annotations-content-Bdtn50sf.mjs → annotations-content-CEzAS-P2.mjs} +1 -1
- package/dist/web-components/{body-CkOBHlJ0.mjs → body-DPlfbLt3.mjs} +1 -1
- package/dist/web-components/canvas-BUwBftJW.mjs +1 -0
- package/dist/web-components/cloverEngine-UNw5K4Xg.mjs +164 -0
- package/dist/web-components/{content-state-reader-Ahh6artg.mjs → content-state-reader-GgQF2MvJ.mjs} +1 -1
- package/dist/web-components/{controls-BJrZVQkS.mjs → controls-CC9G5LxK.mjs} +1 -1
- package/dist/web-components/custom-elements.json +191 -45
- package/dist/web-components/{downloads-CqVWo-yn.mjs → downloads-CmAYeEIz.mjs} +1 -1
- package/dist/web-components/dragToClose-DK-eM097.mjs +1 -0
- package/dist/web-components/{engine-B-sscpLa.mjs → engine-Dok0z8WP.mjs} +1 -1
- package/dist/web-components/{engines-DfCHjbt3.mjs → engines-BD2IfwQF.mjs} +1 -1
- package/dist/web-components/es-B1NvdYp-.mjs +1 -0
- package/dist/web-components/{fetchManifest-BIzne1Pj.mjs → fetchManifest-tQXcfFiz.mjs} +1 -1
- package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
- package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
- package/dist/web-components/fromManifest-BwQdeAuL.mjs +1 -0
- package/dist/web-components/glyphs-dp_HK3Ja.mjs +1 -0
- package/dist/web-components/hooks-C4dJ5K_D.mjs +1 -0
- package/dist/web-components/image-layers-xcBsiad9.mjs +1 -0
- package/dist/web-components/{imageService-0eTvQ-3h.mjs → imageService-4sFnmAFX.mjs} +1 -1
- package/dist/web-components/index-DspT4wUm.mjs +1 -0
- package/dist/web-components/index.d.mts +5 -5
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BUmOy2QY.mjs +1 -0
- package/dist/web-components/items-CWMI53aN.mjs +1 -0
- package/dist/web-components/label-BGjL7I4b.mjs +1 -0
- package/dist/web-components/layout-B29v2RKK.mjs +1 -0
- package/dist/web-components/{link-GEdiEwlR.mjs → link-Ct5PpHEY.mjs} +1 -1
- package/dist/web-components/logo-BFstM-0a.mjs +1 -0
- package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
- package/dist/web-components/{models-59cEeiAA.mjs → models-BXcT4ijX.mjs} +1 -1
- package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
- package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
- package/dist/web-components/no-CEwZDBiR.mjs +1 -0
- package/dist/web-components/{nodes-CTw9OqlA.mjs → nodes-BleXuYE6.mjs} +1 -1
- package/dist/web-components/{overlayImage-BMt4UTlR.mjs → overlayImage-BJtfot4Y.mjs} +1 -1
- package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
- package/dist/web-components/{panel-C17Rl9Ya.mjs → panel-BxxV_JkD.mjs} +1 -1
- package/dist/web-components/part-D4gjnYmT.mjs +1 -0
- package/dist/web-components/playerSurface-BXNLaFk0.mjs +1 -0
- package/dist/web-components/pointer-CJELU3gI.mjs +1 -0
- package/dist/web-components/{provider-BpxorEiq.mjs → provider-CPp0Sgr_.mjs} +1 -1
- package/dist/web-components/pt-CWR30SzS.mjs +1 -0
- package/dist/web-components/{range-regions-BGQy4E9U.mjs → range-regions-DAaOu0IS.mjs} +1 -1
- package/dist/web-components/{read-more-BDM_6CVc.mjs → read-more-lcqGslUd.mjs} +1 -1
- package/dist/web-components/readingLanguages-FyVsSWJ8.mjs +1 -0
- package/dist/web-components/rendererSurface-nh6-EfuZ.mjs +22 -0
- package/dist/web-components/{renderers-CiB74bQh.mjs → renderers-BFS7hFVU.mjs} +1 -1
- package/dist/web-components/{resource-CRbpf9pX.mjs → resource-Bufu7lAr.mjs} +1 -1
- package/dist/web-components/{save-file-CCuZEuQr.mjs → save-file-CoknKOPz.mjs} +1 -1
- package/dist/web-components/search-5ocrsYmT.mjs +1 -0
- package/dist/web-components/shared-DFAX0n3B.mjs +1 -0
- package/dist/web-components/{show-link-BXm7SNIC.mjs → show-link-DBaJj4s_.mjs} +1 -1
- package/dist/web-components/{sizedImage-k4Q-eyOB.mjs → sizedImage-jnOGcIIZ.mjs} +1 -1
- package/dist/web-components/{split-Hp6z-v4h.mjs → split-P6J0qqf5.mjs} +1 -1
- package/dist/web-components/{status-BmtuKfAG.mjs → status-honoOMNx.mjs} +1 -1
- package/dist/web-components/styles-BwkYiCLC.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-Dp7a8oom.mjs → thumbnail-EbURh-UM.mjs} +1 -1
- package/dist/web-components/{tip-C-oovDZK.mjs → tip-BhNI83aT.mjs} +1 -1
- package/dist/web-components/{toggle-C7ODWDEZ.mjs → toggle-CJKdi5KH.mjs} +1 -1
- package/dist/web-components/{useContainerName-CrOmY-km.mjs → useContainerName-_48Cdi0m.mjs} +1 -1
- package/dist/web-components/useControlsVisibility-CieBxGnK.mjs +1 -0
- package/dist/web-components/useLazyPanelPane-Da3kJiOt.mjs +1 -0
- package/dist/web-components/{useNearViewport-BqXi9Gn4.mjs → useNearViewport-B34ebmIW.mjs} +1 -1
- package/dist/web-components/useScrollTrack-DgRGFeP5.mjs +1 -0
- package/dist/web-components/viewer/AnnotationItems-BNA_92Dv.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationMenu-DPOSehBo.mjs → AnnotationMenu-BIQYVR4N.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-BbwQqA1U.mjs +1 -0
- package/dist/web-components/viewer/Annotations-CZzOZAFP.mjs +2 -0
- package/dist/web-components/viewer/Annotations-P4XzAlNc.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-BTK6ZJh0.mjs → Canvas2DBackend-DFfCzyjL.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-DPtE-RQQ.mjs +1 -0
- package/dist/web-components/viewer/ChaptersMenu-D6Jmujag.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-DQ1x572Y.mjs → ChoiceMenu-GkqyTQRQ.mjs} +1 -1
- package/dist/web-components/viewer/Collection-DjY_6qa6.mjs +1 -0
- package/dist/web-components/viewer/Connected-D5T-mtiy.mjs +1 -0
- package/dist/web-components/viewer/Connected-DIOuI3Mv.mjs +1 -0
- package/dist/web-components/viewer/Contents-DV-VxXuf.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-BsEpff6N.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BowtN96W.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-4u6U6yqb.mjs → CountMenu-DCmA6HdK.mjs} +1 -1
- package/dist/web-components/viewer/Cue-BjbVzrpl.mjs +1 -0
- package/dist/web-components/viewer/Document-4ZQd3W3o.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-CGkDtemL.mjs → DomLayers-BCwCxPDU.mjs} +1 -1
- package/dist/web-components/viewer/Download-CL4IClAD.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-e40y47bl.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-B_dP3w4o.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-DFXGWrvB.mjs → FieldPill-Hse1cDBE.mjs} +1 -1
- package/dist/web-components/viewer/FrameAnimation-CE218DCr.mjs +1 -0
- package/dist/web-components/viewer/Gallery-F2sVj4ph.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-DP5kHzWM.mjs → HideToggle-CYoqe_ez.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls-C2G4x2Es.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-BmO-322r.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-DKR8dXcg.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-DX1jsvJk.mjs +1 -0
- package/dist/web-components/viewer/{MapView-BN9wXQKV.mjs → MapView-Df0wZjCh.mjs} +2 -2
- package/dist/web-components/viewer/MediaBody-CataNonO.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-SkIgrEMj.mjs +1 -0
- package/dist/web-components/viewer/{NavDate-C2-wwLuB.mjs → NavDate-BZgeaMG9.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-C3jghOd3.mjs → Navigator-Co76p-1n.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-tUkN1-FV.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-Cl4Sst60.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-D22yMgCf.mjs → PartOfManifest-DXnbEPzS.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-xrJ4CGdN.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-B1AcizHL.mjs +1 -0
- package/dist/web-components/viewer/Search-DTg1cHZ3.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-BpBEQG8i.mjs +1 -0
- package/dist/web-components/viewer/{Steps-Bw32X5xO.mjs → Steps-SpwMQdCL.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DLhUH1Gq.mjs → TargetItems-B6Icep5k.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-rTAhuXCF.mjs +1 -0
- package/dist/web-components/viewer/Transport-vKIDALE-.mjs +1 -0
- package/dist/web-components/viewer/Transport-z_kdVisw.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-B7pZiLVk.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-BKj1O9lA.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-CbA3eOIC.mjs → annotations-content-9AtLlPNn.mjs} +1 -1
- package/dist/web-components/viewer/cloverEngine-jRrYLrWa.mjs +164 -0
- package/dist/web-components/viewer/{content-state-reader-C7UBMOq3.mjs → content-state-reader-CPvkju6Q.mjs} +1 -1
- package/dist/web-components/viewer/dragToClose-Co9kGk9q.mjs +1 -0
- package/dist/web-components/viewer/{fetchManifest-C2Yxg3x9.mjs → fetchManifest-D7N9WhhF.mjs} +1 -1
- package/dist/web-components/viewer/{host-CZeyjCKR.mjs → host-DMD9LE4H.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-x_shzPvu.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DssZ0Z2N.mjs → link-DikPGzNO.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-33kKKB0T.mjs +1 -0
- package/dist/web-components/viewer/range-regions-TH6WWGTT.mjs +1 -0
- package/dist/web-components/viewer/{renderers-DLoqv3QO.mjs → renderers-BxePmixF.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-CJT5p5Hg.mjs → save-file-QXKiPlST.mjs} +1 -1
- package/dist/web-components/viewer/{search-PhOwMKHi.mjs → search-B_NePyas.mjs} +1 -1
- package/dist/web-components/viewer/styles-Bedyz7_l.mjs +1 -0
- package/dist/web-components/viewer/useControlsVisibility-Cu-jTDzs.mjs +1 -0
- package/dist/web-components/viewer/useLazyPanelPane-BhLtRixT.mjs +1 -0
- package/dist/web-components/viewer/viewer-nfPJPwwt.mjs +29 -0
- package/dist/web-components/viewer/{vtt-1Pk7Dhsj.mjs → vtt-CUn4h5JB.mjs} +1 -1
- package/dist/web-components/viewer-DN2Mo3vc.mjs +1 -0
- package/dist/web-components/{vtt-CacHieeN.mjs → vtt-C5M5WPSG.mjs} +1 -1
- package/package.json +1 -1
- package/dist/templates/shared/LightboxBody.mjs +0 -9
- package/dist/web-components/About-DhOGPFaI.mjs +0 -1
- package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +0 -1
- package/dist/web-components/Body-DaY1UJIy.mjs +0 -1
- package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +0 -1
- package/dist/web-components/CanvasView-BWQ4SK2b.mjs +0 -2
- package/dist/web-components/CaptionDetails-DSziiuQV.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +0 -1
- package/dist/web-components/Collection-B9swJtPW.mjs +0 -1
- package/dist/web-components/ControlMenu-Crtho2cs.mjs +0 -1
- package/dist/web-components/Cue-CbZaGwZh.mjs +0 -1
- package/dist/web-components/Document-BfltLWZZ.mjs +0 -1
- package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +0 -1
- package/dist/web-components/FrameAnimation-IfR1czfc.mjs +0 -1
- package/dist/web-components/Gallery-DD06BDQo.mjs +0 -1
- package/dist/web-components/Items-BHzT9A73.mjs +0 -1
- package/dist/web-components/Label-KabnxuMN.mjs +0 -1
- package/dist/web-components/LightboxBody-BhRhdXo6.mjs +0 -1
- package/dist/web-components/ListEnd-CbwNlty-.mjs +0 -1
- package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +0 -1
- package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +0 -1
- package/dist/web-components/MapView-duA5WGsu.mjs +0 -3
- package/dist/web-components/Markup-D-kioDf9.mjs +0 -2
- package/dist/web-components/MediaBody-CoOiVXcv.mjs +0 -1
- package/dist/web-components/MediaBody-d8ErTuwT.mjs +0 -1
- package/dist/web-components/PagerLayout-CvOmKtSW.mjs +0 -1
- package/dist/web-components/Panel-CIdjOznL.mjs +0 -1
- package/dist/web-components/PlaceBox-BtIbIotm.mjs +0 -1
- package/dist/web-components/Placeholder-TIyj4ZjR.mjs +0 -1
- package/dist/web-components/Provider-C8se8i4I.mjs +0 -1
- package/dist/web-components/Root-CAJB0-Mh.mjs +0 -1
- package/dist/web-components/Scene-Ctcdt7CD.mjs +0 -1
- package/dist/web-components/SceneView-B6bEx_7x.mjs +0 -1
- package/dist/web-components/Timeline-CfIF4APc.mjs +0 -1
- package/dist/web-components/canvas-CWf_Fag8.mjs +0 -1
- package/dist/web-components/cloverEngine-6djEHNCD.mjs +0 -164
- package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
- package/dist/web-components/es-BYfHUZ7P.mjs +0 -1
- package/dist/web-components/fi-B5y2qr8T.mjs +0 -1
- package/dist/web-components/fr-ChezCx6V.mjs +0 -1
- package/dist/web-components/fromManifest-gg5Wx14y.mjs +0 -1
- package/dist/web-components/glyphs-JYl2STEr.mjs +0 -1
- package/dist/web-components/hooks-x7rO95CS.mjs +0 -1
- package/dist/web-components/image-layers-BjbeyHBS.mjs +0 -1
- package/dist/web-components/index-BZ7b9k0N.mjs +0 -1
- package/dist/web-components/items-CnAIl9fS.mjs +0 -1
- package/dist/web-components/items-F6hJgdAS.mjs +0 -1
- package/dist/web-components/label-CI88KH2_.mjs +0 -1
- package/dist/web-components/layout-De1MOSYe.mjs +0 -1
- package/dist/web-components/logo-Ckwj7FlP.mjs +0 -1
- package/dist/web-components/nb-8J22f9Td.mjs +0 -1
- package/dist/web-components/nn-Dv1EvzI1.mjs +0 -1
- package/dist/web-components/no-8J22f9Td.mjs +0 -1
- package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
- package/dist/web-components/part-CXts97_M.mjs +0 -1
- package/dist/web-components/playerSurface-HYwEwPK6.mjs +0 -1
- package/dist/web-components/pt-DWYQkATt.mjs +0 -1
- package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +0 -1
- package/dist/web-components/rendererSurface-C0aKlE0v.mjs +0 -22
- package/dist/web-components/search-CkM0O0Z1.mjs +0 -1
- package/dist/web-components/shared-MTsMddHx.mjs +0 -1
- package/dist/web-components/styles-CZV1nbBQ.mjs +0 -1
- package/dist/web-components/useScrollTrack-CEsOU2yT.mjs +0 -1
- package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +0 -1
- package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +0 -2
- package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +0 -1
- package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +0 -1
- package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +0 -1
- package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +0 -1
- package/dist/web-components/viewer/Contents-DrXckx7d.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +0 -1
- package/dist/web-components/viewer/Cue-C-aF8peC.mjs +0 -1
- package/dist/web-components/viewer/Document-BN1rICu3.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +0 -1
- package/dist/web-components/viewer/Download-CawEl9MN.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +0 -1
- package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +0 -1
- package/dist/web-components/viewer/LightboxBody-C2T7IC29.mjs +0 -1
- package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +0 -1
- package/dist/web-components/viewer/Search-DC259m4f.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +0 -1
- package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +0 -1
- package/dist/web-components/viewer/cloverEngine-C04bCSFR.mjs +0 -164
- package/dist/web-components/viewer/image-layers-B09fporZ.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +0 -1
- package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +0 -1
- package/dist/web-components/viewer/styles-NZLnZPAC.mjs +0 -1
- package/dist/web-components/viewer/viewer-D30YHqyF.mjs +0 -29
- package/dist/web-components/viewer-CH7re5OO.mjs +0 -1
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import{c as ne,F as ae,i as se,M as ie}from"./models-59cEeiAA.mjs";import{aq as ce,a0 as ue}from"./shared-MTsMddHx.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Q=1179937895,fe=1313821514,me=5130562;function de(e){const i=new DataView(e);if(i.getUint32(0,true)!==Q)throw new Error("This is not a GLB.");if(i.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(i.getUint32(8,true),e.byteLength);for(let s=12;s+8<=n;){const c=i.getUint32(s,true),l=i.getUint32(s+4,true),u=s+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,u,c))):l===me&&(t=e.slice(u,u+c)),s=u+c}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function G(e,i,o){const t=new URL(e,i).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,i){const o=(i==null?void 0:i.fetch)??globalThis.fetch,t=$.get(o)??new Map;$.set(o,t);const n=`${ce(i)} ${e}`;let s=t.get(n);return s||(s=he(e,i).finally(()=>t.delete(n)),t.set(n,s)),s}async function he(e,i){const o=await G(e,location.href,i),t=new DataView(o).getUint32(0,true)===Q,{json:n,bin:s}=t?de(o):{json:JSON.parse(new TextDecoder().decode(o))},c=(n.extensionsRequired??[]).filter(a=>!le.includes(a));if(c.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${c.join(", ")}.`);const l=await Promise.all((n.buffers??[]).map((a,m)=>{if(a.uri!==void 0)return G(a.uri,e,i);if(m===0&&s)return s;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((n.images??[]).map(async a=>{try{let m;if(a.bufferView!==void 0){const r=n.bufferViews[a.bufferView];m=new Blob([new Uint8Array(l[r.buffer],r.byteOffset??0,r.byteLength)],{type:a.mimeType})}else if(a.uri!==void 0)m=new Blob([await G(a.uri,e,i)],{type:a.mimeType});else return null;return await createImageBitmap(m,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}catch{return null}}));return{json:n,buffers:l,images:u}}const pe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},we={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Z=e=>pe[e];function Ee(e,i){const o=e.json.accessors[i],t=Z(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const s=e.json.bufferViews[o.bufferView],c=we[o.componentType],l=s.byteStride||c*t,u=new DataView(e.buffers[s.buffer],(s.byteOffset??0)+(o.byteOffset??0)),a={5120:r=>u.getInt8(r),5121:r=>u.getUint8(r),5122:r=>u.getInt16(r,true),5123:r=>u.getUint16(r,true),5125:r=>u.getUint32(r,true),5126:r=>u.getFloat32(r,true)}[o.componentType]??(()=>0),m=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let h=0;h<t;h++){const f=a(r*l+h*c);n[r*t+h]=m?Math.max(f/m,-1):f}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function O(e,i){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let s=0;for(let c=0;c<4;c++)s+=e[c*4+n]*i[t*4+c];o[t*4+n]=s}return o}function X([e,i,o],[t,n,s,c],[l,u,a]){const m=t+t,r=n+n,h=s+s,f=t*m,y=t*r,p=t*h,w=n*r,N=n*h,S=s*h,k=c*m,B=c*r,I=c*h;return new Float32Array([(1-(w+S))*l,(y+I)*l,(p-B)*l,0,(y-I)*u,(1-(f+S))*u,(N+k)*u,0,(p+B)*a,(N-k)*a,(1-(f+w))*a,0,e,i,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),Te=e=>X([0,0,0],[0,0,0,1],e);function xe([e,i,o]){const t=(n,s)=>{const c=s*Math.PI/180,l=Math.cos(c),u=Math.sin(c),a=ee(),[m,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return a[m*4+m]=l,a[m*4+r]=u,a[r*4+m]=-u,a[r*4+r]=l,a};return O(t(2,o),O(t(1,i),t(0,e)))}function be(e,i,o,t){const n=1/Math.tan(e/2),s=1/(o-t);return new Float32Array([n/i,0,0,0,0,n,0,0,0,0,(t+o)*s,-1,0,0,2*t*o*s,0])}function ye(e,i){const o=u=>{const a=Math.hypot(...u)||1;return[u[0]/a,u[1]/a,u[2]/a]},t=(u,a)=>[u[1]*a[2]-u[2]*a[1],u[2]*a[0]-u[0]*a[2],u[0]*a[1]-u[1]*a[0]],n=(u,a)=>u[0]*a[0]+u[1]*a[1]+u[2]*a[2],s=o([e[0]-i[0],e[1]-i[1],e[2]-i[2]]),c=o(t([0,1,0],s)),l=t(s,c);return new Float32Array([c[0],l[0],s[0],0,c[1],l[1],s[1],0,c[2],l[2],s[2],0,-n(c,e),-n(l,e),-n(s,e),1])}function Ae(e){const[i,o,t,,n,s,c,,l,u,a]=e,m=s*a-c*u,r=c*l-n*a,h=n*u-s*l,f=i*m+o*r+t*h||1;return new Float32Array([m/f,r/f,h/f,(t*u-o*a)/f,(i*a-t*l)/f,(o*l-i*u)/f,(o*c-t*s)/f,(t*n-i*c)/f,(i*s-o*n)/f])}const Re=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let i=0;i<3;i++){let o=0;for(let t=0;t<3;t++)Math.abs(e[i*4+t])>1e-6&&o++;if(o>1)return false}return true}function Me(e,i,o,t){const n=i.json.accessors[o];let s;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,u]=[n.min,n.max];s=Array.from({length:8},(a,m)=>[m&1?u[0]:l[0],m&2?u[1]:l[1],m&4?u[2]:l[2]]).flat()}else s=Ee(i,o);const c=t;for(let l=0;l+2<s.length;l+=3){const u=s[l],a=s[l+1],m=s[l+2];for(let r=0;r<3;r++){const h=c[r]*u+c[4+r]*a+c[8+r]*m+c[12+r];h<e.min[r]&&(e.min[r]=h),h>e.max[r]&&(e.max[r]=h)}}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"],Ne=`#version 300 es
|
|
2
|
-
layout(location = 0) in vec3 aPosition;
|
|
3
|
-
layout(location = 1) in vec3 aNormal;
|
|
4
|
-
layout(location = 2) in vec2 aUv;
|
|
5
|
-
layout(location = 3) in vec4 aColor;
|
|
6
|
-
uniform mat4 uModel;
|
|
7
|
-
uniform mat4 uViewProjection;
|
|
8
|
-
uniform mat3 uNormalMatrix;
|
|
9
|
-
out vec3 vWorld;
|
|
10
|
-
out vec3 vNormal;
|
|
11
|
-
out vec2 vUv;
|
|
12
|
-
out vec4 vColor;
|
|
13
|
-
void main() {
|
|
14
|
-
vec4 world = uModel * vec4(aPosition, 1.0);
|
|
15
|
-
vWorld = world.xyz;
|
|
16
|
-
vNormal = uNormalMatrix * aNormal;
|
|
17
|
-
vUv = aUv;
|
|
18
|
-
vColor = aColor;
|
|
19
|
-
gl_Position = uViewProjection * world;
|
|
20
|
-
}`,Se=`#version 300 es
|
|
21
|
-
precision highp float;
|
|
22
|
-
in vec3 vWorld;
|
|
23
|
-
in vec3 vNormal;
|
|
24
|
-
in vec2 vUv;
|
|
25
|
-
in vec4 vColor;
|
|
26
|
-
uniform vec3 uCamera;
|
|
27
|
-
uniform vec4 uBaseColor;
|
|
28
|
-
uniform vec3 uSpecular;
|
|
29
|
-
uniform float uMetallic;
|
|
30
|
-
uniform float uRoughness;
|
|
31
|
-
uniform float uNormalScale;
|
|
32
|
-
uniform float uOcclusionStrength;
|
|
33
|
-
uniform vec3 uEmissive;
|
|
34
|
-
uniform float uAlphaCutoff;
|
|
35
|
-
uniform int uFlags;
|
|
36
|
-
uniform sampler2D uBaseTexture;
|
|
37
|
-
uniform sampler2D uMetalRoughTexture;
|
|
38
|
-
uniform sampler2D uNormalTexture;
|
|
39
|
-
uniform sampler2D uOcclusionTexture;
|
|
40
|
-
uniform sampler2D uEmissiveTexture;
|
|
41
|
-
out vec4 outColor;
|
|
42
|
-
|
|
43
|
-
const float PI = 3.14159265;
|
|
44
|
-
const float LAMP = 3.0;
|
|
45
|
-
// The room: a sky and a ground for the light all around, and three lights in it.
|
|
46
|
-
const vec3 SKY = vec3(0.73);
|
|
47
|
-
const vec3 GROUND = vec3(0.58);
|
|
48
|
-
const vec3 LIGHTS[3] = vec3[3](
|
|
49
|
-
normalize(vec3(0.3, 0.7, 0.9)),
|
|
50
|
-
normalize(vec3(-0.8, 0.35, 0.5)),
|
|
51
|
-
normalize(vec3(0.2, 0.4, -1.0))
|
|
52
|
-
);
|
|
53
|
-
const vec3 RADIANCE[3] = vec3[3](vec3(1.2), vec3(0.3), vec3(0.4));
|
|
54
|
-
|
|
55
|
-
vec3 room(vec3 direction) {
|
|
56
|
-
return mix(GROUND, SKY, direction.y * 0.5 + 0.5);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// What a surface reflects of the room: its sky and ground, and its lamps, soft panels a
|
|
60
|
-
// glossy surface mirrors and a rough one only glows with.
|
|
61
|
-
const vec3 LAMPS[3] = vec3[3](
|
|
62
|
-
normalize(vec3(0.0, 1.0, 0.3)),
|
|
63
|
-
normalize(vec3(-1.0, 0.5, 0.4)),
|
|
64
|
-
normalize(vec3(1.0, 0.35, -0.3))
|
|
65
|
-
);
|
|
66
|
-
vec3 reflected(vec3 direction, float roughness) {
|
|
67
|
-
vec3 color = room(direction);
|
|
68
|
-
float spread = mix(0.04, 0.9, roughness);
|
|
69
|
-
for (int i = 0; i < 3; i++) {
|
|
70
|
-
float c = dot(direction, LAMPS[i]);
|
|
71
|
-
color += vec3(LAMP) * smoothstep(1.0 - spread, 1.0 - spread * 0.35, c) * (1.0 - 0.85 * roughness);
|
|
72
|
-
}
|
|
73
|
-
return color;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// A normal map's normal, in the frame its texture coordinates make (no tangents read).
|
|
77
|
-
vec3 mapped(vec3 n) {
|
|
78
|
-
vec3 tangentNormal = texture(uNormalTexture, vUv).xyz * 2.0 - 1.0;
|
|
79
|
-
tangentNormal.xy *= vec2(uNormalScale, -uNormalScale);
|
|
80
|
-
vec3 dp1 = dFdx(vWorld);
|
|
81
|
-
vec3 dp2 = dFdy(vWorld);
|
|
82
|
-
vec2 duv1 = dFdx(vUv);
|
|
83
|
-
vec2 duv2 = dFdy(vUv);
|
|
84
|
-
vec3 dp2perp = cross(dp2, n);
|
|
85
|
-
vec3 dp1perp = cross(n, dp1);
|
|
86
|
-
vec3 t = dp2perp * duv1.x + dp1perp * duv2.x;
|
|
87
|
-
vec3 b = dp2perp * duv1.y + dp1perp * duv2.y;
|
|
88
|
-
float scale = inversesqrt(max(dot(t, t), dot(b, b)) + 1e-12);
|
|
89
|
-
return normalize(mat3(t * scale, b * scale, n) * tangentNormal);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
vec3 neutral(vec3 color) {
|
|
93
|
-
const float start = 0.8 - 0.04;
|
|
94
|
-
const float desaturation = 0.15;
|
|
95
|
-
float x = min(color.r, min(color.g, color.b));
|
|
96
|
-
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
|
|
97
|
-
color -= offset;
|
|
98
|
-
float peak = max(color.r, max(color.g, color.b));
|
|
99
|
-
if (peak < start) return color;
|
|
100
|
-
float d = 1.0 - start;
|
|
101
|
-
float newPeak = 1.0 - d * d / (peak + d - start);
|
|
102
|
-
color *= newPeak / peak;
|
|
103
|
-
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
|
|
104
|
-
return mix(color, vec3(newPeak), g);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
vec3 srgb(vec3 linear) {
|
|
108
|
-
return mix(
|
|
109
|
-
linear * 12.92,
|
|
110
|
-
1.055 * pow(linear, vec3(1.0 / 2.4)) - 0.055,
|
|
111
|
-
step(0.0031308, linear)
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
void main() {
|
|
116
|
-
vec4 base = uBaseColor * texture(uBaseTexture, vUv) * vColor;
|
|
117
|
-
if ((uFlags & ${C.mask}) != 0 && base.a < uAlphaCutoff) discard;
|
|
118
|
-
if ((uFlags & ${C.unlit}) != 0) {
|
|
119
|
-
outColor = vec4(srgb(base.rgb) * base.a, base.a);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
// No normals given: the face's own, as glTF asks.
|
|
123
|
-
vec3 n = (uFlags & ${C.normals}) != 0
|
|
124
|
-
? normalize(vNormal)
|
|
125
|
-
: normalize(cross(dFdx(vWorld), dFdy(vWorld)));
|
|
126
|
-
if (!gl_FrontFacing) n = -n;
|
|
127
|
-
if ((uFlags & ${C.normalMap}) != 0) n = mapped(n);
|
|
128
|
-
vec3 v = normalize(uCamera - vWorld);
|
|
129
|
-
vec4 metalRough = texture(uMetalRoughTexture, vUv);
|
|
130
|
-
float roughness = clamp(uRoughness * metalRough.g, 0.045, 1.0);
|
|
131
|
-
float metallic = clamp(uMetallic * metalRough.b, 0.0, 1.0);
|
|
132
|
-
vec3 diffuse = base.rgb * (1.0 - metallic);
|
|
133
|
-
vec3 f0 = mix(uSpecular, base.rgb, metallic);
|
|
134
|
-
float a = roughness * roughness;
|
|
135
|
-
float nv = clamp(dot(n, v), 1e-4, 1.0);
|
|
136
|
-
vec3 color = vec3(0.0);
|
|
137
|
-
for (int i = 0; i < 3; i++) {
|
|
138
|
-
vec3 l = LIGHTS[i];
|
|
139
|
-
float nl = clamp(dot(n, l), 0.0, 1.0);
|
|
140
|
-
if (nl <= 0.0) continue;
|
|
141
|
-
vec3 h = normalize(l + v);
|
|
142
|
-
float nh = clamp(dot(n, h), 0.0, 1.0);
|
|
143
|
-
float vh = clamp(dot(v, h), 0.0, 1.0);
|
|
144
|
-
float a2 = a * a;
|
|
145
|
-
float dd = nh * nh * (a2 - 1.0) + 1.0;
|
|
146
|
-
float distribution = a2 / (PI * dd * dd);
|
|
147
|
-
float viewed = nl * sqrt(nv * nv * (1.0 - a2) + a2);
|
|
148
|
-
float lit = nv * sqrt(nl * nl * (1.0 - a2) + a2);
|
|
149
|
-
float visibility = 0.5 / (viewed + lit + 1e-5);
|
|
150
|
-
vec3 fresnel = f0 + (1.0 - f0) * pow(1.0 - vh, 5.0);
|
|
151
|
-
vec3 specular = fresnel * distribution * visibility;
|
|
152
|
-
color += ((1.0 - fresnel) * diffuse + PI * specular) * RADIANCE[i] * nl;
|
|
153
|
-
}
|
|
154
|
-
// The room's light all around: diffuse, and what a rough or smooth surface reflects of it.
|
|
155
|
-
vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
|
|
156
|
-
vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04);
|
|
157
|
-
vec4 r = roughness * c0 + c1;
|
|
158
|
-
float a004 = min(r.x * r.x, exp2(-9.28 * nv)) * r.x + r.y;
|
|
159
|
-
vec2 ab = vec2(-1.04, 1.04) * a004 + r.zw;
|
|
160
|
-
float occlusion = mix(1.0, texture(uOcclusionTexture, vUv).r, uOcclusionStrength);
|
|
161
|
-
color += (diffuse * room(n) + (f0 * ab.x + ab.y) * reflected(reflect(-v, n), roughness)) * occlusion;
|
|
162
|
-
color += uEmissive * texture(uEmissiveTexture, vUv).rgb;
|
|
163
|
-
outColor = vec4(srgb(neutral(color)) * base.a, base.a);
|
|
164
|
-
}`,q=10497,Fe=9729,Ue=new Set([9984,9985,9986,9987]);function Ce(e){const i=e.createProgram();for(const[o,t]of[[e.VERTEX_SHADER,Ne],[e.FRAGMENT_SHADER,Se]]){const n=e.createShader(o);e.shaderSource(n,t),e.compileShader(n),e.attachShader(i,n),e.deleteShader(n)}if(e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error(`The 3D view's shaders would not build: ${e.getProgramInfoLog(i)}`);return i}function Pe(e){const i=Ce(e),o=r=>e.getUniformLocation(i,r),t=Object.fromEntries(["uModel","uViewProjection","uNormalMatrix","uCamera","uBaseColor","uSpecular","uMetallic","uRoughness","uNormalScale","uOcclusionStrength","uEmissive","uAlphaCutoff","uFlags",...J].map(r=>[r,o(r)]));e.useProgram(i),J.forEach((r,h)=>e.uniform1i(t[r],h));const n=[],s=[],c=[],l=Re(),u=e.createTexture();e.bindTexture(e.TEXTURE_2D,u),e.texImage2D(e.TEXTURE_2D,0,e.RGBA8,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([255,255,255,255])),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),s.push(u),e.vertexAttrib4f(Y.COLOR_0,1,1,1,1);function a(r,h){var g;const{json:f}=r,y=new Map,p=new Map,w=new Map,N=(E,T)=>{const d=`${E}|${T}`;let v=y.get(d);if(!v){const b=f.bufferViews[E];v=e.createBuffer(),e.bindBuffer(T,v),e.bufferData(T,new Uint8Array(r.buffers[b.buffer],b.byteOffset??0,b.byteLength),e.STATIC_DRAW),y.set(d,v),n.push(v)}return v},S=(E,T)=>{var U,M;const d=E?(U=f.textures)==null?void 0:U[E.index]:void 0,v=(d==null?void 0:d.source)!==void 0?r.images[d.source]:null;if(!E||!v)return null;const b=`${E.index}|${T}`;let _=p.get(b);if(!_){_=e.createTexture(),e.bindTexture(e.TEXTURE_2D,_),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,T?e.SRGB8_ALPHA8:e.RGBA8,e.RGBA,e.UNSIGNED_BYTE,v);const x=(d==null?void 0:d.sampler)!==void 0?(M=f.samplers)==null?void 0:M[d.sampler]:void 0,A=(x==null?void 0:x.minFilter)??e.LINEAR_MIPMAP_LINEAR;e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,A),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,(x==null?void 0:x.magFilter)??Fe),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,(x==null?void 0:x.wrapS)??q),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,(x==null?void 0:x.wrapT)??q),Ue.has(A)&&e.generateMipmap(e.TEXTURE_2D),p.set(b,_),s.push(_)}return _},k=E=>{var A,L,D,V,R,P;const T=E??-1;let d=w.get(T);if(d)return d;const v=E!==void 0?((A=f.materials)==null?void 0:A[E])??{}:{},b=v.pbrMetallicRoughness??{},_=S(v.normalTexture,false),U=Number(((D=(L=v.extensions)==null?void 0:L.KHR_materials_ior)==null?void 0:D.ior)??1.5),M=(V=v.extensions)==null?void 0:V.KHR_materials_specular,x=((U-1)/(U+1))**2;return d={base:b.baseColorFactor??[1,1,1,1],specular:((M==null?void 0:M.specularColorFactor)??[1,1,1]).map(z=>Math.min(x*z,1)*((M==null?void 0:M.specularFactor)??1)),metallic:b.metallicFactor??1,roughness:b.roughnessFactor??1,normalScale:((R=v.normalTexture)==null?void 0:R.scale)??1,occlusion:v.occlusionTexture?v.occlusionTexture.strength??1:0,emissive:v.emissiveFactor??[0,0,0],cutoff:v.alphaCutoff??.5,flags:(_?C.normalMap:0)|((P=v.extensions)!=null&&P.KHR_materials_unlit?C.unlit:0)|(v.alphaMode==="MASK"?C.mask:0),doubleSided:!!v.doubleSided,blend:v.alphaMode==="BLEND",textures:[S(b.baseColorTexture,true),S(b.metallicRoughnessTexture,false),_,S(v.occlusionTexture,false),S(v.emissiveTexture,true)]},w.set(T,d),d},B=(E,T)=>{var _,U,M,x;const d=(_=f.nodes)==null?void 0:_[E];if(!d)return;const v=O(T,d.matrix?new Float32Array(d.matrix):X(d.translation??[0,0,0],d.rotation??[0,0,0,1],d.scale??[1,1,1])),b=d.mesh!==void 0?(U=f.meshes)==null?void 0:U[d.mesh]:void 0;for(const A of(b==null?void 0:b.primitives)??[]){const L=A.attributes.POSITION;if(L===void 0)continue;const D=e.createVertexArray();e.bindVertexArray(D);let V=0;for(const[W,j]of Object.entries(Y)){const H=A.attributes[W],F=H!==void 0?(M=f.accessors)==null?void 0:M[H]:void 0;if(!F||F.bufferView===void 0||F.sparse)continue;const re=f.bufferViews[F.bufferView];e.bindBuffer(e.ARRAY_BUFFER,N(F.bufferView,e.ARRAY_BUFFER)),e.enableVertexAttribArray(j),e.vertexAttribPointer(j,Z(F.type),F.componentType,!!F.normalized,re.byteStride??0,F.byteOffset??0),W==="NORMAL"&&(V|=C.normals)}const R=A.indices!==void 0?(x=f.accessors)==null?void 0:x[A.indices]:void 0;(R==null?void 0:R.bufferView)!==void 0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,N(R.bufferView,e.ELEMENT_ARRAY_BUFFER)),e.bindVertexArray(null);const P=O(h,v),z=k(A.material);c.push({vao:D,mode:A.mode??e.TRIANGLES,count:R?R.count:f.accessors[L].count,...(R==null?void 0:R.bufferView)!==void 0?{index:{type:R.componentType,offset:R.byteOffset??0}}:{},model:P,normal:Ae(P),mirrored:Oe(P)<0,material:{...z,flags:z.flags|V}}),Me(l,r,L,P)}for(const A of d.children??[])B(A,v)},I=(g=f.scenes)==null?void 0:g[f.scene??0],te=(I==null?void 0:I.nodes)??(f.nodes??[]).map((E,T)=>T).filter(E=>!f.nodes.some(T=>{var d;return(d=T.children)==null?void 0:d.includes(E)})),oe=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);te.forEach(E=>B(E,oe)),c.sort((E,T)=>Number(E.material.blend)-Number(T.material.blend))}function m(r,h,f,y){e.viewport(0,0,f,y),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.enable(e.DEPTH_TEST),e.useProgram(i),e.uniformMatrix4fv(t.uViewProjection,false,r),e.uniform3fv(t.uCamera,h);for(const p of c){const{material:w}=p;w.doubleSided?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),e.frontFace(p.mirrored?e.CW:e.CCW),w.blend?(e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.depthMask(false)):(e.disable(e.BLEND),e.depthMask(true)),w.textures.forEach((N,S)=>{e.activeTexture(e.TEXTURE0+S),e.bindTexture(e.TEXTURE_2D,N??u)}),e.uniformMatrix4fv(t.uModel,false,p.model),e.uniformMatrix3fv(t.uNormalMatrix,false,p.normal),e.uniform4fv(t.uBaseColor,w.base),e.uniform3fv(t.uSpecular,w.specular),e.uniform1f(t.uMetallic,w.metallic),e.uniform1f(t.uRoughness,w.roughness),e.uniform1f(t.uNormalScale,w.normalScale),e.uniform1f(t.uOcclusionStrength,w.occlusion),e.uniform3fv(t.uEmissive,w.emissive),e.uniform1f(t.uAlphaCutoff,w.cutoff),e.uniform1i(t.uFlags,w.flags),e.bindVertexArray(p.vao),p.index?e.drawElements(p.mode,p.count,p.index.type,p.index.offset):e.drawArrays(p.mode,0,p.count)}e.bindVertexArray(null),e.depthMask(true)}return{add:a,bounds:()=>c.length?l:null,draw:m,dispose(){c.forEach(r=>e.deleteVertexArray(r.vao)),n.forEach(r=>e.deleteBuffer(r)),s.forEach(r=>e.deleteTexture(r)),e.deleteProgram(i),c.length=0}}}function Oe(e){return e[0]*(e[5]*e[10]-e[6]*e[9])-e[4]*(e[1]*e[10]-e[2]*e[9])+e[8]*(e[1]*e[6]-e[2]*e[5])}const Ie=2;function Le({position:e,transforms:i}){let o=ee();for(const{type:t,x:n,y:s,z:c}of i){const l=t==="scale"?Te([n,s,c]):t==="translate"?K([n,s,c]):xe([n,s,c]);o=O(l,o)}return O(K(e),o)}function Ve(e,{onLost:i}){const o=document.createElement("canvas");o.className="clover-canvas-surface",o.setAttribute("aria-hidden","true"),o.style.cssText="position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none";const t=o.getContext("webgl2",{antialias:true,alpha:true});if(!t)throw new Error("This browser cannot draw 3D: it offers no WebGL2.");const n=a=>{a.preventDefault(),i()};o.addEventListener("webglcontextlost",n),e.prepend(o);const s=Pe(t);let c={center:[0,0,0],radius:1},l=false;const u=()=>{const a=Math.min(globalThis.devicePixelRatio||1,Ie),m=Math.round(e.clientWidth*a),r=Math.round(e.clientHeight*a);!m||!r||(o.width=m,o.height=r)};return u(),{async load(a,m){const r=a.filter(se);if(!r.length){const y=[...new Set(a.map(p=>p.format??p.src))];throw new Error(a.length?`Clover draws glTF models (${ie.join(", ")}), not ${y.join(", ")}.`:"The Scene paints no model.")}const h=await Promise.all(r.map(y=>ve(y.src,m)));if(l)return c;h.forEach((y,p)=>s.add(y,Le(r[p])));const f=s.bounds();if(f){const y=f.min.map((w,N)=>(w+f.max[N])/2),p=Math.hypot(...f.max.map((w,N)=>w-f.min[N]))/2;c={center:y,radius:p||1}}return c},draw(a){if(l||!o.width||!o.height)return;const m=ne(a,c.center),r=Math.max(c.radius/1e3,a.distance-c.radius*2),h=a.distance+c.radius*4,f=be(ae*Math.PI/180,o.width/o.height,r,h);s.draw(O(f,ye(m,c.center)),m,o.width,o.height)},resize:u,dispose(){var a;l||(l=true,o.removeEventListener("webglcontextlost",n),s.dispose(),(a=t.getExtension("WEBGL_lose_context"))==null||a.loseContext(),o.remove())}}}export{Ve as createEngine,Le as placement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const I=.3333333333333333,M=.5,C=8,P="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)";function D(r,i){let e=null,n="idle",d=0,E=0,c=0,g=1,v=1,o=[];const p=()=>{var t;return[r,(t=i.current.alongside)==null?void 0:t.current]},m=t=>{if(t.pointerType==="mouse"||!t.isPrimary||!i.current.enabled)return;e=t.pointerId,n="pending",d=t.clientX,E=t.clientY,c=0,g=r.getBoundingClientRect().width||1;const s=getComputedStyle(r).direction==="rtl";v=i.current.side==="end"!==s?1:-1,o=[[t.timeStamp,0]]},w=t=>{var y,L;if(t.pointerId!==e||n==="idle"||n==="scroll")return;const s=(t.clientX-d)*v,l=t.clientY-E;if(n==="pending"){if(Math.abs(l)>C&&Math.abs(l)>Math.abs(s)){n="scroll";return}if(s<C)return;n="drag";try{(y=r.setPointerCapture)==null||y.call(r,t.pointerId)}catch{}u(p(),void 0,"none")}c=Math.max(0,s),u(p(),`${c*v}px 0`);const f=(L=i.current.scrim)==null?void 0:L.current;f&&(f.style.transition="none",f.style.opacity=String(1-c/g)),o.push([t.timeStamp,c]),o.length>5&&o.shift(),t.preventDefault()},h=t=>{var S;if(t.pointerId!==e)return;const s=n==="drag";if(n="idle",e=null,!s)return;r.addEventListener("click",x,{capture:true,once:true}),setTimeout(()=>r.removeEventListener("click",x,true),0);const[l,f]=o[0],[y,L]=o[o.length-1],b=y>l?(L-f)/(y-l):0,a=(S=i.current.scrim)==null?void 0:S.current;if(c>g*I||b>M){if(a&&(a.style.transition="opacity 240ms ease",a.style.opacity="0"),i.current.exits){u(p(),`${g*v}px 0`,"translate 200ms ease-out"),setTimeout(()=>i.current.onClose(),200);return}u(p(),void 0,""),i.current.onClose();return}u(p(),"",P),a&&(a.style.transition="opacity 240ms ease",a.style.opacity="")},x=t=>{t.stopPropagation(),t.preventDefault()};return r.addEventListener("pointerdown",m),r.addEventListener("pointermove",w,{passive:false}),r.addEventListener("pointerup",h),r.addEventListener("pointercancel",h),()=>{r.removeEventListener("pointerdown",m),r.removeEventListener("pointermove",w),r.removeEventListener("pointerup",h),r.removeEventListener("pointercancel",h)}}function R(r,i){var n,d;u([r,(n=i.current.alongside)==null?void 0:n.current],"","");const e=(d=i.current.scrim)==null?void 0:d.current;e&&(e.style.opacity="",e.style.transition="")}function u(r,i,e){for(const n of r)n&&(e!==void 0&&(n.style.transition=e),i!==void 0&&(n.style.translate=i))}export{D as attach,R as reset};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=JSON.parse('{"commonClose":"Cerrar","commonNext":"Siguiente","commonPrevious":"Anterior","commonSearch":"Buscar","commonViewAll":"Ver todo","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Cargando...","contentSearchPlaceholder":"Buscar","contentSearchResultsNone":"Sin resultados","contentSearchResult":"1 resultado","contentSearchResults":"{{count}} resultados","contentSearchError":"No se pudo completar la b\xFAsqueda.","contentSearchPosition":"Resultado {{index}} de {{total}}","contentSearchClear":"Borrar la b\xFAsqueda","canvasPosition":"Elemento {{index}} de {{total}}","canvasImage":"Imagen","bodyUnloadableImage":"No se pudo cargar esta imagen.","bodyUnloadableVideo":"No se pudo cargar este v\xEDdeo.","bodyUnloadableAudio":"No se pudo cargar este audio.","bodyUnloadableModel":"No se pudo cargar este modelo.","canvasRoleDescription":"imagen ampliable","canvasKeysImage":"Use las teclas de flecha para desplazar la imagen, con May\xFAs para avanzar m\xE1s, las teclas m\xE1s y menos para acercar y alejar, 0 para restablecer la vista, y R o May\xFAs+R para girar.","canvasKeysMedia":"Pulse Espacio o K para reproducir o pausar, J o L para retroceder o avanzar diez segundos, y M para silenciar o activar el sonido.","canvasKeysAnnotations":"Pulse Esc para quitar la selecci\xF3n de la anotaci\xF3n.","sceneModel":"Modelo 3D","sceneRoleDescription":"modelo 3D giratorio","sceneKeys":"Use las teclas de flecha para girar el modelo, con May\xFAs para avanzar m\xE1s, las teclas m\xE1s y menos para acercar y alejar, 0 para restablecer la vista, y R o May\xFAs+R para girarlo a la derecha o a la izquierda.","sceneRotateUp":"Girar hacia arriba","sceneRotateDown":"Girar hacia abajo","sceneRotate":"Girar","sceneResetView":"Restablecer la vista","statusLoading":"Cargando\u2026","statusError":"No se pudo cargar este contenido.","itemsLabel":"Elementos","download":"Descargar","downloadPage":"Esta p\xE1gina","downloadAll":"Todas las p\xE1ginas","templateSidebar":"Elementos","templateSidebarToggle":"Mostrar elementos","collectionLabel":"Colecci\xF3n","itemsScrollBack":"Mostrar elementos anteriores","itemsScrollForward":"Mostrar m\xE1s elementos","aboutRights":"Derechos","aboutDate":"Fecha","aboutHomepage":"P\xE1gina de inicio","aboutSeeAlso":"V\xE9ase tambi\xE9n","aboutProvider":"Proveedor","logo":"Logotipo","aboutManifest":"Manifiesto IIIF","aboutCanvas":"Lienzo IIIF","aboutPartOf":"Parte de","aboutOpenManifest":"Abrir el manifiesto completo","aboutCollection":"Colecci\xF3n IIIF","readingLanguage":"Idioma","annotationsHide":"Ocultar anotaciones","annotationsHideTip":"Ocultar","readMore":"Leer m\xE1s","readLess":"Leer menos","annotationsShow":"Ver en la imagen","annotationsShowTime":"Ver en la grabaci\xF3n","annotationsImage":"Imagen","annotationsLanguage":"Idioma","annotationsOpenLink":"Abrir el enlace","transcriptLabel":"Transcripci\xF3n","imageViewerOpen":"Abrir el visor de im\xE1genes","imageViewerClose":"Cerrar el visor de im\xE1genes","canvasChoice":"Alternativas","imageFullScreen":"Pantalla completa","imageExitFullScreen":"Salir de pantalla completa","imageResetZoom":"Restablecer zoom","imageRotateLeft":"Girar a la izquierda","imageRotateRight":"Girar a la derecha","imageZoomIn":"Acercar","imageZoomOut":"Alejar","informationPanelTabs":"Panel de informaci\xF3n","sectionsScrollBack":"Mostrar pesta\xF1as anteriores","sectionsScrollForward":"Mostrar m\xE1s pesta\xF1as","informationPanelClose":"Cerrar el panel de informaci\xF3n","informationPanelTabsAbout":"Acerca de","informationPanelTabsAnnotations":"Anotaciones","informationPanelTabsSearch":"Buscar","informationPanelTabsContents":"\xCDndice","contentsSectionsIn":"Secciones de","informationPanelTabsMap":"Mapa","informationPanelTabsCollection":"Colecci\xF3n","informationPanelTabsTargets":"Vistas","mapUnavailable":"No se pudo mostrar el mapa.","mapLabel":"Mapa","mapAttribution":"Cr\xE9ditos del mapa","mapPlaceUntitled":"Lugar {{number}}","mapOverlay":"Imagen georreferenciada","mapPlacesListed":"Lugares enumerados despu\xE9s del mapa: {{count}}","informationPanelToggle":"M\xE1s informaci\xF3n","playerPlay":"Reproducir","playerPause":"Pausar","playerClose":"Cerrar el reproductor","playerMute":"Silenciar","playerUnmute":"Activar el sonido","playerVolume":"Volumen","playerSeek":"Posici\xF3n de reproducci\xF3n","playerCaptions":"Subt\xEDtulos","playerCaptionsOff":"Desactivados","playerChapters":"Cap\xEDtulos","frameRepeat":"Repetir","playerCurrentTime":"Tiempo actual","playerDuration":"Duraci\xF3n","splitHandle":"Cambiar el tama\xF1o de los paneles"}');export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=JSON.parse('{"commonClose":"Sulje","commonNext":"Seuraava","commonPrevious":"Edellinen","commonSearch":"Hae","commonViewAll":"N\xE4yt\xE4 kaikki","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Ladataan...","contentSearchPlaceholder":"Haku","contentSearchResultsNone":"Ei osumia","contentSearchResult":"1 osuma","contentSearchResults":"{{count}} osumaa","contentSearchError":"Hakua ei voitu suorittaa loppuun.","contentSearchPosition":"Osuma {{index}} / {{total}}","contentSearchClear":"Tyhjenn\xE4 haku","canvasPosition":"Kohde {{index}} / {{total}}","canvasImage":"Kuva","bodyUnloadableImage":"T\xE4t\xE4 kuvaa ei voitu ladata.","bodyUnloadableVideo":"T\xE4t\xE4 videota ei voitu ladata.","bodyUnloadableAudio":"T\xE4t\xE4 \xE4\xE4nt\xE4 ei voitu ladata.","bodyUnloadableModel":"T\xE4t\xE4 mallia ei voitu ladata.","canvasRoleDescription":"zoomattava kuva","canvasKeysImage":"Siirr\xE4 kuvaa nuolin\xE4pp\xE4imill\xE4, pidemmin Vaihto-n\xE4pp\xE4imen kanssa, l\xE4henn\xE4 ja loitonna plus- ja miinusn\xE4pp\xE4imill\xE4, palauta n\xE4kym\xE4 n\xE4pp\xE4imell\xE4 0 ja kierr\xE4 n\xE4pp\xE4imell\xE4 R tai Vaihto+R.","canvasKeysMedia":"Toista tai keskeyt\xE4 v\xE4lily\xF6nnill\xE4 tai n\xE4pp\xE4imell\xE4 K, siirry kymmenen sekuntia taaksep\xE4in tai eteenp\xE4in n\xE4pp\xE4imell\xE4 J tai L ja mykist\xE4 tai poista mykistys n\xE4pp\xE4imell\xE4 M.","canvasKeysAnnotations":"Poista annotaation valinta painamalla Esc-n\xE4pp\xE4int\xE4.","sceneModel":"3D-malli","sceneRoleDescription":"k\xE4\xE4nnett\xE4v\xE4 3D-malli","sceneKeys":"Kierr\xE4 mallia nuolin\xE4pp\xE4imill\xE4, pidemmin Vaihto-n\xE4pp\xE4imen kanssa, l\xE4henn\xE4 ja loitonna plus- ja miinusn\xE4pp\xE4imill\xE4, palauta n\xE4kym\xE4 n\xE4pp\xE4imell\xE4 0 ja kierr\xE4 oikealle tai vasemmalle n\xE4pp\xE4imell\xE4 R tai Vaihto+R.","sceneRotateUp":"Kierr\xE4 yl\xF6s","sceneRotateDown":"Kierr\xE4 alas","sceneRotate":"Kierr\xE4","sceneResetView":"Palauta n\xE4kym\xE4","statusLoading":"Ladataan\u2026","statusError":"T\xE4t\xE4 ei voitu ladata.","itemsLabel":"Kohteet","download":"Lataa","downloadPage":"T\xE4m\xE4 sivu","downloadAll":"Kaikki sivut","templateSidebar":"Kohteet","templateSidebarToggle":"N\xE4yt\xE4 kohteet","collectionLabel":"Kokoelma","itemsScrollBack":"N\xE4yt\xE4 edelliset kohteet","itemsScrollForward":"N\xE4yt\xE4 lis\xE4\xE4 kohteita","aboutRights":"Oikeudet","aboutDate":"P\xE4iv\xE4m\xE4\xE4r\xE4","aboutHomepage":"Kotisivu","aboutSeeAlso":"Katso my\xF6s","aboutProvider":"Tarjoaja","logo":"Logo","aboutManifest":"IIIF-manifesti","aboutCanvas":"IIIF-kanvaasi","aboutPartOf":"Osa kokonaisuutta","aboutOpenManifest":"Avaa koko manifesti","aboutCollection":"IIIF-kokoelma","readingLanguage":"Kieli","annotationsHide":"Piilota annotaatiot","annotationsHideTip":"Piilota","readMore":"Lue lis\xE4\xE4","readLess":"N\xE4yt\xE4 v\xE4hemm\xE4n","annotationsShow":"N\xE4yt\xE4 kuvassa","annotationsShowTime":"N\xE4yt\xE4 tallenteessa","annotationsImage":"Kuva","annotationsLanguage":"Kieli","annotationsOpenLink":"Avaa linkki","transcriptLabel":"Litteraatti","imageViewerOpen":"Avaa kuvakatselin","imageViewerClose":"Sulje kuvakatselin","canvasChoice":"Vaihtoehdot","imageFullScreen":"Koko n\xE4ytt\xF6","imageExitFullScreen":"Poistu koko n\xE4yt\xF6st\xE4","imageResetZoom":"Palauta zoomaus","imageRotateLeft":"Kierr\xE4 vasemmalle","imageRotateRight":"Kierr\xE4 oikealle","imageZoomIn":"L\xE4henn\xE4","imageZoomOut":"Loitonna","informationPanelTabs":"Tietopaneeli","sectionsScrollBack":"N\xE4yt\xE4 edelliset v\xE4lilehdet","sectionsScrollForward":"N\xE4yt\xE4 lis\xE4\xE4 v\xE4lilehti\xE4","informationPanelClose":"Sulje tietopaneeli","informationPanelTabsAbout":"Tiedot","informationPanelTabsAnnotations":"Annotaatiot","informationPanelTabsSearch":"Haku","informationPanelTabsContents":"Sis\xE4lt\xF6","contentsSectionsIn":"Osiot:","informationPanelTabsMap":"Kartta","informationPanelTabsCollection":"Kokoelma","informationPanelTabsTargets":"N\xE4kym\xE4t","mapUnavailable":"Karttaa ei voitu n\xE4ytt\xE4\xE4.","mapLabel":"Kartta","mapAttribution":"Kartan tekij\xE4tiedot","mapPlaceUntitled":"Paikka {{number}}","mapOverlay":"Georeferoitu kuva","mapPlacesListed":"Kartan j\xE4lkeen luetellut paikat: {{count}}","informationPanelToggle":"Lis\xE4tiedot","playerPlay":"Toista","playerPause":"Keskeyt\xE4","playerClose":"Sulje soitin","playerMute":"Mykist\xE4","playerUnmute":"Poista mykistys","playerVolume":"\xC4\xE4nenvoimakkuus","playerSeek":"Toistokohta","playerCaptions":"Tekstitykset","playerCaptionsOff":"Pois","playerChapters":"Luvut","frameRepeat":"Toista uudelleen","playerCurrentTime":"Kulunut aika","playerDuration":"Kesto","splitHandle":"Muuta paneelien kokoa"}');export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=JSON.parse(`{"commonClose":"Fermer","commonNext":"Suivant","commonPrevious":"Pr\xE9c\xE9dent","commonSearch":"Rechercher","commonViewAll":"Tout afficher","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Chargement\u2026","contentSearchPlaceholder":"Rechercher","contentSearchResultsNone":"Aucun r\xE9sultat","contentSearchResult":"1 r\xE9sultat","contentSearchResults":"{{count}} r\xE9sultats","contentSearchError":"La recherche n\u2019a pas pu aboutir.","contentSearchPosition":"R\xE9sultat {{index}} sur {{total}}","contentSearchClear":"Effacer la recherche","canvasPosition":"\xC9l\xE9ment {{index}} sur {{total}}","canvasImage":"Image","bodyUnloadableImage":"Cette image n\u2019a pas pu \xEAtre charg\xE9e.","bodyUnloadableVideo":"Cette vid\xE9o n\u2019a pas pu \xEAtre charg\xE9e.","bodyUnloadableAudio":"Ce son n\u2019a pas pu \xEAtre charg\xE9.","bodyUnloadableModel":"Ce mod\xE8le n\u2019a pas pu \xEAtre charg\xE9.","canvasRoleDescription":"image zoomable","canvasKeysImage":"Utilisez les fl\xE8ches pour d\xE9placer l\u2019image, avec Maj pour aller plus loin, plus et moins pour zoomer, 0 pour r\xE9initialiser la vue, et R ou Maj+R pour la faire pivoter.","canvasKeysMedia":"Appuyez sur Espace ou K pour lire ou mettre en pause, sur J ou L pour reculer ou avancer de dix secondes, et sur M pour couper ou r\xE9tablir le son.","canvasKeysAnnotations":"Appuyez sur \xC9chap pour d\xE9s\xE9lectionner l\u2019annotation.","sceneModel":"Mod\xE8le 3D","sceneRoleDescription":"mod\xE8le 3D orientable","sceneKeys":"Utilisez les fl\xE8ches pour faire pivoter le mod\xE8le, avec Maj pour aller plus loin, plus et moins pour zoomer, 0 pour r\xE9initialiser la vue, et R ou Maj+R pour le faire pivoter \xE0 droite ou \xE0 gauche.","sceneRotateUp":"Rotation vers le haut","sceneRotateDown":"Rotation vers le bas","sceneRotate":"Rotation","sceneResetView":"R\xE9initialiser la vue","statusLoading":"Chargement\u2026","statusError":"Ce contenu n\u2019a pas pu \xEAtre charg\xE9.","itemsLabel":"\xC9l\xE9ments","download":"T\xE9l\xE9charger","downloadPage":"Cette page","downloadAll":"Toutes les pages","templateSidebar":"\xC9l\xE9ments","templateSidebarToggle":"Afficher les \xE9l\xE9ments","collectionLabel":"Collection","itemsScrollBack":"Afficher les \xE9l\xE9ments pr\xE9c\xE9dents","itemsScrollForward":"Afficher plus d\u2019\xE9l\xE9ments","aboutRights":"Droits","aboutDate":"Date","aboutHomepage":"Page d\u2019accueil","aboutSeeAlso":"Voir aussi","aboutProvider":"Fournisseur","logo":"Logo","aboutManifest":"Manifeste IIIF","aboutCanvas":"Canevas IIIF","aboutPartOf":"Fait partie de","aboutOpenManifest":"Ouvrir le manifeste complet","aboutCollection":"Collection IIIF","readingLanguage":"Langue","annotationsHide":"Masquer les annotations","annotationsHideTip":"Masquer","readMore":"Lire la suite","readLess":"Afficher moins","annotationsShow":"Afficher sur l\u2019image","annotationsShowTime":"Afficher dans l\u2019enregistrement","annotationsImage":"Image","annotationsLanguage":"Langue","annotationsOpenLink":"Ouvrir le lien","transcriptLabel":"Transcription","imageViewerOpen":"Ouvrir la visionneuse d'images","imageViewerClose":"Fermer la visionneuse d'images","canvasChoice":"Choix","imageFullScreen":"Plein \xE9cran","imageExitFullScreen":"Quitter le plein \xE9cran","imageResetZoom":"R\xE9initialiser le zoom","imageRotateLeft":"Rotation \xE0 gauche","imageRotateRight":"Rotation \xE0 droite","imageZoomIn":"Zoom avant","imageZoomOut":"Zoom arri\xE8re","informationPanelTabs":"Panneau d\u2019informations","sectionsScrollBack":"Afficher les onglets pr\xE9c\xE9dents","sectionsScrollForward":"Afficher plus d\u2019onglets","informationPanelClose":"Fermer le panneau d\u2019informations","informationPanelTabsAbout":"\xC0 propos","informationPanelTabsAnnotations":"Annotations","informationPanelTabsSearch":"Recherche","informationPanelTabsContents":"Sommaire","contentsSectionsIn":"Sections de","informationPanelTabsMap":"Carte","informationPanelTabsCollection":"Collection","informationPanelTabsTargets":"Vues","mapUnavailable":"La carte n\u2019a pas pu \xEAtre affich\xE9e.","mapLabel":"Carte","mapAttribution":"Cr\xE9dits de la carte","mapPlaceUntitled":"Lieu {{number}}","mapOverlay":"Image g\xE9or\xE9f\xE9renc\xE9e","mapPlacesListed":"Lieux \xE9num\xE9r\xE9s apr\xE8s la carte : {{count}}","informationPanelToggle":"Plus d\u2019informations","playerPlay":"Lire","playerPause":"Pause","playerClose":"Fermer le lecteur","playerMute":"Couper le son","playerUnmute":"Activer le son","playerVolume":"Volume","playerSeek":"Position de lecture","playerCaptions":"Sous-titres","playerCaptionsOff":"D\xE9sactiv\xE9s","playerChapters":"Chapitres","frameRepeat":"R\xE9p\xE9ter","playerCurrentTime":"Temps \xE9coul\xE9","playerDuration":"Dur\xE9e","splitHandle":"Redimensionner les panneaux"}`);export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as f,r}from"./shared-MTsMddHx.mjs";function c(e,u,n,o){return f(()=>((o==null?void 0:o(e??null,(u==null?void 0:u.id)??null,u==null?void 0:u.duration))??[]).map(t=>{const i=r(t.label,n);return{...t.id?{id:t.id}:{},label:i.text,lang:i.lang,start:t.start,end:t.end,...t.thumbnail?{thumbnail:t.thumbnail}:{}}}),[e,u,n,o])}function m(e,u,n,o){if(e.region){if(!u)return false;const{x:t,y:i,w:l,h:s}=e.region;if(!u.fitCanvasRect(e.canvasId,{x:t,y:i,width:l,height:s},true))return false}if(o&&(e.time!==void 0||e.autoplay)){if(!n)return false;const t=()=>{e.time!==void 0&&(n.currentTime=e.time),e.autoplay&&n.play().catch(()=>{})};n.readyState>=HTMLMediaElement.HAVE_METADATA?t():n.addEventListener("loadedmetadata",t,{once:true})}return true}export{m as a,c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e,k as o}from"./shared-MTsMddHx.mjs";const s=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M144 72H368A96 96 0 0 1 464 168V296A96 96 0 0 1 368 392H200L104 460L144 392A96 96 0 0 1 48 296V168A96 96 0 0 1 144 72Z M168 184H344A16 16 0 0 1 344 216H168A16 16 0 0 1 168 184Z M168 264H280A16 16 0 0 1 280 296H168A16 16 0 0 1 168 264Z"}),t=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),c=()=>e("path",{fillRule:"evenodd",stroke:"none",d:"M256 40C166 40 100 108 100 196C100 300 216 420 246 452A14 14 0 0 0 266 452C296 420 412 300 412 196C412 108 346 40 256 40Z M256 136A60 60 0 1 1 256 256A60 60 0 1 1 256 136Z"}),a=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),h=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),r=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"m279.5,197.76h-3.35s-28.47,0-28.47,0v-31.82c-.77-13.79-12.57-24.33-26.36-23.56-12.71.71-22.85,10.86-23.56,23.56v3.35h0v28.47h-31.82c-13.79.77-24.33,12.57-23.56,26.36.71,12.71,10.86,22.85,23.56,23.56h3.35s28.47,0,28.47,0v31.82c.77,13.79,12.57,24.33,26.36,23.56,12.71-.71,22.85-10.86,23.56-23.56v-3.35h0v-28.47h31.82c13.79-.77,24.33-12.57,23.56-26.36-.71-12.71-10.86-22.85-23.56-23.56Z"})]}),d=()=>e(o,{children:[e("path",{stroke:"none",d:"m456.69,421.39l-94.09-94.09c22.65-30.16,34.88-66.86,34.84-104.58,0-96.34-78.38-174.72-174.72-174.72S48,126.38,48,222.72s78.38,174.72,174.72,174.72c37.72.04,74.42-12.19,104.58-34.84l94.09,94.09c10.29,9.2,26.1,8.32,35.3-1.98,8.48-9.49,8.48-23.83,0-33.32Zm-233.97-73.87c-68.89-.08-124.72-55.91-124.8-124.8h0c0-68.93,55.87-124.8,124.8-124.8s124.8,55.87,124.8,124.8-55.87,124.8-124.8,124.8Z"}),e("path",{stroke:"none",d:"M167.26 197.76H278.1a24.96 24.96 0 0 1 0 49.92H167.26a24.96 24.96 0 0 1 0-49.92Z"})]});export{h as C,t as I,r as O,c as P,s as a,a as b,d as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as s,T as o,e as i,ab as r,X as l,ac as f,ad as v,E as u,m as d,a as c,r as m}from"./shared-MTsMddHx.mjs";function C(){const n=s(a=>a.status),e=s(a=>a.error);return o(()=>({status:n,error:e}),[n,e])}function S(){return s(n=>n.manifest)}function b(){return s(n=>u(n.manifest))}function p(){return s(n=>d(n.manifest,n.canvasId))}function z(){return s(n=>l(n.manifest,n.canvasId))}function A(){const{clover:n}=i("useNavigation"),e=s(t=>v(t.manifest,t.canvasId)),a=s(t=>u(t.manifest).views.length);return o(()=>r(n,e,a),[n,e,a])}function I(){return s(n=>f(n.manifest,n.addedSets))}function L(n){const{language:e}=i("useLocalized");return o(()=>m(n,e),[n,e])}function O(){return c().t}function T(){return c().langOf}export{p as a,C as b,A as c,b as d,S as e,z as f,O as g,T as h,L as i,I as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as L,O as u,a4 as P,a5 as $,at as S}from"./shared-MTsMddHx.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function K(t){const c=new Map;for(const e of L(t).canvases)k(e,c);return[...c.values()]}function k(t,c){u(t.items).forEach((e,s)=>u(e==null?void 0:e.items).forEach((d,f)=>{if(!P(d))return;const a=$(u(d.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};u(d.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?u(r.items):[r]).forEach((o,m)=>{for(const n of u(o==null?void 0:o.annotations)){if(!Array.isArray(n==null?void 0:n.items)||typeof(o==null?void 0:o.id)!="string")continue;const l=n.id??`${o.id}#annotations`,A=w?{key:j(t.id,d.id,s,f,y),item:m,image:o.id}:void 0,E=S(n,l,t.id).map(p=>{const h=q(p.annotation,o),N=Math.round(a.x+h.x*(a.w/h.width)),b=Math.round(a.y+h.y*(a.h/h.height)),g=Math.round(h.w*(a.w/h.width)),I=Math.round(h.h*(a.h/h.height)),M=`${t.id}#xywh=${N},${b},${g},${I}`;return{...p,canvasId:t.id,target:$(M),annotation:{...p.annotation,target:M},...A?{layer:A}:{}}});if(!E.length)continue;let x=c.get(l);x||(x={id:l,label:n.label??o.label,source:"manifest",entries:[]},c.set(l,x)),x.entries.push(...E)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,d={x:0,y:0,w:e,h:s,width:e,height:s},f=u(t==null?void 0:t.target)[0],r=(typeof f=="object"?u(f==null?void 0:f.selector):[]).find(i=>(i==null?void 0:i.type)==="ImageApiSelector"),y=typeof(r==null?void 0:r.region)=="string"?r.region:void 0;if(y){const i=/^(pct:)?([\d.]+),([\d.]+),([\d.]+),([\d.]+)$/.exec(y);if(!i)return d;const[o,m,n,l]=i.slice(2).map(Number);return i[1]?{x:o/100*e,y:m/100*s,w:n/100*e,h:l/100*s,width:e,height:s}:{x:o,y:m,w:n,h:l,width:e,height:s}}const w=$(f).rect;return w?{...w,width:e,height:s}:d}export{K as imageLayers};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var $=Object.defineProperty;var U=(e,t,o)=>t in e?$(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var p=(e,t,o)=>U(e,typeof t!="symbol"?t+"":t,o);let L;function N(e){L=e}function Fe(){return L}function H(e={}){return import("./shared-MTsMddHx.mjs").then(t=>t.aE).then(t=>t.initCloverI18n(e))}const R=new Map,x=new Set;function Je(e,t,o){if(!R.has(t)){R.set(t,{index:e,css:o});for(const n of x)n.place(t,e,o)}}class V{constructor(t){p(this,"injected",new Set);this.doc=t,x.add(this),R.forEach(({index:o,css:n},i)=>this.place(i,o,n))}inject(t,o){this.injected.has(t)||(this.injected.add(t),this.doc.head.prepend(this.style(t,o)))}place(t,o,n){if(this.injected.has(t))return;this.injected.add(t);const i=this.style(t,n);i.dataset.cloverIndex=String(o);const c=[...this.doc.head.querySelectorAll("style[data-clover-index]")],C=c.filter(s=>Number(s.dataset.cloverIndex)<o).at(-1),w=c.find(s=>Number(s.dataset.cloverIndex)>o),v=this.doc.head.querySelectorAll("style[data-clover]");C?C.after(i):w?w.before(i):v.length?v[v.length-1].after(i):this.doc.head.prepend(i)}style(t,o){const n=this.doc.createElement("style");return n.dataset.clover=t,n.textContent=o,n}}const P=new WeakMap;function z(e){let t=P.get(e);return t||P.set(e,t=new V(e)),t}const M="@layer clover{:is(clover-root,clover-items,clover-viewer,clover-panel,clover-read-more):not([hidden]){display:block}:is(clover-body,clover-canvas,clover-timeline,clover-scene):not([hidden]){display:block;height:var(--clover-body-height,60vh)}clover-split:not([hidden]){display:flex}:is(clover-label,clover-panel-toggle):not([hidden]){display:contents}clover-tab,clover-tip,clover-status>[slot]{display:none}}";let W=null,f=null;const B=()=>W??(W=import("./shared-MTsMddHx.mjs").then(e=>e.aF).then(e=>f=e)),F=e=>e.trim().toLowerCase()==="false";function J(e,{type:t,min:o},n){if(e===null)return;if(t==="string")return e;if(t==="boolean")return!F(e);if(t==="number"){const c=Number(e);if(e.trim()===""||!Number.isFinite(c)){n("is not a number");return}if(o!==void 0&&c<o){n(`is less than ${o}`);return}return c}if(t==="data"){const c=e.trim();if(!/^[[{"]/.test(c))return e;try{return JSON.parse(c)}catch{n("is not JSON");return}}const i=e.trim().toLowerCase();if(t.includes(i))return i==="false"?false:i;n(`is not ${t.join(", ")}`)}const K=(e,t)=>{const o=Object.keys(e);return o.length===Object.keys(t).length&&o.every(n=>Object.is(e[n],t[n]))};function Q(e){class t extends HTMLElement{constructor(){super(...arguments);p(this,"kind",e.kind)}static get observedAttributes(){return Object.keys(e.attributes)}connectedCallback(){z(this.ownerDocument).inject("elements",M)}}customElements.define(e.tag,t)}function _(e,t){if(typeof customElements>"u"||customElements.get(e.tag))return;if(e.kind==="config"||!t)return Q(e);const o=e.kind,n=e.properties??[],i=Object.entries(e.events??{});let c=null,C=null;const w=()=>C??(C=Promise.all([t().then(s=>c=s),B()]));class v extends HTMLElement{constructor(){super(...arguments);p(this,"kind",o);p(this,"needsRoot",!!e.needsRoot);p(this,"values",{});p(this,"kept",{});p(this,"props",{});p(this,"listeners",new Set);p(this,"warned",new Set);p(this,"handlers",Object.fromEntries(i.map(([r,a])=>[a.prop,(...g)=>{var b;if(a.keeps&&(this.kept[a.keeps]=g[0]??null,g[0]==null))return true;const y=a.detail==="first"?g[0]:Object.fromEntries(a.detail.map((h,D)=>[h,g[D]])),E=new CustomEvent(r,{detail:y,bubbles:!a.keeps,composed:!a.keeps,cancelable:!!a.cancelable}),S=this.dispatchEvent(E);if(!S&&a.cancelable){const h=g[g.length-1];(b=h==null?void 0:h.preventDefault)==null||b.call(h)}return S}])));p(this,"getProps",()=>this.props);p(this,"subscribe",r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}))}static get observedAttributes(){return Object.keys(e.attributes)}get element(){return this}get Component(){return c}connectedCallback(){for(const r of n){if(!Object.prototype.hasOwnProperty.call(this,r))continue;const a=this[r];delete this[r],a!=null&&(this.values[r]=a)}this.update(),this.warnOfAria(),z(this.ownerDocument).inject("elements",M),w().then(()=>{this.isConnected&&f.hostOf(this.ownerDocument).connect(this)})}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||f==null||f.hostOf(this.ownerDocument).disconnect(this)})}attributeChangedCallback(){this.update()}warnOfAria(){if(!e.native)for(const r of["aria-label","aria-labelledby","role"])!this.hasAttribute(r)||this.warned.has(r)||(this.warned.add(r),console.warn(`<${e.tag}>: ${r} names the element, a box no reader is told of; Clover names what it draws itself.`))}update(){const r={...this.handlers,...this.values};for(const[a,g]of Object.entries(e.attributes)){if(g.prop in this.values)continue;const y=this.getAttribute(a),E=J(y,g,S=>{const b=`${a}=${y}`;this.warned.has(b)||(this.warned.add(b),console.warn(`<${e.tag}>: ${a}="${y}" ${S}; ignored.`))});E!==void 0&&(r[g.prop]=E)}K(r,this.props)||(this.props=r,this.listeners.forEach(a=>a()))}}p(v,"initCloverI18n",H);for(const s of n)Object.defineProperty(v.prototype,s,{configurable:true,enumerable:true,get(){return s in this.values?this.values[s]:this.getProps()[s]},set(m){m==null?delete this.values[s]:this.values[s]=m,this.update()}});for(const[,s]of i){if(!s.keeps)continue;const m=s.keeps;Object.defineProperty(v.prototype,m,{configurable:true,enumerable:true,get(){return this.kept[m]??null}})}customElements.define(e.tag,v)}const G={tag:"clover-panel",kind:"part",needsRoot:true,attributes:{layout:{prop:"layout",type:["tabs","accordion"]},value:{prop:"value",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},closable:{prop:"closable",type:"boolean"},"close-on-escape":{prop:"closeOnEscape",type:"boolean"},as:{prop:"as",type:["aside","div"]}},events:{"clover-value-change":{prop:"onValueChange",detail:["value"]},"clover-close":{prop:"onClose",detail:[],cancelable:true}}},Y={tag:"clover-tab",kind:"config",attributes:{value:{prop:"value",type:"string"},label:{prop:"label",type:"string"}},slots:["label"]},Z={tag:"clover-panel-toggle",kind:"part",attributes:{controls:{prop:"controls",type:"string"}},events:{"clover-open-change":{prop:"onOpenChange",detail:["open"],cancelable:true}}},X={tag:"clover-split",kind:"part",native:true,attributes:{"storage-key":{prop:"storageKey",type:"string"}}},ee={tag:"clover-split-pane",kind:"part",native:true,attributes:{size:{prop:"size",type:"string"},min:{prop:"min",type:"string"},max:{prop:"max",type:"string"},name:{prop:"name",type:"string"}}},te={tag:"clover-split-handle",kind:"part",native:true,attributes:{}},q={"clover-ready":{prop:"onReady",detail:["handle"],keeps:"handle"}},oe={tag:"clover-canvas",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},src:{prop:"src",type:"string"},tiled:{prop:"isTiledImage",type:"boolean"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"viewing-direction":{prop:"viewingDirection",type:["left-to-right","right-to-left","top-to-bottom","bottom-to-top"]},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["iiifContent","canvases","src","annotations","options","controlButtons","controls"],events:{...q,"clover-annotation-select":{prop:"onAnnotationSelect",detail:["id"]},"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},ne={tag:"clover-timeline",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"}},properties:["iiifContent","timeline","annotations","options","controls"],events:{"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},re={tag:"clover-scene",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},label:{prop:"label",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},controls:{prop:"controls",type:"boolean"},engine:{prop:"engine",type:["clover","three"]}},properties:["iiifContent","scene","options","controls"]},ae={tag:"clover-body",kind:"part",needsRoot:true,attributes:{controls:{prop:"controls",type:"boolean"},navigator:{prop:"navigator",type:"boolean"},placeholder:{prop:"placeholder",type:"boolean"},"animate-annotations":{prop:"animateAnnotations",type:"boolean"}},properties:["controls","options","controlButtons","renderers"],events:{...q,"clover-annotation-active":{prop:"onAnnotationActive",detail:["id"]},"clover-caption-change":{prop:"onCaptionChange",detail:["caption"]},"clover-ended":{prop:"onEnded",detail:[]}}},ie={tag:"clover-items",kind:"part",attributes:{layout:{prop:"layout",type:["slider","list","grid","pager"]},size:{prop:"size",type:["large","small"]},of:{prop:"of",type:["views","members","targets","annotations"]},navigation:{prop:"navigation",type:["id","homepage"]},"iiif-content":{prop:"iiifContent",type:"string"},header:{prop:"header",type:"boolean"},"heading-level":{prop:"headingLevel",type:"number",min:2},"thumbnail-size":{prop:"thumbnailSize",type:"number",min:1},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","items","request","renderItem"],events:{"clover-select":{prop:"onSelect",detail:["item"],cancelable:true}}},se=["span","p","div","strong","em","h1","h2","h3","h4","h5","h6"],le={tag:"clover-label",kind:"part",attributes:{of:{prop:"of",type:["manifest","canvas"]},as:{prop:"as",type:se},label:{prop:"label",type:"data"}},properties:["label"]},pe={prop:"of",type:["manifest","canvas"]},T={prop:"value",type:"data"},d=(e,t={})=>({tag:e,kind:"part",attributes:{of:pe,value:T,...t},properties:["value"]}),ce=d("clover-summary",{as:{prop:"as",type:["p","div","span"]}}),de={...d("clover-metadata"),properties:["value","renderValue"]},ge=d("clover-required-statement"),ue=d("clover-rights"),ve=d("clover-id"),he=d("clover-homepage"),me=d("clover-rendering"),ye=d("clover-see-also"),be=d("clover-part-of"),fe=d("clover-thumbnail",{size:{prop:"size",type:"number",min:1},alt:{prop:"alt",type:"string"}}),ke=d("clover-provider",{link:{prop:"link",type:["false"]}}),Ce=d("clover-logo",{alt:{prop:"alt",type:"string"}}),we={tag:"clover-value",kind:"part",attributes:{value:T,format:{prop:"format",type:"string"},"heading-level":{prop:"headingLevel",type:"number",min:1},as:{prop:"as",type:["span","p","div"]}},properties:["value"]},Ee={tag:"clover-root",kind:"root",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"canvasId",type:"string"},"manifest-id":{prop:"manifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"annotation-pages":{prop:"annotationPages",type:["view","all"]},lang:{prop:"lang",type:"string"}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-ready":{prop:"onReady",detail:["clover"],keeps:"clover"},"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},k={"heading-level":{prop:"headingLevel",type:"number",min:1}},A={of:{prop:"of",type:["views","members","targets"]}},Se={tag:"clover-status",kind:"part",needsRoot:true,attributes:{loading:{prop:"loading",type:["false"]}},slots:["loading","error"]},Oe={tag:"clover-position",kind:"part",needsRoot:true,attributes:{...A,as:{prop:"as",type:["span","p","div"]}}},Re={tag:"clover-next",kind:"part",needsRoot:true,attributes:A},Ae={tag:"clover-previous",kind:"part",needsRoot:true,attributes:A},Pe={tag:"clover-download",kind:"part",needsRoot:true,attributes:k},je={tag:"clover-search",kind:"part",needsRoot:true,attributes:{...k,sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},Ie={tag:"clover-contents",kind:"part",needsRoot:true,attributes:{}},Le={tag:"clover-transcript",kind:"part",needsRoot:true,attributes:{follow:{prop:"follow",type:"boolean"},find:{prop:"find",type:"boolean"},sticky:{prop:"sticky",type:"boolean"},size:{prop:"size",type:["large","small"]}}},xe={tag:"clover-annotations",kind:"part",needsRoot:true,attributes:{scope:{prop:"scope",type:["view","all"]},...k},properties:["renderEntry"]},ze={tag:"clover-collection",kind:"part",needsRoot:true,attributes:k},Me={tag:"clover-collection-select",kind:"part",needsRoot:true,attributes:{},events:{"clover-change":{prop:"onChange",detail:["manifestId"]}}},qe={tag:"clover-about",kind:"part",needsRoot:true,attributes:{"canvas-summary":{prop:"canvasSummary",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},thumbnail:{prop:"thumbnail",type:"boolean"},label:{prop:"label",type:"boolean"},...k}},Te={tag:"clover-map",kind:"part",attributes:{"iiif-content":{prop:"iiifContent",type:"string"},overlay:{prop:"overlay",type:"boolean"},"overlay-opacity":{prop:"overlayOpacity",type:"number",min:0},"style-url":{prop:"styleUrl",type:"string"},"scroll-zoom":{prop:"scrollZoom",type:"boolean"},credits:{prop:"credits",type:"boolean"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"}},properties:["iiifContent","navPlace","georeferences","request"],events:{"clover-select":{prop:"onSelect",detail:["feature"]}}},De={tag:"clover-read-more",kind:"part",attributes:{}},$e={tag:"clover-tip",kind:"part",attributes:{label:{prop:"label",type:"string"},lang:{prop:"lang",type:"string"},keys:{prop:"keys",type:"string"},glyph:{prop:"glyph",type:"string"}},properties:["shortcut"]},Ue={tag:"clover-viewer",kind:"alone",attributes:{template:{prop:"template",type:["default","document","gallery"]},"iiif-content":{prop:"iiifContent",type:"string"},"canvas-id":{prop:"defaultCanvasId",type:"string"},"manifest-id":{prop:"defaultManifestId",type:"string"},language:{prop:"language",type:"string"},"high-contrast":{prop:"highContrast",type:"boolean"},"search-query":{prop:"searchQuery",type:"string"},annotations:{prop:"annotations",type:"data"},"heading-level":{prop:"headingLevel",type:"number",min:2},items:{prop:"items",type:["slider","list","grid","false"]},header:{prop:"header",type:"boolean"},panel:{prop:"panel",type:"boolean"},download:{prop:"download",type:"boolean"},languages:{prop:"languages",type:"boolean"},"panel-open":{prop:"defaultPanelOpen",type:"boolean"},"panel-layout":{prop:"panelLayout",type:["accordion","tabs"]},"sidebar-open":{prop:"defaultSidebarOpen",type:"boolean"},"storage-key":{prop:"storageKey",type:"string"},fill:{prop:"fill",type:"boolean"},size:{prop:"size",type:"string"}},properties:["iiifContent","annotations","request","renderers"],events:{"clover-canvas-change":{prop:"onCanvasChange",detail:["canvasId"]},"clover-manifest-change":{prop:"onManifestChange",detail:["manifestId"]},"clover-status-change":{prop:"onStatusChange",detail:["status","error"]},"clover-content-state-change":{prop:"onContentStateChange",detail:"first"}}},j=[Ue,Ee,ae,le,ie,Oe,Ae,Re,Se,fe,ce,de,ge,ue,he,ye,me,be,ve,ke,Ce,we,qe,xe,ze,Me,Ie,je,Le,Pe,Te,G,Y,Z,X,ee,te,oe,ne,re,$e,De],l=(e,t,o)=>()=>Promise.all([e(),import("./part-CXts97_M.mjs")]).then(([n,{drawn:i}])=>i(n[t],o)),O=e=>()=>import("./split-Hp6z-v4h.mjs").then(t=>t[e]),u=e=>l(()=>import("./Primitives-BmODPlnK.mjs"),e),I=e=>l(()=>import("./Pager-DnJknq92.mjs"),e),Ne={"clover-viewer":()=>import("./viewer-CH7re5OO.mjs").then(e=>e.v).then(e=>e.ViewerElement),"clover-root":()=>import("./shared-MTsMddHx.mjs").then(e=>e.aH).then(e=>e.RootElement),"clover-label":()=>import("./label-CI88KH2_.mjs").then(e=>e.LabelElement),"clover-body":()=>import("./body-CkOBHlJ0.mjs").then(e=>e.BodyElement),"clover-items":()=>import("./items-CnAIl9fS.mjs").then(e=>e.ItemsElement),"clover-position":l(()=>import("./Position-BkWBRBfW.mjs"),"Position"),"clover-previous":I("Previous"),"clover-next":I("Next"),"clover-status":()=>import("./status-BmtuKfAG.mjs").then(e=>e.StatusElement),"clover-thumbnail":u("Thumbnail"),"clover-summary":u("Summary"),"clover-metadata":l(()=>import("./Primitives-BmODPlnK.mjs"),"Metadata",["renderValue"]),"clover-required-statement":u("RequiredStatement"),"clover-rights":u("Rights"),"clover-homepage":u("Homepage"),"clover-see-also":u("SeeAlso"),"clover-rendering":u("Rendering"),"clover-part-of":u("PartOf"),"clover-id":u("Id"),"clover-provider":()=>import("./provider-BpxorEiq.mjs").then(e=>e.ProviderElement),"clover-logo":()=>import("./logo-Ckwj7FlP.mjs").then(e=>e.LogoElement),"clover-value":u("Value"),"clover-about":l(()=>import("./About-DhOGPFaI.mjs").then(e=>e.a),"About"),"clover-annotations":l(()=>import("./Annotations-DDjSrBL5.mjs"),"Annotations",["renderEntry"]),"clover-collection":l(()=>import("./Collection-B9swJtPW.mjs"),"Collection"),"clover-collection-select":l(()=>import("./CollectionSelect-CBWUbqQi.mjs"),"CollectionSelect"),"clover-contents":l(()=>import("./Contents-D7FPxSH-.mjs"),"Contents"),"clover-search":l(()=>import("./Search-CbmK9vLp.mjs"),"Search"),"clover-transcript":l(()=>import("./Transcript-ZVXM3ZDA.mjs"),"Transcript"),"clover-download":l(()=>import("./Download-BOYNIb7C.mjs"),"Download"),"clover-map":l(()=>import("./Map--dJhk0_0.mjs"),"CloverMap"),"clover-panel":()=>import("./panel-C17Rl9Ya.mjs").then(e=>e.PanelElement),"clover-panel-toggle":()=>import("./toggle-C7ODWDEZ.mjs").then(e=>e.PanelToggleElement),"clover-split":O("SplitElement"),"clover-split-pane":O("SplitPaneElement"),"clover-split-handle":O("SplitHandleElement"),"clover-canvas":()=>import("./canvas-CWf_Fag8.mjs").then(e=>e.CanvasElement),"clover-timeline":l(()=>import("./Timeline-CfIF4APc.mjs"),"Timeline"),"clover-scene":l(()=>import("./Scene-Ctcdt7CD.mjs"),"Scene"),"clover-tip":()=>import("./tip-C-oovDZK.mjs").then(e=>e.TipElement),"clover-read-more":()=>import("./read-more-BDM_6CVc.mjs").then(e=>e.ReadMoreElement)};function He(e,t=j.map(({tag:o})=>o)){e.mapWorkerUrl&&N(e.mapWorkerUrl);for(const o of j)t.includes(o.tag)&&_(o,Ne[o.tag])}const Ve=""+new URL("assets/maplibre-gl-worker-kTz9OPxr.js",import.meta.url).href,We={mapWorkerUrl:Ve};He(We);export{Je as a,He as d,Fe as g,H as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as m,u as r}from"./shared-MTsMddHx.mjs";import{I as o}from"./Items-BHzT9A73.mjs";import{w as n}from"./nodes-CTw9OqlA.mjs";function I({props:t}){const e=m(()=>n(t,["renderItem"]),[t]);return r(o,{...e})}export{I as ItemsElement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as p,W as l,E as r,r as g,a9 as v}from"./shared-MTsMddHx.mjs";function h(t){var i;return(i=v(t).find(({body:a})=>a.type))==null?void 0:i.body.type}function y(t){const i=h(t)??(t.type==="Timeline"?"Sound":void 0);return{id:t.id,type:t.type,label:t.label,resource:t,duration:Number(t.duration)||void 0,media:i}}const f=new WeakMap;function O(t){if(!t)return[];let i=f.get(t);if(!i){const{canvases:a,views:e}=r(t);i=e.map(u=>{const n=u.map(s=>y(a[s]));return{id:n[0].id,parts:n,label:n.length===1?n[0].label:{none:[n.map(s=>g(s.label).text).filter(Boolean).join(" \u2013 ")]}}}),f.set(t,i)}return i}const d=new WeakMap;function o(t){if(!t)return[];let i=d.get(t);return i||(i=p(t.items).filter(a=>a==null?void 0:a.id).map(a=>{var e;return{id:a.id,parts:[y(a)],label:a.label,summary:a.summary,...typeof a.navDate=="string"?{navDate:a.navDate}:{},href:((e=p(a.homepage)[0])==null?void 0:e.id)??a.id,...l(p(a.homepage)[0])?{hrefLang:l(p(a.homepage)[0])}:{}}}),d.set(t,i)),i}function A(t){return t?Array.isArray(t)?o({items:t}):t.type==="Collection"?o(t):O(t):[]}export{O as a,A as b,o as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./shared-MTsMddHx.mjs";import{L as o}from"./Label-KabnxuMN.mjs";function n({props:r}){return e(o,{...r})}export{n as LabelElement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a4 as K,a5 as O,O as g,a6 as j,a7 as E,w as G}from"./shared-MTsMddHx.mjs";import{b as H}from"./imageService-0eTvQ-3h.mjs";import{c as J}from"./choice-key-BUNebLKe.mjs";const Q=/^((application|audio|video)\/)?(vnd\.apple\.|x-)?mpegurl$/i,U=(t,o)=>!!(t&&/\.m3u8$/i.test(t.split(/[?#]/)[0]))||!!(o&&Q.test(o)),X={width:1600,height:900};function tt(t,o){const e=new Array(t.length);if(!t.length)return e;const n=t.map(N),i=o==="left-to-right"||o==="right-to-left",s=o==="right-to-left"||o==="bottom-to-top",u=i?n[0].height:n[0].width,r=t.map((a,d)=>d);s&&r.reverse();let c=0;for(const a of r){const d=n[a],f=u/(i?d.height:d.width),y=d.width*f,p=d.height*f;e[a]=i?{x:c,y:0,width:y,height:p}:{x:0,y:c,width:y,height:p},c+=i?y:p}return e}function N(t){var s,u;if(t.width&&t.height)return{width:t.width,height:t.height};const o=L(t);if(o!=null&&o.width&&o.height)return{width:o.width,height:o.height};const e=((s=k(t)[0])==null?void 0:s.body)??((u=W(t)[0])==null?void 0:u.body),n=Number(e==null?void 0:e.width),i=Number(e==null?void 0:e.height);return n>0&&i>0?{width:n,height:i}:X}function L(t){return t.accompanyingContainer??t.placeholderContainer}function ot(t,o,e,n,i){return J(t.id,o.id,e,n,i)}function pt(t){const o=[];for(const e of t)R(e,(n,i)=>{const s=n;if((s==null?void 0:s.type)!=="Choice")return;const u=g(s.items).filter(r=>!!r&&typeof r=="object");u.length>1&&o.push({key:i,canvasId:e.id,label:s.label,items:u.map(r=>({label:r.label,id:r.id,...typeof r.type=="string"?{type:r.type}:{},...typeof r.format=="string"?{format:r.format}:{}}))})});return o}const F={};function et(t){if(t.type!=="Video"&&!E(t.type)||!t.format||U(t.id,t.format)||typeof document>"u")return true;const o=t.type==="Video"?"video":"audio",e=F[o]??(F[o]=document.createElement(o));return typeof e.canPlayType!="function"?true:e.canPlayType(t.format)!==""}function lt(t){const o={};for(const e of t){const n=e.items.findIndex(et);n>0&&(o[e.key]=n)}return o}const V=new WeakMap,z=[];function nt(t){return j(t).some(o=>((o==null?void 0:o.type)==="Choice"?g(o.items):[o]).some(n=>(n==null?void 0:n.type)==="Video"||E(n==null?void 0:n.type)))}function it(t){var u;const o=V.get(t);if(o)return o;const e=[];for(const r of t.items??[])for(const c of r.items??[]){if(!K(c))continue;const a=c.target?(u=O(c.target))==null?void 0:u.t:void 0;if(!a)continue;const[d,f]=a.split(",").map(Number);Number.isFinite(d)&&e.push({annotation:c,start:d,end:Number.isFinite(f)?f:NaN})}if(e.every(r=>nt(r.annotation)))return V.set(t,z),z;e.sort((r,c)=>r.start-c.start);const n=Number(t.duration),i=Number.isFinite(n)&&n/e.length||.5;e.forEach((r,c)=>{var d;const a=(d=e[c+1])==null?void 0:d.start;r.end>r.start||(a!=null?r.end=a>r.start?a:r.start+i:Number.isFinite(n)&&n>r.start?r.end=n:r.end>r.start||(r.end=r.start+i))});const s=e.length>1?e:z;return V.set(t,s),s}const A=t=>`frame:${t.id}`;function R(t,o){(t.items??[]).forEach((e,n)=>{(e.items??[]).forEach((i,s)=>{K(i)&&j(i).forEach((u,r)=>o(u,ot(t,i,n,s,r),i))})})}function k(t,o={},{allFrames:e=false}={}){const n=[];return D(t,o,(i,s,u)=>{i.body.type==="Image"&&n.push({body:i.body,region:i.region,...i.rotation?{rotation:i.rotation}:{},target:s,...u>=0?{frame:u}:{}})},e),n}function W(t,o={}){const e=[];return D(t,o,(n,i,s,u)=>{const r=n.body.type;if(r!=="Video"&&!E(r))return;const c=G(u);e.push({kind:r==="Video"?"video":"audio",body:n.body,target:i,...c?{time:c}:{}})}),e}function rt(t){const o=t.filter(n=>n.time&&typeof n.body.id=="string"),e=new Set(o.map(n=>n.time.start));if(!(o.length<2||e.size!==o.length))return o.sort((n,i)=>n.time.start-i.time.start).map(n=>{const i=Number(n.body.duration)||(n.time.end!==void 0?n.time.end-n.time.start:void 0);return{src:n.body.id,...n.body.format?{format:n.body.format}:{},start:n.time.start,...i?{duration:i}:{}}})}function D(t,o,e,n=false){const i=t.width??0,s=t.height??0,u=it(t),r=Math.min(o[A(t)]??0,Math.max(0,u.length-1));R(t,(c,a,d)=>{const f=u.findIndex(x=>x.annotation===d);if(!n&&f>=0&&f!==r)return;const y=M(c,o[a]??0);if(!y)return;const p=d.target?O(d.target):void 0,b=p==null?void 0:p.rect;e(y,b?{x:b.x,y:b.y,width:b.w,height:b.h}:{x:0,y:0,width:i||Number(y.body.width)||0,height:s||Number(y.body.height)||0},f,p==null?void 0:p.t)})}function st(t){return ut(t).filter(o=>o.kind!=="transcript")}function ct(t){const o=g(t.provides);return o.includes("closedCaptions")?"captions":o.includes("subtitles")||o.includes("translation")?"subtitles":o.includes("transcript")?"transcript":"captions"}function ut(t){const o=[],e=[...t.annotations??[],...t.items??[]];for(const n of e)for(const i of n.items??[])if(g(i.motivation).includes("supplementing"))for(const s of g(i.body)){const u=s,r=(u==null?void 0:u.type)==="Choice"?g(u.items):[u];for(const c of r){const a=c==null?void 0:c.id;!((c==null?void 0:c.format)==="text/vtt"||typeof a=="string"&&/\.vtt(\?|$)/i.test(a))||typeof a!="string"||o.push({id:a,label:c.label,language:g(c.language)[0],kind:ct(i)})}}return o}function yt(t){const o=[],e=i=>{const s=i,u=s==null?void 0:s.id;if(typeof u!="string"||o.some(c=>c.id===u))return;const r=s==null?void 0:s.format;(r?r!=="text/plain":!/\.txt(\?|$)/i.test(u))||o.push({id:u,label:s==null?void 0:s.label,language:g(s==null?void 0:s.language)[0]})},n=[...t.annotations??[],...t.items??[]];for(const i of n)for(const s of i.items??[])if(g(s.motivation).includes("supplementing"))for(const u of g(s.body)){const r=u;((r==null?void 0:r.type)==="Choice"?g(r.items):[r]).forEach(e)}return g(t.rendering).forEach(e),o}function M(t,o=0){if(!t||typeof t!="object")return null;const e=t;if(e.type==="Choice"){const n=g(e.items);return M(n[o]??n[0])}if(e.type==="SpecificResource"&&e.source){const n=typeof e.source=="string"?{id:e.source}:e.source,i=g(e.selector).find(r=>(r==null?void 0:r.type)==="ImageApiSelector"),s=M({type:"Image",...n});if(!s)return null;const u=(i==null?void 0:i.rotation)!=null?String(i.rotation):void 0;return{...s,region:(i==null?void 0:i.region)||s.region,...u?{rotation:u}:{}}}return e.type!=="Image"&&e.type!=="Video"&&!E(e.type)?null:{body:e,region:typeof e.region=="string"?e.region:void 0}}function mt(t,o,e={},{standIns:n=true}={}){const i=tt(t,o),s=[],u=[],r={};return t.forEach((c,a)=>{const d=i[a],f=N(c),y=d.width/f.width,p=d.height/f.height,b=h=>({x:d.x+h.x*y,y:d.y+h.y*p,width:h.width*y,height:h.height*p}),x=W(c,e),I=k(c,e,{allFrames:true}).map(h=>({...h,canvas:c})),S=L(c);if(n&&!I.length&&x.some(h=>h.kind==="audio")&&S){const h=N(S);for(const l of k(S))I.push({...l,canvas:S,target:{x:l.target.x/h.width*f.width,y:l.target.y/h.height*f.height,width:l.target.width/h.width*f.width,height:l.target.height/h.height*f.height}})}const Y=e[A(c)]??0;I.forEach(({body:h,target:l,region:T,rotation:$,frame:w,canvas:Z},q)=>{var P;const C=H(h.service);if(!C&&!h.id)return;const _=`${Z.id}|${q}|${h.id??C}|${T??""}|${$??""}`,B=!(C&&T);if(s.push({id:_,service:C,url:h.id,width:B&&Number(h.width)||void 0,height:B&&Number(h.height)||void 0,region:T,...$?{rotation:$}:{},placement:b(l),...w!=null&&w!==Y?{hidden:true}:{}}),w!=null){const v=r[P=A(c)]??(r[P]=[]);(v[w]??(v[w]=[])).push(_)}});const[m]=x;if(m!=null&&m.body.id){const h=rt(x),l=h?h[0]:void 0;u.push({id:`${c.id}|media|${m.body.id}`,kind:m.kind,src:(l==null?void 0:l.src)??m.body.id,format:l?l.format:m.body.format,placement:b(m.target),duration:h?Number(c.duration)||void 0:Number(m.body.duration??c.duration)||void 0,...h?{segments:h}:{},poster:ht(c),captions:st(c)})}}),{images:s,media:u,placements:i,frames:r}}function ht(t){var o;return(o=dt(t))==null?void 0:o.source}const bt=1280;function dt(t){var c;const o=t.placeholderContainer;if(!o)return;const e=(c=k(o)[0])==null?void 0:c.body;if(!e)return;const n=H(e.service),i=typeof e.id=="string"?e.id:void 0,s=n?{service:n,fallback:i}:i?{src:i}:void 0;if(!s)return;const{width:u,height:r}=N(o);return{source:s,width:u,height:r}}function wt(t,o,e){const n=N(t),i=o.width/n.width,s=o.height/n.height;return{x:o.x+e.x*i,y:o.y+e.y*s,width:e.width*i,height:e.height*s}}export{bt as S,yt as a,it as b,ut as c,mt as d,A as e,pt as f,wt as g,N as h,W as i,st as j,U as k,et as l,dt as p,M as r,lt as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as t}from"./shared-MTsMddHx.mjs";import{L as n}from"./Provider-C8se8i4I.mjs";function i({hosted:o,props:r}){var e;return((e=o.element.parentElement)==null?void 0:e.localName)==="clover-provider"?null:t(n,{...r})}export{i as LogoElement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","bodyUnloadableImage":"Dette bildet kunne ikke lastes inn.","bodyUnloadableVideo":"Denne videoen kunne ikke lastes inn.","bodyUnloadableAudio":"Denne lyden kunne ikke lastes inn.","bodyUnloadableModel":"Denne modellen kunne ikke lastes inn.","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutDate":"Dato","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","contentsSectionsIn":"Deler av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visninger","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerClose":"Lukk avspilleren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","frameRepeat":"Gjenta","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"F\xF8rre","commonSearch":"S\xF8k","commonViewAll":"Sj\xE5 alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Lastar inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultat","contentSearchError":"S\xF8ket kunne ikkje fullf\xF8rast.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilete","bodyUnloadableImage":"Dette biletet kunne ikkje lastast inn.","bodyUnloadableVideo":"Denne videoen kunne ikkje lastast inn.","bodyUnloadableAudio":"Denne lyden kunne ikkje lastast inn.","bodyUnloadableModel":"Denne modellen kunne ikkje lastast inn.","canvasRoleDescription":"zoombart bilete","canvasKeysImage":"Bruk piltastane for \xE5 flytte biletet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spele av eller pause, J eller L for \xE5 spole ti sekund bakover eller framover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valet av annoteringa.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastane for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visinga, og R eller Shift+R for \xE5 rotere han mot h\xF8gre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visinga","statusLoading":"Lastar inn\u2026","statusError":"Dette kunne ikkje lastast inn.","itemsLabel":"Element","download":"Last ned","downloadPage":"Denne sida","downloadAll":"Alle sider","templateSidebar":"Element","templateSidebarToggle":"Vis element","collectionLabel":"Samling","itemsScrollBack":"Vis f\xF8rre element","itemsScrollForward":"Vis fleire element","aboutRights":"Rettigheiter","aboutDate":"Dato","aboutHomepage":"Heimeside","aboutSeeAlso":"Sj\xE5 ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"Opne heile manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringar","annotationsHideTip":"Skjul","readMore":"Les meir","readLess":"Les mindre","annotationsShow":"Vis p\xE5 biletet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilete","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"Opne lenkja","transcriptLabel":"Transkripsjon","imageViewerOpen":"Opne biletvisaren","imageViewerClose":"Lukk biletvisaren","canvasChoice":"Val","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8gre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis f\xF8rre faner","sectionsScrollForward":"Vis fleire faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringar","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhald","contentsSectionsIn":"Delar av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visingar","mapUnavailable":"Kartet kunne ikkje visast.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Stad {{number}}","mapOverlay":"Georeferert bilete","mapPlacesListed":"Stader lista opp etter kartet: {{count}}","informationPanelToggle":"Meir informasjon","playerPlay":"Spel av","playerPause":"Pause","playerClose":"Lukk avspelaren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspelingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapittel","frameRepeat":"Gjenta","playerCurrentTime":"Noverande tid","playerDuration":"Varigheit","splitHandle":"Endre storleiken p\xE5 panela"}');export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=JSON.parse('{"commonClose":"Lukk","commonNext":"Neste","commonPrevious":"Forrige","commonSearch":"S\xF8k","commonViewAll":"Se alle","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"Laster inn...","contentSearchPlaceholder":"S\xF8k","contentSearchResultsNone":"Ingen resultat","contentSearchResult":"1 resultat","contentSearchResults":"{{count}} resultater","contentSearchError":"S\xF8ket kunne ikke fullf\xF8res.","contentSearchPosition":"Resultat {{index}} av {{total}}","contentSearchClear":"T\xF8m s\xF8ket","canvasPosition":"Element {{index}} av {{total}}","canvasImage":"Bilde","bodyUnloadableImage":"Dette bildet kunne ikke lastes inn.","bodyUnloadableVideo":"Denne videoen kunne ikke lastes inn.","bodyUnloadableAudio":"Denne lyden kunne ikke lastes inn.","bodyUnloadableModel":"Denne modellen kunne ikke lastes inn.","canvasRoleDescription":"zoombart bilde","canvasKeysImage":"Bruk piltastene for \xE5 flytte bildet, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere.","canvasKeysMedia":"Trykk mellomrom eller K for \xE5 spille av eller pause, J eller L for \xE5 spole ti sekunder bakover eller fremover, og M for \xE5 sl\xE5 lyden av eller p\xE5.","canvasKeysAnnotations":"Trykk Esc for \xE5 fjerne valget av annoteringen.","sceneModel":"3D-modell","sceneRoleDescription":"roterbar 3D-modell","sceneKeys":"Bruk piltastene for \xE5 rotere modellen, med Shift for lengre steg, pluss og minus for \xE5 zoome, 0 for \xE5 tilbakestille visningen, og R eller Shift+R for \xE5 rotere den mot h\xF8yre eller venstre.","sceneRotateUp":"Roter oppover","sceneRotateDown":"Roter nedover","sceneRotate":"Roter","sceneResetView":"Tilbakestill visningen","statusLoading":"Laster inn\u2026","statusError":"Dette kunne ikke lastes inn.","itemsLabel":"Elementer","download":"Last ned","downloadPage":"Denne siden","downloadAll":"Alle sider","templateSidebar":"Elementer","templateSidebarToggle":"Vis elementer","collectionLabel":"Samling","itemsScrollBack":"Vis forrige elementer","itemsScrollForward":"Vis flere elementer","aboutRights":"Rettigheter","aboutDate":"Dato","aboutHomepage":"Hjemmeside","aboutSeeAlso":"Se ogs\xE5","aboutProvider":"Leverand\xF8r","logo":"Logo","aboutManifest":"IIIF-manifest","aboutCanvas":"IIIF-lerret","aboutPartOf":"Del av","aboutOpenManifest":"\xC5pne hele manifestet","aboutCollection":"IIIF-samling","readingLanguage":"Spr\xE5k","annotationsHide":"Skjul annoteringer","annotationsHideTip":"Skjul","readMore":"Les mer","readLess":"Les mindre","annotationsShow":"Vis p\xE5 bildet","annotationsShowTime":"Vis i opptaket","annotationsImage":"Bilde","annotationsLanguage":"Spr\xE5k","annotationsOpenLink":"\xC5pne lenken","transcriptLabel":"Transkripsjon","imageViewerOpen":"\xC5pne bildeviseren","imageViewerClose":"Lukk bildeviseren","canvasChoice":"Valg","imageFullScreen":"Fullskjerm","imageExitFullScreen":"Avslutt fullskjerm","imageResetZoom":"Tilbakestill zoom","imageRotateLeft":"Roter mot venstre","imageRotateRight":"Roter mot h\xF8yre","imageZoomIn":"Zoom inn","imageZoomOut":"Zoom ut","informationPanelTabs":"Informasjonspanel","sectionsScrollBack":"Vis forrige faner","sectionsScrollForward":"Vis flere faner","informationPanelClose":"Lukk informasjonspanelet","informationPanelTabsAbout":"Om","informationPanelTabsAnnotations":"Annoteringer","informationPanelTabsSearch":"S\xF8k","informationPanelTabsContents":"Innhold","contentsSectionsIn":"Deler av","informationPanelTabsMap":"Kart","informationPanelTabsCollection":"Samling","informationPanelTabsTargets":"Visninger","mapUnavailable":"Kartet kunne ikke vises.","mapLabel":"Kart","mapAttribution":"Kartkreditering","mapPlaceUntitled":"Sted {{number}}","mapOverlay":"Georeferert bilde","mapPlacesListed":"Steder oppf\xF8rt etter kartet: {{count}}","informationPanelToggle":"Mer informasjon","playerPlay":"Spill av","playerPause":"Pause","playerClose":"Lukk avspilleren","playerMute":"Demp","playerUnmute":"Sl\xE5 p\xE5 lyd","playerVolume":"Volum","playerSeek":"Avspillingsposisjon","playerCaptions":"Teksting","playerCaptionsOff":"Av","playerChapters":"Kapitler","frameRepeat":"Gjenta","playerCurrentTime":"N\xE5v\xE6rende tid","playerDuration":"Varighet","splitHandle":"Endre st\xF8rrelse p\xE5 panelene"}');export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const T=[".clover-canvas-controls",".clover-canvas-navigator",".clover-canvas-transport",'.clover-canvas-caption[data-open="true"]',".clover-canvas-menu",".clover-canvas-placeholder-toggle",".clover-canvas-exit-full-screen"].join(", "),v=(r,i,a,e)=>r<e&&a<i;function A(r,i){var C;const a=(C=r.overlays)==null?void 0:C.container;if(!a)return;const e=a.closest(".clover-canvas");if((e==null?void 0:e.getAttribute("data-navigable"))==="false")return;const n=a.getBoundingClientRect();if(!n.width||!n.height)return;const l={top:n.top,right:n.right,bottom:n.bottom,left:n.left};let b=Array.from((e==null?void 0:e.querySelectorAll(T))??[]).flatMap(o=>{if(o.closest(".clover-canvas")!==e)return[];const[s=0,t=0]=(getComputedStyle(o).translate||"").split(" ").map(p=>parseFloat(p)||0),f=o.getBoundingClientRect(),u=f.top-t,d=f.right-s,y=f.bottom-t,M=f.left-s;if(!f.width||!f.height||!v(M,d,n.left,n.right)||!v(u,y,n.top,n.bottom))return[];const w=[["top",y-n.top],["bottom",n.bottom-u],["left",d-n.left],["right",n.right-M]],[B]=w.reduce((p,R)=>R[1]<p[1]?R:p);return[{side:B,top:u,right:d,bottom:y,left:M}]});const m=[i,i.querySelector(".clover-canvas-annotation-point")].filter(o=>!!o).map(o=>o.getBoundingClientRect()),c={top:Math.min(...m.map(o=>o.top)),right:Math.max(...m.map(o=>o.right)),bottom:Math.max(...m.map(o=>o.bottom)),left:Math.min(...m.map(o=>o.left))};let h=0,g=0;for(let o=true;o;){const s=b.filter(t=>t.side==="top"||t.side==="bottom"?v(t.left,t.right,c.left+h,c.right+h):v(t.top,t.bottom,c.top+g,c.bottom+g));b=b.filter(t=>!s.includes(t)),o=s.length>0;for(const t of s)t.side==="top"&&(l.top=Math.max(l.top,t.bottom)),t.side==="bottom"&&(l.bottom=Math.min(l.bottom,t.top)),t.side==="left"&&(l.left=Math.max(l.left,t.right)),t.side==="right"&&(l.right=Math.min(l.right,t.left));h=S(c.left,c.right,l.left,l.right),g=S(c.top,c.bottom,l.top,l.bottom)}if(!h&&!g)return;const x=r.worldToScreenPoint(r.getCamera());r.panTo(r.screenToWorldPoint({x:x.x-h,y:x.y-g}))}function S(r,i,a,e){return i-r>e-a?(a+e-r-i)/2:r<a?a-r:i>e?e-i:0}export{A as panClearOfControls};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as i,u as e}from"./shared-MTsMddHx.mjs";import{w as u}from"./nodes-CTw9OqlA.mjs";function a(r,t=[]){return function({props:n}){const o=i(()=>u(n,t),[n]);return e(r,{...o})}}export{a as drawn};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y,c as E,b as v,T as S}from"./BodyUnloadable-DcTM7hHF.mjs";const M=r=>{const s=new Map,p=e=>{var t;return(t=s.get(e))==null?void 0:t.forEach(i=>i())};let a=false,o=null,n=null,d=false,l=null;const u=e=>{y(e)&&(d=true)},m=e=>{l=e.isPrimary&&e.button===0&&(e.target===r||e.target===n)?{x:e.clientX,y:e.clientY,t:e.timeStamp,direct:E(e.pointerType,d)}:null},f=e=>{const t=l;l=null,!(!t||e.timeStamp-t.t>=v||Math.hypot(e.clientX-t.x,e.clientY-t.y)>S)&&!(o!=null&&o())&&!t.direct&&p("tap")},c=e=>{e!==n&&(n==null||n.remove(),n=e,n&&(Object.assign(n.style,{position:"absolute",inset:"0",width:"100%",height:"100%",objectFit:"contain"}),n.classList.add("clover-canvas-dom-media"),r.append(n)))};return r.addEventListener("pointermove",u),r.addEventListener("pointerdown",m),r.addEventListener("pointerup",f),{host:r,get isOpen(){return a},on(e,t){const i=s.get(e)??new Set;return s.set(e,i.add(t)),()=>i.delete(t)},async setImages(e,{world:t}={}){var g,L;const i=(L=(g=e.find(w=>w.media))==null?void 0:g.media)==null?void 0:L.element;c(i instanceof HTMLVideoElement?i:null),!(!t&&!e.length)&&(p(a?"change":"open"),a=true)},clear:()=>c(null),setDismiss(e){o=e},setGestures(){},dispose(){c(null),s.clear(),r.removeEventListener("pointermove",u),r.removeEventListener("pointerdown",m),r.removeEventListener("pointerup",f)}}};export{M as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=JSON.parse('{"commonClose":"Fechar","commonNext":"Seguinte","commonPrevious":"Anterior","commonSearch":"Pesquisar","commonViewAll":"Ver tudo","controlShortcut":"{{label}} ({{shortcut}})","contentSearchLoading":"A carregar...","contentSearchPlaceholder":"Pesquisar","contentSearchResultsNone":"Sem resultados","contentSearchResult":"1 resultado","contentSearchResults":"{{count}} resultados","contentSearchError":"N\xE3o foi poss\xEDvel concluir a pesquisa.","contentSearchPosition":"Resultado {{index}} de {{total}}","contentSearchClear":"Limpar a pesquisa","canvasPosition":"Item {{index}} de {{total}}","canvasImage":"Imagem","bodyUnloadableImage":"N\xE3o foi poss\xEDvel carregar esta imagem.","bodyUnloadableVideo":"N\xE3o foi poss\xEDvel carregar este v\xEDdeo.","bodyUnloadableAudio":"N\xE3o foi poss\xEDvel carregar este \xE1udio.","bodyUnloadableModel":"N\xE3o foi poss\xEDvel carregar este modelo.","canvasRoleDescription":"imagem ampli\xE1vel","canvasKeysImage":"Use as teclas de seta para deslocar a imagem, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para rodar.","canvasKeysMedia":"Prima Espa\xE7o ou K para reproduzir ou pausar, J ou L para recuar ou avan\xE7ar dez segundos, e M para silenciar ou ativar o som.","canvasKeysAnnotations":"Prima Esc para desmarcar a anota\xE7\xE3o.","sceneModel":"Modelo 3D","sceneRoleDescription":"modelo 3D rotativo","sceneKeys":"Use as teclas de seta para rodar o modelo, com Shift para ir mais longe, mais e menos para ampliar e reduzir, 0 para repor a vista, e R ou Shift+R para o rodar para a direita ou para a esquerda.","sceneRotateUp":"Rodar para cima","sceneRotateDown":"Rodar para baixo","sceneRotate":"Rodar","sceneResetView":"Repor a vista","statusLoading":"A carregar\u2026","statusError":"N\xE3o foi poss\xEDvel carregar este conte\xFAdo.","itemsLabel":"Itens","download":"Transferir","downloadPage":"Esta p\xE1gina","downloadAll":"Todas as p\xE1ginas","templateSidebar":"Itens","templateSidebarToggle":"Mostrar itens","collectionLabel":"Cole\xE7\xE3o","itemsScrollBack":"Mostrar itens anteriores","itemsScrollForward":"Mostrar mais itens","aboutRights":"Direitos","aboutDate":"Data","aboutHomepage":"P\xE1gina inicial","aboutSeeAlso":"Ver tamb\xE9m","aboutProvider":"Fornecedor","logo":"Log\xF3tipo","aboutManifest":"Manifesto IIIF","aboutCanvas":"Tela IIIF","aboutPartOf":"Parte de","aboutOpenManifest":"Abrir o manifesto completo","aboutCollection":"Cole\xE7\xE3o IIIF","readingLanguage":"Idioma","annotationsHide":"Ocultar anota\xE7\xF5es","annotationsHideTip":"Ocultar","readMore":"Ler mais","readLess":"Ler menos","annotationsShow":"Mostrar na imagem","annotationsShowTime":"Mostrar na grava\xE7\xE3o","annotationsImage":"Imagem","annotationsLanguage":"Idioma","annotationsOpenLink":"Abrir a liga\xE7\xE3o","transcriptLabel":"Transcri\xE7\xE3o","imageViewerOpen":"Abrir o visualizador de imagens","imageViewerClose":"Fechar o visualizador de imagens","canvasChoice":"Alternativas","imageFullScreen":"Ecr\xE3 completo","imageExitFullScreen":"Sair do ecr\xE3 completo","imageResetZoom":"Repor o zoom","imageRotateLeft":"Rodar para a esquerda","imageRotateRight":"Rodar para a direita","imageZoomIn":"Ampliar","imageZoomOut":"Reduzir","informationPanelTabs":"Painel de informa\xE7\xF5es","sectionsScrollBack":"Mostrar separadores anteriores","sectionsScrollForward":"Mostrar mais separadores","informationPanelClose":"Fechar o painel de informa\xE7\xF5es","informationPanelTabsAbout":"Sobre","informationPanelTabsAnnotations":"Anota\xE7\xF5es","informationPanelTabsSearch":"Pesquisa","informationPanelTabsContents":"Conte\xFAdo","contentsSectionsIn":"Sec\xE7\xF5es de","informationPanelTabsMap":"Mapa","informationPanelTabsCollection":"Cole\xE7\xE3o","informationPanelTabsTargets":"Vistas","mapUnavailable":"N\xE3o foi poss\xEDvel mostrar o mapa.","mapLabel":"Mapa","mapAttribution":"Cr\xE9ditos do mapa","mapPlaceUntitled":"Local {{number}}","mapOverlay":"Imagem georreferenciada","mapPlacesListed":"Locais listados depois do mapa: {{count}}","informationPanelToggle":"Mais informa\xE7\xF5es","playerPlay":"Reproduzir","playerPause":"Pausar","playerClose":"Fechar o reprodutor","playerMute":"Silenciar","playerUnmute":"Ativar o som","playerVolume":"Volume","playerSeek":"Posi\xE7\xE3o de reprodu\xE7\xE3o","playerCaptions":"Legendas","playerCaptionsOff":"Desativadas","playerChapters":"Cap\xEDtulos","frameRepeat":"Repetir","playerCurrentTime":"Tempo atual","playerDuration":"Dura\xE7\xE3o","splitHandle":"Redimensionar os pain\xE9is"}');export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Y as a,r as c,e as u,c as l,T as g}from"./shared-MTsMddHx.mjs";function f(e,n,o){if(o&&e.includes(o))return o;if(!e.length)return;const s=a(e,n);return s==="none"?e[0]:s}const y=e=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).filter(n=>n!=="none"&&n!=="@none"&&c({[n]:e[n]}).text):[];function i(e){if(!e)return[];const n=[...Array.isArray(e.metadata)?e.metadata:[],e.requiredStatement].filter(Boolean),s=[e.label,e.summary,...n.flatMap(t=>[t==null?void 0:t.label,t==null?void 0:t.value])].map(y).filter(t=>t.length>1);return[...new Set(s.flat())]}function d(){const{language:e,chooseLanguage:n}=u("About"),o=l(r=>r.manifest),s=g(()=>i(o),[o]),t=f(s,e);return t&&n?{languages:s,chosen:t,onChange:n}:null}export{f as s,d as u};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var bt=Object.defineProperty;var Tt=(s,t,e)=>t in s?bt(s,t,{enumerable:true,configurable:true,writable:true,value:e}):s[t]=e;var h=(s,t,e)=>Tt(s,typeof t!="symbol"?t+"":t,e);import{c as Et,r as V}from"./contexts-ByL3eA_T.mjs";import{c as k,s as L,t as _,a as Mt,u as lt,i as kt,b as dt,d as ut,e as Lt,f as A,r as _t}from"./CanvasView-BWQ4SK2b.mjs";import{a as D,w as Pt,v as N,f as Y,s as $,b as It,c as At}from"./Camera-Cp5ma-6C.mjs";import{i as Q,a as Rt,T as St,b as j,c as J,D as Bt,s as Ot}from"./BodyUnloadable-DcTM7hHF.mjs";import{Z as Ct,a0 as Ut}from"./shared-MTsMddHx.mjs";import{a as zt,i as tt,f as Wt}from"./imageService-0eTvQ-3h.mjs";function Ft(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement?s.complete&&s.naturalWidth>0:true}function Dt(s,t){if(!s.bleed)return{x:0,y:0};const e=s.transform,i=Math.hypot(e.a,e.b)*t,n=Math.hypot(e.c,e.d)*t;return{x:s.bleed.right&&i>0?1/i:0,y:s.bleed.bottom&&n>0?1/n:0}}const Nt=`#version 300 es
|
|
2
|
-
in vec2 a_position;
|
|
3
|
-
uniform mat3 u_matrix;
|
|
4
|
-
uniform vec4 u_crop;
|
|
5
|
-
out vec2 v_uv;
|
|
6
|
-
|
|
7
|
-
void main() {
|
|
8
|
-
vec3 clip = u_matrix * vec3(a_position, 1.0);
|
|
9
|
-
gl_Position = vec4(clip.xy, 0.0, 1.0);
|
|
10
|
-
v_uv = u_crop.xy + a_position * u_crop.zw;
|
|
11
|
-
}
|
|
12
|
-
`,Ht=`#version 300 es
|
|
13
|
-
precision highp float;
|
|
14
|
-
in vec2 v_uv;
|
|
15
|
-
uniform sampler2D u_texture;
|
|
16
|
-
uniform float u_opacity;
|
|
17
|
-
out vec4 outColor;
|
|
18
|
-
|
|
19
|
-
void main() {
|
|
20
|
-
outColor = texture(u_texture, v_uv) * u_opacity;
|
|
21
|
-
}
|
|
22
|
-
`;class R{constructor(t,e,i){h(this,"kind","webgl2");h(this,"canvas");h(this,"maxTextureSize");h(this,"gl");h(this,"program",null);h(this,"vao",null);h(this,"uniforms",{matrix:null,crop:null,opacity:null,texture:null});h(this,"textures",new Map);h(this,"cssWidth",1);h(this,"cssHeight",1);h(this,"pixelRatio",1);h(this,"matrixScratch",new Float32Array(9));h(this,"isLost",false);h(this,"callbacks");h(this,"handleLost",()=>{var t2,e2;this.isLost=true,this.textures.clear(),(e2=(t2=this.callbacks).onLost)==null||e2.call(t2)});this.canvas=t,this.gl=e,this.callbacks=i,this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)||4096;const n=Gt(e,Nt,Ht);this.program=n,this.uniforms={matrix:e.getUniformLocation(n,"u_matrix"),crop:e.getUniformLocation(n,"u_crop"),opacity:e.getUniformLocation(n,"u_opacity"),texture:e.getUniformLocation(n,"u_texture")};const o=e.createVertexArray();e.bindVertexArray(o);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),e.STATIC_DRAW);const a=e.getAttribLocation(n,"a_position");e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,false,0,0),e.bindVertexArray(null),this.vao=o,e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,true),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,false),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),t.addEventListener("webglcontextlost",this.handleLost)}static create(t,e={}){let i=null;try{i=t.getContext("webgl2",{alpha:true,premultipliedAlpha:true,antialias:false,depth:false,stencil:false,preserveDrawingBuffer:false})}catch{i=null}if(!i||typeof i.createShader!="function")return null;try{return new R(t,i,e)}catch{return null}}resize(t,e,i){this.cssWidth=Math.max(1,t),this.cssHeight=Math.max(1,e),this.pixelRatio=i;const n=Math.max(1,Math.round(t*i)),o=Math.max(1,Math.round(e*i));this.canvas.width!==n&&(this.canvas.width=n),this.canvas.height!==o&&(this.canvas.height=o)}begin(){if(this.isLost)return;const t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.useProgram(this.program),t.bindVertexArray(this.vao),t.activeTexture(t.TEXTURE0),t.uniform1i(this.uniforms.texture,0)}draw(t){if(this.isLost||!Ft(t.source))return"skipped";const e=this.gl,i=this.upload(t);if(i==="tainted")return"tainted";if(!i)return"skipped";const n=t.crop??{x:0,y:0,width:t.width,height:t.height},o=Dt(t,this.pixelRatio),r=k(t.transform,_(n.x,n.y),L(n.width+o.x,n.height+o.y));return e.uniformMatrix3fv(this.uniforms.matrix,false,Mt(r,this.cssWidth,this.cssHeight,this.matrixScratch)),e.uniform4f(this.uniforms.crop,n.x/t.width,n.y/t.height,n.width/t.width,n.height/t.height),e.uniform1f(this.uniforms.opacity,t.opacity),e.bindTexture(e.TEXTURE_2D,i.texture),e.drawArrays(e.TRIANGLE_STRIP,0,4),"drawn"}end(){this.isLost||this.gl.bindVertexArray(null)}has(t){return!this.isLost&&this.textures.has(t)}release(t){const e=this.textures.get(t);e&&(this.isLost||this.gl.deleteTexture(e.texture),this.textures.delete(t))}dispose(){var t;if(this.canvas.removeEventListener("webglcontextlost",this.handleLost),!this.isLost){for(const e of[...this.textures.keys()])this.release(e);this.program&&this.gl.deleteProgram(this.program),this.vao&&this.gl.deleteVertexArray(this.vao)}this.textures.clear(),(t=this.gl.getExtension("WEBGL_lose_context"))==null||t.loseContext(),this.isLost=true}upload(t){const e=this.gl,i=this.textures.get(t.key);if(i&&i.width===t.width&&i.height===t.height)return i;const n=(i==null?void 0:i.texture)??e.createTexture();if(!n)return null;e.bindTexture(e.TEXTURE_2D,n);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source)}catch(r){if(i||e.deleteTexture(n),Xt(r))return"tainted";throw r}e.generateMipmap(e.TEXTURE_2D),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o={texture:n,width:t.width,height:t.height};return this.textures.set(t.key,o),o}}function Gt(s,t,e){const i=et(s,s.VERTEX_SHADER,t),n=et(s,s.FRAGMENT_SHADER,e),o=s.createProgram();if(!o)throw new Error("Could not create WebGL program");if(s.attachShader(o,i),s.attachShader(o,n),s.linkProgram(o),s.deleteShader(i),s.deleteShader(n),!s.getProgramParameter(o,s.LINK_STATUS)){const r=s.getProgramInfoLog(o);throw s.deleteProgram(o),new Error(`Could not link WebGL program: ${r}`)}return o}function et(s,t,e){const i=s.createShader(t);if(!i)throw new Error("Could not create WebGL shader");if(s.shaderSource(i,e),s.compileShader(i),!s.getShaderParameter(i,s.COMPILE_STATUS)){const n=s.getShaderInfoLog(i);throw s.deleteShader(i),new Error(`Could not compile WebGL shader: ${n}`)}return i}function Xt(s){return typeof s=="object"&&s!==null&&s.name==="SecurityError"}const Zt=.09,Kt=1e-4,it=.05,qt=1e-4;class Vt{constructor(t,e=Zt){h(this,"current");h(this,"target",null);h(this,"timeConstant");this.current={...t},this.timeConstant=e}get destination(){return this.target?{...this.target.state}:{...this.current}}set(t){this.current={...t},this.target=null}animateTo(t,e,i=false){if(i||this.timeConstant===0){this.set(t.state);return}let n=t.anchor;if(n){const o=D(n.world,n.screen,t.state.zoom,t.state.rotation,e);Math.hypot(o.x-t.state.x,o.y-t.state.y)*t.state.zoom>it&&(n=void 0)}this.target={state:{...t.state},anchor:n}}stop(){this.target=null}step(t,e){const i=this.target;if(!i)return false;const n=1-Math.exp(-Math.max(t,0)/this.timeConstant),o=this.current,r=i.state,a=Math.exp(Math.log(o.zoom)+(Math.log(r.zoom)-Math.log(o.zoom))*n),d=o.rotation+(r.rotation-o.rotation)*n;let l;return i.anchor?l=D(i.anchor.world,i.anchor.screen,a,d,e):l={x:o.x+(r.x-o.x)*n,y:o.y+(r.y-o.y)*n},this.current={x:l.x,y:l.y,zoom:a,rotation:d},Math.abs(Math.log(r.zoom/a))<Kt&&Math.abs(r.rotation-d)<qt&&Math.hypot(r.x-l.x,r.y-l.y)*a<it?(this.current={...r},this.target=null,false):true}}const H={clickToZoom:true,dblClickToZoom:true,pinchToZoom:true,scrollToZoom:false,navigable:true},C=2,st=1.5,nt=.1,Yt=100,$t=200,Qt=.002,jt=.01;class Jt{constructor(t,e,i=H){h(this,"pointers",new Map);h(this,"samples",[]);h(this,"down",null);h(this,"pinch",null);h(this,"lastTap",null);h(this,"lastPointerType","");h(this,"penHovers",false);h(this,"onPointerDown",t2=>{var i2,n;if(this.lastPointerType=t2.pointerType,t2.pointerType==="mouse"&&t2.button!==0||Q(t2.target,this.element))return;(n=(i2=this.element).setPointerCapture)==null||n.call(i2,t2.pointerId);const e2=this.local(t2);this.pointers.set(t2.pointerId,e2),this.pointers.size===1?(this.down={x:e2.x,y:e2.y,t:t2.timeStamp,moved:false},this.samples=[{x:e2.x,y:e2.y,t:t2.timeStamp}],this.target.setInteracting(true)):this.pointers.size===2&&(this.pinch=this.pinchState(),this.down&&(this.down.moved=true))});h(this,"onPointerMove",t2=>{var n;Rt(t2)&&(this.penHovers=true);const e2=this.pointers.get(t2.pointerId);if(!e2)return;const i2=this.local(t2);if(this.pointers.set(t2.pointerId,i2),this.pointers.size===1){const o=i2.x-e2.x,r=i2.y-e2.y;this.down&&Math.hypot(i2.x-this.down.x,i2.y-this.down.y)>St&&(this.down.moved=true),(n=this.down)!=null&&n.moved&&this.options.navigable&&this.target.panBy(o,r,false),this.samples.push({x:i2.x,y:i2.y,t:t2.timeStamp});const a=t2.timeStamp-Yt;for(;this.samples.length>2&&this.samples[0].t<a;)this.samples.shift()}else if(this.pointers.size===2&&this.pinch&&this.options.navigable){const o=this.pinchState();this.options.pinchToZoom&&this.pinch.distance>0&&this.target.zoomBy(o.distance/this.pinch.distance,o.mid,false),this.target.panBy(o.mid.x-this.pinch.mid.x,o.mid.y-this.pinch.mid.y,false),this.pinch=o}});h(this,"onPointerUp",t2=>{var d,l,f,m,c,u;if(!this.pointers.has(t2.pointerId))return;if(this.pointers.delete(t2.pointerId),(l=(d=this.element).releasePointerCapture)==null||l.call(d,t2.pointerId),this.pointers.size===1){this.pinch=null;const[p]=this.pointers.values();this.samples=[{...p,t:t2.timeStamp}];return}if(this.pointers.size>0)return;const e2=this.down;if(this.down=null,this.pinch=null,this.target.setInteracting(false),!e2)return;const i2=this.local(t2);if(!e2.moved&&t2.type==="pointerup"&&t2.timeStamp-e2.t<j){if((m=(f=this.target).dismiss)!=null&&m.call(f)){this.lastTap=null;return}if(J(t2.pointerType,this.penHovers)){const p=this.lastTap;this.options.navigable&&(this.options.clickToZoom||this.options.dblClickToZoom)&&p&&t2.timeStamp-p.t<j&&Math.hypot(i2.x-p.x,i2.y-p.y)<Bt?(this.lastTap=null,this.zoomIn(i2)):this.lastTap={x:i2.x,y:i2.y,t:t2.timeStamp};return}this.options.clickToZoom&&this.options.navigable?t2.shiftKey?this.target.zoomBy(1/C,i2,true):this.zoomIn(i2):(u=(c=this.target).tap)==null||u.call(c,i2);return}if(!this.options.navigable)return;const o=this.samples[0],r=this.samples[this.samples.length-1],a=((r==null?void 0:r.t)??0)-((o==null?void 0:o.t)??0);if(o&&r&&a>0&&t2.timeStamp-r.t<50){const p=(r.x-o.x)/a*1e3,w=(r.y-o.y)/a*1e3;Math.hypot(p,w)>$t&&this.target.flick(p,w)}});h(this,"onDoubleClick",t2=>{this.options.navigable&&(this.options.clickToZoom||!this.options.dblClickToZoom||J(this.lastPointerType,this.penHovers)||Q(t2.target,this.element)||(t2.shiftKey?this.target.zoomBy(1/C,this.local(t2),true):this.zoomIn(this.local(t2))))});h(this,"onWheel",t2=>{const e2=t2.ctrlKey;if(!this.options.navigable||!e2&&!this.options.scrollToZoom||!e2&&Ot(t2.target,this.element,t2.deltaY))return;t2.preventDefault();const i2=te(t2),n=e2?jt:Qt;this.target.zoomBy(Math.exp(-i2*n),this.local(t2),!e2)});h(this,"onKeyDown",t2=>{if(t2.target!==this.element||!this.options.navigable||t2.altKey||t2.metaKey||t2.ctrlKey)return;const e2=this.element.getBoundingClientRect(),i2=e2.width*nt*(t2.shiftKey?3:1),n=e2.height*nt*(t2.shiftKey?3:1);switch(t2.key){case"ArrowLeft":this.target.panBy(i2,0,true);break;case"ArrowRight":this.target.panBy(-i2,0,true);break;case"ArrowUp":this.target.panBy(0,n,true);break;case"ArrowDown":this.target.panBy(0,-n,true);break;case"+":case"=":this.target.zoomBy(st,void 0,true);break;case"-":case"_":this.target.zoomBy(1/st,void 0,true);break;case"0":this.target.home();break;case"r":this.target.rotateBy(90);break;case"R":this.target.rotateBy(-90);break;default:return}t2.preventDefault()});this.element=t,this.target=e,this.options=i,t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),t.addEventListener("pointercancel",this.onPointerUp),t.addEventListener("dblclick",this.onDoubleClick),t.addEventListener("wheel",this.onWheel,{passive:false}),t.addEventListener("keydown",this.onKeyDown)}setOptions(t){this.options=t}dispose(){const t=this.element;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("dblclick",this.onDoubleClick),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown)}local(t){const e=this.element.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}zoomIn(t){var e,i;(i=(e=this.target).atMaxZoom)!=null&&i.call(e)?this.target.home():this.target.zoomBy(C,t,true)}pinchState(){const[t,e]=[...this.pointers.values()];return{distance:Math.hypot(e.x-t.x,e.y-t.y),mid:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}}function te(s){return s.deltaMode===1?s.deltaY*16:s.deltaMode===2?s.deltaY*400:s.deltaY}class ft extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageLoadError"}}const ot=new Set;async function ee(s,t={}){const{signal:e,maxTextureSize:i,request:n}=t,o=Ct(n),r=se(s);if(typeof createImageBitmap!="function"||typeof fetch!="function")return U(s,{signal:e,cors:true,withCredentials:o});if(r&&ot.has(r))return U(s,{signal:e,cors:false,withCredentials:o});let a;try{a=await Ut(n,s,{mode:"cors",signal:e})}catch(c){if(ne(c,e))throw c;const u=await U(s,{signal:e,cors:false,withCredentials:o});return r&&ot.add(r),u}if(!a.ok)throw new ft(`Image request failed with ${a.status}`,s,a.status);const d=await a.blob();let l=await ie(d);const f=l.width,m=l.height;if(i&&(l.width>i||l.height>i)){const c=i/Math.max(l.width,l.height),u=await createImageBitmap(l,{resizeWidth:Math.max(1,Math.floor(l.width*c)),resizeHeight:Math.max(1,Math.floor(l.height*c)),resizeQuality:"high"});l.close(),l=u}if(e!=null&&e.aborted)throw l.close(),G();return{kind:"bitmap",source:l,width:l.width,height:l.height,naturalWidth:f,naturalHeight:m,opaque:false}}async function ie(s){const t={imageOrientation:"from-image",premultiplyAlpha:"premultiply",colorSpaceConversion:"default"};try{return await createImageBitmap(s,t)}catch(e){if(e instanceof TypeError)return createImageBitmap(s);throw e}}function U(s,{signal:t,cors:e,withCredentials:i}){return new Promise((n,o)=>{if(t!=null&&t.aborted){o(G());return}const r=new Image;r.decoding="async",e&&(r.crossOrigin=i?"use-credentials":"anonymous");const a=()=>{r.onload=null,r.onerror=null,t==null||t.removeEventListener("abort",d)},d=()=>{a(),r.src="",o(G())};t==null||t.addEventListener("abort",d),r.onload=()=>{a();const l=()=>n({kind:"element",source:r,width:r.naturalWidth,height:r.naturalHeight,naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight,opaque:!e});typeof r.decode=="function"?r.decode().then(l,l):l()},r.onerror=()=>{a(),o(new ft("Image failed to load",s))},r.src=s})}function se(s){var t;try{return new URL(s,(t=globalThis.location)==null?void 0:t.href).origin}catch{return null}}function ne(s,t){return!!(t!=null&&t.aborted)||typeof s=="object"&&s!==null&&s.name==="AbortError"}function G(){const s=new Error("Aborted");return s.name="AbortError",s}function rt(s){s.kind==="bitmap"&&s.source.close()}const oe=192*1024*1024,re=6,ae=2;class he{constructor(t){h(this,"entries",new Map);h(this,"inFlight",0);h(this,"frame",0);h(this,"bytes",0);h(this,"wanted",[]);h(this,"disposed",false);h(this,"budget");h(this,"maxInFlight");this.options=t,this.budget=t.byteBudget??oe,this.maxInFlight=t.maxInFlight??re}get(t){const e=this.entries.get(t);if((e==null?void 0:e.state)==="ready")return e.lastUsed=this.frame,e.image}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="ready"}failed(t){var e;return((e=this.entries.get(t))==null?void 0:e.state)==="failed"}get byteSize(){return this.bytes}get pending(){return this.inFlight}seed(t,e){var n;const i=this.entries.get(t);(i==null?void 0:i.state)!=="ready"&&((n=i==null?void 0:i.controller)==null||n.abort(),this.entries.set(t,{url:t,state:"ready",image:e,bytes:z(e),lastUsed:this.frame,attempts:0,pinned:false,waiters:(i==null?void 0:i.waiters)??[]}),this.bytes+=z(e),this.flushWaiters(t))}prefetch(t){return Promise.all(t.map(e=>new Promise(i=>{const n=this.entries.get(e.url);if(n&&n.state!=="loading")return i();if(n){n.waiters.push(i);return}this.start({...e,priority:-1},i)}))).then(()=>{})}update(t){if(this.disposed)return;this.frame++;const e=new Set(t.map(i=>i.url));this.wanted=[...t].sort((i,n)=>i.priority-n.priority);for(const i of this.entries.values())i.state==="loading"&&!i.pinned&&!e.has(i.url)&&i.controller&&(i.controller.abort(),this.entries.delete(i.url),this.inFlight--);for(const i of this.wanted){const n=this.entries.get(i.url);n&&(n.lastUsed=this.frame)}this.pump(),this.evict(e)}dispose(){var t;this.disposed=true;for(const e of this.entries.values())(t=e.controller)==null||t.abort(),this.flushWaiters(e.url);this.entries.clear(),this.bytes=0}forEachReady(t){for(const e of this.entries.values())e.state==="ready"&&e.image&&t(e.url,e.image)}pump(){for(const t of this.wanted){if(this.inFlight>=this.maxInFlight)break;this.entries.has(t.url)||this.start(t)}}start(t,e){const i=new AbortController,n={url:t.url,state:"loading",bytes:0,lastUsed:this.frame,attempts:0,controller:i,pinned:!!e,waiters:e?[e]:[]};this.entries.set(t.url,n),this.inFlight++,this.attempt(n,t,i,t.url)}attempt(t,e,i,n){t.attempts++,this.options.load(n,i.signal).then(o=>{if(this.disposed||this.entries.get(t.url)!==t){rt(o);return}t.state="ready",t.image=o,t.bytes=z(o),t.controller=void 0,t.pinned=false,this.bytes+=t.bytes,this.settle(t)},o=>{if(!(i.signal.aborted||this.disposed)&&this.entries.get(t.url)===t){if(t.attempts<ae&&!ce(o,e)){this.attempt(t,e,i,e.fallbackUrl??e.url);return}t.state="failed",t.controller=void 0,t.pinned=false,this.settle(t)}})}settle(t){this.inFlight--,this.flushWaiters(t.url),this.options.onSettled(),this.pump()}flushWaiters(t){const e=this.entries.get(t);if(!e)return;const i=e.waiters;e.waiters=[],i.forEach(n=>n())}evict(t){if(this.bytes<=this.budget)return;const e=[...this.entries.values()].filter(i=>i.state==="ready"&&!t.has(i.url)).sort((i,n)=>i.lastUsed-n.lastUsed);for(const i of e){if(this.bytes<=this.budget)break;this.entries.delete(i.url),this.bytes-=i.bytes,i.image&&rt(i.image),this.options.onEvict(i.url)}}}function z(s){return s.width*s.height*4}function ce(s,t){if(t.fallbackUrl)return false;const e=s==null?void 0:s.status;return typeof e=="number"&&e>=400&&e<500&&e!==408&&e!==429}const le=.1;class de{constructor(t,e=n=>requestAnimationFrame(n),i=n=>cancelAnimationFrame(n)){h(this,"handle",0);h(this,"last",0);h(this,"disposed",false);h(this,"frame",t2=>{if(this.handle=0,this.disposed)return;const e2=this.last?Math.min((t2-this.last)/1e3,le):1/60;this.last=t2,this.tick(e2,t2)?this.invalidate():this.last=0});this.tick=t,this.raf=e,this.caf=i}invalidate(){this.disposed||this.handle||(this.handle=this.raf(this.frame))}drawNow(){this.disposed||(this.handle&&this.caf(this.handle),this.frame(performance.now()))}dispose(){this.disposed=true,this.handle&&this.caf(this.handle),this.handle=0}}const ue=2*1024*1024;function fe(s,t,e=ue){const i=new Set;let n=e,o=false;return{get deferred(){return o},getTile(r){const a=s(r);if(!a||a.kind==="media"||a.opaque||i.has(r)||t(r))return a;const d=a.width*a.height*4;if(i.size>0&&d>n){o=true;return}return n-=d,i.add(r),a}}}function me(s){const t=/^(!)?(\d+(?:\.\d+)?)$/.exec((s==null?void 0:s.trim())??"");if(!t)return null;const e=Number(t[2]);if(e>360)return null;const i=e%360,n=!!t[1];return i||n?{degrees:i,mirror:n}:null}function pe(s,t,e){if(!s)return null;let i=s.trim().replace(/^xywh=/,""),n=false;i.startsWith("pct:")?(n=true,i=i.slice(4)):i.startsWith("pixel:")&&(i=i.slice(6));const o=i.split(",").map(Number);if(o.length!==4||o.some(p=>!Number.isFinite(p)))return null;let[r,a,d,l]=o;n&&(r=r/100*t,a=a/100*e,d=d/100*t,l=l/100*e);const f=Math.max(0,r),m=Math.max(0,a),c=Math.min(t,r+d),u=Math.min(e,a+l);return c<=f||u<=m?null:{x:f,y:m,width:c-f,height:u-m}}const W=512,ge=16e6;function mt(s,t,e){return{width:t,height:e,levels:[{scaleFactor:1,width:t,height:e,tileWidth:t,tileHeight:e,cols:1,rows:1}],tile:n=>({...n,url:s,region:{x:0,y:0,width:t,height:e}})}}function we(s){const{width:t,height:e}=s,i=[],n=s.regionByPx&&s.sizeByW,o=(c,u,p)=>{const w=Math.ceil(t/c),y=Math.ceil(e/c);return{scaleFactor:c,width:w,height:y,tileWidth:u,tileHeight:p,cols:Math.ceil(w/u),rows:Math.ceil(y/p)}},r=(c,u)=>({scaleFactor:t/c,width:c,height:u,tileWidth:c,tileHeight:u,cols:1,rows:1,whole:true}),a=s.tiles[0];if(a)for(const c of a.scaleFactors)i.push(o(c,a.width,a.height));else if(n)for(let c=1;;c*=2){const u=o(c,W,W);if(i.push(u),u.cols===1&&u.rows===1)break}const d=Math.max(0,...i.map(c=>c.scaleFactor));for(const c of s.sizes){const u=t/c.width;ye(s,c.width,c.height)&&u>d+1e-9&&i.push(r(c.width,c.height))}const l=i.reduce((c,u)=>!c||u.scaleFactor>c.scaleFactor?u:c,null);if(l&&l.cols*l.rows>1&&s.sizeByW){const c=Math.max(t,e)/W;i.push(r(Math.ceil(t/c),Math.ceil(e/c)))}(!i.length||!a&&!n&&t*e<=ge)&&(i.some(c=>c.scaleFactor===1)||i.push(r(t,e)));const f=xe(i).sort((c,u)=>u.scaleFactor-c.scaleFactor),m=zt(s);return{width:t,height:e,levels:f,tile(c){const u=f[c.level],p=u.scaleFactor,w=u.cols===1&&u.rows===1;let y,v,b;if(w)y={x:0,y:0,width:t,height:e},v=u.width,b=u.height;else{const I=Math.round(c.col*u.tileWidth*p),E=Math.round(c.row*u.tileHeight*p);y={x:I,y:E,width:Math.min(Math.round(u.tileWidth*p),t-I),height:Math.min(Math.round(u.tileHeight*p),e-E)},v=Math.ceil(y.width/p),b=Math.ceil(y.height/p)}return{...c,region:y,url:tt(s,y,v,b),fallbackUrl:m?tt(s,y,v,b,m):void 0}}}}function ye(s,t,e){return!(s.maxWidth&&t>s.maxWidth||s.maxHeight&&e>s.maxHeight||s.maxArea&&t*e>s.maxArea)}function xe(s){const t=new Map;for(const e of s){const i=`${e.width}x${e.height}`,n=t.get(i);(!n||n.cols*n.rows<e.cols*e.rows)&&t.set(i,e)}return[...t.values()]}function ve(s,t){const e=s.levels;for(let i=0;i<e.length;i++)if(e[i].scaleFactor<=t*(1+1e-6))return i;return e.length-1}function T(s,t,e){const i=s.levels[t],n=i.tileWidth*i.scaleFactor,o=i.tileHeight*i.scaleFactor,r=Math.max(0,e.x),a=Math.max(0,e.y),d=Math.min(s.width,e.x+e.width),l=Math.min(s.height,e.y+e.height);if(d<=r||l<=a)return[];const f=Math.max(0,Math.floor(r/n)),m=Math.min(i.cols-1,Math.floor((d-1e-9)/n)),c=Math.max(0,Math.floor(a/o)),u=Math.min(i.rows-1,Math.floor((l-1e-9)/o)),p=[];for(let w=c;w<=u;w++)for(let y=f;y<=m;y++)p.push({level:t,col:y,row:w});return p}async function be(s,t){if(s.media)return Te(s,s.media);let e=null,i=null;if(s.service)try{e=we(await Wt(s.service,t.infoOptions))}catch(c){i=c}if(!e){if(!s.url)throw i??new Error("Image has no source");const c=await t.loadStatic(s.url);t.cache.seed(s.url,c),e=mt(s.url,c.naturalWidth,c.naturalHeight)}const n=s.width&&s.height&&s.width>0&&s.height>0?{width:s.width,height:s.height}:{width:e.width,height:e.height},o=pe(s.region,n.width,n.height)??{x:0,y:0,width:n.width,height:n.height},r=e.width/n.width,a=e.height/n.height,d={x:o.x*r,y:o.y*a,width:o.width*r,height:o.height*a},l=me(s.rotation),f=l?Ee(d,l):void 0,m={id:s.id,spec:s,pyramid:e,size:n,clip:d,contentClip:o,rect:{x:0,y:0,width:o.width,height:o.height},...f?{turn:f}:{}};return await t.cache.prefetch(T(e,0,d).map(c=>{const u=e.tile(c);return{url:u.url,fallbackUrl:u.fallbackUrl}})),m}const pt="media:";function Te(s,t){var a,d;const e=s.width||((a=s.placement)==null?void 0:a.width)||t.element.videoWidth||1600,i=s.height||((d=s.placement)==null?void 0:d.height)||t.element.videoHeight||900,n=`${pt}${s.id}`,o={width:e,height:i},r={x:0,y:0,width:e,height:i};return{id:s.id,spec:s,pyramid:mt(n,e,i),media:{kind:"media",source:t.element,width:e,height:i,naturalWidth:e,naturalHeight:i},size:o,clip:r,contentClip:r,rect:{...r}}}function Ee(s,{degrees:t,mirror:e}){const i=t*Math.PI/180,n=f=>Math.abs(f)<1e-12?0:f,o=n(Math.cos(i)),r=n(Math.sin(i)),a=Math.abs(s.width*o)+Math.abs(s.height*r),d=Math.abs(s.width*r)+Math.abs(s.height*o),l=k(_(a/2,d/2),{a:o,b:r,c:-r,d:o,e:0,f:0},L(e?-1:1,1),_(-(s.x+s.width/2),-(s.y+s.height/2)));return{orient:l,unorient:kt(l),width:a,height:d}}function gt(s){var t;return((t=s.turn)==null?void 0:t.orient)??_(-s.clip.x,-s.clip.y)}function Me(s,t){const{turn:e,clip:i}=s;if(!e)return{...t,x:i.x+t.x,y:i.y+t.y};const n=ut(e.unorient,t),o=Math.max(n.x,i.x),r=Math.max(n.y,i.y);return{x:o,y:r,width:Math.max(0,Math.min(n.x+n.width,i.x+i.width)-o),height:Math.max(0,Math.min(n.y+n.height,i.y+i.height)-r)}}function ke(s,t){const{turn:e,clip:i}=s;return e?dt(e.unorient,t):{x:i.x+t.x,y:i.y+t.y}}function at(s){const{turn:t,clip:e,contentClip:i}=s;return t?{width:t.width*i.width/e.width,height:t.height*i.height/e.height}:i}function Le(s){if(!s.length)return null;if(s.every(i=>i.spec.placement)){for(const i of s)i.rect={...i.spec.placement};return lt(s.map(i=>i.rect))}const t=at(s[0]).height;let e=0;for(const i of s){const n=at(i),o=n.width*t/n.height;i.rect={x:e,y:0,width:o,height:t},e+=o}return{x:0,y:0,width:e,height:t}}function S(s){const t=s.turn??s.clip;return{x:s.rect.width/t.width,y:s.rect.height/t.height}}function _e(s){const t=S(s);return k(_(s.rect.x,s.rect.y),L(t.x,t.y),gt(s))}function Pe(s,t){var e,i;return s.service===t.service&&s.url===t.url&&s.width===t.width&&s.height===t.height&&s.region===t.region&&s.rotation===t.rotation&&((e=s.media)==null?void 0:e.element)===((i=t.media)==null?void 0:i.element)&&JSON.stringify(s.placement)===JSON.stringify(t.placement)}const Ie=1e7,Ae=15e6,Re=2e7,Se=2;function Be(s){const{items:t,camera:e,viewport:i,pixelRatio:n,getTile:o,destination:r}=s,a=Pt(e,i),d=[],l=[],f=[],m=(c,u,p)=>{const w=c.tile(u);l.push({url:w.url,fallbackUrl:w.fallbackUrl,priority:p})};for(const c of t){const{pyramid:u,clip:p,rect:w}=c,y=S(c);if(s.wantOverview)for(const g of T(u,0,p))m(u,g,Re);const v=ht(c,e,i,n),b=r?ht(c,r,i,n):v;if(f.push((v==null?void 0:v.target)??-1),!v&&!b)continue;const I=g=>x=>{const P=u.tile(x).region;return Math.hypot(P.x+P.width/2-g.x,P.y+P.height/2-g.y)};if(b){const g=I(b.center);for(const x of T(u,0,b.area))m(u,x,g(x)/1e3);if(b.target>0)for(const x of T(u,b.target,b.area))m(u,x,Ie+g(x))}if(!v)continue;const{area:E,target:M}=v,X=I(v.center),B=T(u,0,E),Z=M===0?[]:T(u,M,E);if(b!==v){for(const x of B)m(u,x,X(x)/1e3);const g=M-Se;if(g>0)for(const x of T(u,g,E))m(u,x,Ae+X(x))}if(c.spec.hidden)continue;const yt=(M===0?B:Z).every(g=>o(u.tile(g).url)!==void 0)?[M]:Array.from({length:M+1},(g,x)=>x),xt=k(a,_(w.x,w.y),L(y.x,y.y),gt(c));for(const g of yt){const x=g===0?B:g===M?Z:T(u,g,E),P=u.levels[g].cols*u.levels[g].rows>1;for(const vt of x){const O=u.tile(vt),K=o(O.url);if(!K)continue;const q=Oe(c,O.region,K,xt,P);q&&d.push({...q,url:O.url})}}}return l.sort((c,u)=>c.priority-u.priority),{draws:d,wants:Ce(l),levels:f}}function ht(s,t,e,i){const{pyramid:n,rect:o}=s,r=N(t,e);if(!Lt(r,o))return null;const a=S(s),d=Math.max(r.x,o.x),l=Math.max(r.y,o.y),f=Math.min(r.x+r.width,o.x+o.width),m=Math.min(r.y+r.height,o.y+o.height),c=1/(a.x*t.zoom*i);return{area:Me(s,{x:(d-o.x)/a.x,y:(l-o.y)/a.y,width:(f-d)/a.x,height:(m-l)/a.y}),center:ke(s,{x:(t.x-o.x)/a.x,y:(t.y-o.y)/a.y}),target:ve(n,c)}}function Oe(s,t,e,i,n){const{clip:o}=s,r=Math.max(t.x,o.x),a=Math.max(t.y,o.y),d=Math.min(t.x+t.width,o.x+o.width),l=Math.min(t.y+t.height,o.y+o.height);if(d<=r||l<=a)return null;const f=e.width/t.width,m=e.height/t.height,c=1e-6;return{item:s,image:e,transform:k(i,_(t.x,t.y),L(1/f,1/m)),crop:{x:(r-t.x)*f,y:(a-t.y)*m,width:(d-r)*f,height:(l-a)*m},bleed:{right:n&&d<o.x+o.width-c,bottom:n&&l<o.y+o.height-c}}}function Ce(s){const t=new Set;return s.filter(e=>t.has(e.url)?false:(t.add(e.url),true))}const Ue={maxZoomPixelRatio:1.1,minZoomImageRatio:.9,animationTime:.09,request:void 0,byteBudget:192*1024*1024,maxInFlight:6,releaseAfterMs:2e3},ze=2,We=3,Fe=.1,De=1e-6,wt={top:0,right:0,bottom:0,left:0};function Ne(s){if(typeof getComputedStyle!="function")return wt;const t=getComputedStyle(s),e=i=>parseFloat(i)||0;return{top:e(t.paddingTop),right:e(t.paddingRight),bottom:e(t.paddingBottom),left:e(t.paddingLeft)}}const He=(s,t)=>s.top===t.top&&s.right===t.right&&s.bottom===t.bottom&&s.left===t.left;let Ge;class Xe{constructor(t,e={}){h(this,"host");h(this,"overlays",null);h(this,"options");h(this,"backend",null);h(this,"backendPreference");h(this,"contextLosses",0);h(this,"holder",{hiddenSince:null,release:()=>this.giveBack()});h(this,"visible",true);h(this,"dom",null);h(this,"domAsked",false);h(this,"pending",null);h(this,"camera");h(this,"loop");h(this,"gestures");h(this,"gestureOptions",{});h(this,"cache");h(this,"navigator",null);h(this,"navigatorAsked",0);h(this,"viewport",{width:1,height:1});h(this,"inset",wt);h(this,"pixelRatio",1);h(this,"items",[]);h(this,"worldBounds",null);h(this,"contentVersion",0);h(this,"opaqueUrls",new Set);h(this,"mediaByKey",new Map);h(this,"detachMedia",[]);h(this,"opened",false);h(this,"atHome",true);h(this,"lastEmitted",null);h(this,"generation",0);h(this,"listeners",new Map);h(this,"unloadable",false);h(this,"resizeObserver",null);h(this,"intersectionObserver",null);h(this,"releaseTimer",null);h(this,"dprQuery",null);h(this,"disposed",false);h(this,"dismisser",null);h(this,"tick",t2=>{var d,l;if(this.disposed)return false;const e2=this.camera.step(t2,this.viewport),i=this.camera.current,n=this.backend,o=fe(this.getTile,f=>n?n.has(f):true),r=Be({items:this.items,camera:i,viewport:this.viewport,pixelRatio:this.pixelRatio,getTile:o.getTile,wantOverview:!!this.navigator,destination:e2?this.camera.destination:void 0}),a=r.wants.filter(f=>!f.url.startsWith(pt));return this.cache.update(a),r.draws.length?this.setUnloadable(false):a.length&&a.every(f=>this.cache.failed(f.url))&&this.setUnloadable(true),this.paint(r.draws),(d=this.overlays)==null||d.position(i,this.viewport),(l=this.navigator)==null||l.render(this.items.filter(f=>!f.spec.hidden),this.worldBounds,N(i,this.viewport),this.pixelRatio,this.getTile,this.contentVersion),(!this.lastEmitted||!At(this.lastEmitted,i))&&(this.lastEmitted={...i},this.opened&&this.emit("viewport")),e2||o.deferred});h(this,"getTile",t2=>this.mediaByKey.get(t2)??this.cache.get(t2));h(this,"onContextLost",()=>{this.contextLosses+=1,this.releaseBackend(),this.visible?this.acquireBackend(false):this.host.dataset.backend="released"});h(this,"onPixelRatioChange",()=>{this.measure(),this.watchPixelRatio()});this.host=t,this.backendPreference=e.backend??"auto",this.options={...Ue,...F(e)},Ke()&&(this.options.animationTime=0),this.camera=new Vt({x:0,y:0,zoom:1,rotation:0},this.options.animationTime),this.loop=new de(this.tick),this.gestureOptions=F(e.gestures??{}),this.gestures=new Jt(t,this,{...H,...this.gestureOptions}),this.cache=new he({load:(i,n)=>this.loadTile(i,n),onSettled:()=>{this.contentVersion++,this.invalidate()},onEvict:i=>{var n;return(n=this.backend)==null?void 0:n.release(i)},byteBudget:this.options.byteBudget,maxInFlight:this.options.maxInFlight}),this.visible=Ze(t),this.visible?this.acquireBackend():this.holder.hiddenSince=ct(),this.measure(),this.observe()}get backendKind(){var t;return((t=this.backend)==null?void 0:t.kind)??"none"}get isOpen(){return this.opened}get isAtHome(){return this.atHome}on(t,e){let i=this.listeners.get(t);return i||(i=new Set,this.listeners.set(t,i)),i.add(e),()=>i==null?void 0:i.delete(e)}async setImages(t,{world:e,fit:i=false}={}){const n=++this.generation,o=new Map(this.items.map(f=>[f.id,f])),r=await Promise.allSettled(t.map(f=>{const m=o.get(f.id);return m&&Pe(m.spec,f)?(m.spec=f,Promise.resolve(m)):be(f,{cache:this.cache,loadStatic:c=>this.loadTile(c),infoOptions:{request:this.options.request}})}));if(n!==this.generation||this.disposed)return;const a=r.filter(f=>f.status==="fulfilled").map(f=>f.value),d=r.filter(f=>f.status==="rejected").map(f=>f.reason);this.items=a,this.watchMedia(a);const l=Le(a);if(this.worldBounds=e?l?lt([e,l]):e:l,this.contentVersion++,d.length&&this.emit("error",d),this.setUnloadable(t.length>0&&!a.length&&d.length>0),!this.worldBounds){this.invalidate();return}this.opened?i?(this.home(true),this.emit("change")):(this.camera.set(this.constrain(this.camera.current)),this.emit("change")):(this.opened=true,this.home(true),this.emit("open")),this.invalidate()}clear(){this.setUnloadable(false),this.generation++,this.items=[],this.watchMedia([]),this.worldBounds=null,this.contentVersion++,this.invalidate()}setHidden(t){const e=new Set(t);let i=false;for(const n of this.items){const o=e.has(n.id);!!n.spec.hidden!==o&&(n.spec={...n.spec,hidden:o},i=true)}i&&this.invalidate()}isReady(t){const e=this.items.find(n=>n.id===t);if(!e)return false;if(e.spec.media)return true;const i=e.pyramid.levels[0];if(!i)return false;for(let n=0;n<i.rows;n++)for(let o=0;o<i.cols;o++)if(!this.getTile(e.pyramid.tile({level:0,col:o,row:n}).url))return false;return true}fitBounds(t,e=false){const i=Y(t,this.viewport,this.camera.destination.rotation,0);this.atHome=false,this.animateTo(this.constrain(i,{allowBeyondLimits:true}),e)}fitItemRect(t,e,i=false){const n=this.itemRectToWorld(t,e);n&&this.fitAnnotation(n,i)}fitAnnotation(t,e=false){const i=this.items[0];if(!i)return;const n=i.rect.width*Fe;this.fitBounds({x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2},e)}getBounds(){return N(this.camera.current,this.viewport)}getHomeBounds(){return this.worldBounds?{...this.worldBounds}:null}getCamera(){return{...this.camera.current}}getZoomLimits(){var i;const t=((i=this.homeCamera())==null?void 0:i.zoom)??1,e=this.items.length?Math.min(...this.items.map(n=>S(n).x)):1;return{home:t,min:t*this.options.minZoomImageRatio,max:Math.max(t,this.options.maxZoomPixelRatio/e)}}home(t=false){const e=this.homeCamera();e&&(this.atHome=true,this.animateTo(e,t))}atMaxZoom(){return this.camera.destination.zoom>=this.getZoomLimits().max*(1-De)}zoomBy(t,e,i=true){const n=i?this.camera.destination:this.camera.current,o=e??{x:this.viewport.width/2,y:this.viewport.height/2},r=$(n,this.viewport,o),{min:a,max:d}=this.getZoomLimits(),l=A(n.zoom*t,a,d),f=D(r,o,l,n.rotation,this.viewport),m=this.constrain({...n,...f,zoom:l});this.atHome=false,i?this.camera.animateTo({state:m,anchor:{world:r,screen:o}},this.viewport):this.camera.set(m),this.invalidate()}panBy(t,e,i=false){const n=i?this.camera.destination:this.camera.current,o=dt(k(L(1/n.zoom),_t(-n.rotation)),{x:t,y:e}),r=this.constrain({...n,x:n.x-o.x,y:n.y-o.y});this.atHome=false,i?this.camera.animateTo({state:r},this.viewport):this.camera.set(r),this.invalidate()}panTo(t,e=false){const i=e?this.camera.current:this.camera.destination;this.atHome=false,this.animateTo(this.constrain({...i,...t}),e)}flick(t,e){this.panBy(t*.25,e*.25,true)}rotateBy(t){const e=this.camera.destination;this.setRotation(e.rotation*180/Math.PI+t)}setRotation(t,e=false){const i=this.camera.destination,n=t*Math.PI/180;this.animateTo(this.constrain({...i,rotation:n}),e)}getRotation(){return this.camera.destination.rotation*180/Math.PI}tap(t){this.emit("tap",t)}setDismiss(t){this.dismisser=t}dismiss(){var t;return((t=this.dismisser)==null?void 0:t.call(this))??false}setGestures(t){this.gestures.setOptions({...H,...this.gestureOptions,...F(t)})}setInteracting(t){t&&this.camera.stop()}worldToScreenPoint(t){return It(this.camera.current,this.viewport,t)}screenToWorldPoint(t){return $(this.camera.current,this.viewport,t)}itemRectToWorld(t,e){const i=this.items[t];if(!i)return null;const{contentClip:n,clip:o}=i;if(i.turn)return ut(k(_e(i),L(o.width/n.width,o.height/n.height)),e);const r=i.rect.width/n.width,a=i.rect.height/n.height;return{x:i.rect.x+(e.x-n.x)*r,y:i.rect.y+(e.y-n.y)*a,width:e.width*r,height:e.height*a}}attachNavigator(t){var o;(o=this.navigator)==null||o.dispose(),this.navigator=null;const e=++this.navigatorAsked;let i=null,n=false;return import("./Navigator-B3U21_ti.mjs").then(r=>{n||this.disposed||e!==this.navigatorAsked||(i=new r.Navigator(t,(a,d)=>this.panTo(a,d)),this.navigator=i,this.invalidate())}),()=>{n=true,i==null||i.dispose(),i&&this.navigator===i&&(this.navigator=null)}}invalidate(){this.loop.invalidate()}dispose(){var t,e,i,n,o,r,a;this.disposed||(this.disposed=true,this.generation++,this.loop.dispose(),this.gestures.dispose(),(t=this.resizeObserver)==null||t.disconnect(),(e=this.intersectionObserver)==null||e.disconnect(),(n=(i=this.dprQuery)==null?void 0:i.removeEventListener)==null||n.call(i,"change",this.onPixelRatioChange),this.releaseTimer&&clearTimeout(this.releaseTimer),(o=this.navigator)==null||o.dispose(),this.navigator=null,this.releaseBackend(),this.cache.dispose(),(r=this.dom)==null||r.dispose(),(a=this.overlays)==null||a.dispose(),this.items=[],this.detachMedia.forEach(d=>d()),this.mediaByKey.clear(),this.listeners.clear(),delete this.host.dataset.backend)}watchMedia(t){this.detachMedia.forEach(e=>e()),this.detachMedia=[],this.mediaByKey.clear();for(const e of t){if(!e.media||e.media.kind!=="media")continue;const i=e.pyramid.tile({level:0,col:0,row:0}).url;this.mediaByKey.set(i,e.media);const n=e.media.source,o=()=>this.invalidate(),r=["play","seeked","loadeddata","resize"];r.forEach(a=>n.addEventListener(a,o)),this.detachMedia.push(()=>r.forEach(a=>n.removeEventListener(a,o)))}}paint(t){const e=this.backend,i=[],n=(e==null?void 0:e.kind)==="webgl2";e==null||e.begin();for(const o of t){const{image:r}=o;if(!(r.kind==="media"||r.kind==="element"&&n&&(r.opaque||this.opaqueUrls.has(o.url)))&&e){if(e.draw({key:o.url,source:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1,bleed:o.bleed})!=="tainted"||r.kind==="bitmap")continue;this.opaqueUrls.add(o.url)}(r.kind==="element"||r.kind==="media")&&i.push({key:`${o.item.id}|${o.url}`,element:r.source,width:r.width,height:r.height,transform:o.transform,crop:o.crop,opacity:1})}e==null||e.end(),this.dom?this.dom.sync(i):i.length&&!this.domAsked&&(this.domAsked=true,import("./DomLayers-CTGub6wo.mjs").then(({DomLayers:o})=>{if(this.disposed)return;const r=new o(this.host);this.overlays&&this.host.insertBefore(r.container,this.overlays.container),this.dom=r,this.invalidate()}))}loadTile(t,e){return ee(t,{signal:e,request:this.options.request,maxTextureSize:this.backend instanceof R?this.backend.maxTextureSize:void 0})}animateTo(t,e){this.camera.animateTo({state:t},this.viewport,e),this.invalidate()}homeCamera(){if(!this.worldBounds)return null;const t=2*Math.PI,e=Math.round(this.camera.destination.rotation/t)*t||0,{top:i,right:n,bottom:o,left:r}=this.inset,a=Y(this.worldBounds,{width:Math.max(1,this.viewport.width-r-n),height:Math.max(1,this.viewport.height-i-o)},e);return a.x-=(r-n)/2/a.zoom,a.y-=(i-o)/2/a.zoom,a}constrain(t,{allowBeyondLimits:e=false}={}){const i=this.worldBounds;if(!i)return t;const{min:n,max:o}=this.getZoomLimits(),r=e?A(t.zoom,n,Math.max(o,t.zoom)):A(t.zoom,n,o);return{...t,zoom:r,x:A(t.x,i.x,i.x+i.width),y:A(t.y,i.y,i.y+i.height)}}acquireBackend(t=true){var o,r;if(this.backend||this.pending||this.disposed)return;const e=document.createElement("canvas");e.className="clover-canvas-surface",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block",pointerEvents:"none"}),this.host.insertBefore(e,((o=this.dom)==null?void 0:o.container)??((r=this.overlays)==null?void 0:r.container)??null);const i=t&&(this.backendPreference==="webgl2"||this.backendPreference==="auto"&&this.contextLosses<We);let n=null;i&&(Et(this.holder)||this.backendPreference==="webgl2")&&(n=R.create(e,{onLost:this.onContextLost}),n||V(this.holder)),n?this.install(n):this.backendPreference==="webgl2"?this.none(e):(this.pending=e,(Ge??(Ge=import("./Canvas2DBackend-3PToh87Z.mjs"))).then(({Canvas2DBackend:a})=>{if(this.pending!==e)return;this.pending=null;const d=a.create(e);d?this.install(d):this.none(e)}))}none(t){t.remove(),this.host.dataset.backend="none"}install(t){this.backend=t,this.host.dataset.backend=t.kind,t.resize(this.viewport.width,this.viewport.height,this.pixelRatio),t.kind==="canvas2d"&&this.opaqueUrls.clear(),this.emit("backend",t.kind),this.invalidate()}releaseBackend(){var e;if(V(this.holder),(e=this.pending)==null||e.remove(),this.pending=null,!this.backend)return;const t=this.backend.canvas;this.backend.dispose(),t.remove(),this.backend=null}giveBack(){this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.releaseBackend(),this.host.dataset.backend="released"}observe(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>this.measure(true)),this.resizeObserver.observe(this.host)),typeof IntersectionObserver<"u"&&(this.intersectionObserver=new IntersectionObserver(t=>{const e=t.some(i=>i.isIntersecting);this.setVisible(e)}),this.intersectionObserver.observe(this.host)),this.watchPixelRatio()}setVisible(t){var e;if(this.visible=t,t){this.holder.hiddenSince=null,this.releaseTimer&&clearTimeout(this.releaseTimer),this.releaseTimer=null,this.backend||this.acquireBackend();return}(e=this.holder).hiddenSince??(e.hiddenSince=ct()),!(!this.backend||this.releaseTimer)&&(this.releaseTimer=setTimeout(()=>this.giveBack(),this.options.releaseAfterMs))}measure(t=false){var d;const e=this.host.getBoundingClientRect(),i=Math.max(1,e.width),n=Math.max(1,e.height),o=Ne(this.host),r=Math.min(typeof window<"u"&&window.devicePixelRatio||1,ze);if(i===this.viewport.width&&n===this.viewport.height&&r===this.pixelRatio&&He(o,this.inset))return;const a=this.viewport;if(this.viewport={width:i,height:n},this.inset=o,this.pixelRatio=r,(d=this.backend)==null||d.resize(i,n,r),this.opened)if(this.atHome)this.home(true);else{const l=this.camera.current,f=i/Math.max(a.width,1);this.camera.set(this.constrain({...l,zoom:l.zoom*f}))}t?this.loop.drawNow():this.invalidate()}watchPixelRatio(){var t,e,i,n;typeof window>"u"||typeof window.matchMedia!="function"||((e=(t=this.dprQuery)==null?void 0:t.removeEventListener)==null||e.call(t,"change",this.onPixelRatioChange),this.dprQuery=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`),(n=(i=this.dprQuery).addEventListener)==null||n.call(i,"change",this.onPixelRatioChange))}setUnloadable(t){t!==this.unloadable&&(this.unloadable=t,this.emit("unloadable",t))}emit(t,e){var i;(i=this.listeners.get(t))==null||i.forEach(n=>n(e))}}const ct=()=>typeof performance<"u"?performance.now():Date.now();function Ze(s){if(typeof IntersectionObserver>"u"||typeof window>"u")return true;const{top:t,left:e,width:i,height:n}=s.getBoundingClientRect();return t+n>=0&&e+i>=0&&t<=window.innerHeight&&e<=window.innerWidth}function Ke(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function F(s){return Object.fromEntries(Object.entries(s).filter(([,t])=>t!==void 0))}const ii=(s,t)=>new Xe(s,t);export{Dt as b,Ft as h,Be as p,ii as r};
|