@nulib/clover 4.5.7 → 4.5.8

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.
Files changed (243) hide show
  1. package/dist/components/Items/Items.mjs +10 -3
  2. package/dist/styles/default.css +1 -1
  3. package/dist/styles/items.css +1 -1
  4. package/dist/styles.css +1 -1
  5. package/dist/templates/default/Default.mjs +62 -15
  6. package/dist/templates/index.d.mts +3 -1
  7. package/dist/ui/useRovingFocus.mjs +6 -3
  8. package/dist/ui/useScrollTrack.mjs +8 -7
  9. package/dist/web-components/{About-VyQRiIMu.mjs → About-CVX3WjIM.mjs} +1 -1
  10. package/dist/web-components/{AnnotationItems-BlTIHa-e.mjs → AnnotationItems-DKP8AOB9.mjs} +1 -1
  11. package/dist/web-components/{AnnotationMenu-BwikEMPh.mjs → AnnotationMenu-DS8hpHt_.mjs} +1 -1
  12. package/dist/web-components/{AnnotationState-aXi45WGy.mjs → AnnotationState-C6XuLyjK.mjs} +1 -1
  13. package/dist/web-components/{Annotations-DBqyfHcF.mjs → Annotations-C6jdThgl.mjs} +1 -1
  14. package/dist/web-components/{Annotations-61qamybS.mjs → Annotations-DZ0uCsSA.mjs} +1 -1
  15. package/dist/web-components/{Body-DNMPENDm.mjs → Body-BSgaX-3F.mjs} +1 -1
  16. package/dist/web-components/{BodyAlert-BiM1lAoB.mjs → BodyAlert-B4aQaIUq.mjs} +1 -1
  17. package/dist/web-components/{Button-BLs5Picj.mjs → Button-DjjrKoEn.mjs} +1 -1
  18. package/dist/web-components/{Camera-CUmqAh54.mjs → Camera-BEeXRxzV.mjs} +1 -1
  19. package/dist/web-components/{Canvas2DBackend-D5Mgo0QW.mjs → Canvas2DBackend-nJRJutaS.mjs} +1 -1
  20. package/dist/web-components/{CanvasView-BfOvex16.mjs → CanvasView-DK0lfyWR.mjs} +2 -2
  21. package/dist/web-components/{CaptionDetails-jNqdn9Mt.mjs → CaptionDetails-ljenvCyI.mjs} +1 -1
  22. package/dist/web-components/{ChaptersMenu-CNgG4zwW.mjs → ChaptersMenu-DDgnLAtO.mjs} +1 -1
  23. package/dist/web-components/{Chevron-BdgGQvNa.mjs → Chevron-JoTeVk7K.mjs} +1 -1
  24. package/dist/web-components/{ChoiceMenu-CvS8F3X_.mjs → ChoiceMenu-82jUcgr6.mjs} +1 -1
  25. package/dist/web-components/{Collection-lzc7WD9g.mjs → Collection-JI80uk-a.mjs} +1 -1
  26. package/dist/web-components/{CollectionSelect-CzgYKMt5.mjs → CollectionSelect-CxOlBjmO.mjs} +1 -1
  27. package/dist/web-components/Connected-Bur9iAGb.mjs +1 -0
  28. package/dist/web-components/{Connected-B_5LeFpt.mjs → Connected-CC10s8oE.mjs} +1 -1
  29. package/dist/web-components/Connected-DTYB8ubW.mjs +1 -0
  30. package/dist/web-components/{Contents-CtyHkeUB.mjs → Contents-cwsn0zpJ.mjs} +1 -1
  31. package/dist/web-components/{ControlMenu-CaZbfh-v.mjs → ControlMenu-BBBRHutV.mjs} +1 -1
  32. package/dist/web-components/ControlsFade-DNHDI2WA.mjs +1 -0
  33. package/dist/web-components/{CountMenu-DzEKtcUs.mjs → CountMenu-DFOUdzB0.mjs} +1 -1
  34. package/dist/web-components/Cue-C2a4Pvi3.mjs +1 -0
  35. package/dist/web-components/{Document-D8BNUyN_.mjs → Document-CKJYtix1.mjs} +1 -1
  36. package/dist/web-components/{DomLayers-CyfXsLu_.mjs → DomLayers-vrvJUN5_.mjs} +1 -1
  37. package/dist/web-components/{Download-CVW5MabM.mjs → Download-CQX7fDub.mjs} +1 -1
  38. package/dist/web-components/{EntryBodies-DZpB82X3.mjs → EntryBodies-BvHccb-L.mjs} +1 -1
  39. package/dist/web-components/{EntryThumbnail-C9TitZhS.mjs → EntryThumbnail-YuRsScmh.mjs} +1 -1
  40. package/dist/web-components/{FieldPill-DQQzm8hG.mjs → FieldPill-D8JBm03i.mjs} +1 -1
  41. package/dist/web-components/{FrameAnimation-C1a4L8pR.mjs → FrameAnimation-DJRLNImC.mjs} +1 -1
  42. package/dist/web-components/{Gallery-D8PPijA-.mjs → Gallery-BH4b0bkJ.mjs} +1 -1
  43. package/dist/web-components/{GlobeGlyph-CRfMG161.mjs → GlobeGlyph-DU4HgIlU.mjs} +1 -1
  44. package/dist/web-components/{HideToggle-DAb6JxDB.mjs → HideToggle-C5GjtOeD.mjs} +1 -1
  45. package/dist/web-components/{ImageControls-BYNIBF8X.mjs → ImageControls-D4NriMaR.mjs} +1 -1
  46. package/dist/web-components/Items-V4WBXxYO.mjs +1 -0
  47. package/dist/web-components/{Label-BsqpZ2iR.mjs → Label-AzCladKz.mjs} +1 -1
  48. package/dist/web-components/{LanguageChoice-BAici6Li.mjs → LanguageChoice-BjOVXoTc.mjs} +1 -1
  49. package/dist/web-components/{LanguageMenu-BTvnQxFI.mjs → LanguageMenu-DYKPJWTQ.mjs} +1 -1
  50. package/dist/web-components/{LightboxView-C-eD7J97.mjs → LightboxView-BTtyMjPN.mjs} +1 -1
  51. package/dist/web-components/{ListEnd-C-Ml1EYs.mjs → ListEnd-Dp2ZLTtS.mjs} +1 -1
  52. package/dist/web-components/{Loaded-B8vl-G-V.mjs → Loaded-B_afJf30.mjs} +1 -1
  53. package/dist/web-components/{LoadedCanvas-DGqbVGS7.mjs → LoadedCanvas-DisvEU6k.mjs} +1 -1
  54. package/dist/web-components/LoadedMap-DCMWMk1e.mjs +1 -0
  55. package/dist/web-components/{Loading-UuKuHE79.mjs → Loading-BXzghLiL.mjs} +1 -1
  56. package/dist/web-components/{Map-CT5D-pfb.mjs → Map-Sr8lEkIx.mjs} +1 -1
  57. package/dist/web-components/{MapView-Bsg_Olm7.mjs → MapView-Cyuq8ZjK.mjs} +2 -2
  58. package/dist/web-components/{Markup-CeeOSehy.mjs → Markup-D_j5vPvk.mjs} +1 -1
  59. package/dist/web-components/{MediaBody-Q6rhew4q.mjs → MediaBody-BFkIoL-g.mjs} +1 -1
  60. package/dist/web-components/{MediaBody-fQE-A-yD.mjs → MediaBody-DRkphCAw.mjs} +1 -1
  61. package/dist/web-components/{NavDate-DdU75wtq.mjs → NavDate-DWIV5F6P.mjs} +1 -1
  62. package/dist/web-components/{Navigator-D8S66GNd.mjs → Navigator-R3SCVscB.mjs} +1 -1
  63. package/dist/web-components/{Pager-B0QqGXp3.mjs → Pager-D6slnuet.mjs} +1 -1
  64. package/dist/web-components/{PagerLayout-s15H568t.mjs → PagerLayout-B-a-Bj7s.mjs} +1 -1
  65. package/dist/web-components/{Panel-ByrpMdLY.mjs → Panel-CuGSpuMG.mjs} +1 -1
  66. package/dist/web-components/PanelPart-C5T9XPgt.mjs +1 -0
  67. package/dist/web-components/{PanelToggle-B1QENm1I.mjs → PanelToggle-DGi2sN1Y.mjs} +1 -1
  68. package/dist/web-components/{PartOfManifest-CUOEJX-B.mjs → PartOfManifest-dHMlHOeZ.mjs} +1 -1
  69. package/dist/web-components/{Pending-DYgjpYcj.mjs → Pending-DqTfvy6z.mjs} +1 -1
  70. package/dist/web-components/{PlaceBox-Bqr3fEt1.mjs → PlaceBox-DW79A9P1.mjs} +1 -1
  71. package/dist/web-components/{Placeholder-DGPTR3uA.mjs → Placeholder-D2xzRHzw.mjs} +1 -1
  72. package/dist/web-components/{Position-D8fef2x7.mjs → Position-CZxedOcV.mjs} +1 -1
  73. package/dist/web-components/{Primitives-DuP39vJE.mjs → Primitives-DjUlp4ln.mjs} +1 -1
  74. package/dist/web-components/{Provider-DIANDsur.mjs → Provider-BhDLDrIb.mjs} +1 -1
  75. package/dist/web-components/{ReadMore-R-glAXeL.mjs → ReadMore-l-ljjCbA.mjs} +1 -1
  76. package/dist/web-components/{Root-ChyZ9HKB.mjs → Root-DdfxetNr.mjs} +1 -1
  77. package/dist/web-components/Scene-CoKy2-jQ.mjs +1 -0
  78. package/dist/web-components/{SceneView-BOE20DQY.mjs → SceneView-C-5ZBOMj.mjs} +1 -1
  79. package/dist/web-components/{Search-B2H5S0R-.mjs → Search-DvSuOWsf.mjs} +1 -1
  80. package/dist/web-components/{Sections-d0uuX5tK.mjs → Sections-WeQ6ifoH.mjs} +1 -1
  81. package/dist/web-components/{SeekMarks-TGu3Bbws.mjs → SeekMarks-CnV7psCC.mjs} +1 -1
  82. package/dist/web-components/{StandaloneItems-vJqJhY6P.mjs → StandaloneItems-BrGYircX.mjs} +1 -1
  83. package/dist/web-components/{Status-DCVccIz7.mjs → Status-CjAX4ZcY.mjs} +1 -1
  84. package/dist/web-components/{Steps-VCHVkAOu.mjs → Steps-WGighDCr.mjs} +1 -1
  85. package/dist/web-components/{TargetItems-krRcBfvc.mjs → TargetItems-CHK11XsC.mjs} +1 -1
  86. package/dist/web-components/Timeline-CylMxHCg.mjs +1 -0
  87. package/dist/web-components/{Tip-B0TpGspf.mjs → Tip-MXBlEQhp.mjs} +1 -1
  88. package/dist/web-components/{Transcript-DdoG3nZQ.mjs → Transcript-BdmTrR_U.mjs} +1 -1
  89. package/dist/web-components/{Transport-BW0laFuy.mjs → Transport-B4jS-QyR.mjs} +1 -1
  90. package/dist/web-components/{Transport-DixOWHie.mjs → Transport-DkJkLd_9.mjs} +1 -1
  91. package/dist/web-components/{annotation-collection-B7P4xVWB.mjs → annotation-collection-DgDTaqZJ.mjs} +1 -1
  92. package/dist/web-components/{annotation-name-BEuD2SqF.mjs → annotation-name-BQPsnye0.mjs} +1 -1
  93. package/dist/web-components/{annotations-content-BiEkS0ze.mjs → annotations-content-C2Ard-Wu.mjs} +1 -1
  94. package/dist/web-components/{body-VhEQIZz1.mjs → body-CsDqGyS1.mjs} +1 -1
  95. package/dist/web-components/{canvas-BANXin9O.mjs → canvas-DYIiw-An.mjs} +1 -1
  96. package/dist/web-components/{cloverEngine-pxuhoj7w.mjs → cloverEngine-BjfUbU7f.mjs} +1 -1
  97. package/dist/web-components/{content-state-reader-DVti_UNh.mjs → content-state-reader-W2X5SbX2.mjs} +1 -1
  98. package/dist/web-components/{controlGlyphs-DkQh1wkH.mjs → controlGlyphs-DO8zuBuP.mjs} +1 -1
  99. package/dist/web-components/{controls-DG9o_1Ms.mjs → controls-B-kceETo.mjs} +1 -1
  100. package/dist/web-components/{downloads-Ct1IVm1N.mjs → downloads-b2ula2rS.mjs} +1 -1
  101. package/dist/web-components/{dragToClose-B2D5gjIv.mjs → dragToClose-CyySNxZo.mjs} +1 -1
  102. package/dist/web-components/{engine-DheXoWuS.mjs → engine-BO2NyZbt.mjs} +1 -1
  103. package/dist/web-components/{engines-D3Nl9FJa.mjs → engines-ByJdQYM6.mjs} +1 -1
  104. package/dist/web-components/{fetchManifest-CZUkPEJT.mjs → fetchManifest-BJPcndui.mjs} +1 -1
  105. package/dist/web-components/{follow-content-DV7lsgAv.mjs → follow-content-Bta7Cphz.mjs} +1 -1
  106. package/dist/web-components/{fromManifest-CaESsRH1.mjs → fromManifest-toVz2G-X.mjs} +1 -1
  107. package/dist/web-components/{glyphs-_fryeQK1.mjs → glyphs-C9dkvLmy.mjs} +1 -1
  108. package/dist/web-components/{hooks-2wlZJ5Vj.mjs → hooks-C1S0JZNP.mjs} +1 -1
  109. package/dist/web-components/{image-layers-BMG1Vq4O.mjs → image-layers-hf965hJE.mjs} +1 -1
  110. package/dist/web-components/{image-service-content-BHIDyYR5.mjs → image-service-content-kG5TIiB7.mjs} +1 -1
  111. package/dist/web-components/{imageService-Dr2yUnHN.mjs → imageService-DVoE9khh.mjs} +1 -1
  112. package/dist/web-components/{index-B2-GJaXD.mjs → index-BqgqqnqN.mjs} +1 -1
  113. package/dist/web-components/index.mjs +1 -1
  114. package/dist/web-components/{items-DIK2DCYN.mjs → items-DNfIV4vN.mjs} +1 -1
  115. package/dist/web-components/items-Di34gCGN.mjs +1 -0
  116. package/dist/web-components/label-Dt_ns3jW.mjs +1 -0
  117. package/dist/web-components/{layout-zLeHeNSF.mjs → layout--P98JuFG.mjs} +1 -1
  118. package/dist/web-components/{link-gSAPkIaj.mjs → link-p71HL3dn.mjs} +1 -1
  119. package/dist/web-components/logo-QsMwaY8M.mjs +1 -0
  120. package/dist/web-components/{models-Cl3PryAF.mjs → models-BnyeBKu_.mjs} +1 -1
  121. package/dist/web-components/{nodes-DxdzLXSF.mjs → nodes-DZbVJvjk.mjs} +1 -1
  122. package/dist/web-components/{overlayImage-mqkzG-e1.mjs → overlayImage-D6TfbX70.mjs} +1 -1
  123. package/dist/web-components/{panel-zafZqMud.mjs → panel-COA5_tL_.mjs} +1 -1
  124. package/dist/web-components/part-DgEyWjer.mjs +1 -0
  125. package/dist/web-components/{playerSurface-BEZ_dDs6.mjs → playerSurface-Uc4JAuxZ.mjs} +1 -1
  126. package/dist/web-components/{pointer-RBOOjlWj.mjs → pointer-BPJduQ1u.mjs} +1 -1
  127. package/dist/web-components/{provider-L0fhpZmV.mjs → provider-B4tq-84F.mjs} +1 -1
  128. package/dist/web-components/{range-regions-T_73-NWY.mjs → range-regions-92kmJCAy.mjs} +1 -1
  129. package/dist/web-components/{read-more-CU3jFqSi.mjs → read-more-BnhdOE8Y.mjs} +1 -1
  130. package/dist/web-components/{readingLanguages-DZsqrAWq.mjs → readingLanguages-Bf_HW2UJ.mjs} +1 -1
  131. package/dist/web-components/{rendererSurface-FBwf4yii.mjs → rendererSurface-BZa3x_Xh.mjs} +2 -2
  132. package/dist/web-components/{renderers-DCZW9zLC.mjs → renderers-CX9SrgrB.mjs} +1 -1
  133. package/dist/web-components/{resource-C2zc8K9v.mjs → resource-DF5HkAfv.mjs} +1 -1
  134. package/dist/web-components/{save-file-Dp4Yp3CX.mjs → save-file-oScSwFhH.mjs} +1 -1
  135. package/dist/web-components/{search-96l87qSf.mjs → search-BvpD-NWY.mjs} +1 -1
  136. package/dist/web-components/{shared-9sToDP5G.mjs → shared-w6hjs-L1.mjs} +1 -1
  137. package/dist/web-components/{show-link-23miLn_l.mjs → show-link-DRCdG8ae.mjs} +1 -1
  138. package/dist/web-components/{sizedImage-B_ze_WS6.mjs → sizedImage-BtyysLax.mjs} +1 -1
  139. package/dist/web-components/{split-CkWbkgmc.mjs → split-DFthztSD.mjs} +1 -1
  140. package/dist/web-components/{status-DZj0V4nZ.mjs → status-BZuOJ0UE.mjs} +1 -1
  141. package/dist/web-components/{styles-Di6TZHyP.mjs → styles-BeCG47FS.mjs} +1 -1
  142. package/dist/web-components/three.mjs +1 -1
  143. package/dist/web-components/{thumbnail-22tHjWEh.mjs → thumbnail-DhVhVkd8.mjs} +1 -1
  144. package/dist/web-components/{tip-Skhs56Gk.mjs → tip-ukHtKmqe.mjs} +1 -1
  145. package/dist/web-components/{toggle-DatEYCUk.mjs → toggle-DX4vFKqT.mjs} +1 -1
  146. package/dist/web-components/{useContainerName-B2qSONvC.mjs → useContainerName-CM_MIZu9.mjs} +1 -1
  147. package/dist/web-components/{useControlsVisibility-DYj5p1m8.mjs → useControlsVisibility-DZFyrqAJ.mjs} +1 -1
  148. package/dist/web-components/{useNearViewport-CeEAjxcM.mjs → useNearViewport-DHvgWl-0.mjs} +1 -1
  149. package/dist/web-components/useScrollTrack-B0Nx9ZZ7.mjs +1 -0
  150. package/dist/web-components/viewer/{AnnotationItems-CUVQu0sj.mjs → AnnotationItems-CLssRyMA.mjs} +1 -1
  151. package/dist/web-components/viewer/{AnnotationMenu-DUywRsH9.mjs → AnnotationMenu-i4ieWtOL.mjs} +1 -1
  152. package/dist/web-components/viewer/{AnnotationState-Rp1bRCk0.mjs → AnnotationState-BmDac4UI.mjs} +1 -1
  153. package/dist/web-components/viewer/{Annotations-D6XBVx_r.mjs → Annotations-C-zxQ4wJ.mjs} +1 -1
  154. package/dist/web-components/viewer/{Annotations-C-XbGzkf.mjs → Annotations-CEwycZ2M.mjs} +1 -1
  155. package/dist/web-components/viewer/{Canvas2DBackend-DfeyF4Sn.mjs → Canvas2DBackend-BFb2tuhl.mjs} +1 -1
  156. package/dist/web-components/viewer/{CaptionDetails-Dm9OED9q.mjs → CaptionDetails-Et5z9c7X.mjs} +1 -1
  157. package/dist/web-components/viewer/{ChaptersMenu-CbUWVDlA.mjs → ChaptersMenu-CSFNWKY2.mjs} +1 -1
  158. package/dist/web-components/viewer/{ChoiceMenu-Dg3CMJC3.mjs → ChoiceMenu-Ccv0BI0G.mjs} +1 -1
  159. package/dist/web-components/viewer/{Collection-GlPUR_Wq.mjs → Collection-86-r4tY9.mjs} +1 -1
  160. package/dist/web-components/viewer/{Connected-D73s7-vD.mjs → Connected-D_7Zs7Hq.mjs} +1 -1
  161. package/dist/web-components/viewer/{Connected-D_hC2NKq.mjs → Connected-DbLzPNdX.mjs} +1 -1
  162. package/dist/web-components/viewer/{Contents-DZDz1id8.mjs → Contents-DUjhQjnI.mjs} +1 -1
  163. package/dist/web-components/viewer/{ControlMenu-IKgzjoAC.mjs → ControlMenu-CKcTiPrh.mjs} +1 -1
  164. package/dist/web-components/viewer/ControlsFade-Bo9VWCLG.mjs +1 -0
  165. package/dist/web-components/viewer/{CountMenu-CF-yZuq6.mjs → CountMenu-B1_cvbuR.mjs} +1 -1
  166. package/dist/web-components/viewer/Cue-DzOw4BLm.mjs +1 -0
  167. package/dist/web-components/viewer/{Document-C5bJQXa7.mjs → Document-BGRVcflJ.mjs} +1 -1
  168. package/dist/web-components/viewer/{DomLayers-DM-5MV__.mjs → DomLayers-wxV3sHPY.mjs} +1 -1
  169. package/dist/web-components/viewer/{Download-BcWqJ6gp.mjs → Download-Cyfhran6.mjs} +1 -1
  170. package/dist/web-components/viewer/{EntryBodies-CtnEnRhl.mjs → EntryBodies-B2WCkj8y.mjs} +1 -1
  171. package/dist/web-components/viewer/{EntryThumbnail-CI6XobsH.mjs → EntryThumbnail-dUTxyqTj.mjs} +1 -1
  172. package/dist/web-components/viewer/{FieldPill-DpVrScl7.mjs → FieldPill-D8gW-r_p.mjs} +1 -1
  173. package/dist/web-components/viewer/{FrameAnimation-B8lgrSfp.mjs → FrameAnimation-ChG6Louz.mjs} +1 -1
  174. package/dist/web-components/viewer/{Gallery-BQnLyWZI.mjs → Gallery-OZ5ZiwmB.mjs} +1 -1
  175. package/dist/web-components/viewer/{GlobeGlyph-5YeAnzZS.mjs → GlobeGlyph-CXycpMBJ.mjs} +1 -1
  176. package/dist/web-components/viewer/{HideToggle-C8FqKQpl.mjs → HideToggle-BMddH3GA.mjs} +1 -1
  177. package/dist/web-components/viewer/{ImageControls-C2TSU7YV.mjs → ImageControls-Bu_6VlDO.mjs} +1 -1
  178. package/dist/web-components/viewer/{LanguageChoice-CMRKNT1s.mjs → LanguageChoice-BUTtsHEi.mjs} +1 -1
  179. package/dist/web-components/viewer/{LanguageMenu-DDysz3dn.mjs → LanguageMenu-DOYyHpdr.mjs} +1 -1
  180. package/dist/web-components/viewer/{LightboxView-CMhIYI9F.mjs → LightboxView-DP4_ElsL.mjs} +1 -1
  181. package/dist/web-components/viewer/{ListEnd-7_wAsufl.mjs → ListEnd-CEdhO0md.mjs} +1 -1
  182. package/dist/web-components/viewer/{MapView-CTJeP19U.mjs → MapView-qaaRmnM-.mjs} +2 -2
  183. package/dist/web-components/viewer/{MediaBody-D7gFPWmU.mjs → MediaBody-Cjl76Spk.mjs} +1 -1
  184. package/dist/web-components/viewer/{MediaBody-DJE41Ggr.mjs → MediaBody-CvXptO7l.mjs} +1 -1
  185. package/dist/web-components/viewer/{NavDate-B6GJyAZz.mjs → NavDate-OJND1QQD.mjs} +1 -1
  186. package/dist/web-components/viewer/{Navigator-BP2BG8Za.mjs → Navigator-DRwnm5an.mjs} +1 -1
  187. package/dist/web-components/viewer/{PagerLayout-D_lbzpje.mjs → PagerLayout-DN7ZEktF.mjs} +1 -1
  188. package/dist/web-components/viewer/PanelPart-CF2Fw2b4.mjs +1 -0
  189. package/dist/web-components/viewer/{PartOfManifest-B1m_edb8.mjs → PartOfManifest-3cK5il9_.mjs} +1 -1
  190. package/dist/web-components/viewer/{PlaceBox-CIX6eZX1.mjs → PlaceBox-C9qj6wIy.mjs} +1 -1
  191. package/dist/web-components/viewer/{Placeholder-CqJ2MsHM.mjs → Placeholder-DmX-oTRS.mjs} +1 -1
  192. package/dist/web-components/viewer/{Search-DPmrOEIr.mjs → Search-DLRmliHy.mjs} +1 -1
  193. package/dist/web-components/viewer/{SeekMarks-DXU1o9YQ.mjs → SeekMarks-BsAVx2o9.mjs} +1 -1
  194. package/dist/web-components/viewer/{StandaloneItems-iRdk8VYf.mjs → StandaloneItems-BOXI-FO-.mjs} +1 -1
  195. package/dist/web-components/viewer/{Steps-CuNUFA3I.mjs → Steps-Dl85Vj2l.mjs} +1 -1
  196. package/dist/web-components/viewer/{TargetItems-QBE9CxwV.mjs → TargetItems-BVT2_Bey.mjs} +1 -1
  197. package/dist/web-components/viewer/{Transcript-DlptB46U.mjs → Transcript-fRjfw6kB.mjs} +1 -1
  198. package/dist/web-components/viewer/{Transport-iHzfi7uP.mjs → Transport-Bu1B2DCX.mjs} +1 -1
  199. package/dist/web-components/viewer/{Transport-C9EFEDJu.mjs → Transport-DKUQM7Hn.mjs} +1 -1
  200. package/dist/web-components/viewer/{annotation-collection-DTVrE-QZ.mjs → annotation-collection-B7DNaCRe.mjs} +1 -1
  201. package/dist/web-components/viewer/{annotation-name-DKTofYnE.mjs → annotation-name-DCAh29x5.mjs} +1 -1
  202. package/dist/web-components/viewer/{annotations-content-BlwlbeVP.mjs → annotations-content-BG992gjT.mjs} +1 -1
  203. package/dist/web-components/viewer/{cloverEngine-Dlh-z8EL.mjs → cloverEngine-SxAYyRtz.mjs} +1 -1
  204. package/dist/web-components/viewer/{content-state-reader-CnnpSFlK.mjs → content-state-reader-CRGjvYpM.mjs} +1 -1
  205. package/dist/web-components/viewer/{dragToClose-CzrwaZo1.mjs → dragToClose-Di8WUOHC.mjs} +1 -1
  206. package/dist/web-components/viewer/{fetchManifest-BhVzHzo2.mjs → fetchManifest-B3gCtveO.mjs} +1 -1
  207. package/dist/web-components/viewer/{follow-content-BH2iMwBp.mjs → follow-content-2RmNmRMy.mjs} +1 -1
  208. package/dist/web-components/viewer/{host-B2sqIwnE.mjs → host-CM3zmrKp.mjs} +1 -1
  209. package/dist/web-components/viewer/{image-layers-Cd8Puz_E.mjs → image-layers-CmimeZYQ.mjs} +1 -1
  210. package/dist/web-components/viewer/{image-service-content-CJo34Kw3.mjs → image-service-content-DNYciFvo.mjs} +1 -1
  211. package/dist/web-components/viewer/index.mjs +1 -1
  212. package/dist/web-components/viewer/{link-Bf7oTjh2.mjs → link-CrW4CND2.mjs} +1 -1
  213. package/dist/web-components/viewer/{overlayImage-D6ckInbH.mjs → overlayImage-Bgl_ar2I.mjs} +1 -1
  214. package/dist/web-components/viewer/{range-regions-CfXsCFU1.mjs → range-regions-DwMexshz.mjs} +1 -1
  215. package/dist/web-components/viewer/{renderers-C1iEbiXw.mjs → renderers-Cs9Wbr3d.mjs} +1 -1
  216. package/dist/web-components/viewer/{save-file-C6SVTxwd.mjs → save-file-CpREFWq3.mjs} +1 -1
  217. package/dist/web-components/viewer/{search-B6_Ctp53.mjs → search-CI1xScP1.mjs} +1 -1
  218. package/dist/web-components/viewer/{styles-ihp-vncb.mjs → styles-nU97HodU.mjs} +1 -1
  219. package/dist/web-components/viewer/{useControlsVisibility-D-TA6qZW.mjs → useControlsVisibility-CCTZH1aT.mjs} +1 -1
  220. package/dist/web-components/viewer/viewer-BDXZbbZI.mjs +29 -0
  221. package/dist/web-components/viewer/{vtt-fmAkEE-g.mjs → vtt-DJjsoNz1.mjs} +1 -1
  222. package/dist/web-components/viewer-DD2bGSYe.mjs +1 -0
  223. package/dist/web-components/{vtt-CJkd32sA.mjs → vtt-D30pzLou.mjs} +1 -1
  224. package/package.json +1 -1
  225. package/dist/web-components/Connected-CdeTNEkW.mjs +0 -1
  226. package/dist/web-components/Connected-Dss8dX9u.mjs +0 -1
  227. package/dist/web-components/ControlsFade-BrZ4_xJu.mjs +0 -1
  228. package/dist/web-components/Cue-DgSWaxt6.mjs +0 -1
  229. package/dist/web-components/Items-DZ2rblNa.mjs +0 -1
  230. package/dist/web-components/LoadedMap-C-0BE0wY.mjs +0 -1
  231. package/dist/web-components/PanelPart-3w0sWqmU.mjs +0 -1
  232. package/dist/web-components/Scene-CUydm2WU.mjs +0 -1
  233. package/dist/web-components/Timeline-9S5GW0HA.mjs +0 -1
  234. package/dist/web-components/items-BCo1O5UF.mjs +0 -1
  235. package/dist/web-components/label-nN3wAmWa.mjs +0 -1
  236. package/dist/web-components/logo-C_MdkvAQ.mjs +0 -1
  237. package/dist/web-components/part-Cybq62qY.mjs +0 -1
  238. package/dist/web-components/useScrollTrack-SUztbI1C.mjs +0 -1
  239. package/dist/web-components/viewer/ControlsFade-N_UBYfTb.mjs +0 -1
  240. package/dist/web-components/viewer/Cue-CQXpS1cD.mjs +0 -1
  241. package/dist/web-components/viewer/PanelPart-BOXT_SZv.mjs +0 -1
  242. package/dist/web-components/viewer/viewer-DAIgpvoG.mjs +0 -29
  243. package/dist/web-components/viewer-BYyFRkAV.mjs +0 -1
@@ -1 +1 @@
1
- import{a as p,u as s,v as c,l as d,k as m}from"./shared-9sToDP5G.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{b as f}from"./hooks-2wlZJ5Vj.mjs";import{L as h}from"./Loading-UuKuHE79.mjs";function b({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{b as S};
1
+ import{a as p,u as s,v as c,l as d,k as m}from"./shared-w6hjs-L1.mjs";import{j as v}from"./classnames-DukgfdpI.mjs";import{c as f}from"./hooks-C1S0JZNP.mjs";import{L as h}from"./Loading-BXzghLiL.mjs";function j({className:e,loading:t,error:l}){const{t:n,langOf:i}=p(),{status:a,error:o}=f(),r=a==="loading",u=t!==void 0&&t!==false;return s(m,{children:[s("p",{className:v("clover-status",e),"data-status":r?a:void 0,role:"status",style:r&&t!==false?void 0:c,children:[r&&(u?t:t===void 0&&s(h,{})),r&&!u&&s("span",{style:c,...d(i("statusLoading")),children:n("statusLoading")})]}),a==="error"&&o&&s("div",{className:v("clover-status",e),"data-status":a,role:"alert",children:l?l(o):s(m,{children:[s("p",{...d(i("statusError")),children:n("statusError")}),s("p",{className:"clover-status-detail",lang:"en",children:o.message})]})})]})}export{j as S};
@@ -1 +1 @@
1
- import{a as c,u as o,l as p,v as u}from"./shared-9sToDP5G.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-B0TpGspf.mjs";import"./styles-Di6TZHyP.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
1
+ import{a as c,u as o,l as p,v as u}from"./shared-w6hjs-L1.mjs";import{j as h}from"./classnames-DukgfdpI.mjs";import{T as v}from"./Tip-MXBlEQhp.mjs";import"./styles-BeCG47FS.mjs";function g({steps:e,sentence:t,className:a}){const{t:l,langOf:n}=c(),{position:r,total:i}=e;if(i<1)return null;const s=r+1;return o("div",{className:h("clover-steps",a),children:[o("span",{"aria-live":"polite",className:"clover-steps-position",children:[o("span",{"aria-hidden":t?"true":void 0,children:[s>0?s:"\u2013"," / ",i]}),o("span",{className:"clover-steps-room","aria-hidden":"true",hidden:true,children:[i," / ",i]}),t&&s>0&&o("span",{style:u,...p(n(t)),children:l(t,{index:s,total:i})})]}),o(d,{steps:e,step:"previous"}),o(d,{steps:e,step:"next"})]})}function d({steps:e,step:t}){const{t:a,langOf:l}=c(),n=t==="next",r=n?e.position+1<e.total:e.position>0,i=n?"commonNext":"commonPrevious";return o("button",{type:"button",className:"clover-steps-step","data-step":t,...p(l(i)),"aria-disabled":!r||void 0,tabIndex:r?void 0:-1,onClick:()=>{r&&e.step(n?1:-1)},children:[o("svg",{"aria-hidden":"true",focusable:"false",width:"12",height:"12",viewBox:"0 0 16 16",children:o("path",{d:n?"M6 3l5 5-5 5":"M10 3L5 8l5 5",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("span",{style:u,children:a(i)}),o(v,{label:a(i)})]})}export{g as S};
@@ -1 +1 @@
1
- import{e as p,c as m,ai as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-9sToDP5G.mjs";import{s as w,P as M,a as C}from"./Items-DZ2rblNa.mjs";import{C as P}from"./CountMenu-DzEKtcUs.mjs";import{f as S,r as N}from"./fetchManifest-CZUkPEJT.mjs";import{S as q}from"./Steps-VCHVkAOu.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-Di6TZHyP.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function B(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
1
+ import{e as p,c as m,ai as v,t as f,u as d,l as h,T as g,d as x,y,F as b}from"./shared-w6hjs-L1.mjs";import{s as w,P as M,a as C}from"./Items-V4WBXxYO.mjs";import{C as P}from"./CountMenu-DFOUdzB0.mjs";import{f as S,r as N}from"./fetchManifest-BJPcndui.mjs";import{S as q}from"./Steps-WGighDCr.mjs";import{a as A}from"./heading-Cjt0f-Eu.mjs";import"./styles-BeCG47FS.mjs";function I({onSelect:s,forwardedRef:t,...i}){const{clover:l,language:o}=p("Items"),{items:a,position:e}=F(),r=(n,c)=>{s==null||s(n,c);const u=a.findIndex(T=>T.id===n.id);u>=0&&l.goToTarget(u)};return i.layout==="pager"?d(M,{...i,forwardedRef:t,steps:w(a,e,"left-to-right",r),nameKey:"informationPanelTabsTargets",position:d(P,{position:e,total:a.length,list:n=>d(I,{layout:"list",forwardedRef:null,onSelect:n})})}):d(C,{...i,forwardedRef:t,items:a,selected:e,navigation:"id",language:o,request:l.request,showSummary:true,onActivate:r})}function F(){const{language:s}=p("Items"),t=m(e=>e.targets),i=m(e=>e.manifest),l=m(e=>v(e.targets,e.targetIndex,e.manifest,e.canvasId)),o=z(t==null?void 0:t.items,i);return{items:g(()=>((t==null?void 0:t.items)??[]).map(e=>B(e,o.get(e.manifestId)??(e.manifestAs?o.get(e.manifestAs):void 0),s)),[t,o,s]),position:l}}function z(s,t){const{clover:i}=p("Items"),l=g(()=>[...new Set((s??[]).map(e=>e.manifestId))],[s]),[o,a]=x(new Map);return y(()=>{let e=true;return Promise.all(l.map(async r=>[r,await S(i,r)])).then(r=>{e&&a(new Map(r.filter(n=>!!n[1])))}),()=>{e=false}},[i,l]),g(()=>{const e=new Map(o);return t&&e.set(t.id,t),e},[o,t])}function B(s,t,i){const l=t?b(t).canvases:[],o=l.find(u=>u.id===s.canvasId)??l[0],a=t==null?void 0:t.label,e=o==null?void 0:o.label,r=f(e,i).text?e:a,n=a&&r!==a&&f(a,i).text!==f(r,i).text?a:void 0,c=o&&s.region?N(o,s.region):void 0;return{id:s.id,label:r,summary:n,parts:[{id:s.id,type:"Canvas",label:r,resource:o??{id:s.canvasId??s.manifestId},...c?{source:c}:{}}]}}function E({headingLevel:s=3}){const{clover:t,language:i}=p("Items"),l=m(n=>{var c;return(c=n.targets)==null?void 0:c.label}),o=m(n=>{var c;return((c=n.targets)==null?void 0:c.items.length)??0}),a=m(n=>v(n.targets,n.targetIndex,n.manifest,n.canvasId));if(o<2)return null;const e=f(l,i),r=A(s);return d("div",{className:"clover-about clover-collection clover-targets",children:[d("div",{className:"clover-targets-head",children:[e.text&&d(r,{className:"clover-collection-title clover-title",...h(e.lang),children:e.text}),d(q,{className:"clover-targets-steps",steps:{position:a,total:o,step:n=>{const c=a+n;c>=0&&c<o&&t.goToTarget(c)}}})]}),d(I,{layout:"list",forwardedRef:null})]})}export{E as TargetsSection,I as default,F as useTargetItems};
@@ -0,0 +1 @@
1
+ import{S as f,u as a,z as l,P as r}from"./shared-w6hjs-L1.mjs";import{C as m}from"./CanvasView-DK0lfyWR.mjs";import{p as t}from"./playerSurface-Uc4JAuxZ.mjs";import{C as s}from"./Pending-DqTfvy6z.mjs";import{j as u}from"./classnames-DukgfdpI.mjs";const d=l(()=>import("./Connected-DTYB8ubW.mjs")),v=l(()=>import("./LoadedCanvas-DisvEU6k.mjs"));function h({timeline:o,className:n,...e}){const c=f(),i=u("clover-timeline",n);return e.iiifContent!==void 0&&o===void 0?a(r,{fallback:a(s,{}),children:a(v,{...e,className:i,of:"Timeline",surface:t})}):o?a(m,{...e,className:i,canvases:[o],navigator:false,surface:t}):c?a(r,{fallback:a(s,{}),children:a(d,{...e,className:n})}):null}export{h as Timeline,h as default};
@@ -1 +1 @@
1
- import{a as k,A as L,y as S,u as f,l as w}from"./shared-9sToDP5G.mjs";import"./styles-Di6TZHyP.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function P({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function B(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let v=0;function E(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(v++===0&&(document.addEventListener("keydown",E,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--v||(document.removeEventListener("keydown",E,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function O(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,P as T,O as f,b as h,B as p};
1
+ import{a as k,A as L,y as S,u as f,l as w}from"./shared-w6hjs-L1.mjs";import"./styles-BeCG47FS.mjs";const M={zoomIn:{keys:"Plus",glyph:"+"},zoomOut:{keys:"-",glyph:"\u2212"},reset:{keys:"0",glyph:"0"},rotateRight:{keys:"R",glyph:"R"},rotateLeft:{keys:"Shift+R",glyph:"\u21E7R"},play:{keys:"K Space",glyph:"K"},mute:{keys:"M",glyph:"M"}},R=new Set(["+","=","-","_","0","r","R","k","K","m","M","j","J","l","L"]);function P({label:t,lang:e,shortcut:n,scrolls:o=false,image:r,lead:i,after:a}){const{t:c}=k(),l=L(null),u=n?c("controlShortcut",{label:t,shortcut:n.glyph}):t;return K(),S(()=>{const s=l.current;s&&m(s)&&p(s)},[u,i]),f("span",{ref:l,className:"clover-tip","aria-hidden":"true",...w(e),...o&&{tabIndex:-1,onMouseDown:s=>{var g;s.preventDefault(),(g=s.currentTarget.parentElement)==null||g.focus({preventScroll:true})}},children:[r&&f("img",{className:"clover-tip-image",src:r,alt:"",loading:"lazy",onLoad:()=>{const s=l.current;s&&m(s)&&p(s)}}),i&&f("span",{className:"clover-tip-lead",children:i}),u,a!=null&&a!==false&&f("span",{className:"clover-tip-after",children:a})]})}function d(t){const e=t.target instanceof Element&&y(t.target),n=e&&h(e);n&&p(n)}function B(t){const e=h(y(t));e&&m(e)&&p(e)}function h(t){return Array.from(t.children).find(e=>e.classList.contains("clover-tip"))}function y(t){const e=t.matches("input")?t.parentElement:null;return e&&h(e)?e:t}function m(t){var e;try{return!!((e=t.parentElement)!=null&&e.matches(":hover, :focus-visible, :has(> input:focus-visible)"))}catch{return false}}function p(t){const e=t.parentElement;if(!e)return;t.style.removeProperty("--clover-tip-room"),t.style.removeProperty("--clover-tip-shift");const n=T(e),o=parseFloat(getComputedStyle(t).paddingLeft)||0,r=n.left+o,i=n.right-o,a=e.getBoundingClientRect();let c=t.getBoundingClientRect();const l=c.right<=a.left?c.right-r:c.left>=a.right?i-c.left:i-r;c.width>l&&(t.style.setProperty("--clover-tip-room",`${Math.max(l,0)}px`),c=t.getBoundingClientRect());const u=c.left<r?r-c.left:c.right>i?i-c.right:0;u&&t.style.setProperty("--clover-tip-shift",`${u}px`)}function T(t){let e=0,n=document.documentElement.clientWidth||window.innerWidth;for(let o=t.parentElement;o&&o!==document.documentElement;o=o.parentElement){const{display:r,overflow:i,overflowX:a}=getComputedStyle(o);if(r==="inline"||r==="contents")continue;const c=a||i;if(!c||c==="visible")continue;const l=o.getBoundingClientRect();e=Math.max(e,l.left+o.clientLeft),n=Math.min(n,l.left+o.clientLeft+o.clientWidth)}return{left:e,right:n}}let v=0;function E(t){if(t.key!=="Escape"||t.defaultPrevented)return;const e=new Set;document.querySelectorAll(":hover > .clover-tip").forEach(r=>r.parentElement&&e.add(r.parentElement));const n=document.activeElement,o=n&&y(n);o&&h(o)&&e.add(o),e.forEach(r=>b(r,"tipHidden",["pointerenter","focusout"]))}function b(t,e,n){t.dataset[e]="";const o=()=>{delete t.dataset[e],n.forEach(r=>t.removeEventListener(r,o))};n.forEach(r=>t.addEventListener(r,o))}function K(){S(()=>(v++===0&&(document.addEventListener("keydown",E,true),document.addEventListener("pointerenter",d,true),document.addEventListener("focus",d,true)),()=>{--v||(document.removeEventListener("keydown",E,true),document.removeEventListener("pointerenter",d,true),document.removeEventListener("focus",d,true))}),[])}function O(t,e){const n=t.target;!e||n===e||e.contains(n)&&!n.closest(".clover-canvas-overlays")||R.has(t.key)&&(t.altKey||t.metaKey||t.ctrlKey||n.closest("input, select, textarea, [contenteditable]")||(t.preventDefault(),e.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,shiftKey:t.shiftKey,bubbles:true,cancelable:true}))))}export{M as S,P as T,O as f,b as h,B as p};
@@ -1 +1 @@
1
- import{D as Ie,a as Me,e as $e,c as we,n as Re,T as j,d as T,G as Se,y as f,O as Ee,C as Ae,A as O,b as Pe,u as n,t as ze,k as ue,l as $,v as Fe,$ as Ge,E as Ve}from"./shared-9sToDP5G.mjs";import{c as de,a as ge}from"./layout-zLeHeNSF.mjs";import{l as He,a as Ke,p as je,b as qe,c as De}from"./vtt-CJkd32sA.mjs";import{j as Ue}from"./classnames-DukgfdpI.mjs";import{u as Xe,c as Be}from"./readingLanguages-DZsqrAWq.mjs";import{G as Je}from"./GlobeGlyph-CRfMG161.mjs";import{b as pe,s as Qe}from"./bringIntoView-CQH5ZgMM.mjs";import{C as We}from"./Cue-DgSWaxt6.mjs";import{F as Ye}from"./FieldPill-DQQzm8hG.mjs";import{l as Ze}from"./languageCode-cCpiU0b0.mjs";import{a as _e}from"./Sections-d0uuX5tK.mjs";import{T as et}from"./Tip-B0TpGspf.mjs";import{u as tt}from"./useContainerName-B2qSONvC.mjs";import"./styles-Di6TZHyP.mjs";const q=40,D=r=>r.toLocaleLowerCase();function nt(r,l){if(!l)return r;const h=D(r),m=[];let c=0;for(let g=h.indexOf(l);g>=0;g=h.indexOf(l,g+l.length))g>c&&m.push(r.slice(c,g)),m.push(n("mark",{children:r.slice(g,g+l.length)},g)),c=g+l.length;return c<r.length&&m.push(r.slice(c)),m}const w=r=>r.read==="cues"&&r.kind!=="transcript",Ct=Ie(function({as:l="div",follow:h=true,find:m=true,sticky:c=false,size:g="large",className:me,...fe},he){const{t:U,langOf:X}=Me(),{clover:i,language:R}=$e("Transcript"),x=we(e=>Re(e.manifest,e.canvasId)).find(e=>de(e).length>0||ge(e).length>0),a=j(()=>x?[...de(x).map(e=>({...e,read:"cues"})),...ge(x).map(e=>({...e,read:"text"}))]:[],[x]),[B,S]=T(0),u=a[B]??a[0],v=Xe(),E=j(()=>{const e=(v==null?void 0:v.chosen)??R;if(e)return e;const t=a.flatMap(s=>s.language&&s.language!=="none"?[s.language]:[]);return t.length>1?Se(t):void 0},[v==null?void 0:v.chosen,R,a]);f(()=>{if(!E)return;const e=a.findIndex(s=>s.language&&s.language!=="none"&&Ee(s.language,E));if(e<0)return;S(e);const t=a[e];w(t)&&i.captions.get()!==t.id&&i.captions.emit(t.id)},[E,a,i]),f(()=>{const e=t=>{const s=a.findIndex(d=>w(d)&&d.id===t);s>=0&&S(s)};return e(i.captions.get()),i.captions.subscribe(e)},[i,a]);const[o,J]=T([]),[ve,Q]=T([]);f(()=>{if(J([]),Q([]),!u)return;let e=true;return(u.read==="cues"?He(u.id,i.request).then(t=>e&&J(je(t))):Ke(u.id,i.request).then(t=>e&&Q(qe(t)))).catch(()=>{}),()=>{e=false}},[u,i]);const b=Ae(i.media.subscribe,i.media.get,i.media.get),k=st(b,o),A=O(null);f(()=>{var t;if(!h||k<0||!b||b.paused)return;const e=(t=A.current)==null?void 0:t.children[k];e&&pe(e,"nearest")},[k,h,b]);const[W,Y]=T(""),p=D(W.trim()),C=j(()=>p?o.flatMap((e,t)=>D(e.text).includes(p)?[t]:[]):[],[o,p]),[P,be]=T({query:"",at:0}),y=P.query===p?P.at:0,z=O(null),F=O(false),[Z,Ce]=T({cues:[],count:q}),_=Z.cues===o?Z.count:q,G=()=>Ce({cues:o,count:_+q}),ee=O(G);ee.current=G;const V=typeof IntersectionObserver<"u",N=V?Math.min(o.length,Math.max(_,k+1,(C[y]??-1)+1)):o.length,te=O(null);f(()=>{const e=te.current;if(!e||!V||N>=o.length)return;const t=new IntersectionObserver(s=>{s.some(d=>d.isIntersecting)&&ee.current()},{root:Qe(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,o.length]);const I=C[y];f(()=>{var t;if(I===void 0)return;const e=(t=A.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),F.current=false},[I,p]);const Te=o.length>0;f(()=>{var d;const e=(d=z.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!c||!e||!t||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return s.observe(e),()=>{s.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[c,Te,m]);const H=Pe(),ne=_e(),se=a.every(w)?"playerCaptions":"transcriptLabel",re=tt(U(se),X(se));if(!x||!u)return null;const xe=a.filter(e=>e.read==="text").length,ae=a.map(e=>{const t=Ze(e.language);return e.read==="cues"?t:xe>1&&t?`TXT ${t}`:"TXT"}),ye=ae.map(e=>e&&ae.filter(t=>t===e).length===1?e:void 0),ce=u.language&&u.language!=="none"?u.language:void 0,oe=a.some(e=>e.read==="text"),Ne=Be(v,a.map(e=>e.language)),K=a.length>1&&(oe||!Ne)&&n(ue,{children:[re.node,n("fieldset",{...re.props,className:"clover-transcript-languages",children:[!oe&&n("span",{className:"clover-languages-glyph","aria-hidden":"true",children:n(Je,{})}),a.map((e,t)=>{const s=ze(e.label,R),d=ye[t],Oe=s.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),w(e)&&i.captions.emit(e.id)}}),d&&n(ue,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Fe:void 0,...$(s.text?s.lang:void 0),children:Oe}),d&&s.text&&n(et,{label:s.text,lang:s.lang})]},e.id)})]})]}),ie=(e,t=true)=>{if(b){t?Ve(b,e.start):b.currentTime=e.start;return}i.goTo(x.id,{time:e.start,...t&&{autoplay:true}})},le=e=>{const t=o[C[e]];t&&(F.current=true,be({query:p,at:e}),ie(t,false))},ke={position:C.length?y:-1,total:C.length,step:e=>le(y+e)},L=C.length,M=p?L===0?"contentSearchResultsNone":L===1?"contentSearchResult":"contentSearchResults":null,Le=m&&u.read==="cues"&&o.length>0&&n("div",{className:"clover-transcript-find",children:[n(Ye,{ref:z,id:`${H}-find`,value:W,onChange:Y,onSubmit:()=>{if(!L)return;const e=P.query===p&&F.current;le(e?(y+1)%L:y)},onClear:()=>{var e;Y(""),(e=z.current)==null||e.focus()},results:p?ke:null,size:g,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...$(M?X(M):void 0),children:M?U(M,{count:L}):""})]});return n(l,{ref:he,className:Ue("clover-transcript",me),"data-sticky":c||void 0,...fe,children:[K&&(ne?Ge(K,ne):K),Le,u.read==="text"?n("div",{className:"clover-transcript-body",...$(ce),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:A,className:"clover-transcript-cues",id:`${H}-cues`,...$(ce),children:o.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===k?"true":void 0,"data-match":p&&C.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ie(e),onFocus:()=>{N<o.length&&t>=N-5&&G()},children:[n(We,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),nt(e.text,p)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<o.length&&n("div",{ref:te,className:"clover-transcript-more","aria-hidden":"true"})]})});function st(r,l){const[h,m]=T(-1);return f(()=>{if(!r||!l.length){m(-1);return}const c=()=>m(De(l,r.currentTime));return c(),r.addEventListener("timeupdate",c),r.addEventListener("seeked",c),()=>{r.removeEventListener("timeupdate",c),r.removeEventListener("seeked",c)}},[r,l]),h}export{Ct as Transcript};
1
+ import{D as Ie,a as Me,e as $e,c as we,n as Re,T as j,d as T,G as Se,y as f,O as Ee,C as Ae,A as O,b as Pe,u as n,t as ze,k as ue,l as $,v as Fe,$ as Ge,E as Ve}from"./shared-w6hjs-L1.mjs";import{c as de,a as ge}from"./layout--P98JuFG.mjs";import{l as He,a as Ke,p as je,b as qe,c as De}from"./vtt-D30pzLou.mjs";import{j as Ue}from"./classnames-DukgfdpI.mjs";import{u as Xe,c as Be}from"./readingLanguages-Bf_HW2UJ.mjs";import{G as Je}from"./GlobeGlyph-DU4HgIlU.mjs";import{b as pe,s as Qe}from"./bringIntoView-CQH5ZgMM.mjs";import{C as We}from"./Cue-C2a4Pvi3.mjs";import{F as Ye}from"./FieldPill-D8JBm03i.mjs";import{l as Ze}from"./languageCode-cCpiU0b0.mjs";import{a as _e}from"./Sections-WeQ6ifoH.mjs";import{T as et}from"./Tip-MXBlEQhp.mjs";import{u as tt}from"./useContainerName-CM_MIZu9.mjs";import"./styles-BeCG47FS.mjs";const q=40,D=r=>r.toLocaleLowerCase();function nt(r,l){if(!l)return r;const h=D(r),m=[];let c=0;for(let g=h.indexOf(l);g>=0;g=h.indexOf(l,g+l.length))g>c&&m.push(r.slice(c,g)),m.push(n("mark",{children:r.slice(g,g+l.length)},g)),c=g+l.length;return c<r.length&&m.push(r.slice(c)),m}const w=r=>r.read==="cues"&&r.kind!=="transcript",Ct=Ie(function({as:l="div",follow:h=true,find:m=true,sticky:c=false,size:g="large",className:me,...fe},he){const{t:U,langOf:X}=Me(),{clover:i,language:R}=$e("Transcript"),x=we(e=>Re(e.manifest,e.canvasId)).find(e=>de(e).length>0||ge(e).length>0),a=j(()=>x?[...de(x).map(e=>({...e,read:"cues"})),...ge(x).map(e=>({...e,read:"text"}))]:[],[x]),[B,S]=T(0),u=a[B]??a[0],v=Xe(),E=j(()=>{const e=(v==null?void 0:v.chosen)??R;if(e)return e;const t=a.flatMap(s=>s.language&&s.language!=="none"?[s.language]:[]);return t.length>1?Se(t):void 0},[v==null?void 0:v.chosen,R,a]);f(()=>{if(!E)return;const e=a.findIndex(s=>s.language&&s.language!=="none"&&Ee(s.language,E));if(e<0)return;S(e);const t=a[e];w(t)&&i.captions.get()!==t.id&&i.captions.emit(t.id)},[E,a,i]),f(()=>{const e=t=>{const s=a.findIndex(d=>w(d)&&d.id===t);s>=0&&S(s)};return e(i.captions.get()),i.captions.subscribe(e)},[i,a]);const[o,J]=T([]),[ve,Q]=T([]);f(()=>{if(J([]),Q([]),!u)return;let e=true;return(u.read==="cues"?He(u.id,i.request).then(t=>e&&J(je(t))):Ke(u.id,i.request).then(t=>e&&Q(qe(t)))).catch(()=>{}),()=>{e=false}},[u,i]);const b=Ae(i.media.subscribe,i.media.get,i.media.get),k=st(b,o),A=O(null);f(()=>{var t;if(!h||k<0||!b||b.paused)return;const e=(t=A.current)==null?void 0:t.children[k];e&&pe(e,"nearest")},[k,h,b]);const[W,Y]=T(""),p=D(W.trim()),C=j(()=>p?o.flatMap((e,t)=>D(e.text).includes(p)?[t]:[]):[],[o,p]),[P,be]=T({query:"",at:0}),y=P.query===p?P.at:0,z=O(null),F=O(false),[Z,Ce]=T({cues:[],count:q}),_=Z.cues===o?Z.count:q,G=()=>Ce({cues:o,count:_+q}),ee=O(G);ee.current=G;const V=typeof IntersectionObserver<"u",N=V?Math.min(o.length,Math.max(_,k+1,(C[y]??-1)+1)):o.length,te=O(null);f(()=>{const e=te.current;if(!e||!V||N>=o.length)return;const t=new IntersectionObserver(s=>{s.some(d=>d.isIntersecting)&&ee.current()},{root:Qe(e),rootMargin:"0px 0px 400px 0px"});return t.observe(e),()=>t.disconnect()},[V,N,o.length]);const I=C[y];f(()=>{var t;if(I===void 0)return;const e=(t=A.current)==null?void 0:t.children[I];e&&pe(e,"nearest"),F.current=false},[I,p]);const Te=o.length>0;f(()=>{var d;const e=(d=z.current)==null?void 0:d.closest(".clover-transcript-find"),t=e==null?void 0:e.parentElement;if(!c||!e||!t||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>t.style.setProperty("--clover-transcript-find",`${e.offsetHeight}px`));return s.observe(e),()=>{s.disconnect(),t.style.removeProperty("--clover-transcript-find")}},[c,Te,m]);const H=Pe(),ne=_e(),se=a.every(w)?"playerCaptions":"transcriptLabel",re=tt(U(se),X(se));if(!x||!u)return null;const xe=a.filter(e=>e.read==="text").length,ae=a.map(e=>{const t=Ze(e.language);return e.read==="cues"?t:xe>1&&t?`TXT ${t}`:"TXT"}),ye=ae.map(e=>e&&ae.filter(t=>t===e).length===1?e:void 0),ce=u.language&&u.language!=="none"?u.language:void 0,oe=a.some(e=>e.read==="text"),Ne=Be(v,a.map(e=>e.language)),K=a.length>1&&(oe||!Ne)&&n(ue,{children:[re.node,n("fieldset",{...re.props,className:"clover-transcript-languages",children:[!oe&&n("span",{className:"clover-languages-glyph","aria-hidden":"true",children:n(Je,{})}),a.map((e,t)=>{const s=ze(e.label,R),d=ye[t],Oe=s.text||e.language||String(t+1);return n("label",{className:"clover-transcript-language",children:[n("input",{type:"radio",name:`${H}-language`,checked:t===B,onChange:()=>{S(t),w(e)&&i.captions.emit(e.id)}}),d&&n(ue,{children:[n("span",{className:"clover-transcript-code",children:d})," "]}),n("span",{style:d?Fe:void 0,...$(s.text?s.lang:void 0),children:Oe}),d&&s.text&&n(et,{label:s.text,lang:s.lang})]},e.id)})]})]}),ie=(e,t=true)=>{if(b){t?Ve(b,e.start):b.currentTime=e.start;return}i.goTo(x.id,{time:e.start,...t&&{autoplay:true}})},le=e=>{const t=o[C[e]];t&&(F.current=true,be({query:p,at:e}),ie(t,false))},ke={position:C.length?y:-1,total:C.length,step:e=>le(y+e)},L=C.length,M=p?L===0?"contentSearchResultsNone":L===1?"contentSearchResult":"contentSearchResults":null,Le=m&&u.read==="cues"&&o.length>0&&n("div",{className:"clover-transcript-find",children:[n(Ye,{ref:z,id:`${H}-find`,value:W,onChange:Y,onSubmit:()=>{if(!L)return;const e=P.query===p&&F.current;le(e?(y+1)%L:y)},onClear:()=>{var e;Y(""),(e=z.current)==null||e.focus()},results:p?ke:null,size:g,classes:{form:"clover-transcript-find-field"}}),n("p",{className:"clover-transcript-find-status",role:"status",...$(M?X(M):void 0),children:M?U(M,{count:L}):""})]});return n(l,{ref:he,className:Ue("clover-transcript",me),"data-sticky":c||void 0,...fe,children:[K&&(ne?Ge(K,ne):K),Le,u.read==="text"?n("div",{className:"clover-transcript-body",...$(ce),children:ve.map((e,t)=>n("p",{children:e},t))}):n("ol",{ref:A,className:"clover-transcript-cues",id:`${H}-cues`,...$(ce),children:o.slice(0,N).map((e,t)=>n("li",{className:"clover-transcript-cue","aria-current":t===k?"true":void 0,"data-match":p&&C.includes(t)?t===I?"current":"true":void 0,children:n("button",{type:"button",onClick:()=>ie(e),onFocus:()=>{N<o.length&&t>=N-5&&G()},children:[n(We,{start:e.start,className:"clover-transcript-time"}),n("span",{className:"clover-transcript-text clover-cue-text",children:[e.voice&&n("span",{className:"clover-transcript-voice",children:[e.voice,":"," "]}),nt(e.text,p)]})]})},`${e.start}-${t}`))}),u.read==="cues"&&N<o.length&&n("div",{ref:te,className:"clover-transcript-more","aria-hidden":"true"})]})});function st(r,l){const[h,m]=T(-1);return f(()=>{if(!r||!l.length){m(-1);return}const c=()=>m(De(l,r.currentTime));return c(),r.addEventListener("timeupdate",c),r.addEventListener("seeked",c),()=>{r.removeEventListener("timeupdate",c),r.removeEventListener("seeked",c)}},[r,l]),h}export{Ct as Transcript};
@@ -1 +1 @@
1
- import{a as g,u as o,l as b,_ as m}from"./shared-9sToDP5G.mjs";import{T as x}from"./Tip-B0TpGspf.mjs";import{b as f,c as k}from"./controlGlyphs-DkQh1wkH.mjs";import{a as y}from"./index-B2-GJaXD.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:max(24px,var(--clover-space-l));height:max(24px,var(--clover-space-l));translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:max(24px,var(--clover-space-l));margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:max(24px,var(--clover-space-l));padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
1
+ import{a as g,u as o,l as b,_ as m}from"./shared-w6hjs-L1.mjs";import{T as x}from"./Tip-MXBlEQhp.mjs";import{b as f,c as k}from"./controlGlyphs-DO8zuBuP.mjs";import{a as y}from"./index-BqgqqnqN.mjs";function T({words:r,button:e,shortcut:t,disabled:n,pressed:c,onClick:a,buttonRef:s,children:v}){const{t:i,langOf:h}=g(),d=i(r);return o("button",{"aria-label":d,...b(h(r)),"aria-keyshortcuts":t==null?void 0:t.keys,"aria-disabled":n||void 0,"aria-pressed":c,className:"clover-canvas-transport-button","data-button":e,onClick:a,ref:s,type:"button",children:[v,o(x,{label:d,shortcut:t})]})}function q(r){m(()=>{const e=r.current,t=e==null?void 0:e.closest(".clover-canvas");if(!e||!t)return;const n=()=>{const a=e.offsetHeight;a&&t.style.setProperty("--clover-transport-bar-height",`${a}px`)};n();const c=new ResizeObserver(n);return c.observe(e),()=>{c.disconnect(),t.style.removeProperty("--clover-transport-bar-height")}},[r])}const p=r=>`var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * ${r/100}`,B=r=>`calc(${p(r)})`,F=r=>`calc((100% - var(--clover-transport-thumb)) * ${r/100})`;function H(r){const e="var(--clover-transport-gap) / 2";return`linear-gradient(to right, ${[...r.flatMap(n=>[`#000 0 calc(${p(n)} - ${e})`,`transparent 0 calc(${p(n)} + ${e})`]),"#000 0"].join(", ")})`}function P(r,e){if(!(e>0))return[];const t=(a,s)=>Math.abs(a-s)<.05,n=[],c=a=>{a>0&&a<e&&!n.some(s=>t(s,a))&&n.push(a)};for(const a of r)c(a.start);for(const a of r)a.end!==void 0&&Number.isFinite(a.end)&&!r.some(s=>t(s.start,a.end))&&c(a.end);return n.sort((a,s)=>a-s).map(a=>a/e*100)}function $(r,e){const t=r.querySelector("input")??r,n=t.getBoundingClientRect(),c=parseFloat(getComputedStyle(t).getPropertyValue("--clover-transport-thumb"))||0,a=n.width-c;return a>0?Math.min(1,Math.max(0,(e-n.left-c/2)/a)):0}function L(r,e,t,n){const c=n.getBoundingClientRect(),a=c.height-(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);r.style.setProperty("--clover-transport-menu-above",`${a}px`),r.style.removeProperty("--clover-transport-menu-shift");const s=r.getBoundingClientRect(),v=parseFloat(getComputedStyle(t).paddingRight)||0,i=Math.max(c.left+v-s.left,Math.min(0,c.right-v-s.right));i&&r.style.setProperty("--clover-transport-menu-shift",`${i}px`)}const l={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 512 512","aria-hidden":true,focusable:false},I=()=>o("svg",{...l,children:o("path",{d:"M133 440a35.37 35.37 0 01-17.5-4.67c-12-6.8-19.46-20-19.46-34.33V111c0-14.37 7.46-27.53 19.46-34.33a35.13 35.13 0 0135.77.45l247.85 148.36a36 36 0 010 61.11L151.23 435a35.5 35.5 0 01-18.23 5z"})}),S=()=>o("svg",{...l,children:o("path",{d:"M224 432h-80V80h80zm144 0h-80V80h80z"})}),V=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 336a16 16 0 01-14.29-23.16c8.34-16.63 12.29-34.5 12.29-56.84s-3.95-40.21-12.29-56.84a16 16 0 0128.58-14.32C345.06 205.86 350 228.13 350 256s-4.94 50.14-15.71 71.16A16 16 0 01320 336zM368 384a16 16 0 01-13.87-24C373.85 325.75 384 292.28 384 256c0-36.28-10.15-69.75-29.87-104a16 16 0 0127.74-16C404.19 174.71 416 214.17 416 256s-11.81 81.29-34.13 120A16 16 0 01368 384z",fillOpacity:"0.85"})]}),R=()=>o("svg",{...l,children:[o("path",{d:"M232 416a23.88 23.88 0 01-14.2-4.68 8.27 8.27 0 01-.66-.51L125.76 336H56a24 24 0 01-24-24V200a24 24 0 0124-24h69.75l91.37-74.81a8.27 8.27 0 01.66-.51A24 24 0 01256 120v272a24 24 0 01-24 24z"}),o("path",{d:"M320 196l128 120M448 196L320 316",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"32"})]}),j=({on:r=false})=>o("svg",{...l,"data-on":r||void 0,className:"clover-captions-icon",children:[r?o("rect",{x:"22",y:"86",width:"468",height:"340",rx:"74",fill:"currentColor"}):o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),o("path",{className:"clover-captions-icon-letters",d:"M228 216a48 48 0 1 0 0 80M356 216a48 48 0 1 0 0 80",fill:"none",stroke:r?"var(--clover-color-control, #1a1d1e)":"currentColor",strokeLinecap:"round",strokeWidth:"36"})]}),u=()=>o("rect",{x:"40",y:"104",width:"432",height:"304",rx:"56",fill:"none",stroke:"currentColor",strokeWidth:"36"}),W=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M204 208l-48 48 48 48M308 208l48 48-48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),O=()=>o("svg",{...l,children:[o(u,{}),o("path",{d:"M140 208l48 48-48 48M372 208l-48 48 48 48",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"36"})]}),A=()=>o("svg",{...l,children:o(k,{})}),N=()=>o("svg",{...l,children:o(f,{})});y(14,"components/Canvas/media/Transport",'@layer clover{.clover-canvas-transport{position:absolute;inset:auto 0 0;z-index:2;display:flex;flex-direction:column;padding:var(--clover-space-xl) var(--clover-canvas-controls-inset) var(--clover-canvas-controls-inset);--clover-controls-edge: 1;--clover-transport-thumb: 12px;--clover-transport-track: var(--clover-space-xs);-webkit-user-select:none;user-select:none;--clover-transport-menu-room: calc( 100cqb - var(--clover-canvas-controls-inset) - var(--clover-control) - var(--clover-space-s) - var(--clover-space-xs) )}.clover-canvas-transport:before{position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,#000000c7,#0009 calc(100% - var(--clover-space-xl)),#0000);pointer-events:none;content:""}.clover-canvas-transport:has([aria-expanded=true],:focus-visible,>.clover-canvas-transport-seek-area:hover){z-index:4}.clover-canvas-transport-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--clover-space-xs) var(--clover-space-s);min-width:0}.clover-canvas-transport-bar>*{flex-shrink:0}.clover-canvas-transport-bar>:is(:hover,:active,:focus-within){z-index:1}.clover-canvas-transport-bar>.clover-canvas-transport-status{display:flex;flex:1 1 0;align-items:center;gap:var(--clover-space-s);min-width:min-content}.clover-canvas-transport-end{display:flex;gap:var(--clover-space-s);margin-inline-start:auto}@container (max-width: 37.5rem){.clover-canvas-transport-bar:has([data-button=chapters])>.clover-canvas-transport-status{order:-1;flex-basis:100%}}@container (max-width: 28rem){.clover-canvas-transport-bar>.clover-canvas-transport-status{order:-1;flex-basis:100%}}.clover-canvas-transport-button svg{fill:currentColor;stroke:none}.clover-canvas-transport-button svg [stroke]{fill:none}.clover-canvas-transport-button:hover,.clover-canvas-transport-button:focus-visible{background-color:var(--clover-color-accent, #0065c3)}:where([data-high-contrast]) .clover-canvas-transport-button:is(:hover,:focus-visible){background-color:var(--clover-accent-fill)}:where([data-high-contrast]) .clover-canvas-transport-button:hover:not(:focus-visible){outline:var(--clover-accent-ring-hover);outline-offset:1px}button.clover-canvas-transport-button[aria-pressed=true]:after{content:"";position:absolute;inset-inline:var(--clover-space-s);bottom:var(--clover-space-2xs);border-bottom:2px solid;border-radius:1px}.clover-canvas-transport-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--clover-color-secondary, #fff),0 0 0 4px var(--clover-color-accent, #0065c3)}.clover-canvas-transport-seek-area{position:relative;display:flex;margin-bottom:var(--clover-space-xs);--clover-transport-gap: var(--clover-space-2xs)}.clover-canvas-transport-points,.clover-canvas-transport-marks{--clover-transport-mark: var(--clover-space-s);position:absolute;inset:0;pointer-events:none}.clover-canvas-transport-points{z-index:0}.clover-canvas-transport-seek{position:relative;z-index:1}.clover-canvas-transport-marks{z-index:2}.clover-canvas-transport-mark-point{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-s) - (var(--clover-transport-mark) + 2 * 3px) / 2);box-sizing:content-box;width:var(--clover-transport-mark);height:var(--clover-transport-mark);border:2px solid var(--clover-color-secondary, #fff);border-radius:50%;background-color:var(--clover-color-accent, #0065c3);box-shadow:0 0 0 1px var(--clover-color-primary, #1a1d1e);translate:-50% -50%}.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000);content:""}.clover-canvas-transport-mark-point[data-active=true]{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 3px var(--clover-color-primary, #1a1d1e)}.clover-canvas-transport-mark-group{position:absolute;top:calc(50% - var(--clover-transport-track) / 2 - var(--clover-space-l));width:max(24px,var(--clover-space-l));height:max(24px,var(--clover-space-l));translate:-50% 0;pointer-events:var(--clover-controls-events, auto)}.clover-canvas-transport-mark{display:block;width:100%;height:100%;margin:0;padding:0;border:none;border-radius:50%;background:none;cursor:pointer}.clover-canvas-transport-mark:focus-visible{outline:none}.clover-canvas-transport-mark-group:is(:hover,:focus-within){z-index:1}.clover-canvas-transport-mark-group>.clover-tip.clover-canvas-transport-mark-tip{text-align:start;--clover-tip-x: clamp( var(--clover-space-xs) - var(--clover-mark-x, 50cqw), -50%, 100cqw - var(--clover-space-xs) - var(--clover-mark-x, 50cqw) - 100% );display:flex;flex-direction:column;max-width:min(18rem,100cqw - 2 * var(--clover-space-xs));max-height:calc(100cqh - var(--clover-canvas-controls-inset) - var(--clover-transport-bar-height, var(--clover-control)) - var(--clover-space-xs) - var(--clover-space-l) / 2 - var(--clover-transport-track) / 2 - var(--clover-space-l) - 3 * var(--clover-space-xs));transform:translate(calc(var(--clover-tip-x) + 50%))}.clover-canvas-transport-mark-group:focus-within:not([data-tip-hidden])>.clover-tip.clover-canvas-transport-mark-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.clover-canvas:has(.clover-canvas-transport-marks){--clover-transport-marks-room: calc( 2 * var(--clover-space-s) + 2 * 3px - (var(--clover-space-l) - var(--clover-space-xs)) / 2 )}.clover-canvas-transport-mark-words{min-height:0;overflow-y:auto}.clover-canvas-transport-mark-tip{--clover-color-primary-muted: var(--clover-color-secondary-alt, #c1c8cd);color:var(--clover-color-secondary-alt, #c1c8cd)}.clover-canvas-transport-mark-group .clover-canvas-transport-mark-tip>.clover-steps{flex:none;margin-top:var(--clover-space-xs)}.clover-canvas-transport input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:max(24px,var(--clover-space-l));margin:0;background:transparent;cursor:pointer;touch-action:none}.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-2xl)}@container (max-width: 28rem){.clover-canvas-transport input.clover-canvas-transport-volume{width:var(--clover-space-xl)}.clover-canvas-transport-bar,.clover-canvas-transport-end{column-gap:var(--clover-space-xs)}}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-moz-range-track{height:var(--clover-transport-track);border-radius:var(--clover-radius, 3px);background:linear-gradient(to right,var(--clover-color-accent, #0065c3) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-progress, 0%),rgb(255 255 255 / 90%) var(--clover-transport-loaded, 0%),var(--clover-player-track, rgb(255 255 255 / 65%)) var(--clover-transport-loaded, 0%));box-shadow:var(--clover-player-track-shadow, none)}.clover-canvas-transport input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);margin-top:calc((var(--clover-transport-track) - var(--clover-transport-thumb)) / 2);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]::-moz-range-thumb{width:var(--clover-transport-thumb);height:var(--clover-transport-thumb);border:none;border-radius:var(--clover-radius-pill, 2rem);background-color:var(--clover-player-text, #fff)}.clover-canvas-transport input[type=range]:focus-visible{outline:none}.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--clover-color-accent, #0065c3),0 0 0 4px var(--clover-player-text, #fff),0 0 0 6px #0009}.clover-canvas-transport-time{display:flex;align-items:center;gap:var(--clover-space-xs);color:var(--clover-player-text, #fff);font-size:var(--clover-text-s);font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}.clover-canvas-transport-frames{position:relative;display:flex}button.clover-canvas-transport-time{margin:0;padding:var(--clover-space-2xs) var(--clover-space-xs);border:0;border-radius:var(--clover-radius, 3px);background:none;font:inherit;font-size:var(--clover-text-s);cursor:pointer}button.clover-canvas-transport-time:is(:hover,[aria-expanded=true]){background-color:#0006}button.clover-canvas-transport-time:focus-visible{outline:2px solid var(--clover-player-text, #fff)}.clover-canvas-transport-place{display:inline-grid;justify-items:end;font-variant-numeric:tabular-nums}.clover-canvas-transport-place>*{grid-area:1 / 1}.clover-canvas-transport-place>.clover-canvas-transport-place-room[hidden]{display:block;visibility:hidden}.clover-canvas-transport-frames>.clover-canvas-menu{right:0;bottom:calc(100% + var(--clover-space-s));left:auto;max-width:min(20rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(24rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0}.clover-canvas-transport-menu{position:relative;display:flex}.clover-canvas-transport-options{position:absolute;right:0;bottom:calc(100% + var(--clover-space-s));display:flex;flex-direction:column;box-sizing:border-box;min-width:min(11rem,100cqi - 2 * var(--clover-canvas-controls-inset));max-width:calc(100cqi - 2 * var(--clover-canvas-controls-inset));max-height:min(16rem,var(--clover-transport-menu-room),var(--clover-transport-menu-above, 100cqb) - var(--clover-space-s) - var(--clover-space-xs));translate:var(--clover-transport-menu-shift, 0px) 0;margin:0;padding:var(--clover-space-xs);border:none;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-menu-surface, #151718);color:var(--clover-player-text, #fff);overflow-y:auto}.clover-canvas-transport-option{display:flex;flex:none;align-items:center;gap:var(--clover-space-xs);min-height:max(24px,var(--clover-space-l));padding:var(--clover-space-xs) var(--clover-space-s);border-radius:var(--clover-radius, 3px);font-size:var(--clover-text-s);cursor:pointer}.clover-canvas-transport-option:hover{background-color:var(--clover-player-menu-hover, #26292b)}.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 24%,transparent);font-weight:600}.clover-canvas-transport-option:has(input:focus-visible){box-shadow:inset 0 0 0 2px var(--clover-player-text, #fff)}.clover-canvas-transport-code{flex:none;min-width:var(--clover-space-l);color:color-mix(in srgb,currentColor 72%,transparent);font-size:var(--clover-text-xs);font-weight:600;line-height:1}.clover-canvas-transport-options:has(.clover-canvas-transport-code),.clover-canvas-transport-menu:has([data-button=chapters]) .clover-canvas-transport-options{min-width:min(16rem,100cqi - 2 * var(--clover-canvas-controls-inset))}.clover-canvas-transport-option:has(>.clover-entry-thumbnail){display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;gap:var(--clover-space-2xs) var(--clover-space-s);padding-block-end:var(--clover-space-s)}.clover-canvas-transport-options.clover-canvas-menu{border-radius:var(--clover-radius, 6px);background-color:var(--clover-color-secondary, #fff);color:var(--clover-color-primary, #1a1d1e)}.clover-canvas-menu>.clover-canvas-transport-option{align-items:baseline;gap:var(--clover-space-s);font-size:inherit}.clover-canvas-menu>.clover-canvas-transport-option:hover{background-color:var(--clover-color-secondary-muted, #e6e8eb)}@media (forced-colors: none){.clover-canvas-menu>.clover-canvas-transport-option:has(input:checked){background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 8%,transparent)}}.clover-canvas-menu>.clover-canvas-transport-option:has(input:focus-visible){box-shadow:none;outline:2px solid var(--clover-color-accent, #0065c3);outline-offset:-2px}.clover-canvas-transport-option input{position:absolute;opacity:0;pointer-events:none}@media (forced-colors: active){.clover-canvas-transport button.clover-canvas-transport-button{border:1px solid ButtonText}.clover-canvas-transport input[type=range]{forced-color-adjust:none}.clover-canvas-transport input[type=range]::-webkit-slider-runnable-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-moz-range-track{border:1px solid CanvasText;background:linear-gradient(to right,Highlight var(--clover-transport-progress, 0%),Canvas var(--clover-transport-progress, 0%));box-shadow:none}.clover-canvas-transport input[type=range]::-webkit-slider-thumb,.clover-canvas-transport input[type=range]:focus-visible::-webkit-slider-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]::-moz-range-thumb,.clover-canvas-transport input[type=range]:focus-visible::-moz-range-thumb{background-color:CanvasText;box-shadow:0 0 0 2px Canvas}.clover-canvas-transport input[type=range]:focus-visible{outline:2px solid CanvasText;outline-offset:2px}.clover-canvas-transport-button:focus-visible{outline:3px solid CanvasText;outline-offset:2px;box-shadow:none}.clover-canvas-transport-button:is([data-active],[aria-pressed=true]),.clover-canvas-transport-option:has(input:checked){background-color:Highlight;color:HighlightText}.clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:ButtonFace}.clover-canvas-transport-button[data-active] .clover-captions-icon[data-on] .clover-captions-icon-letters{stroke:Highlight}}@media (prefers-reduced-motion: reduce){.clover-canvas-transport,.clover-canvas-transport-button,.clover-canvas-transport-button svg{transition:none}}.clover-canvas-transport-seek[data-gaps]{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 1px);-webkit-mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps);mask-image:radial-gradient(circle at calc(var(--clover-transport-thumb) / 2 + (100% - var(--clover-transport-thumb)) * var(--clover-transport-at, 0)) 50%,#000 var(--clover-transport-disk),transparent var(--clover-transport-disk)),var(--clover-transport-gaps)}.clover-canvas-transport-seek[data-gaps]:focus-visible{--clover-transport-disk: calc(var(--clover-transport-thumb) / 2 + 6px)}.clover-canvas-transport-chapter-span{position:absolute;z-index:1;top:50%;box-sizing:border-box;border-inline:calc(var(--clover-transport-gap) / 2) solid transparent;background-clip:padding-box;height:var(--clover-space-s);translate:0 -50%;border-radius:var(--clover-radius, 3px);background-color:var(--clover-player-text, #fff);opacity:.5;pointer-events:none}.clover-canvas-transport-seek-area>.clover-tip{left:var(--clover-transport-preview, 50%)}.clover-canvas-transport-seek-area>.clover-tip:has(>.clover-tip-image){padding:var(--clover-space-s)}.clover-canvas-transport-seek-area>.clover-tip .clover-tip-image{width:var(--clover-picture);max-height:none;margin-block-end:var(--clover-space-xs)}.clover-canvas-transport-seek-area:is(:hover,:has(>input:focus-visible)):not([data-tip-hidden])>.clover-tip{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}@media (forced-colors: active){.clover-canvas-transport-mark-point:after{position:absolute;top:calc(100% + 3px);left:50%;width:3px;height:calc(var(--clover-space-s) + var(--clover-transport-track));translate:-50% 0;background-color:color-mix(in srgb,var(--clover-color-accent, #0065c3) 38.2%,transparent);content:""}.clover-canvas-transport-mark-point[data-active=true]{outline:2px solid Highlight;outline-offset:1px}.clover-canvas-transport-chapter-span{background-color:Highlight;opacity:1}}.clover-canvas-transport-status>.clover-canvas-transport-chapter{flex:1 1 auto;overflow:hidden;width:0;min-width:0;color:color-mix(in srgb,var(--clover-player-text, #fff) 85%,transparent);font-size:var(--clover-text-s);text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px rgb(0 0 0 / 90%)}}');export{j as C,N as E,O as F,I as P,T,R as V,H as a,B as b,S as c,V as d,W as e,A as f,P as g,F as l,L as p,$ as s,q as u};
@@ -1 +1 @@
1
- import{a as Ee,A as h,d as R,_ as G,T as Ce,u as e,P as we,z as Pe,am as B,l as w,v as ie,ag as Fe,y as Ie,k as de}from"./shared-9sToDP5G.mjs";import{u as Me,g as Oe,a as $e,b as pe,l as Be,s as Re,T as L,P as Ve,c as xe,V as Ae,d as Ke,C as De,F as Le,e as ze,E as Ue,f as _e,p as je}from"./Transport-BW0laFuy.mjs";import{imageSource as qe}from"./thumbnail-22tHjWEh.mjs";import{u as Xe,P as Ze,E as Ge}from"./EntryThumbnail-C9TitZhS.mjs";import{j as He}from"./classnames-DukgfdpI.mjs";import{l as me}from"./languageCode-cCpiU0b0.mjs";import{T as ge,S as ve}from"./Tip-B0TpGspf.mjs";import{u as Je}from"./useContainerName-B2qSONvC.mjs";import{u as Qe,t as We}from"./pointer-RBOOjlWj.mjs";import"./styles-Di6TZHyP.mjs";const Ye=Pe(()=>import("./SeekMarks-TGu3Bbws.mjs").then(({SeekMarks:r})=>({default:r}))),en=".clover-canvas-transport-marks",nn=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:qe(r==null?void 0:r.thumbnail);function fe(r,i){var y;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const g=(y=r[f])==null?void 0:y.end;return g!==void 0&&i>=g?-1:f}let Z;function tn(){if(Z===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,Z=r.volume===.5}return Z}function rn({id:r,label:i,labelLang:f,button:g,icon:y,active:P,current:k,options:F,selected:V,onSelect:c,request:z,asMenu:I=false}){const[d,p]=R(false),T=h(null),M=h(null),O=h(null),$=h(false),b=Je(i,f),N=F.some(a=>me(a.language));Fe(d,()=>p(false));const x=()=>{var a;p(false),(a=M.current)==null||a.focus()};return Ie(()=>{if(!d)return;const a=s=>{var o,t,S;if(s instanceof KeyboardEvent){if(s.key!=="Escape")return;(o=T.current)!=null&&o.contains(document.activeElement)&&(s.preventDefault(),(t=M.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(s.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),G(()=>{const a=O.current,s=T.current,o=s==null?void 0:s.closest(".clover-canvas-transport"),t=s==null?void 0:s.closest(".clover-canvas-media");if(!d||!a||!s||!o||!t)return;const S=()=>je(a,s,o,t);S();const m=new ResizeObserver(S);return m.observe(t),m.observe(o),m.observe(a),()=>m.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var o;const s=a.relatedTarget;d&&s instanceof Node&&!((o=T.current)!=null&&o.contains(s))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":g,onClick:()=>p(a=>!a),ref:M,type:"button",children:[y,e(ge,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&b.node,d&&e("fieldset",{...b.props,className:He("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:O,children:F.map((a,s)=>{const o=me(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===s,name:r,onChange:()=>c(s),onClick:()=>{$.current&&x()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(s),x())},type:"radio"}),a.time&&e(de,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(o?e(de,{children:[e("span",{className:"clover-canvas-transport-code",children:o})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===s&&e(Ge,{source:a.thumbnail,request:z,large:true})]},s)})})]})}const an=r=>r.querySelector(":scope > .clover-tip"),sn=r=>{try{return r.matches(":focus-visible")}catch{return false}},yn=({instance:r,controller:i,kind:f,captions:g,activeCaption:y,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:z=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:M,onMarkSelect:O,onMarkActivate:$})=>{var se,oe;const{t:b,langOf:N}=Ee(),x=Qe()||f==="video",a=h(null);Me(a);const{paused:s,currentTime:o,duration:t,buffered:S,muted:m,volume:A}=i,E=fe(c,o),[U,ye]=R(-1),[H,be]=R(0),J=h(-1),_=n=>{var l;J.current!==n&&(J.current=n,ye(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Q,W]=R(false),[K,j]=R(false),v=K?U:Q?E:-1,Y=(K||Q)&&t>0,he=Xe(nn(c[v]),Ze,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===z),ee=h(null);G(()=>{const n=ee.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&v>=0?an(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[v]);const D=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},ke=s?"playerPlay":"playerPause",ne={label:b("playerCaptionsOff"),lang:N("playerCaptionsOff")},Te=m?"playerUnmute":"playerMute",Ne=F?"imageExitFullScreen":"imageFullScreen",te=t?o/t*100:0,X=Ce(()=>{const n=Oe(c,t);return n.length?$e(n):void 0},[c,t]),Se=t?S/t*100:0,re=k&&x,C=h(null),ae=h(null);return G(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())}),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ee,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(en)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Re(n.currentTarget,n.clientX)*t;j(true),be(Math.floor(u)),_(fe(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:Y?{"--clover-transport-preview":pe(v>=0?D(v).left+D(v).width/2:(K?H:o)/t*100)}:void 0,children:[O&&T.length>0&&e(we,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:M,onSelect:O,onActivate:$})}),e("input",{"aria-label":b("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(o)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>W(sn(n.currentTarget)),onBlur:()=>W(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${te}%`,"--clover-transport-loaded":`${Se}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":te/100}},type:"range",value:o}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:pe(D(q).left),width:Be(D(q).width)}}),Y&&e(ge,{lead:B(K?H:o),label:((se=c[v])==null?void 0:se.label)??"",lang:(oe=c[v])==null?void 0:oe.lang,image:v>=0?he:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(L,{words:ke,button:s?"play":"pause",shortcut:ve.play,onClick:i.toggle,buttonRef:ae,children:s?e(Ve,{}):e(xe,{})}),e(L,{words:Te,button:"mute",shortcut:ve.mute,onClick:i.toggleMute,children:m||A===0?e(Ae,{}):e(Ke,{})}),tn()&&e("input",{"aria-label":b("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(m?0:A)*100}%`},type:"range",value:m?0:A,"aria-valuetext":`${Math.round((m?0:A)*100)}%`}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{children:[e("span",{style:ie,...w(N("playerCurrentTime")),children:[b("playerCurrentTime")," "]}),B(o)]}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{children:[e("span",{style:ie,...w(N("playerDuration")),children:[b("playerDuration")," "]}),B(t)]})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(g.length>0||re||p)&&e("div",{className:"clover-canvas-transport-end",children:[g.length>0&&e(rn,{id:`${r}-captions`,label:b("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(De,{on:y>=0}),active:y>=0,current:g[y]??ne,options:[ne,...g],selected:y+1,onSelect:n=>P(n-1)}),p&&e(L,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(Le,{}):e(ze,{})}),re&&e(L,{words:Ne,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(Ue,{}):e(_e,{})})]})]})]})};export{yn as T,nn as a,fe as c};
1
+ import{a as Ee,A as h,d as R,_ as G,T as Ce,u as e,P as we,z as Pe,am as B,l as w,v as ie,ag as Fe,y as Ie,k as de}from"./shared-w6hjs-L1.mjs";import{u as Me,g as Oe,a as $e,b as pe,l as Be,s as Re,T as L,P as Ve,c as xe,V as Ae,d as Ke,C as De,F as Le,e as ze,E as Ue,f as _e,p as je}from"./Transport-B4jS-QyR.mjs";import{imageSource as qe}from"./thumbnail-DhVhVkd8.mjs";import{u as Xe,P as Ze,E as Ge}from"./EntryThumbnail-YuRsScmh.mjs";import{j as He}from"./classnames-DukgfdpI.mjs";import{l as me}from"./languageCode-cCpiU0b0.mjs";import{T as ge,S as ve}from"./Tip-MXBlEQhp.mjs";import{u as Je}from"./useContainerName-CM_MIZu9.mjs";import{u as Qe,t as We}from"./pointer-BPJduQ1u.mjs";import"./styles-BeCG47FS.mjs";const Ye=Pe(()=>import("./SeekMarks-CnV7psCC.mjs").then(({SeekMarks:r})=>({default:r}))),en=".clover-canvas-transport-marks",nn=r=>typeof(r==null?void 0:r.thumbnail)=="string"?{src:r.thumbnail}:qe(r==null?void 0:r.thumbnail);function fe(r,i){var y;let f=-1;r.forEach((P,k)=>{P.start<=i&&(f=k)});const g=(y=r[f])==null?void 0:y.end;return g!==void 0&&i>=g?-1:f}let Z;function tn(){if(Z===void 0){if(typeof document>"u")return true;const r=document.createElement("video");r.volume=.5,Z=r.volume===.5}return Z}function rn({id:r,label:i,labelLang:f,button:g,icon:y,active:P,current:k,options:F,selected:V,onSelect:c,request:z,asMenu:I=false}){const[d,p]=R(false),T=h(null),M=h(null),O=h(null),$=h(false),b=Je(i,f),N=F.some(a=>me(a.language));Fe(d,()=>p(false));const x=()=>{var a;p(false),(a=M.current)==null||a.focus()};return Ie(()=>{if(!d)return;const a=s=>{var o,t,S;if(s instanceof KeyboardEvent){if(s.key!=="Escape")return;(o=T.current)!=null&&o.contains(document.activeElement)&&(s.preventDefault(),(t=M.current)==null||t.focus())}else if((S=T.current)!=null&&S.contains(s.target))return;p(false)};return document.addEventListener("pointerdown",a),document.addEventListener("keydown",a,true),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("keydown",a,true)}},[d]),G(()=>{const a=O.current,s=T.current,o=s==null?void 0:s.closest(".clover-canvas-transport"),t=s==null?void 0:s.closest(".clover-canvas-media");if(!d||!a||!s||!o||!t)return;const S=()=>je(a,s,o,t);S();const m=new ResizeObserver(S);return m.observe(t),m.observe(o),m.observe(a),()=>m.disconnect()},[d]),e("div",{className:"clover-canvas-transport-menu",ref:T,onBlur:a=>{var o;const s=a.relatedTarget;d&&s instanceof Node&&!((o=T.current)!=null&&o.contains(s))&&p(false)},children:[e("button",{"aria-controls":r,"aria-describedby":k?`${r}-current`:void 0,"aria-expanded":d,"aria-label":i,...w(f),className:"clover-canvas-transport-button","data-active":P?"":void 0,"data-button":g,onClick:()=>p(a=>!a),ref:M,type:"button",children:[y,e(ge,{label:i})]}),k&&e("span",{hidden:true,id:`${r}-current`,...w(k.lang),children:k.label}),d&&b.node,d&&e("fieldset",{...b.props,className:He("clover-canvas-transport-options",I&&"clover-canvas-menu"),id:r,ref:O,children:F.map((a,s)=>{const o=me(a.language);return e("label",{className:"clover-canvas-transport-option",onPointerDown:()=>{$.current=true},children:[e("input",{checked:V===s,name:r,onChange:()=>c(s),onClick:()=>{$.current&&x()},onKeyDown:t=>{$.current=false,t.key==="Enter"&&(t.preventDefault(),c(s),x())},type:"radio"}),a.time&&e(de,{children:[e("span",{className:"clover-cue-time",children:a.time})," "]}),N&&(o?e(de,{children:[e("span",{className:"clover-canvas-transport-code",children:o})," "]}):e("span",{className:"clover-canvas-transport-code","aria-hidden":"true"})),e("span",{className:"clover-cue-text",...w(a.lang),children:a.label}),V===s&&e(Ge,{source:a.thumbnail,request:z,large:true})]},s)})})]})}const an=r=>r.querySelector(":scope > .clover-tip"),sn=r=>{try{return r.matches(":focus-visible")}catch{return false}},yn=({instance:r,controller:i,kind:f,captions:g,activeCaption:y,onCaptionChange:P,fullscreen:k=false,isFullscreen:F=false,video:V,chapters:c=[],highlightedChapter:z=null,onChapterHighlight:I,request:d,fill:p,marks:T=[],selectedMark:M,onMarkSelect:O,onMarkActivate:$})=>{var se,oe;const{t:b,langOf:N}=Ee(),x=Qe()||f==="video",a=h(null);Me(a);const{paused:s,currentTime:o,duration:t,buffered:S,muted:m,volume:A}=i,E=fe(c,o),[U,ye]=R(-1),[H,be]=R(0),J=h(-1),_=n=>{var l;J.current!==n&&(J.current=n,ye(n),I==null||I(((l=c[n])==null?void 0:l.id)??null))},[Q,W]=R(false),[K,j]=R(false),v=K?U:Q?E:-1,Y=(K||Q)&&t>0,he=Xe(nn(c[v]),Ze,d),q=U>=0?U:c.findIndex(n=>n.id!==void 0&&n.id===z),ee=h(null);G(()=>{const n=ee.current,l=n==null?void 0:n.closest(".clover-canvas"),u=n&&v>=0?an(n):null;if(!l||!u)return;const le="--clover-transport-preview-top",ce=()=>l.style.setProperty(le,`${l.getBoundingClientRect().bottom-u.getBoundingClientRect().top}px`);ce();const ue=new ResizeObserver(ce);return ue.observe(u),()=>{ue.disconnect(),l.style.removeProperty(le)}},[v]);const D=n=>{const{start:l,end:u=t}=c[n];return{left:l/t*100,width:(u-l)/t*100}},ke=s?"playerPlay":"playerPause",ne={label:b("playerCaptionsOff"),lang:N("playerCaptionsOff")},Te=m?"playerUnmute":"playerMute",Ne=F?"imageExitFullScreen":"imageFullScreen",te=t?o/t*100:0,X=Ce(()=>{const n=Oe(c,t);return n.length?$e(n):void 0},[c,t]),Se=t?S/t*100:0,re=k&&x,C=h(null),ae=h(null);return G(()=>{var u;const n=C.current;if(!n||n.isConnected)return;C.current=null;const l=document.activeElement;(!l||l===document.body)&&((u=ae.current)==null||u.focus())}),e("div",{className:"clover-canvas-transport","data-kind":f,"data-testid":"clover-canvas-transport",onFocus:n=>{C.current=n.target},onBlur:n=>{const l=n.target,u=n.relatedTarget;if(u instanceof Node){n.currentTarget.contains(u)||(C.current=null);return}queueMicrotask(()=>{C.current===l&&l.isConnected&&(C.current=null)})},children:[e("div",{ref:ee,className:"clover-canvas-transport-seek-area",onPointerMove:n=>{const l=n.target;if(l.closest(en)){j(false),_(-1);return}if(!t||l.closest(".clover-tip"))return;const u=Re(n.currentTarget,n.clientX)*t;j(true),be(Math.floor(u)),_(fe(c,u))},onPointerLeave:()=>{j(false),_(-1)},style:Y?{"--clover-transport-preview":pe(v>=0?D(v).left+D(v).width/2:(K?H:o)/t*100)}:void 0,children:[O&&T.length>0&&e(we,{fallback:null,children:e(Ye,{marks:T,duration:t,selected:M,onSelect:O,onActivate:$})}),e("input",{"aria-label":b("playerSeek"),lang:N("playerSeek"),"aria-valuetext":`${B(o)} / ${B(t)}${E>=0?`, ${c[E].label}`:""}`,className:"clover-canvas-transport-seek",onFocus:n=>W(sn(n.currentTarget)),onBlur:()=>W(false),max:t||0,min:0,onChange:n=>i.seek(Number(n.target.value)),step:"any","data-gaps":X?"":void 0,style:{"--clover-transport-progress":`${te}%`,"--clover-transport-loaded":`${Se}%`,...X&&{"--clover-transport-gaps":X,"--clover-transport-at":te/100}},type:"range",value:o}),q>=0&&t>0&&e("span",{"aria-hidden":"true",className:"clover-canvas-transport-chapter-span",style:{left:pe(D(q).left),width:Be(D(q).width)}}),Y&&e(ge,{lead:B(K?H:o),label:((se=c[v])==null?void 0:se.label)??"",lang:(oe=c[v])==null?void 0:oe.lang,image:v>=0?he:void 0},v)]}),e("div",{className:"clover-canvas-transport-bar",ref:a,children:[e(L,{words:ke,button:s?"play":"pause",shortcut:ve.play,onClick:i.toggle,buttonRef:ae,children:s?e(Ve,{}):e(xe,{})}),e(L,{words:Te,button:"mute",shortcut:ve.mute,onClick:i.toggleMute,children:m||A===0?e(Ae,{}):e(Ke,{})}),tn()&&e("input",{"aria-label":b("playerVolume"),lang:N("playerVolume"),className:"clover-canvas-transport-volume",max:1,min:0,onChange:n=>i.setVolume(Number(n.target.value)),step:.05,style:{"--clover-transport-progress":`${(m?0:A)*100}%`},type:"range",value:m?0:A,"aria-valuetext":`${Math.round((m?0:A)*100)}%`}),e("span",{className:"clover-canvas-transport-status",children:[e("span",{className:"clover-canvas-transport-time",children:[e("span",{children:[e("span",{style:ie,...w(N("playerCurrentTime")),children:[b("playerCurrentTime")," "]}),B(o)]}),e("span",{"aria-hidden":"true",children:" / "}),e("span",{children:[e("span",{style:ie,...w(N("playerDuration")),children:[b("playerDuration")," "]}),B(t)]})]}),E>=0&&e("span",{className:"clover-canvas-transport-chapter",...w(c[E].lang),children:c[E].label})]}),(g.length>0||re||p)&&e("div",{className:"clover-canvas-transport-end",children:[g.length>0&&e(rn,{id:`${r}-captions`,label:b("playerCaptions"),labelLang:N("playerCaptions"),button:"captions",icon:e(De,{on:y>=0}),active:y>=0,current:g[y]??ne,options:[ne,...g],selected:y+1,onSelect:n=>P(n-1)}),p&&e(L,{words:p.filled?"playerFit":"playerFill",button:"fill",onClick:p.onToggle,children:p.filled?e(Le,{}):e(ze,{})}),re&&e(L,{words:Ne,button:"fullscreen",onClick:n=>void We(n.currentTarget,V),children:F?e(Ue,{}):e(_e,{})})]})]})]})};export{yn as T,nn as a,fe as c};
@@ -1 +1 @@
1
- import{U as l,aD as g,aB as u,aE as y,aC as f}from"./shared-9sToDP5G.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function b(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=u(e,s);d.length&&a.push({id:s,label:y(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{b as loadAnnotationSets};
1
+ import{U as l,aD as g,aB as u,aE as y,aC as f}from"./shared-w6hjs-L1.mjs";const w=100;async function p(t,n,i){if(typeof t=="string")return await f(n,t,i);const a=t;return a!=null&&a.id&&a.type==="AnnotationPage"&&!a.items?await f(n,a.id,i):a}async function h(t,n,i){const a=String((t==null?void 0:t.type)??(t==null?void 0:t["@type"])??""),c=/AnnotationCollection/.test(a),o=c?[]:[t],r=new Set(c?[]:[t.id]);let e=c?t.first:t.next;for(;e&&o.length<w;){const s=typeof e=="string"?e:e.id;if(r.has(s??e))break;r.add(s??e);const d=await p(e,n,i);o.push(d),e=d.next}return o}async function b(t,{request:n,signal:i}={}){const a=[];for(const c of l(t)){const o=await p(c,n,i);for(const r of await h(o,n,i)){const e=await g(r),s=e.id??`added-${a.length}`,d=u(e,s);d.length&&a.push({id:s,label:y(e,r===o?c:void 0)??o.label,source:"added",entries:d})}}return a}export{b as loadAnnotationSets};
@@ -1 +1 @@
1
- import{t as d,X as p}from"./shared-9sToDP5G.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
1
+ import{t as d,X as p}from"./shared-w6hjs-L1.mjs";import{t as u,r as v,m as T}from"./text-BTAkxEfQ.mjs";const m=t=>t.language&&t.language!=="none"?t.language:"none";function k(t,e){const o=p([...new Set(t.map(m))],e);return t.find(r=>m(r)===o)}function P(t,e){const o=(n,a)=>n?{text:n,...a?{lang:a}:{}}:{},r=t.filter(n=>{var a;return(a=n.value)==null?void 0:a.trim()});if(!r.length){const n=t.find(s=>(s.image||s.place)&&s.label);if(!n)return{};const{text:a,lang:x}=d(n.label,e);return o(u(a).trim(),x)}const l=k(r,e),i=l.value,c=v(l.format,i),f=c==="markdown"?T(i):c==="html"?u(i):i,g=m(l);return o(f.trim(),g==="none"?void 0:g)}export{P as a,k as b};
@@ -1 +1 @@
1
- import{loadAnnotationSets as f}from"./annotation-collection-B7P4xVWB.mjs";import{H as i,aF as l,av as c}from"./shared-9sToDP5G.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
1
+ import{loadAnnotationSets as f}from"./annotation-collection-DgDTaqZJ.mjs";import{H as i,aF as l,av as c}from"./shared-w6hjs-L1.mjs";async function y(n,a){const r={id:String(n.id??""),type:/Collection/.test(String(n.type??n["@type"]))?"AnnotationCollection":"AnnotationPage",...n.label?{label:n.label}:{}},o=(await f(n,a)).map(t=>({...t,content:r})),s=o.flatMap(t=>t.entries),e=s.find(t=>a.manifestId&&i(t.annotation)===a.manifestId)??s.find(t=>i(t.annotation));if(!e)throw new l("The annotations name no Manifest");return{manifest:await c({id:i(e.annotation),type:"Manifest"},a),target:{canvasId:e.canvasId},annotationSets:o,pick:e.id}}export{y as annotationsContent};
@@ -1 +1 @@
1
- import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-9sToDP5G.mjs";import{B as h}from"./Body-DNMPENDm.mjs";import{u as y,P as L}from"./nodes-DxdzLXSF.mjs";import{Toggle as b}from"./toggle-DatEYCUk.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
1
+ import{f as m,T as u,h as g,u as r,i as B,g as p}from"./shared-w6hjs-L1.mjs";import{B as h}from"./Body-BSgaX-3F.mjs";import{u as y,P as L}from"./nodes-DZbVJvjk.mjs";import{Toggle as b}from"./toggle-DX4vFKqT.mjs";const R={height:"100%"},T=e=>[...e.children].find(s=>s.localName==="clover-panel-toggle")??null,C=e=>e instanceof HTMLElement&&e.localName==="button";function P({hosted:e,props:s}){const a=y(e.element,()=>T(e.element),Object.is),{controlButtons:n,renderers:l,onReady:c,...d}=s,o=m(B,!!n),t=m(p,!!l),i=u(()=>o==null?void 0:o.toControlButtons(n),[o,n]),f=u(()=>t==null?void 0:t.toRenderers(l),[t,l]);return g(c),n&&!o||l&&!t?null:r(h,{...d,onReady:c,controlButtons:i,renderers:f,style:R,children:[a&&r(b,{element:a}),r(L,{from:e.element,picks:C})]})}export{P as BodyElement};
@@ -1 +1 @@
1
- import{S as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-9sToDP5G.mjs";import{C as b}from"./CanvasView-BfOvex16.mjs";import{r as s}from"./rendererSurface-FBwf4yii.mjs";import{C as i}from"./Pending-DYgjpYcj.mjs";const h=c(()=>import("./Connected-B_5LeFpt.mjs")),B=c(()=>import("./LoadedCanvas-DGqbVGS7.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
1
+ import{S as l,u as o,z as c,P as r,f,T as v,h as C,i as m}from"./shared-w6hjs-L1.mjs";import{C as b}from"./CanvasView-DK0lfyWR.mjs";import{r as s}from"./rendererSurface-BZa3x_Xh.mjs";import{C as i}from"./Pending-DqTfvy6z.mjs";const h=c(()=>import("./Connected-CC10s8oE.mjs")),B=c(()=>import("./LoadedCanvas-DisvEU6k.mjs")),k=n=>{const a=l();if(n.iiifContent!==void 0&&n.canvases===void 0)return o(r,{fallback:o(i,{}),children:o(B,{...n,surface:s})});const e=n.canvases!==void 0||n.body!==void 0||n.src!==void 0;return a&&!e?o(r,{fallback:o(i,{}),children:o(h,{...n,surface:s})}):o(b,{...n,surface:s})};function g({props:n}){const{controlButtons:a,onReady:e,...d}=n,t=f(m,!!a),u=v(()=>t==null?void 0:t.toControlButtons(a),[t,a]);return C(e),a&&!t?null:o(k,{...d,onReady:e,controlButtons:u})}export{g as CanvasElement};
@@ -1,4 +1,4 @@
1
- import{c as ne,F as ae,i as se,M as ie}from"./models-Cl3PryAF.mjs";import{ay as ce,a4 as ue}from"./shared-9sToDP5G.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
1
+ import{c as ne,F as ae,i as se,M as ie}from"./models-BnyeBKu_.mjs";import{ay as ce,a4 as ue}from"./shared-w6hjs-L1.mjs";const le=["KHR_materials_unlit","KHR_materials_ior","KHR_materials_specular","KHR_mesh_quantization"],Z=1179937895,fe=1313821514,de=5130562;function me(e){const s=new DataView(e);if(s.getUint32(0,true)!==Z)throw new Error("This is not a GLB.");if(s.getUint32(4,true)!==2)throw new Error("Only glTF 2.0 is drawn.");let o,t;const n=Math.min(s.getUint32(8,true),e.byteLength);for(let a=12;a+8<=n;){const i=s.getUint32(a,true),l=s.getUint32(a+4,true),c=a+8;l===fe?o=JSON.parse(new TextDecoder().decode(new Uint8Array(e,c,i))):l===de&&(t=e.slice(c,c+i)),a=c+i}if(!o)throw new Error("The GLB has no JSON chunk.");return{json:o,bin:t}}async function z(e,s,o){const t=new URL(e,s).href,n=t.startsWith("data:")?await fetch(t):await ue(o,t);if(!n.ok)throw new Error(`${t} answered ${n.status}`);return n.arrayBuffer()}const $=new WeakMap;function ve(e,s,o){const t=(s==null?void 0:s.fetch)??globalThis.fetch,n=$.get(t)??new Map;$.set(t,n);const a=`${ce(s)} ${o??""} ${e}`;let i=n.get(a);return i||(i=he(e,s,o).finally(()=>n.delete(a)),n.set(a,i)),i}async function he(e,s,o){const t=await z(e,location.href,s),n=new DataView(t).getUint32(0,true)===Z,{json:a,bin:i}=n?me(t):{json:JSON.parse(new TextDecoder().decode(t))},l=(a.extensionsRequired??[]).filter(f=>!le.includes(f));if(l.length)throw new Error(`Clover's renderer cannot draw this model: it requires ${l.join(", ")}.`);const c=await Promise.all((a.buffers??[]).map((f,r)=>{if(f.uri!==void 0)return z(f.uri,e,s);if(r===0&&i)return i;throw new Error("A buffer of the model has no data.")})),u=await Promise.all((a.images??[]).map(async f=>{try{let r;if(f.bufferView!==void 0){const d=a.bufferViews[f.bufferView];r=new Blob([new Uint8Array(c[d.buffer],d.byteOffset??0,d.byteLength)],{type:f.mimeType})}else if(f.uri!==void 0)r=new Blob([await z(f.uri,e,s)],{type:f.mimeType});else return null;const m={premultiplyAlpha:"none",colorSpaceConversion:"none"};return await pe(await createImageBitmap(r,m),o,m)}catch{return null}}));return{json:a,buffers:c,images:u}}async function pe(e,s,o){const t=Math.max(e.width,e.height);if(!s||t<=s)return e;const n=s/t,a=await createImageBitmap(e,{...o,resizeWidth:Math.max(1,Math.floor(e.width*n)),resizeHeight:Math.max(1,Math.floor(e.height*n)),resizeQuality:"high"});return e.close(),a}const we={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ee={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},q=e=>we[e];function Te(e,s){const o=e.json.accessors[s],t=q(o.type),n=new Float32Array(o.count*t);if(o.bufferView===void 0)return n;const a=e.json.bufferViews[o.bufferView],i=Ee[o.componentType],l=a.byteStride||i*t,c=new DataView(e.buffers[a.buffer],(a.byteOffset??0)+(o.byteOffset??0)),u={5120:r=>c.getInt8(r),5121:r=>c.getUint8(r),5122:r=>c.getInt16(r,true),5123:r=>c.getUint16(r,true),5125:r=>c.getUint32(r,true),5126:r=>c.getFloat32(r,true)}[o.componentType]??(()=>0),f=o.normalized?{5120:127,5121:255,5122:32767,5123:65535}[o.componentType]:void 0;for(let r=0;r<o.count;r++)for(let m=0;m<t;m++){const d=u(r*l+m*i);n[r*t+m]=f?Math.max(d/f,-1):d}return n}const ee=()=>new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function I(e,s){const o=new Float32Array(16);for(let t=0;t<4;t++)for(let n=0;n<4;n++){let a=0;for(let i=0;i<4;i++)a+=e[i*4+n]*s[t*4+i];o[t*4+n]=a}return o}function X([e,s,o],[t,n,a,i],[l,c,u]){const f=t+t,r=n+n,m=a+a,d=t*f,M=t*r,p=t*m,w=n*r,S=n*m,y=a*m,k=i*f,L=i*r,O=i*m;return new Float32Array([(1-(w+y))*l,(M+O)*l,(p-L)*l,0,(M-O)*c,(1-(d+y))*c,(S+k)*c,0,(p+L)*u,(S-k)*u,(1-(d+w))*u,0,e,s,o,1])}const K=e=>X(e,[0,0,0,1],[1,1,1]),xe=e=>X([0,0,0],[0,0,0,1],e);function be([e,s,o]){const t=(n,a)=>{const i=a*Math.PI/180,l=Math.cos(i),c=Math.sin(i),u=ee(),[f,r]=n===0?[1,2]:n===1?[2,0]:[0,1];return u[f*4+f]=l,u[f*4+r]=c,u[r*4+f]=-c,u[r*4+r]=l,u};return I(t(2,o),I(t(1,s),t(0,e)))}function ye(e,s,o,t){const n=1/Math.tan(e/2),a=1/(o-t);return new Float32Array([n/s,0,0,0,0,n,0,0,0,0,(t+o)*a,-1,0,0,2*t*o*a,0])}function Ae(e,s){const o=c=>{const u=Math.hypot(...c)||1;return[c[0]/u,c[1]/u,c[2]/u]},t=(c,u)=>[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]],n=(c,u)=>c[0]*u[0]+c[1]*u[1]+c[2]*u[2],a=o([e[0]-s[0],e[1]-s[1],e[2]-s[2]]),i=o(t([0,1,0],a)),l=t(a,i);return new Float32Array([i[0],l[0],a[0],0,i[1],l[1],a[1],0,i[2],l[2],a[2],0,-n(i,e),-n(l,e),-n(a,e),1])}function Re(e){const[s,o,t,,n,a,i,,l,c,u]=e,f=a*u-i*c,r=i*l-n*u,m=n*c-a*l,d=s*f+o*r+t*m||1;return new Float32Array([f/d,r/d,m/d,(t*c-o*u)/d,(s*u-t*l)/d,(o*l-s*c)/d,(o*i-t*a)/d,(t*n-s*i)/d,(s*a-o*n)/d])}const Me=()=>({min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]});function _e(e){for(let s=0;s<3;s++){let o=0;for(let t=0;t<3;t++)Math.abs(e[s*4+t])>1e-6&&o++;if(o>1)return false}return true}function Ne(e,s,o,t){const n=s.json.accessors[o];let a;if(_e(t)&&n.min&&n.max&&!n.normalized){const[l,c]=[n.min,n.max];a=Array.from({length:8},(u,f)=>[f&1?c[0]:l[0],f&2?c[1]:l[1],f&4?c[2]:l[2]]).flat()}else a=Te(s,o);const i=t;for(let l=0;l+2<a.length;l+=3){const c=a[l],u=a[l+1],f=a[l+2];for(let r=0;r<3;r++){const m=i[r]*c+i[4+r]*u+i[8+r]*f+i[12+r];m<e.min[r]&&(e.min[r]=m),m>e.max[r]&&(e.max[r]=m)}}return e}const C={normals:1,normalMap:2,unlit:4,mask:8},Y={POSITION:0,NORMAL:1,TEXCOORD_0:2,COLOR_0:3},J=["uBaseTexture","uMetalRoughTexture","uNormalTexture","uOcclusionTexture","uEmissiveTexture"],Se=`#version 300 es
2
2
  layout(location = 0) in vec3 aPosition;
3
3
  layout(location = 1) in vec3 aNormal;
4
4
  layout(location = 2) in vec2 aUv;
@@ -1 +1 @@
1
- import{U as l,ad as g}from"./shared-9sToDP5G.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),a=atob(n);try{return decodeURIComponent(a)}catch{const c=Uint8Array.from(a,s=>s.charCodeAt(0));return new TextDecoder().decode(c)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const a=n();if(a&&typeof a=="object")return a}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function A(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const a=typeof t.id=="string"?t.id:"content-state",c=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${a}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return c.length>1?{...n,targets:{id:a,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:c}}:n}function m(t,e){const n=g(t),a=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,c=a.type;if(c==="Manifest"||c==="Collection"){const o=c==="Manifest"?u(a):void 0;return o?{id:o.id,type:"Collection",manifestId:n.id}:{id:n.id,type:c}}const s=l(t.selector).find(o=>(o==null?void 0:o.type)==="PointSelector"&&o.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=[a,t].flatMap(o=>l(o==null?void 0:o.partOf)).find(o=>(o==null?void 0:o.id)&&(!o.type||o.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:c??"Canvas",target:d,...f}}export{I as decodeContentState,A as resolveContentState};
1
+ import{U as l,ad as g}from"./shared-w6hjs-L1.mjs";function b(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e+"=".repeat((4-e.length%4)%4),a=atob(n);try{return decodeURIComponent(a)}catch{const c=Uint8Array.from(a,s=>s.charCodeAt(0));return new TextDecoder().decode(c)}}function I(t){const e=t.trim();for(const n of[()=>JSON.parse(e),()=>JSON.parse(b(e))])try{const a=n();if(a&&typeof a=="object")return a}catch{}return null}function v(t){if(!t)return;const e=Number(t.split(",")[0]);return Number.isFinite(e)?e:void 0}const u=t=>l(t==null?void 0:t.partOf).find(e=>(e==null?void 0:e.id)&&e.type==="Collection");function A(t){const e=t.type==="Annotation"?l(t.target):[t],n=e[0]?m(e[0],t):null;if(!n||e.length<2)return n;const a=typeof t.id=="string"?t.id:"content-state",c=e.flatMap((s,d)=>{var y,p,f;const i=d===0?n:m(s,t),r=(i==null?void 0:i.type)==="Manifest"?i.id:i==null?void 0:i.manifestId;return!i||!r?[]:[{id:`${a}#target-${d+1}`,manifestId:r,...((y=i.target)==null?void 0:y.canvasId)&&{canvasId:i.target.canvasId},...((p=i.target)==null?void 0:p.region)&&{region:i.target.region},...((f=i.target)==null?void 0:f.time)!==void 0&&{time:i.target.time}}]});return c.length>1?{...n,targets:{id:a,...t.label&&typeof t.label=="object"?{label:t.label}:{},items:c}}:n}function m(t,e){const n=g(t),a=typeof t=="string"?{id:n.id}:t.type==="SpecificResource"?typeof t.source=="string"?{id:t.source}:t.source??{}:t,c=a.type;if(c==="Manifest"||c==="Collection"){const o=c==="Manifest"?u(a):void 0;return o?{id:o.id,type:"Collection",manifestId:n.id}:{id:n.id,type:c}}const s=l(t.selector).find(o=>(o==null?void 0:o.type)==="PointSelector"&&o.t!=null),d={canvasId:n.id};n.rect&&(d.region=n.rect);const i=(s==null?void 0:s.t)??v(n.t);i!==void 0&&(d.time=Number(i));const r=[a,t].flatMap(o=>l(o==null?void 0:o.partOf)).find(o=>(o==null?void 0:o.id)&&(!o.type||o.type==="Manifest")),y=u(r),p=e.type==="Annotation"&&l(e.body).length?{id:e.id??`${n.id}#content-state`,type:"Annotation",motivation:l(e.motivation),body:e.body,target:t}:void 0,f=p?{annotation:p}:{};return y&&r?{id:y.id,type:"Collection",manifestId:r.id,target:d,...f}:r?{id:r.id,type:"Manifest",target:d,...f}:{id:n.id,type:c??"Canvas",target:d,...f}}export{I as decodeContentState,A as resolveContentState};
@@ -1 +1 @@
1
- import{u as t,k as o}from"./shared-9sToDP5G.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),l=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),d=()=>t("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),h=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),t("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
1
+ import{u as t,k as o}from"./shared-w6hjs-L1.mjs";const s=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),i=()=>t("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),a=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),l=()=>t("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M304 416v-112h112M405.77 405.77L304 304M208 96v112H96M106.23 106.23L208 208M416 208H304V96M405.77 106.23L304 208M96 304h112v112M106.23 405.77L208 304"}),d=()=>t("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),h=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),t("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]}),c=()=>t(o,{children:[t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"64",d:"M112 144h0M112 256h0M112 368h0"}),t("path",{fill:"none",strokeLinecap:"round",strokeWidth:"40",d:"M208 144h208M208 256h208M208 368h208"})]}),M=({children:e,label:r})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 512 512",fill:"currentColor",stroke:"currentColor",focusable:"false","aria-hidden":"true",role:"presentation","data-testid":"clover-canvas-button-svg","data-label":r,children:e});export{c as C,h as R,s as Z,i as a,l as b,a as c,d,M as e};
@@ -1 +1 @@
1
- import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-9sToDP5G.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
1
+ import{u as d,A as v,d as y,_ as g,$ as w,k as A}from"./shared-w6hjs-L1.mjs";const E=new Map;function D(o){if(!o||typeof o!="object")return;const s={};for(const[n,r]of Object.entries(o)){if(typeof r!="function")continue;const u=E.get(n)??new WeakMap;E.set(n,u);let c=u.get(r);c||(c=l=>d(x,{...l,name:n,make:r}),u.set(r,c)),s[n]=c}return s}const B=["id","type","aria-label","lang","aria-keyshortcuts","aria-expanded","aria-controls"];function x({name:o,make:s,buttonProps:n,icon:r,label:u,tip:c}){const l=v(null),[m]=y(()=>{const e=document.createElement("span");return e.style.display="contents",e}),[a,k]=y(null),f=v(n.onClick);return f.current=n.onClick,g(()=>{const e=l.current;if(!e)return;const t=s({name:o,label:u,icon:m});if(!(t instanceof HTMLElement)){console.warn(`controlButtons.${o} returned no element; Clover's own is not drawn either.`);return}const i=t.matches("button")?t:t.querySelector("button")??t,b=h=>{var p;return(p=f.current)==null?void 0:p.call(f,h)};return i.addEventListener("click",b),e.after(t),k(i),()=>{i.removeEventListener("click",b),t.remove(),k(null)}},[s]),g(()=>{if(!a)return;const e=n;for(const t of B){const i=e[t];i===void 0?a.removeAttribute(t):a.setAttribute(t,String(i))}}),d(A,{children:[d("span",{ref:l,hidden:true}),w(r,m),a&&w(c,a)]})}export{D as toControlButtons};
@@ -1 +1 @@
1
- import{e as i,c as f,n as d,U as u,t as g,a1 as h}from"./shared-9sToDP5G.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
1
+ import{e as i,c as f,n as d,U as u,t as g,a1 as h}from"./shared-w6hjs-L1.mjs";function c(s,t){const e=new Set,a=[];for(const r of s)for(const n of u(r==null?void 0:r.rendering)){const o=(n==null?void 0:n.id)??(n==null?void 0:n["@id"]);if(typeof o!="string"||e.has(o))continue;e.add(o);const l=g(n.label,t);a.push({id:o,label:l.text||n.format||o,lang:l.text?l.lang:void 0,format:n.format,hrefLang:h(n)})}return a}function p(){const{language:s}=i("Download"),t=f(a=>a.manifest),e=f(a=>d(a.manifest,a.canvasId));return{page:c(e,s),all:c([t],s)}}export{p as u};
@@ -1 +1 @@
1
- import{g as _}from"./viewer-BYyFRkAV.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
1
+ import{g as _}from"./viewer-DD2bGSYe.mjs";const k=1/3,Y=.5,P=8,z="translate 240ms cubic-bezier(0.16, 1, 0.3, 1)",D=[120,_],A="cubic-bezier(0.33, 0.67, 0.67, 1)",E=new WeakMap;function O(t,n){let o=null,i="idle",a=0,S=0,s=0,d=1,e=1,c=[];const f=()=>{var r;return[t,(r=n.current.alongside)==null?void 0:r.current]},M=r=>{if(r.pointerType==="mouse"||!r.isPrimary||!n.current.enabled)return;o=r.pointerId,i="pending",a=r.clientX,S=r.clientY,s=0,d=t.getBoundingClientRect().width||1;const p=getComputedStyle(t).direction==="rtl";e=n.current.side==="end"!==p?1:-1,c=[[r.timeStamp,0]]},$=r=>{var h,v;if(r.pointerId!==o||i==="idle"||i==="scroll")return;const p=(r.clientX-a)*e,y=r.clientY-S;if(i==="pending"){if(Math.abs(y)>P&&Math.abs(y)>Math.abs(p)){i="scroll";return}if(p<P)return;i="drag",a=r.clientX,c=[[r.timeStamp,0]];try{(h=t.setPointerCapture)==null||h.call(t,r.pointerId)}catch{}u(f(),void 0,"none")}s=Math.max(0,(r.clientX-a)*e),u(f(),`${s*e}px 0`);const g=(v=n.current.scrim)==null?void 0:v.current;g&&(g.style.transition="none",g.style.opacity=String(1-s/d)),c.push([r.timeStamp,s]),c.length>5&&c.shift(),r.preventDefault()},m=r=>{var X,C,T;if(r.pointerId!==o)return;const p=i==="drag";if(i="idle",o=null,!p)return;t.addEventListener("click",b,{capture:true,once:true}),setTimeout(()=>t.removeEventListener("click",b,true),0);const[y,g]=c[0],[h,v]=c[c.length-1],I=h>y?(v-g)/(h-y):0,l=(X=n.current.scrim)==null?void 0:X.current,L=(C=window.matchMedia)==null?void 0:C.call(window,"(prefers-reduced-motion: reduce)").matches;if(s>d*k||I>Y){const x=L?0:Math.min(D[1],Math.max(D[0],2*(d-s)/Math.max(I,.001))),w=`${x}ms ${A}`;if(l&&(l.style.transition=`opacity ${w}`,l.style.opacity="0"),n.current.exits){u(f(),`${d*e}px 0`,`translate ${w}`),setTimeout(()=>n.current.onClose(),x);return}t.style.transition="none",t.style.translate="",t.style.transform=`translateX(${s*e}px)`,t.getBoundingClientRect(),t.style.transition=`transform ${w}`,t.style.transform=`var(--clover-template-out, translateX(${e*100}%))`,u([(T=n.current.alongside)==null?void 0:T.current],`${d*e}px 0`,`translate ${w}`),E.set(t,setTimeout(()=>R(t,n),x)),n.current.onClose();return}u(f(),"",L?"none":z),l&&(l.style.transition=L?"none":"opacity 240ms ease",l.style.opacity=""),setTimeout(()=>{i==="idle"&&!E.has(t)&&u(f(),void 0,"")},240)},b=r=>{r.stopPropagation(),r.preventDefault()};return t.addEventListener("pointerdown",M),t.addEventListener("pointermove",$,{passive:false}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{t.removeEventListener("pointerdown",M),t.removeEventListener("pointermove",$),t.removeEventListener("pointerup",m),t.removeEventListener("pointercancel",m)}}function F(t,n){E.has(t)&&!n.current.enabled||R(t,n)}function R(t,n){var i,a;clearTimeout(E.get(t)),E.delete(t),u([t,(i=n.current.alongside)==null?void 0:i.current],"",""),t.style.transform="";const o=(a=n.current.scrim)==null?void 0:a.current;o&&(o.style.opacity="",o.style.transition="")}function u(t,n,o){for(const i of t)i&&(o!==void 0&&(i.style.transition=o),n!==void 0&&(i.style.translate=n))}export{O as attach,F as reset};
@@ -1,4 +1,4 @@
1
- import{a3 as jc}from"./shared-9sToDP5G.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-Cl3PryAF.mjs";/**
1
+ import{a3 as jc}from"./shared-w6hjs-L1.mjs";import{F as eu,c as tu,i as nu,M as iu}from"./models-BnyeBKu_.mjs";/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -1 +1 @@
1
- const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-pxuhoj7w.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
1
+ const r=Symbol.for("@nulib/clover/scene-engines"),o=globalThis,c=o[r]??(o[r]=new Map);function s(e,n){c.set(e,n)}const t=()=>import("./cloverEngine-BjfUbU7f.mjs");let i=false;function l(e="clover"){if(e==="clover")return t;const n=c.get(e);return n||(i||(i=true,console.warn(`Clover: no Scene engine "${e}"; drawing with Clover's.`)),t)}export{l as e,s as r};
@@ -1 +1 @@
1
- import{U as h,ac as m,ad as x,av as I}from"./shared-9sToDP5G.mjs";import{b as q}from"./imageService-Dr2yUnHN.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=q(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};
1
+ import{U as h,ac as m,ad as x,av as I}from"./shared-w6hjs-L1.mjs";import{b as q}from"./imageService-DVoE9khh.mjs";function k(e,i,n){for(const s of h(e==null?void 0:e.items))for(const o of h(s==null?void 0:s.items)){if(!m(o))continue;const l=h(o==null?void 0:o.body).flatMap(t=>(t==null?void 0:t.type)==="Choice"?h(t.items).filter((r,f)=>n?(r==null?void 0:r.id)===n:f===0):n&&(t==null?void 0:t.id)!==n?[]:[t]);for(const t of l){if((t==null?void 0:t.type)!=="Image"||!t.width||!t.height)continue;const r=q(t.service);if(!r)continue;const f=x(h(o.target)[0]).rect??{x:0,y:0,w:e.width,h:e.height},a=(i.x-f.x)/f.w,c=(i.y-f.y)/f.h,u=Math.max(0,a),p=Math.max(0,c),M=Math.min(1,a+i.w/f.w)-u,g=Math.min(1,c+i.h/f.h)-p;if(M>0&&g>0)return{service:r,region:{x:u,y:p,width:M,height:g}}}}return null}const w=new WeakMap;function C(e,i){let n=w.get(e);n||w.set(e,n=new Map);let s=n.get(i);return s||(s=I({id:i,type:"Manifest"},{request:e.request}).catch(()=>null),n.set(i,s)),s}export{C as f,k as r};
@@ -1 +1 @@
1
- import{aF as w,U as f,ad as l}from"./shared-9sToDP5G.mjs";import{resolveContentState as S}from"./content-state-reader-DVti_UNh.mjs";import{readSvgShape as b}from"./svg-shape-D1K-WNrY.mjs";const m="http://iiif.io/api/presentation/2/context.json",x=t=>(t==null?void 0:t["@type"])==="oa:Annotation"||(t==null?void 0:t["@id"])!==void 0&&f(t==null?void 0:t["@context"]).includes(m),y=t=>typeof t=="string"?t:(t==null?void 0:t["@id"])??(t==null?void 0:t.id);async function I(t){if(!x(t))return t;const{convertPresentation2:n}=await import("./presentation-2-C-U79S_T.mjs"),r=n({"@context":m,...JSON.parse(JSON.stringify(t))}),a=f(t.on).map(e=>y(f(e==null?void 0:e.within)[0])),s=f(r.target).map((e,c)=>{const o=a[c];if(!o)return e;const d=[{id:o,type:"Manifest"}],g=(e==null?void 0:e.type)==="SpecificResource",u=y(g?e.source:e);return u?g?{...e,source:{id:u,type:"Canvas",partOf:d}}:{id:u,type:"Canvas",partOf:d}:e}),i=f(r.body).map(e=>typeof(e==null?void 0:e.chars)=="string"?{type:"TextualBody",value:e.chars,...e.format?{format:e.format}:{},...e.language?{language:e.language}:{}}:e);return{...r,"@context":void 0,type:"Annotation",target:s.length===1?s[0]:s,...i.length?{body:i.length===1?i[0]:i}:{}}}async function $(t,n,r){const a=await A(t);if(!a)throw new w("Unreadable content state");const s=await r(a.id,{...n,manifestId:n.manifestId??a.manifestId,follows:(n.follows??0)+1}),{target:i}=a;return O({...s,target:i&&(!s.target||s.target.canvasId===i.canvasId)?{...s.target,...i}:s.target??i,annotation:s.annotation??a.annotation,targets:s.targets??a.targets})}async function A(t){const n=await I(t),r=S(n);if(!r)return null;const a=n.type==="Annotation"?f(n.target)[0]:n,s=C(l(a).svg),i=r.annotation;return{...r,...r.target&&!r.target.region&&s?{target:{...r.target,region:s}}:{},...i?{annotation:{...i,motivation:f(i.motivation).filter(e=>e!=="painting"),...n.label?{label:n.label}:{}}}:{}}}function N(t){const n=t?Number(t.split(",")[0]):NaN;return Number.isFinite(n)?n:void 0}function C(t){var r;const n=t?(r=b(t))==null?void 0:r.box:void 0;return n&&n.width>0&&n.height>0?{x:n.x,y:n.y,w:n.width,h:n.height}:void 0}function R(t,n){const r=new Set,a=e=>{for(const c of e){if(!c||r.has(c))continue;if(r.add(c),c.type==="Range"&&c.id===n)return c;const o=a(f(c.items));if(o)return o}},s=(e,c=0)=>{for(const o of f(e.items)){if((o==null?void 0:o.type)==="Range"){const p=c<16?s(o,c+1):null;if(p)return p;continue}const d=typeof o=="string"?o:o==null?void 0:o.id,g=l((o==null?void 0:o.type)==="SpecificResource"?o:String(d??"").replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"));if(!g.id)continue;const u=N(g.t);return{canvasId:g.id,...g.rect?{region:g.rect}:{},...u!==void 0?{time:u}:{}}}return null},i=a(f(t.structures));return i?s(i):null}function v(t,n){if(typeof t=="string"){const a=t.indexOf("#");return a<0?n:n+t.slice(a)}const r=t;return(r==null?void 0:r.type)==="SpecificResource"?{...r,source:typeof r.source=="object"?{...r.source,id:n,type:"Canvas"}:{id:n,type:"Canvas"}}:v(String((r==null?void 0:r.id)??""),n)}function O(t){var c;const{manifest:n,target:r}=t;if(!r)return t;const a=f(n.items);if(a.some(o=>(o==null?void 0:o.id)===r.canvasId))return t;const i=(a.length===1&&((c=a[0])==null?void 0:c.id)===`${n.id}/canvas`?{canvasId:a[0].id}:null)??R(n,r.canvasId);if(!i)return t;const e=t.annotation&&{...t.annotation,target:v(t.annotation.target,i.canvasId)};return{...t,target:{...r,canvasId:i.canvasId,...r.region?{}:i.region?{region:i.region}:{},...r.time!==void 0?{}:i.time!==void 0?{time:i.time}:{}},...e?{annotation:e}:{}}}export{$ as follow,O as placeTarget,I as readAnnotation,A as resolve};
1
+ import{aF as w,U as f,ad as l}from"./shared-w6hjs-L1.mjs";import{resolveContentState as S}from"./content-state-reader-W2X5SbX2.mjs";import{readSvgShape as b}from"./svg-shape-D1K-WNrY.mjs";const m="http://iiif.io/api/presentation/2/context.json",x=t=>(t==null?void 0:t["@type"])==="oa:Annotation"||(t==null?void 0:t["@id"])!==void 0&&f(t==null?void 0:t["@context"]).includes(m),y=t=>typeof t=="string"?t:(t==null?void 0:t["@id"])??(t==null?void 0:t.id);async function I(t){if(!x(t))return t;const{convertPresentation2:n}=await import("./presentation-2-C-U79S_T.mjs"),r=n({"@context":m,...JSON.parse(JSON.stringify(t))}),a=f(t.on).map(e=>y(f(e==null?void 0:e.within)[0])),s=f(r.target).map((e,c)=>{const o=a[c];if(!o)return e;const d=[{id:o,type:"Manifest"}],g=(e==null?void 0:e.type)==="SpecificResource",u=y(g?e.source:e);return u?g?{...e,source:{id:u,type:"Canvas",partOf:d}}:{id:u,type:"Canvas",partOf:d}:e}),i=f(r.body).map(e=>typeof(e==null?void 0:e.chars)=="string"?{type:"TextualBody",value:e.chars,...e.format?{format:e.format}:{},...e.language?{language:e.language}:{}}:e);return{...r,"@context":void 0,type:"Annotation",target:s.length===1?s[0]:s,...i.length?{body:i.length===1?i[0]:i}:{}}}async function $(t,n,r){const a=await A(t);if(!a)throw new w("Unreadable content state");const s=await r(a.id,{...n,manifestId:n.manifestId??a.manifestId,follows:(n.follows??0)+1}),{target:i}=a;return O({...s,target:i&&(!s.target||s.target.canvasId===i.canvasId)?{...s.target,...i}:s.target??i,annotation:s.annotation??a.annotation,targets:s.targets??a.targets})}async function A(t){const n=await I(t),r=S(n);if(!r)return null;const a=n.type==="Annotation"?f(n.target)[0]:n,s=C(l(a).svg),i=r.annotation;return{...r,...r.target&&!r.target.region&&s?{target:{...r.target,region:s}}:{},...i?{annotation:{...i,motivation:f(i.motivation).filter(e=>e!=="painting"),...n.label?{label:n.label}:{}}}:{}}}function N(t){const n=t?Number(t.split(",")[0]):NaN;return Number.isFinite(n)?n:void 0}function C(t){var r;const n=t?(r=b(t))==null?void 0:r.box:void 0;return n&&n.width>0&&n.height>0?{x:n.x,y:n.y,w:n.width,h:n.height}:void 0}function R(t,n){const r=new Set,a=e=>{for(const c of e){if(!c||r.has(c))continue;if(r.add(c),c.type==="Range"&&c.id===n)return c;const o=a(f(c.items));if(o)return o}},s=(e,c=0)=>{for(const o of f(e.items)){if((o==null?void 0:o.type)==="Range"){const p=c<16?s(o,c+1):null;if(p)return p;continue}const d=typeof o=="string"?o:o==null?void 0:o.id,g=l((o==null?void 0:o.type)==="SpecificResource"?o:String(d??"").replace(/\/((?:t|xywh)=[^/#]*)$/,"#$1"));if(!g.id)continue;const u=N(g.t);return{canvasId:g.id,...g.rect?{region:g.rect}:{},...u!==void 0?{time:u}:{}}}return null},i=a(f(t.structures));return i?s(i):null}function v(t,n){if(typeof t=="string"){const a=t.indexOf("#");return a<0?n:n+t.slice(a)}const r=t;return(r==null?void 0:r.type)==="SpecificResource"?{...r,source:typeof r.source=="object"?{...r.source,id:n,type:"Canvas"}:{id:n,type:"Canvas"}}:v(String((r==null?void 0:r.id)??""),n)}function O(t){var c;const{manifest:n,target:r}=t;if(!r)return t;const a=f(n.items);if(a.some(o=>(o==null?void 0:o.id)===r.canvasId))return t;const i=(a.length===1&&((c=a[0])==null?void 0:c.id)===`${n.id}/canvas`?{canvasId:a[0].id}:null)??R(n,r.canvasId);if(!i)return t;const e=t.annotation&&{...t.annotation,target:v(t.annotation.target,i.canvasId)};return{...t,target:{...r,canvasId:i.canvasId,...r.region?{}:i.region?{region:i.region}:{},...r.time!==void 0?{}:i.time!==void 0?{time:i.time}:{}},...e?{annotation:e}:{}}}export{$ as follow,O as placeTarget,I as readAnnotation,A as resolve};
@@ -1 +1 @@
1
- import{T as f,t as d}from"./shared-9sToDP5G.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=d(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
+ import{T as f,t as d}from"./shared-w6hjs-L1.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=d(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 +1 @@
1
- import{u as e,k as o}from"./shared-9sToDP5G.mjs";const t=()=>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"}),c=()=>e(o,{children:[e("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),e("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),s=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),r=()=>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"}),h=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),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:"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"})]}),l=()=>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{a as C,s as I,d as O,r as P,c as a,t as b,h as c,l as d};
1
+ import{u as e,k as o}from"./shared-w6hjs-L1.mjs";const t=()=>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"}),c=()=>e(o,{children:[e("path",{d:"M160 144h288M160 256h288M160 368h288",fill:"none",strokeLinecap:"round",strokeWidth:"32"}),e("circle",{cx:"80",cy:"144",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"256",r:"20",stroke:"none"}),e("circle",{cx:"80",cy:"368",r:"20",stroke:"none"})]}),s=()=>e("path",{stroke:"none",d:"M256 72A48 48 0 1 1 256 168A48 48 0 1 1 256 72Z M192 216H296V384H328V432H184V384H216V264H192Z"}),r=()=>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"}),h=()=>e("path",{strokeLinejoin:"round",strokeWidth:"40",d:"M184 128V384L392 256Z"}),a=()=>e("path",{strokeLinecap:"round",strokeWidth:"45",d:"M154 154L358 358M358 154L154 358"}),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:"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"})]}),l=()=>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{a as C,s as I,d as O,r as P,c as a,t as b,h as c,l as d};
@@ -1 +1 @@
1
- import{c as s,T as o,e as i,aj as r,a2 as l,ak as f,al as v,F as u,n as d,a as c,t as g}from"./shared-9sToDP5G.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(()=>g(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
+ import{c as s,T as o,e as i,aj as r,a2 as l,ak as f,al as v,F as u,n as d,a as c,t as g}from"./shared-w6hjs-L1.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(()=>g(n,e),[n,e])}function O(){return c().t}function T(){return c().langOf}export{b as a,p as b,C as c,A as d,S as e,z as f,O as g,T as h,L as i,I as u};
@@ -1 +1 @@
1
- import{F as L,U as d,ac as P,ad as $,aB as S}from"./shared-9sToDP5G.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function C(t){const c=new Map;for(const e of L(t).canvases)k(e,c);return[...c.values()]}function k(t,c){d(t.items).forEach((e,s)=>d(e==null?void 0:e.items).forEach((u,f)=>{if(!P(u))return;const a=$(d(u.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};d(u.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?d(r.items):[r]).forEach((o,m)=>{for(const n of d(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,u.id,s,f,y),item:m,image:o.id}:void 0,M=S(n,l,t.id).map(p=>{const h=q(p.annotation,o),b=Math.round(a.x+h.x*(a.w/h.width)),E=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)),N=`${t.id}#xywh=${b},${E},${g},${I}`;return{...p,canvasId:t.id,target:$(N),annotation:{...p.annotation,target:N},...A?{layer:A}:{}}});if(!M.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(...M)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,u={x:0,y:0,w:e,h:s,width:e,height:s},f=d(t==null?void 0:t.target)[0],r=(typeof f=="object"?d(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 u;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}:u}export{C as imageLayers};
1
+ import{F as L,U as d,ac as P,ad as $,aB as S}from"./shared-w6hjs-L1.mjs";import{c as j}from"./choice-key-BUNebLKe.mjs";function C(t){const c=new Map;for(const e of L(t).canvases)k(e,c);return[...c.values()]}function k(t,c){d(t.items).forEach((e,s)=>d(e==null?void 0:e.items).forEach((u,f)=>{if(!P(u))return;const a=$(d(u.target)[0]).rect??{x:0,y:0,w:Number(t.width)||0,h:Number(t.height)||0};d(u.body).forEach((r,y)=>{const w=(r==null?void 0:r.type)==="Choice";(w?d(r.items):[r]).forEach((o,m)=>{for(const n of d(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,u.id,s,f,y),item:m,image:o.id}:void 0,M=S(n,l,t.id).map(p=>{const h=q(p.annotation,o),b=Math.round(a.x+h.x*(a.w/h.width)),E=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)),N=`${t.id}#xywh=${b},${E},${g},${I}`;return{...p,canvasId:t.id,target:$(N),annotation:{...p.annotation,target:N},...A?{layer:A}:{}}});if(!M.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(...M)}})})}))}function q(t,c){const e=Number(c.width)||1,s=Number(c.height)||1,u={x:0,y:0,w:e,h:s,width:e,height:s},f=d(t==null?void 0:t.target)[0],r=(typeof f=="object"?d(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 u;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}:u}export{C as imageLayers};
@@ -1 +1 @@
1
- import{p as c,i as d}from"./imageService-Dr2yUnHN.mjs";import{aG as l}from"./shared-9sToDP5G.mjs";function m(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??m(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function f(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:d(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function v(i,e){const t=c(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[f(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:f(t,n,m(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await l(h)}}export{m as fittedSize,v as imageServiceContent};
1
+ import{p as c,i as d}from"./imageService-DVoE9khh.mjs";import{aG as l}from"./shared-w6hjs-L1.mjs";function m(i){const{width:e,height:t,maxWidth:n,maxHeight:r,maxArea:o}=i,g=(s,p)=>(!n||s<=n)&&(!r||p<=r)&&(!o||s*p<=o);if(g(e,t))return{width:e,height:t};const h=i.sizes.filter(s=>g(s.width,s.height));if(h.length)return h[h.length-1];if(!i.sizeByW)return{width:e,height:t};const a=Math.min(n?n/e:1,r?r/t:1,o?Math.sqrt(o/(e*t)):1);return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a))}}function u(i,e=200){return i.sizes.find(t=>Math.max(t.width,t.height)>=e)??m(i)}const y={jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif"};function f(i,e,t){const n={x:0,y:0,width:i.width,height:i.height};return{id:d(i,n,t.width,t.height),type:"Image",format:y[i.format]??"image/jpeg",width:t.width,height:t.height,service:[e]}}function w(i,e){if(e.version===3)return{id:e.id,type:"ImageService3",profile:typeof i.profile=="string"?i.profile:"level0"};const t=[].concat(i.profile??[]).find(n=>typeof n=="string");return{"@id":e.id,"@type":"ImageService2",profile:t??"http://iiif.io/api/image/2/level0.json"}}async function v(i,e){const t=c(i,e),n=w(i,t),r=`${t.id}/canvas`,o=[i.rights,i.license].flat().find(a=>typeof a=="string"),g=i.attribution,h={"@context":"http://iiif.io/api/presentation/3/context.json",id:t.id,type:"Manifest",label:{none:[""]},thumbnail:[f(t,n,u(t))],items:[{id:r,type:"Canvas",width:t.width,height:t.height,items:[{id:`${r}/page`,type:"AnnotationPage",items:[{id:`${r}/page/image`,type:"Annotation",motivation:"painting",body:f(t,n,m(t)),target:r}]}]}]};return o&&(h.rights=o),g&&(h.requiredStatement={label:{en:["Attribution"]},value:{none:[].concat(g).map(a=>typeof a=="string"?a:String((a==null?void 0:a["@value"])??"")).filter(Boolean)}}),{manifest:await l(h)}}export{m as fittedSize,v as imageServiceContent};
@@ -1 +1 @@
1
- import{a4 as j}from"./shared-9sToDP5G.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,O as b,L as f,P as i,F as p};
1
+ import{a4 as j}from"./shared-w6hjs-L1.mjs";const S=["jpg","png","webp","gif"];class y extends Error{constructor(t,e,i){super(t),this.url=e,this.status=i,this.name="ImageServiceError"}}function g(r){return r.replace(/\/info\.json$/,"").replace(/\/+$/,"")}function O(r){const t=Array.isArray(r)?r:r?[r]:[];for(const e of t){if(!e||typeof e!="object")continue;const i=e,o=String(i.type??i["@type"]??""),s=JSON.stringify(i.profile??""),n=/ImageService/i.test(o)||/iiif\.io\/api\/image/.test(s)||/^"level[012]"$/.test(s)||!o&&!i.profile,c=i["@id"]??i.id;if(n&&typeof c=="string")return g(c)}}function F(r,t){if(!r||typeof r!="object")throw new y("info.json is not an object",t??"");const e=r,i=N(e),o=i===3?e.id??e["@id"]:e["@id"]??e.id,s=g(o??t??""),n=Number(e.width),c=Number(e.height);if(!s||!(n>0)||!(c>0))throw new y("info.json is missing id, width or height",t??s);const f=Array.isArray(e.profile)?e.profile:[e.profile],b=f.find(a=>typeof a=="string"),w=f.filter(a=>!!a&&typeof a=="object"),l=I(b),d=new Set([...Array.isArray(e.extraFeatures)?e.extraFeatures:[],...w.flatMap(a=>Array.isArray(a.supports)?a.supports:[])]),x=[...Array.isArray(e.preferredFormats)?e.preferredFormats:[]].map(a=>String(a).toLowerCase()).find(a=>S.includes(a))??"jpg",m=a=>{var A;const v=e[a]??((A=w.find($=>$[a]!==void 0))==null?void 0:A[a]);return Number(v)>0?Number(v):void 0};let u=m("maxWidth"),h=m("maxHeight");return u&&!h&&(h=u),h&&!u&&(u=void 0),{id:s,version:i,level:l,width:n,height:c,tiles:z(e.tiles),sizes:B(e.sizes),maxWidth:u,maxHeight:h,maxArea:m("maxArea"),regionByPx:l>=1||d.has("regionByPx"),sizeByW:l>=1||d.has("sizeByW")||d.has("sizeByWh"),format:x,quality:"default"}}function N(r){const t=[].concat(r["@context"]??[]).map(String);return t.some(e=>e.includes("/image/3"))?3:t.some(e=>e.includes("/image/2"))?2:r.type==="ImageService3"?3:r["@id"]?2:3}function I(r){const t=r==null?void 0:r.match(/level([012])/);return t?Number(t[1]):0}function z(r){return Array.isArray(r)?r.map(t=>{const e=Number(t==null?void 0:t.width),i=Number((t==null?void 0:t.height)??(t==null?void 0:t.width)),o=(Array.isArray(t==null?void 0:t.scaleFactors)?t.scaleFactors:[1]).map(Number).filter(s=>s>0).sort((s,n)=>s-n);return{width:e,height:i,scaleFactors:o}}).filter(t=>t.width>0&&t.height>0&&t.scaleFactors.length):[]}function B(r){return Array.isArray(r)?r.map(t=>({width:Number(t==null?void 0:t.width),height:Number(t==null?void 0:t.height)})).filter(t=>t.width>0&&t.height>0).sort((t,e)=>t.width-e.width):[]}function P(r,t,e,i,o=r.quality){const s=t.x===0&&t.y===0&&t.width===r.width&&t.height===r.height,n=s?"full":`${t.x},${t.y},${t.width},${t.height}`,c=s&&e===r.width&&i===r.height;let f;return r.version===3?f=c?"max":`${e},${i}`:f=c?"full":`${e},`,`${r.id}/${n}/${f}/0/${o}.${r.format}`}function C(r){return r.version===2&&r.level===0?"native":void 0}const p=new Map;function L(r,{request:t}={}){const e=g(r),i=p.get(e);if(i)return i;const o=`${e}/info.json`,s=j(t,o,{headers:{Accept:"application/ld+json, application/json"}}).then(async n=>{if(!n.ok)throw new y(`info.json request failed with ${n.status}`,o,n.status);return F(await n.json(),e)}).catch(n=>{throw p.delete(e),n});return p.set(e,s),s}export{C as a,O as b,L as f,P as i,F as p};